@deque/cauldron-react 4.1.0-canary.2e36990f → 4.1.0-canary.30f2d0e2
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/cauldron.css
CHANGED
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
4
|
linkRef?: React.Ref<HTMLAnchorElement>;
|
|
5
|
-
variant?: 'button';
|
|
5
|
+
variant?: 'button' | 'button-secondary';
|
|
6
6
|
}
|
|
7
7
|
declare const Link: {
|
|
8
8
|
({ children, linkRef, className, variant, ...other }: LinkProps): JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
interface PanelProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
children: ReactNode;
|
|
5
|
-
heading
|
|
5
|
+
heading?: ReactElement<any> | {
|
|
6
6
|
id?: string;
|
|
7
7
|
text: ReactElement<any>;
|
|
8
8
|
level: number | undefined;
|
|
@@ -15,7 +15,7 @@ declare const Panel: {
|
|
|
15
15
|
displayName: string;
|
|
16
16
|
propTypes: {
|
|
17
17
|
children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
18
|
-
heading: PropTypes.
|
|
18
|
+
heading: PropTypes.Requireable<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
19
19
|
className: PropTypes.Requireable<string>;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
@@ -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
|
@@ -2196,7 +2196,8 @@ var Link = function (_a) {
|
|
|
2196
2196
|
var children = _a.children, linkRef = _a.linkRef, className = _a.className, variant = _a.variant, other = tslib.__rest(_a, ["children", "linkRef", "className", "variant"]);
|
|
2197
2197
|
return (React__default.createElement("a", tslib.__assign({ ref: linkRef, className: classNames(className, {
|
|
2198
2198
|
Link: !variant,
|
|
2199
|
-
'Button--primary': variant === 'button'
|
|
2199
|
+
'Button--primary': variant === 'button',
|
|
2200
|
+
'Button--secondary': variant === 'button-secondary'
|
|
2200
2201
|
}) }, other), children));
|
|
2201
2202
|
};
|
|
2202
2203
|
Link.propTypes = {
|
|
@@ -8275,23 +8276,34 @@ var DescriptionDetails = function (_a) {
|
|
|
8275
8276
|
DescriptionDetails.displayName = 'DescriptionDetails';
|
|
8276
8277
|
DescriptionDetails.propTypes = commonPropTypes;
|
|
8277
8278
|
|
|
8278
|
-
var
|
|
8279
|
+
var isTooltipProps = function (props) {
|
|
8279
8280
|
return !!props.tooltip;
|
|
8280
8281
|
};
|
|
8281
8282
|
var Step = function (props) {
|
|
8282
|
-
var
|
|
8283
|
-
|
|
8283
|
+
var _a;
|
|
8284
|
+
var children = props.children, status = props.status, className = props.className, other = tslib.__rest(props, ["children", "status", "className"]);
|
|
8285
|
+
var tooltip;
|
|
8286
|
+
var tooltipText;
|
|
8287
|
+
var liProps;
|
|
8288
|
+
var isTooltip = isTooltipProps(other);
|
|
8289
|
+
if (isTooltip) {
|
|
8290
|
+
(_a = other, (tooltip = _a.tooltip, tooltipText = _a.tooltipText, _a), liProps = tslib.__rest(_a, ["tooltip", "tooltipText"]));
|
|
8291
|
+
}
|
|
8292
|
+
else {
|
|
8293
|
+
liProps = other;
|
|
8294
|
+
}
|
|
8295
|
+
return (React__default.createElement("li", tslib.__assign({ className: classNames('Stepper__step', "Stepper__step--" + status, className), "aria-current": status === 'current' ? 'step' : 'false' }, liProps),
|
|
8284
8296
|
React__default.createElement("div", { className: "Stepper__step-line" }),
|
|
8285
|
-
React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip
|
|
8297
|
+
React__default.createElement("div", { className: "Stepper__step-content" }, isTooltip ? (React__default.createElement(TooltipTabstop, { placement: "bottom", tooltip: tooltip,
|
|
8286
8298
|
// the pseudo content (ex: "1") is conveyed
|
|
8287
8299
|
// by the list item's position in the set of
|
|
8288
8300
|
// list items, therefore it is safe to clobber
|
|
8289
8301
|
// it with the contents of the tooltip in the
|
|
8290
8302
|
// tab stop's accessible name.
|
|
8291
|
-
association: "aria-labelledby", "aria-label":
|
|
8303
|
+
association: "aria-labelledby", "aria-label": tooltipText },
|
|
8292
8304
|
React__default.createElement("div", { className: "Stepper__step-indicator" }))) : (React__default.createElement(React__default.Fragment, null,
|
|
8293
8305
|
React__default.createElement("div", { className: "Stepper__step-indicator" }),
|
|
8294
|
-
|
|
8306
|
+
children ? (React__default.createElement("div", { className: "Stepper__step-label" }, children)) : null)))));
|
|
8295
8307
|
};
|
|
8296
8308
|
Step.displayName = 'Step';
|
|
8297
8309
|
Step.propTypes = {
|
|
@@ -8313,22 +8325,32 @@ Stepper.propTypes = {
|
|
|
8313
8325
|
var Panel = function (_a) {
|
|
8314
8326
|
var _b;
|
|
8315
8327
|
var children = _a.children, collapsed = _a.collapsed, className = _a.className, heading = _a.heading, other = tslib.__rest(_a, ["children", "collapsed", "className", "heading"]);
|
|
8316
|
-
var
|
|
8317
|
-
?
|
|
8318
|
-
:
|
|
8319
|
-
|
|
8328
|
+
var headingId = !heading
|
|
8329
|
+
? undefined
|
|
8330
|
+
: typeof heading === 'object' && 'id' in heading
|
|
8331
|
+
? heading.id
|
|
8332
|
+
: randomId();
|
|
8333
|
+
var Heading = function () {
|
|
8334
|
+
if (!headingId) {
|
|
8335
|
+
return null;
|
|
8336
|
+
}
|
|
8337
|
+
var HeadingComponent = "h" + (typeof heading === 'object' && 'level' in heading && !!heading.level
|
|
8338
|
+
? heading.level
|
|
8339
|
+
: 2);
|
|
8340
|
+
return (React__default.createElement(HeadingComponent, { id: headingId, className: "Panel__Heading" }, typeof heading === 'object' && 'text' in heading
|
|
8341
|
+
? heading.text
|
|
8342
|
+
: heading));
|
|
8343
|
+
};
|
|
8320
8344
|
return (React__default.createElement("section", tslib.__assign({ "aria-labelledby": headingId, className: classNames('Panel', className, (_b = {},
|
|
8321
8345
|
_b['Panel--collapsed'] = collapsed,
|
|
8322
8346
|
_b)) }, other),
|
|
8323
|
-
React__default.createElement(Heading,
|
|
8324
|
-
? heading.text
|
|
8325
|
-
: heading),
|
|
8347
|
+
React__default.createElement(Heading, null),
|
|
8326
8348
|
children));
|
|
8327
8349
|
};
|
|
8328
8350
|
Panel.displayName = 'Panel';
|
|
8329
8351
|
Panel.propTypes = {
|
|
8330
8352
|
children: PropTypes.node.isRequired,
|
|
8331
|
-
heading: PropTypes.oneOfType([PropTypes.object, PropTypes.node])
|
|
8353
|
+
heading: PropTypes.oneOfType([PropTypes.object, PropTypes.node]),
|
|
8332
8354
|
className: PropTypes.string
|
|
8333
8355
|
};
|
|
8334
8356
|
|
|
@@ -8402,7 +8424,7 @@ var Pagination = React__default.forwardRef(function (_a, ref) {
|
|
|
8402
8424
|
React__default.createElement("span", { role: "log", "aria-atomic": "true" }, statusLabel || (React__default.createElement("span", null,
|
|
8403
8425
|
"Showing ",
|
|
8404
8426
|
React__default.createElement("strong", null, itemStart),
|
|
8405
|
-
"
|
|
8427
|
+
" to",
|
|
8406
8428
|
' ',
|
|
8407
8429
|
React__default.createElement("strong", null, itemEnd),
|
|
8408
8430
|
" of ",
|