@laerdal/life-react-components 1.8.0-dev.31.full → 1.8.0-dev.34

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 (67) hide show
  1. package/dist/Button/Iconbutton.cjs +7 -5
  2. package/dist/Button/Iconbutton.cjs.map +1 -1
  3. package/dist/Button/Iconbutton.d.ts +2 -0
  4. package/dist/Button/Iconbutton.js +7 -5
  5. package/dist/Button/Iconbutton.js.map +1 -1
  6. package/dist/ChipsInput/ChipInputField.cjs +2 -3
  7. package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
  8. package/dist/ChipsInput/ChipInputField.js +2 -3
  9. package/dist/ChipsInput/ChipInputField.js.map +1 -1
  10. package/dist/Dropdown/BasicDropdown.cjs +0 -2
  11. package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
  12. package/dist/Dropdown/BasicDropdown.js +0 -2
  13. package/dist/Dropdown/BasicDropdown.js.map +1 -1
  14. package/dist/Dropdown/DropdownFilter.cjs +0 -2
  15. package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
  16. package/dist/Dropdown/DropdownFilter.d.ts +1 -1
  17. package/dist/Dropdown/DropdownFilter.js +0 -2
  18. package/dist/Dropdown/DropdownFilter.js.map +1 -1
  19. package/dist/InputFields/DatepickerField.cjs +2 -3
  20. package/dist/InputFields/DatepickerField.cjs.map +1 -1
  21. package/dist/InputFields/DatepickerField.js +2 -3
  22. package/dist/InputFields/DatepickerField.js.map +1 -1
  23. package/dist/InputFields/Label.cjs +24 -14
  24. package/dist/InputFields/Label.cjs.map +1 -1
  25. package/dist/InputFields/Label.js +24 -16
  26. package/dist/InputFields/Label.js.map +1 -1
  27. package/dist/InputFields/NumberField.cjs +5 -3
  28. package/dist/InputFields/NumberField.cjs.map +1 -1
  29. package/dist/InputFields/NumberField.js +5 -3
  30. package/dist/InputFields/NumberField.js.map +1 -1
  31. package/dist/InputFields/PasswordField.cjs +1 -1
  32. package/dist/InputFields/PasswordField.cjs.map +1 -1
  33. package/dist/InputFields/PasswordField.js +1 -1
  34. package/dist/InputFields/PasswordField.js.map +1 -1
  35. package/dist/InputFields/QuickSearch.cjs +2 -3
  36. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  37. package/dist/InputFields/QuickSearch.js +2 -3
  38. package/dist/InputFields/QuickSearch.js.map +1 -1
  39. package/dist/InputFields/TextField.cjs +26 -16
  40. package/dist/InputFields/TextField.cjs.map +1 -1
  41. package/dist/InputFields/TextField.d.ts +3 -1
  42. package/dist/InputFields/TextField.js +27 -18
  43. package/dist/InputFields/TextField.js.map +1 -1
  44. package/dist/InputFields/Textarea.cjs +26 -20
  45. package/dist/InputFields/Textarea.cjs.map +1 -1
  46. package/dist/InputFields/Textarea.d.ts +1 -11
  47. package/dist/InputFields/Textarea.js +31 -24
  48. package/dist/InputFields/Textarea.js.map +1 -1
  49. package/dist/InputFields/components/SearchBarInput.cjs +1 -1
  50. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  51. package/dist/InputFields/components/SearchBarInput.js +1 -1
  52. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  53. package/dist/InputFields/components/SearchField.cjs +1 -1
  54. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  55. package/dist/InputFields/components/SearchField.js +1 -1
  56. package/dist/InputFields/components/SearchField.js.map +1 -1
  57. package/dist/InputFields/styling.cjs +15 -13
  58. package/dist/InputFields/styling.cjs.map +1 -1
  59. package/dist/InputFields/styling.d.ts +4 -1
  60. package/dist/InputFields/styling.js +13 -10
  61. package/dist/InputFields/styling.js.map +1 -1
  62. package/dist/InputFields/types.cjs +6 -0
  63. package/dist/InputFields/types.cjs.map +1 -0
  64. package/dist/InputFields/types.d.ts +38 -0
  65. package/dist/InputFields/types.js +2 -0
  66. package/dist/InputFields/types.js.map +1 -0
  67. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"names":["React","COLORS","ErrorMessage","TechnicalWarning","styled","ComponentMStyling","ComponentTextStyle","TextareaWrapper","div","props","margin","TextArea","textarea","neutral_400","white","Italic","black","primary_700","primary_800","critical_500","neutral_100","neutral_300","neutral_600","Textarea","id","placeholder","value","size","disabled","validationMessage","onChange","e","target","critical_400"],"mappings":";;;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,YAAT,QAA6B,WAA7B;;AAGA;AACA;AACA;AACA,SAASC,gBAAT,QAAiC,kCAAjC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,iBAAT,EAA4BC,kBAA5B,QAAsD,WAAtD,C,CAEA;;;;AACA,IAAMC,eAAe,GAAGH,MAAM,CAACI,GAAV,gGAEjB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;AAIA,IAAMC,QAAQ,GAAGP,MAAM,CAACQ,QAAV,+0BACQX,MAAM,CAACY,WADf,EAEEZ,MAAM,CAACa,KAFT,EAQVT,iBAAiB,CAACC,kBAAkB,CAACS,MAApB,EAA4Bd,MAAM,CAACe,KAAnC,CARP,EAmBUf,MAAM,CAACgB,WAnBjB,EAyBUhB,MAAM,CAACiB,WAzBjB,EAmC0BjB,MAAM,CAACkB,YAnCjC,EA0CUlB,MAAM,CAACmB,WA1CjB,EA+CCnB,MAAM,CAACoB,WA/CR,EAoDRhB,iBAAiB,CAACC,kBAAkB,CAACS,MAApB,EAA4Bd,MAAM,CAACqB,WAAnC,CApDT,CAAd,C,CAwDA;;AAYA,IAAMC,QAAgD,GAAG,SAAnDA,QAAmD,OAAoG;AAAA,MAAjGC,EAAiG,QAAjGA,EAAiG;AAAA,MAA7FC,WAA6F,QAA7FA,WAA6F;AAAA,MAAhFC,KAAgF,QAAhFA,KAAgF;AAAA,MAAzEC,IAAyE,QAAzEA,IAAyE;AAAA,MAAnEC,QAAmE,QAAnEA,QAAmE;AAAA,MAAzDC,iBAAyD,QAAzDA,iBAAyD;AAAA,MAAtCC,SAAsC,QAAtCA,QAAsC;AAAA,MAA5BpB,MAA4B,QAA5BA,MAA4B;AAC3J,sBACE,MAAC,eAAD;AAAA,4BACE,KAAC,QAAD;AACE,MAAA,EAAE,EAAEc,EADN;AAEE,MAAA,KAAK,EAAEE,KAFT;AAGE,MAAA,WAAW,EAAED,WAHf;AAIE,MAAA,SAAS,YAAKE,IAAL,cAAaE,iBAAiB,GAAG,SAAH,GAAe,EAA7C,CAJX;AAKE,MAAA,QAAQ,EAAED,QALZ;AAME,MAAA,QAAQ,EAAE,kBAACG,CAAD;AAAA;;AAAA,eAAYD,SAAQ,IAAIA,SAAQ,CAAC,CAAAC,CAAC,SAAD,IAAAA,CAAC,WAAD,yBAAAA,CAAC,CAAEC,MAAH,wDAAWN,KAAX,KAAoB,EAArB,CAAhC;AAAA;AANZ,MADF,EASGG,iBAAiB,iBAChB,MAAC,YAAD;AAAA,8BACE,KAAC,gBAAD;AAAkB,QAAA,IAAI,EAAC,MAAvB;AAA8B,QAAA,KAAK,EAAE5B,MAAM,CAACgC;AAA5C,QADF,eAEE;AAAA,kBAAOJ;AAAP,QAFF;AAAA,MAVJ;AAAA,IADF;AAkBD,CAnBD;;;AAVEL,EAAAA,E;AACAC,EAAAA,W;AACAC,EAAAA,K;AACAE,EAAAA,Q;AACAE,EAAAA,Q;AACAD,EAAAA,iB;AAEAnB,EAAAA,M;;AAwBF,eAAea,QAAf","sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import custom styles.\n */\nimport { COLORS } from '../styles';\nimport { ErrorMessage } from './styling';\nimport { Size } from '../types';\n\n/**\n * Import custom components.\n */\nimport { TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles';\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`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 0px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n`;\n\n// Add component-specific types\ntype TextareaProps = {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n onChange?: (text: string) => void;\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n margin?: string;\n};\n\nconst Textarea: React.FunctionComponent<TextareaProps> = ({ id, placeholder, value, size, disabled, validationMessage, onChange, margin }: TextareaProps) => {\n return (\n <TextareaWrapper>\n <TextArea\n id={id}\n value={value}\n placeholder={placeholder}\n className={`${size} ${validationMessage ? 'invalid' : ''}`}\n disabled={disabled}\n onChange={(e: any) => onChange && onChange(e?.target?.value || '')}\n />\n {validationMessage && (\n <ErrorMessage>\n <TechnicalWarning size=\"20px\" color={COLORS.critical_400} />\n <span>{validationMessage}</span>\n </ErrorMessage>\n )}\n </TextareaWrapper>\n );\n};\n\nexport default Textarea;\n"],"file":"Textarea.js"}
