@krosoft/react 0.0.110 → 0.0.112
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/{AppActions-BiBYy79y.js → AppActions-po4LjUcM.js} +5 -5
- package/dist/{AppSubTitle-Cotab0k5.js → AppSubTitle-CWrsJYFJ.js} +1 -1
- package/dist/{AppVerticalTabs-CtZx3n-i.js → AppVerticalTabs-CdqoObXx.js} +4 -4
- package/dist/ConfirmationDialog-CkMyyh_3.js +221 -0
- package/dist/{DataTable-DVtbFX-O.js → DataTable-CUU_sTQd.js} +8 -8
- package/dist/{ErrorAlert-DYuVgrm3.js → ErrorAlert-C6BbHHRZ.js} +2 -2
- package/dist/{GenericForm-CbgkBEAm.js → GenericForm-CmwqEXiQ.js} +7 -7
- package/dist/{ImageInput-BOnsST3X.js → ImageInput-C8HcxE8t.js} +5 -5
- package/dist/{LoadingState-B4M2grXs.js → LoadingState-_mcS4fs9.js} +1 -1
- package/dist/{MultiSelect-C_rUb130.js → MultiSelect-BoisW4Kn.js} +4 -4
- package/dist/{SearchInput-DJiMuyA5.js → SearchInput-DJ_F3emq.js} +5 -5
- package/dist/{MetricCard-BUeI3lGg.js → SkeletonCards-CTUG28vD.js} +27 -27
- package/dist/{TableFilter-BnWrOAr7.js → TableFilter-DqDmlzhk.js} +8 -8
- package/dist/{ThemeSelector-C4W3_5jq.js → ThemeSelector--w3R6Ff3.js} +2 -2
- package/dist/{Topbar-CZ3OCeK_.js → Topbar-DFu_OdSs.js} +2 -2
- package/dist/{alert-BUwDmcbB.js → alert-B34E_4uH.js} +1 -1
- package/dist/{badge-AFnM0R9E.js → badge-CfWlt79h.js} +3 -3
- package/dist/components/core/cards/SkeletonCard.d.ts +3 -0
- package/dist/components/core/cards/SkeletonCard.d.ts.map +1 -0
- package/dist/components/core/cards/SkeletonCards.d.ts +7 -0
- package/dist/components/core/cards/SkeletonCards.d.ts.map +1 -0
- package/dist/components/core/cards/index.d.ts +2 -2
- package/dist/components/core/cards/index.d.ts.map +1 -1
- package/dist/components/core/cards/index.js +7 -7
- package/dist/components/core/dialogs/ConfirmationDialog.d.ts +6 -8
- package/dist/components/core/dialogs/ConfirmationDialog.d.ts.map +1 -1
- package/dist/components/core/dialogs/index.d.ts +0 -1
- package/dist/components/core/dialogs/index.d.ts.map +1 -1
- package/dist/components/core/dialogs/index.js +13 -14
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +61 -62
- package/dist/components/core/inputs/index.js +3 -3
- package/dist/components/core/layouts/index.js +2 -2
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/index.js +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +290 -291
- package/dist/components/ui/chart.d.ts +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/index.js +6 -6
- package/dist/createLucideIcon-MP_wDWjs.js +116 -0
- package/dist/{ellipsis-vertical-CgqKXU8e.js → ellipsis-vertical-kB5yFb-i.js} +1 -1
- package/dist/{grip-vertical-J6s3ddpf.js → grip-vertical-DGywJXzS.js} +1 -1
- package/dist/hooks/behavior/useConfirmDeleteDialog.d.ts.map +1 -1
- package/dist/hooks/behavior/useConfirmationDialog.d.ts +11 -0
- package/dist/hooks/behavior/useConfirmationDialog.d.ts.map +1 -0
- package/dist/hooks/behavior/useDialog.d.ts +13 -0
- package/dist/hooks/behavior/useDialog.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +8 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +109 -68
- package/dist/index-Be16PP7H.js +34 -0
- package/dist/{loader-circle-Cfo0gDyD.js → loader-circle-CKy7u7JW.js} +1 -1
- package/dist/{select-pm9O5uLm.js → select-DlQvLtI3.js} +2 -2
- package/dist/{toaster-BTTmMS-Z.js → toaster-CKoOjjKr.js} +3 -3
- package/dist/toggle-group-wIgXZYDq.js +29086 -0
- package/dist/{tooltip-6vdhKg8V.js → tooltip-YhBPXbcJ.js} +20 -19
- package/dist/types/ConfirmDialogConfig.d.ts +5 -0
- package/dist/types/ConfirmDialogConfig.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/ConfirmationDialog-Be0Vj7qe.js +0 -257
- package/dist/components/core/cards/CardSkeleton.d.ts +0 -3
- package/dist/components/core/cards/CardSkeleton.d.ts.map +0 -1
- package/dist/components/core/cards/CardsSkeleton.d.ts +0 -7
- package/dist/components/core/cards/CardsSkeleton.d.ts.map +0 -1
- package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts +0 -10
- package/dist/components/core/dialogs/ConfirmDeleteDialog.d.ts.map +0 -1
- package/dist/index-71PtBtHf.js +0 -147
- package/dist/toggle-group-DKORC9Wq.js +0 -21815
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { c as dn
|
|
2
|
-
import { jsx as P, Fragment as
|
|
1
|
+
import { c as dn } from "./createLucideIcon-MP_wDWjs.js";
|
|
2
|
+
import { jsx as P, Fragment as pn, jsxs as mn } from "react/jsx-runtime";
|
|
3
3
|
import { c as yt } from "./tailwind.helper-gWiv5-6R.js";
|
|
4
4
|
import * as l from "react";
|
|
5
|
-
import { useLayoutEffect as
|
|
5
|
+
import { useLayoutEffect as hn } from "react";
|
|
6
|
+
import { c as gn } from "./index-Be16PP7H.js";
|
|
6
7
|
import * as vt from "react-dom";
|
|
7
|
-
function
|
|
8
|
+
function Gr(e, t) {
|
|
8
9
|
const n = l.createContext(t), o = (i) => {
|
|
9
10
|
const { children: s, ...c } = i, a = l.useMemo(() => c, Object.values(c));
|
|
10
11
|
return /* @__PURE__ */ P(n.Provider, { value: a, children: s });
|
|
@@ -299,7 +300,7 @@ function $n(e) {
|
|
|
299
300
|
* This source code is licensed under the ISC license.
|
|
300
301
|
* See the LICENSE file in the root directory of this source tree.
|
|
301
302
|
*/
|
|
302
|
-
const kn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]],
|
|
303
|
+
const kn = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Kr = dn("chevron-down", kn);
|
|
303
304
|
function Ce(e) {
|
|
304
305
|
const t = l.useRef(e);
|
|
305
306
|
return l.useEffect(() => {
|
|
@@ -434,7 +435,7 @@ function Et(e, t, n, { discrete: o }) {
|
|
|
434
435
|
const r = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
435
436
|
t && r.addEventListener(e, t, { once: !0 }), o ? Tn(r, i) : r.dispatchEvent(i);
|
|
436
437
|
}
|
|
437
|
-
var
|
|
438
|
+
var Zr = Be, Jr = Ct, jn = Symbol.for("react.lazy"), ye = l[" use ".trim().toString()];
|
|
438
439
|
function Un(e) {
|
|
439
440
|
return typeof e == "object" && e !== null && "then" in e;
|
|
440
441
|
}
|
|
@@ -488,7 +489,7 @@ function Jn(e) {
|
|
|
488
489
|
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
489
490
|
return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
490
491
|
}
|
|
491
|
-
const Qn =
|
|
492
|
+
const Qn = gn(
|
|
492
493
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
493
494
|
{
|
|
494
495
|
variants: {
|
|
@@ -1662,7 +1663,7 @@ const zo = wo, jo = xo, Uo = go, Yo = Co, Xo = yo, ht = ho, qo = bo, Go = (e, t,
|
|
|
1662
1663
|
});
|
|
1663
1664
|
};
|
|
1664
1665
|
var Ko = typeof document < "u", Zo = function() {
|
|
1665
|
-
}, ge = Ko ?
|
|
1666
|
+
}, ge = Ko ? hn : Zo;
|
|
1666
1667
|
function be(e, t) {
|
|
1667
1668
|
if (e === t)
|
|
1668
1669
|
return !0;
|
|
@@ -2115,7 +2116,7 @@ Xt.displayName = xr;
|
|
|
2115
2116
|
var br = Xt, Cr = Symbol("radix.slottable");
|
|
2116
2117
|
// @__NO_SIDE_EFFECTS__
|
|
2117
2118
|
function Er(e) {
|
|
2118
|
-
const t = ({ children: n }) => /* @__PURE__ */ P(
|
|
2119
|
+
const t = ({ children: n }) => /* @__PURE__ */ P(pn, { children: n });
|
|
2119
2120
|
return t.displayName = `${e}.Slottable`, t.__radixId = Cr, t;
|
|
2120
2121
|
}
|
|
2121
2122
|
var [Oe] = wt("Tooltip", [
|
|
@@ -2235,7 +2236,7 @@ var We = "TooltipTrigger", Zt = l.forwardRef(
|
|
|
2235
2236
|
}
|
|
2236
2237
|
);
|
|
2237
2238
|
Zt.displayName = We;
|
|
2238
|
-
var Or = "TooltipPortal", [
|
|
2239
|
+
var Or = "TooltipPortal", [Qr, Sr] = Oe(Or, {
|
|
2239
2240
|
forceMount: void 0
|
|
2240
2241
|
}), ie = "TooltipContent", Jt = l.forwardRef(
|
|
2241
2242
|
(e, t) => {
|
|
@@ -2295,7 +2296,7 @@ var Or = "TooltipPortal", [Jr, Sr] = Oe(Or, {
|
|
|
2295
2296
|
onPointerDownOutside: s,
|
|
2296
2297
|
onFocusOutside: (d) => d.preventDefault(),
|
|
2297
2298
|
onDismiss: f,
|
|
2298
|
-
children: /* @__PURE__ */
|
|
2299
|
+
children: /* @__PURE__ */ mn(
|
|
2299
2300
|
yr,
|
|
2300
2301
|
{
|
|
2301
2302
|
"data-state": a.stateAttribute,
|
|
@@ -2424,7 +2425,7 @@ function Fr(e) {
|
|
|
2424
2425
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
2425
2426
|
}
|
|
2426
2427
|
var Br = Gt, Hr = Kt, Vr = Zt, tn = Jt;
|
|
2427
|
-
const
|
|
2428
|
+
const ei = Br, ti = Hr, ni = Vr, zr = l.forwardRef(
|
|
2428
2429
|
({ className: e, sideOffset: t = 4, ...n }, o) => /* @__PURE__ */ P(
|
|
2429
2430
|
tn,
|
|
2430
2431
|
{
|
|
@@ -2442,16 +2443,16 @@ zr.displayName = tn.displayName;
|
|
|
2442
2443
|
export {
|
|
2443
2444
|
gr as A,
|
|
2444
2445
|
eo as B,
|
|
2445
|
-
|
|
2446
|
+
Kr as C,
|
|
2446
2447
|
Be as D,
|
|
2447
2448
|
ne as P,
|
|
2448
2449
|
hr as R,
|
|
2449
2450
|
Xn as S,
|
|
2450
|
-
|
|
2451
|
+
ti as T,
|
|
2451
2452
|
wr as V,
|
|
2452
2453
|
zr as a,
|
|
2453
|
-
|
|
2454
|
-
|
|
2454
|
+
ei as b,
|
|
2455
|
+
ni as c,
|
|
2455
2456
|
Qn as d,
|
|
2456
2457
|
Yn as e,
|
|
2457
2458
|
Fe as f,
|
|
@@ -2465,12 +2466,12 @@ export {
|
|
|
2465
2466
|
wn as n,
|
|
2466
2467
|
vr as o,
|
|
2467
2468
|
xt as p,
|
|
2468
|
-
|
|
2469
|
+
Gr as q,
|
|
2469
2470
|
to as r,
|
|
2470
2471
|
Tn as s,
|
|
2471
2472
|
br as t,
|
|
2472
2473
|
te as u,
|
|
2473
|
-
|
|
2474
|
+
Jr as v,
|
|
2474
2475
|
Xt as w,
|
|
2475
|
-
|
|
2476
|
+
Zr as x
|
|
2476
2477
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
export interface ConfirmDialogConfig {
|
|
2
3
|
isOpen: boolean;
|
|
3
4
|
itemName: string | null;
|
|
4
5
|
title: string;
|
|
5
6
|
description: string;
|
|
6
7
|
confirmKey: string;
|
|
8
|
+
loadingKey?: string;
|
|
9
|
+
icon?: React.ElementType;
|
|
10
|
+
titleClassName?: string;
|
|
11
|
+
headerClassName?: string;
|
|
7
12
|
openDialog: (id: string, name: string) => void;
|
|
8
13
|
onClose: () => void;
|
|
9
14
|
onConfirm: () => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialogConfig.d.ts","sourceRoot":"","sources":["../../src/types/ConfirmDialogConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
|
1
|
+
{"version":3,"file":"ConfirmDialogConfig.d.ts","sourceRoot":"","sources":["../../src/types/ConfirmDialogConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./AppAction";
|
|
|
2
2
|
export * from "./BulkAction";
|
|
3
3
|
export * from "./ButtonVariantType";
|
|
4
4
|
export * from "./ColumnDef";
|
|
5
|
+
export * from "./ConfirmDialogConfig";
|
|
5
6
|
export * from "./FilterFieldConfig";
|
|
6
7
|
export * from "./FilterSection";
|
|
7
8
|
export * from "./RowAction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krosoft/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.112",
|
|
4
4
|
"description": "Krosoft shared React package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"lucide-react": "^1.17.0",
|
|
83
83
|
"react-day-picker": "^10.0.1",
|
|
84
84
|
"react-hook-form": "^7.77.0",
|
|
85
|
-
"recharts": "^
|
|
85
|
+
"recharts": "^3.8.1",
|
|
86
86
|
"sonner": "^2.0.7",
|
|
87
87
|
"tailwind-merge": "^2.6.1",
|
|
88
88
|
"vaul": "^1.1.2",
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as l, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { D as X, b as J, P as K, e as Q, h as U, c as Y, m as H, p as V, s as z, t as $, q as M, r as I, o as O, u as Z, n as L } from "./toggle-group-DKORC9Wq.js";
|
|
3
|
-
import { A as ee, a as le } from "./alert-BUwDmcbB.js";
|
|
4
|
-
import { B as g } from "./tooltip-6vdhKg8V.js";
|
|
5
|
-
import { X as j } from "./select-pm9O5uLm.js";
|
|
6
|
-
import "next-themes";
|
|
7
|
-
import { useState as w, useEffect as ie } from "react";
|
|
8
|
-
import { useTranslation as P } from "react-i18next";
|
|
9
|
-
import { c as C } from "./index-71PtBtHf.js";
|
|
10
|
-
import { G as re } from "./GenericForm-CbgkBEAm.js";
|
|
11
|
-
import { E as ae } from "./ErrorAlert-DYuVgrm3.js";
|
|
12
|
-
/**
|
|
13
|
-
* @license lucide-react v1.17.0 - ISC
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the ISC license.
|
|
16
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const te = [
|
|
19
|
-
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
20
|
-
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
21
|
-
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
22
|
-
], se = C("circle-alert", te);
|
|
23
|
-
/**
|
|
24
|
-
* @license lucide-react v1.17.0 - ISC
|
|
25
|
-
*
|
|
26
|
-
* This source code is licensed under the ISC license.
|
|
27
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
28
|
-
*/
|
|
29
|
-
const ne = [
|
|
30
|
-
[
|
|
31
|
-
"path",
|
|
32
|
-
{
|
|
33
|
-
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
34
|
-
key: "1a8usu"
|
|
35
|
-
}
|
|
36
|
-
]
|
|
37
|
-
], S = C("pen", ne);
|
|
38
|
-
/**
|
|
39
|
-
* @license lucide-react v1.17.0 - ISC
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the ISC license.
|
|
42
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/
|
|
44
|
-
const oe = [
|
|
45
|
-
[
|
|
46
|
-
"path",
|
|
47
|
-
{
|
|
48
|
-
d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
|
|
49
|
-
key: "1c8476"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
53
|
-
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
54
|
-
], T = C("save", oe);
|
|
55
|
-
/**
|
|
56
|
-
* @license lucide-react v1.17.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/
|
|
61
|
-
const ce = [
|
|
62
|
-
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
63
|
-
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
64
|
-
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
65
|
-
], de = C("trash", ce);
|
|
66
|
-
function me({ open: r, onOpenChange: c, config: i, isLoading: t, error: s, children: n }) {
|
|
67
|
-
const { t: a } = P(), { title: v, description: u, icon: p, maxWidth: b = "sm:max-w-xl", actions: d } = i;
|
|
68
|
-
return /* @__PURE__ */ e(X, { open: r, onOpenChange: c, children: /* @__PURE__ */ l(J, { className: `${b} max-h-[90vh] border-0 shadow-2xl p-0 flex flex-col overflow-hidden`, children: [
|
|
69
|
-
t === !0 ? /* @__PURE__ */ e("div", { className: "absolute top-0 left-0 right-0 z-10", children: /* @__PURE__ */ e(K, { indeterminate: !0, className: "h-1 rounded-none" }) }) : null,
|
|
70
|
-
/* @__PURE__ */ l(Q, { className: "bg-gradient-to-r from-slate-900 to-purple-700 p-6 rounded-t-lg shrink-0", children: [
|
|
71
|
-
/* @__PURE__ */ l(U, { className: "text-2xl font-bold flex items-center gap-2 text-white", children: [
|
|
72
|
-
p !== void 0 ? /* @__PURE__ */ e("div", { className: "p-2 bg-white/20 rounded-lg", children: /* @__PURE__ */ e(p, { className: "size-4 text-white" }) }) : null,
|
|
73
|
-
a(v)
|
|
74
|
-
] }),
|
|
75
|
-
u !== void 0 && u !== "" ? /* @__PURE__ */ e(Y, { className: "text-indigo-100 text-base", children: a(u) }) : null
|
|
76
|
-
] }),
|
|
77
|
-
s != null ? /* @__PURE__ */ e("div", { className: "px-6 ", children: /* @__PURE__ */ l(ee, { variant: "destructive", className: "max-w-full", children: [
|
|
78
|
-
/* @__PURE__ */ e(se, { className: "size-4" }),
|
|
79
|
-
/* @__PURE__ */ e(le, { className: "break-words overflow-wrap-anywhere max-w-full", children: s.message })
|
|
80
|
-
] }) }) : null,
|
|
81
|
-
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-6 ", children: n }),
|
|
82
|
-
d !== void 0 && d.length > 0 ? /* @__PURE__ */ e("div", { className: "rounded-b-lg border-t border-gray-200 dark:border-gray-700 shrink-0 p-6 light:bg-gradient-to-r light:from-gray-50 light:to-gray-100 dark:bg-gray-950", children: /* @__PURE__ */ e("div", { className: "flex justify-end gap-3", children: d.map((o, D) => /* @__PURE__ */ l(g, { variant: o.variant ?? "default", onClick: o.onClick, disabled: o.disabled === !0 || t === !0, children: [
|
|
83
|
-
o.icon !== void 0 ? /* @__PURE__ */ e(o.icon, { className: "size-4" }) : null,
|
|
84
|
-
a(o.label)
|
|
85
|
-
] }, D)) }) }) : null
|
|
86
|
-
] }) });
|
|
87
|
-
}
|
|
88
|
-
function Ce({
|
|
89
|
-
open: r,
|
|
90
|
-
onOpenChange: c,
|
|
91
|
-
data: i,
|
|
92
|
-
title: t,
|
|
93
|
-
headerBadge: s,
|
|
94
|
-
schema: n,
|
|
95
|
-
onSave: a,
|
|
96
|
-
customFooter: v,
|
|
97
|
-
defaultEditing: u = !1,
|
|
98
|
-
footerActions: p = !0,
|
|
99
|
-
saveLabel: b = "Sauvegarder",
|
|
100
|
-
cancelLabel: d = "Annuler",
|
|
101
|
-
hideSaveIcon: o = !1,
|
|
102
|
-
maxWidth: D = "sm:max-w-4xl",
|
|
103
|
-
isLoading: f = !1
|
|
104
|
-
}) {
|
|
105
|
-
const [x, N] = w(u), [m, _] = w(!1), [y, q] = w(null);
|
|
106
|
-
if (ie(() => {
|
|
107
|
-
r && N(u);
|
|
108
|
-
}, [r, u]), i == null) return null;
|
|
109
|
-
const E = () => {
|
|
110
|
-
x ? a !== void 0 && y && y() : N(!0);
|
|
111
|
-
}, A = () => {
|
|
112
|
-
N(!1);
|
|
113
|
-
}, F = () => {
|
|
114
|
-
a !== void 0 && y && y();
|
|
115
|
-
}, G = async (h) => {
|
|
116
|
-
if (a) {
|
|
117
|
-
_(!0);
|
|
118
|
-
try {
|
|
119
|
-
await a(h), N(!1);
|
|
120
|
-
} catch (R) {
|
|
121
|
-
console.error(R);
|
|
122
|
-
} finally {
|
|
123
|
-
_(!1);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}, k = [];
|
|
127
|
-
a !== void 0 && (x ? (d !== "" && k.push({
|
|
128
|
-
label: d,
|
|
129
|
-
onClick: A,
|
|
130
|
-
variant: "outline",
|
|
131
|
-
disabled: m || f,
|
|
132
|
-
icon: j
|
|
133
|
-
}), k.push({
|
|
134
|
-
label: m ? "Enregistrement..." : b,
|
|
135
|
-
onClick: F,
|
|
136
|
-
variant: "default",
|
|
137
|
-
disabled: m || f,
|
|
138
|
-
icon: o ? void 0 : T
|
|
139
|
-
})) : k.push({
|
|
140
|
-
label: "Modifier",
|
|
141
|
-
onClick: E,
|
|
142
|
-
variant: "outline",
|
|
143
|
-
icon: S
|
|
144
|
-
}));
|
|
145
|
-
const B = {
|
|
146
|
-
title: t(i),
|
|
147
|
-
maxWidth: D,
|
|
148
|
-
actions: p ? k : []
|
|
149
|
-
};
|
|
150
|
-
return /* @__PURE__ */ e(
|
|
151
|
-
me,
|
|
152
|
-
{
|
|
153
|
-
open: r,
|
|
154
|
-
onOpenChange: (h) => {
|
|
155
|
-
c(h), h || A();
|
|
156
|
-
},
|
|
157
|
-
config: B,
|
|
158
|
-
isLoading: m || f,
|
|
159
|
-
children: /* @__PURE__ */ l("div", { className: "py-4", children: [
|
|
160
|
-
s !== void 0 ? /* @__PURE__ */ e("div", { className: "mb-4", children: s(i) }) : null,
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
re,
|
|
163
|
-
{
|
|
164
|
-
schema: n,
|
|
165
|
-
initialData: i,
|
|
166
|
-
disabled: !x,
|
|
167
|
-
onSubmit: (h) => {
|
|
168
|
-
G(h);
|
|
169
|
-
},
|
|
170
|
-
renderActions: !1,
|
|
171
|
-
onRegisterSubmit: (h) => {
|
|
172
|
-
q(() => h);
|
|
173
|
-
},
|
|
174
|
-
isLoading: m || f
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
v !== void 0 ? v(i) : null,
|
|
178
|
-
a !== void 0 && !p ? /* @__PURE__ */ e("div", { className: "flex justify-end gap-2 border-t pt-4 mt-6", children: x ? /* @__PURE__ */ l(W, { children: [
|
|
179
|
-
d !== "" ? /* @__PURE__ */ l(g, { onClick: A, variant: "outline", size: "sm", disabled: m || f, children: [
|
|
180
|
-
/* @__PURE__ */ e(j, { className: "size-4 mr-2" }),
|
|
181
|
-
d
|
|
182
|
-
] }) : null,
|
|
183
|
-
/* @__PURE__ */ l(g, { onClick: F, size: "sm", disabled: m || f, className: "text-white", children: [
|
|
184
|
-
o ? null : /* @__PURE__ */ e(T, { className: "size-4 mr-2" }),
|
|
185
|
-
m ? "Enregistrement..." : b
|
|
186
|
-
] })
|
|
187
|
-
] }) : /* @__PURE__ */ l(g, { onClick: E, variant: "outline", size: "sm", children: [
|
|
188
|
-
/* @__PURE__ */ e(S, { className: "size-4 mr-2" }),
|
|
189
|
-
"Modifier"
|
|
190
|
-
] }) }) : null
|
|
191
|
-
] })
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
const De = ({ isLoading: r, error: c, config: i }) => {
|
|
196
|
-
const { t } = P(), s = (n) => {
|
|
197
|
-
!n && !r && i.onClose();
|
|
198
|
-
};
|
|
199
|
-
return /* @__PURE__ */ e(H, { open: i.isOpen, onOpenChange: s, children: /* @__PURE__ */ l(V, { children: [
|
|
200
|
-
/* @__PURE__ */ l(z, { children: [
|
|
201
|
-
/* @__PURE__ */ l($, { className: "flex items-center gap-2 text-destructive", children: [
|
|
202
|
-
/* @__PURE__ */ e(de, { className: "size-4" }),
|
|
203
|
-
t(i.title)
|
|
204
|
-
] }),
|
|
205
|
-
/* @__PURE__ */ e(z, { className: "bg-gradient-to-r from-slate-900 to-purple-700 rounded-t-lg shrink-0" }),
|
|
206
|
-
/* @__PURE__ */ e(M, { children: t(i.description) }),
|
|
207
|
-
/* @__PURE__ */ e(M, { children: i.itemName && /* @__PURE__ */ e("span", { className: "font-semibold block my-2", children: i.itemName }) })
|
|
208
|
-
] }),
|
|
209
|
-
/* @__PURE__ */ e(ae, { error: c instanceof Error ? null : c }),
|
|
210
|
-
/* @__PURE__ */ l(I, { children: [
|
|
211
|
-
/* @__PURE__ */ l(O, { disabled: r, children: [
|
|
212
|
-
" ",
|
|
213
|
-
t("common.buttons.cancel")
|
|
214
|
-
] }),
|
|
215
|
-
/* @__PURE__ */ e(
|
|
216
|
-
g,
|
|
217
|
-
{
|
|
218
|
-
onClick: (n) => {
|
|
219
|
-
n.preventDefault(), i.onConfirm();
|
|
220
|
-
},
|
|
221
|
-
disabled: r,
|
|
222
|
-
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
223
|
-
children: r ? "Suppression..." : "Supprimer"
|
|
224
|
-
}
|
|
225
|
-
)
|
|
226
|
-
] })
|
|
227
|
-
] }) });
|
|
228
|
-
};
|
|
229
|
-
function Ae({
|
|
230
|
-
children: r,
|
|
231
|
-
title: c,
|
|
232
|
-
description: i,
|
|
233
|
-
confirmText: t = "Confirmer",
|
|
234
|
-
cancelText: s = "Annuler",
|
|
235
|
-
onConfirm: n,
|
|
236
|
-
destructive: a = !1
|
|
237
|
-
}) {
|
|
238
|
-
return /* @__PURE__ */ l(H, { children: [
|
|
239
|
-
/* @__PURE__ */ e(Z, { asChild: !0, children: r }),
|
|
240
|
-
/* @__PURE__ */ l(V, { children: [
|
|
241
|
-
/* @__PURE__ */ l(z, { children: [
|
|
242
|
-
/* @__PURE__ */ e($, { children: c }),
|
|
243
|
-
/* @__PURE__ */ e(M, { children: i })
|
|
244
|
-
] }),
|
|
245
|
-
/* @__PURE__ */ l(I, { children: [
|
|
246
|
-
/* @__PURE__ */ e(O, { children: s }),
|
|
247
|
-
/* @__PURE__ */ e(L, { onClick: n, className: a ? "bg-red-600 hover:bg-red-700" : "", children: t })
|
|
248
|
-
] })
|
|
249
|
-
] })
|
|
250
|
-
] });
|
|
251
|
-
}
|
|
252
|
-
export {
|
|
253
|
-
me as A,
|
|
254
|
-
De as C,
|
|
255
|
-
Ce as F,
|
|
256
|
-
Ae as a
|
|
257
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/CardSkeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,eAAO,MAAM,YAAY,QAAO,KAAK,CAAC,GAAG,CAAC,OAczC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CardsSkeleton.d.ts","sourceRoot":"","sources":["../../../../src/components/core/cards/CardsSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,GAAI,WAAe,kBAAkB,KAAG,KAAK,CAAC,GAAG,CAAC,OAQ3E,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ConfirmDialogConfig } from "@/types/ConfirmDialogConfig";
|
|
2
|
-
import { ErrorHttp } from "@krosoft/core/types";
|
|
3
|
-
interface ConfirmDeleteDialogProps {
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
error: ErrorHttp | Error | null;
|
|
6
|
-
config: ConfirmDialogConfig;
|
|
7
|
-
}
|
|
8
|
-
export declare const ConfirmDeleteDialog: ({ isLoading, error, config }: ConfirmDeleteDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=ConfirmDeleteDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDeleteDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/core/dialogs/ConfirmDeleteDialog.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,UAAU,wBAAwB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,eAAO,MAAM,mBAAmB,GAAI,8BAA8B,wBAAwB,4CAuCzF,CAAC"}
|
package/dist/index-71PtBtHf.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { useContext as W, createContext as g, forwardRef as A, createElement as k } from "react";
|
|
2
|
-
import { a as L } from "./tailwind.helper-gWiv5-6R.js";
|
|
3
|
-
/**
|
|
4
|
-
* @license lucide-react v1.17.0 - ISC
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the ISC license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
const N = (...o) => o.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim();
|
|
10
|
-
/**
|
|
11
|
-
* @license lucide-react v1.17.0 - ISC
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the ISC license.
|
|
14
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
const V = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
17
|
-
/**
|
|
18
|
-
* @license lucide-react v1.17.0 - ISC
|
|
19
|
-
*
|
|
20
|
-
* This source code is licensed under the ISC license.
|
|
21
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/
|
|
23
|
-
const S = (o) => o.replace(
|
|
24
|
-
/^([A-Z])|[\s-_]+(\w)/g,
|
|
25
|
-
(e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
26
|
-
);
|
|
27
|
-
/**
|
|
28
|
-
* @license lucide-react v1.17.0 - ISC
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the ISC license.
|
|
31
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
33
|
-
const y = (o) => {
|
|
34
|
-
const e = S(o);
|
|
35
|
-
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* @license lucide-react v1.17.0 - ISC
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the ISC license.
|
|
41
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/
|
|
43
|
-
var x = {
|
|
44
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
45
|
-
width: 24,
|
|
46
|
-
height: 24,
|
|
47
|
-
viewBox: "0 0 24 24",
|
|
48
|
-
fill: "none",
|
|
49
|
-
stroke: "currentColor",
|
|
50
|
-
strokeWidth: 2,
|
|
51
|
-
strokeLinecap: "round",
|
|
52
|
-
strokeLinejoin: "round"
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* @license lucide-react v1.17.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/
|
|
60
|
-
const j = (o) => {
|
|
61
|
-
for (const e in o)
|
|
62
|
-
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
63
|
-
return !0;
|
|
64
|
-
return !1;
|
|
65
|
-
}, O = g({}), $ = () => W(O), P = A(
|
|
66
|
-
({ color: o, size: e, strokeWidth: t, absoluteStrokeWidth: r, className: c = "", children: a, iconNode: m, ...u }, C) => {
|
|
67
|
-
const {
|
|
68
|
-
size: n = 24,
|
|
69
|
-
strokeWidth: s = 2,
|
|
70
|
-
absoluteStrokeWidth: i = !1,
|
|
71
|
-
color: l = "currentColor",
|
|
72
|
-
className: h = ""
|
|
73
|
-
} = $() ?? {}, f = r ?? i ? Number(t ?? s) * 24 / Number(e ?? n) : t ?? s;
|
|
74
|
-
return k(
|
|
75
|
-
"svg",
|
|
76
|
-
{
|
|
77
|
-
ref: C,
|
|
78
|
-
...x,
|
|
79
|
-
width: e ?? n ?? x.width,
|
|
80
|
-
height: e ?? n ?? x.height,
|
|
81
|
-
stroke: o ?? l,
|
|
82
|
-
strokeWidth: f,
|
|
83
|
-
className: N("lucide", h, c),
|
|
84
|
-
...!a && !j(u) && { "aria-hidden": "true" },
|
|
85
|
-
...u
|
|
86
|
-
},
|
|
87
|
-
[
|
|
88
|
-
...m.map(([v, d]) => k(v, d)),
|
|
89
|
-
...Array.isArray(a) ? a : [a]
|
|
90
|
-
]
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
/**
|
|
95
|
-
* @license lucide-react v1.17.0 - ISC
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the ISC license.
|
|
98
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/
|
|
100
|
-
const B = (o, e) => {
|
|
101
|
-
const t = A(
|
|
102
|
-
({ className: r, ...c }, a) => k(P, {
|
|
103
|
-
ref: a,
|
|
104
|
-
iconNode: e,
|
|
105
|
-
className: N(
|
|
106
|
-
`lucide-${V(y(o))}`,
|
|
107
|
-
`lucide-${o}`,
|
|
108
|
-
r
|
|
109
|
-
),
|
|
110
|
-
...c
|
|
111
|
-
})
|
|
112
|
-
);
|
|
113
|
-
return t.displayName = y(o), t;
|
|
114
|
-
}, w = (o) => typeof o == "boolean" ? `${o}` : o === 0 ? "0" : o, b = L, I = (o, e) => (t) => {
|
|
115
|
-
var r;
|
|
116
|
-
if ((e == null ? void 0 : e.variants) == null) return b(o, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
117
|
-
const { variants: c, defaultVariants: a } = e, m = Object.keys(c).map((n) => {
|
|
118
|
-
const s = t == null ? void 0 : t[n], i = a == null ? void 0 : a[n];
|
|
119
|
-
if (s === null) return null;
|
|
120
|
-
const l = w(s) || w(i);
|
|
121
|
-
return c[n][l];
|
|
122
|
-
}), u = t && Object.entries(t).reduce((n, s) => {
|
|
123
|
-
let [i, l] = s;
|
|
124
|
-
return l === void 0 || (n[i] = l), n;
|
|
125
|
-
}, {}), C = e == null || (r = e.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((n, s) => {
|
|
126
|
-
let { class: i, className: l, ...h } = s;
|
|
127
|
-
return Object.entries(h).every((f) => {
|
|
128
|
-
let [v, d] = f;
|
|
129
|
-
return Array.isArray(d) ? d.includes({
|
|
130
|
-
...a,
|
|
131
|
-
...u
|
|
132
|
-
}[v]) : {
|
|
133
|
-
...a,
|
|
134
|
-
...u
|
|
135
|
-
}[v] === d;
|
|
136
|
-
}) ? [
|
|
137
|
-
...n,
|
|
138
|
-
i,
|
|
139
|
-
l
|
|
140
|
-
] : n;
|
|
141
|
-
}, []);
|
|
142
|
-
return b(o, m, C, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
143
|
-
};
|
|
144
|
-
export {
|
|
145
|
-
I as a,
|
|
146
|
-
B as c
|
|
147
|
-
};
|