@enmera/panel-kit 0.0.0-stage → 0.2.0

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.
Files changed (113) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +98 -2
  4. package/README.tr.md +59 -0
  5. package/dist/config.d.ts +18 -0
  6. package/dist/config.js +14 -0
  7. package/dist/empty-state.d.ts +7 -0
  8. package/dist/empty-state.js +5 -0
  9. package/dist/hooks/use-mobile.d.ts +1 -0
  10. package/dist/hooks/use-mobile.js +15 -0
  11. package/dist/section-card.d.ts +16 -0
  12. package/dist/section-card.js +13 -0
  13. package/dist/stat-cards.d.ts +15 -0
  14. package/dist/stat-cards.js +32 -0
  15. package/dist/status-badge.d.ts +29 -0
  16. package/dist/status-badge.js +27 -0
  17. package/dist/summary-strip.d.ts +18 -0
  18. package/dist/summary-strip.js +15 -0
  19. package/dist/text.d.ts +7 -0
  20. package/dist/text.js +8 -0
  21. package/dist/ui/alert-dialog.d.ts +22 -0
  22. package/dist/ui/alert-dialog.js +38 -0
  23. package/dist/ui/avatar.d.ts +10 -0
  24. package/dist/ui/avatar.js +23 -0
  25. package/dist/ui/badge.d.ts +8 -0
  26. package/dist/ui/badge.js +31 -0
  27. package/dist/ui/breadcrumb.d.ts +11 -0
  28. package/dist/ui/breadcrumb.js +25 -0
  29. package/dist/ui/button.d.ts +14 -0
  30. package/dist/ui/button.js +67 -0
  31. package/dist/ui/calendar.d.ts +24 -0
  32. package/dist/ui/calendar.js +54 -0
  33. package/dist/ui/card.d.ts +11 -0
  34. package/dist/ui/card.js +24 -0
  35. package/dist/ui/chart.d.ts +44 -0
  36. package/dist/ui/chart.js +137 -0
  37. package/dist/ui/checkbox.d.ts +3 -0
  38. package/dist/ui/checkbox.js +9 -0
  39. package/dist/ui/chip.d.ts +11 -0
  40. package/dist/ui/chip.js +10 -0
  41. package/dist/ui/code.d.ts +2 -0
  42. package/dist/ui/code.js +6 -0
  43. package/dist/ui/collapsible.d.ts +5 -0
  44. package/dist/ui/collapsible.js +12 -0
  45. package/dist/ui/combobox.d.ts +32 -0
  46. package/dist/ui/combobox.js +77 -0
  47. package/dist/ui/command.d.ts +27 -0
  48. package/dist/ui/command.js +36 -0
  49. package/dist/ui/dialog.d.ts +21 -0
  50. package/dist/ui/dialog.js +32 -0
  51. package/dist/ui/dropdown-menu.d.ts +26 -0
  52. package/dist/ui/dropdown-menu.js +48 -0
  53. package/dist/ui/field.d.ts +24 -0
  54. package/dist/ui/field.js +67 -0
  55. package/dist/ui/heading.d.ts +24 -0
  56. package/dist/ui/heading.js +24 -0
  57. package/dist/ui/icon-tile.d.ts +17 -0
  58. package/dist/ui/icon-tile.js +17 -0
  59. package/dist/ui/input-group.d.ts +19 -0
  60. package/dist/ui/input-group.js +58 -0
  61. package/dist/ui/input.d.ts +8 -0
  62. package/dist/ui/input.js +7 -0
  63. package/dist/ui/label.d.ts +3 -0
  64. package/dist/ui/label.js +12 -0
  65. package/dist/ui/meta.d.ts +13 -0
  66. package/dist/ui/meta.js +18 -0
  67. package/dist/ui/option-card.d.ts +9 -0
  68. package/dist/ui/option-card.js +10 -0
  69. package/dist/ui/pagination.d.ts +17 -0
  70. package/dist/ui/pagination.js +27 -0
  71. package/dist/ui/popover.d.ts +10 -0
  72. package/dist/ui/popover.js +19 -0
  73. package/dist/ui/radio-group.d.ts +4 -0
  74. package/dist/ui/radio-group.js +11 -0
  75. package/dist/ui/row-button.d.ts +9 -0
  76. package/dist/ui/row-button.js +16 -0
  77. package/dist/ui/scroll-area.d.ts +3 -0
  78. package/dist/ui/scroll-area.js +7 -0
  79. package/dist/ui/segmented.d.ts +22 -0
  80. package/dist/ui/segmented.js +16 -0
  81. package/dist/ui/select.d.ts +26 -0
  82. package/dist/ui/select.js +45 -0
  83. package/dist/ui/separator.d.ts +3 -0
  84. package/dist/ui/separator.js +8 -0
  85. package/dist/ui/sheet.d.ts +20 -0
  86. package/dist/ui/sheet.js +34 -0
  87. package/dist/ui/sidebar.d.ts +77 -0
  88. package/dist/ui/sidebar.js +204 -0
  89. package/dist/ui/skeleton.d.ts +2 -0
  90. package/dist/ui/skeleton.js +6 -0
  91. package/dist/ui/slider.d.ts +11 -0
  92. package/dist/ui/slider.js +13 -0
  93. package/dist/ui/sonner.d.ts +7 -0
  94. package/dist/ui/sonner.js +38 -0
  95. package/dist/ui/switch.d.ts +5 -0
  96. package/dist/ui/switch.js +8 -0
  97. package/dist/ui/table.d.ts +11 -0
  98. package/dist/ui/table.js +28 -0
  99. package/dist/ui/tabs.d.ts +15 -0
  100. package/dist/ui/tabs.js +73 -0
  101. package/dist/ui/text-button.d.ts +21 -0
  102. package/dist/ui/text-button.js +21 -0
  103. package/dist/ui/textarea.d.ts +9 -0
  104. package/dist/ui/textarea.js +7 -0
  105. package/dist/ui/tile.d.ts +27 -0
  106. package/dist/ui/tile.js +30 -0
  107. package/dist/ui/tooltip.d.ts +8 -0
  108. package/dist/ui/tooltip.js +24 -0
  109. package/dist/utils.d.ts +1 -0
  110. package/dist/utils.js +1 -0
  111. package/lang/tr.json +16 -0
  112. package/package.json +83 -4
  113. package/theme.css +17 -0
