@salutejs/plasma-new-hope 0.181.0 → 0.181.1-canary.1525.11611277098.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (20) hide show
  1. package/cjs/components/Attach/components/AttachButton/AttachButton.js +1 -11
  2. package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  3. package/emotion/cjs/components/Attach/components/AttachButton/AttachButton.js +1 -11
  4. package/emotion/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +0 -1
  5. package/emotion/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +0 -1
  6. package/emotion/es/components/Attach/components/AttachButton/AttachButton.js +1 -11
  7. package/emotion/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +0 -1
  8. package/emotion/es/examples/plasma_web/components/Attach/Attach.stories.tsx +0 -1
  9. package/es/components/Attach/components/AttachButton/AttachButton.js +1 -11
  10. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  11. package/package.json +2 -2
  12. package/styled-components/cjs/components/Attach/components/AttachButton/AttachButton.js +1 -11
  13. package/styled-components/cjs/examples/plasma_b2c/components/Attach/Attach.stories.tsx +0 -1
  14. package/styled-components/cjs/examples/plasma_web/components/Attach/Attach.stories.tsx +0 -1
  15. package/styled-components/es/components/Attach/components/AttachButton/AttachButton.js +1 -11
  16. package/styled-components/es/examples/plasma_b2c/components/Attach/Attach.stories.tsx +0 -1
  17. package/styled-components/es/examples/plasma_web/components/Attach/Attach.stories.tsx +0 -1
  18. package/types/components/Attach/components/AttachButton/AttachButton.d.ts.map +1 -1
  19. package/types/components/Button/Button.types.d.ts +2 -0
  20. package/types/components/Button/Button.types.d.ts.map +1 -1
@@ -11,17 +11,7 @@ var IconPlus = require('../../../_Icon/Icons/IconPlus.js');
11
11
  var _excluded = ["size", "icon"],
12
12
  _excluded2 = ["text"];
