@linzjs/lui 17.35.1 → 17.35.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [17.35.2](https://github.com/linz/lui/compare/v17.35.1...v17.35.2) (2023-02-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * adds type=button to LuiTab as we don't want this to submit form ([94ec8d4](https://github.com/linz/lui/commit/94ec8d4bbf77567cd43e7d6d073b73a7ddee3c4b))
7
+ * fix Drawer option style ([#852](https://github.com/linz/lui/issues/852)) ([05639cb](https://github.com/linz/lui/commit/05639cb4b01e458b9e7f2907f6ab661d3beb1224))
8
+ * makes onclick optional, rather than maybe undefined ([931cbef](https://github.com/linz/lui/commit/931cbef58378bf2986bd8c7cd84cfeaa7222d88c))
9
+
1
10
  ## [17.35.1](https://github.com/linz/lui/compare/v17.35.0...v17.35.1) (2023-02-15)
2
11
 
3
12
 
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Lui - Linz User Interface!
1
+ # Lui - Linz User Interface!!
2
2
 
3
3
  > It's written in CSS and a React wrapper!
4
4
  >
@@ -1,6 +1,6 @@
1
- import React from 'react';
1
+ import React, { MouseEvent } from 'react';
2
2
  interface LuiTabProps {
3
- onClick: (e?: React.MouseEvent<HTMLButtonElement>) => void;
3
+ onClick: (e: MouseEvent) => void | (() => void);
4
4
  active: boolean;
5
5
  id: string;
6
6
  ariaControls: string;
package/dist/index.js CHANGED
@@ -15434,7 +15434,7 @@ var LuiTabs = function (props) {
15434
15434
  };
15435
15435
 
15436
15436
  var LuiTab = function (props) {
15437
- return (React__default["default"].createElement("button", { className: clsx$1('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.children));
15437
+ return (React__default["default"].createElement("button", { className: clsx$1('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", type: "button", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.children));
15438
15438
  };
15439
15439
 
15440
15440
  // import './LuiTabsGroup.scss';
@@ -40328,7 +40328,7 @@ var LuiHeaderV2 = function (_a) {
40328
40328
  React__default["default"].createElement("div", { className: "LuiHeaderV2-col" }, children))));
40329
40329
  };
40330
40330
  var LuiHeaderMenuItemV2 = React$1.forwardRef(function (_a, ref) {
40331
- var icon = _a.icon, _b = _a.iconColor, iconColor = _b === void 0 ? '#ffffff' : _b, label = _a.label, badge = _a.badge, hide = _a.hide, onClick = _a.onClick, _c = _a["data-testid"], dataTestId = _c === void 0 ? 'menu-item' : _c, children = _a.children;
40331
+ var icon = _a.icon, _b = _a.iconColor, iconColor = _b === void 0 ? '#E2F3F7' : _b, label = _a.label, badge = _a.badge, hide = _a.hide, onClick = _a.onClick, _c = _a["data-testid"], dataTestId = _c === void 0 ? 'menu-item' : _c, children = _a.children;
40332
40332
  var menuItemClasses = clsx$1('LuiHeaderV2-menu-item', hide && buildHideClassDict(hide));
40333
40333
  var resolvedIcon = !icon && !label ? 'ic_menu' : icon;
40334
40334
  return (React__default["default"].createElement("div", { className: menuItemClasses, ref: ref },
@@ -40457,7 +40457,7 @@ var LuiDrawerMenuOptionV2 = function (_a) {
40457
40457
  React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option-label" },
40458
40458
  typeof icon === 'string' ? (React__default["default"].createElement(LuiIcon, { size: iconSize, name: icon, alt: '', color: iconColor, "data-testid": 'drawer-option-icon' })) : (icon),
40459
40459
  label),
40460
- badge));
40460
+ badge && (React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option-badge" }, badge))));
40461
40461
  };
40462
40462
  var LuiDrawerMenuV2 = function (_a) {
40463
40463
  var children = _a.children, _b = _a.hasStickyHeader, hasStickyHeader = _b === void 0 ? true : _b, menuPropsCopy = __rest$1(_a, ["children", "hasStickyHeader"]);