@coorpacademy/components 11.38.8-alpha.4 → 11.38.8-alpha.6
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/es/atom/chip/index.d.ts.map +1 -1
- package/es/atom/chip/index.js +3 -0
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/input-search/index.d.ts +0 -3
- package/es/atom/input-search/index.d.ts.map +1 -1
- package/es/atom/input-search/index.js +15 -52
- package/es/atom/input-search/index.js.map +1 -1
- package/es/atom/input-search/style.css +0 -96
- package/es/atom/input-text/index.d.ts +1 -0
- package/es/atom/input-text/index.d.ts.map +1 -1
- package/es/atom/input-text/index.js +4 -1
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +13 -1
- package/es/atom/input-text-with-title/index.d.ts +1 -0
- package/es/atom/input-textarea/index.d.ts +1 -0
- package/es/atom/input-textarea/index.d.ts.map +1 -1
- package/es/atom/input-textarea/index.js +4 -1
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/input-textarea/style.css +22 -0
- package/es/atom/select/index.d.ts +1 -0
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +26 -11
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +61 -0
- package/es/atom/status-item/index.d.ts.map +1 -1
- package/es/atom/status-item/index.js +15 -15
- package/es/atom/status-item/index.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.js +42 -2
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/es/molecule/card/favorite.d.ts.map +1 -1
- package/es/molecule/card/favorite.js +13 -0
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/cm-popin/types.d.ts +0 -3
- package/es/molecule/cm-popin/types.d.ts.map +1 -1
- package/es/molecule/course-sections/index.d.ts +1 -0
- package/es/molecule/drag-and-drop/index.d.ts +1 -0
- package/es/molecule/drag-and-drop/upload-report.d.ts +1 -0
- package/es/molecule/filters/index.d.ts +1 -0
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/index.d.ts +0 -3
- package/es/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/es/molecule/multi-filter-panel/prop-types.d.ts +0 -3
- package/es/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/es/molecule/search-form/index.d.ts +0 -7
- package/es/molecule/search-form/index.d.ts.map +1 -1
- package/es/molecule/search-form/index.js +16 -30
- package/es/molecule/search-form/index.js.map +1 -1
- package/es/molecule/search-form/style.css +9 -22
- package/es/molecule/skill-picker-modal/index.js +1 -1
- package/es/molecule/skill-picker-modal/index.js.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/es/molecule/translation-modal/index.d.ts +4 -0
- package/es/molecule/translation-modal/index.js +1 -1
- package/es/molecule/translation-modal/index.js.map +1 -1
- package/es/organism/brand-table/index.d.ts +0 -3
- package/es/organism/content-skill-modal/index.d.ts +0 -6
- package/es/organism/content-skill-modal/index.d.ts.map +1 -1
- package/es/organism/content-skill-modal/types.d.ts +0 -6
- package/es/organism/content-skill-modal/types.d.ts.map +1 -1
- package/es/organism/content-translation/index.d.ts +2 -0
- package/es/organism/filter-checkbox-and-search/index.d.ts +0 -3
- package/es/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/es/organism/filter-checkbox-and-search/props-types.d.ts +0 -3
- package/es/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/es/organism/icon-editor/index.d.ts +1 -0
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +1 -0
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/list-items/index.d.ts +0 -3
- package/es/organism/mooc-header/index.d.ts +0 -16
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +14 -129
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +8 -181
- package/es/organism/rewards-form/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts +1 -0
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +1 -0
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/skill-edition/index.d.ts +22 -0
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +61 -36
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/types.d.ts +27 -1
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +24 -5
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +5 -0
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +5 -0
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +4 -0
- package/es/template/app-player/loading/index.d.ts +0 -3
- package/es/template/app-player/player/index.d.ts +0 -6
- package/es/template/app-player/player/slides/index.d.ts +0 -3
- package/es/template/app-player/player/slides/index.d.ts.map +1 -1
- package/es/template/app-player/popin-correction/index.d.ts +0 -3
- package/es/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/es/template/app-player/popin-end/index.d.ts +0 -3
- package/es/template/app-review/index.d.ts +0 -3
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +0 -3
- package/es/template/app-review/player/prop-types.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +0 -3
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.d.ts +22 -18
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +6 -3
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/certifications/index.d.ts +1 -0
- package/es/template/common/dashboard/index.d.ts +0 -6
- package/es/template/common/search-page/index.d.ts +1 -3
- package/es/template/external-course/index.d.ts +0 -3
- package/es/template/playlist-detail/index.d.ts +1 -0
- package/es/util/check-is-mobile.d.ts +1 -1
- package/es/util/check-is-mobile.d.ts.map +1 -1
- package/es/util/check-is-mobile.js +2 -4
- package/es/util/check-is-mobile.js.map +1 -1
- package/es/util/render-with-context.d.ts.map +1 -1
- package/es/util/render-with-context.js +3 -2
- package/es/util/render-with-context.js.map +1 -1
- package/lib/atom/chip/index.d.ts.map +1 -1
- package/lib/atom/chip/index.js +3 -0
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/input-search/index.d.ts +0 -3
- package/lib/atom/input-search/index.d.ts.map +1 -1
- package/lib/atom/input-search/index.js +15 -52
- package/lib/atom/input-search/index.js.map +1 -1
- package/lib/atom/input-search/style.css +0 -96
- package/lib/atom/input-text/index.d.ts +1 -0
- package/lib/atom/input-text/index.d.ts.map +1 -1
- package/lib/atom/input-text/index.js +4 -1
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +13 -1
- package/lib/atom/input-text-with-title/index.d.ts +1 -0
- package/lib/atom/input-textarea/index.d.ts +1 -0
- package/lib/atom/input-textarea/index.d.ts.map +1 -1
- package/lib/atom/input-textarea/index.js +4 -1
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/input-textarea/style.css +22 -0
- package/lib/atom/select/index.d.ts +1 -0
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +26 -11
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +61 -0
- package/lib/atom/status-item/index.d.ts.map +1 -1
- package/lib/atom/status-item/index.js +15 -17
- package/lib/atom/status-item/index.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +41 -2
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/molecule/card/favorite.d.ts.map +1 -1
- package/lib/molecule/card/favorite.js +13 -0
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/cm-popin/types.d.ts +0 -3
- package/lib/molecule/cm-popin/types.d.ts.map +1 -1
- package/lib/molecule/course-sections/index.d.ts +1 -0
- package/lib/molecule/drag-and-drop/index.d.ts +1 -0
- package/lib/molecule/drag-and-drop/upload-report.d.ts +1 -0
- package/lib/molecule/filters/index.d.ts +1 -0
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/index.d.ts +0 -3
- package/lib/molecule/multi-filter-panel/index.d.ts.map +1 -1
- package/lib/molecule/multi-filter-panel/prop-types.d.ts +0 -3
- package/lib/molecule/multi-filter-panel/prop-types.d.ts.map +1 -1
- package/lib/molecule/search-form/index.d.ts +0 -7
- package/lib/molecule/search-form/index.d.ts.map +1 -1
- package/lib/molecule/search-form/index.js +17 -31
- package/lib/molecule/search-form/index.js.map +1 -1
- package/lib/molecule/search-form/style.css +9 -22
- package/lib/molecule/skill-picker-modal/index.js +1 -1
- package/lib/molecule/skill-picker-modal/index.js.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +1 -0
- package/lib/molecule/translation-modal/index.d.ts +4 -0
- package/lib/molecule/translation-modal/index.js +1 -1
- package/lib/molecule/translation-modal/index.js.map +1 -1
- package/lib/organism/brand-table/index.d.ts +0 -3
- package/lib/organism/content-skill-modal/index.d.ts +0 -6
- package/lib/organism/content-skill-modal/index.d.ts.map +1 -1
- package/lib/organism/content-skill-modal/types.d.ts +0 -6
- package/lib/organism/content-skill-modal/types.d.ts.map +1 -1
- package/lib/organism/content-translation/index.d.ts +2 -0
- package/lib/organism/filter-checkbox-and-search/index.d.ts +0 -3
- package/lib/organism/filter-checkbox-and-search/index.d.ts.map +1 -1
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts +0 -3
- package/lib/organism/filter-checkbox-and-search/props-types.d.ts.map +1 -1
- package/lib/organism/icon-editor/index.d.ts +1 -0
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +1 -0
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/list-items/index.d.ts +0 -3
- package/lib/organism/mooc-header/index.d.ts +0 -16
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +14 -129
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +8 -181
- package/lib/organism/rewards-form/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts +1 -0
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +1 -0
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +22 -0
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +61 -36
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/types.d.ts +27 -1
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +24 -5
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +5 -0
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +5 -0
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +4 -0
- package/lib/template/app-player/loading/index.d.ts +0 -3
- package/lib/template/app-player/player/index.d.ts +0 -6
- package/lib/template/app-player/player/slides/index.d.ts +0 -3
- package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-correction/index.d.ts +0 -3
- package/lib/template/app-player/popin-correction/index.d.ts.map +1 -1
- package/lib/template/app-player/popin-end/index.d.ts +0 -3
- package/lib/template/app-review/index.d.ts +0 -3
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +0 -3
- package/lib/template/app-review/player/prop-types.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +0 -3
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.d.ts +22 -18
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +6 -3
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/certifications/index.d.ts +1 -0
- package/lib/template/common/dashboard/index.d.ts +0 -6
- package/lib/template/common/search-page/index.d.ts +1 -3
- package/lib/template/external-course/index.d.ts +0 -3
- package/lib/template/playlist-detail/index.d.ts +1 -0
- package/lib/util/check-is-mobile.d.ts +1 -1
- package/lib/util/check-is-mobile.d.ts.map +1 -1
- package/lib/util/check-is-mobile.js +2 -4
- package/lib/util/check-is-mobile.js.map +1 -1
- package/lib/util/render-with-context.d.ts.map +1 -1
- package/lib/util/render-with-context.js +3 -2
- package/lib/util/render-with-context.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/chip/index.js"],"names":[],"mappings":"AAmBO,qGAG0E;;AAGjF,6DAiEC"}
|
package/es/atom/chip/index.js
CHANGED
|
@@ -4,9 +4,12 @@ import classnames from 'classnames';
|
|
|
4
4
|
import get from 'lodash/fp/get';
|
|
5
5
|
import { convert } from 'css-color-function';
|
|
6
6
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
+
import { fas } from '@fortawesome/pro-solid-svg-icons';
|
|
8
|
+
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
7
9
|
import Provider from '../provider';
|
|
8
10
|
import { COLORS } from '../../variables/colors';
|
|
9
11
|
import style from './style.css';
|
|
12
|
+
library.add(fas);
|
|
10
13
|
const LUMINOSITY_DELTA = 0.08;
|
|
11
14
|
const {
|
|
12
15
|
cm_primary_blue: DEFAULT_BACKGROUND_COLOR
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","get","convert","FontAwesomeIcon","Provider","COLORS","style","LUMINOSITY_DELTA","cm_primary_blue","DEFAULT_BACKGROUND_COLOR","ICON_SIZE","calculateHoveredSelectedBgColor","selectedBgColor","luminosityDelta","Chip","props","context","text","subText","selected","customIcon","onClick","leftIcon","backgroundColor","skin","skinColor","hoveredSelectedBgColor","isHovered","setIsHovered","handleClick","handleMouseEnter","handleMouseLeave","hoverStyle","defaultIcon","color","white","cm_grey_400","createElement","className","container","unselected","onMouseEnter","onMouseLeave","left","icon","fontSize","title","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","bool","func"],"sources":["../../../src/atom/chip/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport get from 'lodash/fp/get';\nimport {convert} from 'css-color-function';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport Provider from '../provider';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nconst LUMINOSITY_DELTA = 0.08;\nconst {cm_primary_blue: DEFAULT_BACKGROUND_COLOR} = COLORS;\nconst ICON_SIZE = '12px';\n\nexport const calculateHoveredSelectedBgColor = (\n selectedBgColor,\n luminosityDelta = LUMINOSITY_DELTA\n) => convert(`hsl(from ${selectedBgColor} h s calc(l*(1 - ${luminosityDelta})))`);\n// note: luminosity decrease is relative to the selected color\n\nconst Chip = (props, context) => {\n const {\n text,\n subText,\n selected = false,\n customIcon,\n onClick,\n leftIcon,\n backgroundColor = DEFAULT_BACKGROUND_COLOR\n } = props;\n const {skin} = context;\n const skinColor = get('common.primary', skin);\n const selectedBgColor = backgroundColor === 'skin' && skinColor ? skinColor : backgroundColor;\n const hoveredSelectedBgColor = calculateHoveredSelectedBgColor(selectedBgColor);\n\n const [isHovered, setIsHovered] = useState(false);\n\n const handleClick = useMemo(() => onClick, [onClick]);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const hoverStyle = isHovered ? {backgroundColor: hoveredSelectedBgColor} : {};\n\n const defaultIcon = selected ? 'fa-check' : 'fa-plus';\n const color = selected ? COLORS.white : COLORS.cm_grey_400;\n\n return (\n <div\n className={classnames(style.container, !selected && style.unselected)}\n style={{\n ...(selected && selectedBgColor ? {backgroundColor: selectedBgColor} : {}),\n ...(selected && hoverStyle)\n }}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n aria-label={text}\n data-name={`chip-${text}`}\n >\n <div className={style.left}>\n {leftIcon ? <FontAwesomeIcon style={{color}} icon={leftIcon} fontSize={ICON_SIZE} /> : null}\n <div title={text}>\n <span className={style.text} style={{color}}>\n {text}\n </span>\n {subText ? (\n <span className={style.subText} style={{color}}>\n {subText}\n </span>\n ) : null}\n </div>\n </div>\n <FontAwesomeIcon\n style={{color}}\n icon={customIcon ? `fa-${customIcon}` : defaultIcon}\n fontSize={ICON_SIZE}\n />\n </div>\n );\n};\n\nChip.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nChip.propTypes = {\n text: PropTypes.string,\n subText: PropTypes.string,\n selected: PropTypes.bool,\n customIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n onClick: PropTypes.func,\n leftIcon: PropTypes.string\n};\n\nexport default Chip;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,GAAG,MAAM,eAAe;AAC/B,SAAQC,OAAO,QAAO,oBAAoB;AAC1C,SAAQC,eAAe,QAAO,gCAAgC;AAC9D,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAAQC,MAAM,QAAO,wBAAwB;AAC7C,OAAOC,KAAK,MAAM,aAAa;AAE/
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","get","convert","FontAwesomeIcon","fas","library","Provider","COLORS","style","add","LUMINOSITY_DELTA","cm_primary_blue","DEFAULT_BACKGROUND_COLOR","ICON_SIZE","calculateHoveredSelectedBgColor","selectedBgColor","luminosityDelta","Chip","props","context","text","subText","selected","customIcon","onClick","leftIcon","backgroundColor","skin","skinColor","hoveredSelectedBgColor","isHovered","setIsHovered","handleClick","handleMouseEnter","handleMouseLeave","hoverStyle","defaultIcon","color","white","cm_grey_400","createElement","className","container","unselected","onMouseEnter","onMouseLeave","left","icon","fontSize","title","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","string","bool","func"],"sources":["../../../src/atom/chip/index.js"],"sourcesContent":["import React, {useMemo, useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\n\nimport get from 'lodash/fp/get';\nimport {convert} from 'css-color-function';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {fas} from '@fortawesome/pro-solid-svg-icons';\nimport {library} from '@fortawesome/fontawesome-svg-core';\nimport Provider from '../provider';\nimport {COLORS} from '../../variables/colors';\nimport style from './style.css';\n\nlibrary.add(fas);\n\nconst LUMINOSITY_DELTA = 0.08;\nconst {cm_primary_blue: DEFAULT_BACKGROUND_COLOR} = COLORS;\nconst ICON_SIZE = '12px';\n\nexport const calculateHoveredSelectedBgColor = (\n selectedBgColor,\n luminosityDelta = LUMINOSITY_DELTA\n) => convert(`hsl(from ${selectedBgColor} h s calc(l*(1 - ${luminosityDelta})))`);\n// note: luminosity decrease is relative to the selected color\n\nconst Chip = (props, context) => {\n const {\n text,\n subText,\n selected = false,\n customIcon,\n onClick,\n leftIcon,\n backgroundColor = DEFAULT_BACKGROUND_COLOR\n } = props;\n const {skin} = context;\n const skinColor = get('common.primary', skin);\n const selectedBgColor = backgroundColor === 'skin' && skinColor ? skinColor : backgroundColor;\n const hoveredSelectedBgColor = calculateHoveredSelectedBgColor(selectedBgColor);\n\n const [isHovered, setIsHovered] = useState(false);\n\n const handleClick = useMemo(() => onClick, [onClick]);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const hoverStyle = isHovered ? {backgroundColor: hoveredSelectedBgColor} : {};\n\n const defaultIcon = selected ? 'fa-check' : 'fa-plus';\n const color = selected ? COLORS.white : COLORS.cm_grey_400;\n\n return (\n <div\n className={classnames(style.container, !selected && style.unselected)}\n style={{\n ...(selected && selectedBgColor ? {backgroundColor: selectedBgColor} : {}),\n ...(selected && hoverStyle)\n }}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n aria-label={text}\n data-name={`chip-${text}`}\n >\n <div className={style.left}>\n {leftIcon ? <FontAwesomeIcon style={{color}} icon={leftIcon} fontSize={ICON_SIZE} /> : null}\n <div title={text}>\n <span className={style.text} style={{color}}>\n {text}\n </span>\n {subText ? (\n <span className={style.subText} style={{color}}>\n {subText}\n </span>\n ) : null}\n </div>\n </div>\n <FontAwesomeIcon\n style={{color}}\n icon={customIcon ? `fa-${customIcon}` : defaultIcon}\n fontSize={ICON_SIZE}\n />\n </div>\n );\n};\n\nChip.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nChip.propTypes = {\n text: PropTypes.string,\n subText: PropTypes.string,\n selected: PropTypes.bool,\n customIcon: PropTypes.string,\n backgroundColor: PropTypes.string,\n onClick: PropTypes.func,\n leftIcon: PropTypes.string\n};\n\nexport default Chip;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,QAAQ,EAAEC,WAAW,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,GAAG,MAAM,eAAe;AAC/B,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AAC6B;IAAK;EAAE,GACzCjB,IACG,CAAC,EACNC,OAAO,gBACN1B,KAAA,CAAA6C,aAAA;IAAMC,SAAS,EAAEjC,KAAK,CAACa,OAAQ;IAACb,KAAK,EAAE;MAAC6B;IAAK;EAAE,GAC5ChB,OACG,CAAC,GACL,IACD,CACF,CAAC,eACN1B,KAAA,CAAA6C,aAAA,CAACrC,eAAe;IACdK,KAAK,EAAE;MAAC6B;IAAK,CAAE;IACfU,IAAI,EAAExB,UAAU,GAAG,MAAMA,UAAU,EAAE,GAAGa,WAAY;IACpDY,QAAQ,EAAEnC;EAAU,CACrB,CACE,CAAC;AAEV,CAAC;AAEDI,IAAI,CAACiC,YAAY,GAAG;EAClBvB,IAAI,EAAErB,QAAQ,CAAC6C,iBAAiB,CAACxB;AACnC,CAAC;AAEDV,IAAI,CAACmC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACfnC,IAAI,EAAErB,SAAS,CAACyD,MAAM;EACtBnC,OAAO,EAAEtB,SAAS,CAACyD,MAAM;EACzBlC,QAAQ,EAAEvB,SAAS,CAAC0D,IAAI;EACxBlC,UAAU,EAAExB,SAAS,CAACyD,MAAM;EAC5B9B,eAAe,EAAE3B,SAAS,CAACyD,MAAM;EACjChC,OAAO,EAAEzB,SAAS,CAAC2D,IAAI;EACvBjC,QAAQ,EAAE1B,SAAS,CAACyD;AACtB,CAAC;AAED,eAAevC,IAAI","ignoreList":[]}
|
|
@@ -31,11 +31,8 @@ declare namespace Search {
|
|
|
31
31
|
const onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
32
|
const onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
33
33
|
const onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
34
|
-
const onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
35
|
-
const inputRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
36
34
|
const theme: PropTypes.Requireable<string>;
|
|
37
35
|
const dataTestId: PropTypes.Requireable<string>;
|
|
38
|
-
const searchIconAriaLabel: PropTypes.Requireable<string>;
|
|
39
36
|
}
|
|
40
37
|
}
|
|
41
38
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-search/index.js"],"names":[],"mappings":";AAYA,iDAkDC"}
|
|
@@ -6,10 +6,6 @@ import classnames from 'classnames';
|
|
|
6
6
|
import { NovaCompositionCoorpacademySearchThin as CMSearchIcon, NovaCompositionCoorpacademySearch as SearchIcon, NovaSolidStatusClose as CloseIcon } from '@coorpacademy/nova-icons';
|
|
7
7
|
import Provider from '../provider';
|
|
8
8
|
import style from './style.css';
|
|
9
|
-
const handleMouseDown = e => {
|
|
10
|
-
e.preventDefault();
|
|
11
|
-
e.stopPropagation();
|
|
12
|
-
};
|
|
13
9
|
const Search = props => {
|
|
14
10
|
const {
|
|
15
11
|
value,
|
|
@@ -18,56 +14,27 @@ const Search = props => {
|
|
|
18
14
|
onClear = _noop,
|
|
19
15
|
onFocus,
|
|
20
16
|
onBlur,
|
|
21
|
-
onKeyDown,
|
|
22
|
-
inputRef,
|
|
23
17
|
theme = 'default',
|
|
24
|
-
dataTestId
|
|
25
|
-
searchIconAriaLabel
|
|
18
|
+
dataTestId
|
|
26
19
|
} = props;
|
|
27
20
|
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
onKeyDown(e);
|
|
31
|
-
}
|
|
32
|
-
}, [onKeyDown]);
|
|
33
|
-
const isCoorpManager = theme === 'coorpmanager';
|
|
34
|
-
const isMooc = theme === 'mooc';
|
|
35
|
-
const isDefault = theme === 'default';
|
|
36
|
-
const wrapperClass = classnames({
|
|
37
|
-
[style.wrapperSearch]: isDefault,
|
|
38
|
-
[style.coorpmanager]: isCoorpManager,
|
|
39
|
-
[style.wrapperMooc]: isMooc
|
|
40
|
-
});
|
|
41
|
-
const wrapperParentClass = classnames({
|
|
42
|
-
[style.wrapperMoocParent]: isMooc
|
|
43
|
-
});
|
|
44
|
-
const searchClass = classnames({
|
|
45
|
-
[style.search]: true,
|
|
46
|
-
[style.moocSearch]: isMooc
|
|
47
|
-
});
|
|
48
|
-
const SearchIconComponent = isCoorpManager ? CMSearchIcon : SearchIcon;
|
|
49
|
-
const showTitle = isCoorpManager;
|
|
50
|
-
const showClearIcon = value && isCoorpManager;
|
|
21
|
+
const cmStyle = classnames(style.coorpmanager);
|
|
22
|
+
const isDefaultTheme = theme === 'default';
|
|
51
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
-
className:
|
|
53
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
-
className: wrapperClass
|
|
24
|
+
className: isDefaultTheme ? style.wrapperSearch : cmStyle
|
|
55
25
|
}, /*#__PURE__*/React.createElement("label", {
|
|
56
26
|
htmlFor: "search",
|
|
57
27
|
title: placeholder
|
|
58
|
-
}, /*#__PURE__*/React.createElement(
|
|
59
|
-
className: style.searchIcon
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
role: "img"
|
|
64
|
-
}), showTitle ? /*#__PURE__*/React.createElement("span", {
|
|
28
|
+
}, !isDefaultTheme ? /*#__PURE__*/React.createElement(CMSearchIcon, {
|
|
29
|
+
className: style.searchIcon
|
|
30
|
+
}) : /*#__PURE__*/React.createElement(SearchIcon, {
|
|
31
|
+
className: style.searchIcon
|
|
32
|
+
}), !isDefaultTheme ? /*#__PURE__*/React.createElement("span", {
|
|
65
33
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
66
34
|
}, placeholder) : null), /*#__PURE__*/React.createElement("input", {
|
|
67
|
-
ref: inputRef,
|
|
68
35
|
"data-name": "search-input",
|
|
69
36
|
"data-testid": dataTestId,
|
|
70
|
-
className:
|
|
37
|
+
className: style.search,
|
|
71
38
|
"aria-label": placeholder,
|
|
72
39
|
type: "text",
|
|
73
40
|
name: "search",
|
|
@@ -78,12 +45,11 @@ const Search = props => {
|
|
|
78
45
|
onInput: handleChange,
|
|
79
46
|
onFocus: onFocus,
|
|
80
47
|
onChange: _noop,
|
|
81
|
-
onBlur: onBlur
|
|
82
|
-
|
|
83
|
-
}), showClearIcon ? /*#__PURE__*/React.createElement(CloseIcon, {
|
|
48
|
+
onBlur: onBlur
|
|
49
|
+
}), value && !isDefaultTheme ? /*#__PURE__*/React.createElement(CloseIcon, {
|
|
84
50
|
onClick: onClear,
|
|
85
51
|
className: style.clearIcon
|
|
86
|
-
}) : null)
|
|
52
|
+
}) : null);
|
|
87
53
|
};
|
|
88
54
|
Search.contextTypes = {
|
|
89
55
|
skin: Provider.childContextTypes.skin
|
|
@@ -95,11 +61,8 @@ Search.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
95
61
|
onClear: PropTypes.func,
|
|
96
62
|
onFocus: PropTypes.func,
|
|
97
63
|
onBlur: PropTypes.func,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
theme: PropTypes.oneOf(['default', 'coorpmanager', 'mooc']),
|
|
101
|
-
dataTestId: PropTypes.string,
|
|
102
|
-
searchIconAriaLabel: PropTypes.string
|
|
64
|
+
theme: PropTypes.oneOf(['default', 'coorpmanager']),
|
|
65
|
+
dataTestId: PropTypes.string
|
|
103
66
|
} : {};
|
|
104
67
|
export default Search;
|
|
105
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaCompositionCoorpacademySearchThin","CMSearchIcon","NovaCompositionCoorpacademySearch","SearchIcon","NovaSolidStatusClose","CloseIcon","Provider","style","Search","props","value","placeholder","onChange","_noop","onClear","onFocus","onBlur","theme","dataTestId","handleChange","e","target","cmStyle","coorpmanager","isDefaultTheme","createElement","className","wrapperSearch","htmlFor","title","searchIcon","_isEmpty","noValue","search","type","name","id","onInput","onClick","clearIcon","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","func","oneOf"],"sources":["../../../src/atom/input-search/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademySearchThin as CMSearchIcon,\n NovaCompositionCoorpacademySearch as SearchIcon,\n NovaSolidStatusClose as CloseIcon\n} from '@coorpacademy/nova-icons';\nimport {noop, isEmpty} from 'lodash/fp';\nimport Provider from '../provider';\nimport style from './style.css';\n\nconst Search = props => {\n const {\n value,\n placeholder,\n onChange = noop,\n onClear = noop,\n onFocus,\n onBlur,\n theme = 'default',\n dataTestId\n } = props;\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const cmStyle = classnames(style.coorpmanager);\n const isDefaultTheme = theme === 'default';\n\n return (\n <div className={isDefaultTheme ? style.wrapperSearch : cmStyle}>\n <label htmlFor=\"search\" title={placeholder}>\n {!isDefaultTheme ? (\n <CMSearchIcon className={style.searchIcon} />\n ) : (\n <SearchIcon className={style.searchIcon} />\n )}\n {!isDefaultTheme ? (\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {placeholder}\n </span>\n ) : null}\n </label>\n <input\n data-name=\"search-input\"\n data-testid={dataTestId}\n className={style.search}\n aria-label={placeholder}\n type=\"text\"\n name=\"search\"\n id=\"search\"\n placeholder={placeholder}\n title={placeholder}\n value={value}\n onInput={handleChange}\n onFocus={onFocus}\n onChange={noop}\n onBlur={onBlur}\n />\n {value && !isDefaultTheme ? (\n <CloseIcon onClick={onClear} className={style.clearIcon} />\n ) : null}\n </div>\n );\n};\n\nSearch.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n placeholder: PropTypes.string.isRequired,\n onChange: PropTypes.func,\n onClear: PropTypes.func,\n onFocus: PropTypes.func,\n onBlur: PropTypes.func,\n theme: PropTypes.oneOf(['default', 'coorpmanager']),\n dataTestId: PropTypes.string\n};\n\nexport default Search;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,qCAAqC,IAAIC,YAAY,EACrDC,iCAAiC,IAAIC,UAAU,EAC/CC,oBAAoB,IAAIC,SAAS,QAC5B,0BAA0B;AAEjC,OAAOC,QAAQ,MAAM,aAAa;AAClC,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,MAAM,GAAGC,KAAK,IAAI;EACtB,MAAM;IACJC,KAAK;IACLC,WAAW;IACXC,QAAQ,GAAAC,KAAO;IACfC,OAAO,GAAAD,KAAO;IACdE,OAAO;IACPC,MAAM;IACNC,KAAK,GAAG,SAAS;IACjBC;EACF,CAAC,GAAGT,KAAK;EACT,MAAMU,YAAY,GAAGtB,OAAO,CAAC,MAAMuB,CAAC,IAAIR,QAAQ,CAACQ,CAAC,CAACC,MAAM,CAACX,KAAK,CAAC,EAAE,CAACE,QAAQ,CAAC,CAAC;EAC7E,MAAMU,OAAO,GAAGvB,UAAU,CAACQ,KAAK,CAACgB,YAAY,CAAC;EAC9C,MAAMC,cAAc,GAAGP,KAAK,KAAK,SAAS;EAE1C,oBACErB,KAAA,CAAA6B,aAAA;IAAKC,SAAS,EAAEF,cAAc,GAAGjB,KAAK,CAACoB,aAAa,GAAGL;EAAQ,gBAC7D1B,KAAA,CAAA6B,aAAA;IAAOG,OAAO,EAAC,QAAQ;IAACC,KAAK,EAAElB;EAAY,GACxC,CAACa,cAAc,gBACd5B,KAAA,CAAA6B,aAAA,CAACxB,YAAY;IAACyB,SAA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;EACxBnC,OAAO,EAAEhB,SAAS,CAACmD,IAAI;EACvBlC,OAAO,EAAEjB,SAAS,CAACmD,IAAI;EACvBjC,MAAM,EAAElB,SAAS,CAACmD,IAAI;EACtBhC,KAAK,EAAEnB,SAAS,CAACoD,KAAK,CAAC,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;EACnDhC,UAAU,EAAEpB,SAAS,CAACiD;AACxB,CAAC;AAED,eAAevC,MAAM","ignoreList":[]}
|
|
@@ -8,13 +8,11 @@
|
|
|
8
8
|
@value white from colors;
|
|
9
9
|
@value dark from colors;
|
|
10
10
|
@value black from colors;
|
|
11
|
-
@value cm_grey_75 from colors;
|
|
12
11
|
@value cm_grey_100 from colors;
|
|
13
12
|
@value cm_grey_150 from colors;
|
|
14
13
|
@value cm_grey_400 from colors;
|
|
15
14
|
@value cm_grey_500 from colors;
|
|
16
15
|
@value cm_grey_700 from colors;
|
|
17
|
-
@value brand from colors;
|
|
18
16
|
|
|
19
17
|
.wrapperSearch {
|
|
20
18
|
display: flex;
|
|
@@ -68,7 +66,6 @@
|
|
|
68
66
|
color: medium;
|
|
69
67
|
}
|
|
70
68
|
|
|
71
|
-
/* Theme: coorpmanager */
|
|
72
69
|
.coorpmanager {
|
|
73
70
|
position: relative;
|
|
74
71
|
}
|
|
@@ -180,65 +177,6 @@
|
|
|
180
177
|
line-height: 16px;
|
|
181
178
|
}
|
|
182
179
|
|
|
183
|
-
/* Theme: mooc */
|
|
184
|
-
.wrapperMooc {
|
|
185
|
-
display: flex;
|
|
186
|
-
flex-flow: nowrap;
|
|
187
|
-
flex-direction: row;
|
|
188
|
-
align-items: center;
|
|
189
|
-
overflow: hidden;
|
|
190
|
-
border-radius: 12px;
|
|
191
|
-
transition: box-shadow 0.3s ease-in-out;
|
|
192
|
-
background: cm_grey_100;
|
|
193
|
-
padding: 2px;
|
|
194
|
-
width: 100%;
|
|
195
|
-
flex: 1;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.wrapperMoocParent {
|
|
199
|
-
width: 100%;
|
|
200
|
-
flex: 1;
|
|
201
|
-
border-radius: 12px;
|
|
202
|
-
transition: box-shadow 0.3s ease-in-out;
|
|
203
|
-
background: transparent;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.moocSearch {
|
|
207
|
-
background-color: cm_grey_100;
|
|
208
|
-
border-radius: 12px;
|
|
209
|
-
height: 44px;
|
|
210
|
-
margin: 0;
|
|
211
|
-
font-family: Gilroy;
|
|
212
|
-
font-size: 14px;
|
|
213
|
-
font-weight: 500;
|
|
214
|
-
color: cm_grey_700;
|
|
215
|
-
padding: 0 0 0 45px;
|
|
216
|
-
padding-right: 48px;
|
|
217
|
-
outline: none;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.moocSearch:focus-within {
|
|
221
|
-
background-color: cm_grey_75;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.wrapperMoocParent:focus-within .wrapperMooc {
|
|
225
|
-
background: transparent;
|
|
226
|
-
box-shadow: 0 0 0 2px rgba(255,255,255,0), 0 0 0 2px brand;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.wrapperMooc:hover {
|
|
230
|
-
box-shadow: 0 0 0 2px brand;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.wrapperMooc .clearIcon {
|
|
234
|
-
position: relative;
|
|
235
|
-
right: 26px;
|
|
236
|
-
color: cm_grey_400;
|
|
237
|
-
width: 14px;
|
|
238
|
-
height: 14px;
|
|
239
|
-
cursor: pointer;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
180
|
input:-webkit-autofill,
|
|
243
181
|
input:-webkit-autofill:hover,
|
|
244
182
|
input:-webkit-autofill:focus,
|
|
@@ -246,20 +184,6 @@ input:-webkit-autofill:active{
|
|
|
246
184
|
-webkit-background-clip: text;
|
|
247
185
|
}
|
|
248
186
|
|
|
249
|
-
.moocSearch:-webkit-autofill,
|
|
250
|
-
.moocSearch:-webkit-autofill:hover,
|
|
251
|
-
.moocSearch:-webkit-autofill:focus,
|
|
252
|
-
.moocSearch:-webkit-autofill:active {
|
|
253
|
-
-webkit-box-shadow: 0 0 0 1000px cm_grey_100 inset !important;
|
|
254
|
-
-webkit-text-fill-color: cm_grey_700 !important;
|
|
255
|
-
background-color: cm_grey_100 !important;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
.wrapperMoocParent:focus-within .moocSearch:-webkit-autofill {
|
|
259
|
-
-webkit-box-shadow: 0 0 0 1000px cm_grey_75 inset !important;
|
|
260
|
-
background-color: cm_grey_75 !important;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
187
|
@media tablet {
|
|
264
188
|
.search,
|
|
265
189
|
input {
|
|
@@ -270,16 +194,6 @@ input:-webkit-autofill:active{
|
|
|
270
194
|
font-size: 12px;
|
|
271
195
|
color: medium;
|
|
272
196
|
}
|
|
273
|
-
|
|
274
|
-
.wrapperMoocParent {
|
|
275
|
-
max-width: 100%;
|
|
276
|
-
box-sizing: border-box;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.wrapperMooc {
|
|
280
|
-
max-width: 100%;
|
|
281
|
-
box-sizing: border-box;
|
|
282
|
-
}
|
|
283
197
|
}
|
|
284
198
|
|
|
285
199
|
@media mobile {
|
|
@@ -290,14 +204,4 @@ input:-webkit-autofill:active{
|
|
|
290
204
|
.search::placeholder {
|
|
291
205
|
font-size: 12px;
|
|
292
206
|
}
|
|
293
|
-
|
|
294
|
-
.wrapperMoocParent {
|
|
295
|
-
max-width: 100%;
|
|
296
|
-
box-sizing: border-box;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.wrapperMooc {
|
|
300
|
-
max-width: 100%;
|
|
301
|
-
box-sizing: border-box;
|
|
302
|
-
}
|
|
303
207
|
}
|
|
@@ -8,6 +8,7 @@ declare namespace InputText {
|
|
|
8
8
|
defaultValue: PropTypes.Requireable<string>;
|
|
9
9
|
theme: PropTypes.Requireable<string>;
|
|
10
10
|
disabled: PropTypes.Requireable<boolean>;
|
|
11
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
11
12
|
value: PropTypes.Requireable<string>;
|
|
12
13
|
hint: PropTypes.Requireable<string>;
|
|
13
14
|
error: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-text/index.js"],"names":[],"mappings":";AAkBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-text/index.js"],"names":[],"mappings":";AAkBA,oDA+FC"}
|
|
@@ -28,6 +28,7 @@ const InputText = props => {
|
|
|
28
28
|
theme = 'default',
|
|
29
29
|
description,
|
|
30
30
|
disabled,
|
|
31
|
+
readOnly = false,
|
|
31
32
|
modified = false,
|
|
32
33
|
title: propsTitle,
|
|
33
34
|
'data-name': dataName = 'input-text',
|
|
@@ -63,7 +64,7 @@ const InputText = props => {
|
|
|
63
64
|
className: style.leftIcon
|
|
64
65
|
}) : null;
|
|
65
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
|
-
className: classnames(mainClass, className, disabled && style.disabled, _isNil(propsTitle) && style.isNoTitle)
|
|
67
|
+
className: classnames(mainClass, className, disabled && style.disabled, readOnly && style.readOnly, _isNil(propsTitle) && style.isNoTitle)
|
|
67
68
|
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", {
|
|
68
69
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
69
70
|
}, propsTitle, toolTipView), /*#__PURE__*/React.createElement("input", {
|
|
@@ -77,6 +78,7 @@ const InputText = props => {
|
|
|
77
78
|
value: value,
|
|
78
79
|
onInput: handleChange,
|
|
79
80
|
disabled: disabled,
|
|
81
|
+
readOnly: readOnly,
|
|
80
82
|
onChange: _noop,
|
|
81
83
|
"data-name": dataName,
|
|
82
84
|
"aria-label": ariaLabel
|
|
@@ -94,6 +96,7 @@ InputText.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
94
96
|
defaultValue: PropTypes.string,
|
|
95
97
|
theme: PropTypes.oneOf(_keys(themeStyle)),
|
|
96
98
|
disabled: PropTypes.bool,
|
|
99
|
+
readOnly: PropTypes.bool,
|
|
97
100
|
value: PropTypes.string,
|
|
98
101
|
hint: PropTypes.string,
|
|
99
102
|
error: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputText","props","autoFocus","placeholder","value","type","hint","defaultValue","onChange","_noop","error","valid","theme","description","disabled","modified","title","propsTitle","dataName","ariaLabel","inputColor","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isNil","isNoTitle","_isEmpty","noValue","name","input","autoComplete","onInput","preview","backgroundColor","propTypes","process","env","NODE_ENV","bool","string","oneOf","_keys","func"],"sources":["../../../src/atom/input-text/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n type = 'text',\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n modified = false,\n title: propsTitle,\n 'data-name': dataName = 'input-text',\n 'aria-label': ariaLabel = 'Input Text',\n inputColor = false\n } = props;\n\n const isCMTheme = theme === 'coorpmanager';\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = isCMTheme && error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = isCMTheme && valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type={type}\n name={propsTitle}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n onChange={noop}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n {inputColor && !error && value ? (\n <span\n className={style.preview}\n style={{\n backgroundColor: value\n }}\n />\n ) : null}\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n type: PropTypes.string,\n valid: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n inputColor: PropTypes.bool\n};\nexport default InputText;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,oBAAoB,IAAIC,SAAS,EACjCC,0CAA0C,IAAIC,QAAQ,QACjD,0BAA0B;AACjC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAG;EACjBC,KAAK,EAAEF,KAAK,CAACE,KAAK;EAClBC,YAAY,EAAEH,KAAK,CAACG,YAAY;EAChCC,OAAO,EAAEJ,KAAK,CAACI,OAAO;EACtBC,OAAO,EAAEL,KAAK,CAACM;AACjB,CAAC;AACD,MAAMC,SAAS,GAAGC,KAAK,IAAI;EACzB,MAAM;IACJC,SAAS,GAAG,KAAK;IACjBC,WAAW,GAAG,EAAE;IAChBC,KAAK;IACLC,IAAI,GAAG,MAAM;IACbC,IAAI;IACJC,YAAY;IACZC,QAAQ,GAAAC,KAAO;IACfC,KAAK;IACLC,KAAK;IACLC,KAAK,GAAG,SAAS;IACjBC,WAAW;IACXC,QAAQ;IACRC,QAAQ,GAAG,KAAK;IAChBC,KAAK,EAAEC,UAAU;IACjB,WAAW,EAAEC,QAAQ,GAAG,YAAY;IACpC,YAAY,EAAEC,SAAS,GAAG,YAAY;IACtCC,UAAU,GAAG;EACf,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","classnames","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputText","props","autoFocus","placeholder","value","type","hint","defaultValue","onChange","_noop","error","valid","theme","description","disabled","readOnly","modified","title","propsTitle","dataName","ariaLabel","inputColor","isCMTheme","handleChange","e","target","mainClass","className","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isNil","isNoTitle","_isEmpty","noValue","name","input","autoComplete","onInput","preview","backgroundColor","propTypes","process","env","NODE_ENV","bool","string","oneOf","_keys","func"],"sources":["../../../src/atom/input-text/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, isNil, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport classnames from 'classnames';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputText = props => {\n const {\n autoFocus = false,\n placeholder = '',\n value,\n type = 'text',\n hint,\n defaultValue,\n onChange = noop,\n error,\n valid,\n theme = 'default',\n description,\n disabled,\n readOnly = false,\n modified = false,\n title: propsTitle,\n 'data-name': dataName = 'input-text',\n 'aria-label': ariaLabel = 'Input Text',\n inputColor = false\n } = props;\n\n const isCMTheme = theme === 'coorpmanager';\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = isCMTheme && error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = isCMTheme && valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n readOnly && style.readOnly,\n isNil(propsTitle) && style.isNoTitle\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n\n <input\n autoFocus={autoFocus}\n type={type}\n name={propsTitle}\n className={style.input}\n placeholder={placeholder}\n defaultValue={defaultValue}\n autoComplete={'off'}\n value={value}\n onInput={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n onChange={noop}\n data-name={dataName}\n aria-label={ariaLabel}\n />\n {inputColor && !error && value ? (\n <span\n className={style.preview}\n style={{\n backgroundColor: value\n }}\n />\n ) : null}\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputText.propTypes = {\n autoFocus: PropTypes.bool,\n title: PropTypes.string,\n placeholder: PropTypes.string,\n defaultValue: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n type: PropTypes.string,\n valid: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n inputColor: PropTypes.bool\n};\nexport default InputText;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,oBAAoB,IAAIC,SAAS,EACjCC,0CAA0C,IAAIC,QAAQ,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,CAACsE,IAAI;EACxBlD,KAAK,EAAEpB,SAAS,CAACuE,MAAM;EACvBjD,IAAI,EAAEtB,SAAS,CAACuE,MAAM;EACtB7C,KAAK,EAAE1B,SAAS,CAACuE,MAAM;EACvB/C,QAAQ,EAAExB,SAAS,CAAC0E,IAAI;EACxB7C,WAAW,EAAE7B,SAAS,CAACuE,MAAM;EAC7BvC,QAAQ,EAAEhC,SAAS,CAACsE,IAAI;EACxBjD,IAAI,EAAErB,SAAS,CAACuE,MAAM;EACtB5C,KAAK,EAAE3B,SAAS,CAACsE,IAAI;EACrB,YAAY,EAAEtE,SAAS,CAACuE,MAAM;EAC9B,WAAW,EAAEvE,SAAS,CAACuE,MAAM;EAC7BlC,UAAU,EAAErC,SAAS,CAACsE;AACxB,CAAC;AACD,eAAetD,SAAS","ignoreList":[]}
|
|
@@ -410,4 +410,16 @@
|
|
|
410
410
|
position: absolute;
|
|
411
411
|
top: 23%;
|
|
412
412
|
box-shadow: 0 0 1px grey;
|
|
413
|
-
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.readOnly input {
|
|
416
|
+
caret-color: transparent;
|
|
417
|
+
cursor: default;
|
|
418
|
+
user-select: none;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.readOnly.coorpmanager input {
|
|
422
|
+
caret-color: transparent;
|
|
423
|
+
cursor: default;
|
|
424
|
+
user-select: none;
|
|
425
|
+
}
|
|
@@ -10,6 +10,7 @@ declare namespace InputTextWithTitle {
|
|
|
10
10
|
placeholder: PropTypes.Requireable<string>;
|
|
11
11
|
defaultValue: PropTypes.Requireable<string>;
|
|
12
12
|
disabled: PropTypes.Requireable<boolean>;
|
|
13
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
13
14
|
value: PropTypes.Requireable<string>;
|
|
14
15
|
hint: PropTypes.Requireable<string>;
|
|
15
16
|
error: PropTypes.Requireable<string>;
|
|
@@ -7,6 +7,7 @@ declare namespace InputTextarea {
|
|
|
7
7
|
const name: PropTypes.Requireable<string>;
|
|
8
8
|
const theme: PropTypes.Requireable<string>;
|
|
9
9
|
const disabled: PropTypes.Requireable<boolean>;
|
|
10
|
+
const readOnly: PropTypes.Requireable<boolean>;
|
|
10
11
|
const value: PropTypes.Requireable<string>;
|
|
11
12
|
const hint: PropTypes.Requireable<string>;
|
|
12
13
|
const error: PropTypes.Requireable<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-textarea/index.js"],"names":[],"mappings":";AAkBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/input-textarea/index.js"],"names":[],"mappings":";AAkBA,wDAyEC"}
|
|
@@ -26,6 +26,7 @@ const InputTextarea = props => {
|
|
|
26
26
|
valid,
|
|
27
27
|
description,
|
|
28
28
|
disabled,
|
|
29
|
+
readOnly = false,
|
|
29
30
|
modified = false
|
|
30
31
|
} = props;
|
|
31
32
|
const mainClass = themeStyle[theme];
|
|
@@ -56,7 +57,7 @@ const InputTextarea = props => {
|
|
|
56
57
|
className: style.leftIcon
|
|
57
58
|
}) : null;
|
|
58
59
|
return /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: classnames(mainClass, className, disabled && style.disabled)
|
|
60
|
+
className: classnames(mainClass, className, disabled && style.disabled, readOnly && style.readonly)
|
|
60
61
|
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", {
|
|
61
62
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
62
63
|
}, propsTitle, toolTipView), /*#__PURE__*/React.createElement("textarea", {
|
|
@@ -65,6 +66,7 @@ const InputTextarea = props => {
|
|
|
65
66
|
placeholder: placeholder,
|
|
66
67
|
onChange: handleChange,
|
|
67
68
|
disabled: disabled,
|
|
69
|
+
readOnly: readOnly,
|
|
68
70
|
"data-testid": name
|
|
69
71
|
}), errorIconView, validIconView, hintView), descriptionView);
|
|
70
72
|
};
|
|
@@ -74,6 +76,7 @@ InputTextarea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
74
76
|
name: PropTypes.string,
|
|
75
77
|
theme: PropTypes.oneOf(_keys(themeStyle)),
|
|
76
78
|
disabled: PropTypes.bool,
|
|
79
|
+
readOnly: PropTypes.bool,
|
|
77
80
|
value: PropTypes.string,
|
|
78
81
|
hint: PropTypes.string,
|
|
79
82
|
error: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop","error","valid","description","disabled","modified","mainClass","className","handleChange","e","target","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","_isEmpty","noValue","propTypes","process","env","NODE_ENV","string","oneOf","_keys","bool","func"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputTextarea = props => {\n const {\n title: propsTitle,\n name,\n placeholder,\n value,\n hint,\n theme = 'default',\n onChange = noop,\n error,\n valid,\n description,\n disabled,\n modified = false\n } = props;\n\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","getClassState","style","themeStyle","setup","coorpmanager","cockpit","default","defaultStyle","InputTextarea","props","title","propsTitle","name","placeholder","value","hint","theme","onChange","_noop","error","valid","description","disabled","readOnly","modified","mainClass","className","handleChange","e","target","descriptionView","createElement","toolTipView","infoIconWrapper","infoIcon","descriptionLabel","hintView","dangerouslySetInnerHTML","__html","errorIconView","leftIcon","validIconView","readonly","_isEmpty","noValue","propTypes","process","env","NODE_ENV","string","oneOf","_keys","bool","func"],"sources":["../../../src/atom/input-textarea/index.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {\n NovaSolidStatusCheckCircle2 as CheckIcon,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n coorpmanager: style.coorpmanager,\n cockpit: style.cockpit,\n default: style.defaultStyle\n};\nconst InputTextarea = props => {\n const {\n title: propsTitle,\n name,\n placeholder,\n value,\n hint,\n theme = 'default',\n onChange = noop,\n error,\n valid,\n description,\n disabled,\n readOnly = false,\n modified = false\n } = props;\n\n const mainClass = themeStyle[theme];\n const className = getClassState(style.defaultStyle, style.modified, style.error, modified, error);\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n\n const descriptionView =\n description && theme !== 'coorpmanager' ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const toolTipView =\n description && theme === 'coorpmanager' ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null;\n const hintView =\n theme === 'coorpmanager' ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n const errorIconView = error ? <ErrorIcon className={style.leftIcon} /> : null;\n const validIconView = valid ? <CheckIcon className={style.leftIcon} /> : null;\n\n return (\n <div\n className={classnames(\n mainClass,\n className,\n disabled && style.disabled,\n readOnly && style.readonly\n )}\n >\n <label>\n <span className={classnames(style.title, isEmpty(value) && style.noValue)}>\n {propsTitle}\n {toolTipView}\n </span>\n <textarea\n name={name}\n value={value}\n placeholder={placeholder}\n onChange={handleChange}\n disabled={disabled}\n readOnly={readOnly}\n data-testid={name}\n />\n {errorIconView}\n {validIconView}\n {hintView}\n </label>\n {descriptionView}\n </div>\n );\n};\n\nInputTextarea.propTypes = {\n placeholder: PropTypes.string,\n title: PropTypes.string,\n name: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle)),\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n value: PropTypes.string,\n hint: PropTypes.string,\n error: PropTypes.string,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n valid: PropTypes.bool\n};\nexport default InputTextarea;\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAGC,OAAO,QAAO,OA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,CAAAyC,aAAA;IACEnB,IAAI,EAAEA,IAAK;IACXE,KAAK,EAAEA,KAAM;IACbD,WAAW,EAAEA,WAAY;IACzBI,QAAQ,EAAEU,YAAa;IACvBL,QAAQ,EAAEA,QAAS;IACnBC,QAAQ,EAAEA,QAAS;IACnB,eAAaX;EAAK,CACnB,CAAC,EACD2B,aAAa,EACbE,aAAa,EACbL,QACI,CAAC,EACPN,eACE,CAAC;AAEV,CAAC;AAEDtB,aAAa,CAACqC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACxBnC,WAAW,EAAErB,SAAS,CAACyD,MAAM;EAC7BvC,KAAK,EAAElB,SAAS,CAACyD,MAAM;EACvBrC,IAAI,EAAEpB,SAAS,CAACyD,MAAM;EACtBjC,KAAK,EAAExB,SAAS,CAAC0D,KAAK,CAACC,KAAA,CAAKjD,UAAU,CAAC,CAAC;EACxCoB,QAAQ,EAAE9B,SAAS,CAAC4D,IAAI;EACxB7B,QAAQ,EAAE/B,SAAS,CAAC4D,IAAI;EACxBtC,KAAK,EAAEtB,SAAS,CAACyD,MAAM;EACvBlC,IAAI,EAAEvB,SAAS,CAACyD,MAAM;EACtB9B,KAAK,EAAE3B,SAAS,CAACyD,MAAM;EACvBhC,QAAQ,EAAEzB,SAAS,CAAC6D,IAAI;EACxBhC,WAAW,EAAE7B,SAAS,CAACyD,MAAM;EAC7BzB,QAAQ,EAAEhC,SAAS,CAAC4D,IAAI;EACxBhC,KAAK,EAAE5B,SAAS,CAAC4D;AACnB,CAAC;AACD,eAAe5C,aAAa","ignoreList":[]}
|
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
composes: defaultStyle;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.readonly {
|
|
29
|
+
composes: defaultStyle;
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
.defaultStyle label {
|
|
29
33
|
display: flex;
|
|
30
34
|
align-items: center;
|
|
@@ -56,6 +60,15 @@
|
|
|
56
60
|
resize: none;
|
|
57
61
|
}
|
|
58
62
|
|
|
63
|
+
.readonly textarea {
|
|
64
|
+
user-select: none;
|
|
65
|
+
-webkit-user-select: none;
|
|
66
|
+
-moz-user-select: none;
|
|
67
|
+
-ms-user-select: none;
|
|
68
|
+
cursor: default;
|
|
69
|
+
caret-color: transparent;
|
|
70
|
+
}
|
|
71
|
+
|
|
59
72
|
.error textarea {
|
|
60
73
|
border-color: negative;
|
|
61
74
|
}
|
|
@@ -353,6 +366,15 @@
|
|
|
353
366
|
opacity: 0.5;
|
|
354
367
|
}
|
|
355
368
|
|
|
369
|
+
.coorpmanager.readonly textarea {
|
|
370
|
+
user-select: none;
|
|
371
|
+
-webkit-user-select: none;
|
|
372
|
+
-moz-user-select: none;
|
|
373
|
+
-ms-user-select: none;
|
|
374
|
+
cursor: default;
|
|
375
|
+
caret-color: transparent;
|
|
376
|
+
}
|
|
377
|
+
|
|
356
378
|
.coorpmanager .infoIconWrapper {
|
|
357
379
|
overflow: visible;
|
|
358
380
|
height: 12px;
|