@consta/uikit 5.15.0 → 5.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/StepsCanary/index.d.ts +1 -0
  2. package/StepsCanary/index.js +1 -0
  3. package/__internal__/src/components/Attachment/Attachment.css +1 -1
  4. package/__internal__/src/components/Attachment/Attachment.js +1 -1
  5. package/__internal__/src/components/Attachment/Attachment.js.map +1 -1
  6. package/__internal__/src/components/Attachment/types.d.ts +23 -4
  7. package/__internal__/src/components/Attachment/types.js.map +1 -1
  8. package/__internal__/src/components/AutoComplete/helpers.d.ts +1 -1
  9. package/__internal__/src/components/AutoCompleteCanary/helpers.d.ts +1 -1
  10. package/__internal__/src/components/AvatarGroup/helpers.d.ts +6 -6
  11. package/__internal__/src/components/Badge/Badge.css +3 -1
  12. package/__internal__/src/components/Badge/Badge.js +1 -1
  13. package/__internal__/src/components/Badge/Badge.js.map +1 -1
  14. package/__internal__/src/components/BadgeGroup/helper.d.ts +2 -2
  15. package/__internal__/src/components/BookmarkTabs/helper.d.ts +6 -6
  16. package/__internal__/src/components/Breadcrumbs/helpers.d.ts +6 -6
  17. package/__internal__/src/components/Button/Button.css +1 -1
  18. package/__internal__/src/components/Button/Button.js +1 -1
  19. package/__internal__/src/components/Button/Button.js.map +1 -1
  20. package/__internal__/src/components/CheckboxGroup/helper.d.ts +6 -6
  21. package/__internal__/src/components/Chips/helpers.d.ts +2 -2
  22. package/__internal__/src/components/ChoiceGroup/Item/ChoiceGroup-Item.d.ts +2 -2
  23. package/__internal__/src/components/ChoiceGroup/helper.d.ts +7 -7
  24. package/__internal__/src/components/CollapseGroup/helpers.d.ts +10 -10
  25. package/__internal__/src/components/Combobox/helpers.d.ts +3 -3
  26. package/__internal__/src/components/ComboboxDeprecated/helpers.d.ts +3 -3
  27. package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
  28. package/__internal__/src/components/ContextMenu/helpers.d.ts +4 -4
  29. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +4 -4
  30. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +1 -1
  31. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +4 -4
  32. package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -1
  33. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +4 -4
  34. package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +1 -1
  35. package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +4 -4
  36. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +4 -4
  37. package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +1 -1
  38. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
  39. package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
  40. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
  41. package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
  42. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
  43. package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
  44. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
  45. package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
  46. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js +1 -1
  47. package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js.map +1 -1
  48. package/__internal__/src/components/DatePicker/timeForMap.d.ts +2 -0
  49. package/__internal__/src/components/DatePicker/timeForMap.js +2 -0
  50. package/__internal__/src/components/DatePicker/timeForMap.js.map +1 -0
  51. package/__internal__/src/components/DateTime/DateTimeItem/DateTimeItem.d.ts +1 -1
  52. package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.d.ts +2 -1
  53. package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.js +1 -1
  54. package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.js.map +1 -1
  55. package/__internal__/src/components/DragNDropField/DragNDropField.d.ts +1 -1
  56. package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldCanary.d.ts +1 -1
  57. package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.d.ts +2 -2
  58. package/__internal__/src/components/FieldComponents/FieldButton/FieldButton.d.ts +1 -1
  59. package/__internal__/src/components/FieldComponents/FieldClearButton/FieldClearButton.d.ts +1 -1
  60. package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.d.ts +1 -1
  61. package/__internal__/src/components/FieldComponents/FieldCounter/FieldCounter.d.ts +1 -1
  62. package/__internal__/src/components/FieldComponents/FieldIcon/FieldIcon.d.ts +1 -1
  63. package/__internal__/src/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
  64. package/__internal__/src/components/FieldComponents/FieldToggleVisiblePasswordButton/FieldToggleVisiblePasswordButton.d.ts +1 -1
  65. package/__internal__/src/components/FieldGroup/FieldGroup.d.ts +1 -1
  66. package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.d.ts +1 -1
  67. package/__internal__/src/components/ListCanary/ListBox/ListBox.d.ts +1 -1
  68. package/__internal__/src/components/ListCanary/ListDivider/ListDivider.d.ts +1 -1
  69. package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.d.ts +1 -1
  70. package/__internal__/src/components/ListCanary/ListLoader/ListLoader.d.ts +1 -1
  71. package/__internal__/src/components/ListCanary/helper.d.ts +1 -1
  72. package/__internal__/src/components/Loader/Loader.css +1 -3
  73. package/__internal__/src/components/Loader/Loader.d.ts +6 -2
  74. package/__internal__/src/components/Loader/Loader.js +1 -1
  75. package/__internal__/src/components/Loader/Loader.js.map +1 -1
  76. package/__internal__/src/components/Loader/types.d.ts +6 -4
  77. package/__internal__/src/components/Loader/types.js +1 -1
  78. package/__internal__/src/components/Loader/types.js.map +1 -1
  79. package/__internal__/src/components/Modal/Modal.js.map +1 -1
  80. package/__internal__/src/components/Pagination/PaginationArrow/PaginationArrow.d.ts +2 -2
  81. package/__internal__/src/components/Pagination/PaginationNumberInput/PaginationNumberInput.d.ts +2 -2
  82. package/__internal__/src/components/Picture/Picture.d.ts +1 -1
  83. package/__internal__/src/components/Popover/Popover.d.ts +1 -1
  84. package/__internal__/src/components/Popover/Popover.js.map +1 -1
  85. package/__internal__/src/components/ProgressLine/helpers.d.ts +5 -5
  86. package/__internal__/src/components/ProgressStepBar/helpers.d.ts +2 -2
  87. package/__internal__/src/components/RadioGroup/helper.d.ts +6 -6
  88. package/__internal__/src/components/Responses/Responses.d.ts +1 -1
  89. package/__internal__/src/components/Select/helpers.d.ts +3 -3
  90. package/__internal__/src/components/SelectComponents/SelectContainer/SelectContainer.d.ts +1 -1
  91. package/__internal__/src/components/SelectComponentsDeprecated/SelectContainer/SelectContainer.d.ts +1 -1
  92. package/__internal__/src/components/SelectDeprecated/helpers.d.ts +3 -3
  93. package/__internal__/src/components/SnackBar/helper.d.ts +5 -5
  94. package/__internal__/src/components/Steps/helper.d.ts +5 -5
  95. package/__internal__/src/components/StepsCanary/Steps.css +1 -0
  96. package/__internal__/src/components/StepsCanary/StepsCanary.d.ts +5 -0
  97. package/__internal__/src/components/StepsCanary/StepsCanary.js +2 -0
  98. package/__internal__/src/components/StepsCanary/StepsCanary.js.map +1 -0
  99. package/__internal__/src/components/StepsCanary/StepsItem/StepsItem.css +1 -0
  100. package/__internal__/src/components/StepsCanary/StepsItem/StepsItem.d.ts +21 -0
  101. package/__internal__/src/components/StepsCanary/StepsItem/StepsItem.js +2 -0
  102. package/__internal__/src/components/StepsCanary/StepsItem/StepsItem.js.map +1 -0
  103. package/__internal__/src/components/StepsCanary/StepsItem/index.d.ts +1 -0
  104. package/__internal__/src/components/StepsCanary/StepsItem/index.js +2 -0
  105. package/__internal__/src/components/StepsCanary/StepsItem/index.js.map +1 -0
  106. package/__internal__/src/components/StepsCanary/helper.d.ts +273 -0
  107. package/__internal__/src/components/StepsCanary/helper.js +2 -0
  108. package/__internal__/src/components/StepsCanary/helper.js.map +1 -0
  109. package/__internal__/src/components/StepsCanary/index.d.ts +1 -0
  110. package/__internal__/src/components/StepsCanary/index.js +2 -0
  111. package/__internal__/src/components/StepsCanary/index.js.map +1 -0
  112. package/__internal__/src/components/StepsCanary/types.d.ts +40 -0
  113. package/__internal__/src/components/StepsCanary/types.js +2 -0
  114. package/__internal__/src/components/StepsCanary/types.js.map +1 -0
  115. package/__internal__/src/components/Switch/Switch.d.ts +2 -2
  116. package/__internal__/src/components/SwitchGroup/helpers.d.ts +6 -6
  117. package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
  118. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js +1 -1
  119. package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js.map +1 -1
  120. package/__internal__/src/components/Tabs/helpers.d.ts +21 -21
  121. package/__internal__/src/components/Tag/Tag.d.ts +1 -0
  122. package/__internal__/src/components/Tag/Tag.js.map +1 -1
  123. package/__internal__/src/components/TagBase/TagBase.css +1 -1
  124. package/__internal__/src/components/TagBase/TagBase.d.ts +3 -1
  125. package/__internal__/src/components/TagBase/TagBase.js +1 -1
  126. package/__internal__/src/components/TagBase/TagBase.js.map +1 -1
  127. package/__internal__/src/components/ThemeToggler/helpers.d.ts +7 -7
  128. package/__internal__/src/components/Timer/Timer.d.ts +1 -1
  129. package/__internal__/src/components/Tooltip/Tooltip.d.ts +1 -1
  130. package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +1 -1
  131. package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.d.ts +1 -1
  132. package/__internal__/src/components/UserSelect/helpers.d.ts +2 -2
  133. package/__internal__/src/components/UserSelectDeprecated/helpers.d.ts +2 -2
  134. package/__internal__/src/fileIcons/FileIcon/FileIcon.d.ts +1 -1
  135. package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
  136. package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +1 -1
  137. package/__internal__/src/hooks/useClickOutside/useClickOutside.js.map +1 -1
  138. package/__internal__/src/hooks/useScrollElements/useScrollElements.d.ts +1 -1
  139. package/__internal__/src/hooks/useScrollElements/useScrollElements.js +1 -1
  140. package/__internal__/src/hooks/useScrollElements/useScrollElements.js.map +1 -1
  141. package/__internal__/src/uiKit/components/ThemePreview/helpers.d.ts +7 -7
  142. package/__internal__/src/uiKit/components/ThemePreview/helpers.js +1 -1
  143. package/__internal__/src/uiKit/components/ThemePreview/helpers.js.map +1 -1
  144. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ export * from "../__internal__/src/components/StepsCanary";