1
+ {"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"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","id","placeholder","state","value","size","disabled","validationMessage","onChange","note","required","undefined","Invalid","e","target","Valid","correct_400","critical_400","icon","message"],"mappings":";;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA;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;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;AAIA,IAAMC,QAAQ,GAAGP,MAAM,CAACQ,QAAV,+/BACQf,MAAM,CAACgB,WADf,EAEEhB,MAAM,CAACiB,KAFT,EAQF,UAACL,KAAD;AAAA,SAAYA,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,MAAM,CAACoB,KA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1C,CAAlB,CALX;AAME,MAAA,QAAQ,EAAEN,QANZ;AAOE,MAAA,QAAQ,EAAE,kBAACO,CAAD;AAAA;;AAAA,eAAYL,SAAQ,IAAIA,SAAQ,CAAC,CAAAK,CAAC,SAAD,IAAAA,CAAC,WAAD,yBAAAA,CAAC,CAAEC,MAAH,wDAAWV,KAAX,KAAoB,EAArB,CAAhC;AAAA,OAPZ;AAQE,MAAA,QAAQ,EAAEM;AARZ,MADF,EAWGH,iBAAiB,iBAChB,MAAC,iBAAD;AAAmB,MAAA,SAAS,EAAEF,IAAI,IAAI,EAAtC;AAA0C,MAAA,IAAI,EAAEF,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAW3B,MAAM,CAACoC,OAAhE;AAAA,iBACGT,KAAK,KAAK3B,MAAM,CAACuC,KAAjB,gBAAyB,KAAC,SAAD;AAAW,QAAA,KAAK,EAAE3C,MAAM,CAAC4C;AAAzB,QAAzB,gBAAoE,KAAC,gBAAD;AAAkB,QAAA,KAAK,EAAE5C,MAAM,CAAC6C;AAAhC,QADvE,eAEE;AAAA,kBAAOV;AAAP,QAFF;AAAA,MAZJ,EAiBGE,IAAI,IAAI,CAACH,QAAT,iBACC,MAAC,WAAD;AAAa,MAAA,SAAS,EAAED,IAAxB;AAAA,iBACGI,IAAI,CAACS,IADR,eAEE;AAAA,kBAAOT,IAAI,CAACU;AAAZ,QAFF;AAAA,MAlBJ;AAAA,IADF;AA0BD,CAxCD;;AA0CA,eAAenB,QAAf","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: 1px;\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: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 0px;\n }\n\n &.invalid,\n &.invalid:hover,\n &.invalid:focus,\n &.invalid:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &.valid {\n border: none;\n margin: 1px;\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: 1px;\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.FunctionComponent<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}: TextareaProps) => {\n return (\n <TextareaWrapper>\n <TextArea\n id={id}\n value={value}\n placeholder={disabled ? undefined : placeholder}\n autoHeight={autoHeight}\n className={`${size} ${state || (validationMessage ? States.Invalid : '')}`}\n disabled={disabled}\n onChange={(e: any) => onChange && onChange(e?.target?.value || '')}\n required={required}\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"],"file":"Textarea.js"}
@@ -35,7 +35,7 @@ var Search = _styledComponents.default.input.attrs(function () {
35
35
  return {
36
36
  type: 'search'
37
37
  };
38
- })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600));
38
+ })(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 48px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_600));
39
39
 
40
40
  exports.Search = Search;
41
41
  var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","ComponentTextStyle","Italic","COLORS","neutral_500","Regular","black","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAP;AAAA,CAAnB,CAAH,66BA0Bb,+BAAkBC,0BAAmBC,MAArC,EAA6CC,cAAOC,WAApD,CA1Ba,EAkCf,+BAAkBH,0BAAmBI,OAArC,EAA8CF,cAAOG,KAArD,CAlCe,EAoCb,+BAAkBL,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CApCa,EAuCfC,mBAAYC,MAvCG,EAyCX,+BAAkBR,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CAzCW,EA+CX,+BAAkBN,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CA/CW,EAqDX,+BAAkBN,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CArDW,CAAZ;;;AA6EP,IAAMG,cAAc,gBAAGC,KAAK,CAACC,UAAN,CAAwD,UAACC,KAAD,EAA6BC,GAA7B,EAAqC;AAClH,MACEC,EADF,GAUIF,KAVJ,CACEE,EADF;AAAA,MAEEC,UAFF,GAUIH,KAVJ,CAEEG,UAFF;AAAA,MAGEC,aAHF,GAUIJ,KAVJ,CAGEI,aAHF;AAAA,MAIEC,WAJF,GAUIL,KAVJ,CAIEK,WAJF;AAAA,MAKEC,WALF,GAUIN,KAVJ,CAKEM,WALF;AAAA,MAMEC,QANF,GAUIP,KAVJ,CAMEO,QANF;AAAA,MAOEC,SAPF,GAUIR,KAVJ,CAOEQ,SAPF;AAAA,MAQEC,IARF,GAUIT,KAVJ,CAQES,IARF;AAAA,MASEC,OATF,GAUIV,KAVJ,CASEU,MATF;AAYA,MAAMC,UA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POINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.cjs"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["Search","styled","input","attrs","type","ComponentTextStyle","Italic","COLORS","neutral_500","Regular","black","neutral_600","BREAKPOINTS","MEDIUM","SearchBarInput","React","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEO,IAAMA,MAAM,GAAGC,0BAAOC,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAAEC,IAAAA,IAAI,EAAE;AAAR,GAAP;AAAA,CAAnB,CAAH,66BA0Bb,+BAAkBC,0BAAmBC,MAArC,EAA6CC,cAAOC,WAApD,CA1Ba,EAkCf,+BAAkBH,0BAAmBI,OAArC,EAA8CF,cAAOG,KAArD,CAlCe,EAoCb,+BAAkBL,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CApCa,EAuCfC,mBAAYC,MAvCG,EAyCX,+BAAkBR,0BAAmBC,MAArC,EAA6CC,cAAOI,WAApD,CAzCW,EA+CX,+BAAkBN,0BAAmBC,MAArC,EAA6CC,c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,EAAEF,QAPZ;AAQE,IAAA,QAAQ,EAAE,kBAACO,CAAD;AAAA,aAAYV,aAAa,CAACU,CAAC,CAACI,MAAF,CAASC,KAAV,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CA9BsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;eAmCaf,c","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';\nimport { Size } from '../../types';\nimport { ComponentMStyling, ComponentSStyling } from '../../styles';\nimport { useFocusVisibleRef } from '../../common';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 48px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, onBlur } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.cjs"}
