@laerdal/life-react-components 1.8.0-dev.33 → 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 (63) 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/PasswordField.cjs +1 -1
  28. package/dist/InputFields/PasswordField.cjs.map +1 -1
  29. package/dist/InputFields/PasswordField.js +1 -1
  30. package/dist/InputFields/PasswordField.js.map +1 -1
  31. package/dist/InputFields/QuickSearch.cjs +2 -3
  32. package/dist/InputFields/QuickSearch.cjs.map +1 -1
  33. package/dist/InputFields/QuickSearch.js +2 -3
  34. package/dist/InputFields/QuickSearch.js.map +1 -1
  35. package/dist/InputFields/TextField.cjs +26 -16
  36. package/dist/InputFields/TextField.cjs.map +1 -1
  37. package/dist/InputFields/TextField.d.ts +3 -1
  38. package/dist/InputFields/TextField.js +27 -18
  39. package/dist/InputFields/TextField.js.map +1 -1
  40. package/dist/InputFields/Textarea.cjs +26 -20
  41. package/dist/InputFields/Textarea.cjs.map +1 -1
  42. package/dist/InputFields/Textarea.d.ts +1 -11
  43. package/dist/InputFields/Textarea.js +31 -24
  44. package/dist/InputFields/Textarea.js.map +1 -1
  45. package/dist/InputFields/components/SearchBarInput.cjs +1 -1
  46. package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
  47. package/dist/InputFields/components/SearchBarInput.js +1 -1
  48. package/dist/InputFields/components/SearchBarInput.js.map +1 -1
  49. package/dist/InputFields/components/SearchField.cjs +1 -1
  50. package/dist/InputFields/components/SearchField.cjs.map +1 -1
  51. package/dist/InputFields/components/SearchField.js +1 -1
  52. package/dist/InputFields/components/SearchField.js.map +1 -1
  53. package/dist/InputFields/styling.cjs +15 -13
  54. package/dist/InputFields/styling.cjs.map +1 -1
  55. package/dist/InputFields/styling.d.ts +4 -1
  56. package/dist/InputFields/styling.js +13 -10
  57. package/dist/InputFields/styling.js.map +1 -1
  58. package/dist/InputFields/types.cjs +6 -0
  59. package/dist/InputFields/types.cjs.map +1 -0
  60. package/dist/InputFields/types.d.ts +38 -0
  61. package/dist/InputFields/types.js +2 -0
  62. package/dist/InputFields/types.js.map +1 -0
  63. package/package.json +1 -1
@@ -11,14 +11,14 @@ exports.default = void 0;
11
11
 
12
12
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
13
13
 
14
- var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
14
  var React = _interopRequireWildcard(require("react"));
17
15
 
18
16
  var _styles = require("../styles");
19
17
 
20
18
  var _styling = require("./styling");
21
19
 
20
+ var _types = require("../types");
21
+
22
22
  var _SystemIcons = require("../icons/systemicons/SystemIcons");
23
23
 
24
24
  var _styledComponents = _interopRequireDefault(require("styled-components"));
@@ -36,50 +36,56 @@ var TextareaWrapper = _styledComponents.default.div(_templateObject || (_templat
36
36
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
37
37
  });
38
38
 
39
- var TextArea = _styledComponents.default.textarea(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ", "\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\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 ", ";\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ", ";\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &::placeholder {\n ", "\n }\n"])), _styles.COLORS.neutral_400, _styles.COLORS.white, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.black), _styles.COLORS.primary_700, _styles.COLORS.primary_800, _styles.COLORS.critical_500, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.neutral_600)); // Add component-specific types
40
-
39
+ var TextArea = _styledComponents.default.textarea(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n resize: ", ";\n\n ", "\n\n &.small {\n ", "\n width: 304px;\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\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 ", ";\n }\n\n &.valid {\n border: none;\n margin: 1px;\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ", ";\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &::placeholder {\n ", "\n }\n"])), _styles.COLORS.neutral_400, _styles.COLORS.white, function (props) {
40
+ return props.autoHeight ? 'none' : '';
41
+ }, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.black), (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.black), (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.black), _styles.COLORS.primary_700, _styles.COLORS.primary_800, _styles.COLORS.critical_500, _styles.COLORS.correct_500, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Italic, _styles.COLORS.neutral_500));
41
42
 
