@elliemae/ds-form-layout-blocks 1.60.0 → 2.0.0-alpha.12

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.
Files changed (80) hide show
  1. package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js +30 -35
  2. package/cjs/form-layout-block-item/index.d.js +0 -1
  3. package/cjs/form-layout-block-item/index.js +3 -10
  4. package/cjs/form-layout-block-item/propTypes.js +1 -2
  5. package/cjs/form-layout-block-item/styles.js +55 -34
  6. package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +14 -17
  7. package/cjs/form-layout-checkbox-group/config/useValidateProps.js +6 -9
  8. package/cjs/form-layout-checkbox-group/defaultProps.js +1 -2
  9. package/cjs/form-layout-checkbox-group/index.d.js +0 -1
  10. package/cjs/form-layout-checkbox-group/index.js +3 -13
  11. package/cjs/form-layout-checkbox-group/propTypes.js +1 -2
  12. package/cjs/form-layout-checkbox-group/styles.js +26 -15
  13. package/cjs/index.d.js +0 -1
  14. package/cjs/index.js +6 -19
  15. package/esm/form-layout-block-item/DSFormLayoutBlockItem.js +27 -32
  16. package/esm/form-layout-block-item/index.d.js +0 -1
  17. package/esm/form-layout-block-item/index.js +0 -7
  18. package/esm/form-layout-block-item/propTypes.js +1 -2
  19. package/esm/form-layout-block-item/styles.js +55 -34
  20. package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js +7 -10
  21. package/esm/form-layout-checkbox-group/config/useValidateProps.js +5 -7
  22. package/esm/form-layout-checkbox-group/defaultProps.js +1 -2
  23. package/esm/form-layout-checkbox-group/index.d.js +0 -1
  24. package/esm/form-layout-checkbox-group/index.js +0 -10
  25. package/esm/form-layout-checkbox-group/propTypes.js +1 -2
  26. package/esm/form-layout-checkbox-group/styles.js +26 -15
  27. package/esm/index.d.js +0 -1
  28. package/esm/index.js +0 -13
  29. package/package.json +69 -11
  30. package/types/form-layout-block-item/DSFormLayoutBlockItem.d.ts +77 -0
  31. package/types/form-layout-block-item/index.d.d.ts +35 -0
  32. package/types/form-layout-block-item/index.d.ts +1 -0
  33. package/types/form-layout-block-item/propTypes.d.ts +66 -0
  34. package/types/form-layout-block-item/styles.d.ts +6 -0
  35. package/types/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.d.ts +20 -0
  36. package/types/form-layout-checkbox-group/config/useValidateProps.d.ts +2 -0
  37. package/types/form-layout-checkbox-group/defaultProps.d.ts +3 -0
  38. package/types/form-layout-checkbox-group/index.d.d.ts +10 -0
  39. package/types/form-layout-checkbox-group/index.d.ts +1 -0
  40. package/types/form-layout-checkbox-group/propTypes.d.ts +9 -0
  41. package/types/form-layout-checkbox-group/styles.d.ts +2 -0
  42. package/types/index.d.ts +2 -0
  43. package/cjs/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -1
  44. package/cjs/form-layout-block-item/index.d.js.map +0 -1
  45. package/cjs/form-layout-block-item/index.js.map +0 -1
  46. package/cjs/form-layout-block-item/propTypes.js.map +0 -1
  47. package/cjs/form-layout-block-item/styles.js.map +0 -1
  48. package/cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -1
  49. package/cjs/form-layout-checkbox-group/config/useValidateProps.js.map +0 -1
  50. package/cjs/form-layout-checkbox-group/defaultProps.js.map +0 -1
  51. package/cjs/form-layout-checkbox-group/index.d.js.map +0 -1
  52. package/cjs/form-layout-checkbox-group/index.js.map +0 -1
  53. package/cjs/form-layout-checkbox-group/propTypes.js.map +0 -1
  54. package/cjs/form-layout-checkbox-group/styles.js.map +0 -1
  55. package/cjs/index.d.js.map +0 -1
  56. package/cjs/index.js.map +0 -1
  57. package/esm/form-layout-block-item/DSFormLayoutBlockItem.js.map +0 -1
  58. package/esm/form-layout-block-item/index.d.js.map +0 -1
  59. package/esm/form-layout-block-item/index.js.map +0 -1
  60. package/esm/form-layout-block-item/propTypes.js.map +0 -1
  61. package/esm/form-layout-block-item/styles.js.map +0 -1
  62. package/esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js.map +0 -1
  63. package/esm/form-layout-checkbox-group/config/useValidateProps.js.map +0 -1
  64. package/esm/form-layout-checkbox-group/defaultProps.js.map +0 -1
  65. package/esm/form-layout-checkbox-group/index.d.js.map +0 -1
  66. package/esm/form-layout-checkbox-group/index.js.map +0 -1
  67. package/esm/form-layout-checkbox-group/propTypes.js.map +0 -1
  68. package/esm/form-layout-checkbox-group/styles.js.map +0 -1
  69. package/esm/index.d.js.map +0 -1
  70. package/esm/index.js.map +0 -1
  71. package/form-layout-block-item/DSFormLayoutBlockItem/package.json +0 -10
  72. package/form-layout-block-item/package.json +0 -10
  73. package/form-layout-block-item/propTypes/package.json +0 -10
  74. package/form-layout-block-item/styles/package.json +0 -10
  75. package/form-layout-checkbox-group/DSFormLayoutCheckboxGroup/package.json +0 -10
  76. package/form-layout-checkbox-group/config/useValidateProps/package.json +0 -10
  77. package/form-layout-checkbox-group/defaultProps/package.json +0 -10
  78. package/form-layout-checkbox-group/package.json +0 -10
  79. package/form-layout-checkbox-group/propTypes/package.json +0 -10
  80. package/form-layout-checkbox-group/styles/package.json +0 -10
