@linzjs/lui 21.12.2-1 → 21.14.0
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 +14 -0
- package/dist/components/LuiSplitButton/LuiSplitButton.d.ts +1 -0
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/lui.css +56 -3
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +5 -6
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiSplitButton/LuiSplitButton.scss +19 -4
- package/package.json +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [21.14.0](https://github.com/linz/lui/compare/v21.13.0...v21.14.0) (2023-12-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* CS-2952 - allow secondary styling on LuiSplitButton ([90049f7](https://github.com/linz/lui/commit/90049f7f9c6650d838caa613e899130e5981671e))
|
|
7
|
+
|
|
8
|
+
# [21.13.0](https://github.com/linz/lui/compare/v21.12.1...v21.13.0) (2023-12-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Upgrade to storybook 7 ([#1057](https://github.com/linz/lui/issues/1057)) ([86f8c01](https://github.com/linz/lui/commit/86f8c01d06829c9d7a0c3730ef1f22ac0743da46))
|
|
14
|
+
|
|
1
15
|
## [21.12.1](https://github.com/linz/lui/compare/v21.12.0...v21.12.1) (2023-11-29)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -10,6 +10,7 @@ export interface ILuiSplitButtonProps {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
children: React.ReactNode;
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
+
level?: 'primary' | 'secondary';
|
|
13
14
|
}
|
|
14
15
|
export interface ILuiSplitButtonMenuItemProps extends MenuItemProps {
|
|
15
16
|
children: React.ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -42471,19 +42471,18 @@ var LuiSplitButton = function (_a) {
|
|
|
42471
42471
|
var _d = React.useState(false), isExpanded = _d[0], setIsExpanded = _d[1];
|
|
42472
42472
|
// Let the consumer set any LuiButtonProps they want but overwrite the ones we want to control
|
|
42473
42473
|
var buttonProps = __assign(__assign({}, props.buttonProps), {
|
|
42474
|
-
level: 'primary',
|
|
42474
|
+
level: props.level || 'primary',
|
|
42475
42475
|
className: clsx('lui-split-button-primary-btn', (_b = props.buttonProps) === null || _b === void 0 ? void 0 : _b.className)
|
|
42476
42476
|
});
|
|
42477
42477
|
var positionProps = getMenuPosition(position);
|
|
42478
42478
|
var iconClassName = getIconClassName(position, isExpanded);
|
|
42479
42479
|
return (React__default["default"].createElement("div", { className: clsx('lui-split-button', props.className) },
|
|
42480
|
-
React__default["default"].createElement(LuiButton, __assign({}, buttonProps, { disabled: props.disabled }),
|
|
42481
|
-
' ',
|
|
42482
|
-
props.buttonLabel,
|
|
42483
|
-
' '),
|
|
42480
|
+
React__default["default"].createElement(LuiButton, __assign({}, buttonProps, { disabled: props.disabled }), props.buttonLabel),
|
|
42484
42481
|
React__default["default"].createElement(reactMenu.Menu, __assign({ menuClassName: 'lui-split-button-menu', onMenuChange: function () {
|
|
42485
42482
|
setIsExpanded(function (prev) { return !prev; });
|
|
42486
|
-
}, menuButton: React__default["default"].createElement("button", { disabled: props.disabled, className: clsx('popup-toggle-button'
|
|
42483
|
+
}, menuButton: React__default["default"].createElement("button", { disabled: props.disabled, className: clsx('popup-toggle-button', {
|
|
42484
|
+
'popup-toggle-button-secondary': props.level === 'secondary'
|
|
42485
|
+
}), "data-testid": props['data-testid'], type: "button" },
|
|
42487
42486
|
React__default["default"].createElement("i", { className: clsx(iconClassName) }, 'expand_more')) }, positionProps, props.menuProps), props.children)));
|
|
42488
42487
|
};
|
|
42489
42488
|
//required by react menu wrapping
|