42
43
  var Textarea = function Textarea(_ref) {
43
44
  var id = _ref.id,
44
45
  placeholder = _ref.placeholder,
46
+ state = _ref.state,
45
47
  value = _ref.value,
46
48
  size = _ref.size,
47
49
  disabled = _ref.disabled,
48
50
  validationMessage = _ref.validationMessage,
49
51
  _onChange = _ref.onChange,
50
- margin = _ref.margin;
52
+ margin = _ref.margin,
53
+ autoHeight = _ref.autoHeight,
54
+ note = _ref.note,
55
+ required = _ref.required;
51
56
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(TextareaWrapper, {
52
57
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(TextArea, {
53
58
  id: id,
54
59
  value: value,
55
- placeholder: placeholder,
56
- className: "".concat(size, " ").concat(validationMessage ? 'invalid' : ''),
60
+ placeholder: disabled ? undefined : placeholder,
61
+ autoHeight: autoHeight,
62
+ className: "".concat(size, " ").concat(state || (validationMessage ? _types.States.Invalid : '')),
57
63
  disabled: disabled,
58
64
  onChange: function onChange(e) {
59
65
  var _e$target;
60
66
 
61
67
  return _onChange && _onChange((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '');
62
- }
63
- }), validationMessage && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styling.ErrorMessage, {
64
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SystemIcons.TechnicalWarning, {
65
- size: "20px",
68
+ },
69
+ required: required
70
+ }), validationMessage && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styling.ValidationMessage, {
71
+ className: size || '',
72
+ type: state !== null && state !== void 0 ? state : _types.States.Invalid,
73
+ children: [state === _types.States.Valid ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_SystemIcons.CheckMark, {
74
+ color: _styles.COLORS.correct_400
75
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_SystemIcons.TechnicalWarning, {
66
76
  color: _styles.COLORS.critical_400
67
77
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
68
78
  children: validationMessage
69
79
  })]
80
+ }), note && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styling.NoteMessage, {
81
+ className: size,
82
+ children: [note.icon, /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
83
+ children: note.message
84
+ })]
70
85
  })]
71
86
  });
72
87
  };
73
88
 
74
- Textarea.propTypes = {
75
- id: _propTypes.default.string.isRequired,
76
- placeholder: _propTypes.default.string.isRequired,
77
- value: _propTypes.default.string,
78
- disabled: _propTypes.default.bool,
79
- onChange: _propTypes.default.func,
80
- validationMessage: _propTypes.default.string,
81
- margin: _propTypes.default.string
82
- };
83
89
  var _default = Textarea;
84
90
  exports.default = _default;
85
91
  //# sourceMappingURL=Textarea.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"names":["TextareaWrapper","styled","div","props","margin","TextArea","textarea","COLORS","neutral_400","white","ComponentTextStyle","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":";;;;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AAMA;;AAKA;;;;;;;;;;AAGA;AACA,IAAMA,eAAe,GAAGC,0BAAOC,GAAV,8GAEjB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;;AAIA,IAAMC,QAAQ,GAAGJ,0BAAOK,QAAV,61BACQC,eAAOC,WADf,EAEED,eAAOE,KAFT,EAQV,+BAAkBC,2BAAmBC,MAArC,EAA6CJ,eAAOK,KAApD,CARU,EAmBUL,eAAOM,WAnBjB,EAyBUN,eAAOO,WAzBjB,EAmC0BP,eAAOQ,YAnCjC,EA0CUR,eAAOS,WA1CjB,EA+CCT,eAAOU,WA/CR,EAoDR,+BAAkBP,2BAAmBC,MAArC,EAA6CJ,eAAOW,WAApD,CApDQ,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,MAA5BtB,MAA4B,QAA5BA,MAA4B;AAC3J,sBACE,sBAAC,eAAD;AAAA,4BACE,qBAAC,QAAD;AACE,MAAA,EAAE,EAAEgB,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,sBAAC,qBAAD;AAAA,8BACE,qBAAC,6BAAD;AAAkB,QAAA,IAAI,EAAC,MAAvB;AAA8B,QAAA,KAAK,EAAElB,eAAOsB;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;AAEArB,EAAAA,M;;eAwBae,Q","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.cjs"}
