@salutejs/plasma-new-hope 0.184.0-canary.1534.11679645702.0 → 0.184.0-canary.1536.11684075369.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/cjs/components/Chip/Chip.js +15 -8
  2. package/cjs/components/Chip/Chip.js.map +1 -1
  3. package/emotion/cjs/components/Chip/Chip.js +15 -8
  4. package/emotion/cjs/components/_Icon/index.js +1 -8
  5. package/emotion/es/components/Chip/Chip.js +16 -9
  6. package/emotion/es/components/_Icon/index.js +1 -2
  7. package/es/components/Chip/Chip.js +18 -11
  8. package/es/components/Chip/Chip.js.map +1 -1
  9. package/package.json +2 -2
  10. package/styled-components/cjs/components/Chip/Chip.js +15 -8
  11. package/styled-components/cjs/components/_Icon/index.js +1 -8
  12. package/styled-components/es/components/Chip/Chip.js +16 -9
  13. package/styled-components/es/components/_Icon/index.js +1 -2
  14. package/types/components/Chip/Chip.d.ts.map +1 -1
  15. package/types/components/Chip/Chip.types.d.ts +7 -1
  16. package/types/components/Chip/Chip.types.d.ts.map +1 -1
  17. package/types/components/_Icon/index.d.ts +0 -1
  18. package/types/components/_Icon/index.d.ts.map +1 -1
  19. package/emotion/cjs/components/_Icon/Icon.assets/ArrowBarDown.js +0 -23
  20. package/emotion/cjs/components/_Icon/Icons/IconArrowBarDown.js +0 -22
  21. package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -220
  22. package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -58
  23. package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.styles.js +0 -80
  24. package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.template-docs.mdx +0 -136
  25. package/emotion/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.types.js +0 -5
  26. package/emotion/es/components/_Icon/Icon.assets/ArrowBarDown.js +0 -16
  27. package/emotion/es/components/_Icon/Icons/IconArrowBarDown.js +0 -15
  28. package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -212
  29. package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -58
  30. package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.styles.js +0 -73
  31. package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.template-docs.mdx +0 -136
  32. package/emotion/es/examples/plasma_b2c/components/Dropzone/Dropzone.types.js +0 -1
  33. package/styled-components/cjs/components/_Icon/Icon.assets/ArrowBarDown.js +0 -23
  34. package/styled-components/cjs/components/_Icon/Icons/IconArrowBarDown.js +0 -22
  35. package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -220
  36. package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -58
  37. package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.styles.js +0 -33
  38. package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.template-docs.mdx +0 -136
  39. package/styled-components/cjs/examples/plasma_b2c/components/Dropzone/Dropzone.types.js +0 -5
  40. package/styled-components/es/components/_Icon/Icon.assets/ArrowBarDown.js +0 -16
  41. package/styled-components/es/components/_Icon/Icons/IconArrowBarDown.js +0 -15
  42. package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.js +0 -212
  43. package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.stories.tsx +0 -58
  44. package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.styles.js +0 -26
  45. package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.template-docs.mdx +0 -136
  46. package/styled-components/es/examples/plasma_b2c/components/Dropzone/Dropzone.types.js +0 -1
  47. package/types/components/_Icon/Icon.assets/ArrowBarDown.d.ts +0 -4
  48. package/types/components/_Icon/Icon.assets/ArrowBarDown.d.ts.map +0 -1
  49. package/types/components/_Icon/Icons/IconArrowBarDown.d.ts +0 -4
  50. package/types/components/_Icon/Icons/IconArrowBarDown.d.ts.map +0 -1
  51. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.d.ts +0 -22
  52. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.d.ts.map +0 -1
  53. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.styles.d.ts +0 -15
  54. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.styles.d.ts.map +0 -1
  55. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.types.d.ts +0 -80
  56. package/types/examples/plasma_b2c/components/Dropzone/Dropzone.types.d.ts.map +0 -1
@@ -15,7 +15,7 @@ var base$5 = require('./variations/_pilled/base.js');
15
15
  var Chip_styles = require('./Chip.styles.js');
16
16
  var Chip_tokens = require('./Chip.tokens.js');
17
17
 
