@deque/cauldron-react 4.1.0-canary.49b3b909 → 4.1.0-canary.50e983d0

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.
@@ -1,8 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- interface BaseStepProps {
3
+ interface BaseStepProps extends React.LiHTMLAttributes<HTMLLIElement> {
4
4
  status: 'current' | 'complete' | 'future';
5
- className?: string;
6
5
  }
7
6
  interface StepWithChildren extends BaseStepProps {
8
7
  children: React.ReactNode;
package/lib/index.js CHANGED
@@ -8275,23 +8275,34 @@ var DescriptionDetails = function (_a) {
8275
8275
  DescriptionDetails.displayName = 'DescriptionDetails';
8276
8276
  DescriptionDetails.propTypes = commonPropTypes;
8277
8277
 
8278
- var isTooltip = function (props) {
8278
+ var isTooltipProps = function (props) {
8279
8279
  return !!props.tooltip;
8280
8280
  };
8281
8281
  var Step = function (props) {
8282
- var status = props.status, className = props.className, other = tslib.__rest(props, ["status", "className"]);
8283
- return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--" + status, className), "aria-current": status === 'current' ? 'step' : 'false' }, other),
8282
+ var _a;
8283
+ var children = props.children, status = props.status, className = props.className, other = tslib.__rest(props, ["children", "status", "className"]);
8284
+ var tooltip;
8285
+ var tooltipText;
8286
+ var liProps;
8287
+ var isTooltip = isTooltipProps(other);
8288
+ if (isTooltip) {
8289
+ (_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText, _a), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
8290
+ }
8291
+ else {
8292
+ liProps = other;
8293
+ }
8294
+ return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--" + status, className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
8284
8295
  React__default.createElement("div", { className: "Stepper__step-line" }),
8285
- React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip(props) ? (React__default.createElement(TooltipTabstop, { placement: "bottom", tooltip: props.tooltip,
8296
+ React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip ? (React__default.createElement(TooltipTabstop, { placement: "bottom", tooltip: tooltip,
8286
8297
  // the pseudo content (ex: "1") is conveyed
8287
8298
  // by the list item's position in the set of
8288
8299
  // list items, therefore it is safe to clobber
8289
8300
  // it with the contents of the tooltip in the
8290
8301
  // tab stop's accessible name.
8291
- association: "aria-labelledby", "aria-label": isTooltip(props) ? props.tooltipText : undefined },
8302
+ association: "aria-labelledby", "aria-label": tooltipText },
8292
8303
  React__default.createElement("div", { className: "Stepper__step-indicator" }))) : (React__default.createElement(React__default.Fragment, null,
8293
8304
  React__default.createElement("div", { className: "Stepper__step-indicator" }),
8294
- 'children' in props && (React__default.createElement("div", { className: "Stepper__step-label" }, props.children)))))));
8305
+ children ? (React__default.createElement("div", { className: "Stepper__step-label" }, children)) : null)))));
8295
8306
  };
8296
8307
  Step.displayName = 'Step';
8297
8308
  Step.propTypes = {
@@ -8412,7 +8423,7 @@ var Pagination = React__default.forwardRef(function (_a, ref) {
8412
8423
  React__default.createElement("span", { role: "log", "aria-atomic": "true" }, statusLabel || (React__default.createElement("span", null,
8413
8424
  "Showing ",
8414
8425
  React__default.createElement("strong", null, itemStart),
8415
- " of",
8426
+ " to",
8416
8427
  ' ',
8417
8428
  React__default.createElement("strong", null, itemEnd),
8418
8429
  " of ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "4.1.0-canary.49b3b909",
3
+ "version": "4.1.0-canary.50e983d0",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "publishConfig": {
6
6
  "access": "public"