@chayns-components/core 5.0.43 → 5.0.45
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/lib/cjs/components/checkbox/Checkbox.js +7 -1
- package/lib/cjs/components/checkbox/Checkbox.js.map +1 -1
- package/lib/cjs/components/checkbox/Checkbox.styles.js +17 -8
- package/lib/cjs/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/cjs/components/list/List.js +60 -46
- package/lib/cjs/components/list/List.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.js +141 -56
- package/lib/cjs/components/text-area/TextArea.js.map +1 -1
- package/lib/cjs/components/text-area/TextArea.styles.js +10 -9
- package/lib/cjs/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/esm/components/checkbox/Checkbox.js +7 -1
- package/lib/esm/components/checkbox/Checkbox.js.map +1 -1
- package/lib/esm/components/checkbox/Checkbox.styles.js +17 -8
- package/lib/esm/components/checkbox/Checkbox.styles.js.map +1 -1
- package/lib/esm/components/list/List.js +60 -46
- package/lib/esm/components/list/List.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.js +141 -56
- package/lib/esm/components/text-area/TextArea.js.map +1 -1
- package/lib/esm/components/text-area/TextArea.styles.js +10 -9
- package/lib/esm/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/types/components/checkbox/Checkbox.d.ts +20 -1
- package/lib/types/components/checkbox/Checkbox.styles.d.ts +5 -0
- package/lib/types/components/text-area/TextArea.d.ts +8 -0
- package/lib/types/components/text-area/TextArea.styles.d.ts +5 -1
- package/package.json +2 -2
|
@@ -16,6 +16,8 @@ const Checkbox = ({
|
|
|
16
16
|
labelClassName,
|
|
17
17
|
onChange,
|
|
18
18
|
shouldShowAsSwitch,
|
|
19
|
+
borderRadius,
|
|
20
|
+
colors,
|
|
19
21
|
shouldShowCentered = false,
|
|
20
22
|
shouldChangeOnLabelClick = true
|
|
21
23
|
}) => {
|
|
@@ -59,7 +61,11 @@ const Checkbox = ({
|
|
|
59
61
|
ref: checkboxBoxRef,
|
|
60
62
|
$isChecked: isChecked ?? isActive,
|
|
61
63
|
$isDisabled: isDisabled,
|
|
62
|
-
$shouldShowAsSwitch: shouldShowAsSwitch
|
|
64
|
+
$shouldShowAsSwitch: shouldShowAsSwitch,
|
|
65
|
+
$checkedBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.checkedBackgroundColor,
|
|
66
|
+
$uncheckedBackgroundColor: colors === null || colors === void 0 ? void 0 : colors.uncheckedBackgroundColor,
|
|
67
|
+
$borderRadius: borderRadius,
|
|
68
|
+
$borderColor: colors === null || colors === void 0 ? void 0 : colors.borderColor
|
|
63
69
|
})), /*#__PURE__*/_react.default.createElement(_Checkbox.StyledCheckboxLabel, {
|
|
64
70
|
className: labelClassName,
|
|
65
71
|
$isDisabled: isDisabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["_react","_interopRequireWildcard","require","_uuid","_calculate","_Checkbox","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Checkbox","children","isChecked","isDisabled","labelClassName","onChange","shouldShowAsSwitch","shouldShowCentered","shouldChangeOnLabelClick","isActive","setIsActive","useState","checkboxTop","setCheckboxTop","undefined","checkboxBoxRef","useRef","checkboxRootRef","handleChange","useCallback","event","target","checked","uuid","useUuid","useEffect","current","_checkboxBoxRef$curre","singleLineHeight","getHeightOfSingleTextLine","container","boxHeight","getBoundingClientRect","height","createElement","StyledCheckbox","ref","StyledCheckboxInput","disabled","id","type","StyledCheckboxBoxWrapper","$shouldShowAsSwitch","style","top","transform","StyledCheckboxBox","htmlFor","$isChecked","$isDisabled","StyledCheckboxLabel","className","$shouldChangeOnLabelClick","displayName","_default","exports"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n FC,\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport { getHeightOfSingleTextLine } from '../../utils/calculate';\nimport {\n StyledCheckbox,\n StyledCheckboxBox,\n StyledCheckboxBoxWrapper,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n} from './Checkbox.styles';\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactElement | string;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Classname for the label\n */\n labelClassName?: string;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether the label should change the state of the checkbox\n */\n shouldChangeOnLabelClick?: boolean;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n /**\n * Whether the Checkbox should be displayed centered to the label or at the top\n */\n shouldShowCentered?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n labelClassName,\n onChange,\n shouldShowAsSwitch,\n shouldShowCentered = false,\n shouldChangeOnLabelClick = true,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n const [checkboxTop, setCheckboxTop] = useState<number | undefined>(undefined);\n\n const checkboxBoxRef = useRef<HTMLLabelElement>(null);\n const checkboxRootRef = useRef<HTMLDivElement>(null);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange],\n );\n\n const uuid = useUuid();\n\n useEffect(() => {\n if (checkboxRootRef.current && !shouldShowCentered) {\n const singleLineHeight = getHeightOfSingleTextLine({\n container: checkboxRootRef.current,\n });\n\n const boxHeight = checkboxBoxRef.current?.getBoundingClientRect().height ?? 0;\n\n setCheckboxTop((singleLineHeight - boxHeight) / 2);\n }\n }, [shouldShowCentered]);\n\n return (\n <StyledCheckbox ref={checkboxRootRef}>\n <StyledCheckboxInput\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n\n <StyledCheckboxBoxWrapper\n $shouldShowAsSwitch={shouldShowAsSwitch}\n style={{\n top: shouldShowCentered ? '50%' : checkboxTop,\n transform: shouldShowCentered ? 'translateY(-50%)' : undefined,\n }}\n >\n <StyledCheckboxBox\n htmlFor={uuid}\n ref={checkboxBoxRef}\n $isChecked={isChecked ?? isActive}\n $isDisabled={isDisabled}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n />\n </StyledCheckboxBoxWrapper>\n <StyledCheckboxLabel\n className={labelClassName}\n $isDisabled={isDisabled}\n $shouldChangeOnLabelClick={shouldChangeOnLabelClick}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n htmlFor={shouldChangeOnLabelClick ? uuid : undefined}\n >\n {children}\n </StyledCheckboxLabel>\n </StyledCheckbox>\n );\n};\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":["_react","_interopRequireWildcard","require","_uuid","_calculate","_Checkbox","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Checkbox","children","isChecked","isDisabled","labelClassName","onChange","shouldShowAsSwitch","borderRadius","colors","shouldShowCentered","shouldChangeOnLabelClick","isActive","setIsActive","useState","checkboxTop","setCheckboxTop","undefined","checkboxBoxRef","useRef","checkboxRootRef","handleChange","useCallback","event","target","checked","uuid","useUuid","useEffect","current","_checkboxBoxRef$curre","singleLineHeight","getHeightOfSingleTextLine","container","boxHeight","getBoundingClientRect","height","createElement","StyledCheckbox","ref","StyledCheckboxInput","disabled","id","type","StyledCheckboxBoxWrapper","$shouldShowAsSwitch","style","top","transform","StyledCheckboxBox","htmlFor","$isChecked","$isDisabled","$checkedBackgroundColor","checkedBackgroundColor","$uncheckedBackgroundColor","uncheckedBackgroundColor","$borderRadius","$borderColor","borderColor","StyledCheckboxLabel","className","$shouldChangeOnLabelClick","displayName","_default","exports"],"sources":["../../../../src/components/checkbox/Checkbox.tsx"],"sourcesContent":["import React, {\n ChangeEvent,\n ChangeEventHandler,\n CSSProperties,\n FC,\n ReactElement,\n useCallback,\n useEffect,\n useRef,\n useState,\n} from 'react';\nimport { useUuid } from '../../hooks/uuid';\nimport { getHeightOfSingleTextLine } from '../../utils/calculate';\nimport {\n StyledCheckbox,\n StyledCheckboxBox,\n StyledCheckboxBoxWrapper,\n StyledCheckboxInput,\n StyledCheckboxLabel,\n} from './Checkbox.styles';\n\ntype CheckboxColors = {\n /**\n * Background color for the checked state.\n */\n checkedBackgroundColor?: CSSProperties['backgroundColor'];\n /**\n * Background color for the unchecked state.\n */\n uncheckedBackgroundColor?: CSSProperties['backgroundColor'];\n\n /**\n * Border color for the checkbox or switch indicator.\n */\n borderColor?: CSSProperties['borderColor'];\n};\n\nexport type CheckboxProps = {\n /**\n * Text for checkbox or switch\n */\n children?: ReactElement | string;\n /**\n * Indicates whether the checkbox or switch is selected\n */\n isChecked?: boolean;\n /**\n * Disables the checkbox or switch so it cannot be toggled\n */\n isDisabled?: boolean;\n /**\n * Classname for the label\n */\n labelClassName?: string;\n /**\n * Function to be executed if the checked value changes\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Whether the label should change the state of the checkbox\n */\n shouldChangeOnLabelClick?: boolean;\n /**\n * Changes the design to use switch instead of checkbox\n */\n shouldShowAsSwitch?: boolean;\n /**\n * Border radius for the checkbox or switch indicator.\n */\n borderRadius?: CSSProperties['borderRadius'];\n colors?: CheckboxColors;\n /**\n * Whether the Checkbox should be displayed centered to the label or at the top\n */\n shouldShowCentered?: boolean;\n};\n\nconst Checkbox: FC<CheckboxProps> = ({\n children,\n isChecked,\n isDisabled,\n labelClassName,\n onChange,\n shouldShowAsSwitch,\n borderRadius,\n colors,\n shouldShowCentered = false,\n shouldChangeOnLabelClick = true,\n}) => {\n const [isActive, setIsActive] = useState(isChecked ?? false);\n const [checkboxTop, setCheckboxTop] = useState<number | undefined>(undefined);\n\n const checkboxBoxRef = useRef<HTMLLabelElement>(null);\n const checkboxRootRef = useRef<HTMLDivElement>(null);\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLInputElement>) => {\n setIsActive(event.target.checked);\n\n if (typeof onChange === 'function') {\n onChange(event);\n }\n },\n [onChange],\n );\n\n const uuid = useUuid();\n\n useEffect(() => {\n if (checkboxRootRef.current && !shouldShowCentered) {\n const singleLineHeight = getHeightOfSingleTextLine({\n container: checkboxRootRef.current,\n });\n\n const boxHeight = checkboxBoxRef.current?.getBoundingClientRect().height ?? 0;\n\n setCheckboxTop((singleLineHeight - boxHeight) / 2);\n }\n }, [shouldShowCentered]);\n\n return (\n <StyledCheckbox ref={checkboxRootRef}>\n <StyledCheckboxInput\n checked={isChecked}\n disabled={isDisabled}\n id={uuid}\n onChange={handleChange}\n type=\"checkbox\"\n />\n\n <StyledCheckboxBoxWrapper\n $shouldShowAsSwitch={shouldShowAsSwitch}\n style={{\n top: shouldShowCentered ? '50%' : checkboxTop,\n transform: shouldShowCentered ? 'translateY(-50%)' : undefined,\n }}\n >\n <StyledCheckboxBox\n htmlFor={uuid}\n ref={checkboxBoxRef}\n $isChecked={isChecked ?? isActive}\n $isDisabled={isDisabled}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n $checkedBackgroundColor={colors?.checkedBackgroundColor}\n $uncheckedBackgroundColor={colors?.uncheckedBackgroundColor}\n $borderRadius={borderRadius}\n $borderColor={colors?.borderColor}\n />\n </StyledCheckboxBoxWrapper>\n <StyledCheckboxLabel\n className={labelClassName}\n $isDisabled={isDisabled}\n $shouldChangeOnLabelClick={shouldChangeOnLabelClick}\n $shouldShowAsSwitch={shouldShowAsSwitch}\n htmlFor={shouldCh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EAAEhD,UAAW;IACxB0D,yBAAyB,EAAEnD,wBAAyB;IACpDkC,mBAAmB,EAAEtC,kBAAmB;IACxC2C,OAAO,EAAEvC,wBAAwB,GAAGe,IAAI,GAAGT;EAAU,GAEpDf,QACgB,CACT,CAAC;AAEzB,CAAC;AAEDD,QAAQ,CAAC8D,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzE,OAAA,GAEnBS,QAAQ","ignoreList":[]}
|
|
@@ -77,24 +77,33 @@ const StyledCheckboxBox = exports.StyledCheckboxBox = _styledComponents.default.
|
|
|
77
77
|
background-color: ${({
|
|
78
78
|
$isChecked,
|
|
79
79
|
$shouldShowAsSwitch,
|
|
80
|
+
$checkedBackgroundColor,
|
|
81
|
+
$uncheckedBackgroundColor,
|
|
80
82
|
theme
|
|
81
83
|
}) => {
|
|
84
|
+
const activeBackgroundColor = $checkedBackgroundColor ?? ($shouldShowAsSwitch ? theme.green : theme['408']);
|
|
85
|
+
const inactiveBackgroundColor = $uncheckedBackgroundColor ?? ($shouldShowAsSwitch ? theme.red : theme['403']);
|
|
82
86
|
if ($shouldShowAsSwitch) {
|
|
83
|
-
return $isChecked ?
|
|
87
|
+
return $isChecked ? activeBackgroundColor : inactiveBackgroundColor;
|
|
84
88
|
}
|
|
85
|
-
return $isChecked ?
|
|
89
|
+
return $isChecked ? activeBackgroundColor : inactiveBackgroundColor;
|
|
86
90
|
}};
|
|
87
91
|
|
|
88
|
-
${({
|
|
92
|
+
border: ${({
|
|
93
|
+
$borderColor,
|
|
89
94
|
$shouldShowAsSwitch,
|
|
90
95
|
theme
|
|
91
|
-
}) =>
|
|
92
|
-
|
|
93
|
-
|
|
96
|
+
}) => {
|
|
97
|
+
if ($shouldShowAsSwitch) {
|
|
98
|
+
return 'none';
|
|
99
|
+
}
|
|
100
|
+
return `1px solid ${$borderColor ?? `rgba(${theme['409-rgb']}, 0.5)`}`;
|
|
101
|
+
}};
|
|
94
102
|
|
|
95
103
|
border-radius: ${({
|
|
96
|
-
$shouldShowAsSwitch
|
|
97
|
-
|
|
104
|
+
$shouldShowAsSwitch,
|
|
105
|
+
$borderRadius
|
|
106
|
+
}) => $borderRadius ?? ($shouldShowAsSwitch ? '100px' : 0)};
|
|
98
107
|
content: ' ';
|
|
99
108
|
height: ${({
|
|
100
109
|
$shouldShowAsSwitch
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.styles.js","names":["_styledComponents","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledCheckbox","exports","styled","div","StyledCheckboxInput","input","StyledCheckboxBoxWrapper","$shouldShowAsSwitch","css","StyledCheckboxBox","label","theme","text","$isDisabled","$isChecked","green","red","StyledCheckboxLabel","$shouldChangeOnLabelClick"],"sources":["../../../../src/components/checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { CheckboxProps } from './Checkbox';\n\nexport const StyledCheckbox = styled.div`\n align-items: center;\n display: flex;\n position: relative;\n width: 100%;\n min-height: 20px;\n`;\n\nexport const StyledCheckboxInput = styled.input`\n display: none;\n`;\n\ntype StyledCheckboxBoxWrapperProps = WithTheme<{\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n}>;\n\nexport const StyledCheckboxBoxWrapper = styled.div<StyledCheckboxBoxWrapperProps>`\n display: flex;\n flex-shrink: 0;\n height: 16px;\n position: absolute;\n\n ${({ $shouldShowAsSwitch }) =>\n $shouldShowAsSwitch &&\n css`\n right: 42px;\n `}\n`;\n\ntype StyledCheckboxBoxProps = WithTheme<{\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n $isDisabled?: CheckboxProps['isDisabled'];\n $isChecked?: CheckboxProps['isChecked'];\n}>;\n\nexport const StyledCheckboxBox = styled.label<StyledCheckboxBoxProps>`\n color: ${({ theme }: StyledCheckboxBoxProps) => theme.text};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n position: relative;\n transition: opacity 0.2s ease;\n user-select: none;\n height: 16px;\n\n &:after {\n ${({ $isChecked, $shouldShowAsSwitch }: StyledCheckboxBoxProps) =>\n $shouldShowAsSwitch\n ? css`\n background-color: white;\n border-radius: 50%;\n box-shadow: 0 1px 4px rgb(0 0 0 / 35%);\n height: 16px;\n left: 7px;\n top: 50%;\n transform: translateX(${$isChecked ? '18px' : 0}) translateY(-50%);\n transition: transform 0.2s ease;\n width: 16px;\n `\n : css`\n border-right: 2px solid #fff;\n border-bottom: 2px solid #fff;\n height: 10px;\n left: 2px;\n opacity: ${$isChecked ? 1 : 0};\n top: calc(50% - 2px);\n transform: rotateZ(37deg) translateY(-50%);\n transition: opacity 0.2s ease;\n width: 5px;\n `}\n\n content: ' ';\n position: absolute;\n }\n\n &:before {\n background-color: ${({\n $isChecked,\n $shouldShowAsSwitch,\n theme,\n }: StyledCheckboxBoxProps) => {\n if ($shouldShowAsSwitch) {\n return $isChecked ?
|
|
1
|
+
{"version":3,"file":"Checkbox.styles.js","names":["_styledComponents","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","StyledCheckbox","exports","styled","div","StyledCheckboxInput","input","StyledCheckboxBoxWrapper","$shouldShowAsSwitch","css","StyledCheckboxBox","label","theme","text","$isDisabled","$isChecked","$checkedBackgroundColor","$uncheckedBackgroundColor","activeBackgroundColor","green","inactiveBackgroundColor","red","$borderColor","$borderRadius","StyledCheckboxLabel","$shouldChangeOnLabelClick"],"sources":["../../../../src/components/checkbox/Checkbox.styles.ts"],"sourcesContent":["import styled, { css } from 'styled-components';\nimport type { CSSProperties } from 'react';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport type { CheckboxProps } from './Checkbox';\n\nexport const StyledCheckbox = styled.div`\n align-items: center;\n display: flex;\n position: relative;\n width: 100%;\n min-height: 20px;\n`;\n\nexport const StyledCheckboxInput = styled.input`\n display: none;\n`;\n\ntype StyledCheckboxBoxWrapperProps = WithTheme<{\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n}>;\n\nexport const StyledCheckboxBoxWrapper = styled.div<StyledCheckboxBoxWrapperProps>`\n display: flex;\n flex-shrink: 0;\n height: 16px;\n position: absolute;\n\n ${({ $shouldShowAsSwitch }) =>\n $shouldShowAsSwitch &&\n css`\n right: 42px;\n `}\n`;\n\ntype StyledCheckboxBoxProps = WithTheme<{\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n $isDisabled?: CheckboxProps['isDisabled'];\n $isChecked?: CheckboxProps['isChecked'];\n $checkedBackgroundColor?: CSSProperties['backgroundColor'];\n $uncheckedBackgroundColor?: CSSProperties['backgroundColor'];\n $borderRadius?: CSSProperties['borderRadius'];\n $borderColor?: CSSProperties['borderColor'];\n}>;\n\nexport const StyledCheckboxBox = styled.label<StyledCheckboxBoxProps>`\n color: ${({ theme }: StyledCheckboxBoxProps) => theme.text};\n cursor: ${({ $isDisabled }) => ($isDisabled ? 'default' : 'pointer')};\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n position: relative;\n transition: opacity 0.2s ease;\n user-select: none;\n height: 16px;\n\n &:after {\n ${({ $isChecked, $shouldShowAsSwitch }: StyledCheckboxBoxProps) =>\n $shouldShowAsSwitch\n ? css`\n background-color: white;\n border-radius: 50%;\n box-shadow: 0 1px 4px rgb(0 0 0 / 35%);\n height: 16px;\n left: 7px;\n top: 50%;\n transform: translateX(${$isChecked ? '18px' : 0}) translateY(-50%);\n transition: transform 0.2s ease;\n width: 16px;\n `\n : css`\n border-right: 2px solid #fff;\n border-bottom: 2px solid #fff;\n height: 10px;\n left: 2px;\n opacity: ${$isChecked ? 1 : 0};\n top: calc(50% - 2px);\n transform: rotateZ(37deg) translateY(-50%);\n transition: opacity 0.2s ease;\n width: 5px;\n `}\n\n content: ' ';\n position: absolute;\n }\n\n &:before {\n background-color: ${({\n $isChecked,\n $shouldShowAsSwitch,\n $checkedBackgroundColor,\n $uncheckedBackgroundColor,\n theme,\n }: StyledCheckboxBoxProps) => {\n const activeBackgroundColor =\n $checkedBackgroundColor ?? ($shouldShowAsSwitch ? theme.green : theme['408']);\n const inactiveBackgroundColor =\n $uncheckedBackgroundColor ?? ($shouldShowAsSwitch ? theme.red : theme['403']);\n\n if ($shouldShowAsSwitch) {\n return $isChecked ? activeBackgroundColor : inactiveBackgroundColor;\n }\n\n return $isChecked ? activeBackgroundColor : inactiveBackgroundColor;\n }};\n\n border: ${({ $borderColor, $shouldShowAsSwitch, theme }: StyledCheckboxBoxProps) => {\n if ($shouldShowAsSwitch) {\n return 'none';\n }\n\n return `1px solid ${$borderColor ?? `rgba(${theme['409-rgb']}, 0.5)`}`;\n }};\n\n border-radius: ${({ $shouldShowAsSwitch, $borderRadius }) =>\n $borderRadius ?? ($shouldShowAsSwitch ? '100px' : 0)};\n content: ' ';\n height: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '13px' : '15px')};\n left: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '10px' : 0)};\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n transition: background-color 0.2s ease;\n width: ${({ $shouldShowAsSwitch }) => ($shouldShowAsSwitch ? '28px' : '15px')};\n }\n}\n`;\n\ntype StyledCheckboxLabelProps = WithTheme<{\n $isDisabled?: CheckboxProps['isDisabled'];\n $shouldChangeOnLabelClick?: CheckboxProps['shouldChangeOnLabelClick'];\n $shouldShowAsSwitch?: CheckboxProps['shouldShowAsSwitch'];\n}>;\n\nexport const StyledCheckboxLabel = styled.label<StyledCheckboxLabelProps>`\n color: ${({ theme }: StyledCheckboxLabelProps) => theme.text};\n cursor: ${({ $shouldChangeOnLabelClick }) =>\n !$shouldChangeOnLabelClick ? 'default' : 'pointer'};\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n transition: opacity 0.2s ease;\n user-select: none;\n ${({ $shouldShowAsSwitch }) =>\n $shouldShowAsSwitch\n ? css`\n padding-right: 48px;\n `\n : css`\n padding-left: 20px;\n `}\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAgD,SAAAD,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EA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MA,WAAW,GAAG,GAAG,GAAG,CAAE;AAC3D;AACA;AACA,MAAM,CAAC;EAAEN;AAAoB,CAAC,KACtBA,mBAAmB,GACb,IAAAC,qBAAG;AACjB;AACA,eAAe,GACD,IAAAA,qBAAG;AACjB;AACA,eAAe;AACf,CAAC","ignoreList":[]}
|
|
@@ -18,12 +18,13 @@ ListContext.displayName = 'ListContext';
|
|
|
18
18
|
const List = t0 => {
|
|
19
19
|
"use memo";
|
|
20
20
|
|
|
21
|
-
const $ = (0, _reactCompilerRuntime.c)(
|
|
21
|
+
const $ = (0, _reactCompilerRuntime.c)(14);
|
|
22
22
|
const {
|
|
23
23
|
children,
|
|
24
24
|
isWrapped: t1
|
|
25
25
|
} = t0;
|
|
26
26
|
const isWrapped = t1 === undefined ? false : t1;
|
|
27
|
+
const isListItemElement = _temp;
|
|
27
28
|
const [openItemUuid, setOpenItemUuid] = (0, _react2.useState)(undefined);
|
|
28
29
|
let t2;
|
|
29
30
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -43,77 +44,90 @@ const List = t0 => {
|
|
|
43
44
|
t2 = $[0];
|
|
44
45
|
}
|
|
45
46
|
const updateOpenItemUuid = t2;
|
|
46
|
-
const hasExpandableChildren = _temp;
|
|
47
47
|
let t3;
|
|
48
|
-
if ($[1]
|
|
49
|
-
t3 =
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49
|
+
t3 = node => {
|
|
50
|
+
let found = false;
|
|
51
|
+
_react2.default.Children.forEach(node, child_0 => {
|
|
52
|
+
if (found) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (isListItemElement(child_0) && child_0.props.children !== undefined) {
|
|
56
|
+
found = true;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
return found;
|
|
60
|
+
};
|
|
61
|
+
$[1] = t3;
|
|
52
62
|
} else {
|
|
53
|
-
t3 = $[
|
|
63
|
+
t3 = $[1];
|
|
54
64
|
}
|
|
65
|
+
const hasExpandableChildren = t3;
|
|
55
66
|
let t4;
|
|
56
|
-
if ($[
|
|
57
|
-
t4 =
|
|
58
|
-
|
|
67
|
+
if ($[2] !== children) {
|
|
68
|
+
t4 = hasExpandableChildren(children);
|
|
69
|
+
$[2] = children;
|
|
70
|
+
$[3] = t4;
|
|
71
|
+
} else {
|
|
72
|
+
t4 = $[3];
|
|
73
|
+
}
|
|
74
|
+
let t5;
|
|
75
|
+
if ($[4] !== isWrapped || $[5] !== openItemUuid || $[6] !== t4) {
|
|
76
|
+
t5 = {
|
|
77
|
+
isAnyItemExpandable: t4,
|
|
59
78
|
isWrapped,
|
|
60
79
|
openItemUuid,
|
|
61
80
|
updateOpenItemUuid
|
|
62
81
|
};
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[5] = t3;
|
|
82
|
+
$[4] = isWrapped;
|
|
83
|
+
$[5] = openItemUuid;
|
|
66
84
|
$[6] = t4;
|
|
85
|
+
$[7] = t5;
|
|
67
86
|
} else {
|
|
68
|
-
|
|
87
|
+
t5 = $[7];
|
|
69
88
|
}
|
|
70
|
-
const providerValue =
|
|
71
|
-
let
|
|
72
|
-
if ($[
|
|
73
|
-
|
|
89
|
+
const providerValue = t5;
|
|
90
|
+
let t6;
|
|
91
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
92
|
+
t6 = {
|
|
74
93
|
type: "tween"
|
|
75
94
|
};
|
|
76
|
-
$[
|
|
95
|
+
$[8] = t6;
|
|
77
96
|
} else {
|
|
78
|
-
|
|
97
|
+
t6 = $[8];
|
|
79
98
|
}
|
|
80
|
-
let
|
|
81
|
-
if ($[
|
|
82
|
-
|
|
83
|
-
transition:
|
|
99
|
+
let t7;
|
|
100
|
+
if ($[9] !== children) {
|
|
101
|
+
t7 = /*#__PURE__*/_react2.default.createElement(_react.MotionConfig, {
|
|
102
|
+
transition: t6
|
|
84
103
|
}, /*#__PURE__*/_react2.default.createElement(_react.AnimatePresence, {
|
|
85
104
|
initial: false
|
|
86
105
|
}, children));
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
106
|
+
$[9] = children;
|
|
107
|
+
$[10] = t7;
|
|
89
108
|
} else {
|
|
90
|
-
|
|
109
|
+
t7 = $[10];
|
|
91
110
|
}
|
|
92
|
-
let
|
|
93
|
-
if ($[
|
|
94
|
-
|
|
111
|
+
let t8;
|
|
112
|
+
if ($[11] !== providerValue || $[12] !== t7) {
|
|
113
|
+
t8 = /*#__PURE__*/_react2.default.createElement(ListContext.Provider, {
|
|
95
114
|
value: providerValue
|
|
96
|
-
},
|
|
97
|
-
$[
|
|
98
|
-
$[11] = t6;
|
|
115
|
+
}, t7);
|
|
116
|
+
$[11] = providerValue;
|
|
99
117
|
$[12] = t7;
|
|
118
|
+
$[13] = t8;
|
|
100
119
|
} else {
|
|
101
|
-
|
|
120
|
+
t8 = $[13];
|
|
102
121
|
}
|
|
103
|
-
return
|
|
122
|
+
return t8;
|
|
104
123
|
};
|
|
105
124
|
List.displayName = 'List';
|
|
106
125
|
var _default = exports.default = List;
|
|
107
|
-
function _temp(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (/*#__PURE__*/_react2.default.isValidElement(child) && child.props.children !== undefined) {
|
|
114
|
-
found = true;
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
return found;
|
|
126
|
+
function _temp(child) {
|
|
127
|
+
if (! /*#__PURE__*/_react2.default.isValidElement(child)) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
const elementType = child.type;
|
|
131
|
+
return elementType.displayName === "ListItem" || elementType.name === "ListItem";
|
|
118
132
|
}
|
|
119
133
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":["_react","require","_react2","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListContext","exports","React","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","displayName","List","t0","$","_reactCompilerRuntime","c","children","t1","setOpenItemUuid","useState","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","
|
|
1
|
+
{"version":3,"file":"List.js","names":["_react","require","_react2","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ListContext","exports","React","createContext","isAnyItemExpandable","isWrapped","openItemUuid","undefined","updateOpenItemUuid","displayName","List","t0","$","_reactCompilerRuntime","c","children","t1","isListItemElement","_temp","setOpenItemUuid","useState","t2","Symbol","for","uuid","t3","shouldOnlyOpen","currentOpenItemUuid","node","found","Children","forEach","child_0","child","props","hasExpandableChildren","t4","t5","providerValue","t6","type","t7","createElement","MotionConfig","transition","AnimatePresence","initial","t8","Provider","_default","isValidElement","elementType","name"],"sources":["../../../../src/components/list/List.tsx"],"sourcesContent":["import { AnimatePresence, MotionConfig } from 'motion/react';\nimport React, { FC, ReactNode, useCallback, useMemo, useState } from 'react';\n\ninterface IListContext {\n isAnyItemExpandable: boolean;\n isWrapped: boolean;\n openItemUuid: string | undefined;\n updateOpenItemUuid: (uuid: string, options?: { shouldOnlyOpen?: boolean }) => void;\n}\n\nexport const ListContext = React.createContext<IListContext>({\n isAnyItemExpandable: false,\n isWrapped: false,\n openItemUuid: undefined,\n updateOpenItemUuid: () => {},\n});\n\nListContext.displayName = 'ListContext';\n\ntype ListProps = {\n /**\n * The items of the list\n */\n children: ReactNode;\n /**\n * This value must be set for nested AccordionGroup components. This adjusts the style of\n * the head and the padding of the content accordions.\n */\n isWrapped?: boolean;\n};\n\nconst List: FC<ListProps> = ({ children, isWrapped = false }) => {\n 'use memo';\n\n const isListItemElement = (\n child: ReactNode,\n ): child is React.ReactElement<{ children?: ReactNode }> => {\n if (!React.isValidElement(child)) {\n return false;\n }\n\n const elementType = child.type as { displayName?: string; name?: string };\n\n return elementType.displayName === 'ListItem' || elementType.name === 'ListItem';\n };\n\n const [openItemUuid, setOpenItemUuid] = useState<IListContext['openItemUuid']>(undefined);\n\n const updateOpenItemUuid = useCallback<IListContext['updateOpenItemUuid']>(\n (uuid, { shouldOnlyOpen } = {}) => {\n setOpenItemUuid((currentOpenItemUuid) => {\n if (currentOpenItemUuid === uuid && shouldOnlyOpen !== true) {\n return undefined;\n }\n\n return uuid;\n });\n },\n [setOpenItemUuid],\n );\n\n const hasExpandableChildren = (node: ReactNode): boolean => {\n let found = false;\n React.Children.forEach(node, (child) => {\n if (found) return;\n if (isListItemElement(child) && child.props.children !== undefined) {\n found = true;\n }\n });\n return found;\n };\n\n const providerValue = useMemo<IListContext>(\n () => ({\n isAnyItemExpandable: hasExpandableChildren(children),\n isWrapped,\n openItemUuid,\n updateOpenItemUuid,\n }),\n [children, isWrapped, openItemUuid, updateOpenItemUuid],\n );\n\n return (\n <ListContext.Provider value={providerValue}>\n <MotionConfig transition={{ type: 'tween' }}>\n <AnimatePresence initial={false}>{children}</AnimatePresence>\n </MotionConfig>\n </ListContext.Provider>\n );\n};\n\nList.displayName = 'List';\n\nexport default List;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA6E,SAAAE,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,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,CAE9B;AAEDrC,IAAI,CAACD,WAAW,GAAG,MAAM;AAAC,IAAAwC,QAAA,GAAAhD,OAAA,CAAAV,OAAA,GAEXmB,IAAI;AA9DS,SAAAQ,MAAAe,KAAA;EAMpB,IAAI,eAAC/B,eAAK,CAAAgD,cAAe,CAACjB,KAAK,CAAC;IAAA,OACrB,KAAK;EAAA;EAGhB,MAAAkB,WAAA,GAAoBlB,KAAK,CAAAO,IAAK;EAA4C,OAEnEW,WAAW,CAAA1C,WAAY,KAAK,UAA6C,IAA/B0C,WAAW,CAAAC,IAAK,KAAK,UAAU;AAAA","ignoreList":[]}
|
|
@@ -4,74 +4,159 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _reactCompilerRuntime = require("react-compiler-runtime");
|
|
7
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _AreaContextProvider = require("../area-provider/AreaContextProvider");
|
|
9
10
|
var _Input = require("../input/Input.styles");
|
|
10
11
|
var _TextArea = require("./TextArea.styles");
|
|
11
12
|
var _resize = require("../../hooks/resize");
|
|
12
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
|
-
const TextArea = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
placeholder,
|
|
17
|
-
value,
|
|
18
|
-
onChange,
|
|
19
|
-
onFocus,
|
|
20
|
-
onKeyDown,
|
|
21
|
-
rightElement,
|
|
22
|
-
onBlur,
|
|
23
|
-
maxHeight = '120px',
|
|
24
|
-
minHeight = '41px'
|
|
25
|
-
}, ref) => {
|
|
14
|
+
const TextArea = /*#__PURE__*/(0, _react.forwardRef)((t0, ref) => {
|
|
15
|
+
"use memo";
|
|
16
|
+
|
|
26
17
|
var _rightElement$props;
|
|
18
|
+
const $ = (0, _reactCompilerRuntime.c)(28);
|
|
19
|
+
const {
|
|
20
|
+
isDisabled,
|
|
21
|
+
isInvalid,
|
|
22
|
+
placeholder,
|
|
23
|
+
value,
|
|
24
|
+
onChange,
|
|
25
|
+
onFocus,
|
|
26
|
+
onKeyDown,
|
|
27
|
+
rightElement,
|
|
28
|
+
onBlur,
|
|
29
|
+
maxHeight: t1,
|
|
30
|
+
minHeight: t2,
|
|
31
|
+
colors
|
|
32
|
+
} = t0;
|
|
33
|
+
const maxHeight = t1 === undefined ? "120px" : t1;
|
|
34
|
+
const minHeight = t2 === undefined ? "41px" : t2;
|
|
27
35
|
const [isOverflowing, setIsOverflowing] = (0, _react.useState)(false);
|
|
28
36
|
const areaProvider = (0, _react.useContext)(_AreaContextProvider.AreaContext);
|
|
29
37
|
const textareaRef = (0, _react.useRef)(null);
|
|
30
38
|
(0, _resize.useCursorRepaint)(textareaRef);
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
33
39
|
const shouldShowBorder = (rightElement === null || rightElement === void 0 || (_rightElement$props = rightElement.props) === null || _rightElement$props === void 0 || (_rightElement$props = _rightElement$props.style) === null || _rightElement$props === void 0 ? void 0 : _rightElement$props.backgroundColor) === undefined;
|
|
34
|
-
const shouldChangeColor =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
textareaRef.current
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
$
|
|
69
|
-
$
|
|
70
|
-
$
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$
|
|
74
|
-
}
|
|
40
|
+
const shouldChangeColor = areaProvider.shouldChangeColor ?? false;
|
|
41
|
+
let t3;
|
|
42
|
+
if ($[0] !== maxHeight) {
|
|
43
|
+
t3 = () => {
|
|
44
|
+
if (textareaRef.current) {
|
|
45
|
+
textareaRef.current.style.height = "auto";
|
|
46
|
+
textareaRef.current.style.height = `${textareaRef.current.scrollHeight}px`;
|
|
47
|
+
setIsOverflowing(textareaRef.current.scrollHeight > parseInt(maxHeight.toString(), 10));
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
$[0] = maxHeight;
|
|
51
|
+
$[1] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[1];
|
|
54
|
+
}
|
|
55
|
+
const adjustTextareaHeight = t3;
|
|
56
|
+
let t4;
|
|
57
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
58
|
+
t4 = () => textareaRef.current;
|
|
59
|
+
$[2] = t4;
|
|
60
|
+
} else {
|
|
61
|
+
t4 = $[2];
|
|
62
|
+
}
|
|
63
|
+
(0, _react.useImperativeHandle)(ref, t4);
|
|
64
|
+
let t5;
|
|
65
|
+
let t6;
|
|
66
|
+
if ($[3] !== adjustTextareaHeight || $[4] !== value) {
|
|
67
|
+
t5 = () => {
|
|
68
|
+
if (typeof value === "string" && value.length > -1) {
|
|
69
|
+
adjustTextareaHeight();
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
t6 = [adjustTextareaHeight, value];
|
|
73
|
+
$[3] = adjustTextareaHeight;
|
|
74
|
+
$[4] = value;
|
|
75
|
+
$[5] = t5;
|
|
76
|
+
$[6] = t6;
|
|
77
|
+
} else {
|
|
78
|
+
t5 = $[5];
|
|
79
|
+
t6 = $[6];
|
|
80
|
+
}
|
|
81
|
+
(0, _react.useEffect)(t5, t6);
|
|
82
|
+
const hasValue = value !== undefined && value.length > 0;
|
|
83
|
+
let t7;
|
|
84
|
+
if ($[7] !== hasValue) {
|
|
85
|
+
t7 = hasValue ? {
|
|
86
|
+
bottom: "2px",
|
|
87
|
+
right: "2px"
|
|
88
|
+
} : {
|
|
89
|
+
top: "12px",
|
|
90
|
+
left: "10px"
|
|
91
|
+
};
|
|
92
|
+
$[7] = hasValue;
|
|
93
|
+
$[8] = t7;
|
|
94
|
+
} else {
|
|
95
|
+
t7 = $[8];
|
|
96
|
+
}
|
|
97
|
+
const labelPosition = t7;
|
|
98
|
+
let t8;
|
|
99
|
+
if ($[9] !== (colors === null || colors === void 0 ? void 0 : colors.backgroundColor) || $[10] !== (colors === null || colors === void 0 ? void 0 : colors.borderColor) || $[11] !== hasValue || $[12] !== isDisabled || $[13] !== isInvalid || $[14] !== isOverflowing || $[15] !== labelPosition || $[16] !== maxHeight || $[17] !== minHeight || $[18] !== onBlur || $[19] !== onChange || $[20] !== onFocus || $[21] !== onKeyDown || $[22] !== placeholder || $[23] !== rightElement || $[24] !== shouldChangeColor || $[25] !== shouldShowBorder || $[26] !== value) {
|
|
100
|
+
colors === null || colors === void 0 || colors.backgroundColor;
|
|
101
|
+
colors === null || colors === void 0 || colors.borderColor;
|
|
102
|
+
t8 = (() => /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextArea, {
|
|
103
|
+
$isDisabled: isDisabled
|
|
104
|
+
}, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaContentWrapper, {
|
|
105
|
+
$isInvalid: isInvalid,
|
|
106
|
+
$shouldChangeColor: shouldChangeColor,
|
|
107
|
+
$backgroundColor: colors === null || colors === void 0 ? void 0 : colors.backgroundColor,
|
|
108
|
+
$borderColor: colors === null || colors === void 0 ? void 0 : colors.borderColor
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaContent, null, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaInput, {
|
|
110
|
+
className: "chayns-scrollbar",
|
|
111
|
+
disabled: isDisabled,
|
|
112
|
+
$isInvalid: isInvalid,
|
|
113
|
+
ref: textareaRef,
|
|
114
|
+
value: value,
|
|
115
|
+
onBlur: onBlur,
|
|
116
|
+
onChange: onChange,
|
|
117
|
+
onFocus: onFocus,
|
|
118
|
+
onKeyDown: onKeyDown,
|
|
119
|
+
$maxHeight: maxHeight,
|
|
120
|
+
$minHeight: minHeight,
|
|
121
|
+
$isOverflowing: isOverflowing,
|
|
122
|
+
rows: 1
|
|
123
|
+
}), /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaLabelWrapper, {
|
|
124
|
+
animate: {
|
|
125
|
+
fontSize: hasValue ? "9px" : undefined
|
|
126
|
+
},
|
|
127
|
+
initial: false,
|
|
128
|
+
layout: true,
|
|
129
|
+
style: labelPosition,
|
|
130
|
+
transition: {
|
|
131
|
+
type: "tween",
|
|
132
|
+
duration: 0.1
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/_react.default.createElement(_TextArea.StyledTextAreaLabel, {
|
|
135
|
+
$isInvalid: isInvalid
|
|
136
|
+
}, placeholder))), rightElement && shouldShowBorder && rightElement), rightElement && !shouldShowBorder && /*#__PURE__*/_react.default.createElement(_Input.StyledInputRightElement, null, rightElement)))();
|
|
137
|
+
$[9] = colors === null || colors === void 0 ? void 0 : colors.backgroundColor;
|
|
138
|
+
$[10] = colors === null || colors === void 0 ? void 0 : colors.borderColor;
|
|
139
|
+
$[11] = hasValue;
|
|
140
|
+
$[12] = isDisabled;
|
|
141
|
+
$[13] = isInvalid;
|
|
142
|
+
$[14] = isOverflowing;
|
|
143
|
+
$[15] = labelPosition;
|
|
144
|
+
$[16] = maxHeight;
|
|
145
|
+
$[17] = minHeight;
|
|
146
|
+
$[18] = onBlur;
|
|
147
|
+
$[19] = onChange;
|
|
148
|
+
$[20] = onFocus;
|
|
149
|
+
$[21] = onKeyDown;
|
|
150
|
+
$[22] = placeholder;
|
|
151
|
+
$[23] = rightElement;
|
|
152
|
+
$[24] = shouldChangeColor;
|
|
153
|
+
$[25] = shouldShowBorder;
|
|
154
|
+
$[26] = value;
|
|
155
|
+
$[27] = t8;
|
|
156
|
+
} else {
|
|
157
|
+
t8 = $[27];
|
|
158
|
+
}
|
|
159
|
+
return t8;
|
|
75
160
|
});
|
|
76
161
|
TextArea.displayName = 'TextArea';
|
|
77
162
|
var _default = exports.default = TextArea;
|