18
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
18
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
19
19
  var chipRoot = function chipRoot(Root) {
20
20
  return /*#__PURE__*/React.forwardRef(function (props, ref) {
21
21
  var children = props.children,
@@ -29,6 +29,7 @@ var chipRoot = function chipRoot(Root) {
29
29
  className = props.className,
30
30
  onClear = props.onClear,
31
31
  onClick = props.onClick,
32
+ onClickClose = props.onClickClose,
32
33
  _props$pilled = props.pilled,
33
34
  pilled = _props$pilled === void 0 ? false : _props$pilled,
34
35
  _props$readOnly = props.readOnly,
@@ -45,12 +46,13 @@ var chipRoot = function chipRoot(Root) {
45
46
  onClick === null || onClick === void 0 || onClick(event);
46
47
  onClear === null || onClear === void 0 || onClear();
47
48
  };
48
- var ClearContent = React.useMemo(function () {
49
- return contentClearButton || /*#__PURE__*/React.createElement(Chip_styles.StyledContentClear, null, /*#__PURE__*/React.createElement(IconClose.IconClose, {
50
- sizeCustomProperty: Chip_tokens.tokens.closeIconSize,
51
- color: "inherit"
52
- }));
53
- }, [contentClearButton, Chip_tokens.tokens.closeIconSize]);
49
+ var handleClickClose = function handleClickClose(event) {
50
+ if (disabled || readOnly || !onClickClose) {
51
+ return;
52
+ }
53
+ event.stopPropagation();
54
+ onClickClose(event);
55
+ };
54
56
  return /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
55
57
  type: "button",
56
58
  ref: ref,
@@ -61,7 +63,12 @@ var chipRoot = function chipRoot(Root) {
61
63
  pilled: pilled,
62
64
  readOnly: !disabled && readOnly,
63
65
  size: size
64
- }, rest), contentLeft && /*#__PURE__*/React.createElement(Chip_styles.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(Chip_styles.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(Chip_styles.StyledContentRight, null, contentRight), hasClear && ClearContent);
66
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(Chip_styles.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(Chip_styles.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(Chip_styles.StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/React.createElement(Chip_styles.StyledContentClear, {
67
+ onClick: handleClickClose
68
+ }, /*#__PURE__*/React.createElement(IconClose.IconClose, {
69
+ sizeCustomProperty: Chip_tokens.tokens.closeIconSize,
70
+ color: "inherit"
71
+ }))));
65
72
  });
66
73
  };
67
74
  var chipConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readonlyCSS } from './variations/_readonly/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { ChipProps } from './Chip.types';\nimport { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles';\nimport { classes, tokens } from './Chip.tokens';\n\nexport const chipRoot = (Root: RootProps<HTMLButtonElement, ChipProps>) =>\n forwardRef<HTMLButtonElement, ChipProps>((props, ref) => {\n const {\n children,\n text,\n contentLeft,\n contentRight,\n contentClearButton,\n hasClear = true,\n size,\n className,\n onClear,\n onClick,\n pilled = false,\n readOnly = false,\n disabled = false,\n ...rest\n } = props;\n\n const txt = !text && typeof children === 'string' ? children : text;\n const pilledClass = pilled ? classes.pilled : undefined;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || readOnly) {\n return;\n }\n\n onClick?.(event);\n onClear?.();\n };\n\n const ClearContent = useMemo(() => {\n return (\n contentClearButton || (\n <StyledContentClear>\n <IconClose sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n </StyledContentClear>\n )\n );\n }, [contentClearButton, tokens.closeIconSize]);\n\n return (\n <Root\n type=\"button\"\n ref={ref}\n className={cx(pilledClass, classes.chipItem, className)}\n tabIndex={readOnly ? -1 : 0}\n onClick={handleClick}\n disabled={disabled}\n pilled={pilled}\n readOnly={!disabled && readOnly}\n size={size}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n {hasClear && ClearContent}\n </Root>\n );\n });\n\nexport const chipConfig = {\n name: 'Chip',\n tag: 'button',\n layout: chipRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readonlyCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["chipRoot","Root","forwardRef","props","ref","children","text","contentLeft","contentRight","contentClearButton","_props$hasClear","hasClear","size","className","onClear","onClick","_props$pilled","pilled","_props$readOnly","readOnly","_props$disabled","disabled","rest","_objectWithoutProperties","_excluded","txt","pilledClass","classes","undefined","handleClick","event","ClearContent","useMemo","React","createElement","StyledContentClear","IconClose","sizeCustomProperty","tokens","closeIconSize","color","_extends","type","cx","chipItem","tabIndex","StyledContentLeft","StyledContentMain","StyledContentRight","chipConfig","name","tag","layout","base","variations","view","css","viewCSS","sizeCSS","disabledCSS","attrs","readonlyCSS","focused","focusedCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,gBAAU,CAA+B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACrD,IAAA,IACIC,QAAQ,GAcRF,KAAK,CAdLE,QAAQ;MACRC,IAAI,GAaJH,KAAK,CAbLG,IAAI;MACJC,WAAW,GAYXJ,KAAK,CAZLI,WAAW;MACXC,YAAY,GAWZL,KAAK,CAXLK,YAAY;MACZC,kBAAkB,GAUlBN,KAAK,CAVLM,kBAAkB;MAAAC,eAAA,GAUlBP,KAAK,CATLQ,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MACfE,IAAI,GAQJT,KAAK,CARLS,IAAI;MACJC,SAAS,GAOTV,KAAK,CAPLU,SAAS;MACTC,OAAO,GAMPX,KAAK,CANLW,OAAO;MACPC,OAAO,GAKPZ,KAAK,CALLY,OAAO;MAAAC,aAAA,GAKPb,KAAK,CAJLc,MAAM;AAANA,MAAAA,MAAM,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;MAAAE,eAAA,GAIdf,KAAK,CAHLgB,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,eAA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AA;KACV;AACDE,IAAAA,OAAO,EAAE;AACLN,MAAAA,GAAG,EAAEO,WAAAA;KACR;AACD9C,IAAAA,MAAM,EAAE;AACJuC,MAAAA,GAAG,EAAEQ,WAAS;AACdJ,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDK,EAAAA,QAAQ,EAAE;AACNV,IAAAA,IAAI,EAAE,SAAS;AACf3C,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, MouseEvent } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readonlyCSS } from './variations/_readonly/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { ChipProps } from './Chip.types';\nimport { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles';\nimport { classes, tokens } from './Chip.tokens';\n\nexport const chipRoot = (Root: RootProps<HTMLButtonElement, ChipProps>) =>\n forwardRef<HTMLButtonElement, ChipProps>((props, ref) => {\n const {\n children,\n text,\n contentLeft,\n contentRight,\n contentClearButton,\n hasClear = true,\n size,\n className,\n onClear,\n onClick,\n onClickClose,\n pilled = false,\n readOnly = false,\n disabled = false,\n ...rest\n } = props;\n\n const txt = !text && typeof children === 'string' ? children : text;\n const pilledClass = pilled ? classes.pilled : undefined;\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (disabled || readOnly) {\n return;\n }\n\n onClick?.(event);\n onClear?.();\n };\n\n const handleClickClose = (event: MouseEvent<HTMLDivElement>) => {\n if (disabled || readOnly || !onClickClose) {\n return;\n }\n\n event.stopPropagation();\n onClickClose(event);\n };\n\n return (\n <Root\n type=\"button\"\n ref={ref}\n className={cx(pilledClass, classes.chipItem, className)}\n tabIndex={readOnly ? -1 : 0}\n onClick={handleClick}\n disabled={disabled}\n pilled={pilled}\n readOnly={!disabled && readOnly}\n size={size}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n {hasClear &&\n (contentClearButton || (\n <StyledContentClear onClick={handleClickClose}>\n <IconClose sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n </StyledContentClear>\n ))}\n </Root>\n );\n });\n\nexport const chipConfig = {\n name: 'Chip',\n tag: 'button',\n layout: chipRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readonlyCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["chipRoot","Root","forwardRef","props","ref","children","text","contentLeft","contentRight","contentClearButton","_props$hasClear","hasClear","size","className","onClear","onClick","onClickClose","_props$pilled","pilled","_props$readOnly","readOnly","_props$disabled","disabled","rest","_objectWithoutProperties","_excluded","txt","pilledClass","classes","undefined","handleClick","event","handleClickClose","stopPropagation","React","createElement","_extends","type","cx","chipItem","tabIndex","StyledContentLeft","StyledContentMain","StyledContentRight","StyledContentClear","IconClose","sizeCustomProperty","tokens","closeIconSize","color","chipConfig","name","tag","layout","base","variations","view","css","viewCSS","sizeCSS","disabledCSS","attrs","readonlyCSS","focused","focusedCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,gBAAU,CAA+B,UAACC,KA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 var _base5 = /*#__PURE__*/require("./variations/_focused/base");
16
16
  var _base6 = /*#__PURE__*/require("./variations/_pilled/base");
17
17
  var _Chip = /*#__PURE__*/require("./Chip.styles");
18
18
  var _Chip2 = /*#__PURE__*/require("./Chip.tokens");
19
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
19
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
20
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
22
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -35,6 +35,7 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
35
35
  className = props.className,
36
36
  onClear = props.onClear,
37
37
  onClick = props.onClick,
38
+ onClickClose = props.onClickClose,
38
39
  _props$pilled = props.pilled,
39
40
  pilled = _props$pilled === void 0 ? false : _props$pilled,
40
41
  _props$readOnly = props.readOnly,
@@ -51,12 +52,13 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
51
52
  onClick === null || onClick === void 0 || onClick(event);
52
53
  onClear === null || onClear === void 0 || onClear();
53
54
  };
54
- var ClearContent = (0, _react.useMemo)(function () {
55
- return contentClearButton || /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentClear, null, /*#__PURE__*/_react["default"].createElement(_IconClose.IconClose, {
56
- sizeCustomProperty: _Chip2.tokens.closeIconSize,
57
- color: "inherit"
58
- }));
59
- }, [contentClearButton, _Chip2.tokens.closeIconSize]);
55
+ var handleClickClose = function handleClickClose(event) {
56
+ if (disabled || readOnly || !onClickClose) {
57
+ return;
58
+ }
59
+ event.stopPropagation();
60
+ onClickClose(event);
61
+ };
60
62
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
61
63
  type: "button",
