@alpic-ai/ui 0.0.0-dev.d4f6edf → 0.0.0-dev.d8b931a
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/components/accordion-card.d.mts +1 -1
- package/dist/components/accordion.d.mts +1 -1
- package/dist/components/alert.d.mts +2 -2
- package/dist/components/attachment-tile.mjs +1 -1
- package/dist/components/avatar.d.mts +1 -1
- package/dist/components/badge.d.mts +1 -1
- package/dist/components/breadcrumb.d.mts +1 -1
- package/dist/components/button.d.mts +3 -3
- package/dist/components/card.d.mts +1 -1
- package/dist/components/checkbox.d.mts +1 -1
- package/dist/components/collapsible.d.mts +1 -1
- package/dist/components/combobox.d.mts +1 -1
- package/dist/components/combobox.mjs +1 -1
- package/dist/components/command.d.mts +1 -1
- package/dist/components/copyable.d.mts +1 -1
- package/dist/components/copyable.mjs +1 -1
- package/dist/components/description-list.d.mts +1 -1
- package/dist/components/dialog.d.mts +1 -1
- package/dist/components/dropdown-menu.d.mts +1 -1
- package/dist/components/form.d.mts +1 -1
- package/dist/components/form.mjs +1 -1
- package/dist/components/input-group.d.mts +1 -1
- package/dist/components/input.d.mts +1 -1
- package/dist/components/input.mjs +1 -1
- package/dist/components/label.d.mts +1 -1
- package/dist/components/pagination.d.mts +1 -1
- package/dist/components/popover.d.mts +1 -1
- package/dist/components/radio-group.d.mts +1 -1
- package/dist/components/scroll-area.d.mts +1 -1
- package/dist/components/select.d.mts +1 -1
- package/dist/components/separator.d.mts +1 -1
- package/dist/components/sheet.d.mts +1 -1
- package/dist/components/sidebar.d.mts +1 -1
- package/dist/components/sidebar.mjs +15 -30
- package/dist/components/skeleton.d.mts +1 -1
- package/dist/components/sonner.d.mts +1 -1
- package/dist/components/spinner.d.mts +1 -1
- package/dist/components/status-dot.d.mts +1 -1
- package/dist/components/switch.d.mts +1 -1
- package/dist/components/table.d.mts +1 -1
- package/dist/components/tabs.d.mts +2 -2
- package/dist/components/tabs.mjs +1 -1
- package/dist/components/textarea.d.mts +1 -1
- package/dist/components/textarea.mjs +1 -1
- package/dist/components/toggle-group.d.mts +1 -1
- package/dist/components/toggle-group.mjs +1 -1
- package/dist/components/tooltip-icon-button.mjs +1 -1
- package/dist/components/tooltip.d.mts +1 -1
- package/dist/components/typography.d.mts +1 -1
- package/package.json +3 -3
- package/src/components/sidebar.tsx +11 -12
- package/src/styles/tokens.css +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion-card.d.ts
|
|
6
6
|
declare function AccordionCard({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion.d.ts
|
|
6
6
|
declare function Accordion({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/alert.d.ts
|
|
7
7
|
declare const alertVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "destructive" | "
|
|
8
|
+
variant?: "default" | "destructive" | "warning" | "success" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
|
|
11
11
|
declare function Alert({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
3
|
import { TooltipIconButton } from "./tooltip-icon-button.mjs";
|
|
4
|
-
import { useState } from "react";
|
|
5
4
|
import { FileText, XIcon } from "lucide-react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { useState } from "react";
|
|
7
7
|
//#region src/components/attachment-tile.tsx
|
|
8
8
|
function AttachmentTile({ src, isImage, label, onRemove, onClick, className }) {
|
|
9
9
|
const [hasError, setHasError] = useState(false);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
5
5
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
@@ -4,7 +4,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/badge.d.ts
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "warning" | "success" | "secondary" | "primary" | "error" | null | undefined;
|
|
8
8
|
size?: "sm" | "md" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/button.d.ts
|
|
7
7
|
declare const buttonVariants: (props?: ({
|
|
8
|
-
variant?: "
|
|
9
|
-
size?: "default" | "
|
|
8
|
+
variant?: "destructive" | "secondary" | "primary" | "tertiary" | "link" | "link-muted" | null | undefined;
|
|
9
|
+
size?: "default" | "icon" | "icon-rounded" | "pill" | null | undefined;
|
|
10
10
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
|
|
12
12
|
asChild?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PopoverContent } from "./popover.mjs";
|
|
2
2
|
import { selectTriggerVariants } from "./select-trigger-variants.mjs";
|
|
3
|
-
import { ReactNode } from "react";
|
|
4
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { ReactNode } from "react";
|
|
6
6
|
import { Command } from "cmdk";
|
|
7
7
|
|
|
8
8
|
//#region src/components/combobox.d.ts
|
|
@@ -3,9 +3,9 @@ import { cn } from "../lib/cn.mjs";
|
|
|
3
3
|
import { Popover, PopoverContent, PopoverTrigger } from "./popover.mjs";
|
|
4
4
|
import { selectTriggerVariants } from "./select-trigger-variants.mjs";
|
|
5
5
|
import { TagDismissible } from "./tag.mjs";
|
|
6
|
-
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
7
6
|
import { CheckIcon, ChevronDownIcon, SearchIcon } from "lucide-react";
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
9
9
|
import { Command } from "cmdk";
|
|
10
10
|
//#region src/components/combobox.tsx
|
|
11
11
|
const ComboboxContext = createContext(null);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCopyToClipboard } from "../hooks/use-copy-to-clipboard.mjs";
|
|
3
2
|
import { cn } from "../lib/cn.mjs";
|
|
4
3
|
import { Button } from "./button.mjs";
|
|
4
|
+
import { useCopyToClipboard } from "../hooks/use-copy-to-clipboard.mjs";
|
|
5
5
|
import { Check, Copy } from "lucide-react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/copyable.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonProps } from "./button.mjs";
|
|
2
|
-
import * as React from "react";
|
|
3
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
6
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
5
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { InputProps } from "./input.mjs";
|
|
2
2
|
import { Label } from "./label.mjs";
|
|
3
3
|
import { TextareaProps } from "./textarea.mjs";
|
|
4
|
-
import * as React from "react";
|
|
5
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
7
|
import * as _$react_hook_form0 from "react-hook-form";
|
|
8
8
|
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
package/dist/components/form.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { Label } from "./label.mjs";
|
|
|
5
5
|
import { Input } from "./input.mjs";
|
|
6
6
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.mjs";
|
|
7
7
|
import { Textarea } from "./textarea.mjs";
|
|
8
|
-
import * as React from "react";
|
|
9
8
|
import { Info } from "lucide-react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import * as React from "react";
|
|
11
11
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
12
|
import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
|
|
13
13
|
//#region src/components/form.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/input-group.d.ts
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
4
4
|
import { Label } from "./label.mjs";
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Info } from "lucide-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as React from "react";
|
|
8
8
|
//#region src/components/input.tsx
|
|
9
9
|
const inputSizeStyles = {
|
|
10
10
|
sm: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { selectTriggerVariants } from "./select-trigger-variants.mjs";
|
|
2
|
-
import * as React from "react";
|
|
3
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
5
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
6
|
|
|
7
7
|
//#region src/components/select.d.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Button } from "./button.mjs";
|
|
2
2
|
import { TooltipContent } from "./tooltip.mjs";
|
|
3
|
-
import * as React from "react";
|
|
4
3
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
7
|
|
|
8
8
|
//#region src/components/sidebar.d.ts
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useIsMobile } from "../hooks/use-mobile.mjs";
|
|
3
2
|
import { cn } from "../lib/cn.mjs";
|
|
4
3
|
import { Button } from "./button.mjs";
|
|
5
4
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
6
5
|
import { Separator } from "./separator.mjs";
|
|
7
6
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.mjs";
|
|
7
|
+
import { useIsMobile } from "../hooks/use-mobile.mjs";
|
|
8
8
|
import { Skeleton } from "./skeleton.mjs";
|
|
9
|
-
import
|
|
9
|
+
import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { cva } from "class-variance-authority";
|
|
12
|
+
import * as React from "react";
|
|
12
13
|
import { Slot } from "@radix-ui/react-slot";
|
|
13
14
|
//#region src/components/sidebar.tsx
|
|
14
15
|
const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
@@ -131,7 +132,8 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
134
|
function SidebarTrigger({ className, onClick, ...props }) {
|
|
134
|
-
const { toggleSidebar } = useSidebar();
|
|
135
|
+
const { state, isMobile, openMobile, toggleSidebar } = useSidebar();
|
|
136
|
+
const isOpen = isMobile ? openMobile : state === "expanded";
|
|
135
137
|
return /* @__PURE__ */ jsxs(Button, {
|
|
136
138
|
"data-sidebar": "trigger",
|
|
137
139
|
"data-slot": "sidebar-trigger",
|
|
@@ -143,35 +145,12 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
143
145
|
toggleSidebar();
|
|
144
146
|
},
|
|
145
147
|
...props,
|
|
146
|
-
children: [/* @__PURE__ */ jsx(
|
|
148
|
+
children: [isOpen ? /* @__PURE__ */ jsx(PanelLeftClose, { className: "size-4.5" }) : /* @__PURE__ */ jsx(PanelLeftOpen, { className: "size-4.5" }), /* @__PURE__ */ jsx("span", {
|
|
147
149
|
className: "sr-only",
|
|
148
150
|
children: "Toggle Sidebar"
|
|
149
151
|
})]
|
|
150
152
|
});
|
|
151
153
|
}
|
|
152
|
-
function SidebarToggleIcon({ className, ...props }) {
|
|
153
|
-
return /* @__PURE__ */ jsxs("svg", {
|
|
154
|
-
viewBox: "0 0 20 20",
|
|
155
|
-
fill: "none",
|
|
156
|
-
"aria-hidden": "true",
|
|
157
|
-
className,
|
|
158
|
-
...props,
|
|
159
|
-
children: [/* @__PURE__ */ jsx("rect", {
|
|
160
|
-
x: "2.75",
|
|
161
|
-
y: "2.75",
|
|
162
|
-
width: "14.5",
|
|
163
|
-
height: "14.5",
|
|
164
|
-
rx: "4",
|
|
165
|
-
stroke: "currentColor",
|
|
166
|
-
strokeWidth: "1.5"
|
|
167
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
168
|
-
d: "M10 4.75V15.25",
|
|
169
|
-
stroke: "currentColor",
|
|
170
|
-
strokeWidth: "1.5",
|
|
171
|
-
strokeLinecap: "round"
|
|
172
|
-
})]
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
154
|
function SidebarRail({ className, ...props }) {
|
|
176
155
|
const { toggleSidebar } = useSidebar();
|
|
177
156
|
return /* @__PURE__ */ jsx("button", {
|
|
@@ -208,9 +187,15 @@ function SidebarHeader({ className, icon, title, children, ...props }) {
|
|
|
208
187
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
209
188
|
className: "flex h-8 items-center gap-2 px-3",
|
|
210
189
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
className: "shrink-0",
|
|
213
|
-
children:
|
|
190
|
+
/* @__PURE__ */ jsxs("div", {
|
|
191
|
+
className: "relative shrink-0",
|
|
192
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
193
|
+
className: "transition-opacity group-data-[collapsible=icon]:group-hover:opacity-0",
|
|
194
|
+
children: icon
|
|
195
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
196
|
+
className: "absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-data-[collapsible=icon]:group-hover:opacity-100",
|
|
197
|
+
children: /* @__PURE__ */ jsx(SidebarTrigger, {})
|
|
198
|
+
})]
|
|
214
199
|
}),
|
|
215
200
|
/* @__PURE__ */ jsx("span", {
|
|
216
201
|
className: "text-foreground text-md min-w-0 truncate font-medium group-data-[collapsible=icon]:hidden",
|
|
@@ -4,7 +4,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/skeleton.d.ts
|
|
6
6
|
declare const skeletonVariants: (props?: ({
|
|
7
|
-
shape?: "
|
|
7
|
+
shape?: "rectangle" | "circle" | null | undefined;
|
|
8
8
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
9
9
|
interface SkeletonProps extends React.ComponentProps<"div">, VariantProps<typeof skeletonVariants> {}
|
|
10
10
|
declare function Skeleton({
|
|
@@ -4,7 +4,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/spinner.d.ts
|
|
6
6
|
declare const spinnerVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "secondary" | "primary" | null | undefined;
|
|
8
8
|
size?: "sm" | "md" | "lg" | "xl" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface SpinnerProps extends Omit<React.ComponentProps<"svg">, "children">, VariantProps<typeof spinnerVariants> {}
|
|
@@ -4,7 +4,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/status-dot.d.ts
|
|
6
6
|
declare const statusDotVariants: (props?: ({
|
|
7
|
-
variant?: "destructive" | "
|
|
7
|
+
variant?: "destructive" | "warning" | "success" | "muted" | null | undefined;
|
|
8
8
|
pulse?: boolean | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
interface StatusDotProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof statusDotVariants> {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
5
5
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
7
7
|
//#region src/components/tabs.d.ts
|
|
8
8
|
declare const tabsTriggerVariants: (props?: ({
|
|
9
|
-
variant?: "default" | "
|
|
9
|
+
variant?: "default" | "pill" | "line" | null | undefined;
|
|
10
10
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
declare function Tabs({
|
|
12
12
|
className,
|
package/dist/components/tabs.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
|
-
import { createContext, use } from "react";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { cva } from "class-variance-authority";
|
|
5
|
+
import { createContext, use } from "react";
|
|
6
6
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
7
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
8
8
|
//#region src/components/tabs.tsx
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
4
4
|
import { Label } from "./label.mjs";
|
|
5
|
-
import * as React from "react";
|
|
6
5
|
import { Info } from "lucide-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import * as React from "react";
|
|
8
8
|
//#region src/components/textarea.tsx
|
|
9
9
|
function Textarea({ className, id, label, required, hint, error, tooltip, ...props }) {
|
|
10
10
|
const generatedId = React.useId();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5
5
|
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
6
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
|
-
import * as React from "react";
|
|
4
3
|
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { cva } from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
7
7
|
//#region src/components/toggle-group.tsx
|
|
8
8
|
const toggleGroupItemVariants = cva([
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "./button.mjs";
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
6
|
import { Slottable } from "@radix-ui/react-slot";
|
|
7
7
|
//#region src/components/tooltip-icon-button.tsx
|
|
8
8
|
const TooltipIconButton = forwardRef(({ children, tooltip, side = "bottom", ...rest }, ref) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alpic-ai/ui",
|
|
3
|
-
"version": "0.0.0-dev.
|
|
3
|
+
"version": "0.0.0-dev.d8b931a",
|
|
4
4
|
"description": "Alpic design system — shared UI components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"shx": "^0.4.0",
|
|
65
65
|
"sonner": "^2.0.7",
|
|
66
66
|
"tailwindcss": "^4.2.2",
|
|
67
|
-
"tsdown": "^0.21.
|
|
67
|
+
"tsdown": "^0.21.7",
|
|
68
68
|
"tw-animate-css": "^1.4.0",
|
|
69
|
-
"typescript": "^6.0.
|
|
69
|
+
"typescript": "^6.0.2"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "shx rm -rf dist && tsdown",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
5
|
+
import { PanelLeftClose, PanelLeftOpen } from "lucide-react";
|
|
5
6
|
import * as React from "react";
|
|
6
7
|
|
|
7
8
|
import { useIsMobile } from "../hooks/use-mobile";
|
|
@@ -230,7 +231,9 @@ function Sidebar({
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>) {
|
|
233
|
-
const { toggleSidebar } = useSidebar();
|
|
234
|
+
const { state, isMobile, openMobile, toggleSidebar } = useSidebar();
|
|
235
|
+
|
|
236
|
+
const isOpen = isMobile ? openMobile : state === "expanded";
|
|
234
237
|
|
|
235
238
|
return (
|
|
236
239
|
<Button
|
|
@@ -245,21 +248,12 @@ function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<t
|
|
|
245
248
|
}}
|
|
246
249
|
{...props}
|
|
247
250
|
>
|
|
248
|
-
<
|
|
251
|
+
{isOpen ? <PanelLeftClose className="size-4.5" /> : <PanelLeftOpen className="size-4.5" />}
|
|
249
252
|
<span className="sr-only">Toggle Sidebar</span>
|
|
250
253
|
</Button>
|
|
251
254
|
);
|
|
252
255
|
}
|
|
253
256
|
|
|
254
|
-
function SidebarToggleIcon({ className, ...props }: React.ComponentProps<"svg">) {
|
|
255
|
-
return (
|
|
256
|
-
<svg viewBox="0 0 20 20" fill="none" aria-hidden="true" className={className} {...props}>
|
|
257
|
-
<rect x="2.75" y="2.75" width="14.5" height="14.5" rx="4" stroke="currentColor" strokeWidth="1.5" />
|
|
258
|
-
<path d="M10 4.75V15.25" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
|
|
259
|
-
</svg>
|
|
260
|
-
);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
257
|
function SidebarRail({ className, ...props }: React.ComponentProps<"button">) {
|
|
264
258
|
const { toggleSidebar } = useSidebar();
|
|
265
259
|
|
|
@@ -326,7 +320,12 @@ function SidebarHeader({ className, icon, title, children, ...props }: SidebarHe
|
|
|
326
320
|
{...props}
|
|
327
321
|
>
|
|
328
322
|
<div className="flex h-8 items-center gap-2 px-3">
|
|
329
|
-
<div className="shrink-0">
|
|
323
|
+
<div className="relative shrink-0">
|
|
324
|
+
<span className="transition-opacity group-data-[collapsible=icon]:group-hover:opacity-0">{icon}</span>
|
|
325
|
+
<div className="absolute inset-0 flex items-center justify-center opacity-0 transition-opacity group-data-[collapsible=icon]:group-hover:opacity-100">
|
|
326
|
+
<SidebarTrigger />
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
330
329
|
<span className="text-foreground text-md min-w-0 truncate font-medium group-data-[collapsible=icon]:hidden">
|
|
331
330
|
{title}
|
|
332
331
|
</span>
|
package/src/styles/tokens.css
CHANGED
|
@@ -106,8 +106,6 @@
|
|
|
106
106
|
/* animations */
|
|
107
107
|
--animate-accordion-down: accordion-down 200ms ease-out;
|
|
108
108
|
--animate-accordion-up: accordion-up 200ms ease-out;
|
|
109
|
-
--animate-beacon-ring-core: beacon-ring-core 2.2s ease-in-out infinite;
|
|
110
|
-
--animate-beacon-ring-pulse: beacon-ring-pulse 2.2s ease-in-out infinite;
|
|
111
109
|
}
|
|
112
110
|
|
|
113
111
|
@keyframes accordion-down {
|
|
@@ -128,32 +126,6 @@
|
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
128
|
|
|
131
|
-
@keyframes beacon-ring-core {
|
|
132
|
-
0%,
|
|
133
|
-
100% {
|
|
134
|
-
opacity: 0.55;
|
|
135
|
-
transform: scale(0.98);
|
|
136
|
-
}
|
|
137
|
-
50% {
|
|
138
|
-
opacity: 0.85;
|
|
139
|
-
transform: scale(1.02);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
@keyframes beacon-ring-pulse {
|
|
144
|
-
0%,
|
|
145
|
-
100% {
|
|
146
|
-
opacity: 0.88;
|
|
147
|
-
transform: scale(1);
|
|
148
|
-
filter: drop-shadow(0 0 0 rgba(59, 130, 246, 0));
|
|
149
|
-
}
|
|
150
|
-
50% {
|
|
151
|
-
opacity: 1;
|
|
152
|
-
transform: scale(1.02);
|
|
153
|
-
filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.24));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
129
|
/* ─── Dark mode ───────────────────────────────────────────────────────────── */
|
|
158
130
|
|
|
159
131
|
.dark {
|