blue-react 11.0.4 → 11.0.5
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/dist/components/Button.d.ts +4 -1
- package/dist/components/Button.js +3 -2
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/package.json +2 -2
|
@@ -15,6 +15,9 @@ export type ButtonProps = ComponentProps<"a"> & ComponentProps<"button"> & {
|
|
|
15
15
|
/** Button will be displayed as successful for 3 seconds. */
|
|
16
16
|
success?: boolean;
|
|
17
17
|
active?: boolean;
|
|
18
|
+
/** Button's width and height should be equal. Useful, if you want your body only to have one symbol.
|
|
19
|
+
* When your body only has an icon and hidden label, this will be set automatically. */
|
|
20
|
+
square?: boolean;
|
|
18
21
|
} & {
|
|
19
22
|
/**
|
|
20
23
|
* For compatibility with React Router NavLink
|
|
@@ -25,4 +28,4 @@ export type ButtonProps = ComponentProps<"a"> & ComponentProps<"button"> & {
|
|
|
25
28
|
*/
|
|
26
29
|
exact?: boolean;
|
|
27
30
|
};
|
|
28
|
-
export default function Button({ elementType, className, type, variant, color, sm, lg, iconBefore, iconAfter, label, labelHidden, busy: busyProp, success: successProp, active, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export default function Button({ elementType, className, type, variant, color, sm, lg, iconBefore, iconAfter, label, labelHidden, busy: busyProp, success: successProp, active, square, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["elementType", "className", "type", "variant", "color", "sm", "lg", "iconBefore", "iconAfter", "label", "labelHidden", "busy", "success", "active"];
|
|
2
|
+
var _excluded = ["elementType", "className", "type", "variant", "color", "sm", "lg", "iconBefore", "iconAfter", "label", "labelHidden", "busy", "success", "active", "square"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -50,6 +50,7 @@ export default function Button(_ref) {
|
|
|
50
50
|
busyProp = _ref.busy,
|
|
51
51
|
successProp = _ref.success,
|
|
52
52
|
active = _ref.active,
|
|
53
|
+
square = _ref.square,
|
|
53
54
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
54
55
|
var Comp = elementType || (props.href ? "a" : "button");
|
|
55
56
|
var _useState = useState(false),
|
|
@@ -67,7 +68,7 @@ export default function Button(_ref) {
|
|
|
67
68
|
var variantClass = getButtonVariantClass(variant, color);
|
|
68
69
|
return /*#__PURE__*/_jsx(Comp, _objectSpread(_objectSpread({
|
|
69
70
|
type: Comp === "button" && type === undefined ? "button" : type,
|
|
70
|
-
className: clsx("btn", _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, variantClass, !success), "btn-success", success), "btn-sm", sm), "btn-lg", lg), "icon-link", busyProp || iconBefore !== undefined || iconAfter !== undefined), "active", active), className)
|
|
71
|
+
className: clsx("btn", _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, variantClass, !success), "btn-success", success), "btn-sm", sm), "btn-lg", lg), "icon-link", busyProp || iconBefore !== undefined || iconAfter !== undefined), "active", active), "blue-btn-square", square), className)
|
|
71
72
|
}, props), {}, {
|
|
72
73
|
children: busyProp ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
73
74
|
children: [/*#__PURE__*/_jsx("span", {
|
package/index.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export { AProps } from "./dist/components/A"
|
|
|
15
15
|
export { default as ActionMenu } from "./dist/components/ActionMenu"
|
|
16
16
|
export { ActionMenuProps } from "./dist/components/ActionMenu"
|
|
17
17
|
|
|
18
|
+
export { default as Actions } from "./dist/components/Actions"
|
|
19
|
+
export { ActionsProps } from "./dist/components/Actions"
|
|
20
|
+
|
|
18
21
|
export { default as Button } from "./dist/components/Button"
|
|
19
22
|
export { ButtonProps } from "./dist/components/Button"
|
|
20
23
|
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as A } from "./dist/components/A.js"
|
|
2
2
|
export { default as ActionMenu } from "./dist/components/ActionMenu.js"
|
|
3
|
+
export { default as Actions } from "./dist/components/Actions.js"
|
|
3
4
|
export { default as Button } from "./dist/components/Button.js"
|
|
4
5
|
export { default as Chevron } from "./dist/components/Chevron.js"
|
|
5
6
|
export { default as HashRouter } from "./dist/components/HashRouter.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.5",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@popperjs/core": "^2.11.5",
|
|
38
|
-
"blue-web": "^1.21.
|
|
38
|
+
"blue-web": "^1.21.9",
|
|
39
39
|
"bootstrap": "~5.3.3",
|
|
40
40
|
"clsx": "^1.1.1"
|
|
41
41
|
},
|