62
64
  ref: ref,
@@ -67,7 +69,12 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
67
69
  pilled: pilled,
68
70
  readOnly: !disabled && readOnly,
69
71
  size: size
70
- }, rest), contentLeft && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentRight, null, contentRight), hasClear && ClearContent);
72
+ }, rest), contentLeft && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentClear, {
73
+ onClick: handleClickClose
74
+ }, /*#__PURE__*/_react["default"].createElement(_IconClose.IconClose, {
75
+ sizeCustomProperty: _Chip2.tokens.closeIconSize,
76
+ color: "inherit"
77
+ }))));
71
78
  });
72
79
  };
73
80
  var chipConfig = exports.chipConfig = {
@@ -3,12 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "IconArrowBarDown", {
7
- enumerable: true,
8
- get: function get() {
9
- return _IconArrowBarDown.IconArrowBarDown;
10
- }
11
- });
12
6
  Object.defineProperty(exports, "IconBlankCsvOutline", {
13
7
  enumerable: true,
14
8
  get: function get() {
@@ -197,5 +191,4 @@ var _IconBlankOutline = /*#__PURE__*/require("./Icons/IconBlankOutline");
197
191
  var _IconBlankPdfOutline = /*#__PURE__*/require("./Icons/IconBlankPdfOutline");
198
192
  var _IconBlankTxtOutline = /*#__PURE__*/require("./Icons/IconBlankTxtOutline");
199
193
  var _IconBlankXlsOutline = /*#__PURE__*/require("./Icons/IconBlankXlsOutline");
200
- var _IconInfoCircleOutline = /*#__PURE__*/require("./Icons/IconInfoCircleOutline");
201
- var _IconArrowBarDown = /*#__PURE__*/require("./Icons/IconArrowBarDown");
194
+ var _IconInfoCircleOutline = /*#__PURE__*/require("./Icons/IconInfoCircleOutline");
@@ -1,8 +1,8 @@
1
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
1
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import React, { forwardRef, useMemo } from 'react';
5
+ import React, { forwardRef } from 'react';
6
6
  import { IconClose } from '../_Icon/Icons/IconClose';
7
7
  import { cx } from '../../utils';
8
8
  import { base as viewCSS } from './variations/_view/base';
@@ -26,6 +26,7 @@ export var chipRoot = function chipRoot(Root) {
26
26
  className = props.className,
27
27
  onClear = props.onClear,
28
28
  onClick = props.onClick,
29
+ onClickClose = props.onClickClose,
29
30
  _props$pilled = props.pilled,
30
31
  pilled = _props$pilled === void 0 ? false : _props$pilled,
31
32
  _props$readOnly = props.readOnly,
@@ -42,12 +43,13 @@ export var chipRoot = function chipRoot(Root) {
42
43
  onClick === null || onClick === void 0 || onClick(event);
43
44
  onClear === null || onClear === void 0 || onClear();
44
45
  };
45
- var ClearContent = useMemo(function () {
46
- return contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, null, /*#__PURE__*/React.createElement(IconClose, {
47
- sizeCustomProperty: tokens.closeIconSize,
48
- color: "inherit"
49
- }));
50
- }, [contentClearButton, tokens.closeIconSize]);
46
+ var handleClickClose = function handleClickClose(event) {
47
+ if (disabled || readOnly || !onClickClose) {
48
+ return;
49
+ }
50
+ event.stopPropagation();
51
+ onClickClose(event);
52
+ };
51
53
  return /*#__PURE__*/React.createElement(Root, _extends({
52
54
  type: "button",
53
55
  ref: ref,
@@ -58,7 +60,12 @@ export var chipRoot = function chipRoot(Root) {
58
60
  pilled: pilled,
59
61
  readOnly: !disabled && readOnly,
60
62
  size: size
61
- }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && ClearContent);
63
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, {
64
+ onClick: handleClickClose
65
+ }, /*#__PURE__*/React.createElement(IconClose, {
66
+ sizeCustomProperty: tokens.closeIconSize,
67
+ color: "inherit"
68
+ }))));
62
69
  });