@@ -13,7 +13,7 @@ export var Search = styled.input.attrs(function () {
13
13
  return {
14
14
  type: 'search'
15
15
  };
16
- })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600));
16
+ })(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ", "\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 48px;\n outline: none;\n\n ", "\n ::placeholder {\n ", "\n }\n\n ", " {\n ::placeholder {\n ", "\n }\n }\n\n &.small {\n ::placeholder {\n ", "\n }\n }\n\n &.medium {\n ::placeholder {\n ", "\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n"])), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600));
17
17
  var SearchBarInput = /*#__PURE__*/React.forwardRef(function (props, ref) {
18
18
  var id = props.id,
19
19
  searchTerm = props.searchTerm,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","ComponentMStyling","ComponentSStyling","useFocusVisibleRef","Search","input","attrs","type","Italic","neutral_500","Regular","black","neutral_600","MEDIUM","SearchBarInput","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,oBAAtD;AAEA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;AACA,SAAQC,kBAAR,QAAiC,cAAjC;;AAEA,OAAO,IAAMC,MAAM,GAAGP,MAAM,CAACQ,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAP;AAAA,CAAnB,CAAH,+5BA0BbL,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACU,WAAnC,CA1BJ,EAkCfR,iBAAiB,CAACD,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAlCF,EAoCbT,iBAAiB,CAACF,kBAAkB,CAACQ,MAAp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EK,UAFP;AAGE,IAAA,EAAE,EAAET,EAHN;AAIE,mBAAaA,EAJf;AAKE,IAAA,SAAS,EAAEO,IAAI,GAAGA,IAAH,GAAU,EAL3B;AAME,IAAA,QAAQ,EAAE,CANZ;AAOE,IAAA,QAAQ,EAAEF,QAPZ;AAQE,IAAA,QAAQ,EAAE,kBAACO,CAAD;AAAA,aAAYV,aAAa,CAACU,CAAC,CAACI,MAAF,CAASC,KAAV,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CAxCsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;AA6CF,eAAed,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../../styles/index';\nimport {Size} from '../../types';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {useFocusVisibleRef} from '../../common';\n\nexport const Search = styled.input.attrs(() => ({type: 'search'}))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 50px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const {\n id,\n searchTerm,\n setSearchTerm,\n enterSearch,\n placeholder,\n disabled,\n onKeyDown,\n size,\n onBlur\n } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchBarInput.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","ComponentMStyling","ComponentSStyling","useFocusVisibleRef","Search","input","attrs","type","Italic","neutral_500","Regular","black","neutral_600","MEDIUM","SearchBarInput","forwardRef","props","ref","id","searchTerm","setSearchTerm","enterSearch","placeholder","disabled","onKeyDown","size","onBlur","elementRef","focusParentRefs","isPressingEnter","e","key","preventDefault","stopPropagation","target","value"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,WAAT,EAAsBC,MAAtB,EAA8BC,kBAA9B,QAAwD,oBAAxD;AAEA,SAASC,iBAAT,EAA4BC,iBAA5B,QAAqD,cAArD;AACA,SAASC,kBAAT,QAAmC,cAAnC;;AAEA,OAAO,IAAMC,MAAM,GAAGP,MAAM,CAACQ,KAAP,CAAaC,KAAb,CAAmB;AAAA,SAAO;AAAEC,IAAAA,IAAI,EAAE;AAAR,GAAP;AAAA,CAAnB,CAAH,+5BA0BbL,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACU,WAAnC,CA1BJ,EAkCfR,iBAAiB,CAACD,kBAAkB,CAACU,OAApB,EAA6BX,MAAM,CAACY,KAApC,CAlCF,EAoCbT,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CApCJ,EAuCfd,WAAW,CAACe,MAvCG,EAyCXZ,iBAAiB,CAACD,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CAzCN,EA+CXV,iBAAiB,CAACF,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC,CA/CN,EAqDXX,iBAAiB,CAACD,kBAAkB,CAACQ,MAApB,EAA4BT,MAAM,CAACa,WAAnC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aAAa,CAACU,CAAC,CAACI,MAAF,CAASC,KAAV,CAAzB;AAAA,KARZ;AASE,IAAA,KAAK,EAAEhB,UATT;AAUE,IAAA,MAAM,EAAE,gBAACW,CAAD;AAAA,aAAOJ,OAAM,IAAIA,OAAM,CAACI,CAAD,CAAvB;AAAA,KAVV;AAWE,IAAA,SAAS,EAAEN,SAXb;AAYE,IAAA,UAAU,EAAE,oBAACM,CAAD;AAAA,aAAaD,eAAe,CAACC,CAAD,CAAf,GAAqBT,WAAW,CAACS,CAAD,CAAhC,GAAsC,IAAnD;AAAA;AAZd,IADF;AAgBD,CA9BsB,CAAvB;;AAZEZ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,a;AACAC,EAAAA,W;AACAC,EAAAA,W;AACAC,EAAAA,Q;AACAC,EAAAA,S;AAEAE,EAAAA,M;AACAE,EAAAA,e;;AAmCF,eAAed,cAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS, ComponentTextStyle } from '../../styles/index';\nimport { Size } from '../../types';\nimport { ComponentMStyling, ComponentSStyling } from '../../styles';\nimport { useFocusVisibleRef } from '../../common';\n\nexport const Search = styled.input.attrs(() => ({ type: 'search' }))`\n appearance: none;\n width: calc(100% - 96px);\n\n /* To prevent browser putting its own cross inside the search bar */\n\n ::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n\n ::-webkit-search-decoration,\n ::-webkit-search-cancel-button,\n ::-webkit-search-results-button,\n ::-webkit-search-results-decoration {\n display: none;\n }\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n height: 32px;\n border-width: 0;\n margin-left: 48px;\n outline: none;\n\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.small {\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &.medium {\n ::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n }\n\n &:disabled {\n background: transparent;\n border: none;\n }\n`;\n\ntype SearchBarInputProps = {\n id: string;\n searchTerm?: string;\n setSearchTerm: (term: string) => void;\n enterSearch: (e: any) => void;\n placeholder?: string;\n disabled?: boolean;\n onKeyDown?: (e: React.KeyboardEvent) => void;\n size?: Size.Small | Size.Medium;\n onBlur?: (e: any) => void;\n focusParentRefs?: React.RefObject<any>[];\n};\n\nconst SearchBarInput = React.forwardRef<HTMLInputElement, SearchBarInputProps>((props: SearchBarInputProps, ref) => {\n const { id, searchTerm, setSearchTerm, enterSearch, placeholder, disabled, onKeyDown, size, onBlur } = props;\n\n const elementRef = useFocusVisibleRef(props.focusParentRefs || [], ref);\n\n const isPressingEnter = (e: any) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n e.stopPropagation();\n return true;\n }\n return false;\n };\n\n return (\n <Search\n placeholder={disabled ? '' : placeholder}\n ref={elementRef}\n id={id}\n data-testid={id}\n className={size ? size : ''}\n tabIndex={0}\n disabled={disabled}\n onChange={(e: any) => setSearchTerm(e.target.value)}\n value={searchTerm}\n onBlur={(e) => onBlur && onBlur(e)}\n onKeyDown={onKeyDown}\n onKeyPress={(e: any) => (isPressingEnter(e) ? enterSearch(e) : null)}\n />\n );\n});\n\nexport default SearchBarInput;\n"],"file":"SearchBarInput.js"}
@@ -43,7 +43,7 @@ var SearchFieldWrapper = _styledComponents.default.div(_templateObject || (_temp
43
43
 
44
44
  exports.SearchFieldWrapper = SearchFieldWrapper;
45
45
 
46
- var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), _index.COLORS.neutral_400, _index.COLORS.white, (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.COLORS.primary_800, _index.COLORS.primary_800, _index.COLORS.neutral_600, _index.COLORS.critical_400, _index.COLORS.neutral_100);
46
+ var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n"])), _index.COLORS.neutral_400, _index.COLORS.white, (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.COLORS.primary_800, _index.COLORS.primary_800, _index.COLORS.neutral_600, _index.COLORS.critical_400, _index.COLORS.neutral_100);
47
47
 
48
48
  exports.StyledSearchField = StyledSearchField;
49
49
  var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["SearchFieldWrapper","styled","div","focusStyles","StyledSearchField","COLORS","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_800","neutral_600","critical_400","neutral_100","SearchField","React","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAKO,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,iIAEzBC,kBAFyB,CAAxB;;;;AAMA,IAAMC,iBAAiB,GAAGH,0BAAOC,GAAV,8nCAGEG,cAAOC,WAHT,EAURD,cAAOE,KAVC,EAY1B,+BAAkBC,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAZ0B,EAkBxB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAlBwB,EAqB1BC,mBAAYC,MArBc,EAsBxB,+BAAkBN,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAtBwB,EA4BtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA5BsB,EAiCxB,+BAAkBJ,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAjCwB,EAsCtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAtCsB,EA2CxB,+BAAkBJ,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CA3CwB,EA+CtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA/CsB,EAoDIP,cAAOU,WApDX,EAwDIV,cAAOU,WAxDX,EA4DjBV,cAAOW,WA5DU,EAiEIX,cAAOY,YAjEX,EAqEIZ,cAAOa,WArEX,CAAvB;;;AAqFP,IAAMC,WAAW,gBAAGC,KAAK,CAACC,UAAN,CAAkD,gBASIC,GATJ,EASY;AAAA,MARTC,EAQS,QARTA,EAQS;AAAA,MAPTC,UAOS,QAPTA,UAOS;AAAA,MANTC,QAMS,QANTA,QAMS;AAAA,MALTC,iBAKS,QALTA,iBAKS;AAAA,MAJTC,QAIS,QAJTA,QAIS;AAAA,MAHTC,IAGS,QAHTA,IAGS;AAAA,MAFTC,SAES,QAFTA,SAES;AAAA,MADNC,IACM;AAEhF,MAAMC,GAAG,GACP,CAACN,QAAQ,GAAG,WAAH,GAAiB,EAA1B,EACGO,MADH,CACUR,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EADhD,EAEGQ,MAFH,CAEUJ,IAAI,aAAMA,IAAN,SAAgB,EAF9B,EAGGI,MAHH,CAGUN,iBAAiB,GAAG,WAAH,GAAiB,EAH5C,EAIGM,MAJH,WAIaH,SAJb,aAIaA,SAJb,cAIaA,SAJb,GAI0B,EAJ1B,OADF;AAOA,sBACE,qBAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,qBAAC,iBAAD;AACE,MAAA,EAAE,YAAKC,EAAL,UADJ;AAEE,+BAAgBA,EAAhB,UAFF;AAGE,MAAA,SAAS,EAAEQ;AAHb,OAIMD,IAJN;AAAA,gBAKGH;AALH;AADF,IADF;AAWD,CA7BmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;eAmCaR,W","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\nimport {activeErrorMessageState} from '../styling';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.cjs"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["SearchFieldWrapper","styled","div","focusStyles","StyledSearchField","COLORS","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_800","neutral_600","critical_400","neutral_100","SearchField","React","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAGO,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,iIAEzBC,kBAFyB,CAAxB;;;;AAMA,IAAMC,iBAAiB,GAAGH,0BAAOC,GAAV,4nCAGEG,cAAOC,WAHT,EAURD,cAAOE,KAVC,EAY1B,+BAAkBC,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAZ0B,EAkBxB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAlBwB,EAqB1BC,mBAAYC,MArBc,EAsBxB,+BAAkBN,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAtBwB,EA4BtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA5BsB,EAiCxB,+BAAkBJ,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAjCwB,EAsCtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAtCsB,EA2CxB,+BAAkBJ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A,Q;;eAoBaR,W","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../../styles/index';\nimport { ComponentMStyling, ComponentSStyling } from '../../styles';\nimport { Size } from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({ id, searchTerm, disabled, validationMessage, children, size, className, ...rest }, ref) => {\n const cls = (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField id={`${id}_main`} data-testid={`${id}_main`} className={cls} {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.cjs"}
@@ -16,7 +16,7 @@ import { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../../styl
16
16
  import { ComponentMStyling, ComponentSStyling } from '../../styles';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  export var SearchFieldWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.focus-visible-within {\n ", "\n }\n"])), focusStyles);
19
- export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), COLORS.neutral_400, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.primary_800, COLORS.primary_800, COLORS.neutral_600, COLORS.critical_400, COLORS.neutral_100);
19
+ export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n"])), COLORS.neutral_400, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.primary_800, COLORS.primary_800, COLORS.neutral_600, COLORS.critical_400, COLORS.neutral_100);
20
20
  var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
21
21
  var id = _ref.id,
22
22
  searchTerm = _ref.searchTerm,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","SearchFieldWrapper","div","StyledSearchField","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_800","neutral_600","critical_400","neutral_100","SearchField","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAyC,mBAAzC;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,EAAiDC,WAAjD,QAAmE,oBAAnE;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;;AAKA,OAAO,IAAMC,kBAAkB,GAAGP,MAAM,CAACQ,GAAV,mHAEzBJ,WAFyB,CAAxB;AAMP,OAAO,IAAMK,iBAAiB,GAAGT,MAAM,CAACQ,GAAV,gnCAGEN,MAAM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O,MADH,CACUR,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EADhD,EAEGQ,MAFH,CAEUJ,IAAI,aAAMA,IAAN,SAAgB,EAF9B,EAGGI,MAHH,CAGUN,iBAAiB,GAAG,WAAH,GAAiB,EAH5C,EAIGM,MAJH,WAIaH,SAJb,aAIaA,SAJb,cAIaA,SAJb,GAI0B,EAJ1B,OADF;AAOA,sBACE,KAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,KAAC,iBAAD;AACE,MAAA,EAAE,YAAKC,EAAL,UADJ;AAEE,+BAAgBA,EAAhB,UAFF;AAGE,MAAA,SAAS,EAAEQ;AAHb,OAIMD,IAJN;AAAA,gBAKGH;AALH;AADF,IADF;AAWD,CA7BmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;AAmCF,eAAeP,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\nimport {activeErrorMessageState} from '../styling';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.js"}
1
+ {"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","SearchFieldWrapper","div","StyledSearchField","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_800","neutral_600","critical_400","neutral_100","SearchField","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAASC,WAAT,EAAsBC,MAAtB,EAA8BC,kBAA9B,EAAkDC,WAAlD,QAAqE,oBAArE;AACA,SAASC,iBAAT,EAA4BC,iBAA5B,QAAqD,cAArD;;AAGA,OAAO,IAAMC,kBAAkB,GAAGP,MAAM,CAACQ,GAAV,mHAEzBJ,WAFyB,CAAxB;AAMP,OAAO,IAAMK,iBAAiB,GAAGT,MAAM,CAACQ,GAAV,8mCAGEN,MAAM,CAACQ,WAHT,EAURR,MAAM,CAACS,KAVC,EAY1BL,iBAAiB,CAACH,kBAAkB,CAACS,OAApB,EAA6BV,MAAM,CAACW,KAApC,CAZS,EAkBxBP,iBAAiB,CAACH,kBAAkB,CAACW,MAApB,EAA4BZ,MAAM,CAACa,WAAnC,CAlBO,EAqB1Bd,WAAW,CAACe,MArBc,EAsBxBX,iBAAiB,CAACF,kBAAkB,CAACS,OAApB,EAA6BV,MAAM,CAACW,KAApC,CAtBO,EA4BtBR,iBAAiB,CAACF,kBAAkB,CAACW,MAApB,EAA4BZ,MAAM,CAACa,WAAnC,CA5BK,EAiCxBT,iBAAiB,CAACH,kBAAkB,CAACS,OAApB,EAA6BV,MAAM,CAACW,KAApC,CAjCO,EAsCtBP,iBAAiB,CAACH,kBAAkB,CAACW,MAApB,EAA4BZ,MAAM,CAACa,WAAnC,CAtCK,EA2CxBV,iBAAiB,CAACF,kBAAkB,CAACS,OAApB,EAA6BV,MAAM,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iB;AACAC,EAAAA,Q;;AAoBF,eAAeP,WAAf","sourcesContent":["import * as React from 'react';\nimport styled from 'styled-components';\nimport { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../../styles/index';\nimport { ComponentMStyling, ComponentSStyling } from '../../styles';\nimport { Size } from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({ id, searchTerm, disabled, validationMessage, children, size, className, ...rest }, ref) => {\n const cls = (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField id={`${id}_main`} data-testid={`${id}_main`} className={cls} {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.js"}
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.activeErrorMessageState = exports.Warning = exports.ValidationStyling = exports.StyledIcon = exports.SearchIconWrapper = exports.RequiredStar = exports.InputWrapper = exports.InputFieldStyling = exports.ErrorMessage = exports.AutofilledMessage = void 0;
10
+ exports.activeErrorMessageState = exports.Warning = exports.ValidationStyling = exports.ValidationMessage = exports.StyledIcon = exports.SearchIconWrapper = exports.NoteMessage = exports.InputWrapper = exports.InputFieldStyling = exports.ErrorMessage = exports.AutofilledMessage = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
@@ -17,7 +17,7 @@ var _styles = require("../styles");
17
17
 
18
18
  var _typography = require("../styles/typography");
19
19
 
20
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
20
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
21
21
 
22
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
23
 
@@ -34,9 +34,9 @@ var readOnlyState = (0, _styledComponents.css)(_templateObject2 || (_templateObj
34
34
  var activeErrorMessageState = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.critical_400);
35
35
  exports.activeErrorMessageState = activeErrorMessageState;
36
36
 
37
- var InputFieldStyling = _styledComponents.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\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 ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\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: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n \n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n \n &.focus-visible{\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\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 ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n"])), function (props) {
37
+ var InputFieldStyling = _styledComponents.default.input(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\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 ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\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: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.focus-visible {\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\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 ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n"])), function (props) {
38
38
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(_styles.COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(_styles.COLORS.neutral_400, ";");
39
- }, (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_600), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_600), _styles.COLORS.black, function (props) {
39
+ }, (0, _typography.ComponentSStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_500), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentMStyling)(_typography.ComponentTextStyle.Italic, _styles.COLORS.neutral_500), _styles.COLORS.black, function (props) {
40
40
  return props.activeErrorMessage ? activeErrorMessageState : '';
41
41
  }, function (props) {
42
42
  return props.suppressReadOnlyStyles ? '' : readOnlyState;
@@ -46,21 +46,23 @@ exports.InputFieldStyling = InputFieldStyling;
46
46
  var ValidationStyling = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n &.error-msg {\n ", "\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 ", "\n font-weight: 700;\n line-height: 15px;\n }\n"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, _styles.COLORS.black), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, '#e76468'));
47
47
  exports.ValidationStyling = ValidationStyling;
48
48
 
49
- var RequiredStar = _styledComponents.default.span(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n"])), _styles.COLORS.critical_500);
50
-
51
- exports.RequiredStar = RequiredStar;
52
-
53
- var Warning = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n line-height: 140%;\n\n ", " {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n"])), _styles.BREAKPOINTS.MEDIUM);
49
+ var Warning = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), _styles.BREAKPOINTS.MEDIUM, (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXXSStyling)(_typography.ComponentTextStyle.Regular, null), (0, _typography.ComponentXSStyling)(_typography.ComponentTextStyle.Regular, null));
54
50
 
55
51
  exports.Warning = Warning;
56
- var ErrorMessage = (0, _styledComponents.default)(Warning)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.critical_500);
52
+ var ErrorMessage = (0, _styledComponents.default)(Warning)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.critical_500);
57
53
  exports.ErrorMessage = ErrorMessage;
58
- var AutofilledMessage = (0, _styledComponents.default)(Warning)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.neutral_600);
54
+ var ValidationMessage = (0, _styledComponents.default)(Warning)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin: 4px 0px;\n color: ", ";\n"])), function (props) {
55
+ return props.type === 'invalid' ? _styles.COLORS.critical_500 : _styles.COLORS.correct_500;
56
+ });
57
+ exports.ValidationMessage = ValidationMessage;
58
+ var NoteMessage = (0, _styledComponents.default)(Warning)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n margin: 4px 0px;\n color: ", ";\n"])), _styles.COLORS.neutral_500);
59
+ exports.NoteMessage = NoteMessage;
60
+ var AutofilledMessage = (0, _styledComponents.default)(Warning)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.neutral_600);
59
61
  exports.AutofilledMessage = AutofilledMessage;
60
62
 
61
- var StyledIcon = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 50%;\n"])));
63
+ var StyledIcon = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 50%;\n"])));
62
64
 
63
65
  exports.StyledIcon = StyledIcon;
64
- var SearchIconWrapper = (0, _styledComponents.default)(StyledIcon)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n border-radius: 50%;\n"])));
66
+ var SearchIconWrapper = (0, _styledComponents.default)(StyledIcon)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n border-radius: 50%;\n"])));
65
67
  exports.SearchIconWrapper = SearchIconWrapper;
66
68
  //# sourceMappingURL=styling.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","readOnly","disabled","margin","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","ComponentTextStyle","Italic","BREAKPOINTS","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","ErrorMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,yHAErB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,IAAkBD,KAAK,CAACE,QAAxB,GAAmC,sBAAnC,GAA4D,EAAxE;AAAA,CAFqB,EAGrB,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACG,MAAN,qBAA0BH,KAAK,CAACG,MAAhC,SAA4C,EAAxD;AAAA,CAHqB,CAAlB;;;AAMP,IAAMC,aAAa,OAAGC,qBAAH,kQACGC,eAAOC,WADV,EAEaD,eAAOE,WAFpB,EAGRF,eAAOG,WAHC,CAAnB;AAQO,IAAMC,uBAAuB,OAAGL,qBAAH,8HACJC,eAAOK,YADH,CAA7B;;;AAIP,IAAMC,iBAAiB,GAAGd,0BAAOe,KAAV,koDAanB,UAACb,KAAD;AAAA,SACAA,KAAK,CAACc,aAAN,oJAKiDR,eAAOS,WALxD,6DAM2CT,eAAOS,WANlD,wDAOsCT,eAAOS,WAP7C,MADA;AAAA,CAbmB,EAgCjB,mCAAkBC,+BAAmBC,MAArC,EAA6CX,eAAOG,WAApD,CAhCiB,EAmCnBS,oBAAYC,MAnCO,EA0Cf,mCAAkBH,+BAAmBC,MAArC,EAA6CX,eAAOG,WAApD,CA1Ce,EA6DZH,eAAOc,KA7DK,EA+DnB,UAACpB,KAAD;AAAA,SAAYA,KAAK,CAACqB,kBAAN,GAA2BX,uBAA3B,GAAqD,EAAjE;AAAA,CA/DmB,EAkEjB,UAAAV,KAAK;AAAA,SAAIA,KAAK,CAACsB,sBAAN,GAA+B,EAA/B,GAAoClB,aAAxC;AAAA,CAlEY,EAsECE,eAAOC,WAtER,EA2EVD,eAAOE,WA3EG,EA8EiBF,eAAOiB,WA9ExB,EAkFjBC,mBAlFiB,EAsFWlB,eAAOK,YAtFlB,EAyFWL,eAAOmB,WAzFlB,EAqGiBnB,eAAOoB,WArGxB,EAyGiBpB,eAAOiB,WAzGxB,CAAvB;;;AAsHA,IAAMI,iBAAiB,OAAGtB,qBAAH,sUAEjB,qCAAoBW,+BAAmBY,OAAvC,EAAgDtB,eAAOc,KAAvD,CAFiB,EAWjB,qCAAoBJ,+BAAmBY,OAAvC,EAAgD,SAAhD,CAXiB,CAAvB;;;AAiBO,IAAMC,YAAY,GAAG/B,0BAAOgC,IAAV,4MACdxB,eAAOyB,YADO,CAAlB;;;;AAQA,IAAMC,OAAO,GAAGlC,0BAAOC,GAAV,6WAIhBmB,oBAAYC,MAJI,CAAb;;;AAwBA,IAAMc,YAAY,GAAG,+BAAOD,OAAP,CAAH,wGACd1B,eAAOyB,YADO,CAAlB;;AAGA,IAAMG,iBAAiB,GAAG,+BAAOF,OAAP,CAAH,wGACnB1B,eAAOG,WADY,CAAvB;;;AAMA,IAAM0B,UAAU,GAAGrC,0BAAOC,GAAV,gHAAhB;;;AAIA,IAAMqC,iBAAiB,GAAG,+BAAOD,UAAP,CAAH,uIAAvB","sourcesContent":["import styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';\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`;\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_600)}\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_600)}\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`;\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 RequiredStar = styled.span`\n color: ${COLORS.critical_500};\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n`;\nexport const Warning = styled.div`\n font-size: 12px;\n line-height: 140%;\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\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`;\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"],"file":"styling.cjs"}
1
+ {"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","readOnly","disabled","margin","readOnlyState","css","COLORS","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","ComponentTextStyle","Italic","neutral_500","BREAKPOINTS","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","focusStyles","correct_500","primary_700","ValidationStyling","Regular","Warning","ErrorMessage","critical_500","ValidationMessage","type","NoteMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAGO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,yHAErB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,IAAkBD,KAAK,CAACE,QAAxB,GAAmC,sBAAnC,GAA4D,EAAxE;AAAA,CAFqB,EAGrB,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACG,MAAN,qBAA0BH,KAAK,CAACG,MAAhC,SAA4C,EAAxD;AAAA,CAHqB,CAAlB;;;AAMP,IAAMC,aAAa,OAAGC,qBAAH,kQACGC,eAAOC,WADV,EAEaD,eAAOE,WAFpB,EAGRF,eAAOG,WAHC,CAAnB;AAQO,IAAMC,uBAAuB,OAAGL,qBAAH,8HACJC,eAAOK,YADH,CAA7B;;;AAIP,IAAMC,iBAAiB,GAAGd,0BAAOe,KAAV,ynDAanB,UAACb,KAAD;AAAA,SACAA,KAAK,CAACc,aAAN,oJAKiDR,eAAOS,WALxD,6DAM2CT,eAAOS,WANlD,wDAOsCT,eAAOS,WAP7C,MADA;AAAA,CAbmB,EAgCjB,mCAAkBC,+BAAmBC,MAArC,EAA6CX,eAAOY,WAApD,CAhCiB,EAmCnBC,oBAAYC,MAnCO,EA0Cf,mCAAkBJ,+BAAmBC,MAArC,EAA6CX,eAAOY,WAApD,CA1Ce,EA6DZZ,eAAOe,KA7DK,EA+DnB,UAACrB,KAAD;AAAA,SAAYA,KAAK,CAACsB,kBAAN,GAA2BZ,uBAA3B,GAAqD,EAAjE;AAAA,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AAOC,GAAV,gHAAhB;;;AAIA,IAAMuC,iBAAiB,GAAG,+BAAOD,UAAP,CAAH,uIAAvB","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`;\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 margin: 4px 0px;\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\n`;\n\nexport const NoteMessage = styled(Warning)`\n margin: 4px 0px;\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"],"file":"styling.cjs"}
@@ -12,9 +12,12 @@ declare const InputFieldStyling: import("styled-components").StyledComponent<"in
12
12
  suppressReadOnlyStyles?: boolean | undefined;
13
13
  }, never>;
14
14
  declare const ValidationStyling: import("styled-components").FlattenSimpleInterpolation;
15
- export declare const RequiredStar: import("styled-components").StyledComponent<"span", any, {}, never>;
16
15
  export declare const Warning: import("styled-components").StyledComponent<"div", any, {}, never>;
17
16
  export declare const ErrorMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
17
+ export declare const ValidationMessage: import("styled-components").StyledComponent<"div", any, {
18
+ type: 'valid' | 'invalid';
19
+ }, never>;
20
+ export declare const NoteMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
18
21
  export declare const AutofilledMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
19
22
  export { ValidationStyling, InputFieldStyling };
20
23
  export declare const StyledIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,10 +1,10 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
2
 
3
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
4
4
 
5
5
  import styled, { css } from 'styled-components';
6
6
  import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
7
- import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';
7
+ import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling, ComponentXSStyling } from '../styles/typography';
8
8
  export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n"])), function (props) {
9
9
  return props.readOnly || props.disabled ? 'cursor: not-allowed;' : '';
10
10
  }, function (props) {
@@ -12,19 +12,22 @@ export var InputWrapper = styled.div(_templateObject || (_templateObject = _tagg
12
12
  });
13
13
  var readOnlyState = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n box-shadow: inset 0 0 0 1px ", " !important;\n color: ", " !important;\n pointer-events: none;\n outline: none;\n cursor: not-allowed;\n"])), COLORS.neutral_100, COLORS.neutral_300, COLORS.neutral_600);
14
14
  export var activeErrorMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
15
- var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\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 ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\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: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n \n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n \n &.focus-visible{\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\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 ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n \n"])), function (props) {
15
+ var InputFieldStyling = styled.input(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 48px;\n width: 100%;\n border-radius: 4px;\n\n border: 0;\n -webkit-appearance: none;\n ", "\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 ", "\n }\n\n ", " {\n font-size: 18px;\n line-height: 18px;\n height: 56px;\n padding: 0 16px !important;\n\n &::placeholder {\n ", "\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: ", " !important;\n\n ", "\n\n &:read-only:not(:disabled) {\n ", "\n }\n\n &:disabled {\n border: 1px solid ", ";\n pointer-events: none;\n box-shadow: none !important;\n outline: none;\n cursor: not-allowed;\n color: ", " !important;\n }\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.focus-visible {\n ", "\n }\n\n &.invalid {\n box-shadow: inset 0 0 0 2px ", ";\n }\n &.valid {\n box-shadow: inset 0 0 0 2px ", ";\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 ", ";\n }\n\n &.active {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.show-checkmark.valid {\n background-image: none;\n }\n\n &.show-checkmark.pending {\n background-image: none;\n }\n"])), function (props) {
16
16
  return props.withoutBorder ? "-webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n " : "-webkit-box-shadow: inset 0px 0px 0px 1px ".concat(COLORS.neutral_400, ";\n -moz-box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";\n box-shadow: inset 0px 0px 0px 1px ").concat(COLORS.neutral_400, ";");
17
- }, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), COLORS.black, function (props) {
17
+ }, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.black, function (props) {
18
18
  return props.activeErrorMessage ? activeErrorMessageState : '';
19
19
  }, function (props) {
20
20
  return props.suppressReadOnlyStyles ? '' : readOnlyState;
21
21
  }, COLORS.neutral_100, COLORS.neutral_300, COLORS.primary_800, focusStyles, COLORS.critical_400, COLORS.correct_500, COLORS.primary_700, COLORS.primary_800);
22
22
  var ValidationStyling = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n &.error-msg {\n ", "\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 ", "\n font-weight: 700;\n line-height: 15px;\n }\n"])), ComponentXXSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentXXSStyling(ComponentTextStyle.Regular, '#e76468'));
23
- export var RequiredStar = styled.span(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n"])), COLORS.critical_500);
24
- export var Warning = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-size: 12px;\n line-height: 140%;\n\n ", " {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\n }\n\n & * {\n vertical-align: middle;\n display: inline-block;\n }\n\n svg {\n margin-right: 4px;\n }\n"])), BREAKPOINTS.MEDIUM);
25
- export var ErrorMessage = styled(Warning)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.critical_500);
26
- export var AutofilledMessage = styled(Warning)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_600);
23
+ export var Warning = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n ", "\n\n svg {\n width: 16px;\n height: 16px;\n }\n\n ", " {\n ", "\n svg {\n width: 20px;\n height: 20px;\n }\n }\n\n &.small {\n ", "\n svg {\n width: 16px;\n height: 16px;\n }\n }\n &.medium {\n ", "\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"])), ComponentXXSStyling(ComponentTextStyle.Regular, null), BREAKPOINTS.MEDIUM, ComponentXSStyling(ComponentTextStyle.Regular, null), ComponentXXSStyling(ComponentTextStyle.Regular, null), ComponentXSStyling(ComponentTextStyle.Regular, null));
24
+ export var ErrorMessage = styled(Warning)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.critical_500);
25
+ export var ValidationMessage = styled(Warning)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n margin: 4px 0px;\n color: ", ";\n"])), function (props) {
26
+ return props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500;
27
+ });
28
+ export var NoteMessage = styled(Warning)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin: 4px 0px;\n color: ", ";\n"])), COLORS.neutral_500);
29
+ export var AutofilledMessage = styled(Warning)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_600);
27
30
  export { ValidationStyling, InputFieldStyling };