@@ -0,0 +1,204 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../utils.js";
5
+ import { Button as ButtonPrimitive, Link as LinkPrimitive, } from "react-aria-components";
6
+ import { useIsMobile } from "../hooks/use-mobile.js";
7
+ import { Button } from "./button.js";
8
+ import { Input } from "./input.js";
9
+ import { Separator } from "./separator.js";
10
+ import { Sheet, SheetDescription, SheetHeader, SheetTitle, } from "./sheet.js";
11
+ import { Skeleton } from "./skeleton.js";
12
+ import { Tooltip, TooltipTrigger } from "./tooltip.js";
13
+ import { ChevronLeftIcon, ChevronRightIcon, PanelLeftIcon } from "lucide-react";
14
+ import { t } from '../config.js';
15
+ const SIDEBAR_COOKIE_NAME = "sidebar_state";
16
+ const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
17
+ const SIDEBAR_WIDTH = "16rem";
18
+ const SIDEBAR_WIDTH_MOBILE = "18rem";
19
+ const SIDEBAR_WIDTH_ICON = "3rem";
20
+ const SIDEBAR_KEYBOARD_SHORTCUT = "b";
21
+ const SidebarContext = React.createContext(null);
22
+ function useSidebar() {
23
+ const context = React.useContext(SidebarContext);
24
+ if (!context) {
25
+ throw new Error("useSidebar must be used within a SidebarProvider.");
26
+ }
27
+ return context;
28
+ }
29
+ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, persist = true, className, style, children, ...props }) {
30
+ const isMobile = useIsMobile();
31
+ const [openMobile, setOpenMobile] = React.useState(false);
32
+ // This is the internal state of the sidebar.
33
+ // We use openProp and setOpenProp for control from outside the component.
34
+ const [_open, _setOpen] = React.useState(defaultOpen);
35
+ const open = openProp ?? _open;
36
+ const setOpen = React.useCallback((value) => {
37
+ const openState = typeof value === "function" ? value(open) : value;
38
+ if (setOpenProp) {
39
+ setOpenProp(openState);
40
+ }
41
+ else {
42
+ _setOpen(openState);
43
+ }
44
+ // This sets the cookie to keep the sidebar state.
45
+ if (persist) {
46
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
47
+ }
48
+ }, [setOpenProp, open, persist]);
49
+ // Helper to toggle the sidebar.
50
+ const toggleSidebar = React.useCallback(() => {
51
+ return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
52
+ }, [isMobile, setOpen, setOpenMobile]);
53
+ // Adds a keyboard shortcut to toggle the sidebar.
54
+ React.useEffect(() => {
55
+ const handleKeyDown = (event) => {
56
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT &&
57
+ (event.metaKey || event.ctrlKey)) {
58
+ event.preventDefault();
59
+ toggleSidebar();
60
+ }
61
+ };
62
+ window.addEventListener("keydown", handleKeyDown);
63
+ return () => window.removeEventListener("keydown", handleKeyDown);
64
+ }, [toggleSidebar]);
65
+ // We add a state so that we can do data-state="expanded" or "collapsed".
66
+ // This makes it easier to style the sidebar with Tailwind classes.
67
+ const state = open ? "expanded" : "collapsed";
68
+ const contextValue = React.useMemo(() => ({
69
+ state,
70
+ open,
71
+ setOpen,
72
+ isMobile,
73
+ openMobile,
74
+ setOpenMobile,
75
+ toggleSidebar,
76
+ }), [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]);
77
+ return (_jsx(SidebarContext.Provider, { value: contextValue, children: _jsx("div", { "data-slot": "sidebar-wrapper", style: {
78
+ "--sidebar-width": SIDEBAR_WIDTH,
79
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
80
+ ...style,
81
+ }, className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className), ...props, children: children }) }));
82
+ }
83
+ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props }) {
84
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
85
+ if (collapsible === "none") {
86
+ return (_jsx("div", { "data-slot": "sidebar", className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className), ...props, children: children }));
87
+ }
88
+ if (isMobile) {
89
+ return (_jsxs(Sheet, { isOpen: openMobile, onOpenChange: setOpenMobile, dir: dir, "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden", style: {
90
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE,
91
+ }, side: side, ...props, children: [_jsxs(SheetHeader, { className: "sr-only", children: [_jsx(SheetTitle, { children: t("Menu") }), _jsx(SheetDescription, { children: t("Mobile menu") })] }), _jsx("div", { className: "flex h-full w-full flex-col", children: children })] }));
92
+ }
93
+ return (_jsxs("div", { className: "group peer hidden text-sidebar-foreground md:block", "data-state": state, "data-collapsible": state === "collapsed" ? collapsible : "", "data-variant": variant, "data-side": side, "data-slot": "sidebar", children: [_jsx("div", { "data-slot": "sidebar-gap", className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset"
94
+ ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]"
95
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)") }), _jsx("div", { "data-slot": "sidebar-container", "data-side": side, className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",
96
+ // Adjust the padding for floating and inset variants.
97
+ variant === "floating" || variant === "inset"
98
+ ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
99
+ : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className), ...props, children: _jsx("div", { "data-sidebar": "sidebar", "data-slot": "sidebar-inner", className: "flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-2xl group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border", children: children }) })] }));
100
+ }
101
+ function SidebarTrigger({ className, onPress, ...props }) {
102
+ const { toggleSidebar } = useSidebar();
103
+ return (_jsxs(Button, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon-sm", className: cn(className), onPress: (event) => {
104
+ onPress?.(event);
105
+ toggleSidebar();
106
+ }, ...props, children: [_jsx(PanelLeftIcon, {}), _jsx("span", { className: "sr-only", children: t("Toggle menu") })] }));
107
+ }
108
+ /** Menünün sağ kenarında, dikeyde ortada aç/kapat düğmesi; menü daralınca ok yön değiştirir. */
109
+ function SidebarRail({ className, ...props }) {
110
+ const { toggleSidebar, state } = useSidebar();
111
+ return (_jsx("button", { type: "button", "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": t("Toggle menu"), title: t("Toggle menu"), onClick: toggleSidebar, onMouseDown: (event) => event.preventDefault(), className: cn("absolute top-1/2 -right-3 z-20 hidden size-6 -translate-y-1/2 items-center justify-center rounded-full border bg-background text-muted-foreground shadow-sm transition-colors outline-none hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/50 md:flex", className), ...props, children: state === "collapsed" ? _jsx(ChevronRightIcon, { className: "size-3.5" }) : _jsx(ChevronLeftIcon, { className: "size-3.5" }) }));
112
+ }
113
+ function SidebarInset({ className, ...props }) {
114
+ return (_jsx("main", { "data-slot": "sidebar-inset", className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-2xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className), ...props }));
115
+ }
116
+ function SidebarInput({ className, ...props }) {
117
+ return (_jsx(Input, { "data-slot": "sidebar-input", "data-sidebar": "input", className: cn("h-8 w-full bg-input/50 shadow-none", className), ...props }));
118
+ }
119
+ function SidebarHeader({ className, ...props }) {
120
+ return (_jsx("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: cn("flex flex-col gap-2 p-2 [--radius:var(--radius-xl)]", className), ...props }));
121
+ }
122
+ function SidebarFooter({ className, ...props }) {
123
+ return (_jsx("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: cn("flex flex-col gap-2 p-2", className), ...props }));
124
+ }
125
+ function SidebarSeparator({ className, ...props }) {
126
+ return (_jsx(Separator, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: cn("mx-2 w-auto bg-sidebar-border", className), ...props }));
127
+ }
128
+ function SidebarContent({ className, ...props }) {
129
+ return (_jsx("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto [--radius:var(--radius-xl)] group-data-[collapsible=icon]:overflow-x-hidden group-data-[collapsible=icon]:overflow-y-auto", className), ...props }));
130
+ }
131
+ function SidebarGroup({ className, ...props }) {
132
+ return (_jsx("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn("relative flex w-full min-w-0 flex-col p-2", className), ...props }));
133
+ }
134
+ function SidebarGroupLabel({ className, elementType: Element = "div", ...props }) {
135
+ return (_jsx(Element, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn("flex h-8 shrink-0 items-center rounded-xl px-3 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className), ...props }));
136
+ }
137
+ function SidebarGroupAction({ className, ...props }) {
138
+ return (_jsx("button", { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className), ...props }));
139
+ }
140
+ function SidebarGroupContent({ className, ...props }) {
141
+ return (_jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props }));
142
+ }
143
+ function SidebarMenu({ className, ...props }) {
144
+ return (_jsx("div", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: cn("flex w-full min-w-0 flex-col gap-0.5", className), ...props }));
145
+ }
146
+ function SidebarMenuItem({ className, ...props }) {
147
+ return (_jsx("div", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: cn("group/menu-item relative", className), ...props }));
148
+ }
149
+ const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-xl px-3 py-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-[7px]! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-expanded:hover:bg-sidebar-accent aria-expanded:hover:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4.5 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
150
+ variants: {
151
+ variant: {
152
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
153
+ outline: "bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]",
154
+ },
155
+ size: {
156
+ default: "h-9 text-sm",
157
+ sm: "h-8 text-xs",
158
+ lg: "h-14 px-3 text-sm",
159
+ },
160
+ },
161
+ defaultVariants: {
162
+ variant: "default",
163
+ size: "default",
164
+ },
165
+ });
166
+ function SidebarMenuButton({ isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
167
+ const { isMobile, state } = useSidebar();
168
+ const comp = props.href !== undefined ? (_jsx(LinkPrimitive, { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: cn(sidebarMenuButtonVariants({ variant, size }), className), ...props })) : (_jsx(ButtonPrimitive, { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": size, "data-active": isActive, className: cn(sidebarMenuButtonVariants({ variant, size }), className), ...props }));
169
+ if (!tooltip) {
170
+ return comp;
171
+ }
172
+ if (typeof tooltip === "string") {
173
+ tooltip = {
174
+ children: tooltip,
175
+ };
176
+ }
177
+ return (_jsxs(TooltipTrigger, { isDisabled: state !== "collapsed" || isMobile, children: [comp, _jsx(Tooltip, { placement: "right", ...tooltip })] }));
178
+ }
179
+ function SidebarMenuAction({ className, showOnHover = false, ...props }) {
180
+ return (_jsx(ButtonPrimitive, { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-xl p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-2 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover &&
181
+ "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className), ...props }));
182
+ }
183
+ function SidebarMenuBadge({ className, ...props }) {
184
+ return (_jsx("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-xl px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className), ...props }));
185
+ }
186
+ function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
187
+ // Random width between 50 to 90%.
188
+ const [width] = React.useState(() => {
189
+ return `${Math.floor(Math.random() * 40) + 50}%`;
190
+ });
191
+ return (_jsxs("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: cn("flex h-8 items-center gap-2 rounded-xl px-2", className), ...props, children: [showIcon && (_jsx(Skeleton, { className: "size-4 rounded-xl", "data-sidebar": "menu-skeleton-icon" })), _jsx(Skeleton, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
192
+ "--skeleton-width": width,
193
+ } })] }));
194
+ }
195
+ function SidebarMenuSub({ className, ...props }) {
196
+ return (_jsx("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className), ...props }));
197
+ }
198
+ function SidebarMenuSubItem({ className, ...props }) {
199
+ return (_jsx("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: cn("group/menu-sub-item relative", className), ...props }));
200
+ }
201
+ function SidebarMenuSubButton({ size = "md", isActive = false, className, ...props }) {
202
+ return props.href !== undefined ? (_jsx(LinkPrimitive, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className), ...props })) : (_jsx(ButtonPrimitive, { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-xl px-3 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className), ...props }));
203
+ }
204
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils.js";
3
+ function Skeleton({ className, ...props }) {
4
+ return (_jsx("div", { "data-slot": "skeleton", className: cn("skeleton-shimmer rounded-2xl bg-muted", className), ...props }));
5
+ }
6
+ export { Skeleton };
@@ -0,0 +1,11 @@
1
+ import { type SliderProps } from "react-aria-components";
2
+ /**
3
+ * Tek değerli kaydırıcı (React Aria `Slider`). Ham `<input type="range">`
4
+ * yerine kullanılır (DESIGN.md § Yeni panel); erişilebilir adı `aria-label`
5
+ * ya da çevreleyen etiketle verilir. İlk kullanıcı: Reklam Tasarım Aracı
6
+ * (opaklık, gölge, kırpma, filtre).
7
+ */
8
+ declare function Slider({ className, ...props }: Omit<SliderProps<number>, "className" | "children"> & {
9
+ className?: string;
10
+ }): import("react").JSX.Element;
11
+ export { Slider };
@@ -0,0 +1,13 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../utils.js";
3
+ import { Slider as SliderPrimitive, SliderThumb, SliderTrack, } from "react-aria-components";
4
+ /**
5
+ * Tek değerli kaydırıcı (React Aria `Slider`). Ham `<input type="range">`
6
+ * yerine kullanılır (DESIGN.md § Yeni panel); erişilebilir adı `aria-label`
7
+ * ya da çevreleyen etiketle verilir. İlk kullanıcı: Reklam Tasarım Aracı
8
+ * (opaklık, gölge, kırpma, filtre).
9
+ */
10
+ function Slider({ className, ...props }) {
11
+ return (_jsx(SliderPrimitive, { "data-slot": "slider", className: cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50", className), ...props, children: _jsx(SliderTrack, { className: "relative h-5 w-full", children: ({ state }) => (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute top-1/2 h-1.5 w-full -translate-y-1/2 rounded-full bg-muted" }), _jsx("div", { className: "absolute top-1/2 h-1.5 -translate-y-1/2 rounded-full bg-primary", style: { width: `${state.getThumbPercent(0) * 100}%` } }), _jsx(SliderThumb, { className: "top-[calc(50%-0.5rem)] size-4 rounded-full border border-primary bg-background shadow-sm transition-shadow outline-none data-dragging:ring-3 data-dragging:ring-ring/30 data-focus-visible:ring-3 data-focus-visible:ring-ring/30" })] })) }) }));
12
+ }
13
+ export { Slider };
@@ -0,0 +1,7 @@
1
+ import { type ToasterProps } from "sonner";
2
+ /**
3
+ * Bildirimler panelin kart dilinde: belirgin kenar ve gölge, türüne göre renkli ikon kutusu, her zaman görünen
4
+ * kapatma tuşu; eylem düğmesi paneldeki düğmenin aynısı.
5
+ */
6
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
7
+ export { Toaster };
@@ -0,0 +1,38 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useTheme } from "next-themes";
3
+ import { Toaster as Sonner } from "sonner";
4
+ import { CircleCheckIcon, InfoIcon, TriangleAlertIcon, OctagonXIcon, Loader2Icon, XIcon } from "lucide-react";
5
+ import { buttonVariants } from "./button.js";
6
+ import { cn } from "../utils.js";
7
+ /**
8
+ * Bildirimler panelin kart dilinde: belirgin kenar ve gölge, türüne göre renkli ikon kutusu, her zaman görünen
9
+ * kapatma tuşu; eylem düğmesi paneldeki düğmenin aynısı.
10
+ */
11
+ const Toaster = ({ ...props }) => {
12
+ const { theme = "system" } = useTheme();
13
+ return (_jsx(Sonner, { theme: theme, className: "toaster group", closeButton: true, icons: {
14
+ success: _jsx(CircleCheckIcon, {}),
15
+ info: _jsx(InfoIcon, {}),
16
+ warning: _jsx(TriangleAlertIcon, {}),
17
+ error: _jsx(OctagonXIcon, {}),
18
+ loading: _jsx(Loader2Icon, { className: "animate-spin" }),
19
+ close: _jsx(XIcon, {}),
20
+ }, toastOptions: {
21
+ unstyled: true,
22
+ classNames: {
23
+ toast: "group/toast relative flex w-[var(--width)] items-start gap-3 rounded-2xl border border-foreground/10 bg-popover p-3.5 pe-10 text-popover-foreground shadow-xl shadow-black/10 dark:shadow-black/40",
24
+ icon: "grid size-8 shrink-0 place-items-center rounded-xl bg-muted text-foreground [&>svg]:size-4",
25
+ content: "flex min-w-0 flex-1 flex-col gap-0.5 self-center",
26
+ title: "text-sm font-semibold leading-snug",
27
+ description: "text-xs text-muted-foreground",
28
+ actionButton: cn(buttonVariants({ size: "xs" }), "self-center"),
29
+ cancelButton: cn(buttonVariants({ size: "xs", variant: "outline" }), "self-center"),
30
+ closeButton: "absolute end-2 top-2 grid size-6 place-items-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground [&>svg]:size-3.5",
31
+ success: "[&_[data-icon]]:bg-emerald-500/15 [&_[data-icon]]:text-emerald-600 dark:[&_[data-icon]]:text-emerald-400",
32
+ info: "[&_[data-icon]]:bg-sky-500/15 [&_[data-icon]]:text-sky-600 dark:[&_[data-icon]]:text-sky-400",
33
+ warning: "[&_[data-icon]]:bg-amber-500/15 [&_[data-icon]]:text-amber-600 dark:[&_[data-icon]]:text-amber-400",
34
+ error: "[&_[data-icon]]:bg-rose-500/15 [&_[data-icon]]:text-rose-600 dark:[&_[data-icon]]:text-rose-400",
35
+ },
36
+ }, ...props }));
37
+ };
38
+ export { Toaster };
@@ -0,0 +1,5 @@
1
+ import { type SwitchProps as SwitchPrimitiveProps } from "react-aria-components";
2
+ declare function Switch({ className, size, children, ...props }: SwitchPrimitiveProps & {
3
+ size?: "sm" | "default";
4
+ }): import("react").JSX.Element;
5
+ export { Switch };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { cn } from "../utils.js";
4
+ import { composeRenderProps, Switch as SwitchPrimitive, } from "react-aria-components";
5
+ function Switch({ className, size = "default", children, ...props }) {
6
+ return (_jsx(SwitchPrimitive, { "data-slot": "switch", "data-size": size, className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border-2 transition-[color,background-color,border-color,box-shadow,opacity,transform,translate] outline-none not-data-selected:border-transparent not-data-selected:bg-input/90 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-focus-visible:border-ring data-focus-visible:ring-3 data-focus-visible:ring-ring/30 data-invalid:border-destructive data-invalid:ring-3 data-invalid:ring-destructive/20 data-[size=default]:h-5 data-[size=default]:w-11 data-[size=sm]:h-4 data-[size=sm]:w-7 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 dark:data-invalid:border-destructive/50 dark:data-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary group-has-[:focus-visible]/field-label:data-checked:border-primary data-unchecked:border-transparent data-unchecked:bg-input/90 group-has-[:focus-visible]/field-label:data-unchecked:border-transparent data-selected:border-primary data-selected:bg-primary data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: composeRenderProps(children, (children, { isSelected }) => (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "switch-thumb", "data-selected": isSelected || undefined, className: "pointer-events-none block rounded-full bg-background shadow-sm ring-0 transition-transform not-dark:bg-clip-padding not-data-selected:translate-x-0 group-data-[size=default]/switch:h-4 group-data-[size=default]/switch:w-6 group-data-[size=sm]/switch:h-3 group-data-[size=sm]/switch:w-4 dark:not-data-selected:bg-foreground data-checked:translate-x-[calc(100%-8px)] dark:data-checked:bg-primary-foreground data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground data-selected:translate-x-[calc(100%-8px)] dark:data-selected:bg-primary-foreground" }), children] }))) }));
7
+ }
8
+ export { Switch };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type CellProps, type ColumnProps, type RowProps, type TableBodyProps, type TableFooterProps, type TableHeaderProps, type TableProps } from "react-aria-components";
3
+ declare function Table({ className, ...props }: TableProps): React.JSX.Element;
4
+ declare function TableHeader<T>({ className, ...props }: TableHeaderProps<T>): React.JSX.Element;
5
+ declare function TableBody<T>({ className, ...props }: TableBodyProps<T>): React.JSX.Element;
6
+ declare function TableFooter<T>({ className, ...props }: TableFooterProps<T>): React.JSX.Element;
7
+ declare function TableRow<T>({ className, ...props }: RowProps<T>): React.JSX.Element;
8
+ declare function TableHead({ className, ...props }: ColumnProps): React.JSX.Element;
9
+ declare function TableCell({ className, ...props }: CellProps): React.JSX.Element;
10
+ declare function TableCaption({ className, ...props }: React.ComponentProps<"figcaption">): React.JSX.Element;
11
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils.js";
3
+ import { Cell as CellPrimitive, Column as ColumnPrimitive, Row as RowPrimitive, TableBody as TableBodyPrimitive, TableFooter as TableFooterPrimitive, TableHeader as TableHeaderPrimitive, Table as TablePrimitive, } from "react-aria-components";
4
+ function Table({ className, ...props }) {
5
+ return (_jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: _jsx(TablePrimitive, { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) }));
6
+ }
7
+ function TableHeader({ className, ...props }) {
8
+ return (_jsx(TableHeaderPrimitive, { "data-slot": "table-header", className: cn("[&_tr]:border-b", className), ...props }));
9
+ }
10
+ function TableBody({ className, ...props }) {
11
+ return (_jsx(TableBodyPrimitive, { "data-slot": "table-body", className: cn("data-empty:h-24 data-empty:text-center [&_tr:last-child]:border-0", className), ...props }));
12
+ }
13
+ function TableFooter({ className, ...props }) {
14
+ return (_jsx(TableFooterPrimitive, { "data-slot": "table-footer", className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className), ...props }));
15
+ }
16
+ function TableRow({ className, ...props }) {
17
+ return (_jsx(RowPrimitive, { "data-slot": "table-row", className: cn("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted data-selected:bg-muted", className), ...props }));
18
+ }
19
+ function TableHead({ className, ...props }) {
20
+ return (_jsx(ColumnPrimitive, { "data-slot": "table-head", className: cn("h-12 px-3 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([data-slot=checkbox])]:pr-0 [&:has([role=checkbox])]:pr-0", className), ...props }));
21
+ }
22
+ function TableCell({ className, ...props }) {
23
+ return (_jsx(CellPrimitive, { "data-slot": "table-cell", className: cn("p-3 align-middle whitespace-nowrap [&:has([data-slot=checkbox])]:pr-0 [&:has([role=checkbox])]:pr-0", className), ...props }));
24
+ }
25
+ function TableCaption({ className, ...props }) {
26
+ return (_jsx("figcaption", { "data-slot": "table-caption", className: cn("mt-4 text-center text-sm text-muted-foreground", className), ...props }));
27
+ }
28
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ import { TabList as TabListPrimitive, TabPanel as TabPanelPrimitive, Tab as TabPrimitive, Tabs as TabsPrimitive } from "react-aria-components";
4
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive>): React.JSX.Element;
5
+ declare const tabsListVariants: (props?: ({
6
+ variant?: "default" | "line" | "plain" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ /**
9
+ * Sekme şeridi. Dar ekranda (telefon, tablet, açık menüyle dar masaüstü) sığmazsa yatay kayar: kaydırma çubuğu
10
+ * gizli, taşan kenar solarak devamı olduğunu gösterir, seçili sekme kendiliğinden ortaya kayar.
11
+ */
12
+ declare function TabsList({ className, variant, ...props }: React.ComponentProps<typeof TabListPrimitive> & VariantProps<typeof tabsListVariants>): React.JSX.Element;
13
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabPrimitive>): React.JSX.Element;
14
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabPanelPrimitive>): React.JSX.Element;
15
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../utils.js";
6
+ import { TabList as TabListPrimitive, TabPanel as TabPanelPrimitive, Tab as TabPrimitive, Tabs as TabsPrimitive, } from "react-aria-components";
7
+ function Tabs({ className, ...props }) {
8
+ return (_jsx(TabsPrimitive, { "data-slot": "tabs", className: cn("group/tabs flex gap-2 data-horizontal:flex-col", className), ...props }));
9
+ }
10
+ const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-full p-1 text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col group-data-vertical/tabs:rounded-2xl data-[variant=line]:rounded-none", {
11
+ variants: {
12
+ variant: {
13
+ default: "bg-muted",
14
+ line: "gap-1 bg-transparent",
15
+ // Bölmeli seçicinin yanındaki alt sekmeler: kutusuz metin, seçili olan hafif zeminli.
16
+ plain: "gap-0.5 bg-transparent p-0",
17
+ },
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ },
22
+ });
23
+ /**
24
+ * Sekme şeridi. Dar ekranda (telefon, tablet, açık menüyle dar masaüstü) sığmazsa yatay kayar: kaydırma çubuğu
25
+ * gizli, taşan kenar solarak devamı olduğunu gösterir, seçili sekme kendiliğinden ortaya kayar.
26
+ */
27
+ function TabsList({ className, variant = "default", ...props }) {
28
+ const scroller = React.useRef(null);
29
+ const [edges, setEdges] = React.useState({ start: false, end: false });
30
+ React.useEffect(() => {
31
+ const element = scroller.current;
32
+ if (!element)
33
+ return;
34
+ const update = () => setEdges({
35
+ start: element.scrollLeft > 4,
36
+ end: element.scrollLeft + element.clientWidth < element.scrollWidth - 4,
37
+ });
38
+ // Sayfayı dikeyde kaydırmadan yalnız şeridi kaydırır (scrollIntoView sayfayı da oynatırdı).
39
+ const centerSelected = (behavior = "smooth") => {
40
+ const selected = element.querySelector('[aria-selected="true"]');
41
+ if (!selected || element.scrollWidth <= element.clientWidth)
42
+ return;
43
+ const box = element.getBoundingClientRect();
44
+ const tab = selected.getBoundingClientRect();
45
+ element.scrollTo({ left: element.scrollLeft + tab.left - box.left - (box.width - tab.width) / 2, behavior });
46
+ };
47
+ update();
48
+ // İlk konum düzen oturduktan sonra (bir sonraki kare), animasyonsuz.
49
+ const frame = requestAnimationFrame(() => centerSelected("auto"));
50
+ const resize = new ResizeObserver(update);
51
+ resize.observe(element);
52
+ const selection = new MutationObserver(() => centerSelected());
53
+ selection.observe(element, { subtree: true, attributes: true, attributeFilter: ["aria-selected"] });
54
+ element.addEventListener("scroll", update, { passive: true });
55
+ return () => {
56
+ cancelAnimationFrame(frame);
57
+ resize.disconnect();
58
+ selection.disconnect();
59
+ element.removeEventListener("scroll", update);
60
+ };
61
+ }, []);
62
+ const mask = edges.start || edges.end
63
+ ? `linear-gradient(to right, ${edges.start ? "transparent" : "#000"}, #000 28px, #000 calc(100% - 28px), ${edges.end ? "transparent" : "#000"})`
64
+ : undefined;
65
+ return (_jsx("div", { ref: scroller, className: "max-w-full overflow-x-auto overscroll-x-contain [scrollbar-width:none] group-data-vertical/tabs:overflow-visible [&::-webkit-scrollbar]:hidden", style: { maskImage: mask, WebkitMaskImage: mask }, children: _jsx(TabListPrimitive, { "data-slot": "tabs-list", "data-variant": variant, className: cn(tabsListVariants({ variant }), "shrink-0", className), ...props }) }));
66
+ }
67
+ function TabsTrigger({ className, ...props }) {
68
+ return (_jsx(TabPrimitive, { "data-slot": "tabs-trigger", className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 cursor-default items-center justify-center gap-2 rounded-full border border-transparent! px-3 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-[color,background-color,border-color,box-shadow,opacity,transform,translate] group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:rounded-2xl group-data-vertical/tabs:px-3 group-data-vertical/tabs:py-1.5 hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-selected:bg-transparent dark:group-data-[variant=line]/tabs-list:data-selected:border-transparent dark:group-data-[variant=line]/tabs-list:data-selected:bg-transparent", "data-selected:bg-background data-selected:text-foreground dark:data-selected:border-input dark:data-selected:bg-input/30 dark:data-selected:text-foreground", "group-data-[variant=plain]/tabs-list:data-selected:bg-muted dark:group-data-[variant=plain]/tabs-list:data-selected:border-transparent dark:group-data-[variant=plain]/tabs-list:data-selected:bg-muted", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-selected:after:opacity-100", className), ...props }));
69
+ }
70
+ function TabsContent({ className, ...props }) {
71
+ return (_jsx(TabPanelPrimitive, { "data-slot": "tabs-content", className: cn("flex-1 text-sm outline-none", className), ...props }));
72
+ }
73
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -0,0 +1,21 @@
1
+ import { type ButtonProps, type LinkProps } from 'react-aria-components';
2
+ declare const tones: {
3
+ readonly primary: 'font-medium text-primary hover:underline';
4
+ readonly muted: 'text-muted-foreground hover:text-foreground hover:underline';
5
+ readonly brand: 'font-medium text-brand-link hover:underline dark:text-primary';
6
+ readonly warning: 'font-medium text-amber-700 hover:underline dark:text-amber-400';
7
+ readonly danger: 'font-medium text-destructive hover:underline';
8
+ };
9
+ /** Bağlantı görünümlü metin düğmesi ("Tüm kelimeler", geliştirici adına göre süz): satır içinde, kutusuz. */
10
+ export declare function TextButton({ tone, size, className, ...props }: Omit<ButtonProps, 'className'> & {
11
+ tone?: keyof typeof tones;
12
+ size?: 'xs' | 'sm';
13
+ className?: string;
14
+ }): import("react").JSX.Element;
15
+ /** Metin bağlantısı ("Tümünü gör", "Ayrıntılar"): TextButton'la aynı görünüm, sayfa ya da dış adres açar. */
16
+ export declare function TextLink({ tone, size, className, ...props }: Omit<LinkProps, 'className'> & {
17
+ tone?: keyof typeof tones;
18
+ size?: 'xs' | 'sm';
19
+ className?: string;
20
+ }): import("react").JSX.Element;
21
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button as ButtonPrimitive, Link as LinkPrimitive } from 'react-aria-components';
3
+ import { cn } from '../utils.js';
4
+ const tones = {
5
+ primary: 'font-medium text-primary hover:underline',
6
+ muted: 'text-muted-foreground hover:text-foreground hover:underline',
7
+ // Tanıtım sitesinin bağlantı rengi (beyaz zeminde okunaklı marka tonu).
8
+ brand: 'font-medium text-brand-link hover:underline dark:text-primary',
9
+ warning: 'font-medium text-amber-700 hover:underline dark:text-amber-400',
10
+ // Başarısız işlemi yeniden deneme gibi hata bağlamındaki metin düğmesi.
11
+ danger: 'font-medium text-destructive hover:underline',
12
+ };
13
+ const base = 'inline-flex max-w-full items-center gap-1 rounded-sm text-start underline-offset-4 outline-hidden focus-visible:ring-2 focus-visible:ring-ring/40 [&_svg]:size-3.5 [&_svg]:shrink-0';
14
+ /** Bağlantı görünümlü metin düğmesi ("Tüm kelimeler", geliştirici adına göre süz): satır içinde, kutusuz. */
15
+ export function TextButton({ tone = 'primary', size = 'sm', className, ...props }) {
16
+ return (_jsx(ButtonPrimitive, { className: cn(base, 'cursor-default', size === 'sm' ? 'text-sm' : 'text-xs', tones[tone], className), ...props }));
17
+ }
18
+ /** Metin bağlantısı ("Tümünü gör", "Ayrıntılar"): TextButton'la aynı görünüm, sayfa ya da dış adres açar. */
19
+ export function TextLink({ tone = 'primary', size = 'sm', className, ...props }) {
20
+ return _jsx(LinkPrimitive, { className: cn(base, 'cursor-pointer', size === 'sm' ? 'text-sm' : 'text-xs', tones[tone], className), ...props });
21
+ }
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { TextArea as TextareaPrimitive } from "react-aria-components";
3
+ declare function Textarea({ className, size, mono, ...props }: React.ComponentProps<typeof TextareaPrimitive> & {
4
+ /** `sm`: ızgara ve tablo içindeki sıkı alan. */
5
+ size?: "default" | "sm";
6
+ /** Kod, JSON gibi eş aralıklı yazılması gereken değerler. */
7
+ mono?: boolean;
8
+ }): React.JSX.Element;
9
+ export { Textarea };
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils.js";
3
+ import { composeRenderProps, TextArea as TextareaPrimitive, } from "react-aria-components";
4
+ function Textarea({ className, size = "default", mono = false, ...props }) {
5
+ return (_jsx(TextareaPrimitive, { "data-slot": "textarea", "data-size": size, "data-mono": mono || undefined, className: composeRenderProps(className, (className) => cn("flex field-sizing-content min-h-16 data-[size=sm]:min-h-9 data-[size=sm]:rounded-xl data-[size=sm]:px-2.5 data-[size=sm]:py-2 data-[size=sm]:text-xs data-mono:font-mono w-full resize-none rounded-2xl border border-transparent bg-input/50 px-3 py-3 text-base transition-[color,box-shadow,background-color] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className)), ...props }));
6
+ }
7
+ export { Textarea };
@@ -0,0 +1,27 @@
1
+ declare const tones: {
2
+ readonly default: 'bg-card ring-foreground/5 shadow-sm dark:ring-foreground/10';
3
+ readonly primary: 'bg-primary/5 ring-primary/15';
4
+ readonly muted: 'bg-muted/40 ring-foreground/5';
5
+ readonly success: 'bg-emerald-500/5 ring-emerald-500/20';
6
+ readonly warning: 'bg-amber-500/5 ring-amber-500/25';
7
+ readonly danger: 'bg-red-500/5 ring-red-500/20';
8
+ readonly info: 'bg-sky-500/5 ring-sky-500/15';
9
+ };
10
+ declare const sizes: {
11
+ readonly sm: 'rounded-2xl p-3';
12
+ readonly default: 'rounded-2xl p-4';
13
+ readonly lg: 'rounded-3xl p-5 sm:p-6';
14
+ readonly flush: 'overflow-hidden rounded-2xl';
15
+ };
16
+ /**
17
+ * Kart içindeki ya da yan yana dizilen kutu (gösterge, öneri, seçenek, uyarı). Başlıklı büyük bölümler SectionCard'dır.
18
+ * Ton anlamı taşır (primary öneri, warning dikkat…); iç yerleşim (flex, grid, gap) className'den.
19
+ */
20
+ export declare function Tile({ tone, size, interactive, className, ...props }: React.ComponentProps<'div'> & {
21
+ tone?: keyof typeof tones;
22
+ size?: keyof typeof sizes;
23
+ interactive?: boolean;
24
+ }): import("react").JSX.Element;
25
+ /** Grafik ve harita ipucu kutusu: her grafikte aynı zemin, çerçeve, gölge ve yazı boyutu. */
26
+ export declare function TooltipBox({ className, ...props }: React.ComponentProps<'div'>): import("react").JSX.Element;
27
+ export {};
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from '../utils.js';
3
+ const tones = {
4
+ default: 'bg-card ring-foreground/5 shadow-sm dark:ring-foreground/10',
5
+ primary: 'bg-primary/5 ring-primary/15',
6
+ muted: 'bg-muted/40 ring-foreground/5',
7
+ success: 'bg-emerald-500/5 ring-emerald-500/20',
8
+ warning: 'bg-amber-500/5 ring-amber-500/25',
9
+ danger: 'bg-red-500/5 ring-red-500/20',
10
+ info: 'bg-sky-500/5 ring-sky-500/15',
11
+ };
12
+ const sizes = {
13
+ sm: 'rounded-2xl p-3',
14
+ default: 'rounded-2xl p-4',
15
+ lg: 'rounded-3xl p-5 sm:p-6',
16
+ // Satırlı liste ya da tablo taşıyan kutu: iç boşluk yok, içerik köşeden taşmaz.
17
+ flush: 'overflow-hidden rounded-2xl',
18
+ };
19
+ /**
20
+ * Kart içindeki ya da yan yana dizilen kutu (gösterge, öneri, seçenek, uyarı). Başlıklı büyük bölümler SectionCard'dır.
21
+ * Ton anlamı taşır (primary öneri, warning dikkat…); iç yerleşim (flex, grid, gap) className'den.
22
+ */
23
+ export function Tile({ tone = 'default', size = 'default', interactive = false, className, ...props }) {
24
+ // interactive: kutunun tamamı bir bağlantının içindeyse üzerine gelince halka koyulaşır.
25
+ return _jsx("div", { className: cn('ring-1', sizes[size], tones[tone], interactive && 'transition-[box-shadow] hover:shadow-md hover:ring-foreground/20', className), ...props });
26
+ }
27
+ /** Grafik ve harita ipucu kutusu: her grafikte aynı zemin, çerçeve, gölge ve yazı boyutu. */
28
+ export function TooltipBox({ className, ...props }) {
29
+ return _jsx("div", { className: cn('grid min-w-32 gap-1.5 rounded-xl border bg-background px-3 py-2 text-xs shadow-lg', className), ...props });
30
+ }
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { Tooltip as TooltipPrimitive, TooltipTrigger as TooltipTriggerPrimitive } from "react-aria-components";
3
+ declare function TooltipTrigger({ delay, children, ...props }: React.ComponentProps<typeof TooltipTriggerPrimitive>): React.JSX.Element;
4
+ declare function Tooltip({ className, placement, offset, crossOffset, children, ...props }: Omit<React.ComponentProps<typeof TooltipPrimitive>, "children" | "className"> & {
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ }): React.JSX.Element;
8
+ export { Tooltip, TooltipTrigger };