1
+ {"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"names":["TextareaWrapper","styled","div","props","margin","TextArea","textarea","COLORS","neutral_400","white","autoHeight","ComponentTextStyle","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","States","Invalid","e","target","Valid","correct_400","critical_400","icon","message"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AAKA;;AAKA;;;;;;;;;;AAIA;AACA,IAAMA,eAAe,GAAGC,0BAAOC,GAAV,8GAEjB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,qBAA0BD,KAAK,CAACC,MAAhC,SAA4C,EAAxD;AAAA,CAFiB,CAArB;;AAIA,IAAMC,QAAQ,GAAGJ,0BAAOK,QAAV,6gCACQC,eAAOC,WADf,EAEED,eAAOE,KAFT,EAQF,UAACN,KAAD;AAAA,SAAYA,KAAK,CAACO,UAAN,GAAmB,MAAnB,GAA4B,EAAxC;AAAA,CARE,EAUV,+BAAkBC,2BAAmBC,MAArC,EAA6CL,eAAOM,KAApD,CAVU,EAaR,+BAAkBF,2BAAmBC,MAArC,EAA6CL,eAAOM,KAApD,CAbQ,EAgBN,+BAAkBF,2BAAmBC,MAArC,EAA6CL,eAAOO,WAApD,CAhBM,EAqBR,+BAAkBH,2BAAmBC,MAArC,EAA6CL,eAAOM,KAApD,CArBQ,EA0BUN,eAAOQ,WA1BjB,EAgCUR,eAAOS,WAhCjB,EA0C0BT,eAAOU,YA1CjC,EAgDoBV,eAAOW,WAhD3B,EAuDUX,eAAOY,WAvDjB,EA4DCZ,eAAOa,WA5DR,EAiER,+BAAkBT,2BAAmBC,MAArC,EAA6CL,eAAOO,WAApD,CAjEQ,CAAd;;AAqEA,IAAMO,QAAgD,GAAG,SAAnDA,QAAmD,OAapC;AAAA,MAZnBC,EAYmB,QAZnBA,EAYmB;AAAA,MAXnBC,WAWmB,QAXnBA,WAWmB;AAAA,MAVnBC,KAUmB,QAVnBA,KAUmB;AAAA,MATnBC,KASmB,QATnBA,KASmB;AAAA,M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AAP,QAFF;AAAA,MAZJ,EAiBGE,IAAI,IAAI,CAACH,QAAT,iBACC,sBAAC,oBAAD;AAAa,MAAA,SAAS,EAAED,IAAxB;AAAA,iBACGI,IAAI,CAACU,IADR,eAEE;AAAA,kBAAOV,IAAI,CAACW;AAAZ,QAFF;AAAA,MAlBJ;AAAA,IADF;AA0BD,CAxCD;;eA0CepB,Q","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.cjs"}
@@ -2,16 +2,6 @@
2
2
  * Import React libraries.
3
3
  */
4
4
  import * as React from 'react';
5
- import { Size } from '../types';
6
- declare type TextareaProps = {
7
- id: string;
8
- placeholder: string;
9
- value?: string;
10
- disabled?: boolean;
11
- onChange?: (text: string) => void;
12
- validationMessage?: string;
13
- size: Size.Small | Size.Medium;
14
- margin?: string;
15
- };
5
+ import { TextareaProps } from './types';
16
6
  declare const Textarea: React.FunctionComponent<TextareaProps>;
