@laerdal/life-react-components 1.8.0-dev.7 → 1.8.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/Button.cjs +4 -4
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.d.ts +1 -1
- package/dist/Button/Button.js +4 -4
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/DualFunctionButton.cjs +1 -1
- package/dist/Button/DualFunctionButton.cjs.map +1 -1
- package/dist/Button/DualFunctionButton.js +1 -1
- package/dist/Button/DualFunctionButton.js.map +1 -1
- package/dist/Chips/ChipStyles.cjs +1 -1
- package/dist/Chips/ChipStyles.cjs.map +1 -1
- package/dist/Chips/ChipStyles.js +1 -1
- package/dist/Chips/ChipStyles.js.map +1 -1
- package/dist/Chips/ChipTypes.d.ts +2 -2
- package/dist/Chips/ChoiceChips.cjs +1 -1
- package/dist/Chips/ChoiceChips.cjs.map +1 -1
- package/dist/Chips/ChoiceChips.js +1 -1
- package/dist/Chips/ChoiceChips.js.map +1 -1
- package/dist/Chips/FilterChip.cjs +1 -1
- package/dist/Chips/FilterChip.cjs.map +1 -1
- package/dist/Chips/FilterChip.js +1 -1
- package/dist/Chips/FilterChip.js.map +1 -1
- package/dist/Chips/InputChip.cjs.map +1 -1
- package/dist/Chips/InputChip.js +1 -1
- package/dist/Chips/InputChip.js.map +1 -1
- package/dist/ChipsInput/ChipDropdownInput.cjs +3 -1
- package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -1
- package/dist/ChipsInput/ChipDropdownInput.js +4 -2
- package/dist/ChipsInput/ChipDropdownInput.js.map +1 -1
- package/dist/ChipsInput/ChipInput.cjs +2 -0
- package/dist/ChipsInput/ChipInput.cjs.map +1 -1
- package/dist/ChipsInput/ChipInput.js +2 -0
- package/dist/ChipsInput/ChipInput.js.map +1 -1
- package/dist/ChipsInput/ChipInputField.cjs +14 -5
- package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
- package/dist/ChipsInput/ChipInputField.d.ts +1 -0
- package/dist/ChipsInput/ChipInputField.js +16 -7
- package/dist/ChipsInput/ChipInputField.js.map +1 -1
- package/dist/ChipsInput/ChipInputTypes.d.ts +1 -0
- package/dist/Dropdown/BasicDropdown.cjs +9 -9
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.d.ts +2 -2
- package/dist/Dropdown/BasicDropdown.js +10 -10
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +3 -3
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.d.ts +6 -3
- package/dist/Dropdown/CommonStyling.js +3 -3
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +16 -16
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.d.ts +3 -3
- package/dist/Dropdown/DropdownFilter.js +17 -17
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +10 -10
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.d.ts +3 -3
- package/dist/InputFields/Checkbox.js +10 -10
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +14 -12
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.d.ts +3 -3
- package/dist/InputFields/DatepickerField.js +18 -12
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +1 -1
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +1 -1
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +17 -21
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.d.ts +3 -2
- package/dist/InputFields/PasswordField.js +15 -19
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/RadioButton.cjs +7 -5
- package/dist/InputFields/RadioButton.cjs.map +1 -1
- package/dist/InputFields/RadioButton.d.ts +1 -1
- package/dist/InputFields/RadioButton.js +5 -5
- package/dist/InputFields/RadioButton.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +2 -2
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +3 -3
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +27 -12
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.d.ts +6 -4
- package/dist/InputFields/TextField.js +27 -12
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +14 -3
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.d.ts +1 -0
- package/dist/InputFields/Textarea.js +14 -5
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs +3 -1
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.js +2 -1
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +24 -16
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +6 -3
- package/dist/InputFields/styling.js +21 -14
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.cjs.map +1 -1
- package/dist/Table/TableBody.js +1 -1
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/types.cjs +1 -10
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +0 -5
- package/dist/types.js +0 -8
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import * as React from 'react';
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { COLORS } from '../styles';
|
|
15
|
-
import { ErrorMessage } from './styling';
|
|
15
|
+
import { ErrorMessage, WarningMessage } from './styling';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Import custom components.
|
|
@@ -23,14 +23,14 @@ import { TechnicalWarning } from '../icons/systemicons/SystemIcons';
|
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
25
|
import styled from 'styled-components';
|
|
26
|
-
import { ComponentMStyling, ComponentTextStyle } from '../styles'; // Add component-specific styles.
|
|
26
|
+
import { ComponentMStyling, ComponentTextStyle } from '../styles/typography'; // Add component-specific styles.
|
|
27
27
|
|
|
28
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
29
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
30
|
var TextareaWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n ", "\n"])), function (props) {
|
|
31
31
|
return props.margin ? "margin: ".concat(props.margin, ";") : '';
|
|
32
32
|
});
|
|
33
|
-
var TextArea = styled.textarea(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ", "\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &.
|
|
33
|
+
var TextArea = styled.textarea(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 1px solid ", ";\n background: ", ";\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ", "\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ", ";\n margin: 0px;\n }\n\n &.warning,\n &.warning:hover,\n &.warning:focus,\n &.warning:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &.error,\n &.error:hover,\n &.error:focus,\n &.error:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ", ";\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ", ";\n }\n }\n\n &::placeholder {\n ", "\n }\n"])), COLORS.neutral_400, COLORS.white, ComponentMStyling(ComponentTextStyle.Italic, COLORS.black), COLORS.primary_700, COLORS.primary_800, COLORS.warning_500, COLORS.critical_500, COLORS.neutral_100, COLORS.neutral_300, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)); // Add component-specific types
|
|
34
34
|
|
|
35
35
|
var Textarea = function Textarea(_ref) {
|
|
36
36
|
var id = _ref.id,
|
|
@@ -38,6 +38,7 @@ var Textarea = function Textarea(_ref) {
|
|
|
38
38
|
value = _ref.value,
|
|
39
39
|
size = _ref.size,
|
|
40
40
|
disabled = _ref.disabled,
|
|
41
|
+
validationType = _ref.validationType,
|
|
41
42
|
validationMessage = _ref.validationMessage,
|
|
42
43
|
_onChange = _ref.onChange,
|
|
43
44
|
margin = _ref.margin;
|
|
@@ -46,14 +47,21 @@ var Textarea = function Textarea(_ref) {
|
|
|
46
47
|
id: id,
|
|
47
48
|
value: value,
|
|
48
49
|
placeholder: placeholder,
|
|
49
|
-
className: "".concat(size, " ").concat(
|
|
50
|
+
className: "".concat(size, " ").concat(validationType),
|
|
50
51
|
disabled: disabled,
|
|
51
52
|
onChange: function onChange(e) {
|
|
52
53
|
var _e$target;
|
|
53
54
|
|
|
54
55
|
return _onChange && _onChange((e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '');
|
|
55
56
|
}
|
|
56
|
-
}), validationMessage && /*#__PURE__*/_jsxs(
|
|
57
|
+
}), validationMessage && validationType === 'warning' && /*#__PURE__*/_jsxs(WarningMessage, {
|
|
58
|
+
children: [/*#__PURE__*/_jsx(TechnicalWarning, {
|
|
59
|
+
size: "20px",
|
|
60
|
+
color: COLORS.warning_400
|
|
61
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
62
|
+
children: validationMessage
|
|
63
|
+
})]
|
|
64
|
+
}), validationMessage && validationType === 'error' && /*#__PURE__*/_jsxs(ErrorMessage, {
|
|
57
65
|
children: [/*#__PURE__*/_jsx(TechnicalWarning, {
|
|
58
66
|
size: "20px",
|
|
59
67
|
color: COLORS.critical_400
|
|
@@ -70,6 +78,7 @@ Textarea.propTypes = {
|
|
|
70
78
|
value: _pt.string,
|
|
71
79
|
disabled: _pt.bool,
|
|
72
80
|
onChange: _pt.func,
|
|
81
|
+
validationType: _pt.oneOf(['error', 'warning']),
|
|
73
82
|
validationMessage: _pt.string,
|
|
74
83
|
margin: _pt.string
|
|
75
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"names":["React","COLORS","ErrorMessage","TechnicalWarning","styled","ComponentMStyling","ComponentTextStyle","TextareaWrapper","div","props","margin","TextArea","textarea","neutral_400","white","Italic","black","primary_700","primary_800","critical_500","neutral_100","neutral_300","neutral_600","Textarea","id","placeholder","value","size","disabled","validationMessage","onChange","e","target","critical_400"],"mappings":";;;;;AAAA;AACA;AACA;AACA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA;AACA;AACA;;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,YAAT,
|
|
1
|
+
{"version":3,"sources":["../../src/InputFields/Textarea.tsx"],"names":["React","COLORS","ErrorMessage","WarningMessage","TechnicalWarning","styled","ComponentMStyling","ComponentTextStyle","TextareaWrapper","div","props","margin","TextArea","textarea","neutral_400","white","Italic","black","primary_700","primary_800","warning_500","critical_500","neutral_100","neutral_300","neutral_600","Textarea","id","placeholder","value","size","disabled","validationType","validationMessage","onChange","e","target","warning_400","critical_400"],"mappings":";;;;;AAAA;AACA;AACA;A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AAA,MAAtCC,SAAsC,QAAtCA,QAAsC;AAAA,MAA5BtB,MAA4B,QAA5BA,MAA4B;AAC3K,sBACE,MAAC,eAAD;AAAA,4BACE,KAAC,QAAD;AACE,MAAA,EAAE,EAAEe,EADN;AAEE,MAAA,KAAK,EAAEE,KAFT;AAGE,MAAA,WAAW,EAAED,WAHf;AAIE,MAAA,SAAS,YAAKE,IAAL,cAAaE,cAAb,CAJX;AAKE,MAAA,QAAQ,EAAED,QALZ;AAME,MAAA,QAAQ,EAAE,kBAACI,CAAD;AAAA;;AAAA,eAAYD,SAAQ,IAAIA,SAAQ,CAAC,CAAAC,CAAC,SAAD,IAAAA,CAAC,WAAD,yBAAAA,CAAC,CAAEC,MAAH,wDAAWP,KAAX,KAAoB,EAArB,CAAhC;AAAA;AANZ,MADF,EASGI,iBAAiB,IAAID,cAAc,KAAK,SAAxC,iBACC,MAAC,cAAD;AAAA,8BACE,KAAC,gBAAD;AAAkB,QAAA,IAAI,EAAC,MAAvB;AAA8B,QAAA,KAAK,EAAE9B,MAAM,CAACmC;AAA5C,QADF,eAEE;AAAA,kBAAOJ;AAAP,QAFF;AAAA,MAVJ,EAeGA,iBAAiB,IAAID,cAAc,KAAK,OAAxC,iBACC,MAAC,YAAD;AAAA,8BACE,KAAC,gBAAD;AAAkB,QAAA,IAAI,EAAC,MAAvB;AAA8B,QAAA,KAAK,EAAE9B,MAAM,CAACoC;AAA5C,QADF,eAEE;AAAA,kBAAOL;AAAP,QAFF;AAAA,MAhBJ;AAAA,IADF;AAwBD,CAzBD;;;AAXEN,EAAAA,E;AACAC,EAAAA,W;AACAC,EAAAA,K;AACAE,EAAAA,Q;AACAG,EAAAA,Q;AACAF,EAAAA,c,aAAiB,O,EAAU,S;AAC3BC,EAAAA,iB;AAEArB,EAAAA,M;;AA8BF,eAAec,QAAf","sourcesContent":["/**\n * Import React libraries.\n */\nimport * as React from 'react';\n\n/**\n * Import custom styles.\n */\nimport { COLORS } from '../styles';\nimport { ErrorMessage, WarningMessage } from './styling';\nimport { Size } from '../types';\n\n/**\n * Import custom components.\n */\nimport { TechnicalWarning } from '../icons/systemicons/SystemIcons';\n\n/**\n * Import third-party libraries.\n */\nimport styled from 'styled-components';\nimport { ComponentMStyling, ComponentTextStyle } from '../styles/typography';\n\n// Add component-specific styles.\nconst TextareaWrapper = styled.div<{ margin?: string }>`\n width: 100%;\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\nconst TextArea = styled.textarea`\n border: 1px solid ${COLORS.neutral_400};\n background: ${COLORS.white};\n border-radius: 4px;\n outline: none;\n margin: 1px;\n padding: 16px;\n\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.black)}\n\n &.small {\n width: 304px;\n }\n\n &.medium {\n width: 344px;\n }\n\n &:hover {\n border: 2px solid ${COLORS.primary_700};\n margin: 0px;\n }\n\n &:active,\n &:focus {\n border: 2px solid ${COLORS.primary_800};\n margin: 0px;\n }\n\n &.warning,\n &.warning:hover,\n &.warning:focus,\n &.warning:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.warning_500};\n }\n\n &.error,\n &.error:hover,\n &.error:focus,\n &.error:active {\n border: none;\n margin: 1px;\n box-shadow: inset 0px 0px 0px 2px ${COLORS.critical_500};\n }\n\n &:disabled,\n &:disabled:hover,\n &:disabled:focus {\n cursor: not-allowed;\n border: 1px solid ${COLORS.neutral_100};\n margin: 1px;\n box-shadow: none;\n\n &::placeholder {\n color: ${COLORS.neutral_300};\n }\n }\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600)}\n }\n`;\n\n// Add component-specific types\ntype TextareaProps = {\n id: string;\n placeholder: string;\n value?: string;\n disabled?: boolean;\n onChange?: (text: string) => void;\n validationType?: 'error' | 'warning';\n validationMessage?: string;\n size: Size.Small | Size.Medium;\n margin?: string;\n};\n\nconst Textarea: React.FunctionComponent<TextareaProps> = ({ id, placeholder, value, size, disabled, validationType, validationMessage, onChange, margin }: TextareaProps) => {\n return (\n <TextareaWrapper>\n <TextArea\n id={id}\n value={value}\n placeholder={placeholder}\n className={`${size} ${validationType}`}\n disabled={disabled}\n onChange={(e: any) => onChange && onChange(e?.target?.value || '')}\n />\n {validationMessage && validationType === 'warning' && (\n <WarningMessage>\n <TechnicalWarning size=\"20px\" color={COLORS.warning_400} />\n <span>{validationMessage}</span>\n </WarningMessage>\n )}\n {validationMessage && validationType === 'error' && (\n <ErrorMessage>\n <TechnicalWarning size=\"20px\" color={COLORS.critical_400} />\n <span>{validationMessage}</span>\n </ErrorMessage>\n )}\n </TextareaWrapper>\n );\n};\n\nexport default Textarea;\n"],"file":"Textarea.js"}
|
|
@@ -23,6 +23,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
23
23
|
|
|
24
24
|
var _index = require("../../styles/index");
|
|
25
25
|
|
|
26
|
+
var _styling = require("../styling");
|
|
27
|
+
|
|
26
28
|
var _styles = require("../../styles");
|
|
27
29
|
|
|
28
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -43,7 +45,7 @@ var SearchFieldWrapper = _styledComponents.default.div(_templateObject || (_temp
|
|
|
43
45
|
|
|
44
46
|
exports.SearchFieldWrapper = SearchFieldWrapper;
|
|
45
47
|
|
|
46
|
-
var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n
|
|
48
|
+
var StyledSearchField = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n ", "\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), _index.COLORS.neutral_400, _index.COLORS.white, (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.BREAKPOINTS.MEDIUM, (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentSStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Regular, _index.COLORS.black), (0, _styles.ComponentMStyling)(_index.ComponentTextStyle.Italic, _index.COLORS.neutral_500), _index.COLORS.primary_800, _index.COLORS.primary_800, _index.COLORS.neutral_600, _styling.activeValidationMessageState, _index.COLORS.neutral_100);
|
|
47
49
|
|
|
48
50
|
exports.StyledSearchField = StyledSearchField;
|
|
49
51
|
var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["SearchFieldWrapper","styled","div","focusStyles","StyledSearchField","COLORS","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_800","neutral_600","
|
|
1
|
+
{"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["SearchFieldWrapper","styled","div","focusStyles","StyledSearchField","COLORS","neutral_400","white","ComponentTextStyle","Regular","black","Italic","neutral_500","BREAKPOINTS","MEDIUM","primary_800","neutral_600","activeValidationMessageState","neutral_100","SearchField","React","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAIO,IAAMA,kBAAkB,GAAGC,0BAAOC,GAAV,iIAEzBC,kBAFyB,CAAxB;;;;AAMA,IAAMC,iBAAiB,GAAGH,0BAAOC,GAAV,imCAGEG,cAAOC,WAHT,EAURD,cAAOE,KAVC,EAY1B,+BAAkBC,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAZ0B,EAkBxB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CAlBwB,EAqB1BC,mBAAYC,MArBc,EAsBxB,+BAAkBN,0BAAmBC,OAArC,EAA8CJ,cAAOK,KAArD,CAtBwB,EA4BtB,+BAAkBF,0BAAmBG,MAArC,EAA6CN,cAAOO,WAApD,CA5BsB,EAiCxB,+BAAk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;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;eAmCaR,W","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n ${activeValidationMessageState}\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.cjs"}
|
|
@@ -13,10 +13,11 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import styled from 'styled-components';
|
|
15
15
|
import { BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles } from '../../styles/index';
|
|
16
|
+
import { activeValidationMessageState } from '../styling';
|
|
16
17
|
import { ComponentMStyling, ComponentSStyling } from '../../styles';
|
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
export var SearchFieldWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.focus-visible-within {\n ", "\n }\n"])), focusStyles);
|
|
19
|
-
export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n
|
|
20
|
+
export var StyledSearchField = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ", ";\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ", ";\n\n ", "\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ", "\n }\n\n ", " {\n ", "\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.small {\n ", "\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ", "\n }\n }\n\n &.medium {\n ", "\n height: 56px;\n\n &::placeholder {\n ", "\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ", ";\n }\n\n div {\n color: ", ";\n background-color: transparent;\n }\n\n &.invalid {\n ", "\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ", ";\n pointer-events: none;\n background-color: transparent !important;\n }\n\n"])), COLORS.neutral_400, COLORS.white, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500), COLORS.primary_800, COLORS.primary_800, COLORS.neutral_600, activeValidationMessageState, COLORS.neutral_100);
|
|
20
21
|
var SearchField = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
21
22
|
var id = _ref.id,
|
|
22
23
|
searchTerm = _ref.searchTerm,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","ComponentMStyling","ComponentSStyling","SearchFieldWrapper","div","StyledSearchField","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_800","neutral_600","
|
|
1
|
+
{"version":3,"sources":["../../../src/InputFields/components/SearchField.tsx"],"names":["React","styled","BREAKPOINTS","COLORS","ComponentTextStyle","focusStyles","activeValidationMessageState","ComponentMStyling","ComponentSStyling","SearchFieldWrapper","div","StyledSearchField","neutral_400","white","Regular","black","Italic","neutral_500","MEDIUM","primary_800","neutral_600","neutral_100","SearchField","forwardRef","ref","id","searchTerm","disabled","validationMessage","children","size","className","rest","cls","concat"],"mappings":";;;;;;;;;;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,MAAP,MAAyC,mBAAzC;AACA,SAAQC,WAAR,EAAqBC,MAArB,EAA6BC,kBAA7B,EAAiDC,WAAjD,QAAmE,oBAAnE;AACA,SAAQC,4BAAR,QAA2C,YAA3C;AACA,SAAQC,iBAAR,EAA2BC,iBAA3B,QAAmD,cAAnD;;AAIA,OAAO,IAAMC,kBAAkB,GAAGR,MAAM,CAACS,GAAV,mHAEzBL,WAF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ACM;;AAEhF,MAAMC,GAAG,GACP,CAACN,QAAQ,GAAG,WAAH,GAAiB,EAA1B,EACGO,MADH,CACUR,UAAU,KAAK,EAAf,GAAoB,eAApB,GAAsC,EADhD,EAEGQ,MAFH,CAEUJ,IAAI,aAAMA,IAAN,SAAgB,EAF9B,EAGGI,MAHH,CAGUN,iBAAiB,GAAG,WAAH,GAAiB,EAH5C,EAIGM,MAJH,WAIaH,SAJb,aAIaA,SAJb,cAIaA,SAJb,GAI0B,EAJ1B,OADF;AAOA,sBACE,KAAC,kBAAD;AAAoB,IAAA,GAAG,EAAEP,GAAzB;AAAA,2BACE,KAAC,iBAAD;AACE,MAAA,EAAE,YAAKC,EAAL,UADJ;AAEE,+BAAgBA,EAAhB,UAFF;AAGE,MAAA,SAAS,EAAEQ;AAHb,OAIMD,IAJN;AAAA,gBAKGH;AALH;AADF,IADF;AAWD,CA7BmB,CAApB;;AAREJ,EAAAA,E;AACAC,EAAAA,U;AACAC,EAAAA,Q;AACAC,EAAAA,iB;AACAC,EAAAA,Q;;AAmCF,eAAeP,WAAf","sourcesContent":["import * as React from 'react';\nimport styled, {css, CSSProperties} from 'styled-components';\nimport {BREAKPOINTS, COLORS, ComponentTextStyle, focusStyles} from '../../styles/index';\nimport {activeValidationMessageState} from '../styling';\nimport {ComponentMStyling, ComponentSStyling} from '../../styles';\nimport {Z_INDEXES} from '../../styles/z-indexes';\nimport {Size} from '../../types';\n\nexport const SearchFieldWrapper = styled.div`\n &.focus-visible-within {\n ${focusStyles}\n }\n`;\n\nexport const StyledSearchField = styled.div<{ activeValidationMessage?: boolean; }>`\n display: flex;\n flex-direction: row;\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_400};\n box-sizing: border-box;\n border-radius: 56px;\n align-items: center;\n position: relative;\n height: 48px;\n appearance: none;\n background-color: ${COLORS.white};\n\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n padding: 0 !important;\n width: 100%;\n\n ::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n\n ${BREAKPOINTS.MEDIUM} {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n\n height: 56px;\n padding: 0 4px !important;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.small {\n ${ComponentSStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 48px;\n padding: 0 !important;\n\n &::placeholder {\n ${ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &.medium {\n ${ComponentMStyling(ComponentTextStyle.Regular, COLORS.black)}\n height: 56px;\n\n &::placeholder {\n ${ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_500)}\n }\n }\n\n &:hover {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n &:focus-within {\n box-shadow: inset 0 0 0 2px ${COLORS.primary_800};\n }\n\n div {\n color: ${COLORS.neutral_600};\n background-color: transparent;\n }\n\n &.invalid {\n ${activeValidationMessageState}\n }\n\n &.disabled {\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\n pointer-events: none;\n background-color: transparent !important;\n }\n\n`;\n\ntype SeachFieldProps = React.HTMLAttributes<HTMLDivElement> & {\n id: string;\n searchTerm?: string;\n disabled?: boolean;\n validationMessage?: string;\n children: any;\n size?: Size.Small | Size.Medium;\n};\n\nconst SearchField = React.forwardRef<HTMLDivElement, SeachFieldProps>(({\n id,\n searchTerm,\n disabled,\n validationMessage,\n children,\n size,\n className,\n ...rest\n }, ref) => {\n\n const cls =\n (disabled ? 'disabled ' : '')\n .concat(searchTerm !== '' ? 'searchactive ' : '')\n .concat(size ? `${size} ` : '')\n .concat(validationMessage ? ' invalid ' : '')\n .concat(`${className ?? ''} `);\n\n return (\n <SearchFieldWrapper ref={ref}>\n <StyledSearchField\n id={`${id}_main`}\n data-testid={`${id}_main`}\n className={cls}\n {...rest}>\n {children}\n </StyledSearchField>\n </SearchFieldWrapper>\n );\n});\n\nexport default SearchField;\n"],"file":"SearchField.js"}
|
|
@@ -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.
|
|
10
|
+
exports.activeValidationMessageState = exports.WarningMessage = exports.Warning = exports.ValidationStyling = exports.StyledIcon = exports.SearchIconWrapper = exports.RequiredStar = 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,50 +17,58 @@ 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, _templateObject13, _templateObject14;
|
|
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
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
26
|
var InputWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n outline: none;\n ", ";\n ", "\n"])), function (props) {
|
|
27
|
-
return props.
|
|
27
|
+
return props.locked || props.disabled ? 'cursor: not-allowed;' : '';
|
|
28
28
|
}, function (props) {
|
|
29
29
|
return props.margin ? "margin: ".concat(props.margin, ";") : '';
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
exports.InputWrapper = InputWrapper;
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
exports.
|
|
33
|
+
var lockedState = (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.neutral_600);
|
|
34
|
+
var activeValidationMessageState = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.warning_400);
|
|
35
|
+
exports.activeValidationMessageState = activeValidationMessageState;
|
|
36
|
+
var activeErrorMessageState = (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.critical_400);
|
|
37
|
+
var activeCorrectInput = (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), _styles.COLORS.correct_500);
|
|
36
38
|
|
|
37
|
-
var InputFieldStyling = _styledComponents.default.input(
|
|
39
|
+
var InputFieldStyling = _styledComponents.default.input(_templateObject6 || (_templateObject6 = (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 ", "\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 &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\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) {
|
|
38
40
|
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
41
|
}, (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) {
|
|
42
|
+
return props.locked ? lockedState : '';
|
|
43
|
+
}, function (props) {
|
|
44
|
+
return props.activeValidationMessage ? activeValidationMessageState : '';
|
|
45
|
+
}, function (props) {
|
|
40
46
|
return props.activeErrorMessage ? activeErrorMessageState : '';
|
|
41
47
|
}, function (props) {
|
|
42
|
-
return props.
|
|
43
|
-
}, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.primary_800, _styles.focusStyles, _styles.COLORS.
|
|
48
|
+
return props.correctInput ? activeCorrectInput : '';
|
|
49
|
+
}, _styles.COLORS.neutral_100, _styles.COLORS.neutral_300, _styles.COLORS.primary_800, _styles.focusStyles, _styles.COLORS.primary_700, _styles.COLORS.primary_800);
|
|
44
50
|
|
|
45
51
|
exports.InputFieldStyling = InputFieldStyling;
|
|
46
|
-
var ValidationStyling = (0, _styledComponents.css)(
|
|
52
|
+
var ValidationStyling = (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = (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
53
|
exports.ValidationStyling = ValidationStyling;
|
|
48
54
|
|
|
49
|
-
var RequiredStar = _styledComponents.default.span(
|
|
55
|
+
var RequiredStar = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (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
56
|
|
|
51
57
|
exports.RequiredStar = RequiredStar;
|
|
52
58
|
|
|
53
|
-
var Warning = _styledComponents.default.div(
|
|
59
|
+
var Warning = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (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);
|
|
54
60
|
|
|
55
61
|
exports.Warning = Warning;
|
|
56
|
-
var
|
|
62
|
+
var WarningMessage = (0, _styledComponents.default)(Warning)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.warning_500);
|
|
63
|
+
exports.WarningMessage = WarningMessage;
|
|
64
|
+
var ErrorMessage = (0, _styledComponents.default)(Warning)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.critical_500);
|
|
57
65
|
exports.ErrorMessage = ErrorMessage;
|
|
58
|
-
var AutofilledMessage = (0, _styledComponents.default)(Warning)(
|
|
66
|
+
var AutofilledMessage = (0, _styledComponents.default)(Warning)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), _styles.COLORS.neutral_600);
|
|
59
67
|
exports.AutofilledMessage = AutofilledMessage;
|
|
60
68
|
|
|
61
|
-
var StyledIcon = _styledComponents.default.div(
|
|
69
|
+
var StyledIcon = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 50%;\n"])));
|
|
62
70
|
|
|
63
71
|
exports.StyledIcon = StyledIcon;
|
|
64
|
-
var SearchIconWrapper = (0, _styledComponents.default)(StyledIcon)(
|
|
72
|
+
var SearchIconWrapper = (0, _styledComponents.default)(StyledIcon)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n border-radius: 50%;\n"])));
|
|
65
73
|
exports.SearchIconWrapper = SearchIconWrapper;
|
|
66
74
|
//# sourceMappingURL=styling.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","
|
|
1
|
+
{"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["InputWrapper","styled","div","props","locked","disabled","margin","lockedState","css","COLORS","neutral_100","neutral_300","neutral_600","activeValidationMessageState","warning_400","activeErrorMessageState","critical_400","activeCorrectInput","correct_500","InputFieldStyling","input","withoutBorder","neutral_400","ComponentTextStyle","Italic","BREAKPOINTS","MEDIUM","black","activeValidationMessage","activeErrorMessage","correctInput","primary_800","focusStyles","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","WarningMessage","warning_500","ErrorMessage","AutofilledMessage","StyledIcon","SearchIconWrapper"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAEO,IAAMA,YAAY,GAAGC,0BAAOC,GAAV,yHAErB,UAACC,KAAD;AAAA,SAAYA,KAAK,CAACC,MAAN,IAAgBD,KAAK,CAACE,QAAtB,GAAiC,sBAAjC,GAA0D,EAAtE;AAAA,CAFqB,EAGrB,UAACF,KAAD;AAAA,SAAYA,KAAK,CAACG,MAAN,qBAA0BH,KAAK,CAACG,MAAhC,SAA4C,EAAxD;AAAA,CAHqB,CAAlB;;;AAMP,IAAMC,WAAW,OAAGC,qBAAH,kQACKC,eAAOC,WADZ,EAEeD,eAAOE,WAFtB,EAGNF,eAAOG,WAHD,CAAjB;AAQO,IAAMC,4BAA4B,OAAGL,qB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CAXiB,CAAvB;;;AAiBO,IAAMC,YAAY,GAAGnC,0BAAOoC,IAAV,4MACd5B,eAAO6B,YADO,CAAlB;;;;AAQA,IAAMC,OAAO,GAAGtC,0BAAOC,GAAV,6WAIhBuB,oBAAYC,MAJI,CAAb;;;AAwBA,IAAMc,cAAc,GAAG,+BAAOD,OAAP,CAAH,0GAChB9B,eAAOgC,WADS,CAApB;;AAGA,IAAMC,YAAY,GAAG,+BAAOH,OAAP,CAAH,0GACd9B,eAAO6B,YADO,CAAlB;;AAGA,IAAMK,iBAAiB,GAAG,+BAAOJ,OAAP,CAAH,0GACnB9B,eAAOG,WADY,CAAvB;;;AAMA,IAAMgC,UAAU,GAAG3C,0BAAOC,GAAV,gHAAhB;;;AAIA,IAAM2C,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<{ locked?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.locked || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\n\nconst lockedState = 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 activeValidationMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.warning_400};\n`;\nconst activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\nconst activeCorrectInput = css`\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n`;\n\nconst InputFieldStyling = styled.input<{\n locked?: boolean;\n activeValidationMessage?: boolean;\n activeErrorMessage?: boolean;\n correctInput?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\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.locked ? lockedState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n ${(props) => (props.correctInput ? activeCorrectInput : '')}\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 &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\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 WarningMessage = styled(Warning)`\n color: ${COLORS.warning_500};\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,19 +1,22 @@
|
|
|
1
1
|
export declare const InputWrapper: import("styled-components").StyledComponent<"div", any, {
|
|
2
|
-
|
|
2
|
+
locked?: boolean | undefined;
|
|
3
3
|
disabled?: boolean | undefined;
|
|
4
4
|
margin?: string | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const activeValidationMessageState: import("styled-components").FlattenSimpleInterpolation;
|
|
7
7
|
declare const InputFieldStyling: import("styled-components").StyledComponent<"input", any, {
|
|
8
|
+
locked?: boolean | undefined;
|
|
9
|
+
activeValidationMessage?: boolean | undefined;
|
|
8
10
|
activeErrorMessage?: boolean | undefined;
|
|
11
|
+
correctInput?: boolean | undefined;
|
|
9
12
|
active?: boolean | undefined;
|
|
10
13
|
withoutBorder?: boolean | undefined;
|
|
11
14
|
size?: string | undefined;
|
|
12
|
-
suppressReadOnlyStyles?: boolean | undefined;
|
|
13
15
|
}, never>;
|
|
14
16
|
declare const ValidationStyling: import("styled-components").FlattenSimpleInterpolation;
|
|
15
17
|
export declare const RequiredStar: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
16
18
|
export declare const Warning: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const WarningMessage: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
20
|
export declare const ErrorMessage: 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 };
|
|
@@ -1,30 +1,37 @@
|
|
|
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, _templateObject13, _templateObject14;
|
|
4
4
|
|
|
5
5
|
import styled, { css } from 'styled-components';
|
|
6
6
|
import { BREAKPOINTS, COLORS, focusStyles } from '../styles';
|
|
7
7
|
import { ComponentXXSStyling, ComponentTextStyle, ComponentSStyling, ComponentMStyling } from '../styles/typography';
|
|
8
8
|
export var InputWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none;\n ", ";\n ", "\n"])), function (props) {
|
|
9
|
-
return props.
|
|
9
|
+
return props.locked || props.disabled ? 'cursor: not-allowed;' : '';
|
|
10
10
|
}, function (props) {
|
|
11
11
|
return props.margin ? "margin: ".concat(props.margin, ";") : '';
|
|
12
12
|
});
|
|
13
|
-
var
|
|
14
|
-
export var
|
|
15
|
-
var
|
|
13
|
+
var lockedState = 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
|
+
export var activeValidationMessageState = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.warning_400);
|
|
15
|
+
var activeErrorMessageState = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.critical_400);
|
|
16
|
+
var activeCorrectInput = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n box-shadow: inset 0 0 0 2px ", ";\n"])), COLORS.correct_500);
|
|
17
|
+
var InputFieldStyling = styled.input(_templateObject6 || (_templateObject6 = _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 ", "\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 &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\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) {
|
|
16
18
|
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
19
|
}, ComponentSStyling(ComponentTextStyle.Italic, COLORS.neutral_600), BREAKPOINTS.MEDIUM, ComponentMStyling(ComponentTextStyle.Italic, COLORS.neutral_600), COLORS.black, function (props) {
|
|
20
|
+
return props.locked ? lockedState : '';
|
|
21
|
+
}, function (props) {
|
|
22
|
+
return props.activeValidationMessage ? activeValidationMessageState : '';
|
|
23
|
+
}, function (props) {
|
|
18
24
|
return props.activeErrorMessage ? activeErrorMessageState : '';
|
|
19
25
|
}, function (props) {
|
|
20
|
-
return props.
|
|
21
|
-
}, COLORS.neutral_100, COLORS.neutral_300, COLORS.primary_800, focusStyles, COLORS.
|
|
22
|
-
var ValidationStyling = css(
|
|
23
|
-
export var RequiredStar = styled.span(
|
|
24
|
-
export var Warning = styled.div(
|
|
25
|
-
export var
|
|
26
|
-
export var
|
|
26
|
+
return props.correctInput ? activeCorrectInput : '';
|
|
27
|
+
}, COLORS.neutral_100, COLORS.neutral_300, COLORS.primary_800, focusStyles, COLORS.primary_700, COLORS.primary_800);
|
|
28
|
+
var ValidationStyling = css(_templateObject7 || (_templateObject7 = _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'));
|
|
29
|
+
export var RequiredStar = styled.span(_templateObject8 || (_templateObject8 = _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);
|
|
30
|
+
export var Warning = styled.div(_templateObject9 || (_templateObject9 = _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);
|
|
31
|
+
export var WarningMessage = styled(Warning)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.warning_500);
|
|
32
|
+
export var ErrorMessage = styled(Warning)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.critical_500);
|
|
33
|
+
export var AutofilledMessage = styled(Warning)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: ", ";\n"])), COLORS.neutral_600);
|
|
27
34
|
export { ValidationStyling, InputFieldStyling };
|
|
28
|
-
export var StyledIcon = styled.div(
|
|
29
|
-
export var SearchIconWrapper = styled(StyledIcon)(
|
|
35
|
+
export var StyledIcon = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n border-radius: 50%;\n"])));
|
|
36
|
+
export var SearchIconWrapper = styled(StyledIcon)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: absolute;\n border-radius: 50%;\n"])));
|
|
30
37
|
//# 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","
|
|
1
|
+
{"version":3,"sources":["../../src/InputFields/styling.ts"],"names":["styled","css","BREAKPOINTS","COLORS","focusStyles","ComponentXXSStyling","ComponentTextStyle","ComponentSStyling","ComponentMStyling","InputWrapper","div","props","locked","disabled","margin","lockedState","neutral_100","neutral_300","neutral_600","activeValidationMessageState","warning_400","activeErrorMessageState","critical_400","activeCorrectInput","correct_500","InputFieldStyling","input","withoutBorder","neutral_400","Italic","MEDIUM","black","activeValidationMessage","activeErrorMessage","correctInput","primary_800","primary_700","ValidationStyling","Regular","RequiredStar","span","critical_500","Warning","WarningMessage","warning_500","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,MAAN,IAAgBD,KAAK,CAACE,QAAtB,GAAiC,sBAAjC,GAA0D,EAAtE;AAAA,CAFqB,E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qBX,kBAArB,GAA0C,EAAtD;AAAA,CApEmB,EAuECpB,MAAM,CAACa,WAvER,EA4EVb,MAAM,CAACc,WA5EG,EA+EiBd,MAAM,CAACgC,WA/ExB,EAmFjB/B,WAnFiB,EAuGiBD,MAAM,CAACiC,WAvGxB,EA2GiBjC,MAAM,CAACgC,WA3GxB,CAAvB;AAwHA,IAAME,iBAAiB,GAAGpC,GAAH,uTAEjBI,mBAAmB,CAACC,kBAAkB,CAACgC,OAApB,EAA6BnC,MAAM,CAAC4B,KAApC,CAFF,EAWjB1B,mBAAmB,CAACC,kBAAkB,CAACgC,OAApB,EAA6B,SAA7B,CAXF,CAAvB;AAiBA,OAAO,IAAMC,YAAY,GAAGvC,MAAM,CAACwC,IAAV,8LACdrC,MAAM,CAACsC,YADO,CAAlB;AAQP,OAAO,IAAMC,OAAO,GAAG1C,MAAM,CAACU,GAAV,+VAIhBR,WAAW,CAAC4B,MAJI,CAAb;AAwBP,OAAO,IAAMa,cAAc,GAAG3C,MAAM,CAAC0C,OAAD,CAAT,4FAChBvC,MAAM,CAACyC,WADS,CAApB;AAGP,OAAO,IAAMC,YAAY,GAAG7C,MAAM,CAAC0C,OAAD,CAAT,4FACdvC,MAAM,CAACsC,YADO,CAAlB;AAGP,OAAO,IAAMK,iBAAiB,GAAG9C,MAAM,CAAC0C,OAAD,CAAT,4FACnBvC,MAAM,CAACe,WADY,CAAvB;AAIP,SAASmB,iBAAT,EAA4BZ,iBAA5B;AAEA,OAAO,IAAMsB,UAAU,GAAG/C,MAAM,CAACU,GAAV,kGAAhB;AAIP,OAAO,IAAMsC,iBAAiB,GAAGhD,MAAM,CAAC+C,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<{ locked?: boolean; disabled?: boolean; margin?: string }>`\n outline: none;\n ${(props) => (props.locked || props.disabled ? 'cursor: not-allowed;' : '')};\n ${(props) => (props.margin ? `margin: ${props.margin};` : '')}\n`;\n\nconst lockedState = 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 activeValidationMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.warning_400};\n`;\nconst activeErrorMessageState = css`\n box-shadow: inset 0 0 0 2px ${COLORS.critical_400};\n`;\nconst activeCorrectInput = css`\n box-shadow: inset 0 0 0 2px ${COLORS.correct_500};\n`;\n\nconst InputFieldStyling = styled.input<{\n locked?: boolean;\n activeValidationMessage?: boolean;\n activeErrorMessage?: boolean;\n correctInput?: boolean;\n active?: boolean;\n withoutBorder?: boolean;\n size?: string;\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.locked ? lockedState : '')}\n ${(props) => (props.activeValidationMessage ? activeValidationMessageState : '')}\n ${(props) => (props.activeErrorMessage ? activeErrorMessageState : '')}\n ${(props) => (props.correctInput ? activeCorrectInput : '')}\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 &.error {\n border-radius: 4px;\n border-style: solid;\n border-width: 2px;\n border-color: #e97116;\n padding: 0 15px !important;\n }\n\n &:not(.placeholder) {\n line-height: 40px;\n }\n\n &.error {\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 WarningMessage = styled(Warning)`\n color: ${COLORS.warning_500};\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"}
|
package/dist/Table/TableBody.cjs
CHANGED