@consta/uikit 5.15.0 → 5.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__internal__/src/components/Attachment/Attachment.css +1 -1
- package/__internal__/src/components/Attachment/Attachment.js +1 -1
- package/__internal__/src/components/Attachment/Attachment.js.map +1 -1
- package/__internal__/src/components/Attachment/types.d.ts +23 -4
- package/__internal__/src/components/Attachment/types.js.map +1 -1
- package/__internal__/src/components/AutoComplete/helpers.d.ts +1 -1
- package/__internal__/src/components/AutoCompleteCanary/helpers.d.ts +1 -1
- package/__internal__/src/components/AvatarGroup/helpers.d.ts +6 -6
- package/__internal__/src/components/BadgeGroup/helper.d.ts +2 -2
- package/__internal__/src/components/BookmarkTabs/helper.d.ts +6 -6
- package/__internal__/src/components/Breadcrumbs/helpers.d.ts +6 -6
- package/__internal__/src/components/Button/Button.css +1 -1
- package/__internal__/src/components/Button/Button.js +1 -1
- package/__internal__/src/components/Button/Button.js.map +1 -1
- package/__internal__/src/components/CheckboxGroup/helper.d.ts +6 -6
- package/__internal__/src/components/Chips/helpers.d.ts +2 -2
- package/__internal__/src/components/ChoiceGroup/Item/ChoiceGroup-Item.d.ts +2 -2
- package/__internal__/src/components/ChoiceGroup/helper.d.ts +7 -7
- package/__internal__/src/components/CollapseGroup/helpers.d.ts +10 -10
- package/__internal__/src/components/Combobox/helpers.d.ts +3 -3
- package/__internal__/src/components/ComboboxDeprecated/helpers.d.ts +3 -3
- package/__internal__/src/components/ContextMenu/ContextMenuLevelWrapper/ContextMenuLevelWrapper.d.ts +1 -1
- package/__internal__/src/components/ContextMenu/helpers.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDate/DatePickerFieldTypeDate.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateRange/DatePickerFieldTypeDateRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTime/DatePickerFieldTypeDateTime.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeDateTimeRange/DatePickerFieldTypeDateTimeRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonth/DatePickerFieldTypeMonth.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeMonthRange/DatePickerFieldTypeMonthRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeTime/DatePickerFieldTypeTime.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYear/DatePickerFieldTypeYear.d.ts +4 -4
- package/__internal__/src/components/DatePicker/DatePickerFieldTypeYearRange/DatePickerFieldTypeYearRange.d.ts +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateRange/DatePickerTypeDateRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTime/DatePickerTypeDateTime.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeDateTimeRange/DatePickerTypeDateTimeRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeMonthRange/DatePickerTypeMonthRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js +1 -1
- package/__internal__/src/components/DatePicker/DatePickerTypeYearRange/DatePickerTypeYearRange.js.map +1 -1
- package/__internal__/src/components/DatePicker/timeForMap.d.ts +2 -0
- package/__internal__/src/components/DatePicker/timeForMap.js +2 -0
- package/__internal__/src/components/DatePicker/timeForMap.js.map +1 -0
- package/__internal__/src/components/DateTime/DateTimeItem/DateTimeItem.d.ts +1 -1
- package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.d.ts +2 -1
- package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.js +1 -1
- package/__internal__/src/components/DateTime/helpers/useCurrentVisibleDate.js.map +1 -1
- package/__internal__/src/components/DragNDropField/DragNDropField.d.ts +1 -1
- package/__internal__/src/components/DragNDropFieldCanary/DragNDropFieldCanary.d.ts +1 -1
- package/__internal__/src/components/EventInterceptor/propsHandlers/useCheckboxEventsHandler.d.ts +2 -2
- package/__internal__/src/components/FieldComponents/FieldButton/FieldButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldClearButton/FieldClearButton.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldControlLayout/FieldControlLayout.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldCounter/FieldCounter.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldIcon/FieldIcon.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldInput/FieldInput.d.ts +1 -1
- package/__internal__/src/components/FieldComponents/FieldToggleVisiblePasswordButton/FieldToggleVisiblePasswordButton.d.ts +1 -1
- package/__internal__/src/components/FieldGroup/FieldGroup.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListAddItem/ListAddItem.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListBox/ListBox.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListDivider/ListDivider.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListGroupLabel/ListGroupLabel.d.ts +1 -1
- package/__internal__/src/components/ListCanary/ListLoader/ListLoader.d.ts +1 -1
- package/__internal__/src/components/ListCanary/helper.d.ts +1 -1
- package/__internal__/src/components/Loader/Loader.css +1 -3
- package/__internal__/src/components/Loader/Loader.d.ts +6 -2
- package/__internal__/src/components/Loader/Loader.js +1 -1
- package/__internal__/src/components/Loader/Loader.js.map +1 -1
- package/__internal__/src/components/Loader/types.d.ts +6 -4
- package/__internal__/src/components/Loader/types.js +1 -1
- package/__internal__/src/components/Loader/types.js.map +1 -1
- package/__internal__/src/components/Modal/Modal.js.map +1 -1
- package/__internal__/src/components/Pagination/PaginationArrow/PaginationArrow.d.ts +2 -2
- package/__internal__/src/components/Pagination/PaginationNumberInput/PaginationNumberInput.d.ts +2 -2
- package/__internal__/src/components/Picture/Picture.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.d.ts +1 -1
- package/__internal__/src/components/Popover/Popover.js.map +1 -1
- package/__internal__/src/components/ProgressLine/helpers.d.ts +5 -5
- package/__internal__/src/components/ProgressStepBar/helpers.d.ts +2 -2
- package/__internal__/src/components/RadioGroup/helper.d.ts +6 -6
- package/__internal__/src/components/Responses/Responses.d.ts +1 -1
- package/__internal__/src/components/Select/helpers.d.ts +3 -3
- package/__internal__/src/components/SelectComponents/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectComponentsDeprecated/SelectContainer/SelectContainer.d.ts +1 -1
- package/__internal__/src/components/SelectDeprecated/helpers.d.ts +3 -3
- package/__internal__/src/components/SnackBar/helper.d.ts +5 -5
- package/__internal__/src/components/Steps/helper.d.ts +5 -5
- package/__internal__/src/components/Switch/Switch.d.ts +2 -2
- package/__internal__/src/components/SwitchGroup/helpers.d.ts +6 -6
- package/__internal__/src/components/Table/Resizer/TableResizer.js.map +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js +1 -1
- package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js.map +1 -1
- package/__internal__/src/components/Tabs/helpers.d.ts +21 -21
- package/__internal__/src/components/Tag/Tag.d.ts +1 -0
- package/__internal__/src/components/Tag/Tag.js.map +1 -1
- package/__internal__/src/components/TagBase/TagBase.css +1 -1
- package/__internal__/src/components/TagBase/TagBase.d.ts +3 -1
- package/__internal__/src/components/TagBase/TagBase.js +1 -1
- package/__internal__/src/components/TagBase/TagBase.js.map +1 -1
- package/__internal__/src/components/ThemeToggler/helpers.d.ts +7 -7
- package/__internal__/src/components/Timer/Timer.d.ts +1 -1
- package/__internal__/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/__internal__/src/components/TooltipDeprecated/TooltipDeprecated.d.ts +1 -1
- package/__internal__/src/components/UserSelect/UserSelectItem/UserSelectItem.d.ts +1 -1
- package/__internal__/src/components/UserSelect/helpers.d.ts +2 -2
- package/__internal__/src/components/UserSelectDeprecated/helpers.d.ts +2 -2
- package/__internal__/src/fileIcons/FileIcon/FileIcon.d.ts +1 -1
- package/__internal__/src/hocs/withTooltip/withTooltip.js.map +1 -1
- package/__internal__/src/hooks/useBreakpointsDeprecated/useBreakpointsDeprecated.d.ts +1 -1
- package/__internal__/src/hooks/useClickOutside/useClickOutside.js.map +1 -1
- package/__internal__/src/uiKit/components/ThemePreview/helpers.d.ts +7 -7
- package/__internal__/src/uiKit/components/ThemePreview/helpers.js +1 -1
- package/__internal__/src/uiKit/components/ThemePreview/helpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.Attachment{background:var(--color-control-bg-clear);border-radius:var(--control-radius);box-sizing:border-box;
|
|
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","
|
|
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","
|
|
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,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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
|
|
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>, "
|
|
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">, "
|
|
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?: "
|
|
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" | "
|
|
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" | "
|
|
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;
|
|
@@ -13,11 +13,11 @@ export declare function withDefaultGetters<ITEM>(props: BadgeGroupProps<ITEM>):
|
|
|
13
13
|
getItemAs?: BadgeGroupPropGetItemAs<ITEM> | undefined;
|
|
14
14
|
getItemAttributes?: BadgeGroupPropGetItemAttributes<ITEM> | undefined;
|
|
15
15
|
form?: "default" | "round" | undefined;
|
|
16
|
-
size?: "
|
|
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>, "
|
|
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?: "
|
|
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" | "
|
|
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" | "
|
|
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?: "
|
|
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" | "
|
|
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" | "
|
|
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{--
|
|
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";
|
|
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,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AIC,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,EAAI,oBAAC,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":"kQAAA,qBAGA,MAAOA,MAAP,EAA2BC,MAA3B,KAAyC,OAAzC,CAEA,OAASC,MAAT,iBAEA,OAASC,UAAT,yCACA,OAASC,UAAT,oCACA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CACA,OAASC,eAAT,2CAEA,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,CAAC,CAAD,CAA/D,CAEP,MAAO,IAAME,eAAc,CAAG,CAC5B,SAD4B,CAE5B,OAF4B,CAG5B,OAH4B,CAI5B,YAJ4B,CAK5B,YAL4B,CAM5B,cAN4B,CAO5B,cAP4B,CAAvB,CA4BP,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ckboxGroupProps) => {
|
|
|
12
12
|
name?: string | undefined;
|
|
13
13
|
direction?: "row" | "column" | undefined;
|
|
14
14
|
align?: "center" | "top" | undefined;
|
|
15
|
-
size?: "
|
|
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" | "
|
|
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" | "
|
|
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?: "
|
|
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>, "
|
|
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?: "
|
|
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>, "
|
|
13
|
+
} & Omit<React.HTMLAttributes<HTMLLabelElement>, "css" | "onChange" | "label" | "name" | "disabled" | "checked" | "multiple" | "icon" | "iconSize" | "onlyIcon"> & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -6,12 +6,12 @@ export declare const withDefaultGetters: (props: ChoiceGroupProps) => {
|
|
|
6
6
|
getItemDisabled: ChoiceGroupPropGetItemDisabled<ChoiceGroupDefaultItem>;
|
|
7
7
|
getItemAttributes: ChoiceGroupPropGetItemAttributes<ChoiceGroupDefaultItem>;
|
|
8
8
|
getItemRef: ChoiceGroupPropGetItemRef<ChoiceGroupDefaultItem>;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
10
10
|
form?: "default" | "brick" | "round" | undefined;
|
|
11
11
|
view?: "primary" | "ghost" | "secondary" | undefined;
|
|
12
12
|
width?: "default" | "full" | undefined;
|
|
13
13
|
onlyIcon?: boolean | undefined;
|
|
14
|
-
iconSize?: "
|
|
14
|
+
iconSize?: "xs" | "s" | "m" | "l" | undefined;
|
|
15
15
|
items: ChoiceGroupDefaultItem[];
|
|
16
16
|
name: string;
|
|
17
17
|
disabled?: boolean | undefined;
|
|
@@ -20,9 +20,6 @@ export declare const withDefaultGetters: (props: ChoiceGroupProps) => {
|
|
|
20
20
|
multiple?: false | undefined;
|
|
21
21
|
truncate?: boolean | undefined;
|
|
22
22
|
children?: 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: ChoiceGroupProps) => {
|
|
|
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: ChoiceGroupProps) => {
|
|
|
62
62
|
results?: number | undefined;
|
|
63
63
|
security?: string | undefined;
|
|
64
64
|
unselectable?: "on" | "off" | undefined;
|
|
65
|
-
inputMode?: "search" | "text" | "
|
|
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: ChoiceGroupProps) => {
|
|
|
73
73
|
'aria-colindex'?: number | undefined;
|
|
74
74
|
'aria-colspan'?: number | undefined;
|
|
75
75
|
'aria-controls'?: string | undefined;
|
|
76
|
-
'aria-current'?: boolean | "time" | "
|
|
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;
|