63
70
  };
64
71
  export var chipConfig = {
@@ -24,5 +24,4 @@ export { IconBlankOutline } from './Icons/IconBlankOutline';
24
24
  export { IconBlankPdfOutline } from './Icons/IconBlankPdfOutline';
25
25
  export { IconBlankTxtOutline } from './Icons/IconBlankTxtOutline';
26
26
  export { IconBlankXlsOutline } from './Icons/IconBlankXlsOutline';
27
- export { IconInfoCircleOutline } from './Icons/IconInfoCircleOutline';
28
- export { IconArrowBarDown } from './Icons/IconArrowBarDown';
27
+ export { IconInfoCircleOutline } from './Icons/IconInfoCircleOutline';
@@ -1,5 +1,5 @@
1
1
  import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import React, { forwardRef, useMemo } from 'react';
2
+ import React, { forwardRef } from 'react';
3
3
  import { IconClose } from '../_Icon/Icons/IconClose.js';
4
4
  import { cx } from '../../utils/index.js';
5
5
  import { base as base$1 } from './variations/_view/base.js';
@@ -8,10 +8,10 @@ import { base as base$3 } from './variations/_disabled/base.js';
8
8
  import { base as base$4 } from './variations/_readonly/base.js';
9
9
  import { base as base$5 } from './variations/_focused/base.js';
10
10
  import { base as base$6 } from './variations/_pilled/base.js';
11
- import { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles.js';
12
- import { tokens, classes } from './Chip.tokens.js';
11
+ import { StyledContentLeft, StyledContentMain, StyledContentRight, StyledContentClear, base } from './Chip.styles.js';
12
+ import { classes, tokens } from './Chip.tokens.js';
13
13
 
14
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
14
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
15
15
  var chipRoot = function chipRoot(Root) {
16
16
  return /*#__PURE__*/forwardRef(function (props, ref) {
17
17
  var children = props.children,
@@ -25,6 +25,7 @@ var chipRoot = function chipRoot(Root) {
25
25
  className = props.className,
26
26
  onClear = props.onClear,
27
27
  onClick = props.onClick,
28
+ onClickClose = props.onClickClose,
28
29
  _props$pilled = props.pilled,
29
30
  pilled = _props$pilled === void 0 ? false : _props$pilled,
30
31
  _props$readOnly = props.readOnly,
@@ -41,12 +42,13 @@ var chipRoot = function chipRoot(Root) {
41
42
  onClick === null || onClick === void 0 || onClick(event);
42
43
  onClear === null || onClear === void 0 || onClear();
43
44
  };
44
- var ClearContent = useMemo(function () {
45
- return contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, null, /*#__PURE__*/React.createElement(IconClose, {
46
- sizeCustomProperty: tokens.closeIconSize,
47
- color: "inherit"
48
- }));
49
- }, [contentClearButton, tokens.closeIconSize]);
45
+ var handleClickClose = function handleClickClose(event) {
46
+ if (disabled || readOnly || !onClickClose) {
47
+ return;
48
+ }
49
+ event.stopPropagation();
50
+ onClickClose(event);
51
+ };
50
52
  return /*#__PURE__*/React.createElement(Root, _extends({
51
53
  type: "button",
52
54
  ref: ref,
@@ -57,7 +59,12 @@ var chipRoot = function chipRoot(Root) {
57
59
  pilled: pilled,
58
60
  readOnly: !disabled && readOnly,
59
61
  size: size
60
- }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && ClearContent);
62
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, {
63
+ onClick: handleClickClose
64
+ }, /*#__PURE__*/React.createElement(IconClose, {
65
+ sizeCustomProperty: tokens.closeIconSize,
66
+ color: "inherit"
67
+ }))));
61
68
  });
62
69
  };
63
70
  var chipConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readonlyCSS } from './variations/_readonly/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { ChipProps } from './Chip.types';\nimport { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles';\nimport { classes, tokens } from './Chip.tokens';\n\nexport const chipRoot = (Root: RootProps<HTMLButtonElement, ChipProps>) =>\n forwardRef<HTMLButtonElement, ChipProps>((props, ref) => {\n const {\n children,\n text,\n contentLeft,\n contentRight,\n contentClearButton,\n hasClear = true,\n size,\n className,\n onClear,\n onClick,\n pilled = false,\n readOnly = false,\n disabled = false,\n ...rest\n } = props;\n\n const txt = !text && typeof children === 'string' ? children : text;\n const pilledClass = pilled ? classes.pilled : undefined;\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n if (disabled || readOnly) {\n return;\n }\n\n onClick?.(event);\n onClear?.();\n };\n\n const ClearContent = useMemo(() => {\n return (\n contentClearButton || (\n <StyledContentClear>\n <IconClose sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n </StyledContentClear>\n )\n );\n }, [contentClearButton, tokens.closeIconSize]);\n\n return (\n <Root\n type=\"button\"\n ref={ref}\n className={cx(pilledClass, classes.chipItem, className)}\n tabIndex={readOnly ? -1 : 0}\n onClick={handleClick}\n disabled={disabled}\n pilled={pilled}\n readOnly={!disabled && readOnly}\n size={size}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n {hasClear && ClearContent}\n </Root>\n );\n });\n\nexport const chipConfig = {\n name: 'Chip',\n tag: 'button',\n layout: chipRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readonlyCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["chipRoot","Root","forwardRef","props","ref","children","text","contentLeft","contentRight","contentClearButton","_props$hasClear","hasClear","size","className","onClear","onClick","_props$pilled","pilled","_props$readOnly","readOnly","_props$disabled","disabled","rest","_objectWithoutProperties","_excluded","txt","pilledClass","classes","undefined","handleClick","event","ClearContent","useMemo","React","createElement","StyledContentClear","IconClose","sizeCustomProperty","tokens","closeIconSize","color","_extends","type","cx","chipItem","tabIndex","StyledContentLeft","StyledContentMain","StyledContentRight","chipConfig","name","tag","layout","base","variations","view","css","viewCSS","sizeCSS","disabledCSS","attrs","readonlyCSS","focused","focusedCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,UAAU,CAA+B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACrD,IAAA,IAC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AAAA,GAAuB,CAAC,GAAGpB,QAAQ,EAC7DG,YAAY,iBAAIyB,KAAA,CAAAC,aAAA,CAACc,kBAAkB,QAAExC,YAAiC,CAAC,EACvEG,QAAQ,IAAIoB,YACX,CAAC,CAAA;AAEf,GAAC,CAAC,CAAA;AAAA,EAAA;AAEC,IAAMkB,UAAU,GAAG;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,QAAQ;AACbC,EAAAA,MAAM,EAAEpD,QAAQ;AAChBqD,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD7C,IAAAA,IAAI,EAAE;AACF4C,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDrC,IAAAA,QAAQ,EAAE;AACNmC,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDzC,IAAAA,QAAQ,EAAE;AACNqC,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDE,IAAAA,OAAO,EAAE;AACLN,MAAAA,GAAG,EAAEO,MAAAA;KACR;AACD9C,IAAAA,MAAM,EAAE;AACJuC,MAAAA,GAAG,EAAEQ,MAAS;AACdJ,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDK,EAAAA,QAAQ,EAAE;AACNV,IAAAA,IAAI,EAAE,SAAS;AACf3C,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import React, { forwardRef, MouseEvent } from 'react';\n\nimport type { RootProps } from '../../engines';\nimport { IconClose } from '../_Icon/Icons/IconClose';\nimport { cx } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { base as disabledCSS } from './variations/_disabled/base';\nimport { base as readonlyCSS } from './variations/_readonly/base';\nimport { base as focusedCSS } from './variations/_focused/base';\nimport { base as pilledCSS } from './variations/_pilled/base';\nimport type { ChipProps } from './Chip.types';\nimport { StyledContentClear, StyledContentLeft, StyledContentMain, StyledContentRight, base } from './Chip.styles';\nimport { classes, tokens } from './Chip.tokens';\n\nexport const chipRoot = (Root: RootProps<HTMLButtonElement, ChipProps>) =>\n forwardRef<HTMLButtonElement, ChipProps>((props, ref) => {\n const {\n children,\n text,\n contentLeft,\n contentRight,\n contentClearButton,\n hasClear = true,\n size,\n className,\n onClear,\n onClick,\n onClickClose,\n pilled = false,\n readOnly = false,\n disabled = false,\n ...rest\n } = props;\n\n const txt = !text && typeof children === 'string' ? children : text;\n const pilledClass = pilled ? classes.pilled : undefined;\n\n const handleClick = (event: MouseEvent<HTMLButtonElement>) => {\n if (disabled || readOnly) {\n return;\n }\n\n onClick?.(event);\n onClear?.();\n };\n\n const handleClickClose = (event: MouseEvent<HTMLDivElement>) => {\n if (disabled || readOnly || !onClickClose) {\n return;\n }\n\n event.stopPropagation();\n onClickClose(event);\n };\n\n return (\n <Root\n type=\"button\"\n ref={ref}\n className={cx(pilledClass, classes.chipItem, className)}\n tabIndex={readOnly ? -1 : 0}\n onClick={handleClick}\n disabled={disabled}\n pilled={pilled}\n readOnly={!disabled && readOnly}\n size={size}\n {...rest}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {txt ? <StyledContentMain>{txt}</StyledContentMain> : children}\n {contentRight && <StyledContentRight>{contentRight}</StyledContentRight>}\n {hasClear &&\n (contentClearButton || (\n <StyledContentClear onClick={handleClickClose}>\n <IconClose sizeCustomProperty={tokens.closeIconSize} color=\"inherit\" />\n </StyledContentClear>\n ))}\n </Root>\n );\n });\n\nexport const chipConfig = {\n name: 'Chip',\n tag: 'button',\n layout: chipRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n disabled: {\n css: disabledCSS,\n attrs: true,\n },\n readOnly: {\n css: readonlyCSS,\n attrs: true,\n },\n focused: {\n css: focusedCSS,\n },\n pilled: {\n css: pilledCSS,\n attrs: true,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["chipRoot","Root","forwardRef","props","ref","children","text","contentLeft","contentRight","contentClearButton","_props$hasClear","hasClear","size","className","onClear","onClick","onClickClose","_props$pilled","pilled","_props$readOnly","readOnly","_props$disabled","disabled","rest","_objectWithoutProperties","_excluded","txt","pilledClass","classes","undefined","handleClick","event","handleClickClose","stopPropagation","React","createElement","_extends","type","cx","chipItem","tabIndex","StyledContentLeft","StyledContentMain","StyledContentRight","StyledContentClear","IconClose","sizeCustomProperty","tokens","closeIconSize","color","chipConfig","name","tag","layout","base","variations","view","css","viewCSS","sizeCSS","disabledCSS","attrs","readonlyCSS","focused","focusedCSS","pilledCSS","defaults"],"mappings":";;;;;;;;;;;;;;IAgBaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,IAA6C,EAAA;AAAA,EAAA,oBAClEC,UAAU,CAA+B,UAACC,KAAK,EAAEC,GAAG,EAAK;AACrD,IAAA,IACIC,QAAQ,GAeRF,KAAK,CAfLE,QAAQ;MACRC,IAAI,GAcJH,KAAK,CAdLG,IAAI;MACJC,WAAW,GAaXJ,KAAK,CAbLI,WAAW;MACXC,YAAY,GAYZL,KAAK,CAZLK,YAAY;MACZC,kBAAkB,GAWlBN,KAAK,CAXLM,kBAAkB;MAAAC,eAAA,GAWlBP,KAAK,CAVLQ,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,eAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,eAAA;MACfE,IAAI,GASJT,KAAK,CATLS,IAAI;MACJC,SAAS,GAQTV,KAAK,CARLU,SAAS;MACTC,OAAO,GAOPX,KAAK,CAPLW,OAAO;MACPC,OAAO,GAMPZ,KAAK,CANLY,OAAO;MACPC,YAAY,GAKZb,KAAK,CALLa,YAAY;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,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACRC,IAAAA,IAAI,EAAE;AACFC,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD9C,IAAAA,IAAI,EAAE;AACF6C,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACDrC,IAAAA,QAAQ,EAAE;AACNmC,MAAAA,GAAG,EAAEG,MAAW;AAChBC,MAAAA,KAAK,EAAE,IAAA;KACV;AACDzC,IAAAA,QAAQ,EAAE;AACNqC,MAAAA,GAAG,EAAEK,MAAW;AAChBD,MAAAA,KAAK,EAAE,IAAA;KACV;AACDE,IAAAA,OAAO,EAAE;AACLN,MAAAA,GAAG,EAAEO,MAAAA;KACR;AACD9C,IAAAA,MAAM,EAAE;AACJuC,MAAAA,GAAG,EAAEQ,MAAS;AACdJ,MAAAA,KAAK,EAAE,IAAA;AACX,KAAA;GACH;AACDK,EAAAA,QAAQ,EAAE;AACNV,IAAAA,IAAI,EAAE,SAAS;AACf5C,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.184.0-canary.1534.11679645702.0",
3
+ "version": "0.184.0-canary.1536.11684075369.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -128,5 +128,5 @@
128
128
  "sideEffects": [
129
129
  "*.css"
130
130
  ],
131
- "gitHead": "31abbf243827508d20cfc097103c1bcd76bd06db"
131
+ "gitHead": "92f283c085bb4b443da8d865ab3b8e40834f77ff"
132
132
  }
@@ -16,7 +16,7 @@ var _base5 = /*#__PURE__*/require("./variations/_focused/base");
16
16
  var _base6 = /*#__PURE__*/require("./variations/_pilled/base");
17
17
  var _Chip = /*#__PURE__*/require("./Chip.styles");
18
18
  var _Chip2 = /*#__PURE__*/require("./Chip.tokens");
19
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
19
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
20
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
22
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -35,6 +35,7 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
35
35
  className = props.className,
36
36
  onClear = props.onClear,
37
37
  onClick = props.onClick,
38
+ onClickClose = props.onClickClose,
38
39
  _props$pilled = props.pilled,
39
40
  pilled = _props$pilled === void 0 ? false : _props$pilled,
40
41
  _props$readOnly = props.readOnly,
@@ -51,12 +52,13 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
51
52
  onClick === null || onClick === void 0 || onClick(event);
52
53
  onClear === null || onClear === void 0 || onClear();
53
54
  };
54
- var ClearContent = (0, _react.useMemo)(function () {
55
- return contentClearButton || /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentClear, null, /*#__PURE__*/_react["default"].createElement(_IconClose.IconClose, {
56
- sizeCustomProperty: _Chip2.tokens.closeIconSize,
57
- color: "inherit"
58
- }));
59
- }, [contentClearButton, _Chip2.tokens.closeIconSize]);
55
+ var handleClickClose = function handleClickClose(event) {
56
+ if (disabled || readOnly || !onClickClose) {
57
+ return;
58
+ }
59
+ event.stopPropagation();
60
+ onClickClose(event);
61
+ };
60
62
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
61
63
  type: "button",
62
64
  ref: ref,
@@ -67,7 +69,12 @@ var chipRoot = exports.chipRoot = function chipRoot(Root) {
67
69
  pilled: pilled,
68
70
  readOnly: !disabled && readOnly,
69
71
  size: size
70
- }, rest), contentLeft && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentRight, null, contentRight), hasClear && ClearContent);
72
+ }, rest), contentLeft && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/_react["default"].createElement(_Chip.StyledContentClear, {
73
+ onClick: handleClickClose
74
+ }, /*#__PURE__*/_react["default"].createElement(_IconClose.IconClose, {
75
+ sizeCustomProperty: _Chip2.tokens.closeIconSize,
76
+ color: "inherit"
77
+ }))));
71
78
  });
