@ayasofyazilim/ui 0.0.1 → 0.0.3
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/package.json +54 -25
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +5 -5
- package/src/components/alert.tsx +4 -4
- package/src/components/avatar.tsx +3 -3
- package/src/components/badge.tsx +2 -2
- package/src/components/breadcrumb.tsx +2 -2
- package/src/components/button-group.tsx +5 -5
- package/src/components/button.tsx +4 -3
- package/src/components/calendar.tsx +21 -24
- package/src/components/card.tsx +4 -4
- package/src/components/carousel.tsx +8 -8
- package/src/components/chart.tsx +11 -11
- package/src/components/checkbox.tsx +2 -2
- package/src/components/command.tsx +8 -8
- package/src/components/context-menu.tsx +9 -9
- package/src/components/dialog.tsx +4 -4
- package/src/components/drawer.tsx +4 -4
- package/src/components/dropdown-menu.tsx +9 -9
- package/src/components/field.tsx +13 -13
- package/src/components/form.tsx +4 -4
- package/src/components/hover-card.tsx +2 -2
- package/src/components/input-group.tsx +10 -10
- package/src/components/input-otp.tsx +3 -3
- package/src/components/input.tsx +2 -2
- package/src/components/item.tsx +9 -9
- package/src/components/kbd.tsx +2 -2
- package/src/components/label.tsx +2 -2
- package/src/components/menubar.tsx +11 -11
- package/src/components/navigation-menu.tsx +9 -9
- package/src/components/pagination.tsx +3 -6
- package/src/components/progress.tsx +2 -2
- package/src/components/radio-group.tsx +2 -2
- package/src/components/resizable.tsx +3 -3
- package/src/components/scroll-area.tsx +2 -2
- package/src/components/select.tsx +7 -7
- package/src/components/separator.tsx +2 -2
- package/src/components/sheet.tsx +3 -3
- package/src/components/skeleton.tsx +1 -1
- package/src/components/slider.tsx +5 -5
- package/src/components/spinner.tsx +1 -1
- package/src/components/stepper.tsx +10 -11
- package/src/components/switch.tsx +3 -3
- package/src/components/table.tsx +5 -5
- package/src/components/tabs.tsx +3 -3
- package/src/components/textarea.tsx +2 -2
- package/src/components/toggle-group.tsx +4 -4
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +2 -2
- package/src/custom/action-button.tsx +3 -6
- package/src/custom/async-select.tsx +12 -12
- package/src/custom/awesome-not-found.tsx +4 -4
- package/src/custom/charts/area-chart.tsx +2 -2
- package/src/custom/charts/bar-chart.tsx +2 -2
- package/src/custom/charts/chart-card.tsx +4 -4
- package/src/custom/charts/pie-chart.tsx +4 -4
- package/src/custom/charts/radar-chart.tsx +2 -2
- package/src/custom/combobox.tsx +18 -18
- package/src/custom/confirm-dialog.tsx +3 -3
- package/src/custom/country-selector.tsx +7 -7
- package/src/custom/date-picker/calendar-rac.tsx +5 -5
- package/src/custom/date-picker/datefield-rac.tsx +6 -6
- package/src/custom/date-picker/index.tsx +9 -9
- package/src/custom/date-picker-old.tsx +5 -5
- package/src/custom/date-tooltip.tsx +1 -1
- package/src/custom/document-scanner/corner-adjustment/action-buttons.tsx +2 -2
- package/src/custom/document-scanner/corner-adjustment/corner-handle.tsx +3 -3
- package/src/custom/document-scanner/index.tsx +8 -8
- package/src/custom/document-viewer/controllers.tsx +3 -3
- package/src/custom/document-viewer/index.tsx +1 -1
- package/src/custom/document-viewer/renderers/pdf.tsx +3 -3
- package/src/custom/email-input/email.tsx +16 -14
- package/src/custom/file-uploader.tsx +6 -6
- package/src/custom/filter-component/fields/async-select.tsx +1 -1
- package/src/custom/filter-component/fields/date.tsx +3 -3
- package/src/custom/filter-component/fields/multi-select.tsx +1 -1
- package/src/custom/filter-component/index.tsx +9 -9
- package/src/custom/image-canvas.tsx +5 -5
- package/src/custom/master-data-grid/components/filters/client-filter.tsx +6 -5
- package/src/custom/master-data-grid/components/filters/multi-filter-dialog.tsx +5 -4
- package/src/custom/master-data-grid/components/filters/server-filter.tsx +12 -11
- package/src/custom/master-data-grid/components/table/cell-renderer.tsx +26 -26
- package/src/custom/master-data-grid/hooks/use-columns.tsx +3 -3
- package/src/custom/master-data-grid/types.ts +5 -4
- package/src/custom/multi-select.tsx +21 -19
- package/src/custom/password-input.tsx +11 -11
- package/src/custom/phone-input.tsx +3 -3
- package/src/custom/schema-form/custom/label.tsx +3 -3
- package/src/custom/schema-form/fields/base-input-field.tsx +4 -4
- package/src/custom/schema-form/fields/field.tsx +4 -4
- package/src/custom/schema-form/fields/table-array/array-field-item.tsx +5 -5
- package/src/custom/schema-form/fields/table-array/array-field-template.tsx +6 -6
- package/src/custom/schema-form/index.tsx +13 -13
- package/src/custom/schema-form/templates/description.tsx +1 -1
- package/src/custom/schema-form/templates/submit.tsx +2 -2
- package/src/custom/schema-form/utils/schemas.ts +9 -9
- package/src/custom/schema-form/widgets/boolean.tsx +5 -5
- package/src/custom/schema-form/widgets/combobox.tsx +13 -13
- package/src/custom/schema-form/widgets/date.tsx +1 -1
- package/src/custom/schema-form/widgets/email.tsx +2 -2
- package/src/custom/schema-form/widgets/password.tsx +1 -1
- package/src/custom/schema-form/widgets/phone.tsx +3 -3
- package/src/custom/schema-form/widgets/select.tsx +5 -5
- package/src/custom/schema-form/widgets/selectable.tsx +2 -2
- package/src/custom/schema-form/widgets/string-array.tsx +16 -16
- package/src/custom/schema-form/widgets/url.tsx +2 -2
- package/src/custom/section-layout-v2.tsx +8 -8
- package/src/custom/select-tabs.tsx +2 -2
- package/src/custom/stepper.tsx +4 -4
- package/src/custom/tab-layout.tsx +6 -6
- package/src/custom/tanstack-table/fields/tanstack-table-column-header.tsx +7 -5
- package/src/custom/tanstack-table/fields/tanstack-table-filter-date.tsx +7 -7
- package/src/custom/tanstack-table/fields/tanstack-table-filter-faceted.tsx +9 -9
- package/src/custom/tanstack-table/fields/tanstack-table-filter-text.tsx +5 -8
- package/src/custom/tanstack-table/fields/tanstack-table-pagination.tsx +4 -4
- package/src/custom/tanstack-table/fields/tanstack-table-plain-table.tsx +8 -8
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-confirmation.tsx +2 -2
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions-custom-dialog.tsx +2 -2
- package/src/custom/tanstack-table/fields/tanstack-table-row-actions.tsx +6 -6
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-custom-dialog.tsx +3 -3
- package/src/custom/tanstack-table/fields/tanstack-table-table-actions-schemaform-dialog.tsx +4 -4
- package/src/custom/tanstack-table/fields/tanstack-table-toolbar.tsx +2 -2
- package/src/custom/tanstack-table/fields/tanstack-table-view-options.tsx +5 -5
- package/src/custom/tanstack-table/types/index.ts +2 -2
- package/src/custom/tanstack-table/utils/columns-by-row-data.tsx +10 -10
- package/src/custom/tanstack-table/utils/editable-columns-by-row-data.tsx +8 -8
- package/src/custom/timeline.tsx +8 -8
- package/src/custom/tree.tsx +11 -9
- package/src/custom/webcam.tsx +14 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ayasofyazilim/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -122,29 +122,58 @@
|
|
|
122
122
|
"exports": {
|
|
123
123
|
"./globals.css": "./src/styles/globals.css",
|
|
124
124
|
"./postcss.config": "./postcss.config.mjs",
|
|
125
|
-
"./lib/*":
|
|
126
|
-
"./
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
"
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"./src/
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"
|
|
148
|
-
|
|
125
|
+
"./lib/*": {
|
|
126
|
+
"types": "./src/lib/*.ts",
|
|
127
|
+
"default": [
|
|
128
|
+
"./dist/lib/*.js",
|
|
129
|
+
"./src/lib/*.ts"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"./components/*": {
|
|
133
|
+
"types": "./src/components/*.tsx",
|
|
134
|
+
"default": [
|
|
135
|
+
"./dist/components/*.js",
|
|
136
|
+
"./src/components/*.tsx"
|
|
137
|
+
]
|
|
138
|
+
},
|
|
139
|
+
"./aria/*": {
|
|
140
|
+
"types": "./src/aria/*.tsx",
|
|
141
|
+
"default": [
|
|
142
|
+
"./dist/aria/*.js",
|
|
143
|
+
"./src/aria/*.tsx"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"./custom/*": {
|
|
147
|
+
"types": [
|
|
148
|
+
"./src/custom/*.tsx",
|
|
149
|
+
"./src/custom/*/index.tsx",
|
|
150
|
+
"./src/custom/*.ts",
|
|
151
|
+
"./src/custom/*/index.ts"
|
|
152
|
+
],
|
|
153
|
+
"default": [
|
|
154
|
+
"./dist/custom/*.js",
|
|
155
|
+
"./dist/custom/*/index.js",
|
|
156
|
+
"./src/custom/*.tsx",
|
|
157
|
+
"./src/custom/*/index.tsx",
|
|
158
|
+
"./src/custom/*.ts",
|
|
159
|
+
"./src/custom/*/index.ts"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"./hooks/*": {
|
|
163
|
+
"types": "./src/hooks/*.ts",
|
|
164
|
+
"default": [
|
|
165
|
+
"./dist/hooks/*.js",
|
|
166
|
+
"./src/hooks/*.ts"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"typesVersions": {
|
|
171
|
+
"*": {
|
|
172
|
+
"lib/*": ["./src/lib/*"],
|
|
173
|
+
"components/*": ["./src/components/*"],
|
|
174
|
+
"aria/*": ["./src/aria/*"],
|
|
175
|
+
"custom/*": ["./src/custom/*", "./src/custom/*/index"],
|
|
176
|
+
"hooks/*": ["./src/hooks/*"]
|
|
177
|
+
}
|
|
149
178
|
}
|
|
150
179
|
}
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
5
5
|
import { ChevronDownIcon } from "lucide-react";
|
|
6
6
|
|
|
7
|
-
import { cn } from "@
|
|
7
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
8
8
|
|
|
9
9
|
function Accordion({
|
|
10
10
|
...props
|
|
@@ -36,7 +36,7 @@ function AccordionTrigger({
|
|
|
36
36
|
data-slot="accordion-trigger"
|
|
37
37
|
className={cn(
|
|
38
38
|
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
39
|
-
className
|
|
39
|
+
className,
|
|
40
40
|
)}
|
|
41
41
|
{...props}
|
|
42
42
|
>
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@
|
|
7
|
-
import { buttonVariants } from "@
|
|
6
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
7
|
+
import { buttonVariants } from "@ayasofyazilim/ui/components/button";
|
|
8
8
|
|
|
9
9
|
function AlertDialog({
|
|
10
10
|
...props
|
|
@@ -37,7 +37,7 @@ function AlertDialogOverlay({
|
|
|
37
37
|
data-slot="alert-dialog-overlay"
|
|
38
38
|
className={cn(
|
|
39
39
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
40
|
-
className
|
|
40
|
+
className,
|
|
41
41
|
)}
|
|
42
42
|
{...props}
|
|
43
43
|
/>
|
|
@@ -55,7 +55,7 @@ function AlertDialogContent({
|
|
|
55
55
|
data-slot="alert-dialog-content"
|
|
56
56
|
className={cn(
|
|
57
57
|
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
58
|
-
className
|
|
58
|
+
className,
|
|
59
59
|
)}
|
|
60
60
|
{...props}
|
|
61
61
|
/>
|
|
@@ -85,7 +85,7 @@ function AlertDialogFooter({
|
|
|
85
85
|
data-slot="alert-dialog-footer"
|
|
86
86
|
className={cn(
|
|
87
87
|
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
88
|
-
className
|
|
88
|
+
className,
|
|
89
89
|
)}
|
|
90
90
|
{...props}
|
|
91
91
|
/>
|
package/src/components/alert.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@
|
|
4
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
5
5
|
|
|
6
6
|
const alertVariants = cva(
|
|
7
7
|
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
@@ -20,7 +20,7 @@ const alertVariants = cva(
|
|
|
20
20
|
defaultVariants: {
|
|
21
21
|
variant: "default",
|
|
22
22
|
},
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
24
|
);
|
|
25
25
|
|
|
26
26
|
function Alert({
|
|
@@ -44,7 +44,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
44
44
|
data-slot="alert-title"
|
|
45
45
|
className={cn(
|
|
46
46
|
"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",
|
|
47
|
-
className
|
|
47
|
+
className,
|
|
48
48
|
)}
|
|
49
49
|
{...props}
|
|
50
50
|
/>
|
|
@@ -60,7 +60,7 @@ function AlertDescription({
|
|
|
60
60
|
data-slot="alert-description"
|
|
61
61
|
className={cn(
|
|
62
62
|
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
|
|
63
|
-
className
|
|
63
|
+
className,
|
|
64
64
|
)}
|
|
65
65
|
{...props}
|
|
66
66
|
/>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@
|
|
6
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
7
7
|
|
|
8
8
|
function Avatar({
|
|
9
9
|
className,
|
|
@@ -14,7 +14,7 @@ function Avatar({
|
|
|
14
14
|
data-slot="avatar"
|
|
15
15
|
className={cn(
|
|
16
16
|
"relative flex size-8 shrink-0 overflow-hidden rounded-full",
|
|
17
|
-
className
|
|
17
|
+
className,
|
|
18
18
|
)}
|
|
19
19
|
{...props}
|
|
20
20
|
/>
|
|
@@ -43,7 +43,7 @@ function AvatarFallback({
|
|
|
43
43
|
data-slot="avatar-fallback"
|
|
44
44
|
className={cn(
|
|
45
45
|
"bg-muted flex size-full items-center justify-center rounded-full",
|
|
46
|
-
className
|
|
46
|
+
className,
|
|
47
47
|
)}
|
|
48
48
|
{...props}
|
|
49
49
|
/>
|
package/src/components/badge.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@
|
|
5
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
8
|
"inline-flex items-center justify-center rounded-full border font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
@@ -49,7 +49,7 @@ const badgeVariants = cva(
|
|
|
49
49
|
variant: "default",
|
|
50
50
|
size: "md",
|
|
51
51
|
},
|
|
52
|
-
}
|
|
52
|
+
},
|
|
53
53
|
);
|
|
54
54
|
|
|
55
55
|
function Badge({
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@
|
|
5
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
6
6
|
|
|
7
7
|
function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
|
|
8
8
|
return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
|
|
@@ -14,7 +14,7 @@ function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
|
|
|
14
14
|
data-slot="breadcrumb-list"
|
|
15
15
|
className={cn(
|
|
16
16
|
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm wrap-break-word sm:gap-2.5",
|
|
17
|
-
className
|
|
17
|
+
className,
|
|
18
18
|
)}
|
|
19
19
|
{...props}
|
|
20
20
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Slot } from "@radix-ui/react-slot";
|
|
2
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
3
|
|
|
4
|
-
import { cn } from "@
|
|
5
|
-
import { Separator } from "@
|
|
4
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
5
|
+
import { Separator } from "@ayasofyazilim/ui/components/separator";
|
|
6
6
|
|
|
7
7
|
const buttonGroupVariants = cva(
|
|
8
8
|
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
@@ -18,7 +18,7 @@ const buttonGroupVariants = cva(
|
|
|
18
18
|
defaultVariants: {
|
|
19
19
|
orientation: "horizontal",
|
|
20
20
|
},
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
function ButtonGroup({
|
|
@@ -50,7 +50,7 @@ function ButtonGroupText({
|
|
|
50
50
|
<Comp
|
|
51
51
|
className={cn(
|
|
52
52
|
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
53
|
-
className
|
|
53
|
+
className,
|
|
54
54
|
)}
|
|
55
55
|
{...props}
|
|
56
56
|
/>
|
|
@@ -68,7 +68,7 @@ function ButtonGroupSeparator({
|
|
|
68
68
|
orientation={orientation}
|
|
69
69
|
className={cn(
|
|
70
70
|
"bg-input relative m-0! self-stretch data-[orientation=vertical]:h-auto",
|
|
71
|
-
className
|
|
71
|
+
className,
|
|
72
72
|
)}
|
|
73
73
|
{...props}
|
|
74
74
|
/>
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
4
|
|
|
5
|
-
import { cn } from "@
|
|
5
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
8
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
@@ -34,7 +34,7 @@ const buttonVariants = cva(
|
|
|
34
34
|
variant: "default",
|
|
35
35
|
size: "default",
|
|
36
36
|
},
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
function Button({
|
|
@@ -61,7 +61,8 @@ function Button({
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export interface ButtonProps
|
|
64
|
-
extends
|
|
64
|
+
extends
|
|
65
|
+
React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
65
66
|
VariantProps<typeof buttonVariants> {
|
|
66
67
|
asChild?: boolean;
|
|
67
68
|
}
|
|
@@ -8,11 +8,8 @@ import {
|
|
|
8
8
|
} from "lucide-react";
|
|
9
9
|
import { DayButton, DayPicker, getDefaultClassNames } from "react-day-picker";
|
|
10
10
|
|
|
11
|
-
import { cn } from "@
|
|
12
|
-
import {
|
|
13
|
-
Button,
|
|
14
|
-
buttonVariants,
|
|
15
|
-
} from "@repo/ayasofyazilim-ui/components/button";
|
|
11
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
12
|
+
import { Button, buttonVariants } from "@ayasofyazilim/ui/components/button";
|
|
16
13
|
|
|
17
14
|
function Calendar({
|
|
18
15
|
className,
|
|
@@ -35,7 +32,7 @@ function Calendar({
|
|
|
35
32
|
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
|
|
36
33
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
37
34
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
38
|
-
className
|
|
35
|
+
className,
|
|
39
36
|
)}
|
|
40
37
|
captionLayout={captionLayout}
|
|
41
38
|
formatters={{
|
|
@@ -47,85 +44,85 @@ function Calendar({
|
|
|
47
44
|
root: cn("w-fit", defaultClassNames.root),
|
|
48
45
|
months: cn(
|
|
49
46
|
"flex gap-4 flex-col md:flex-row relative",
|
|
50
|
-
defaultClassNames.months
|
|
47
|
+
defaultClassNames.months,
|
|
51
48
|
),
|
|
52
49
|
month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
53
50
|
nav: cn(
|
|
54
51
|
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
55
|
-
defaultClassNames.nav
|
|
52
|
+
defaultClassNames.nav,
|
|
56
53
|
),
|
|
57
54
|
button_previous: cn(
|
|
58
55
|
buttonVariants({ variant: buttonVariant }),
|
|
59
56
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
60
|
-
defaultClassNames.button_previous
|
|
57
|
+
defaultClassNames.button_previous,
|
|
61
58
|
),
|
|
62
59
|
button_next: cn(
|
|
63
60
|
buttonVariants({ variant: buttonVariant }),
|
|
64
61
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
65
|
-
defaultClassNames.button_next
|
|
62
|
+
defaultClassNames.button_next,
|
|
66
63
|
),
|
|
67
64
|
month_caption: cn(
|
|
68
65
|
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
69
|
-
defaultClassNames.month_caption
|
|
66
|
+
defaultClassNames.month_caption,
|
|
70
67
|
),
|
|
71
68
|
dropdowns: cn(
|
|
72
69
|
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
73
|
-
defaultClassNames.dropdowns
|
|
70
|
+
defaultClassNames.dropdowns,
|
|
74
71
|
),
|
|
75
72
|
dropdown_root: cn(
|
|
76
73
|
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
77
|
-
defaultClassNames.dropdown_root
|
|
74
|
+
defaultClassNames.dropdown_root,
|
|
78
75
|
),
|
|
79
76
|
dropdown: cn(
|
|
80
77
|
"absolute bg-popover inset-0 opacity-0",
|
|
81
|
-
defaultClassNames.dropdown
|
|
78
|
+
defaultClassNames.dropdown,
|
|
82
79
|
),
|
|
83
80
|
caption_label: cn(
|
|
84
81
|
"select-none font-medium",
|
|
85
82
|
captionLayout === "label"
|
|
86
83
|
? "text-sm"
|
|
87
84
|
: "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
88
|
-
defaultClassNames.caption_label
|
|
85
|
+
defaultClassNames.caption_label,
|
|
89
86
|
),
|
|
90
87
|
table: "w-full border-collapse",
|
|
91
88
|
weekdays: cn("flex", defaultClassNames.weekdays),
|
|
92
89
|
weekday: cn(
|
|
93
90
|
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
94
|
-
defaultClassNames.weekday
|
|
91
|
+
defaultClassNames.weekday,
|
|
95
92
|
),
|
|
96
93
|
week: cn("flex w-full mt-2", defaultClassNames.week),
|
|
97
94
|
week_number_header: cn(
|
|
98
95
|
"select-none w-(--cell-size)",
|
|
99
|
-
defaultClassNames.week_number_header
|
|
96
|
+
defaultClassNames.week_number_header,
|
|
100
97
|
),
|
|
101
98
|
week_number: cn(
|
|
102
99
|
"text-[0.8rem] select-none text-muted-foreground",
|
|
103
|
-
defaultClassNames.week_number
|
|
100
|
+
defaultClassNames.week_number,
|
|
104
101
|
),
|
|
105
102
|
day: cn(
|
|
106
103
|
"relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
107
104
|
props.showWeekNumber
|
|
108
105
|
? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
|
|
109
106
|
: "[&:first-child[data-selected=true]_button]:rounded-l-md",
|
|
110
|
-
defaultClassNames.day
|
|
107
|
+
defaultClassNames.day,
|
|
111
108
|
),
|
|
112
109
|
range_start: cn(
|
|
113
110
|
"rounded-l-md bg-accent",
|
|
114
|
-
defaultClassNames.range_start
|
|
111
|
+
defaultClassNames.range_start,
|
|
115
112
|
),
|
|
116
113
|
range_middle: cn("rounded-none", defaultClassNames.range_middle),
|
|
117
114
|
range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
118
115
|
today: cn(
|
|
119
116
|
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
120
|
-
defaultClassNames.today
|
|
117
|
+
defaultClassNames.today,
|
|
121
118
|
),
|
|
122
119
|
outside: cn(
|
|
123
120
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
124
|
-
defaultClassNames.outside
|
|
121
|
+
defaultClassNames.outside,
|
|
125
122
|
),
|
|
126
123
|
disabled: cn(
|
|
127
124
|
"text-muted-foreground opacity-50",
|
|
128
|
-
defaultClassNames.disabled
|
|
125
|
+
defaultClassNames.disabled,
|
|
129
126
|
),
|
|
130
127
|
hidden: cn("invisible", defaultClassNames.hidden),
|
|
131
128
|
...classNames,
|
|
@@ -209,7 +206,7 @@ function CalendarDayButton({
|
|
|
209
206
|
className={cn(
|
|
210
207
|
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
211
208
|
defaultClassNames.day,
|
|
212
|
-
className
|
|
209
|
+
className,
|
|
213
210
|
)}
|
|
214
211
|
{...props}
|
|
215
212
|
/>
|
package/src/components/card.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
|
-
import { cn } from "@
|
|
3
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
4
4
|
|
|
5
5
|
function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
6
6
|
return (
|
|
@@ -8,7 +8,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
8
8
|
data-slot="card"
|
|
9
9
|
className={cn(
|
|
10
10
|
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
11
|
-
className
|
|
11
|
+
className,
|
|
12
12
|
)}
|
|
13
13
|
{...props}
|
|
14
14
|
/>
|
|
@@ -21,7 +21,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
21
21
|
data-slot="card-header"
|
|
22
22
|
className={cn(
|
|
23
23
|
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
24
|
-
className
|
|
24
|
+
className,
|
|
25
25
|
)}
|
|
26
26
|
{...props}
|
|
27
27
|
/>
|
|
@@ -54,7 +54,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
54
54
|
data-slot="card-action"
|
|
55
55
|
className={cn(
|
|
56
56
|
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
57
|
-
className
|
|
57
|
+
className,
|
|
58
58
|
)}
|
|
59
59
|
{...props}
|
|
60
60
|
/>
|
|
@@ -6,8 +6,8 @@ import useEmblaCarousel, {
|
|
|
6
6
|
} from "embla-carousel-react";
|
|
7
7
|
import { ArrowLeft, ArrowRight } from "lucide-react";
|
|
8
8
|
|
|
9
|
-
import { cn } from "@
|
|
10
|
-
import { Button } from "@
|
|
9
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
10
|
+
import { Button } from "@ayasofyazilim/ui/components/button";
|
|
11
11
|
|
|
12
12
|
type CarouselApi = UseEmblaCarouselType[1];
|
|
13
13
|
type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
|
|
@@ -56,7 +56,7 @@ function Carousel({
|
|
|
56
56
|
...opts,
|
|
57
57
|
axis: orientation === "horizontal" ? "x" : "y",
|
|
58
58
|
},
|
|
59
|
-
plugins
|
|
59
|
+
plugins,
|
|
60
60
|
);
|
|
61
61
|
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
62
62
|
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
@@ -85,7 +85,7 @@ function Carousel({
|
|
|
85
85
|
scrollNext();
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
[scrollPrev, scrollNext]
|
|
88
|
+
[scrollPrev, scrollNext],
|
|
89
89
|
);
|
|
90
90
|
|
|
91
91
|
React.useEffect(() => {
|
|
@@ -145,7 +145,7 @@ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
145
145
|
className={cn(
|
|
146
146
|
"flex",
|
|
147
147
|
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
148
|
-
className
|
|
148
|
+
className,
|
|
149
149
|
)}
|
|
150
150
|
{...props}
|
|
151
151
|
/>
|
|
@@ -164,7 +164,7 @@ function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
164
164
|
className={cn(
|
|
165
165
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
166
166
|
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
167
|
-
className
|
|
167
|
+
className,
|
|
168
168
|
)}
|
|
169
169
|
{...props}
|
|
170
170
|
/>
|
|
@@ -189,7 +189,7 @@ function CarouselPrevious({
|
|
|
189
189
|
orientation === "horizontal"
|
|
190
190
|
? "top-1/2 -left-12 -translate-y-1/2"
|
|
191
191
|
: "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
192
|
-
className
|
|
192
|
+
className,
|
|
193
193
|
)}
|
|
194
194
|
disabled={!canScrollPrev}
|
|
195
195
|
onClick={scrollPrev}
|
|
@@ -219,7 +219,7 @@ function CarouselNext({
|
|
|
219
219
|
orientation === "horizontal"
|
|
220
220
|
? "top-1/2 -right-12 -translate-y-1/2"
|
|
221
221
|
: "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
222
|
-
className
|
|
222
|
+
className,
|
|
223
223
|
)}
|
|
224
224
|
disabled={!canScrollNext}
|
|
225
225
|
onClick={scrollNext}
|
package/src/components/chart.tsx
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as RechartsPrimitive from "recharts";
|
|
5
5
|
|
|
6
|
-
import { cn } from "@
|
|
6
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
7
7
|
|
|
8
8
|
// Format: { THEME_NAME: CSS_SELECTOR }
|
|
9
9
|
const THEMES = { light: "", dark: ".dark" } as const;
|
|
@@ -56,7 +56,7 @@ function ChartContainer({
|
|
|
56
56
|
data-chart={chartId}
|
|
57
57
|
className={cn(
|
|
58
58
|
"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
59
|
-
className
|
|
59
|
+
className,
|
|
60
60
|
)}
|
|
61
61
|
{...props}
|
|
62
62
|
>
|
|
@@ -71,7 +71,7 @@ function ChartContainer({
|
|
|
71
71
|
|
|
72
72
|
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
|
73
73
|
const colorConfig = Object.entries(config).filter(
|
|
74
|
-
([, config]) => config.theme || config.color
|
|
74
|
+
([, config]) => config.theme || config.color,
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
if (!colorConfig.length) {
|
|
@@ -94,7 +94,7 @@ ${colorConfig
|
|
|
94
94
|
})
|
|
95
95
|
.join("\n")}
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
`,
|
|
98
98
|
)
|
|
99
99
|
.join("\n"),
|
|
100
100
|
}}
|
|
@@ -178,7 +178,7 @@ function ChartTooltipContent({
|
|
|
178
178
|
<div
|
|
179
179
|
className={cn(
|
|
180
180
|
"border-border/50 bg-background grid min-w-32 items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
|
|
181
|
-
className
|
|
181
|
+
className,
|
|
182
182
|
)}
|
|
183
183
|
>
|
|
184
184
|
{!nestLabel ? tooltipLabel : null}
|
|
@@ -195,7 +195,7 @@ function ChartTooltipContent({
|
|
|
195
195
|
key={item.dataKey}
|
|
196
196
|
className={cn(
|
|
197
197
|
"[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
|
|
198
|
-
indicator === "dot" && "items-center"
|
|
198
|
+
indicator === "dot" && "items-center",
|
|
199
199
|
)}
|
|
200
200
|
>
|
|
201
201
|
{formatter && item?.value !== undefined && item.name ? (
|
|
@@ -215,7 +215,7 @@ function ChartTooltipContent({
|
|
|
215
215
|
"w-0 border-[1.5px] border-dashed bg-transparent":
|
|
216
216
|
indicator === "dashed",
|
|
217
217
|
"my-0.5": nestLabel && indicator === "dashed",
|
|
218
|
-
}
|
|
218
|
+
},
|
|
219
219
|
)}
|
|
220
220
|
style={
|
|
221
221
|
{
|
|
@@ -229,7 +229,7 @@ function ChartTooltipContent({
|
|
|
229
229
|
<div
|
|
230
230
|
className={cn(
|
|
231
231
|
"flex flex-1 justify-between leading-none",
|
|
232
|
-
nestLabel ? "items-end" : "items-center"
|
|
232
|
+
nestLabel ? "items-end" : "items-center",
|
|
233
233
|
)}
|
|
234
234
|
>
|
|
235
235
|
<div className="grid gap-1.5">
|
|
@@ -280,7 +280,7 @@ function ChartLegendContent({
|
|
|
280
280
|
className={cn(
|
|
281
281
|
"flex items-center justify-center gap-4",
|
|
282
282
|
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
283
|
-
className
|
|
283
|
+
className,
|
|
284
284
|
)}
|
|
285
285
|
>
|
|
286
286
|
{payload
|
|
@@ -293,7 +293,7 @@ function ChartLegendContent({
|
|
|
293
293
|
<div
|
|
294
294
|
key={item.value}
|
|
295
295
|
className={cn(
|
|
296
|
-
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
296
|
+
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3",
|
|
297
297
|
)}
|
|
298
298
|
>
|
|
299
299
|
{itemConfig?.icon && !hideIcon ? (
|
|
@@ -318,7 +318,7 @@ function ChartLegendContent({
|
|
|
318
318
|
function getPayloadConfigFromPayload(
|
|
319
319
|
config: ChartConfig,
|
|
320
320
|
payload: unknown,
|
|
321
|
-
key: string
|
|
321
|
+
key: string,
|
|
322
322
|
) {
|
|
323
323
|
if (typeof payload !== "object" || payload === null) {
|
|
324
324
|
return undefined;
|
|
@@ -4,7 +4,7 @@ import * as React from "react";
|
|
|
4
4
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
5
5
|
import { CheckIcon } from "lucide-react";
|
|
6
6
|
|
|
7
|
-
import { cn } from "@
|
|
7
|
+
import { cn } from "@ayasofyazilim/ui/lib/utils";
|
|
8
8
|
|
|
9
9
|
function Checkbox({
|
|
10
10
|
className,
|
|
@@ -15,7 +15,7 @@ function Checkbox({
|
|
|
15
15
|
data-slot="checkbox"
|
|
16
16
|
className={cn(
|
|
17
17
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
-
className
|
|
18
|
+
className,
|
|
19
19
|
)}
|
|
20
20
|
{...props}
|
|
21
21
|
>
|