azamat-ui-kit-cli 0.3.13 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +807 -107
- package/package.json +1 -1
- package/vendor/src/components/data-table/data-table-pagination.tsx +1 -1
- package/vendor/src/components/data-table/data-table-toolbar.tsx +13 -12
- package/vendor/src/components/data-table/data-table.tsx +14 -14
- package/vendor/src/components/display/smart-card.tsx +17 -14
- package/vendor/src/components/form/form-input.tsx +3 -1
- package/vendor/src/components/form/form-textarea.tsx +15 -12
- package/vendor/src/components/inputs/async-select.tsx +106 -47
- package/vendor/src/components/inputs/clearable-input.tsx +1 -0
- package/vendor/src/components/inputs/input-chrome.tsx +1 -1
- package/vendor/src/components/inputs/input-decorator.tsx +16 -8
- package/vendor/src/components/inputs/simple-select.tsx +28 -28
- package/vendor/src/components/layout/app-sidebar.tsx +454 -154
- package/vendor/src/components/layout/breadcrumbs.tsx +67 -22
- package/vendor/src/components/layout/sidebar-nav.tsx +316 -128
- package/vendor/src/components/overlay/confirm-dialog.tsx +31 -20
- package/vendor/src/components/ui/badge.tsx +33 -32
- package/vendor/src/components/ui/button.tsx +15 -17
- package/vendor/src/components/ui/card.tsx +26 -25
- package/vendor/src/components/ui/dialog.tsx +6 -3
- package/vendor/src/components/ui/dropdown-menu.tsx +9 -9
- package/vendor/src/components/ui/input-primitive.tsx +1 -1
- package/vendor/src/components/ui/input.tsx +105 -2
- package/vendor/src/components/ui/popover.tsx +1 -1
- package/vendor/src/components/ui/select.tsx +3 -3
- package/vendor/src/components/ui/table.tsx +4 -4
- package/vendor/src/components/ui/tabs.tsx +2 -2
- package/vendor/src/families/member-metadata.ts +3 -3
- package/vendor/templates/styles/globals.css +706 -6
|
@@ -26,8 +26,8 @@ const inputDecoratorVariants = cva("relative flex w-full items-center", {
|
|
|
26
26
|
})
|
|
27
27
|
|
|
28
28
|
export type InputDecoratorProps = Omit<React.ComponentProps<typeof InputPrimitive>, "value"> &
|
|
29
|
-
VariantProps<typeof inputDecoratorVariants> & {
|
|
30
|
-
value?: string | number | null
|
|
29
|
+
VariantProps<typeof inputDecoratorVariants> & {
|
|
30
|
+
value?: string | number | readonly string[] | null
|
|
31
31
|
leading?: React.ReactNode
|
|
32
32
|
trailing?: React.ReactNode
|
|
33
33
|
leadingPointerEvents?: boolean
|
|
@@ -56,11 +56,19 @@ const InputDecorator = React.forwardRef<HTMLInputElement, InputDecoratorProps>(
|
|
|
56
56
|
...props
|
|
57
57
|
},
|
|
58
58
|
ref
|
|
59
|
-
) => {
|
|
60
|
-
const hasLeading = Boolean(leading)
|
|
61
|
-
const hasTrailing = Boolean(trailing)
|
|
62
|
-
|
|
63
|
-
|
|
59
|
+
) => {
|
|
60
|
+
const hasLeading = Boolean(leading)
|
|
61
|
+
const hasTrailing = Boolean(trailing)
|
|
62
|
+
const resolvedValue =
|
|
63
|
+
value == null
|
|
64
|
+
? value === null
|
|
65
|
+
? ""
|
|
66
|
+
: undefined
|
|
67
|
+
: Array.isArray(value)
|
|
68
|
+
? value
|
|
69
|
+
: String(value)
|
|
70
|
+
|
|
71
|
+
return (
|
|
64
72
|
<div
|
|
65
73
|
data-slot="input-decorator"
|
|
66
74
|
data-has-leading={hasLeading || undefined}
|
|
@@ -82,7 +90,7 @@ const InputDecorator = React.forwardRef<HTMLInputElement, InputDecoratorProps>(
|
|
|
82
90
|
|
|
83
91
|
<InputPrimitive
|
|
84
92
|
ref={ref}
|
|
85
|
-
value={
|
|
93
|
+
value={resolvedValue}
|
|
86
94
|
className={cn(hasLeading && "pl-11", hasTrailing && "pr-12", inputClassName, className)}
|
|
87
95
|
{...props}
|
|
88
96
|
/>
|
|
@@ -78,13 +78,13 @@ function SimpleSelect({
|
|
|
78
78
|
|
|
79
79
|
return (
|
|
80
80
|
<Select value={value} onValueChange={(val) => onValueChange?.(val as string)} disabled={disabled || loading} {...props}>
|
|
81
|
-
<SelectTrigger
|
|
82
|
-
size={size}
|
|
83
|
-
className={cn(
|
|
84
|
-
"w-full
|
|
85
|
-
triggerClassName
|
|
86
|
-
)}
|
|
87
|
-
>
|
|
81
|
+
<SelectTrigger
|
|
82
|
+
size={size}
|
|
83
|
+
className={cn(
|
|
84
|
+
"w-full",
|
|
85
|
+
triggerClassName
|
|
86
|
+
)}
|
|
87
|
+
>
|
|
88
88
|
<SelectValue placeholder={placeholder}>{selectedOption?.label}</SelectValue>
|
|
89
89
|
{loading ? <LoaderCircleIcon className="size-4 animate-spin text-muted-foreground" /> : null}
|
|
90
90
|
{clearable && value && !disabled && !loading ? (
|
|
@@ -102,32 +102,32 @@ function SimpleSelect({
|
|
|
102
102
|
</button>
|
|
103
103
|
) : null}
|
|
104
104
|
</SelectTrigger>
|
|
105
|
-
<SelectContent
|
|
106
|
-
className={cn(
|
|
107
|
-
"
|
|
108
|
-
contentClassName
|
|
109
|
-
)}
|
|
110
|
-
>
|
|
111
|
-
{searchable ? (
|
|
112
|
-
<div className="sticky top-0 z-10 mb-1 flex items-center gap-2 rounded-[min(var(--radius-lg),14px)] border
|
|
113
|
-
<SearchIcon className="size-4 text-muted-foreground" />
|
|
114
|
-
<input
|
|
115
|
-
value={search}
|
|
116
|
-
onChange={(event) => setSearch(event.target.value)}
|
|
117
|
-
placeholder={searchPlaceholder}
|
|
105
|
+
<SelectContent
|
|
106
|
+
className={cn(
|
|
107
|
+
"w-(--anchor-width)",
|
|
108
|
+
contentClassName
|
|
109
|
+
)}
|
|
110
|
+
>
|
|
111
|
+
{searchable ? (
|
|
112
|
+
<div data-slot="select-search" className="sticky top-0 z-10 mb-1 flex items-center gap-2 rounded-[min(var(--radius-lg),14px)] border px-2.5 py-2 text-sm">
|
|
113
|
+
<SearchIcon className="size-4 text-muted-foreground" />
|
|
114
|
+
<input
|
|
115
|
+
value={search}
|
|
116
|
+
onChange={(event) => setSearch(event.target.value)}
|
|
117
|
+
placeholder={searchPlaceholder}
|
|
118
118
|
className={cn("min-w-0 flex-1 bg-transparent outline-none placeholder:text-muted-foreground", searchClassName)}
|
|
119
119
|
/>
|
|
120
120
|
</div>
|
|
121
121
|
) : null}
|
|
122
122
|
|
|
123
|
-
{loading ? (
|
|
124
|
-
<div className="flex items-center gap-2 rounded-[min(var(--radius-lg),14px)] px-3 py-2.5 text-sm text-muted-foreground">
|
|
125
|
-
<LoaderCircleIcon className="size-4 animate-spin" />
|
|
126
|
-
{loadingLabel}
|
|
127
|
-
</div>
|
|
128
|
-
) : filteredOptions.length === 0 ? (
|
|
129
|
-
<div className="rounded-[min(var(--radius-lg),14px)] px-3 py-2.5 text-sm text-muted-foreground">{emptyLabel}</div>
|
|
130
|
-
) : (
|
|
123
|
+
{loading ? (
|
|
124
|
+
<div data-slot="select-state" className="flex items-center gap-2 rounded-[min(var(--radius-lg),14px)] px-3 py-2.5 text-sm text-muted-foreground">
|
|
125
|
+
<LoaderCircleIcon className="size-4 animate-spin" />
|
|
126
|
+
{loadingLabel}
|
|
127
|
+
</div>
|
|
128
|
+
) : filteredOptions.length === 0 ? (
|
|
129
|
+
<div data-slot="select-state" className="rounded-[min(var(--radius-lg),14px)] px-3 py-2.5 text-sm text-muted-foreground">{emptyLabel}</div>
|
|
130
|
+
) : (
|
|
131
131
|
filteredOptions.map((option) => {
|
|
132
132
|
const selected = option.value === value
|
|
133
133
|
return (
|