@@ -0,0 +1,2 @@
1
+ export * from './form-layout-block-item';
2
+ export * from './form-layout-checkbox-group';
@@ -1 +0,0 @@
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;AAC3D,MACEC,KADF,GAcID,KAdJ,CACEC,KADF;AAAA,MAEEC,eAFF,GAcIF,KAdJ,CAEEE,eAFF;AAAA,MAGEC,iBAHF,GAcIH,KAdJ,CAGEG,iBAHF;AAAA,MAIEC,OAJF,GAc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ACI,QAApB,iBACCW,wCAACK,wCAAD;AACE,IAAA,SAAS,EAAEf,SADb;AAEE,IAAA,SAAS,EAAEG,SAFb;AAGE,mBAAaG,OAHf;AAIE,IAAA,EAAE,YAAKT,OAAO,IAAIU,WAAhB;AAJJ,KAMGZ,eANH,CAhBJ,EAyBGC,iBAAiB,IAAIG,QAArB,iBACCW,wCAACK,wCAAD;AAAe,IAAA,QAAQ,EAAEhB,QAAzB;AAAmC,IAAA,SAAS,EAAEC,SAA9C;AAAyD,IAAA,SAAS,EAAEG,SAApE;AAA+E,IAAA,IAAI,EAAC;AAApF,KACGP,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 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
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;AACvBC,EAAAA,QAAQ,EAAEC,mBAAS,CAACC,IAAV,CAAeC,UAAf,CAA0BC,WAA1B,CAAsC,mBAAtC,CADa;AAEvBC,EAAAA,KAAK,EAAEJ,mBAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACL,8FADK,CAFgB;AAKvBG,EAAAA,OAAO,EAAEN,mBAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACP,oGADO,CALc;AAQvBI,EAAAA,eAAe,EAAEP,mBAAS,CAACK,MAAV,CAAiBF,WAAjB,CAA6B,qDAA7B,CARM;AASvBK,EAAAA,iBAAiB,EAAER,mBAAS,CAACK,MAAV,CAAiBF,WAAjB,CACjB,gHADiB,CATI;AAYvBM,EAAAA,QAAQ,EAAET,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAZa;AAavBQ,EAAAA,QAAQ,EAAEX,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAba;AAcvBS,EAAAA,QAAQ,EAAEZ,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAda;AAevBU,EAAAA,UAAU,EAAEb,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAfW;AAgBvBW,EAAAA,SAAS,EAAEd,mBAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,oDAA3B,CAhBY;AAiBvBY,EAAAA,SAAS,EAAEf,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACT,gGADS,CAjBY;AAoBvBa,EAAAA,aAAa,EAAEhB,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACb,sGADa,CApBQ;AAuBvBc,EAAAA,OAAO,EAAEjB,mBAAS,CAACU,IAAV,CAAeP,WAAf,CACP,gHADO;AAvBc;;;;"}
@@ -1 +0,0 @@
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;AAAA;AAAA,iGAKxB;AAAA,MAAGC,UAAH,QAAGA,UAAH;AAAA,SAAqBA,UAAU,GAAG,qBAAH,GAA2B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GA,KAAH;AAAA,MAAUW,QAAV,SAAUA,QAAV;AAAA,SAA0BA,QAAQ,GAAGX,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAAH,GAA8Bb,KAAK,CAACY,MAAN,CAAaE,OAAb,CAAqB,GAArB,CAAhE;AAAA,CARe,EAStB;AAAA,MAAGhB,SAAH,SAAGA,SAAH;AAAA,MAAcC,SAAd,SAAcA,SAAd;AAAA,SAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,mBAA1B,GAAgDH,SAA/E;AAAA,CATsB;IAYbmB,UAAU,gBAAGtB,0BAAM,CAACuB,IAAV;AAAA;AAAA,qEAIN;AAAA,MAAGhB,KAAH,UAAGA,KAAH;AAAA,SAAeA,KAAK,CAACE,KAAN,CAAYE,IAA3B;AAAA,CAJM,EAKnB;AAAA,MAAGJ,KAAH,UAAGA,KAAH;AAAA,MAAUiB,QAAV,UAAUA,QAAV;AAAA,SACAA,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;AAAA;AAAA;;;;;;;;"}
@@ -1 +0,0 @@
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;AACpFC,EAAAA,gEAAgB,CAACD,KAAD,CAAhB;AACA,MAAME,gBAAgB,GAAGC,2CAA4B,CAACH,KAAD,EAAQI,iDAAR,CAArD;AAEA,sBAAOC,wCAACC,8CAAD;AAAiB,IAAA,SAAS,EAAEJ,gBAAgB,CAACK;AAA7C,KAAyDL,gBAAgB,CAACM,QAA1E,CAAP;AACD;;AAEDT,yBAAyB,CAACU,SAA1B,GAAsCA,2CAAtC;IACMC,mCAAmC,GAAGC,kBAAQ,CAACZ,yBAAD;AACpDW,mCAAmC,CAACD,SAApC,GAAgDA,2CAAhD;;;;;"}
@@ -1 +0,0 @@
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;AAChD,MAAIC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAJ,EAAwB,OAAO,OAAP;AACxB,MAAIA,GAAG,KAAK,IAAZ,EAAkB,OAAO,MAAP;AAClB,MAAIA,GAAG,KAAKG,SAAZ,EAAuB,OAAO,WAAP;AACvB,qCAAcH,GAAd;AACD,CALD;;AAOA,IAAMI,gCAAgC,GAAG,SAAnCA,gCAAmC,CAACC,WAAD,EAAgC;AACvE,QAAM,IAAIC,KAAJ,6IAGMD,WAHN,eAGsBN,eAAe,CAACM,WAAD,CAHrC,gEAAN;AAOD,CARD;;AAUA,IAAME,+BAA+B,GAAG,SAAlCA,+BAAkC,GAAY;AAClD,QAAM,IAAID,KAAJ,6KAAN;AAOD,CARD;;IAUaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6C;AAC3E,MAAIA,KAAK,CAACC,SAAN,KAAoBP,SAApB,IAAiCM,KAAK,CAACC,SAAN,KAAoB,UAArD,IAAmED,KAAK,CAACC,SAAN,KAAoB,YAA3F,EAAyG;AACvGN,IAAAA,gCAAgC,CAACK,KAAK,CAACC,SAAP,CAAhC;AACD;;AACD,MAAI,CAACC,yBAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBJ,KAAK,CAACK,QAA3B,CAAL,EAA2C;AACzCP,IAAAA,+BAA+B;AAChC;AACF;;;;"}
@@ -1 +0,0 @@
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;AAC1BC,EAAAA,SAAS,EAAE;AADe;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
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;AACvBC,EAAAA,SAAS,EAAEC,mBAAS,CAACC,KAAV,CAAgB,CAAC,YAAD,EAAe,UAAf,CAAhB,EAA4CC,WAA5C,CAAwD,uCAAxD;AADY;;;;"}
@@ -1 +0,0 @@
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;AAAA;AAAA,iMAGR;AAAA,MAAGC,SAAH,QAAGA,SAAH;AAAA,SAAoBA,SAAS,KAAK,YAAd,GAA6B,KAA7B,GAAqC,QAAzD;AAAA,CAHQ,EAIX;AAAA,MAAGC,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CAJW,EAKV;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CALU,EAMZ;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CANY,EASP;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CATO,EAYR;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,MAAUD,SAAV,SAAUA,SAAV;AAAA,SAA2BA,SAAS,KAAK,YAAd,GAA6BC,KAAK,CAACC,KAAN,CAAYG,CAAzC,GAA6C,GAAxE;AAAA,CAZQ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
package/cjs/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
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","u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SAAhE;AAA2E,mBAAaG;AAAxF,KACGZ,KADH,EAEG,CAACO,QAAQ,IAAIC,QAAb,kBAA0B,oBAAC,UAAD;AAAY,IAAA,QAAQ,EAAED;AAAtB,IAF7B,CATF,EAaGK,OAAO,iBAAI,oBAAC,gBAAD;AAAkB,IAAA,EAAE,EAAC;AAArB,KAA+BZ,KAA/B,CAbd,EAcGI,QAdH,EAeGH,eAAe,IAAI,CAACI,QAApB,iBACC,oBAAC,aAAD;AACE,IAAA,SAAS,EAAEC,SADb;AAEE,IAAA,SAAS,EAAEG,SAFb;AAGE,mBAAaG,OAHf;AAIE,IAAA,EAAE,YAAKT,OAAO,IAAIU,WAAhB;AAJJ,KAMGZ,eANH,CAhBJ,EAyBGC,iBAAiB,IAAIG,QAArB,iBACC,oBAAC,aAAD;AAAe,IAAA,QAAQ,EAAEA,QAAzB;AAAmC,IAAA,SAAS,EAAEC,SAA9C;AAAyD,IAAA,SAAS,EAAEG,SAApE;AAA+E,IAAA,IAAI,EAAC;AAApF,KACGP,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 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1 +0,0 @@
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;AACvBC,EAAAA,QAAQ,EAAEC,SAAS,CAACC,IAAV,CAAeC,UAAf,CAA0BC,WAA1B,CAAsC,mBAAtC,CADa;AAEvBC,EAAAA,KAAK,EAAEJ,SAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACL,8FADK,CAFgB;AAKvBG,EAAAA,OAAO,EAAEN,SAAS,CAACK,MAAV,CAAiBH,UAAjB,CAA4BC,WAA5B,CACP,oGADO,CALc;AAQvBI,EAAAA,eAAe,EAAEP,SAAS,CAACK,MAAV,CAAiBF,WAAjB,CAA6B,qDAA7B,CARM;AASvBK,EAAAA,iBAAiB,EAAER,SAAS,CAACK,MAAV,CAAiBF,WAAjB,CACjB,gHADiB,CATI;AAYvBM,EAAAA,QAAQ,EAAET,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAZa;AAavBQ,EAAAA,QAAQ,EAAEX,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAba;AAcvBS,EAAAA,QAAQ,EAAEZ,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,8BAA3B,CAda;AAevBU,EAAAA,UAAU,EAAEb,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,qDAA3B,CAfW;AAgBvBW,EAAAA,SAAS,EAAEd,SAAS,CAACU,IAAV,CAAeP,WAAf,CAA2B,oDAA3B,CAhBY;AAiBvBY,EAAAA,SAAS,EAAEf,SAAS,CAACU,IAAV,CAAeP,WAAf,CACT,gGADS,CAjBY;AAoBvBa,EAAAA,aAAa,EAAEhB,SAAS,CAACU,IAAV,CAAeP,WAAf,CACb,sGADa,CApBQ;AAuBvBc,EAAAA,OAAO,EAAEjB,SAAS,CAACU,IAAV,CAAeP,WAAf,CACP,gHADO;AAvBc;;;;"}
@@ -1 +0,0 @@
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;AAAA;AAAA,iGAKxB;AAAA,MAAGC,UAAH,QAAGA,UAAH;AAAA,SAAqBA,UAAU,GAAG,qBAAH,GAA2BC,SAA1D;AAAA,CALwB,EAMxB;AAAA,MAAGC,OAAH,SAAGA,OAAH;AAAA,SAAkBA,OAAO,GAAG,cAAH,GAAoB,EAA7C;AAAA,CANwB,EAOxB;AAAA,MAAGC,SAAH,SAAGA,SAAH;AAAA,MAAcC,SAAd,SAAcA,SAAd;AAAA,SAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,0CAA1B,GAAuEH,SAAtG;AAAA,CAPwB,EASxB;AAAA,MAAGI,KAAH,SAAGA,KAAH;AAAA,MAAUC,aAAV,SAAUA,aAAV;AAAA,SACAA,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;AAAA;AAAA,+BAEpB;AAAA,MAAGP,KAAH,SAAGA,KAAH;AAAA,MAAUF,SAAV,SAAUA,SAAV;AAAA,SAA2BA,SAAS,4BAAqBE,KAAK,CAACE,KAAN,CAAYC,GAAjC,SAA0CP,SAA9E;AAAA,CAFoB,EAGpB;AAAA,MAAGG,SAAH,SAAGA,SAAH;AAAA,SACAA,SAAS,oNAWLH,SAZJ;AAAA,CAHoB;IAkBXY,aAAa,gBAAGf,MAAM,CAACC,GAAV;AAAA;AAAA,8IACX;AAAA,MAAGM,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACS,SAAN,CAAgBC,SAAhB,CAA0B,GAA1B,CAAf;AAAA,CADW,EAQf;AAAA,MAAGV,KAAH,SAAGA,KAAH;AAAA,MAAUW,QAAV,SAAUA,QAAV;AAAA,SAA0BA,QAAQ,GAAGX,KAAK,CAACY,MAAN,CAAaC,MAAb,CAAoB,GAApB,CAAH,GAA8Bb,KAAK,CAACY,MAAN,CAAaE,OAAb,CAAqB,GAArB,CAAhE;AAAA,CARe,EAStB;AAAA,MAAGhB,SAAH,SAAGA,SAAH;AAAA,MAAcC,SAAd,SAAcA,SAAd;AAAA,SAA+BD,SAAS,IAAI,CAACC,SAAd,GAA0B,mBAA1B,GAAgDH,SAA/E;AAAA,CATsB;IAYbmB,UAAU,gBAAGtB,MAAM,CAACuB,IAAV;AAAA;AAAA,qEAIN;AAAA,MAAGhB,KAAH,UAAGA,KAAH;AAAA,SAAeA,KAAK,CAACE,KAAN,CAAYE,IAA3B;AAAA,CAJM,EAKnB;AAAA,MAAGJ,KAAH,UAAGA,KAAH;AAAA,MAAUiB,QAAV,UAAUA,QAAV;AAAA,SACAA,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;AAAA;AAAA;;;;"}
@@ -1 +0,0 @@
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;AACpFC,EAAAA,gBAAgB,CAACD,KAAD,CAAhB;AACA,MAAME,gBAAgB,GAAGC,4BAA4B,CAACH,KAAD,EAAQI,YAAR,CAArD;AAEA,sBAAO,oBAAC,eAAD;AAAiB,IAAA,SAAS,EAAEF,gBAAgB,CAACG;AAA7C,KAAyDH,gBAAgB,CAACI,QAA1E,CAAP;AACD;;AAEDP,yBAAyB,CAACQ,SAA1B,GAAsCA,SAAtC;IACMC,mCAAmC,GAAGC,QAAQ,CAACV,yBAAD;AACpDS,mCAAmC,CAACD,SAApC,GAAgDA,SAAhD;;;;"}
@@ -1 +0,0 @@
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;AAChD,MAAIC,KAAK,CAACC,OAAN,CAAcF,GAAd,CAAJ,EAAwB,OAAO,OAAP;AACxB,MAAIA,GAAG,KAAK,IAAZ,EAAkB,OAAO,MAAP;AAClB,MAAIA,GAAG,KAAKG,SAAZ,EAAuB,OAAO,WAAP;AACvB,iBAAcH,GAAd;AACD,CALD;;AAOA,IAAMI,gCAAgC,GAAG,SAAnCA,gCAAmC,CAACC,WAAD,EAAgC;AACvE,QAAM,IAAIC,KAAJ,6IAGMD,WAHN,eAGsBN,eAAe,CAACM,WAAD,CAHrC,gEAAN;AAOD,CARD;;AAUA,IAAME,+BAA+B,GAAG,SAAlCA,+BAAkC,GAAY;AAClD,QAAM,IAAID,KAAJ,6KAAN;AAOD,CARD;;IAUaE,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACC,KAAD,EAA6C;AAC3E,MAAIA,KAAK,CAACC,SAAN,KAAoBP,SAApB,IAAiCM,KAAK,CAACC,SAAN,KAAoB,UAArD,IAAmED,KAAK,CAACC,SAAN,KAAoB,YAA3F,EAAyG;AACvGN,IAAAA,gCAAgC,CAACK,KAAK,CAACC,SAAP,CAAhC;AACD;;AACD,MAAI,CAACC,KAAK,CAACC,QAAN,CAAeC,KAAf,CAAqBJ,KAAK,CAACK,QAA3B,CAAL,EAA2C;AACzCP,IAAAA,+BAA+B;AAChC;AACF;;;;"}
@@ -1 +0,0 @@
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;AAC1BC,EAAAA,SAAS,EAAE;AADe;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -1 +0,0 @@
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;AACvBC,EAAAA,SAAS,EAAEC,SAAS,CAACC,KAAV,CAAgB,CAAC,YAAD,EAAe,UAAf,CAAhB,EAA4CC,WAA5C,CAAwD,uCAAxD;AADY;;;;"}
@@ -1 +0,0 @@
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;AAAA;AAAA,iMAGR;AAAA,MAAGC,SAAH,QAAGA,SAAH;AAAA,SAAoBA,SAAS,KAAK,YAAd,GAA6B,KAA7B,GAAqC,QAAzD;AAAA,CAHQ,EAIX;AAAA,MAAGC,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CAJW,EAKV;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYC,EAA3B;AAAA,CALU,EAMZ;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CANY,EASP;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,KAAN,CAAYE,GAA3B;AAAA,CATO,EAYR;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,MAAUD,SAAV,SAAUA,SAAV;AAAA,SAA2BA,SAAS,KAAK,YAAd,GAA6BC,KAAK,CAACC,KAAN,CAAYG,CAAzC,GAA6C,GAAxE;AAAA,CAZQ;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/esm/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-block-item/DSFormLayoutBlockItem",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-block-item/DSFormLayoutBlockItem.js",
9
- "module": "../../esm/form-layout-block-item/DSFormLayoutBlockItem.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-block-item",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/form-layout-block-item/index.d.js",
9
- "module": "../esm/form-layout-block-item/index.d.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-block-item/propTypes",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-block-item/propTypes.js",
9
- "module": "../../esm/form-layout-block-item/propTypes.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-block-item/styles",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-block-item/styles.js",
9
- "module": "../../esm/form-layout-block-item/styles.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group/DSFormLayoutCheckboxGroup",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js",
9
- "module": "../../esm/form-layout-checkbox-group/DSFormLayoutCheckboxGroup.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group/config/useValidateProps",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../../cjs/form-layout-checkbox-group/config/useValidateProps.js",
9
- "module": "../../../esm/form-layout-checkbox-group/config/useValidateProps.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group/defaultProps",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-checkbox-group/defaultProps.js",
9
- "module": "../../esm/form-layout-checkbox-group/defaultProps.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../cjs/form-layout-checkbox-group/index.d.js",
9
- "module": "../esm/form-layout-checkbox-group/index.d.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group/propTypes",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-checkbox-group/propTypes.js",
9
- "module": "../../esm/form-layout-checkbox-group/propTypes.js"
10
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@elliemae/ds-form-layout-blocks/form-layout-checkbox-group/styles",
3
- "sideEffects": [
4
- "*.css",
5
- "*.scss"
6
- ],
7
- "private": true,
8
- "main": "../../cjs/form-layout-checkbox-group/styles.js",
9
- "module": "../../esm/form-layout-checkbox-group/styles.js"
10
- }