28
- export var StyledIcon = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n border-radius: 50%;\n"])));
29
- export var SearchIconWrapper = styled(StyledIcon)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n position: absolute;\n border-radius: 50%;\n"])));
31
+ export var StyledIcon = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n border-radius: 50%;\n"])));
32
+ export var SearchIconWrapper = styled(StyledIcon)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n position: absolute;\n border-radius: 50%;\n"])));
30
33
  //# sourceMappingURL=styling.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","InputWrapper","div","props","readOnly","disabled","margin","readOnlyState","neutral_100","neutral_300","neutral_600","activeErrorMessageState","critical_400","InputFieldStyling","input","withoutBorder","neutral_400","Italic","MEDIUM","black","activeErrorMessage","suppressReadOnlyStyles","primary_800","correct_500","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","ErrorMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,WAA7B,QAA+C,WAA/C;AACA,SAASC,mBAAT,EAA8BC,kBAA9B,EAAkDC,iBAAlD,EAAqEC,iBAArE,QAA8F,sBAA9F;AAEA,OAAO,IAAMC,YAAY,GAAGT,MAAM,CAACU,GAAV,2GAErB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,IAAkBD,KAAK,CAACE,QAAxB,GAAmC,sBAAnC,GAA4D,EAAxE;AAAA,CAFqB,EAGrB,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACG,MAAN,qBAA0BH,KAAK,CAACG,MAAhC,SAA4C,EAAxD;AAAA,CAHqB,CAAlB;AAMP,IAAMC,aAAa,GAAGd,GAAH,mPACGE,MAAM,CAACa,WADV,EAEab,MAAM,CAACc,WAFpB,EAGRd,MAAM,CAACe,WAHC,CAAnB;AAQA,OAAO,IAAMC,uBAAuB,GAAGlB,GAAH,+GACJE,MAAM,CAACiB,YADH,CAA7B;AAIP,IAAMC,iBAAiB,GAAGrB,MAAM,CAACsB,KAAV,onDAanB,UAACX,KAAD;AAAA,SACAA,KAAK,CAACY,aAAN,oJAKiDpB,MAAM,CAACqB,WALxD,6DAM2CrB,MAAM,CAACqB,WANlD,wDAOsCrB,MAAM,CAACqB,WAP7C,MADA;AAAA,CAbmB,EAgCjBjB,iBAAiB,CAACD,kBAAkB,CAACmB,MAApB,EAA4BtB,MAAM,CAACe,WAAnC,CAhCA,EAmCnBhB,WAAW,CAACwB,MAnCO,EA0CflB,iBAAiB,CAACF,kBAAkB,CAACmB,MAApB,EAA4BtB,MAAM,CAACe,WAAnC,CA1CF,EA6DZf,MAAM,CAACwB,KA7DK,EA+DnB,UAAChB,KAAD;AAAA,SAAYA,KAAK,CAACiB,kBAAN,GAA2BT,uBAA3B,GAAqD,EAAjE;AAAA,CA/DmB,EAkEjB,UAAAR,KAAK;AAAA,SAAIA,KAAK,CAACkB,sBAAN,GAA+B,EAA/B,GAAoCd,aAAxC;AAAA,CAlEY,EAsECZ,MAAM,CAACa,WAtER,EA2EVb,MAAM,CAACc,WA3EG,EA8EiBd,MAAM,CAAC2B,WA9ExB,EAkFjB1B,WAlFiB,EAsFWD,MAAM,CAACiB,YAtFlB,EAyFWjB,MAAM,CAAC4B,WAzFlB,EAqGiB5B,MAAM,CAAC6B,WArGxB,EAyGiB7B,MAAM,CAAC2B,WAzGxB,CAAvB;AAsHA,IAAMG,iBAAiB,GAAGhC,GAAH,uTAEjBI,mBAAmB,CAACC,kBAAkB,CAAC4B,OAApB,EAA6B/B,MAAM,CAACwB,KAApC,CAFF,EAWjBtB,mBAAmB,CAACC,kBAAkB,CAAC4B,OAApB,EAA6B,SAA7B,CAXF,CAAvB;AAiBA,OAAO,IAAMC,YAAY,GAAGnC,MAAM,CAACoC,IAAV,8LACdjC,MAAM,CAACkC,YADO,CAAlB;AAQP,OAAO,IAAMC,OAAO,GAAGtC,MAAM,CAACU,GAAV,+VAIhBR,WAAW,CAACwB,MAJI,CAAb;AAwBP,OAAO,IAAMa,YAAY,GAAGvC,MAAM,CAACsC,OAAD,CAAT,0FACdnC,MAAM,CAACkC,YADO,CAAlB;AAGP,OAAO,IAAMG,iBAAiB,GAAGxC,MAAM,CAACsC,OAAD,CAAT,0FACnBnC,MAAM,CAACe,WADY,CAAvB;AAIP,SAASe,iBAAT,EAA4BZ,iBAA5B;AAEA,OAAO,IAAMoB,UAAU,GAAGzC,MAAM,CAACU,GAAV,kGAAhB;AAIP,OAAO,IAAMgC,iBAAiB,GAAG1C,MAAM,CAACyC,UAAD,CAAT,yHAAvB","sourcesContent":["import styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, focusStyles} from '../styles';\nimport { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';\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`;\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_600)}\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_600)}\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`;\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 RequiredStar = styled.span`\n color: ${COLORS.critical_500};\n font-size: 28px;\n line-height: 12px;\n font-weight: 700;\n position: relative;\n top: 10px;\n`;\nexport const Warning = styled.div`\n font-size: 12px;\n line-height: 140%;\n\n ${BREAKPOINTS.MEDIUM} {\n font-size: 14px;\n }\n\n &.small {\n font-size: 12px;\n }\n &.medium {\n font-size: 14px;\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`;\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"],"file":"styling.js"}
