@ntbjs/react-components 2.0.2-rc.1 → 2.0.2-rc.10
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/build/data/Badge/Badge.js +6 -6
- package/build/data/Badge/Badge.js.map +1 -1
- package/build/data/Badge/Badge.styled.js +10 -11
- package/build/data/Badge/Badge.styled.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.js +2 -2
- package/build/inputs/CompactTextInput/CompactTextInput.js.map +1 -1
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js +107 -117
- package/build/inputs/CompactTextInput/CompactTextInput.styled.js.map +1 -1
- package/build/inputs/MultiLevelCheckboxSelect/MultiLevelCheckboxSelect.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.js +163 -103
- package/build/inputs/MultiSelect/MultiSelect.js.map +1 -1
- package/build/inputs/MultiSelect/MultiSelect.styled.js +123 -111
- package/build/inputs/MultiSelect/MultiSelect.styled.js.map +1 -1
- package/build/inputs/TextArea/TextArea.js +5 -5
- package/build/inputs/TextArea/TextArea.js.map +1 -1
- package/build/inputs/TextArea/TextArea.styled.js +48 -56
- package/build/inputs/TextArea/TextArea.styled.js.map +1 -1
- package/build/utils/defaultTheme.js +10 -1
- package/build/utils/defaultTheme.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js +8 -8
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.js.map +1 -1
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js +2 -2
- package/build/widgets/AssetGallery/AssetGalleryBase/AssetGalleryCompactCard/AssetGalleryCompactCard.styled.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';\n\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [autoFocus, setAutoFocus] = useState(false);\n\n const [uniqueId] = useState(nanoid());\n\n const memoizedDescriptionToolTip = useMemo(() => {\n return descriptionToolTip;\n }, [descriptionToolTip]);\n\n useEffect(() => {\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const input = () => {\n return (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n type={type}\n className={className}\n style={style}\n >\n <S.TextInputFieldIconAlert type={type}>{icon}</S.TextInputFieldIconAlert>\n <S.TextInputField\n autoFocus={autoFocus}\n $borderRadius={borderRadius}\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n key={uniqueId}\n $padding={padding}\n onChange={e => {\n if (e.target.value) {\n setInputIsEmpty(false);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n } else {\n setInputIsEmpty(true);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n }\n onChange(e);\n }}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n $noBorder={noBorder}\n {...rest}\n />\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && noBorder && (\n <S.InputIconContainer disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n );\n };\n\n if (hidden) return null;\n\n return (\n <>\n {!memoizedDescriptionToolTip && input()}\n {memoizedDescriptionToolTip && (\n <div>\n <Tooltip\n content={memoizedDescriptionToolTip}\n key=\"tooltipTextArea1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n zIndex={999999}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n </>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element – E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element – E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default TextArea;\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","autoFocus","setAutoFocus","uniqueId","nanoid","memoizedDescriptionToolTip","useMemo","useEffect","onKeyDown","useCallback","event","key","stopPropagation","input","createElement","S","htmlFor","$fieldLabel","isEmpty","_extends","$borderRadius","ref","$edit","$hasIcon","Boolean","id","$padding","e","target","$noBorder","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Fragment","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneOfType","number","object","oneOf","func"],"mappings":";;;;;;;;;;;;;;;;AAsBMA,MAAAA,QAAQ,GAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,QAAQA,CACjD;EACEG,KAAK;EACLC,YAAY;EACZC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,IAAI;EACJC,YAAY;EACZC,WAAW;EACXC,IAAI;EACJC,IAAI;EACJC,IAAI;EACJC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,WAAW;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cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;EAIFnE,WAAW,EAAE4D,SAAS,CAACG,OAAO;EAI9B9D,WAAW,EAAE2D,SAAS,CAACG,OAAO;EAI9B5D,kBAAkB,EAAEyD,SAAS,CAACC,MAAM;EAIpCzD,YAAY,EAAEwD,SAAS,CAACK,MAAAA;AAC1B,CAAC,GAAA,EAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../src/components/inputs/TextArea/TextArea.js"],"sourcesContent":["import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';\n\nimport { isEmpty } from 'lodash';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { nanoid } from 'nanoid';\nimport PropTypes from 'prop-types';\nimport { Tooltip } from '../../data';\n\nimport { ReactComponent as EditNoteIcon } from '../../../icons/edit-note.svg';\nimport * as S from './TextArea.styled';\n\n/**\n * Text areas let users enter and edit text in the UI. They typically appear in forms and dialogs.\n *\n * ### Import\n *\n * ``` js\n * import { TextArea } from '@ntbjs/react-components/inputs'\n * // or\n * import TextArea from '@ntbjs/react-components/inputs/TextArea'\n * ```\n */\nconst TextArea = React.forwardRef(function TextArea(\n {\n value,\n defaultValue,\n name,\n label,\n placeholder,\n required,\n disabled,\n hidden,\n readOnly,\n edit,\n autoComplete,\n description,\n type,\n icon,\n rows,\n className,\n style,\n onChange,\n onBlur,\n noBorder,\n loadingIcon,\n successIcon,\n padding,\n descriptionToolTip,\n borderRadius,\n fieldLabel,\n ...rest\n },\n forwardedRef\n) {\n const textInputDomNode = useRef(null);\n const textInputRef = useMergedRefs(forwardedRef, textInputDomNode);\n\n const [inputIsEmpty, setInputIsEmpty] = useState(!(value || defaultValue));\n const [autoFocus, setAutoFocus] = useState(false);\n\n const [uniqueId] = useState(nanoid());\n\n const memoizedDescriptionToolTip = useMemo(() => {\n return descriptionToolTip;\n }, [descriptionToolTip]);\n\n useEffect(() => {\n setAutoFocus(false);\n }, [value, defaultValue]);\n\n const onKeyDown = useCallback(event => {\n if (event.key === 'Enter') {\n event.stopPropagation();\n }\n }, []);\n\n const input = () => {\n return (\n <S.TextAreaContainter>\n {fieldLabel && (\n <S.Label htmlFor={uniqueId} disabled={disabled}>\n {fieldLabel}\n <S.SuccessContainerLabel>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainerLabel>\n </S.Label>\n )}\n <S.TextInput\n $fieldLabel={!isEmpty(fieldLabel)}\n disabled={disabled}\n readOnly={readOnly}\n $type={type}\n className={className}\n style={style}\n >\n <S.TextInputFieldIconAlert $type={type}>{icon}</S.TextInputFieldIconAlert>\n <S.TextInputField\n autoFocus={autoFocus}\n $borderRadius={borderRadius}\n ref={textInputRef}\n rows={rows}\n value={value}\n defaultValue={defaultValue}\n name={name}\n placeholder={placeholder || ' '}\n required={required}\n readOnly={readOnly}\n disabled={disabled}\n $edit={edit}\n $type={type}\n autoComplete={autoComplete}\n $hasIcon={Boolean(icon)}\n id={`text-input-${uniqueId}`}\n key={uniqueId}\n $padding={padding}\n onChange={e => {\n if (e.target.value) {\n setInputIsEmpty(false);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n } else {\n setInputIsEmpty(true);\n if (!autoFocus) {\n setAutoFocus(true);\n }\n }\n onChange(e);\n }}\n onKeyDown={onKeyDown}\n onBlur={onBlur}\n $noBorder={noBorder}\n {...rest}\n />\n {!fieldLabel && (type === 'loading' || type === 'success') && (\n <S.SuccessContainer>\n {type === 'loading' && loadingIcon}\n {type === 'success' && successIcon}\n </S.SuccessContainer>\n )}\n {!readOnly && (edit || noBorder) && (\n <S.InputIconContainer disabled={disabled}>\n <EditNoteIcon className={padding === 'small' ? 'smallPadingIcon' : undefined} />\n </S.InputIconContainer>\n )}\n {label && (\n <S.TextInputLabel\n htmlFor={`text-input-${uniqueId}`}\n $hasPlaceholder={Boolean(placeholder)}\n $hasIcon={Boolean(icon)}\n $inputIsEmpty={inputIsEmpty}\n >\n {label}\n {required && ' *'}\n </S.TextInputLabel>\n )}\n {typeof description === 'string' && description.length > 0 && (\n <S.Description $type={type}>{description}</S.Description>\n )}\n </S.TextInput>\n </S.TextAreaContainter>\n );\n };\n\n if (hidden) return null;\n\n return (\n <>\n {!memoizedDescriptionToolTip && input()}\n {memoizedDescriptionToolTip && (\n <div>\n <Tooltip\n content={memoizedDescriptionToolTip}\n key=\"tooltipTextArea1\"\n placement=\"bottom-end\"\n trigger={'mouseenter'}\n zIndex={999999}\n >\n {input()}\n </Tooltip>\n </div>\n )}\n </>\n );\n});\n\nTextArea.defaultProps = {\n rows: 4,\n noBorder: false,\n readOnly: false,\n edit: false,\n hidden: false,\n type: '',\n padding: 'medium',\n descriptionToolTip: '',\n onChange: () => {},\n borderRadius: 0\n};\n\nTextArea.propTypes = {\n /**\n * Value to be sent. Typically the content of the text area.\n */\n value: PropTypes.string,\n\n /**\n * Default value/text to be displayed in the text area by default.\n */\n defaultValue: PropTypes.string,\n\n /**\n * Name of the text area (used when sending form data)\n */\n name: PropTypes.string,\n\n /**\n * Label text for the text area. If the text area is empty (no input and no placeholder)\n * and isn't in focus, the label text will be displayed grayed out in the text area itself.\n * Otherwise, the label text will be displayed in the top left corner.\n */\n label: PropTypes.string,\n\n /**\n * Field Label text for the text area field. I\n */\n fieldLabel: PropTypes.string,\n\n /**\n * Placeholder text to be displayed if the text area is empty (no input)\n */\n placeholder: PropTypes.string,\n\n /**\n * Whether the user is required to fill in the text area\n */\n required: PropTypes.bool,\n\n /**\n * Whether the text area is disabled\n */\n disabled: PropTypes.bool,\n /**\n * Whether the component is hidden or visible.\n */\n hidden: PropTypes.bool,\n /**\n * Whether the text area is read-only\n */\n readOnly: PropTypes.bool,\n /**\n * Displays a grey background to show that value is editable\n */\n edit: PropTypes.bool,\n /**\n * ?\n */\n autoComplete: PropTypes.string,\n /**\n * Descriptive text displayed below the text area\n */\n description: PropTypes.string,\n\n /**\n * Optional icon to be displayed left of the text inside the text area\n */\n icon: PropTypes.element,\n /**\n * How many rows/lines of text to be displayed by default\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Add custom class names to the HTML element\n */\n className: PropTypes.string,\n /**\n * Add custom CSS styling\n */\n style: PropTypes.object,\n /**\n * Add padding (small-medium-large)\n */\n padding: PropTypes.oneOf(['small', 'medium', 'large']),\n /**\n * Optional callback function for the `onChange` event\n */\n onChange: PropTypes.func,\n /**\n * Optional callback function for the `onBlur` event\n */\n onBlur: PropTypes.func,\n noBorder: PropTypes.bool,\n // warningAlert: PropTypes.bool,\n // errorAlert: PropTypes.bool,\n /**\n * Define the type based on error,error-border , warning, loading and success.\n */\n type: PropTypes.oneOf([\n '',\n 'error',\n 'error-border',\n 'warning-border',\n 'warning',\n 'loading',\n 'success'\n ]),\n /**\n * Icon element â€\" E.g: `icon={<Spinner />}`\n */\n loadingIcon: PropTypes.element,\n /**\n * Icon element â€\" E.g: `icon={<Check />}`\n */\n successIcon: PropTypes.element,\n /**\n * Description ToolTip text.\n */\n descriptionToolTip: PropTypes.string,\n /**\n * Border Radius for rounded borders.\n */\n borderRadius: PropTypes.number\n};\n\nexport default TextArea;\n"],"names":["TextArea","React","forwardRef","value","defaultValue","name","label","placeholder","required","disabled","hidden","readOnly","edit","autoComplete","description","type","icon","rows","className","style","onChange","onBlur","noBorder","loadingIcon","successIcon","padding","descriptionToolTip","borderRadius","fieldLabel","rest","forwardedRef","textInputDomNode","useRef","textInputRef","useMergedRefs","inputIsEmpty","setInputIsEmpty","useState","autoFocus","setAutoFocus","uniqueId","nanoid","memoizedDescriptionToolTip","useMemo","useEffect","onKeyDown","useCallback","event","key","stopPropagation","input","createElement","S","htmlFor","$fieldLabel","isEmpty","$type","_extends","$borderRadius","ref","$edit","$hasIcon","Boolean","id","$padding","e","target","$noBorder","EditNoteIcon","undefined","$hasPlaceholder","$inputIsEmpty","length","Fragment","Tooltip","content","placement","trigger","zIndex","defaultProps","propTypes","process","env","NODE_ENV","PropTypes","string","bool","element","oneO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MAAM,CAAC,CAAC;EAI/DnE,SAAS,EAAEkE,SAAS,CAACC,MAAM;EAI3BlE,KAAK,EAAEiE,SAAS,CAACM,MAAM;AAIvBjE,EAAAA,OAAO,EAAE2D,SAAS,CAACO,KAAK,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;EAItDvE,QAAQ,EAAEgE,SAAS,CAACQ,IAAI;EAIxBvE,MAAM,EAAE+D,SAAS,CAACQ,IAAI;EACtBtE,QAAQ,EAAE8D,SAAS,CAACE,IAAI;EAMxBvE,IAAI,EAAEqE,SAAS,CAACO,KAAK,CAAC,CACpB,EAAE,EACF,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;EAIFpE,WAAW,EAAE6D,SAAS,CAACG,OAAO;EAI9B/D,WAAW,EAAE4D,SAAS,CAACG,OAAO;EAI9B7D,kBAAkB,EAAE0D,SAAS,CAACC,MAAM;EAIpC1D,YAAY,EAAEyD,SAAS,CAACK,MAAAA;AAC1B,CAAC,GAAA,EAAA;;;;"}
|
|
@@ -107,25 +107,25 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
107
107
|
`}
|
|
108
108
|
|
|
109
109
|
${props => {
|
|
110
|
-
if (props
|
|
110
|
+
if (props.$type === 'error') {
|
|
111
111
|
return css`
|
|
112
112
|
${props.theme.themeProp('color', 'white', 'black')}
|
|
113
113
|
${props.theme.themeProp('background', '#7f1b1b', '#FBEAE6')}
|
|
114
114
|
${props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}
|
|
115
115
|
`;
|
|
116
|
-
} else if (props
|
|
116
|
+
} else if (props.$type === 'warning') {
|
|
117
117
|
return css`
|
|
118
118
|
${props.theme.themeProp('color', 'white', 'black')}
|
|
119
119
|
${props.theme.themeProp('background', '#634E01', '#FFFDE8')}
|
|
120
120
|
${props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}
|
|
121
121
|
`;
|
|
122
|
-
} else if (props
|
|
122
|
+
} else if (props.$type === 'error-border') {
|
|
123
123
|
return css`
|
|
124
124
|
${props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
|
|
125
125
|
${props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
126
126
|
${props.theme.themeProp('border-color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
127
127
|
`;
|
|
128
|
-
} else if (props
|
|
128
|
+
} else if (props.$type === 'warning-border') {
|
|
129
129
|
return css`
|
|
130
130
|
${props.theme.themeProp('color', props.theme.getColor('gray-100'), props.theme.getColor('gray-900'))}
|
|
131
131
|
${props.theme.themeProp('background', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
@@ -152,15 +152,15 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
152
152
|
`}
|
|
153
153
|
|
|
154
154
|
|
|
155
|
-
${props => props.$noBorder && !props
|
|
155
|
+
${props => props.$noBorder && !props.$type && css`
|
|
156
156
|
${props => props.theme.themeProp('border-color', props.theme.getColor('gray-900'), props.theme.getColor('white'))}
|
|
157
157
|
`}
|
|
158
158
|
|
|
159
|
-
${props => props.$noBorder && props
|
|
159
|
+
${props => props.$noBorder && props.$type === 'warning' && css`
|
|
160
160
|
${props => props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}
|
|
161
161
|
`}
|
|
162
162
|
|
|
163
|
-
${props => props.$noBorder && props
|
|
163
|
+
${props => props.$noBorder && props.$type === 'error' && css`
|
|
164
164
|
${props => props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}
|
|
165
165
|
`}
|
|
166
166
|
|
|
@@ -190,16 +190,16 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
190
190
|
return '';
|
|
191
191
|
}
|
|
192
192
|
if (props.readOnly) {
|
|
193
|
-
if (props
|
|
193
|
+
if (props.$type === 'error') {
|
|
194
194
|
return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');
|
|
195
|
-
} else if (props
|
|
195
|
+
} else if (props.$type === 'warning') {
|
|
196
196
|
return props.theme.themeProp('background', '#634E01', '#FFFDE8');
|
|
197
197
|
}
|
|
198
198
|
return '';
|
|
199
199
|
}
|
|
200
|
-
if (props
|
|
200
|
+
if (props.$type === 'error') {
|
|
201
201
|
return props.theme.themeProp('background', '#901d1d', '#F7D5D0');
|
|
202
|
-
} else if (props
|
|
202
|
+
} else if (props.$type === 'warning') {
|
|
203
203
|
return props.theme.themeProp('background', '#806403', '#FFFEBF');
|
|
204
204
|
} else if (!props.disabled) {
|
|
205
205
|
return props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'));
|
|
@@ -209,55 +209,47 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
209
209
|
|
|
210
210
|
${props => props.$edit && props.theme.themeProp('border-color', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'))}
|
|
211
211
|
|
|
212
|
-
${props => props.$noBorder && !props.readOnly && props
|
|
212
|
+
${props => props.$noBorder && !props.readOnly && props.$type !== 'warning' && props.$type !== 'error' ? props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100')) : ''}
|
|
213
213
|
|
|
214
214
|
& + ${InputIconContainer} {
|
|
215
215
|
opacity: 1;
|
|
216
|
-
${props => props
|
|
216
|
+
${props => props.$type === 'success' && css`
|
|
217
217
|
opacity: 0;
|
|
218
218
|
`}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
222
|
+
&::placeholder {
|
|
223
|
+
${props => {
|
|
224
|
+
if (props.$type === 'error' || props.$type === 'warning') {
|
|
225
|
+
return css`
|
|
226
|
+
color: ${props.theme.getColor('gray-400')};
|
|
227
|
+
opacity: 0.9;
|
|
228
|
+
`;
|
|
229
|
+
} else {
|
|
230
|
+
return css`
|
|
231
|
+
${props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))}
|
|
232
|
+
opacity: 0.6;
|
|
233
|
+
`;
|
|
232
234
|
}
|
|
233
|
-
return '';
|
|
234
235
|
}}
|
|
235
|
-
|
|
236
|
+
}
|
|
236
237
|
|
|
237
|
-
|
|
238
|
-
${props => props.theme.themeProp('opacity', 0.6, 0.5)}
|
|
238
|
+
${props => props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'))};
|
|
239
239
|
|
|
240
|
-
${props => {
|
|
241
|
-
if (props.type === 'warning') {
|
|
242
|
-
return props.theme.themeProp('color', props.theme.getColor('gray-900'), props.theme.getColor('gray-900'));
|
|
243
|
-
} else if (props.type === 'error') {
|
|
244
|
-
return props.theme.themeProp('color', props.theme.getColor('red-600'), props.theme.getColor('red-600'));
|
|
245
|
-
} else {
|
|
246
|
-
return props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'));
|
|
247
|
-
}
|
|
248
|
-
}}
|
|
249
|
-
}
|
|
250
240
|
|
|
251
|
-
&:focus::placeholder {
|
|
252
|
-
${props => props.theme.themeProp('opacity', 0.6, 0.5)}
|
|
253
241
|
|
|
242
|
+
&:focus::placeholder {
|
|
254
243
|
${props => {
|
|
255
|
-
if (props
|
|
256
|
-
return
|
|
257
|
-
|
|
258
|
-
|
|
244
|
+
if (props.$type === 'warning' || props.$type === 'error') {
|
|
245
|
+
return css`
|
|
246
|
+
color: ${props.theme.getColor('gray-500')} !important;
|
|
247
|
+
opacity: 0.8 !important;
|
|
248
|
+
`;
|
|
259
249
|
} else {
|
|
260
|
-
return
|
|
250
|
+
return css`
|
|
251
|
+
${props.theme.themeProp('color', props.theme.getColor('gray-300'), props.theme.getColor('gray-600'))}
|
|
252
|
+
`;
|
|
261
253
|
}
|
|
262
254
|
}}
|
|
263
255
|
}
|
|
@@ -267,20 +259,20 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
267
259
|
|
|
268
260
|
${props => {
|
|
269
261
|
if (props.readOnly) {
|
|
270
|
-
if (props
|
|
262
|
+
if (props.$type === 'error') {
|
|
271
263
|
return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');
|
|
272
|
-
} else if (props
|
|
264
|
+
} else if (props.$type === 'warning') {
|
|
273
265
|
return props.theme.themeProp('background', '#634E01', '#FFFDE8');
|
|
274
266
|
}
|
|
275
267
|
return '';
|
|
276
268
|
}
|
|
277
|
-
if (props
|
|
269
|
+
if (props.$type === 'error') {
|
|
278
270
|
return css`
|
|
279
271
|
${props.theme.themeProp('border-color', '#D83018', '#D83018')}
|
|
280
272
|
${props.theme.themeProp('background', 'white', 'white')}
|
|
281
273
|
${props.theme.themeProp('color', 'black', 'black')}
|
|
282
274
|
`;
|
|
283
|
-
} else if (props
|
|
275
|
+
} else if (props.$type === 'warning') {
|
|
284
276
|
return css`
|
|
285
277
|
${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}
|
|
286
278
|
${props.theme.themeProp('background', 'white', 'white')}
|
|
@@ -288,8 +280,8 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
288
280
|
`;
|
|
289
281
|
} else {
|
|
290
282
|
return css`
|
|
291
|
-
|
|
292
|
-
${props.theme.themeProp('background', '
|
|
283
|
+
border-color: ${props.theme.getColor('gray-600')};
|
|
284
|
+
${props.theme.themeProp('background', props.theme.getColor('gray-700'), props.theme.getColor('gray-100'))}
|
|
293
285
|
`;
|
|
294
286
|
}
|
|
295
287
|
}}
|
|
@@ -298,9 +290,9 @@ const TextInputField = styled.textarea.withConfig({
|
|
|
298
290
|
&&:not(:hover):not(:focus) {
|
|
299
291
|
${props => {
|
|
300
292
|
if (props.$edit) {
|
|
301
|
-
if (props
|
|
293
|
+
if (props.$type === 'error') {
|
|
302
294
|
return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');
|
|
303
|
-
} else if (props
|
|
295
|
+
} else if (props.$type === 'warning') {
|
|
304
296
|
return props.theme.themeProp('background', '#634E01', '#FFFDE8');
|
|
305
297
|
} else {
|
|
306
298
|
return props.theme.themeProp('background', 'rgba(39,39,42, 0.7)', 'rgba(244,244,245, 0.3)');
|
|
@@ -371,7 +363,7 @@ const TextInputFieldIconAlert = styled.div.withConfig({
|
|
|
371
363
|
padding: 0 10px 0 30px;
|
|
372
364
|
opacity: 0.6;
|
|
373
365
|
transition: opacity 250ms;
|
|
374
|
-
${props => props
|
|
366
|
+
${props => props.$type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402')}
|
|
375
367
|
svg {
|
|
376
368
|
margin-top: 12px;
|
|
377
369
|
width: 15px;
|
|
@@ -405,7 +397,7 @@ const TextInput = styled.div.withConfig({
|
|
|
405
397
|
|
|
406
398
|
${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {
|
|
407
399
|
${activeLabel};
|
|
408
|
-
${props => props
|
|
400
|
+
${props => props.$type === 'error' && props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
409
401
|
}
|
|
410
402
|
`;
|
|
411
403
|
const Description = styled.div.withConfig({
|
|
@@ -418,11 +410,11 @@ const Description = styled.div.withConfig({
|
|
|
418
410
|
|
|
419
411
|
${props => props.theme.themeProp('color', props.theme.getColor('gray-400'), props.theme.getColor('gray-500'))};
|
|
420
412
|
|
|
421
|
-
${props => (props
|
|
413
|
+
${props => (props.$type === 'warning-border' || props.$type === 'warning') && css`
|
|
422
414
|
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('orange-500'))}
|
|
423
415
|
`}
|
|
424
416
|
|
|
425
|
-
${props => (props
|
|
417
|
+
${props => (props.$type === 'error-border' || props.$type === 'error') && css`
|
|
426
418
|
${props.theme.themeProp('color', props.theme.getColor('red-200'), props.theme.getColor('red-500'))}
|
|
427
419
|
`}
|
|
428
420
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.styled.js","sources":["../../../src/components/inputs/TextArea/TextArea.styled.js"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst fadeInCheck = keyframes`\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n`;\n\nconst fadeOutCheck = keyframes`\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n`;\n\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n`;\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const TextAreaContainter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n height: 19px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 13px;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n align-items: flex-start;\n\n position: absolute;\n right: 15px;\n top: 10px;\n bottom: 0;\n > .smallPadingIcon {\n padding: 4px;\n width: 15px;\n height: 15px;\n border-radius: 5px;\n opacity: 1;\n margin-top: -5px;\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-300'),\n '!important'\n )}\n }\n svg {\n width: 15px;\n opacity: 0.7;\n transition: opacity 250ms;\n\n ${props =>\n props.disabled &&\n css`\n display: none;\n `}\n }\n`;\n\nexport const TextInputField = styled.textarea\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 3px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n transition:\n height 550ms ease-in-out,\n border-color 350ms,\n background 350ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n\n ${props =>\n props.$borderRadius &&\n css`\n border-radius: ${props.$borderRadius}px;\n `}\n\n ${props => {\n if (props.type === 'error') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#7f1b1b', '#FBEAE6')}\n ${props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `;\n } else if (props.type === 'warning') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')}\n ${props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `;\n } else if (props.type === 'error-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `;\n } else if (props.type === 'warning-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n `;\n }\n }}\n\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n border-color: transparent !important;\n padding: 12px 10px;\n `}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n\n\n ${props =>\n props.$noBorder &&\n !props.type &&\n css`\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n `} \n\n ${props =>\n props.$noBorder &&\n props.type === 'warning' &&\n css`\n ${props => props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `}\n\n ${props =>\n props.$noBorder &&\n props.type === 'error' &&\n css`\n ${props => props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `}\n\n\n ${props =>\n props.padding === 'small' &&\n css`\n padding: 5px 10px;\n `}\n\n ${props =>\n props.padding === 'medium' &&\n css`\n padding: 13px 15px;\n `}\n\n ${props =>\n props.padding === 'large' &&\n css`\n padding: 15px 55px;\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n `}\n\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.disabled) {\n return '';\n }\n if (props.readOnly) {\n if (props.type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else if (!props.disabled) {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n return '';\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n\n ${props =>\n props.$noBorder && !props.readOnly && props.type !== 'warning' && props.type !== 'error'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )\n : ''}\n\n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n }\n\n &::placeholder {\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n ${props => {\n if (props.type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n } else if (props.type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-200'),\n props.theme.getColor('gray-700')\n );\n }\n return '';\n }}\n }\n\n &:hover::placeholder {\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n ${props => {\n if (props.type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-900')\n );\n } else if (props.type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('red-600'),\n props.theme.getColor('red-600')\n );\n } else {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n );\n }\n }}\n }\n\n &:focus::placeholder {\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n ${props => {\n if (props.type === 'warning') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-900')\n );\n } else if (props.type === 'error') {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('red-600'),\n props.theme.getColor('red-600')\n );\n } else {\n return props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n );\n }\n }}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-600')\n )}\n ${props.theme.themeProp('background', 'transparent', props.theme.getColor('white'))}\n `;\n }\n }}\n }\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')}\n\n ${props =>\n props.$noBorder &&\n props.$edit &&\n css`\n ${props => props.theme.themeProp('border-color', '#27272A', 'rgba(244,244,245, 0.3)')}\n `}\n }\n`;\n\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 13px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n margin-botton: 50px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n !props.$inputIsEmpty &&\n css`\n ${activeLabel}\n `}\n\n ${props =>\n props.$hasPlaceholder &&\n css`\n ${activeLabel};\n `}\n content: \"\";\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 55px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\nexport const TextInputFieldIconAlert = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 2.8px;\n display: flex;\n padding: 0 10px 0 30px;\n opacity: 0.6;\n transition: opacity 250ms;\n ${props => props.type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402')}\n svg {\n margin-top: 12px;\n width: 15px;\n }\n`;\n\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n flex-basis: ${props => (props.$fieldLabel ? '66.66%' : '100%')};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.type === 'error' &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n }\n`;\n\nexport const Description = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n (props.type === 'warning-border' || props.type === 'warning') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n\n ${props =>\n (props.type === 'error-border' || props.type === 'error') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n`;\n\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n position: absolute;\n margin-top: -35px;\n margin-left: 5px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 15px;\n }\n`;\n\nexport const SuccessContainerLabel = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n margin-top: -7px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 13px;\n }\n`;\n"],"names":["fadeInCheck","keyframes","fadeOutCheck","activeLabel","css","shouldForwardProp","prop","startsWith","TextAreaContainter","styled","div","withConfig","attrs","applyDefaultTheme","Label","label","props","theme","themeProp","getColor","disabled","InputIconContainer","TextInputField","textarea","$borderRadius","type","readOnly","$noBorder","padding","$hasIcon","$edit","TextInputLabel","$inputIsEmpty","$hasPlaceholder","TextInputFieldIcon","TextInputFieldIconAlert","TextInput","$fieldLabel","Description","SuccessContainer","$fadeIn","SuccessContainerLabel"],"mappings":";;;AAGA,MAAMA,WAAW,GAAGC,SAAS,CAAA;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,YAAY,GAAGD,SAAS,CAAA;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAME,WAAW,GAAGC,GAAG,CAAA;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,iBAAiB,GAAGC,IAAI,IAAI;EAChC,OAAOA,IAAI,KAAK,OAAO,IAAI,CAACA,IAAI,CAACC,UAAU,CAAC,GAAG,CAAC,CAAA;AAClD,CAAC,CAAA;AAEM,MAAMC,kBAAkB,GAAGC,MAAM,CAACC,GAAG,CACzCC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA,EAAC;AAEM,MAAMC,KAAK,GAAGL,MAAM,CAACM,KAAK,CAC9BJ,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B,EAAIG,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,OAAO,CAAC,EAC7BH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,EAAIH,KAAK,IACLA,KAAK,CAACI,QAAQ,IACdhB,GAA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CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"TextArea.styled.js","sources":["../../../src/components/inputs/TextArea/TextArea.styled.js"],"sourcesContent":["import styled, { css, keyframes } from 'styled-components';\nimport { applyDefaultTheme } from '../../../utils/defaultTheme';\n\nconst fadeInCheck = keyframes`\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n`;\n\nconst fadeOutCheck = keyframes`\n from {\n opacity: 1\n }\n to {\n opacity: 0\n }\n`;\n\nconst activeLabel = css`\n font-size: 0.75rem;\n padding: 0 3px;\n top: -7px;\n letter-spacing: 0.03em;\n left: 8px !important;\n opacity: 1 !important;\n`;\n\nconst shouldForwardProp = prop => {\n return prop !== 'theme' && !prop.startsWith('$');\n};\n\nexport const TextAreaContainter = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n display: flex;\n`;\n\nexport const Label = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n flex-basis: 33.33%;\n font-size: 0.875rem;\n line-height: 1rem;\n height: 19px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-top: 13px;\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n`;\n\nexport const InputIconContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 0;\n pointer-events: none;\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n display: flex;\n align-items: flex-start;\n\n position: absolute;\n right: 15px;\n top: 10px;\n bottom: 0;\n > .smallPadingIcon {\n padding: 4px;\n width: 15px;\n height: 15px;\n border-radius: 5px;\n opacity: 1;\n margin-top: -5px;\n ${props =>\n props.theme.themeProp(\n 'background-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('gray-300'),\n '!important'\n )}\n }\n svg {\n width: 15px;\n opacity: 0.7;\n transition: opacity 250ms;\n\n ${props =>\n props.disabled &&\n css`\n display: none;\n `}\n }\n`;\n\nexport const TextInputField = styled.textarea\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n width: 100%;\n font-family: inherit;\n font-size: 0.875rem;\n border-radius: 3px;\n padding: 5px 10px;\n resize: vertical;\n z-index: 0;\n box-sizing: border-box;\n appearance: none;\n border: 1px solid;\n transition:\n height 550ms ease-in-out,\n border-color 350ms,\n background 350ms;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n\n ${props =>\n props.$borderRadius &&\n css`\n border-radius: ${props.$borderRadius}px;\n `}\n\n ${props => {\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#7f1b1b', '#FBEAE6')}\n ${props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('color', 'white', 'black')}\n ${props.theme.themeProp('background', '#634E01', '#FFFDE8')}\n ${props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `;\n } else if (props.$type === 'error-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `;\n } else if (props.$type === 'warning-border') {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-100'),\n props.theme.getColor('gray-900')\n )}\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n ${props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-500'),\n props.theme.getColor('gray-400')\n )}\n `;\n }\n }}\n\n\n ${props =>\n props.readOnly &&\n css`\n cursor: default;\n border-color: transparent !important;\n padding: 12px 10px;\n `}\n\n ${props =>\n props.disabled &&\n css`\n cursor: not-allowed;\n `}\n\n\n ${props =>\n props.$noBorder &&\n !props.$type &&\n css`\n ${props =>\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-900'),\n props.theme.getColor('white')\n )}\n `} \n\n ${props =>\n props.$noBorder &&\n props.$type === 'warning' &&\n css`\n ${props => props.theme.themeProp('border-color', '#634E01', '#FFFDE8')}\n `}\n\n ${props =>\n props.$noBorder &&\n props.$type === 'error' &&\n css`\n ${props => props.theme.themeProp('border-color', '#7f1b1b', '#FBEAE6')}\n `}\n\n\n ${props =>\n props.padding === 'small' &&\n css`\n padding: 5px 10px;\n `}\n\n ${props =>\n props.padding === 'medium' &&\n css`\n padding: 13px 15px;\n `}\n\n ${props =>\n props.padding === 'large' &&\n css`\n padding: 15px 55px;\n `}\n\n ${props =>\n props.$hasIcon &&\n css`\n padding-left: 55px;\n padding-right: 35px;\n padding-top: 13.5px;\n `}\n\n\n &&:hover:not(:focus) {\n ${props => {\n if (props.disabled) {\n return '';\n }\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#901d1d', '#F7D5D0');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#806403', '#FFFEBF');\n } else if (!props.disabled) {\n return props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n );\n }\n return '';\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp(\n 'border-color',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n\n ${props =>\n props.$noBorder && !props.readOnly && props.$type !== 'warning' && props.$type !== 'error'\n ? props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )\n : ''}\n\n & + ${InputIconContainer} {\n opacity: 1;\n ${props =>\n props.$type === 'success' &&\n css`\n opacity: 0;\n `}\n }\n }\n\n&::placeholder {\n ${props => {\n if (props.$type === 'error' || props.$type === 'warning') {\n return css`\n color: ${props.theme.getColor('gray-400')};\n opacity: 0.9;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )}\n opacity: 0.6;\n `;\n }\n }}\n}\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )};\n\n\n\n &:focus::placeholder {\n ${props => {\n if (props.$type === 'warning' || props.$type === 'error') {\n return css`\n color: ${props.theme.getColor('gray-500')} !important;\n opacity: 0.8 !important;\n `;\n } else {\n return css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-600')\n )}\n `;\n }\n }}\n }\n\n &&:focus {\n outline: none;\n\n ${props => {\n if (props.readOnly) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FBEAE6');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n }\n return '';\n }\n\n if (props.$type === 'error') {\n return css`\n ${props.theme.themeProp('border-color', '#D83018', '#D83018')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else if (props.$type === 'warning') {\n return css`\n ${props.theme.themeProp('border-color', '#F4E21E', '#F4E21E')}\n ${props.theme.themeProp('background', 'white', 'white')}\n ${props.theme.themeProp('color', 'black', 'black')}\n `;\n } else {\n return css`\n border-color: ${props.theme.getColor('gray-600')};\n ${props.theme.themeProp(\n 'background',\n props.theme.getColor('gray-700'),\n props.theme.getColor('gray-100')\n )}\n `;\n }\n }}\n }\n\n &&:not(:hover):not(:focus) {\n ${props => {\n if (props.$edit) {\n if (props.$type === 'error') {\n return props.theme.themeProp('background', '#7f1b1b', '#FEE2E2');\n } else if (props.$type === 'warning') {\n return props.theme.themeProp('background', '#634E01', '#FFFDE8');\n } else {\n return props.theme.themeProp(\n 'background',\n 'rgba(39,39,42, 0.7)',\n 'rgba(244,244,245, 0.3)'\n );\n }\n }\n }}\n\n ${props =>\n props.$edit &&\n props.theme.themeProp('border-color', 'rgba(39,39,42, 0.7)', 'rgba(228,228,231, 0.3)')}\n\n ${props =>\n props.$noBorder &&\n props.$edit &&\n css`\n ${props => props.theme.themeProp('border-color', '#27272A', 'rgba(244,244,245, 0.3)')}\n `}\n }\n`;\n\nexport const TextInputLabel = styled.label\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 13px;\n left: 11px;\n line-height: 1.2;\n font-size: 0.875rem;\n transition: all 150ms;\n margin-botton: 50px;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('white'),\n props.theme.getColor('gray-700')\n )};\n\n ${props => props.theme.themeProp('opacity', 0.6, 0.5)}\n\n\n ${props =>\n props.theme.themeProp(\n 'background',\n `linear-gradient(0deg, ${props.theme.getColor('gray-900')} calc(50% + 1px), transparent 50%)`,\n `linear-gradient(0deg, ${props.theme.getColor('white')} calc(50% + 1px), transparent 50%)`\n )}\n\n ${props =>\n !props.$inputIsEmpty &&\n css`\n ${activeLabel}\n `}\n\n ${props =>\n props.$hasPlaceholder &&\n css`\n ${activeLabel};\n `}\n content: \"\";\n\n ${props =>\n props.$hasIcon &&\n css`\n left: 55px;\n `}\n`;\n\nexport const TextInputFieldIcon = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 0;\n left: 0;\n height: 2.625rem;\n display: flex;\n padding: 0 10px;\n\n svg {\n width: 15px;\n opacity: 0.6;\n transition: opacity 250ms;\n }\n`;\n\nexport const TextInputFieldIconAlert = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: absolute;\n top: 2.8px;\n display: flex;\n padding: 0 10px 0 30px;\n opacity: 0.6;\n transition: opacity 250ms;\n ${props => props.$type === 'warning' && props.theme.themeProp('color', '#EAB308', '#2F2402')}\n svg {\n margin-top: 12px;\n width: 15px;\n }\n`;\n\nexport const TextInput = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n position: relative;\n flex-basis: ${props => (props.$fieldLabel ? '66.66%' : '100%')};\n\n ${props =>\n props.disabled &&\n css`\n opacity: 0.5;\n\n > * {\n cursor: not-allowed;\n }\n `}\n\n &:focus-within {\n ${TextInputLabel} {\n ${activeLabel};\n }\n\n ${TextInputFieldIcon} {\n svg {\n opacity: 1;\n }\n }\n }\n\n ${TextInputField}:not(:placeholder-shown) + ${TextInputLabel} {\n ${activeLabel};\n ${props =>\n props.$type === 'error' &&\n props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n }\n`;\n\nexport const Description = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n margin: 8px 0 0 0;\n padding: 0 0.6875rem;\n font-size: 0.75rem;\n line-height: 1.333;\n\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-400'),\n props.theme.getColor('gray-500')\n )};\n\n ${props =>\n (props.$type === 'warning-border' || props.$type === 'warning') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('orange-500')\n )}\n `}\n\n ${props =>\n (props.$type === 'error-border' || props.$type === 'error') &&\n css`\n ${props.theme.themeProp(\n 'color',\n props.theme.getColor('red-200'),\n props.theme.getColor('red-500')\n )}\n `}\n`;\n\nexport const SuccessContainer = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n position: absolute;\n margin-top: -35px;\n margin-left: 5px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 15px;\n }\n`;\n\nexport const SuccessContainerLabel = styled.div\n .withConfig({\n shouldForwardProp\n })\n .attrs(applyDefaultTheme)`\n opacity: 1;\n pointer-events: none;\n opacity: ${props => (props.$fadeIn ? 0 : 1)};\n animation: ${props => (props.$fadeIn ? fadeOutCheck : fadeInCheck)} 0.5s ease-in-out;\n transition: opacity 0.5s ease-in-out;\n margin-right: 5px;\n margin-top: -7px;\n width: 15px;\n height: 15px;\n padding: 5px;\n ${props =>\n props.theme.themeProp(\n 'color',\n props.theme.getColor('gray-300'),\n props.theme.getColor('gray-500')\n )}\n\n > svg {\n width: 13px;\n }\n`;\n"],"names":["fadeInCheck","keyframes","fadeOutCheck","activeLabel","css","shouldForwardProp","prop","startsWith","TextAreaContainter","styled","div","withConfig","attrs","applyDefaultTheme","Label","label","props","theme","themeProp","getColor","disabled","InputIconContainer","TextInputField","textarea","$borderRadius","$type","readOnly","$noBorder","padding","$hasIcon","$edit","TextInputLabel","$inputIsEmpty","$hasPlaceholder","TextInputFieldIcon","TextInputFieldIconAlert","TextInput","$fieldLabel","Description","S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AA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,WAAaG,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAG,CAAC,GAAG,CAAE,CAAA;AAC7C,aAAexB,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAGtC,YAAY,GAAGF,WAAY,CAAA;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAIgB,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA,EAAC;AAEM,MAAMsB,qBAAqB,GAAGhC,MAAM,CAACC,GAAG,CAC5CC,UAAU,CAAC;AACVN,EAAAA,iBAAAA;AACF,CAAC,CAAC,CACDO,KAAK,CAACC,iBAAiB,CAAC,CAAA;AAC3B;AACA;AACA,WAAaG,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAG,CAAC,GAAG,CAAE,CAAA;AAC7C,aAAexB,EAAAA,KAAK,IAAKA,KAAK,CAACwB,OAAO,GAAGtC,YAAY,GAAGF,WAAY,CAAA;AACpE;AACA;AACA;AACA;AACA;AACA;AACA,EAAIgB,EAAAA,KAAK,IACLA,KAAK,CAACC,KAAK,CAACC,SAAS,CACnB,OAAO,EACPF,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CAAC,EAChCH,KAAK,CAACC,KAAK,CAACE,QAAQ,CAAC,UAAU,CACjC,CAAC,CAAA;AACL;AACA;AACA;AACA;AACA;;;;"}
|
|
@@ -59,7 +59,16 @@ function applyDefaultTheme({
|
|
|
59
59
|
}) {
|
|
60
60
|
return {
|
|
61
61
|
...props,
|
|
62
|
-
theme:
|
|
62
|
+
theme: {
|
|
63
|
+
...defaultTheme,
|
|
64
|
+
...theme,
|
|
65
|
+
getColor: typeof theme.getColor === 'function' ? theme.getColor : defaultTheme.getColor,
|
|
66
|
+
themeProp: typeof theme.themeProp === 'function' ? theme.themeProp : defaultTheme.themeProp,
|
|
67
|
+
primaryFontFamily: theme.primaryFontFamily || defaultTheme.primaryFontFamily,
|
|
68
|
+
secondaryFontFamily: theme.secondaryFontFamily || defaultTheme.secondaryFontFamily,
|
|
69
|
+
spacing: theme.spacing || defaultTheme.spacing,
|
|
70
|
+
colors: theme.colors || defaultTheme.colors
|
|
71
|
+
}
|
|
63
72
|
};
|
|
64
73
|
}
|
|
65
74
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTheme.js","sources":["../../src/utils/defaultTheme.js"],"sourcesContent":["import { colors } from '../styles/utils/colors-export';\nimport { css } from 'styled-components';\n\nexport const defaultTheme = {\n getColor: name => {\n if (!colors[name]) throw Error(`The color \"${name}\" is not registered.`);\n return colors[name];\n },\n primaryFontFamily: \"'Roboto', sans-serif\",\n secondaryFontFamily: \"'Overpass', sans-serif\",\n themeProp,\n spacing: {\n baseUnit: 4,\n controlHeight: 38,\n menuGutter: 8\n },\n colors: {\n
|
|
1
|
+
{"version":3,"file":"defaultTheme.js","sources":["../../src/utils/defaultTheme.js"],"sourcesContent":["import { colors } from '../styles/utils/colors-export';\nimport { css } from 'styled-components';\n\nexport const defaultTheme = {\n getColor: name => {\n if (!colors[name]) throw Error(`The color \"${name}\" is not registered.`);\n return colors[name];\n },\n primaryFontFamily: \"'Roboto', sans-serif\",\n secondaryFontFamily: \"'Overpass', sans-serif\",\n themeProp,\n spacing: {\n baseUnit: 4,\n controlHeight: 38,\n menuGutter: 8\n },\n colors: {\n primary: colors['emerald-500'],\n primary75: colors['emerald-400'],\n primary50: colors['emerald-300'],\n primary25: colors['emerald-200'],\n danger: colors['red-500'],\n neutral0: colors['white'],\n neutral5: colors['gray-50'],\n neutral10: colors['gray-100'],\n neutral20: colors['gray-300'],\n neutral30: colors['gray-400'],\n neutral40: colors['gray-500'],\n neutral50: colors['gray-600'],\n neutral60: colors['gray-700'],\n neutral70: colors['gray-800'],\n neutral80: colors['gray-900'],\n neutral90: colors['black']\n }\n};\n\n/**\n * Applies a different css property value for dark and light mode\n * @param {string} property - The css property to apply - Eg: `color`, `background`\n * @param {string} darkMode - The value that will be applied in dark mode\n * @param {string} lightMode - The value that will be applied in light mode - Will also be used if either dark or light mode is set\n * @param specificity\n */\nfunction themeProp(property, darkMode, lightMode, specificity = 2) {\n const specificityString = Array(specificity).fill('&').join('');\n\n return css`\n body.dark-theme ${specificityString} {\n ${property}: ${darkMode};\n }\n\n body.light-theme ${specificityString} {\n ${property}: ${lightMode};\n }\n\n body:not(.light-theme):not(.dark-theme) ${specificityString} {\n ${property}: ${lightMode};\n\n @media (prefers-color-scheme: dark) {\n ${property}: ${darkMode};\n }\n }\n `;\n}\n\nexport function applyDefaultTheme({ theme = {}, ...props }) {\n return {\n ...props,\n theme: {\n ...defaultTheme,\n ...theme,\n getColor: typeof theme.getColor === 'function' ? theme.getColor : defaultTheme.getColor,\n themeProp: typeof theme.themeProp === 'function' ? theme.themeProp : defaultTheme.themeProp,\n primaryFontFamily: theme.primaryFontFamily || defaultTheme.primaryFontFamily,\n secondaryFontFamily: theme.secondaryFontFamily || defaultTheme.secondaryFontFamily,\n spacing: theme.spacing || defaultTheme.spacing,\n colors: theme.colors || defaultTheme.colors\n }\n };\n}\n"],"names":["defaultTheme","getColor","name","colors","Error","primaryFontFamily","secondaryFontFamily","themeProp","spacing","baseUnit","controlHeight","menuGutter","primary","primary75","primary50","primary25","danger","neutral0","neutral5","neutral10","neutral20","neutral30","neutral40","neutral50","neutral60","neutral70","neutral80","neutral90","property","darkMode","lightMode","specificity","specificityString","Array","fill","join","css","applyDefaultTheme","theme","props"],"mappings":";;;AAGO,MAAMA,YAAY,GAAG;EAC1BC,QAAQ,EAAEC,IAAI,IAAI;AAChB,IAAA,IAAI,CAACC,MAAM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AK,CAAChC,mBAAmB,IAAIN,YAAY,CAACM,mBAAmB;AAClFE,MAAAA,OAAO,EAAE8B,KAAK,CAAC9B,OAAO,IAAIR,YAAY,CAACQ,OAAO;AAC9CL,MAAAA,MAAM,EAAEmC,KAAK,CAACnC,MAAM,IAAIH,YAAY,CAACG,MAAAA;AACvC,KAAA;GACD,CAAA;AACH;;;;"}
|
|
@@ -28,7 +28,7 @@ const ComputedRootComponent = ({
|
|
|
28
28
|
asset,
|
|
29
29
|
...props
|
|
30
30
|
}) => {
|
|
31
|
-
const newProps = mapKeys(omit(props, ['theme', 'extendedSelectMode']), (_, key) => key === 'innerRef' ? 'ref' : key);
|
|
31
|
+
const newProps = mapKeys(omit(props, ['theme', 'extendedSelectMode', 'softSelected', 'collapseExtraInfo', 'customSelectedBorder']), (_, key) => key === 'innerRef' ? 'ref' : key);
|
|
32
32
|
if (component) {
|
|
33
33
|
if (!isFunction(component)) throw Error('Expected a function in component-prop');
|
|
34
34
|
if (React__default.isValidElement(component(asset, newProps.children))) {
|
|
@@ -340,7 +340,7 @@ const AssetGalleryCompactCard = props => {
|
|
|
340
340
|
height: '100%'
|
|
341
341
|
}
|
|
342
342
|
}, getReferenceProps()), React__default.createElement(OverlayBackdrop, {
|
|
343
|
-
softSelected: softSelected,
|
|
343
|
+
$softSelected: softSelected,
|
|
344
344
|
selected: selected
|
|
345
345
|
}), asset?.actions && React__default.createElement(OverlayInfoTopActions, {
|
|
346
346
|
$isOverlayHovered: isOverlayHovered
|
|
@@ -348,7 +348,7 @@ const AssetGalleryCompactCard = props => {
|
|
|
348
348
|
actions: asset.actions,
|
|
349
349
|
asset: asset
|
|
350
350
|
})), React__default.createElement(OverlayInfo, null, isOverlayHovered && React__default.createElement("span", null, asset.title), React__default.createElement(OverlayInfoTop, null, React__default.createElement(OverlayInfoTopLeft, {
|
|
351
|
-
collapseExtraInfo: collapseExtraInfo
|
|
351
|
+
$collapseExtraInfo: collapseExtraInfo
|
|
352
352
|
}, renderBadge()), asset?.note?.title && React__default.createElement(OverlayInfoTopWarning, {
|
|
353
353
|
type: asset?.note?.type
|
|
354
354
|
}, React__default.createElement(SvgWarningCircle, null))), React__default.createElement(OverlayInfoBottom, null, selectable && React__default.createElement(OverlayInfoBottomSelectButton, {
|
|
@@ -356,13 +356,13 @@ const AssetGalleryCompactCard = props => {
|
|
|
356
356
|
}, React__default.createElement(SvgCheckRectangleFilled, {
|
|
357
357
|
onClick: onSelectClick
|
|
358
358
|
})), React__default.createElement(OverlayInfoBottomMediaIcon, null, renderMediaBadge()))), asset.completed && React__default.createElement(OverlayCompleted, {
|
|
359
|
-
softSelected: softSelected
|
|
359
|
+
$softSelected: softSelected
|
|
360
360
|
}), asset.hasError && React__default.createElement(OverlayHasError, {
|
|
361
|
-
softSelected: softSelected
|
|
361
|
+
$softSelected: softSelected
|
|
362
362
|
}), selectable && React__default.createElement(OverlaySelected, {
|
|
363
363
|
selected: selected,
|
|
364
|
-
softSelected: softSelected,
|
|
365
|
-
customSelectedBorder: customSelectedBorder
|
|
364
|
+
$softSelected: softSelected,
|
|
365
|
+
$customSelectedBorder: customSelectedBorder
|
|
366
366
|
}), isOpen && isOverlayHovered && isMounted && activeSummaryCard && !isAnySubActionsOpened && React__default.createElement("div", _extends({
|
|
367
367
|
ref: refs.setFloating,
|
|
368
368
|
style: floatingStyles
|
|
@@ -396,7 +396,7 @@ AssetGalleryCompactCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
396
396
|
extendedSelectMode: PropTypes.bool,
|
|
397
397
|
onAssetSelected: PropTypes.func.isRequired,
|
|
398
398
|
onAssetUnselected: PropTypes.func.isRequired,
|
|
399
|
-
softSelected: PropTypes.bool
|
|
399
|
+
softSelected: PropTypes.bool,
|
|
400
400
|
component: PropTypes.func,
|
|
401
401
|
scrollPosition: PropTypes.number,
|
|
402
402
|
collapseExtraInfo: PropTypes.bool,
|