@ahrowe/ui 0.1.14 → 0.1.16

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
  });
@@ -444,7 +446,9 @@ function He({ className: e = "", title: t = "", subTitle: n = "", thumbnail: r =
444
446
  className: Be.cardHeaderActions,
445
447
  children: Array.isArray(i) ? i.map((e, t) => /* @__PURE__ */ V(Re, {
446
448
  title: e.title,
447
- onClick: e.onClick,
449
+ onClick: e.onClick ? (t) => {
450
+ t.stopPropagation(), e.onClick?.(t);
451
+ } : void 0,
448
452
  icon: e.icon
449
453
  }, t)) : i
450
454
  })]
@@ -1297,38 +1301,39 @@ function gt({ children: e = null, title: t = "", isOpen: n = !1, onClose: r = ()
1297
1301
  }
1298
1302
  //#endregion
1299
1303
  //#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);
1304
+ function _t({ children: e = null, className: t = "", onClose: n = () => {}, onConfirm: r = () => {}, title: i = "", content: a = null, isOpen: o = void 0, actionButtonsProps: s = {} }) {
1305
+ let [c, l] = d(!1), [u, f] = d(!1);
1306
+ function p(e = !1) {
1307
+ l(!1), n(e);
1304
1308
  }
1305
- async function p() {
1306
- u(!0);
1309
+ async function m() {
1310
+ f(!0);
1307
1311
  try {
1308
- await r(), f(!0);
1312
+ await r(), p(!0);
1309
1313
  } finally {
1310
- u(!1);
1314
+ f(!1);
1311
1315
  }
1312
1316
  }
1313
- let m = /* @__PURE__ */ H(gt, {
1317
+ let h = /* @__PURE__ */ H(gt, {
1314
1318
  title: i,
1315
- isOpen: o === void 0 ? s : o,
1316
- onClose: () => f(),
1319
+ isOpen: o === void 0 ? c : o,
1320
+ onClose: () => p(),
1317
1321
  className: e ? void 0 : t,
1318
1322
  children: [a, /* @__PURE__ */ V(Ne, {
1319
- onClose: () => f(),
1320
- onSubmit: p,
1323
+ onClose: () => p(),
1324
+ onSubmit: m,
1321
1325
  submitLabel: "Confirm",
1322
- isSubmitButtonLoading: l
1326
+ isSubmitButtonLoading: u,
1327
+ ...s
1323
1328
  })]
1324
1329
  });
1325
1330
  return e ? /* @__PURE__ */ H("div", {
1326
1331
  className: t,
1327
1332
  children: [/* @__PURE__ */ V("span", {
1328
- onClick: () => c(!0),
1333
+ onClick: () => l(!0),
1329
1334
  children: e
1330
- }), m]
1331
- }) : m;
1335
+ }), h]
1336
+ }) : h;
1332
1337
  }
1333
1338
  var vt = {
1334
1339
  "datePickerMonth-item": "datePickerMonth-item_30WWy",