@linzjs/lui 21.29.0 → 21.29.1

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,10 @@
1
+ ## [21.29.1](https://github.com/linz/lui/compare/v21.29.0...v21.29.1) (2024-05-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **LuiBannerV2:** Improve default arrangement for multi children ([#1118](https://github.com/linz/lui/issues/1118)) ([90bd9be](https://github.com/linz/lui/commit/90bd9bea73ace80a3d6dcca7fec3acf51b8c1a69))
7
+
1
8
  # [21.29.0](https://github.com/linz/lui/compare/v21.28.0...v21.29.0) (2024-05-09)
2
9
 
3
10
 
@@ -1,9 +1,10 @@
1
1
  import './LuiBannerV2.scss';
2
2
  import { ComponentPropsWithoutRef } from 'react';
3
3
  import React from 'react';
4
+ declare type Button = ComponentPropsWithoutRef<'button'>;
4
5
  declare type Dismiss = {
5
- onDismiss: () => void;
6
- dismissButtonProps?: ComponentPropsWithoutRef<'button'>;
6
+ onDismiss: Button['onClick'];
7
+ dismissButtonProps?: Omit<Button, 'onClick'>;
7
8
  } | {
8
9
  onDismiss?: undefined;
9
10
  dismissButtonProps?: never;
package/dist/index.js CHANGED
@@ -59271,7 +59271,7 @@ var useSplitterRef = function () {
59271
59271
  return { ref: ref, setRatio: setRatio };
59272
59272
  };
59273
59273
 
59274
- var css_248z = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiBannerV2 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2509803922), 0px 0px 3px 0px rgba(0, 0, 0, 0.1490196078);\n font-size: 16px;\n display: flex;\n align-items: center;\n min-height: 3rem;\n position: relative;\n background-color: #ffffff;\n border-radius: 5px;\n padding-bottom: 0.5rem;\n padding-top: 0.5rem;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.LuiBannerV2.has-level {\n padding-left: 3.25rem;\n border-left-width: 0.5rem;\n border-left-style: solid;\n}\n.LuiBannerV2.warning {\n border-left-color: #EA6A2E;\n}\n.LuiBannerV2.error {\n border-left-color: #cc0000;\n}\n.LuiBannerV2.info {\n border-left-color: #3A7CDF;\n}\n.LuiBannerV2.success {\n border-left-color: #0AA345;\n}\n.LuiBannerV2.can-dismiss {\n padding-right: 2.5rem;\n}\n.LuiBannerV2-Icon {\n position: absolute;\n left: 0.5rem;\n top: 0.5rem;\n}\n.LuiBannerV2-Icon.warning {\n color: #EA6A2E;\n}\n.LuiBannerV2-Icon.error {\n color: #cc0000;\n}\n.LuiBannerV2-Icon.info {\n color: #3A7CDF;\n}\n.LuiBannerV2-Icon.success {\n color: #0AA345;\n}\n.LuiBannerV2-Icon svg {\n fill: currentColor;\n}\n.LuiBannerV2-Dismiss {\n display: flex;\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n padding: 0;\n}\n.LuiBannerV2-Dismiss svg {\n fill: #6b6966;\n}";
59274
+ var css_248z = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @deprecated\n */\n.LuiBannerV2 {\n font-family: \"Open Sans\", system-ui, sans-serif;\n font-style: normal;\n font-weight: normal;\n box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.2509803922), 0px 0px 3px 0px rgba(0, 0, 0, 0.1490196078);\n font-size: 16px;\n display: grid;\n align-items: center;\n min-height: 3rem;\n position: relative;\n background-color: #ffffff;\n border-radius: 5px;\n padding-bottom: 0.5rem;\n padding-top: 0.5rem;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.LuiBannerV2 > :first-child {\n margin-top: 0;\n}\n.LuiBannerV2.has-level {\n padding-left: 3.25rem;\n border-left-width: 0.5rem;\n border-left-style: solid;\n}\n.LuiBannerV2.warning {\n border-left-color: #EA6A2E;\n}\n.LuiBannerV2.error {\n border-left-color: #cc0000;\n}\n.LuiBannerV2.info {\n border-left-color: #3A7CDF;\n}\n.LuiBannerV2.success {\n border-left-color: #0AA345;\n}\n.LuiBannerV2.can-dismiss {\n padding-right: 2.5rem;\n}\n.LuiBannerV2-Icon {\n position: absolute;\n left: 0.5rem;\n top: 0.5rem;\n}\n.LuiBannerV2-Icon.warning {\n color: #EA6A2E;\n}\n.LuiBannerV2-Icon.error {\n color: #cc0000;\n}\n.LuiBannerV2-Icon.info {\n color: #3A7CDF;\n}\n.LuiBannerV2-Icon.success {\n color: #0AA345;\n}\n.LuiBannerV2-Icon svg {\n fill: currentColor;\n}\n.LuiBannerV2-Dismiss {\n display: flex;\n position: absolute;\n right: 0.75rem;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n padding: 0;\n}\n.LuiBannerV2-Dismiss svg {\n fill: #6b6966;\n}";
59275
59275
  styleInject(css_248z);
59276
59276
 
59277
59277
  var LuiBannerV2 = React.forwardRef(function (_a, ref) {
@@ -59286,13 +59286,9 @@ var LuiBannerV2 = React.forwardRef(function (_a, ref) {
59286
59286
  }
59287
59287
  })();
59288
59288
  return (React__default["default"].createElement("div", __assign({ ref: ref, className: clsx('LuiBannerV2', level, icon && 'has-level', onDismiss && 'can-dismiss', className) }, props),
59289
- icon && (React__default["default"].createElement(LuiIcon, { className: clsx('LuiBannerV2-Icon', level), size: "lg", name: icon, spanProps: { 'aria-hidden': true }, alt: level })),
59290
59289
  children,
59291
- onDismiss && (React__default["default"].createElement("button", __assign({}, dismissButtonProps, { className: clsx('LuiBannerV2-Dismiss', dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.className), "aria-label": (_b = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps['aria-label']) !== null && _b !== void 0 ? _b : 'Dismiss', type: (_c = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.type) !== null && _c !== void 0 ? _c : 'button', onClick: function (e) {
59292
- var _a;
59293
- (_a = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.onClick) === null || _a === void 0 ? void 0 : _a.call(dismissButtonProps, e);
59294
- onDismiss();
59295
- } }), (_d = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.children) !== null && _d !== void 0 ? _d : (React__default["default"].createElement(LuiIcon, { size: "md", name: "ic_clear", spanProps: { 'aria-hidden': true }, alt: "Dismiss" }))))));
59290
+ icon && (React__default["default"].createElement(LuiIcon, { className: clsx('LuiBannerV2-Icon', level), size: "lg", name: icon, spanProps: { 'aria-hidden': true }, alt: level })),
59291
+ onDismiss && (React__default["default"].createElement("button", __assign({}, dismissButtonProps, { className: clsx('LuiBannerV2-Dismiss', dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.className), "aria-label": (_b = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps['aria-label']) !== null && _b !== void 0 ? _b : 'Dismiss', type: (_c = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.type) !== null && _c !== void 0 ? _c : 'button', onClick: onDismiss }), (_d = dismissButtonProps === null || dismissButtonProps === void 0 ? void 0 : dismissButtonProps.children) !== null && _d !== void 0 ? _d : (React__default["default"].createElement(LuiIcon, { size: "md", name: "ic_clear", spanProps: { 'aria-hidden': true }, alt: "Dismiss" }))))));
59296
59292
  });
59297
59293
 
59298
59294
  exports.CheckboxItemRenderer = CheckboxItemRenderer;