@locusgraph/components 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/button-group.js +1 -1
- package/dist/action/button.js +3 -3
- package/dist/action/toggle-group.js +2 -2
- package/dist/action/toggle.js +5 -5
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +4 -1
- package/dist/display/chart/chart-tooltip.js +2 -2
- package/dist/display/chat/attachment/attachment.js +1 -1
- package/dist/display/chat/bubble.js +2 -2
- package/dist/display/chat/message-scroller.js +1 -1
- package/dist/display/chat/message.js +2 -2
- package/dist/display/content/kbd.js +1 -1
- package/dist/display/media/carousel-controls.js +1 -1
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +8 -2
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +10 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +16 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +20 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +20 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +13 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +11 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +4 -2
- package/dist/display/status/empty.js +1 -1
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +19 -2
- package/dist/display/status/skeleton.js +1 -1
- package/dist/display/status/spinner.js +1 -1
- package/dist/display/table.js +1 -1
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +12 -14
- package/dist/form/advanced/calendar-day-button.js +1 -1
- package/dist/form/advanced/calendar.js +4 -4
- package/dist/form/advanced/combobox/combobox-chips.js +2 -2
- package/dist/form/advanced/combobox/combobox-items.js +2 -2
- package/dist/form/advanced/combobox/combobox.js +2 -2
- package/dist/form/advanced/input-otp.js +2 -2
- package/dist/form/choice/checkbox.js +3 -3
- package/dist/form/choice/radio-group.js +2 -2
- package/dist/form/choice/select.js +5 -5
- package/dist/form/choice/slider.js +1 -1
- package/dist/form/choice/switch.js +1 -1
- package/dist/form/field/field.js +3 -3
- package/dist/form/hook-form/form.js +1 -1
- package/dist/form/input-group.js +4 -4
- package/dist/form/native-select.js +2 -2
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +3 -3
- package/dist/layout/resizable.js +1 -1
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +3 -3
- package/dist/layout/sidebar/sidebar-sections.js +1 -1
- package/dist/layout/sidebar/sidebar.js +1 -1
- package/dist/layout/tabs.js +3 -3
- package/dist/navigation/breadcrumb.js +1 -1
- package/dist/navigation/menubar/menubar-items.js +2 -2
- package/dist/navigation/menubar/menubar-sub.js +2 -2
- package/dist/navigation/menubar/menubar.js +2 -2
- package/dist/navigation/navigation-menu.js +3 -3
- package/dist/navigation/pagination.js +5 -4
- package/dist/overlay/alert-dialog.js +3 -3
- package/dist/overlay/context-menu/context-menu-items.js +2 -2
- package/dist/overlay/context-menu/context-menu-sub.js +2 -2
- package/dist/overlay/context-menu/context-menu.js +1 -1
- package/dist/overlay/dialog.js +4 -4
- package/dist/overlay/floating/command.js +5 -5
- package/dist/overlay/floating/drawer.js +5 -5
- package/dist/overlay/floating/hover-card.js +2 -2
- package/dist/overlay/menu/dropdown-menu-choice.js +1 -1
- package/dist/overlay/menu/dropdown-menu-item.js +1 -1
- package/dist/overlay/menu/dropdown-menu-sub.js +2 -2
- package/dist/overlay/menu/dropdown-menu.js +2 -2
- package/dist/overlay/popover.js +2 -2
- package/dist/overlay/sheet.js +7 -7
- package/dist/shell/breadcrumbs.js +1 -1
- package/dist/shell/docs/docs-header.js +1 -1
- package/dist/shell/docs/docs-sidebar.js +2 -2
- package/dist/shell/docs/on-this-page.js +1 -1
- package/dist/shell/theme-toggle.js +1 -1
- package/package.json +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
4
|
+
import { Close as XIcon } from "@carbon/icons-react";
|
|
4
5
|
import { cn } from "cn";
|
|
5
|
-
import { XIcon } from "lucide-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { Button } from "../../../action/button.js";
|
|
8
8
|
function ComboboxChips({ className, ...props }) {
|
|
9
|
-
return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-
|
|
9
|
+
return (_jsx(ComboboxPrimitive.Chips, { "data-slot": "combobox-chips", className: cn("flex min-h-9 flex-wrap items-center gap-1.5 rounded-md border border-input bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-1 focus-within:ring-ring has-aria-invalid:border-destructive has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1.5 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", className), ...props }));
|
|
10
10
|
}
|
|
11
11
|
function ComboboxChip({ className, children, showRemove = true, ...props }) {
|
|
12
12
|
return (_jsxs(ComboboxPrimitive.Chip, { "data-slot": "combobox-chip", className: cn("flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", className), ...props, children: [children, showRemove && (_jsx(ComboboxPrimitive.ChipRemove, { render: _jsx(Button, { variant: "ghost", size: "icon-xs" }), className: "-ml-1 opacity-50 hover:opacity-100", "data-slot": "combobox-chip-remove", children: _jsx(XIcon, { className: "pointer-events-none" }) }))] }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
4
|
+
import { Checkmark as CheckIcon } from "@carbon/icons-react";
|
|
4
5
|
import { cn } from "cn";
|
|
5
|
-
import { CheckIcon } from "lucide-react";
|
|
6
6
|
function ComboboxItem({ className, children, ...props }) {
|
|
7
7
|
return (_jsxs(ComboboxPrimitive.Item, { "data-slot": "combobox-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ComboboxPrimitive.ItemIndicator, { "data-slot": "combobox-item-indicator", render: _jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }), children: _jsx(CheckIcon, { className: "pointer-events-none size-4 pointer-coarse:size-5" }) })] }));
|
|
8
8
|
}
|
|
@@ -10,7 +10,7 @@ function ComboboxGroup({ className, ...props }) {
|
|
|
10
10
|
return (_jsx(ComboboxPrimitive.Group, { "data-slot": "combobox-group", className: cn(className), ...props }));
|
|
11
11
|
}
|
|
12
12
|
function ComboboxLabel({ className, ...props }) {
|
|
13
|
-
return (_jsx(ComboboxPrimitive.GroupLabel, { "data-slot": "combobox-label", className: cn("px-2
|
|
13
|
+
return (_jsx(ComboboxPrimitive.GroupLabel, { "data-slot": "combobox-label", className: cn("eyebrow px-2 pt-2 pb-1 pointer-coarse:px-3", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
function ComboboxCollection({ ...props }) {
|
|
16
16
|
return _jsx(ComboboxPrimitive.Collection, { "data-slot": "combobox-collection", ...props });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
4
|
+
import { ChevronDown as ChevronDownIcon, Close as XIcon } from "@carbon/icons-react";
|
|
4
5
|
import { cn } from "cn";
|
|
5
|
-
import { ChevronDownIcon, XIcon } from "lucide-react";
|
|
6
6
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput } from "../../input-group.js";
|
|
7
7
|
const Combobox = ComboboxPrimitive.Root;
|
|
8
8
|
function ComboboxValue({ ...props }) {
|
|
@@ -18,7 +18,7 @@ function ComboboxInput({ className, children, disabled = false, showTrigger = tr
|
|
|
18
18
|
return (_jsxs(InputGroup, { className: cn("w-auto", className), children: [_jsx(ComboboxPrimitive.Input, { render: _jsx(InputGroupInput, { disabled: disabled }), ...props }), _jsxs(InputGroupAddon, { align: "inline-end", children: [showTrigger && (_jsx(InputGroupButton, { size: "icon-xs", variant: "ghost", asChild: true, "data-slot": "input-group-button", className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent", disabled: disabled, children: _jsx(ComboboxTrigger, {}) })), showClear && _jsx(ComboboxClear, { disabled: disabled })] }), children] }));
|
|
19
19
|
}
|
|
20
20
|
function ComboboxContent({ className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props }) {
|
|
21
|
-
return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-
|
|
21
|
+
return (_jsx(ComboboxPrimitive.Portal, { children: _jsx(ComboboxPrimitive.Positioner, { side: side, sideOffset: sideOffset, align: align, alignOffset: alignOffset, anchor: anchor, className: "isolate z-50", children: _jsx(ComboboxPrimitive.Popup, { "data-slot": "combobox-content", "data-chips": !!anchor, className: cn("group/combobox-content relative max-h-96 w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-overlay ring-1 ring-border duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-overlay data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className), ...props }) }) }));
|
|
22
22
|
}
|
|
23
23
|
function ComboboxList({ className, ...props }) {
|
|
24
24
|
return (_jsx(ComboboxPrimitive.List, { "data-slot": "combobox-list", className: cn("max-h-[min(calc(--spacing(96)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0", className), ...props }));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Subtract as MinusIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
5
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
5
|
-
import { MinusIcon } from "lucide-react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
8
8
|
return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props }));
|
|
@@ -13,7 +13,7 @@ function InputOTPGroup({ className, ...props }) {
|
|
|
13
13
|
function InputOTPSlot({ index, className, ...props }) {
|
|
14
14
|
const inputOTPContext = React.useContext(OTPInputContext);
|
|
15
15
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
16
|
-
return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-
|
|
16
|
+
return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-input font-mono text-base tabular-nums shadow-xs transition-[color,background-color,border-color,box-shadow] duration-150 ease-out outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-1 data-[active=true]:ring-ring data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) }))] }));
|
|
17
17
|
}
|
|
18
18
|
function InputOTPSeparator({ ...props }) {
|
|
19
19
|
return (_jsx("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: _jsx(MinusIcon, {}) }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkmark as CheckIcon, Subtract as MinusIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CheckIcon } from "lucide-react";
|
|
5
5
|
import * as CheckboxPrimitive from "radix-ui/checkbox";
|
|
6
6
|
function Checkbox({ className, ...props }) {
|
|
7
|
-
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer size-4 shrink-0 rounded-none border border-input shadow-xs transition-shadow outline-none", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children:
|
|
7
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer size-4 shrink-0 rounded-none border border-input shadow-xs transition-shadow outline-none", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", "focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsxs(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "group/indicator flex items-center justify-center text-current", children: [_jsx(CheckIcon, { className: "size-3.5 group-data-[state=indeterminate]/indicator:hidden" }), _jsx(MinusIcon, { className: "hidden size-3.5 group-data-[state=indeterminate]/indicator:block" })] }) }));
|
|
8
8
|
}
|
|
9
9
|
export { Checkbox };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CircleSolid as CircleIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CircleIcon } from "lucide-react";
|
|
5
5
|
import * as RadioGroupPrimitive from "radix-ui/radio-group";
|
|
6
6
|
function RadioGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn("grid gap-3", className), ...props }));
|
|
8
8
|
}
|
|
9
9
|
function RadioGroupItem({ className, ...props }) {
|
|
10
|
-
return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:
|
|
10
|
+
return (_jsx(RadioGroupPrimitive.Item, { "data-slot": "radio-group-item", className: cn("peer aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { "data-slot": "radio-group-indicator", className: "relative flex items-center justify-center", children: _jsx(CircleIcon, { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary" }) }) }));
|
|
11
11
|
}
|
|
12
12
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkmark as CheckIcon, ChevronDown as ChevronDownIcon, ChevronUp as ChevronUpIcon, } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
5
|
import * as SelectPrimitive from "radix-ui/select";
|
|
6
6
|
function Select({ ...props }) {
|
|
7
7
|
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
@@ -13,15 +13,15 @@ function SelectValue({ ...props }) {
|
|
|
13
13
|
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
14
14
|
}
|
|
15
15
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
16
|
-
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "size-4
|
|
16
|
+
return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "size-4 text-muted-foreground" }) })] }));
|
|
17
17
|
}
|
|
18
18
|
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
19
|
-
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md
|
|
20
|
-
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
19
|
+
return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", className: cn("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-overlay ring-1 ring-border data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", position === "popper" &&
|
|
20
|
+
"data-[side=bottom]:translate-y-1.5 data-[side=left]:-translate-x-1.5 data-[side=right]:translate-x-1.5 data-[side=top]:-translate-y-1.5", className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
|
|
21
21
|
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
22
22
|
}
|
|
23
23
|
function SelectLabel({ className, ...props }) {
|
|
24
|
-
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn("px-2
|
|
24
|
+
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn("eyebrow px-2 pt-2 pb-1", className), ...props }));
|
|
25
25
|
}
|
|
26
26
|
function SelectItem({ className, children, ...props }) {
|
|
27
27
|
return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className), ...props, children: [_jsx("span", { "data-slot": "select-item-indicator", className: "absolute right-2 flex size-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "size-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
|
|
@@ -5,6 +5,6 @@ import * as SliderPrimitive from "radix-ui/slider";
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }) {
|
|
7
7
|
const _values = React.useMemo(() => (Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max]), [value, defaultValue, min, max]);
|
|
8
|
-
return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className), ...props, children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn("relative grow overflow-hidden rounded-full bg-
|
|
8
|
+
return (_jsxs(SliderPrimitive.Root, { "data-slot": "slider", defaultValue: defaultValue, value: value, min: min, max: max, className: cn("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className), ...props, children: [_jsx(SliderPrimitive.Track, { "data-slot": "slider-track", className: cn("relative grow overflow-hidden rounded-full bg-input data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"), children: _jsx(SliderPrimitive.Range, { "data-slot": "slider-range", className: cn("absolute bg-primary data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full") }) }), Array.from({ length: _values.length }, (_, index) => (_jsx(SliderPrimitive.Thumb, { "data-slot": "slider-thumb", className: "block size-4 shrink-0 rounded-full border border-primary bg-background shadow-sm transition-[color,box-shadow] focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50" }, index)))] }));
|
|
9
9
|
}
|
|
10
10
|
export { Slider };
|
|
@@ -3,6 +3,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import * as SwitchPrimitive from "radix-ui/switch";
|
|
5
5
|
function Switch({ className, ...props }) {
|
|
6
|
-
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent transition-all outline-none", "data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
6
|
+
return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn("peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent px-px transition-all outline-none", "data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", "focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn("pointer-events-none block size-4 rounded-full bg-background shadow-sm ring-0 transition-transform", "data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") }) }));
|
|
7
7
|
}
|
|
8
8
|
export { Switch };
|
package/dist/form/field/field.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
-
const fieldVariants = cva("group/field flex w-full gap-3
|
|
4
|
+
const fieldVariants = cva("group/field flex w-full gap-3", {
|
|
5
5
|
variants: {
|
|
6
6
|
orientation: {
|
|
7
|
-
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
7
|
+
vertical: ["flex-col gap-2 [&>*]:w-full [&>.sr-only]:w-auto"],
|
|
8
8
|
horizontal: [
|
|
9
9
|
"flex-row items-center",
|
|
10
10
|
"[&>[data-slot=field-label]]:flex-auto",
|
|
11
11
|
"has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
12
12
|
],
|
|
13
13
|
responsive: [
|
|
14
|
-
"flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
14
|
+
"flex-col gap-2 @md/field-group:flex-row @md/field-group:gap-3 @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
|
|
15
15
|
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
|
|
16
16
|
"@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
17
17
|
],
|
|
@@ -36,7 +36,7 @@ function FormItem({ className, ...props }) {
|
|
|
36
36
|
}
|
|
37
37
|
function FormLabel({ className, ...props }) {
|
|
38
38
|
const { error, formItemId } = useFormField();
|
|
39
|
-
return (_jsx(Label, { "data-slot": "form-label", "data-error": !!error, className:
|
|
39
|
+
return (_jsx(Label, { "data-slot": "form-label", "data-error": !!error, className: className, htmlFor: formItemId, ...props }));
|
|
40
40
|
}
|
|
41
41
|
function FormControl({ ...props }) {
|
|
42
42
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
package/dist/form/input-group.js
CHANGED
|
@@ -40,10 +40,10 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
|
40
40
|
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
41
41
|
variants: {
|
|
42
42
|
size: {
|
|
43
|
-
xs: "h-6 gap-1 rounded-
|
|
44
|
-
sm: "h-8 gap-1.5 rounded-
|
|
45
|
-
"icon-xs": "size-6 rounded-
|
|
46
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
43
|
+
xs: "h-6 gap-1 rounded-full px-2.5 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
44
|
+
sm: "h-8 gap-1.5 rounded-full px-3 has-[>svg]:px-2.5",
|
|
45
|
+
"icon-xs": "size-6 rounded-full p-0 has-[>svg]:p-0",
|
|
46
|
+
"icon-sm": "size-8 rounded-full p-0 has-[>svg]:p-0",
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
defaultVariants: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
4
4
|
function NativeSelect({ className, size = "default", ...props }) {
|
|
5
|
-
return (_jsxs("div", { className: "group/native-select relative w-fit has-[select:disabled]:opacity-50", "data-slot": "native-select-wrapper", children: [_jsx("select", { "data-slot": "native-select", "data-size": size, className: cn("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props }), _jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground
|
|
5
|
+
return (_jsxs("div", { className: "group/native-select relative w-fit has-[select:disabled]:opacity-50", "data-slot": "native-select-wrapper", children: [_jsx("select", { "data-slot": "native-select", "data-size": size, className: cn("h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground has-[option[value='']:checked]:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50", "focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className), ...props }), _jsx(ChevronDownIcon, { className: "pointer-events-none absolute top-1/2 right-3.5 size-4 -translate-y-1/2 text-muted-foreground select-none", "aria-hidden": "true", "data-slot": "native-select-icon" })] }));
|
|
6
6
|
}
|
|
7
7
|
function NativeSelectOption({ className, ...props }) {
|
|
8
8
|
return (_jsx("option", { "data-slot": "native-select-option", className: cn("bg-[Canvas] text-[CanvasText]", className), ...props }));
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export * from "./display/media/carousel.js";
|
|
|
21
21
|
export * from "./display/media/carousel-controls.js";
|
|
22
22
|
export * from "./display/rule-grid/rule-grid.js";
|
|
23
23
|
export * from "./display/separator.js";
|
|
24
|
+
export * from "./display/skeletons/layouts/skeleton-rule-grid.js";
|
|
25
|
+
export * from "./display/skeletons/layouts/skeleton-table.js";
|
|
26
|
+
export * from "./display/skeletons/shapes/skeleton-avatar.js";
|
|
27
|
+
export * from "./display/skeletons/shapes/skeleton-button.js";
|
|
28
|
+
export * from "./display/skeletons/shapes/skeleton-text.js";
|
|
29
|
+
export * from "./display/skeletons/skeleton-parts.js";
|
|
24
30
|
export * from "./display/status/alert.js";
|
|
25
31
|
export * from "./display/status/empty.js";
|
|
26
32
|
export * from "./display/status/progress.js";
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,12 @@ export * from "./display/media/carousel.js";
|
|
|
21
21
|
export * from "./display/media/carousel-controls.js";
|
|
22
22
|
export * from "./display/rule-grid/rule-grid.js";
|
|
23
23
|
export * from "./display/separator.js";
|
|
24
|
+
export * from "./display/skeletons/layouts/skeleton-rule-grid.js";
|
|
25
|
+
export * from "./display/skeletons/layouts/skeleton-table.js";
|
|
26
|
+
export * from "./display/skeletons/shapes/skeleton-avatar.js";
|
|
27
|
+
export * from "./display/skeletons/shapes/skeleton-button.js";
|
|
28
|
+
export * from "./display/skeletons/shapes/skeleton-text.js";
|
|
29
|
+
export * from "./display/skeletons/skeleton-parts.js";
|
|
24
30
|
export * from "./display/status/alert.js";
|
|
25
31
|
export * from "./display/status/empty.js";
|
|
26
32
|
export * from "./display/status/progress.js";
|
package/dist/layout/accordion.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
5
5
|
import * as AccordionPrimitive from "radix-ui/accordion";
|
|
6
6
|
function Accordion(props) {
|
|
7
7
|
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
@@ -10,9 +10,9 @@ function AccordionItem({ className, ...props }) {
|
|
|
10
10
|
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("border-b last:border-b-0", className), ...props }));
|
|
11
11
|
}
|
|
12
12
|
function AccordionTrigger({ className, children, ...props }) {
|
|
13
|
-
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("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:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" })] }) }));
|
|
13
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex font-sans tracking-normal", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("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:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, _jsx(ChevronDownIcon, { className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" })] }) }));
|
|
14
14
|
}
|
|
15
15
|
function AccordionContent({ className, children, ...props }) {
|
|
16
|
-
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn("pt-0 pb-4", className), children: children }) }));
|
|
16
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: "overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", ...props, children: _jsx("div", { className: cn("pt-0 pb-4", className), children: children }) }));
|
|
17
17
|
}
|
|
18
18
|
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
package/dist/layout/resizable.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Draggable as GripVerticalIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { GripVerticalIcon } from "lucide-react";
|
|
5
5
|
import * as ResizablePrimitive from "react-resizable-panels";
|
|
6
6
|
function ResizablePanelGroup({ className, ...props }) {
|
|
7
7
|
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ScrollAreaPrimitive from "radix-ui/scroll-area";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
|
|
3
|
+
declare function ScrollArea({ className, children, type, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
|
|
4
4
|
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
|
|
5
5
|
export { ScrollArea, ScrollBar };
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "cn";
|
|
4
4
|
import * as ScrollAreaPrimitive from "radix-ui/scroll-area";
|
|
5
|
-
function ScrollArea({ className, children, ...props }) {
|
|
6
|
-
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
5
|
+
function ScrollArea({ className, children, type = "auto", ...props }) {
|
|
6
|
+
return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", type: type, className: cn("relative", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1", children: children }), _jsx(ScrollBar, {}), _jsx(ScrollAreaPrimitive.Corner, {})] }));
|
|
7
7
|
}
|
|
8
8
|
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
9
|
-
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-
|
|
9
|
+
return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-foreground/20 hover:bg-foreground/30" }) }));
|
|
10
10
|
}
|
|
11
11
|
export { ScrollArea, ScrollBar };
|
|
@@ -25,7 +25,7 @@ function SidebarGroup({ className, ...props }) {
|
|
|
25
25
|
}
|
|
26
26
|
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
27
27
|
const Comp = asChild ? Slot.Root : "div";
|
|
28
|
-
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn("flex h-8 shrink-0 items-center rounded-md px-2
|
|
28
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn("flex h-8 shrink-0 items-center eyebrow rounded-md px-2 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className), ...props }));
|
|
29
29
|
}
|
|
30
30
|
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
31
31
|
const Comp = asChild ? Slot.Root : "button";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SidePanelOpen as PanelLeftIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { PanelLeftIcon } from "lucide-react";
|
|
5
5
|
import { Button } from "../../action/button.js";
|
|
6
6
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle, } from "../../overlay/sheet.js";
|
|
7
7
|
import { SIDEBAR_WIDTH_MOBILE, useSidebar } from "./sidebar-context.js";
|
package/dist/layout/tabs.js
CHANGED
|
@@ -4,13 +4,13 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "cn";
|
|
5
5
|
import * as TabsPrimitive from "radix-ui/tabs";
|
|
6
6
|
function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
7
|
-
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", "data-orientation": orientation, orientation: orientation, className: cn("group/tabs flex gap-
|
|
7
|
+
return (_jsx(TabsPrimitive.Root, { "data-slot": "tabs", "data-orientation": orientation, orientation: orientation, className: cn("group/tabs flex gap-4 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:gap-6", className), ...props }));
|
|
8
8
|
}
|
|
9
9
|
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default: "bg-muted",
|
|
13
|
-
line: "gap-1 bg-transparent",
|
|
13
|
+
line: "gap-1 bg-transparent group-data-[orientation=horizontal]/tabs:border-b group-data-[orientation=horizontal]/tabs:border-line group-data-[orientation=vertical]/tabs:border-r group-data-[orientation=vertical]/tabs:border-line",
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
defaultVariants: {
|
|
@@ -21,7 +21,7 @@ function TabsList({ className, variant = "default", ...props }) {
|
|
|
21
21
|
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", "data-variant": variant, className: cn(tabsListVariants({ variant }), className), ...props }));
|
|
22
22
|
}
|
|
23
23
|
function TabsTrigger({ className, ...props }) {
|
|
24
|
-
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-[color,background-color,border-color,box-shadow] duration-150 ease-out group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent", "data-[state=active]:bg-background data-[state=active]:text-foreground
|
|
24
|
+
return (_jsx(TabsPrimitive.Trigger, { "data-slot": "tabs-trigger", className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-[color,background-color,border-color,box-shadow] duration-150 ease-out group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent", "data-[state=active]:bg-background data-[state=active]:text-foreground group-data-[variant=default]/tabs-list:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-4px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100", className), ...props }));
|
|
25
25
|
}
|
|
26
26
|
const visibleKeyboardFocusOutline = "focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring/70";
|
|
27
27
|
function TabsContent({ className, ...props }) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRight, OverflowMenuHorizontal as MoreHorizontal } from "@carbon/icons-react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
|
-
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
4
4
|
import * as Slot from "radix-ui/slot";
|
|
5
5
|
function Breadcrumb({ ...props }) {
|
|
6
6
|
return _jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkmark as CheckIcon, CircleSolid as CircleIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CheckIcon, CircleIcon } from "lucide-react";
|
|
5
5
|
import * as MenubarPrimitive from "radix-ui/menubar";
|
|
6
6
|
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
7
7
|
return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-inset": inset, "data-variant": variant, className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
|
|
@@ -16,7 +16,7 @@ function MenubarRadioItem({ className, children, ...props }) {
|
|
|
16
16
|
return (_jsxs(MenubarPrimitive.RadioItem, { "data-slot": "menubar-radio-item", className: cn("relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
function MenubarLabel({ className, inset, ...props }) {
|
|
19
|
-
return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn("px-2
|
|
19
|
+
return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", "data-inset": inset, className: cn("eyebrow px-2 pt-2 pb-1 data-[inset]:pl-8", className), ...props }));
|
|
20
20
|
}
|
|
21
21
|
function MenubarSeparator({ className, ...props }) {
|
|
22
22
|
return (_jsx(MenubarPrimitive.Separator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight as ChevronRightIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { ChevronRightIcon } from "lucide-react";
|
|
5
5
|
import * as MenubarPrimitive from "radix-ui/menubar";
|
|
6
6
|
function MenubarSub({ ...props }) {
|
|
7
7
|
return _jsx(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
@@ -10,6 +10,6 @@ function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
|
10
10
|
return (_jsxs(MenubarPrimitive.SubTrigger, { "data-slot": "menubar-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props, children: [children, _jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })] }));
|
|
11
11
|
}
|
|
12
12
|
function MenubarSubContent({ className, ...props }) {
|
|
13
|
-
return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
13
|
+
return (_jsx(MenubarPrimitive.SubContent, { "data-slot": "menubar-sub-content", className: cn("z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }));
|
|
14
14
|
}
|
|
15
15
|
export { MenubarSub, MenubarSubContent, MenubarSubTrigger };
|
|
@@ -17,7 +17,7 @@ function MenubarPortal({ ...props }) {
|
|
|
17
17
|
function MenubarTrigger({ className, ...props }) {
|
|
18
18
|
return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn("flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props }));
|
|
19
19
|
}
|
|
20
|
-
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset =
|
|
21
|
-
return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-
|
|
20
|
+
function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 6, ...props }) {
|
|
21
|
+
return (_jsx(MenubarPortal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, alignOffset: alignOffset, sideOffset: sideOffset, className: cn("z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-overlay data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", className), ...props }) }));
|
|
22
22
|
}
|
|
23
23
|
export { Menubar, MenubarContent, MenubarGroup, MenubarMenu, MenubarPortal, MenubarTrigger };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown as ChevronDownIcon } from "@carbon/icons-react";
|
|
2
3
|
import { cva } from "class-variance-authority";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { ChevronDownIcon } from "lucide-react";
|
|
5
5
|
import * as NavigationMenuPrimitive from "radix-ui/navigation-menu";
|
|
6
6
|
function NavigationMenu({ className, children, viewport = true, ...props }) {
|
|
7
7
|
return (_jsxs(NavigationMenuPrimitive.Root, { "data-slot": "navigation-menu", "data-viewport": viewport, className: cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, viewport && _jsx(NavigationMenuViewport, {})] }));
|
|
@@ -17,10 +17,10 @@ function NavigationMenuTrigger({ className, children, ...props }) {
|
|
|
17
17
|
return (_jsxs(NavigationMenuPrimitive.Trigger, { "data-slot": "navigation-menu-trigger", className: cn(navigationMenuTriggerStyle(), "group", className), ...props, children: [children, " ", _jsx(ChevronDownIcon, { className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180", "aria-hidden": "true" })] }));
|
|
18
18
|
}
|
|
19
19
|
function NavigationMenuContent({ className, ...props }) {
|
|
20
|
-
return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95", className), ...props }));
|
|
20
|
+
return (_jsx(NavigationMenuPrimitive.Content, { "data-slot": "navigation-menu-content", className: cn("top-0 left-0 w-full p-2 pr-2.5 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-overlay group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95", className), ...props }));
|
|
21
21
|
}
|
|
22
22
|
function NavigationMenuViewport({ className, ...props }) {
|
|
23
|
-
return (_jsx("div", { className: cn("absolute top-full left-0 isolate z-50 flex justify-center"), children: _jsx(NavigationMenuPrimitive.Viewport, { "data-slot": "navigation-menu-viewport", className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ...props }) }));
|
|
23
|
+
return (_jsx("div", { className: cn("absolute top-full left-0 isolate z-50 flex justify-center"), children: _jsx(NavigationMenuPrimitive.Viewport, { "data-slot": "navigation-menu-viewport", className: cn("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-overlay data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", className), ...props }) }));
|
|
24
24
|
}
|
|
25
25
|
function NavigationMenuLink({ className, ...props }) {
|
|
26
26
|
return (_jsx(NavigationMenuPrimitive.Link, { "data-slot": "navigation-menu-link", className: cn("flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-1 data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground data-[active=true]:hover:bg-accent data-[active=true]:focus:bg-accent [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, OverflowMenuHorizontal as MoreHorizontalIcon, } from "@carbon/icons-react";
|
|
2
3
|
import { cn } from "cn";
|
|
3
|
-
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
|
|
4
4
|
import { buttonVariants } from "../action/button.js";
|
|
5
5
|
function Pagination({ className, ...props }) {
|
|
6
6
|
return (_jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto flex w-full justify-center", className), ...props }));
|
|
@@ -11,17 +11,18 @@ function PaginationContent({ className, ...props }) {
|
|
|
11
11
|
function PaginationItem({ ...props }) {
|
|
12
12
|
return _jsx("li", { "data-slot": "pagination-item", ...props });
|
|
13
13
|
}
|
|
14
|
+
const activePageEmphasis = "border-input bg-muted font-semibold text-foreground dark:bg-muted";
|
|
14
15
|
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
15
16
|
return (_jsx("a", { "aria-current": isActive ? "page" : undefined, "data-slot": "pagination-link", "data-active": isActive, className: cn(buttonVariants({
|
|
16
17
|
variant: isActive ? "outline" : "ghost",
|
|
17
18
|
size,
|
|
18
|
-
}), className), ...props }));
|
|
19
|
+
}), isActive ? activePageEmphasis : "text-muted-foreground hover:text-foreground", className), ...props }));
|
|
19
20
|
}
|
|
20
21
|
function PaginationPrevious({ className, ...props }) {
|
|
21
|
-
return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 px-2.5 sm:pl-2.5", className), ...props, children: [_jsx(ChevronLeftIcon, {}), _jsx("span", { className: "hidden sm:block", children: "Previous" })] }));
|
|
22
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("gap-1 px-2.5 text-foreground sm:pl-2.5", className), ...props, children: [_jsx(ChevronLeftIcon, {}), _jsx("span", { className: "hidden sm:block", children: "Previous" })] }));
|
|
22
23
|
}
|
|
23
24
|
function PaginationNext({ className, ...props }) {
|
|
24
|
-
return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 px-2.5 sm:pr-2.5", className), ...props, children: [_jsx("span", { className: "hidden sm:block", children: "Next" }), _jsx(ChevronRightIcon, {})] }));
|
|
25
|
+
return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("gap-1 px-2.5 text-foreground sm:pr-2.5", className), ...props, children: [_jsx("span", { className: "hidden sm:block", children: "Next" }), _jsx(ChevronRightIcon, {})] }));
|
|
25
26
|
}
|
|
26
27
|
function PaginationEllipsis({ className, ...props }) {
|
|
27
28
|
return (_jsxs("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex size-9 items-center justify-center", className), ...props, children: [_jsx(MoreHorizontalIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "More pages" })] }));
|
|
@@ -13,10 +13,10 @@ function AlertDialogPortal({ ...props }) {
|
|
|
13
13
|
return _jsx(AlertDialogPrimitive.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
14
14
|
}
|
|
15
15
|
function AlertDialogOverlay({ className, ...props }) {
|
|
16
|
-
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 z-[300] bg-
|
|
16
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 z-[300] bg-scrim backdrop-blur-[2px] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
|
|
17
17
|
}
|
|
18
18
|
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
19
|
-
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("group/alert-dialog-content fixed top-[50%] left-[50%] z-[300] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-
|
|
19
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", "data-size": size, className: cn("group/alert-dialog-content fixed top-[50%] left-[50%] z-[300] grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-line bg-popover p-6 shadow-overlay duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg", className), ...props })] }));
|
|
20
20
|
}
|
|
21
21
|
function AlertDialogHeader({ className, ...props }) {
|
|
22
22
|
return (_jsx("div", { "data-slot": "alert-dialog-header", className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className), ...props }));
|
|
@@ -25,7 +25,7 @@ function AlertDialogFooter({ className, ...props }) {
|
|
|
25
25
|
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
26
26
|
}
|
|
27
27
|
function AlertDialogTitle({ className, ...props }) {
|
|
28
|
-
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-
|
|
28
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-base font-semibold tracking-tight sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className), ...props }));
|
|
29
29
|
}
|
|
30
30
|
function AlertDialogDescription({ className, ...props }) {
|
|
31
31
|
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Checkmark as CheckIcon, CircleSolid as CircleIcon } from "@carbon/icons-react";
|
|
3
4
|
import { cn } from "cn";
|
|
4
|
-
import { CheckIcon, CircleIcon } from "lucide-react";
|
|
5
5
|
import * as ContextMenuPrimitive from "radix-ui/context-menu";
|
|
6
6
|
function ContextMenuItem({ className, inset, variant = "default", ...props }) {
|
|
7
7
|
return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-inset": inset, "data-variant": variant, className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!", className), ...props }));
|
|
@@ -16,7 +16,7 @@ function ContextMenuRadioItem({ className, children, ...props }) {
|
|
|
16
16
|
return (_jsxs(ContextMenuPrimitive.RadioItem, { "data-slot": "context-menu-radio-item", className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: _jsx(ContextMenuPrimitive.ItemIndicator, { children: _jsx(CircleIcon, { className: "size-2 fill-current" }) }) }), children] }));
|
|
17
17
|
}
|
|
18
18
|
function ContextMenuLabel({ className, inset, ...props }) {
|
|
19
|
-
return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("px-2
|
|
19
|
+
return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", "data-inset": inset, className: cn("eyebrow px-2 pt-2 pb-1 data-[inset]:pl-8", className), ...props }));
|
|
20
20
|
}
|
|
21
21
|
function ContextMenuSeparator({ className, ...props }) {
|
|
22
22
|
return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
|