@ahrowe/ui 0.1.14 → 0.1.15

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.mjs CHANGED
@@ -306,30 +306,32 @@ function Me({ className: e, style: t, type: n = De.Button, styleType: r = Te.Def
306
306
  Me.StyleType = Te, Me.Size = Ee, Me.Type = De;
307
307
  //#endregion
308
308
  //#region package/common/actionButtons/actionButtons.tsx
309
- function Ne({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n = "Save", cancelLabel: r = "Cancel", submitButtonStyle: i = Te.Primary, isSubmitButtonLoading: a = !1, isSubmitButtonDisabled: o = !1, isCancelButtonLoading: s = !1, isCancelButtonDisabled: c = !1, hidePrimaryButton: l = !1, hideSecondaryButton: u = !1, noMargin: d = !1, className: p, style: m, classNames: h, styles: g, ..._ }) {
309
+ function Ne({ onSubmit: e = () => null, onClose: t = () => null, submitLabel: n = "Save", cancelLabel: r = "Cancel", submitButtonStyle: i = Te.Primary, isSubmitButtonLoading: a = !1, isSubmitButtonDisabled: o = !1, submitButtonIcon: s = void 0, cancelButtonStyle: c = Te.Default, isCancelButtonLoading: l = !1, isCancelButtonDisabled: u = !1, cancelButtonIcon: d = void 0, hidePrimaryButton: p = !1, hideSecondaryButton: m = !1, noMargin: h = !1, className: g, style: _, classNames: v, styles: y, ...b }) {
310
310
  return /* @__PURE__ */ H("div", {
311
- ..._,
312
- className: f(xe.actionButtons, !d && xe.actionButtonsMargin, p, h?.root),
311
+ ...b,
312
+ className: f(xe.actionButtons, !h && xe.actionButtonsMargin, g, v?.root),
313
313
  style: {
314
- ...m,
315
- ...g?.root
314
+ ..._,
315
+ ...y?.root
316
316
  },
317
- children: [!l && /* @__PURE__ */ V(Me, {
317
+ children: [!p && /* @__PURE__ */ V(Me, {
318
318
  isLoading: a,
319
319
  disabled: o,
320
320
  styleType: i,
321
321
  type: De.Submit,
322
322
  onClick: e,
323
- className: h?.submitButton,
324
- style: g?.submitButton,
323
+ className: v?.submitButton,
324
+ style: y?.submitButton,
325
+ icon: s,
325
326
  children: n
326
- }), !u && /* @__PURE__ */ V(Me, {
327
- isLoading: s,
328
- disabled: c,
327
+ }), !m && /* @__PURE__ */ V(Me, {
328
+ isLoading: l,
329
+ disabled: u,
329
330
  onClick: t,
330
- styleType: Te.Default,
331
- className: h?.cancelButton,
332
- style: g?.cancelButton,
331
+ styleType: c,
332
+ className: v?.cancelButton,
333
+ style: y?.cancelButton,
334
+ icon: d,
333
335
  children: r
334
336
  })]
335
337
  });
@@ -1297,38 +1299,39 @@ function gt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
1297
1299
  }
1298
1300
  //#endregion
1299
1301
  //#region package/common/confirmModal/confirmModal.tsx
1300
- function _t({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0 }) {
1301
- let [s, c] = d(!1), [l, u] = d(!1);
1302
- function f(e = !1) {
1303
- c(!1), n(e);
1302
+ function _t({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0, actionButtonsProps: s = {} }) {
1303
+ let [c, l] = d(!1), [u, f] = d(!1);
1304
+ function p(e = !1) {
1305
+ l(!1), n(e);
1304
1306
  }
1305
- async function p() {
1306
- u(!0);
1307
+ async function m() {
1308
+ f(!0);
1307
1309
  try {
1308
- await r(), f(!0);
1310
+ await r(), p(!0);
1309
1311
  } finally {
1310
- u(!1);
1312
+ f(!1);
1311
1313
  }
1312
1314
  }
1313
- let m = /* @__PURE__ */ H(gt, {
1315
+ let h = /* @__PURE__ */ H(gt, {
1314
1316
  title: i,
1315
- isOpen: o === void 0 ? s : o,
1316
- onClose: () => f(),
1317
+ isOpen: o === void 0 ? c : o,
1318
+ onClose: () => p(),
1317
1319
  className: e ? void 0 : t,
1318
1320
  children: [a, /* @__PURE__ */ V(Ne, {
1319
- onClose: () => f(),
1320
- onSubmit: p,
1321
+ onClose: () => p(),
1322
+ onSubmit: m,
1321
1323
  submitLabel: "Confirm",
1322
- isSubmitButtonLoading: l
1324
+ isSubmitButtonLoading: u,
1325
+ ...s
1323
1326
  })]
1324
1327
  });
1325
1328
  return e ? /* @__PURE__ */ H("div", {
1326
1329
  className: t,
1327
1330
  children: [/* @__PURE__ */ V("span", {
1328
- onClick: () => c(!0),
1331
+ onClick: () => l(!0),
1329
1332
  children: e
1330
- }), m]
1331
- }) : m;
1333
+ }), h]
1334
+ }) : h;
1332
1335
  }
1333
1336
  var vt = {
1334
1337
  "datePickerMonth-item": "datePickerMonth-item_30WWy",