rsuite 6.0.0-canary-20250624 → 6.0.0-canary-20250702
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/AutoComplete/styles/index.css +156 -161
- package/AvatarGroup/styles/index.css +1 -10
- package/Badge/styles/index.css +21 -21
- package/Button/styles/index.css +78 -63
- package/ButtonGroup/styles/index.css +15 -12
- package/ButtonToolbar/styles/index.css +1 -10
- package/CHANGELOG.md +9 -0
- package/Calendar/styles/index.css +92 -67
- package/Card/styles/index.css +7 -7
- package/CascadeTree/styles/index.css +8 -9
- package/Cascader/styles/index.css +160 -164
- package/CheckPicker/styles/index.css +173 -178
- package/CheckTree/styles/index.css +175 -180
- package/CheckTreePicker/styles/index.css +175 -180
- package/Checkbox/styles/index.css +21 -28
- package/CheckboxGroup/styles/index.css +1 -1
- package/DateInput/styles/index.css +8 -18
- package/DatePicker/styles/index.css +173 -168
- package/DateRangeInput/styles/index.css +8 -18
- package/DateRangePicker/styles/index.css +173 -168
- package/Dropdown/styles/index.css +110 -94
- package/IconButton/styles/index.css +95 -79
- package/InlineEdit/styles/index.css +12 -19
- package/Input/styles/index.css +8 -18
- package/InputGroup/styles/index.css +31 -38
- package/InputNumber/styles/index.css +115 -100
- package/InputPicker/styles/index.css +156 -161
- package/List/styles/index.css +10 -10
- package/Loader/styles/index.css +16 -16
- package/Menu/styles/index.css +2 -2
- package/Message/styles/index.css +2 -2
- package/MultiCascadeTree/styles/index.css +178 -191
- package/MultiCascader/styles/index.css +178 -200
- package/Nav/styles/index.css +162 -146
- package/Navbar/styles/index.css +140 -124
- package/NumberInput/styles/index.css +115 -100
- package/Pagination/styles/index.css +177 -200
- package/PasswordInput/styles/index.css +36 -43
- package/PinInput/styles/index.css +12 -22
- package/Radio/styles/index.css +22 -29
- package/RadioGroup/styles/index.css +11 -11
- package/SelectPicker/styles/index.css +156 -161
- package/Sidenav/styles/index.css +122 -129
- package/Stack/styles/index.css +1 -10
- package/Stat/styles/index.css +95 -79
- package/Steps/styles/index.css +26 -25
- package/Table/styles/index.css +11 -0
- package/Tabs/styles/index.css +162 -146
- package/Tag/styles/index.css +112 -96
- package/TagInput/styles/index.css +174 -179
- package/TagPicker/styles/index.css +174 -179
- package/TimePicker/styles/index.css +173 -168
- package/TimeRangePicker/styles/index.css +173 -168
- package/Toggle/styles/index.css +27 -30
- package/Tree/styles/index.css +157 -162
- package/TreePicker/styles/index.css +157 -162
- package/Uploader/styles/index.css +94 -65
- package/cjs/Badge/Badge.js +16 -11
- package/cjs/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/cjs/Button/Button.js +9 -7
- package/cjs/ButtonGroup/ButtonGroup.js +7 -7
- package/cjs/Card/Card.js +6 -6
- package/cjs/Checkbox/Checkbox.js +6 -7
- package/cjs/CheckboxGroup/CheckboxGroup.js +3 -4
- package/cjs/Dropdown/Dropdown.js +3 -4
- package/cjs/Dropdown/DropdownItem.js +4 -4
- package/cjs/Dropdown/DropdownMenu.js +9 -10
- package/cjs/FormControl/FormControl.d.ts +1 -1
- package/cjs/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/cjs/FormHelpText/FormHelpText.d.ts +1 -1
- package/cjs/IconButton/IconButton.d.ts +1 -1
- package/cjs/IconButton/IconButton.js +9 -9
- package/cjs/Image/Image.d.ts +1 -1
- package/cjs/InlineEdit/InlineEdit.js +3 -2
- package/cjs/InputGroup/InputGroup.js +12 -14
- package/cjs/InputGroup/InputGroupAddon.d.ts +2 -2
- package/cjs/InputPicker/InputAutosize.js +4 -6
- package/cjs/List/List.d.ts +1 -1
- package/cjs/List/List.js +7 -8
- package/cjs/List/ListItem.d.ts +2 -2
- package/cjs/List/ListItem.js +4 -4
- package/cjs/Loader/Loader.js +8 -7
- package/cjs/Menu/MenuSeparator.d.ts +2 -2
- package/cjs/Nav/Nav.d.ts +2 -2
- package/cjs/Nav/Nav.js +12 -13
- package/cjs/Nav/NavDropdownItem.js +4 -4
- package/cjs/Nav/NavDropdownMenu.js +10 -13
- package/cjs/Nav/NavItem.d.ts +2 -2
- package/cjs/Nav/NavItem.js +6 -8
- package/cjs/Navbar/Navbar.js +6 -6
- package/cjs/Navbar/NavbarDropdown.d.ts +1 -1
- package/cjs/Navbar/NavbarDropdown.js +3 -4
- package/cjs/Navbar/NavbarDropdownItem.js +4 -4
- package/cjs/Navbar/NavbarDropdownMenu.js +8 -11
- package/cjs/NumberInput/NumberInput.d.ts +1 -1
- package/cjs/Pagination/Pagination.js +3 -2
- package/cjs/Pagination/PaginationButton.d.ts +3 -3
- package/cjs/Pagination/PaginationButton.js +9 -17
- package/cjs/Pagination/PaginationGroup.js +2 -1
- package/cjs/Panel/PanelHeader.d.ts +1 -1
- package/cjs/Radio/Radio.js +6 -6
- package/cjs/RadioGroup/RadioGroup.js +4 -4
- package/cjs/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
- package/cjs/Sidenav/Sidenav.js +3 -2
- package/cjs/Sidenav/SidenavDropdown.js +3 -5
- package/cjs/Sidenav/SidenavDropdownItem.js +4 -4
- package/cjs/Sidenav/SidenavDropdownMenu.js +10 -13
- package/cjs/Sidenav/SidenavItem.d.ts +2 -2
- package/cjs/Sidenav/SidenavItem.js +4 -5
- package/cjs/Slider/Handle.d.ts +1 -1
- package/cjs/Stack/Stack.d.ts +1 -17
- package/cjs/Stack/Stack.js +3 -4
- package/cjs/Stack/StackItem.d.ts +4 -5
- package/cjs/Stack/StackItem.js +4 -10
- package/cjs/Steps/StepItem.js +7 -8
- package/cjs/Steps/Steps.d.ts +2 -1
- package/cjs/Steps/Steps.js +32 -34
- package/cjs/Tabs/Tabs.js +1 -1
- package/cjs/Tag/Tag.js +5 -2
- package/cjs/Toggle/Toggle.d.ts +1 -1
- package/cjs/Toggle/Toggle.js +7 -6
- package/cjs/Tree/types.d.ts +2 -2
- package/cjs/Uploader/Uploader.d.ts +2 -2
- package/cjs/internals/Box/Box.d.ts +1 -0
- package/cjs/internals/Box/index.d.ts +1 -1
- package/cjs/internals/Box/utils.js +5 -4
- package/cjs/internals/InputBase/InputBase.d.ts +1 -1
- package/cjs/internals/InputBase/InputBase.js +3 -2
- package/cjs/internals/Menu/MenuItem.js +1 -1
- package/cjs/internals/Overlay/Modal.d.ts +1 -1
- package/cjs/internals/Picker/PickerToggle.js +2 -4
- package/cjs/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/cjs/internals/Tree/TreeView.d.ts +2 -2
- package/cjs/internals/hooks/useCustom.js +24 -7
- package/cjs/internals/styled-system/css-alias.d.ts +7 -0
- package/cjs/internals/styled-system/css-alias.js +391 -0
- package/cjs/internals/styled-system/css-properties.d.ts +6 -0
- package/cjs/internals/styled-system/css-properties.js +30 -0
- package/cjs/internals/styled-system/index.d.ts +1 -1
- package/cjs/internals/styled-system/index.js +4 -4
- package/cjs/internals/styled-system/responsive.d.ts +0 -4
- package/cjs/internals/styled-system/responsive.js +12 -33
- package/cjs/internals/styled-system/types.d.ts +59 -5
- package/cjs/internals/styled-system/useStyled.js +3 -3
- package/cjs/internals/types/html.d.ts +6 -6
- package/cjs/internals/types/picker.d.ts +1 -1
- package/dist/rsuite-no-reset.css +641 -641
- package/dist/rsuite-no-reset.min.css +1 -1
- package/dist/rsuite.css +641 -641
- package/dist/rsuite.js +60 -60
- package/dist/rsuite.min.css +1 -1
- package/dist/rsuite.min.js +1 -1
- package/dist/rsuite.min.js.map +1 -1
- package/esm/Badge/Badge.js +16 -11
- package/esm/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/esm/Button/Button.js +9 -7
- package/esm/ButtonGroup/ButtonGroup.js +7 -7
- package/esm/Card/Card.js +6 -6
- package/esm/Checkbox/Checkbox.js +6 -7
- package/esm/CheckboxGroup/CheckboxGroup.js +3 -4
- package/esm/Dropdown/Dropdown.js +3 -4
- package/esm/Dropdown/DropdownItem.js +4 -4
- package/esm/Dropdown/DropdownMenu.js +9 -10
- package/esm/FormControl/FormControl.d.ts +1 -1
- package/esm/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/esm/FormHelpText/FormHelpText.d.ts +1 -1
- package/esm/IconButton/IconButton.d.ts +1 -1
- package/esm/IconButton/IconButton.js +9 -9
- package/esm/Image/Image.d.ts +1 -1
- package/esm/InlineEdit/InlineEdit.js +3 -2
- package/esm/InputGroup/InputGroup.js +12 -14
- package/esm/InputGroup/InputGroupAddon.d.ts +2 -2
- package/esm/InputPicker/InputAutosize.js +4 -6
- package/esm/List/List.d.ts +1 -1
- package/esm/List/List.js +7 -8
- package/esm/List/ListItem.d.ts +2 -2
- package/esm/List/ListItem.js +4 -4
- package/esm/Loader/Loader.js +8 -7
- package/esm/Menu/MenuSeparator.d.ts +2 -2
- package/esm/Nav/Nav.d.ts +2 -2
- package/esm/Nav/Nav.js +12 -13
- package/esm/Nav/NavDropdownItem.js +4 -4
- package/esm/Nav/NavDropdownMenu.js +10 -13
- package/esm/Nav/NavItem.d.ts +2 -2
- package/esm/Nav/NavItem.js +6 -8
- package/esm/Navbar/Navbar.js +7 -7
- package/esm/Navbar/NavbarDropdown.d.ts +1 -1
- package/esm/Navbar/NavbarDropdown.js +3 -4
- package/esm/Navbar/NavbarDropdownItem.js +4 -4
- package/esm/Navbar/NavbarDropdownMenu.js +8 -11
- package/esm/NumberInput/NumberInput.d.ts +1 -1
- package/esm/Pagination/Pagination.js +3 -2
- package/esm/Pagination/PaginationButton.d.ts +3 -3
- package/esm/Pagination/PaginationButton.js +9 -16
- package/esm/Pagination/PaginationGroup.js +2 -1
- package/esm/Panel/PanelHeader.d.ts +1 -1
- package/esm/Radio/Radio.js +6 -6
- package/esm/RadioGroup/RadioGroup.js +4 -4
- package/esm/Sidenav/ExpandedSidenavDropdown.d.ts +1 -1
- package/esm/Sidenav/Sidenav.js +3 -2
- package/esm/Sidenav/SidenavDropdown.js +3 -5
- package/esm/Sidenav/SidenavDropdownItem.js +4 -4
- package/esm/Sidenav/SidenavDropdownMenu.js +10 -13
- package/esm/Sidenav/SidenavItem.d.ts +2 -2
- package/esm/Sidenav/SidenavItem.js +4 -5
- package/esm/Slider/Handle.d.ts +1 -1
- package/esm/Stack/Stack.d.ts +1 -17
- package/esm/Stack/Stack.js +3 -4
- package/esm/Stack/StackItem.d.ts +4 -5
- package/esm/Stack/StackItem.js +5 -11
- package/esm/Steps/StepItem.js +7 -8
- package/esm/Steps/Steps.d.ts +2 -1
- package/esm/Steps/Steps.js +31 -34
- package/esm/Tabs/Tabs.js +1 -1
- package/esm/Tag/Tag.js +5 -2
- package/esm/Toggle/Toggle.d.ts +1 -1
- package/esm/Toggle/Toggle.js +7 -6
- package/esm/Tree/types.d.ts +2 -2
- package/esm/Uploader/Uploader.d.ts +2 -2
- package/esm/internals/Box/Box.d.ts +1 -0
- package/esm/internals/Box/index.d.ts +1 -1
- package/esm/internals/Box/utils.js +6 -5
- package/esm/internals/InputBase/InputBase.d.ts +1 -1
- package/esm/internals/InputBase/InputBase.js +3 -2
- package/esm/internals/Menu/MenuItem.js +1 -1
- package/esm/internals/Overlay/Modal.d.ts +1 -1
- package/esm/internals/Picker/PickerToggle.js +2 -4
- package/esm/internals/SafeAnchor/SafeAnchor.d.ts +2 -2
- package/esm/internals/Tree/TreeView.d.ts +2 -2
- package/esm/internals/hooks/useCustom.js +24 -7
- package/esm/internals/styled-system/css-alias.d.ts +7 -0
- package/esm/internals/styled-system/css-alias.js +387 -0
- package/esm/internals/styled-system/css-properties.d.ts +6 -0
- package/esm/internals/styled-system/css-properties.js +26 -0
- package/esm/internals/styled-system/index.d.ts +1 -1
- package/esm/internals/styled-system/index.js +1 -1
- package/esm/internals/styled-system/responsive.d.ts +0 -4
- package/esm/internals/styled-system/responsive.js +11 -31
- package/esm/internals/styled-system/types.d.ts +59 -5
- package/esm/internals/styled-system/useStyled.js +3 -3
- package/esm/internals/types/html.d.ts +6 -6
- package/esm/internals/types/picker.d.ts +1 -1
- package/package.json +1 -1
- package/cjs/internals/styled-system/css-property.d.ts +0 -6
- package/cjs/internals/styled-system/css-property.js +0 -289
- package/esm/internals/styled-system/css-property.d.ts +0 -6
- package/esm/internals/styled-system/css-property.js +0 -285
package/esm/Badge/Badge.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
|
-
import kebabCase from 'lodash/kebabCase';
|
|
5
4
|
import Box from "../internals/Box/index.js";
|
|
6
5
|
import { useStyles, useCustom } from "../internals/hooks/index.js";
|
|
7
6
|
import { forwardRef, mergeStyles, createOffsetStyles, isPresetColor, createColorVariables } from "../internals/utils/index.js";
|
|
@@ -40,30 +39,36 @@ const Badge = forwardRef((props, ref) => {
|
|
|
40
39
|
var _String;
|
|
41
40
|
return ((_String = String(content)) === null || _String === void 0 ? void 0 : _String.length) === 1;
|
|
42
41
|
}, [content]);
|
|
43
|
-
const classes = merge(className, withPrefix(
|
|
44
|
-
|
|
45
|
-
outline,
|
|
46
|
-
'one-char': isOneChar,
|
|
47
|
-
hidden: invisible,
|
|
48
|
-
wrapper: children,
|
|
49
|
-
independent: !children,
|
|
50
|
-
[kebabCase(placement)]: children
|
|
42
|
+
const classes = merge(className, withPrefix({
|
|
43
|
+
wrapper: children
|
|
51
44
|
}));
|
|
52
45
|
const styles = useMemo(() => mergeStyles(style, createOffsetStyles(offset, '--rs-badge-offset'), createColorVariables(color, '--rs-badge-bg')), [style, offset, color]);
|
|
46
|
+
const dataAttributes = useMemo(() => {
|
|
47
|
+
return {
|
|
48
|
+
['data-color']: isPresetColor(color) ? color : undefined,
|
|
49
|
+
['data-shape']: shape,
|
|
50
|
+
['data-compact']: compact,
|
|
51
|
+
['data-one-char']: isOneChar,
|
|
52
|
+
['data-outline']: outline,
|
|
53
|
+
['data-hidden']: invisible,
|
|
54
|
+
['data-independent']: !children,
|
|
55
|
+
['data-placement']: children ? placement : undefined
|
|
56
|
+
};
|
|
57
|
+
}, [color, shape, compact, isOneChar, outline, invisible, children, placement]);
|
|
53
58
|
if (!children) {
|
|
54
59
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
55
60
|
as: as,
|
|
56
61
|
ref: ref,
|
|
57
62
|
className: classes,
|
|
58
63
|
style: styles
|
|
59
|
-
}, rest), text);
|
|
64
|
+
}, dataAttributes, rest), text);
|
|
60
65
|
}
|
|
61
66
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
62
67
|
as: as,
|
|
63
68
|
ref: ref,
|
|
64
69
|
className: classes,
|
|
65
70
|
style: styles
|
|
66
|
-
}, rest), children, /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
}, dataAttributes, rest), children, /*#__PURE__*/React.createElement("div", {
|
|
67
72
|
className: prefix('content')
|
|
68
73
|
}, text));
|
|
69
74
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { StyledBoxProps } from '../internals/StyledBox';
|
|
3
3
|
import type { BreadcrumbLocale } from '../locales';
|
|
4
|
-
export interface BreadcrumbProps extends
|
|
4
|
+
export interface BreadcrumbProps extends Omit<StyledBoxProps, 'name'> {
|
|
5
5
|
/**
|
|
6
6
|
* The separator between each breadcrumb item.
|
|
7
7
|
*/
|
package/esm/Button/Button.js
CHANGED
|
@@ -44,12 +44,7 @@ const Button = forwardRef((props, ref) => {
|
|
|
44
44
|
prefix,
|
|
45
45
|
merge
|
|
46
46
|
} = useStyles(classPrefix);
|
|
47
|
-
const classes = merge(className, withPrefix(
|
|
48
|
-
active,
|
|
49
|
-
disabled,
|
|
50
|
-
loading,
|
|
51
|
-
block
|
|
52
|
-
}));
|
|
47
|
+
const classes = merge(className, withPrefix());
|
|
53
48
|
const buttonContent = useMemo(() => {
|
|
54
49
|
const spin = /*#__PURE__*/React.createElement("span", {
|
|
55
50
|
className: prefix`spin`
|
|
@@ -80,7 +75,14 @@ const Button = forwardRef((props, ref) => {
|
|
|
80
75
|
as: buttonAs,
|
|
81
76
|
ref: ref,
|
|
82
77
|
className: classes,
|
|
83
|
-
onClick: handleClick
|
|
78
|
+
onClick: handleClick,
|
|
79
|
+
"data-appearance": appearance,
|
|
80
|
+
"data-color": color,
|
|
81
|
+
"data-size": size,
|
|
82
|
+
"data-block": block,
|
|
83
|
+
"data-active": active || undefined,
|
|
84
|
+
"data-disabled": disabled,
|
|
85
|
+
"data-loading": loading
|
|
84
86
|
}, uncertainProps, rest), buttonContent);
|
|
85
87
|
});
|
|
86
88
|
Button.displayName = 'Button';
|
|
@@ -31,12 +31,7 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
31
31
|
withPrefix,
|
|
32
32
|
merge
|
|
33
33
|
} = useStyles(classPrefix);
|
|
34
|
-
const classes = merge(className, withPrefix(
|
|
35
|
-
block,
|
|
36
|
-
divided,
|
|
37
|
-
vertical,
|
|
38
|
-
justified
|
|
39
|
-
}));
|
|
34
|
+
const classes = merge(className, withPrefix());
|
|
40
35
|
const contextValue = useMemo(() => ({
|
|
41
36
|
size,
|
|
42
37
|
disabled
|
|
@@ -48,7 +43,12 @@ const ButtonGroup = forwardRef((props, ref) => {
|
|
|
48
43
|
}, rest, {
|
|
49
44
|
role: role,
|
|
50
45
|
ref: ref,
|
|
51
|
-
className: classes
|
|
46
|
+
className: classes,
|
|
47
|
+
"data-size": size,
|
|
48
|
+
"data-block": block,
|
|
49
|
+
"data-vertical": vertical,
|
|
50
|
+
"data-justified": justified,
|
|
51
|
+
"data-divided": divided
|
|
52
52
|
}), children));
|
|
53
53
|
});
|
|
54
54
|
ButtonGroup.displayName = 'ButtonGroup';
|
package/esm/Card/Card.js
CHANGED
|
@@ -34,17 +34,17 @@ const Card = forwardRef((props, ref) => {
|
|
|
34
34
|
withPrefix,
|
|
35
35
|
cssVar
|
|
36
36
|
} = useStyles(classPrefix);
|
|
37
|
-
const classes = merge(className, withPrefix(
|
|
38
|
-
bordered,
|
|
39
|
-
shaded: shaded === true,
|
|
40
|
-
['shaded-hover']: shaded === 'hover'
|
|
41
|
-
}));
|
|
37
|
+
const classes = merge(className, withPrefix());
|
|
42
38
|
const styles = mergeStyles(style, cssVar('width', width, getCssValue));
|
|
43
39
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
44
40
|
as: as,
|
|
45
41
|
ref: ref,
|
|
46
42
|
className: classes,
|
|
47
|
-
style: styles
|
|
43
|
+
style: styles,
|
|
44
|
+
"data-size": size,
|
|
45
|
+
"data-direction": direction,
|
|
46
|
+
"data-bordered": bordered,
|
|
47
|
+
"data-shaded": shaded
|
|
48
48
|
}, rest), children);
|
|
49
49
|
}, Subcomponents);
|
|
50
50
|
Card.displayName = 'Card';
|
package/esm/Checkbox/Checkbox.js
CHANGED
|
@@ -65,12 +65,7 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
65
65
|
prefix,
|
|
66
66
|
withPrefix
|
|
67
67
|
} = useStyles(classPrefix);
|
|
68
|
-
const classes = merge(className, withPrefix(
|
|
69
|
-
inline,
|
|
70
|
-
indeterminate,
|
|
71
|
-
disabled,
|
|
72
|
-
checked
|
|
73
|
-
}));
|
|
68
|
+
const classes = merge(className, withPrefix());
|
|
74
69
|
const [htmlInputProps, restProps] = partitionHTMLProps(rest);
|
|
75
70
|
|
|
76
71
|
// If <Checkbox> is within a <CheckboxGroup>, it's bound to be controlled
|
|
@@ -130,7 +125,11 @@ const Checkbox = forwardRef((props, ref) => {
|
|
|
130
125
|
}, restProps, {
|
|
131
126
|
ref: ref,
|
|
132
127
|
onClick: onClick,
|
|
133
|
-
className: classes
|
|
128
|
+
className: classes,
|
|
129
|
+
"data-color": color,
|
|
130
|
+
"data-checked": indeterminate ? 'mixed' : checked,
|
|
131
|
+
"data-disabled": disabled,
|
|
132
|
+
"data-inline": inline
|
|
134
133
|
}), /*#__PURE__*/React.createElement("div", {
|
|
135
134
|
className: prefix`checker`
|
|
136
135
|
}, /*#__PURE__*/React.createElement("label", {
|
|
@@ -35,9 +35,7 @@ const CheckboxGroup = forwardRef((props, ref) => {
|
|
|
35
35
|
merge,
|
|
36
36
|
withPrefix
|
|
37
37
|
} = useStyles(classPrefix);
|
|
38
|
-
const classes = merge(className, withPrefix(
|
|
39
|
-
inline
|
|
40
|
-
}));
|
|
38
|
+
const classes = merge(className, withPrefix());
|
|
41
39
|
const [value, setValue, isControlled] = useControlled(valueProp, defaultValue);
|
|
42
40
|
const handleChange = useCallback((itemValue, itemChecked, event) => {
|
|
43
41
|
const nextValue = cloneDeep(value) || [];
|
|
@@ -69,7 +67,8 @@ const CheckboxGroup = forwardRef((props, ref) => {
|
|
|
69
67
|
}, rest, {
|
|
70
68
|
ref: ref,
|
|
71
69
|
role: "group",
|
|
72
|
-
className: classes
|
|
70
|
+
className: classes,
|
|
71
|
+
"data-inline": inline
|
|
73
72
|
}), children));
|
|
74
73
|
});
|
|
75
74
|
CheckboxGroup.displayName = 'CheckboxGroup';
|
package/esm/Dropdown/Dropdown.js
CHANGED
|
@@ -139,15 +139,14 @@ const Dropdown = forwardRef((props, ref) => {
|
|
|
139
139
|
open,
|
|
140
140
|
...menuContainer
|
|
141
141
|
}, menuContainerRef) => {
|
|
142
|
-
const classes = merge(className, withPrefix(
|
|
143
|
-
disabled,
|
|
144
|
-
open
|
|
145
|
-
}));
|
|
142
|
+
const classes = merge(className, withPrefix());
|
|
146
143
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
147
144
|
ref: mergeRefs(ref, menuContainerRef),
|
|
148
145
|
className: classes,
|
|
149
146
|
style: style,
|
|
150
147
|
"data-placement": kebabPlace(placement),
|
|
148
|
+
"data-disabled": disabled,
|
|
149
|
+
"data-open": open,
|
|
151
150
|
"data-active-descendant": hasSelectedItem
|
|
152
151
|
}, menuContainer, pick(toggleProps, ['data-testid'])));
|
|
153
152
|
}));
|
|
@@ -105,14 +105,14 @@ const DropdownItem = forwardRef((props, ref) => {
|
|
|
105
105
|
...menuitem
|
|
106
106
|
}, menuitemRef) => {
|
|
107
107
|
const classes = merge(className, withPrefix({
|
|
108
|
-
'with-icon': icon,
|
|
109
|
-
active: selected,
|
|
110
|
-
disabled,
|
|
111
|
-
focus: active,
|
|
112
108
|
divider,
|
|
113
109
|
panel
|
|
114
110
|
}));
|
|
115
111
|
const dataAttributes = {
|
|
112
|
+
'data-disabled': disabled,
|
|
113
|
+
'data-focus': active,
|
|
114
|
+
'data-active': selected,
|
|
115
|
+
'data-with-icon': !!icon,
|
|
116
116
|
'data-event-key': eventKey
|
|
117
117
|
};
|
|
118
118
|
if (!isNil(eventKey) && typeof eventKey !== 'string') {
|
|
@@ -112,16 +112,15 @@ const DropdownMenu = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
112
112
|
active,
|
|
113
113
|
...menuitem
|
|
114
114
|
}, menuitemRef) => {
|
|
115
|
-
const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix(
|
|
116
|
-
'with-icon': icon,
|
|
117
|
-
open,
|
|
118
|
-
active: selected,
|
|
119
|
-
disabled,
|
|
120
|
-
focus: active
|
|
121
|
-
}));
|
|
115
|
+
const classes = mergeItemClassNames(className, prefixItemClassName`toggle`, withItemClassPrefix());
|
|
122
116
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
123
117
|
ref: mergeRefs(buttonRef, menuitemRef),
|
|
124
118
|
className: classes,
|
|
119
|
+
"data-open": open,
|
|
120
|
+
"data-disabled": disabled,
|
|
121
|
+
"data-focus": active,
|
|
122
|
+
"data-active": selected,
|
|
123
|
+
"data-with-icon": icon,
|
|
125
124
|
"data-event-key": eventKey,
|
|
126
125
|
"data-event-key-type": typeof eventKey
|
|
127
126
|
}, menuitem, omit(menuButtonProps, ['role'])), icon && /*#__PURE__*/React.cloneElement(icon, {
|
|
@@ -147,13 +146,13 @@ const DropdownMenu = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
147
146
|
...menuContainer
|
|
148
147
|
}, menuContainerRef) => {
|
|
149
148
|
const classes = mergeItemClassNames(className, withItemClassPrefix({
|
|
150
|
-
disabled,
|
|
151
|
-
open,
|
|
152
149
|
submenu: true
|
|
153
150
|
}));
|
|
154
151
|
return /*#__PURE__*/React.createElement("li", _extends({
|
|
155
152
|
ref: mergeRefs(ref, menuContainerRef),
|
|
156
|
-
className: classes
|
|
153
|
+
className: classes,
|
|
154
|
+
"data-open": open,
|
|
155
|
+
"data-disabled": disabled
|
|
157
156
|
}, menuContainer));
|
|
158
157
|
});
|
|
159
158
|
});
|
|
@@ -7,7 +7,7 @@ import type { ErrorMessagePlacement, FormControlBaseProps, CheckTriggerType } fr
|
|
|
7
7
|
* Props that FormControl passes to its accepter
|
|
8
8
|
*/
|
|
9
9
|
export type FormControlAccepterProps<ValueType = any> = FormControlBaseProps<ValueType>;
|
|
10
|
-
export interface FormControlProps<ValueType = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLFormElement>, 'value' | 'onChange'> {
|
|
10
|
+
export interface FormControlProps<ValueType = any> extends BoxProps, Omit<React.HTMLAttributes<HTMLFormElement>, 'value' | 'onChange' | 'color'> {
|
|
11
11
|
/** Proxied components */
|
|
12
12
|
accepter?: React.ElementType;
|
|
13
13
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../internals/Box';
|
|
3
|
-
export interface FormControlLabelProps extends BoxProps, React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
export interface FormControlLabelProps extends BoxProps, Omit<React.LabelHTMLAttributes<HTMLLabelElement>, 'color'> {
|
|
4
4
|
/** Attribute of the html label tag, defaults to the controlId of the FormGroup */
|
|
5
5
|
htmlFor?: string;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BoxProps } from '../internals/Box';
|
|
3
|
-
export interface FormHelpTextProps extends BoxProps, React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
export interface FormHelpTextProps extends BoxProps, Omit<React.HTMLAttributes<HTMLSpanElement>, 'color'> {
|
|
4
4
|
/** Whether to show through the Tooltip component */
|
|
5
5
|
tooltip?: boolean;
|
|
6
6
|
}
|
|
@@ -7,7 +7,7 @@ export interface IconButtonProps extends ButtonProps {
|
|
|
7
7
|
/** Set circle button */
|
|
8
8
|
circle?: boolean;
|
|
9
9
|
/** The placement of icon */
|
|
10
|
-
placement?: 'left' | 'right';
|
|
10
|
+
placement?: 'left' | 'right' | 'start' | 'end';
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* The `IconButton` component is used to specify a button with icon.
|
|
@@ -13,25 +13,25 @@ const IconButton = forwardRef((props, ref) => {
|
|
|
13
13
|
propsWithDefaults
|
|
14
14
|
} = useCustom('IconButton', props);
|
|
15
15
|
const {
|
|
16
|
-
icon,
|
|
17
|
-
placement = 'left',
|
|
18
|
-
children,
|
|
19
16
|
circle,
|
|
20
|
-
|
|
17
|
+
children,
|
|
21
18
|
className,
|
|
19
|
+
classPrefix = 'btn-icon',
|
|
20
|
+
placement = 'start',
|
|
21
|
+
icon,
|
|
22
22
|
...rest
|
|
23
23
|
} = propsWithDefaults;
|
|
24
24
|
const {
|
|
25
25
|
merge,
|
|
26
26
|
withPrefix
|
|
27
27
|
} = useStyles(classPrefix);
|
|
28
|
-
const classes = merge(className, withPrefix(
|
|
29
|
-
circle,
|
|
30
|
-
'with-text': typeof children !== 'undefined'
|
|
31
|
-
}));
|
|
28
|
+
const classes = merge(className, withPrefix());
|
|
32
29
|
return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {
|
|
33
30
|
ref: ref,
|
|
34
|
-
className: classes
|
|
31
|
+
className: classes,
|
|
32
|
+
"data-shape": circle ? 'circle' : undefined,
|
|
33
|
+
"data-placement": placement,
|
|
34
|
+
"data-with-text": typeof children !== 'undefined' || undefined
|
|
35
35
|
}), icon, children);
|
|
36
36
|
});
|
|
37
37
|
IconButton.displayName = 'IconButton';
|
package/esm/Image/Image.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { BoxProps } from '../internals/Box';
|
|
3
|
-
export interface ImageProps extends Omit<BoxProps, 'rounded'>, Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
|
|
3
|
+
export interface ImageProps extends Omit<BoxProps, 'rounded' | 'color' | 'height' | 'width' | 'position'>, Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
|
|
4
4
|
/**
|
|
5
5
|
* An image may appear with border.
|
|
6
6
|
*/
|
|
@@ -66,12 +66,13 @@ const InlineEdit = forwardRef((props, ref) => {
|
|
|
66
66
|
as: as,
|
|
67
67
|
ref: mergeRefs(root, ref),
|
|
68
68
|
tabIndex: 0,
|
|
69
|
-
className: merge(className, withPrefix(
|
|
69
|
+
className: merge(className, withPrefix({
|
|
70
70
|
disabled
|
|
71
71
|
})),
|
|
72
72
|
onClick: onClick,
|
|
73
73
|
onKeyDown: onKeyDown,
|
|
74
|
-
onFocus: onFocus
|
|
74
|
+
onFocus: onFocus,
|
|
75
|
+
"data-size": size
|
|
75
76
|
}, htmlProps), renderChildren(children, childrenProps, target), showControls && isEditing && /*#__PURE__*/React.createElement(EditableControls, {
|
|
76
77
|
className: prefix('controls'),
|
|
77
78
|
onSave: onSave,
|
|
@@ -41,20 +41,14 @@ const InputGroup = forwardRef((props, ref) => {
|
|
|
41
41
|
withPrefix,
|
|
42
42
|
merge
|
|
43
43
|
} = useStyles(classPrefix);
|
|
44
|
-
const classes = merge(className, withPrefix(
|
|
45
|
-
|
|
46
|
-
focus,
|
|
47
|
-
disabled
|
|
48
|
-
}));
|
|
49
|
-
const renderChildren = useCallback(() => {
|
|
44
|
+
const classes = merge(className, withPrefix());
|
|
45
|
+
const inputGroupChildren = useMemo(() => {
|
|
50
46
|
return React.Children.map(children, item => {
|
|
51
47
|
if (/*#__PURE__*/React.isValidElement(item)) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}) : item;
|
|
57
|
-
}
|
|
48
|
+
// Fix: Add type assertion to pass the disabled prop to the child element
|
|
49
|
+
return disabled ? /*#__PURE__*/React.cloneElement(item, {
|
|
50
|
+
disabled
|
|
51
|
+
}) : item;
|
|
58
52
|
}
|
|
59
53
|
return item;
|
|
60
54
|
});
|
|
@@ -70,8 +64,12 @@ const InputGroup = forwardRef((props, ref) => {
|
|
|
70
64
|
as: as
|
|
71
65
|
}, rest, {
|
|
72
66
|
ref: ref,
|
|
73
|
-
className: classes
|
|
74
|
-
|
|
67
|
+
className: classes,
|
|
68
|
+
"data-size": size,
|
|
69
|
+
"data-inside": inside,
|
|
70
|
+
"data-disabled": disabled,
|
|
71
|
+
"data-focus": focus
|
|
72
|
+
}), inputGroupChildren));
|
|
75
73
|
}, Subcomponents);
|
|
76
74
|
InputGroup.displayName = 'InputGroup';
|
|
77
75
|
export default InputGroup;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface InputGroupAddonProps extends
|
|
2
|
+
import { BaseBoxProps } from '../internals/Box';
|
|
3
|
+
export interface InputGroupAddonProps extends BaseBoxProps, React.HTMLAttributes<HTMLSpanElement> {
|
|
4
4
|
/** An Input group addon can show that it is disabled */
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import React, { useState, useRef, useImperativeHandle, useEffect, useMemo } from 'react';
|
|
4
|
+
import Box from "../internals/Box/index.js";
|
|
4
5
|
import { partitionHTMLProps, isIE, guid } from "../internals/utils/index.js";
|
|
5
6
|
const sizerStyle = {
|
|
6
7
|
position: 'absolute',
|
|
@@ -82,10 +83,6 @@ const InputAutosize = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
82
83
|
return currentValue;
|
|
83
84
|
});
|
|
84
85
|
const inputWidth = useInputWidth(props, sizerRef, placeholderRef);
|
|
85
|
-
const wrapperStyle = {
|
|
86
|
-
display: 'inline-block',
|
|
87
|
-
...style
|
|
88
|
-
};
|
|
89
86
|
const nextInputStyle = {
|
|
90
87
|
boxSizing: 'content-box',
|
|
91
88
|
width: `${inputWidth}px`,
|
|
@@ -116,10 +113,11 @@ const InputAutosize = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
116
113
|
// By setting an id, matching the style, hiding the `x` symbol by the style.
|
|
117
114
|
htmlInputProps.id = inputId;
|
|
118
115
|
}
|
|
119
|
-
return /*#__PURE__*/React.createElement(
|
|
116
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
120
117
|
ref: rootRef,
|
|
121
118
|
className: className,
|
|
122
|
-
style:
|
|
119
|
+
style: style,
|
|
120
|
+
display: "inline-block"
|
|
123
121
|
}, isIE() ? /*#__PURE__*/React.createElement("style", {
|
|
124
122
|
dangerouslySetInnerHTML: {
|
|
125
123
|
__html: `input#${inputId}::-ms-clear {display: none;}`
|
package/esm/List/List.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SortConfig } from './helper/useSortHelper';
|
|
2
2
|
import { BoxProps } from '../internals/Box';
|
|
3
|
-
export interface ListProps extends BoxProps, SortConfig {
|
|
3
|
+
export interface ListProps extends Omit<BoxProps, 'transitionDuration'>, SortConfig {
|
|
4
4
|
/**
|
|
5
5
|
* Size of list item.
|
|
6
6
|
*/
|
package/esm/List/List.js
CHANGED
|
@@ -59,13 +59,7 @@ const List = forwardRef((props, ref) => {
|
|
|
59
59
|
pressDelay,
|
|
60
60
|
transitionDuration
|
|
61
61
|
});
|
|
62
|
-
const classes = merge(className, withPrefix(
|
|
63
|
-
bordered,
|
|
64
|
-
sortable,
|
|
65
|
-
sorting,
|
|
66
|
-
hover,
|
|
67
|
-
divider
|
|
68
|
-
}));
|
|
62
|
+
const classes = merge(className, withPrefix());
|
|
69
63
|
const contextValue = useMemo(() => ({
|
|
70
64
|
bordered,
|
|
71
65
|
size,
|
|
@@ -79,7 +73,12 @@ const List = forwardRef((props, ref) => {
|
|
|
79
73
|
onMouseDown: sortable ? handleStart : undefined,
|
|
80
74
|
onMouseUp: sortable ? handleEnd : undefined,
|
|
81
75
|
onTouchStart: sortable ? handleTouchStart : undefined,
|
|
82
|
-
onTouchEnd: sortable ? handleTouchEnd : undefined
|
|
76
|
+
onTouchEnd: sortable ? handleTouchEnd : undefined,
|
|
77
|
+
"data-bordered": bordered,
|
|
78
|
+
"data-hover": hover,
|
|
79
|
+
"data-sortable": sortable,
|
|
80
|
+
"data-sorting": sorting,
|
|
81
|
+
"data-divider": divider
|
|
83
82
|
}, rest), /*#__PURE__*/React.createElement(ListContext.Provider, {
|
|
84
83
|
value: contextValue
|
|
85
84
|
}, children));
|
package/esm/List/ListItem.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseBoxProps } from '../internals/Box';
|
|
3
3
|
import { Collection } from './helper/useManager';
|
|
4
|
-
export interface ListItemProps extends
|
|
4
|
+
export interface ListItemProps extends BaseBoxProps, React.HTMLAttributes<HTMLElement> {
|
|
5
5
|
index?: number;
|
|
6
6
|
collection?: Collection;
|
|
7
7
|
disabled?: boolean;
|
package/esm/List/ListItem.js
CHANGED
|
@@ -48,14 +48,14 @@ const ListItem = forwardRef((props, ref) => {
|
|
|
48
48
|
return unregister;
|
|
49
49
|
}
|
|
50
50
|
}, [collection, disabled, index, register]);
|
|
51
|
-
const classes = merge(className, withPrefix(
|
|
52
|
-
disabled,
|
|
53
|
-
bordered
|
|
54
|
-
}));
|
|
51
|
+
const classes = merge(className, withPrefix());
|
|
55
52
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
56
53
|
as: as,
|
|
57
54
|
role: "listitem",
|
|
58
55
|
"aria-disabled": disabled,
|
|
56
|
+
"data-size": size,
|
|
57
|
+
"data-disabled": disabled,
|
|
58
|
+
"data-bordered": bordered,
|
|
59
59
|
ref: mergeRefs(listItemRef, ref),
|
|
60
60
|
className: classes
|
|
61
61
|
}, rest), children);
|
package/esm/Loader/Loader.js
CHANGED
|
@@ -31,21 +31,22 @@ const Loader = forwardRef((props, ref) => {
|
|
|
31
31
|
prefix
|
|
32
32
|
} = useStyles(classPrefix);
|
|
33
33
|
const labelId = useUniqueId('loader-label-');
|
|
34
|
-
const classes = merge(className,
|
|
35
|
-
center: backdrop || center,
|
|
36
|
-
vertical,
|
|
37
|
-
inverse
|
|
38
|
-
}));
|
|
34
|
+
const classes = merge(className, withPrefix());
|
|
39
35
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
40
36
|
as: as,
|
|
41
37
|
role: "status",
|
|
42
38
|
"aria-labelledby": content ? labelId : undefined,
|
|
43
39
|
ref: ref,
|
|
44
|
-
className: classes
|
|
40
|
+
className: classes,
|
|
41
|
+
"data-size": size,
|
|
42
|
+
"data-speed": speed,
|
|
43
|
+
"data-center": backdrop || center,
|
|
44
|
+
"data-direction": vertical ? 'vertical' : 'horizontal',
|
|
45
|
+
"data-inverse": inverse
|
|
45
46
|
}, rest), backdrop && /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
className: prefix('backdrop')
|
|
47
48
|
}), /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
className:
|
|
49
|
+
className: prefix('box')
|
|
49
50
|
}, /*#__PURE__*/React.createElement("span", {
|
|
50
51
|
className: prefix('spin')
|
|
51
52
|
}), content && /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface MenuSeparatorProps extends
|
|
2
|
+
import { BaseBoxProps } from '../internals/Box';
|
|
3
|
+
export interface MenuSeparatorProps extends BaseBoxProps, React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** You can use a custom element for this component */
|
|
5
5
|
as?: React.ElementType;
|
|
6
6
|
}
|
package/esm/Nav/Nav.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseBoxProps } from '../internals/Box';
|
|
3
3
|
import type { HTMLPropsWithoutSelect } from '../internals/types';
|
|
4
|
-
export interface NavProps<T = any> extends
|
|
4
|
+
export interface NavProps<T = any> extends BaseBoxProps, HTMLPropsWithoutSelect {
|
|
5
5
|
/**
|
|
6
6
|
* The appearance style of the Nav component.
|
|
7
7
|
* - 'pills' appearance is deprecated. Use `SegmentedControl` component instead.
|
package/esm/Nav/Nav.js
CHANGED
|
@@ -63,12 +63,13 @@ const Nav = forwardRef((props, ref) => {
|
|
|
63
63
|
const classes = merge(className, rootPrefix({
|
|
64
64
|
'navbar-nav': navbar,
|
|
65
65
|
'sidenav-nav': sidenav
|
|
66
|
-
}), withPrefix(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
}), withPrefix());
|
|
67
|
+
const dataAttributes = {
|
|
68
|
+
'data-appearance': appearance,
|
|
69
|
+
'data-reversed': reversed,
|
|
70
|
+
'data-justified': justified,
|
|
71
|
+
'data-direction': vertical || sidenav ? 'vertical' : 'horizontal'
|
|
72
|
+
};
|
|
72
73
|
const {
|
|
73
74
|
activeKey: activeKeyFromSidenav,
|
|
74
75
|
onSelect: onSelectFromSidenav
|
|
@@ -88,7 +89,7 @@ const Nav = forwardRef((props, ref) => {
|
|
|
88
89
|
}, /*#__PURE__*/React.createElement("ul", _extends({
|
|
89
90
|
ref: ref,
|
|
90
91
|
className: classes
|
|
91
|
-
}, rest), children));
|
|
92
|
+
}, dataAttributes, rest), children));
|
|
92
93
|
}
|
|
93
94
|
const hasWaterline = appearance !== 'default';
|
|
94
95
|
|
|
@@ -100,19 +101,17 @@ const Nav = forwardRef((props, ref) => {
|
|
|
100
101
|
vertical: !!sidenav
|
|
101
102
|
}, (menubar, ref) => /*#__PURE__*/React.createElement(Box, _extends({
|
|
102
103
|
as: as,
|
|
103
|
-
ref: ref
|
|
104
|
-
}, rest, {
|
|
104
|
+
ref: ref,
|
|
105
105
|
className: classes
|
|
106
|
-
}, menubar), children)));
|
|
106
|
+
}, dataAttributes, menubar, rest), children)));
|
|
107
107
|
}
|
|
108
108
|
return /*#__PURE__*/React.createElement(NavContext.Provider, {
|
|
109
109
|
value: contextValue
|
|
110
110
|
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
111
|
-
as: as
|
|
112
|
-
}, rest, {
|
|
111
|
+
as: as,
|
|
113
112
|
ref: menubarRef,
|
|
114
113
|
className: classes
|
|
115
|
-
}), children, hasWaterline && /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
}, dataAttributes, rest), children, hasWaterline && /*#__PURE__*/React.createElement("div", {
|
|
116
115
|
className: prefix('bar')
|
|
117
116
|
})));
|
|
118
117
|
}, Subcomponents);
|
|
@@ -70,14 +70,14 @@ const NavDropdownItem = forwardRef((props, ref) => {
|
|
|
70
70
|
...menuitem
|
|
71
71
|
}, menuitemRef) => {
|
|
72
72
|
const classes = merge(className, withPrefix({
|
|
73
|
-
'with-icon': icon,
|
|
74
|
-
active: selected,
|
|
75
|
-
disabled,
|
|
76
|
-
focus: active,
|
|
77
73
|
divider,
|
|
78
74
|
panel
|
|
79
75
|
}));
|
|
80
76
|
const dataAttributes = {
|
|
77
|
+
'data-focus': active,
|
|
78
|
+
'data-active': selected,
|
|
79
|
+
'data-disabled': disabled,
|
|
80
|
+
'data-with-icon': !!icon,
|
|
81
81
|
'data-event-key': eventKey
|
|
82
82
|
};
|
|
83
83
|
if (!isNil(eventKey) && typeof eventKey !== 'string') {
|