@krosoft/react 0.0.101 → 0.0.102
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/{DataTable-locK3Z44.js → DataTable-CtzBzpP-.js} +222 -224
- package/dist/ImageInput-DVMsk_kn.js +82 -0
- package/dist/{ThemeSelector-Cl2EWB-n.js → ThemeSelector-BMvfc21-.js} +1 -1
- package/dist/components/core/index.js +49 -47
- package/dist/components/core/inputs/ImageInput.d.ts +12 -0
- package/dist/components/core/inputs/ImageInput.d.ts.map +1 -0
- package/dist/components/core/inputs/index.d.ts +1 -0
- package/dist/components/core/inputs/index.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +8 -6
- package/dist/components/core/table/TableBody.d.ts.map +1 -1
- package/dist/components/core/table/TableHeader.d.ts.map +1 -1
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +90 -88
- package/dist/hooks/index.js +17 -16
- package/dist/types/AppAction.d.ts +1 -1
- package/dist/types/AppAction.d.ts.map +1 -1
- package/dist/useNotifications-zbUhCvF_.js +12 -0
- package/dist/useTheme-B0Bxda3I.js +22 -0
- package/package.json +1 -1
- package/dist/useTheme-BtR4Ahrp.js +0 -31
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppAction.d.ts","sourceRoot":"","sources":["../../src/types/AppAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppAction.d.ts","sourceRoot":"","sources":["../../src/types/AppAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,MAAM,SAAS,GACjB;IACE,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GACD;IACE,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,KAAK,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { t } from "./useToast-BFTk4lWz.js";
|
|
2
|
+
const n = () => ({
|
|
3
|
+
showSuccess: (s, o, r) => {
|
|
4
|
+
t({ title: s, description: o, action: r });
|
|
5
|
+
},
|
|
6
|
+
showError: (s, o, r) => {
|
|
7
|
+
console.error(o, r), t({ title: s, description: o, variant: "destructive" });
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
n as u
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useTheme as i } from "next-themes";
|
|
2
|
+
import { u as m } from "./useNotifications-zbUhCvF_.js";
|
|
3
|
+
function x(s) {
|
|
4
|
+
const { showSuccess: u } = m(), { theme: c, setTheme: a } = i(), r = (e) => {
|
|
5
|
+
a(e);
|
|
6
|
+
const n = s.find((f) => f.value === e);
|
|
7
|
+
u("Thème mis à jour", `Le thème a été changé vers ${(n == null ? void 0 : n.label) ?? e}.`);
|
|
8
|
+
}, o = s.find((e) => e.value === c), l = s.findIndex((e) => e.value === c), t = s[(l + 1) % s.length], h = (c == null ? void 0 : c.startsWith("dark")) ?? !1;
|
|
9
|
+
return {
|
|
10
|
+
theme: c,
|
|
11
|
+
setTheme: a,
|
|
12
|
+
handleThemeChange: r,
|
|
13
|
+
themeOptions: s,
|
|
14
|
+
currentThemeOption: o,
|
|
15
|
+
nextThemeOption: t,
|
|
16
|
+
isDark: h,
|
|
17
|
+
cycleTheme: () => r(t.value)
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
x as u
|
|
22
|
+
};
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useTheme as m } from "next-themes";
|
|
2
|
-
import { t as u } from "./useToast-BFTk4lWz.js";
|
|
3
|
-
const T = () => ({
|
|
4
|
-
showSuccess: (s, c, o) => {
|
|
5
|
-
u({ title: s, description: c, action: o });
|
|
6
|
-
},
|
|
7
|
-
showError: (s, c, o) => {
|
|
8
|
-
console.error(c, o), u({ title: s, description: c, variant: "destructive" });
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
function g(e) {
|
|
12
|
-
const { showSuccess: n } = T(), { theme: s, setTheme: c } = m(), o = (r) => {
|
|
13
|
-
c(r);
|
|
14
|
-
const t = e.find((i) => i.value === r);
|
|
15
|
-
n("Thème mis à jour", `Le thème a été changé vers ${(t == null ? void 0 : t.label) ?? r}.`);
|
|
16
|
-
}, h = e.find((r) => r.value === s), l = e.findIndex((r) => r.value === s), a = e[(l + 1) % e.length], f = (s == null ? void 0 : s.startsWith("dark")) ?? !1;
|
|
17
|
-
return {
|
|
18
|
-
theme: s,
|
|
19
|
-
setTheme: c,
|
|
20
|
-
handleThemeChange: o,
|
|
21
|
-
themeOptions: e,
|
|
22
|
-
currentThemeOption: h,
|
|
23
|
-
nextThemeOption: a,
|
|
24
|
-
isDark: f,
|
|
25
|
-
cycleTheme: () => o(a.value)
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
T as a,
|
|
30
|
-
g as u
|
|
31
|
-
};
|