@laerdal/life-react-components 1.8.0-dev.38 → 1.8.0-dev.39

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 (73) 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/dist/MenuItem/MenuItem.cjs +2 -11
  64. package/dist/MenuItem/MenuItem.cjs.map +1 -1
  65. package/dist/MenuItem/MenuItem.d.ts +1 -3
  66. package/dist/MenuItem/MenuItem.js +4 -13
  67. package/dist/MenuItem/MenuItem.js.map +1 -1
  68. package/dist/styles/colors.cjs +0 -1
  69. package/dist/styles/colors.cjs.map +1 -1
  70. package/dist/styles/colors.d.ts +0 -1
  71. package/dist/styles/colors.js +0 -1
  72. package/dist/styles/colors.js.map +1 -1
  73. package/package.json +1 -1
@@ -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,EA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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,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XiB,CAAvB;;;AAiBO,IAAMC,OAAO,GAAGhC,0BAAOC,GAAV,ujBAGhB,qCAAoBiB,+BAAmBa,OAAvC,EAAgD,IAAhD,CAHgB,EAUhBV,oBAAYC,MAVI,EAWd,oCAAmBJ,+BAAmBa,OAAtC,EAA+C,IAA/C,CAXc,EAmBd,qCAAoBb,+BAAmBa,OAAvC,EAAgD,IAAhD,CAnBc,EA0Bd,oCAAmBb,+BAAmBa,OAAtC,EAA+C,IAA/C,CA1Bc,CAAb;;;AA0CA,IAAME,YAAY,GAAG,+BAAOD,OAAP,CAAH,wGACdxB,eAAO0B,YADO,CAAlB;;AAIA,IAAMC,iBAAiB,GAAG,+BAAOH,OAAP,CAAH,4HAEnB,UAAC9B,KAAD;AAAA,SAAYA,KAAK,CAACkC,IAAN,KAAe,SAAf,GAA2B5B,eAAO0B,YAAlC,GAAiD1B,eAAOoB,WAApE;AAAA,CAFmB,CAAvB;;AAKA,IAAMS,WAAW,GAAG,+BAAOL,OAAP,CAAH,4HAEbxB,eAAOY,WAFM,CAAjB;;AAIA,IAAMkB,iBAAiB,GAAG,+BAAON,OAAP,CAAH,0GACnBxB,eAAOG,WADY,CAAvB;;;AAMA,IAAM4B,UAAU,GAAGvC,0BAAOC,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,CA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AmB,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;AAQA,OAAO,IAAMC,uBAAuB,GAAGnB,GAAH,+GACJE,MAAM,CAACkB,YADH,CAA7B;AAIP,IAAMC,iBAAiB,GAAGtB,MAAM,CAACuB,KAAV,2mDAanB,UAACX,KAAD;AAAA,SACAA,KAAK,CAACY,aAAN,oJAKiDrB,MAAM,CAACsB,WALxD,6DAM2CtB,MAAM,CAACsB,WANlD,wDAOsCtB,MAAM,CAACsB,WAP7C,MADA;AAAA,CAbmB,EAgCjBlB,iBAAiB,CAACD,kBAAkB,CAACoB,MAApB,EAA4BvB,MAAM,CAACwB,WAAnC,CAhCA,EAmCnBzB,WAAW,CAAC0B,MAnCO,EA0CfpB,iBAAiB,CAACF,kBAAkB,CAACoB,MAApB,EAA4BvB,MAAM,CAACwB,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A,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"}
@@ -53,20 +53,12 @@ var ItemIconRight = _styledComponents.default.div(_templateObject4 || (_template
53
53
 
54
54
  exports.ItemIconRight = ItemIconRight;
55
55
 
56
- var ItemContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: ", ";\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ", " {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ", " {\n margin-right: ", ";\n svg {\n display: block;\n margin: auto;\n height:", ";\n width:", ";\n }\n }\n\n ", " {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n"])), function (props) {
57
- return props.size === _types.Size.Small ? 'auto 0 auto 10px' : props.size === _types.Size.Large ? 'auto 0 auto 26px' : 'auto 0 auto 18px';
58
- }, ItemLabel, ItemIcon, function (props) {
59
- return props.size === _types.Size.Small ? '6px' : '8px';
60
- }, function (props) {
61
- return props.size === _types.Size.Small ? '20px' : '';
62
- }, function (props) {
63
- return props.size === _types.Size.Small ? '20px' : '';
64
- }, ItemIconRight);
56
+ var ItemContent = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: auto 0 auto 16px;\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ", " {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ", " {\n margin-right: 6px;\n svg {\n display: block;\n margin: auto;\n }\n }\n\n ", " {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n"])), ItemLabel, ItemIcon, ItemIconRight);
65
57
 
66
58
  exports.ItemContent = ItemContent;
67
59
 
68
60
  var DropdownButtonCSS = function DropdownButtonCSS(size) {
69
- return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n ", "\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n background-color: ", ";\n border: none;\n cursor: pointer;\n background: none;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ", ", ", " {\n color: ", ";\n }\n\n &:hover:not(.active), &.hover-state {\n background: ", ";\n ", ", ", " {\n color: ", ";\n }\n }\n\n &:focus, &.focus-state, &.focus-visible {\n ", "\n }\n\n &:active:not(.active), &.active-state {\n background: ", ";\n ", ", ", " {\n color: ", ";\n }\n }\n\n &.active {\n background: ", ";\n\n ", ", ", " {\n color: ", ";\n }\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 4px;\n bottom: 4px;\n left: 4px;\n background-color: ", ";\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ", ";\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ", ";\n\n ", ", ", " {\n color: ", ";\n } \n\n &::after {\n background-color: ", ";\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ", ";\n\n ", ", ", " {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ", " !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n "])), size == _types.Size.Small && (0, _typography.ComponentSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Medium && (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Large && (0, _typography.ComponentLStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Large ? '64px' : size == _types.Size.Medium ? '56px' : '48px', _styles.COLORS.white, ItemLabel, ItemIcon, _styles.COLORS.neutral_600, _styles.COLORS.primary_20, ItemLabel, ItemIcon, _styles.COLORS.primary_700, _styles.focusStyles, _styles.COLORS.primary_100, ItemLabel, ItemIcon, _styles.COLORS.primary_800, _styles.COLORS.neutral_20, ItemLabel, ItemIcon, _styles.COLORS.neutral_800, _styles.COLORS.primary_500, _styles.COLORS.neutral_500, _styles.COLORS.primary_20, ItemIcon, ItemLabel, _styles.COLORS.primary_700, _styles.COLORS.primary_700, _styles.COLORS.primary_100, ItemIcon, ItemLabel, _styles.COLORS.primary_800, _styles.COLORS.primary_800, _styles.COLORS.neutral_200, _styles.COLORS.primary_20, _styles.COLORS.primary_600);
61
+ return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n ", "\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n background-color: ", ";\n border: none;\n cursor: pointer;\n background: transparent;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ", ";\n\n &.active {\n background: ", ";\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 6px;\n bottom: 6px;\n left: 4px;\n background-color: ", ";\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ", ";\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ", " !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n "])), size == _types.Size.Small && (0, _typography.ComponentSStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Medium && (0, _typography.ComponentMStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Large && (0, _typography.ComponentLStyling)(_styles.ComponentTextStyle.Regular, _styles.COLORS.neutral_600), size == _types.Size.Large ? '64px' : size == _types.Size.Medium ? '56px' : '48px', _styles.COLORS.white, _common.CommonInteractionStyling, _styles.COLORS.neutral_20, _styles.COLORS.primary_500, _styles.COLORS.neutral_500, _styles.COLORS.primary_20, _styles.COLORS.primary_600, _styles.COLORS.primary_500, _styles.COLORS.primary_100, _styles.COLORS.primary_800, _styles.COLORS.primary_500, _styles.COLORS.neutral_200, _styles.COLORS.primary_20, _styles.COLORS.primary_600);
70
62
  };
71
63
 
72
64
  exports.DropdownButtonCSS = DropdownButtonCSS;
@@ -95,7 +87,6 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
95
87
  children: [item.showDividerAbove && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
96
88
  className: "divider"
97
89
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ItemContent, {
98
- size: size,
99
90
  children: [item.icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(ItemIcon, {
100
91
  children: item.icon
101
92
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(ItemLabel, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/MenuItem/MenuItem.tsx"],"names":["DropdownButton","styled","button","props","DropdownButtonCSS","size","ItemLabel","div","ItemIcon","ItemIconRight","ItemContent","Size","Small","Large","css","ComponentTextStyle","Regular","COLORS","neutral_600","Medium","white","primary_20","primary_700","focusStyles","primary_100","primary_800","neutral_20","neutral_800","primary_500","neutral_500","neutral_200","primary_600","MenuItem","React","forwardRef","ref","active","item","onClickHandler","className","tabIndex","iconRight","id","disabled","locked","defaultOnMouseDownHandler","showDividerAbove","icon","displayLabel","value","noteLabel","fontSize","lineHeight","neutral_400","cloneElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;;;AAaO,IAAMA,cAAc,GAAGC,0BAAOC,MAAV,8FACvB,UAACC,KAAD;AAAA,SAAWC,iBAAiB,CAACD,KAAK,CAACE,IAAP,CAA5B;AAAA,CADuB,CAApB;;;;AAIA,IAAMC,SAAS,GAAGL,0BAAOM,GAAV,qFAAf;;;;AAEA,IAAMC,QAAQ,GAAGP,0BAAOM,GAAV,qFAAd;;;;AAEA,IAAME,aAAa,GAAGR,0BAAOM,GAAV,iIAAnB;;;;AAKA,IAAMG,WAAW,GAAGT,0BAAOM,GAAV,wkBACV,UAAAJ,KAAK;AAAA,SAAEA,KAAK,CAACE,IAAN,KAAaM,YAAKC,KAAlB,GAAwB,kBAAxB,GAA4CT,KAAK,CAACE,IAAN,KAAaM,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;AACAC,EAAAA,S;;eA8MYT,Q","sourcesContent":["import * as React from 'react';\nimport {Link} from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronRight, LockedOn} from '../icons/systemicons/SystemIcons';\nimport {Product, Size} from '../types';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling} from '../styles/typography';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\nimport {CommonInteractionStyling, defaultOnMouseDownHandler} from '../common';\n\nexport interface MenuItemProps {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n className?: string;\n tabIndex?: number;\n iconRight?: React.ReactElement;\n}\n\nexport const DropdownButton = styled.button<{ size?: Size }>`\n ${(props) => DropdownButtonCSS(props.size)}\n`;\n\nexport const ItemLabel = styled.div``;\n\nexport const ItemIcon = styled.div``;\n\nexport const ItemIconRight = styled.div`\n align-items: center;\n display: flex;\n`;\n\nexport const ItemContent = styled.div<{size:Size}>`\n margin: ${props=>props.size===Size.Small?'auto 0 auto 10px':(props.size===Size.Large?'auto 0 auto 26px':'auto 0 auto 18px')};\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ${ItemLabel} {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ${ItemIcon} {\n margin-right: ${props=>props.size===Size.Small?'6px':'8px'};\n svg {\n display: block;\n margin: auto;\n height:${props=>props.size===Size.Small?'20px':''};\n width:${props=>props.size===Size.Small?'20px':''};\n }\n }\n\n ${ItemIconRight} {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n`;\n\n\nexport const DropdownButtonCSS = (size?: Size) => {\n return css`\n ${size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ${size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px'};\n background-color: ${COLORS.white};\n border: none;\n cursor: pointer;\n background: none;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.neutral_600};\n }\n\n &:hover:not(.active), &.hover-state {\n background: ${COLORS.primary_20};\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.primary_700};\n }\n }\n\n &:focus, &.focus-state, &.focus-visible {\n ${focusStyles}\n }\n\n &:active:not(.active), &.active-state {\n background: ${COLORS.primary_100};\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.primary_800};\n }\n }\n\n &.active {\n background: ${COLORS.neutral_20};\n\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.neutral_800};\n }\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 4px;\n bottom: 4px;\n left: 4px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ${COLORS.neutral_500};\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ${COLORS.primary_20};\n\n ${ItemIcon}, ${ItemLabel} {\n color: ${COLORS.primary_700};\n } \n\n &::after {\n background-color: ${COLORS.primary_700};\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ${COLORS.primary_100};\n\n ${ItemIcon}, ${ItemLabel} {\n color: ${COLORS.primary_800};\n }\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ${COLORS.neutral_200} !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n `;\n};\n\nconst MenuItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id }: MenuItemProps, ref) => {\n return (\n <DropdownButton\n type=\"button\"\n size={size}\n disabled={item.disabled || item.locked}\n tabIndex={tabIndex}\n onMouseDown={defaultOnMouseDownHandler}\n ref={ref}\n onClick={onClickHandler}\n className={ className + ' ' + (item.locked ? 'locked' : '') + ' ' + (item.showDividerAbove ? 'show-divider-above' : '') + ' ' + (active ? 'active' : '')}\n id={id}>\n {item.showDividerAbove && <div className=\"divider\" />}\n <ItemContent size={size}>\n {item.icon && <ItemIcon>{item.icon}</ItemIcon>}\n <ItemLabel>\n <div>\n <div>{item.displayLabel ?? item.value}</div>\n {item.noteLabel && <div style={{ fontSize: '12px', lineHeight: '16px' }}>{item.noteLabel}</div>}\n </div>\n {\n item.locked &&\n <ItemIconRight>\n <LockedOn color={COLORS.neutral_400} className=\"extraMargin\" size=\"24px\"/>\n </ItemIconRight>\n }\n {\n !item.locked && !!iconRight &&\n <ItemIconRight>\n {React.cloneElement(iconRight, {className: 'extraMargin', size: '24px',})}\n </ItemIconRight>\n }\n\n </ItemLabel>\n </ItemContent>\n </DropdownButton>\n );\n});\n\nexport default MenuItem;\n"],"file":"MenuItem.cjs"}
1
+ {"version":3,"sources":["../../src/MenuItem/MenuItem.tsx"],"names":["DropdownButton","styled","button","props","DropdownButtonCSS","size","ItemLabel","div","ItemIcon","ItemIconRight","ItemContent","css","Size","Small","ComponentTextStyle","Regular","COLORS","neutral_600","Medium","Large","white","CommonInteractionStyling","neutral_20","primary_500","neutral_500","primary_20","primary_600","primary_100","primary_800","neutral_200","MenuItem","React","forwardRef","ref","active","item","onClickHandler","className","tabIndex","iconRight","id","disabled","locked","defaultOnMouseDownHandler","showDividerAbove","icon","displayLabel","value","noteLabel","fontSize","lineHeight","neutral_400","cloneElement"],"mappings":";;;;;;;;;;;;;;;AAAA;;AAEA;;AACA;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;AAAA,4CAAMV,IAAI,CAACW,YAAX,mEAA2BX,IAAI,CAACY;AAAhC,YADF,EAEGZ,IAAI,CAACa,SAAL,iBAAkB;AAAK,YAAA,KAAK,EAAE;AAAEC,cAAAA,QAAQ,EAAE,MAAZ;AAAoBC,cAAAA,UAAU,EAAE;AAAhC,aAAZ;AAAA,sBAAuDf,IAAI,CAACa;AAA5D,YAFrB;AAAA,UADJ,EAMIb,IAAI,CAACO,MAAL,iBACA,qBAAC,aAAD;AAAA,iCACE,qBAAC,qBAAD;AAAU,YAAA,KAAK,EAAE1B,eAAOmC,WAAxB;AAAqC,YAAA,SAAS,EAAC,aAA/C;AAA6D,YAAA,IAAI,EAAC;AAAlE;AADF,UAPJ,EAYI,CAAChB,IAAI,CAACO,MAAN,IAAgB,CAAC,CAACH,SAAlB,iBACA,qBAAC,aAAD;AAAA,iCACGR,KAAK,CAACqB,YAAN,CAAmBb,SAAnB,EAA8B;AAACF,YAAAA,SAAS,EAAE,aAAZ;AAA2BhC,YAAAA,IAAI,EAAE;AAAjC,WAA9B;AADH,UAbJ;AAAA,QAFF;AAAA,MAXJ;AAAA,IADF;AAoCD,CA7CgB,CAAjB;;AAzIG+B,EAAAA,c;AACAF,EAAAA,M;AACAM,EAAAA,E;AAEAH,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,S;;eAkLYT,Q","sourcesContent":["import * as React from 'react';\nimport {Link} from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../styles';\nimport {ChevronRight, LockedOn} from '../icons/systemicons/SystemIcons';\nimport {Product, Size} from '../types';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling} from '../styles/typography';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\nimport {CommonInteractionStyling, defaultOnMouseDownHandler} from '../common';\n\nexport interface MenuItemProps {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n className?: string;\n tabIndex?: number;\n iconRight?: React.ReactElement;\n}\n\nexport const DropdownButton = styled.button<{ size?: Size }>`\n ${(props) => DropdownButtonCSS(props.size)}\n`;\n\nexport const ItemLabel = styled.div``;\nexport const ItemIcon = styled.div``;\nexport const ItemIconRight = styled.div`\n align-items: center;\n display: flex;\n`;\n\nexport const ItemContent = styled.div`\n margin: auto 0 auto 16px;\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ${ItemLabel} {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ${ItemIcon} {\n margin-right: 6px;\n svg {\n display: block;\n margin: auto;\n }\n }\n\n ${ItemIconRight} {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n`;\n\n\nexport const DropdownButtonCSS = (size?: Size) => {\n return css`\n ${size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ${size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px'};\n background-color: ${COLORS.white};\n border: none;\n cursor: pointer;\n background: transparent;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ${CommonInteractionStyling};\n\n &.active {\n background: ${COLORS.neutral_20};\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 6px;\n bottom: 6px;\n left: 4px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ${COLORS.neutral_500};\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ${COLORS.primary_20};\n\n svg {\n color: ${COLORS.primary_600};\n }\n\n &::after {\n background-color: ${COLORS.primary_500};\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ${COLORS.primary_100};\n\n svg {\n color: ${COLORS.primary_800};\n }\n\n &::after {\n background-color: ${COLORS.primary_500};\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ${COLORS.neutral_200} !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n `;\n};\n\nconst MenuItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id }: MenuItemProps, ref) => {\n return (\n <DropdownButton\n type=\"button\"\n size={size}\n disabled={item.disabled || item.locked}\n tabIndex={tabIndex}\n onMouseDown={defaultOnMouseDownHandler}\n ref={ref}\n onClick={onClickHandler}\n className={ className + ' ' + (item.locked ? 'locked' : '') + ' ' + (item.showDividerAbove ? 'show-divider-above' : '') + ' ' + (active ? 'active' : '')}\n id={id}>\n {item.showDividerAbove && <div className=\"divider\" />}\n <ItemContent>\n {item.icon && <ItemIcon>{item.icon}</ItemIcon>}\n <ItemLabel>\n <div>\n <div>{item.displayLabel ?? item.value}</div>\n {item.noteLabel && <div style={{ fontSize: '12px', lineHeight: '16px' }}>{item.noteLabel}</div>}\n </div>\n {\n item.locked &&\n <ItemIconRight>\n <LockedOn color={COLORS.neutral_400} className=\"extraMargin\" size=\"24px\"/>\n </ItemIconRight>\n }\n {\n !item.locked && !!iconRight &&\n <ItemIconRight>\n {React.cloneElement(iconRight, {className: 'extraMargin', size: '24px',})}\n </ItemIconRight>\n }\n\n </ItemLabel>\n </ItemContent>\n </DropdownButton>\n );\n});\n\nexport default MenuItem;\n"],"file":"MenuItem.cjs"}
@@ -17,9 +17,7 @@ export declare const DropdownButton: import("styled-components").StyledComponent
17
17
  export declare const ItemLabel: import("styled-components").StyledComponent<"div", any, {}, never>;
18
18
  export declare const ItemIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
19
19
  export declare const ItemIconRight: import("styled-components").StyledComponent<"div", any, {}, never>;
20
- export declare const ItemContent: import("styled-components").StyledComponent<"div", any, {
21
- size: Size;
22
- }, never>;
20
+ export declare const ItemContent: import("styled-components").StyledComponent<"div", any, {}, never>;
23
21
  export declare const DropdownButtonCSS: (size?: Size | undefined) => import("styled-components").FlattenSimpleInterpolation;
24
22
  declare const MenuItem: React.ForwardRefExoticComponent<MenuItemProps & React.RefAttributes<HTMLButtonElement>>;
25
23
  export default MenuItem;
@@ -5,11 +5,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
5
5
 
6
6
  import * as React from 'react';
7
7
  import styled, { css } from 'styled-components';
8
- import { COLORS, ComponentTextStyle, focusStyles } from '../styles';
8
+ import { COLORS, ComponentTextStyle } from '../styles';
9
9
  import { LockedOn } from '../icons/systemicons/SystemIcons';
10
10
  import { Size } from '../types';
11
11
  import { ComponentLStyling, ComponentMStyling, ComponentSStyling } from '../styles/typography';
12
- import { defaultOnMouseDownHandler } from '../common';
12
+ import { CommonInteractionStyling, defaultOnMouseDownHandler } from '../common';
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
15
  export var DropdownButton = styled.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (props) {
@@ -18,17 +18,9 @@ export var DropdownButton = styled.button(_templateObject || (_templateObject =
18
18
  export var ItemLabel = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral([""])));
19
19
  export var ItemIcon = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral([""])));
20
20
  export var ItemIconRight = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n"])));
21
- export var ItemContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: ", ";\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ", " {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ", " {\n margin-right: ", ";\n svg {\n display: block;\n margin: auto;\n height:", ";\n width:", ";\n }\n }\n\n ", " {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n"])), function (props) {
22
- return props.size === Size.Small ? 'auto 0 auto 10px' : props.size === Size.Large ? 'auto 0 auto 26px' : 'auto 0 auto 18px';
23
- }, ItemLabel, ItemIcon, function (props) {
24
- return props.size === Size.Small ? '6px' : '8px';
25
- }, function (props) {
26
- return props.size === Size.Small ? '20px' : '';
27
- }, function (props) {
28
- return props.size === Size.Small ? '20px' : '';
29
- }, ItemIconRight);
21
+ export var ItemContent = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: auto 0 auto 16px;\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ", " {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ", " {\n margin-right: 6px;\n svg {\n display: block;\n margin: auto;\n }\n }\n\n ", " {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n"])), ItemLabel, ItemIcon, ItemIconRight);
30
22
  export var DropdownButtonCSS = function DropdownButtonCSS(size) {
31
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n background-color: ", ";\n border: none;\n cursor: pointer;\n background: none;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ", ", ", " {\n color: ", ";\n }\n\n &:hover:not(.active), &.hover-state {\n background: ", ";\n ", ", ", " {\n color: ", ";\n }\n }\n\n &:focus, &.focus-state, &.focus-visible {\n ", "\n }\n\n &:active:not(.active), &.active-state {\n background: ", ";\n ", ", ", " {\n color: ", ";\n }\n }\n\n &.active {\n background: ", ";\n\n ", ", ", " {\n color: ", ";\n }\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 4px;\n bottom: 4px;\n left: 4px;\n background-color: ", ";\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ", ";\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ", ";\n\n ", ", ", " {\n color: ", ";\n } \n\n &::after {\n background-color: ", ";\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ", ";\n\n ", ", ", " {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ", " !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n "])), size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px', COLORS.white, ItemLabel, ItemIcon, COLORS.neutral_600, COLORS.primary_20, ItemLabel, ItemIcon, COLORS.primary_700, focusStyles, COLORS.primary_100, ItemLabel, ItemIcon, COLORS.primary_800, COLORS.neutral_20, ItemLabel, ItemIcon, COLORS.neutral_800, COLORS.primary_500, COLORS.neutral_500, COLORS.primary_20, ItemIcon, ItemLabel, COLORS.primary_700, COLORS.primary_700, COLORS.primary_100, ItemIcon, ItemLabel, COLORS.primary_800, COLORS.primary_800, COLORS.neutral_200, COLORS.primary_20, COLORS.primary_600);
23
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n background-color: ", ";\n border: none;\n cursor: pointer;\n background: transparent;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ", ";\n\n &.active {\n background: ", ";\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 6px;\n bottom: 6px;\n left: 4px;\n background-color: ", ";\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ", ";\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n\n &::after {\n background-color: ", ";\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ", " !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ", ";\n color: ", ";\n }\n "])), size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600), size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px', COLORS.white, CommonInteractionStyling, COLORS.neutral_20, COLORS.primary_500, COLORS.neutral_500, COLORS.primary_20, COLORS.primary_600, COLORS.primary_500, COLORS.primary_100, COLORS.primary_800, COLORS.primary_500, COLORS.neutral_200, COLORS.primary_20, COLORS.primary_600);
32
24
  };
33
25
  var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
34
26
  var _item$displayLabel;
@@ -55,7 +47,6 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
55
47
  children: [item.showDividerAbove && /*#__PURE__*/_jsx("div", {
56
48
  className: "divider"
57
49
  }), /*#__PURE__*/_jsxs(ItemContent, {
58
- size: size,
59
50
  children: [item.icon && /*#__PURE__*/_jsx(ItemIcon, {
60
51
  children: item.icon
61
52
  }), /*#__PURE__*/_jsxs(ItemLabel, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/MenuItem/MenuItem.tsx"],"names":["React","styled","css","COLORS","ComponentTextStyle","focusStyles","LockedOn","Size","ComponentLStyling","ComponentMStyling","ComponentSStyling","defaultOnMouseDownHandler","DropdownButton","button","props","DropdownButtonCSS","size","ItemLabel","div","ItemIcon","ItemIconRight","ItemContent","Small","Large","Regular","neutral_600","Medium","white","primary_20","primary_700","primary_100","primary_800","neutral_20","neutral_800","primary_500","neutral_500","neutral_200","primary_600","MenuItem","forwardRef","ref","active","item","onClickHandler","className","tabIndex","iconRight","id","disabled","locked","showDividerAbove","icon","displayLabel","value","noteLabel","fontSize","lineHeight","neutral_400","cloneElement"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAAqBC,MAArB,EAA6BC,kBAA7B,EAAiDC,WAAjD,QAAmE,WAAnE;AACA,SAAsBC,QAAtB,QAAqC,kCAArC;AACA,SAAiBC,IAAjB,QAA4B,UAA5B;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,EAA8CC,iBAA9C,QAAsE,sBAAtE;AAEA,SAAkCC,yBAAlC,QAAkE,WAAlE;;;AAaA,OAAO,IAAMC,cAAc,GAAGX,MAAM,CAACY,MAAV,gFACvB,UAACC,KAAD;AAAA,SAAWC,iBAAiB,CAACD,KAAK,CAACE,IAAP,CAA5B;AAAA,CADuB,CAApB;AAIP,OAAO,IAAMC,SAAS,GAAGhB,MAAM,CAACiB,GAAV,uEAAf;AAEP,OAAO,IAAMC,QAAQ,GAAGlB,MAAM,CAACiB,GAAV,uEAAd;AAEP,OAAO,IAAME,aAAa,GAAGnB,MAAM,CAACiB,GAAV,mHAAnB;AAKP,OAAO,IAAMG,WAAW,GAAGpB,MAAM,CAACiB,GAAV,0jBACV,UAAAJ,KAAK;AAAA,SAAEA,KAAK,CAACE,IAAN,KAAaT,IAAI,CAACe,KAAlB,GAAwB,kBAAx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CACG9C,KAAK,CAAC0D,YAAN,CAAmBZ,SAAnB,EAA8B;AAACF,YAAAA,SAAS,EAAE,aAAZ;AAA2B5B,YAAAA,IAAI,EAAE;AAAjC,WAA9B;AADH,UAbJ;AAAA,QAFF;AAAA,MAXJ;AAAA,IADF;AAoCD,CA7CgB,CAAjB;;AArKG2B,EAAAA,c;AACAF,EAAAA,M;AACAM,EAAAA,E;AAEAH,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,S;;AA8MH,eAAeR,QAAf","sourcesContent":["import * as React from 'react';\nimport {Link} from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../styles';\nimport {ChevronRight, LockedOn} from '../icons/systemicons/SystemIcons';\nimport {Product, Size} from '../types';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling} from '../styles/typography';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\nimport {CommonInteractionStyling, defaultOnMouseDownHandler} from '../common';\n\nexport interface MenuItemProps {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n className?: string;\n tabIndex?: number;\n iconRight?: React.ReactElement;\n}\n\nexport const DropdownButton = styled.button<{ size?: Size }>`\n ${(props) => DropdownButtonCSS(props.size)}\n`;\n\nexport const ItemLabel = styled.div``;\n\nexport const ItemIcon = styled.div``;\n\nexport const ItemIconRight = styled.div`\n align-items: center;\n display: flex;\n`;\n\nexport const ItemContent = styled.div<{size:Size}>`\n margin: ${props=>props.size===Size.Small?'auto 0 auto 10px':(props.size===Size.Large?'auto 0 auto 26px':'auto 0 auto 18px')};\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ${ItemLabel} {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ${ItemIcon} {\n margin-right: ${props=>props.size===Size.Small?'6px':'8px'};\n svg {\n display: block;\n margin: auto;\n height:${props=>props.size===Size.Small?'20px':''};\n width:${props=>props.size===Size.Small?'20px':''};\n }\n }\n\n ${ItemIconRight} {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n`;\n\n\nexport const DropdownButtonCSS = (size?: Size) => {\n return css`\n ${size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ${size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px'};\n background-color: ${COLORS.white};\n border: none;\n cursor: pointer;\n background: none;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.neutral_600};\n }\n\n &:hover:not(.active), &.hover-state {\n background: ${COLORS.primary_20};\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.primary_700};\n }\n }\n\n &:focus, &.focus-state, &.focus-visible {\n ${focusStyles}\n }\n\n &:active:not(.active), &.active-state {\n background: ${COLORS.primary_100};\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.primary_800};\n }\n }\n\n &.active {\n background: ${COLORS.neutral_20};\n\n ${ItemLabel}, ${ItemIcon} {\n color: ${COLORS.neutral_800};\n }\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 4px;\n bottom: 4px;\n left: 4px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ${COLORS.neutral_500};\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ${COLORS.primary_20};\n\n ${ItemIcon}, ${ItemLabel} {\n color: ${COLORS.primary_700};\n } \n\n &::after {\n background-color: ${COLORS.primary_700};\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ${COLORS.primary_100};\n\n ${ItemIcon}, ${ItemLabel} {\n color: ${COLORS.primary_800};\n }\n\n &::after {\n background-color: ${COLORS.primary_800};\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ${COLORS.neutral_200} !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n `;\n};\n\nconst MenuItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id }: MenuItemProps, ref) => {\n return (\n <DropdownButton\n type=\"button\"\n size={size}\n disabled={item.disabled || item.locked}\n tabIndex={tabIndex}\n onMouseDown={defaultOnMouseDownHandler}\n ref={ref}\n onClick={onClickHandler}\n className={ className + ' ' + (item.locked ? 'locked' : '') + ' ' + (item.showDividerAbove ? 'show-divider-above' : '') + ' ' + (active ? 'active' : '')}\n id={id}>\n {item.showDividerAbove && <div className=\"divider\" />}\n <ItemContent size={size}>\n {item.icon && <ItemIcon>{item.icon}</ItemIcon>}\n <ItemLabel>\n <div>\n <div>{item.displayLabel ?? item.value}</div>\n {item.noteLabel && <div style={{ fontSize: '12px', lineHeight: '16px' }}>{item.noteLabel}</div>}\n </div>\n {\n item.locked &&\n <ItemIconRight>\n <LockedOn color={COLORS.neutral_400} className=\"extraMargin\" size=\"24px\"/>\n </ItemIconRight>\n }\n {\n !item.locked && !!iconRight &&\n <ItemIconRight>\n {React.cloneElement(iconRight, {className: 'extraMargin', size: '24px',})}\n </ItemIconRight>\n }\n\n </ItemLabel>\n </ItemContent>\n </DropdownButton>\n );\n});\n\nexport default MenuItem;\n"],"file":"MenuItem.js"}
1
+ {"version":3,"sources":["../../src/MenuItem/MenuItem.tsx"],"names":["React","styled","css","COLORS","ComponentTextStyle","LockedOn","Size","ComponentLStyling","ComponentMStyling","ComponentSStyling","CommonInteractionStyling","defaultOnMouseDownHandler","DropdownButton","button","props","DropdownButtonCSS","size","ItemLabel","div","ItemIcon","ItemIconRight","ItemContent","Small","Regular","neutral_600","Medium","Large","white","neutral_20","primary_500","neutral_500","primary_20","primary_600","primary_100","primary_800","neutral_200","MenuItem","forwardRef","ref","active","item","onClickHandler","className","tabIndex","iconRight","id","disabled","locked","showDividerAbove","icon","displayLabel","value","noteLabel","fontSize","lineHeight","neutral_400","cloneElement"],"mappings":";;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAAqBC,MAArB,EAA6BC,kBAA7B,QAAsD,WAAtD;AACA,SAAsBC,QAAtB,QAAqC,kCAArC;AACA,SAAiBC,IAAjB,QAA4B,UAA5B;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,EAA8CC,iBAA9C,QAAsE,sBAAtE;AAEA,SAAQC,wBAAR,EAAkCC,yBAAlC,QAAkE,WAAlE;;;AAaA,OAAO,IAAMC,cAAc,GAAGX,MAAM,CAACY,MAAV,gFACvB,UAACC,KAAD;AAAA,SAAWC,iBAAiB,CAACD,KAAK,CAACE,IAAP,CAA5B;AAAA,CADuB,CAApB;AAIP,OAAO,IAAMC,SAAS,GAAGhB,MAAM,CAACiB,GAAV,uEAAf;AACP,OAAO,IAAMC,QAAQ,GAAGlB,MAAM,CAACiB,GAAV,uEAAd;AACP,OAAO,IAAME,aAAa,GAAGnB,MAAM,CAACiB,GAAV,mHAAnB;AAKP,OAAO,IAAMG,WAAW,GAAGpB,MAAM,CAACiB,GAAV,0hBAMlBD,SANkB,EAalBE,QAbkB,EAqBlBC,aArBkB,CAAjB;AA+BP,OAAO,IAAML,iBAAiB,GAAG,SAApBA,iBAAoB,CAACC,IAAD,EAAiB;AAChD,SAAOd,GAAP,8+CACIc,IAAI,IAAIV,IAAI,CAACgB,KAAb,IAAsBb,iBAAiB,CAACL,kBAAkB,CAACmB,OAApB,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,aAA/C;AAA6D,YAAA,IAAI,EAAC;AAAlE;AADF,UAPJ,EAYI,CAACf,IAAI,CAACO,MAAN,IAAgB,CAAC,CAACH,SAAlB,iBACA,KAAC,aAAD;AAAA,iCACG5C,KAAK,CAACwD,YAAN,CAAmBZ,SAAnB,EAA8B;AAACF,YAAAA,SAAS,EAAE,aAAZ;AAA2B1B,YAAAA,IAAI,EAAE;AAAjC,WAA9B;AADH,UAbJ;AAAA,QAFF;AAAA,MAXJ;AAAA,IADF;AAoCD,CA7CgB,CAAjB;;AAzIGyB,EAAAA,c;AACAF,EAAAA,M;AACAM,EAAAA,E;AAEAH,EAAAA,S;AACAC,EAAAA,Q;AACAC,EAAAA,S;;AAkLH,eAAeR,QAAf","sourcesContent":["import * as React from 'react';\nimport {Link} from 'react-router-dom';\nimport styled, { css } from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle} from '../styles';\nimport {ChevronRight, LockedOn} from '../icons/systemicons/SystemIcons';\nimport {Product, Size} from '../types';\nimport {ComponentLStyling, ComponentMStyling, ComponentSStyling} from '../styles/typography';\nimport { DropdownItem } from '../Dropdown/DropdownContent';\nimport {CommonInteractionStyling, defaultOnMouseDownHandler} from '../common';\n\nexport interface MenuItemProps {\n item: DropdownItem;\n onClickHandler: (e: React.MouseEvent) => void;\n active: boolean;\n id: string;\n size?: Size;\n className?: string;\n tabIndex?: number;\n iconRight?: React.ReactElement;\n}\n\nexport const DropdownButton = styled.button<{ size?: Size }>`\n ${(props) => DropdownButtonCSS(props.size)}\n`;\n\nexport const ItemLabel = styled.div``;\nexport const ItemIcon = styled.div``;\nexport const ItemIconRight = styled.div`\n align-items: center;\n display: flex;\n`;\n\nexport const ItemContent = styled.div`\n margin: auto 0 auto 16px;\n display: flex;\n align-items: center;\n flex-grow: 2;\n\n ${ItemLabel} {\n flex: 1 0 calc(100% - 40px);\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n\n ${ItemIcon} {\n margin-right: 6px;\n svg {\n display: block;\n margin: auto;\n }\n }\n\n ${ItemIconRight} {\n flex-grow: 2;\n\n .extraMargin {\n margin-left: calc(100% - 24px);\n }\n }\n`;\n\n\nexport const DropdownButtonCSS = (size?: Size) => {\n return css`\n ${size == Size.Small && ComponentSStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Medium && ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n ${size == Size.Large && ComponentLStyling(ComponentTextStyle.Regular, COLORS.neutral_600)}\n\n position: relative;\n text-decoration: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n min-height: ${size == Size.Large ? '64px' : size == Size.Medium ? '56px' : '48px'};\n background-color: ${COLORS.white};\n border: none;\n cursor: pointer;\n background: transparent;\n width: 100%;\n text-align: left;\n\n span {\n margin: auto 0 auto 16px;\n line-height: 48px;\n }\n\n ${CommonInteractionStyling};\n\n &.active {\n background: ${COLORS.neutral_20};\n\n &::after {\n position: absolute;\n content: ' ';\n width: 4px;\n top: 6px;\n bottom: 6px;\n left: 4px;\n background-color: ${COLORS.primary_500};\n\n border-radius: 4px;\n }\n }\n\n\n &.locked {\n background-color: transparent;\n cursor: not-allowed;\n color: ${COLORS.neutral_500};\n }\n\n &.active:hover, &.active-hover-state {\n background-color: ${COLORS.primary_20};\n\n svg {\n color: ${COLORS.primary_600};\n }\n\n &::after {\n background-color: ${COLORS.primary_500};\n }\n }\n\n &.active:active, &.active-active-state {\n background-color: ${COLORS.primary_100};\n\n svg {\n color: ${COLORS.primary_800};\n }\n\n &::after {\n background-color: ${COLORS.primary_500};\n }\n }\n\n &:disabled, &.disabled-state {\n background-color: transparent !important;\n cursor: not-allowed;\n color: ${COLORS.neutral_200} !important;\n }\n\n &.dropdown-hover:not(:disabled) {\n background-color: ${COLORS.primary_20};\n color: ${COLORS.primary_600};\n }\n `;\n};\n\nconst MenuItem = React.forwardRef<HTMLButtonElement, MenuItemProps>(({\n active,\n item,\n onClickHandler,\n size = Size.Medium,\n className,\n tabIndex,\n iconRight,\n id }: MenuItemProps, ref) => {\n return (\n <DropdownButton\n type=\"button\"\n size={size}\n disabled={item.disabled || item.locked}\n tabIndex={tabIndex}\n onMouseDown={defaultOnMouseDownHandler}\n ref={ref}\n onClick={onClickHandler}\n className={ className + ' ' + (item.locked ? 'locked' : '') + ' ' + (item.showDividerAbove ? 'show-divider-above' : '') + ' ' + (active ? 'active' : '')}\n id={id}>\n {item.showDividerAbove && <div className=\"divider\" />}\n <ItemContent>\n {item.icon && <ItemIcon>{item.icon}</ItemIcon>}\n <ItemLabel>\n <div>\n <div>{item.displayLabel ?? item.value}</div>\n {item.noteLabel && <div style={{ fontSize: '12px', lineHeight: '16px' }}>{item.noteLabel}</div>}\n </div>\n {\n item.locked &&\n <ItemIconRight>\n <LockedOn color={COLORS.neutral_400} className=\"extraMargin\" size=\"24px\"/>\n </ItemIconRight>\n }\n {\n !item.locked && !!iconRight &&\n <ItemIconRight>\n {React.cloneElement(iconRight, {className: 'extraMargin', size: '24px',})}\n </ItemIconRight>\n }\n\n </ItemLabel>\n </ItemContent>\n </DropdownButton>\n );\n});\n\nexport default MenuItem;\n"],"file":"MenuItem.js"}
@@ -85,7 +85,6 @@ var COLORS = {
85
85
  critical_800: '#6B0613',
86
86
  neutral_20: '#FAFAFA',
87
87
  // 020 Core
88
- neutral_50: '#F2F2F2',
89
88
  neutral_100: '#E5E5E5',
90
89
  neutral_200: '#CCCCCC',
91
90
  neutral_300: '#B3B3B3',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/styles/colors.ts"],"names":["COLORS","black","white","grey","primary","accent1","accent2","correct","warning","critical","primary_20","primary_100","primary_200","primary_300","primary_400","primary_500","primary_600","primary_700","primary_800","accent1_20","accent1_100","accent1_200","accent1_300","accent1_400","accent1_500","accent1_600","accent1_700","accent1_800","accent2_20","accent2_100","accent2_200","accent2_300","accent2_400","accent2_500","accent2_600","accent2_700","accent2_800","correct_20","correct_100","correct_200","correct_300","correct_400","correct_500","correct_600","correct_700","correct_800","warning_20","warning_100","warning_200","warning_300","warning_400","warning_500","warning_600","warning_700","warning_800","critical_20","critical_100","critical_200","critical_300","critical_400","critical_500","critical_600","critical_700","critical_800","neutral_20","neutral_50","neutral_100","neutral_200","neutral_300","neutral_400","neutral_500","neutral_600","neutral_700","neutral_800","focus","focus_25","white_gradient","toast_info","toast_success","toast_warning","toast_error"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG;AACbC,EAAAA,KAAK,EAAE,SADM;AACK;AAClBC,EAAAA,KAAK,EAAE,SAFM;AAEK;AAClBC,EAAAA,IAAI,EAAG,SAHM;AAGK;AAClBC,EAAAA,OAAO,EAAE,SAJI;AAIO;AACpBC,EAAAA,OAAO,EAAE,SALI;AAKO;AACpBC,EAAAA,OAAO,EAAE,SANI;AAMO;AACpBC,EAAAA,OAAO,EAAE,SAPI;AAOO;AACpBC,EAAAA,OAAO,EAAE,SARI;AAQO;AACpBC,EAAAA,QAAQ,EAAE,SATG;AASQ;AAErBC,EAAAA,UAAU,EAAE,SAXC;AAYbC,EAAAA,WAAW,EAAE,SAZA;AAabC,EAAAA,WAAW,EAAE,SAbA;AAcbC,EAAAA,WAAW,EAAE,SAdA;AAebC,EAAAA,WAAW,EAAE,SAfA;AAgBbC,EAAAA,WAAW,EAAE,SAhBA;AAgBW;AACxBC,EAAAA,WAAW,EAAE,SAjBA;AAkBbC,EAAAA,WAAW,EAAE,SAlBA;AAmBbC,EAAAA,WAAW,EAAE,SAnBA;AAqBbC,EAAAA,UAAU,EAAG,SArBA;AAsBbC,EAAAA,WAAW,EAAE,SAtBA;AAuBbC,EAAAA,WAAW,EAAE,SAvBA;AAwBbC,EAAAA,WAAW,EAAE,SAxBA;AAyBbC,EAAAA,WAAW,EAAE,SAzBA;AA0BbC,EAAAA,WAAW,EAAE,SA1BA;AA0BW;AACxBC,EAAAA,WAAW,EAAE,SA3BA;AA4BbC,EAAAA,WAAW,EAAE,SA5BA;AA6BbC,EAAAA,WAAW,EAAE,SA7BA;AA+BbC,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,EAAAA,YAAY,EAAE,SArED;AAuEbC,EAAAA,UAAU,EAAG,SAvEA;AAuEW;AACxBC,EAAAA,UAAU,EAAG,SAxEA;AAyEbC,EAAAA,WAAW,EAAE,SAzEA;AA0EbC,EAAAA,WAAW,EAAE,SA1EA;AA2EbC,EAAAA,WAAW,EAAE,SA3EA;AA4EbC,EAAAA,WAAW,EAAE,SA5EA;AA6EbC,EAAAA,WAAW,EAAE,SA7EA;AA8EbC,EAAAA,WAAW,EAAE,SA9EA;AA+EbC,EAAAA,WAAW,EAAE,SA/EA;AAgFbC,EAAAA,WAAW,EAAE,SAhFA;AAkFbC,EAAAA,KAAK,EAAE,uBAlFM;AAkFmB;AAChCC,EAAAA,QAAQ,EAAE,0BAnFG;AAmFyB;AAEtCC,EAAAA,cAAc,EAAE,+GArFH;AAuFbC,EAAAA,UAAU,EAAE,SAvFC;AAwFbC,EAAAA,aAAa,EAAE,SAxFF;AAyFbC,EAAAA,aAAa,EAAE,SAzFF;AA0FbC,EAAAA,WAAW,EAAE;AA1FA,CAAf;eA6FehF,M","sourcesContent":["const COLORS = {\n black: '#1F1F1F', // Neutrals / Black\n white: '#FFFFFF', // Neutrals / White\n grey: '#949494', // Neutrals / grey\n primary: '#2E7FA1', // Brand / Primary - Core 500\n accent1: '#25837E', // Brand / Accent 1 - Core 500\n accent2: '#EAC785', // Brand / Accent 2 - Core 200\n correct: '#37A851', // Semantic / Correct - Core 400\n warning: '#E97116', // Semantic / Warning - Core 400\n critical: '#DC3449', // Semantic / Critical - Core 500\n\n primary_20: '#F1FBFE',\n primary_100: '#D4E9F2',\n primary_200: '#A9D3E5',\n primary_300: '#7FBCD7',\n primary_400: '#519DBD',\n primary_500: '#2E7FA1', // 500 Core\n primary_600: '#276D8B',\n primary_700: '#215369',\n primary_800: '#163746',\n\n accent1_20: '#EDFCFB',\n accent1_100: '#C8EEEC',\n accent1_200: '#98D8D5',\n accent1_300: '#6BC2BE',\n accent1_400: '#3EA39E',\n accent1_500: '#25837E', // 500 Core\n accent1_600: '#23716D',\n accent1_700: '#145653',\n accent1_800: '#0F3937',\n\n accent2_20: '#FFFAEE',\n accent2_100: '#F8E2BF',\n accent2_200: '#EAC785', // 200 Core\n accent2_300: '#D6AD61',\n accent2_400: '#B58E45',\n accent2_500: '#92702F',\n accent2_600: '#806128',\n accent2_700: '#604920',\n accent2_800: '#42300F',\n\n correct_20: '#ECFEF1',\n correct_100: '#CCEED2',\n correct_200: '#A0D9AD',\n correct_300: '#77C589',\n correct_400: '#37A851', // 400 Core\n correct_500: '#14892F',\n correct_600: '#13772A',\n correct_700: '#025A15',\n correct_800: '#003D0E',\n\n warning_20: '#FEF7F1',\n warning_100: '#FCDDC5',\n warning_200: '#F8C096',\n warning_300: '#F4A162',\n warning_400: '#E97116', // 400 Core\n warning_500: '#C45402',\n warning_600: '#AD4B00',\n warning_700: '#803700',\n warning_800: '#572600',\n\n critical_20: '#FEF5F7',\n critical_100: '#FDDEE2',\n critical_200: '#FDBAC2',\n critical_300: '#FD96A4',\n critical_400: '#FC5A6F',\n critical_500: '#DC3449', // 500 Core\n critical_600: '#C32238',\n critical_700: '#9C0D1D',\n critical_800: '#6B0613',\n\n neutral_20: '#FAFAFA', // 020 Core\n neutral_50: '#F2F2F2',\n neutral_100: '#E5E5E5',\n neutral_200: '#CCCCCC',\n neutral_300: '#B3B3B3',\n neutral_400: '#949494',\n neutral_500: '#767676',\n neutral_600: '#666666',\n neutral_700: '#4D4D4D',\n neutral_800: '#333333',\n\n focus: 'rgba(46, 127, 161, 1)', // Semantic / Focus 100%\n focus_25: 'rgba(46, 127, 161, 0.25)', // Semantic / Focus 25%\n\n white_gradient: 'linear-gradient(255deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%)',\n\n toast_info: '#2E7FA1',\n toast_success: '#37A851',\n toast_warning: '#E97116',\n toast_error: '#DC3449',\n};\n\nexport default COLORS;\n"],"file":"colors.cjs"}
1
+ {"version":3,"sources":["../../src/styles/colors.ts"],"names":["COLORS","black","white","grey","primary","accent1","accent2","correct","warning","critical","primary_20","primary_100","primary_200","primary_300","primary_400","primary_500","primary_600","primary_700","primary_800","accent1_20","accent1_100","accent1_200","accent1_300","accent1_400","accent1_500","accent1_600","accent1_700","accent1_800","accent2_20","accent2_100","accent2_200","accent2_300","accent2_400","accent2_500","accent2_600","accent2_700","accent2_800","correct_20","correct_100","correct_200","correct_300","correct_400","correct_500","correct_600","correct_700","correct_800","warning_20","warning_100","warning_200","warning_300","warning_400","warning_500","warning_600","warning_700","warning_800","critical_20","critical_100","critical_200","critical_300","critical_400","critical_500","critical_600","critical_700","critical_800","neutral_20","neutral_100","neutral_200","neutral_300","neutral_400","neutral_500","neutral_600","neutral_700","neutral_800","focus","focus_25","white_gradient","toast_info","toast_success","toast_warning","toast_error"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG;AACbC,EAAAA,KAAK,EAAE,SADM;AACK;AAClBC,EAAAA,KAAK,EAAE,SAFM;AAEK;AAClBC,EAAAA,IAAI,EAAG,SAHM;AAGK;AAClBC,EAAAA,OAAO,EAAE,SAJI;AAIO;AACpBC,EAAAA,OAAO,EAAE,SALI;AAKO;AACpBC,EAAAA,OAAO,EAAE,SANI;AAMO;AACpBC,EAAAA,OAAO,EAAE,SAPI;AAOO;AACpBC,EAAAA,OAAO,EAAE,SARI;AAQO;AACpBC,EAAAA,QAAQ,EAAE,SATG;AASQ;AAErBC,EAAAA,UAAU,EAAE,SAXC;AAYbC,EAAAA,WAAW,EAAE,SAZA;AAabC,EAAAA,WAAW,EAAE,SAbA;AAcbC,EAAAA,WAAW,EAAE,SAdA;AAebC,EAAAA,WAAW,EAAE,SAfA;AAgBbC,EAAAA,WAAW,EAAE,SAhBA;AAgBW;AACxBC,EAAAA,WAAW,EAAE,SAjBA;AAkBbC,EAAAA,WAAW,EAAE,SAlBA;AAmBbC,EAAAA,WAAW,EAAE,SAnBA;AAqBbC,EAAAA,UAAU,EAAG,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,EAAE,SA3DA;AA6DbC,EAAAA,WAAW,EAAG,SA7DD;AA8DbC,EAAAA,YAAY,EAAE,SA9DD;AA+DbC,EAAAA,YAAY,EAAE,SA/DD;AAgEbC,EAAAA,YAAY,EAAE,SAhED;AAiEbC,EAAAA,YAAY,EAAE,SAjED;AAkEbC,EAAAA,YAAY,EAAE,SAlED;AAkEY;AACzBC,EAAAA,YAAY,EAAE,SAnED;AAoEbC,EAAAA,YAAY,EAAE,SApED;AAqEbC,EAAAA,YAAY,EAAE,SArED;AAuEbC,EAAAA,UAAU,EAAG,SAvEA;AAuEW;AACxBC,EAAAA,WAAW,EAAE,SAxEA;AAyEbC,EAAAA,WAAW,EAAE,SAzEA;AA0EbC,EAAAA,WAAW,EAAE,SA1EA;AA2EbC,EAAAA,WAAW,EAAE,SA3EA;AA4EbC,EAAAA,WAAW,EAAE,SA5EA;AA6EbC,EAAAA,WAAW,EAAE,SA7EA;AA8EbC,EAAAA,WAAW,EAAE,SA9EA;AA+EbC,EAAAA,WAAW,EAAE,SA/EA;AAiFbC,EAAAA,KAAK,EAAE,uBAjFM;AAiFmB;AAChCC,EAAAA,QAAQ,EAAE,0BAlFG;AAkFyB;AAEtCC,EAAAA,cAAc,EAAE,+GApFH;AAsFbC,EAAAA,UAAU,EAAE,SAtFC;AAuFbC,EAAAA,aAAa,EAAE,SAvFF;AAwFbC,EAAAA,aAAa,EAAE,SAxFF;AAyFbC,EAAAA,WAAW,EAAE;AAzFA,CAAf;eA4Fe/E,M","sourcesContent":["const COLORS = {\n black: '#1F1F1F', // Neutrals / Black\n white: '#FFFFFF', // Neutrals / White\n grey: '#949494', // Neutrals / grey\n primary: '#2E7FA1', // Brand / Primary - Core 500\n accent1: '#25837E', // Brand / Accent 1 - Core 500\n accent2: '#EAC785', // Brand / Accent 2 - Core 200\n correct: '#37A851', // Semantic / Correct - Core 400\n warning: '#E97116', // Semantic / Warning - Core 400\n critical: '#DC3449', // Semantic / Critical - Core 500\n\n primary_20: '#F1FBFE',\n primary_100: '#D4E9F2',\n primary_200: '#A9D3E5',\n primary_300: '#7FBCD7',\n primary_400: '#519DBD',\n primary_500: '#2E7FA1', // 500 Core\n primary_600: '#276D8B',\n primary_700: '#215369',\n primary_800: '#163746',\n\n accent1_20: '#EDFCFB',\n accent1_100: '#C8EEEC',\n accent1_200: '#98D8D5',\n accent1_300: '#6BC2BE',\n accent1_400: '#3EA39E',\n accent1_500: '#25837E', // 500 Core\n accent1_600: '#23716D',\n accent1_700: '#145653',\n accent1_800: '#0F3937',\n\n accent2_20: '#FFFAEE',\n accent2_100: '#F8E2BF',\n accent2_200: '#EAC785', // 200 Core\n accent2_300: '#D6AD61',\n accent2_400: '#B58E45',\n accent2_500: '#92702F',\n accent2_600: '#806128',\n accent2_700: '#604920',\n accent2_800: '#42300F',\n\n correct_20: '#ECFEF1',\n correct_100: '#CCEED2',\n correct_200: '#A0D9AD',\n correct_300: '#77C589',\n correct_400: '#37A851', // 400 Core\n correct_500: '#14892F',\n correct_600: '#13772A',\n correct_700: '#025A15',\n correct_800: '#003D0E',\n\n warning_20: '#FEF7F1',\n warning_100: '#FCDDC5',\n warning_200: '#F8C096',\n warning_300: '#F4A162',\n warning_400: '#E97116', // 400 Core\n warning_500: '#C45402',\n warning_600: '#AD4B00',\n warning_700: '#803700',\n warning_800: '#572600',\n\n critical_20: '#FEF5F7',\n critical_100: '#FDDEE2',\n critical_200: '#FDBAC2',\n critical_300: '#FD96A4',\n critical_400: '#FC5A6F',\n critical_500: '#DC3449', // 500 Core\n critical_600: '#C32238',\n critical_700: '#9C0D1D',\n critical_800: '#6B0613',\n\n neutral_20: '#FAFAFA', // 020 Core\n neutral_100: '#E5E5E5',\n neutral_200: '#CCCCCC',\n neutral_300: '#B3B3B3',\n neutral_400: '#949494',\n neutral_500: '#767676',\n neutral_600: '#666666',\n neutral_700: '#4D4D4D',\n neutral_800: '#333333',\n\n focus: 'rgba(46, 127, 161, 1)', // Semantic / Focus 100%\n focus_25: 'rgba(46, 127, 161, 0.25)', // Semantic / Focus 25%\n\n white_gradient: 'linear-gradient(255deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%)',\n\n toast_info: '#2E7FA1',\n toast_success: '#37A851',\n toast_warning: '#E97116',\n toast_error: '#DC3449',\n};\n\nexport default COLORS;\n"],"file":"colors.cjs"}