17
7
  export default Textarea;
@@ -1,5 +1,4 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
2
- import _pt from "prop-types";
3
2
 
4
3
  var _templateObject, _templateObject2;
5
4
 
@@ -11,67 +10,75 @@ import * as React from 'react';
11
10
  * Import custom styles.
12
11
  */
13
12
 
14
- import { COLORS } from '../styles';
15
- import { ErrorMessage } from './styling';
16
-
13
+ import { COLORS, ComponentSStyling } from '../styles';
14
+ import { NoteMessage, ValidationMessage } from './styling';
15
+ import { States } from '../types';
17
16
  /**
18
17
  * Import custom components.
19
18
  */
20
- import { TechnicalWarning } from '../icons/systemicons/SystemIcons';
19
+
20
+ import { CheckMark, TechnicalWarning } from '../icons/systemicons/SystemIcons';
21
21
  /**
22
22
  * Import third-party libraries.
23
23
  */
24
24
 
25
25
  import styled from 'styled-components';
26
- import { ComponentMStyling, ComponentTextStyle } from '../styles'; // Add component-specific styles.
27
-
26
+ import { ComponentMStyling, ComponentTextStyle } from '../styles';
28
27
  import { jsx as _jsx } from "react/jsx-runtime";
29
28
  import { jsxs as _jsxs } from "react/jsx-runtime";
29
+ // Add component-specific styles.
30
30
  var TextareaWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n ", "\n"])), function (props) {
31
31
  return props.margin ? "margin: ".concat(props.margin, ";") : '';
32
32
  });
33
- var TextArea = styled.textarea(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ", "\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\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 ", ";\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ", ";\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &::placeholder {\n ", "\n }\n"])), COLORS.neutral_400, COLORS.white, ComponentMStyling(ComponentTextStyle.Italic, COLORS.black), COLORS.primary_700, COLORS.primary_800, COLORS.critical_500, COLORS.neutral_100, COLORS.neutral_300, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)); // Add component-specific types
33
+ var TextArea = styled.textarea(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n resize: ", ";\n\n ", "\n\n &.small {\n ", "\n width: 304px;\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\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 ", ";\n }\n\n &.valid {\n border: none;\n margin: 1px;\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ", ";\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &::placeholder {\n ", "\n }\n"])), COLORS.neutral_400, COLORS.white, function (props) {
34
+ return props.autoHeight ? 'none' : '';
35
+ }, ComponentMStyling(ComponentTextStyle.Italic, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Italic, COLORS.black), COLORS.primary_700, COLORS.primary_800, COLORS.critical_500, COLORS.correct_500, COLORS.neutral_100, COLORS.neutral_300, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500));
34
36
 