1
+ {"version":3,"sources":["../../src/InputFields/styling.ts"],"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"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,WAAT,EAAsBC,MAAtB,EAA8BC,WAA9B,QAAiD,WAAjD;AACA,SAASC,mBAAT,EAA8BC,kBAA9B,EAAkDC,iBAAlD,EAAqEC,iBAArE,EAAwFC,kBAAxF,QAAkH,sBAAlH;AAGA,OAAO,IAAMC,YAAY,GAAGV,MAAM,CAACW,GAAV,2GAErB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,QAAN,IAAkBD,KAAK,CAACE,QAAxB,GAAmC,sBAAnC,GAA4D,EAAxE;AAAA,CAFqB,EAGrB,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACG,MAAN,qBAA0BH,KAAK,CAACG,MAAhC,SAA4C,EAAxD;AAAA,CAHqB,CAAlB;AAMP,IAAMC,aAAa,GAAGf,GAAH,mPACGE,MAAM,CAACc,WADV,EAEad,MAAM,CAACe,WAFpB,EAGRf,MAAM,CAACgB,WAHC,CAAnB;AA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B,CAAC8B,OAApB,EAA6B,IAA7B,CAHH,EAUhBlC,WAAW,CAAC0B,MAVI,EAWdnB,kBAAkB,CAACH,kBAAkB,CAAC8B,OAApB,EAA6B,IAA7B,CAXJ,EAmBd/B,mBAAmB,CAACC,kBAAkB,CAAC8B,OAApB,EAA6B,IAA7B,CAnBL,EA0Bd3B,kBAAkB,CAACH,kBAAkB,CAAC8B,OAApB,EAA6B,IAA7B,CA1BJ,CAAb;AA0CP,OAAO,IAAME,YAAY,GAAGtC,MAAM,CAACqC,OAAD,CAAT,0FACdlC,MAAM,CAACoC,YADO,CAAlB;AAIP,OAAO,IAAMC,iBAAiB,GAAGxC,MAAM,CAACqC,OAAD,CAAT,8GAEnB,UAACzB,KAAD;AAAA,SAAYA,KAAK,CAAC6B,IAAN,KAAe,SAAf,GAA2BtC,MAAM,CAACoC,YAAlC,GAAiDpC,MAAM,CAAC8B,WAApE;AAAA,CAFmB,CAAvB;AAKP,OAAO,IAAMS,WAAW,GAAG1C,MAAM,CAACqC,OAAD,CAAT,8GAEblC,MAAM,CAACwB,WAFM,CAAjB;AAIP,OAAO,IAAMgB,iBAAiB,GAAG3C,MAAM,CAACqC,OAAD,CAAT,4FACnBlC,MAAM,CAACgB,WADY,CAAvB;AAIP,SAASgB,iBAAT,EAA4Bb,iBAA5B;AAEA,OAAO,IAAMsB,UAAU,GAAG5C,MAAM,CAACW,GAAV,kGAAhB;AAIP,OAAO,IAAMkC,iBAAiB,GAAG7C,MAAM,CAAC4C,UAAD,CAAT,yHAAvB","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`;\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 margin: 4px 0px;\n color: ${(props) => (props.type === 'invalid' ? COLORS.critical_500 : COLORS.correct_500)};\n`;\n\nexport const NoteMessage = styled(Warning)`\n margin: 4px 0px;\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"],"file":"styling.js"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.cjs"}
@@ -0,0 +1,38 @@
1
+ import { Size } from '../types';
2
+ export declare type TextFieldProps = {
3
+ id: string;
4
+ disabled?: boolean;
5
+ readOnly?: boolean;
6
+ onChange?: (text: string) => void;
7
+ value?: string;
8
+ validationMessage?: string;
9
+ type?: string;
10
+ state?: 'invalid' | 'valid';
11
+ autoComplete?: string;
12
+ placeholder?: string;
13
+ required?: boolean;
14
+ pattern?: string;
15
+ maxLength?: number;
16
+ withoutBorder?: boolean;
17
+ size?: Size.Small | Size.Medium;
18
+ margin?: string;
19
+ note?: TextFieldNote;
20
+ };
21
+ export declare type TextareaProps = {
22
+ id: string;
23
+ placeholder: string;
24
+ value?: string;
25
+ disabled?: boolean;
26
+ state?: 'invalid' | 'valid';
27
+ onChange?: (text: string) => void;
28
+ validationMessage?: string;
29
+ size: Size.Small | Size.Medium;
30
+ autoHeight?: boolean;
31
+ margin?: string;
32
+ note?: TextFieldNote;
33
+ required: boolean;
34
+ };
35
+ export declare type TextFieldNote = {
36
+ message: string;
37
+ icon: React.ReactNode;
38
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "1.8.0-dev.31.full",
3
+ "version": "1.8.0-dev.34",
4
4
  "private": false,
5
5
  "author": "Thomas Kalve <thomas.kalve@laerdal.com>",
6
6
  "contributors": [