@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,122 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable max-lines, react-refresh/only-export-components */
|
|
3
|
+
import { CircleSmallIcon, MarsIcon, PauseIcon, PlayIcon, TransgenderIcon, VenusAndMarsIcon, VenusIcon, } from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { Button } from "@ciridae/ui/button";
|
|
6
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from "@ciridae/ui/command";
|
|
7
|
+
import { Dialog, DialogContent, DialogTitle, DialogTrigger } from "@ciridae/ui/dialog";
|
|
8
|
+
import { Spinner } from "@ciridae/ui/spinner";
|
|
9
|
+
import { cn } from "@ciridae/ui/utils";
|
|
10
|
+
import { useControllableState } from "./use-controllable-state";
|
|
11
|
+
const VoiceSelectorContext = React.createContext(null);
|
|
12
|
+
function VoiceSelector({ children, defaultOpen = false, defaultValue, onOpenChange, onValueChange, open: openProp, value: valueProp, voices = [], ...props }) {
|
|
13
|
+
const [value, setValue] = useControllableState({
|
|
14
|
+
defaultValue,
|
|
15
|
+
onChange: onValueChange,
|
|
16
|
+
value: valueProp,
|
|
17
|
+
});
|
|
18
|
+
const [open, setOpen] = useControllableState({
|
|
19
|
+
defaultValue: defaultOpen,
|
|
20
|
+
onChange: onOpenChange,
|
|
21
|
+
value: openProp,
|
|
22
|
+
});
|
|
23
|
+
const contextValue = React.useMemo(() => ({ open, setOpen, setValue, value, voices }), [open, setOpen, setValue, value, voices]);
|
|
24
|
+
return (_jsx(VoiceSelectorContext.Provider, { value: contextValue, children: _jsx(Dialog, { onOpenChange: setOpen, open: open, ...props, children: children ?? _jsx(VoiceSelectorDefaultContent, {}) }) }));
|
|
25
|
+
}
|
|
26
|
+
function VoiceSelectorDefaultContent() {
|
|
27
|
+
const { voices } = useVoiceSelector();
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx(VoiceSelectorTrigger, { asChild: true, children: _jsx(Button, { className: "w-64 justify-between", variant: "outline", children: _jsx(VoiceSelectorValue, { className: "max-w-52 text-left" }) }) }), _jsxs(VoiceSelectorContent, { children: [_jsx(VoiceSelectorInput, { placeholder: "Search voices..." }), _jsxs(VoiceSelectorList, { children: [_jsx(VoiceSelectorEmpty, { children: "No voices found." }), _jsx(VoiceSelectorGroup, { heading: "Voices", children: voices.map((voice) => (_jsx(VoiceSelectorItem, { voice: voice }, voice.id))) })] })] })] }));
|
|
29
|
+
}
|
|
30
|
+
function useVoiceSelector() {
|
|
31
|
+
const context = React.useContext(VoiceSelectorContext);
|
|
32
|
+
if (!context)
|
|
33
|
+
throw new Error("VoiceSelector components must be used within VoiceSelector");
|
|
34
|
+
return context;
|
|
35
|
+
}
|
|
36
|
+
function VoiceSelectorTrigger(props) {
|
|
37
|
+
return _jsx(DialogTrigger, { ...props });
|
|
38
|
+
}
|
|
39
|
+
function VoiceSelectorContent({ children, className, title = "Voice selector", ...props }) {
|
|
40
|
+
return (_jsxs(DialogContent, { "aria-describedby": undefined, className: cn("overflow-hidden p-0 sm:max-w-xl", className), ...props, children: [_jsx(DialogTitle, { className: "sr-only", children: title }), _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-auto", children: children })] }));
|
|
41
|
+
}
|
|
42
|
+
function VoiceSelectorDialog(props) {
|
|
43
|
+
return _jsx(CommandDialog, { ...props });
|
|
44
|
+
}
|
|
45
|
+
function VoiceSelectorInput({ className, ...props }) {
|
|
46
|
+
return _jsx(CommandInput, { className: cn("h-auto py-3", className), ...props });
|
|
47
|
+
}
|
|
48
|
+
function VoiceSelectorList(props) {
|
|
49
|
+
return _jsx(CommandList, { ...props });
|
|
50
|
+
}
|
|
51
|
+
function VoiceSelectorEmpty(props) {
|
|
52
|
+
return _jsx(CommandEmpty, { ...props });
|
|
53
|
+
}
|
|
54
|
+
function VoiceSelectorGroup(props) {
|
|
55
|
+
return _jsx(CommandGroup, { ...props });
|
|
56
|
+
}
|
|
57
|
+
function VoiceSelectorItem({ children, onSelect, value, voice, ...props }) {
|
|
58
|
+
const { setOpen, setValue } = useVoiceSelector();
|
|
59
|
+
const itemValue = value ?? voice?.id;
|
|
60
|
+
return (_jsx(CommandItem, { onSelect: (currentValue) => {
|
|
61
|
+
setValue(itemValue ?? currentValue);
|
|
62
|
+
setOpen(false);
|
|
63
|
+
onSelect?.(currentValue);
|
|
64
|
+
}, value: itemValue, ...props, children: children ?? (voice ? _jsx(VoiceSelectorOption, { voice: voice }) : null) }));
|
|
65
|
+
}
|
|
66
|
+
function VoiceSelectorOption({ voice }) {
|
|
67
|
+
return (_jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: [_jsxs("div", { className: "grid min-w-0 flex-1 gap-1", children: [_jsx(VoiceSelectorName, { children: voice.label }), _jsxs(VoiceSelectorAttributes, { children: [voice.gender ? _jsx(VoiceSelectorGender, { value: voice.gender }) : null, voice.accent ? _jsx(VoiceSelectorAccent, { value: voice.accent }) : null, voice.age ? _jsx(VoiceSelectorAge, { children: voice.age }) : null] }), voice.description ? (_jsx(VoiceSelectorDescription, { children: voice.description })) : null] }), voice.previewLabel ? (_jsx(VoiceSelectorShortcut, { children: voice.previewLabel })) : null] }));
|
|
68
|
+
}
|
|
69
|
+
function VoiceSelectorShortcut(props) {
|
|
70
|
+
return _jsx(CommandShortcut, { ...props });
|
|
71
|
+
}
|
|
72
|
+
function VoiceSelectorSeparator(props) {
|
|
73
|
+
return _jsx(CommandSeparator, { ...props });
|
|
74
|
+
}
|
|
75
|
+
function VoiceSelectorGender({ className, value, ...props }) {
|
|
76
|
+
return (_jsx("span", { className: cn("inline-flex items-center gap-1", className), ...props, children: _jsx(VoiceSelectorGenderIcon, { value: value }) }));
|
|
77
|
+
}
|
|
78
|
+
function VoiceSelectorAccent({ children, className, value, ...props }) {
|
|
79
|
+
return (_jsx("span", { className: cn("font-mono text-[0.6875rem] uppercase", className), ...props, children: children ?? value }));
|
|
80
|
+
}
|
|
81
|
+
function VoiceSelectorAge({ className, ...props }) {
|
|
82
|
+
return _jsx("span", { className: cn("text-[0.6875rem]", className), ...props });
|
|
83
|
+
}
|
|
84
|
+
function VoiceSelectorName({ className, ...props }) {
|
|
85
|
+
return _jsx("span", { className: cn("truncate font-medium", className), ...props });
|
|
86
|
+
}
|
|
87
|
+
function VoiceSelectorDescription({ className, ...props }) {
|
|
88
|
+
return _jsx("span", { className: cn("truncate text-xs text-muted-foreground", className), ...props });
|
|
89
|
+
}
|
|
90
|
+
function VoiceSelectorAttributes({ className, ...props }) {
|
|
91
|
+
return (_jsx("div", { className: cn("flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground", className), ...props }));
|
|
92
|
+
}
|
|
93
|
+
function VoiceSelectorBullet({ className, ...props }) {
|
|
94
|
+
return (_jsx("span", { className: cn("text-muted-foreground", className), ...props, children: "-" }));
|
|
95
|
+
}
|
|
96
|
+
function VoiceSelectorValue({ className, placeholder = "Select voice", ...props }) {
|
|
97
|
+
const { value, voices } = useVoiceSelector();
|
|
98
|
+
const voice = voices.find((candidate) => candidate.id === value);
|
|
99
|
+
return (_jsx("span", { className: cn("truncate", className), ...props, children: voice?.label ?? placeholder }));
|
|
100
|
+
}
|
|
101
|
+
function VoiceSelectorPreview({ className, loading, onClick, onPlay, playing, type = "button", ...props }) {
|
|
102
|
+
const Icon = loading ? Spinner : playing ? PauseIcon : PlayIcon;
|
|
103
|
+
return (_jsx("button", { "aria-label": playing ? "Pause voice preview" : "Play voice preview", className: cn("inline-flex size-7 shrink-0 items-center justify-center rounded-md border bg-background text-foreground transition-colors hover:bg-accent hover:text-accent-foreground", className), onClick: (event) => {
|
|
104
|
+
event.stopPropagation();
|
|
105
|
+
onClick?.(event);
|
|
106
|
+
if (!event.defaultPrevented)
|
|
107
|
+
onPlay?.();
|
|
108
|
+
}, ...props, type: type, children: _jsx(Icon, { className: "size-3.5" }) }));
|
|
109
|
+
}
|
|
110
|
+
function VoiceSelectorGenderIcon({ value }) {
|
|
111
|
+
if (value === "male")
|
|
112
|
+
return _jsx(MarsIcon, { className: "size-3.5" });
|
|
113
|
+
if (value === "female")
|
|
114
|
+
return _jsx(VenusIcon, { className: "size-3.5" });
|
|
115
|
+
if (value === "transgender")
|
|
116
|
+
return _jsx(TransgenderIcon, { className: "size-3.5" });
|
|
117
|
+
if (value === "androgyne" || value === "intersex") {
|
|
118
|
+
return _jsx(VenusAndMarsIcon, { className: "size-3.5" });
|
|
119
|
+
}
|
|
120
|
+
return _jsx(CircleSmallIcon, { className: "size-3.5" });
|
|
121
|
+
}
|
|
122
|
+
export { VoiceSelector, VoiceSelectorAccent, VoiceSelectorAge, VoiceSelectorAttributes, VoiceSelectorBullet, VoiceSelectorContent, VoiceSelectorDescription, VoiceSelectorDialog, VoiceSelectorEmpty, VoiceSelectorGender, VoiceSelectorGroup, VoiceSelectorInput, VoiceSelectorItem, VoiceSelectorList, VoiceSelectorName, VoiceSelectorPreview, VoiceSelectorSeparator, VoiceSelectorShortcut, VoiceSelectorTrigger, VoiceSelectorValue, useVoiceSelector, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Button } from "@ciridae/ui/button";
|
|
3
|
+
import { Input } from "@ciridae/ui/input";
|
|
4
|
+
type WebPreviewProps = React.ComponentProps<"div"> & {
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
type WebPreviewNavigationProps = React.ComponentProps<"div">;
|
|
8
|
+
type WebPreviewNavigationButtonProps = React.ComponentProps<typeof Button> & {
|
|
9
|
+
action?: "back" | "forward" | "reload";
|
|
10
|
+
};
|
|
11
|
+
type WebPreviewUrlProps = Omit<React.ComponentProps<typeof Input>, "value"> & {
|
|
12
|
+
value?: string;
|
|
13
|
+
};
|
|
14
|
+
type WebPreviewBodyProps = React.ComponentProps<"iframe"> & {
|
|
15
|
+
src?: string;
|
|
16
|
+
};
|
|
17
|
+
type WebPreviewConsoleProps = React.ComponentProps<"div">;
|
|
18
|
+
declare function WebPreview({ children, className, url, ...props }: WebPreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function WebPreviewNavigation({ className, ...props }: WebPreviewNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function WebPreviewNavigationButton({ action, children, ...props }: WebPreviewNavigationButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function WebPreviewUrl({ className, value, ...props }: WebPreviewUrlProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function WebPreviewBody({ className, referrerPolicy, sandbox, src, title, ...props }: WebPreviewBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function WebPreviewConsole({ className, ...props }: WebPreviewConsoleProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { WebPreview, WebPreviewBody, WebPreviewConsole, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl, };
|
|
25
|
+
export type { WebPreviewBodyProps, WebPreviewConsoleProps, WebPreviewNavigationButtonProps, WebPreviewNavigationProps, WebPreviewProps, WebPreviewUrlProps, };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ArrowLeftIcon, ArrowRightIcon, RotateCwIcon } from "lucide-react";
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import { Button } from "@ciridae/ui/button";
|
|
5
|
+
import { Input } from "@ciridae/ui/input";
|
|
6
|
+
import { cn } from "@ciridae/ui/utils";
|
|
7
|
+
const WebPreviewContext = createContext({ url: "" });
|
|
8
|
+
function useWebPreview() {
|
|
9
|
+
return useContext(WebPreviewContext);
|
|
10
|
+
}
|
|
11
|
+
function WebPreview({ children, className, url, ...props }) {
|
|
12
|
+
const contextValue = useMemo(() => ({ url }), [url]);
|
|
13
|
+
return (_jsx(WebPreviewContext.Provider, { value: contextValue, children: _jsx("div", { "data-slot": "web-preview", className: cn("flex min-h-0 w-full flex-col overflow-hidden rounded-lg border bg-card", className), ...props, children: children }) }));
|
|
14
|
+
}
|
|
15
|
+
function WebPreviewNavigation({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "web-preview-navigation", className: cn("flex min-w-0 items-center gap-2 border-b p-2", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function WebPreviewNavigationButton({ action = "reload", children, ...props }) {
|
|
19
|
+
const Icon = action === "back" ? ArrowLeftIcon : action === "forward" ? ArrowRightIcon : RotateCwIcon;
|
|
20
|
+
return (_jsx(Button, { "aria-label": action, size: "icon", type: "button", variant: "ghost", ...props, children: children ?? _jsx(Icon, { "aria-hidden": "true", className: "size-4" }) }));
|
|
21
|
+
}
|
|
22
|
+
function WebPreviewUrl({ className, value, ...props }) {
|
|
23
|
+
const { url } = useWebPreview();
|
|
24
|
+
return (_jsx(Input, { "data-slot": "web-preview-url", readOnly: true, value: value ?? url, className: cn("h-8 flex-1 font-mono text-xs", className), ...props }));
|
|
25
|
+
}
|
|
26
|
+
function WebPreviewBody({ className, referrerPolicy = "no-referrer", sandbox = "allow-scripts", src, title = "Web preview", ...props }) {
|
|
27
|
+
const { url } = useWebPreview();
|
|
28
|
+
return (_jsx("iframe", { "data-slot": "web-preview-body", className: cn("min-h-80 w-full flex-1 bg-background", className), referrerPolicy: referrerPolicy, sandbox: sandbox, src: src ?? url, title: title, ...props }));
|
|
29
|
+
}
|
|
30
|
+
function WebPreviewConsole({ className, ...props }) {
|
|
31
|
+
return (_jsx("div", { "data-slot": "web-preview-console", className: cn("border-t bg-muted/40 p-3 font-mono text-xs text-muted-foreground", className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
export { WebPreview, WebPreviewBody, WebPreviewConsole, WebPreviewNavigation, WebPreviewNavigationButton, WebPreviewUrl, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "@ciridae/ui/utils";
|
|
5
|
+
function Accordion({ ...props }) {
|
|
6
|
+
return _jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
7
|
+
}
|
|
8
|
+
function AccordionItem({ className, ...props }) {
|
|
9
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("border-b last:border-b-0", className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
12
|
+
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-[var(--focus-ring-width)] focus-visible:ring-ring/50 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
|
+
}
|
|
14
|
+
function AccordionContent({ className, children, ...props }) {
|
|
15
|
+
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
|
+
}
|
|
17
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
3
|
+
import { type ButtonVariantProps } from "@ciridae/ui/button-variants";
|
|
4
|
+
declare function AlertDialogPortalContainerProvider({ children, container, }: {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
container: HTMLElement | null;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AlertDialogPortal({ container, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
13
|
+
size?: "default" | "sm";
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonVariantProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonVariantProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogPortalContainerProvider, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "@ciridae/ui/utils";
|
|
6
|
+
import { buttonVariants } from "@ciridae/ui/button-variants";
|
|
7
|
+
const AlertDialogPortalContainerContext = React.createContext({
|
|
8
|
+
container: null,
|
|
9
|
+
});
|
|
10
|
+
function AlertDialogPortalContainerProvider({ children, container, }) {
|
|
11
|
+
const value = React.useMemo(() => ({ container }), [container]);
|
|
12
|
+
return (_jsx(AlertDialogPortalContainerContext.Provider, { value: value, children: children }));
|
|
13
|
+
}
|
|
14
|
+
function AlertDialog({ ...props }) {
|
|
15
|
+
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
16
|
+
}
|
|
17
|
+
function AlertDialogTrigger({ ...props }) {
|
|
18
|
+
return _jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
19
|
+
}
|
|
20
|
+
function AlertDialogPortal({ container, ...props }) {
|
|
21
|
+
const { container: contextualContainer } = React.useContext(AlertDialogPortalContainerContext);
|
|
22
|
+
return (_jsx(AlertDialogPrimitive.Portal, { container: container ?? contextualContainer ?? undefined, "data-slot": "alert-dialog-portal", ...props }));
|
|
23
|
+
}
|
|
24
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
25
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-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 }));
|
|
26
|
+
}
|
|
27
|
+
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
28
|
+
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-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-(--panel-gap) rounded-lg border bg-background p-(--panel-padding) shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[size=default]:sm:max-w-lg", className), ...props })] }));
|
|
29
|
+
}
|
|
30
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
31
|
+
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 }));
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
34
|
+
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 }));
|
|
35
|
+
}
|
|
36
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
37
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className), ...props }));
|
|
38
|
+
}
|
|
39
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
40
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm text-muted-foreground", className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
43
|
+
return (_jsx("div", { "data-slot": "alert-dialog-media", className: cn("mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8", className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
|
|
46
|
+
return (_jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(buttonVariants({ variant, size }), className), ...props }));
|
|
47
|
+
}
|
|
48
|
+
function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
|
|
49
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(buttonVariants({ variant, size }), className), ...props }));
|
|
50
|
+
}
|
|
51
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogPortalContainerProvider, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
const alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-(--panel-padding) py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground",
|
|
8
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
function Alert({ className, variant, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "alert", role: "alert", className: cn(alertVariants({ variant }), className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function AlertTitle({ className, ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert-title", className: cn("col-start-2 line-clamp-1 min-h-4 font-medium", className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertDescription({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Alert, AlertTitle, AlertDescription };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AspectRatio as AspectRatioPrimitive } from "radix-ui";
|
|
4
|
+
function AspectRatio({ ...props }) {
|
|
5
|
+
return _jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
6
|
+
}
|
|
7
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
3
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
4
|
+
size?: "default" | "sm" | "lg";
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
function Avatar({ className, size = "default", ...props }) {
|
|
5
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6", className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
function AvatarImage({ className, ...props }) {
|
|
8
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function AvatarFallback({ className, ...props }) {
|
|
11
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs", className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
function AvatarBadge({ className, ...props }) {
|
|
14
|
+
return (_jsx("span", { "data-slot": "avatar-badge", className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground ring-2 ring-background select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function AvatarGroup({ className, ...props }) {
|
|
17
|
+
return (_jsx("div", { "data-slot": "avatar-group", className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
20
|
+
return (_jsx("div", { "data-slot": "avatar-group-count", className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-[var(--focus-ring-width)] ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type RecipeVariantProps } from "@ciridae/ui/styled-system/css";
|
|
2
|
+
declare const badgeVariants: import("../../styled-system/types").RecipeRuntimeFn<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: {
|
|
5
|
+
backgroundColor: "muted.subtle";
|
|
6
|
+
borderColor: "border";
|
|
7
|
+
color: "foreground";
|
|
8
|
+
"a&:hover": {
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
secondary: {
|
|
13
|
+
backgroundColor: "secondary";
|
|
14
|
+
color: "secondary.foreground";
|
|
15
|
+
"a&:hover": {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
success: {
|
|
20
|
+
backgroundColor: "success.muted";
|
|
21
|
+
borderColor: "success.border";
|
|
22
|
+
color: "success";
|
|
23
|
+
"&:focus-visible": {
|
|
24
|
+
boxShadow: "focus.success";
|
|
25
|
+
};
|
|
26
|
+
_dark: {
|
|
27
|
+
borderColor: "success.border.dark";
|
|
28
|
+
"&:focus-visible": {
|
|
29
|
+
boxShadow: "focus.success.dark";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
warning: {
|
|
34
|
+
backgroundColor: "warning.muted";
|
|
35
|
+
borderColor: "warning.border";
|
|
36
|
+
color: "warning";
|
|
37
|
+
"&:focus-visible": {
|
|
38
|
+
boxShadow: "focus.warning";
|
|
39
|
+
};
|
|
40
|
+
_dark: {
|
|
41
|
+
borderColor: "warning.border.dark";
|
|
42
|
+
"&:focus-visible": {
|
|
43
|
+
boxShadow: "focus.warning.dark";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
info: {
|
|
48
|
+
backgroundColor: "info.muted";
|
|
49
|
+
borderColor: "info.border";
|
|
50
|
+
color: "info";
|
|
51
|
+
"&:focus-visible": {
|
|
52
|
+
boxShadow: "focus.info";
|
|
53
|
+
};
|
|
54
|
+
_dark: {
|
|
55
|
+
borderColor: "info.border.dark";
|
|
56
|
+
"&:focus-visible": {
|
|
57
|
+
boxShadow: "focus.info.dark";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
destructive: {
|
|
62
|
+
backgroundColor: "destructive.subtle";
|
|
63
|
+
borderColor: "destructive.border";
|
|
64
|
+
color: "destructive";
|
|
65
|
+
"&:focus-visible": {
|
|
66
|
+
boxShadow: "focus.destructive";
|
|
67
|
+
};
|
|
68
|
+
_dark: {
|
|
69
|
+
backgroundColor: "destructive.subtle.dark";
|
|
70
|
+
borderColor: "destructive.border.dark";
|
|
71
|
+
"&:focus-visible": {
|
|
72
|
+
boxShadow: "focus.destructive.dark";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
outline: {
|
|
77
|
+
borderColor: "border";
|
|
78
|
+
color: "foreground";
|
|
79
|
+
"a&:hover": {
|
|
80
|
+
backgroundColor: string;
|
|
81
|
+
color: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
ghost: {
|
|
85
|
+
"a&:hover": {
|
|
86
|
+
backgroundColor: string;
|
|
87
|
+
color: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
link: {
|
|
91
|
+
color: "primary";
|
|
92
|
+
textUnderlineOffset: "4px";
|
|
93
|
+
"a&:hover": {
|
|
94
|
+
textDecorationLine: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
type BadgeVariantProps = RecipeVariantProps<typeof badgeVariants>;
|
|
100
|
+
export { badgeVariants, type BadgeVariantProps };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { cva } from "@ciridae/ui/styled-system/css";
|
|
2
|
+
const badgeVariants = cva({
|
|
3
|
+
base: {
|
|
4
|
+
alignItems: "center",
|
|
5
|
+
borderColor: "transparent",
|
|
6
|
+
borderRadius: "badge",
|
|
7
|
+
borderStyle: "solid",
|
|
8
|
+
borderWidth: "default",
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
flexShrink: 0,
|
|
11
|
+
fontSize: "xs",
|
|
12
|
+
fontWeight: "control",
|
|
13
|
+
gap: "gap.1",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
lineHeight: "xs",
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
paddingBlock: "0.125rem",
|
|
18
|
+
paddingInline: "badge.x",
|
|
19
|
+
transitionProperty: "color, box-shadow",
|
|
20
|
+
transitionDuration: "fast",
|
|
21
|
+
transitionTimingFunction: "standard",
|
|
22
|
+
whiteSpace: "nowrap",
|
|
23
|
+
width: "fit-content",
|
|
24
|
+
"&:focus-visible": {
|
|
25
|
+
borderColor: "ring",
|
|
26
|
+
boxShadow: "focus",
|
|
27
|
+
},
|
|
28
|
+
"&[aria-invalid='true']": {
|
|
29
|
+
borderColor: "destructive",
|
|
30
|
+
boxShadow: "focus.destructive",
|
|
31
|
+
},
|
|
32
|
+
_dark: {
|
|
33
|
+
"&[aria-invalid='true']": {
|
|
34
|
+
boxShadow: "focus.destructive.dark",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
"& > svg": {
|
|
38
|
+
height: "icon.xs",
|
|
39
|
+
pointerEvents: "none",
|
|
40
|
+
width: "icon.xs",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
variants: {
|
|
44
|
+
variant: {
|
|
45
|
+
default: {
|
|
46
|
+
backgroundColor: "muted.subtle",
|
|
47
|
+
borderColor: "border",
|
|
48
|
+
color: "foreground",
|
|
49
|
+
"a&:hover": { backgroundColor: "accent" },
|
|
50
|
+
},
|
|
51
|
+
secondary: {
|
|
52
|
+
backgroundColor: "secondary",
|
|
53
|
+
color: "secondary.foreground",
|
|
54
|
+
"a&:hover": {
|
|
55
|
+
backgroundColor: "secondary.hover.anchor",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
success: {
|
|
59
|
+
backgroundColor: "success.muted",
|
|
60
|
+
borderColor: "success.border",
|
|
61
|
+
color: "success",
|
|
62
|
+
"&:focus-visible": {
|
|
63
|
+
boxShadow: "focus.success",
|
|
64
|
+
},
|
|
65
|
+
_dark: {
|
|
66
|
+
borderColor: "success.border.dark",
|
|
67
|
+
"&:focus-visible": {
|
|
68
|
+
boxShadow: "focus.success.dark",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
warning: {
|
|
73
|
+
backgroundColor: "warning.muted",
|
|
74
|
+
borderColor: "warning.border",
|
|
75
|
+
color: "warning",
|
|
76
|
+
"&:focus-visible": {
|
|
77
|
+
boxShadow: "focus.warning",
|
|
78
|
+
},
|
|
79
|
+
_dark: {
|
|
80
|
+
borderColor: "warning.border.dark",
|
|
81
|
+
"&:focus-visible": {
|
|
82
|
+
boxShadow: "focus.warning.dark",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
info: {
|
|
87
|
+
backgroundColor: "info.muted",
|
|
88
|
+
borderColor: "info.border",
|
|
89
|
+
color: "info",
|
|
90
|
+
"&:focus-visible": {
|
|
91
|
+
boxShadow: "focus.info",
|
|
92
|
+
},
|
|
93
|
+
_dark: {
|
|
94
|
+
borderColor: "info.border.dark",
|
|
95
|
+
"&:focus-visible": {
|
|
96
|
+
boxShadow: "focus.info.dark",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
destructive: {
|
|
101
|
+
backgroundColor: "destructive.subtle",
|
|
102
|
+
borderColor: "destructive.border",
|
|
103
|
+
color: "destructive",
|
|
104
|
+
"&:focus-visible": {
|
|
105
|
+
boxShadow: "focus.destructive",
|
|
106
|
+
},
|
|
107
|
+
_dark: {
|
|
108
|
+
backgroundColor: "destructive.subtle.dark",
|
|
109
|
+
borderColor: "destructive.border.dark",
|
|
110
|
+
"&:focus-visible": {
|
|
111
|
+
boxShadow: "focus.destructive.dark",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
outline: {
|
|
116
|
+
borderColor: "border",
|
|
117
|
+
color: "foreground",
|
|
118
|
+
"a&:hover": {
|
|
119
|
+
backgroundColor: "accent",
|
|
120
|
+
color: "accent.foreground",
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
ghost: {
|
|
124
|
+
"a&:hover": {
|
|
125
|
+
backgroundColor: "accent",
|
|
126
|
+
color: "accent.foreground",
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
link: {
|
|
130
|
+
color: "primary",
|
|
131
|
+
textUnderlineOffset: "4px",
|
|
132
|
+
"a&:hover": { textDecorationLine: "underline" },
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: {
|
|
137
|
+
variant: "default",
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
export { badgeVariants };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type BadgeVariantProps } from "@ciridae/ui/badge-variants";
|
|
3
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & BadgeVariantProps & {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Badge };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "radix-ui";
|
|
3
|
+
import { cn } from "@ciridae/ui/utils";
|
|
4
|
+
import { badgeVariants } from "@ciridae/ui/badge-variants";
|
|
5
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
6
|
+
const Comp = asChild ? Slot.Root : "span";
|
|
7
|
+
return (_jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
export { Badge };
|