@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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +34 -31
- 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
|
});
|
|
@@ -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 [
|
|
1302
|
-
function
|
|
1303
|
-
|
|
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
|
|
1306
|
-
|
|
1307
|
+
async function m() {
|
|
1308
|
+
f(!0);
|
|
1307
1309
|
try {
|
|
1308
|
-
await r(),
|
|
1310
|
+
await r(), p(!0);
|
|
1309
1311
|
} finally {
|
|
1310
|
-
|
|
1312
|
+
f(!1);
|
|
1311
1313
|
}
|
|
1312
1314
|
}
|
|
1313
|
-
let
|
|
1315
|
+
let h = /* @__PURE__ */ H(gt, {
|
|
1314
1316
|
title: i,
|
|
1315
|
-
isOpen: o === void 0 ?
|
|
1316
|
-
onClose: () =>
|
|
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: () =>
|
|
1320
|
-
onSubmit:
|
|
1321
|
+
onClose: () => p(),
|
|
1322
|
+
onSubmit: m,
|
|
1321
1323
|
submitLabel: "Confirm",
|
|
1322
|
-
isSubmitButtonLoading:
|
|
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: () =>
|
|
1331
|
+
onClick: () => l(!0),
|
|
1329
1332
|
children: e
|
|
1330
|
-
}),
|
|
1331
|
-
}) :
|
|
1333
|
+
}), h]
|
|
1334
|
+
}) : h;
|
|
1332
1335
|
}
|
|
1333
1336
|
var vt = {
|
|
1334
1337
|
"datePickerMonth-item": "datePickerMonth-item_30WWy",
|