72
79
  };
73
80
  var chipConfig = exports.chipConfig = {
@@ -3,12 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "IconArrowBarDown", {
7
- enumerable: true,
8
- get: function get() {
9
- return _IconArrowBarDown.IconArrowBarDown;
10
- }
11
- });
12
6
  Object.defineProperty(exports, "IconBlankCsvOutline", {
13
7
  enumerable: true,
14
8
  get: function get() {
@@ -197,5 +191,4 @@ var _IconBlankOutline = /*#__PURE__*/require("./Icons/IconBlankOutline");
197
191
  var _IconBlankPdfOutline = /*#__PURE__*/require("./Icons/IconBlankPdfOutline");
198
192
  var _IconBlankTxtOutline = /*#__PURE__*/require("./Icons/IconBlankTxtOutline");
199
193
  var _IconBlankXlsOutline = /*#__PURE__*/require("./Icons/IconBlankXlsOutline");
200
- var _IconInfoCircleOutline = /*#__PURE__*/require("./Icons/IconInfoCircleOutline");
201
- var _IconArrowBarDown = /*#__PURE__*/require("./Icons/IconArrowBarDown");
194
+ var _IconInfoCircleOutline = /*#__PURE__*/require("./Icons/IconInfoCircleOutline");
@@ -1,8 +1,8 @@
1
- var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "pilled", "readOnly", "disabled"];
1
+ var _excluded = ["children", "text", "contentLeft", "contentRight", "contentClearButton", "hasClear", "size", "className", "onClear", "onClick", "onClickClose", "pilled", "readOnly", "disabled"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
- import React, { forwardRef, useMemo } from 'react';
5
+ import React, { forwardRef } from 'react';
6
6
  import { IconClose } from '../_Icon/Icons/IconClose';
7
7
  import { cx } from '../../utils';
8
8
  import { base as viewCSS } from './variations/_view/base';
@@ -26,6 +26,7 @@ export var chipRoot = function chipRoot(Root) {
26
26
  className = props.className,
27
27
  onClear = props.onClear,
28
28
  onClick = props.onClick,
29
+ onClickClose = props.onClickClose,
29
30
  _props$pilled = props.pilled,
30
31
  pilled = _props$pilled === void 0 ? false : _props$pilled,
31
32
  _props$readOnly = props.readOnly,
@@ -42,12 +43,13 @@ export var chipRoot = function chipRoot(Root) {
42
43
  onClick === null || onClick === void 0 || onClick(event);
43
44
  onClear === null || onClear === void 0 || onClear();
44
45
  };
45
- var ClearContent = useMemo(function () {
46
- return contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, null, /*#__PURE__*/React.createElement(IconClose, {
47
- sizeCustomProperty: tokens.closeIconSize,
48
- color: "inherit"
49
- }));
50
- }, [contentClearButton, tokens.closeIconSize]);
46
+ var handleClickClose = function handleClickClose(event) {
47
+ if (disabled || readOnly || !onClickClose) {
48
+ return;
49
+ }
50
+ event.stopPropagation();
51
+ onClickClose(event);
52
+ };
51
53
  return /*#__PURE__*/React.createElement(Root, _extends({
52
54
  type: "button",
53
55
  ref: ref,
@@ -58,7 +60,12 @@ export var chipRoot = function chipRoot(Root) {
58
60
  pilled: pilled,
59
61
  readOnly: !disabled && readOnly,
60
62
  size: size
61
- }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && ClearContent);
63
+ }, rest), contentLeft && /*#__PURE__*/React.createElement(StyledContentLeft, null, contentLeft), txt ? /*#__PURE__*/React.createElement(StyledContentMain, null, txt) : children, contentRight && /*#__PURE__*/React.createElement(StyledContentRight, null, contentRight), hasClear && (contentClearButton || /*#__PURE__*/React.createElement(StyledContentClear, {
64
+ onClick: handleClickClose
65
+ }, /*#__PURE__*/React.createElement(IconClose, {
66
+ sizeCustomProperty: tokens.closeIconSize,
67
+ color: "inherit"
68
+ }))));
62
69
  });
