@onesy/ui-react 1.0.23 → 1.0.24
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.
@@ -53,13 +53,11 @@ const CookieBanner = react_1.default.forwardRef((props_, ref) => {
|
|
53
53
|
const Surface = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Surface) || Surface_1.default; }, [theme]);
|
54
54
|
const Type = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Type) || Type_1.default; }, [theme]);
|
55
55
|
const Button = react_1.default.useMemo(() => { var _a; return ((_a = theme === null || theme === void 0 ? void 0 : theme.elements) === null || _a === void 0 ? void 0 : _a.Button) || Button_1.default; }, [theme]);
|
56
|
-
const { name, description, size = 'regular', startActions, endActions, onReject, onAllow, in: inProp, TransitionElement: TransitionElementProps = Slide, noTransition, MainProps, NameProps, DescriptionProps, RejectButtonProps, AllowButtonProps, TransitionProps, className, children } = props, other = __rest(props, ["name", "description", "size", "startActions", "endActions", "onReject", "onAllow", "in", "TransitionElement", "noTransition", "MainProps", "NameProps", "DescriptionProps", "RejectButtonProps", "AllowButtonProps", "TransitionProps", "className", "children"]);
|
56
|
+
const { name, description, size = 'regular', startActions, endActions, onReject, onAllow, in: inProp, TransitionElement: TransitionElementProps = Slide, noTransition, MainProps, NameProps, DescriptionProps, ButtonProps, RejectButtonProps, AllowButtonProps, TransitionProps, className, children } = props, other = __rest(props, ["name", "description", "size", "startActions", "endActions", "onReject", "onAllow", "in", "TransitionElement", "noTransition", "MainProps", "NameProps", "DescriptionProps", "ButtonProps", "RejectButtonProps", "AllowButtonProps", "TransitionProps", "className", "children"]);
|
57
57
|
const { classes } = useStyle();
|
58
58
|
const TransitionElement = noTransition ? react_1.default.Fragment : TransitionElementProps;
|
59
59
|
const WrapperProps = noTransition ? undefined : Object.assign(Object.assign({}, TransitionProps), { in: inProp });
|
60
|
-
const buttonProps = {
|
61
|
-
size
|
62
|
-
};
|
60
|
+
const buttonProps = Object.assign({ size }, ButtonProps);
|
63
61
|
return ((0, jsx_runtime_1.jsx)(TransitionElement, Object.assign({}, WrapperProps, { children: (0, jsx_runtime_1.jsx)(Line, Object.assign({ ref: ref, gap: 1.5, align: 'center', fullWidth: true, Component: Surface, color: 'default', role: 'region', "aria-label": 'Cookie Banner', className: (0, style_react_1.classNames)([
|
64
62
|
(0, utils_2.staticClassName)('CookieBanner', theme) && [
|
65
63
|
'onesy-CookieBanner-root',
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
|
-
const _excluded = ["name", "description", "size", "startActions", "endActions", "onReject", "onAllow", "in", "TransitionElement", "noTransition", "MainProps", "NameProps", "DescriptionProps", "RejectButtonProps", "AllowButtonProps", "TransitionProps", "className", "children"];
|
4
|
+
const _excluded = ["name", "description", "size", "startActions", "endActions", "onReject", "onAllow", "in", "TransitionElement", "noTransition", "MainProps", "NameProps", "DescriptionProps", "ButtonProps", "RejectButtonProps", "AllowButtonProps", "TransitionProps", "className", "children"];
|
5
5
|
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; }
|
6
6
|
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; }
|
7
7
|
import React from 'react';
|
@@ -58,6 +58,7 @@ const CookieBanner = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
58
58
|
MainProps,
|
59
59
|
NameProps,
|
60
60
|
DescriptionProps,
|
61
|
+
ButtonProps,
|
61
62
|
RejectButtonProps,
|
62
63
|
AllowButtonProps,
|
63
64
|
TransitionProps,
|
@@ -72,9 +73,9 @@ const CookieBanner = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
72
73
|
const WrapperProps = noTransition ? undefined : _objectSpread(_objectSpread({}, TransitionProps), {}, {
|
73
74
|
in: inProp
|
74
75
|
});
|
75
|
-
const buttonProps = {
|
76
|
+
const buttonProps = _objectSpread({
|
76
77
|
size
|
77
|
-
};
|
78
|
+
}, ButtonProps);
|
78
79
|
return /*#__PURE__*/React.createElement(TransitionElement, WrapperProps, /*#__PURE__*/React.createElement(Line, _extends({
|
79
80
|
ref: ref,
|
80
81
|
gap: 1.5,
|
package/esm/index.js
CHANGED