@laerdal/life-react-components 2.2.1-dev.7 → 2.2.1-dev.9

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 (54) hide show
  1. package/dist/ChipsInput/ChipInputField.cjs +1 -1
  2. package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
  3. package/dist/ChipsInput/ChipInputField.js +1 -1
  4. package/dist/ChipsInput/ChipInputField.js.map +1 -1
  5. package/dist/Dropdown/BasicDropdown.cjs +1 -2
  6. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  7. package/dist/Dropdown/BasicDropdown.js +1 -2
  8. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  9. package/dist/Dropdown/CommonStyling.cjs +1 -1
  10. package/dist/Dropdown/CommonStyling.cjs.map +1 -1
  11. package/dist/Dropdown/CommonStyling.js +1 -1
  12. package/dist/Dropdown/CommonStyling.js.map +1 -1
  13. package/dist/Dropdown/DropdownFilter.cjs +1 -2
  14. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  15. package/dist/Dropdown/DropdownFilter.js +1 -2
  16. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  17. package/dist/InputFields/DatepickerField.cjs +27 -33
  18. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  19. package/dist/InputFields/DatepickerField.js +27 -33
  20. package/dist/InputFields/DatepickerField.js.map +1 -1
  21. package/dist/InputFields/Label.cjs +8 -12
  22. package/dist/InputFields/Label.cjs.map +1 -1
  23. package/dist/InputFields/Label.js +8 -12
  24. package/dist/InputFields/Label.js.map +1 -1
  25. package/dist/InputFields/NumberField.cjs +9 -16
  26. package/dist/InputFields/NumberField.cjs.map +1 -1
  27. package/dist/InputFields/NumberField.js +11 -18
  28. package/dist/InputFields/NumberField.js.map +1 -1
  29. package/dist/InputFields/PasswordField.cjs +44 -50
  30. package/dist/InputFields/PasswordField.cjs.map +1 -1
  31. package/dist/InputFields/PasswordField.js +44 -50
  32. package/dist/InputFields/PasswordField.js.map +1 -1
  33. package/dist/InputFields/SearchBar.cjs +1 -2
  34. package/dist/InputFields/SearchBar.cjs.map +1 -1
  35. package/dist/InputFields/SearchBar.js +1 -2
  36. package/dist/InputFields/SearchBar.js.map +1 -1
  37. package/dist/InputFields/Textarea.cjs +8 -3
  38. package/dist/InputFields/Textarea.cjs.map +1 -1
  39. package/dist/InputFields/Textarea.d.ts +3 -7
  40. package/dist/InputFields/Textarea.js +12 -6
  41. package/dist/InputFields/Textarea.js.map +1 -1
  42. package/dist/InputFields/components/SearchField.cjs +1 -1
  43. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  44. package/dist/InputFields/components/SearchField.js +1 -1
  45. package/dist/InputFields/components/SearchField.js.map +1 -1
  46. package/dist/InputFields/styling.cjs +9 -5
  47. package/dist/InputFields/styling.cjs.map +1 -1
  48. package/dist/InputFields/styling.d.ts +3 -1
  49. package/dist/InputFields/styling.js +8 -5
  50. package/dist/InputFields/styling.js.map +1 -1
  51. package/dist/InputFields/types.cjs.map +1 -1
  52. package/dist/InputFields/types.d.ts +4 -8
  53. package/dist/InputFields/types.js.map +1 -1
  54. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"styling.js","names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport { Size } from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n`;\n\nconst readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.invalid {\n margin-bottom: 0 !important;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nexport const ValidationMessage = styled(Warning)<{ type: 'valid' | 'invalid' }>`\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AAGxI,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,GAAG,kIAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,CAE9D;AAED,IAAMC,aAAa,GAAGf,GAAG,mPACHE,MAAM,CAACc,WAAW,EACRd,MAAM,CAACe,WAAW,EACvCf,MAAM,CAACgB,WAAW,CAI5B;AACD,OAAO,IAAMC,uBAAuB,GAAGnB,GAAG,+GACVE,MAAM,CAACkB,YAAY,CAClD;AAED,IAAMC,iBAAiB,GAAGtB,MAA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8B,OAAO,EAAE,IAAI,CAAC,EAOrD3B,kBAAkB,CAACH,kBAAkB,CAAC8B,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGtC,MAAM,CAACqC,OAAO,CAAC,0FAChClC,MAAM,CAACoC,YAAY,CAC7B;AAED,OAAO,IAAMC,iBAAiB,GAAGxC,MAAM,CAACqC,OAAO,CAAC,0FACrC,UAACzB,KAAK;EAAA,OAAMA,KAAK,CAAC6B,IAAI,KAAK,SAAS,GAAGtC,MAAM,CAACoC,YAAY,GAAGpC,MAAM,CAAC8B,WAAW;AAAA,CAAC,CAC1F;AAED,OAAO,IAAMS,WAAW,GAAG1C,MAAM,CAACqC,OAAO,CAAC,0FAC/BlC,MAAM,CAACwB,WAAW,CAC5B;AACD,OAAO,IAAMgB,iBAAiB,GAAG3C,MAAM,CAACqC,OAAO,CAAC,4FACrClC,MAAM,CAACgB,WAAW,CAC5B;AAED,SAASgB,iBAAiB,EAAEb,iBAAiB;AAE7C,OAAO,IAAMsB,UAAU,GAAG5C,MAAM,CAACW,GAAG,kGAEnC;AAED,OAAO,IAAMkC,iBAAiB,GAAG7C,MAAM,CAAC4C,UAAU,CAAC,yHAGlD"}
