@linzjs/lui 17.36.2 → 17.36.4

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,17 @@
1
+ ## [17.36.4](https://github.com/linz/lui/compare/v17.36.3...v17.36.4) (2023-02-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Reference to pre-defined lui colors and shadows where applicable ([#862](https://github.com/linz/lui/issues/862)) ([38c7d3d](https://github.com/linz/lui/commit/38c7d3d2a1bcdb86f789b41358f6a6e81c3c299d))
7
+
8
+ ## [17.36.3](https://github.com/linz/lui/compare/v17.36.2...v17.36.3) (2023-02-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add LuiCloseableHeaderMenuContextV2 and update LuiDrawerMenuOptionsV2 ([#861](https://github.com/linz/lui/issues/861)) ([612c6b4](https://github.com/linz/lui/commit/612c6b47970107023dd9a00c175a3fbfe9a1f742))
14
+
1
15
  ## [17.36.2](https://github.com/linz/lui/compare/v17.36.1...v17.36.2) (2023-02-20)
2
16
 
3
17
 
@@ -14,7 +14,13 @@ declare const LuiHeaderMenuItemV2: React.ForwardRefExoticComponent<ILuiHeaderMen
14
14
  children?: ReactNode;
15
15
  iconColor?: string | undefined;
16
16
  } & React.RefAttributes<HTMLDivElement>>;
17
+ interface ILuiCloseableHeaderMenuContextV2 {
18
+ isOpen: () => boolean;
19
+ open: () => void;
20
+ close: () => void;
21
+ }
22
+ declare const LuiCloseableHeaderMenuContextV2: React.Context<ILuiCloseableHeaderMenuContextV2>;
17
23
  declare const LuiCloseableHeaderMenuItemV2: ({ open, setOpen, children, ...props }: ILuiCloseableHeaderMenuItem & {
18
24
  children?: ReactNode;
19
25
  }) => JSX.Element;
20
- export { LuiHeaderV2, LuiHeaderMenuItemV2, LuiCloseableHeaderMenuItemV2 };
26
+ export { LuiHeaderV2, LuiHeaderMenuItemV2, LuiCloseableHeaderMenuItemV2, LuiCloseableHeaderMenuContextV2, };
package/dist/index.js CHANGED
@@ -12879,7 +12879,7 @@ function styleInject(css, ref) {
12879
12879
  }
12880
12880
  }
12881
12881
 
12882
- var css_248z$a = ".LuiFloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.LuiFloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindow-window {\n box-shadow: 0 0 10px #0071981a;\n position: absolute;\n background-color: #fff;\n top: 10%;\n left: 5%;\n display: flex;\n flex-direction: column;\n border-radius: 9px;\n}\n\n.FloatingWindow-container {\n display: flex;\n height: calc(100% - 50px);\n width: 100%;\n overflow: auto;\n}\n\n.FloatingWindow-header-element {\n flex: 0;\n}\n\n.FloatingWindow-header {\n height: 48px;\n line-height: 48px;\n color: #6b6966;\n padding: 0 8px;\n display: flex;\n overflow: hidden;\n justify-content: space-between;\n border-bottom: 2px #eaeaea solid;\n font-size: 1em;\n font-weight: 600;\n}\n\n.FloatingWindow-header-title-text {\n font-size: 1em;\n font-weight: 600;\n overflow: hidden;\n}\n\n.FloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.FloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindowHeaderButton-button {\n padding: 0 0 0 8px;\n border: none;\n outline: none;\n border-radius: 50%;\n background-color: transparent;\n color: #000;\n display: flex;\n}\n\n.FloatingWindowHeaderButton-icon {\n fill: #6b6966;\n}\n\n.floating-window-icon {\n display: inline-block;\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n width: 24px;\n fill: #6b6966;\n}";
12882
+ var css_248z$a = ".LuiFloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.LuiFloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindow-window {\n box-shadow: 0px 1px 6px 0px #00000026, 0px 6px 10px 0px #00000040;\n position: absolute;\n background-color: #ffffff;\n top: 10%;\n left: 5%;\n display: flex;\n flex-direction: column;\n border-radius: 9px;\n}\n\n.FloatingWindow-container {\n display: flex;\n height: calc(100% - 50px);\n width: 100%;\n overflow: auto;\n}\n\n.FloatingWindow-header-element {\n flex: 0;\n}\n\n.FloatingWindow-header {\n height: 48px;\n line-height: 48px;\n color: #6b6966;\n padding: 0 8px;\n display: flex;\n overflow: hidden;\n justify-content: space-between;\n border-bottom: 2px #eaeaea solid;\n font-size: 1em;\n font-weight: 600;\n}\n\n.FloatingWindow-header-title-text {\n font-size: 1em;\n font-weight: 600;\n overflow: hidden;\n}\n\n.FloatingWindow-buttons {\n display: flex;\n align-items: center;\n}\n\n.FloatingWindow-extra-buttons-divider {\n margin-right: 4px;\n margin-left: 8px;\n margin-top: -6px;\n font-size: x-large;\n opacity: 0.7;\n}\n\n.FloatingWindowHeaderButton-button {\n padding: 0 0 0 8px;\n border: none;\n outline: none;\n border-radius: 50%;\n background-color: transparent;\n color: #6b6966;\n display: flex;\n}\n\n.FloatingWindowHeaderButton-icon {\n fill: #6b6966;\n}\n\n.floating-window-icon {\n display: inline-block;\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n width: 24px;\n fill: #6b6966;\n}";
12883
12883
  styleInject(css_248z$a);