63
70
  };
64
71
  export var chipConfig = {
@@ -24,5 +24,4 @@ export { IconBlankOutline } from './Icons/IconBlankOutline';
24
24
  export { IconBlankPdfOutline } from './Icons/IconBlankPdfOutline';
25
25
  export { IconBlankTxtOutline } from './Icons/IconBlankTxtOutline';
26
26
  export { IconBlankXlsOutline } from './Icons/IconBlankXlsOutline';
27
- export { IconInfoCircleOutline } from './Icons/IconInfoCircleOutline';
28
- export { IconArrowBarDown } from './Icons/IconArrowBarDown';
27
+ export { IconInfoCircleOutline } from './Icons/IconInfoCircleOutline';
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,eAAO,MAAM,QAAQ,SAAU,UAAU,iBAAiB,EAAE,SAAS,CAAC,wFA4DhE,CAAC;AAEP,eAAO,MAAM,UAAU;;;mBA9DQ,UAAU,iBAAiB,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8FrE,CAAC"}
1
+ {"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,eAAO,MAAM,QAAQ,SAAU,UAAU,iBAAiB,EAAE,SAAS,CAAC,wFAiEhE,CAAC;AAEP,eAAO,MAAM,UAAU;;;mBAnEQ,UAAU,iBAAiB,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGrE,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ButtonHTMLAttributes, PropsWithChildren, ReactNode } from 'react';
1
+ import type { ButtonHTMLAttributes, PropsWithChildren, ReactNode, MouseEvent } from 'react';
2
2
  declare type CustomChipProps = {
3
3
  /**
4
4
  * Текстовая надпись
@@ -49,8 +49,14 @@ declare type CustomChipProps = {
49
49
  view?: string;
50
50
  /**
51
51
  * Коллбек при взаимодействии с элементом
52
+ * @deprecated
53
+ * Использовать onClick для закрытия
52
54
  */
53
55
  onClear?: () => void;
56
+ /**
57
+ * Коллбек при нажатии на крестик
58
+ */
59
+ onClickClose?: (event: MouseEvent<HTMLDivElement>) => void;
54
60
  } & PropsWithChildren;
55
61
  export interface ChipProps extends ButtonHTMLAttributes<HTMLButtonElement>, CustomChipProps {
56
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.types.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEhF,aAAK,eAAe,GAAG;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,GAAG,iBAAiB,CAAC;AAEtB,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,eAAe;CAAG"}
1
+ {"version":3,"file":"Chip.types.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/Chip.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5F,aAAK,eAAe,GAAG;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;CAC9D,GAAG,iBAAiB,CAAC;AAEtB,MAAM,WAAW,SAAU,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,eAAe;CAAG"}
@@ -25,5 +25,4 @@ export { IconBlankPdfOutline } from './Icons/IconBlankPdfOutline';
25
25
  export { IconBlankTxtOutline } from './Icons/IconBlankTxtOutline';
26
26
  export { IconBlankXlsOutline } from './Icons/IconBlankXlsOutline';
27
27
  export { IconInfoCircleOutline } from './Icons/IconInfoCircleOutline';
28
- export { IconArrowBarDown } from './Icons/IconArrowBarDown';
29
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,SAA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AAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ArrowBarDown = void 0;
7
- var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
- var _path;
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
11
- var ArrowBarDown = exports.ArrowBarDown = function ArrowBarDown(props) {
12
- return /*#__PURE__*/_react["default"].createElement("svg", _extends({
13
- width: "100%",
14
- viewBox: "0 0 16 16",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg"
17
- }, props), _path || (_path = /*#__PURE__*/_react["default"].createElement("path", {
18
- fillRule: "evenodd",
19
- clipRule: "evenodd",
20
- d: "M7.95833 1.875C8.23448 1.875 8.45833 2.09886 8.45833 2.375V10.4043L11.2686 7.54868C11.4623 7.35186 11.7789 7.34933 11.9757 7.54302C12.1725 7.73672 12.1751 8.05329 11.9814 8.25011L8.3147 11.9759C8.21782 12.0744 8.08453 12.1283 7.94645 12.1251C7.80837 12.1218 7.67779 12.0615 7.5857 11.9586L4.25237 8.23278C4.06824 8.02698 4.08582 7.71088 4.29162 7.52676C4.49742 7.34264 4.81351 7.36021 4.99763 7.56601L7.45833 10.3164V2.375C7.45833 2.09886 7.68219 1.875 7.95833 1.875ZM2.5 14.0001C2.5 13.724 2.72386 13.5001 3 13.5001H13C13.2761 13.5001 13.5 13.724 13.5 14.0001C13.5 14.2763 13.2761 14.5001 13 14.5001H3C2.72386 14.5001 2.5 14.2763 2.5 14.0001Z",
21
- fill: "currentColor"
22
- })));
23
- };
@@ -1,22 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.IconArrowBarDown = void 0;
7
- var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
- var _ArrowBarDown = /*#__PURE__*/require("../Icon.assets/ArrowBarDown");
9
- var _IconRoot = /*#__PURE__*/require("../IconRoot");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- var IconArrowBarDown = exports.IconArrowBarDown = function IconArrowBarDown(_ref) {
12
- var _ref$size = _ref.size,
13
- size = _ref$size === void 0 ? 'xs' : _ref$size,
14
- color = _ref.color,
15
- className = _ref.className;
16
- return /*#__PURE__*/_react["default"].createElement(_IconRoot.IconRoot, {
17
- className: className,
18
- size: size,
19
- color: color,
20
- icon: _ArrowBarDown.ArrowBarDown
21
- });
22
- };