@deque/cauldron-react 6.0.0-canary.35bcb675 → 6.0.0-canary.3a04d8b8
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/lib/index.js
CHANGED
|
@@ -1756,7 +1756,7 @@ var TooltipContent = function (_a) {
|
|
|
1756
1756
|
*/
|
|
1757
1757
|
// eslint-disable-next-line react/display-name
|
|
1758
1758
|
var IconButton = React.forwardRef(function (_a, ref) {
|
|
1759
|
-
var _b = _a.as, Component = _b === void 0 ? 'button' : _b, icon = _a.icon, label = _a.label, _c = _a.tooltipPlacement, tooltipPlacement = _c === void 0 ? 'auto' : _c, tooltipVariant = _a.tooltipVariant, tooltipPortal = _a.tooltipPortal, className = _a.className, _d = _a.variant, variant = _d === void 0 ? 'secondary' : _d, disabled = _a.disabled, _e = _a.tabIndex, tabIndex = _e === void 0 ? 0 : _e, other = tslib.__rest(_a, ["as", "icon", "label", "tooltipPlacement", "tooltipVariant", "tooltipPortal", "className", "variant", "disabled", "tabIndex"]);
|
|
1759
|
+
var _b = _a.as, Component = _b === void 0 ? 'button' : _b, icon = _a.icon, label = _a.label, _c = _a.tooltipPlacement, tooltipPlacement = _c === void 0 ? 'auto' : _c, tooltipVariant = _a.tooltipVariant, tooltipPortal = _a.tooltipPortal, className = _a.className, _d = _a.variant, variant = _d === void 0 ? 'secondary' : _d, disabled = _a.disabled, _e = _a.tabIndex, tabIndex = _e === void 0 ? 0 : _e, large = _a.large, other = tslib.__rest(_a, ["as", "icon", "label", "tooltipPlacement", "tooltipVariant", "tooltipPortal", "className", "variant", "disabled", "tabIndex", "large"]);
|
|
1760
1760
|
var internalRef = React.useRef();
|
|
1761
1761
|
React.useImperativeHandle(ref, function () { return internalRef.current; });
|
|
1762
1762
|
// Configure additional properties based on the type of the Component
|
|
@@ -1779,7 +1779,8 @@ var IconButton = React.forwardRef(function (_a, ref) {
|
|
|
1779
1779
|
IconButton: true,
|
|
1780
1780
|
'IconButton--primary': variant === 'primary',
|
|
1781
1781
|
'IconButton--secondary': variant === 'secondary',
|
|
1782
|
-
'IconButton--error': variant === 'error'
|
|
1782
|
+
'IconButton--error': variant === 'error',
|
|
1783
|
+
'IconButton--large': large
|
|
1783
1784
|
}), ref: internalRef, disabled: disabled, tabIndex: disabled ? -1 : tabIndex }, accessibilityProps, other),
|
|
1784
1785
|
React__default["default"].createElement(Icon, { type: icon }),
|
|
1785
1786
|
disabled && React__default["default"].createElement(Offscreen, null, label)),
|
|
@@ -2751,7 +2752,7 @@ var Step = function (props) {
|
|
|
2751
2752
|
liProps = other;
|
|
2752
2753
|
}
|
|
2753
2754
|
return (React__default["default"].createElement("li", tslib.__assign({ className: classNames__default["default"]('Stepper__step', "Stepper__step--".concat(status), className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
|
|
2754
|
-
React__default["default"].createElement("div", { className: "Stepper__step-line" }),
|
|
2755
|
+
React__default["default"].createElement("div", { className: classNames__default["default"]('Stepper__step-line', "Stepper__step--".concat(status, "-line")) }),
|
|
2755
2756
|
React__default["default"].createElement("div", { className: "Stepper__step-content" }, isTooltip ? (React__default["default"].createElement(TooltipTabstop, { placement: "bottom", tooltip: tooltip,
|
|
2756
2757
|
// the pseudo content (ex: "1") is conveyed
|
|
2757
2758
|
// by the list item's position in the set of
|
|
@@ -2759,9 +2760,9 @@ var Step = function (props) {
|
|
|
2759
2760
|
// it with the contents of the tooltip in the
|
|
2760
2761
|
// tab stop's accessible name.
|
|
2761
2762
|
association: "aria-labelledby", "aria-label": tooltipText },
|
|
2762
|
-
React__default["default"].createElement("div", { className: "Stepper__step-indicator" }))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2763
|
-
React__default["default"].createElement("div", { className: "Stepper__step-indicator" }),
|
|
2764
|
-
children ? (React__default["default"].createElement("div", { className: "Stepper__step-label" }, children)) : null)))));
|
|
2763
|
+
React__default["default"].createElement("div", { className: classNames__default["default"]('Stepper__step-indicator', "Stepper__step--".concat(status, "-indicator")) }, status === 'complete' && React__default["default"].createElement(Icon, { type: 'check' })))) : (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2764
|
+
React__default["default"].createElement("div", { className: classNames__default["default"]('Stepper__step-indicator', "Stepper__step--".concat(status, "-indicator")) }, status === 'complete' && React__default["default"].createElement(Icon, { type: 'check' })),
|
|
2765
|
+
children ? (React__default["default"].createElement("div", { className: classNames__default["default"]('Stepper__step-label', "Stepper__step--".concat(status, "-label")) }, children)) : null)))));
|
|
2765
2766
|
};
|
|
2766
2767
|
Step.displayName = 'Step';
|
|
2767
2768
|
var Stepper = function (_a) {
|
|
@@ -3548,8 +3549,12 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
3548
3549
|
}
|
|
3549
3550
|
}, [open]);
|
|
3550
3551
|
React.useEffect(function () {
|
|
3552
|
+
var _a = tslib.__read(Array.from(matchingOptions.entries()).find(function (_a) {
|
|
3553
|
+
var _b = tslib.__read(_a, 2), selected = _b[1].selected;
|
|
3554
|
+
return selected;
|
|
3555
|
+
}) || [], 2), element = _a[0], option = _a[1];
|
|
3551
3556
|
if (autocomplete === 'manual') {
|
|
3552
|
-
setActiveDescendant(null);
|
|
3557
|
+
setActiveDescendant(!element ? null : tslib.__assign({ element: element }, option));
|
|
3553
3558
|
}
|
|
3554
3559
|
else if (autocomplete === 'automatic' &&
|
|
3555
3560
|
matchingOptions.size &&
|
|
@@ -3608,8 +3613,11 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
3608
3613
|
var enterKeypress = event.key === Enter;
|
|
3609
3614
|
var escKeypress = event.key === Escape;
|
|
3610
3615
|
var arrowKeypress = ['ArrowDown', 'ArrowUp'].includes(event.key);
|
|
3611
|
-
if (
|
|
3612
|
-
|
|
3616
|
+
if (
|
|
3617
|
+
// prevent the page from scrolling and allow start/end option activation
|
|
3618
|
+
[Home, End].includes(event.key) ||
|
|
3619
|
+
// prevent combobox from submitting any forms when the listbox is expanded
|
|
3620
|
+
(enterKeypress && open)) {
|
|
3613
3621
|
event.preventDefault();
|
|
3614
3622
|
}
|
|
3615
3623
|
if (escKeypress) {
|
|
@@ -15,6 +15,7 @@ export interface IconButtonOwnProps {
|
|
|
15
15
|
tooltipVariant?: TooltipProps['variant'];
|
|
16
16
|
tooltipPortal?: TooltipProps['portal'];
|
|
17
17
|
variant?: 'primary' | 'secondary' | 'error';
|
|
18
|
+
large?: boolean;
|
|
18
19
|
}
|
|
19
20
|
type PolymorphicIconButton = Polymorphic.ForwardRefComponent<'button', IconButtonOwnProps>;
|
|
20
21
|
/**
|
package/package.json
CHANGED