12884
12884
 
12885
12885
  /**
@@ -40347,6 +40347,11 @@ var LuiHeaderMenuItemV2 = React$1.forwardRef(function (_a, ref) {
40347
40347
  badge && React__default["default"].createElement("div", { className: "LuiHeaderV2-badge" }, badge)),
40348
40348
  !!children && React__default["default"].createElement("div", { onClick: onClick }, children)));
40349
40349
  });
40350
+ var LuiCloseableHeaderMenuContextV2 = React$1.createContext({
40351
+ isOpen: function () { return false; },
40352
+ open: function () { },
40353
+ close: function () { }
40354
+ });
40350
40355
  var LuiCloseableHeaderMenuItemV2 = function (_a) {
40351
40356
  var open = _a.open, setOpen = _a.setOpen, children = _a.children, props = __rest$1(_a, ["open", "setOpen", "children"]);
40352
40357
  useEscapeFunction(function () { return setOpen(false); });
@@ -40455,7 +40460,7 @@ var LuiDrawerMenuOptionsV2 = function (_a) {
40455
40460
  };
40456
40461
  var LuiDrawerMenuOptionV2 = function (_a) {
40457
40462
  var icon = _a.icon, iconColor = _a.iconColor, label = _a.label, badge = _a.badge, _b = _a.iconSize, iconSize = _b === void 0 ? 'md' : _b, _c = _a.subMenu, subMenu = _c === void 0 ? false : _c, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d;
40458
- var menu = React$1.useContext(LuiCloseableHeaderMenuContext);
40463
+ var menu = React$1.useContext(LuiCloseableHeaderMenuContextV2);
40459
40464
  return (React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option", onClick: function () {
40460
40465
  if (!subMenu) {
40461
40466
  menu.close();
@@ -40519,10 +40524,17 @@ var LuiDropdownMenuV2 = function (_a) {
40519
40524
  }), "data-testid": 'dropdown', "aria-hidden": !open }, children))));
40520
40525
  };
40521
40526
  var LuiDrawerMenuSectionV2 = function (props) {
40522
- return React__default["default"].createElement(LuiDrawerMenuSection, __assign$3({}, props));
40527
+ var children = props.children, title = props.title, collapsible = props.collapsible;
40528
+ return (React__default["default"].createElement("div", null,
40529
+ collapsible && (React__default["default"].createElement(LuiExpandableBanner, { label: title || '', className: "LuiDrawerMenuSectionV2-header" }, children)),
40530
+ !collapsible && (React__default["default"].createElement(React__default["default"].Fragment, null,
40531
+ title && (React__default["default"].createElement("div", { className: "LuiDrawerMenuSectionV2-header" },
40532
+ React__default["default"].createElement("div", { className: 'lui-expand-header', style: { cursor: 'default' } },
40533
+ React__default["default"].createElement("h3", null, title)))),
40534
+ children))));
40523
40535
  };
40524
40536
  var LuiDrawerMenuDividerV2 = function () {
40525
- return React__default["default"].createElement(LuiDrawerMenuDivider, null);
40537
+ return React__default["default"].createElement("hr", { className: "LuiDrawerMenuDividerV2" });
40526
40538
  };
40527
40539
 
40528
40540
  var lib = {exports: {}};
@@ -58556,6 +58568,7 @@ exports.LuiButton = LuiButton;
58556
58568
  exports.LuiButtonGroup = LuiButtonGroup;
58557
58569
  exports.LuiCheckboxInput = LuiCheckboxInput;
58558
58570
  exports.LuiCloseableHeaderMenuContext = LuiCloseableHeaderMenuContext;
58571
+ exports.LuiCloseableHeaderMenuContextV2 = LuiCloseableHeaderMenuContextV2;
58559
58572
  exports.LuiCloseableHeaderMenuItem = LuiCloseableHeaderMenuItem;
58560
58573
  exports.LuiCloseableHeaderMenuItemV2 = LuiCloseableHeaderMenuItemV2;
58561
58574
  exports.LuiComboSelect = LuiComboSelect;