@bigbinary/neetoui 8.2.24 → 8.2.25
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/README.md +1 -0
- package/dist/Avatar.js +1 -0
- package/dist/Avatar.js.map +1 -1
- package/dist/DatePicker.js +1 -1
- package/dist/Kbd.js +1 -0
- package/dist/Kbd.js.map +1 -1
- package/dist/Label.js +72 -55
- package/dist/Label.js.map +1 -1
- package/dist/TimePicker.js +1 -1
- package/dist/Tooltip.js +15 -10
- package/dist/Tooltip.js.map +1 -1
- package/dist/TreeSelect.js +13 -2
- package/dist/TreeSelect.js.map +1 -1
- package/dist/cjs/Avatar.js +1 -0
- package/dist/cjs/Avatar.js.map +1 -1
- package/dist/cjs/DatePicker.js +1 -1
- package/dist/cjs/Kbd.js +1 -0
- package/dist/cjs/Kbd.js.map +1 -1
- package/dist/cjs/Label.js +71 -54
- package/dist/cjs/Label.js.map +1 -1
- package/dist/cjs/TimePicker.js +1 -1
- package/dist/cjs/Tooltip.js +15 -10
- package/dist/cjs/Tooltip.js.map +1 -1
- package/dist/cjs/TreeSelect.js +13 -2
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/{index-DoQ9g6qh.js → index-E2IEf9Av.js} +1 -1
- package/dist/cjs/{index-DoQ9g6qh.js.map → index-E2IEf9Av.js.map} +1 -1
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{index-H3jaZAFp.js → index-DugGi20r.js} +1 -1
- package/dist/{index-H3jaZAFp.js.map → index-DugGi20r.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -216,6 +216,7 @@ application to test out changes and see how your component behaves in the
|
|
|
216
216
|
storybook for **neetoUI**
|
|
217
217
|
|
|
218
218
|
- To see if tests associated with your components pass run `yarn test`.
|
|
219
|
+
> Tests will fail if there are some warnings or errors in the console.
|
|
219
220
|
- To see if **neetoUI** gets built and bundled after changes run `yarn bundle`.
|
|
220
221
|
- To see if the storybook gets built run `yarn build`.
|
|
221
222
|
|
package/dist/Avatar.js
CHANGED
package/dist/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":";;;;;;;;;;;;;AASA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,MAAM,EAAE,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,UAAU,EAAE,EAAA;AAAG,CAAC,CAAA;AAIjE,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAGC,QAAQ,EAAI;EAC9B,IAAI,OAAOA,QAAQ,KAAK,QAAQ,IAAIC,OAAO,CAACD,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAA;EACjE,IAAME,QAAQ,GAAGF,QAAQ,CAACG,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAA;AAC3C,EAAA,IAAIF,QAAQ,CAACG,MAAM,KAAK,CAAC,EAAE,OAAOL,QAAQ,CAACM,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAACC,WAAW,EAAE,CAAA;EAExE,OAAO,EAAA,CAAAC,MAAA,CAAGN,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA,CAAAM,MAAA,CAAGN,QAAQ,CAACA,QAAQ,CAACG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAGE,CAAAA,WAAW,EAAE,CAAA;AAC7E,CAAC,CAAA;AAED,IAAME,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EASN;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CARJE,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,QAAQ,GAAAA,SAAA;IAAAE,SAAA,GAAAH,IAAA,CACfI,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAA,KAAA,CAAA,GAAG,EAAE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E,aAAA,SAAAG,QAAA,CAAA;AACQlC,IAAAA,OAAO,EAAPA,OAAO;AACbE,IAAAA,SAAS,EAAEoB,gBAAiB;IAC5B,aAAY,EAAA,QAAA;AAAQ,GAAA,EAChBf,UAAU,CAAA,eAEdsB,cAAA,CAAAE,aAAA,CAACJ,SAAS,EAAG,IAAA,CAAA,EACZK,2BAA2B,gBAC1BH,cAAA,CAAAE,aAAA,CAACO,SAAS,EAAA;AACRC,IAAAA,YAAY,EAAE1D,WAAW,CAACoC,IAAI,CAAE;AAChCvB,IAAAA,IAAI,EAAElB,IAAI,CAACkB,IAAI,CAAE;AACjB8C,IAAAA,KAAK,EAAEvB,IAAAA;GACP,CAAA,gBAEFY,cAAA,CAAAE,aAAA,CAAA,KAAA,EAAA;AACEU,IAAAA,GAAG,EAAAnD,SAAAA,CAAAA,MAAA,CAAY2B,IAAI,CAAG;AACtBf,IAAAA,SAAS,EAAEsB,YAAa;AACxBkB,IAAAA,GAAG,EAAExB,QAAS;IACdyB,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAM5B,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,CAE3C,CACI,CACC,CAAA;AAEd;;;;"}
|
package/dist/DatePicker.js
CHANGED
|
@@ -24,7 +24,7 @@ import 'react-colorful';
|
|
|
24
24
|
import './tinycolor-DX-kZ4bq.js';
|
|
25
25
|
import './Dropdown.js';
|
|
26
26
|
import './index-BojMT3ps.js';
|
|
27
|
-
export { D as default } from './index-
|
|
27
|
+
export { D as default } from './index-DugGi20r.js';
|
|
28
28
|
import './Input.js';
|
|
29
29
|
import './Label.js';
|
|
30
30
|
import './MultiEmailInput.js';
|
package/dist/Kbd.js
CHANGED
|
@@ -3,6 +3,7 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import classnames from 'classnames';
|
|
5
5
|
import Tooltip from './Tooltip.js';
|
|
6
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
7
|
import '@babel/runtime/helpers/slicedToArray';
|
|
7
8
|
import '@tippyjs/react';
|
|
8
9
|
import 'tippy.js';
|
package/dist/Kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kbd.js","sources":["../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Kbd.js","sources":["../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":";;;;;;;;;;;AAOA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;AAAA,EAAA,oBAC5DC,cAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;AAACC,IAAAA,QAAQ,EAAE,CAACR,YAAAA;AAAa,GAAA,EAAKA,YAAY,CAChDI,eAAAA,cAAA,CAAAC,aAAA,SAAAE,QAAA,CAAA;AAAMR,IAAAA,SAAS,EAAEU,UAAU,CAAC,CAAC,cAAc,EAAEV,SAAS,CAAC,CAAA;AAAE,GAAA,EAAKE,UAAU,CAAA,EACrEH,OAAO,CACH,CACC,CAAA;AAAA;;;;"}
|
package/dist/Label.js
CHANGED
|
@@ -1,23 +1,82 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
-
import React__default, { useRef } from 'react';
|
|
3
|
+
import React__default, { forwardRef, useRef } from 'react';
|
|
5
4
|
import classnames from 'classnames';
|
|
5
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
6
6
|
import { Help } from '@bigbinary/neeto-icons';
|
|
7
7
|
import Button from './Button.js';
|
|
8
8
|
import Popover from './Popover.js';
|
|
9
9
|
import Tooltip from './Tooltip.js';
|
|
10
10
|
import Typography from './Typography.js';
|
|
11
|
-
import 'react-router-dom';
|
|
12
|
-
import './Spinner.js';
|
|
13
11
|
import '@babel/runtime/helpers/slicedToArray';
|
|
14
12
|
import '@tippyjs/react';
|
|
15
13
|
import 'tippy.js';
|
|
14
|
+
import 'react-router-dom';
|
|
15
|
+
import './Spinner.js';
|
|
16
|
+
|
|
17
|
+
var _excluded$2 = ["onClick", "className", "icon"];
|
|
18
|
+
var HelpIcon = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
19
|
+
var onClick = _ref.onClick,
|
|
20
|
+
className = _ref.className,
|
|
21
|
+
icon = _ref.icon,
|
|
22
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
23
|
+
var HelpIcon = icon || Help;
|
|
24
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
25
|
+
onClick: onClick,
|
|
26
|
+
ref: ref,
|
|
27
|
+
className: classnames("neeto-ui-label__help-icon-wrap", _defineProperty({}, className, className))
|
|
28
|
+
}, /*#__PURE__*/React__default.createElement(HelpIcon, _extends({
|
|
29
|
+
size: 16
|
|
30
|
+
}, otherProps)));
|
|
31
|
+
});
|
|
32
|
+
HelpIcon.displayName = "HelpIcon";
|
|
16
33
|
|
|
17
|
-
var _excluded = ["
|
|
18
|
-
_excluded2 = ["
|
|
19
|
-
|
|
20
|
-
var
|
|
34
|
+
var _excluded$1 = ["tooltipProps", "popoverProps"],
|
|
35
|
+
_excluded2 = ["title", "description", "helpLinkProps"];
|
|
36
|
+
var HelpContent = function HelpContent(_ref) {
|
|
37
|
+
var helpIconProps = _ref.helpIconProps;
|
|
38
|
+
var popoverReferenceElement = useRef();
|
|
39
|
+
var _ref2 = helpIconProps || {},
|
|
40
|
+
tooltipProps = _ref2.tooltipProps,
|
|
41
|
+
popoverProps = _ref2.popoverProps,
|
|
42
|
+
otherHelpIconProps = _objectWithoutProperties(_ref2, _excluded$1);
|
|
43
|
+
if (tooltipProps) {
|
|
44
|
+
return /*#__PURE__*/React__default.createElement(Tooltip, tooltipProps, /*#__PURE__*/React__default.createElement(HelpIcon, otherHelpIconProps));
|
|
45
|
+
}
|
|
46
|
+
if (popoverProps) {
|
|
47
|
+
var title = popoverProps.title,
|
|
48
|
+
description = popoverProps.description,
|
|
49
|
+
helpLinkProps = popoverProps.helpLinkProps,
|
|
50
|
+
otherPopoverProps = _objectWithoutProperties(popoverProps, _excluded2);
|
|
51
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(HelpIcon, _extends({}, otherHelpIconProps, {
|
|
52
|
+
ref: popoverReferenceElement
|
|
53
|
+
})), /*#__PURE__*/React__default.createElement(Popover, _extends({
|
|
54
|
+
reference: popoverReferenceElement
|
|
55
|
+
}, otherPopoverProps), /*#__PURE__*/React__default.createElement("div", {
|
|
56
|
+
className: "flex flex-col"
|
|
57
|
+
}, title && /*#__PURE__*/React__default.createElement(Popover.Title, {
|
|
58
|
+
"data-cy": "help-popover-title",
|
|
59
|
+
"data-testid": "help-popover-title"
|
|
60
|
+
}, title), typeof description === "string" ? /*#__PURE__*/React__default.createElement(Typography, {
|
|
61
|
+
"data-cy": "help-popover-description",
|
|
62
|
+
"data-testid": "help-popover-description",
|
|
63
|
+
lineHeight: "normal",
|
|
64
|
+
style: "body2",
|
|
65
|
+
weight: "normal"
|
|
66
|
+
}, description) : description, helpLinkProps && /*#__PURE__*/React__default.createElement(Button, _extends({
|
|
67
|
+
className: "neeto-ui-mt-3",
|
|
68
|
+
"data-cy": "help-popover-link-button",
|
|
69
|
+
size: "small"
|
|
70
|
+
}, helpLinkProps, {
|
|
71
|
+
"data-testid": "help-popover-link-button",
|
|
72
|
+
style: "link",
|
|
73
|
+
target: "_blank"
|
|
74
|
+
})))));
|
|
75
|
+
}
|
|
76
|
+
return /*#__PURE__*/React__default.createElement(HelpIcon, otherHelpIconProps);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var _excluded = ["children", "className", "required", "helpIconProps"];
|
|
21
80
|
var Label = function Label(_ref) {
|
|
22
81
|
var children = _ref.children,
|
|
23
82
|
_ref$className = _ref.className,
|
|
@@ -26,56 +85,14 @@ var Label = function Label(_ref) {
|
|
|
26
85
|
required = _ref$required === void 0 ? false : _ref$required,
|
|
27
86
|
_ref$helpIconProps = _ref.helpIconProps,
|
|
28
87
|
helpIconProps = _ref$helpIconProps === void 0 ? null : _ref$helpIconProps,
|
|
29
|
-
|
|
30
|
-
var _ref2 = helpIconProps || {},
|
|
31
|
-
onClick = _ref2.onClick,
|
|
32
|
-
icon = _ref2.icon,
|
|
33
|
-
tooltipProps = _ref2.tooltipProps,
|
|
34
|
-
popoverProps = _ref2.popoverProps,
|
|
35
|
-
helpIconClassName = _ref2.className,
|
|
36
|
-
otherHelpIconProps = _objectWithoutProperties(_ref2, _excluded2);
|
|
37
|
-
var _ref3 = popoverProps || {},
|
|
38
|
-
title = _ref3.title,
|
|
39
|
-
description = _ref3.description,
|
|
40
|
-
helpLinkProps = _ref3.helpLinkProps,
|
|
41
|
-
otherPopoverProps = _objectWithoutProperties(_ref3, _excluded3);
|
|
42
|
-
var HelpIcon = icon || Help;
|
|
43
|
-
var popoverReferenceElement = useRef();
|
|
44
|
-
var renderHelpIcon = function renderHelpIcon() {
|
|
45
|
-
return /*#__PURE__*/React__default.createElement("span", {
|
|
46
|
-
onClick: onClick,
|
|
47
|
-
ref: popoverProps ? popoverReferenceElement : undefined,
|
|
48
|
-
className: classnames("neeto-ui-label__help-icon-wrap", _defineProperty({}, helpIconClassName, helpIconClassName))
|
|
49
|
-
}, /*#__PURE__*/React__default.createElement(HelpIcon, _extends({
|
|
50
|
-
size: 16
|
|
51
|
-
}, otherHelpIconProps)));
|
|
52
|
-
};
|
|
88
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
53
89
|
return /*#__PURE__*/React__default.createElement("label", _extends({
|
|
54
90
|
className: classnames("neeto-ui-label neeto-ui-flex neeto-ui-items-center", className)
|
|
55
|
-
},
|
|
91
|
+
}, props), children, required && /*#__PURE__*/React__default.createElement("span", {
|
|
56
92
|
"aria-hidden": true
|
|
57
|
-
}, "*"), helpIconProps && /*#__PURE__*/React__default.createElement(
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
className: "flex flex-col"
|
|
61
|
-
}, title && /*#__PURE__*/React__default.createElement(Title, {
|
|
62
|
-
"data-cy": "help-popover-title",
|
|
63
|
-
"data-testid": "help-popover-title"
|
|
64
|
-
}, title), typeof description === "string" ? /*#__PURE__*/React__default.createElement(Typography, {
|
|
65
|
-
"data-cy": "help-popover-description",
|
|
66
|
-
"data-testid": "help-popover-description",
|
|
67
|
-
lineHeight: "normal",
|
|
68
|
-
style: "body2",
|
|
69
|
-
weight: "normal"
|
|
70
|
-
}, description) : description, helpLinkProps && /*#__PURE__*/React__default.createElement(Button, _extends({
|
|
71
|
-
className: "neeto-ui-mt-3",
|
|
72
|
-
"data-cy": "help-popover-link-button",
|
|
73
|
-
size: "small"
|
|
74
|
-
}, helpLinkProps, {
|
|
75
|
-
"data-testid": "help-popover-link-button",
|
|
76
|
-
style: "link",
|
|
77
|
-
target: "_blank"
|
|
78
|
-
}))))) : renderHelpIcon()));
|
|
93
|
+
}, "*"), helpIconProps && /*#__PURE__*/React__default.createElement(HelpContent, {
|
|
94
|
+
helpIconProps: helpIconProps
|
|
95
|
+
}));
|
|
79
96
|
};
|
|
80
97
|
|
|
81
98
|
export { Label as default };
|
package/dist/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../src/components/Label.jsx"],"sourcesContent":["import React, {
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../src/components/Label/HelpIcon.jsx","../src/components/Label/HelpContent.jsx","../src/components/Label/index.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { Help } from \"neetoicons\";\n\nconst HelpIcon = forwardRef(\n ({ onClick, className, icon, ...otherProps }, ref) => {\n const HelpIcon = icon || Help;\n\n return (\n <span\n {...{ onClick, ref }}\n className={classNames(\"neeto-ui-label__help-icon-wrap\", {\n [className]: className,\n })}\n >\n <HelpIcon size={16} {...otherProps} />\n </span>\n );\n }\n);\n\nHelpIcon.displayName = \"HelpIcon\";\n\nexport default HelpIcon;\n","import React, { useRef } from \"react\";\n\nimport HelpIcon from \"./HelpIcon\";\n\nimport Button from \"../Button\";\nimport Popover from \"../Popover\";\nimport Tooltip from \"../Tooltip\";\nimport Typography from \"../Typography\";\n\nconst HelpContent = ({ helpIconProps }) => {\n const popoverReferenceElement = useRef();\n\n const { tooltipProps, popoverProps, ...otherHelpIconProps } =\n helpIconProps || {};\n\n if (tooltipProps) {\n return (\n <Tooltip {...tooltipProps}>\n <HelpIcon {...otherHelpIconProps} />\n </Tooltip>\n );\n }\n\n if (popoverProps) {\n const { title, description, helpLinkProps, ...otherPopoverProps } =\n popoverProps;\n\n return (\n <>\n <HelpIcon {...otherHelpIconProps} ref={popoverReferenceElement} />\n <Popover reference={popoverReferenceElement} {...otherPopoverProps}>\n <div className=\"flex flex-col\">\n {title && (\n <Popover.Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Popover.Title>\n )}\n {typeof description === \"string\" ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n weight=\"normal\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n </Popover>\n </>\n );\n }\n\n return <HelpIcon {...otherHelpIconProps} />;\n};\n\nexport default HelpContent;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport HelpContent from \"./HelpContent\";\n\nimport Button from \"../Button\";\nimport Tooltip from \"../Tooltip\";\n\nconst Label = ({\n children,\n className = \"\",\n required = false,\n helpIconProps = null,\n ...props\n}) => (\n <label\n className={classnames(\n \"neeto-ui-label neeto-ui-flex neeto-ui-items-center\",\n className\n )}\n {...props}\n >\n {children}\n {required && <span aria-hidden>*</span>}\n {helpIconProps && <HelpContent {...{ helpIconProps }} />}\n </label>\n);\n\nLabel.propTypes = {\n /**\n * To specify the content to be rendered inside the Label.\n */\n children: PropTypes.node,\n /**\n * Provide external classnames to Label component.\n */\n className: PropTypes.string,\n /**\n * To specify whether to show the required asterisk.\n */\n required: PropTypes.bool,\n /**\n * Props for the help icon\n */\n helpIconProps: PropTypes.shape({\n onClick: PropTypes.func,\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),\n tooltipProps: PropTypes.shape({ ...Tooltip.propTypes }),\n popoverProps: PropTypes.shape({\n title: PropTypes.node,\n description: PropTypes.node,\n helpLinkProps: PropTypes.shape({ ...Button.propTypes }),\n }),\n className: PropTypes.string,\n }),\n};\n\nexport default Label;\n"],"names":["HelpIcon","forwardRef","_ref","ref","onClick","className","icon","otherProps","_objectWithoutProperties","_excluded","Help","React","createElement","classNames","_defineProperty","_extends","size","displayName","HelpContent","helpIconProps","popoverReferenceElement","useRef","_ref2","tooltipProps","popoverProps","otherHelpIconProps","Tooltip","title","description","helpLinkProps","otherPopoverProps","_excluded2","Fragment","Popover","reference","Title","Typography","lineHeight","style","weight","Button","target","Label","children","_ref$className","_ref$required","required","_ref$helpIconProps","props","classnames"],"mappings":";;;;;;;;;;;;;;;;;AAKA,IAAMA,QAAQ,gBAAGC,UAAU,CACzB,UAAAC,IAAA,EAA8CC,GAAG,EAAK;AAAA,EAAA,IAAnDC,OAAO,GAAAF,IAAA,CAAPE,OAAO;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAEC,IAAI,GAAAJ,IAAA,CAAJI,IAAI;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,WAAA,CAAA,CAAA;AACxC,EAAA,IAAMT,QAAQ,GAAGM,IAAI,IAAII,IAAI,CAAA;EAE7B,oBACEC,cAAA,CAAAC,aAAA,CAAA,M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CAACZ,QAAQ,EAAKyB,kBAAkB,CAAI,CAAA;AAC7C,CAAC;;;AC7DD,IAAMiB,KAAK,GAAG,SAARA,KAAKA,CAAAxC,IAAA,EAAA;AAAA,EAAA,IACTyC,QAAQ,GAAAzC,IAAA,CAARyC,QAAQ;IAAAC,cAAA,GAAA1C,IAAA,CACRG,SAAS;AAATA,IAAAA,SAAS,GAAAuC,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IAAAC,aAAA,GAAA3C,IAAA,CACd4C,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,kBAAA,GAAA7C,IAAA,CAChBiB,aAAa;AAAbA,IAAAA,aAAa,GAAA4B,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;AACjBC,IAAAA,KAAK,GAAAxC,wBAAA,CAAAN,IAAA,EAAAO,SAAA,CAAA,CAAA;AAAA,EAAA,oBAERE,cAAA,CAAAC,aAAA,CAAA,OAAA,EAAAG,QAAA,CAAA;AACEV,IAAAA,SAAS,EAAE4C,UAAU,CACnB,oDAAoD,EACpD5C,SAAS,CAAA;GAEP2C,EAAAA,KAAK,GAERL,QAAQ,EACRG,QAAQ,iBAAInC,cAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,aAAA,EAAA,IAAA;GAAY,EAAA,GAAC,CAAO,EACtCO,aAAa,iBAAIR,cAAA,CAAAC,aAAA,CAACM,WAAW,EAAA;AAAOC,IAAAA,aAAa,EAAbA,aAAAA;AAAa,GAAA,CAAM,CAClD,CAAA;AAAA;;;;"}
|
package/dist/TimePicker.js
CHANGED
|
@@ -24,7 +24,7 @@ import 'react-colorful';
|
|
|
24
24
|
import './tinycolor-DX-kZ4bq.js';
|
|
25
25
|
import './Dropdown.js';
|
|
26
26
|
import './index-BojMT3ps.js';
|
|
27
|
-
export { T as default } from './index-
|
|
27
|
+
export { T as default } from './index-DugGi20r.js';
|
|
28
28
|
import './Input.js';
|
|
29
29
|
import './Label.js';
|
|
30
30
|
import './MultiEmailInput.js';
|
package/dist/Tooltip.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
3
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
4
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
5
|
import React__default, { useState, useEffect } from 'react';
|
|
@@ -8,6 +9,8 @@ import { followCursor } from 'tippy.js';
|
|
|
8
9
|
var ARROW = "<svg width='12' height='6' viewBox='0 0 10 5' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 5H0.926697L3.95208 1.63847C4.74227 0.760478 6.11722 0.754951 6.91445 1.62656L10 5Z' /></svg>";
|
|
9
10
|
|
|
10
11
|
var _excluded = ["content", "children", "theme", "disabled", "position", "interactive", "hideAfter", "hideOnTargetExit"];
|
|
12
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
14
|
var Tooltip = function Tooltip(_ref) {
|
|
12
15
|
var content = _ref.content,
|
|
13
16
|
children = _ref.children,
|
|
@@ -50,24 +53,26 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
50
53
|
}
|
|
51
54
|
return undefined;
|
|
52
55
|
}, [instance, hideOnTargetExit]);
|
|
56
|
+
var handleCreate = function handleCreate(instance) {
|
|
57
|
+
var _instance$popper$firs;
|
|
58
|
+
setInstance(instance);
|
|
59
|
+
(_instance$popper$firs = instance.popper.firstElementChild) === null || _instance$popper$firs === void 0 || _instance$popper$firs.setAttribute("data-cy", "tooltip-box");
|
|
60
|
+
};
|
|
53
61
|
return /*#__PURE__*/React__default.createElement(Tippy, _extends({
|
|
54
62
|
animation: "scale-subtle",
|
|
55
63
|
arrow: ARROW,
|
|
56
|
-
content: content,
|
|
57
|
-
disabled: disabled,
|
|
58
64
|
duration: [100, 200],
|
|
59
|
-
interactive: interactive,
|
|
60
65
|
placement: position,
|
|
61
66
|
plugins: [followCursor],
|
|
62
67
|
role: "tooltip",
|
|
63
|
-
theme: theme,
|
|
64
68
|
zIndex: 100001,
|
|
65
|
-
onCreate:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
onCreate: handleCreate
|
|
70
|
+
}, _objectSpread(_objectSpread({
|
|
71
|
+
content: content,
|
|
72
|
+
disabled: disabled,
|
|
73
|
+
interactive: interactive,
|
|
74
|
+
theme: theme
|
|
75
|
+
}, localProps), otherProps)), /*#__PURE__*/React__default.isValidElement(children) ? children : children && /*#__PURE__*/React__default.createElement("span", null, children));
|
|
71
76
|
};
|
|
72
77
|
|
|
73
78
|
export { Tooltip as default };
|
package/dist/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../src/components/Tooltip/constants.js","../src/components/Tooltip/index.jsx"],"sourcesContent":["export const ARROW =\n \"<svg width='12' height='6' viewBox='0 0 10 5' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 5H0.926697L3.95208 1.63847C4.74227 0.760478 6.11722 0.754951 6.91445 1.62656L10 5Z' /></svg>\";\n","import React, { useEffect, useState } from \"react\";\n\nimport Tippy from \"@tippyjs/react\";\nimport PropTypes from \"prop-types\";\nimport { followCursor } from \"tippy.js\";\n\nimport { ARROW } from \"./constants\";\n\nconst Tooltip = ({\n content,\n children,\n theme = \"dark\",\n disabled = false,\n position = \"auto\",\n interactive = false,\n hideAfter = -1,\n hideOnTargetExit = false,\n ...otherProps\n}) => {\n const [instance, setInstance] = useState(null);\n\n const localProps = {};\n\n if (hideAfter > 0) {\n localProps[\"onShow\"] = instance =>\n setTimeout(() => instance.hide(), hideAfter);\n }\n\n useEffect(() => {\n if (hideOnTargetExit) {\n const intersectionObserver = new IntersectionObserver(entries => {\n entries.forEach(entry => !entry.isIntersecting && instance?.hide());\n });\n instance?.reference && intersectionObserver.observe(instance?.reference);\n\n return () => intersectionObserver.disconnect();\n }\n\n return undefined;\n }, [instance, hideOnTargetExit]);\n\n return (\n <Tippy\n animation=\"scale-subtle\"\n arrow={ARROW}\n
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../src/components/Tooltip/constants.js","../src/components/Tooltip/index.jsx"],"sourcesContent":["export const ARROW =\n \"<svg width='12' height='6' viewBox='0 0 10 5' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M10 5H0.926697L3.95208 1.63847C4.74227 0.760478 6.11722 0.754951 6.91445 1.62656L10 5Z' /></svg>\";\n","import React, { useEffect, useState } from \"react\";\n\nimport Tippy from \"@tippyjs/react\";\nimport PropTypes from \"prop-types\";\nimport { followCursor } from \"tippy.js\";\n\nimport { ARROW } from \"./constants\";\n\nconst Tooltip = ({\n content,\n children,\n theme = \"dark\",\n disabled = false,\n position = \"auto\",\n interactive = false,\n hideAfter = -1,\n hideOnTargetExit = false,\n ...otherProps\n}) => {\n const [instance, setInstance] = useState(null);\n\n const localProps = {};\n\n if (hideAfter > 0) {\n localProps[\"onShow\"] = instance =>\n setTimeout(() => instance.hide(), hideAfter);\n }\n\n useEffect(() => {\n if (hideOnTargetExit) {\n const intersectionObserver = new IntersectionObserver(entries => {\n entries.forEach(entry => !entry.isIntersecting && instance?.hide());\n });\n instance?.reference && intersectionObserver.observe(instance?.reference);\n\n return () => intersectionObserver.disconnect();\n }\n\n return undefined;\n }, [instance, hideOnTargetExit]);\n\n const handleCreate = instance => {\n setInstance(instance);\n instance.popper.firstElementChild?.setAttribute(\"data-cy\", \"tooltip-box\");\n };\n\n return (\n <Tippy\n animation=\"scale-subtle\"\n arrow={ARROW}\n duration={[100, 200]}\n placement={position}\n plugins={[followCursor]}\n role=\"tooltip\"\n zIndex={100001}\n onCreate={handleCreate}\n {...{\n content,\n disabled,\n interactive,\n theme,\n ...localProps,\n ...otherProps,\n }}\n >\n {React.isValidElement(children)\n ? children\n : children && <span>{children}</span>}\n </Tippy>\n );\n};\n\nTooltip.propTypes = {\n /**\n * The component to be rendered inside the popup.\n */\n content: PropTypes.node,\n /**\n * Tooltip popup will be shown when mouse is hovered over this component.\n */\n children: PropTypes.node,\n /**\n * To display Tooltip in dark or light theme. By default the theme is dark.\n */\n theme: PropTypes.oneOf([\"dark\", \"light\"]),\n /**\n * To specify whether the Tooltip is disabled or not.\n */\n disabled: PropTypes.bool,\n /**\n * To specify the position of the Tooltip.\n */\n position: PropTypes.string,\n /**\n * To specify whether the Tooltip can be hovered over and clicked inside without hiding.\n */\n interactive: PropTypes.bool,\n /**\n * To auto-hide the Tooltip after n-milliseconds.\n * Negative values to this prop disables this feature.\n * By default it's disabled.\n */\n hideAfter: PropTypes.number,\n /**\n * To auto-hide the Tooltip on when target leaves the screen.\n * By default it's disabled.\n */\n hideOnTargetExit: PropTypes.bool,\n};\n\nexport default Tooltip;\n"],"names":["ARROW","Tooltip","_ref","content","children","_ref$theme","theme","_ref$disabled","disabled","_ref$position","position","_ref$interactive","interactive","_ref$hideAfter","hideAfter","_ref$hideOnTargetExit","hideOnTargetExit","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","instance","setInstance","localProps","setTimeout","hide","useEffect","intersectionObserver","IntersectionObserver","entries","forEach","entry","isIntersecting","reference","observe","disconnect","undefined","handleCreate","_instance$popper$firs","popper","firstElementChild","setAttribute","React","createElement","Tippy","_extends","animation","arrow","duration","placement","plugins","followCursor","role","zIndex","onCreate","_objectSpread","isValidElement"],"mappings":";;;;;;;;AAAO,IAAMA,KAAK,GAChB,wMAAwM;;;;;ACO1M,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAUP;AAAA,EAAA,IATJC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAAC,UAAA,GAAAH,IAAA,CACRI,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,UAAA;IAAAE,aAAA,GAAAL,IAAA,CACdM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAAAE,aAAA,GAAAP,IAAA,CAChBQ,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,MAAM,GAAAA,aAAA;IAAAE,gBAAA,GAAAT,IAAA,CACjBU,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,gBAAA;IAAAE,cAAA,GAAAX,IAAA,CACnBY,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,KAAA,CAAA,GAAG,CAAC,CAAC,GAAAA,cAAA;IAAAE,qBAAA,GAAAb,IAAA,CACdc,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;AACrBE,IAAAA,UAAU,GAAAC,wBAAA,CAAAhB,IAAA,EAAAiB,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,SAAA,GAAgCC,QAAQ,CAAC,IAAI,CAAC;IAAAC,UAA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center neeto-ui-p-1"
|
|
122
122
|
}, getLocale(i18n, t, "neetoui.treeSelect.noOptions")),
|
|
123
123
|
popupClassName: classnames("neeto-ui-tree-select-dropdown", popupClassName),
|
|
124
|
-
switcherIcon: function switcherIcon(
|
|
125
|
-
|
|
124
|
+
switcherIcon: function switcherIcon(_ref2) {
|
|
125
|
+
var className = _ref2.className,
|
|
126
|
+
style = _ref2.style,
|
|
127
|
+
onMouseMove = _ref2.onMouseMove,
|
|
128
|
+
id = _ref2.id,
|
|
129
|
+
title = _ref2.title;
|
|
130
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
131
|
+
className: className,
|
|
132
|
+
id: id,
|
|
133
|
+
onMouseMove: onMouseMove,
|
|
134
|
+
style: style,
|
|
135
|
+
title: title
|
|
136
|
+
}, /*#__PURE__*/React__default.createElement(SwitcherIcon, null));
|
|
126
137
|
}
|
|
127
138
|
}, otherProps)), error && /*#__PURE__*/React__default.createElement("p", {
|
|
128
139
|
className: "neeto-ui-input__error",
|
package/dist/TreeSelect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelect.js","sources":["../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, getLocale } from \"utils\";\n\nimport { ANTD_LOCALE } from \"./constants\";\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n popupClassName,\n ...otherProps\n },\n ref\n ) => {\n const { t, i18n } = useTranslation();\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n {getLocale(i18n, t, \"neetoui.treeSelect.noOptions\")}\n </div>\n }\n popupClassName={classnames(\n \"neeto-ui-tree-select-dropdown\",\n popupClassName\n )}\n switcherIcon={props => (\n <div {...props}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To specify additional classes to the popup.\n */\n popupClassName: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.node,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.node,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","popupClassName","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","i18n","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","treeNodeFilterProp","undefined","classnames","notFoundContent","getLocale","props","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaMA,IAAAA,UAAU,gBAAGC,UAAU,CAC3B,UAAAC,IAAA,EAqBEC,GAAG,EACA;AAAA,EAAA,IAAAC,iBAAA,CAAA;AAAA,EAAA,IApBDC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAAC,aAAA,GAAAL,IAAA,CACTM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAChBE,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;IAAAC,UAAA,GAAAT,IAAA,CACVU,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,UAAA;IACVE,QAAQ,GAAAX,IAAA,CAARW,QAAQ;IAAAC,gBAAA,GAAAZ,IAAA,CACRa,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,gBAAA;IAAAE,aAAA,GAAAd,IAAA,CAChB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MAAAR,IAAAA,IAAAA,iBAAA,KAAAA,KAAAA,CAAAA,GAAAA,iBAAA,GAAI,OAAQ;IACjDuB,KAAK,EAAEA,KAAK,IAAIgC,SAAU;AAC1BrD,IAAAA,SAAS,EAAEsD,UAAU,CAAC,+BAA+B,EAAEtD,SAAS,EAAE;AAChE,MAAA,6BAA6B,EAAEG,KAAAA;AACjC,KAAC,CAAE;IACHoD,eAAe;AAAA;AACb;AACAtB,IAAAA,cAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKlC,MAAAA,SAAS,EAAC,mCAAA;KACZwD,EAAAA,SAAS,CAAC3B,IAAI,EAAED,CAAC,EAAE,8BAA8B,CAAC,CAEtD;AACDN,IAAAA,cAAc,EAAEgC,UAAU,CACxB,+BAA+B,EAC/BhC,cAAc,CACd;IACFL,YAAY,EAAE,SAAAA,YAAAA,CAAAwC,KAAK,EAAA;AAAA,MAAA,oBACjBxB,cAAA,CAAAC,aAAA,CAAA,KAAA,EAASuB,KAAK,eACZxB,cAAA,CAAAC,aAAA,CAACF,YAAY,EAAA,IAAA,CAAG,CACZ,CAAA;AAAA,KAAA;AACN,GAAA,EACET,UAAU,CACd,CAAA,EACDpB,KAAK,iBACJ8B,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGlC,IAAAA,SAAS,EAAC,uBAAuB;IAAC,aAAY,EAAA,kBAAA;GAC9CG,EAAAA,KAAK,CAET,CACG,CACS,CAAA;AAErB,CAAC,EACF;AAEDT,UAAU,CAACgE,WAAW,GAAG,YAAY;;;;"}
|
|
1
|
+
{"version":3,"file":"TreeSelect.js","sources":["../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, getLocale } from \"utils\";\n\nimport { ANTD_LOCALE } from \"./constants\";\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n popupClassName,\n ...otherProps\n },\n ref\n ) => {\n const { t, i18n } = useTranslation();\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n {getLocale(i18n, t, \"neetoui.treeSelect.noOptions\")}\n </div>\n }\n popupClassName={classnames(\n \"neeto-ui-tree-select-dropdown\",\n popupClassName\n )}\n switcherIcon={({ className, style, onMouseMove, id, title }) => (\n <div {...{ className, id, onMouseMove, style, title }}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To specify additional classes to the popup.\n */\n popupClassName: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.elementType,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.elementType,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","popupClassName","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","i18n","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","treeNodeFilterProp","undefined","classnames","notFoundContent","getLocale","_ref2","style","onMouseMove","id","title","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaMA,IAAAA,UAAU,gBAAGC,UAAU,CAC3B,UAAAC,IAAA,EAqBEC,GAAG,EACA;AAAA,EAAA,IAAAC,iBAAA,CAAA;AAAA,EAAA,IApBDC,UAAU,GAAAH,IAAA,CAAVG,UAAU;IACVC,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAAC,aAAA,GAAAL,IAAA,CACTM,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;IAChBE,KAAK,GAAAP,IAAA,CAALO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EAAFA,EAAE;AAAED,QAAAA,WAAW,EAAXA,WAAW;AAAED,QAAAA,KAAK,EAALA,KAAK;AAAEG,QAAAA,KAAK,EAALA,KAAAA;AAAK,OAAA,eACjD5B,cAAA,CAAAC,aAAA,CAACF,YAAY,OAAG,CACZ,CAAA;AAAA,KAAA;AACN,GAAA,EACET,UAAU,CACd,CAAA,EACDpB,KAAK,iBACJ8B,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGlC,IAAAA,SAAS,EAAC,uBAAuB;IAAC,aAAY,EAAA,kBAAA;GAC9CG,EAAAA,KAAK,CAET,CACG,CACS,CAAA;AAErB,CAAC,EACF;AAEDT,UAAU,CAACoE,WAAW,GAAG,YAAY;;;;"}
|
package/dist/cjs/Avatar.js
CHANGED
|
@@ -8,6 +8,7 @@ var Avvvatars = require('avvvatars-react');
|
|
|
8
8
|
var classnames = require('classnames');
|
|
9
9
|
var ramda = require('ramda');
|
|
10
10
|
var Tooltip = require('./Tooltip.js');
|
|
11
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
11
12
|
require('@tippyjs/react');
|
|
12
13
|
require('tippy.js');
|
|
13
14
|
|
package/dist/cjs/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../src/components/Avatar.jsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport Avvvatars from \"avvvatars-react\";\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty, isNil } from \"ramda\";\n\nimport Tooltip from \"components/Tooltip\";\n\nconst SIZE = { small: 24, medium: 32, large: 40, extraLarge: 64 };\n\nconst STATUS = { online: \"online\", idle: \"idle\", offline: \"offline\" };\n\nconst getInitials = fullName => {\n if (typeof fullName !== \"string\" || isEmpty(fullName)) return \" \";\n const allNames = fullName.trim().split(\" \");\n if (allNames.length === 1) return fullName.substring(0, 2).toUpperCase();\n\n return `${allNames[0][0]}${allNames[allNames.length - 1][0]}`.toUpperCase();\n};\n\nconst Avatar = ({\n size = \"medium\",\n user = {},\n status = null,\n onClick = () => {},\n className = \"\",\n showTooltip = false,\n tooltipProps = {},\n ...otherProps\n}) => {\n const [isLoadingFailed, setIsLoadingFailed] = useState(false);\n\n const { name = \"\", imageUrl } = user;\n\n const isMedium = size === \"medium\";\n const isLarge = size === \"large\";\n const isExtraLarge = size === \"extraLarge\";\n\n const containerClasses = classNames(\n \"neeto-ui-avatar__container neeto-ui-select-none\",\n {\n \"neeto-ui-avatar__container--medium\": isMedium,\n \"neeto-ui-avatar__container--large\": isLarge,\n \"neeto-ui-avatar__container--xlarge\": isExtraLarge,\n },\n className\n );\n\n const imageClasses = classNames(\"neeto-ui-avatar\", {\n \"neeto-ui-avatar--medium\": isMedium,\n \"neeto-ui-avatar--large\": isLarge,\n \"neeto-ui-avatar--xlarge\": isExtraLarge,\n hidden: isLoadingFailed,\n });\n\n const statusClasses = classNames(\"neeto-ui-avatar__status\", status, {\n \"neeto-ui-avatar__status-medium\": isMedium,\n \"neeto-ui-avatar__status-large\": isLarge,\n \"neeto-ui-avatar__status-xlarge\": isExtraLarge,\n });\n\n const Indicator = () =>\n isNil(status) ? (\n React.Fragment\n ) : (\n <span className={statusClasses} data-testid=\"indicator\" />\n );\n\n const shouldDisplayFallbackAvatar = !(imageUrl && !isLoadingFailed);\n\n return (\n <Tooltip\n content={name}\n disabled={!showTooltip}\n position=\"bottom\"\n {...tooltipProps}\n >\n <span\n {...{ onClick }}\n className={containerClasses}\n data-testid=\"avatar\"\n {...otherProps}\n >\n <Indicator />\n {shouldDisplayFallbackAvatar ? (\n <Avvvatars\n displayValue={getInitials(name)}\n size={SIZE[size]}\n value={name}\n />\n ) : (\n <img\n alt={`avatar-${name}`}\n className={imageClasses}\n src={imageUrl}\n onError={() => setIsLoadingFailed(true)}\n />\n )}\n </span>\n </Tooltip>\n );\n};\n\nAvatar.propTypes = {\n /**\n * Specify the dimension for Avatar component.\n */\n size: PropTypes.oneOf(Object.keys(SIZE)),\n user: PropTypes.shape({\n imageUrl: PropTypes.string,\n name: PropTypes.string,\n }),\n /**\n * To specify the action to be triggered on clicking the Avatar.\n */\n onClick: PropTypes.func,\n /**\n * To specify the status of the user if needed in Avatar component.\n */\n status: PropTypes.oneOf(Object.keys(STATUS)),\n /**\n * To display a tooltip with name of the user.\n */\n showTooltip: PropTypes.bool,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n /**\n * To provide external classnames to Avatar component.\n */\n className: PropTypes.string,\n};\n\nexport default Avatar;\n"],"names":["SIZE","small","medium","large","extraLarge","getInitials","fullName","isEmpty","allNames","trim","split","length","substring","toUpperCase","concat","Avatar","_ref","_ref$size","size","_ref$user","user","_ref$status","status","_ref$onClick","onClick","_ref$className","className","_ref$showTooltip","showTooltip","_ref$tooltipProps","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isLoadingFailed","setIsLoadingFailed","_user$name","name","imageUrl","isMedium","isLarge","isExtraLarge","containerClasses","classNames","imageClasses","hidden","statusClasses","Indicator","isNil","React","Fragment","createElement","shouldDisplayFallbackAvatar","Tooltip","_extends","content","disabled","position","Avvvatars","displayValue","value","alt","src","onError"],"mappings":";;;;;;;;;;;;;;;AASA,IAAMA,IAAI,GAAG;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,MAAM,EAAE,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAE;AAAEC,EAAAA,UAAU,EAAE,EAAA;AAAG,CAAC,CAAA;AAIjE,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAGC,QAAQ,EAAI;EAC9B,IAAI,OAAOA,QAAQ,KAAK,QAAQ,IAAIC,aAAO,CAACD,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAA;EACjE,IAAME,QAAQ,GAAGF,QAAQ,CAACG,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAA;AAC3C,EAAA,IAAIF,QAAQ,CAAC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S;IACdyB,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAM5B,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAAA,KAAA;AAAC,GAAA,CAE3C,CACI,CACC,CAAA;AAEd;;;;"}
|
package/dist/cjs/DatePicker.js
CHANGED
|
@@ -26,7 +26,7 @@ require('react-colorful');
|
|
|
26
26
|
require('./tinycolor-C4a31PPv.js');
|
|
27
27
|
require('./Dropdown.js');
|
|
28
28
|
require('./index-CvMjRZDt.js');
|
|
29
|
-
var DatePicker = require('./index-
|
|
29
|
+
var DatePicker = require('./index-E2IEf9Av.js');
|
|
30
30
|
require('./Input.js');
|
|
31
31
|
require('./Label.js');
|
|
32
32
|
require('./MultiEmailInput.js');
|
package/dist/cjs/Kbd.js
CHANGED
|
@@ -5,6 +5,7 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var classnames = require('classnames');
|
|
7
7
|
var Tooltip = require('./Tooltip.js');
|
|
8
|
+
require('@babel/runtime/helpers/defineProperty');
|
|
8
9
|
require('@babel/runtime/helpers/slicedToArray');
|
|
9
10
|
require('@tippyjs/react');
|
|
10
11
|
require('tippy.js');
|
package/dist/cjs/Kbd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Kbd.js","sources":["../../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Kbd.js","sources":["../../src/components/Kbd.jsx"],"sourcesContent":["import React from \"react\";\n\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport Tooltip from \"./Tooltip\";\n\nconst Kbd = ({ keyName, className, tooltipProps, ...otherProps }) => (\n <Tooltip disabled={!tooltipProps} {...tooltipProps}>\n <span className={classnames([\"neeto-ui-kbd\", className])} {...otherProps}>\n {keyName}\n </span>\n </Tooltip>\n);\n\nKbd.propTypes = {\n /**\n * To specify keyboard key\n */\n keyName: PropTypes.string,\n /**\n * To provide additional class names to the Kbd.\n */\n className: PropTypes.string,\n /**\n * To specify the props to be passed to the tooltip.\n */\n tooltipProps: PropTypes.object,\n};\n\nexport default Kbd;\n"],"names":["Kbd","_ref","keyName","className","tooltipProps","otherProps","_objectWithoutProperties","_excluded","React","createElement","Tooltip","_extends","disabled","classnames"],"mappings":";;;;;;;;;;;;;AAOA,IAAMA,GAAG,GAAG,SAANA,GAAGA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAEC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,YAAY,GAAAH,IAAA,CAAZG,YAAY;AAAKC,IAAAA,UAAU,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;AAAA,EAAA,oBAC5DC,KAAA,CAAAC,aAAA,CAACC,OAAO,EAAAC,QAAA,CAAA;AAACC,IAAAA,QAAQ,EAAE,CAACR,YAAAA;AAAa,GAAA,EAAKA,YAAY,CAChDI,eAAAA,KAAA,CAAAC,aAAA,SAAAE,QAAA,CAAA;AAAMR,IAAAA,SAAS,EAAEU,UAAU,CAAC,CAAC,cAAc,EAAEV,SAAS,CAAC,CAAA;AAAE,GAAA,EAAKE,UAAU,CAAA,EACrEH,OAAO,CACH,CACC,CAAA;AAAA;;;;"}
|