@ciridae/ui 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/README.md +31 -0
- package/dist/components/agentic/agent-card.d.ts +28 -0
- package/dist/components/agentic/agent-card.js +27 -0
- package/dist/components/agentic/agent-composer.d.ts +44 -0
- package/dist/components/agentic/agent-composer.js +104 -0
- package/dist/components/agentic/agent-context.d.ts +28 -0
- package/dist/components/agentic/agent-context.js +102 -0
- package/dist/components/agentic/agent-plan.d.ts +27 -0
- package/dist/components/agentic/agent-plan.js +43 -0
- package/dist/components/agentic/agent-queue.d.ts +46 -0
- package/dist/components/agentic/agent-queue.js +53 -0
- package/dist/components/agentic/agent-task.d.ts +16 -0
- package/dist/components/agentic/agent-task.js +20 -0
- package/dist/components/agentic/approval-request.d.ts +24 -0
- package/dist/components/agentic/approval-request.js +57 -0
- package/dist/components/agentic/artifact.d.ts +24 -0
- package/dist/components/agentic/artifact.js +72 -0
- package/dist/components/agentic/attachments.d.ts +124 -0
- package/dist/components/agentic/attachments.js +595 -0
- package/dist/components/agentic/audio-player.d.ts +16 -0
- package/dist/components/agentic/audio-player.js +21 -0
- package/dist/components/agentic/canvas.d.ts +10 -0
- package/dist/components/agentic/canvas.js +22 -0
- package/dist/components/agentic/clipboard.d.ts +2 -0
- package/dist/components/agentic/clipboard.js +12 -0
- package/dist/components/agentic/code-block.d.ts +43 -0
- package/dist/components/agentic/code-block.js +92 -0
- package/dist/components/agentic/commit.d.ts +57 -0
- package/dist/components/agentic/commit.js +85 -0
- package/dist/components/agentic/connection.d.ts +3 -0
- package/dist/components/agentic/connection.js +8 -0
- package/dist/components/agentic/controls.d.ts +6 -0
- package/dist/components/agentic/controls.js +7 -0
- package/dist/components/agentic/conversation.d.ts +25 -0
- package/dist/components/agentic/conversation.js +56 -0
- package/dist/components/agentic/edge.d.ts +8 -0
- package/dist/components/agentic/edge.js +65 -0
- package/dist/components/agentic/effort-selector.d.ts +43 -0
- package/dist/components/agentic/effort-selector.js +47 -0
- package/dist/components/agentic/environment-variables.d.ts +32 -0
- package/dist/components/agentic/environment-variables.js +66 -0
- package/dist/components/agentic/file-tree.d.ts +24 -0
- package/dist/components/agentic/file-tree.js +56 -0
- package/dist/components/agentic/image.d.ts +9 -0
- package/dist/components/agentic/image.js +11 -0
- package/dist/components/agentic/inline-citation.d.ts +40 -0
- package/dist/components/agentic/inline-citation.js +111 -0
- package/dist/components/agentic/jsx-preview.d.ts +19 -0
- package/dist/components/agentic/jsx-preview.js +34 -0
- package/dist/components/agentic/message-branch.d.ts +20 -0
- package/dist/components/agentic/message-branch.js +83 -0
- package/dist/components/agentic/message-response.css +265 -0
- package/dist/components/agentic/message-response.css.d.ts +2 -0
- package/dist/components/agentic/message.d.ts +27 -0
- package/dist/components/agentic/message.js +57 -0
- package/dist/components/agentic/mic-selector.d.ts +58 -0
- package/dist/components/agentic/mic-selector.js +173 -0
- package/dist/components/agentic/model-selector.d.ts +39 -0
- package/dist/components/agentic/model-selector.js +47 -0
- package/dist/components/agentic/node.d.ts +26 -0
- package/dist/components/agentic/node.js +29 -0
- package/dist/components/agentic/open-in-chat.d.ts +9 -0
- package/dist/components/agentic/open-in-chat.js +8 -0
- package/dist/components/agentic/package-info.d.ts +30 -0
- package/dist/components/agentic/package-info.js +44 -0
- package/dist/components/agentic/panel.d.ts +6 -0
- package/dist/components/agentic/panel.js +7 -0
- package/dist/components/agentic/persona.d.ts +16 -0
- package/dist/components/agentic/persona.js +116 -0
- package/dist/components/agentic/prompt-input-action-menu.d.ts +16 -0
- package/dist/components/agentic/prompt-input-action-menu.js +22 -0
- package/dist/components/agentic/prompt-input-command.d.ts +18 -0
- package/dist/components/agentic/prompt-input-command.js +25 -0
- package/dist/components/agentic/prompt-input-hover-card.d.ts +10 -0
- package/dist/components/agentic/prompt-input-hover-card.js +13 -0
- package/dist/components/agentic/prompt-input-select.d.ts +14 -0
- package/dist/components/agentic/prompt-input-select.js +19 -0
- package/dist/components/agentic/prompt-input-tabs.d.ts +17 -0
- package/dist/components/agentic/prompt-input-tabs.js +45 -0
- package/dist/components/agentic/prompt-input.d.ts +79 -0
- package/dist/components/agentic/prompt-input.js +206 -0
- package/dist/components/agentic/reasoning.d.ts +21 -0
- package/dist/components/agentic/reasoning.js +106 -0
- package/dist/components/agentic/run-checkpoint.d.ts +13 -0
- package/dist/components/agentic/run-checkpoint.js +19 -0
- package/dist/components/agentic/run-trace.d.ts +30 -0
- package/dist/components/agentic/run-trace.js +56 -0
- package/dist/components/agentic/sandbox.d.ts +24 -0
- package/dist/components/agentic/sandbox.js +33 -0
- package/dist/components/agentic/schema-display.d.ts +39 -0
- package/dist/components/agentic/schema-display.js +56 -0
- package/dist/components/agentic/shimmer.d.ts +11 -0
- package/dist/components/agentic/shimmer.js +16 -0
- package/dist/components/agentic/snippet.d.ts +18 -0
- package/dist/components/agentic/snippet.js +35 -0
- package/dist/components/agentic/sources.d.ts +16 -0
- package/dist/components/agentic/sources.js +17 -0
- package/dist/components/agentic/speech-input.d.ts +24 -0
- package/dist/components/agentic/speech-input.js +30 -0
- package/dist/components/agentic/stack-trace.d.ts +27 -0
- package/dist/components/agentic/stack-trace.js +76 -0
- package/dist/components/agentic/suggestion.d.ts +12 -0
- package/dist/components/agentic/suggestion.js +15 -0
- package/dist/components/agentic/terminal.d.ts +24 -0
- package/dist/components/agentic/terminal.js +47 -0
- package/dist/components/agentic/test-results.d.ts +51 -0
- package/dist/components/agentic/test-results.js +83 -0
- package/dist/components/agentic/theme.d.ts +5 -0
- package/dist/components/agentic/theme.js +31 -0
- package/dist/components/agentic/tool.d.ts +25 -0
- package/dist/components/agentic/tool.js +73 -0
- package/dist/components/agentic/toolbar.d.ts +6 -0
- package/dist/components/agentic/toolbar.js +7 -0
- package/dist/components/agentic/transcription.d.ts +20 -0
- package/dist/components/agentic/transcription.js +32 -0
- package/dist/components/agentic/types.d.ts +172 -0
- package/dist/components/agentic/types.js +1 -0
- package/dist/components/agentic/use-controllable-state.d.ts +6 -0
- package/dist/components/agentic/use-controllable-state.js +13 -0
- package/dist/components/agentic/voice-selector.d.ts +69 -0
- package/dist/components/agentic/voice-selector.js +122 -0
- package/dist/components/agentic/web-preview.d.ts +25 -0
- package/dist/components/agentic/web-preview.js +33 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +17 -0
- package/dist/components/ui/alert-dialog.d.ts +22 -0
- package/dist/components/ui/alert-dialog.js +51 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +24 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +7 -0
- package/dist/components/ui/avatar.d.ts +11 -0
- package/dist/components/ui/avatar.js +22 -0
- package/dist/components/ui/badge-variants.d.ts +100 -0
- package/dist/components/ui/badge-variants.js +140 -0
- package/dist/components/ui/badge.d.ts +6 -0
- package/dist/components/ui/badge.js +9 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +27 -0
- package/dist/components/ui/button-group-variants.d.ts +6 -0
- package/dist/components/ui/button-group-variants.js +13 -0
- package/dist/components/ui/button-group.d.ts +8 -0
- package/dist/components/ui/button-group.js +16 -0
- package/dist/components/ui/button-variants.d.ts +133 -0
- package/dist/components/ui/button-variants.js +170 -0
- package/dist/components/ui/button.d.ts +8 -0
- package/dist/components/ui/button.js +67 -0
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.js +99 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.js +28 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.js +104 -0
- package/dist/components/ui/chart-context.d.ts +33 -0
- package/dist/components/ui/chart-context.js +36 -0
- package/dist/components/ui/chart-panel.d.ts +11 -0
- package/dist/components/ui/chart-panel.js +6 -0
- package/dist/components/ui/chart-tooltip.d.ts +13 -0
- package/dist/components/ui/chart-tooltip.js +84 -0
- package/dist/components/ui/chart.d.ts +23 -0
- package/dist/components/ui/chart.js +52 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +9 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +12 -0
- package/dist/components/ui/combobox-anchor.d.ts +3 -0
- package/dist/components/ui/combobox-anchor.js +5 -0
- package/dist/components/ui/combobox.d.ts +23 -0
- package/dist/components/ui/combobox.js +54 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.js +38 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.js +63 -0
- package/dist/components/ui/data-table.d.ts +17 -0
- package/dist/components/ui/data-table.js +26 -0
- package/dist/components/ui/dialog.d.ts +22 -0
- package/dist/components/ui/dialog.js +48 -0
- package/dist/components/ui/direction-context.d.ts +3 -0
- package/dist/components/ui/direction-context.js +3 -0
- package/dist/components/ui/direction.d.ts +6 -0
- package/dist/components/ui/direction.js +7 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +47 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.js +63 -0
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/empty.js +33 -0
- package/dist/components/ui/expandable-data-table.d.ts +24 -0
- package/dist/components/ui/expandable-data-table.js +62 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.js +74 -0
- package/dist/components/ui/file-upload-field-parts.d.ts +21 -0
- package/dist/components/ui/file-upload-field-parts.js +55 -0
- package/dist/components/ui/file-upload-field.d.ts +15 -0
- package/dist/components/ui/file-upload-field.js +85 -0
- package/dist/components/ui/form-context.d.ts +23 -0
- package/dist/components/ui/form-context.js +35 -0
- package/dist/components/ui/form.d.ts +12 -0
- package/dist/components/ui/form.js +38 -0
- package/dist/components/ui/hover-card.d.ts +10 -0
- package/dist/components/ui/hover-card.js +22 -0
- package/dist/components/ui/input-group.d.ts +16 -0
- package/dist/components/ui/input-group.js +62 -0
- package/dist/components/ui/input-otp.d.ts +11 -0
- package/dist/components/ui/input-otp.js +21 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +6 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.js +66 -0
- package/dist/components/ui/kbd.d.ts +3 -0
- package/dist/components/ui/kbd.js +9 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +7 -0
- package/dist/components/ui/loading-state.d.ts +27 -0
- package/dist/components/ui/loading-state.js +44 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.js +63 -0
- package/dist/components/ui/metrics-strip.d.ts +7 -0
- package/dist/components/ui/metrics-strip.js +18 -0
- package/dist/components/ui/native-select.d.ts +7 -0
- package/dist/components/ui/native-select.js +13 -0
- package/dist/components/ui/navigation-menu-variants.d.ts +2 -0
- package/dist/components/ui/navigation-menu-variants.js +3 -0
- package/dist/components/ui/navigation-menu.d.ts +13 -0
- package/dist/components/ui/navigation-menu.js +30 -0
- package/dist/components/ui/page-header.d.ts +19 -0
- package/dist/components/ui/page-header.js +36 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +29 -0
- package/dist/components/ui/popover.d.ts +14 -0
- package/dist/components/ui/popover.js +34 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +8 -0
- package/dist/components/ui/property-list.d.ts +6 -0
- package/dist/components/ui/property-list.js +15 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +11 -0
- package/dist/components/ui/registry-docs-api.d.ts +11 -0
- package/dist/components/ui/registry-docs-api.js +9 -0
- package/dist/components/ui/registry-docs-code.d.ts +19 -0
- package/dist/components/ui/registry-docs-code.js +78 -0
- package/dist/components/ui/registry-docs-showcase.d.ts +11 -0
- package/dist/components/ui/registry-docs-showcase.js +27 -0
- package/dist/components/ui/registry-docs.d.ts +27 -0
- package/dist/components/ui/registry-docs.js +32 -0
- package/dist/components/ui/resizable.d.ts +7 -0
- package/dist/components/ui/resizable.js +15 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +10 -0
- package/dist/components/ui/select.d.ts +15 -0
- package/dist/components/ui/select.js +38 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +7 -0
- package/dist/components/ui/sheet.d.ts +21 -0
- package/dist/components/ui/sheet.js +62 -0
- package/dist/components/ui/sidebar/context.d.ts +21 -0
- package/dist/components/ui/sidebar/context.js +15 -0
- package/dist/components/ui/sidebar/group.d.ts +10 -0
- package/dist/components/ui/sidebar/group.js +18 -0
- package/dist/components/ui/sidebar/layout.d.ts +17 -0
- package/dist/components/ui/sidebar/layout.js +73 -0
- package/dist/components/ui/sidebar/menu.d.ts +30 -0
- package/dist/components/ui/sidebar/menu.js +64 -0
- package/dist/components/ui/sidebar/provider.d.ts +7 -0
- package/dist/components/ui/sidebar/provider.js +53 -0
- package/dist/components/ui/sidebar/rail.d.ts +3 -0
- package/dist/components/ui/sidebar/rail.js +12 -0
- package/dist/components/ui/sidebar/trigger.d.ts +4 -0
- package/dist/components/ui/sidebar/trigger.js +16 -0
- package/dist/components/ui/sidebar-account-menu-theme.d.ts +7 -0
- package/dist/components/ui/sidebar-account-menu-theme.js +32 -0
- package/dist/components/ui/sidebar-account-menu.d.ts +14 -0
- package/dist/components/ui/sidebar-account-menu.js +51 -0
- package/dist/components/ui/sidebar.d.ts +7 -0
- package/dist/components/ui/sidebar.js +7 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +15 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +9 -0
- package/dist/components/ui/sonner.d.ts +3 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.js +7 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +28 -0
- package/dist/components/ui/tabs-variants.d.ts +6 -0
- package/dist/components/ui/tabs-variants.js +13 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.js +17 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +6 -0
- package/dist/components/ui/toggle-group.d.ts +9 -0
- package/dist/components/ui/toggle-group.js +24 -0
- package/dist/components/ui/toggle-variants.d.ts +7 -0
- package/dist/components/ui/toggle-variants.js +19 -0
- package/dist/components/ui/toggle.d.ts +5 -0
- package/dist/components/ui/toggle.js +9 -0
- package/dist/components/ui/tooltip.d.ts +11 -0
- package/dist/components/ui/tooltip.js +25 -0
- package/dist/components/ui/workflow-timeline.d.ts +20 -0
- package/dist/components/ui/workflow-timeline.js +92 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +8 -0
- package/dist/styled-system/css/conditions.mjs +36 -0
- package/dist/styled-system/css/css.mjs +45 -0
- package/dist/styled-system/css/cva.mjs +87 -0
- package/dist/styled-system/css/cx.mjs +15 -0
- package/dist/styled-system/css/index.mjs +4 -0
- package/dist/styled-system/css/sva.mjs +46 -0
- package/dist/styled-system/helpers.mjs +316 -0
- package/dist/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/dist/styled-system/patterns/bleed.mjs +24 -0
- package/dist/styled-system/patterns/box.mjs +15 -0
- package/dist/styled-system/patterns/center.mjs +21 -0
- package/dist/styled-system/patterns/circle.mjs +25 -0
- package/dist/styled-system/patterns/container.mjs +21 -0
- package/dist/styled-system/patterns/cq.mjs +21 -0
- package/dist/styled-system/patterns/divider.mjs +25 -0
- package/dist/styled-system/patterns/flex.mjs +26 -0
- package/dist/styled-system/patterns/float.mjs +52 -0
- package/dist/styled-system/patterns/grid-item.mjs +25 -0
- package/dist/styled-system/patterns/grid.mjs +27 -0
- package/dist/styled-system/patterns/hstack.mjs +24 -0
- package/dist/styled-system/patterns/index.mjs +20 -0
- package/dist/styled-system/patterns/link-overlay.mjs +24 -0
- package/dist/styled-system/patterns/spacer.mjs +25 -0
- package/dist/styled-system/patterns/square.mjs +24 -0
- package/dist/styled-system/patterns/stack.mjs +24 -0
- package/dist/styled-system/patterns/visually-hidden.mjs +18 -0
- package/dist/styled-system/patterns/vstack.mjs +24 -0
- package/dist/styled-system/patterns/wrap.mjs +25 -0
- package/dist/styled-system/styles.css +1089 -0
- package/dist/styled-system/styles.css.d.ts +2 -0
- package/dist/styled-system/tokens/index.mjs +2304 -0
- package/package.json +688 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CircleIcon } from "lucide-react";
|
|
3
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function RadioGroup({ className, ...props }) {
|
|
6
|
+
return (_jsx(RadioGroupPrimitive.Root, { "data-slot": "radio-group", className: cn("grid gap-3", className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function RadioGroupItem({ className, ...props }) {
|
|
9
|
+
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-[var(--focus-ring-width)] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 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" }) }) }));
|
|
10
|
+
}
|
|
11
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type RegistryDocsApiProp = {
|
|
2
|
+
defaultValue?: string;
|
|
3
|
+
description: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
declare function RegistryDocsApiTable({ props }: {
|
|
8
|
+
props: RegistryDocsApiProp[];
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { RegistryDocsApiTable };
|
|
11
|
+
export type { RegistryDocsApiProp };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@ciridae/ui/table";
|
|
3
|
+
function RegistryDocsApiTable({ props }) {
|
|
4
|
+
return (_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: "Prop" }), _jsx(TableHead, { children: "Type" }), _jsx(TableHead, { children: "Default" }), _jsx(TableHead, { children: "Description" })] }) }), _jsx(TableBody, { children: props.map((prop) => (_jsx(RegistryDocsApiTableRow, { prop: prop }, prop.name))) })] }));
|
|
5
|
+
}
|
|
6
|
+
function RegistryDocsApiTableRow({ prop }) {
|
|
7
|
+
return (_jsxs(TableRow, { children: [_jsx(TableCell, { children: _jsx("code", { className: "font-mono text-xs", children: prop.name }) }), _jsx(TableCell, { className: "max-w-72", children: _jsx("code", { className: "font-mono text-xs text-muted-foreground whitespace-normal", children: prop.type }) }), _jsx(TableCell, { children: prop.defaultValue ? (_jsx("code", { className: "font-mono text-xs text-muted-foreground", children: prop.defaultValue })) : (_jsx("span", { className: "text-muted-foreground", children: "None" })) }), _jsx(TableCell, { className: "whitespace-normal text-muted-foreground", children: prop.description })] }));
|
|
8
|
+
}
|
|
9
|
+
export { RegistryDocsApiTable };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type RegistryDocsCodeBlockProps = Omit<React.HTMLAttributes<HTMLElement>, "children"> & {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
code?: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
language?: string;
|
|
7
|
+
};
|
|
8
|
+
declare function RegistryDocsCodeBlock({ children, className, code, label, language, ...props }: RegistryDocsCodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function RegistryDocsCodeSnippet({ children, className, code, language, ...props }: RegistryDocsCodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function RegistryDocsCommand({ className, label, value, ...props }: Omit<React.ComponentProps<"div">, "children"> & {
|
|
11
|
+
label?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function RegistryDocsCopyButton({ ariaLabel, showLabel, value, }: {
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
showLabel?: boolean;
|
|
17
|
+
value: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export { RegistryDocsCodeBlock, RegistryDocsCodeSnippet, RegistryDocsCommand, RegistryDocsCopyButton, };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
4
|
+
import { codeToHtml } from "shiki/bundle/web";
|
|
5
|
+
import { Button } from "@ciridae/ui/button";
|
|
6
|
+
import { cn } from "@ciridae/ui/utils";
|
|
7
|
+
function RegistryDocsCodeBlock({ children, className, code, label, language = "tsx", ...props }) {
|
|
8
|
+
return (_jsx(RegistryDocsCodeFrame, { code: code, label: label, children: _jsx(RegistryDocsCodeSnippet, { className: className, code: code, language: language, ...props, children: children }) }));
|
|
9
|
+
}
|
|
10
|
+
function RegistryDocsCodeSnippet({ children, className, code, language = "tsx", ...props }) {
|
|
11
|
+
const highlightedHtml = useHighlightedCode(code, language);
|
|
12
|
+
const hasCode = typeof code === "string";
|
|
13
|
+
if (hasCode && highlightedHtml) {
|
|
14
|
+
return _jsx(HighlightedCodeBlock, { className: className, html: highlightedHtml, ...props });
|
|
15
|
+
}
|
|
16
|
+
return (_jsx("pre", { "data-slot": "registry-docs-code-block", className: cn("overflow-x-auto p-(--panel-padding) font-mono text-xs leading-relaxed text-foreground", className), ...props, children: hasCode ? _jsx("code", { children: code }) : children }));
|
|
17
|
+
}
|
|
18
|
+
function useHighlightedCode(code, language) {
|
|
19
|
+
const [highlightedHtml, setHighlightedHtml] = React.useState();
|
|
20
|
+
const hasCode = typeof code === "string";
|
|
21
|
+
React.useEffect(() => {
|
|
22
|
+
if (!hasCode) {
|
|
23
|
+
setHighlightedHtml(undefined);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
let active = true;
|
|
27
|
+
setHighlightedHtml(undefined);
|
|
28
|
+
codeToHtml(code, {
|
|
29
|
+
defaultColor: false,
|
|
30
|
+
lang: language,
|
|
31
|
+
themes: { dark: "github-dark", light: "github-light" },
|
|
32
|
+
})
|
|
33
|
+
.then((html) => {
|
|
34
|
+
if (active)
|
|
35
|
+
setHighlightedHtml(html);
|
|
36
|
+
})
|
|
37
|
+
.catch(() => {
|
|
38
|
+
if (active)
|
|
39
|
+
setHighlightedHtml(undefined);
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
active = false;
|
|
43
|
+
};
|
|
44
|
+
}, [code, hasCode, language]);
|
|
45
|
+
return highlightedHtml;
|
|
46
|
+
}
|
|
47
|
+
function HighlightedCodeBlock({ className, html, ...props }) {
|
|
48
|
+
return (_jsx("div", { "data-slot": "registry-docs-code-block", className: cn("overflow-hidden p-(--panel-padding) font-mono text-xs leading-relaxed text-foreground", "[&_.shiki]:m-0 [&_.shiki]:overflow-x-auto [&_.shiki]:p-0 [&_.shiki]:font-mono [&_.shiki]:text-xs [&_.shiki]:leading-relaxed", className), dangerouslySetInnerHTML: { __html: html }, ...props }));
|
|
49
|
+
}
|
|
50
|
+
function RegistryDocsCodeFrame({ children, code, label, }) {
|
|
51
|
+
return (_jsxs("div", { "data-slot": "registry-docs-code-frame", className: "overflow-hidden rounded-lg border bg-muted/30", children: [label || code ? _jsx(RegistryDocsCodeHeader, { code: code, label: label }) : null, children] }));
|
|
52
|
+
}
|
|
53
|
+
function RegistryDocsCodeHeader({ code, label }) {
|
|
54
|
+
return (_jsxs("div", { className: "flex min-w-0 items-center gap-2 border-b bg-muted/20 px-3 py-2", children: [label ? (_jsx("div", { className: "min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground", children: label })) : (_jsx("div", { className: "min-w-0 flex-1" })), code ? _jsx(RegistryDocsCopyButton, { ariaLabel: "Copy code", value: code }) : null] }));
|
|
55
|
+
}
|
|
56
|
+
function RegistryDocsCommand({ className, label = "Command", value, ...props }) {
|
|
57
|
+
return (_jsxs("div", { "data-slot": "registry-docs-command", className: cn("grid gap-2", className), ...props, children: [_jsx("div", { className: "text-meta text-muted-foreground", children: label }), _jsxs("div", { className: "flex min-w-0 items-center gap-2 rounded-lg border bg-muted/30 px-3 py-2", children: [_jsx("code", { className: "min-w-0 flex-1 truncate font-mono text-xs text-foreground", children: value }), _jsx(RegistryDocsCopyButton, { ariaLabel: "Copy command", value: value })] })] }));
|
|
58
|
+
}
|
|
59
|
+
function RegistryDocsCopyButton({ ariaLabel, showLabel = true, value, }) {
|
|
60
|
+
const [copied, setCopied] = React.useState(false);
|
|
61
|
+
React.useEffect(() => {
|
|
62
|
+
if (!copied)
|
|
63
|
+
return;
|
|
64
|
+
const timeout = window.setTimeout(() => setCopied(false), 1400);
|
|
65
|
+
return () => window.clearTimeout(timeout);
|
|
66
|
+
}, [copied]);
|
|
67
|
+
const copyValue = async () => {
|
|
68
|
+
try {
|
|
69
|
+
await navigator.clipboard.writeText(value);
|
|
70
|
+
setCopied(true);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
setCopied(false);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return (_jsxs(Button, { "aria-label": copied ? "Copied" : ariaLabel, className: cn("shrink-0", showLabel ? "" : "size-8 p-0"), onClick: copyValue, size: "sm", type: "button", variant: "ghost", children: [copied ? _jsx(CheckIcon, {}) : _jsx(CopyIcon, {}), showLabel ? (copied ? "Copied" : "Copy") : null] }));
|
|
77
|
+
}
|
|
78
|
+
export { RegistryDocsCodeBlock, RegistryDocsCodeSnippet, RegistryDocsCommand, RegistryDocsCopyButton, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type RegistryDocsShowcaseProps = Omit<React.ComponentProps<"div">, "children"> & {
|
|
3
|
+
code: string;
|
|
4
|
+
codeLabel?: string;
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
preview: React.ReactNode;
|
|
7
|
+
previewMode?: "default" | "page" | "canvas";
|
|
8
|
+
};
|
|
9
|
+
declare function RegistryDocsShowcase({ className, code, codeLabel, defaultExpanded, preview, previewMode, ...props }: RegistryDocsShowcaseProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { RegistryDocsShowcase };
|
|
11
|
+
export type { RegistryDocsShowcaseProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { CodeXmlIcon } from "lucide-react";
|
|
4
|
+
import { Button } from "@ciridae/ui/button";
|
|
5
|
+
import { RegistryDocsCodeSnippet, RegistryDocsCopyButton } from "./registry-docs-code";
|
|
6
|
+
import { cn } from "@ciridae/ui/utils";
|
|
7
|
+
function RegistryDocsShowcase({ className, code, codeLabel = "preview.tsx", defaultExpanded = false, preview, previewMode = "default", ...props }) {
|
|
8
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
9
|
+
const codeId = React.useId();
|
|
10
|
+
return (_jsxs("div", { "data-slot": "registry-docs-showcase", className: cn("min-w-0 overflow-hidden rounded-xl border bg-card text-card-foreground shadow-xs", className), ...props, children: [_jsx(RegistryDocsShowcasePreview, { previewMode: previewMode, children: preview }), _jsx(RegistryDocsShowcaseCode, { code: code, codeId: codeId, codeLabel: codeLabel, expanded: expanded, onExpandedChange: setExpanded })] }));
|
|
11
|
+
}
|
|
12
|
+
function RegistryDocsShowcasePreview({ children, previewMode, }) {
|
|
13
|
+
return (_jsx("div", { "data-slot": "registry-docs-showcase-preview", "data-preview-mode": previewMode, className: "flex min-h-[28rem] items-center justify-center overflow-auto bg-background p-(--panel-padding) data-[preview-mode=canvas]:min-h-[34rem] data-[preview-mode=canvas]:items-stretch data-[preview-mode=canvas]:justify-stretch data-[preview-mode=canvas]:p-2 data-[preview-mode=page]:min-h-[36rem] data-[preview-mode=page]:items-start data-[preview-mode=page]:p-0 md:data-[preview-mode=canvas]:min-h-[42rem] md:data-[preview-mode=canvas]:p-3", children: _jsx("div", { className: "flex min-w-0 w-full items-center justify-center data-[preview-mode=canvas]:min-h-full data-[preview-mode=canvas]:items-stretch data-[preview-mode=canvas]:justify-stretch data-[preview-mode=page]:min-h-full data-[preview-mode=page]:items-stretch", "data-preview-mode": previewMode, children: children }) }));
|
|
14
|
+
}
|
|
15
|
+
function RegistryDocsShowcaseCode({ code, codeId, codeLabel, expanded, onExpandedChange, }) {
|
|
16
|
+
return (_jsxs("div", { "data-slot": "registry-docs-showcase-code", className: "relative border-t bg-muted/20", children: [_jsx(RegistryDocsShowcaseToggle, { codeId: codeId, expanded: expanded, onExpandedChange: onExpandedChange }), _jsxs("div", { id: codeId, "aria-label": codeLabel, className: cn("relative", expanded ? "max-h-[42rem] overflow-auto" : "max-h-44 overflow-hidden"), children: [_jsxs("div", { className: "mx-auto w-full max-w-5xl", children: [expanded ? _jsx(RegistryDocsShowcaseCopyButton, { code: code }) : null, _jsx(RegistryDocsCodeSnippet, { code: code, className: cn("text-sm [&_.shiki]:text-sm", expanded ? "px-6 pt-8 pb-8 md:px-8" : "p-7 pb-16 opacity-80") })] }), expanded ? null : _jsx(RegistryDocsShowcaseFade, {})] })] }));
|
|
17
|
+
}
|
|
18
|
+
function RegistryDocsShowcaseCopyButton({ code }) {
|
|
19
|
+
return (_jsx("div", { className: "sticky top-4 z-10 flex h-0 justify-end pr-4", children: _jsx(RegistryDocsCopyButton, { ariaLabel: "Copy preview code", showLabel: false, value: code }) }));
|
|
20
|
+
}
|
|
21
|
+
function RegistryDocsShowcaseFade() {
|
|
22
|
+
return (_jsx("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-28 bg-linear-to-b from-card/0 via-card/90 to-card", "data-slot": "registry-docs-showcase-fade" }));
|
|
23
|
+
}
|
|
24
|
+
function RegistryDocsShowcaseToggle({ codeId, expanded, onExpandedChange, }) {
|
|
25
|
+
return (_jsxs(Button, { "aria-controls": codeId, "aria-expanded": expanded, className: "absolute top-0 left-1/2 z-20 -translate-x-1/2 -translate-y-1/2 shadow-xs", onClick: () => onExpandedChange(!expanded), size: "sm", type: "button", variant: expanded ? "outline" : "default", children: [_jsx(CodeXmlIcon, {}), expanded ? "Hide code" : "View code"] }));
|
|
26
|
+
}
|
|
27
|
+
export { RegistryDocsShowcase };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Card, type CardVariant } from "@ciridae/ui/card";
|
|
3
|
+
import { RegistryDocsApiTable, type RegistryDocsApiProp } from "./registry-docs-api";
|
|
4
|
+
import { RegistryDocsCodeBlock, RegistryDocsCommand } from "./registry-docs-code";
|
|
5
|
+
import { RegistryDocsShowcase } from "./registry-docs-showcase";
|
|
6
|
+
type RegistryDocsPreviewSize = "compact" | "default" | "detail";
|
|
7
|
+
type RegistryDocsMetadataItem = {
|
|
8
|
+
label: string;
|
|
9
|
+
value: React.ReactNode;
|
|
10
|
+
};
|
|
11
|
+
declare function RegistryDocsPage({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function RegistryDocsBody({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function RegistryDocsGrid({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function RegistryDocsSection({ children, className, description, title, variant, ...props }: Omit<React.ComponentProps<typeof Card>, "variant"> & {
|
|
15
|
+
description?: React.ReactNode;
|
|
16
|
+
title?: React.ReactNode;
|
|
17
|
+
variant?: CardVariant;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function RegistryDocsRail({ className, ...props }: React.ComponentProps<"aside">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function RegistryDocsPreview({ className, size, ...props }: React.ComponentProps<"div"> & {
|
|
21
|
+
size?: RegistryDocsPreviewSize;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function RegistryDocsMetadata({ items }: {
|
|
24
|
+
items: RegistryDocsMetadataItem[];
|
|
25
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { RegistryDocsApiTable, RegistryDocsBody, RegistryDocsCodeBlock, RegistryDocsCommand, RegistryDocsGrid, RegistryDocsMetadata, RegistryDocsPage, RegistryDocsPreview, RegistryDocsRail, RegistryDocsSection, RegistryDocsShowcase, };
|
|
27
|
+
export type { RegistryDocsApiProp, RegistryDocsMetadataItem };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Card, CardContent, CardHeader } from "@ciridae/ui/card";
|
|
3
|
+
import { PropertyList, PropertyListItem, PropertyListLabel, PropertyListValue, } from "@ciridae/ui/property-list";
|
|
4
|
+
import { RegistryDocsApiTable } from "./registry-docs-api";
|
|
5
|
+
import { RegistryDocsCodeBlock, RegistryDocsCommand } from "./registry-docs-code";
|
|
6
|
+
import { RegistryDocsShowcase } from "./registry-docs-showcase";
|
|
7
|
+
import { cn } from "@ciridae/ui/utils";
|
|
8
|
+
function RegistryDocsPage({ className, ...props }) {
|
|
9
|
+
return (_jsx("main", { "data-slot": "registry-docs-page", className: cn("min-h-svh bg-background text-foreground", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function RegistryDocsBody({ className, ...props }) {
|
|
12
|
+
return (_jsx("div", { "data-slot": "registry-docs-body", className: cn("flex flex-col gap-4 px-4 py-4 md:px-6 lg:px-8", className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function RegistryDocsGrid({ className, ...props }) {
|
|
15
|
+
return (_jsx("div", { "data-slot": "registry-docs-grid", className: cn("grid gap-3 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4", className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function RegistryDocsSection({ children, className, description, title, variant = "surface", ...props }) {
|
|
18
|
+
return (_jsxs(Card, { "data-slot": "registry-docs-section", className: cn("min-w-0", className), variant: variant, ...props, children: [title || description ? (_jsx(CardHeader, { children: _jsx(RegistryDocsSectionHeader, { description: description, title: title }) })) : null, _jsx(CardContent, { children: children })] }));
|
|
19
|
+
}
|
|
20
|
+
function RegistryDocsSectionHeader({ description, title, }) {
|
|
21
|
+
return (_jsxs("div", { className: "grid gap-1", children: [title ? _jsx("h2", { className: "leading-none font-medium", children: title }) : null, description ? _jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null] }));
|
|
22
|
+
}
|
|
23
|
+
function RegistryDocsRail({ className, ...props }) {
|
|
24
|
+
return (_jsx("aside", { "data-slot": "registry-docs-rail", className: cn("grid content-start gap-3 xl:sticky xl:top-4", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function RegistryDocsPreview({ className, size = "default", ...props }) {
|
|
27
|
+
return (_jsx("div", { "data-slot": "registry-docs-preview", "data-size": size, className: cn("flex items-center justify-center rounded-lg border bg-muted/20 p-(--panel-padding)", "data-[size=compact]:min-h-28 data-[size=compact]:p-4", "data-[size=default]:min-h-40", "data-[size=detail]:min-h-72", className), ...props }));
|
|
28
|
+
}
|
|
29
|
+
function RegistryDocsMetadata({ items }) {
|
|
30
|
+
return (_jsx(PropertyList, { children: items.map((item) => (_jsxs(PropertyListItem, { children: [_jsx(PropertyListLabel, { children: item.label }), _jsx(PropertyListValue, { children: item.value })] }, item.label))) }));
|
|
31
|
+
}
|
|
32
|
+
export { RegistryDocsApiTable, RegistryDocsBody, RegistryDocsCodeBlock, RegistryDocsCommand, RegistryDocsGrid, RegistryDocsMetadata, RegistryDocsPage, RegistryDocsPreview, RegistryDocsRail, RegistryDocsSection, RegistryDocsShowcase, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
2
|
+
declare function ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function ResizablePanel({ ...props }: ResizablePrimitive.PanelProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ResizableHandle({ withHandle, className, ...props }: ResizablePrimitive.SeparatorProps & {
|
|
5
|
+
withHandle?: boolean;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { GripVerticalIcon } from "lucide-react";
|
|
4
|
+
import * as ResizablePrimitive from "react-resizable-panels";
|
|
5
|
+
import { cn } from "@ciridae/ui/utils";
|
|
6
|
+
function ResizablePanelGroup({ className, ...props }) {
|
|
7
|
+
return (_jsx(ResizablePrimitive.Group, { "data-slot": "resizable-panel-group", className: cn("flex h-full w-full aria-[orientation=vertical]:flex-col", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function ResizablePanel({ ...props }) {
|
|
10
|
+
return _jsx(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
11
|
+
}
|
|
12
|
+
function ResizableHandle({ withHandle, className, ...props }) {
|
|
13
|
+
return (_jsx(ResizablePrimitive.Separator, { "data-slot": "resizable-handle", className: cn("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90", className), ...props, children: withHandle && (_jsx("div", { className: "z-10 flex h-4 w-3 items-center justify-center rounded-xs border bg-border", children: _jsx(GripVerticalIcon, { className: "size-2.5" }) })) }));
|
|
14
|
+
}
|
|
15
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
+
declare function ScrollArea({ className, children, scrollbars, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
|
4
|
+
scrollbars?: "both" | "horizontal" | "none" | "vertical";
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function ScrollArea({ className, children, scrollbars = "vertical", ...props }) {
|
|
5
|
+
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-[var(--focus-ring-width)] focus-visible:ring-ring/50 focus-visible:outline-1", children: children }), scrollbars === "vertical" || scrollbars === "both" ? _jsx(ScrollBar, {}) : null, scrollbars === "horizontal" || scrollbars === "both" ? (_jsx(ScrollBar, { orientation: "horizontal" })) : null, scrollbars === "both" ? _jsx(ScrollAreaPrimitive.Corner, {}) : null] }));
|
|
6
|
+
}
|
|
7
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
8
|
+
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-border" }) }));
|
|
9
|
+
}
|
|
10
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
3
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import { Select as SelectPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "@ciridae/ui/utils";
|
|
6
|
+
function Select({ ...props }) {
|
|
7
|
+
return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
8
|
+
}
|
|
9
|
+
function SelectGroup({ ...props }) {
|
|
10
|
+
return _jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
11
|
+
}
|
|
12
|
+
function SelectValue({ ...props }) {
|
|
13
|
+
return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
14
|
+
}
|
|
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-(--control-gap) rounded-md border border-input bg-transparent px-(--control-padding-x) py-1 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[var(--focus-ring-width)] focus-visible:ring-ring/50 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-(--control-height) data-[size=sm]:h-(--control-height-sm) *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-(--control-gap) 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 opacity-50" }) })] }));
|
|
17
|
+
}
|
|
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 border bg-popover text-popover-foreground shadow-md 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=open]:animate-in data-[state=open]:fade-in-0", position === "popper" &&
|
|
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" &&
|
|
21
|
+
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
|
|
22
|
+
}
|
|
23
|
+
function SelectLabel({ className, ...props }) {
|
|
24
|
+
return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn("px-(--menu-item-padding-x) py-1 text-meta text-muted-foreground", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function SelectItem({ className, children, ...props }) {
|
|
27
|
+
return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("relative flex min-h-(--menu-item-height) w-full cursor-default items-center gap-(--control-gap) rounded-sm py-1 pr-8 pl-(--menu-item-padding-x) 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-(--control-gap)", 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 })] }));
|
|
28
|
+
}
|
|
29
|
+
function SelectSeparator({ className, ...props }) {
|
|
30
|
+
return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className), ...props }));
|
|
31
|
+
}
|
|
32
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
33
|
+
return (_jsx(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUpIcon, { className: "size-4" }) }));
|
|
34
|
+
}
|
|
35
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
36
|
+
return (_jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDownIcon, { className: "size-4" }) }));
|
|
37
|
+
}
|
|
38
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "radix-ui";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
5
|
+
return (_jsx(SeparatorPrimitive.Root, { "data-slot": "separator", decorative: decorative, orientation: orientation, className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
export { Separator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
3
|
+
declare function SheetPortalContainerProvider({ children, container, disableModalBehavior, }: {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
container: HTMLElement | null;
|
|
6
|
+
disableModalBehavior?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function Sheet({ modal, ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetContent({ className, children, side, showCloseButton, size, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
14
|
+
showCloseButton?: boolean;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function SheetBody({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetBody, SheetFooter, SheetTitle, SheetDescription, SheetPortalContainerProvider, };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { Dialog as SheetPrimitive } from "radix-ui";
|
|
6
|
+
import { cn } from "@ciridae/ui/utils";
|
|
7
|
+
const SheetPortalContainerContext = React.createContext({
|
|
8
|
+
container: null,
|
|
9
|
+
disableModalBehavior: false,
|
|
10
|
+
});
|
|
11
|
+
function SheetPortalContainerProvider({ children, container, disableModalBehavior = false, }) {
|
|
12
|
+
const value = React.useMemo(() => ({ container, disableModalBehavior }), [container, disableModalBehavior]);
|
|
13
|
+
return (_jsx(SheetPortalContainerContext.Provider, { value: value, children: children }));
|
|
14
|
+
}
|
|
15
|
+
function Sheet({ modal, ...props }) {
|
|
16
|
+
const { disableModalBehavior } = React.useContext(SheetPortalContainerContext);
|
|
17
|
+
const resolvedModal = modal ?? (disableModalBehavior ? false : undefined);
|
|
18
|
+
return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", modal: resolvedModal, ...props });
|
|
19
|
+
}
|
|
20
|
+
function SheetTrigger({ ...props }) {
|
|
21
|
+
return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
22
|
+
}
|
|
23
|
+
function SheetClose({ ...props }) {
|
|
24
|
+
return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
25
|
+
}
|
|
26
|
+
function SheetPortal({ container, ...props }) {
|
|
27
|
+
const { container: contextualContainer } = React.useContext(SheetPortalContainerContext);
|
|
28
|
+
return (_jsx(SheetPrimitive.Portal, { container: container ?? contextualContainer ?? undefined, "data-slot": "sheet-portal", ...props }));
|
|
29
|
+
}
|
|
30
|
+
function SheetOverlay({ className, ...props }) {
|
|
31
|
+
return (_jsx(SheetPrimitive.Overlay, { "data-slot": "sheet-overlay", className: cn("fixed inset-0 z-50 bg-overlay data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, size = "sm", ...props }) {
|
|
34
|
+
return (_jsxs(SheetPortal, { children: [_jsx(SheetOverlay, {}), _jsxs(SheetPrimitive.Content, { "data-slot": "sheet-content", className: cn("@container/sheet fixed z-50 flex flex-col overflow-hidden bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500", side === "right" &&
|
|
35
|
+
cn("inset-y-0 right-0 h-full w-full border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:w-3/4", getSheetSideSizeClass(size)), side === "left" &&
|
|
36
|
+
cn("inset-y-0 left-0 h-full w-full border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:w-3/4", getSheetSideSizeClass(size)), side === "top" &&
|
|
37
|
+
"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top", side === "bottom" &&
|
|
38
|
+
"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom", className), ...props, children: [children, showCloseButton && (_jsxs(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-[var(--focus-ring-width)] focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [_jsx(XIcon, { className: "size-4" }), _jsx("span", { className: "sr-only", children: "Close" })] }))] })] }));
|
|
39
|
+
}
|
|
40
|
+
function SheetHeader({ className, ...props }) {
|
|
41
|
+
return (_jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-(--panel-padding)", className), ...props }));
|
|
42
|
+
}
|
|
43
|
+
function SheetBody({ className, ...props }) {
|
|
44
|
+
return (_jsx("div", { "data-slot": "sheet-body", className: cn("min-h-0 flex-1 overflow-y-auto px-(--panel-padding)", className), ...props }));
|
|
45
|
+
}
|
|
46
|
+
function SheetFooter({ className, ...props }) {
|
|
47
|
+
return (_jsx("div", { "data-slot": "sheet-footer", className: cn("mt-auto flex flex-col-reverse gap-2 border-t bg-background p-(--panel-padding)", "@md/sheet:flex-row @md/sheet:justify-end", "[&_[data-slot=button]]:w-full @md/sheet:[&_[data-slot=button]]:w-auto", className), ...props }));
|
|
48
|
+
}
|
|
49
|
+
function SheetTitle({ className, ...props }) {
|
|
50
|
+
return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: cn("font-medium text-foreground", className), ...props }));
|
|
51
|
+
}
|
|
52
|
+
function SheetDescription({ className, ...props }) {
|
|
53
|
+
return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
54
|
+
}
|
|
55
|
+
function getSheetSideSizeClass(size) {
|
|
56
|
+
if (size === "lg")
|
|
57
|
+
return "sm:max-w-2xl";
|
|
58
|
+
if (size === "md")
|
|
59
|
+
return "sm:max-w-xl";
|
|
60
|
+
return "sm:max-w-sm";
|
|
61
|
+
}
|
|
62
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetBody, SheetFooter, SheetTitle, SheetDescription, SheetPortalContainerProvider, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export declare const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
3
|
+
export declare const SIDEBAR_COOKIE_MAX_AGE: number;
|
|
4
|
+
export declare const SIDEBAR_WIDTH = "14rem";
|
|
5
|
+
export declare const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
6
|
+
export declare const SIDEBAR_WIDTH_ICON = "3rem";
|
|
7
|
+
export declare const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
8
|
+
export type SidebarContextProps = {
|
|
9
|
+
state: "expanded" | "collapsed";
|
|
10
|
+
open: boolean;
|
|
11
|
+
setOpen: (open: boolean) => void;
|
|
12
|
+
openMobile: boolean;
|
|
13
|
+
setOpenMobile: (open: boolean) => void;
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
toggleSidebar: () => void;
|
|
16
|
+
};
|
|
17
|
+
export type SidebarProviderStyle = React.CSSProperties & Record<"--sidebar-width" | "--sidebar-width-icon", string>;
|
|
18
|
+
export type SidebarMobileStyle = React.CSSProperties & Record<"--sidebar-width", string>;
|
|
19
|
+
export type SidebarSkeletonStyle = React.CSSProperties & Record<"--skeleton-width", string>;
|
|
20
|
+
export declare const SidebarContext: React.Context<SidebarContextProps | null>;
|
|
21
|
+
export declare function useSidebar(): SidebarContextProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export const SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
3
|
+
export const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
4
|
+
export const SIDEBAR_WIDTH = "14rem";
|
|
5
|
+
export const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
6
|
+
export const SIDEBAR_WIDTH_ICON = "3rem";
|
|
7
|
+
export const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
8
|
+
export const SidebarContext = React.createContext(null);
|
|
9
|
+
export function useSidebar() {
|
|
10
|
+
const context = React.useContext(SidebarContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function SidebarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<"button"> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "radix-ui";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function SidebarGroup({ className, ...props }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: cn("relative flex w-full min-w-0 flex-col gap-(--sidebar-group-gap) p-(--sidebar-group-padding)", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function SidebarGroupLabel({ className, asChild = false, ...props }) {
|
|
8
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
9
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: cn("flex h-(--sidebar-item-height-sm) shrink-0 items-center rounded-[var(--sidebar-item-radius)] px-(--sidebar-item-padding-x) text-meta text-sidebar-foreground/45 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-[var(--focus-ring-width)] [&>svg]:size-(--sidebar-icon-size) [&>svg]:shrink-0", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function SidebarGroupAction({ className, asChild = false, ...props }) {
|
|
12
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
13
|
+
return (_jsx(Comp, { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: cn("absolute top-(--sidebar-group-padding) right-(--sidebar-group-padding) flex size-(--sidebar-item-height-sm) items-center justify-center rounded-[var(--sidebar-item-radius)] p-0 text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-[var(--focus-ring-width)] after:absolute after:-inset-2 md:after:hidden [&>svg]:size-(--sidebar-icon-size) [&>svg]:shrink-0", "group-data-[collapsible=icon]:hidden", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function SidebarGroupContent({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: cn("w-full text-sm", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
export { SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Input } from "@ciridae/ui/input";
|
|
3
|
+
import { Separator } from "@ciridae/ui/separator";
|
|
4
|
+
type SidebarProps = React.ComponentProps<"div"> & {
|
|
5
|
+
side?: "left" | "right";
|
|
6
|
+
variant?: "sidebar" | "floating" | "inset";
|
|
7
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
8
|
+
expandOnCollapsedBlankClick?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function Sidebar({ side, variant, collapsible, expandOnCollapsedBlankClick, className, children, onClick, ...props }: SidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SidebarHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SidebarFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function SidebarContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarInput, SidebarInset, SidebarSeparator, };
|