@deque/cauldron-react 4.3.0-canary.acd760d8 → 4.3.0-canary.bb49adf8

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,10 @@
1
1
  import React from 'react';
2
+ import SkipLink from '../SkipLink';
2
3
  interface TwoColumnPanelProps extends React.HTMLAttributes<HTMLDivElement> {
3
4
  initialCollapsed?: boolean;
4
5
  showCollapsedPanelLabel?: string;
5
6
  hideCollapsedPanelLabel?: string;
7
+ skipLink?: SkipLink;
6
8
  }
7
9
  declare const TwoColumnPanel: React.ForwardRefExoticComponent<TwoColumnPanelProps & React.RefAttributes<HTMLDivElement>>;
8
10
  export default TwoColumnPanel;
package/lib/index.js CHANGED
@@ -8556,11 +8556,23 @@ var BreadcrumbLink = React.forwardRef(function (_a, ref) {
8556
8556
  return (React__default.createElement(ElementType, tslib.__assign({ className: classNames('Link', 'Breadcrumb__Link', className), ref: ref }, props), children));
8557
8557
  });
8558
8558
 
8559
+ var ColumnLeft = React.forwardRef(function (_a, ref) {
8560
+ var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
8561
+ return (React__default.createElement("section", tslib.__assign({ className: classNames('TwoColumnPanel__Left', className) }, props, { ref: ref }), children));
8562
+ });
8563
+ ColumnLeft.displayName = 'ColumnLeft';
8564
+
8565
+ var ColumnRight = React.forwardRef(function (_a, ref) {
8566
+ var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
8567
+ return (React__default.createElement("section", tslib.__assign({ className: classNames('TwoColumnPanel__Right', className) }, props, { ref: ref }), children));
8568
+ });
8569
+ ColumnRight.displayName = 'ColumnRight';
8570
+
8559
8571
  var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8560
- var className = _a.className, children = _a.children, _b = _a.initialCollapsed, initialCollapsed = _b === void 0 ? false : _b, _c = _a.showCollapsedPanelLabel, showCollapsedPanelLabel = _c === void 0 ? 'Show Panel' : _c, _d = _a.hideCollapsedPanelLabel, hideCollapsedPanelLabel = _d === void 0 ? 'Hide Panel' : _d, props = tslib.__rest(_a, ["className", "children", "initialCollapsed", "showCollapsedPanelLabel", "hideCollapsedPanelLabel"]);
8561
- var _e = tslib.__read(React.useState(initialCollapsed), 2), isCollapsed = _e[0], setCollapsed = _e[1];
8562
- var _f = tslib.__read(React.useState(false), 2), isFocusTrap = _f[0], setIsFocusTrap = _f[1];
8563
- var _g = tslib.__read(React.useState(!initialCollapsed), 2), showPanel = _g[0], setShowPanel = _g[1];
8572
+ var className = _a.className, children = _a.children, _b = _a.initialCollapsed, initialCollapsed = _b === void 0 ? false : _b, _c = _a.showCollapsedPanelLabel, showCollapsedPanelLabel = _c === void 0 ? 'Show Panel' : _c, _d = _a.hideCollapsedPanelLabel, hideCollapsedPanelLabel = _d === void 0 ? 'Hide Panel' : _d, _e = _a.skipLink, skipLink = _e === void 0 ? null : _e, props = tslib.__rest(_a, ["className", "children", "initialCollapsed", "showCollapsedPanelLabel", "hideCollapsedPanelLabel", "skipLink"]);
8573
+ var _f = tslib.__read(React.useState(initialCollapsed), 2), isCollapsed = _f[0], setCollapsed = _f[1];
8574
+ var _g = tslib.__read(React.useState(false), 2), isFocusTrap = _g[0], setIsFocusTrap = _g[1];
8575
+ var _h = tslib.__read(React.useState(!initialCollapsed), 2), showPanel = _h[0], setShowPanel = _h[1];
8564
8576
  var togglePanel = function () {
8565
8577
  if (isCollapsed) {
8566
8578
  setShowPanel(true);
@@ -8687,6 +8699,7 @@ var TwoColumnPanel = React.forwardRef(function (_a, ref) {
8687
8699
  fallbackFocus: columnLeftRef.current
8688
8700
  }, containerElements: [columnLeftRef.current] }),
8689
8701
  React__default.createElement(ClickOutsideListener, { onClickOutside: handleClickOutside, target: columnLeftRef.current }),
8702
+ isCollapsed ? null : skipLink,
8690
8703
  showPanel ? ColumnLeftComponent : null,
8691
8704
  ColumnRightComponent));
8692
8705
  });
@@ -8704,18 +8717,6 @@ var ColumnGroupHeader = React.forwardRef(function (_a, ref) {
8704
8717
  });
8705
8718
  ColumnGroupHeader.displayName = 'ColumnGroupHeader';
8706
8719
 
8707
- var ColumnLeft = React.forwardRef(function (_a, ref) {
8708
- var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
8709
- return (React__default.createElement("section", tslib.__assign({ className: classNames('TwoColumnPanel__Left', className) }, props, { ref: ref }), children));
8710
- });
8711
- ColumnLeft.displayName = 'ColumnLeft';
8712
-
8713
- var ColumnRight = React.forwardRef(function (_a, ref) {
8714
- var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
8715
- return (React__default.createElement("section", tslib.__assign({ className: classNames('TwoColumnPanel__Right', className) }, props, { ref: ref }), children));
8716
- });
8717
- ColumnRight.displayName = 'ColumnRight';
8718
-
8719
8720
  var ColumnList = React.forwardRef(function (_a, ref) {
8720
8721
  var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
8721
8722
  return (React__default.createElement("div", tslib.__assign({ className: classNames('TwoColumnPanel__List', className) }, props, { ref: ref }), children));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "4.3.0-canary.acd760d8",
3
+ "version": "4.3.0-canary.bb49adf8",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "publishConfig": {
6
6
  "access": "public"