@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
|
@@ -8,13 +8,10 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
8
8
|
onChange?: import("./types").SwitchGroupPropOnChange<SwitchGroupDefaultItem> | undefined;
|
|
9
9
|
name: string;
|
|
10
10
|
direction?: "row" | "column" | undefined;
|
|
11
|
-
size?: "
|
|
11
|
+
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
12
12
|
view?: "primary" | "ghost" | undefined;
|
|
13
13
|
disabled?: boolean | undefined;
|
|
14
14
|
className?: string | 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;
|
|
@@ -28,8 +25,11 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
28
25
|
id?: string | undefined;
|
|
29
26
|
lang?: string | undefined;
|
|
30
27
|
placeholder?: string | undefined;
|
|
28
|
+
slot?: string | undefined;
|
|
31
29
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
30
|
+
style?: import("react").CSSProperties | undefined;
|
|
32
31
|
tabIndex?: number | undefined;
|
|
32
|
+
title?: string | undefined;
|
|
33
33
|
translate?: "yes" | "no" | undefined;
|
|
34
34
|
radioGroup?: string | undefined;
|
|
35
35
|
role?: import("react").AriaRole | undefined;
|
|
@@ -53,7 +53,7 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
53
53
|
results?: number | undefined;
|
|
54
54
|
security?: string | undefined;
|
|
55
55
|
unselectable?: "on" | "off" | undefined;
|
|
56
|
-
inputMode?: "search" | "text" | "
|
|
56
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
57
57
|
is?: string | undefined;
|
|
58
58
|
'aria-activedescendant'?: string | undefined;
|
|
59
59
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -64,7 +64,7 @@ export declare const withDefaultGetters: (props: SwitchGroupProps) => {
|
|
|
64
64
|
'aria-colindex'?: number | undefined;
|
|
65
65
|
'aria-colspan'?: number | undefined;
|
|
66
66
|
'aria-controls'?: string | undefined;
|
|
67
|
-
'aria-current'?: boolean | "time" | "
|
|
67
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
68
68
|
'aria-describedby'?: string | undefined;
|
|
69
69
|
'aria-details'?: string | undefined;
|
|
70
70
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableResizer.js","names":["React","cn","cnTableResizer","TableResizer","isDragging","setState","document","addEventListener","onMouseMove","onMouseUp","e","movementX","props","onResize","removeListeners","removeEventListener","state","isVisible","height","top","onMouseDown","onDoubleClick","Component"],"sources":["../../../../../../src/components/Table/Resizer/TableResizer.tsx"],"sourcesContent":["import './TableResizer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\n\nconst cnTableResizer = cn('TableResizer');\n\ntype Props = {\n height: number;\n top: number;\n isVisible?: boolean;\n onResize: (delta: number) => void;\n onDoubleClick: () => void;\n};\n\n/* Сделано классом, чтобы
|
|
1
|
+
{"version":3,"file":"TableResizer.js","names":["React","cn","cnTableResizer","TableResizer","isDragging","setState","document","addEventListener","onMouseMove","onMouseUp","e","movementX","props","onResize","removeListeners","removeEventListener","state","isVisible","height","top","onMouseDown","onDoubleClick","Component"],"sources":["../../../../../../src/components/Table/Resizer/TableResizer.tsx"],"sourcesContent":["import './TableResizer.css';\n\nimport React from 'react';\n\nimport { cn } from '../../../utils/bem';\n\nconst cnTableResizer = cn('TableResizer');\n\ntype Props = {\n height: number;\n top: number;\n isVisible?: boolean;\n onResize: (delta: number) => void;\n onDoubleClick: () => void;\n};\n\n/* Сделано классом, чтобы функции событий на document имели доступ к актуальному состоянию/пропсам без пересоздания подписок */\nexport class TableResizer extends React.Component<\n Props,\n { isDragging: boolean }\n> {\n state = {\n isDragging: false,\n };\n\n componentWillUnmount(): void {\n this.removeListeners();\n }\n\n onMouseDown = (): void => {\n this.setState({ isDragging: true });\n\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (e: MouseEvent): void => {\n if (e.movementX) {\n this.props.onResize(e.movementX);\n }\n };\n\n onMouseUp = (): void => {\n this.setState({ isDragging: false });\n\n this.removeListeners();\n };\n\n removeListeners = (): void => {\n document.removeEventListener('mousemove', this.onMouseMove);\n document.removeEventListener('mouseup', this.onMouseUp);\n };\n\n render(): JSX.Element {\n return (\n <div\n className={cnTableResizer({\n isDragging: this.state.isDragging,\n isVisible: this.props.isVisible,\n })}\n aria-hidden\n style={{ height: this.props.height, top: this.props.top }}\n onMouseDown={this.onMouseDown}\n onDoubleClick={this.props.onDoubleClick}\n />\n );\n }\n}\n"],"mapp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,CAACsB,SAAxC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{getVisibleTabsRange}from"../../helpers";describe("getVisibleTabsRange",function(){var a=[{size:100,gap:10},{size:100,gap:10},{size:100,gap:0}];it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u0435\u0441\u043B\u0438 \u0432\u0441\u0435 \u0432\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:330,scrollLeft:0,containerPaddingLeft:10})).toEqual([0,2])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u0435\u0441\u043B\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u043B\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \
|
|
1
|
+
import{getVisibleTabsRange}from"../../helpers";describe("getVisibleTabsRange",function(){var a=[{size:100,gap:10},{size:100,gap:10},{size:100,gap:0}];it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u0435\u0441\u043B\u0438 \u0432\u0441\u0435 \u0432\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:330,scrollLeft:0,containerPaddingLeft:10})).toEqual([0,2])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u0435\u0441\u043B\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u043B\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 \u043E\u0442\u0441\u0442\u0443\u043F",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:320,scrollLeft:10,containerPaddingLeft:10})).toEqual([0,2])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u043A\u0440\u043E\u043C\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E, \u0435\u0441\u043B\u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043D\u0435 \u0432\u043C\u0435\u0441\u0442\u0438\u043B\u0441\u044F \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:329,scrollLeft:0,containerPaddingLeft:10})).toEqual([0,1])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u0442\u0430\u0431\u044B, \u043A\u0440\u043E\u043C\u0435 \u043F\u0435\u0440\u0432\u043E\u0433\u043E, \u0435\u0441\u043B\u0438 \u043F\u0435\u0440\u0432\u044B\u0439 \u043D\u0435 \u0432\u0438\u0434\u0435\u043D \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E \u0438\u0437-\u0437\u0430 \u0441\u043A\u0440\u043E\u043B\u043B\u0430",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:319,scrollLeft:11,containerPaddingLeft:10})).toEqual([1,2])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0440\u0435\u0434\u043D\u0438\u0439 \u0442\u0430\u0431, \u0435\u0441\u043B\u0438 \u043F\u0435\u0440\u0432\u044B\u0439 \u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u043D\u0435 \u0432\u0438\u0434\u043D\u044B \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:318,scrollLeft:11,containerPaddingLeft:10})).toEqual([1,1])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0440\u0435\u0434\u043D\u0438\u0439 \u0442\u0430\u0431, \u0434\u0430\u0436\u0435 \u0435\u0441\u043B\u0438 \u043E\u043D \u043D\u0435 \u0432\u043B\u0435\u0437 \u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E, \u043D\u043E \u0432\u0438\u0434\u0435\u043D \u0435\u0433\u043E \u043B\u0435\u0432\u044B\u0439 \u043A\u0440\u0430\u0439",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:50,scrollLeft:110,containerPaddingLeft:10})).toEqual([1,1])}),it("\u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0435\u0440\u0432\u044B\u0439 \u0442\u0430\u0431, \u0435\u0441\u043B\u0438 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u0432\u043B\u0435\u0437\u0430\u0435\u0442",function(){expect(getVisibleTabsRange({tabsDimensions:a,containerWidth:10,scrollLeft:0,containerPaddingLeft:10})).toEqual([0,0])})});
|
|
2
2
|
//# sourceMappingURL=helpers.test.js.map
|
package/__internal__/src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.test.js","names":["getVisibleTabsRange","describe","tabsDimensions","size","gap","it","expect","containerWidth","scrollLeft","containerPaddingLeft","toEqual"],"sources":["../../../../../../../src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.ts"],"sourcesContent":["import { getVisibleTabsRange } from '../../helpers';\nimport { TabDimensions } from '../../types';\n\ndescribe('getVisibleTabsRange', () => {\n const tabsDimensions: TabDimensions[] = [\n {\n size: 100,\n gap: 10,\n },\n {\n size: 100,\n gap: 10,\n },\n {\n size: 100,\n gap: 0,\n },\n ];\n\n it('возвращает все табы, если все вмещаются', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 330,\n scrollLeft: 0,\n containerPaddingLeft: 10,\n }),\n ).toEqual([0, 2]);\n });\n\n it('возвращает все табы, если прокрутили только
|
|
1
|
+
{"version":3,"file":"helpers.test.js","names":["getVisibleTabsRange","describe","tabsDimensions","size","gap","it","expect","containerWidth","scrollLeft","containerPaddingLeft","toEqual"],"sources":["../../../../../../../src/components/Tabs/TabsFitModeScrollWrapper/__test__/helpers.test.ts"],"sourcesContent":["import { getVisibleTabsRange } from '../../helpers';\nimport { TabDimensions } from '../../types';\n\ndescribe('getVisibleTabsRange', () => {\n const tabsDimensions: TabDimensions[] = [\n {\n size: 100,\n gap: 10,\n },\n {\n size: 100,\n gap: 10,\n },\n {\n size: 100,\n gap: 0,\n },\n ];\n\n it('возвращает все табы, если все вмещаются', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 330,\n scrollLeft: 0,\n containerPaddingLeft: 10,\n }),\n ).toEqual([0, 2]);\n });\n\n it('возвращает все табы, если прокрутили только внутренний отступ', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 320,\n scrollLeft: 10,\n containerPaddingLeft: 10,\n }),\n ).toEqual([0, 2]);\n });\n\n it('возвращает все табы, кроме последнего, если последний не вместился полностью', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 329,\n scrollLeft: 0,\n containerPaddingLeft: 10,\n }),\n ).toEqual([0, 1]);\n });\n\n it('возвращает все табы, кроме первого, если первый не виден полностью из-за скролла', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 319,\n scrollLeft: 11,\n containerPaddingLeft: 10,\n }),\n ).toEqual([1, 2]);\n });\n\n it('возвращает только средний таб, если первый и последний не видны полностью', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 318,\n scrollLeft: 11,\n containerPaddingLeft: 10,\n }),\n ).toEqual([1, 1]);\n });\n\n it('возвращает только средний таб, даже если он не влез полностью, но виден его левый край', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 50,\n scrollLeft: 110,\n containerPaddingLeft: 10,\n }),\n ).toEqual([1, 1]);\n });\n\n it('возвращает только первый таб, если ничего не влезает', () => {\n expect(\n getVisibleTabsRange({\n tabsDimensions,\n containerWidth: 10,\n scrollLeft: 0,\n containerPaddingLeft: 10,\n }),\n ).toEqual([0, 0]);\n });\n});\n"],"mappings":"AAAA,OAASA,mBAAT,qBAGAC,QAAQ,CAAC,qBAAD,CAAwB,UAAM,CACpC,GAAMC,EAA+B,CAAG,CACtC,CACEC,IAAI,CAAE,GADR,CAEEC,GAAG,CAAE,EAFP,CADsC,CAKtC,CACED,IAAI,CAAE,GADR,CAEEC,GAAG,CAAE,EAFP,CALsC,CAStC,CACED,IAAI,CAAE,GADR,CAEEC,GAAG,CAAE,CAFP,CATsC,CAAxC,CAeAC,EAAE,CAAC,8MAAD,CAA4C,UAAM,CAClDC,MAAM,CACJN,mBAAmB,CAAC,CAClBE,cAAc,CAAdA,CADkB,CAElBK,cAAc,CAAE,GAFE,CAGlBC,UAAU,CAAE,CAHM,CAIlBC,oBAAoB,CAAE,EAJJ,CAAD,CADf,CAAN,CAOEC,OAPF,CAOU,CAAC,CAAD,CAAI,CAAJ,CAPV,CAQD,CATC,CAhBkC,CA2BpCL,EAAE,CAAC,wUAAD,CAAkE,UAAM,CACxEC,MAAM,CACJN,mBAAmB,CAAC,CAClBE,cAAc,CAAdA,CADkB,CAElBK,cAAc,CAAE,GAFE,CAGlBC,UAAU,CAAE,EAHM,CAIlBC,oBAAoB,CAAE,EAJJ,CAAD,CADf,CAAN,CAOEC,OAPF,CAOU,CAAC,CAAD,CAAI,CAAJ,CAPV,CAQD,CATC,CA3BkC,CAsCpCL,EAAE,CAAC,mZAAD,CAAiF,UAAM,CACvFC,MAAM,CACJN,mBAAmB,CA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U,CAAC,CAAD,CAAI,CAAJ,CAPV,CAQD,CATC,CAUH,CA5FO,C"}
|
|
@@ -14,10 +14,10 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
14
14
|
getItemAs: TabsPropGetItemAs<TabsItemDefault>;
|
|
15
15
|
getItemAttributes: TabsPropGetItemAttributes<TabsItemDefault>;
|
|
16
16
|
getItemRef: TabsPropGetItemRef<TabsItemDefault>;
|
|
17
|
-
size?: "
|
|
17
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
18
18
|
onlyIcon?: boolean | undefined;
|
|
19
19
|
view?: "clear" | "bordered" | undefined;
|
|
20
|
-
iconSize?: "
|
|
20
|
+
iconSize?: "xs" | "s" | "m" | "l" | undefined;
|
|
21
21
|
items: TabsItemDefault[];
|
|
22
22
|
value?: TabsItemDefault | null | undefined;
|
|
23
23
|
children?: undefined;
|
|
@@ -27,9 +27,6 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
27
27
|
linePosition?: "top" | "bottom" | undefined;
|
|
28
28
|
fitMode?: "scroll" | undefined;
|
|
29
29
|
withScrollButtons?: boolean | undefined;
|
|
30
|
-
slot?: string | undefined;
|
|
31
|
-
style?: import("react").CSSProperties | undefined;
|
|
32
|
-
title?: string | undefined;
|
|
33
30
|
defaultChecked?: boolean | undefined;
|
|
34
31
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
35
32
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -44,8 +41,11 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
44
41
|
id?: string | undefined;
|
|
45
42
|
lang?: string | undefined;
|
|
46
43
|
placeholder?: string | undefined;
|
|
44
|
+
slot?: string | undefined;
|
|
47
45
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
46
|
+
style?: import("react").CSSProperties | undefined;
|
|
48
47
|
tabIndex?: number | undefined;
|
|
48
|
+
title?: string | undefined;
|
|
49
49
|
translate?: "yes" | "no" | undefined;
|
|
50
50
|
radioGroup?: string | undefined;
|
|
51
51
|
role?: import("react").AriaRole | undefined;
|
|
@@ -69,7 +69,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
69
69
|
results?: number | undefined;
|
|
70
70
|
security?: string | undefined;
|
|
71
71
|
unselectable?: "on" | "off" | undefined;
|
|
72
|
-
inputMode?: "search" | "text" | "
|
|
72
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
73
73
|
is?: string | undefined;
|
|
74
74
|
'aria-activedescendant'?: string | undefined;
|
|
75
75
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -80,7 +80,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
80
80
|
'aria-colindex'?: number | undefined;
|
|
81
81
|
'aria-colspan'?: number | undefined;
|
|
82
82
|
'aria-controls'?: string | undefined;
|
|
83
|
-
'aria-current'?: boolean | "time" | "
|
|
83
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
84
84
|
'aria-describedby'?: string | undefined;
|
|
85
85
|
'aria-details'?: string | undefined;
|
|
86
86
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -294,10 +294,10 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
294
294
|
getItemAs: TabsPropGetItemAs<TabsItemDefault>;
|
|
295
295
|
getItemAttributes: TabsPropGetItemAttributes<TabsItemDefault>;
|
|
296
296
|
getItemRef: TabsPropGetItemRef<TabsItemDefault>;
|
|
297
|
-
size?: "
|
|
297
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
298
298
|
onlyIcon?: boolean | undefined;
|
|
299
299
|
view?: "clear" | "bordered" | undefined;
|
|
300
|
-
iconSize?: "
|
|
300
|
+
iconSize?: "xs" | "s" | "m" | "l" | undefined;
|
|
301
301
|
items: TabsItemDefault[];
|
|
302
302
|
value?: TabsItemDefault | null | undefined;
|
|
303
303
|
children?: undefined;
|
|
@@ -307,9 +307,6 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
307
307
|
linePosition?: "top" | "bottom" | undefined;
|
|
308
308
|
fitMode?: "dropdown" | undefined;
|
|
309
309
|
withScrollButtons?: undefined;
|
|
310
|
-
slot?: string | undefined;
|
|
311
|
-
style?: import("react").CSSProperties | undefined;
|
|
312
|
-
title?: string | undefined;
|
|
313
310
|
defaultChecked?: boolean | undefined;
|
|
314
311
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
315
312
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -324,8 +321,11 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
324
321
|
id?: string | undefined;
|
|
325
322
|
lang?: string | undefined;
|
|
326
323
|
placeholder?: string | undefined;
|
|
324
|
+
slot?: string | undefined;
|
|
327
325
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
326
|
+
style?: import("react").CSSProperties | undefined;
|
|
328
327
|
tabIndex?: number | undefined;
|
|
328
|
+
title?: string | undefined;
|
|
329
329
|
translate?: "yes" | "no" | undefined;
|
|
330
330
|
radioGroup?: string | undefined;
|
|
331
331
|
role?: import("react").AriaRole | undefined;
|
|
@@ -349,7 +349,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
349
349
|
results?: number | undefined;
|
|
350
350
|
security?: string | undefined;
|
|
351
351
|
unselectable?: "on" | "off" | undefined;
|
|
352
|
-
inputMode?: "search" | "text" | "
|
|
352
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
353
353
|
is?: string | undefined;
|
|
354
354
|
'aria-activedescendant'?: string | undefined;
|
|
355
355
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -360,7 +360,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
360
360
|
'aria-colindex'?: number | undefined;
|
|
361
361
|
'aria-colspan'?: number | undefined;
|
|
362
362
|
'aria-controls'?: string | undefined;
|
|
363
|
-
'aria-current'?: boolean | "time" | "
|
|
363
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
364
364
|
'aria-describedby'?: string | undefined;
|
|
365
365
|
'aria-details'?: string | undefined;
|
|
366
366
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -574,10 +574,10 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
574
574
|
getItemAs: TabsPropGetItemAs<TabsItemDefault>;
|
|
575
575
|
getItemAttributes: TabsPropGetItemAttributes<TabsItemDefault>;
|
|
576
576
|
getItemRef: TabsPropGetItemRef<TabsItemDefault>;
|
|
577
|
-
size?: "
|
|
577
|
+
size?: "xs" | "s" | "m" | undefined;
|
|
578
578
|
onlyIcon?: boolean | undefined;
|
|
579
579
|
view?: "clear" | "bordered" | undefined;
|
|
580
|
-
iconSize?: "
|
|
580
|
+
iconSize?: "xs" | "s" | "m" | "l" | undefined;
|
|
581
581
|
items: TabsItemDefault[];
|
|
582
582
|
value?: TabsItemDefault | null | undefined;
|
|
583
583
|
children?: undefined;
|
|
@@ -587,9 +587,6 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
587
587
|
linePosition: "left" | "right";
|
|
588
588
|
fitMode?: undefined;
|
|
589
589
|
withScrollButtons?: undefined;
|
|
590
|
-
slot?: string | undefined;
|
|
591
|
-
style?: import("react").CSSProperties | undefined;
|
|
592
|
-
title?: string | undefined;
|
|
593
590
|
defaultChecked?: boolean | undefined;
|
|
594
591
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
595
592
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -604,8 +601,11 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
604
601
|
id?: string | undefined;
|
|
605
602
|
lang?: string | undefined;
|
|
606
603
|
placeholder?: string | undefined;
|
|
604
|
+
slot?: string | undefined;
|
|
607
605
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
606
|
+
style?: import("react").CSSProperties | undefined;
|
|
608
607
|
tabIndex?: number | undefined;
|
|
608
|
+
title?: string | undefined;
|
|
609
609
|
translate?: "yes" | "no" | undefined;
|
|
610
610
|
radioGroup?: string | undefined;
|
|
611
611
|
role?: import("react").AriaRole | undefined;
|
|
@@ -629,7 +629,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
629
629
|
results?: number | undefined;
|
|
630
630
|
security?: string | undefined;
|
|
631
631
|
unselectable?: "on" | "off" | undefined;
|
|
632
|
-
inputMode?: "search" | "text" | "
|
|
632
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
633
633
|
is?: string | undefined;
|
|
634
634
|
'aria-activedescendant'?: string | undefined;
|
|
635
635
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -640,7 +640,7 @@ export declare const withDefaultGetters: (props: TabsProps) => {
|
|
|
640
640
|
'aria-colindex'?: number | undefined;
|
|
641
641
|
'aria-colspan'?: number | undefined;
|
|
642
642
|
'aria-controls'?: string | undefined;
|
|
643
|
-
'aria-current'?: boolean | "time" | "
|
|
643
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
644
644
|
'aria-describedby'?: string | undefined;
|
|
645
645
|
'aria-details'?: string | undefined;
|
|
646
646
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","names":["React","forwardRef","useRef","useForkRef","usePropsHandler","TagBase","tagPropMode","tagPropModeDefault","getParams","mode","checked","onClick","onChange","onCancel","view","as","withAction","e","COMPONENT_NAME","TagRenter","props","ref","tagRef","otherProps","params","Tag"],"sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React, { forwardRef, useRef } from 'react';\n\nimport { AsTagAttribute, AsTags } from '##/utils/types/AsTags';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport { TagBase } from '../TagBase/TagBase';\n\ntype TagBaseProps = React.ComponentProps<typeof TagBase>;\n\nexport const tagPropMode = [\n 'button',\n 'check',\n 'cancel',\n 'link',\n 'info',\n] as const;\nexport const tagPropModeDefault = tagPropMode[0];\ntype TagPropMode = typeof tagPropMode[number];\n\ntype CommonProps = {\n size?: TagBaseProps['size'];\n label: TagBaseProps['label'];\n group?: TagBaseProps['group'];\n icon?: IconComponent;\n iconSize?: IconProps['size'];\n children?: never;\n};\n\ntype PropsWithModeButton = CommonProps & {\n mode?: 'button';\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeLink = CommonProps & {\n mode: 'link';\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCheck = CommonProps & {\n mode: 'check';\n onChange: (\n checked: boolean,\n params: { e?: React.MouseEvent; checked: boolean },\n ) => void;\n checked: boolean;\n onClick?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCancel = CommonProps & {\n mode: 'cancel';\n onCancel: React.MouseEventHandler<HTMLButtonElement>;\n cancelButtonTabIndex?: number;\n onClick?: never;\n onChange?: never;\n checked?: never;\n};\n\ntype PropsWithModeInfo = CommonProps & {\n mode: 'info';\n onCancel?: never;\n onClick?: never;\n onChange?: never;\n checked?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype Props<ROLE extends TagPropMode = 'button'> = ROLE extends 'button'\n ? PropsWithModeButton &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeButton>\n : {} & ROLE extends 'check'\n ? PropsWithModeCheck &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeCheck>\n : {} & ROLE extends 'cancel'\n ? PropsWithModeCancel &\n Omit<AsTagAttribute<'span'>, keyof PropsWithModeCancel>\n : {} & ROLE extends 'link'\n ? PropsWithModeLink & Omit<AsTagAttribute<'a'>, keyof PropsWithModeLink>\n : {} & ROLE extends 'info'\n ? PropsWithModeInfo & Omit<AsTagAttribute<'span'>, keyof PropsWithModeInfo>\n : {};\n\ntype TagRender = <ROLE extends TagPropMode>(\n props: Props<ROLE>,\n ref: React.Ref<HTMLElement>,\n) => React.ReactElement | null;\n\ntype TagComponent = <ROLE extends TagPropMode>(\n props: Props<ROLE> & React.RefAttributes<HTMLElement>,\n) => React.ReactElement | null;\n\nexport function getParams(\n mode: TagPropMode,\n checked?: PropsWithModeCheck['checked'],\n onClick?: React.MouseEventHandler,\n onChange?: PropsWithModeCheck['onChange'],\n onCancel?: PropsWithModeCancel['onCancel'],\n): {\n view?: TagBaseProps['view'];\n onClick?: TagBaseProps['onClick'];\n onCancel?: TagBaseProps['onCancel'];\n withAction?: TagBaseProps['withAction'];\n as: AsTags;\n} {\n switch (mode) {\n case 'button':\n return {\n view: 'filled',\n onClick,\n as: 'button',\n withAction: true,\n };\n case 'link':\n return {\n view: 'filled',\n onClick,\n as: 'a',\n withAction: true,\n };\n case 'check':\n return {\n view: checked ? 'filled' : 'stroked',\n onClick:\n typeof onChange === 'function'\n ? (e: React.MouseEvent) =>\n onChange(!checked, { e, checked: !checked })\n : undefined,\n as: 'button',\n withAction: true,\n };\n case 'cancel':\n return {\n view: 'filled',\n onCancel,\n as: 'span',\n };\n case 'info':\n return {\n view: 'filled',\n as: 'span',\n };\n }\n}\n\nexport const COMPONENT_NAME = 'Tag' as const;\n\nconst TagRenter: TagRender = (props, ref) => {\n const tagRef = useRef<HTMLDivElement>(null);\n const {\n mode = tagPropModeDefault,\n onChange,\n checked,\n onCancel,\n onClick,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, tagRef);\n const params = getParams(mode, checked, onClick, onChange, onCancel);\n\n return (\n <TagBase {...otherProps} {...params} ref={useForkRef([ref, tagRef])} />\n );\n};\n\nexport const Tag = forwardRef(TagRenter) as TagComponent;\n"],"mappings":"sJACA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,MAA5B,KAA0C,OAA1C,CAIA,OAASC,UAAT,yCACA,OAASC,eAAT,2CACA,OAASC,OAAT,0BAIA,MAAO,IAAMC,YAAW,CAAG,CACzB,QADyB,CAEzB,OAFyB,CAGzB,QAHyB,CAIzB,MAJyB,CAKzB,MALyB,CAApB,CAOP,MAAO,IAAMC,mBAAkB,CAAGD,WAAW,CAAC,CAAD,CAAtC,
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["React","forwardRef","useRef","useForkRef","usePropsHandler","TagBase","tagPropMode","tagPropModeDefault","getParams","mode","checked","onClick","onChange","onCancel","view","as","withAction","e","COMPONENT_NAME","TagRenter","props","ref","tagRef","otherProps","params","Tag"],"sources":["../../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { IconComponent, IconProps } from '@consta/icons/Icon';\nimport React, { forwardRef, useRef } from 'react';\n\nimport { AsTagAttribute, AsTags } from '##/utils/types/AsTags';\n\nimport { useForkRef } from '../../hooks/useForkRef/useForkRef';\nimport { usePropsHandler } from '../EventInterceptor/usePropsHandler';\nimport { TagBase } from '../TagBase/TagBase';\n\ntype TagBaseProps = React.ComponentProps<typeof TagBase>;\n\nexport const tagPropMode = [\n 'button',\n 'check',\n 'cancel',\n 'link',\n 'info',\n] as const;\nexport const tagPropModeDefault = tagPropMode[0];\ntype TagPropMode = typeof tagPropMode[number];\n\ntype CommonProps = {\n size?: TagBaseProps['size'];\n label: TagBaseProps['label'];\n group?: TagBaseProps['group'];\n icon?: IconComponent;\n iconSize?: IconProps['size'];\n children?: never;\n disabled?: boolean;\n};\n\ntype PropsWithModeButton = CommonProps & {\n mode?: 'button';\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeLink = CommonProps & {\n mode: 'link';\n checked?: never;\n onChange?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCheck = CommonProps & {\n mode: 'check';\n onChange: (\n checked: boolean,\n params: { e?: React.MouseEvent; checked: boolean },\n ) => void;\n checked: boolean;\n onClick?: never;\n onCancel?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype PropsWithModeCancel = CommonProps & {\n mode: 'cancel';\n onCancel: React.MouseEventHandler<HTMLButtonElement>;\n cancelButtonTabIndex?: number;\n onClick?: never;\n onChange?: never;\n checked?: never;\n};\n\ntype PropsWithModeInfo = CommonProps & {\n mode: 'info';\n onCancel?: never;\n onClick?: never;\n onChange?: never;\n checked?: never;\n cancelButtonTabIndex?: never;\n};\n\ntype Props<ROLE extends TagPropMode = 'button'> = ROLE extends 'button'\n ? PropsWithModeButton &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeButton>\n : {} & ROLE extends 'check'\n ? PropsWithModeCheck &\n Omit<AsTagAttribute<'button'>, keyof PropsWithModeCheck>\n : {} & ROLE extends 'cancel'\n ? PropsWithModeCancel &\n Omit<AsTagAttribute<'span'>, keyof PropsWithModeCancel>\n : {} & ROLE extends 'link'\n ? PropsWithModeLink & Omit<AsTagAttribute<'a'>, keyof PropsWithModeLink>\n : {} & ROLE extends 'info'\n ? PropsWithModeInfo & Omit<AsTagAttribute<'span'>, keyof PropsWithModeInfo>\n : {};\n\ntype TagRender = <ROLE extends TagPropMode>(\n props: Props<ROLE>,\n ref: React.Ref<HTMLElement>,\n) => React.ReactElement | null;\n\ntype TagComponent = <ROLE extends TagPropMode>(\n props: Props<ROLE> & React.RefAttributes<HTMLElement>,\n) => React.ReactElement | null;\n\nexport function getParams(\n mode: TagPropMode,\n checked?: PropsWithModeCheck['checked'],\n onClick?: React.MouseEventHandler,\n onChange?: PropsWithModeCheck['onChange'],\n onCancel?: PropsWithModeCancel['onCancel'],\n): {\n view?: TagBaseProps['view'];\n onClick?: TagBaseProps['onClick'];\n onCancel?: TagBaseProps['onCancel'];\n withAction?: TagBaseProps['withAction'];\n as: AsTags;\n} {\n switch (mode) {\n case 'button':\n return {\n view: 'filled',\n onClick,\n as: 'button',\n withAction: true,\n };\n case 'link':\n return {\n view: 'filled',\n onClick,\n as: 'a',\n withAction: true,\n };\n case 'check':\n return {\n view: checked ? 'filled' : 'stroked',\n onClick:\n typeof onChange === 'function'\n ? (e: React.MouseEvent) =>\n onChange(!checked, { e, checked: !checked })\n : undefined,\n as: 'button',\n withAction: true,\n };\n case 'cancel':\n return {\n view: 'filled',\n onCancel,\n as: 'span',\n };\n case 'info':\n return {\n view: 'filled',\n as: 'span',\n };\n }\n}\n\nexport const COMPONENT_NAME = 'Tag' as const;\n\nconst TagRenter: TagRender = (props, ref) => {\n const tagRef = useRef<HTMLDivElement>(null);\n const {\n mode = tagPropModeDefault,\n onChange,\n checked,\n onCancel,\n onClick,\n ...otherProps\n } = usePropsHandler(COMPONENT_NAME, props, tagRef);\n const params = getParams(mode, checked, onClick, onChange, onCancel);\n\n return (\n <TagBase {...otherProps} {...params} ref={useForkRef([ref, tagRef])} />\n );\n};\n\nexport const Tag = forwardRef(TagRenter) as TagComponent;\n"],"mappings":"sJACA,MAAOA,MAAP,EAAgBC,UAAhB,CAA4BC,MAA5B,KAA0C,OAA1C,CAIA,OAASC,UAAT,yCACA,OAASC,eAAT,2CACA,OAASC,OAAT,0BAIA,MAAO,IAAMC,YAAW,CAAG,CACzB,QADyB,CAEzB,OAFyB,CAGzB,QAHyB,CAIzB,MAJyB,CAKzB,MALyB,CAApB,CAOP,MAAO,IAAMC,mBAAkB,CAAGD,WAAW,CAAC,CAAD,CAAtC,CAoFP,MAAO,SAASE,UAAT,CACLC,CADK,CAELC,CAFK,CAGLC,CAHK,CAILC,CAJK,CAKLC,CALK,CAYL,OAEO,QAFP,GACQJ,CADR,CAGW,CACLK,IAAI,CAAE,QADD,CAELH,OAAO,CAAPA,CAFK,CAGLI,EAAE,CAAE,QAHC,CAILC,UAAU,GAJL,CAHX,CASO,MATP,GACQ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N,CAAD,CAApD,GAEH,CAfD,CAiBA,MAAO,IAAMG,IAAG,CAAGxB,UAAU,CAACkB,SAAD,CAAtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.TagBase{--tag-base-typo-color:var(--color-control-typo-ghost);--tag-base-half-space:calc(var(--tag-base-space)/2);background:var(--tag-base-bg-color);border:none;border-radius:var(--control-radius);box-shadow:inset 0 0 0 1px var(--tag-base-border-color);color:var(--tag-base-typo-color);display:inline-flex;font-family:var(--font--primary);font-size:var(--tag-base-font-size);height:var(--tag-base-height);line-height:var(--tag-base-height);overflow:hidden;padding-bottom:0;padding-left:var(--tag-base-space);padding-right:var(--tag-base-space);padding-top:0;position:relative;text-decoration:none;transition:box-shadow .15s ease,background .15s ease,color .15s ease}.TagBase:focus,.TagBase:focus:hover{outline:none}.TagBase_view_stroked{--tag-base-border-color:var(--color-control-bg-border-default);--tag-base-bg-color:var(--color-bg-default)}.TagBase_view_filled{--tag-base-border-color:transparent;--tag-base-bg-color:var(--color-control-bg-ghost)}.TagBase_withAction{cursor:pointer}.TagBase_withAction.TagBase_view_stroked:hover{--tag-base-border-color:var(--color-control-bg-border-default-hover)}.TagBase_withAction.TagBase_view_filled:hover{--tag-base-bg-color:var(--color-control-bg-ghost-hover);--tag-base-border-color:transparent}.TagBase_size_xs{--tag-base-height:var(--space-l);--tag-base-space:var(--space-2xs);--tag-base-font-size:var(--size-text-2xs)}.TagBase_size_s{--tag-base-height:var(--space-xl);--tag-base-space:var(--space-xs);--tag-base-font-size:var(--size-text-xs)}.TagBase_size_m{--tag-base-height:calc(var(--space-2xl) - var(--space-2xs));--tag-base-space:var(--space-xs);--tag-base-font-size:var(--size-text-s)}.TagBase_size_l{--tag-base-height:var(--space-2xl);--tag-base-space:var(--space-s);--tag-base-font-size:var(--size-text-m)}.TagBase_withCancel{padding-right:0}.TagBase_withIcon{padding-left:0}.TagBase[class*=TagBase_group]:before{background:var(--tag-base-group-color);content:"";height:100%;left:0;position:absolute;top:0;width:2px}.TagBase_group_1{--tag-base-group-color:#e92064}.TagBase_group_2{--tag-base-group-color:#b92eff}.TagBase_group_3{--tag-base-group-color:#1160ff}.TagBase_group_4{--tag-base-group-color:#0fafff}.TagBase_group_5{--tag-base-group-color:#02e2ff}.TagBase_group_6{--tag-base-group-color:#0c6}.TagBase_group_7{--tag-base-group-color:#b4d50b}.TagBase_group_8{--tag-base-group-color:#f5b800}.TagBase_group_9{--tag-base-group-color:#f56600}.TagBase-CancelButton{align-items:center;background:transparent;border:none;color:var(--color-control-typo-ghost);cursor:pointer;display:inline-flex;height:var(--tag-base-height);opacity:.4;outline:none;padding:0 var(--tag-base-half-space) 0 var(--tag-base-half-space);transition:opacity .15s ease}.TagBase-CancelButton:hover{background:transparent;opacity:1;outline:none}.TagBase-Label{height:var(--tag-base-height);line-height:var(--tag-base-height)}.TagBase-IconWrapper{align-items:center;display:inline-flex;height:var(--tag-base-height);padding:0 var(--tag-base-half-space) 0 var(--tag-base-half-space)}
|
|
1
|
+
.TagBase{--tag-base-typo-color:var(--color-control-typo-ghost);--tag-base-half-space:calc(var(--tag-base-space)/2);background:var(--tag-base-bg-color);border:none;border-radius:var(--control-radius);box-shadow:inset 0 0 0 1px var(--tag-base-border-color);color:var(--tag-base-typo-color);display:inline-flex;font-family:var(--font--primary);font-size:var(--tag-base-font-size);height:var(--tag-base-height);line-height:var(--tag-base-height);overflow:hidden;padding-bottom:0;padding-left:var(--tag-base-space);padding-right:var(--tag-base-space);padding-top:0;position:relative;text-decoration:none;transition:box-shadow .15s ease,background .15s ease,color .15s ease}.TagBase:focus,.TagBase:focus:hover{outline:none}.TagBase_view_stroked{--tag-base-border-color:var(--color-control-bg-border-default);--tag-base-bg-color:var(--color-bg-default)}.TagBase_view_filled{--tag-base-border-color:transparent;--tag-base-bg-color:var(--color-control-bg-ghost)}.TagBase_withAction{cursor:pointer}.TagBase_disabled{--tag-base-bg-color:var(--color-control-bg-disable);--tag-base-border-color:var(--color-control-bg-border-disable);--tag-base-typo-color:var(--color-control-typo-disable)}.TagBase_withAction.TagBase_view_stroked:hover{--tag-base-border-color:var(--color-control-bg-border-default-hover)}.TagBase_withAction.TagBase_view_filled:hover{--tag-base-bg-color:var(--color-control-bg-ghost-hover);--tag-base-border-color:transparent}.TagBase_size_xs{--tag-base-height:var(--space-l);--tag-base-space:var(--space-2xs);--tag-base-font-size:var(--size-text-2xs)}.TagBase_size_s{--tag-base-height:var(--space-xl);--tag-base-space:var(--space-xs);--tag-base-font-size:var(--size-text-xs)}.TagBase_size_m{--tag-base-height:calc(var(--space-2xl) - var(--space-2xs));--tag-base-space:var(--space-xs);--tag-base-font-size:var(--size-text-s)}.TagBase_size_l{--tag-base-height:var(--space-2xl);--tag-base-space:var(--space-s);--tag-base-font-size:var(--size-text-m)}.TagBase_withCancel{padding-right:0}.TagBase_withIcon{padding-left:0}.TagBase[class*=TagBase_group]:before{background:var(--tag-base-group-color);content:"";height:100%;left:0;position:absolute;top:0;width:2px}.TagBase_group_disabled{--tag-base-group-color:var(--color-control-typo-disable)}.TagBase_group_1{--tag-base-group-color:#e92064}.TagBase_group_2{--tag-base-group-color:#b92eff}.TagBase_group_3{--tag-base-group-color:#1160ff}.TagBase_group_4{--tag-base-group-color:#0fafff}.TagBase_group_5{--tag-base-group-color:#02e2ff}.TagBase_group_6{--tag-base-group-color:#0c6}.TagBase_group_7{--tag-base-group-color:#b4d50b}.TagBase_group_8{--tag-base-group-color:#f5b800}.TagBase_group_9{--tag-base-group-color:#f56600}.TagBase-CancelButton{align-items:center;background:transparent;border:none;color:var(--color-control-typo-ghost);cursor:pointer;display:inline-flex;height:var(--tag-base-height);opacity:.4;outline:none;padding:0 var(--tag-base-half-space) 0 var(--tag-base-half-space);transition:opacity .15s ease}.TagBase-CancelButton:not(.TagBase-CancelButton_disabled):hover{background:transparent;opacity:1;outline:none}.TagBase-CancelButton_disabled{color:var(--color-control-typo-disable);cursor:not-allowed}.TagBase-Label{height:var(--tag-base-height);line-height:var(--tag-base-height)}.TagBase-IconWrapper{align-items:center;display:inline-flex;height:var(--tag-base-height);padding:0 var(--tag-base-half-space) 0 var(--tag-base-half-space)}a.TagBase_disabled,button.TagBase_disabled{cursor:not-allowed}
|
|
@@ -6,7 +6,7 @@ export declare const tagBasePropSizeDefault: "m";
|
|
|
6
6
|
export declare type TagBasePropSize = typeof tagBasePropSize[number];
|
|
7
7
|
export declare const tagBasePropGroupNumberValue: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
8
8
|
export declare const tagBasePropGroupStringValue: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9"];
|
|
9
|
-
export declare const tagBasePropGroup: (
|
|
9
|
+
export declare const tagBasePropGroup: (1 | "1" | 4 | 2 | 3 | 5 | 9 | "2" | 7 | 6 | "3" | 8 | "4" | "5" | "6" | "7" | "8" | "9")[];
|
|
10
10
|
export declare type TagBasePropGroup = typeof tagBasePropGroup[number];
|
|
11
11
|
export declare const tagBasePropView: readonly ["stroked", "filled"];
|
|
12
12
|
export declare const tagBasePropViewDefault: "stroked";
|
|
@@ -22,6 +22,8 @@ export declare type Props = {
|
|
|
22
22
|
iconSize?: IconPropSize;
|
|
23
23
|
withAction?: boolean;
|
|
24
24
|
cancelButtonTabIndex?: number;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
href?: string;
|
|
25
27
|
};
|
|
26
28
|
export declare const cnTagBase: import("@bem-react/classname").ClassNameFormatter;
|
|
27
29
|
export declare const TagBase: import("../../utils/types/PropsWithAsAttributes").ComponentWithAs<Props, "div">;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","as","label","className","group","view","onCancel","icon","iconSize","withAction","cancelButtonTabIndex"];import"./TagBase.css";import{IconClose}from"@consta/icons/IconClose";import React from"react";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";export var tagBasePropSize=["m","xs","s","l"];export var tagBasePropSizeDefault=tagBasePropSize[0];export var tagBasePropGroupNumberValue=[1,2,3,4,5,6,7,8,9];export var tagBasePropGroupStringValue=["1","2","3","4","5","6","7","8","9"];export var tagBasePropGroup=[].concat(tagBasePropGroupNumberValue,tagBasePropGroupStringValue);export var tagBasePropView=["stroked","filled"];export var tagBasePropViewDefault=tagBasePropView[0];export var cnTagBase=cn("TagBase");var sizeMap={xs:"xs",s:"xs",m:"s",l:"s"};export var TagBase=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?tagBasePropSizeDefault:c,e=a.as,f=void 0===e?"div":e,g=a.label,h=a.className,i=a.group,j=a.view,k=void 0===j?tagBasePropViewDefault:j,l=a.onCancel,m=a.icon,n=a.iconSize,o=a.withAction,p=a.cancelButtonTabIndex,q=_objectWithoutProperties(a,_excluded),
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["size","as","label","className","group","view","onCancel","icon","iconSize","withAction","cancelButtonTabIndex","disabled","href"];import"./TagBase.css";import{IconClose}from"@consta/icons/IconClose";import React from"react";import{cn}from"../../utils/bem";import{getByMap}from"../../utils/getByMap";import{forwardRefWithAs}from"../../utils/types/PropsWithAsAttributes";export var tagBasePropSize=["m","xs","s","l"];export var tagBasePropSizeDefault=tagBasePropSize[0];export var tagBasePropGroupNumberValue=[1,2,3,4,5,6,7,8,9];export var tagBasePropGroupStringValue=["1","2","3","4","5","6","7","8","9"];export var tagBasePropGroup=[].concat(tagBasePropGroupNumberValue,tagBasePropGroupStringValue);export var tagBasePropView=["stroked","filled"];export var tagBasePropViewDefault=tagBasePropView[0];export var cnTagBase=cn("TagBase");var sizeMap={xs:"xs",s:"xs",m:"s",l:"s"};export var TagBase=forwardRefWithAs(function(a,b){var c=a.size,d=void 0===c?tagBasePropSizeDefault:c,e=a.as,f=void 0===e?"div":e,g=a.label,h=a.className,i=a.group,j=a.view,k=void 0===j?tagBasePropViewDefault:j,l=a.onCancel,m=a.icon,n=a.iconSize,o=a.withAction,p=a.cancelButtonTabIndex,q=a.disabled,r=a.href,s=_objectWithoutProperties(a,_excluded),t="function"==typeof l,u=getByMap(sizeMap,d),v=getByMap(sizeMap,d,n),w=r&&q?void 0:r;return React.createElement(f,Object.assign({},s,{className:cnTagBase({size:d,view:k,withCancel:t,withIcon:!!m,disabled:q,withAction:!q&&o,group:q&&i?"disabled":i},[h]),ref:b,disabled:q,href:w}),t||m?React.createElement(React.Fragment,null,m&&React.createElement("span",{className:cnTagBase("IconWrapper")},React.createElement(m,{size:v,className:cnTagBase("Icon")})),React.createElement("span",{className:cnTagBase("Label")},g),t&&React.createElement("button",{className:cnTagBase("CancelButton",{disabled:q}),type:"button",onClick:l,tabIndex:p,disabled:q},React.createElement(IconClose,{className:cnTagBase("CancelIcon"),size:u}))):g)});
|
|
2
2
|
//# sourceMappingURL=TagBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagBase.js","names":["IconClose","React","cn","getByMap","forwardRefWithAs","tagBasePropSize","tagBasePropSizeDefault","tagBasePropGroupNumberValue","tagBasePropGroupStringValue","tagBasePropGroup","tagBasePropView","tagBasePropViewDefault","cnTagBase","sizeMap","xs","s","m","l","TagBase","props","ref","size","as","label","className","group","view","onCancel","Icon","icon","iconSize","withAction","cancelButtonTabIndex","otherProps","withCancel","IconCloseSize","IconSize","withIcon"],"sources":["../../../../../src/components/TagBase/TagBase.tsx"],"sourcesContent":["import './TagBase.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconClose } from '@consta/icons/IconClose';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const tagBasePropSize = ['m', 'xs', 's', 'l'] as const;\nexport const tagBasePropSizeDefault = tagBasePropSize[0];\nexport type TagBasePropSize = typeof tagBasePropSize[number];\n\nexport const tagBasePropGroupNumberValue = [1, 2, 3, 4, 5, 6, 7, 8, 9] as const;\nexport const tagBasePropGroupStringValue = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n] as const;\nexport const tagBasePropGroup = [\n ...tagBasePropGroupNumberValue,\n ...tagBasePropGroupStringValue,\n];\n\nexport type TagBasePropGroup = typeof tagBasePropGroup[number];\n\nexport const tagBasePropView = ['stroked', 'filled'] as const;\nexport const tagBasePropViewDefault = tagBasePropView[0];\nexport type TagBasePropView = typeof tagBasePropView[number];\n\nexport type Props = {\n size?: TagBasePropSize;\n label: string;\n children?: never;\n view?: TagBasePropView;\n group?: TagBasePropGroup;\n onCancel?: React.MouseEventHandler<HTMLButtonElement>;\n icon?: IconComponent;\n iconSize?: IconPropSize;\n withAction?: boolean;\n cancelButtonTabIndex?: number;\n};\n\nexport const cnTagBase = cn('TagBase');\n\nconst sizeMap: Record<TagBasePropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const TagBase = forwardRefWithAs<Props>((props, ref) => {\n const {\n size = tagBasePropSizeDefault,\n as = 'div',\n label,\n className,\n group,\n view = tagBasePropViewDefault,\n onCancel,\n icon: Icon,\n iconSize,\n withAction,\n cancelButtonTabIndex,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n const withCancel = typeof onCancel === 'function';\n const withIcon = !!Icon;\n const IconCloseSize = getByMap(sizeMap, size);\n const IconSize = getByMap(sizeMap, size, iconSize);\n\n return (\n <Tag\n {...otherProps}\n className={cnTagBase(\n {\n size,\n view,\n withCancel,\n withIcon,\n
|
|
1
|
+
{"version":3,"file":"TagBase.js","names":["IconClose","React","cn","getByMap","forwardRefWithAs","tagBasePropSize","tagBasePropSizeDefault","tagBasePropGroupNumberValue","tagBasePropGroupStringValue","tagBasePropGroup","tagBasePropView","tagBasePropViewDefault","cnTagBase","sizeMap","xs","s","m","l","TagBase","props","ref","size","as","label","className","group","view","onCancel","Icon","icon","iconSize","withAction","cancelButtonTabIndex","disabled","href","otherProps","withCancel","IconCloseSize","IconSize","tagLinkHref","withIcon"],"sources":["../../../../../src/components/TagBase/TagBase.tsx"],"sourcesContent":["import './TagBase.css';\n\nimport { IconComponent, IconPropSize } from '@consta/icons/Icon';\nimport { IconClose } from '@consta/icons/IconClose';\nimport React from 'react';\n\nimport { cn } from '../../utils/bem';\nimport { getByMap } from '../../utils/getByMap';\nimport { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';\n\nexport const tagBasePropSize = ['m', 'xs', 's', 'l'] as const;\nexport const tagBasePropSizeDefault = tagBasePropSize[0];\nexport type TagBasePropSize = typeof tagBasePropSize[number];\n\nexport const tagBasePropGroupNumberValue = [1, 2, 3, 4, 5, 6, 7, 8, 9] as const;\nexport const tagBasePropGroupStringValue = [\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n] as const;\nexport const tagBasePropGroup = [\n ...tagBasePropGroupNumberValue,\n ...tagBasePropGroupStringValue,\n];\n\nexport type TagBasePropGroup = typeof tagBasePropGroup[number];\n\nexport const tagBasePropView = ['stroked', 'filled'] as const;\nexport const tagBasePropViewDefault = tagBasePropView[0];\nexport type TagBasePropView = typeof tagBasePropView[number];\n\nexport type Props = {\n size?: TagBasePropSize;\n label: string;\n children?: never;\n view?: TagBasePropView;\n group?: TagBasePropGroup;\n onCancel?: React.MouseEventHandler<HTMLButtonElement>;\n icon?: IconComponent;\n iconSize?: IconPropSize;\n withAction?: boolean;\n cancelButtonTabIndex?: number;\n disabled?: boolean;\n href?: string;\n};\n\nexport const cnTagBase = cn('TagBase');\n\nconst sizeMap: Record<TagBasePropSize, IconPropSize> = {\n xs: 'xs',\n s: 'xs',\n m: 's',\n l: 's',\n};\n\nexport const TagBase = forwardRefWithAs<Props>((props, ref) => {\n const {\n size = tagBasePropSizeDefault,\n as = 'div',\n label,\n className,\n group,\n view = tagBasePropViewDefault,\n onCancel,\n icon: Icon,\n iconSize,\n withAction,\n cancelButtonTabIndex,\n disabled,\n href,\n ...otherProps\n } = props;\n\n const Tag = as as string;\n const withCancel = typeof onCancel === 'function';\n const withIcon = !!Icon;\n const IconCloseSize = getByMap(sizeMap, size);\n const IconSize = getByMap(sizeMap, size, iconSize);\n const tagLinkHref = href && disabled ? undefined : href;\n\n return (\n <Tag\n {...otherProps}\n className={cnTagBase(\n {\n size,\n view,\n withCancel,\n withIcon,\n disabled,\n withAction: !disabled && withAction,\n group: disabled && group ? 'disabled' : group,\n },\n [className],\n )}\n ref={ref}\n disabled={disabled}\n href={tagLinkHref}\n >\n {withCancel || Icon ? (\n <>\n {Icon && (\n <span className={cnTagBase('IconWrapper')}>\n <Icon size={IconSize} className={cnTagBase('Icon')} />\n </span>\n )}\n <span className={cnTagBase('Label')}>{label}</span>\n {withCancel && (\n <button\n className={cnTagBase('CancelButton', { disabled })}\n type=\"button\"\n onClick={onCancel}\n tabIndex={cancelButtonTabIndex}\n disabled={disabled}\n >\n <IconClose\n className={cnTagBase('CancelIcon')}\n size={IconCloseSize}\n />\n </button>\n )}\n </>\n ) : (\n label\n )}\n </Tag>\n );\n});\n"],"mappings":"uOAAA,sBAGA,OAASA,SAAT,KAA0B,yBAA1B,CACA,MAAOC,MAAP,KAAkB,OAAlB,CAEA,OAASC,EAAT,uBACA,OAASC,QAAT,4BACA,OAASC,gBAAT,+CAEA,MAAO,IAAMC,gBAAe,CAAG,CAAC,GAAD,CAAM,IAAN,CAAY,GAAZ,CAAiB,GAAjB,CAAxB,CACP,MAAO,IAAMC,uBAAsB,CAAGD,eAAe,CAAC,CAAD,CAA9C,CAGP,MAAO,IAAME,4BAA2B,CAAG,CAAC,CAAD,CAAI,CAAJ,CAAO,CAAP,CAAU,CAAV,CAAa,CAAb,CAAgB,CAAhB,CAAmB,CAAnB,CAAsB,CAAtB,CAAyB,CAAzB,CAApC,CACP,MAAO,IAAMC,4BAA2B,CAAG,CACzC,GADyC,CAEzC,GAFyC,CAGzC,GAHyC,CAIzC,GAJyC,CAKzC,GALyC,C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AS,CAAC,YAAD,CADtB,CAEE,IAAI,CAAEyB,CAFR,EAPF,CARJ,CADD,CAwBCd,CA1CJ,CA8CH,CAxEsC,CAAhC"}
|
|
@@ -6,7 +6,7 @@ export declare function withDefaultGetters(props: ThemeTogglerProps): {
|
|
|
6
6
|
getItemKey: ThemeTogglerPropGetItemKey<ThemeTogglerItemDefault>;
|
|
7
7
|
getItemLabel: ThemeTogglerPropGetItemLabel<ThemeTogglerItemDefault>;
|
|
8
8
|
getItemIcon: ThemeTogglerPropGetItemIcon<ThemeTogglerItemDefault>;
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
10
10
|
className?: string | undefined;
|
|
11
11
|
items: ThemeTogglerItemDefault[];
|
|
12
12
|
value: ThemeTogglerItemDefault;
|
|
@@ -14,10 +14,7 @@ export declare function withDefaultGetters(props: ThemeTogglerProps): {
|
|
|
14
14
|
direction?: "downCenter" | "upCenter" | "downRight" | "downLeft" | "upRight" | "upLeft" | "leftUp" | "leftCenter" | "leftDown" | "rightUp" | "rightCenter" | "rightDown" | "downStartLeft" | "upStartLeft" | "downStartRight" | "upStartRight" | "leftStartUp" | "leftStartDown" | "rightStartUp" | "rightStartDown" | undefined;
|
|
15
15
|
possibleDirections?: readonly ("downCenter" | "upCenter" | "downRight" | "downLeft" | "upRight" | "upLeft" | "leftUp" | "leftCenter" | "leftDown" | "rightUp" | "rightCenter" | "rightDown" | "downStartLeft" | "upStartLeft" | "downStartRight" | "upStartRight" | "leftStartUp" | "leftStartDown" | "rightStartUp" | "rightStartDown")[] | undefined;
|
|
16
16
|
children?: undefined;
|
|
17
|
-
view?: "primary" | "
|
|
18
|
-
slot?: string | undefined;
|
|
19
|
-
style?: import("react").CSSProperties | undefined;
|
|
20
|
-
title?: string | undefined;
|
|
17
|
+
view?: "primary" | "clear" | "ghost" | "secondary" | undefined;
|
|
21
18
|
defaultChecked?: boolean | undefined;
|
|
22
19
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
23
20
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -31,8 +28,11 @@ export declare function withDefaultGetters(props: ThemeTogglerProps): {
|
|
|
31
28
|
id?: string | undefined;
|
|
32
29
|
lang?: string | undefined;
|
|
33
30
|
placeholder?: string | undefined;
|
|
31
|
+
slot?: string | undefined;
|
|
34
32
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
33
|
+
style?: import("react").CSSProperties | undefined;
|
|
35
34
|
tabIndex?: number | undefined;
|
|
35
|
+
title?: string | undefined;
|
|
36
36
|
translate?: "yes" | "no" | undefined;
|
|
37
37
|
radioGroup?: string | undefined;
|
|
38
38
|
role?: import("react").AriaRole | undefined;
|
|
@@ -56,7 +56,7 @@ export declare function withDefaultGetters(props: ThemeTogglerProps): {
|
|
|
56
56
|
results?: number | undefined;
|
|
57
57
|
security?: string | undefined;
|
|
58
58
|
unselectable?: "on" | "off" | undefined;
|
|
59
|
-
inputMode?: "search" | "text" | "
|
|
59
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
60
60
|
is?: string | undefined;
|
|
61
61
|
'aria-activedescendant'?: string | undefined;
|
|
62
62
|
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
@@ -67,7 +67,7 @@ export declare function withDefaultGetters(props: ThemeTogglerProps): {
|
|
|
67
67
|
'aria-colindex'?: number | undefined;
|
|
68
68
|
'aria-colspan'?: number | undefined;
|
|
69
69
|
'aria-controls'?: string | undefined;
|
|
70
|
-
'aria-current'?: boolean | "time" | "
|
|
70
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
71
71
|
'aria-describedby'?: string | undefined;
|
|
72
72
|
'aria-details'?: string | undefined;
|
|
73
73
|
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
@@ -12,4 +12,4 @@ export declare type TimerProps = PropsWithJsxAttributes<{
|
|
|
12
12
|
children?: never;
|
|
13
13
|
}>;
|
|
14
14
|
export declare const cnTimer: import("@bem-react/classname").ClassNameFormatter;
|
|
15
|
-
export declare const Timer: React.ForwardRefExoticComponent<Pick<TimerProps, "
|
|
15
|
+
export declare const Timer: React.ForwardRefExoticComponent<Pick<TimerProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "progress" | "key" | "animation" | "seconds"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './Tooltip.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TooltipProps } from './types';
|
|
4
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "
|
|
4
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "status" | "key" | "position" | "direction" | "offset" | "possibleDirections" | "spareDirection" | "isInteractive" | "onClickOutside" | "onSetDirection" | "viewportRef" | "anchorRef" | "equalAnchorWidth" | "isOpen"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -21,4 +21,4 @@ export declare type TooltipProps = PropsWithJsxAttributes<{
|
|
|
21
21
|
offset?: number;
|
|
22
22
|
onSetDirection?: (direction: Direction) => void;
|
|
23
23
|
} & PositioningProps>;
|
|
24
|
-
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "
|
|
24
|
+
export declare const Tooltip: React.ForwardRefExoticComponent<Pick<TooltipProps, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "size" | "status" | "key" | "position" | "direction" | "offset" | "possibleDirections" | "spareDirection" | "isInteractive" | "onClickOutside" | "onSetDirection" | "anchorRef" | "equalAnchorWidth"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -11,4 +11,4 @@ export declare const UserSelectItem: React.ForwardRefExoticComponent<{
|
|
|
11
11
|
avatarUrl?: string | undefined;
|
|
12
12
|
disable?: boolean | undefined;
|
|
13
13
|
multiple?: boolean | undefined;
|
|
14
|
-
} & Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
14
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "size" | "label" | "multiple" | "active" | "hovered" | "indent" | "avatarUrl" | "subLabel" | "disable"> & React.RefAttributes<HTMLDivElement>>;
|