@laerdal/life-react-components 1.11.0-dev.27 → 1.11.0-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AuthPage/AuthPage.d.ts +0 -1
- package/dist/Button/DualFunctionButton.cjs +7 -3
- package/dist/Button/DualFunctionButton.cjs.map +1 -1
- package/dist/Button/DualFunctionButton.js +6 -3
- package/dist/Button/DualFunctionButton.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +1 -0
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +1 -0
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/DropdownButton.cjs +10 -4
- package/dist/Dropdown/DropdownButton.cjs.map +1 -1
- package/dist/Dropdown/DropdownButton.js +10 -4
- package/dist/Dropdown/DropdownButton.js.map +1 -1
- package/dist/Dropdown/DropdownButtonTypes.cjs.map +1 -1
- package/dist/Dropdown/DropdownButtonTypes.d.ts +1 -1
- package/dist/Dropdown/DropdownButtonTypes.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +14 -12
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +14 -12
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +3 -2
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +3 -2
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterBottomLinks.d.ts +0 -1
- package/dist/Footer/Components/FooterDropdownLinks.d.ts +0 -1
- package/dist/Footer/Components/FooterNavSection.d.ts +0 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.d.ts +0 -1
- package/dist/Footer/Components/FooterTop.d.ts +0 -1
- package/dist/Footer/Footer.d.ts +0 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +0 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.d.ts +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +5 -3
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +4 -2
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +5 -3
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +0 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js +4 -2
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs +5 -3
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +4 -2
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.d.ts +0 -1
- package/dist/InputFields/SearchBar.cjs +1 -0
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +1 -0
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.d.ts +1 -1
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/types.cjs.map +1 -1
- package/dist/InputFields/types.d.ts +1 -1
- package/dist/InputFields/types.js.map +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.d.ts +0 -1
- package/dist/MiniProductCard/MiniProductCard.d.ts +0 -1
- package/dist/Paginator/Paginator.d.ts +0 -1
- package/dist/SideMenu/SideMenuBody.d.ts +0 -1
- package/dist/SideMenu/SideMenuFooter.d.ts +0 -1
- package/dist/SideMenu/SideMenuHeader.d.ts +0 -1
- package/dist/SideMenu/types.d.ts +0 -1
- package/dist/Switcher/SwitcherMenuItem.d.ts +0 -1
- package/dist/Table/TableTypes.d.ts +0 -1
- package/dist/Tile/TileCommonItems.d.ts +0 -1
- package/dist/Toggles/TogglerTypes.d.ts +0 -1
- package/dist/Tooltips/TooltipTypes.d.ts +0 -1
- package/dist/Tooltips/TooltipWrapper.d.ts +0 -1
- package/package.json +19 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.cjs","names":["TextareaWrapper","styled","div","props","margin","TextArea","textarea","COLORS","neutral_400","white","autoHeight","ComponentMStyling","ComponentTextStyle","Italic","black","ComponentSStyling","neutral_500","primary_700","primary_800","critical_500","correct_500","neutral_100","neutral_300","Textarea","React","forwardRef","ref","id","placeholder","state","value","size","disabled","validationMessage","onChange","note","required","className","rest","cls","States","Invalid","undefined","e","target","Valid","correct_400","critical_400","icon","message"],"sources":["../../src/InputFields/Textarea.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentSStyling } from '../styles';\nimport { ErrorMessage, NoteMessage, ValidationMessage } from './styling';\nimport { Size, States } from '../types';\n\n/**\n * Import custom components.\n */\nimport { CheckMark, TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles';\nimport { TextareaProps, TextFieldNote } from './types';\n\n// Add component-specific styles.\nconst TextareaWrapper = styled.div<{ margin?: string }>`\n width: 100%;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\nconst TextArea = styled.textarea<{ autoHeight?: boolean }>`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 4px 0px;\n padding: 16px;\n\n resize: ${(props) => (props.autoHeight ? 'none' : '')};\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 304px;\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 3px -1px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 3px -1px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &.valid {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 4px 0px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n`;\n\nconst Textarea = React.forwardRef<
|
|
1
|
+
{"version":3,"file":"Textarea.cjs","names":["TextareaWrapper","styled","div","props","margin","TextArea","textarea","COLORS","neutral_400","white","autoHeight","ComponentMStyling","ComponentTextStyle","Italic","black","ComponentSStyling","neutral_500","primary_700","primary_800","critical_500","correct_500","neutral_100","neutral_300","Textarea","React","forwardRef","ref","id","placeholder","state","value","size","disabled","validationMessage","onChange","note","required","className","rest","cls","States","Invalid","undefined","e","target","Valid","correct_400","critical_400","icon","message"],"sources":["../../src/InputFields/Textarea.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentSStyling } from '../styles';\nimport { ErrorMessage, NoteMessage, ValidationMessage } from './styling';\nimport { Size, States } from '../types';\n\n/**\n * Import custom components.\n */\nimport { CheckMark, TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles';\nimport { TextareaProps, TextFieldNote } from './types';\n\n// Add component-specific styles.\nconst TextareaWrapper = styled.div<{ margin?: string }>`\n width: 100%;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\nconst TextArea = styled.textarea<{ autoHeight?: boolean }>`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 4px 0px;\n padding: 16px;\n\n resize: ${(props) => (props.autoHeight ? 'none' : '')};\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 304px;\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 3px -1px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 3px -1px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &.valid {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 4px 0px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n`;\n\nconst Textarea = React.forwardRef<any, TextareaProps>(({\n id,\n placeholder,\n state,\n value,\n size,\n disabled,\n validationMessage,\n onChange,\n margin,\n autoHeight,\n note,\n required,\n className,\n ...rest\n}: TextareaProps, ref) => {\n\n const cls = `${size} ${state || (validationMessage ? States.Invalid : '')} ${className || ''}`;\n return (\n <TextareaWrapper>\n <TextArea\n id={id}\n ref={ref}\n value={value}\n placeholder={disabled ? undefined : placeholder}\n autoHeight={autoHeight}\n className={cls}\n disabled={disabled}\n onChange={(e: any) => onChange && onChange(e?.target?.value || '')}\n required={required}\n {...rest}\n />\n {validationMessage && (\n <ValidationMessage className={size || ''} type={state ?? States.Invalid}>\n {state === States.Valid ? <CheckMark color={COLORS.correct_400} /> : <TechnicalWarning color={COLORS.critical_400} />}\n <span>{validationMessage}</span>\n </ValidationMessage>\n )}\n {note && !disabled && (\n <NoteMessage className={size}>\n {note.icon}\n <span>{note.message}</span>\n </NoteMessage>\n )}\n </TextareaWrapper>\n );\n});\n\nexport default Textarea;\n"],"mappings":";;;;;;;;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AAKA;;AAKA;;;;;;;;;;;;;;;;AAIA;AACA,IAAMA,eAAe,GAAGC,yBAAA,CAAOC,GAAV,8GAEjB,UAACC,KAAD;EAAA,OAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;;AAIA,IAAMC,QAAQ,GAAGJ,yBAAA,CAAOK,QAAV,uiCACQC,cAAA,CAAOC,WADf,EAEED,cAAA,CAAOE,KAFT,EAQF,UAACN,KAAD;EAAA,OAAYA,KAAK,CAACO,UAAN,GAAmB,MAAnB,GAA4B,EAAxC;AAAA,CARE,EAUV,IAAAC,yBAAA,EAAkBC,0BAAA,CAAmBC,MAArC,EAA6CN,cAAA,CAAOO,KAApD,CAVU,EAaR,IAAAC,yBAAA,EAAkBH,0BAAA,CAAmBC,MAArC,EAA6CN,cAAA,CAAOO,KAApD,CAbQ,EAgBN,IAAAC,yBAAA,EAAkBH,0BAAA,CAAmBC,MAArC,EAA6CN,cA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AAW,EAAEE,QAAQ,GAAGU,SAAH,GAAed,WAJtC;MAKE,UAAU,EAAElB,UALd;MAME,SAAS,EAAE6B,GANb;MAOE,QAAQ,EAAEP,QAPZ;MAQE,QAAQ,EAAE,kBAACW,CAAD;QAAA;;QAAA,OAAYT,SAAQ,IAAIA,SAAQ,CAAC,CAAAS,CAAC,SAAD,IAAAA,CAAC,WAAD,yBAAAA,CAAC,CAAEC,MAAH,wDAAWd,KAAX,KAAoB,EAArB,CAAhC;MAAA,CARZ;MASE,QAAQ,EAAEM;IATZ,GAUME,IAVN,EADF,EAaGL,iBAAiB,iBAChB,sBAAC,0BAAD;MAAmB,SAAS,EAAEF,IAAI,IAAI,EAAtC;MAA0C,IAAI,EAAEF,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWW,aAAA,CAAOC,OAAhE;MAAA,WACGZ,KAAK,KAAKW,aAAA,CAAOK,KAAjB,gBAAyB,qBAAC,sBAAD;QAAW,KAAK,EAAEtC,cAAA,CAAOuC;MAAzB,EAAzB,gBAAoE,qBAAC,6BAAD;QAAkB,KAAK,EAAEvC,cAAA,CAAOwC;MAAhC,EADvE,eAEE;QAAA,UAAOd;MAAP,EAFF;IAAA,EAdJ,EAmBGE,IAAI,IAAI,CAACH,QAAT,iBACC,sBAAC,oBAAD;MAAa,SAAS,EAAED,IAAxB;MAAA,WACGI,IAAI,CAACa,IADR,eAEE;QAAA,UAAOb,IAAI,CAACc;MAAZ,EAFF;IAAA,EApBJ;EAAA,EADF;AA4BD,CA9CgB,CAAjB;eAgDe1B,Q"}
|
|
@@ -17,5 +17,5 @@ declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLA
|
|
|
17
17
|
margin?: string | undefined;
|
|
18
18
|
note?: TextFieldNote | undefined;
|
|
19
19
|
required: boolean;
|
|
20
|
-
} & React.RefAttributes<
|
|
20
|
+
} & React.RefAttributes<any>>;
|
|
21
21
|
export default Textarea;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","names":["React","COLORS","ComponentSStyling","NoteMessage","ValidationMessage","States","CheckMark","TechnicalWarning","styled","ComponentMStyling","ComponentTextStyle","TextareaWrapper","div","props","margin","TextArea","textarea","neutral_400","white","autoHeight","Italic","black","neutral_500","primary_700","primary_800","critical_500","correct_500","neutral_100","neutral_300","Textarea","forwardRef","ref","id","placeholder","state","value","size","disabled","validationMessage","onChange","note","required","className","rest","cls","Invalid","undefined","e","target","Valid","correct_400","critical_400","icon","message"],"sources":["../../src/InputFields/Textarea.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentSStyling } from '../styles';\nimport { ErrorMessage, NoteMessage, ValidationMessage } from './styling';\nimport { Size, States } from '../types';\n\n/**\n * Import custom components.\n */\nimport { CheckMark, TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles';\nimport { TextareaProps, TextFieldNote } from './types';\n\n// Add component-specific styles.\nconst TextareaWrapper = styled.div<{ margin?: string }>`\n width: 100%;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\nconst TextArea = styled.textarea<{ autoHeight?: boolean }>`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 4px 0px;\n padding: 16px;\n\n resize: ${(props) => (props.autoHeight ? 'none' : '')};\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 304px;\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 3px -1px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 3px -1px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &.valid {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 4px 0px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n`;\n\nconst Textarea = React.forwardRef<
|
|
1
|
+
{"version":3,"file":"Textarea.js","names":["React","COLORS","ComponentSStyling","NoteMessage","ValidationMessage","States","CheckMark","TechnicalWarning","styled","ComponentMStyling","ComponentTextStyle","TextareaWrapper","div","props","margin","TextArea","textarea","neutral_400","white","autoHeight","Italic","black","neutral_500","primary_700","primary_800","critical_500","correct_500","neutral_100","neutral_300","Textarea","forwardRef","ref","id","placeholder","state","value","size","disabled","validationMessage","onChange","note","required","className","rest","cls","Invalid","undefined","e","target","Valid","correct_400","critical_400","icon","message"],"sources":["../../src/InputFields/Textarea.tsx"],"sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n\n/**\n * Import custom styles.\n */\nimport { COLORS, ComponentSStyling } from '../styles';\nimport { ErrorMessage, NoteMessage, ValidationMessage } from './styling';\nimport { Size, States } from '../types';\n\n/**\n * Import custom components.\n */\nimport { CheckMark, TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles';\nimport { TextareaProps, TextFieldNote } from './types';\n\n// Add component-specific styles.\nconst TextareaWrapper = styled.div<{ margin?: string }>`\n width: 100%;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\nconst TextArea = styled.textarea<{ autoHeight?: boolean }>`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 4px 0px;\n padding: 16px;\n\n resize: ${(props) => (props.autoHeight ? 'none' : '')};\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 304px;\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 3px -1px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 3px -1px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &.valid {\n border: none;\n margin: 4px 0px;\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 4px 0px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n`;\n\nconst Textarea = React.forwardRef<any, TextareaProps>(({\n id,\n placeholder,\n state,\n value,\n size,\n disabled,\n validationMessage,\n onChange,\n margin,\n autoHeight,\n note,\n required,\n className,\n ...rest\n}: TextareaProps, ref) => {\n\n const cls = `${size} ${state || (validationMessage ? States.Invalid : '')} ${className || ''}`;\n return (\n <TextareaWrapper>\n <TextArea\n id={id}\n ref={ref}\n value={value}\n placeholder={disabled ? undefined : placeholder}\n autoHeight={autoHeight}\n className={cls}\n disabled={disabled}\n onChange={(e: any) => onChange && onChange(e?.target?.value || '')}\n required={required}\n {...rest}\n />\n {validationMessage && (\n <ValidationMessage className={size || ''} type={state ?? States.Invalid}>\n {state === States.Valid ? <CheckMark color={COLORS.correct_400} /> : <TechnicalWarning color={COLORS.critical_400} />}\n <span>{validationMessage}</span>\n </ValidationMessage>\n )}\n {note && !disabled && (\n <NoteMessage className={size}>\n {note.icon}\n <span>{note.message}</span>\n </NoteMessage>\n )}\n </TextareaWrapper>\n );\n});\n\nexport default Textarea;\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAGA;AACA;AACA;;AACA,SAASC,MAAT,EAAiBC,iBAAjB,QAA0C,WAA1C;AACA,SAAuBC,WAAvB,EAAoCC,iBAApC,QAA6D,WAA7D;AACA,SAAeC,MAAf,QAA6B,UAA7B;AAEA;AACA;AACA;;AACA,SAASC,SAAT,EAAoBC,gBAApB,QAA4C,kCAA5C;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,iBAAT,EAA4BC,kBAA5B,QAAsD,WAAtD;;;AAGA;AACA,IAAMC,eAAe,GAAGH,MAAM,CAACI,GAAV,gGAEjB,UAACC,KAAD;EAAA,OAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;AAIA,IAAMC,QAAQ,GAAGP,MAAM,CAACQ,QAAV,yhCACQf,MAAM,CAACgB,WADf,EAEEhB,MAAM,CAACiB,KAFT,EAQF,UAACL,KAAD;EAAA,OAAYA,KAAK,CAACM,UAAN,GAAmB,MAAnB,GAA4B,EAAxC;AAAA,CARE,EAUVV,iBAAiB,CAACC,kBAAkB,CAACU,MAApB,EAA4BnB,MAAM,CAACoB,KAAnC,CAVP,EAaRnB,iBAAiB,CAACQ,kBAAkB,CAACU,MAApB,EAA4BnB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AD;MACE,EAAE,EAAEV,EADN;MAEE,GAAG,EAAED,GAFP;MAGE,KAAK,EAAEI,KAHT;MAIE,WAAW,EAAEE,QAAQ,GAAGS,SAAH,GAAeb,WAJtC;MAKE,UAAU,EAAEd,UALd;MAME,SAAS,EAAEyB,GANb;MAOE,QAAQ,EAAEP,QAPZ;MAQE,QAAQ,EAAE,kBAACU,CAAD;QAAA;;QAAA,OAAYR,SAAQ,IAAIA,SAAQ,CAAC,CAAAQ,CAAC,SAAD,IAAAA,CAAC,WAAD,yBAAAA,CAAC,CAAEC,MAAH,wDAAWb,KAAX,KAAoB,EAArB,CAAhC;MAAA,CARZ;MASE,QAAQ,EAAEM;IATZ,GAUME,IAVN,EADF,EAaGL,iBAAiB,iBAChB,MAAC,iBAAD;MAAmB,SAAS,EAAEF,IAAI,IAAI,EAAtC;MAA0C,IAAI,EAAEF,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAW7B,MAAM,CAACwC,OAAhE;MAAA,WACGX,KAAK,KAAK7B,MAAM,CAAC4C,KAAjB,gBAAyB,KAAC,SAAD;QAAW,KAAK,EAAEhD,MAAM,CAACiD;MAAzB,EAAzB,gBAAoE,KAAC,gBAAD;QAAkB,KAAK,EAAEjD,MAAM,CAACkD;MAAhC,EADvE,eAEE;QAAA,UAAOb;MAAP,EAFF;IAAA,EAdJ,EAmBGE,IAAI,IAAI,CAACH,QAAT,iBACC,MAAC,WAAD;MAAa,SAAS,EAAED,IAAxB;MAAA,WACGI,IAAI,CAACY,IADR,eAEE;QAAA,UAAOZ,IAAI,CAACa;MAAZ,EAFF;IAAA,EApBJ;EAAA,EADF;AA4BD,CA9CgB,CAAjB;AAgDA,eAAexB,QAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size } from '../types';\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 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"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.cjs","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size } 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 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"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size } from '../types';\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 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"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../src/InputFields/types.ts"],"sourcesContent":["import { Size } 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 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"],"mappings":""}
|
package/dist/SideMenu/types.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { TileDropdownButton, TileHyperLink, TileIconButton, TileNote, TileStandardButton, TileToggleButton } from './TileTypes';
|
|
3
2
|
import { Size } from '../types';
|
|
4
3
|
export declare const TileNoteText: import("styled-components").StyledComponent<"div", any, {}, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laerdal/life-react-components",
|
|
3
|
-
"version": "1.11.0-dev.
|
|
3
|
+
"version": "1.11.0-dev.31",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
|
|
6
6
|
"contributors": [],
|
|
@@ -52,26 +52,32 @@
|
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
+
"react": "^17.0.2",
|
|
56
|
+
"react-dom": "^17.0.2",
|
|
55
57
|
"@laerdal/figma-svg": "^2.9.7",
|
|
58
|
+
"@types/node": "^18.0.6",
|
|
59
|
+
"@types/react": "^17.0.47",
|
|
56
60
|
"animated-scroll-to": "^2.3.0",
|
|
57
61
|
"moment": "^2.29.4",
|
|
62
|
+
"nanoid": "3.3.4",
|
|
58
63
|
"react-datepicker": "^4.8.0",
|
|
59
64
|
"react-inlinesvg": "^3.0.0",
|
|
60
65
|
"react-modal": "^3.15.1",
|
|
61
|
-
"
|
|
66
|
+
"react-responsive": "^9.0.0-beta.6",
|
|
67
|
+
"rooks": "^5.13.1",
|
|
62
68
|
"styled-components": "^5.3.5",
|
|
63
69
|
"typescript": "^4.7.4"
|
|
64
70
|
},
|
|
65
71
|
"devDependencies": {
|
|
66
|
-
"@babel/cli": "^7.
|
|
67
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
68
|
-
"@babel/plugin-proposal-export-default-from": "^7.
|
|
69
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.
|
|
70
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
71
|
-
"@babel/preset-env": "^7.
|
|
72
|
-
"@babel/preset-react": "^7.
|
|
73
|
-
"@babel/preset-typescript": "^7.
|
|
74
|
-
"@babel/runtime": "^7.
|
|
72
|
+
"@babel/cli": "^7.16.0",
|
|
73
|
+
"@babel/plugin-proposal-class-properties": "^7.16.5",
|
|
74
|
+
"@babel/plugin-proposal-export-default-from": "^7.16.5",
|
|
75
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.16.5",
|
|
76
|
+
"@babel/plugin-transform-runtime": "^7.16.5",
|
|
77
|
+
"@babel/preset-env": "^7.16.5",
|
|
78
|
+
"@babel/preset-react": "^7.16.5",
|
|
79
|
+
"@babel/preset-typescript": "^7.16.5",
|
|
80
|
+
"@babel/runtime": "^7.16.5",
|
|
75
81
|
"@testing-library/jest-dom": "^5.16.4",
|
|
76
82
|
"@testing-library/react": "^12.1.5",
|
|
77
83
|
"@testing-library/user-event": "^14.3.0",
|
|
@@ -81,8 +87,6 @@
|
|
|
81
87
|
"@types/react-modal": "^3.13.1",
|
|
82
88
|
"@types/react-router-dom": "^5.3.3",
|
|
83
89
|
"@types/styled-components": "^5.1.25",
|
|
84
|
-
"@types/node": "^18.0.6",
|
|
85
|
-
"@types/react": "^17.0.47",
|
|
86
90
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
|
|
87
91
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
88
92
|
"babel-plugin-typescript-to-proptypes": "^2.0.0",
|
|
@@ -95,8 +99,8 @@
|
|
|
95
99
|
"jest-react-hooks-shallow": "^1.5.1",
|
|
96
100
|
"jest-styled-components": "^7.0.5",
|
|
97
101
|
"jest-svg-transformer": "^1.0.0",
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
|
|
103
|
+
|
|
100
104
|
"react-router": "^6.3.0",
|
|
101
105
|
"react-router-dom": "^6.3.0",
|
|
102
106
|
"regenerator-runtime": "^0.13.9",
|