13
13
  var getDefaultIcon = function getDefaultIcon(size) {
14
- var iconSize;
15
- switch (size) {
16
- case 'xs':
17
- iconSize = 'xs';
18
- break;
19
- case 's':
20
- iconSize = 's';
21
- break;
22
- default:
23
- iconSize = 'm';
24
- }
14
+ var iconSize = size === 'xs' ? 'xs' : 's';
25
15
  return /*#__PURE__*/React.createElement(IconPlus.IconPlus, {
26
16
  size: iconSize,
27
17
  color: "inherit"
@@ -1 +1 @@
1
- {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;AACtC,EAAA,IAAIC,QAA0B,CAAA;AAC9B,EAAA,QAAQD,IAAI;AACR,IAAA,KAAK,IAAI;AACLC,MAAAA,QAAQ,GAAG,IAAI,CAAA;AACf,MAAA,MAAA;AACJ,IAAA,KAAK,GAAG;AACJA,MAAAA,QAAQ,GAAG,GAAG,CAAA;AACd,MAAA,MAAA;AACJ,IAAA;AACIA,MAAAA,QAAQ,GAAG,GAAG,CAAA;AACtB,GAAA;AACA,EAAA,oBAAOC,KAAA,CAAAC,aAAA,CAACC,iBAAQ,EAAA;AAACJ,IAAAA,IAAI,EAAEC,QAAS;AAACI,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAEM,IAAMC,YAAY,gBAAGC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzF,EAAA,IAAID,KAAK,CAACE,UAAU,KAAK,YAAY,EAAE;AACnC,IAAA,IAAQV,IAAI,GAAoBQ,KAAK,CAA7BR,IAAI;MAAEW,IAAI,GAAcH,KAAK,CAAvBG,IAAI;AAAKC,MAAAA,KAAI,GAAAC,iDAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;AAErC,IAAA,oBACIZ,KAAA,CAAAC,aAAA,CAACY,kCAAgB,EAAAC,iCAAA,CAAA;AAACP,MAAAA,GAAG,EAAEA,GAAAA;KAASG,EAAAA,KAAI,GAC/BD,IAAI,IAAIZ,cAAc,CAACC,IAAI,CACd,CAAC,CAAA;AAE3B,GAAA;AAEA,EAAA,IAAAiB,WAAA,GAA6CT,KAAK,CAA1CU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,WAAA;AAAKL,IAAAA,IAAI,GAAAC,iDAAA,CAAKL,KAAK,EAAAW,UAAA,CAAA,CAAA;AAClD,EAAA,oBAAOjB,KAAA,CAAAC,aAAA,CAACiB,0BAAY,EAAAJ,iCAAA,CAAA;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACS,IAAAA,IAAI,EAAEA,IAAAA;GAAUN,EAAAA,IAAI,CAAG,CAAC,CAAA;AAC3D,CAAC;;;;"}
1
+ {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;EACtC,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAC3C,EAAA,oBAAOE,KAAA,CAAAC,aAAA,CAACC,iBAAQ,EAAA;AAACJ,IAAAA,IAAI,EAAEC,QAAS;AAACI,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAEM,IAAMC,YAAY,gBAAGC,gBAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzF,EAAA,IAAID,KAAK,CAACE,UAAU,KAAK,YAAY,EAAE;AACnC,IAAA,IAAQV,IAAI,GAAoBQ,KAAK,CAA7BR,IAAI;MAAEW,IAAI,GAAcH,KAAK,CAAvBG,IAAI;AAAKC,MAAAA,KAAI,GAAAC,iDAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;AAErC,IAAA,oBACIZ,KAAA,CAAAC,aAAA,CAACY,kCAAgB,EAAAC,iCAAA,CAAA;AAACP,MAAAA,GAAG,EAAEA,GAAAA;KAASG,EAAAA,KAAI,GAC/BD,IAAI,IAAIZ,cAAc,CAACC,IAAI,CACd,CAAC,CAAA;AAE3B,GAAA;AAEA,EAAA,IAAAiB,WAAA,GAA6CT,KAAK,CAA1CU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,WAAA;AAAKL,IAAAA,IAAI,GAAAC,iDAAA,CAAKL,KAAK,EAAAW,UAAA,CAAA,CAAA;AAClD,EAAA,oBAAOjB,KAAA,CAAAC,aAAA,CAACiB,0BAAY,EAAAJ,iCAAA,CAAA;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACS,IAAAA,IAAI,EAAEA,IAAAA;GAAUN,EAAAA,IAAI,CAAG,CAAC,CAAA;AAC3D,CAAC;;;;"}
@@ -17,17 +17,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
17
17
  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; }
18
18
  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; }
19
19
  var getDefaultIcon = function getDefaultIcon(size) {
20
- var iconSize;
21
- switch (size) {
22
- case 'xs':
23
- iconSize = 'xs';
24
- break;
25
- case 's':
26
- iconSize = 's';
27
- break;
28
- default:
29
- iconSize = 'm';
30
- }
20
+ var iconSize = size === 'xs' ? 'xs' : 's';
31
21
  return /*#__PURE__*/_react["default"].createElement(_Icon.IconPlus, {
32
22
  size: iconSize,
33
23
  color: "inherit"
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -8,17 +8,7 @@ import { StyledIconButton } from '../../ui/IconButton/IconButton';
8
8
  import { StyledButton } from '../../ui/Button/Button';
9
9
  import { IconPlus } from '../../../_Icon';
10
10
  var getDefaultIcon = function getDefaultIcon(size) {
11
- var iconSize;
12
- switch (size) {
13
- case 'xs':
14
- iconSize = 'xs';
15
- break;
16
- case 's':
17
- iconSize = 's';
18
- break;
19
- default:
20
- iconSize = 'm';
21
- }
11
+ var iconSize = size === 'xs' ? 'xs' : 's';
22
12
  return /*#__PURE__*/React.createElement(IconPlus, {
23
13
  size: iconSize,
24
14
  color: "inherit"
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -7,17 +7,7 @@ import { IconPlus } from '../../../_Icon/Icons/IconPlus.js';
7
7
  var _excluded = ["size", "icon"],
8
8
  _excluded2 = ["text"];
9
9
  var getDefaultIcon = function getDefaultIcon(size) {
10
- var iconSize;
11
- switch (size) {
12
- case 'xs':
13
- iconSize = 'xs';
14
- break;
15
- case 's':
16
- iconSize = 's';
17
- break;
18
- default:
19
- iconSize = 'm';
20
- }
10
+ var iconSize = size === 'xs' ? 'xs' : 's';
21
11
  return /*#__PURE__*/React.createElement(IconPlus, {
22
12
  size: iconSize,
23
13
  color: "inherit"
@@ -1 +1 @@
1
- {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n let iconSize: 'xs' | 's' | 'm';\n switch (size) {\n case 'xs':\n iconSize = 'xs';\n break;\n case 's':\n iconSize = 's';\n break;\n default:\n iconSize = 'm';\n }\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;AACtC,EAAA,IAAIC,QAA0B,CAAA;AAC9B,EAAA,QAAQD,IAAI;AACR,IAAA,KAAK,IAAI;AACLC,MAAAA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AC3D,CAAC;;;;"}
1
+ {"version":3,"file":"AttachButton.js","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AttachButtonProps } from '../../Attach.types';\nimport { StyledIconButton } from '../../ui/IconButton/IconButton';\nimport { StyledButton } from '../../ui/Button/Button';\nimport { IconPlus } from '../../../_Icon';\n\nconst getDefaultIcon = (size?: string) => {\n const iconSize = size === 'xs' ? 'xs' : 's';\n return <IconPlus size={iconSize} color=\"inherit\" />;\n};\n\nexport const AttachButton = forwardRef<HTMLButtonElement, AttachButtonProps>((props, ref) => {\n if (props.buttonType === 'iconButton') {\n const { size, icon, ...rest } = props;\n\n return (\n <StyledIconButton ref={ref} {...rest}>\n {icon || getDefaultIcon(size)}\n </StyledIconButton>\n );\n }\n\n const { text = 'Загрузить файл', ...rest } = props;\n return <StyledButton ref={ref} text={text} {...rest} />;\n});\n"],"names":["getDefaultIcon","size","iconSize","React","createElement","IconPlus","color","AttachButton","forwardRef","props","ref","buttonType","icon","rest","_objectWithoutProperties","_excluded","StyledIconButton","_extends","_props$text","text","_excluded2","StyledButton"],"mappings":";;;;;;;;AAOA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;EACtC,IAAMC,QAAQ,GAAGD,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,GAAG,CAAA;AAC3C,EAAA,oBAAOE,KAAA,CAAAC,aAAA,CAACC,QAAQ,EAAA;AAACJ,IAAAA,IAAI,EAAEC,QAAS;AAACI,IAAAA,KAAK,EAAC,SAAA;AAAS,GAAE,CAAC,CAAA;AACvD,CAAC,CAAA;AAEM,IAAMC,YAAY,gBAAGC,UAAU,CAAuC,UAACC,KAAK,EAAEC,GAAG,EAAK;AACzF,EAAA,IAAID,KAAK,CAACE,UAAU,KAAK,YAAY,EAAE;AACnC,IAAA,IAAQV,IAAI,GAAoBQ,KAAK,CAA7BR,IAAI;MAAEW,IAAI,GAAcH,KAAK,CAAvBG,IAAI;AAAKC,MAAAA,KAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAM,SAAA,CAAA,CAAA;AAErC,IAAA,oBACIZ,KAAA,CAAAC,aAAA,CAACY,gBAAgB,EAAAC,QAAA,CAAA;AAACP,MAAAA,GAAG,EAAEA,GAAAA;KAASG,EAAAA,KAAI,GAC/BD,IAAI,IAAIZ,cAAc,CAACC,IAAI,CACd,CAAC,CAAA;AAE3B,GAAA;AAEA,EAAA,IAAAiB,WAAA,GAA6CT,KAAK,CAA1CU,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,gBAAgB,GAAAA,WAAA;AAAKL,IAAAA,IAAI,GAAAC,wBAAA,CAAKL,KAAK,EAAAW,UAAA,CAAA,CAAA;AAClD,EAAA,oBAAOjB,KAAA,CAAAC,aAAA,CAACiB,YAAY,EAAAJ,QAAA,CAAA;AAACP,IAAAA,GAAG,EAAEA,GAAI;AAACS,IAAAA,IAAI,EAAEA,IAAAA;GAAUN,EAAAA,IAAI,CAAG,CAAC,CAAA;AAC3D,CAAC;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.181.0",
3
+ "version": "0.181.1-canary.1525.11611277098.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": "4622d6893e74d77dfdea9071544eec324db6d553"
131
+ "gitHead": "01f15e8f92ac74f5c71d9d62401418eca7bb039c"
132
132
  }
@@ -17,17 +17,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
17
17
  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; }
18
18
  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; }
19
19
  var getDefaultIcon = function getDefaultIcon(size) {
20
- var iconSize;
21
- switch (size) {
22
- case 'xs':
23
- iconSize = 'xs';
24
- break;
25
- case 's':
26
- iconSize = 's';
27
- break;
28
- default:
29
- iconSize = 'm';
30
- }
20
+ var iconSize = size === 'xs' ? 'xs' : 's';
31
21
  return /*#__PURE__*/_react["default"].createElement(_Icon.IconPlus, {
32
22
  size: iconSize,
33
23
  color: "inherit"
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -8,17 +8,7 @@ import { StyledIconButton } from '../../ui/IconButton/IconButton';
8
8
  import { StyledButton } from '../../ui/Button/Button';
9
9
  import { IconPlus } from '../../../_Icon';
10
10
  var getDefaultIcon = function getDefaultIcon(size) {
11
- var iconSize;
12
- switch (size) {
13
- case 'xs':
14
- iconSize = 'xs';
15
- break;
16
- case 's':
17
- iconSize = 's';
18
- break;
19
- default:
20
- iconSize = 'm';
21
- }
11
+ var iconSize = size === 'xs' ? 'xs' : 's';
22
12
  return /*#__PURE__*/React.createElement(IconPlus, {
23
13
  size: iconSize,
24
14
  color: "inherit"
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -81,7 +81,6 @@ export const Button: StoryObj<StoryAttachProps> = {
81
81
  width: '400px',
82
82
  buttonText: 'Загрузить файл',
83
83
  buttonValue: '',
84
- square: false,
85
84
  enableContentLeft: false,
86
85
  enableContentRight: false,
87
86
  size: 'm',
@@ -1 +1 @@
1
- {"version":3,"file":"AttachButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAoBvD,eAAO,MAAM,YAAY,6FAavB,CAAC"}
1
+ {"version":3,"file":"AttachButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/Attach/components/AttachButton/AttachButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAUvD,eAAO,MAAM,YAAY,6FAavB,CAAC"}
@@ -66,6 +66,8 @@ declare type CustomButtonProps = {
66
66
  stretching?: Stretching;
67
67
  /**
68
68
  * Кнопка принимает соотношение сторон 1:1
69
+ * @deprecated
70
+ * Использовать для этого случая IconButton
69
71
  */
70
72
  square?: boolean;
71
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Button.types.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAA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