35
37
  var Textarea = function Textarea(_ref) {
36
38
  var id = _ref.id,
37
39
  placeholder = _ref.placeholder,
40
+ state = _ref.state,
38
41
  value = _ref.value,
39
42
  size = _ref.size,
40
43
  disabled = _ref.disabled,
41
44
  validationMessage = _ref.validationMessage,
42
45
  _onChange = _ref.onChange,
43
- margin = _ref.margin;
46
+ margin = _ref.margin,
47
+ autoHeight = _ref.autoHeight,
48
+ note = _ref.note,
49
+ required = _ref.required;
44
50
  return /*#__PURE__*/_jsxs(TextareaWrapper, {
45
51
  children: [/*#__PURE__*/_jsx(TextArea, {
46
52
  id: id,
47
53
  value: value,
48
- placeholder: placeholder,
49
- className: "".concat(size, " ").concat(validationMessage ? 'invalid' : ''),
54
+ placeholder: disabled ? undefined : placeholder,
55
+ autoHeight: autoHeight,
56
+ className: "".concat(size, " ").concat(state || (validationMessage ? States.Invalid : '')),
50
57
  disabled: disabled,
51
58
  onChange: function onChange(e) {
52
59
  var _e$target;
53
60
 
54
61
  return _onChange && _onChange((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '');
55
- }
56
- }), validationMessage && /*#__PURE__*/_jsxs(ErrorMessage, {
57
- children: [/*#__PURE__*/_jsx(TechnicalWarning, {
58
- size: "20px",
62
+ },
63
+ required: required
64
+ }), validationMessage && /*#__PURE__*/_jsxs(ValidationMessage, {
65
+ className: size || '',
66
+ type: state !== null && state !== void 0 ? state : States.Invalid,
67
+ children: [state === States.Valid ? /*#__PURE__*/_jsx(CheckMark, {
68
+ color: COLORS.correct_400
69
+ }) : /*#__PURE__*/_jsx(TechnicalWarning, {
59
70
  color: COLORS.critical_400
60
71
  }), /*#__PURE__*/_jsx("span", {
61
72
  children: validationMessage
62
73
  })]
74
+ }), note && !disabled && /*#__PURE__*/_jsxs(NoteMessage, {
75
+ className: size,
76
+ children: [note.icon, /*#__PURE__*/_jsx("span", {
77
+ children: note.message
78
+ })]
63
79
  })]
64
80
  });
65
81
  };
66
82
 
67
- Textarea.propTypes = {
68
- id: _pt.string.isRequired,
69
- placeholder: _pt.string.isRequired,
70
- value: _pt.string,
71
- disabled: _pt.bool,
72
- onChange: _pt.func,
73
- validationMessage: _pt.string,
74
- margin: _pt.string
75
- };
76
83
  export default Textarea;
77
84
  //# sourceMappingURL=Textarea.js.map
@@ -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,CA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E,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,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ourcesContent":["/**\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,GAU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ACC,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;;eA6Caf,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: 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,66BA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,IAAP;AACD;;AACD,WAAO,KAAP;AACD,GAPD;;AASA,sBACE,qBAAC,MAAD;AACE,IAAA,WAAW,EAAEV,QAAQ,GAAG,EAAH,GAAQD,WAD/B;AAEE,IAAA,GAAG,EAAEK,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,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,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e,GAAG,SAAlBA,eAAkB,CAACC,CAAD,EAAY;AAClC,QAAIA,CAAC,CAACC,GAAF,KAAU,OAAd,EAAuB;AACrBD,MAAAA,CAAC,CAACE,cAAF;AACAF,MAAAA,CAAC,CAACG,eAAF;AACA,aAAO,IAAP;AACD;;AACD,WAAO,KAAP;AACD,GAPD;;AASA,sBACE,KAAC,MAAD;AACE,IAAA,WAAW,EAAEV,QAAQ,GAAG,EAAH,GAAQD,WAD/B;AAEE,IAAA,GAAG,EAAEK,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,kBAA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E,IAAA,WAAW,EAAEV,QAAQ,GAAG,EAAH,GAAQD,WAD/B;AAEE,IAAA,GAAG,EAAEK,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,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,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CaR,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,WAAp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kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,qBAAC,iBAAD;AAAmB,MAAA,EAAE,YAAKC,EAAL,UAArB;AAAqC,+BAAgBA,EAAhB,UAArC;AAAgE,MAAA,SAAS,EAAEQ;AAA3E,OAAoFD,IAApF;AAAA,gBACGH;AADH;AADF,IADF;AAOD,CAdmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,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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ASY;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,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,K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MA,sBACE,KAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,KAAC,iBAAD;AAAmB,MAAA,EAAE,YAAKC,EAAL,UAArB;AAAqC,+BAAgBA,EAAhB,UAArC;AAAgE,MAAA,SAAS,EAAEQ;AAA3E,OAAoFD,IAApF;AAAA,gBACGH;AADH;AADF,IADF;AAOD,CAdmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,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"}