@@ -0,0 +1 @@
1
+ export * from "../__internal__/src/components/StepsCanary";
@@ -1 +1 @@
1
- .Attachment{background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;display:flex;flex-direction:row;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.Attachment-File{flex:none;margin-right:var(--space-xs);transition:opacity .2s}.Attachment-File_error{opacity:.4}.Attachment-Button{flex:none;opacity:0;transition:opacity .2s ease}.Attachment-Content{word-wrap:break-word;flex:1;overflow:hidden}.Attachment-Content>.Text:not(:first-child){margin-top:var(--space-2xs)}.Attachment-Content:not(:last-child){margin-right:var(--space-xs)}.Attachment_withAction{cursor:pointer}.Attachment_withAction:hover{background:var(--color-control-bg-clear-hover)}.Attachment_withOnButtonAction:hover .Attachment_withOnButtonAction-Button{opacity:1}.Attachment_withOnButtonAction:hover{background:var(--color-control-bg-clear-hover)}.Attachment_withOnButtonAction:hover .Attachment-Button{opacity:1}
1
+ .Attachment{--attachment-file-opacity:1;--attachment-actions-opacity:0;background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;padding:var(--space-xs);text-decoration:none;transition:background-color .2s ease;width:100%}.Attachment_hoverEffect:hover{--attachment-actions-opacity:1;background:var(--color-control-bg-clear-hover)}.Attachment_cursor_pointer{cursor:pointer}.Attachment_error{--attachment-file-opacity:0.4}.Attachment-Actions,.Attachment-File{flex:none;transition:opacity .2s ease}.Attachment-File{opacity:var(--attachment-file-opacity)}.Attachment-Actions{opacity:var(--attachment-actions-opacity)}.Attachment-Content{flex:1;overflow:hidden}.Attachment-ErrorText,.Attachment-FileDescription,.Attachment-FileName,.Attachment-LoadingText{word-wrap:break-word;width:100%}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","as","fileExtension","withPictogram","loading","fileName","buttonIcon","onButtonClick","errorText","loadingText","loadingProgress","fileDescription","size","onClick","withAction","buttonTitle"];import"./Attachment.css";import React from"react";import{Button}from"../Button";import{File}from"../File";import{Text}from"../Text";import{cn}from"../../utils/bem";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{attachmentPropSizeDefault}from"./types";var cnAttachment=cn("Attachment"),fileSizeMap={xs:"s",s:"s",m:"m"},textSizeMap={xs:"xs",s:"s",m:"s"},descriptionSizeMap={xs:"xs",s:"xs",m:"s"},Attachment=forwardRefWithAs(function(a,b){var c=a.className,d=a.as,e=void 0===d?"div":d,f=a.fileExtension,g=a.withPictogram,h=a.loading,i=a.fileName,j=a.buttonIcon,k=a.onButtonClick,l=a.errorText,m=a.loadingText,n=void 0===m?"Loading":m,o=a.loadingProgress,p=a.fileDescription,q=a.size,r=void 0===q?attachmentPropSizeDefault:q,s=a.onClick,t=a.withAction,u=a.buttonTitle,v=_objectWithoutProperties(a,_excluded),w=!!k;return React.createElement(e,Object.assign({},v,{onClick:s,className:cnAttachment({withAction:t||!!s,withOnButtonAction:w,size:r},[c]),ref:b}),g&&React.createElement(File,{className:cnAttachment("File",{error:!!l}),extension:f,loading:h,loadingWithProgressSpin:!0,loadingProgress:o,size:fileSizeMap[r]}),React.createElement("div",{className:cnAttachment("Content")},i&&React.createElement(Text,{className:cnAttachment("FileName"),size:textSizeMap[r],view:"primary",lineHeight:"xs"},i),p&&!h&&React.createElement(Text,{className:cnAttachment("FileDescription"),size:descriptionSizeMap[r],lineHeight:"xs",view:"ghost"},p),n&&h&&React.createElement(Text,{className:cnAttachment("LoadingText"),size:descriptionSizeMap[r],lineHeight:"xs",view:"ghost"},o?"".concat(n," ").concat(o,"%"):"".concat(n,"...")),l&&React.createElement(Text,{className:cnAttachment("ErrorText"),size:descriptionSizeMap[r],lineHeight:"xs",view:"alert"},l)),w&&React.createElement(Button,{className:cnAttachment("Button"),as:"span",onlyIcon:!0,iconLeft:j,onClick:k,title:u,size:"xs",view:"clear"}))});export{Attachment,cnAttachment};
1
+ import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","as","fileExtension","withPictogram","loading","fileName","errorText","loadingText","loadingProgress","fileDescription","size","onClick","actions","buttonTitle","buttonIcon","onButtonClick"];import"./Attachment.css";import React from"react";import{Button}from"../Button";import{File}from"../File";import{Text}from"../Text";import{cnMixFlex}from"../../mixs/MixFlex";import{cn}from"../../utils/bem";import{isDefined}from"../../utils/type-guards";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{attachmentPropSizeDefault}from"./types";var cnAttachment=cn("Attachment"),fileSizeMap={xs:"s",s:"s",m:"m"},textSizeMap={xs:"xs",s:"s",m:"s"},descriptionSizeMap={xs:"xs",s:"xs",m:"s"},Attachment=forwardRefWithAs(function(a,b){var c=a.className,d=a.as,e=void 0===d?"div":d,f=a.fileExtension,g=a.withPictogram,h=a.loading,i=a.fileName,j=a.errorText,k=a.loadingText,l=void 0===k?"Loading":k,m=a.loadingProgress,n=a.fileDescription,o=a.size,p=void 0===o?attachmentPropSizeDefault:o,q=a.onClick,r=a.actions,s=void 0===r?[]:r,t=a.buttonTitle,u=a.buttonIcon,v=a.onButtonClick,w=_objectWithoutProperties(a,_excluded),x=[v&&u?{onClick:v,icon:u,title:t}:void 0].concat(_toConsumableArray(s)).filter(isDefined),y=!(!(null!==x&&void 0!==x)||!x.length);return React.createElement(e,Object.assign({},w,{onClick:q,className:cnAttachment({size:p,hoverEffect:!!((null===x||void 0===x?void 0:x.length)||q),cursor:q?"pointer":void 0,withActions:y,error:!!j},[cnMixFlex({flex:"flex",gap:"xs"}),c]),ref:b}),g&&React.createElement(File,{className:cnAttachment("File"),extension:f,loading:h,loadingWithProgressSpin:!0,loadingProgress:m,size:fileSizeMap[p]}),React.createElement("div",{className:cnAttachment("Content",[cnMixFlex({flex:"flex",direction:"column",gap:"2xs"})])},i&&React.createElement(Text,{className:cnAttachment("FileName"),size:textSizeMap[p],view:"primary",lineHeight:"xs"},i),n&&!h&&React.createElement(Text,{className:cnAttachment("FileDescription"),size:descriptionSizeMap[p],lineHeight:"xs",view:"ghost"},n),l&&h&&React.createElement(Text,{className:cnAttachment("LoadingText"),size:descriptionSizeMap[p],lineHeight:"xs",view:"ghost"},m?"".concat(l," ").concat(m,"%"):"".concat(l,"...")),j&&React.createElement(Text,{className:cnAttachment("ErrorText"),size:descriptionSizeMap[p],lineHeight:"xs",view:"alert"},j)),y&&React.createElement("div",{className:cnAttachment("Actions",[cnMixFlex({flex:"flex",gap:"xs"})])},x.map(function(a){return React.createElement(Button,{className:cnAttachment("Button"),tabIndex:-1,onlyIcon:!0,iconLeft:a.icon,onClick:a.onClick,title:a.title,ref:a.ref,size:"xs",view:"clear"})})))});export{Attachment,cnAttachment};
2
2
  //# sourceMappingURL=Attachment.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Attachment.js","names":["React","Button","File","Text","cn","forwardRefWithAs","attachmentPropSizeDefault","cnAttachment","fileSizeMap","xs","s","m","textSizeMap","descriptionSizeMap","Attachment","props","ref","className","as","fileExtension","withPictogram","loading","fileName","buttonIcon","onButtonClick","errorText","loadingText","loadingProgress","fileDescription","size","onClick","withActionProp","withAction","buttonTitle","otherProps","withOnButtonAction","error"],"sources":["../../../../../src/components/Attachment/Attachment.tsx"],"sourcesContent":["import './Attachment.css';\n\nimport React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { File } from '##/components/File';\nimport { Text, TextPropSize } from '##/components/Text';\nimport { FileIconPropSize } from '##/fileIcons/FileIcon/FileIcon';\nimport { cn } from '##/utils/bem';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport {\n AttachmentProps,\n AttachmentPropSize,\n attachmentPropSizeDefault,\n} from './types';\n\nconst cnAttachment = cn('Attachment');\n\nconst fileSizeMap: Record<AttachmentPropSize, FileIconPropSize> = {\n xs: 's',\n s: 's',\n m: 'm',\n};\n\nconst textSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n};\n\nconst descriptionSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n};\n\nconst Attachment = forwardRefWithAs<AttachmentProps>((props, ref) => {\n const {\n className,\n as = 'div',\n fileExtension,\n withPictogram,\n loading,\n fileName,\n buttonIcon,\n onButtonClick,\n errorText,\n loadingText = 'Loading',\n loadingProgress,\n fileDescription,\n size = attachmentPropSizeDefault,\n onClick,\n withAction: withActionProp,\n buttonTitle,\n ...otherProps\n } = props;\n const Tag = as as string;\n const withAction = withActionProp || Boolean(onClick);\n const withOnButtonAction = Boolean(onButtonClick);\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick}\n className={cnAttachment({ withAction, withOnButtonAction, size }, [\n className,\n ])}\n ref={ref}\n >\n {withPictogram && (\n <File\n className={cnAttachment('File', { error: Boolean(errorText) })}\n extension={fileExtension}\n loading={loading}\n loadingWithProgressSpin\n loadingProgress={loadingProgress}\n size={fileSizeMap[size]}\n />\n )}\n <div className={cnAttachment('Content')}>\n {fileName && (\n <Text\n className={cnAttachment('FileName')}\n size={textSizeMap[size]}\n view=\"primary\"\n lineHeight=\"xs\"\n >\n {fileName}\n </Text>\n )}\n {fileDescription && !loading && (\n <Text\n className={cnAttachment('FileDescription')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {fileDescription}\n </Text>\n )}\n {loadingText && loading && (\n <Text\n className={cnAttachment('LoadingText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {loadingProgress\n ? `${loadingText} ${loadingProgress}%`\n : `${loadingText}...`}\n </Text>\n )}\n {errorText && (\n <Text\n className={cnAttachment('ErrorText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"alert\"\n >\n {errorText}\n </Text>\n )}\n </div>\n {withOnButtonAction && (\n <Button\n className={cnAttachment('Button')}\n as=\"span\"\n onlyIcon\n iconLeft={buttonIcon}\n onClick={onButtonClick}\n title={buttonTitle}\n size=\"xs\"\n view=\"clear\"\n />\n )}\n </Tag>\n );\n});\n\nexport { Attachment, cnAttachment };\n"],"mappings":"kTAAA,yBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,IAAT,eACA,OAASC,IAAT,eAEA,OAASC,EAAT,uBACA,OAASC,gBAAT,+CAEA,OAGEC,yBAHF,e,GAMMC,aAAY,CAAGH,EAAE,CAAC,YAAD,C,CAEjBI,WAAyD,CAAG,CAChEC,EAAE,CAAE,GAD4D,CAEhEC,CAAC,CAAE,GAF6D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,oBAAC,IAAD,EACE,SAAS,CAAElB,YAAY,CAAC,WAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACgB,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGJ,CANH,CAlCJ,CAlBF,CA8DGU,CAAkB,EACjB,oBAAC,MAAD,EACE,SAAS,CAAE5B,YAAY,CAAC,QAAD,CADzB,CAEE,EAAE,CAAC,MAFL,CAGE,QAAQ,GAHV,CAIE,QAAQ,CAAEgB,CAJZ,CAKE,OAAO,CAAEC,CALX,CAME,KAAK,CAAES,CANT,CAOE,IAAI,CAAC,IAPP,CAQE,IAAI,CAAC,OARP,EA/DJ,CA4EH,CArGkC,C,CAuGnC,OAASnB,UAAT,CAAqBP,YAArB"}
1
+ {"version":3,"file":"Attachment.js","names":["React","Button","File","Text","cnMixFlex","cn","isDefined","forwardRefWithAs","attachmentPropSizeDefault","cnAttachment","fileSizeMap","xs","s","m","textSizeMap","descriptionSizeMap","Attachment","props","ref","className","as","fileExtension","withPictogram","loading","fileName","errorText","loadingText","loadingProgress","fileDescription","size","onClick","actions","actionsProp","buttonTitle","buttonIcon","onButtonClick","otherProps","icon","title","filter","withActions","length","hoverEffect","cursor","error","flex","gap","direction","map","action"],"sources":["../../../../../src/components/Attachment/Attachment.tsx"],"sourcesContent":["import './Attachment.css';\n\nimport React from 'react';\n\nimport { Button } from '##/components/Button';\nimport { File } from '##/components/File';\nimport { Text, TextPropSize } from '##/components/Text';\nimport { FileIconPropSize } from '##/fileIcons/FileIcon/FileIcon';\nimport { cnMixFlex } from '##/mixs/MixFlex';\nimport { cn } from '##/utils/bem';\nimport { isDefined } from '##/utils/type-guards';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport {\n AttachmentActions,\n AttachmentProps,\n AttachmentPropSize,\n attachmentPropSizeDefault,\n} from './types';\n\nconst cnAttachment = cn('Attachment');\n\nconst fileSizeMap: Record<AttachmentPropSize, FileIconPropSize> = {\n xs: 's',\n s: 's',\n m: 'm',\n};\n\nconst textSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 's',\n m: 's',\n};\n\nconst descriptionSizeMap: Record<AttachmentPropSize, TextPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n};\n\nconst Attachment = forwardRefWithAs<AttachmentProps>((props, ref) => {\n const {\n className,\n as = 'div',\n fileExtension,\n withPictogram,\n loading,\n fileName,\n errorText,\n loadingText = 'Loading',\n loadingProgress,\n fileDescription,\n size = attachmentPropSizeDefault,\n onClick,\n actions: actionsProp = [],\n buttonTitle,\n buttonIcon,\n onButtonClick,\n ...otherProps\n } = props;\n const Tag = as as string;\n\n const actions: AttachmentActions[] = [\n onButtonClick && buttonIcon\n ? {\n onClick: onButtonClick,\n icon: buttonIcon,\n title: buttonTitle,\n }\n : undefined,\n ...actionsProp,\n ].filter(isDefined);\n\n const withActions = Boolean(actions?.length);\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick}\n className={cnAttachment(\n {\n size,\n hoverEffect: Boolean(actions?.length || onClick),\n cursor: onClick ? 'pointer' : undefined,\n withActions,\n error: Boolean(errorText),\n },\n [cnMixFlex({ flex: 'flex', gap: 'xs' }), className],\n )}\n ref={ref}\n >\n {withPictogram && (\n <File\n className={cnAttachment('File')}\n extension={fileExtension}\n loading={loading}\n loadingWithProgressSpin\n loadingProgress={loadingProgress}\n size={fileSizeMap[size]}\n />\n )}\n <div\n className={cnAttachment('Content', [\n cnMixFlex({ flex: 'flex', direction: 'column', gap: '2xs' }),\n ])}\n >\n {fileName && (\n <Text\n className={cnAttachment('FileName')}\n size={textSizeMap[size]}\n view=\"primary\"\n lineHeight=\"xs\"\n >\n {fileName}\n </Text>\n )}\n {fileDescription && !loading && (\n <Text\n className={cnAttachment('FileDescription')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {fileDescription}\n </Text>\n )}\n {loadingText && loading && (\n <Text\n className={cnAttachment('LoadingText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"ghost\"\n >\n {loadingProgress\n ? `${loadingText} ${loadingProgress}%`\n : `${loadingText}...`}\n </Text>\n )}\n {errorText && (\n <Text\n className={cnAttachment('ErrorText')}\n size={descriptionSizeMap[size]}\n lineHeight=\"xs\"\n view=\"alert\"\n >\n {errorText}\n </Text>\n )}\n </div>\n {withActions && (\n <div\n className={cnAttachment('Actions', [\n cnMixFlex({ flex: 'flex', gap: 'xs' }),\n ])}\n >\n {actions.map((action) => (\n <Button\n className={cnAttachment('Button')}\n tabIndex={-1}\n onlyIcon\n iconLeft={action.icon}\n onClick={action.onClick}\n title={action.title}\n ref={action.ref}\n size=\"xs\"\n view=\"clear\"\n />\n ))}\n </div>\n )}\n </Tag>\n );\n});\n\nexport { Attachment, cnAttachment };\n"],"mappings":"wXAAA,yBAEA,MAAOA,MAAP,KAAkB,OAAlB,CAEA,OAASC,MAAT,iBACA,OAASC,IAAT,eACA,OAASC,IAAT,eAEA,OAASC,SAAT,0BACA,OAASC,EAAT,uBACA,OAASC,SAAT,+BACA,OAASC,gBAAT,+CAEA,OAIEC,yBAJF,e,GAOMC,aAAY,CAAGJ,EAAE,CAAC,YAAD,C,CAEjBK,WAAyD,CAAG,CAChEC,EAAE,CAAE,GAD4D,CAEhEC,CAAC,CAAE,GAF6D,CAGhEC,CAAC,CAAE,GAH6D,C,CAM5DC,WAAqD,CAAG,CAC5DH,EAAE,CAAE,IADwD,CAE5DC,CAAC,CAAE,GAFyD,CAG5DC,CAAC,CAAE,GAHyD,C,CAMxDE,kBAA4D,CAAG,CACnEJ,EAAE,CAAE,IAD+D,CAEnEC,CAAC,CAAE,IAFgE,CAGnEC,CAAC,CAAE,GAHgE,C,CAM/DG,UAAU,CAAGT,gBAAgB,CAAkB,SAACU,CAAD,CAAQC,CAAR,CAAgB,IAEjEC,EAFiE,CAmB/DF,CAnB+D,CAEjEE,SAFiE,GAmB/DF,CAnB+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IAAI,CAAEM,kBAAkB,CAACc,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGF,CAAe,WACTD,CADS,aACMC,CADN,gBAETD,CAFS,OANlB,CA1BJ,CAqCGD,CAAS,EACR,oBAAC,IAAD,EACE,SAAS,CAAEhB,YAAY,CAAC,WAAD,CADzB,CAEE,IAAI,CAAEM,kBAAkB,CAACc,CAAD,CAF1B,CAGE,UAAU,CAAC,IAHb,CAIE,IAAI,CAAC,OAJP,EAMGJ,CANH,CAtCJ,CAzBF,CAyEGe,CAAW,EACV,2BACE,SAAS,CAAE/B,YAAY,CAAC,SAAD,CAAY,CACjCL,SAAS,CAAC,CAAEyC,IAAI,CAAE,MAAR,CAAgBC,GAAG,CAAE,IAArB,CAAD,CADwB,CAAZ,CADzB,EAKGf,CAAO,CAACiB,GAAR,CAAY,SAACC,CAAD,QACX,qBAAC,MAAD,EACE,SAAS,CAAExC,YAAY,CAAC,QAAD,CADzB,CAEE,QAAQ,CAAE,CAAC,CAFb,CAGE,QAAQ,GAHV,CAIE,QAAQ,CAAEwC,CAAM,CAACZ,IAJnB,CAKE,OAAO,CAAEY,CAAM,CAACnB,OALlB,CAME,KAAK,CAAEmB,CAAM,CAACX,KANhB,CAOE,GAAG,CAAEW,CAAM,CAAC/B,GAPd,CAQE,IAAI,CAAC,IARP,CASE,IAAI,CAAC,OATP,EADW,CAAZ,CALH,CA1EJ,CAgGH,CApIkC,C,CAsInC,OAASF,UAAT,CAAqBP,YAArB"}
@@ -1,8 +1,14 @@
1
- /// <reference types="react" />
2
1
  import { IconComponent } from '@consta/icons/Icon';
2
+ import React from 'react';
3
3
  export declare const attachmentPropSize: readonly ["s", "xs", "m"];
4
4
  export declare type AttachmentPropSize = typeof attachmentPropSize[number];
5
5
  export declare const attachmentPropSizeDefault: AttachmentPropSize;
6
+ export declare type AttachmentActions = {
7
+ onClick: React.MouseEventHandler<HTMLButtonElement>;
8
+ icon: IconComponent;
9
+ title?: string;
10
+ ref?: React.Ref<HTMLButtonElement>;
11
+ };
6
12
  export declare type AttachmentProps = {
7
13
  fileExtension?: string;
8
14
  withPictogram?: boolean;
@@ -13,10 +19,23 @@ export declare type AttachmentProps = {
13
19
  errorText?: string;
14
20
  size?: AttachmentPropSize;
15
21
  loadingText?: string;
22
+ className?: string;
23
+ children?: never;
24
+ actions?: AttachmentActions[];
25
+ /**
26
+ * @deprecated use actions or onClick
27
+ */
28
+ withAction?: boolean;
29
+ /**
30
+ * @deprecated use actions
31
+ */
16
32
  onButtonClick?: React.EventHandler<React.MouseEvent>;
33
+ /**
34
+ * @deprecated use actions
35
+ */
17
36
  buttonIcon?: IconComponent;
37
+ /**
38
+ * @deprecated use actions
39
+ */
18
40
  buttonTitle?: string;
19
- withAction?: boolean;
20
- className?: string;
21
- children?: never;
22
41
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/Attachment/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = typeof attachmentPropSize[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentProps = {\n fileExtension?: string;\n withPictogram?: boolean;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n buttonIcon?: IconComponent;\n buttonTitle?: string;\n withAction?: boolean;\n className?: string;\n children?: never;\n};\n"],"mappings":"AAEA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
1
+ {"version":3,"file":"types.js","names":["attachmentPropSize","attachmentPropSizeDefault"],"sources":["../../../../../src/components/Attachment/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nexport const attachmentPropSize = ['s', 'xs', 'm'] as const;\nexport type AttachmentPropSize = typeof attachmentPropSize[number];\nexport const attachmentPropSizeDefault: AttachmentPropSize =\n attachmentPropSize[0];\n\nexport type AttachmentActions = {\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n icon: IconComponent;\n title?: string;\n ref?: React.Ref<HTMLButtonElement>;\n};\n\nexport type AttachmentProps = {\n fileExtension?: string;\n withPictogram?: boolean;\n loading?: boolean;\n fileName?: string;\n fileDescription?: string;\n loadingProgress?: number;\n errorText?: string;\n size?: AttachmentPropSize;\n loadingText?: string;\n className?: string;\n children?: never;\n actions?: AttachmentActions[];\n /**\n * @deprecated use actions or onClick\n */\n withAction?: boolean;\n /**\n * @deprecated use actions\n */\n onButtonClick?: React.EventHandler<React.MouseEvent>;\n /**\n * @deprecated use actions\n */\n buttonIcon?: IconComponent;\n /**\n * @deprecated use actions\n */\n buttonTitle?: string;\n};\n"],"mappings":"AAGA,MAAO,IAAMA,mBAAkB,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAA3B,CAEP,MAAO,IAAMC,0BAA6C,CACxDD,kBAAkB,CAAC,CAAD,CADb"}
@@ -25,7 +25,7 @@ export declare function withDefaultGetters<TYPE extends string, ITEM = AutoCompl
25
25
  onDropdownOpen?: ((isOpen: boolean) => void) | undefined;
26
26
  dropdownOpen?: boolean | undefined;
27
27
  ignoreOutsideClicksRefs?: readonly import("react").RefObject<HTMLElement>[] | undefined;
28
- } & Omit<import("../TextField").TextFieldProps<TYPE>, "width" | "onChange" | "max" | "min" | "step" | "incrementButtons"> & (ITEM extends {
28
+ } & Omit<import("../TextField").TextFieldProps<TYPE>, "onChange" | "step" | "width" | "max" | "min" | "incrementButtons"> & (ITEM extends {
29
29
  label: string;
30
30
  } ? {} : {
31
31
  getItemLabel: AutoCompletePropGetItemLabel<ITEM>;
@@ -5,7 +5,7 @@ export declare const defaultGetItemLabel: AutoCompletePropGetItemLabel<AutoCompl
5
5
  export declare const defaultGetItemGroupKey: AutoCompletePropGetItemGroupId<AutoCompleteItemDefault>;
6
6
  export declare const defaultGetGroupKey: AutoCompletePropGetGroupId<AutoCompleteGroupDefault>;
7
7
  export declare const defaultGetGroupLabel: AutoCompletePropGetGroupLabel<AutoCompleteGroupDefault>;
8
- export declare function withDefaultGetters<TYPE extends string, ITEM = AutoCompleteItemDefault, GROUP = AutoCompleteGroupDefault>(props: AutoCompleteProps<TYPE, ITEM, GROUP>): (TYPE extends "textarray" ? Omit<import("../TextFieldCanary").TextFieldProps<"textarray">, "type" | "onChange"> : Omit<import("../TextFieldCanary").TextFieldProps<string>, "type" | "onChange">) & {
8
+ export declare function withDefaultGetters<TYPE extends string, ITEM = AutoCompleteItemDefault, GROUP = AutoCompleteGroupDefault>(props: AutoCompleteProps<TYPE, ITEM, GROUP>): (TYPE extends "textarray" ? Omit<import("../TextFieldCanary").TextFieldProps<"textarray">, "onChange" | "type"> : Omit<import("../TextFieldCanary").TextFieldProps<string>, "onChange" | "type">) & {
9
9
  type?: TYPE | undefined;
10
10
  onChange?: import("./types").AutoCompletePropOnChange<TYPE> | undefined;
11
11
  items?: ITEM[] | undefined;
@@ -6,12 +6,9 @@ export declare function withDefaultGetters<ITEM>(props: AvatarGroupProps<ITEM>):
6
6
  children?: undefined;
7
7
  items?: ITEM[] | undefined;
8
8
  visibleCount?: number | "auto" | undefined;
9
- size?: "s" | "m" | "xs" | "l" | undefined;
9
+ size?: "xs" | "s" | "m" | "l" | undefined;
10
10
  form?: "default" | "brick" | "round" | undefined;
11
11
  monochrome?: boolean | undefined;
12
- slot?: string | undefined;
13
- style?: import("react").CSSProperties | undefined;
14
- title?: string | undefined;
15
12
  defaultChecked?: boolean | undefined;
16
13
  defaultValue?: string | number | readonly string[] | undefined;
17
14
  suppressContentEditableWarning?: boolean | undefined;
@@ -26,8 +23,11 @@ export declare function withDefaultGetters<ITEM>(props: AvatarGroupProps<ITEM>):
26
23
  id?: string | undefined;
27
24
  lang?: string | undefined;
28
25
  placeholder?: string | undefined;
26
+ slot?: string | undefined;
29
27
  spellCheck?: (boolean | "true" | "false") | undefined;
28
+ style?: import("react").CSSProperties | undefined;
30
29
  tabIndex?: number | undefined;
30
+ title?: string | undefined;
31
31
  translate?: "yes" | "no" | undefined;
32
32
  radioGroup?: string | undefined;
33
33
  role?: import("react").AriaRole | undefined;
@@ -51,7 +51,7 @@ export declare function withDefaultGetters<ITEM>(props: AvatarGroupProps<ITEM>):
51
51
  results?: number | undefined;
52
52
  security?: string | undefined;
53
53
  unselectable?: "on" | "off" | undefined;
54
- inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
54
+ inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
55
55
  is?: string | undefined;
56
56
  'aria-activedescendant'?: string | undefined;
57
57
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
@@ -62,7 +62,7 @@ export declare function withDefaultGetters<ITEM>(props: AvatarGroupProps<ITEM>):
62
62
  'aria-colindex'?: number | undefined;
63
63
  'aria-colspan'?: number | undefined;
64
64
  'aria-controls'?: string | undefined;
65
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
65
+ 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
66
66
  'aria-describedby'?: string | undefined;
67
67
  'aria-details'?: string | undefined;
68
68
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
@@ -1 +1,3 @@
1
- .Badge{align-items:center;box-sizing:border-box;color:var(--badge-text-color);display:inline-flex;flex-wrap:nowrap;font-size:var(--badge-text-size);font-weight:var(--font-weight-text-semibold);gap:var(--space-2xs);height:var(--badge-size);letter-spacing:.05em;line-height:var(--badge-size);padding:0 var(--badge-horizontal-padding);text-decoration:none;text-transform:uppercase;white-space:nowrap}.Badge_form_default{border-radius:var(--control-radius)}.Badge_form_round{border-radius:99em}.Badge_view_filled{background:var(--badge-bg-color)}.Badge_view_stroked{box-shadow:inset 0 0 0 1px var(--badge-border-color)}.Badge_view_tinted{background:color-mix(in srgb,var(--badge-bg-color) var(--badge-degree-mixing),var(--color-bg-default))}.Badge_counter{justify-content:center;padding:0;text-align:center;width:var(--badge-size)}.Badge_minified{background:transparent;border:var(--badge-minified-border-size) solid transparent;border-radius:99em;box-shadow:inset 0 0 0 var(--badge-size) var(--badge-bg-color);width:var(--badge-size)}.Badge-Icon{flex:1}
1
+ .Badge{--badge-bg-color-var:var(--badge-bg-color-prop,var(--badge-bg-color));--badge-text-color-var:var(--badge-text-color-prop,var(--badge-text-color));--badge-border-color-var:var(
2
+ --badge-border-color-prop,var(--badge-border-color)
3
+ );align-items:center;box-sizing:border-box;color:var(--badge-text-color-var);display:inline-flex;flex-wrap:nowrap;font-size:var(--badge-text-size);font-weight:var(--font-weight-text-semibold);gap:var(--space-2xs);height:var(--badge-size);letter-spacing:.05em;line-height:var(--badge-size);padding:0 var(--badge-horizontal-padding);text-decoration:none;text-transform:uppercase;white-space:nowrap}.Badge_form_default{border-radius:var(--control-radius)}.Badge_form_round{border-radius:99em}.Badge_view_filled{background:var(--badge-bg-color-var)}.Badge_view_stroked{box-shadow:inset 0 0 0 1px var(--badge-border-color-var)}.Badge_view_tinted{background:color-mix(in srgb,var(--badge-bg-color-var) var(--badge-degree-mixing),var(--color-bg-default))}.Badge_counter{justify-content:center;padding:0;text-align:center;width:var(--badge-size)}.Badge_minified{background:transparent;border:var(--badge-minified-border-size) solid transparent;border-radius:99em;box-shadow:inset 0 0 0 var(--badge-size) var(--badge-bg-color-var);width:var(--badge-size)}.Badge-Icon{flex:1}
@@ -1,2 +1,2 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","view","status","form","icon","iconLeft","iconRight","minified","label","as","title","style"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./Badge.css";import{classnames}from"@bem-react/classnames";import React from"react";import{useTheme}from"../Theme";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{cnBadge}from"./cn";import{guardStatus}from"./guardStatus";import{getBgColor,getBorderColor,getDegreeMixing,getHorizontalPadding,getMinifiedBorderSize,getSize,getTextColor,getTextSize}from"./maps";import{badgePropFormDefault,badgePropSizeDefault,badgePropStatusDefault,badgePropViewDefault}from"./types";var renderIcon=function(a){return a?React.createElement(a,{size:"xs",className:cnBadge("Icon")}):null};export var Badge=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?badgePropSizeDefault:c,e=a.view,f=void 0===e?badgePropViewDefault:e,g=a.status,h=void 0===g?badgePropStatusDefault:g,i=a.form,j=void 0===i?badgePropFormDefault:i,k=a.icon,l=a.iconLeft,m=a.iconRight,n=a.minified,o=void 0!==n&&n,p=a.label,q=a.as,r=void 0===q?"div":q,s=a.title,t=a.style,u=_objectWithoutProperties(a,_excluded),v=guardStatus(h),w=useTheme(),x=w.themeClassNames,y="system"!==v&&"disabled"!==v&&"filled"===f?classnames(a.className,x.color.accent):a.className,z=null!==l&&void 0!==l?l:k,A=1===[k,l,m,p].filter(Boolean).length&&1>=((null===p||void 0===p?void 0:p.length)||0);return React.createElement(r,Object.assign({},u,{className:cnBadge(_objectSpread({minified:o},!o&&{view:f,form:j,counter:A}),[y]),ref:b,title:s||o&&p,style:_objectSpread(_objectSpread({},t),{},{"--badge-bg-color":getBgColor(v),"--badge-border-color":getBorderColor(v,f),"--badge-horizontal-padding":getHorizontalPadding(d,j,o),"--badge-minified-border-size":getMinifiedBorderSize(d,o),"--badge-size":getSize(d,o),"--badge-text-color":getTextColor(v,f),"--badge-text-size":getTextSize(d),"--badge-degree-mixing":getDegreeMixing(v,f)})}),!o&&React.createElement(React.Fragment,null,renderIcon(z),p,renderIcon(m)))});
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","view","status","form","icon","iconLeft","iconRight","minified","label","as","title","style"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./Badge.css";import{classnames}from"@bem-react/classnames";import React from"react";import{useTheme}from"../Theme";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{cnBadge}from"./cn";import{guardStatus}from"./guardStatus";import{getBgColor,getBorderColor,getDegreeMixing,getHorizontalPadding,getMinifiedBorderSize,getSize,getTextColor,getTextSize}from"./maps";import{badgePropFormDefault,badgePropSizeDefault,badgePropStatusDefault,badgePropViewDefault}from"./types";var renderIcon=function(a){return a?React.createElement(a,{size:"xs",className:cnBadge("Icon")}):null};export var Badge=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?badgePropSizeDefault:c,e=a.view,f=void 0===e?badgePropViewDefault:e,g=a.status,h=void 0===g?badgePropStatusDefault:g,i=a.form,j=void 0===i?badgePropFormDefault:i,k=a.icon,l=a.iconLeft,m=a.iconRight,n=a.minified,o=void 0!==n&&n,p=a.label,q=a.as,r=void 0===q?"div":q,s=a.title,t=a.style,u=_objectWithoutProperties(a,_excluded),v=guardStatus(h),w=useTheme(),x=w.themeClassNames,y="system"!==v&&"disabled"!==v&&"filled"===f?classnames(a.className,x.color.accent):a.className,z=null!==l&&void 0!==l?l:k,A=1===[k,l,m,p].filter(Boolean).length&&1>=((null===p||void 0===p?void 0:p.length)||0);return React.createElement(r,Object.assign({},u,{className:cnBadge(_objectSpread({minified:o},!o&&{view:f,form:j,counter:A}),[y]),ref:b,title:s||o&&p||void 0,style:_objectSpread(_objectSpread({},t),{},{"--badge-bg-color":getBgColor(v),"--badge-border-color":getBorderColor(v,f),"--badge-horizontal-padding":getHorizontalPadding(d,j,o),"--badge-minified-border-size":getMinifiedBorderSize(d,o),"--badge-size":getSize(d,o),"--badge-text-color":getTextColor(v,f),"--badge-text-size":getTextSize(d),"--badge-degree-mixing":getDegreeMixing(v,f)})}),!o&&React.createElement(React.Fragment,null,renderIcon(z),p,renderIcon(m)))});
2
2
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["classnames","React","useTheme","forwardRefWithAs","cnBadge","guardStatus","getBgColor","getBorderColor","getDegreeMixing","getHorizontalPadding","getMinifiedBorderSize","getSize","getTextColor","getTextSize","badgePropFormDefault","badgePropSizeDefault","badgePropStatusDefault","badgePropViewDefault","renderIcon","Icon","Badge","props","ref","size","view","status","statusProp","form","icon","iconLeft","IconRight","iconRight","minified","label","as","title","style","otherProps","themeClassNames","className","color","accent","IconLeft","counter","filter","Boolean","length"],"sources":["../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import './Badge.css';\n\nimport { classnames } from '@bem-react/classnames';\nimport { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { useTheme } from '##/components/Theme';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport { cnBadge } from './cn';\nimport { guardStatus } from './guardStatus';\nimport {\n getBgColor,\n getBorderColor,\n getDegreeMixing,\n getHorizontalPadding,\n getMinifiedBorderSize,\n getSize,\n getTextColor,\n getTextSize,\n} from './maps';\nimport {\n badgePropFormDefault,\n BadgeProps,\n badgePropSizeDefault,\n badgePropStatusDefault,\n badgePropViewDefault,\n} from './types';\n\nconst renderIcon = (Icon: IconComponent | undefined) =>\n Icon ? <Icon size=\"xs\" className={cnBadge('Icon')} /> : null;\n\nexport const Badge = forwardRefWithAs<BadgeProps>((props, ref) => {\n const {\n size = badgePropSizeDefault,\n view = badgePropViewDefault,\n status: statusProp = badgePropStatusDefault,\n form = badgePropFormDefault,\n icon,\n iconLeft,\n iconRight: IconRight,\n minified = false,\n label,\n as = 'div',\n title,\n style,\n ...otherProps\n } = props;\n\n const status = guardStatus(statusProp);\n const Tag = as as string;\n const { themeClassNames } = useTheme();\n\n const className =\n status !== 'system' && status !== 'disabled' && view === 'filled'\n ? classnames(props.className, themeClassNames.color.accent)\n : props.className;\n const IconLeft = iconLeft ?? icon;\n const counter =\n [icon, iconLeft, IconRight, label].filter(Boolean).length === 1 &&\n (label?.length || 0) <= 1;\n\n return (\n <Tag\n {...otherProps}\n className={cnBadge(\n {\n minified,\n ...(!minified && {\n view,\n form,\n counter,\n }),\n },\n [className],\n )}\n ref={ref}\n title={title || (minified && label)}\n style={{\n ...style,\n '--badge-bg-color': getBgColor(status),\n '--badge-border-color': getBorderColor(status, view),\n '--badge-horizontal-padding': getHorizontalPadding(\n size,\n form,\n minified,\n ),\n '--badge-minified-border-size': getMinifiedBorderSize(size, minified),\n '--badge-size': getSize(size, minified),\n '--badge-text-color': getTextColor(status, view),\n '--badge-text-size': getTextSize(size),\n '--badge-degree-mixing': getDegreeMixing(status, view),\n }}\n >\n {!minified && (\n <>\n {renderIcon(IconLeft)}\n {label}\n {renderIcon(IconRight)}\n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AD,CAAOS,CAAP,CATlD,CAUH,eAAgBrB,OAAO,CAACY,CAAD,CAAOS,CAAP,CAVpB,CAWH,qBAAsBpB,YAAY,CAACa,CAAD,CAASD,CAAT,CAX/B,CAYH,oBAAqBX,WAAW,CAACU,CAAD,CAZ7B,CAaH,wBAAyBf,eAAe,CAACiB,CAAD,CAASD,CAAT,CAbrC,EAfP,GA+BG,CAACQ,CAAD,EACC,wCACGd,UAAU,CAACwB,CAAD,CADb,CAEGT,CAFH,CAGGf,UAAU,CAACY,CAAD,CAHb,CAhCJ,CAwCH,CAvEoC,CAA9B"}
1
+ {"version":3,"file":"Badge.js","names":["classnames","React","useTheme","forwardRefWithAs","cnBadge","guardStatus","getBgColor","getBorderColor","getDegreeMixing","getHorizontalPadding","getMinifiedBorderSize","getSize","getTextColor","getTextSize","badgePropFormDefault","badgePropSizeDefault","badgePropStatusDefault","badgePropViewDefault","renderIcon","Icon","Badge","props","ref","size","view","status","statusProp","form","icon","iconLeft","IconRight","iconRight","minified","label","as","title","style","otherProps","themeClassNames","className","color","accent","IconLeft","counter","filter","Boolean","length"],"sources":["../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import './Badge.css';\n\nimport { classnames } from '@bem-react/classnames';\nimport { IconComponent } from '@consta/icons/Icon';\nimport React from 'react';\n\nimport { useTheme } from '##/components/Theme';\nimport { forwardRefWithAs } from '##/utils/types/PropsWithAsAttributes';\n\nimport { cnBadge } from './cn';\nimport { guardStatus } from './guardStatus';\nimport {\n getBgColor,\n getBorderColor,\n getDegreeMixing,\n getHorizontalPadding,\n getMinifiedBorderSize,\n getSize,\n getTextColor,\n getTextSize,\n} from './maps';\nimport {\n badgePropFormDefault,\n BadgeProps,\n badgePropSizeDefault,\n badgePropStatusDefault,\n badgePropViewDefault,\n} from './types';\n\nconst renderIcon = (Icon: IconComponent | undefined) =>\n Icon ? <Icon size=\"xs\" className={cnBadge('Icon')} /> : null;\n\nexport const Badge = forwardRefWithAs<BadgeProps>((props, ref) => {\n const {\n size = badgePropSizeDefault,\n view = badgePropViewDefault,\n status: statusProp = badgePropStatusDefault,\n form = badgePropFormDefault,\n icon,\n iconLeft,\n iconRight: IconRight,\n minified = false,\n label,\n as = 'div',\n title,\n style,\n ...otherProps\n } = props;\n\n const status = guardStatus(statusProp);\n const Tag = as as string;\n const { themeClassNames } = useTheme();\n\n const className =\n status !== 'system' && status !== 'disabled' && view === 'filled'\n ? classnames(props.className, themeClassNames.color.accent)\n : props.className;\n const IconLeft = iconLeft ?? icon;\n const counter =\n [icon, iconLeft, IconRight, label].filter(Boolean).length === 1 &&\n (label?.length || 0) <= 1;\n\n return (\n <Tag\n {...otherProps}\n className={cnBadge(\n {\n minified,\n ...(!minified && {\n view,\n form,\n counter,\n }),\n },\n [className],\n )}\n ref={ref}\n title={title || (minified && label) || undefined}\n style={{\n ...style,\n '--badge-bg-color': getBgColor(status),\n '--badge-border-color': getBorderColor(status, view),\n '--badge-horizontal-padding': getHorizontalPadding(\n size,\n form,\n minified,\n ),\n '--badge-minified-border-size': getMinifiedBorderSize(size, minified),\n '--badge-size': getSize(size, minified),\n '--badge-text-color': getTextColor(status, view),\n '--badge-text-size': getTextSize(size),\n '--badge-degree-mixing': getDegreeMixing(status, view),\n }}\n >\n {!minified && (\n <>\n {renderIcon(IconLeft)}\n {label}\n {renderIcon(IconRight)}\n </>\n )}\n </Tag>\n );\n});\n"],"mappings":"82BAAA,oBAEA,OAASA,UAAT,KAA2B,uBAA3B,CAEA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,QAAT,gBACA,OAASC,gBAAT,+CAEA,OAASC,OAAT,YACA,OAASC,WAAT,qBACA,OACEC,UADF,CAEEC,cAFF,CAGEC,eAHF,CAIEC,oBAJF,CAKEC,qBALF,CAMEC,OANF,CAOEC,YAPF,CAQEC,WARF,cAUA,OACEC,oBADF,CAGEC,oBAHF,CAIEC,sBAJF,CAKEC,oBALF,eAQA,GAAMC,WAAU,CAAG,SAACC,CAAD,QACjBA,EAAI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aultGetters<ITEM>(props: BadgeGroupProps<ITEM>):
13
13
  getItemAs?: BadgeGroupPropGetItemAs<ITEM> | undefined;
14
14
  getItemAttributes?: BadgeGroupPropGetItemAttributes<ITEM> | undefined;
15
15
  form?: "default" | "round" | undefined;
16
- size?: "s" | "m" | "xs" | "l" | undefined;
16
+ size?: "xs" | "s" | "m" | "l" | undefined;
17
17
  minified?: boolean | undefined;
18
18
  moreRef?: import("react").RefObject<HTMLDivElement> | undefined;
19
19
  moreAttributes?: Omit<import("react").HTMLAttributes<HTMLDivElement>, "children"> | undefined;
20
- } & Omit<import("react").HTMLAttributes<HTMLDivElement>, "form" | "size" | "css" | "items" | "getItemLabel" | "getItemKey" | "getItemStatus" | "getItemAs" | "getItemAttributes" | "getItemRef" | "minified" | "fitMode" | "getItemView" | "getItemIconLeft" | "getItemIconRight" | "moreRef" | "moreAttributes"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
20
+ } & Omit<import("react").HTMLAttributes<HTMLDivElement>, "css" | "size" | "form" | "items" | "getItemLabel" | "getItemKey" | "getItemStatus" | "getItemAs" | "getItemAttributes" | "getItemRef" | "minified" | "fitMode" | "getItemView" | "getItemIconLeft" | "getItemIconRight" | "moreRef" | "moreAttributes"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
21
21
  key: string | number;
22
22
  } ? {} : {
23
23
  getItemKey: BadgeGroupPropGetItemKey<ITEM>;
@@ -11,7 +11,7 @@ export declare const withDefaultGetters: (props: BookmarkTabsProps) => {
11
11
  getItemAttributes: BookmarkTabsPropGetItemAttributes<BookmarkTabsItemDefault>;
12
12
  size?: "s" | "m" | undefined;
13
13
  form?: "brick" | "round" | undefined;
14
- view?: "ghost" | "clear" | undefined;
14
+ view?: "clear" | "ghost" | undefined;
15
15
  items: BookmarkTabsItemDefault[];
16
16
  value?: BookmarkTabsItemDefault | null | undefined;
17
17
  children?: undefined;
@@ -20,9 +20,6 @@ export declare const withDefaultGetters: (props: BookmarkTabsProps) => {
20
20
  onRemove?: import("./types").BookmarkTabsPropOnRemove<BookmarkTabsItemDefault> | undefined;
21
21
  onChange?: import("./types").BookmarkTabsPropOnChange<BookmarkTabsItemDefault> | undefined;
22
22
  renderItem?: import("./types").BookmarkTabsPropRenderItem<BookmarkTabsItemDefault> | undefined;
23
- slot?: string | undefined;
24
- style?: import("react").CSSProperties | undefined;
25
- title?: string | undefined;
26
23
  defaultChecked?: boolean | undefined;
27
24
  defaultValue?: string | number | readonly string[] | undefined;
28
25
  suppressContentEditableWarning?: boolean | undefined;
@@ -37,8 +34,11 @@ export declare const withDefaultGetters: (props: BookmarkTabsProps) => {
37
34
  id?: string | undefined;
38
35
  lang?: string | undefined;
39
36
  placeholder?: string | undefined;
37
+ slot?: string | undefined;
40
38
  spellCheck?: (boolean | "true" | "false") | undefined;
39
+ style?: import("react").CSSProperties | undefined;
41
40
  tabIndex?: number | undefined;
41
+ title?: string | undefined;
42
42
  translate?: "yes" | "no" | undefined;
43
43
  radioGroup?: string | undefined;
44
44
  role?: import("react").AriaRole | undefined;
@@ -62,7 +62,7 @@ export declare const withDefaultGetters: (props: BookmarkTabsProps) => {
62
62
  results?: number | undefined;
63
63
  security?: string | undefined;
64
64
  unselectable?: "on" | "off" | undefined;
65
- inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
65
+ inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
66
66
  is?: string | undefined;
67
67
  'aria-activedescendant'?: string | undefined;
68
68
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
@@ -73,7 +73,7 @@ export declare const withDefaultGetters: (props: BookmarkTabsProps) => {
73
73
  'aria-colindex'?: number | undefined;
74
74
  'aria-colspan'?: number | undefined;
75
75
  'aria-controls'?: string | undefined;
76
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
76
+ 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
77
77
  'aria-describedby'?: string | undefined;
78
78
  'aria-details'?: string | undefined;
79
79
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
@@ -8,13 +8,10 @@ export declare function withDefaultGetters(props: BreadcrumbsProps): {
8
8
  getItemSubMenu: BreadcrumbsPropGetItemSubMenu<DefaultItem>;
9
9
  items: DefaultItem[];
10
10
  onItemClick?: import("./types").BreadcrumbsPropOnItemClick<DefaultItem> | undefined;
11
- size?: "s" | "m" | "xs" | "l" | undefined;
11
+ size?: "xs" | "s" | "m" | "l" | undefined;
12
12
  onlyIconRoot?: boolean | undefined;
13
13
  fitMode?: "scroll" | "dropdown" | undefined;
14
14
  lastItemIsLink?: boolean | undefined;
15
- slot?: string | undefined;
16
- style?: import("react").CSSProperties | undefined;
17
- title?: string | undefined;
18
15
  defaultChecked?: boolean | undefined;
19
16
  defaultValue?: string | number | readonly string[] | undefined;
20
17
  suppressContentEditableWarning?: boolean | undefined;
@@ -29,8 +26,11 @@ export declare function withDefaultGetters(props: BreadcrumbsProps): {
29
26
  id?: string | undefined;
30
27
  lang?: string | undefined;
31
28
  placeholder?: string | undefined;
29
+ slot?: string | undefined;
32
30
  spellCheck?: (boolean | "true" | "false") | undefined;
31
+ style?: import("react").CSSProperties | undefined;
33
32
  tabIndex?: number | undefined;
33
+ title?: string | undefined;
34
34
  translate?: "yes" | "no" | undefined;
35
35
  radioGroup?: string | undefined;
36
36
  role?: import("react").AriaRole | undefined;
@@ -54,7 +54,7 @@ export declare function withDefaultGetters(props: BreadcrumbsProps): {
54
54
  results?: number | undefined;
55
55
  security?: string | undefined;
56
56
  unselectable?: "on" | "off" | undefined;
57
- inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
57
+ inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
58
58
  is?: string | undefined;
59
59
  'aria-activedescendant'?: string | undefined;
60
60
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
@@ -65,7 +65,7 @@ export declare function withDefaultGetters(props: BreadcrumbsProps): {
65
65
  'aria-colindex'?: number | undefined;
66
66
  'aria-colspan'?: number | undefined;
67
67
  'aria-controls'?: string | undefined;
68
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
68
+ 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
69
69
  'aria-describedby'?: string | undefined;
70
70
  'aria-details'?: string | undefined;
71
71
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
@@ -1 +1 @@
1
- .Button{--button-loader-color:var(--button-color);--button-cursor:pointer;-webkit-appearance:none;background:var(--button-bg-color);border:none;border-radius:var(--control-radius);box-sizing:border-box;color:var(--button-color);cursor:var(--button-cursor);display:inline-block;flex-shrink:0;font-family:var(--font-primary);font-size:var(--button-font-size);font-weight:var(--font-weight-text-regular);height:var(--button-height);line-height:var(--button-height);max-width:100%;overflow:hidden;padding:0 var(--button-space);position:relative;text-decoration:none;text-overflow:ellipsis;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;white-space:nowrap}.Button:not(.Button_loading):hover,.Button:not(:disabled):hover,.Button:not(:disabled):not(.Button_loading):hover{background:var(--button-bg-color-hover);color:var(--button-color-hover)}.Button_form_brick{border-radius:0}.Button_form_round{border-radius:99rem}.Button_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.Button_form_defaultBrick{border-radius:var(--control-radius) 0 0 var(--control-radius)}.Button_form_brickRound{border-radius:0 99rem 99rem 0}.Button_form_roundBrick{border-radius:99rem 0 0 99rem}.Button_size_xs{--button-height:var(--control-height-xs);--button-font-size:var(--control-text-size-xs);--button-space:calc(var(--control-space-xs) - var(--space-3xs));--button-icon-indent:var(--space-xs)}.Button_size_s{--button-height:var(--control-height-s);--button-font-size:var(--control-text-size-s);--button-space:var(--control-space-xs);--button-icon-indent:calc(var(--space-s) - var(--space-3xs))}.Button_size_m{--button-height:var(--control-height-m);--button-font-size:var(--control-text-size-m);--button-space:var(--control-space-s);--button-icon-indent:calc(var(--space-m) - var(--space-3xs))}.Button_size_l{--button-height:var(--control-height-l);--button-font-size:var(--control-text-size-l);--button-space:var(--control-space-m);--button-icon-indent:var(--space-l)}.Button_view_clear{--button-bg-color:var(--color-control-bg-clear);--button-bg-color-hover:var(--color-control-bg-clear-hover);--button-color:var(--color-control-typo-clear);--button-color-hover:var(--color-control-typo-clear-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-border-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_ghost{--button-bg-color:var(--color-control-bg-ghost);--button-bg-color-hover:var(--color-control-bg-ghost-hover);--button-color:var(--color-control-typo-ghost);--button-color-hover:var(--color-control-typo-ghost-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_primary{--button-bg-color:var(--color-control-bg-primary);--button-bg-color-hover:var(--color-control-bg-primary-hover);--button-color:var(--color-control-typo-primary);--button-color-hover:var(--color-control-typo-primary-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_secondary{--button-bg-color:var(--color-control-bg-secondary);--button-bg-color-hover:var(--color-control-bg-clear);--button-color:var(--color-control-typo-secondary);--button-color-hover:var(--color-control-typo-secondary-hover);--button-border:var(--color-control-bg-border-secondary);--button-border-hover:var(--color-control-bg-border-secondary-hover);--button-bg-color-disable:var(--color-control-bg-secondary);--button-color-disable:var(--color-control-typo-disable);--button-border-disable:var(--color-control-typo-disable);border:var(--control-border-width) solid var(--button-border);line-height:calc(var(--button-height) - var(--control-border-width)*2)}.Button_view_secondary:not(.Button_loading):hover,.Button_view_secondary:not(:disabled):hover,.Button_view_secondary:not(:disabled):not(.Button_loading):hover{border-color:var(--button-border-hover)}.Button_width_full{width:100%}.Button:disabled{--button-loader-color:var(--button-color-disable);--button-cursor:not-allowed;--button-color-hover:var(--button-color-disable);--button-border-hover:var(--button-color-disable);--button-bg-color-hover:var(--button-bg-color-disable);background-color:var(--button-bg-color-disable);border-color:var(--button-border-disable);color:var(--button-color-disable)}.Button_onlyIcon{--button-icon-indent:0;justify-content:center;padding:0;width:var(--button-height)}.Button_onlyIcon,.Button_withIcon{align-items:center;display:inline-flex}.Button-Icon{display:flex;flex-shrink:0}.Button-Icon_position_left{margin-right:var(--button-icon-indent)}.Button-Icon_position_right{margin-left:var(--button-icon-indent)}.Button-Label{flex-grow:1;flex-shrink:1;overflow:hidden;text-align:center;text-overflow:ellipsis}.Button_loading{--button-cursor:wait;color:transparent}.Button_loading:not(:disabled){--button-color-hover:transparent;--button-bg-color-hover:var(--button-bg-color)}.Button_loading:disabled{--button-cursor:not-allowed;color:transparent}.Button_loading .Button-Loader{--loaderBackgroundColor:var(--button-loader-color);position:absolute}
1
+ .Button{--button-loader-color:var(--button-color);--button-cursor:pointer;-webkit-appearance:none;background:var(--button-bg-color);border:none;border-radius:var(--control-radius);box-sizing:border-box;color:var(--button-color);cursor:var(--button-cursor);display:inline-block;flex-shrink:0;font-family:var(--font-primary);font-size:var(--button-font-size);font-weight:var(--font-weight-text-regular);height:var(--button-height);line-height:var(--button-height);max-width:100%;overflow:hidden;padding:0 var(--button-space);position:relative;text-decoration:none;text-overflow:ellipsis;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease,fill .15s ease;white-space:nowrap}.Button:not(.Button_loading):hover,.Button:not(:disabled):hover,.Button:not(:disabled):not(.Button_loading):hover{background:var(--button-bg-color-hover);color:var(--button-color-hover)}.Button_form_brick{border-radius:0}.Button_form_round{border-radius:99rem}.Button_form_brickDefault{border-radius:0 var(--control-radius) var(--control-radius) 0}.Button_form_defaultBrick{border-radius:var(--control-radius) 0 0 var(--control-radius)}.Button_form_brickRound{border-radius:0 99rem 99rem 0}.Button_form_roundBrick{border-radius:99rem 0 0 99rem}.Button_size_xs{--button-height:var(--control-height-xs);--button-font-size:var(--control-text-size-xs);--button-space:calc(var(--control-space-xs) - var(--space-3xs));--button-icon-indent:var(--space-xs)}.Button_size_s{--button-height:var(--control-height-s);--button-font-size:var(--control-text-size-s);--button-space:var(--control-space-xs);--button-icon-indent:calc(var(--space-s) - var(--space-3xs))}.Button_size_m{--button-height:var(--control-height-m);--button-font-size:var(--control-text-size-m);--button-space:var(--control-space-s);--button-icon-indent:calc(var(--space-m) - var(--space-3xs))}.Button_size_l{--button-height:var(--control-height-l);--button-font-size:var(--control-text-size-l);--button-space:var(--control-space-m);--button-icon-indent:var(--space-l)}.Button_view_clear{--button-bg-color:var(--color-control-bg-clear);--button-bg-color-hover:var(--color-control-bg-clear-hover);--button-color:var(--color-control-typo-clear);--button-color-hover:var(--color-control-typo-clear-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-border-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_ghost{--button-bg-color:var(--color-control-bg-ghost);--button-bg-color-hover:var(--color-control-bg-ghost-hover);--button-color:var(--color-control-typo-ghost);--button-color-hover:var(--color-control-typo-ghost-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_primary{--button-bg-color:var(--color-control-bg-primary);--button-bg-color-hover:var(--color-control-bg-primary-hover);--button-color:var(--color-control-typo-primary);--button-color-hover:var(--color-control-typo-primary-hover);--button-border:transparent;--button-bg-color-disable:var(--color-control-bg-disable);--button-color-disable:var(--color-control-typo-disable)}.Button_view_secondary{--button-bg-color:var(--color-control-bg-secondary);--button-bg-color-hover:var(--color-control-bg-clear);--button-color:var(--color-control-typo-secondary);--button-color-hover:var(--color-control-typo-secondary-hover);--button-border:var(--color-control-bg-border-secondary);--button-border-hover:var(--color-control-bg-border-secondary-hover);--button-bg-color-disable:var(--color-control-bg-secondary);--button-color-disable:var(--color-control-typo-disable);--button-border-disable:var(--color-control-typo-disable);border:var(--control-border-width) solid var(--button-border);line-height:calc(var(--button-height) - var(--control-border-width)*2)}.Button_view_secondary:not(.Button_loading):hover,.Button_view_secondary:not(:disabled):hover,.Button_view_secondary:not(:disabled):not(.Button_loading):hover{border-color:var(--button-border-hover)}.Button_width_full{width:100%}.Button:disabled{--button-loader-color:var(--button-color-disable);--button-cursor:not-allowed;--button-color-hover:var(--button-color-disable);--button-border-hover:var(--button-color-disable);--button-bg-color-hover:var(--button-bg-color-disable);background-color:var(--button-bg-color-disable);border-color:var(--button-border-disable);color:var(--button-color-disable)}.Button_onlyIcon{--button-icon-indent:0;justify-content:center;padding:0;width:var(--button-height)}.Button_onlyIcon,.Button_withIcon{align-items:center;display:inline-flex}.Button-Icon{display:flex;flex-shrink:0}.Button-Icon_position_left{margin-right:var(--button-icon-indent)}.Button-Icon_position_right{margin-left:var(--button-icon-indent)}.Button-Label{flex-grow:1;flex-shrink:1;overflow:hidden;text-align:center;text-overflow:ellipsis}.Button_loading{--button-cursor:wait;color:transparent}.Button_loading:not(:disabled){--button-color-hover:transparent;--button-bg-color-hover:var(--button-bg-color)}.Button_loading:disabled{--button-cursor:not-allowed;color:transparent}.Button_loading .Button-Loader{--loader-color-prop:var(--button-loader-color);align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;right:0;top:0}
@@ -1,2 +1,2 @@
1
- import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSize","formId"];import"./Button.css";import React,{useRef}from"react";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";import{Loader}from"../LoaderDeprecated/LoaderDeprecated";export var buttonPropSize=["m","xs","s","l"];export var buttonPropSizeDefault=buttonPropSize[0];export var buttonPropView=["primary","clear","ghost","secondary"];export var buttonPropViewDefault=buttonPropView[0];export var buttonPropWidth=["default","full"];export var buttonPropWidthDefault=buttonPropWidth[0];export var buttonPropForm=["default","brick","round","brickRound","roundBrick","brickDefault","defaultBrick"];var mapStableForm={default:"default",defaultClear:"defaultBrick",defaultBrick:"defaultBrick",brick:"brick",brickDefault:"brickDefault",brickClear:"brick",brickRound:"brickRound",round:"round",roundClear:"roundBrick",roundBrick:"roundBrick",clearRound:"brickRound",clearDefault:"brickDefault",clearBrick:"brick",clearClear:"brick"};export var buttonPropFormDefault=buttonPropForm[0];export var COMPONENT_NAME="Button";export var cnButton=cn("Button");var sizeMap={xs:"xs",s:"xs",m:"s",l:"m"},sizeMapOnlyIcon={xs:"xs",s:"s",m:"m",l:"m"};export var Button=forwardRefWithAs(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.size,f=void 0===e?buttonPropSizeDefault:e,g=d.view,h=void 0===g?buttonPropViewDefault:g,i=d.width,j=void 0===i?buttonPropWidthDefault:i,k=d.form,l=void 0===k?buttonPropFormDefault:k,m=d.iconLeft,n=d.iconRight,o=d.label,p=d.className,q=d.onClick,r=d.disabled,s=d.loading,t=d.type,u=void 0===t?"button":t,v=d.tabIndex,w=d.as,x=void 0===w?"button":w,y=d.onlyIcon,z=d.iconSize,A=d.formId,B=_objectWithoutProperties(d,_excluded),C=(!o||y)&&(m||n),D=m,E=n,F=a.title||!!C&&o||void 0,G=C?getByMap(sizeMapOnlyIcon,f,z):getByMap(sizeMap,f,z);return React.createElement(x,Object.assign({},B,{onClick:q?function handleClick(a){r||s||!q||q(a)}:void 0,form:A,type:u,className:cnButton({size:f,view:h,width:j,form:mapStableForm[l],loading:s,disabled:r,withIcon:!!m||!!n,onlyIcon:!!C},[r||s?void 0:cnMixFocus(),p]),disabled:r,tabIndex:v,title:F,ref:useForkRef([b,c])}),C&&React.createElement(C,{className:cnButton("Icon"),size:G}),!C&&((D||E)&&o?React.createElement(React.Fragment,null,D&&React.createElement(D,{className:cnButton("Icon",{position:"left"}),size:G}),React.createElement("span",{className:cnButton("Label")},o),E&&React.createElement(E,{className:cnButton("Icon",{position:"right"}),size:G})):o),s&&React.createElement(Loader,{className:cnButton("Loader"),size:"s"}))});
1
+ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSize","formId"];import"./Button.css";import React,{useRef}from"react";import{Loader}from"../Loader";import{useForkRef}from"../../hooks/useForkRef/useForkRef";import{cnMixFocus}from"../../mixs/MixFocus/MixFocus";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";import{usePropsHandler}from"../EventInterceptor/usePropsHandler";export var buttonPropSize=["m","xs","s","l"];export var buttonPropSizeDefault=buttonPropSize[0];export var buttonPropView=["primary","clear","ghost","secondary"];export var buttonPropViewDefault=buttonPropView[0];export var buttonPropWidth=["default","full"];export var buttonPropWidthDefault=buttonPropWidth[0];export var buttonPropForm=["default","brick","round","brickRound","roundBrick","brickDefault","defaultBrick"];var mapStableForm={default:"default",defaultClear:"defaultBrick",defaultBrick:"defaultBrick",brick:"brick",brickDefault:"brickDefault",brickClear:"brick",brickRound:"brickRound",round:"round",roundClear:"roundBrick",roundBrick:"roundBrick",clearRound:"brickRound",clearDefault:"brickDefault",clearBrick:"brick",clearClear:"brick"};export var buttonPropFormDefault=buttonPropForm[0];export var COMPONENT_NAME="Button";export var cnButton=cn("Button");var sizeMap={xs:"xs",s:"xs",m:"s",l:"m"},sizeMapOnlyIcon={xs:"xs",s:"s",m:"m",l:"m"};export var Button=forwardRefWithAs(function(a,b){var c=useRef(null),d=usePropsHandler(COMPONENT_NAME,a,c),e=d.size,f=void 0===e?buttonPropSizeDefault:e,g=d.view,h=void 0===g?buttonPropViewDefault:g,i=d.width,j=void 0===i?buttonPropWidthDefault:i,k=d.form,l=void 0===k?buttonPropFormDefault:k,m=d.iconLeft,n=d.iconRight,o=d.label,p=d.className,q=d.onClick,r=d.disabled,s=d.loading,t=d.type,u=void 0===t?"button":t,v=d.tabIndex,w=d.as,x=void 0===w?"button":w,y=d.onlyIcon,z=d.iconSize,A=d.formId,B=_objectWithoutProperties(d,_excluded),C=(!o||y)&&(m||n),D=m,E=n,F=a.title||!!C&&o||void 0,G=C?getByMap(sizeMapOnlyIcon,f,z):getByMap(sizeMap,f,z);return React.createElement(x,Object.assign({},B,{onClick:q?function handleClick(a){r||s||!q||q(a)}:void 0,form:A,type:u,className:cnButton({size:f,view:h,width:j,form:mapStableForm[l],loading:s,disabled:r,withIcon:!!m||!!n,onlyIcon:!!C},[r||s?void 0:cnMixFocus(),p]),disabled:r,tabIndex:v,title:F,ref:useForkRef([b,c])}),C&&React.createElement(C,{className:cnButton("Icon"),size:G}),!C&&((D||E)&&o?React.createElement(React.Fragment,null,D&&React.createElement(D,{className:cnButton("Icon",{position:"left"}),size:G}),React.createElement("span",{className:cnButton("Label")},o),E&&React.createElement(E,{className:cnButton("Icon",{position:"right"}),size:G})):o),s&&React.createElement("div",{className:cnButton("Loader")},React.createElement(Loader,{size:"s"})))});
2
2
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["React","useRef","useForkRef","cnMixFocus","cn","getByMap","forwardRefWithAs","usePropsHandler","Loader","buttonPropSize","buttonPropSizeDefault","buttonPropView","buttonPropViewDefault","buttonPropWidth","buttonPropWidthDefault","buttonPropForm","mapStableForm","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clearClear","buttonPropFormDefault","COMPONENT_NAME","cnButton","sizeMap","xs","s","m","l","sizeMapOnlyIcon","Button","props","ref","buttonRef","size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSizeProp","iconSize","formId","otherProps","IconOnly","IconLeft","IconRight","title","handleClick","e","withIcon","position"],"sources":["../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import './Button.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React, { HTMLProps, useRef } from 'react';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport { Loader } from '../LoaderDeprecated/LoaderDeprecated';\n\nexport const buttonPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ButtonPropSize = typeof buttonPropSize[number];\nexport const buttonPropSizeDefault: ButtonPropSize = buttonPropSize[0];\n\nexport const buttonPropView = [\n 'primary',\n 'clear',\n 'ghost',\n 'secondary',\n] as const;\nexport type ButtonPropView = typeof buttonPropView[number];\nexport const buttonPropViewDefault: ButtonPropView = buttonPropView[0];\n\nexport const buttonPropWidth = ['default', 'full'] as const;\nexport type ButtonPropWidth = typeof buttonPropWidth[number];\nexport const buttonPropWidthDefault: ButtonPropWidth = buttonPropWidth[0];\n\nexport const buttonPropForm = [\n 'default',\n 'brick',\n 'round',\n 'brickRound',\n 'roundBrick',\n 'brickDefault',\n 'defaultBrick',\n] as const;\n\nexport type ButtonPropForm = typeof buttonPropForm[number];\n\ntype GlobalForm =\n | 'default'\n | 'brick'\n | 'round'\n | 'brickRound'\n | 'roundBrick'\n | 'brickDefault'\n | 'defaultBrick'\n | 'defaultClear'\n | 'brickClear'\n | 'roundClear'\n | 'clearRound'\n | 'clearDefault'\n | 'clearBrick'\n | 'clearClear';\n\nconst mapStableForm: Record<GlobalForm, ButtonPropForm> = {\n default: 'default',\n defaultClear: 'defaultBrick',\n defaultBrick: 'defaultBrick',\n brick: 'brick',\n brickDefault: 'brickDefault',\n brickClear: 'brick',\n brickRound: 'brickRound',\n round: 'round',\n roundClear: 'roundBrick',\n roundBrick: 'roundBrick',\n clearRound: 'brickRound',\n clearDefault: 'brickDefault',\n clearBrick: 'brick',\n clearClear: 'brick',\n};\n\nexport const buttonPropFormDefault = buttonPropForm[0];\n\nexport type Props = {\n size?: ButtonPropSize;\n view?: ButtonPropView;\n width?: ButtonPropWidth;\n form?: ButtonPropForm;\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n label?: string | number;\n onClick?: React.EventHandler<React.MouseEvent>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n title?: string;\n children?: never;\n type?: 'button' | 'reset' | 'submit';\n formId?: HTMLProps<HTMLButtonElement>['form'];\n};\n\nexport const COMPONENT_NAME = 'Button' as const;\nexport const cnButton = cn(COMPONENT_NAME);\n\nconst sizeMap: Record<ButtonPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst sizeMapOnlyIcon: Record<ButtonPropSize, IconPropSize> = {\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'm',\n};\n\nexport const Button = forwardRefWithAs<Props, 'button'>((props, ref) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const {\n size = buttonPropSizeDefault,\n view = buttonPropViewDefault,\n width = buttonPropWidthDefault,\n form = buttonPropFormDefault,\n iconLeft,\n iconRight,\n label,\n className,\n onClick,\n disabled,\n loading,\n type = 'button',\n tabIndex,\n as = 'button',\n onlyIcon,\n iconSize: iconSizeProp,\n formId,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, buttonRef);\n\n const Tag = as as string;\n const IconOnly = (!label || onlyIcon) && (iconLeft || iconRight);\n const IconLeft = iconLeft;\n const IconRight = iconRight;\n const withIcon = !!iconLeft || !!iconRight;\n const title = props.title || (!!IconOnly && label) || undefined;\n const iconSize = IconOnly\n ? getByMap(sizeMapOnlyIcon, size, iconSizeProp)\n : getByMap(sizeMap, size, iconSizeProp);\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!disabled && !loading && onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick ? handleClick : undefined}\n form={formId}\n type={type}\n className={cnButton(\n {\n size,\n view,\n width,\n form: mapStableForm[form],\n loading,\n disabled,\n withIcon,\n onlyIcon: !!IconOnly,\n },\n [!(disabled || loading) ? cnMixFocus() : undefined, className],\n )}\n disabled={disabled}\n tabIndex={tabIndex}\n title={title}\n ref={useForkRef([ref, buttonRef])}\n >\n {IconOnly && <IconOnly className={cnButton('Icon')} size={iconSize} />}\n {!IconOnly &&\n ((IconLeft || IconRight) && label ? (\n <>\n {IconLeft && (\n <IconLeft\n className={cnButton('Icon', { position: 'left' })}\n size={iconSize}\n />\n )}\n <span className={cnButton('Label')}>{label}</span>\n {IconRight && (\n <IconRight\n className={cnButton('Icon', { position: 'right' })}\n size={iconSize}\n />\n )}\n </>\n ) : (\n label\n ))}\n {loading && <Loader className={cnButton('Loader')} size=\"s\" />}\n </Tag>\n );\n});\n"],"mappings":"kQAAA,qBAGA,MAAOA,MAAP,EAA2BC,MAA3B,KAAyC,OAAzC,CAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CACA,OAASC,eAAT,2CACA,OAASC,MAAT,4CAEA,MAAO,IAAMC,eAAc,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAvB,CAEP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,eAAc,CAAG,CAC5B,SAD4B,CAE5B,OAF4B,CAG5B,OAH4B,CAI5B,WAJ4B,CAAvB,CAOP,MAAO,IAAMC,sBAAqC,CAAGD,cAAc,CAAC,CAAD,CAA5D,CAEP,MAAO,IAAME,gBAAe,CAAG,CAAC,SAAD,CAAY,MAAZ,CAAxB,CAEP,MAAO,IAAMC,uBAAuC,CAAGD,eAAe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,MAAD,EAAQ,SAAS,CAAErB,QAAQ,CAAC,QAAD,CAA3B,CAAuC,IAAI,CAAC,GAA5C,EA5Cd,CA+CH,CAxFqC,CAA/B"}
1
+ {"version":3,"file":"Button.js","names":["React","useRef","Loader","useForkRef","cnMixFocus","cn","getByMap","forwardRefWithAs","usePropsHandler","buttonPropSize","buttonPropSizeDefault","buttonPropView","buttonPropViewDefault","buttonPropWidth","buttonPropWidthDefault","buttonPropForm","mapStableForm","defaultClear","defaultBrick","brick","brickDefault","brickClear","brickRound","round","roundClear","roundBrick","clearRound","clearDefault","clearBrick","clearClear","buttonPropFormDefault","COMPONENT_NAME","cnButton","sizeMap","xs","s","m","l","sizeMapOnlyIcon","Button","props","ref","buttonRef","size","view","width","form","iconLeft","iconRight","label","className","onClick","disabled","loading","type","tabIndex","as","onlyIcon","iconSizeProp","iconSize","formId","otherProps","IconOnly","IconLeft","IconRight","title","handleClick","e","withIcon","position"],"sources":["../../../../../src/components/Button/Button.tsx"],"sourcesContent":["import './Button.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport React, { HTMLProps, useRef } from 'react';\n\nimport { Loader } from '##/components/Loader';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { cnMixFocus } from '../../mixs/MixFocus/MixFocus';\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\n\nexport const buttonPropSize = ['m', 'xs', 's', 'l'] as const;\nexport type ButtonPropSize = typeof buttonPropSize[number];\nexport const buttonPropSizeDefault: ButtonPropSize = buttonPropSize[0];\n\nexport const buttonPropView = [\n 'primary',\n 'clear',\n 'ghost',\n 'secondary',\n] as const;\nexport type ButtonPropView = typeof buttonPropView[number];\nexport const buttonPropViewDefault: ButtonPropView = buttonPropView[0];\n\nexport const buttonPropWidth = ['default', 'full'] as const;\nexport type ButtonPropWidth = typeof buttonPropWidth[number];\nexport const buttonPropWidthDefault: ButtonPropWidth = buttonPropWidth[0];\n\nexport const buttonPropForm = [\n 'default',\n 'brick',\n 'round',\n 'brickRound',\n 'roundBrick',\n 'brickDefault',\n 'defaultBrick',\n] as const;\n\nexport type ButtonPropForm = typeof buttonPropForm[number];\n\ntype GlobalForm =\n | 'default'\n | 'brick'\n | 'round'\n | 'brickRound'\n | 'roundBrick'\n | 'brickDefault'\n | 'defaultBrick'\n | 'defaultClear'\n | 'brickClear'\n | 'roundClear'\n | 'clearRound'\n | 'clearDefault'\n | 'clearBrick'\n | 'clearClear';\n\nconst mapStableForm: Record<GlobalForm, ButtonPropForm> = {\n default: 'default',\n defaultClear: 'defaultBrick',\n defaultBrick: 'defaultBrick',\n brick: 'brick',\n brickDefault: 'brickDefault',\n brickClear: 'brick',\n brickRound: 'brickRound',\n round: 'round',\n roundClear: 'roundBrick',\n roundBrick: 'roundBrick',\n clearRound: 'brickRound',\n clearDefault: 'brickDefault',\n clearBrick: 'brick',\n clearClear: 'brick',\n};\n\nexport const buttonPropFormDefault = buttonPropForm[0];\n\nexport type Props = {\n size?: ButtonPropSize;\n view?: ButtonPropView;\n width?: ButtonPropWidth;\n form?: ButtonPropForm;\n tabIndex?: number;\n disabled?: boolean;\n loading?: boolean;\n label?: string | number;\n onClick?: React.EventHandler<React.MouseEvent>;\n iconLeft?: IconComponent;\n iconRight?: IconComponent;\n onlyIcon?: boolean;\n iconSize?: IconPropSize;\n title?: string;\n children?: never;\n type?: 'button' | 'reset' | 'submit';\n formId?: HTMLProps<HTMLButtonElement>['form'];\n};\n\nexport const COMPONENT_NAME = 'Button' as const;\nexport const cnButton = cn(COMPONENT_NAME);\n\nconst sizeMap: Record<ButtonPropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 'm',\n};\n\nconst sizeMapOnlyIcon: Record<ButtonPropSize, IconPropSize> = {\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'm',\n};\n\nexport const Button = forwardRefWithAs<Props, 'button'>((props, ref) => {\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n\n const {\n size = buttonPropSizeDefault,\n view = buttonPropViewDefault,\n width = buttonPropWidthDefault,\n form = buttonPropFormDefault,\n iconLeft,\n iconRight,\n label,\n className,\n onClick,\n disabled,\n loading,\n type = 'button',\n tabIndex,\n as = 'button',\n onlyIcon,\n iconSize: iconSizeProp,\n formId,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, buttonRef);\n\n const Tag = as as string;\n const IconOnly = (!label || onlyIcon) && (iconLeft || iconRight);\n const IconLeft = iconLeft;\n const IconRight = iconRight;\n const withIcon = !!iconLeft || !!iconRight;\n const title = props.title || (!!IconOnly && label) || undefined;\n const iconSize = IconOnly\n ? getByMap(sizeMapOnlyIcon, size, iconSizeProp)\n : getByMap(sizeMap, size, iconSizeProp);\n\n const handleClick = (e: React.MouseEvent<HTMLElement>) => {\n if (!disabled && !loading && onClick) {\n onClick(e);\n }\n };\n\n return (\n <Tag\n {...otherProps}\n onClick={onClick ? handleClick : undefined}\n form={formId}\n type={type}\n className={cnButton(\n {\n size,\n view,\n width,\n form: mapStableForm[form],\n loading,\n disabled,\n withIcon,\n onlyIcon: !!IconOnly,\n },\n [!(disabled || loading) ? cnMixFocus() : undefined, className],\n )}\n disabled={disabled}\n tabIndex={tabIndex}\n title={title}\n ref={useForkRef([ref, buttonRef])}\n >\n {IconOnly && <IconOnly className={cnButton('Icon')} size={iconSize} />}\n {!IconOnly &&\n ((IconLeft || IconRight) && label ? (\n <>\n {IconLeft && (\n <IconLeft\n className={cnButton('Icon', { position: 'left' })}\n size={iconSize}\n />\n )}\n <span className={cnButton('Label')}>{label}</span>\n {IconRight && (\n <IconRight\n className={cnButton('Icon', { position: 'right' })}\n size={iconSize}\n />\n )}\n </>\n ) : (\n label\n ))}\n {loading && (\n <div className={cnButton('Loader')}>\n <Loader size=\"s\" />\n </div>\n )}\n </Tag>\n );\n});\n"],"mappings":"k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oBAAC,CAAD,EAAU,SAAS,CAAE9B,QAAQ,CAAC,MAAD,CAA7B,CAAuC,IAAI,CAAE2B,CAA7C,EAvBf,CAwBG,CAACG,CAAD,GACE,CAACC,CAAQ,EAAIC,CAAb,GAA2Bf,CAA3B,CACC,wCACGc,CAAQ,EACP,oBAAC,CAAD,EACE,SAAS,CAAE/B,QAAQ,CAAC,MAAD,CAAS,CAAEqC,QAAQ,CAAE,MAAZ,CAAT,CADrB,CAEE,IAAI,CAAEV,CAFR,EAFJ,CAOE,4BAAM,SAAS,CAAE3B,QAAQ,CAAC,OAAD,CAAzB,EAAqCiB,CAArC,CAPF,CAQGe,CAAS,EACR,oBAAC,CAAD,EACE,SAAS,CAAEhC,QAAQ,CAAC,MAAD,CAAS,CAAEqC,QAAQ,CAAE,OAAZ,CAAT,CADrB,CAEE,IAAI,CAAEV,CAFR,EATJ,CADD,CAiBCV,CAlBH,CAxBH,CA4CGI,CAAO,EACN,2BAAK,SAAS,CAAErB,QAAQ,CAAC,QAAD,CAAxB,EACE,oBAAC,MAAD,EAAQ,IAAI,CAAC,GAAb,EADF,CA7CJ,CAmDH,CA5FqC,CAA/B"}
@@ -12,13 +12,10 @@ export declare const withDefaultGetters: (props: CheckboxGroupProps) => {
12
12
  name?: string | undefined;
13
13
  direction?: "row" | "column" | undefined;
14
14
  align?: "center" | "top" | undefined;
15
- size?: "s" | "m" | "xs" | "l" | undefined;
15
+ size?: "xs" | "s" | "m" | "l" | undefined;
16
16
  view?: "primary" | "ghost" | undefined;
17
17
  disabled?: boolean | undefined;
18
18
  className?: string | undefined;
19
- slot?: string | undefined;
20
- style?: import("react").CSSProperties | undefined;
21
- title?: string | undefined;
22
19
  defaultChecked?: boolean | undefined;
23
20
  defaultValue?: string | number | readonly string[] | undefined;
24
21
  suppressContentEditableWarning?: boolean | undefined;
@@ -32,8 +29,11 @@ export declare const withDefaultGetters: (props: CheckboxGroupProps) => {
32
29
  id?: string | undefined;
33
30
  lang?: string | undefined;
34
31
  placeholder?: string | undefined;
32
+ slot?: string | undefined;
35
33
  spellCheck?: (boolean | "true" | "false") | undefined;
34
+ style?: import("react").CSSProperties | undefined;
36
35
  tabIndex?: number | undefined;
36
+ title?: string | undefined;
37
37
  translate?: "yes" | "no" | undefined;
38
38
  radioGroup?: string | undefined;
39
39
  role?: import("react").AriaRole | undefined;
@@ -57,7 +57,7 @@ export declare const withDefaultGetters: (props: CheckboxGroupProps) => {
57
57
  results?: number | undefined;
58
58
  security?: string | undefined;
59
59
  unselectable?: "on" | "off" | undefined;
60
- inputMode?: "search" | "text" | "email" | "tel" | "url" | "none" | "numeric" | "decimal" | undefined;
60
+ inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
61
61
  is?: string | undefined;
62
62
  'aria-activedescendant'?: string | undefined;
63
63
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
@@ -68,7 +68,7 @@ export declare const withDefaultGetters: (props: CheckboxGroupProps) => {
68
68
  'aria-colindex'?: number | undefined;
69
69
  'aria-colspan'?: number | undefined;
70
70
  'aria-controls'?: string | undefined;
71
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
71
+ 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
72
72
  'aria-describedby'?: string | undefined;
73
73
  'aria-details'?: string | undefined;
74
74
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
@@ -10,7 +10,7 @@ export declare const defaultGetItemAs: ChipsPropGetItemAs<ChipsDefaultItem>;
10
10
  export declare const defaultGetItemAttributes: ChipsPropGetItemAttributes<ChipsDefaultItem>;
11
11
  export declare const defaultGetItemRef: ChipsPropGetItemRef<ChipsDefaultItem>;
12
12
  export declare function withDefaultGetters<ITEM>(props: ChipsProps<ITEM>): {
13
- size?: "s" | "m" | "xs" | "l" | undefined;
13
+ size?: "xs" | "s" | "m" | "l" | undefined;
14
14
  activeView?: "primary" | "secondary" | undefined;
15
15
  items: ITEM[];
16
16
  interactive?: boolean | undefined;
@@ -26,7 +26,7 @@ export declare function withDefaultGetters<ITEM>(props: ChipsProps<ITEM>): {
26
26
  getItemDisabled?: ChipsPropGetItemDisabled<ITEM> | undefined;
27
27
  onItemClick?: import("./types").ChipsPropOnItemClick<ITEM> | undefined;
28
28
  onItemRightIconClick?: import("./types").ChipsPropItemOnRightIconClick<ITEM> | undefined;
29
- } & Omit<import("react").HTMLAttributes<HTMLDivElement>, "disabled" | "size" | "css" | "items" | "getItemLabel" | "getItemDisabled" | "getItemStatus" | "onItemClick" | "getItemActive" | "getItemAs" | "getItemAttributes" | "getItemRef" | "interactive" | "getItemIconLeft" | "getItemIconRight" | "activeView" | "onItemRightIconClick"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
29
+ } & Omit<import("react").HTMLAttributes<HTMLDivElement>, "css" | "size" | "disabled" | "items" | "getItemLabel" | "getItemDisabled" | "getItemStatus" | "onItemClick" | "getItemActive" | "getItemAs" | "getItemAttributes" | "getItemRef" | "interactive" | "getItemIconLeft" | "getItemIconRight" | "activeView" | "onItemRightIconClick"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
30
30
  label: string;
31
31
  } ? {} : {
32
32
  getItemLabel: ChipsPropGetItemLabel<ITEM>;
@@ -3,11 +3,11 @@ import React from 'react';
3
3
  export declare const ChoiceGroupItem: React.ForwardRefExoticComponent<{
4
4
  icon?: IconComponent<"span"> | undefined;
5
5
  onlyIcon?: boolean | undefined;
6
- iconSize?: "s" | "m" | "xs" | "l" | undefined;
6
+ iconSize?: "xs" | "s" | "m" | "l" | undefined;
7
7
  label: string;
8
8
  name: string;
9
9
  onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
10
10
  checked: boolean;
11
11
  multiple: boolean;
12
12
  disabled?: boolean | undefined;
13
- } & Omit<React.HTMLAttributes<HTMLLabelElement>, "label" | "name" | "onChange" | "disabled" | "checked" | "multiple" | "css" | "icon" | "iconSize" | "onlyIcon"> & React.RefAttributes<HTMLLabelElement>>;
13
+ } & Omit<React.HTMLAttributes<HTMLLabelElement>, "css" | "onChange" | "label" | "name" | "disabled" | "checked" | "multiple" | "icon" | "iconSize" | "onlyIcon"> & React.RefAttributes<HTMLLabelElement>>;