azamat-ui-kit-cli 0.3.3 → 0.3.12
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/README.md +18 -6
- package/dist/index.cjs +84 -84
- package/package.json +1 -1
- package/vendor/src/components/data-table/data-table-pagination.tsx +2 -2
- package/vendor/src/components/data-table/data-table-toolbar.tsx +6 -6
- package/vendor/src/components/data-table/data-table.tsx +29 -25
- package/vendor/src/components/display/entity-card.tsx +4 -4
- package/vendor/src/components/display/metric-card.tsx +4 -4
- package/vendor/src/components/form/form-date-input.tsx +22 -16
- package/vendor/src/components/form/form-number-input.tsx +19 -13
- package/vendor/src/components/form/form-phone-input.tsx +13 -12
- package/vendor/src/components/form/form-search-input.tsx +22 -16
- package/vendor/src/components/inputs/clearable-input.tsx +9 -9
- package/vendor/src/components/inputs/input-decorator.tsx +20 -20
- package/vendor/src/components/navigation/pagination.tsx +4 -4
- package/vendor/src/components/overlay/sheet-shell.tsx +6 -6
- package/vendor/src/components/patterns/entity-details.tsx +4 -4
- package/vendor/src/components/ui/badge.tsx +21 -22
- package/vendor/src/components/ui/button.tsx +32 -32
- package/vendor/src/components/ui/card.tsx +11 -11
- package/vendor/src/components/ui/checkbox.tsx +1 -1
- package/vendor/src/components/ui/dialog.tsx +7 -7
- package/vendor/src/components/ui/dropdown-menu.tsx +6 -6
- package/vendor/src/components/ui/hover-card.tsx +5 -5
- package/vendor/src/components/ui/input-primitive.tsx +1 -1
- package/vendor/src/components/ui/popover.tsx +1 -1
- package/vendor/src/components/ui/select.tsx +3 -3
- package/vendor/src/components/ui/switch.tsx +2 -2
- package/vendor/src/components/ui/table.tsx +12 -5
- package/vendor/src/components/ui/tabs.tsx +2 -2
- package/vendor/src/components/ui/tooltip.tsx +5 -5
- package/vendor/src/families/member-metadata.ts +6 -6
- package/vendor/src/families/member-snippets.ts +2 -2
- package/vendor/src/index.ts +20 -18
package/package.json
CHANGED
|
@@ -49,7 +49,7 @@ function DataTablePagination({
|
|
|
49
49
|
<div
|
|
50
50
|
data-slot="data-table-pagination"
|
|
51
51
|
className={cn(
|
|
52
|
-
"flex flex-col gap-3 border-t border-border/
|
|
52
|
+
"flex flex-col gap-3 border-t border-border/70 bg-muted/[0.18] px-4 py-3 sm:flex-row sm:items-center sm:justify-between",
|
|
53
53
|
className
|
|
54
54
|
)}
|
|
55
55
|
{...props}
|
|
@@ -71,7 +71,7 @@ function DataTablePagination({
|
|
|
71
71
|
value: String(option),
|
|
72
72
|
}))}
|
|
73
73
|
disabled={disabled}
|
|
74
|
-
triggerClassName="h-9 w-20 rounded-full border-border/
|
|
74
|
+
triggerClassName="h-9 w-20 rounded-full border-border/70 bg-background/80 shadow-none"
|
|
75
75
|
/>
|
|
76
76
|
</div>
|
|
77
77
|
)}
|
|
@@ -4,12 +4,12 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
6
|
const dataTableToolbarVariants = cva("flex flex-col", {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "rounded-[var(--radius-2xl)] border border-border/70 bg-card/
|
|
10
|
-
plain: "border-transparent bg-transparent shadow-none",
|
|
11
|
-
soft: "rounded-[var(--radius-2xl)] border border-transparent bg-muted/
|
|
12
|
-
},
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "rounded-[var(--radius-2xl)] border border-border/70 bg-card/72 shadow-sm ring-1 ring-foreground/5",
|
|
10
|
+
plain: "border-transparent bg-transparent shadow-none",
|
|
11
|
+
soft: "rounded-[var(--radius-2xl)] border border-transparent bg-muted/32 shadow-none",
|
|
12
|
+
},
|
|
13
13
|
density: {
|
|
14
14
|
compact: "gap-3 p-3",
|
|
15
15
|
default: "gap-4 p-4 md:p-5",
|
|
@@ -236,15 +236,16 @@ function DataTable<TData, TValue = unknown>({
|
|
|
236
236
|
]
|
|
237
237
|
}, [columns, features?.rowActions, rowActions])
|
|
238
238
|
|
|
239
|
-
const paginationConfig = pagination === false ? undefined : pagination
|
|
240
|
-
const controlledPagination = paginationConfig
|
|
241
|
-
? {
|
|
242
|
-
pageIndex: paginationConfig.pageIndex,
|
|
243
|
-
pageSize: paginationConfig.pageSize,
|
|
244
|
-
}
|
|
245
|
-
: undefined
|
|
246
|
-
const manualPagination = Boolean(paginationConfig && paginationConfig.manual !== false)
|
|
247
|
-
const
|
|
239
|
+
const paginationConfig = pagination === false ? undefined : pagination
|
|
240
|
+
const controlledPagination = paginationConfig
|
|
241
|
+
? {
|
|
242
|
+
pageIndex: paginationConfig.pageIndex,
|
|
243
|
+
pageSize: paginationConfig.pageSize,
|
|
244
|
+
}
|
|
245
|
+
: undefined
|
|
246
|
+
const manualPagination = Boolean(paginationConfig && paginationConfig.manual !== false)
|
|
247
|
+
const resolvedRowSelection = rowSelection ?? {}
|
|
248
|
+
const selectedRowCount = Object.keys(resolvedRowSelection).length
|
|
248
249
|
|
|
249
250
|
// TanStack Table returns imperative helpers that React Compiler flags by design.
|
|
250
251
|
// eslint-disable-next-line react-hooks/incompatible-library
|
|
@@ -256,12 +257,12 @@ function DataTable<TData, TValue = unknown>({
|
|
|
256
257
|
getPaginationRowModel: paginationConfig && !manualPagination ? getPaginationRowModel() : undefined,
|
|
257
258
|
manualPagination,
|
|
258
259
|
pageCount: paginationConfig?.pageCount,
|
|
259
|
-
state: {
|
|
260
|
-
sorting,
|
|
261
|
-
columnVisibility,
|
|
262
|
-
rowSelection,
|
|
263
|
-
pagination: controlledPagination,
|
|
264
|
-
},
|
|
260
|
+
state: {
|
|
261
|
+
sorting,
|
|
262
|
+
columnVisibility,
|
|
263
|
+
rowSelection: resolvedRowSelection,
|
|
264
|
+
pagination: controlledPagination,
|
|
265
|
+
},
|
|
265
266
|
onSortingChange,
|
|
266
267
|
onColumnVisibilityChange,
|
|
267
268
|
onRowSelectionChange,
|
|
@@ -407,15 +408,18 @@ function DataTable<TData, TValue = unknown>({
|
|
|
407
408
|
data-striped={striped || undefined}
|
|
408
409
|
data-bordered={bordered || undefined}
|
|
409
410
|
className={cn(
|
|
410
|
-
"overflow-
|
|
411
|
+
"overflow-hidden rounded-[var(--radius-2xl)] border border-border/70 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),white_8%),var(--card))] shadow-sm ring-1 ring-foreground/5 backdrop-blur",
|
|
411
412
|
!bordered && "border-border",
|
|
412
413
|
renderMobileCard && "hidden md:block",
|
|
413
414
|
tableWrapperClassName
|
|
414
415
|
)}
|
|
415
416
|
>
|
|
416
|
-
<Table
|
|
417
|
+
<Table
|
|
418
|
+
containerClassName="rounded-none border-0 bg-transparent shadow-none ring-0"
|
|
419
|
+
className={cn("text-[0.95rem]", tableClassName)}
|
|
420
|
+
>
|
|
417
421
|
<TableHeader
|
|
418
|
-
className={cn(stickyHeader && "sticky top-0 z-10 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--background),
|
|
422
|
+
className={cn(stickyHeader && "sticky top-0 z-10 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--background),white_5%),var(--background))] shadow-sm backdrop-blur")}
|
|
419
423
|
>
|
|
420
424
|
{table.getHeaderGroups().map((headerGroup) => (
|
|
421
425
|
<TableRow key={headerGroup.id}>
|
|
@@ -423,13 +427,13 @@ function DataTable<TData, TValue = unknown>({
|
|
|
423
427
|
<TableHead
|
|
424
428
|
key={header.id}
|
|
425
429
|
style={{ width: header.getSize() }}
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
430
|
+
className={cn(
|
|
431
|
+
densityHeadClassName[density],
|
|
432
|
+
"text-muted-foreground",
|
|
433
|
+
stickyHeader && "bg-[linear-gradient(180deg,color-mix(in_oklch,var(--background),white_5%),var(--background))] backdrop-blur",
|
|
434
|
+
bordered && "border-r last:border-r-0",
|
|
435
|
+
getHeaderCellClassName(header, headerCellClassName)
|
|
436
|
+
)}
|
|
433
437
|
>
|
|
434
438
|
{header.isPlaceholder
|
|
435
439
|
? null
|
|
@@ -3,10 +3,10 @@ import * as React from "react"
|
|
|
3
3
|
import { Card } from "@/components/ui/card"
|
|
4
4
|
import { cn } from "@/lib/utils"
|
|
5
5
|
|
|
6
|
-
export type EntityCardProps = React.ComponentProps<typeof Card> & {
|
|
7
|
-
title: React.ReactNode
|
|
8
|
-
description?: React.ReactNode
|
|
9
|
-
media?: React.ReactNode
|
|
6
|
+
export type EntityCardProps = Omit<React.ComponentProps<typeof Card>, "title"> & {
|
|
7
|
+
title: React.ReactNode
|
|
8
|
+
description?: React.ReactNode
|
|
9
|
+
media?: React.ReactNode
|
|
10
10
|
icon?: React.ReactNode
|
|
11
11
|
status?: React.ReactNode
|
|
12
12
|
meta?: React.ReactNode
|
|
@@ -4,10 +4,10 @@ import { Badge } from "@/components/ui/badge"
|
|
|
4
4
|
import { Card } from "@/components/ui/card"
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
|
-
export type MetricCardProps = React.ComponentProps<typeof Card> & {
|
|
8
|
-
title: React.ReactNode
|
|
9
|
-
value: React.ReactNode
|
|
10
|
-
description?: React.ReactNode
|
|
7
|
+
export type MetricCardProps = Omit<React.ComponentProps<typeof Card>, "title"> & {
|
|
8
|
+
title: React.ReactNode
|
|
9
|
+
value: React.ReactNode
|
|
10
|
+
description?: React.ReactNode
|
|
11
11
|
trend?: React.ReactNode
|
|
12
12
|
icon?: React.ReactNode
|
|
13
13
|
}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import {
|
|
2
|
+
FormInput,
|
|
3
|
+
type FormInputDateVariantProps,
|
|
4
|
+
} from "@/components/form/form-input"
|
|
5
|
+
import type { FieldPath, FieldValues } from "react-hook-form"
|
|
6
|
+
|
|
7
|
+
export type FormDateInputProps<
|
|
8
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
9
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
10
|
+
> = Omit<FormInputDateVariantProps<TFieldValues, TName>, "kind">
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use {@link FormInput} with `kind="date"` instead.
|
|
14
|
+
*/
|
|
15
|
+
function FormDateInput<
|
|
16
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
17
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
18
|
+
>(props: FormDateInputProps<TFieldValues, TName>) {
|
|
19
|
+
return <FormInput {...props} kind="date" />
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { FormDateInput }
|
|
@@ -1,20 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import {
|
|
2
|
+
FormInput,
|
|
3
|
+
type FormInputNumberVariantProps,
|
|
4
|
+
} from "@/components/form/form-input"
|
|
5
|
+
import type { FieldPath, FieldValues } from "react-hook-form"
|
|
6
|
+
|
|
4
7
|
export type FormNumberInputProps<
|
|
5
8
|
TFieldValues extends FieldValues = FieldValues,
|
|
6
9
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
7
|
-
> = Omit<
|
|
10
|
+
> = Omit<FormInputNumberVariantProps<TFieldValues, TName>, "kind" | "step" | "max" | "min"> & {
|
|
8
11
|
step?: number
|
|
9
12
|
min?: number
|
|
10
13
|
max?: number
|
|
11
14
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Use {@link FormInput} with `kind="number"` instead.
|
|
18
|
+
*/
|
|
19
|
+
function FormNumberInput<
|
|
20
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
21
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
22
|
+
>(props: FormNumberInputProps<TFieldValues, TName>) {
|
|
23
|
+
return <FormInput {...props} kind="number" />
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { FormNumberInput }
|
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
type
|
|
5
|
-
} from "@/components/form/form-
|
|
2
|
+
FormInput,
|
|
3
|
+
type FormInputPhoneInputValueMode,
|
|
4
|
+
type FormInputPhoneVariantProps,
|
|
5
|
+
} from "@/components/form/form-input"
|
|
6
6
|
import type { FieldPath, FieldValues } from "react-hook-form"
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
export type FormPhoneInputValueMode = FormInputPhoneInputValueMode
|
|
9
|
+
export type { FormInputPhoneInputValueMode }
|
|
9
10
|
|
|
10
|
-
export type FormPhoneInputValueMode = FormAppInputPhoneValueMode
|
|
11
|
-
export type { FormInputPhoneInputValueMode, FormAppInputPhoneValueMode }
|
|
12
|
-
|
|
13
11
|
export type FormPhoneInputProps<
|
|
14
12
|
TFieldValues extends FieldValues = FieldValues,
|
|
15
13
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
16
|
-
> = Omit<
|
|
14
|
+
> = Omit<FormInputPhoneVariantProps<TFieldValues, TName>, "kind" | "valueMode"> & {
|
|
17
15
|
valueMode?: FormInputPhoneInputValueMode
|
|
18
16
|
}
|
|
19
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Use {@link FormInput} with `kind="phone"` instead.
|
|
20
|
+
*/
|
|
20
21
|
function FormPhoneInput<
|
|
21
22
|
TFieldValues extends FieldValues = FieldValues,
|
|
22
23
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
23
24
|
>(props: FormPhoneInputProps<TFieldValues, TName>) {
|
|
24
25
|
const { valueMode, ...rest } = props
|
|
25
|
-
return <
|
|
26
|
+
return <FormInput {...rest} valueMode={valueMode} kind="phone" />
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
export { FormPhoneInput }
|
|
28
|
+
|
|
29
|
+
export { FormPhoneInput }
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import {
|
|
2
|
+
FormInput,
|
|
3
|
+
type FormInputSearchVariantProps,
|
|
4
|
+
} from "@/components/form/form-input"
|
|
5
|
+
import type { FieldPath, FieldValues } from "react-hook-form"
|
|
6
|
+
|
|
7
|
+
export type FormSearchInputProps<
|
|
8
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
9
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
10
|
+
> = Omit<FormInputSearchVariantProps<TFieldValues, TName>, "kind">
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Use {@link FormInput} with `kind="search"` instead.
|
|
14
|
+
*/
|
|
15
|
+
function FormSearchInput<
|
|
16
|
+
TFieldValues extends FieldValues = FieldValues,
|
|
17
|
+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
|
18
|
+
>(props: FormSearchInputProps<TFieldValues, TName>) {
|
|
19
|
+
return <FormInput {...props} kind="search" />
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { FormSearchInput }
|
|
@@ -76,15 +76,15 @@ const ClearableInput = React.forwardRef<HTMLInputElement, ClearableInputProps>(
|
|
|
76
76
|
trailing={
|
|
77
77
|
<>
|
|
78
78
|
{trailing}
|
|
79
|
-
{canClear && (
|
|
80
|
-
<button
|
|
81
|
-
type="button"
|
|
82
|
-
aria-label={clearLabel}
|
|
83
|
-
className="rounded-
|
|
84
|
-
onClick={clearValue}
|
|
85
|
-
>
|
|
86
|
-
<XIcon className="size-4" />
|
|
87
|
-
</button>
|
|
79
|
+
{canClear && (
|
|
80
|
+
<button
|
|
81
|
+
type="button"
|
|
82
|
+
aria-label={clearLabel}
|
|
83
|
+
className="inline-flex size-7 items-center justify-center rounded-full border border-transparent bg-transparent text-muted-foreground/74 transition hover:border-border/60 hover:bg-muted/58 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
|
|
84
|
+
onClick={clearValue}
|
|
85
|
+
>
|
|
86
|
+
<XIcon className="size-4" />
|
|
87
|
+
</button>
|
|
88
88
|
)}
|
|
89
89
|
</>
|
|
90
90
|
}
|
|
@@ -67,15 +67,15 @@ const InputDecorator = React.forwardRef<HTMLInputElement, InputDecoratorProps>(
|
|
|
67
67
|
data-has-trailing={hasTrailing || undefined}
|
|
68
68
|
className={cn(inputDecoratorVariants({ density, tone }), wrapperClassName)}
|
|
69
69
|
>
|
|
70
|
-
{hasLeading && (
|
|
71
|
-
<span
|
|
72
|
-
data-slot="input-leading"
|
|
73
|
-
className={cn(
|
|
74
|
-
"absolute left-
|
|
75
|
-
!leadingPointerEvents && "pointer-events-none",
|
|
76
|
-
leadingClassName
|
|
77
|
-
)}
|
|
78
|
-
>
|
|
70
|
+
{hasLeading && (
|
|
71
|
+
<span
|
|
72
|
+
data-slot="input-leading"
|
|
73
|
+
className={cn(
|
|
74
|
+
"absolute left-4 z-10 flex items-center text-muted-foreground/74 [&_svg]:size-4",
|
|
75
|
+
!leadingPointerEvents && "pointer-events-none",
|
|
76
|
+
leadingClassName
|
|
77
|
+
)}
|
|
78
|
+
>
|
|
79
79
|
{leading}
|
|
80
80
|
</span>
|
|
81
81
|
)}
|
|
@@ -83,19 +83,19 @@ const InputDecorator = React.forwardRef<HTMLInputElement, InputDecoratorProps>(
|
|
|
83
83
|
<InputPrimitive
|
|
84
84
|
ref={ref}
|
|
85
85
|
value={value == null ? "" : String(value)}
|
|
86
|
-
className={cn(hasLeading && "pl-
|
|
86
|
+
className={cn(hasLeading && "pl-11", hasTrailing && "pr-12", inputClassName, className)}
|
|
87
87
|
{...props}
|
|
88
88
|
/>
|
|
89
|
-
|
|
90
|
-
{hasTrailing && (
|
|
91
|
-
<span
|
|
92
|
-
data-slot="input-trailing"
|
|
93
|
-
className={cn(
|
|
94
|
-
"absolute right-
|
|
95
|
-
!trailingPointerEvents && "pointer-events-none",
|
|
96
|
-
trailingClassName
|
|
97
|
-
)}
|
|
98
|
-
>
|
|
89
|
+
|
|
90
|
+
{hasTrailing && (
|
|
91
|
+
<span
|
|
92
|
+
data-slot="input-trailing"
|
|
93
|
+
className={cn(
|
|
94
|
+
"absolute right-3 z-10 flex items-center gap-1.5 text-muted-foreground/74",
|
|
95
|
+
!trailingPointerEvents && "pointer-events-none",
|
|
96
|
+
trailingClassName
|
|
97
|
+
)}
|
|
98
|
+
>
|
|
99
99
|
{trailing}
|
|
100
100
|
</span>
|
|
101
101
|
)}
|
|
@@ -93,7 +93,7 @@ function Pagination({
|
|
|
93
93
|
data-slot="pagination"
|
|
94
94
|
aria-label="Pagination"
|
|
95
95
|
className={cn(
|
|
96
|
-
"flex items-center justify-center gap-1
|
|
96
|
+
"flex items-center justify-center gap-1 rounded-full border border-border/70 bg-background/76 p-1 shadow-none backdrop-blur",
|
|
97
97
|
className
|
|
98
98
|
)}
|
|
99
99
|
{...props}
|
|
@@ -143,10 +143,10 @@ function Pagination({
|
|
|
143
143
|
variant={item === currentPage ? "default" : "outline"}
|
|
144
144
|
size="icon-sm"
|
|
145
145
|
disabled={disabled}
|
|
146
|
-
aria-current={item === currentPage ? "page" : undefined}
|
|
147
|
-
aria-label={labels?.page?.(item) ?? `Page ${item}`}
|
|
146
|
+
aria-current={item === currentPage ? "page" : undefined}
|
|
147
|
+
aria-label={labels?.page?.(item) ?? `Page ${item}`}
|
|
148
148
|
onClick={() => goToPage(item)}
|
|
149
|
-
className={cn(item !== currentPage && "border-border/
|
|
149
|
+
className={cn(item !== currentPage && "border-border/70 bg-background/80 shadow-none")}
|
|
150
150
|
>
|
|
151
151
|
{item}
|
|
152
152
|
</Button>
|
|
@@ -39,12 +39,12 @@ function SheetClose({ ...props }: DialogPrimitive.Close.Props) {
|
|
|
39
39
|
|
|
40
40
|
function SheetOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props) {
|
|
41
41
|
return (
|
|
42
|
-
|
|
43
|
-
data-slot="sheet-overlay"
|
|
44
|
-
className={cn(
|
|
45
|
-
"fixed inset-0 z-50 bg-
|
|
46
|
-
className
|
|
47
|
-
)}
|
|
42
|
+
<DialogPrimitive.Backdrop
|
|
43
|
+
data-slot="sheet-overlay"
|
|
44
|
+
className={cn(
|
|
45
|
+
"fixed inset-0 z-50 bg-foreground/12 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
48
|
{...props}
|
|
49
49
|
/>
|
|
50
50
|
)
|
|
@@ -17,10 +17,10 @@ export type EntityDetailsSection = {
|
|
|
17
17
|
content: React.ReactNode
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export type EntityDetailsProps = React.ComponentProps<"div"> & {
|
|
21
|
-
title: React.ReactNode
|
|
22
|
-
subtitle?: React.ReactNode
|
|
23
|
-
avatar?: React.ReactNode
|
|
20
|
+
export type EntityDetailsProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
21
|
+
title: React.ReactNode
|
|
22
|
+
subtitle?: React.ReactNode
|
|
23
|
+
avatar?: React.ReactNode
|
|
24
24
|
status?: React.ReactNode
|
|
25
25
|
actions?: React.ReactNode
|
|
26
26
|
metadata?: PropertyGridItem[]
|
|
@@ -5,23 +5,22 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
5
5
|
|
|
6
6
|
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
8
|
-
const badgeVariants = cva(
|
|
9
|
-
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1
|
|
10
|
-
{
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default:
|
|
14
|
-
"border-
|
|
15
|
-
secondary:
|
|
16
|
-
"border-border/70 bg-
|
|
17
|
-
destructive:
|
|
18
|
-
"border-destructive/
|
|
19
|
-
outline:
|
|
20
|
-
"border-border/
|
|
21
|
-
ghost:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
8
|
+
const badgeVariants = cva(
|
|
9
|
+
"group/badge inline-flex w-fit shrink-0 items-center justify-center gap-1 whitespace-nowrap rounded-full border border-transparent font-semibold tracking-[0.01em] transition-[background-color,border-color,color,box-shadow,transform] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default:
|
|
14
|
+
"border-emerald-500/18 bg-emerald-500/14 text-emerald-700 shadow-none [a]:hover:bg-emerald-500/18 dark:border-emerald-400/18 dark:bg-emerald-400/16 dark:text-emerald-200",
|
|
15
|
+
secondary:
|
|
16
|
+
"border-border/70 bg-muted/68 text-foreground shadow-none [a]:hover:bg-muted/82 dark:bg-muted/38",
|
|
17
|
+
destructive:
|
|
18
|
+
"border-destructive/20 bg-destructive/10 text-destructive focus-visible:ring-destructive/20 [a]:hover:bg-destructive/14 dark:bg-destructive/16 dark:focus-visible:ring-destructive/40",
|
|
19
|
+
outline:
|
|
20
|
+
"border-border/72 bg-transparent text-foreground shadow-none [a]:hover:bg-muted/66 [a]:hover:text-foreground",
|
|
21
|
+
ghost: "border-transparent bg-transparent text-muted-foreground shadow-none hover:bg-transparent hover:text-foreground",
|
|
22
|
+
link: "border-transparent bg-transparent p-0 text-[color:var(--aui-brand-strong)] shadow-none underline-offset-4 hover:underline",
|
|
23
|
+
},
|
|
25
24
|
tone: {
|
|
26
25
|
neutral: "",
|
|
27
26
|
info: "border-blue-500/20 bg-blue-500/10 text-blue-700 dark:text-blue-300",
|
|
@@ -29,11 +28,11 @@ const badgeVariants = cva(
|
|
|
29
28
|
warning: "border-amber-500/24 bg-amber-500/12 text-amber-700 dark:text-amber-300",
|
|
30
29
|
danger: "border-destructive/20 bg-destructive/12 text-destructive dark:bg-destructive/20",
|
|
31
30
|
},
|
|
32
|
-
size: {
|
|
33
|
-
sm: "min-h-5 px-2 py-0.5 text-[0.
|
|
34
|
-
default: "min-h-6 px-
|
|
35
|
-
lg: "min-h-7 px-3 py-1 text-
|
|
36
|
-
},
|
|
31
|
+
size: {
|
|
32
|
+
sm: "min-h-5 px-2.5 py-0.5 text-[0.64rem]",
|
|
33
|
+
default: "min-h-6 px-3 py-1 text-[0.68rem]",
|
|
34
|
+
lg: "min-h-7 px-3.5 py-1 text-[0.75rem]",
|
|
35
|
+
},
|
|
37
36
|
dot: {
|
|
38
37
|
true: "pl-2",
|
|
39
38
|
false: "",
|
|
@@ -4,38 +4,38 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "@/lib/utils"
|
|
6
6
|
|
|
7
|
-
const buttonVariants = cva(
|
|
8
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-
|
|
9
|
-
{
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
default:
|
|
13
|
-
"border-primary/
|
|
14
|
-
outline:
|
|
15
|
-
"border-border/
|
|
16
|
-
secondary:
|
|
17
|
-
"border-border/
|
|
18
|
-
ghost:
|
|
19
|
-
"border-transparent bg-transparent text-foreground/
|
|
20
|
-
destructive:
|
|
21
|
-
"border-destructive/
|
|
22
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
default:
|
|
26
|
-
"h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-
|
|
27
|
-
xs: "h-7 gap-1 rounded-
|
|
28
|
-
sm: "h-8 gap-1 rounded-
|
|
29
|
-
md: "h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-
|
|
30
|
-
lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
31
|
-
xl: "h-11 gap-2 px-5 text-base has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
32
|
-
icon: "size-9",
|
|
33
|
-
"icon-xs":
|
|
34
|
-
"size-7 rounded-
|
|
35
|
-
"icon-sm":
|
|
36
|
-
"size-8 rounded-
|
|
37
|
-
"icon-lg": "size-10",
|
|
38
|
-
},
|
|
7
|
+
const buttonVariants = cva(
|
|
8
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-[transform,background-color,border-color,color,box-shadow,opacity] outline-none select-none focus-visible:border-ring/60 focus-visible:ring-2 focus-visible:ring-ring/35 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:cursor-not-allowed disabled:translate-y-0 disabled:shadow-none disabled:opacity-100 aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:translate-y-0 aria-disabled:shadow-none aria-disabled:opacity-100 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/35 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default:
|
|
13
|
+
"border-primary/20 bg-primary text-primary-foreground shadow-sm hover:-translate-y-px hover:bg-[color-mix(in_oklch,var(--primary),white_7%)] hover:shadow-md disabled:border-primary/10 disabled:bg-primary/45 disabled:text-primary-foreground/70 dark:disabled:bg-primary/34",
|
|
14
|
+
outline:
|
|
15
|
+
"border-border/80 bg-background text-foreground shadow-none hover:-translate-y-px hover:border-ring/38 hover:bg-accent/72 hover:text-foreground hover:shadow-sm aria-expanded:border-ring/38 aria-expanded:bg-accent/72 aria-expanded:text-foreground disabled:border-border/48 disabled:bg-muted/24 disabled:text-muted-foreground/70 dark:border-white/14 dark:bg-white/[0.045] dark:hover:bg-white/[0.08] dark:hover:text-foreground dark:disabled:bg-white/[0.035]",
|
|
16
|
+
secondary:
|
|
17
|
+
"border-border/70 bg-secondary text-secondary-foreground shadow-sm hover:-translate-y-px hover:border-border/86 hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] hover:text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground disabled:border-border/44 disabled:bg-muted/28 disabled:text-muted-foreground/72 dark:bg-white/[0.08] dark:hover:bg-white/[0.12] dark:disabled:bg-white/[0.035]",
|
|
18
|
+
ghost:
|
|
19
|
+
"border-transparent bg-transparent text-foreground/88 shadow-none hover:border-border/48 hover:bg-accent/68 hover:text-foreground aria-expanded:border-border/48 aria-expanded:bg-accent/68 aria-expanded:text-foreground disabled:text-muted-foreground/64 dark:text-foreground/86 dark:hover:bg-white/[0.075] dark:disabled:text-muted-foreground/58",
|
|
20
|
+
destructive:
|
|
21
|
+
"border-destructive/20 bg-destructive text-destructive-foreground shadow-sm hover:-translate-y-px hover:bg-[color-mix(in_oklch,var(--destructive),white_7%)] hover:shadow-md focus-visible:border-destructive/45 focus-visible:ring-destructive/24 disabled:border-destructive/10 disabled:bg-destructive/42 disabled:text-destructive-foreground/70 dark:focus-visible:ring-destructive/35 dark:disabled:bg-destructive/34",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default:
|
|
26
|
+
"h-9 gap-1.5 px-3.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
27
|
+
xs: "h-7 gap-1 rounded-md px-2.5 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
|
|
28
|
+
sm: "h-8 gap-1 rounded-md px-3.5 text-[0.82rem] in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
29
|
+
md: "h-9 gap-1.5 px-3.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
30
|
+
lg: "h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
31
|
+
xl: "h-11 gap-2 px-5 text-base has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
32
|
+
icon: "size-9",
|
|
33
|
+
"icon-xs":
|
|
34
|
+
"size-7 rounded-md in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
35
|
+
"icon-sm":
|
|
36
|
+
"size-8 rounded-md in-data-[slot=button-group]:rounded-md",
|
|
37
|
+
"icon-lg": "size-10",
|
|
38
|
+
},
|
|
39
39
|
},
|
|
40
40
|
defaultVariants: {
|
|
41
41
|
variant: "default",
|