@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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +37 -32
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/actionButtons/actionButtons.d.ts +1 -1
- package/dist/types/package/common/actionButtons/actionButtons.types.d.ts +4 -0
- package/dist/types/package/common/confirmModal/confirmModal.d.ts +1 -1
- package/dist/types/package/common/confirmModal/confirmModal.types.d.ts +2 -0
- package/package.json +1 -1
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,
|
|
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, !
|
|
311
|
+
...b,
|
|
312
|
+
className: f(xe.actionButtons, !h && xe.actionButtonsMargin, g, v?.root),
|
|
313
313
|
style: {
|
|
314
|
-
...
|
|
315
|
-
...
|
|
314
|
+
..._,
|
|
315
|
+
...y?.root
|
|
316
316
|
},
|
|
317
|
-
children: [!
|
|
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:
|
|
324
|
-
style:
|
|
323
|
+
className: v?.submitButton,
|
|
324
|
+
style: y?.submitButton,
|
|
325
|
+
icon: s,
|
|
325
326
|
children: n
|
|
326
|
-
}), !
|
|
327
|
-
isLoading:
|
|
328
|
-
disabled:
|
|
327
|
+
}), !m && /* @__PURE__ */ V(Me, {
|
|
328
|
+
isLoading: l,
|
|
329
|
+
disabled: u,
|
|
329
330
|
onClick: t,
|
|
330
|
-
styleType:
|
|
331
|
-
className:
|
|
332
|
-
style:
|
|
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 [
|
|
1302
|
-
function
|
|
1303
|
-
|
|
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
|
|
1306
|
-
|
|
1309
|
+
async function m() {
|
|
1310
|
+
f(!0);
|
|
1307
1311
|
try {
|
|
1308
|
-
await r(),
|
|
1312
|
+
await r(), p(!0);
|
|
1309
1313
|
} finally {
|
|
1310
|
-
|
|
1314
|
+
f(!1);
|
|
1311
1315
|
}
|
|
1312
1316
|
}
|
|
1313
|
-
let
|
|
1317
|
+
let h = /* @__PURE__ */ H(gt, {
|
|
1314
1318
|
title: i,
|
|
1315
|
-
isOpen: o === void 0 ?
|
|
1316
|
-
onClose: () =>
|
|
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: () =>
|
|
1320
|
-
onSubmit:
|
|
1323
|
+
onClose: () => p(),
|
|
1324
|
+
onSubmit: m,
|
|
1321
1325
|
submitLabel: "Confirm",
|
|
1322
|
-
isSubmitButtonLoading:
|
|
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: () =>
|
|
1333
|
+
onClick: () => l(!0),
|
|
1329
1334
|
children: e
|
|
1330
|
-
}),
|
|
1331
|
-
}) :
|
|
1335
|
+
}), h]
|
|
1336
|
+
}) : h;
|
|
1332
1337
|
}
|
|
1333
1338
|
var vt = {
|
|
1334
1339
|
"datePickerMonth-item": "datePickerMonth-item_30WWy",
|