@kuraykaraaslan/kui-react 1.0.1
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/LICENSE +17 -0
- package/README.md +168 -0
- package/dist/AdvancedDataTable-F3DNXDKX.mjs +11 -0
- package/dist/DataTable-2G27T4E6.mjs +11 -0
- package/dist/DateRangePicker-AL32QB6L.mjs +11 -0
- package/dist/DropdownMenu-f5yV9dzM.d.mts +22 -0
- package/dist/DropdownMenu-f5yV9dzM.d.ts +22 -0
- package/dist/MapView-FERKPCDB.mjs +10 -0
- package/dist/ServerDataTable-RZV3K6KQ.mjs +11 -0
- package/dist/Tooltip-Bof5GvOc.d.mts +248 -0
- package/dist/Tooltip-Bof5GvOc.d.ts +248 -0
- package/dist/VideoPlayer-P3I6ESXJ.mjs +9 -0
- package/dist/app.d.mts +620 -0
- package/dist/app.d.ts +620 -0
- package/dist/app.js +7061 -0
- package/dist/app.mjs +100 -0
- package/dist/chunk-24BCQSLI.mjs +1 -0
- package/dist/chunk-45I3EDB2.mjs +90 -0
- package/dist/chunk-4IWCD7ID.mjs +1450 -0
- package/dist/chunk-5E2HXWFI.mjs +105 -0
- package/dist/chunk-C7AYI4XM.mjs +402 -0
- package/dist/chunk-J4D44TUA.mjs +1267 -0
- package/dist/chunk-KTEWZKNE.mjs +1020 -0
- package/dist/chunk-LMUQHL4Z.mjs +3829 -0
- package/dist/chunk-MD5OQ4J2.mjs +527 -0
- package/dist/chunk-MPJRPYIZ.mjs +1 -0
- package/dist/chunk-MPWUEQ7J.mjs +2422 -0
- package/dist/chunk-MTT5TKAJ.mjs +93 -0
- package/dist/chunk-RBDK7MWQ.mjs +46 -0
- package/dist/chunk-SVFQZPNZ.mjs +3648 -0
- package/dist/chunk-TZWBBMSG.mjs +1 -0
- package/dist/chunk-XA7J6PVJ.mjs +1488 -0
- package/dist/chunk-ZLYBRYWQ.mjs +726 -0
- package/dist/common.d.mts +921 -0
- package/dist/common.d.ts +921 -0
- package/dist/common.js +4991 -0
- package/dist/common.mjs +172 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +17563 -0
- package/dist/index.mjs +349 -0
- package/dist/ui.d.mts +937 -0
- package/dist/ui.d.ts +937 -0
- package/dist/ui.js +10095 -0
- package/dist/ui.mjs +163 -0
- package/package.json +114 -0
- package/styles/index.css +129 -0
package/dist/app.mjs
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AnnouncerOutlet,
|
|
4
|
+
AppBreadcrumbs,
|
|
5
|
+
AppCommandBar,
|
|
6
|
+
AppDrawer,
|
|
7
|
+
AppFooter,
|
|
8
|
+
AppNav,
|
|
9
|
+
AppShell,
|
|
10
|
+
AppSidebar,
|
|
11
|
+
AppTopBar,
|
|
12
|
+
CommentThread,
|
|
13
|
+
ContextMenu,
|
|
14
|
+
DetailHeader,
|
|
15
|
+
ErrorState,
|
|
16
|
+
FileUploadSection,
|
|
17
|
+
FilterBar,
|
|
18
|
+
FocusTrap,
|
|
19
|
+
FormField,
|
|
20
|
+
GlobalSearch,
|
|
21
|
+
ImageGallery,
|
|
22
|
+
InlineAlert,
|
|
23
|
+
LoadingState,
|
|
24
|
+
MaintenancePage,
|
|
25
|
+
MentionPicker,
|
|
26
|
+
NavDrawer,
|
|
27
|
+
NoAccessState,
|
|
28
|
+
NotFoundPage,
|
|
29
|
+
NotFoundState,
|
|
30
|
+
NotificationProvider,
|
|
31
|
+
OnboardingWizard,
|
|
32
|
+
SectionCard,
|
|
33
|
+
ShareDialog,
|
|
34
|
+
SplashScreen,
|
|
35
|
+
StepFlow,
|
|
36
|
+
StepShell,
|
|
37
|
+
notify,
|
|
38
|
+
useAnnounce
|
|
39
|
+
} from "./chunk-LMUQHL4Z.mjs";
|
|
40
|
+
import {
|
|
41
|
+
Announcer,
|
|
42
|
+
LiveRegion,
|
|
43
|
+
SkipLink,
|
|
44
|
+
Tooltip,
|
|
45
|
+
toast
|
|
46
|
+
} from "./chunk-XA7J6PVJ.mjs";
|
|
47
|
+
import {
|
|
48
|
+
Form,
|
|
49
|
+
ThemeSwitcher
|
|
50
|
+
} from "./chunk-45I3EDB2.mjs";
|
|
51
|
+
import "./chunk-ZLYBRYWQ.mjs";
|
|
52
|
+
import "./chunk-5E2HXWFI.mjs";
|
|
53
|
+
import "./chunk-KTEWZKNE.mjs";
|
|
54
|
+
import "./chunk-MTT5TKAJ.mjs";
|
|
55
|
+
import "./chunk-RBDK7MWQ.mjs";
|
|
56
|
+
export {
|
|
57
|
+
Announcer,
|
|
58
|
+
AnnouncerOutlet,
|
|
59
|
+
AppBreadcrumbs,
|
|
60
|
+
AppCommandBar,
|
|
61
|
+
AppDrawer,
|
|
62
|
+
AppFooter,
|
|
63
|
+
AppNav,
|
|
64
|
+
AppShell,
|
|
65
|
+
AppSidebar,
|
|
66
|
+
AppTopBar,
|
|
67
|
+
CommentThread,
|
|
68
|
+
ContextMenu,
|
|
69
|
+
DetailHeader,
|
|
70
|
+
ErrorState,
|
|
71
|
+
FileUploadSection,
|
|
72
|
+
FilterBar,
|
|
73
|
+
FocusTrap,
|
|
74
|
+
Form,
|
|
75
|
+
FormField,
|
|
76
|
+
GlobalSearch,
|
|
77
|
+
ImageGallery,
|
|
78
|
+
InlineAlert,
|
|
79
|
+
LiveRegion,
|
|
80
|
+
LoadingState,
|
|
81
|
+
MaintenancePage,
|
|
82
|
+
MentionPicker,
|
|
83
|
+
NavDrawer,
|
|
84
|
+
NoAccessState,
|
|
85
|
+
NotFoundPage,
|
|
86
|
+
NotFoundState,
|
|
87
|
+
NotificationProvider,
|
|
88
|
+
OnboardingWizard,
|
|
89
|
+
SectionCard,
|
|
90
|
+
ShareDialog,
|
|
91
|
+
SkipLink,
|
|
92
|
+
SplashScreen,
|
|
93
|
+
StepFlow,
|
|
94
|
+
StepShell,
|
|
95
|
+
ThemeSwitcher,
|
|
96
|
+
Tooltip,
|
|
97
|
+
notify,
|
|
98
|
+
toast,
|
|
99
|
+
useAnnounce
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
AlertBanner,
|
|
4
|
+
DropdownMenu
|
|
5
|
+
} from "./chunk-ZLYBRYWQ.mjs";
|
|
6
|
+
import {
|
|
7
|
+
Button
|
|
8
|
+
} from "./chunk-MTT5TKAJ.mjs";
|
|
9
|
+
import {
|
|
10
|
+
cn
|
|
11
|
+
} from "./chunk-RBDK7MWQ.mjs";
|
|
12
|
+
|
|
13
|
+
// modules/app/ThemeSwitcher.tsx
|
|
14
|
+
import { useEffect, useState } from "react";
|
|
15
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
16
|
+
import { faSun, faMoon, faDisplay, faChevronDown } from "@fortawesome/free-solid-svg-icons";
|
|
17
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
function readStoredTheme() {
|
|
19
|
+
if (typeof window === "undefined") return "system";
|
|
20
|
+
const t = window.localStorage.getItem("theme");
|
|
21
|
+
return t === "light" || t === "dark" || t === "system" ? t : "system";
|
|
22
|
+
}
|
|
23
|
+
function ThemeSwitcher() {
|
|
24
|
+
const [theme, setTheme] = useState(readStoredTheme);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const isDark = theme === "dark" || theme === "system" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
27
|
+
document.documentElement.classList.toggle("dark", isDark);
|
|
28
|
+
localStorage.setItem("theme", theme);
|
|
29
|
+
}, [theme]);
|
|
30
|
+
const icon = theme === "light" ? faSun : theme === "dark" ? faMoon : faDisplay;
|
|
31
|
+
const label = theme.charAt(0).toUpperCase() + theme.slice(1);
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
DropdownMenu,
|
|
34
|
+
{
|
|
35
|
+
trigger: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "gap-2", children: [
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "w-4 flex items-center justify-center shrink-0", "aria-hidden": "true", suppressHydrationWarning: true, children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon, className: "w-4 h-4" }) }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "inline-block min-w-[3.5rem] text-left", suppressHydrationWarning: true, children: label }),
|
|
38
|
+
/* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faChevronDown, className: "w-3 h-3 text-text-disabled" })
|
|
39
|
+
] }),
|
|
40
|
+
items: [
|
|
41
|
+
{ type: "item", label: "Light", icon: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faSun }), onClick: () => setTheme("light") },
|
|
42
|
+
{ type: "item", label: "Dark", icon: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faMoon }), onClick: () => setTheme("dark") },
|
|
43
|
+
{ type: "item", label: "System", icon: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faDisplay }), onClick: () => setTheme("system") }
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// modules/app/Form.tsx
|
|
50
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
51
|
+
function Form({
|
|
52
|
+
title,
|
|
53
|
+
description,
|
|
54
|
+
error,
|
|
55
|
+
columns = 1,
|
|
56
|
+
actions,
|
|
57
|
+
children,
|
|
58
|
+
onSubmit,
|
|
59
|
+
className
|
|
60
|
+
}) {
|
|
61
|
+
return /* @__PURE__ */ jsxs2(
|
|
62
|
+
"form",
|
|
63
|
+
{
|
|
64
|
+
onSubmit,
|
|
65
|
+
noValidate: true,
|
|
66
|
+
className: cn("space-y-6", className),
|
|
67
|
+
children: [
|
|
68
|
+
(title || description) && /* @__PURE__ */ jsxs2("div", { children: [
|
|
69
|
+
title && /* @__PURE__ */ jsx2("h2", { className: "text-lg font-semibold text-text-primary", children: title }),
|
|
70
|
+
description && /* @__PURE__ */ jsx2("p", { className: "text-sm text-text-secondary mt-0.5", children: description })
|
|
71
|
+
] }),
|
|
72
|
+
error && /* @__PURE__ */ jsx2(AlertBanner, { variant: "error", message: error }),
|
|
73
|
+
/* @__PURE__ */ jsx2("div", { className: cn(
|
|
74
|
+
"grid gap-4",
|
|
75
|
+
columns === 2 ? "sm:grid-cols-2" : "grid-cols-1"
|
|
76
|
+
), children }),
|
|
77
|
+
actions && /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-end gap-3 pt-2 border-t border-border", children: actions })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// libs/utils/isBrowser.ts
|
|
84
|
+
var isBrowser = typeof window !== "undefined";
|
|
85
|
+
|
|
86
|
+
export {
|
|
87
|
+
isBrowser,
|
|
88
|
+
ThemeSwitcher,
|
|
89
|
+
Form
|
|
90
|
+
};
|