@coorpacademy/components 11.38.8-alpha.7 → 11.39.1-alpha.0
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 +0 -3
- package/es/atom/chip/index.js.map +1 -1
- package/es/atom/input-text/index.d.ts +0 -1
- package/es/atom/input-text/index.d.ts.map +1 -1
- package/es/atom/input-text/index.js +1 -4
- package/es/atom/input-text/index.js.map +1 -1
- package/es/atom/input-text/style.css +1 -13
- package/es/atom/input-text-with-title/index.d.ts +0 -1
- package/es/atom/input-textarea/index.d.ts +0 -1
- package/es/atom/input-textarea/index.d.ts.map +1 -1
- package/es/atom/input-textarea/index.js +1 -4
- package/es/atom/input-textarea/index.js.map +1 -1
- package/es/atom/input-textarea/style.css +0 -22
- package/es/atom/select/index.d.ts +0 -1
- package/es/atom/select/index.d.ts.map +1 -1
- package/es/atom/select/index.js +11 -26
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +0 -61
- 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 +2 -42
- 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 +0 -13
- package/es/molecule/card/favorite.js.map +1 -1
- package/es/molecule/course-sections/index.d.ts +0 -1
- package/es/molecule/drag-and-drop/index.d.ts +0 -1
- package/es/molecule/drag-and-drop/upload-report.d.ts +0 -1
- package/es/molecule/filters/index.d.ts +0 -1
- package/es/molecule/filters/index.d.ts.map +1 -1
- 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 +0 -1
- package/es/molecule/translation-modal/index.d.ts +0 -4
- package/es/molecule/translation-modal/index.js +6 -6
- package/es/molecule/translation-modal/index.js.map +1 -1
- package/es/organism/content-translation/index.d.ts +0 -2
- package/es/organism/header-with-actions/index.d.ts +2 -1
- package/es/organism/header-with-actions/index.d.ts.map +1 -1
- package/es/organism/header-with-actions/index.js +4 -3
- package/es/organism/header-with-actions/index.js.map +1 -1
- package/es/organism/header-with-actions/types.d.ts +2 -0
- package/es/organism/header-with-actions/types.d.ts.map +1 -1
- package/es/organism/header-with-actions/types.js +2 -1
- package/es/organism/header-with-actions/types.js.map +1 -1
- package/es/organism/icon-editor/index.d.ts +0 -1
- package/es/organism/icon-editor/index.d.ts.map +1 -1
- package/es/organism/icon-editor/types.d.ts +0 -1
- package/es/organism/icon-editor/types.d.ts.map +1 -1
- package/es/organism/rewards-form/index.d.ts +0 -1
- package/es/organism/select-opponents/index.d.ts +0 -1
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/types.d.ts +0 -1
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/skill-edition/index.d.ts +2 -22
- package/es/organism/skill-edition/index.d.ts.map +1 -1
- package/es/organism/skill-edition/index.js +47 -63
- package/es/organism/skill-edition/index.js.map +1 -1
- package/es/organism/skill-edition/style.css +13 -0
- package/es/organism/skill-edition/types.d.ts +5 -27
- package/es/organism/skill-edition/types.d.ts.map +1 -1
- package/es/organism/skill-edition/types.js +5 -22
- package/es/organism/skill-edition/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +0 -5
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +0 -5
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +0 -4
- package/es/template/back-office/brand-update/index.d.ts +3 -22
- package/es/template/back-office/brand-update/index.d.ts.map +1 -1
- package/es/template/back-office/brand-update/index.js +3 -6
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/certifications/index.d.ts +0 -1
- package/es/template/common/search-page/index.d.ts +0 -1
- package/es/template/playlist-detail/index.d.ts +0 -1
- package/es/util/render-with-context.d.ts.map +1 -1
- package/es/util/render-with-context.js +2 -3
- 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 +0 -3
- package/lib/atom/chip/index.js.map +1 -1
- package/lib/atom/input-text/index.d.ts +0 -1
- package/lib/atom/input-text/index.d.ts.map +1 -1
- package/lib/atom/input-text/index.js +1 -4
- package/lib/atom/input-text/index.js.map +1 -1
- package/lib/atom/input-text/style.css +1 -13
- package/lib/atom/input-text-with-title/index.d.ts +0 -1
- package/lib/atom/input-textarea/index.d.ts +0 -1
- package/lib/atom/input-textarea/index.d.ts.map +1 -1
- package/lib/atom/input-textarea/index.js +1 -4
- package/lib/atom/input-textarea/index.js.map +1 -1
- package/lib/atom/input-textarea/style.css +0 -22
- package/lib/atom/select/index.d.ts +0 -1
- package/lib/atom/select/index.d.ts.map +1 -1
- package/lib/atom/select/index.js +11 -26
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +0 -61
- package/lib/atom/status-item/index.d.ts.map +1 -1
- package/lib/atom/status-item/index.js +17 -15
- 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 +2 -41
- 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 +0 -13
- package/lib/molecule/card/favorite.js.map +1 -1
- package/lib/molecule/course-sections/index.d.ts +0 -1
- package/lib/molecule/drag-and-drop/index.d.ts +0 -1
- package/lib/molecule/drag-and-drop/upload-report.d.ts +0 -1
- package/lib/molecule/filters/index.d.ts +0 -1
- package/lib/molecule/filters/index.d.ts.map +1 -1
- 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 +0 -1
- package/lib/molecule/translation-modal/index.d.ts +0 -4
- package/lib/molecule/translation-modal/index.js +6 -6
- package/lib/molecule/translation-modal/index.js.map +1 -1
- package/lib/organism/content-translation/index.d.ts +0 -2
- package/lib/organism/header-with-actions/index.d.ts +2 -1
- package/lib/organism/header-with-actions/index.d.ts.map +1 -1
- package/lib/organism/header-with-actions/index.js +4 -3
- package/lib/organism/header-with-actions/index.js.map +1 -1
- package/lib/organism/header-with-actions/types.d.ts +2 -0
- package/lib/organism/header-with-actions/types.d.ts.map +1 -1
- package/lib/organism/header-with-actions/types.js +2 -1
- package/lib/organism/header-with-actions/types.js.map +1 -1
- package/lib/organism/icon-editor/index.d.ts +0 -1
- package/lib/organism/icon-editor/index.d.ts.map +1 -1
- package/lib/organism/icon-editor/types.d.ts +0 -1
- package/lib/organism/icon-editor/types.d.ts.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +0 -1
- package/lib/organism/select-opponents/index.d.ts +0 -1
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.d.ts +0 -1
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.d.ts +2 -22
- package/lib/organism/skill-edition/index.d.ts.map +1 -1
- package/lib/organism/skill-edition/index.js +47 -63
- package/lib/organism/skill-edition/index.js.map +1 -1
- package/lib/organism/skill-edition/style.css +13 -0
- package/lib/organism/skill-edition/types.d.ts +5 -27
- package/lib/organism/skill-edition/types.d.ts.map +1 -1
- package/lib/organism/skill-edition/types.js +5 -22
- package/lib/organism/skill-edition/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +0 -5
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +0 -5
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +0 -4
- package/lib/template/back-office/brand-update/index.d.ts +3 -22
- package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
- package/lib/template/back-office/brand-update/index.js +3 -6
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/certifications/index.d.ts +0 -1
- package/lib/template/common/search-page/index.d.ts +0 -1
- package/lib/template/playlist-detail/index.d.ts +0 -1
- package/lib/util/render-with-context.d.ts.map +1 -1
- package/lib/util/render-with-context.js +2 -3
- package/lib/util/render-with-context.js.map +1 -1
- package/locales/.mtslconfig.json +1 -0
- 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":"AAeO,qGAG0E;;AAGjF,6DAiEC"}
|
package/es/atom/chip/index.js
CHANGED
|
@@ -4,12 +4,9 @@ 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';
|
|
9
7
|
import Provider from '../provider';
|
|
10
8
|
import { COLORS } from '../../variables/colors';
|
|
11
9
|
import style from './style.css';
|
|
12
|
-
library.add(fas);
|
|
13
10
|
const LUMINOSITY_DELTA = 0.08;
|
|
14
11
|
const {
|
|
15
12
|
cm_primary_blue: DEFAULT_BACKGROUND_COLOR
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useState","useCallback","PropTypes","classnames","get","convert","FontAwesomeIcon","
|
|
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/B,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAM;EAACC,eAAe,EAAEC;AAAwB,CAAC,GAAGJ,MAAM;AAC1D,MAAMK,S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AC;AAEV,CAAC;AAEDI,IAAI,CAACiC,YAAY,GAAG;EAClBvB,IAAI,EAAEpB,QAAQ,CAAC4C,iBAAiB,CAACxB;AACnC,CAAC;AAEDV,IAAI,CAACmC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACfnC,IAAI,EAAElB,SAAS,CAACsD,MAAM;EACtBnC,OAAO,EAAEnB,SAAS,CAACsD,MAAM;EACzBlC,QAAQ,EAAEpB,SAAS,CAACuD,IAAI;EACxBlC,UAAU,EAAErB,SAAS,CAACsD,MAAM;EAC5B9B,eAAe,EAAExB,SAAS,CAACsD,MAAM;EACjChC,OAAO,EAAEtB,SAAS,CAACwD,IAAI;EACvBjC,QAAQ,EAAEvB,SAAS,CAACsD;AACtB,CAAC;AAED,eAAevC,IAAI","ignoreList":[]}
|
|
@@ -8,7 +8,6 @@ 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>;
|
|
12
11
|
value: PropTypes.Requireable<string>;
|
|
13
12
|
hint: PropTypes.Requireable<string>;
|
|
14
13
|
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,oDA4FC"}
|
|
@@ -28,7 +28,6 @@ const InputText = props => {
|
|
|
28
28
|
theme = 'default',
|
|
29
29
|
description,
|
|
30
30
|
disabled,
|
|
31
|
-
readOnly = false,
|
|
32
31
|
modified = false,
|
|
33
32
|
title: propsTitle,
|
|
34
33
|
'data-name': dataName = 'input-text',
|
|
@@ -64,7 +63,7 @@ const InputText = props => {
|
|
|
64
63
|
className: style.leftIcon
|
|
65
64
|
}) : null;
|
|
66
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: classnames(mainClass, className, disabled && style.disabled,
|
|
66
|
+
className: classnames(mainClass, className, disabled && style.disabled, _isNil(propsTitle) && style.isNoTitle)
|
|
68
67
|
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", {
|
|
69
68
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
70
69
|
}, propsTitle, toolTipView), /*#__PURE__*/React.createElement("input", {
|
|
@@ -78,7 +77,6 @@ const InputText = props => {
|
|
|
78
77
|
value: value,
|
|
79
78
|
onInput: handleChange,
|
|
80
79
|
disabled: disabled,
|
|
81
|
-
readOnly: readOnly,
|
|
82
80
|
onChange: _noop,
|
|
83
81
|
"data-name": dataName,
|
|
84
82
|
"aria-label": ariaLabel
|
|
@@ -96,7 +94,6 @@ InputText.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
96
94
|
defaultValue: PropTypes.string,
|
|
97
95
|
theme: PropTypes.oneOf(_keys(themeStyle)),
|
|
98
96
|
disabled: PropTypes.bool,
|
|
99
|
-
readOnly: PropTypes.bool,
|
|
100
97
|
value: PropTypes.string,
|
|
101
98
|
hint: PropTypes.string,
|
|
102
99
|
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","
|
|
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,UA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ExB,SAAS,CAACyE,IAAI;EACxB5C,WAAW,EAAE7B,SAAS,CAACsE,MAAM;EAC7BvC,QAAQ,EAAE/B,SAAS,CAACqE,IAAI;EACxBhD,IAAI,EAAErB,SAAS,CAACsE,MAAM;EACtB3C,KAAK,EAAE3B,SAAS,CAACqE,IAAI;EACrB,YAAY,EAAErE,SAAS,CAACsE,MAAM;EAC9B,WAAW,EAAEtE,SAAS,CAACsE,MAAM;EAC7BlC,UAAU,EAAEpC,SAAS,CAACqE;AACxB,CAAC;AACD,eAAerD,SAAS","ignoreList":[]}
|
|
@@ -410,16 +410,4 @@
|
|
|
410
410
|
position: absolute;
|
|
411
411
|
top: 23%;
|
|
412
412
|
box-shadow: 0 0 1px grey;
|
|
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
|
-
}
|
|
413
|
+
}
|
|
@@ -10,7 +10,6 @@ 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>;
|
|
14
13
|
value: PropTypes.Requireable<string>;
|
|
15
14
|
hint: PropTypes.Requireable<string>;
|
|
16
15
|
error: PropTypes.Requireable<string>;
|
|
@@ -7,7 +7,6 @@ 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>;
|
|
11
10
|
const value: PropTypes.Requireable<string>;
|
|
12
11
|
const hint: PropTypes.Requireable<string>;
|
|
13
12
|
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,wDAgEC"}
|
|
@@ -26,7 +26,6 @@ const InputTextarea = props => {
|
|
|
26
26
|
valid,
|
|
27
27
|
description,
|
|
28
28
|
disabled,
|
|
29
|
-
readOnly = false,
|
|
30
29
|
modified = false
|
|
31
30
|
} = props;
|
|
32
31
|
const mainClass = themeStyle[theme];
|
|
@@ -57,7 +56,7 @@ const InputTextarea = props => {
|
|
|
57
56
|
className: style.leftIcon
|
|
58
57
|
}) : null;
|
|
59
58
|
return /*#__PURE__*/React.createElement("div", {
|
|
60
|
-
className: classnames(mainClass, className, disabled && style.disabled
|
|
59
|
+
className: classnames(mainClass, className, disabled && style.disabled)
|
|
61
60
|
}, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", {
|
|
62
61
|
className: classnames(style.title, _isEmpty(value) && style.noValue)
|
|
63
62
|
}, propsTitle, toolTipView), /*#__PURE__*/React.createElement("textarea", {
|
|
@@ -66,7 +65,6 @@ const InputTextarea = props => {
|
|
|
66
65
|
placeholder: placeholder,
|
|
67
66
|
onChange: handleChange,
|
|
68
67
|
disabled: disabled,
|
|
69
|
-
readOnly: readOnly,
|
|
70
68
|
"data-testid": name
|
|
71
69
|
}), errorIconView, validIconView, hintView), descriptionView);
|
|
72
70
|
};
|
|
@@ -76,7 +74,6 @@ InputTextarea.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
76
74
|
name: PropTypes.string,
|
|
77
75
|
theme: PropTypes.oneOf(_keys(themeStyle)),
|
|
78
76
|
disabled: PropTypes.bool,
|
|
79
|
-
readOnly: PropTypes.bool,
|
|
80
77
|
value: PropTypes.string,
|
|
81
78
|
hint: PropTypes.string,
|
|
82
79
|
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","
|
|
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 className={classnames(mainClass, className, disabled && style.disabled)}>\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 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 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,OAAO;AACpC,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,UAAU,MAAM,YAAY;AACnC,SACEC,2BAA2B,IAAIC,SAAS,EACxCC,oBAAoB,IAAIC,SAAS,EACjCC,0CAA0C,IAAIC,QAAQ,QACjD,0BAA0B;AACjC,OA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,aAAa,CAACmC,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACxBjC,WAAW,EAAErB,SAAS,CAACuD,MAAM;EAC7BrC,KAAK,EAAElB,SAAS,CAACuD,MAAM;EACvBnC,IAAI,EAAEpB,SAAS,CAACuD,MAAM;EACtB/B,KAAK,EAAExB,SAAS,CAACwD,KAAK,CAACC,KAAA,CAAK/C,UAAU,CAAC,CAAC;EACxCoB,QAAQ,EAAE9B,SAAS,CAAC0D,IAAI;EACxBpC,KAAK,EAAEtB,SAAS,CAACuD,MAAM;EACvBhC,IAAI,EAAEvB,SAAS,CAACuD,MAAM;EACtB5B,KAAK,EAAE3B,SAAS,CAACuD,MAAM;EACvB9B,QAAQ,EAAEzB,SAAS,CAAC2D,IAAI;EACxB9B,WAAW,EAAE7B,SAAS,CAACuD,MAAM;EAC7BxB,QAAQ,EAAE/B,SAAS,CAAC0D,IAAI;EACxB9B,KAAK,EAAE5B,SAAS,CAAC0D;AACnB,CAAC;AACD,eAAe1C,aAAa","ignoreList":[]}
|
|
@@ -25,10 +25,6 @@
|
|
|
25
25
|
composes: defaultStyle;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.readonly {
|
|
29
|
-
composes: defaultStyle;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
28
|
.defaultStyle label {
|
|
33
29
|
display: flex;
|
|
34
30
|
align-items: center;
|
|
@@ -60,15 +56,6 @@
|
|
|
60
56
|
resize: none;
|
|
61
57
|
}
|
|
62
58
|
|
|
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
|
-
|
|
72
59
|
.error textarea {
|
|
73
60
|
border-color: negative;
|
|
74
61
|
}
|
|
@@ -366,15 +353,6 @@
|
|
|
366
353
|
opacity: 0.5;
|
|
367
354
|
}
|
|
368
355
|
|
|
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
|
-
|
|
378
356
|
.coorpmanager .infoIconWrapper {
|
|
379
357
|
overflow: visible;
|
|
380
358
|
height: 12px;
|
|
@@ -46,7 +46,6 @@ declare namespace Select {
|
|
|
46
46
|
className: PropTypes.Requireable<string>;
|
|
47
47
|
borderClassName: PropTypes.Requireable<string>;
|
|
48
48
|
disabled: PropTypes.Requireable<boolean>;
|
|
49
|
-
readOnly: PropTypes.Requireable<boolean>;
|
|
50
49
|
multiple: PropTypes.Requireable<boolean>;
|
|
51
50
|
description: PropTypes.Requireable<string>;
|
|
52
51
|
required: PropTypes.Requireable<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwDA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/select/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAwDA,qEAkMC"}
|
package/es/atom/select/index.js
CHANGED
|
@@ -61,7 +61,6 @@ const Select = (props, legacyContext) => {
|
|
|
61
61
|
onChange,
|
|
62
62
|
multiple = false,
|
|
63
63
|
disabled,
|
|
64
|
-
readOnly,
|
|
65
64
|
required,
|
|
66
65
|
description,
|
|
67
66
|
theme,
|
|
@@ -74,17 +73,8 @@ const Select = (props, legacyContext) => {
|
|
|
74
73
|
const skin = GetSkinFromContext(legacyContext);
|
|
75
74
|
const title = useMemo(() => propTitle ? `${propTitle}${required ? '*' : ''}` : null, [propTitle, required]);
|
|
76
75
|
const [isArrowUp, setIsArrowUp] = useState(false);
|
|
77
|
-
const
|
|
78
|
-
const
|
|
79
|
-
if (!isNonInteractive) {
|
|
80
|
-
setIsArrowUp(true);
|
|
81
|
-
}
|
|
82
|
-
}, [isNonInteractive]);
|
|
83
|
-
const handleSelectOnBlur = useCallback(() => {
|
|
84
|
-
if (!isNonInteractive) {
|
|
85
|
-
setIsArrowUp(false);
|
|
86
|
-
}
|
|
87
|
-
}, [isNonInteractive]);
|
|
76
|
+
const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);
|
|
77
|
+
const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);
|
|
88
78
|
const selectOption = (option, index) => {
|
|
89
79
|
return /*#__PURE__*/React.createElement("option", {
|
|
90
80
|
key: index,
|
|
@@ -116,23 +106,19 @@ const Select = (props, legacyContext) => {
|
|
|
116
106
|
selected: true
|
|
117
107
|
}, options)), [options, theme]);
|
|
118
108
|
const handleChange = useMemo(() => multiple ? e => {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
onChange(map(get('value'), e.target.selectedOptions));
|
|
122
|
-
}
|
|
109
|
+
setIsArrowUp(false);
|
|
110
|
+
onChange(map(get('value'), e.target.selectedOptions));
|
|
123
111
|
} : e => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
}, [onChange, multiple, isNonInteractive]);
|
|
112
|
+
setIsArrowUp(false);
|
|
113
|
+
onChange(e.target.value);
|
|
114
|
+
}, [onChange, multiple]);
|
|
129
115
|
const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);
|
|
130
116
|
const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);
|
|
131
117
|
const isThemeOneOfQuestionTemplateOrPlayer = useMemo(() => includes(theme, ['question', 'template', 'player']), [theme]);
|
|
132
118
|
const shouldUseSkinFontColor = useMemo(() => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer, [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]);
|
|
133
119
|
const arrowColor = selected ? color : undefined;
|
|
134
120
|
const behaviorClassName = useMemo(() => getClassState(style.defaultStyle, style.modified, style.error, modified, error), [error, modified]);
|
|
135
|
-
const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected,
|
|
121
|
+
const composedClassName = useMemo(() => classnames(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName, selected ? style.selected : style.unselected, className), [behaviorClassName, className, selected, theme]);
|
|
136
122
|
const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);
|
|
137
123
|
const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);
|
|
138
124
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -176,13 +162,13 @@ const Select = (props, legacyContext) => {
|
|
|
176
162
|
value: selected,
|
|
177
163
|
multiple: multiple,
|
|
178
164
|
disabled: disabled,
|
|
179
|
-
onClick:
|
|
180
|
-
onBlur:
|
|
165
|
+
onClick: handleSelectOnFocus,
|
|
166
|
+
onBlur: handleSelectOnBlur
|
|
181
167
|
// onBlur does not handle completely an out of bounds click
|
|
182
168
|
// ex: select is Opened and a click is done outside, cancelling the select
|
|
183
169
|
// that doesn't count as a Blur, so an onMouseLeave is needed
|
|
184
170
|
,
|
|
185
|
-
onMouseLeave:
|
|
171
|
+
onMouseLeave: handleSelectOnBlur,
|
|
186
172
|
"data-testid": "native-select"
|
|
187
173
|
}), optionList)), /*#__PURE__*/React.createElement("div", {
|
|
188
174
|
className: style.description
|
|
@@ -207,7 +193,6 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
207
193
|
className: PropTypes.string,
|
|
208
194
|
borderClassName: PropTypes.string,
|
|
209
195
|
disabled: PropTypes.bool,
|
|
210
|
-
readOnly: PropTypes.bool,
|
|
211
196
|
multiple: PropTypes.bool,
|
|
212
197
|
description: PropTypes.string,
|
|
213
198
|
required: PropTypes.bool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","classnames","concat","filter","find","flatMapDeep","get","getOr","includes","isEmpty","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","NovaCompositionNavigationArrowTop","ArrowUp","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","skillDetail","coorpmanager","ArrowView","shouldRender","isArrowUp","ariaLabel","arrowClass","arrowColor","props","color","className","createElement","_extends","Select","legacyContext","name","options","optgroups","borderClassName","onChange","multiple","disabled","readOnly","required","description","theme","modified","error","title","propTitle","ariaLabelledBy","skin","setIsArrowUp","isNonInteractive","handleSelectOnFocus","handleSelectOnBlur","selectOption","option","index","key","value","optionList","optgroup","label","i","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","isThemeOneOfQuestionTemplateOrPlayer","shouldUseSkinFontColor","undefined","behaviorClassName","defaultStyle","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectedArrow","arrow","selectBox","onClick","onBlur","onMouseLeave","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","SelectOptionGroupPropTypes","arrayOf","shape","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","func","oneOf"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport concat from 'lodash/fp/concat';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport flatMapDeep from 'lodash/fp/flatMapDeep';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowTop as ArrowUp\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n skillDetail: style.skillDetail,\n coorpmanager: null\n};\n\nconst ArrowView = ({shouldRender, isArrowUp, ariaLabel, arrowClass, arrowColor}) => {\n const props = useMemo(\n () => ({\n ...(arrowColor &\n {\n color: arrowColor\n }),\n className: arrowClass\n }),\n [arrowClass, arrowColor]\n );\n if (shouldRender) {\n return isArrowUp ? (\n <ArrowUp {...props} data-testid=\"select-arrow-up-icon\" />\n ) : (\n <ArrowDown {...props} data-testid=\"select-arrow-down-icon\" />\n );\n } else return null;\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n optgroups = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n readOnly,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const [isArrowUp, setIsArrowUp] = useState(false);\n\n const isNonInteractive = disabled || readOnly;\n\n const handleSelectOnFocus = useCallback(() => {\n if (!isNonInteractive) {\n setIsArrowUp(true);\n }\n }, [isNonInteractive]);\n const handleSelectOnBlur = useCallback(() => {\n if (!isNonInteractive) {\n setIsArrowUp(false);\n }\n }, [isNonInteractive]);\n\n const selectOption = (option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n };\n\n const optionList = !isEmpty(options)\n ? options.map((option, index) => selectOption(option, index))\n : optgroups.map((optgroup, index) => {\n return (\n <optgroup key={index} label={optgroup.label}>\n {optgroup.options && optgroup.options.map((option, i) => selectOption(option, i))}\n </optgroup>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title}</span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, concat(options, flatMapDeep('options', optgroups)))),\n [multiple, options, optgroups]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, concat(options, flatMapDeep('options', optgroups)))),\n [multiple, options, optgroups]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n if (!isNonInteractive && onChange) {\n setIsArrowUp(false);\n onChange(map(get('value'), e.target.selectedOptions));\n }\n }\n : e => {\n if (!isNonInteractive && onChange) {\n setIsArrowUp(false);\n onChange(e.target.value);\n }\n },\n [onChange, multiple, isNonInteractive]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const isThemeOneOfQuestionTemplateOrPlayer = useMemo(\n () => includes(theme, ['question', 'template', 'player']),\n [theme]\n );\n const shouldUseSkinFontColor = useMemo(\n () => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer,\n [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]\n );\n const arrowColor = selected ? color : undefined;\n\n const behaviorClassName = useMemo(\n () => getClassState(style.defaultStyle, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n disabled ? style.disabled : null,\n readOnly ? style.readOnly : null,\n className\n ),\n [behaviorClassName, className, selected, theme, disabled, readOnly]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-testid=\"select-wrapper\"\n data-name=\"select-wrapper\"\n title={title}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-testid=\"select-span\"\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, [\n 'player',\n 'invalid',\n 'question',\n 'thematiques',\n 'template',\n 'skillDetail'\n ])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n <ArrowView\n shouldRender={!multiple}\n isArrowUp={isArrowUp}\n ariaLabel={ariaLabel}\n arrowClass={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n arrowColor={isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black}\n />\n <select\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n {...(ariaLabel && !ariaLabelledBy ? {'aria-label': ariaLabel} : {})}\n {...(ariaLabel ? {title: ariaLabel} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n onClick={isNonInteractive ? undefined : handleSelectOnFocus}\n onBlur={isNonInteractive ? undefined : handleSelectOnBlur}\n // onBlur does not handle completely an out of bounds click\n // ex: select is Opened and a click is done outside, cancelling the select\n // that doesn't count as a Blur, so an onMouseLeave is needed\n onMouseLeave={isNonInteractive ? undefined : handleSelectOnBlur}\n data-testid=\"native-select\"\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nexport const SelectOptionGroupPropTypes = {\n label: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n optgroups: PropTypes.arrayOf(PropTypes.shape(SelectOptionGroupPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,WAAW,MAAM,uBAAuB;AAC/C,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,IAAI,MAAM,gBAAgB;AACjC,SACEC,kCAAkC,IAAIC,SAAS,EAC/CC,iCAAiC,IAAIC,OAAO,QACvC,0BAA0B;AACjC,OAAOC,QAAQ,IAAGC,kBAAkB,QAAO,aAAa;AACxD,OAAOC,aAAa,MAAM,4BAA4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AG;EACpBpD,IAAI,EAAE5C,QAAQ,CAACiG,iBAAiB,CAACrD;AACnC,CAAC;AAEDlB,MAAM,CAACwE,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAG;EACjB5D,KAAK,EAAE1D,SAAS,CAACyG,MAAM;EACvB5D,IAAI,EAAE7C,SAAS,CAACyG,MAAM;EACtBjE,SAAS,EAAExC,SAAS,CAACyG,MAAM;EAC3BzD,eAAe,EAAEhD,SAAS,CAACyG,MAAM;EACjCtD,QAAQ,EAAEnD,SAAS,CAAC6G,IAAI;EACxBzD,QAAQ,EAAEpD,SAAS,CAAC6G,IAAI;EACxB3D,QAAQ,EAAElD,SAAS,CAAC6G,IAAI;EACxBvD,WAAW,EAAEtD,SAAS,CAACyG,MAAM;EAC7BpD,QAAQ,EAAErD,SAAS,CAAC6G,IAAI;EACxB5D,QAAQ,EAAEjD,SAAS,CAACuH,IAAI;EACxBhE,KAAK,EAAEvD,SAAS,CAACwH,KAAK,CAAC9G,IAAI,CAACW,UAAU,CAAC,CAAC;EACxCyB,OAAO,EAAE9C,SAAS,CAAC+G,OAAO,CAAC/G,SAAS,CAACgH,KAAK,CAACR,qBAAqB,CAAC,CAAC;EAClEzD,SAAS,EAAE/C,SAAS,CAAC+G,OAAO,CAAC/G,SAAS,CAACgH,KAAK,CAACF,0BAA0B,CAAC,CAAC;EACzEtD,QAAQ,EAAExD,SAAS,CAAC6G,IAAI;EACxBpD,KAAK,EAAEzD,SAAS,CAAC6G,IAAI;EACrB,YAAY,EAAE7G,SAAS,CAACyG,MAAM;EAC9B,iBAAiB,EAAEzG,SAAS,CAACyG;AAC/B,CAAC;AAED,eAAe9D,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useMemo","useState","PropTypes","classnames","concat","filter","find","flatMapDeep","get","getOr","includes","isEmpty","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","NovaCompositionNavigationArrowTop","ArrowUp","Provider","GetSkinFromContext","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","skillDetail","coorpmanager","ArrowView","shouldRender","isArrowUp","ariaLabel","arrowClass","arrowColor","props","color","className","createElement","_extends","Select","legacyContext","name","options","optgroups","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","ariaLabelledBy","skin","setIsArrowUp","handleSelectOnFocus","handleSelectOnBlur","selectOption","option","index","key","value","optionList","optgroup","label","i","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","isThemeOneOfQuestionTemplateOrPlayer","shouldUseSkinFontColor","undefined","behaviorClassName","defaultStyle","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectedArrow","arrow","selectBox","onClick","onBlur","onMouseLeave","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","SelectOptionGroupPropTypes","arrayOf","shape","contextTypes","childContextTypes","propTypes","process","env","NODE_ENV","func","oneOf"],"sources":["../../../src/atom/select/index.js"],"sourcesContent":["import React, {useCallback, useMemo, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport concat from 'lodash/fp/concat';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport flatMapDeep from 'lodash/fp/flatMapDeep';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaCompositionNavigationArrowTop as ArrowUp\n} from '@coorpacademy/nova-icons';\nimport Provider, {GetSkinFromContext} from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n skillDetail: style.skillDetail,\n coorpmanager: null\n};\n\nconst ArrowView = ({shouldRender, isArrowUp, ariaLabel, arrowClass, arrowColor}) => {\n const props = useMemo(\n () => ({\n ...(arrowColor &\n {\n color: arrowColor\n }),\n className: arrowClass\n }),\n [arrowClass, arrowColor]\n );\n if (shouldRender) {\n return isArrowUp ? (\n <ArrowUp {...props} data-testid=\"select-arrow-up-icon\" />\n ) : (\n <ArrowDown {...props} data-testid=\"select-arrow-down-icon\" />\n );\n } else return null;\n};\n\nconst Select = (props, legacyContext) => {\n const {\n name,\n options = [],\n optgroups = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy\n } = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const title = useMemo(\n () => (propTitle ? `${propTitle}${required ? '*' : ''}` : null),\n [propTitle, required]\n );\n\n const [isArrowUp, setIsArrowUp] = useState(false);\n\n const handleSelectOnFocus = useCallback(() => setIsArrowUp(true), []);\n const handleSelectOnBlur = useCallback(() => setIsArrowUp(false), []);\n\n const selectOption = (option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n };\n\n const optionList = !isEmpty(options)\n ? options.map((option, index) => selectOption(option, index))\n : optgroups.map((optgroup, index) => {\n return (\n <optgroup key={index} label={optgroup.label}>\n {optgroup.options && optgroup.options.map((option, i) => selectOption(option, i))}\n </optgroup>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title}</span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, concat(options, flatMapDeep('options', optgroups)))),\n [multiple, options, optgroups]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, concat(options, flatMapDeep('options', optgroups)))),\n [multiple, options, optgroups]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n setIsArrowUp(false);\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n setIsArrowUp(false);\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const isThemeOneOfQuestionTemplateOrPlayer = useMemo(\n () => includes(theme, ['question', 'template', 'player']),\n [theme]\n );\n const shouldUseSkinFontColor = useMemo(\n () => !isSelectedInValidOption && selected && isThemeOneOfQuestionTemplateOrPlayer,\n [isSelectedInValidOption, selected, isThemeOneOfQuestionTemplateOrPlayer]\n );\n const arrowColor = selected ? color : undefined;\n\n const behaviorClassName = useMemo(\n () => getClassState(style.defaultStyle, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviorClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviorClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-testid=\"select-wrapper\"\n data-name=\"select-wrapper\"\n title={title}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-testid=\"select-span\"\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, [\n 'player',\n 'invalid',\n 'question',\n 'thematiques',\n 'template',\n 'skillDetail'\n ])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n <ArrowView\n shouldRender={!multiple}\n isArrowUp={isArrowUp}\n ariaLabel={ariaLabel}\n arrowClass={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n arrowColor={isThemeOneOfQuestionTemplateOrPlayer ? arrowColor : black}\n />\n <select\n {...(ariaLabelledBy ? {'aria-labelledby': ariaLabelledBy} : {})}\n {...(ariaLabel && !ariaLabelledBy ? {'aria-label': ariaLabel} : {})}\n {...(ariaLabel ? {title: ariaLabel} : {})}\n data-name=\"native-select\"\n className={style.selectBox}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n onClick={handleSelectOnFocus}\n onBlur={handleSelectOnBlur}\n // onBlur does not handle completely an out of bounds click\n // ex: select is Opened and a click is done outside, cancelling the select\n // that doesn't count as a Blur, so an onMouseLeave is needed\n onMouseLeave={handleSelectOnBlur}\n data-testid=\"native-select\"\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nexport const SelectOptionGroupPropTypes = {\n label: PropTypes.string.isRequired,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n optgroups: PropTypes.arrayOf(PropTypes.shape(SelectOptionGroupPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool,\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n};\n\nexport default Select;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAO,OAAO;AAC3D,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,MAAM,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,WAAW,MAAM,uBAAuB;AAC/C,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,KAAK,MAAM,iBAAiB;AACnC,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,IAAI,MAAM,gBAAgB;AACjC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,IAAI,MAAM,gBAAgB;AACjC,SACEC,kCAAkC,IAAIC,SAAS,EAC/CC,iCAAiC,IAAIC,OAAO,QACvC,0BAA0B;AACjC,OAAOC,QAAQ,IAAGC,kBAAkB,QAAO,aAAa;AACxD,OAAOC,aAAa,MAAM,4BAA4B;AACtD,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,UAAU,GAAG;EACjBlB,MAAM,EAAEiB,KAAK,CAACjB,MAAM;EACpBmB,OAAO,EAAEF,KAAK,CAACE,OAAO;EACtBC,MAAM,EAAEH,KAAK,CAACG,MAAM;EACpBC,IAAI,EAAEJ,KAAK,CAACI,IAAI;EAChBC,QAAQ,EAAEL,KAAK,CAACK,QAAQ;EACxBC,IAAI,EAAEN,KAAK,CAACM,IAAI;EAChBC,WAAW,EAAEP,KAAK,CAACO,WAAW;EAC9BC,MAAM,EAAER,KAAK,CAACQ,MAAM;EACpBC,QAAQ,EAAET,KAAK,CAACS,QAAQ;EACxBC,WAAW,EAAEV,KAAK,CAACU,WAAW;EAC9BC,YAAY,E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css
CHANGED
|
@@ -665,64 +665,3 @@ div.player:hover span.selectSpan {
|
|
|
665
665
|
.skillDetail.no-label .selectBox {
|
|
666
666
|
max-width: 100%;
|
|
667
667
|
}
|
|
668
|
-
|
|
669
|
-
/*
|
|
670
|
-
Disabled state
|
|
671
|
-
*/
|
|
672
|
-
|
|
673
|
-
.disabled {
|
|
674
|
-
opacity: 0.6;
|
|
675
|
-
cursor: not-allowed;
|
|
676
|
-
}
|
|
677
|
-
|
|
678
|
-
.disabled .selectWrapper {
|
|
679
|
-
cursor: not-allowed;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
.disabled .selectBox {
|
|
683
|
-
cursor: not-allowed !important;
|
|
684
|
-
background-color: xtraLightGrey;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
.disabled .arrow,
|
|
688
|
-
.disabled .selectedArrow {
|
|
689
|
-
cursor: not-allowed;
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
.disabled:hover .arrow,
|
|
693
|
-
.disabled:hover .selectedArrow {
|
|
694
|
-
color: inherit;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
/*
|
|
698
|
-
ReadOnly state - keeps visual appearance but prevents interaction
|
|
699
|
-
*/
|
|
700
|
-
|
|
701
|
-
.readOnly .selectBox {
|
|
702
|
-
cursor: default;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
.readOnly .selectWrapper {
|
|
706
|
-
cursor: default;
|
|
707
|
-
position: relative;
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.readOnly .selectWrapper::after {
|
|
711
|
-
content: '';
|
|
712
|
-
position: absolute;
|
|
713
|
-
top: 0;
|
|
714
|
-
left: 0;
|
|
715
|
-
right: 0;
|
|
716
|
-
bottom: 0;
|
|
717
|
-
z-index: 10;
|
|
718
|
-
cursor: default;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
.readOnly .selectWrapper * {
|
|
722
|
-
cursor: default;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
.readOnly .arrow,
|
|
726
|
-
.readOnly .selectedArrow {
|
|
727
|
-
cursor: default;
|
|
728
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/index.tsx"],"names":[],"mappings":";AASA,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/status-item/index.tsx"],"names":[],"mappings":";AASA,OAAkB,EAAC,eAAe,EAAC,MAAM,SAAS,CAAC;AAqFnD,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;CAmBzC,CAAC;AAWF,eAAe,UAAU,CAAC"}
|