@krosoft/react 0.0.80 → 0.0.82
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/AppTitle-BOhhDNS5.js +76 -0
- package/dist/{MetricCard-4VI9Ki0g.js → MetricCard-bpuqueI5.js} +1 -1
- package/dist/{SearchInput-Cf5NHhnz.js → SearchInput-Dh-92XhU.js} +7 -7
- package/dist/{TableFilter-DgChe4aX.js → TableFilter-BoNsBNbv.js} +2 -2
- package/dist/TableSettings-D2qjh0E9.js +394 -0
- package/dist/{ThemeSelector-MqD5QvHl.js → ThemeSelector-BCU1tFyR.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +32 -29
- package/dist/components/core/inputs/index.js +1 -1
- package/dist/components/core/layouts/AppActions.d.ts +7 -0
- package/dist/components/core/layouts/AppActions.d.ts.map +1 -0
- package/dist/components/core/layouts/AppTitle.d.ts +7 -0
- package/dist/components/core/layouts/AppTitle.d.ts.map +1 -0
- package/dist/components/core/layouts/index.d.ts +3 -0
- package/dist/components/core/layouts/index.d.ts.map +1 -0
- package/dist/components/core/layouts/index.js +5 -0
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/core/tabs/AppTabContainer.d.ts +12 -0
- package/dist/components/core/tabs/AppTabContainer.d.ts.map +1 -0
- package/dist/components/core/tabs/AppTabHeader.d.ts +9 -0
- package/dist/components/core/tabs/AppTabHeader.d.ts.map +1 -0
- package/dist/components/core/tabs/AppTabs.d.ts +9 -0
- package/dist/components/core/tabs/AppTabs.d.ts.map +1 -0
- package/dist/components/core/tabs/AppVerticalTabs.d.ts +7 -0
- package/dist/components/core/tabs/AppVerticalTabs.d.ts.map +1 -0
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +81 -78
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/dropdown-menu-D6j1GdTA.js +1685 -0
- package/dist/hooks/index.js +7 -19
- package/dist/{popover-UjRQmYGN.js → popover-DVVl_ccN.js} +7 -7
- package/dist/types/AppAction.d.ts +19 -0
- package/dist/types/AppAction.d.ts.map +1 -0
- package/dist/types/ButtonVariantType.d.ts +2 -0
- package/dist/types/ButtonVariantType.d.ts.map +1 -0
- package/dist/types/TabConfig.d.ts +9 -0
- package/dist/types/TabConfig.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/useMobile-DN1_OMDB.js +16 -0
- package/dist/{useTheme-DsHPKCDp.js → useTheme-CvNYmhjo.js} +2 -2
- package/package.json +12 -4
- package/dist/TableSettings-4YLJSh4G.js +0 -2064
package/dist/hooks/index.js
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t
|
|
3
|
-
const e = 768;
|
|
4
|
-
function c() {
|
|
5
|
-
const [o, t] = i(!1);
|
|
6
|
-
return a(() => {
|
|
7
|
-
const n = window.matchMedia(`(max-width: ${String(e - 1)}px)`), s = () => {
|
|
8
|
-
t(window.innerWidth < e);
|
|
9
|
-
};
|
|
10
|
-
return n.addEventListener("change", s), t(window.innerWidth < e), () => {
|
|
11
|
-
n.removeEventListener("change", s);
|
|
12
|
-
};
|
|
13
|
-
}, []), o;
|
|
14
|
-
}
|
|
1
|
+
import { u as e } from "../useMobile-DN1_OMDB.js";
|
|
2
|
+
import { t, u, a as i, b as r } from "../useTheme-CvNYmhjo.js";
|
|
15
3
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
t as toast,
|
|
5
|
+
e as useMobile,
|
|
6
|
+
u as useNotifications,
|
|
7
|
+
i as useTheme,
|
|
8
|
+
r as useToast
|
|
21
9
|
};
|
|
@@ -5852,7 +5852,7 @@ const Nf = cf, Df = uf, df = l.forwardRef(
|
|
|
5852
5852
|
df.displayName = Sa.displayName;
|
|
5853
5853
|
export {
|
|
5854
5854
|
ds as A,
|
|
5855
|
-
|
|
5855
|
+
Ke as B,
|
|
5856
5856
|
hd as C,
|
|
5857
5857
|
_s as I,
|
|
5858
5858
|
xi as L,
|
|
@@ -5880,10 +5880,10 @@ export {
|
|
|
5880
5880
|
bf as r,
|
|
5881
5881
|
Di as s,
|
|
5882
5882
|
wi as t,
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5883
|
+
Ts as u,
|
|
5884
|
+
xs as v,
|
|
5885
|
+
Ht as w,
|
|
5886
|
+
je as x,
|
|
5887
|
+
qe as y,
|
|
5888
|
+
au as z
|
|
5889
5889
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ButtonVariantType } from "./ButtonVariantType";
|
|
2
|
+
export type AppAction = {
|
|
3
|
+
icon?: React.ElementType;
|
|
4
|
+
labelKey: string;
|
|
5
|
+
variant?: ButtonVariantType;
|
|
6
|
+
onClick: () => void | Promise<void>;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
children?: never;
|
|
9
|
+
className?: string;
|
|
10
|
+
} | {
|
|
11
|
+
icon?: React.ElementType;
|
|
12
|
+
labelKey?: string;
|
|
13
|
+
variant?: ButtonVariantType;
|
|
14
|
+
onClick: never;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
children: AppAction[];
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=AppAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppAction.d.ts","sourceRoot":"","sources":["../../src/types/AppAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,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 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonVariantType.d.ts","sourceRoot":"","sources":["../../src/types/ButtonVariantType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface TabConfig<T = unknown> {
|
|
2
|
+
value: string;
|
|
3
|
+
titleKey: string;
|
|
4
|
+
icon?: React.ElementType;
|
|
5
|
+
component?: (x?: string | null) => React.JSX.Element;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
count?: (x: T | null) => number;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=TabConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabConfig.d.ts","sourceRoot":"","sources":["../../src/types/TabConfig.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC;IACrD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,KAAK,MAAM,CAAC;CACjC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState as s, useEffect as r } from "react";
|
|
2
|
+
const e = 768;
|
|
3
|
+
function c() {
|
|
4
|
+
const [o, n] = s(!1);
|
|
5
|
+
return r(() => {
|
|
6
|
+
const t = window.matchMedia(`(max-width: ${String(e - 1)}px)`), i = () => {
|
|
7
|
+
n(window.innerWidth < e);
|
|
8
|
+
};
|
|
9
|
+
return t.addEventListener("change", i), n(window.innerWidth < e), () => {
|
|
10
|
+
t.removeEventListener("change", i);
|
|
11
|
+
};
|
|
12
|
+
}, []), o;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
c as u
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krosoft/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"description": "Krosoft shared React package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -33,22 +33,28 @@
|
|
|
33
33
|
"@krosoft/core": ">=0.0.1",
|
|
34
34
|
"next-themes": ">=0.4.6",
|
|
35
35
|
"react": ">=18.3.1",
|
|
36
|
-
"react-i18next": ">=17.0.8"
|
|
36
|
+
"react-i18next": ">=17.0.8",
|
|
37
|
+
"react-router-dom": ">=6.0.0"
|
|
37
38
|
},
|
|
38
39
|
"peerDependenciesMeta": {
|
|
39
40
|
"next-themes": {
|
|
40
41
|
"optional": true
|
|
42
|
+
},
|
|
43
|
+
"react-router-dom": {
|
|
44
|
+
"optional": true
|
|
41
45
|
}
|
|
42
46
|
},
|
|
43
47
|
"dependencies": {
|
|
44
48
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
45
49
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
50
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
46
51
|
"@radix-ui/react-label": "^2.1.8",
|
|
47
52
|
"@radix-ui/react-popover": "^1.1.15",
|
|
53
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
48
54
|
"@radix-ui/react-select": "^2.2.6",
|
|
49
|
-
"@radix-ui/react-slot": "^1.2.4",
|
|
50
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
51
55
|
"@radix-ui/react-separator": "^1.1.8",
|
|
56
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
57
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
52
58
|
"@radix-ui/react-toast": "^1.2.15",
|
|
53
59
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
54
60
|
"class-variance-authority": "^0.7.1",
|
|
@@ -64,6 +70,7 @@
|
|
|
64
70
|
"@krosoft/tooling-prettier": "^0.0.14",
|
|
65
71
|
"@krosoft/tooling-tsconfig-react": "^0.0.10",
|
|
66
72
|
"@storybook/addon-essentials": "^8.6.18",
|
|
73
|
+
"@storybook/addon-themes": "^8.6.18",
|
|
67
74
|
"@storybook/react": "^8.6.18",
|
|
68
75
|
"@storybook/react-vite": "^8.6.18",
|
|
69
76
|
"@types/node": "^25.9.1",
|
|
@@ -75,6 +82,7 @@
|
|
|
75
82
|
"react": "^18.3.1",
|
|
76
83
|
"react-dom": "^18.3.1",
|
|
77
84
|
"react-i18next": "^17.0.8",
|
|
85
|
+
"react-router-dom": "^7.6.2",
|
|
78
86
|
"storybook": "^8.6.18",
|
|
79
87
|
"tailwindcss": "^3.4.19",
|
|
80
88
|
"typescript": "^5.9.3",
|