@raketa-builder/builder 0.21.0 → 0.23.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/dist/index.js CHANGED
@@ -219,11 +219,11 @@ var require_dist = __commonJS({
219
219
  var import_react34 = __toESM2(require("react"));
220
220
  var import_jsx_runtime34 = require("react/jsx-runtime");
221
221
  var Button5 = (_a) => {
222
- var _b = _a, { type, size, variant, className } = _b, props = __objRest2(_b, ["type", "size", "variant", "className"]);
222
+ var _b = _a, { as = "button", size, variant, className } = _b, rest = __objRest2(_b, ["as", "size", "variant", "className"]);
223
+ const Component2 = as;
223
224
  return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
224
- "button",
225
+ Component2,
225
226
  __spreadValues2({
226
- type,
227
227
  className: cn13(
228
228
  "r-reset",
229
229
  "r-reset-button",
@@ -232,7 +232,7 @@ var require_dist = __commonJS({
232
232
  `r-button-${variant}`,
233
233
  className
234
234
  )
235
- }, props)
235
+ }, rest)
236
236
  );
237
237
  };
238
238
  Button5.defaultProps = {
@@ -285,8 +285,8 @@ var require_dist = __commonJS({
285
285
  var import_react52 = __toESM2(require("react"));
286
286
  var import_jsx_runtime52 = require("react/jsx-runtime");
287
287
  var Input2 = (_a) => {
288
- var _b = _a, { className } = _b, props = __objRest2(_b, ["className"]);
289
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", __spreadValues2({ className: cn13("r-reset", "r-input", className) }, props));
288
+ var _b = _a, { className } = _b, rest = __objRest2(_b, ["className"]);
289
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("input", __spreadValues2({ className: cn13("r-reset", "r-input", className) }, rest));
290
290
  };
291
291
  var Input_default = Input2;
292
292
  var import_react62 = __toESM2(require("react"));
@@ -457,11 +457,28 @@ var require_dist = __commonJS({
457
457
  }, props)
458
458
  );
459
459
  };
460
+ var FooterBar = (_a) => {
461
+ var _b = _a, { className } = _b, props = __objRest2(_b, ["className"]);
462
+ return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", __spreadValues2({ className: cn13("r-reset", "r-modal-footer-bar", className) }, props));
463
+ };
460
464
  var Content = (_a) => {
461
465
  var _b = _a, { className } = _b, props = __objRest2(_b, ["className"]);
462
466
  return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", __spreadValues2({ className: cn13("r-reset", "r-modal-content", className) }, props));
463
467
  };
464
- var Modal2 = ({ title: title2, children, onClose }) => {
468
+ var Modal2 = (_a) => {
469
+ var _b = _a, {
470
+ title: title2,
471
+ children,
472
+ customWrapper,
473
+ FooterContent,
474
+ onClose
475
+ } = _b, rest = __objRest2(_b, [
476
+ "title",
477
+ "children",
478
+ "customWrapper",
479
+ "FooterContent",
480
+ "onClose"
481
+ ]);
465
482
  const handleKeyUp = ({ key }) => {
466
483
  if (key === "Escape")
467
484
  onClose();
@@ -472,15 +489,17 @@ var require_dist = __commonJS({
472
489
  document.removeEventListener("keyup", handleKeyUp);
473
490
  };
474
491
  });
492
+ const ModalWrapper = customWrapper ? customWrapper : Wrapper;
475
493
  return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(import_react172.default.Fragment, { children: [
476
494
  /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Overlay, { onClick: onClose }),
477
- /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Wrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(Inner, { children: [
495
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(ModalWrapper, __spreadProps2(__spreadValues2({}, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(Inner, { children: [
478
496
  /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(TitleBar2, { children: [
479
497
  /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Title2, { children: title2 }),
480
498
  /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(CloseButton, { type: "button", onClick: onClose, children: "\xD7" })
481
499
  ] }),
482
- /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Content, { children })
483
- ] }) })
500
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(Content, { children }),
501
+ FooterContent && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(FooterBar, { children: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(FooterContent, {}) })
502
+ ] }) }))
484
503
  ] });
485
504
  };
486
505
  var Modal_default = Modal2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raketa-builder/builder",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "MIT",
@@ -68,7 +68,6 @@ const ButtonSettings = ({ label, hint, value, onChange }) => {
68
68
  label="Type"
69
69
  options={buttonStyles}
70
70
  value={value.type}
71
- placeholder=""
72
71
  onChange={(type) => onChange(mergeSettings(value, "type", type))}
73
72
  />
74
73
 
package/src/styles.css CHANGED
@@ -323,12 +323,12 @@
323
323
  left: -2rem;
324
324
  bottom: 0;
325
325
  width: 125%;
326
- padding-left: 2rem;
327
- padding-right: 2rem;
326
+ padding-left: 2rem !important;
327
+ padding-right: 2rem !important;
328
328
  border: 0;
329
329
  border-radius: 0;
330
- background-color: var(--r-black);
331
- color: var(--r-white);
330
+ background-color: var(--r-black) !important;
331
+ color: var(--r-white) !important;
332
332
  }
333
333
 
334
334
  .r-list-wrapper,