@kumix/ui 0.3.12 → 0.3.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/agents/agent-activity/activity-row.js +1 -1
- package/dist/components/agents/agent-activity/index.js +1 -1
- package/dist/components/agents/agent-code.js +1 -1
- package/dist/components/agents/ai-sidebar.js +1 -1
- package/dist/components/agents/approval-card/index.js +1 -1
- package/dist/components/agents/citations.js +1 -1
- package/dist/components/agents/code-block.js +1 -1
- package/dist/components/agents/file-diff.js +1 -1
- package/dist/components/agents/image-generation.js +1 -1
- package/dist/components/agents/message-bubble.js +1 -1
- package/dist/components/agents/prompt-input.js +1 -1
- package/dist/components/agents/streaming-response.js +1 -1
- package/dist/components/agents/todo-list.js +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-result.js +1 -1
- package/dist/components/custom/confirm-dialog.js +1 -1
- package/dist/components/motion/adaptive-stepper.js +1 -1
- package/dist/components/motion/animated-badge.js +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -1
- package/dist/components/motion/animated-toast-stack.js +1 -1
- package/dist/components/motion/attachment-upload.js +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +2 -2
- package/dist/components/motion/availability-scheduler/index.js +1 -1
- package/dist/components/motion/bloom-menu.js +1 -1
- package/dist/components/motion/bouncy-accordion.js +1 -1
- package/dist/components/motion/button/stateful.js +1 -1
- package/dist/components/motion/card-folder.d.ts +30 -0
- package/dist/components/motion/card-folder.d.ts.map +1 -0
- package/dist/components/motion/card-folder.js +254 -0
- package/dist/components/motion/card-folder.js.map +1 -0
- package/dist/components/motion/center-morph-modal.js +1 -1
- package/dist/components/motion/combobox/list.js +1 -1
- package/dist/components/motion/combobox/trigger.js +1 -1
- package/dist/components/motion/command-palette.js +1 -1
- package/dist/components/motion/context-menu.js +1 -1
- package/dist/components/motion/digit-swap.d.ts +23 -0
- package/dist/components/motion/digit-swap.d.ts.map +1 -0
- package/dist/components/motion/digit-swap.js +77 -0
- package/dist/components/motion/digit-swap.js.map +1 -0
- package/dist/components/motion/feedback-widget.js +1 -1
- package/dist/components/motion/file-tree.js +1 -1
- package/dist/components/motion/file-upload.js +1 -1
- package/dist/components/motion/infinite-masonry.js +1 -1
- package/dist/components/motion/morphing-search.js +1 -1
- package/dist/components/motion/morphing-tabs.js +1 -1
- package/dist/components/motion/multi-select/list.js +1 -1
- package/dist/components/motion/multi-select/trigger.js +1 -1
- package/dist/components/motion/notification-stack.js +1 -1
- package/dist/components/motion/overflow-actions.js +1 -1
- package/dist/components/motion/project-folder.js +1 -1
- package/dist/components/motion/range-slider-inline.d.ts +18 -0
- package/dist/components/motion/range-slider-inline.d.ts.map +1 -0
- package/dist/components/motion/range-slider-inline.js +267 -0
- package/dist/components/motion/range-slider-inline.js.map +1 -0
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +26 -10
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/select-morph.js +1 -1
- package/dist/components/motion/select.js +1 -1
- package/dist/components/motion/signup-form.js +1 -1
- package/dist/components/motion/table/row-handle.js +1 -1
- package/dist/components/motion/table/table-header.js +1 -1
- package/dist/components/motion/theme-toggle.js +1 -1
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/alert.js +1 -1
- package/dist/components/reui/autocomplete.js +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/cascader/cascader-columns.js +1 -1
- package/dist/components/reui/cascader/cascader-footer.js +1 -1
- package/dist/components/reui/cascader/cascader-item.js +1 -1
- package/dist/components/reui/cascader/cascader-nav.js +1 -1
- package/dist/components/reui/cascader/cascader.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
- package/dist/components/reui/data-grid/data-grid-column-header.js +1 -1
- package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table-dnd.js +1 -1
- package/dist/components/reui/data-grid/data-grid-table.js +1 -1
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js +1 -1
- package/dist/components/reui/filters/filters-advanced.js.map +1 -1
- package/dist/components/reui/filters/filters-builder.js +1 -1
- package/dist/components/reui/filters/filters-chip.js +1 -1
- package/dist/components/reui/filters/filters-editors.js +1 -1
- package/dist/components/reui/filters/filters.js +1 -1
- package/dist/components/reui/frame.d.ts +2 -2
- package/dist/components/reui/frame.js +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/icon-tile.d.ts +1 -1
- package/dist/components/reui/number-field.js +1 -1
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/rating.js +1 -1
- package/dist/components/reui/tree.js +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/alert-dialog.js +1 -1
- package/dist/components/ui/alert.js +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/attachment.js +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/bubble.js +1 -1
- package/dist/components/ui/button-group.js +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/calendar.js +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/checkbox.js +2 -2
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.js +1 -1
- package/dist/components/ui/command.js +1 -1
- package/dist/components/ui/context-menu.js +1 -1
- package/dist/components/ui/dialog.js +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -1
- package/dist/components/ui/empty.js +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +1 -1
- package/dist/components/ui/input-group.js +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/item.js +1 -1
- package/dist/components/ui/marker.js +1 -1
- package/dist/components/ui/menubar.js +1 -1
- package/dist/components/ui/message-scroller.js +1 -1
- package/dist/components/ui/native-select.js +1 -1
- package/dist/components/ui/navigation-menu.js +1 -1
- package/dist/components/ui/pagination.js +1 -1
- package/dist/components/ui/questionnaire.js +3 -3
- package/dist/components/ui/questionnaire.js.map +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/sheet.js +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/spinner.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/tabs.js +1 -1
- package/dist/components/ui/toast.js +2 -2
- package/dist/components/ui/toast.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/components/ui/toggle.js +1 -1
- package/dist/{copy-menu-TIKvPaAZ.js → copy-menu-C5GaT4Z-.js} +2 -2
- package/dist/{copy-menu-TIKvPaAZ.js.map → copy-menu-C5GaT4Z-.js.map} +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -136,7 +136,7 @@ Extended patterns. Preview: [reui.io](https://reui.io/docs).
|
|
|
136
136
|
|
|
137
137
|
Animated components built with [Motion](https://motion.dev). Preview: [beui.dev](https://beui.dev/components/motion). Bundled — `motion`, `lenis`, `@paper-design/shaders-react` are included, no extra installs needed.
|
|
138
138
|
|
|
139
|
-
`action-swap` (4 variants: base, blur, cascade, roll) · `adaptive-stepper` (+ `Liquid` easing backdrop) · `animated-badge` · `animated-number` · `animated-sidebar` · `animated-toast-stack` · `attachment-upload` · `availability-scheduler/*` (copy-menu, day-row, time-select) · `bloom-menu` · `bottom-sheet` · `bounce-sidebar` · `bouncy-accordion` · `button/*` (base, magnetic, metallic, stateful, `ButtonLink`) · `center-morph-modal` · `checkbox` · `chromatic-text-reveal` · `combobox` + `combobox/*` (trigger, list, content, context) · `command-palette` · `context-menu` · `cylinder-carousel` · `dock` · `drawer` · `dynamic-island` · `expandable-action-bar` · `expandable-control` · `expandable-tabs` · `expanding-arrow-button` · `feedback-widget` · `file-tree` · `file-upload` · `hold-action-button` · `infinite-masonry` · `input` (`reserveErrorLine` reserves one validation line) · `liquid` (gooey SVG backdrop: `Liquid`, `LiquidItem`) · `loader` · `magnetic` · `marquee` · `morphing-modal` · `morphing-search` · `morphing-tabs` · `multi-select/*` (composable: trigger, list, content, context — entry `multi-select`) · `not-found/*` (glitch, magnetic, spotlight, stacked, terminal) · `notification-stack` · `number-ticker` · `otp-input` · `overflow-actions` · `parallax` · `popover` · `popover-morph` · `popover-position` (shared popover positioning helper) · `preview-rail` · `project-folder` · `pull-to-refresh` · `radio` · `range-slider` (
|
|
139
|
+
`action-swap` (4 variants: base, blur, cascade, roll) · `adaptive-stepper` (+ `Liquid` easing backdrop) · `animated-badge` · `animated-number` · `animated-sidebar` · `animated-toast-stack` · `attachment-upload` · `availability-scheduler/*` (copy-menu, day-row, time-select) · `bloom-menu` · `bottom-sheet` · `bounce-sidebar` · `bouncy-accordion` · `button/*` (base, magnetic, metallic, stateful, `ButtonLink`) · `card-folder` · `center-morph-modal` · `checkbox` · `chromatic-text-reveal` · `combobox` + `combobox/*` (trigger, list, content, context) · `command-palette` · `context-menu` · `cylinder-carousel` · `digit-swap` · `dock` · `drawer` · `dynamic-island` · `expandable-action-bar` · `expandable-control` · `expandable-tabs` · `expanding-arrow-button` · `feedback-widget` · `file-tree` · `file-upload` · `hold-action-button` · `infinite-masonry` · `input` (`reserveErrorLine` reserves one validation line) · `liquid` (gooey SVG backdrop: `Liquid`, `LiquidItem`) · `loader` · `magnetic` · `marquee` · `morphing-modal` · `morphing-search` · `morphing-tabs` · `multi-select/*` (composable: trigger, list, content, context — entry `multi-select`) · `not-found/*` (glitch, magnetic, spotlight, stacked, terminal) · `notification-stack` · `number-ticker` · `otp-input` · `overflow-actions` · `parallax` · `popover` · `popover-morph` · `popover-position` (shared popover positioning helper) · `preview-rail` · `project-folder` · `pull-to-refresh` · `radio` · `range-slider` (6 variants) · `scroll-progress` · `scroll-reveal` · `scroll-to` · `select` · `select-morph` · `shader-background` · `shared-layout-bg` · `signup-form` · `slide-action-button` · `smooth-scroll` · `swipeable-list` · `switch` · `table/*` (virtualized, editable, async) · `tabs` · `text-cascade` · `text-reveal` · `text-scramble` · `text-shimmer` · `theme-toggle` · `tilt-card` · `tooltip` · `wheel-picker`
|
|
140
140
|
|
|
141
141
|
### beUI — AI Agents (`components/agents`)
|
|
142
142
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { EASE_OUT, SPRING_LAYOUT } from "../../../lib/ease.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { Check, Circle, FileText, Globe2, ImageIcon, MessageSquare, PencilLine, Search, Sparkles, SquareTerminal, Wrench } from "lucide-react";
|
|
5
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
6
|
+
import { Check, Circle, FileText, Globe2, ImageIcon, MessageSquare, PencilLine, Search, Sparkles, SquareTerminal, Wrench } from "lucide-react";
|
|
7
7
|
//#region src/components/agents/agent-activity/activity-row.tsx
|
|
8
8
|
function StepRow({ item }) {
|
|
9
9
|
const state = item.status ?? "complete";
|
|
@@ -5,9 +5,9 @@ import { ActivityRow } from "./activity-row.js";
|
|
|
5
5
|
import { ThinkingShimmer } from "../loading-states/thinking-shimmer.js";
|
|
6
6
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
7
7
|
import { cn } from "@kumix/utils";
|
|
8
|
-
import { ChevronDown } from "lucide-react";
|
|
9
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
10
|
+
import { ChevronDown } from "lucide-react";
|
|
11
11
|
//#region src/components/agents/agent-activity/index.tsx
|
|
12
12
|
function formatDuration(duration) {
|
|
13
13
|
const seconds = Math.max(0, Math.round(duration));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, useEffect, useState } from "react";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { createHighlighter } from "shiki";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/agents/agent-code.tsx
|
|
7
7
|
const LIGHT_THEME = "github-light-high-contrast";
|
|
8
8
|
const DARK_THEME = "github-dark-high-contrast";
|
|
@@ -4,9 +4,9 @@ import { EASE_OUT, SPRING_LAYOUT } from "../../lib/ease.js";
|
|
|
4
4
|
import { MorphPopover, MorphPopoverContent, MorphPopoverTrigger } from "../motion/popover-morph.js";
|
|
5
5
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { ArrowDown, ArrowUp, Bookmark, FileText, Folder, FolderInput, FolderOpen, MoreHorizontal, Pencil, Undo2 } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { ArrowDown, ArrowUp, Bookmark, FileText, Folder, FolderInput, FolderOpen, MoreHorizontal, Pencil, Undo2 } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/ai-sidebar.tsx
|
|
11
11
|
const ROW_REVEAL = {
|
|
12
12
|
duration: .16,
|
|
@@ -9,9 +9,9 @@ import { Input } from "../../motion/input.js";
|
|
|
9
9
|
import { RadioGroup, RadioGroupItem } from "../../motion/radio.js";
|
|
10
10
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
11
11
|
import { cn } from "@kumix/utils";
|
|
12
|
-
import { ArrowLeft, ArrowRight, Check, CircleHelp, LoaderCircle, MessageSquareText, X } from "lucide-react";
|
|
13
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
14
|
+
import { ArrowLeft, ArrowRight, Check, CircleHelp, LoaderCircle, MessageSquareText, X } from "lucide-react";
|
|
15
15
|
//#region src/components/agents/approval-card/index.tsx
|
|
16
16
|
const EMPTY_ANSWER = {
|
|
17
17
|
selected: [],
|
|
@@ -4,9 +4,9 @@ import { EASE_OUT, SPRING_LAYOUT, SPRING_SWAP } from "../../lib/ease.js";
|
|
|
4
4
|
import { AgentDisclosure } from "./agent-disclosure.js";
|
|
5
5
|
import { useCallback, useId, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { BookOpenText, ChevronDown, ExternalLink, Globe2 } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { BookOpenText, ChevronDown, ExternalLink, Globe2 } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/citations.tsx
|
|
11
11
|
function citationTargetId(prefix, citationId) {
|
|
12
12
|
return `${prefix}-${citationId.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
@@ -3,9 +3,9 @@ import { SPRING_PRESS } from "../../lib/ease.js";
|
|
|
3
3
|
import { AgentCodeLine, useAgentCodeTokens } from "./agent-code.js";
|
|
4
4
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { Check, Copy, FileCode2, LoaderCircle } from "lucide-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { motion, useReducedMotion } from "motion/react";
|
|
8
|
+
import { Check, Copy, FileCode2, LoaderCircle } from "lucide-react";
|
|
9
9
|
//#region src/components/agents/code-block.tsx
|
|
10
10
|
function CodeBlock({ code, language = "typescript", filename, status = "complete", showLineNumbers = true, highlightLines = [], maxHeight = 280, wrap = false, copyable = true, onCopy, className }) {
|
|
11
11
|
const reduce = useReducedMotion() ?? false;
|
|
@@ -4,9 +4,9 @@ import { AgentCodeLine, useAgentCodeTokens } from "./agent-code.js";
|
|
|
4
4
|
import { AgentDisclosure } from "./agent-disclosure.js";
|
|
5
5
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { Check, ChevronDown, Copy, FileCode2, LoaderCircle } from "lucide-react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { Check, ChevronDown, Copy, FileCode2, LoaderCircle } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/file-diff.tsx
|
|
11
11
|
function ChangeCount({ value, type }) {
|
|
12
12
|
if (!value) return null;
|
|
@@ -3,9 +3,9 @@ import { useHoverCapable } from "../../hooks/use-hover-capable.js";
|
|
|
3
3
|
import { EASE_IN_OUT, EASE_OUT, SPRING_PRESS } from "../../lib/ease.js";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { Check, CircleAlert, RotateCcw } from "lucide-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
+
import { Check, CircleAlert, RotateCcw } from "lucide-react";
|
|
9
9
|
//#region src/components/agents/image-generation.tsx
|
|
10
10
|
const STATUS_TEXT = {
|
|
11
11
|
queued: "Waiting to generate",
|
|
@@ -3,9 +3,9 @@ import { EASE_OUT, SPRING_LAYOUT, SPRING_SWAP } from "../../lib/ease.js";
|
|
|
3
3
|
import { MessageSideContext } from "./message-context.js";
|
|
4
4
|
import { cloneElement, createContext, useCallback, useContext, useId, useState } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { ChevronDown } from "lucide-react";
|
|
7
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { motion, useReducedMotion } from "motion/react";
|
|
8
|
+
import { ChevronDown } from "lucide-react";
|
|
9
9
|
//#region src/components/agents/message-bubble.tsx
|
|
10
10
|
const MessageBubbleContext = createContext({
|
|
11
11
|
animateIn: true,
|
|
@@ -6,9 +6,9 @@ import "../motion/button/index.js";
|
|
|
6
6
|
import { Select, SelectContent, SelectItem, SelectTrigger } from "../motion/select.js";
|
|
7
7
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
8
8
|
import { cn } from "@kumix/utils";
|
|
9
|
-
import { ArrowUp, Plus, Square } from "lucide-react";
|
|
10
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
11
|
+
import { ArrowUp, Plus, Square } from "lucide-react";
|
|
12
12
|
//#region src/components/agents/prompt-input.tsx
|
|
13
13
|
function PromptInput({ value, defaultValue = "", onValueChange, models = [], model, defaultModel, onModelChange, actions = [], onAction, onSubmit, loading = false, onStop, minRows = 2, maxRows = 8, leadingAction, className, disabled, placeholder = "Ask the agent to do something…", "aria-label": ariaLabel = "Prompt", onKeyDown, ...textareaProps }) {
|
|
14
14
|
const reduce = useReducedMotion() ?? false;
|
|
@@ -4,9 +4,9 @@ import { AgentDisclosure } from "./agent-disclosure.js";
|
|
|
4
4
|
import { CitationList, CitationStack } from "./citations.js";
|
|
5
5
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { Check, ChevronDown, Copy, RotateCcw, ThumbsDown, ThumbsUp } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { Check, ChevronDown, Copy, RotateCcw, ThumbsDown, ThumbsUp } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/streaming-response.tsx
|
|
11
11
|
function ResponseAction({ label, active = false, onClick, children }) {
|
|
12
12
|
const reduce = useReducedMotion() ?? false;
|
|
@@ -4,9 +4,9 @@ import { AgentDisclosure } from "./agent-disclosure.js";
|
|
|
4
4
|
import { ActionSwapRollText } from "../motion/action-swap-roll.js";
|
|
5
5
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { ChevronDown, ListTodo } from "lucide-react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { ChevronDown, ListTodo } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/todo-list.tsx
|
|
11
11
|
function statusLabel(status) {
|
|
12
12
|
if (status === "in-progress") return "In progress";
|
|
@@ -4,9 +4,9 @@ import { AgentCode } from "./agent-code.js";
|
|
|
4
4
|
import { AgentDisclosure } from "./agent-disclosure.js";
|
|
5
5
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { Check, ChevronDown, CircleAlert, LoaderCircle, ShieldCheck, X } from "lucide-react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { Check, ChevronDown, CircleAlert, LoaderCircle, ShieldCheck, X } from "lucide-react";
|
|
10
10
|
//#region src/components/agents/tool-approval.tsx
|
|
11
11
|
function getStatusCopy(status) {
|
|
12
12
|
if (status === "approving") return "Approving";
|
|
@@ -5,9 +5,9 @@ import { AgentDisclosure } from "./agent-disclosure.js";
|
|
|
5
5
|
import { ActionSwapRollText } from "../motion/action-swap-roll.js";
|
|
6
6
|
import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
7
7
|
import { cn } from "@kumix/utils";
|
|
8
|
-
import { Ban, Braces, Check, ChevronDown, CircleCheck, CircleX, Copy, LoaderCircle, RotateCcw, SquareTerminal, Wrench } from "lucide-react";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { motion, useReducedMotion } from "motion/react";
|
|
10
|
+
import { Ban, Braces, Check, ChevronDown, CircleCheck, CircleX, Copy, LoaderCircle, RotateCcw, SquareTerminal, Wrench } from "lucide-react";
|
|
11
11
|
//#region src/components/agents/tool-result.tsx
|
|
12
12
|
function getStatusLabel(status) {
|
|
13
13
|
if (status === "running") return "Running";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogMedia, AlertDialogTitle } from "../ui/alert-dialog.js";
|
|
3
3
|
import { Spinner } from "../ui/spinner.js";
|
|
4
|
-
import { CircleAlertIcon, ShieldQuestionMarkIcon } from "lucide-react";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { CircleAlertIcon, ShieldQuestionMarkIcon } from "lucide-react";
|
|
6
6
|
//#region src/components/custom/confirm-dialog.tsx
|
|
7
7
|
function ConfirmDialog({ open, onOpenChange, onConfirm, title, description, confirmText, cancelText, loading = false }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(AlertDialog, {
|
|
@@ -3,9 +3,9 @@ import { EASE_OUT, SPRING_PRESS } from "../../lib/ease.js";
|
|
|
3
3
|
import { Liquid, LiquidItem } from "./liquid.js";
|
|
4
4
|
import { createContext, useCallback, useContext, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { Minus, Plus } from "lucide-react";
|
|
7
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
+
import { Minus, Plus } from "lucide-react";
|
|
9
9
|
//#region src/components/motion/adaptive-stepper.tsx
|
|
10
10
|
const STEPPER_LIQUID_TRANSITION = {
|
|
11
11
|
duration: 600,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { cn } from "@kumix/utils";
|
|
4
|
-
import { AlertTriangle, Check, Circle, Info, LoaderCircle, X } from "lucide-react";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
5
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
6
|
+
import { AlertTriangle, Check, Circle, Info, LoaderCircle, X } from "lucide-react";
|
|
7
7
|
//#region src/components/motion/animated-badge.tsx
|
|
8
8
|
const STATUS_CLASS = {
|
|
9
9
|
neutral: "border-border bg-card text-muted-foreground",
|
|
@@ -3,9 +3,9 @@ import { EASE_DRAWER, EASE_OUT, SPRING_LAYOUT, SPRING_PRESS } from "../../lib/ea
|
|
|
3
3
|
import { SharedLayoutBg } from "./shared-layout-bg.js";
|
|
4
4
|
import { createContext, createElement, forwardRef, useCallback, useContext, useEffect, useId, useRef, useState, useSyncExternalStore } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
6
|
-
import { ChevronRight } from "lucide-react";
|
|
7
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
8
|
+
import { ChevronRight } from "lucide-react";
|
|
9
9
|
import { createPortal } from "react-dom";
|
|
10
10
|
//#region src/components/motion/animated-sidebar.tsx
|
|
11
11
|
const MOBILE_QUERY = "(max-width: 767px)";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { AlertCircle, Bell, Check, Info, LoaderCircle, X } from "lucide-react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { AlertCircle, Bell, Check, Info, LoaderCircle, X } from "lucide-react";
|
|
8
8
|
import { createPortal } from "react-dom";
|
|
9
9
|
//#region src/components/motion/animated-toast-stack.tsx
|
|
10
10
|
const STACK_SPRING = {
|
|
@@ -4,9 +4,9 @@ import { t as PresenceGate } from "../../presence-gate-BekdC4Bo.js";
|
|
|
4
4
|
import { Tooltip } from "./tooltip.js";
|
|
5
5
|
import { useCallback, useEffect, useId, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@kumix/utils";
|
|
7
|
-
import { AlertCircle, Check, ExternalLink, FileImage, Link, LoaderCircle, Mic, Paperclip, Pause, Play, RotateCcw, Upload, X } from "lucide-react";
|
|
8
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { AnimatePresence, LayoutGroup, motion, useReducedMotion } from "motion/react";
|
|
9
|
+
import { AlertCircle, Check, ExternalLink, FileImage, Link, LoaderCircle, Mic, Paperclip, Pause, Play, RotateCcw, Upload, X } from "lucide-react";
|
|
10
10
|
import { createPortal } from "react-dom";
|
|
11
11
|
//#region src/components/motion/attachment-upload.tsx
|
|
12
12
|
const ITEM_TRANSITION = {
|
|
@@ -3,12 +3,12 @@ import { SPRING_LAYOUT } from "../../../lib/ease.js";
|
|
|
3
3
|
import { Tooltip } from "../tooltip.js";
|
|
4
4
|
import { Switch } from "../switch.js";
|
|
5
5
|
import { IconButton } from "./icon-button.js";
|
|
6
|
-
import { c as startOptions, i as clampRange, l as toMinutes, o as endOptions, s as panelKey, t as CopyMenu, u as toValue } from "../../../copy-menu-
|
|
6
|
+
import { c as startOptions, i as clampRange, l as toMinutes, o as endOptions, s as panelKey, t as CopyMenu, u as toValue } from "../../../copy-menu-C5GaT4Z-.js";
|
|
7
7
|
import { TimeSelect } from "./time-select.js";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
|
-
import { Plus, X } from "lucide-react";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { AnimatePresence, motion } from "motion/react";
|
|
11
|
+
import { Plus, X } from "lucide-react";
|
|
12
12
|
//#region src/components/motion/availability-scheduler/day-row.tsx
|
|
13
13
|
function DayRow({ day, label, state, options, reduce, elevated, openPanel, onChange, onCopy, onPanelOpenChange }) {
|
|
14
14
|
const idRef = useRef(0);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a as defaultWeek, n as WEEKDAYS, r as buildOptions, s as panelKey } from "../../../copy-menu-
|
|
2
|
+
import { a as defaultWeek, n as WEEKDAYS, r as buildOptions, s as panelKey } from "../../../copy-menu-C5GaT4Z-.js";
|
|
3
3
|
import { DayRow } from "./day-row.js";
|
|
4
4
|
import { useCallback, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { cn } from "@kumix/utils";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { useEffect, useId, useRef, useState } from "react";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { Bell, FileText, FolderClosed, LayoutGrid, Link, Plus, Table, X } from "lucide-react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { Bell, FileText, FolderClosed, LayoutGrid, Link, Plus, Table, X } from "lucide-react";
|
|
8
8
|
//#region src/components/motion/bloom-menu.tsx
|
|
9
9
|
const ITEMS = [
|
|
10
10
|
{
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { EASE_OUT } from "../../lib/ease.js";
|
|
3
3
|
import { useCallback, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
4
|
import { cn } from "@kumix/utils";
|
|
5
|
-
import { ChevronDown } from "lucide-react";
|
|
6
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { ChevronDown } from "lucide-react";
|
|
8
8
|
//#region src/components/motion/bouncy-accordion.tsx
|
|
9
9
|
const ROW_TRANSITION = {
|
|
10
10
|
type: "spring",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { EASE_OUT, SPRING_SWAP } from "../../../lib/ease.js";
|
|
3
3
|
import { Button } from "./base.js";
|
|
4
4
|
import { forwardRef, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
-
import { Check, Loader2, X } from "lucide-react";
|
|
6
5
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { Check, Loader2, X } from "lucide-react";
|
|
8
8
|
//#region src/components/motion/button/stateful.tsx
|
|
9
9
|
const CASCADE_STAGGER = .025;
|
|
10
10
|
const ROLL_BLUR = "blur(6px)";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/motion/card-folder.d.ts
|
|
3
|
+
export interface CardFolderProps {
|
|
4
|
+
title: string;
|
|
5
|
+
cardNumber: string;
|
|
6
|
+
expiry: string;
|
|
7
|
+
cvv: string;
|
|
8
|
+
card: ReactNode;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
detailsVisible?: boolean;
|
|
13
|
+
defaultDetailsVisible?: boolean;
|
|
14
|
+
onDetailsVisibleChange?: (visible: boolean) => void;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
onAction?: () => void;
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
actionLabel?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
cardClassName?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A landscape card tucked into an animated folder sleeve. Pressing the folder
|
|
25
|
+
* lifts the card forward while the purse compresses into its bottom seam; a
|
|
26
|
+
* separate privacy control reveals its number and CVV.
|
|
27
|
+
*/
|
|
28
|
+
export declare function CardFolder({ title, cardNumber, expiry, cvv, card, open, defaultOpen, onOpenChange, detailsVisible, defaultDetailsVisible, onDetailsVisibleChange, onClick, onAction, ariaLabel, actionLabel, disabled, className, cardClassName }: CardFolderProps): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
//# sourceMappingURL=card-folder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card-folder.d.ts","names":[],"sources":["../../../src/components/motion/card-folder.tsx"],"mappings":";;iBA4BiB;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA,gBAAgB;EAChB;EACA;EACA,0BAA0B;EAC1B;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;wBAQc,aACd,OACA,YACA,QACA,KACA,MACA,MACA,aACA,cACA,gBACA,uBACA,wBACA,SACA,UACA,WACA,aACA,UACA,WACA,iBACC,kCAAe,IAAA"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_IN_OUT, EASE_OUT, SPRING_LAYOUT, SPRING_PRESS } from "../../lib/ease.js";
|
|
3
|
+
import { DigitSwap } from "./digit-swap.js";
|
|
4
|
+
import { useCallback, useEffect, useState } from "react";
|
|
5
|
+
import { cn } from "@kumix/utils";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { AnimatePresence, animate, motion, useMotionValue, useReducedMotion, useTransform } from "motion/react";
|
|
8
|
+
import { EllipsisVertical, Eye, EyeOff } from "lucide-react";
|
|
9
|
+
//#region src/components/motion/card-folder.tsx
|
|
10
|
+
const PURSE_MORPH_TRANSITION = {
|
|
11
|
+
duration: .28,
|
|
12
|
+
ease: EASE_IN_OUT
|
|
13
|
+
};
|
|
14
|
+
const PURSE_REDUCED_TRANSITION = {
|
|
15
|
+
duration: .16,
|
|
16
|
+
ease: EASE_OUT
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* A landscape card tucked into an animated folder sleeve. Pressing the folder
|
|
20
|
+
* lifts the card forward while the purse compresses into its bottom seam; a
|
|
21
|
+
* separate privacy control reveals its number and CVV.
|
|
22
|
+
*/
|
|
23
|
+
function CardFolder({ title, cardNumber, expiry, cvv, card, open, defaultOpen = false, onOpenChange, detailsVisible, defaultDetailsVisible = false, onDetailsVisibleChange, onClick, onAction, ariaLabel, actionLabel, disabled = false, className, cardClassName }) {
|
|
24
|
+
const reduce = useReducedMotion();
|
|
25
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
26
|
+
const [internalDetailsVisible, setInternalDetailsVisible] = useState(defaultDetailsVisible);
|
|
27
|
+
const openControlled = open !== void 0;
|
|
28
|
+
const detailsControlled = detailsVisible !== void 0;
|
|
29
|
+
const isOpen = open ?? internalOpen;
|
|
30
|
+
const areDetailsVisible = detailsVisible ?? internalDetailsVisible;
|
|
31
|
+
const transition = reduce ? { duration: 0 } : SPRING_LAYOUT;
|
|
32
|
+
const normalizedCardNumber = cardNumber.replace(/\D/g, "");
|
|
33
|
+
const visibleLastFour = normalizedCardNumber.slice(-4).padStart(4, "•");
|
|
34
|
+
const revealedCardNumber = normalizedCardNumber.match(/.{1,4}/g)?.join(" ") ?? visibleLastFour;
|
|
35
|
+
const maskedCvv = "•".repeat(Math.max(3, cvv.length));
|
|
36
|
+
const defaultAriaLabel = `${isOpen ? "Close" : "Open"} ${title}, card ending in ${visibleLastFour}, expires ${expiry}`;
|
|
37
|
+
const progress = useMotionValue(isOpen ? 1 : 0);
|
|
38
|
+
const cardTransform = useTransform(progress, (value) => {
|
|
39
|
+
const lift = Math.sin(Math.PI * Math.min(1, Math.max(0, value)));
|
|
40
|
+
return `translateY(${-8 * lift}%) scale(${1 + .01 * lift})`;
|
|
41
|
+
});
|
|
42
|
+
const backTransform = useTransform(progress, [0, 1], ["translateY(0%) scaleY(1)", "translateY(18%) scaleY(0.18)"]);
|
|
43
|
+
const frontTransform = useTransform(progress, [0, 1], ["translateY(0%) rotateX(0deg)", "translateY(18%) rotateX(-72deg)"]);
|
|
44
|
+
const purseOpacity = useTransform(progress, [
|
|
45
|
+
0,
|
|
46
|
+
.76,
|
|
47
|
+
1
|
|
48
|
+
], [
|
|
49
|
+
1,
|
|
50
|
+
1,
|
|
51
|
+
0
|
|
52
|
+
]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
const controls = animate(progress, isOpen ? 1 : 0, reduce ? { duration: 0 } : PURSE_MORPH_TRANSITION);
|
|
55
|
+
return () => controls.stop();
|
|
56
|
+
}, [
|
|
57
|
+
isOpen,
|
|
58
|
+
progress,
|
|
59
|
+
reduce
|
|
60
|
+
]);
|
|
61
|
+
const setOpen = useCallback((nextOpen) => {
|
|
62
|
+
if (disabled) return;
|
|
63
|
+
if (!openControlled) setInternalOpen(nextOpen);
|
|
64
|
+
onOpenChange?.(nextOpen);
|
|
65
|
+
}, [
|
|
66
|
+
disabled,
|
|
67
|
+
onOpenChange,
|
|
68
|
+
openControlled
|
|
69
|
+
]);
|
|
70
|
+
const handleClick = () => {
|
|
71
|
+
setOpen(!isOpen);
|
|
72
|
+
onClick?.();
|
|
73
|
+
};
|
|
74
|
+
const toggleDetails = () => {
|
|
75
|
+
if (disabled) return;
|
|
76
|
+
const nextVisible = !areDetailsVisible;
|
|
77
|
+
if (!detailsControlled) setInternalDetailsVisible(nextVisible);
|
|
78
|
+
onDetailsVisibleChange?.(nextVisible);
|
|
79
|
+
};
|
|
80
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
81
|
+
"data-open": isOpen ? "true" : "false",
|
|
82
|
+
"data-details-visible": areDetailsVisible ? "true" : "false",
|
|
83
|
+
className: cn("perspective-[1200px] relative aspect-1029/592 w-96 max-w-full select-none", className),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ jsxs(motion.button, {
|
|
86
|
+
type: "button",
|
|
87
|
+
disabled,
|
|
88
|
+
"aria-label": ariaLabel ?? defaultAriaLabel,
|
|
89
|
+
"aria-expanded": isOpen,
|
|
90
|
+
onClick: handleClick,
|
|
91
|
+
whileTap: reduce || disabled ? void 0 : { scale: .96 },
|
|
92
|
+
transition: reduce ? { duration: 0 } : SPRING_PRESS,
|
|
93
|
+
className: "absolute inset-0 block rounded-2xl text-left outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-4 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
94
|
+
children: [/* @__PURE__ */ jsx(motion.span, {
|
|
95
|
+
"data-slot": "card-folder-back",
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
initial: false,
|
|
98
|
+
animate: reduce ? { opacity: isOpen ? 0 : 1 } : void 0,
|
|
99
|
+
transition: PURSE_REDUCED_TRANSITION,
|
|
100
|
+
style: reduce ? void 0 : {
|
|
101
|
+
opacity: purseOpacity,
|
|
102
|
+
transform: backTransform
|
|
103
|
+
},
|
|
104
|
+
className: "absolute inset-x-0 top-[10%] bottom-0 origin-[center_bottom] rounded-2xl border border-foreground/10 bg-background"
|
|
105
|
+
}), /* @__PURE__ */ jsx(motion.span, {
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
initial: false,
|
|
108
|
+
animate: reduce ? { transform: "translateY(0%) scale(1)" } : void 0,
|
|
109
|
+
style: reduce ? void 0 : { transform: cardTransform },
|
|
110
|
+
className: cn("absolute top-0 right-[4.7%] left-[4.7%] z-10 aspect-[1.586/1] origin-[center_bottom] overflow-hidden rounded-xl border border-foreground/10 bg-background will-change-transform", cardClassName),
|
|
111
|
+
children: card
|
|
112
|
+
})]
|
|
113
|
+
}),
|
|
114
|
+
/* @__PURE__ */ jsxs(motion.span, {
|
|
115
|
+
"aria-hidden": isOpen,
|
|
116
|
+
inert: isOpen,
|
|
117
|
+
initial: false,
|
|
118
|
+
animate: reduce ? { opacity: isOpen ? 0 : 1 } : void 0,
|
|
119
|
+
transition: PURSE_REDUCED_TRANSITION,
|
|
120
|
+
style: reduce ? void 0 : {
|
|
121
|
+
opacity: purseOpacity,
|
|
122
|
+
transform: frontTransform
|
|
123
|
+
},
|
|
124
|
+
className: "backface-hidden pointer-events-none absolute inset-x-0 top-1/2 bottom-0 z-20 origin-[center_bottom]",
|
|
125
|
+
children: [/* @__PURE__ */ jsxs("svg", {
|
|
126
|
+
"aria-hidden": "true",
|
|
127
|
+
viewBox: "0 0 384 110",
|
|
128
|
+
preserveAspectRatio: "none",
|
|
129
|
+
className: "absolute inset-0 size-full overflow-visible",
|
|
130
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
131
|
+
d: "M0 17C15 7 31 4 49 4H87C110 4 126 17 144 32L158 44C176 59 206 59 225 43L240 30C257 16 271 4 295 4H335C354 4 370 8 384 18V94C384 103 377 110 368 110H16C7 110 0 103 0 94Z",
|
|
132
|
+
fill: "var(--background)",
|
|
133
|
+
stroke: "var(--foreground)",
|
|
134
|
+
strokeOpacity: "0.12",
|
|
135
|
+
vectorEffect: "non-scaling-stroke"
|
|
136
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
137
|
+
d: "M10 21C22 13 35 11 51 11H85C105 11 120 23 137 37L153 50C175 68 208 68 231 49L246 36C262 23 275 11 297 11H333C350 11 363 14 374 22V89C374 97 369 101 360 101H24C15 101 10 96 10 89Z",
|
|
138
|
+
fill: "none",
|
|
139
|
+
stroke: "var(--foreground)",
|
|
140
|
+
strokeDasharray: "5 5",
|
|
141
|
+
strokeLinecap: "round",
|
|
142
|
+
strokeOpacity: "0.22",
|
|
143
|
+
vectorEffect: "non-scaling-stroke"
|
|
144
|
+
})]
|
|
145
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
146
|
+
className: "absolute inset-x-[5%] inset-y-0 z-10 flex min-w-0 flex-col justify-between py-4",
|
|
147
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
148
|
+
className: "flex items-start justify-between pr-2",
|
|
149
|
+
children: [/* @__PURE__ */ jsx(motion.button, {
|
|
150
|
+
type: "button",
|
|
151
|
+
disabled,
|
|
152
|
+
tabIndex: isOpen ? -1 : void 0,
|
|
153
|
+
"aria-label": areDetailsVisible ? "Hide card details" : "Show card details",
|
|
154
|
+
"aria-pressed": areDetailsVisible,
|
|
155
|
+
onClick: toggleDetails,
|
|
156
|
+
whileTap: reduce || disabled ? void 0 : { scale: .96 },
|
|
157
|
+
transition: reduce ? { duration: .12 } : SPRING_PRESS,
|
|
158
|
+
className: cn("z-30 flex size-10 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50", isOpen ? "pointer-events-none" : "pointer-events-auto"),
|
|
159
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
160
|
+
initial: false,
|
|
161
|
+
mode: "popLayout",
|
|
162
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
163
|
+
initial: reduce ? { opacity: 0 } : {
|
|
164
|
+
opacity: 0,
|
|
165
|
+
scale: .25,
|
|
166
|
+
filter: "blur(4px)"
|
|
167
|
+
},
|
|
168
|
+
animate: {
|
|
169
|
+
opacity: 1,
|
|
170
|
+
scale: 1,
|
|
171
|
+
filter: "blur(0px)"
|
|
172
|
+
},
|
|
173
|
+
exit: reduce ? { opacity: 0 } : {
|
|
174
|
+
opacity: 0,
|
|
175
|
+
scale: .25,
|
|
176
|
+
filter: "blur(4px)"
|
|
177
|
+
},
|
|
178
|
+
transition: reduce ? { duration: .12 } : {
|
|
179
|
+
type: "spring",
|
|
180
|
+
duration: .3,
|
|
181
|
+
bounce: 0
|
|
182
|
+
},
|
|
183
|
+
className: "flex items-center justify-center",
|
|
184
|
+
children: areDetailsVisible ? /* @__PURE__ */ jsx(EyeOff, {
|
|
185
|
+
className: "size-4",
|
|
186
|
+
"aria-hidden": "true"
|
|
187
|
+
}) : /* @__PURE__ */ jsx(Eye, {
|
|
188
|
+
className: "size-4",
|
|
189
|
+
"aria-hidden": "true"
|
|
190
|
+
})
|
|
191
|
+
}, areDetailsVisible ? "hide" : "show")
|
|
192
|
+
})
|
|
193
|
+
}, "card-details-visibility"), /* @__PURE__ */ jsxs("span", {
|
|
194
|
+
className: "flex shrink-0 items-end gap-3.5 pt-2",
|
|
195
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
196
|
+
className: "flex flex-col gap-0.5",
|
|
197
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
198
|
+
className: "font-medium text-[9px] text-muted-foreground/65 uppercase tracking-[0.12em]",
|
|
199
|
+
children: "Expiry"
|
|
200
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
201
|
+
className: "font-medium text-foreground text-xs tabular-nums",
|
|
202
|
+
children: expiry
|
|
203
|
+
})]
|
|
204
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
205
|
+
className: "flex flex-col gap-0.5",
|
|
206
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
207
|
+
className: "font-medium text-[9px] text-muted-foreground/65 uppercase tracking-[0.12em]",
|
|
208
|
+
children: "CVV"
|
|
209
|
+
}), /* @__PURE__ */ jsx(DigitSwap, {
|
|
210
|
+
value: areDetailsVisible ? cvv : maskedCvv,
|
|
211
|
+
animationKey: areDetailsVisible ? "revealed" : "masked",
|
|
212
|
+
direction: areDetailsVisible ? "up" : "down",
|
|
213
|
+
className: "font-medium text-foreground text-xs tabular-nums"
|
|
214
|
+
})]
|
|
215
|
+
})]
|
|
216
|
+
})]
|
|
217
|
+
}), /* @__PURE__ */ jsxs("span", {
|
|
218
|
+
className: "flex min-w-0 items-baseline justify-between gap-4",
|
|
219
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
220
|
+
className: "truncate font-medium text-foreground text-lg leading-tight",
|
|
221
|
+
children: title
|
|
222
|
+
}), /* @__PURE__ */ jsx(DigitSwap, {
|
|
223
|
+
value: areDetailsVisible ? revealedCardNumber : `•••• •••• •••• ${visibleLastFour}`,
|
|
224
|
+
animationKey: areDetailsVisible ? "revealed" : "masked",
|
|
225
|
+
direction: areDetailsVisible ? "up" : "down",
|
|
226
|
+
suffixLength: 4,
|
|
227
|
+
glyphClassName: areDetailsVisible ? "text-foreground" : "text-muted-foreground",
|
|
228
|
+
suffixClassName: "text-foreground",
|
|
229
|
+
className: "truncate font-mono text-xs tabular-nums tracking-[0.08em]"
|
|
230
|
+
})]
|
|
231
|
+
})]
|
|
232
|
+
})]
|
|
233
|
+
}),
|
|
234
|
+
onAction ? /* @__PURE__ */ jsx(motion.button, {
|
|
235
|
+
type: "button",
|
|
236
|
+
disabled,
|
|
237
|
+
"aria-label": actionLabel ?? `Open actions for ${title}`,
|
|
238
|
+
onClick: onAction,
|
|
239
|
+
animate: { y: isOpen && !reduce ? -14 : 0 },
|
|
240
|
+
whileTap: reduce || disabled ? void 0 : { scale: .96 },
|
|
241
|
+
transition,
|
|
242
|
+
className: "absolute top-[10%] right-[2.6%] z-10 flex size-10 -translate-y-1/2 items-center justify-center rounded-full text-white/65 outline-none transition-colors hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-white disabled:cursor-not-allowed disabled:opacity-50",
|
|
243
|
+
children: /* @__PURE__ */ jsx(EllipsisVertical, {
|
|
244
|
+
className: "size-4",
|
|
245
|
+
"aria-hidden": "true"
|
|
246
|
+
})
|
|
247
|
+
}) : null
|
|
248
|
+
]
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
export { CardFolder };
|
|
253
|
+
|
|
254
|
+
//# sourceMappingURL=card-folder.js.map
|