1
+ {"version":3,"file":"styling.js","names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","ComponentXSStyling","States","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","Italic","neutral_500","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","StateColors","Default","Valid","Invalid","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"sources":["../../src/InputFields/styling.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport { BREAKPOINTS, COLORS, focusStyles } from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';\nimport {Size, States} from '../types';\n\nexport const InputWrapper = styled.div<{ readOnly?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.readOnly || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n position: relative;\n`;\n\nexport const readOnlyState = css`\n background-color: ${COLORS.neutral_100};\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_300} !important;\n color: ${COLORS.neutral_600} !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n`;\nexport const activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\n\nconst InputFieldStyling = styled.input<{\n activeErrorMessage?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\n suppressReadOnlyStyles?: boolean;\n}>`\n height: 48px;\n width: 100%;\n border-radius: 4px;\n margin-bottom: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ${(props) =>\n props.withoutBorder\n ? `-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n `\n : `-webkit-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n -moz-box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};\n box-shadow: inset 0px 0px 0px 1px ${COLORS.neutral_400};`}\n background-color: #fff;\n box-sizing: border-box;\n padding: 0 16px !important;\n\n outline: none;\n position: relative;\n\n font-size: 16px;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n font-size: 16px;\n height: 48px;\n &::placeholder {\n font-size: 16px;\n }\n }\n &.medium {\n font-size: 18px;\n height: 56px;\n &::placeholder {\n font-size: 18px;\n }\n }\n\n color: ${COLORS.black} !important;\n\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n\n &:read-only:not(:disabled) {\n ${(props) => (props.suppressReadOnlyStyles ? '' : readOnlyState)}\n }\n\n &:disabled {\n border: 1px solid ${COLORS.neutral_100};\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ${COLORS.neutral_300} !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.focus-visible {\n ${focusStyles}\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_700};\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ${COLORS.primary_800};\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n`;\n\nconst ValidationStyling = css`\n &.error-msg {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black)}\n text-align: center;\n font-weight: 400;\n box-sizing: border-box;\n }\n\n &.error-msg {\n padding-top: 8px;\n padding-bottom: 0;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468')}\n font-weight: 700;\n line-height: 15px;\n }\n`;\n\nexport const Warning = styled.div`\n display: flex;\n align-items: center;\n margin-bottom: 4px;\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ${ComponentXXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ${ComponentXSStyling(ComponentTextStyle.Regular, null)}\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n`;\nexport const ErrorMessage = styled(Warning)`\n color: ${COLORS.critical_500};\n`;\n\nconst StateColors = {\n [States.Default]: COLORS.neutral_500,\n [States.Valid]: COLORS.correct_500,\n [States.Invalid]: COLORS.critical_500,\n}\n\nexport const ValidationMessage = styled(Warning)<{ type: States.Valid | States.Invalid | States.Default}>`\n color: ${(props) => StateColors[props.type]};\n`;\n\nexport const NoteMessage = styled(Warning)`\n color: ${COLORS.neutral_500};\n`;\nexport const AutofilledMessage = styled(Warning)`\n color: ${COLORS.neutral_600};\n`;\n\nexport { ValidationStyling, InputFieldStyling };\n\nexport const StyledIcon = styled.div`\n border-radius: 50%;\n`;\n\nexport const SearchIconWrapper = styled(StyledIcon)`\n position: absolute;\n border-radius: 50%;\n`;\n"],"mappings":";;;AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAC/C,SAASC,WAAW,EAAEC,MAAM,EAAEC,WAAW,QAAQ,WAAW;AAC5D,SAASC,mBAAmB,EAAEC,kBAAkB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,sBAAsB;AACxI,SAAcC,MAAM,QAAO,UAAU;AAErC,OAAO,IAAMC,YAAY,GAAGX,MAAM,CAACY,GAAG,kIAElC,UAACC,KAAK;EAAA,OAAMA,KAAK,CAACC,QAAQ,IAAID,KAAK,CAACE,QAAQ,GAAG,sBAAsB,GAAG,EAAE;AAAA,CAAC,EAC3E,UAACF,KAAK;EAAA,OAAMA,KAAK,CAACG,MAAM,qBAAcH,KAAK,CAACG,MAAM,SAAM,EAAE;AAAA,CAAC,CAE9D;AAED,OAAO,IAAMC,aAAa,GAAGhB,GAAG,mPACVE,MAAM,CAACe,WAAW,EACRf,MAAM,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EAAE,IAAI,CAAC,EAOrDnC,WAAW,CAAC2B,MAAM,EAChBpB,kBAAkB,CAACH,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAQpDhC,mBAAmB,CAACC,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,EAOrD5B,kBAAkB,CAACH,kBAAkB,CAAC+B,OAAO,EAAE,IAAI,CAAC,CAezD;AACD,OAAO,IAAME,YAAY,GAAGvC,MAAM,CAACsC,OAAO,CAAC,0FAChCnC,MAAM,CAACqC,YAAY,CAC7B;AAED,IAAMC,WAAW,qDACd/B,MAAM,CAACgC,OAAO,EAAGvC,MAAM,CAACyB,WAAW,iCACnClB,MAAM,CAACiC,KAAK,EAAGxC,MAAM,CAAC+B,WAAW,iCACjCxB,MAAM,CAACkC,OAAO,EAAGzC,MAAM,CAACqC,YAAY,gBACtC;AAED,OAAO,IAAMK,iBAAiB,GAAG7C,MAAM,CAACsC,OAAO,CAAC,0FACrC,UAACzB,KAAK;EAAA,OAAK4B,WAAW,CAAC5B,KAAK,CAACiC,IAAI,CAAC;AAAA,EAC5C;AAED,OAAO,IAAMC,WAAW,GAAG/C,MAAM,CAACsC,OAAO,CAAC,0FAC/BnC,MAAM,CAACyB,WAAW,CAC5B;AACD,OAAO,IAAMoB,iBAAiB,GAAGhD,MAAM,CAACsC,OAAO,CAAC,4FACrCnC,MAAM,CAACiB,WAAW,CAC5B;AAED,SAASgB,iBAAiB,EAAEb,iBAAiB;AAE7C,OAAO,IAAM0B,UAAU,GAAGjD,MAAM,CAACY,GAAG,kGAEnC;AAED,OAAO,IAAMsC,iBAAiB,GAAGlD,MAAM,CAACiD,UAAU,CAAC,yHAGlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size, Testable } from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: 'invalid' | 'valid';\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'>\n & {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n state?: 'invalid' | 'valid';\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n required: boolean;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};"],"mappings":";;;;;AA2DC"}
1
+ {"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import {Size, States, Testable} from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: States.Invalid | States.Valid;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>\n & {\n id: string;\n state?: States.Invalid | States.Valid;\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};\n"],"mappings":";;;;;AAuDC"}
@@ -1,4 +1,4 @@
1
- import { Size, Testable } from '../types';
1
+ import { Size, States, Testable } from '../types';
2
2
  import React from 'react';
3
3
  export type TextFieldProps = {
4
4
  id: string;
@@ -8,7 +8,7 @@ export type TextFieldProps = {
8
8
  value?: string;
9
9
  validationMessage?: string;
10
10
  type?: string;
11
- state?: 'invalid' | 'valid';
11
+ state?: States.Invalid | States.Valid;
12
12
  autoComplete?: string;
13
13
  placeholder?: string;
14
14
  required?: boolean;
@@ -19,19 +19,15 @@ export type TextFieldProps = {
19
19
  margin?: string;
20
20
  note?: TextFieldNote;
21
21
  };
22
- export type TextareaProps = Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'> & {
22
+ export type TextareaProps = Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> & {
23
23
  id: string;
24
- placeholder: string;
25
- value?: string;
26
- disabled?: boolean;
27
- state?: 'invalid' | 'valid';
24
+ state?: States.Invalid | States.Valid;
28
25
  onChange?: (text: string) => void;
29
26
  validationMessage?: string;
30
27
  size: Size.Small | Size.Medium;
31
28
  autoHeight?: boolean;
32
29
  margin?: string;
33
30
  note?: TextFieldNote;
34
- required: boolean;
35
31
  };
36
32
  export type TextFieldNote = {
37
33
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size, Testable } from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: 'invalid' | 'valid';\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'placeholder' | 'disabled' | 'required' | 'onChange'>\n & {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n state?: 'invalid' | 'valid';\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n required: boolean;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};"],"mappings":"AA2DC;AAAC"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import {Size, States, Testable} from '../types';\nimport React from 'react';\n\nexport type TextFieldProps = {\n id: string;\n disabled?: boolean;\n readOnly?: boolean;\n onChange?: (text: string) => void;\n value?: string;\n validationMessage?: string;\n type?: string;\n state?: States.Invalid | States.Valid;\n autoComplete?: string;\n placeholder?: string;\n required?: boolean;\n pattern?: string;\n maxLength?: number;\n withoutBorder?: boolean;\n size?: Size.Small | Size.Medium;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextareaProps =\n Testable & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'>\n & {\n id: string;\n state?: States.Invalid | States.Valid;\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n autoHeight?: boolean;\n margin?: string;\n note?: TextFieldNote;\n};\n\nexport type TextFieldNote = {\n message: string;\n icon: React.ReactNode;\n};\n\nexport interface CheckboxProps extends Testable, Omit<React.HTMLAttributes<HTMLDivElement>, 'onClick' | 'onKeyDown' | 'onMouseDown' | 'tabIndex'>{\n id?: string;\n selected: boolean;\n select?: (selected: boolean) => void;\n label?: string;\n invalid?: boolean;\n disabled?: boolean;\n margin?: string;\n size?: Size;\n iconPointerEventsTransparent?: boolean;\n semiSelected?: boolean;\n readOnly?: boolean;\n tabIndexVal?: number;\n className?: string;\n};\n"],"mappings":"AAuDC;AAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "2.2.1-dev.7",
3
+ "version": "2.2.1-dev.9",
4
4
  "private": false,
5
5
  "author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
6
6
  "contributors": [],