@tradalab/lyra 2.0.1 → 2.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 +99 -99
- package/dist/blocks/index.js +2 -1
- package/dist/blocks/index.js.map +1 -1
- package/dist/chunk-5M44N7SV.js +237 -0
- package/dist/chunk-5M44N7SV.js.map +1 -0
- package/dist/chunk-7GY2KYNW.js +250 -0
- package/dist/chunk-7GY2KYNW.js.map +1 -0
- package/dist/{chunk-RSAN65FI.js → chunk-APYQOJAJ.js} +4 -20
- package/dist/chunk-APYQOJAJ.js.map +1 -0
- package/dist/{chunk-2PHVSGAE.js → chunk-F5HR244O.js} +18 -254
- package/dist/chunk-F5HR244O.js.map +1 -0
- package/dist/chunk-PI6SANLG.js +22 -0
- package/dist/chunk-PI6SANLG.js.map +1 -0
- package/dist/chunk-PL37KFRJ.js +3 -0
- package/dist/chunk-PL37KFRJ.js.map +1 -0
- package/dist/chunk-QGUKTRBR.js +25 -0
- package/dist/chunk-QGUKTRBR.js.map +1 -0
- package/dist/{chunk-SQA4ILAK.js → chunk-VEWKPOMS.js} +4 -18
- package/dist/chunk-VEWKPOMS.js.map +1 -0
- package/dist/data-table/index.js +2 -1
- package/dist/data-table/index.js.map +1 -1
- package/dist/people/index.d.ts +170 -0
- package/dist/people/index.js +319 -0
- package/dist/people/index.js.map +1 -0
- package/dist/shell/index.js +4 -2
- package/dist/shell/index.js.map +1 -1
- package/dist/ui/index.d.ts +29 -2
- package/dist/ui/index.js +27 -233
- package/dist/ui/index.js.map +1 -1
- package/dist/utils/index.js +1 -0
- package/package.json +8 -4
- package/dist/chunk-2PHVSGAE.js.map +0 -1
- package/dist/chunk-RSAN65FI.js.map +0 -1
- package/dist/chunk-SQA4ILAK.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
# @tradalab/lyra
|
|
2
|
-
|
|
3
|
-
> Tradalab's UI kit — shadcn (`radix-lyra` style) primitives, composed
|
|
4
|
-
> components, and an app shell for **React 19 / Next 16 / Tailwind v4**.
|
|
5
|
-
|
|
6
|
-
ESM-only. Extracted from Tradalab's foundation kit so every company app shares
|
|
7
|
-
the same component surface.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
pnpm add @tradalab/lyra
|
|
13
|
-
# peers: react ^19, react-dom ^19 (next ^16 only if you use /shell)
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
|
|
17
|
-
|
|
18
|
-
```css
|
|
19
|
-
/* app/globals.css */
|
|
20
|
-
@import "@tradalab/lyra/styles.css";
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Subpaths
|
|
24
|
-
|
|
25
|
-
| Subpath | Exports | Boundary |
|
|
26
|
-
|---|---|---|
|
|
27
|
-
| `@tradalab/lyra/utils` | `cn` | server-safe |
|
|
28
|
-
| `@tradalab/lyra/hooks` | `useMobile` | client |
|
|
29
|
-
| `@tradalab/lyra/ui` | 60 shadcn primitives + `AccountMenu`, `Container` | client |
|
|
30
|
-
| `@tradalab/lyra/shell` | `AppShell`, `NavItem`, `NavGroup`, `Breadcrumbs`, `useActiveRoute` | client |
|
|
31
|
-
| `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
|
|
32
|
-
|
|
33
|
-
Client subpaths carry a build-injected `"use client"`; import them inside a
|
|
34
|
-
client tree or pass via `children` — don't import them into a Server Component's
|
|
35
|
-
own module.
|
|
36
|
-
|
|
37
|
-
```tsx
|
|
38
|
-
import { Button, Card, CardHeader } from "@tradalab/lyra/ui"
|
|
39
|
-
import { AppShell, NavItem } from "@tradalab/lyra/shell"
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Toast
|
|
43
|
-
|
|
44
|
-
`2.0.0` replaced the sonner-based toast with shadcn's Base UI Toast. `sonner` is
|
|
45
|
-
gone — it is no longer a peer dependency, and apps should drop it.
|
|
46
|
-
|
|
47
|
-
`toast` is a **manager object, not a callable**:
|
|
48
|
-
|
|
49
|
-
```tsx
|
|
50
|
-
import { Toaster, toast } from "@tradalab/lyra/ui"
|
|
51
|
-
|
|
52
|
-
toast.add({ title: "Saved" })
|
|
53
|
-
toast.add({ title: "Upload failed", description: err.message, type: "error" })
|
|
54
|
-
const id = toast.add({ title: "Uploading…", type: "loading", timeout: 0 })
|
|
55
|
-
toast.close(id)
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`type` is `"success" | "error" | "info" | "warning" | "loading"` — there is no
|
|
59
|
-
`toast.success("x")`. `timeout: 0` never auto-dismisses (sonner's `duration:
|
|
60
|
-
Infinity`). Position belongs to the viewport this package styles, so sonner's
|
|
61
|
-
`position` and `richColors` props have no equivalent. Mount `<Toaster/>` once —
|
|
62
|
-
apps on `@tradalab/nekit` already get it from `NekitProvider`.
|
|
63
|
-
|
|
64
|
-
## Develop
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
make install # pnpm install
|
|
68
|
-
make build # tsup + inject-use-client + verify-build-output
|
|
69
|
-
make verify # typecheck + lint + test
|
|
70
|
-
make ui-add <name> # scaffold a shadcn primitive, adapt, rebuild barrel
|
|
71
|
-
make ui-update <name> # overwrite a primitive with the latest upstream version
|
|
72
|
-
make ui-sync # re-adapt every primitive + rebuild barrel
|
|
73
|
-
make ui-diff # report which primitives changed upstream (exit 1 if any)
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
**Staying current with shadcn** — `make ui-diff` compares every primitive
|
|
77
|
-
against the live `radix-lyra` registry and exits non-zero when one has moved.
|
|
78
|
-
It normalises away everything the CLI would rewrite anyway (icon-library
|
|
79
|
-
placeholders, `cn-*` template classes, import aliases, prettier line-wrapping),
|
|
80
|
-
so what it prints is real change. Prefer it over `shadcn add --diff`, which
|
|
81
|
-
caps its output at five files per run.
|
|
82
|
-
|
|
83
|
-
A primitive lyra deliberately diverges from carries a `customised` note in
|
|
84
|
-
`primitives.lock.json`; `ui-diff` lists those separately instead of failing on
|
|
85
|
-
them forever. Document the divergence in a JSDoc block in the file too —
|
|
86
|
-
`make ui-update` will overwrite it, and that note is what tells the next person
|
|
87
|
-
to put it back.
|
|
88
|
-
|
|
89
|
-
**Layout** — `src/<layer>/` with a barrel `index.ts`; one tsup entry per
|
|
90
|
-
subpath; ESM-only to `dist/`. **Layers** (enforced by `eslint-plugin-boundaries`):
|
|
91
|
-
`utils`/`hooks` (foundation) → `ui` → `shell`. No upward imports.
|
|
92
|
-
|
|
93
|
-
**`"use client"` is not in source** — it is injected onto the client entry
|
|
94
|
-
artifacts post-build by `scripts/inject-use-client.mjs`, then asserted by
|
|
95
|
-
`scripts/verify-build-output.mjs`. `scripts/sync-ui.mjs` adapts shadcn-CLI
|
|
96
|
-
output to repo conventions.
|
|
97
|
-
|
|
98
|
-
**Release** — `pnpm publish --no-git-checks` (the `prepublishOnly` hook builds
|
|
99
|
-
first). Published to the npm public registry.
|
|
1
|
+
# @tradalab/lyra
|
|
2
|
+
|
|
3
|
+
> Tradalab's UI kit — shadcn (`radix-lyra` style) primitives, composed
|
|
4
|
+
> components, and an app shell for **React 19 / Next 16 / Tailwind v4**.
|
|
5
|
+
|
|
6
|
+
ESM-only. Extracted from Tradalab's foundation kit so every company app shares
|
|
7
|
+
the same component surface.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @tradalab/lyra
|
|
13
|
+
# peers: react ^19, react-dom ^19 (next ^16 only if you use /shell)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
|
|
17
|
+
|
|
18
|
+
```css
|
|
19
|
+
/* app/globals.css */
|
|
20
|
+
@import "@tradalab/lyra/styles.css";
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Subpaths
|
|
24
|
+
|
|
25
|
+
| Subpath | Exports | Boundary |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| `@tradalab/lyra/utils` | `cn` | server-safe |
|
|
28
|
+
| `@tradalab/lyra/hooks` | `useMobile` | client |
|
|
29
|
+
| `@tradalab/lyra/ui` | 60 shadcn primitives + `AccountMenu`, `ActionButton`, `Container` | client |
|
|
30
|
+
| `@tradalab/lyra/shell` | `AppShell`, `NavItem`, `NavGroup`, `Breadcrumbs`, `useActiveRoute` | client |
|
|
31
|
+
| `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
|
|
32
|
+
|
|
33
|
+
Client subpaths carry a build-injected `"use client"`; import them inside a
|
|
34
|
+
client tree or pass via `children` — don't import them into a Server Component's
|
|
35
|
+
own module.
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Button, Card, CardHeader } from "@tradalab/lyra/ui"
|
|
39
|
+
import { AppShell, NavItem } from "@tradalab/lyra/shell"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Toast
|
|
43
|
+
|
|
44
|
+
`2.0.0` replaced the sonner-based toast with shadcn's Base UI Toast. `sonner` is
|
|
45
|
+
gone — it is no longer a peer dependency, and apps should drop it.
|
|
46
|
+
|
|
47
|
+
`toast` is a **manager object, not a callable**:
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { Toaster, toast } from "@tradalab/lyra/ui"
|
|
51
|
+
|
|
52
|
+
toast.add({ title: "Saved" })
|
|
53
|
+
toast.add({ title: "Upload failed", description: err.message, type: "error" })
|
|
54
|
+
const id = toast.add({ title: "Uploading…", type: "loading", timeout: 0 })
|
|
55
|
+
toast.close(id)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`type` is `"success" | "error" | "info" | "warning" | "loading"` — there is no
|
|
59
|
+
`toast.success("x")`. `timeout: 0` never auto-dismisses (sonner's `duration:
|
|
60
|
+
Infinity`). Position belongs to the viewport this package styles, so sonner's
|
|
61
|
+
`position` and `richColors` props have no equivalent. Mount `<Toaster/>` once —
|
|
62
|
+
apps on `@tradalab/nekit` already get it from `NekitProvider`.
|
|
63
|
+
|
|
64
|
+
## Develop
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
make install # pnpm install
|
|
68
|
+
make build # tsup + inject-use-client + verify-build-output
|
|
69
|
+
make verify # typecheck + lint + test
|
|
70
|
+
make ui-add <name> # scaffold a shadcn primitive, adapt, rebuild barrel
|
|
71
|
+
make ui-update <name> # overwrite a primitive with the latest upstream version
|
|
72
|
+
make ui-sync # re-adapt every primitive + rebuild barrel
|
|
73
|
+
make ui-diff # report which primitives changed upstream (exit 1 if any)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Staying current with shadcn** — `make ui-diff` compares every primitive
|
|
77
|
+
against the live `radix-lyra` registry and exits non-zero when one has moved.
|
|
78
|
+
It normalises away everything the CLI would rewrite anyway (icon-library
|
|
79
|
+
placeholders, `cn-*` template classes, import aliases, prettier line-wrapping),
|
|
80
|
+
so what it prints is real change. Prefer it over `shadcn add --diff`, which
|
|
81
|
+
caps its output at five files per run.
|
|
82
|
+
|
|
83
|
+
A primitive lyra deliberately diverges from carries a `customised` note in
|
|
84
|
+
`primitives.lock.json`; `ui-diff` lists those separately instead of failing on
|
|
85
|
+
them forever. Document the divergence in a JSDoc block in the file too —
|
|
86
|
+
`make ui-update` will overwrite it, and that note is what tells the next person
|
|
87
|
+
to put it back.
|
|
88
|
+
|
|
89
|
+
**Layout** — `src/<layer>/` with a barrel `index.ts`; one tsup entry per
|
|
90
|
+
subpath; ESM-only to `dist/`. **Layers** (enforced by `eslint-plugin-boundaries`):
|
|
91
|
+
`utils`/`hooks` (foundation) → `ui` → `shell`. No upward imports.
|
|
92
|
+
|
|
93
|
+
**`"use client"` is not in source** — it is injected onto the client entry
|
|
94
|
+
artifacts post-build by `scripts/inject-use-client.mjs`, then asserted by
|
|
95
|
+
`scripts/verify-build-output.mjs`. `scripts/sync-ui.mjs` adapts shadcn-CLI
|
|
96
|
+
output to repo conventions.
|
|
97
|
+
|
|
98
|
+
**Release** — `pnpm publish --no-git-checks` (the `prepublishOnly` hook builds
|
|
99
|
+
first). Published to the npm public registry.
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Label
|
|
2
|
+
import { Label } from '../chunk-QGUKTRBR.js';
|
|
3
3
|
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '../chunk-LZZ3UOPT.js';
|
|
4
|
+
import { Dialog, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from '../chunk-APYQOJAJ.js';
|
|
4
5
|
import { Button } from '../chunk-5Q4UTRYU.js';
|
|
5
6
|
import { cn } from '../chunk-XH55BHUU.js';
|
|
6
7
|
import * as React from 'react';
|
package/dist/blocks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/blocks/form.tsx","../../src/blocks/panel.tsx","../../src/blocks/confirm/confirm-dialog.tsx","../../src/blocks/confirm/confirm-provider.tsx","../../src/blocks/confirm/use-confirm.tsx","../../src/blocks/tree/index.tsx"],"names":["jsx","jsxs","createContext","useState","useContext","useId"],"mappings":";;;;;;;;;;;;AAQA,IAAM,IAAA,GAAO;AAMb,IAAM,gBAAA,GAAyB,oBAA4C,IAAI,CAAA;AAE/E,IAAM,YAAY,CAAkH;AAAA,EAClI,GAAG;AACL,CAAA,KAA4C;AAC1C,EAAA,uBACE,GAAA,CAAC,gBAAA,CAAiB,QAAA,EAAjB,EAA0B,OAAO,EAAE,IAAA,EAAM,KAAA,CAAM,IAAA,EAAK,EACnD,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAY,GAAG,OAAO,CAAA,EACzB,CAAA;AAEJ;AAEA,IAAM,eAAe,MAAM;AACzB,EAAA,MAAM,YAAA,GAAqB,iBAAW,gBAAgB,CAAA;AACtD,EAAA,MAAM,WAAA,GAAoB,iBAAW,eAA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A,GAAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAU,+BAAA,EAAgC;AAAA;AAAA,GAC1D;AAEJ;AAOO,IAAM,QAAA,GAAW,CAAC,EAAE,IAAA,EAAM,cAAc,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,KAAqB;AAC7F,EAAA,MAAM,EAAE,SAAA,EAAW,WAAA,EAAY,GAAI,OAAA,EAAQ;AAC3C,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,WAAA,EAAY;AAC/B,EAAA,MAAM,UAAA,GAAa,WAAA,CAAY,GAAA,CAAI,MAAM,CAAA;AAEzC,EAAA,IAAI,CAAC,SAAA,EAAW;AACd,IAAA,OAAO,IAAA;AAAA,EACT;AAEA,EAAA,MAAM,cAAA,GAAiB,MAAO,WAAA,GAAc,UAAA,mBAAaA,GAAAA,CAAC,UAAA,EAAA,EAAW,WAAU,SAAA,EAAU,CAAA,mBAAKA,GAAAA,CAAC,MAAA,EAAA,EAAO,WAAU,SAAA,EAAU,CAAA,mBAAKA,GAAAA,CAAC,IAAA,EAAA,EAAK,WAAU,SAAA,EAAU,CAAA;AAEzJ,EAAA,uBACEA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,0FAAA,EAA4F,SAAS,CAAA,EAAI,GAAG,KAAA,EAC5H,QAAA,EAAA,IAAA,IAAQ,cAAA,EAAe,EAC1B,CAAA;AAEJ;AAIO,IAAM,YAAY,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,qBAAsBA,GAAAA,CAAC,MAAA,EAAA,EAAK,WAAW,EAAA,CAAG,8BAAA,EAAgC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO","file":"index.js","sourcesContent":["\nimport * as React from \"react\"\nimport { type Label as LabelPrimitive, Slot } from \"radix-ui\"\nimport { Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues } from \"react-hook-form\"\n\nimport { cn } from \"~/utils/cn.js\"\nimport { Label } from \"~/ui/primitives/label.js\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null)\n\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext || {}\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div data-slot=\"form-item\" className={cn(\"grid gap-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return <Label data-slot=\"form-label\" data-error={!!error} className={cn(\"data-[error=true]:text-destructive\", className)} htmlFor={formItemId} {...props} />\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot.Root\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n const { formDescriptionId } = useFormField()\n\n return <p data-slot=\"form-description\" id={formDescriptionId} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<\"p\">) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn(\"text-destructive text-sm\", className)} {...props}>\n {body}\n </p>\n )\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField }\n","\nimport { type ReactNode, useEffect, useMemo, useState } from \"react\"\nimport { useRouter, useSearchParams } from \"next/navigation\"\nimport { type LucideIcon } from \"lucide-react\"\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"~/ui/primitives/card.js\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype PanelItemType = {\n key: string\n label: string\n icon?: LucideIcon\n danger?: boolean\n hasError?: boolean\n content: ReactNode\n}\n\nexport function Panel({ name, items, enable_url }: { name?: string; items: PanelItemType[]; enable_url?: boolean }) {\n const router = useRouter()\n const params = useSearchParams()\n\n const defaultKey = items[0]?.key\n\n const panelKey = useMemo(() => `panel${name ? \"-\" + name : \"\"}`, [name])\n\n // get panel from url\n const panelFromUrl = useMemo(() => {\n if (!enable_url) return defaultKey\n return params.get(panelKey) ?? defaultKey\n }, [enable_url, params, defaultKey, panelKey])\n\n // set active\n const [active, setActive] = useState(panelFromUrl)\n\n // sync URL → state\n useEffect(() => {\n if (!enable_url) return\n setActive(panelFromUrl)\n }, [panelFromUrl, enable_url])\n\n const current = items.find(s => s.key === active) ?? items[0]\n if (!current) return null\n\n const navigate = (key: string) => {\n if (key === active) return\n setActive(key)\n if (!enable_url) return\n router.replace(`?${panelKey}=${key}`, { scroll: false })\n }\n\n return (\n <div className=\"space-y-6 h-full min-h-0 flex flex-col\">\n {/* Mobi */}\n <div className=\"lg:hidden\">\n <div className=\"inline-flex rounded-lg bg-muted p-1\">\n {items?.map(s => (\n <button\n key={s.key}\n onClick={() => navigate(s.key)}\n className={cn(\n \"rounded-md px-3 py-1.5 text-sm transition-all\",\n active === s.key ? \"bg-background text-foreground shadow-sm\" : s.danger ? \"text-destructive\" : \"text-muted-foreground hover:text-foreground\"\n )}\n >\n <span className=\"relative flex items-center gap-2\">\n {s.icon && <s.icon className=\"h-4 w-4\" />}\n {s.label}\n {s.hasError && <span className=\"absolute -top-1 -right-2 flex h-2 w-2 rounded-full bg-destructive\" />}\n </span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Desktop */}\n <div className=\"grid grid-cols-1 gap-8 lg:grid-cols-[240px_1fr] flex-1 min-h-0\">\n {/* Sidebar */}\n <aside className=\"hidden space-y-1 lg:block overflow-y-auto min-h-0 pr-1 [overflow:overlay]\">\n {items?.map(s => (\n <PanelItem key={s.key} active={active === s.key} icon={s.icon} danger={s.danger} hasError={s.hasError} onClick={() => navigate(s.key)}>\n {s.label}\n </PanelItem>\n ))}\n </aside>\n {/* Content */}\n <div className=\"space-y-6 overflow-y-auto min-h-0 pr-1 [overflow:overlay]\">{current.content}</div>\n </div>\n </div>\n )\n}\n\nexport interface PanelItemProps {\n children: ReactNode\n active?: boolean\n icon?: LucideIcon\n danger?: boolean\n hasError?: boolean\n onClick?: () => void\n}\n\nfunction PanelItem({ children, active, icon: Icon, danger, hasError, onClick }: PanelItemProps) {\n return (\n <div\n onClick={onClick}\n className={cn(\n \"cursor-pointer rounded-md px-3 py-2 text-sm transition-colors flex items-center justify-between\",\n active ? \"bg-muted font-medium\" : danger ? \"text-destructive hover:bg-destructive/10\" : \"text-muted-foreground hover:bg-muted\"\n )}\n >\n <span className=\"flex items-center gap-2\">\n {Icon && <Icon className=\"h-4 w-4 shrink-0\" />}\n {children}\n </span>\n {hasError && <span className=\"h-2 w-2 rounded-full bg-destructive\" />}\n </div>\n )\n}\n\nexport interface PanelCardProps {\n title: string\n description?: string\n hint?: string\n action?: ReactNode\n children?: ReactNode\n}\n\nexport function PanelCard({ title, description, hint, action, children }: PanelCardProps) {\n return (\n <Card className={cn({ \"pb-3\": hint || action })}>\n <CardHeader>\n <CardTitle className=\"text-base\">{title}</CardTitle>\n {description && <CardDescription className=\"max-w-2xl\">{description}</CardDescription>}\n </CardHeader>\n {children && <CardContent>{children}</CardContent>}\n {(hint || action) && (\n <CardFooter className=\"flex items-center justify-between border-t !pt-3 !pb-0\">\n <p className=\"text-sm text-muted-foreground\">{hint}</p>\n {action}\n </CardFooter>\n )}\n </Card>\n )\n}\n","\nimport { Dialog, DialogContent, DialogDescription, DialogOverlay, DialogTitle } from \"~/ui/primitives/dialog.js\"\nimport { Button } from \"~/ui/primitives/button.js\"\nimport { type ConfirmOptions } from \"./types.js\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype Props = {\n options: ConfirmOptions\n onConfirm: () => void\n onCancel: () => void\n}\n\nexport function ConfirmDialog({ options, onConfirm, onCancel }: Props) {\n return (\n <Dialog open onOpenChange={val => !val && onCancel()}>\n <DialogOverlay className=\"fixed inset-0 bg-white/10\" />\n <DialogContent className={cn(\"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\", \"p-4 w-[400px]\", \"focus:outline-none\")}>\n <DialogTitle className=\"text-sm font-medium\">{options.title}</DialogTitle>\n {options.description != null && (\n <DialogDescription asChild>\n <div className=\"mt-2 text-sm text-muted-foreground\">{options.description}</div>\n </DialogDescription>\n )}\n\n <div className=\"mt-2 flex justify-end gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={onCancel}>\n {options.cancelText ?? \"Cancel\"}\n </Button>\n <Button size=\"sm\" onClick={onConfirm} className={cn(options.danger && \"bg-red-600 hover:bg-red-700 text-white\")}>\n {options.confirmText ?? \"Confirm\"}\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n","\nimport { createContext, type ReactNode, useState } from \"react\"\nimport { type ConfirmOptions } from \"./types.js\"\nimport { ConfirmDialog } from \"./confirm-dialog.js\"\n\nexport type ConfirmFn = (options: ConfirmOptions) => Promise<boolean>\n\nexport const ConfirmContext = createContext<ConfirmFn | null>(null)\n\nexport function ConfirmProvider({ children }: { children: ReactNode }) {\n const [state, setState] = useState<{\n options: ConfirmOptions\n resolve: (v: boolean) => void\n } | null>(null)\n\n const confirm: ConfirmFn = options => new Promise<boolean>(resolve => setState({ options, resolve }))\n\n const close = (result: boolean) => {\n state?.resolve(result)\n setState(null)\n }\n\n return (\n <ConfirmContext.Provider value={confirm}>\n {children}\n\n {state && <ConfirmDialog options={state.options} onConfirm={() => close(true)} onCancel={() => close(false)} />}\n </ConfirmContext.Provider>\n )\n}\n","\nimport { useContext } from \"react\"\nimport { ConfirmContext } from \"./confirm-provider.js\"\n\nexport const useConfirm = () => {\n const ctx = useContext(ConfirmContext)\n if (!ctx) {\n throw new Error(\"useConfirm must be used inside ConfirmProvider\")\n }\n return ctx\n}\n","\nimport { ChevronRight, File, Folder, FolderOpen } from \"lucide-react\"\nimport { createContext, type HTMLAttributes, type ReactNode, useCallback, useContext, useId, useState } from \"react\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype TreeContextType = {\n expandedIds: Set<string>\n selectedIds: string[]\n toggleExpanded: (nodeId: string) => void\n handleSelection: (nodeId: string, ctrlKey: boolean) => void\n showLines?: boolean\n showIcons?: boolean\n selectable?: boolean\n multiSelect?: boolean\n indent?: number\n animateExpand?: boolean\n}\n\nconst TreeContext = createContext<TreeContextType | undefined>(undefined)\n\nconst useTree = () => {\n const context = useContext(TreeContext)\n if (!context) {\n throw new Error(\"Tree components must be used within a TreeProvider\")\n }\n return context\n}\n\ntype TreeNodeContextType = {\n nodeId: string\n level: number\n isLast: boolean\n parentPath: boolean[]\n}\n\nconst TreeNodeContext = createContext<TreeNodeContextType | undefined>(undefined)\n\nconst useTreeNode = () => {\n const context = useContext(TreeNodeContext)\n if (!context) {\n throw new Error(\"TreeNode components must be used within a TreeNode\")\n }\n return context\n}\n\nexport type TreeProviderProps = {\n children: ReactNode\n defaultExpandedIds?: string[]\n showLines?: boolean\n showIcons?: boolean\n selectable?: boolean\n multiSelect?: boolean\n selectedIds?: string[]\n onSelectionChange?: (selectedIds: string[]) => void\n expandedIds?: Set<string>\n onExpandedChange?: (expandedIds: Set<string>) => void\n indent?: number\n animateExpand?: boolean\n className?: string\n}\n\nexport const TreeProvider = ({\n children,\n defaultExpandedIds = [],\n showLines = true,\n showIcons = true,\n selectable = true,\n multiSelect = false,\n selectedIds,\n onSelectionChange,\n indent = 20,\n animateExpand = true,\n className,\n expandedIds,\n onExpandedChange,\n}: TreeProviderProps) => {\n const [internalExpandedIds, setInternalExpandedIds] = useState<Set<string>>(new Set(defaultExpandedIds))\n const [internalSelectedIds, setInternalSelectedIds] = useState<string[]>(selectedIds ?? [])\n\n const isControlledSelected = selectedIds !== undefined && onSelectionChange !== undefined\n const currentSelectedIds = isControlledSelected ? selectedIds : internalSelectedIds\n\n const isControlledExpanded = expandedIds !== undefined && onExpandedChange !== undefined\n const currentExpandedIds = isControlledExpanded ? expandedIds : internalExpandedIds\n\n const toggleExpanded = useCallback(\n (nodeId: string) => {\n const newSet = new Set<string>(currentExpandedIds)\n if (newSet.has(nodeId)) {\n newSet.delete(nodeId)\n } else {\n newSet.add(nodeId)\n }\n\n if (isControlledExpanded) {\n onExpandedChange?.(newSet)\n } else {\n setInternalExpandedIds(newSet)\n }\n },\n [currentExpandedIds, isControlledExpanded, onExpandedChange]\n )\n\n const handleSelection = useCallback(\n (nodeId: string, ctrlKey = false) => {\n if (!selectable) {\n return\n }\n\n let newSelection: string[]\n\n if (multiSelect && ctrlKey) {\n newSelection = currentSelectedIds.includes(nodeId) ? currentSelectedIds.filter(id => id !== nodeId) : [...currentSelectedIds, nodeId]\n } else {\n newSelection = currentSelectedIds.includes(nodeId) ? [] : [nodeId]\n }\n\n if (isControlledSelected) {\n onSelectionChange?.(newSelection)\n } else {\n setInternalSelectedIds(newSelection)\n }\n },\n [selectable, multiSelect, currentSelectedIds, isControlledSelected, onSelectionChange]\n )\n\n return (\n <TreeContext.Provider\n value={{\n expandedIds: currentExpandedIds,\n selectedIds: currentSelectedIds,\n toggleExpanded,\n handleSelection,\n showLines,\n showIcons,\n selectable,\n multiSelect,\n indent,\n animateExpand,\n }}\n >\n <div className={cn(\"w-full\", className)}>{children}</div>\n </TreeContext.Provider>\n )\n}\n\nexport type TreeViewProps = HTMLAttributes<HTMLDivElement>\n\nexport const TreeView = ({ className, children, ...props }: TreeViewProps) => (\n <div className={cn(\"p-2\", className)} {...props}>\n {children}\n </div>\n)\n\nexport type TreeNodeProps = HTMLAttributes<HTMLDivElement> & {\n nodeId?: string\n level?: number\n isLast?: boolean\n parentPath?: boolean[]\n children?: ReactNode\n}\n\nexport const TreeNode = ({ nodeId: providedNodeId, level = 0, isLast = false, parentPath = [], children, className, onClick: _onClick, ...props }: TreeNodeProps) => {\n const generatedId = useId()\n const nodeId = providedNodeId ?? generatedId\n\n // Build the parent path - mark positions where the parent was the last child\n const currentPath = level === 0 ? [] : [...parentPath]\n if (level > 0 && parentPath.length < level - 1) {\n // Fill in missing levels with false (not last)\n while (currentPath.length < level - 1) {\n currentPath.push(false)\n }\n }\n if (level > 0) {\n currentPath[level - 1] = isLast\n }\n\n return (\n <TreeNodeContext.Provider\n value={{\n nodeId,\n level,\n isLast,\n parentPath: currentPath,\n }}\n >\n <div className={cn(\"select-none\", className)} {...props}>\n {children}\n </div>\n </TreeNodeContext.Provider>\n )\n}\n\nexport type TreeNodeTriggerProps = HTMLAttributes<HTMLDivElement> & {\n expandOnClick?: boolean\n}\n\nexport const TreeNodeTrigger = ({ children, className, onClick, expandOnClick = false, ...props }: TreeNodeTriggerProps) => {\n const { selectedIds, handleSelection, toggleExpanded, indent } = useTree()\n const { nodeId, level } = useTreeNode()\n const isSelected = selectedIds.includes(nodeId)\n\n return (\n <div\n className={cn(\n \"group relative mx-1 flex cursor-pointer items-center rounded-md px-3 transition-all duration-200\",\n \"hover:bg-accent/50\",\n isSelected && \"bg-accent/80\",\n className\n )}\n style={{ paddingLeft: level * (indent ?? 0) + 8, paddingTop: \"var(--tree-item-py)\", paddingBottom: \"var(--tree-item-py)\" }}\n onClick={e => {\n handleSelection(nodeId, e.ctrlKey || e.metaKey)\n if (expandOnClick) toggleExpanded(nodeId)\n onClick?.(e)\n }}\n onDoubleClick={e => {\n if (e.ctrlKey || e.metaKey) return\n toggleExpanded(nodeId)\n }}\n {...props}\n >\n <TreeLines />\n {children}\n </div>\n )\n}\n\nexport const TreeLines = () => {\n const { showLines, indent } = useTree()\n const { level, isLast, parentPath } = useTreeNode()\n\n if (!showLines || level === 0) {\n return null\n }\n\n return (\n <div className=\"pointer-events-none absolute top-0 bottom-0 left-0\">\n {/* Render vertical lines for all parent levels */}\n {Array.from({ length: level }, (_, index) => {\n const shouldHideLine = parentPath[index] === true\n if (shouldHideLine && index === level - 1) {\n return null\n }\n\n return (\n <div\n className=\"absolute top-0 bottom-0 border-border/40 border-l\"\n key={index.toString()}\n style={{\n left: index * (indent ?? 0) + 12,\n display: shouldHideLine ? \"none\" : \"block\",\n }}\n />\n )\n })}\n\n {/* Horizontal connector line */}\n <div\n className=\"absolute top-1/2 border-border/40 border-t\"\n style={{\n left: (level - 1) * (indent ?? 0) + 12,\n width: (indent ?? 0) - 4,\n transform: \"translateY(-1px)\",\n }}\n />\n\n {/* Vertical line to midpoint for last items */}\n {isLast && (\n <div\n className=\"absolute top-0 border-border/40 border-l\"\n style={{\n left: (level - 1) * (indent ?? 0) + 12,\n height: \"50%\",\n }}\n />\n )}\n </div>\n )\n}\n\nexport type TreeNodeContentProps = HTMLAttributes<HTMLDivElement> & {\n hasChildren?: boolean\n}\n\nexport const TreeNodeContent = ({ children, hasChildren = false, className, ...props }: TreeNodeContentProps) => {\n const { expandedIds } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!hasChildren || !isExpanded) {\n return null\n }\n\n return (\n <div className={className} {...props}>\n {children}\n </div>\n )\n}\n\nexport type TreeExpanderProps = HTMLAttributes<HTMLDivElement> & {\n hasChildren?: boolean\n}\n\nexport const TreeExpander = ({ hasChildren = false, className, onClick, ...props }: TreeExpanderProps) => {\n const { expandedIds, toggleExpanded } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!hasChildren) {\n return <div className=\"mr-1 h-4 w-4\" />\n }\n\n return (\n <div\n className={cn(\"mr-1 flex h-4 w-4 items-center justify-center transition-transform duration-150\", isExpanded && \"rotate-90\", className)}\n onClick={e => {\n e.stopPropagation()\n toggleExpanded(nodeId)\n onClick?.(e)\n }}\n {...props}\n >\n <ChevronRight className=\"h-3 w-3 text-muted-foreground\" />\n </div>\n )\n}\n\nexport type TreeIconProps = HTMLAttributes<HTMLDivElement> & {\n icon?: ReactNode\n hasChildren?: boolean\n}\n\nexport const TreeIcon = ({ icon, hasChildren = false, className, ...props }: TreeIconProps) => {\n const { showIcons, expandedIds } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!showIcons) {\n return null\n }\n\n const getDefaultIcon = () => (hasChildren ? isExpanded ? <FolderOpen className=\"h-4 w-4\" /> : <Folder className=\"h-4 w-4\" /> : <File className=\"h-4 w-4\" />)\n\n return (\n <div className={cn(\"mr-2 flex h-4 w-4 items-center justify-center text-muted-foreground transition-transform\", className)} {...props}>\n {icon || getDefaultIcon()}\n </div>\n )\n}\n\nexport type TreeLabelProps = HTMLAttributes<HTMLSpanElement>\n\nexport const TreeLabel = ({ className, ...props }: TreeLabelProps) => <span className={cn(\"font flex-1 truncate text-sm\", className)} {...props} />\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/blocks/form.tsx","../../src/blocks/panel.tsx","../../src/blocks/confirm/confirm-dialog.tsx","../../src/blocks/confirm/confirm-provider.tsx","../../src/blocks/confirm/use-confir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AAA;AAEzJ,EAAA,uBACEA,GAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,EAAA,CAAG,0FAAA,EAA4F,SAAS,CAAA,EAAI,GAAG,KAAA,EAC5H,QAAA,EAAA,IAAA,IAAQ,cAAA,EAAe,EAC1B,CAAA;AAEJ;AAIO,IAAM,YAAY,CAAC,EAAE,SAAA,EAAW,GAAG,OAAM,qBAAsBA,GAAAA,CAAC,MAAA,EAAA,EAAK,WAAW,EAAA,CAAG,8BAAA,EAAgC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO","file":"index.js","sourcesContent":["\nimport * as React from \"react\"\nimport { type Label as LabelPrimitive, Slot } from \"radix-ui\"\nimport { Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues } from \"react-hook-form\"\n\nimport { cn } from \"~/utils/cn.js\"\nimport { Label } from \"~/ui/primitives/label.js\"\n\nconst Form = FormProvider\n\ntype FormFieldContextValue<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = {\n name: TName\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null)\n\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n )\n}\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext)\n const itemContext = React.useContext(FormItemContext)\n const { getFieldState, formState } = useFormContext()\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\")\n }\n\n const fieldState = getFieldState(fieldContext.name, formState)\n\n const { id } = itemContext || {}\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n }\n}\n\ntype FormItemContextValue = {\n id: string\n}\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null)\n\nfunction FormItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const id = React.useId()\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div data-slot=\"form-item\" className={cn(\"grid gap-2\", className)} {...props} />\n </FormItemContext.Provider>\n )\n}\n\nfunction FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField()\n\n return <Label data-slot=\"form-label\" data-error={!!error} className={cn(\"data-[error=true]:text-destructive\", className)} htmlFor={formItemId} {...props} />\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot.Root>) {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField()\n\n return (\n <Slot.Root\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n )\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n const { formDescriptionId } = useFormField()\n\n return <p data-slot=\"form-description\" id={formDescriptionId} className={cn(\"text-muted-foreground text-sm\", className)} {...props} />\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<\"p\">) {\n const { error, formMessageId } = useFormField()\n const body = error ? String(error?.message ?? \"\") : props.children\n\n if (!body) {\n return null\n }\n\n return (\n <p data-slot=\"form-message\" id={formMessageId} className={cn(\"text-destructive text-sm\", className)} {...props}>\n {body}\n </p>\n )\n}\n\nexport { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField }\n","\nimport { type ReactNode, useEffect, useMemo, useState } from \"react\"\nimport { useRouter, useSearchParams } from \"next/navigation\"\nimport { type LucideIcon } from \"lucide-react\"\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from \"~/ui/primitives/card.js\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype PanelItemType = {\n key: string\n label: string\n icon?: LucideIcon\n danger?: boolean\n hasError?: boolean\n content: ReactNode\n}\n\nexport function Panel({ name, items, enable_url }: { name?: string; items: PanelItemType[]; enable_url?: boolean }) {\n const router = useRouter()\n const params = useSearchParams()\n\n const defaultKey = items[0]?.key\n\n const panelKey = useMemo(() => `panel${name ? \"-\" + name : \"\"}`, [name])\n\n // get panel from url\n const panelFromUrl = useMemo(() => {\n if (!enable_url) return defaultKey\n return params.get(panelKey) ?? defaultKey\n }, [enable_url, params, defaultKey, panelKey])\n\n // set active\n const [active, setActive] = useState(panelFromUrl)\n\n // sync URL → state\n useEffect(() => {\n if (!enable_url) return\n setActive(panelFromUrl)\n }, [panelFromUrl, enable_url])\n\n const current = items.find(s => s.key === active) ?? items[0]\n if (!current) return null\n\n const navigate = (key: string) => {\n if (key === active) return\n setActive(key)\n if (!enable_url) return\n router.replace(`?${panelKey}=${key}`, { scroll: false })\n }\n\n return (\n <div className=\"space-y-6 h-full min-h-0 flex flex-col\">\n {/* Mobi */}\n <div className=\"lg:hidden\">\n <div className=\"inline-flex rounded-lg bg-muted p-1\">\n {items?.map(s => (\n <button\n key={s.key}\n onClick={() => navigate(s.key)}\n className={cn(\n \"rounded-md px-3 py-1.5 text-sm transition-all\",\n active === s.key ? \"bg-background text-foreground shadow-sm\" : s.danger ? \"text-destructive\" : \"text-muted-foreground hover:text-foreground\"\n )}\n >\n <span className=\"relative flex items-center gap-2\">\n {s.icon && <s.icon className=\"h-4 w-4\" />}\n {s.label}\n {s.hasError && <span className=\"absolute -top-1 -right-2 flex h-2 w-2 rounded-full bg-destructive\" />}\n </span>\n </button>\n ))}\n </div>\n </div>\n\n {/* Desktop */}\n <div className=\"grid grid-cols-1 gap-8 lg:grid-cols-[240px_1fr] flex-1 min-h-0\">\n {/* Sidebar */}\n <aside className=\"hidden space-y-1 lg:block overflow-y-auto min-h-0 pr-1 [overflow:overlay]\">\n {items?.map(s => (\n <PanelItem key={s.key} active={active === s.key} icon={s.icon} danger={s.danger} hasError={s.hasError} onClick={() => navigate(s.key)}>\n {s.label}\n </PanelItem>\n ))}\n </aside>\n {/* Content */}\n <div className=\"space-y-6 overflow-y-auto min-h-0 pr-1 [overflow:overlay]\">{current.content}</div>\n </div>\n </div>\n )\n}\n\nexport interface PanelItemProps {\n children: ReactNode\n active?: boolean\n icon?: LucideIcon\n danger?: boolean\n hasError?: boolean\n onClick?: () => void\n}\n\nfunction PanelItem({ children, active, icon: Icon, danger, hasError, onClick }: PanelItemProps) {\n return (\n <div\n onClick={onClick}\n className={cn(\n \"cursor-pointer rounded-md px-3 py-2 text-sm transition-colors flex items-center justify-between\",\n active ? \"bg-muted font-medium\" : danger ? \"text-destructive hover:bg-destructive/10\" : \"text-muted-foreground hover:bg-muted\"\n )}\n >\n <span className=\"flex items-center gap-2\">\n {Icon && <Icon className=\"h-4 w-4 shrink-0\" />}\n {children}\n </span>\n {hasError && <span className=\"h-2 w-2 rounded-full bg-destructive\" />}\n </div>\n )\n}\n\nexport interface PanelCardProps {\n title: string\n description?: string\n hint?: string\n action?: ReactNode\n children?: ReactNode\n}\n\nexport function PanelCard({ title, description, hint, action, children }: PanelCardProps) {\n return (\n <Card className={cn({ \"pb-3\": hint || action })}>\n <CardHeader>\n <CardTitle className=\"text-base\">{title}</CardTitle>\n {description && <CardDescription className=\"max-w-2xl\">{description}</CardDescription>}\n </CardHeader>\n {children && <CardContent>{children}</CardContent>}\n {(hint || action) && (\n <CardFooter className=\"flex items-center justify-between border-t !pt-3 !pb-0\">\n <p className=\"text-sm text-muted-foreground\">{hint}</p>\n {action}\n </CardFooter>\n )}\n </Card>\n )\n}\n","\nimport { Dialog, DialogContent, DialogDescription, DialogOverlay, DialogTitle } from \"~/ui/primitives/dialog.js\"\nimport { Button } from \"~/ui/primitives/button.js\"\nimport { type ConfirmOptions } from \"./types.js\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype Props = {\n options: ConfirmOptions\n onConfirm: () => void\n onCancel: () => void\n}\n\nexport function ConfirmDialog({ options, onConfirm, onCancel }: Props) {\n return (\n <Dialog open onOpenChange={val => !val && onCancel()}>\n <DialogOverlay className=\"fixed inset-0 bg-white/10\" />\n <DialogContent className={cn(\"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2\", \"p-4 w-[400px]\", \"focus:outline-none\")}>\n <DialogTitle className=\"text-sm font-medium\">{options.title}</DialogTitle>\n {options.description != null && (\n <DialogDescription asChild>\n <div className=\"mt-2 text-sm text-muted-foreground\">{options.description}</div>\n </DialogDescription>\n )}\n\n <div className=\"mt-2 flex justify-end gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={onCancel}>\n {options.cancelText ?? \"Cancel\"}\n </Button>\n <Button size=\"sm\" onClick={onConfirm} className={cn(options.danger && \"bg-red-600 hover:bg-red-700 text-white\")}>\n {options.confirmText ?? \"Confirm\"}\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n )\n}\n","\nimport { createContext, type ReactNode, useState } from \"react\"\nimport { type ConfirmOptions } from \"./types.js\"\nimport { ConfirmDialog } from \"./confirm-dialog.js\"\n\nexport type ConfirmFn = (options: ConfirmOptions) => Promise<boolean>\n\nexport const ConfirmContext = createContext<ConfirmFn | null>(null)\n\nexport function ConfirmProvider({ children }: { children: ReactNode }) {\n const [state, setState] = useState<{\n options: ConfirmOptions\n resolve: (v: boolean) => void\n } | null>(null)\n\n const confirm: ConfirmFn = options => new Promise<boolean>(resolve => setState({ options, resolve }))\n\n const close = (result: boolean) => {\n state?.resolve(result)\n setState(null)\n }\n\n return (\n <ConfirmContext.Provider value={confirm}>\n {children}\n\n {state && <ConfirmDialog options={state.options} onConfirm={() => close(true)} onCancel={() => close(false)} />}\n </ConfirmContext.Provider>\n )\n}\n","\nimport { useContext } from \"react\"\nimport { ConfirmContext } from \"./confirm-provider.js\"\n\nexport const useConfirm = () => {\n const ctx = useContext(ConfirmContext)\n if (!ctx) {\n throw new Error(\"useConfirm must be used inside ConfirmProvider\")\n }\n return ctx\n}\n","\nimport { ChevronRight, File, Folder, FolderOpen } from \"lucide-react\"\nimport { createContext, type HTMLAttributes, type ReactNode, useCallback, useContext, useId, useState } from \"react\"\nimport { cn } from \"~/utils/cn.js\"\n\ntype TreeContextType = {\n expandedIds: Set<string>\n selectedIds: string[]\n toggleExpanded: (nodeId: string) => void\n handleSelection: (nodeId: string, ctrlKey: boolean) => void\n showLines?: boolean\n showIcons?: boolean\n selectable?: boolean\n multiSelect?: boolean\n indent?: number\n animateExpand?: boolean\n}\n\nconst TreeContext = createContext<TreeContextType | undefined>(undefined)\n\nconst useTree = () => {\n const context = useContext(TreeContext)\n if (!context) {\n throw new Error(\"Tree components must be used within a TreeProvider\")\n }\n return context\n}\n\ntype TreeNodeContextType = {\n nodeId: string\n level: number\n isLast: boolean\n parentPath: boolean[]\n}\n\nconst TreeNodeContext = createContext<TreeNodeContextType | undefined>(undefined)\n\nconst useTreeNode = () => {\n const context = useContext(TreeNodeContext)\n if (!context) {\n throw new Error(\"TreeNode components must be used within a TreeNode\")\n }\n return context\n}\n\nexport type TreeProviderProps = {\n children: ReactNode\n defaultExpandedIds?: string[]\n showLines?: boolean\n showIcons?: boolean\n selectable?: boolean\n multiSelect?: boolean\n selectedIds?: string[]\n onSelectionChange?: (selectedIds: string[]) => void\n expandedIds?: Set<string>\n onExpandedChange?: (expandedIds: Set<string>) => void\n indent?: number\n animateExpand?: boolean\n className?: string\n}\n\nexport const TreeProvider = ({\n children,\n defaultExpandedIds = [],\n showLines = true,\n showIcons = true,\n selectable = true,\n multiSelect = false,\n selectedIds,\n onSelectionChange,\n indent = 20,\n animateExpand = true,\n className,\n expandedIds,\n onExpandedChange,\n}: TreeProviderProps) => {\n const [internalExpandedIds, setInternalExpandedIds] = useState<Set<string>>(new Set(defaultExpandedIds))\n const [internalSelectedIds, setInternalSelectedIds] = useState<string[]>(selectedIds ?? [])\n\n const isControlledSelected = selectedIds !== undefined && onSelectionChange !== undefined\n const currentSelectedIds = isControlledSelected ? selectedIds : internalSelectedIds\n\n const isControlledExpanded = expandedIds !== undefined && onExpandedChange !== undefined\n const currentExpandedIds = isControlledExpanded ? expandedIds : internalExpandedIds\n\n const toggleExpanded = useCallback(\n (nodeId: string) => {\n const newSet = new Set<string>(currentExpandedIds)\n if (newSet.has(nodeId)) {\n newSet.delete(nodeId)\n } else {\n newSet.add(nodeId)\n }\n\n if (isControlledExpanded) {\n onExpandedChange?.(newSet)\n } else {\n setInternalExpandedIds(newSet)\n }\n },\n [currentExpandedIds, isControlledExpanded, onExpandedChange]\n )\n\n const handleSelection = useCallback(\n (nodeId: string, ctrlKey = false) => {\n if (!selectable) {\n return\n }\n\n let newSelection: string[]\n\n if (multiSelect && ctrlKey) {\n newSelection = currentSelectedIds.includes(nodeId) ? currentSelectedIds.filter(id => id !== nodeId) : [...currentSelectedIds, nodeId]\n } else {\n newSelection = currentSelectedIds.includes(nodeId) ? [] : [nodeId]\n }\n\n if (isControlledSelected) {\n onSelectionChange?.(newSelection)\n } else {\n setInternalSelectedIds(newSelection)\n }\n },\n [selectable, multiSelect, currentSelectedIds, isControlledSelected, onSelectionChange]\n )\n\n return (\n <TreeContext.Provider\n value={{\n expandedIds: currentExpandedIds,\n selectedIds: currentSelectedIds,\n toggleExpanded,\n handleSelection,\n showLines,\n showIcons,\n selectable,\n multiSelect,\n indent,\n animateExpand,\n }}\n >\n <div className={cn(\"w-full\", className)}>{children}</div>\n </TreeContext.Provider>\n )\n}\n\nexport type TreeViewProps = HTMLAttributes<HTMLDivElement>\n\nexport const TreeView = ({ className, children, ...props }: TreeViewProps) => (\n <div className={cn(\"p-2\", className)} {...props}>\n {children}\n </div>\n)\n\nexport type TreeNodeProps = HTMLAttributes<HTMLDivElement> & {\n nodeId?: string\n level?: number\n isLast?: boolean\n parentPath?: boolean[]\n children?: ReactNode\n}\n\nexport const TreeNode = ({ nodeId: providedNodeId, level = 0, isLast = false, parentPath = [], children, className, onClick: _onClick, ...props }: TreeNodeProps) => {\n const generatedId = useId()\n const nodeId = providedNodeId ?? generatedId\n\n // Build the parent path - mark positions where the parent was the last child\n const currentPath = level === 0 ? [] : [...parentPath]\n if (level > 0 && parentPath.length < level - 1) {\n // Fill in missing levels with false (not last)\n while (currentPath.length < level - 1) {\n currentPath.push(false)\n }\n }\n if (level > 0) {\n currentPath[level - 1] = isLast\n }\n\n return (\n <TreeNodeContext.Provider\n value={{\n nodeId,\n level,\n isLast,\n parentPath: currentPath,\n }}\n >\n <div className={cn(\"select-none\", className)} {...props}>\n {children}\n </div>\n </TreeNodeContext.Provider>\n )\n}\n\nexport type TreeNodeTriggerProps = HTMLAttributes<HTMLDivElement> & {\n expandOnClick?: boolean\n}\n\nexport const TreeNodeTrigger = ({ children, className, onClick, expandOnClick = false, ...props }: TreeNodeTriggerProps) => {\n const { selectedIds, handleSelection, toggleExpanded, indent } = useTree()\n const { nodeId, level } = useTreeNode()\n const isSelected = selectedIds.includes(nodeId)\n\n return (\n <div\n className={cn(\n \"group relative mx-1 flex cursor-pointer items-center rounded-md px-3 transition-all duration-200\",\n \"hover:bg-accent/50\",\n isSelected && \"bg-accent/80\",\n className\n )}\n style={{ paddingLeft: level * (indent ?? 0) + 8, paddingTop: \"var(--tree-item-py)\", paddingBottom: \"var(--tree-item-py)\" }}\n onClick={e => {\n handleSelection(nodeId, e.ctrlKey || e.metaKey)\n if (expandOnClick) toggleExpanded(nodeId)\n onClick?.(e)\n }}\n onDoubleClick={e => {\n if (e.ctrlKey || e.metaKey) return\n toggleExpanded(nodeId)\n }}\n {...props}\n >\n <TreeLines />\n {children}\n </div>\n )\n}\n\nexport const TreeLines = () => {\n const { showLines, indent } = useTree()\n const { level, isLast, parentPath } = useTreeNode()\n\n if (!showLines || level === 0) {\n return null\n }\n\n return (\n <div className=\"pointer-events-none absolute top-0 bottom-0 left-0\">\n {/* Render vertical lines for all parent levels */}\n {Array.from({ length: level }, (_, index) => {\n const shouldHideLine = parentPath[index] === true\n if (shouldHideLine && index === level - 1) {\n return null\n }\n\n return (\n <div\n className=\"absolute top-0 bottom-0 border-border/40 border-l\"\n key={index.toString()}\n style={{\n left: index * (indent ?? 0) + 12,\n display: shouldHideLine ? \"none\" : \"block\",\n }}\n />\n )\n })}\n\n {/* Horizontal connector line */}\n <div\n className=\"absolute top-1/2 border-border/40 border-t\"\n style={{\n left: (level - 1) * (indent ?? 0) + 12,\n width: (indent ?? 0) - 4,\n transform: \"translateY(-1px)\",\n }}\n />\n\n {/* Vertical line to midpoint for last items */}\n {isLast && (\n <div\n className=\"absolute top-0 border-border/40 border-l\"\n style={{\n left: (level - 1) * (indent ?? 0) + 12,\n height: \"50%\",\n }}\n />\n )}\n </div>\n )\n}\n\nexport type TreeNodeContentProps = HTMLAttributes<HTMLDivElement> & {\n hasChildren?: boolean\n}\n\nexport const TreeNodeContent = ({ children, hasChildren = false, className, ...props }: TreeNodeContentProps) => {\n const { expandedIds } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!hasChildren || !isExpanded) {\n return null\n }\n\n return (\n <div className={className} {...props}>\n {children}\n </div>\n )\n}\n\nexport type TreeExpanderProps = HTMLAttributes<HTMLDivElement> & {\n hasChildren?: boolean\n}\n\nexport const TreeExpander = ({ hasChildren = false, className, onClick, ...props }: TreeExpanderProps) => {\n const { expandedIds, toggleExpanded } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!hasChildren) {\n return <div className=\"mr-1 h-4 w-4\" />\n }\n\n return (\n <div\n className={cn(\"mr-1 flex h-4 w-4 items-center justify-center transition-transform duration-150\", isExpanded && \"rotate-90\", className)}\n onClick={e => {\n e.stopPropagation()\n toggleExpanded(nodeId)\n onClick?.(e)\n }}\n {...props}\n >\n <ChevronRight className=\"h-3 w-3 text-muted-foreground\" />\n </div>\n )\n}\n\nexport type TreeIconProps = HTMLAttributes<HTMLDivElement> & {\n icon?: ReactNode\n hasChildren?: boolean\n}\n\nexport const TreeIcon = ({ icon, hasChildren = false, className, ...props }: TreeIconProps) => {\n const { showIcons, expandedIds } = useTree()\n const { nodeId } = useTreeNode()\n const isExpanded = expandedIds.has(nodeId)\n\n if (!showIcons) {\n return null\n }\n\n const getDefaultIcon = () => (hasChildren ? isExpanded ? <FolderOpen className=\"h-4 w-4\" /> : <Folder className=\"h-4 w-4\" /> : <File className=\"h-4 w-4\" />)\n\n return (\n <div className={cn(\"mr-2 flex h-4 w-4 items-center justify-center text-muted-foreground transition-transform\", className)} {...props}>\n {icon || getDefaultIcon()}\n </div>\n )\n}\n\nexport type TreeLabelProps = HTMLAttributes<HTMLSpanElement>\n\nexport const TreeLabel = ({ className, ...props }: TreeLabelProps) => <span className={cn(\"font flex-1 truncate text-sm\", className)} {...props} />\n"]}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { Dialog, DialogHeader, DialogTitle, DialogDescription, DialogContent } from './chunk-APYQOJAJ.js';
|
|
2
|
+
import { InputGroup, InputGroupAddon } from './chunk-7GY2KYNW.js';
|
|
3
|
+
import { cn } from './chunk-XH55BHUU.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import { Command as Command$1 } from 'cmdk';
|
|
6
|
+
import { SearchIcon, CheckIcon } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
import { Popover as Popover$1 } from 'radix-ui';
|
|
9
|
+
|
|
10
|
+
function Command({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Command$1,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "command",
|
|
18
|
+
className: cn(
|
|
19
|
+
"flex size-full flex-col overflow-hidden rounded-none bg-popover text-popover-foreground",
|
|
20
|
+
className
|
|
21
|
+
),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function CommandDialog({
|
|
27
|
+
title = "Command Palette",
|
|
28
|
+
description = "Search for a command to run...",
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
showCloseButton = false,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsxs(Dialog, { ...props, children: [
|
|
35
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
37
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsx(
|
|
40
|
+
DialogContent,
|
|
41
|
+
{
|
|
42
|
+
className: cn(
|
|
43
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-none p-0",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
showCloseButton,
|
|
47
|
+
children
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
function CommandInput({
|
|
53
|
+
className,
|
|
54
|
+
...props
|
|
55
|
+
}) {
|
|
56
|
+
return /* @__PURE__ */ jsx("div", { "data-slot": "command-input-wrapper", className: "border-b pb-0", children: /* @__PURE__ */ jsxs(InputGroup, { className: "h-8 border-none border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Command$1.Input,
|
|
59
|
+
{
|
|
60
|
+
"data-slot": "command-input",
|
|
61
|
+
className: cn(
|
|
62
|
+
"w-full text-xs outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
63
|
+
className
|
|
64
|
+
),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ jsx(InputGroupAddon, { children: /* @__PURE__ */ jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
69
|
+
] }) });
|
|
70
|
+
}
|
|
71
|
+
function CommandList({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
Command$1.List,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "command-list",
|
|
79
|
+
className: cn(
|
|
80
|
+
"no-scrollbar max-h-72 scroll-py-0 overflow-x-hidden overflow-y-auto outline-none",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
...props
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
function CommandEmpty({
|
|
88
|
+
className,
|
|
89
|
+
...props
|
|
90
|
+
}) {
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
Command$1.Empty,
|
|
93
|
+
{
|
|
94
|
+
"data-slot": "command-empty",
|
|
95
|
+
className: cn("py-6 text-center text-xs", className),
|
|
96
|
+
...props
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
function CommandGroup({
|
|
101
|
+
className,
|
|
102
|
+
...props
|
|
103
|
+
}) {
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
Command$1.Group,
|
|
106
|
+
{
|
|
107
|
+
"data-slot": "command-group",
|
|
108
|
+
className: cn(
|
|
109
|
+
"overflow-hidden text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
110
|
+
className
|
|
111
|
+
),
|
|
112
|
+
...props
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function CommandSeparator({
|
|
117
|
+
className,
|
|
118
|
+
...props
|
|
119
|
+
}) {
|
|
120
|
+
return /* @__PURE__ */ jsx(
|
|
121
|
+
Command$1.Separator,
|
|
122
|
+
{
|
|
123
|
+
"data-slot": "command-separator",
|
|
124
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
125
|
+
...props
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
function CommandItem({
|
|
130
|
+
className,
|
|
131
|
+
children,
|
|
132
|
+
...props
|
|
133
|
+
}) {
|
|
134
|
+
return /* @__PURE__ */ jsxs(
|
|
135
|
+
Command$1.Item,
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "command-item",
|
|
138
|
+
className: cn(
|
|
139
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-none px-2 py-2 text-xs outline-hidden select-none in-data-[slot=dialog-content]:rounded-none! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
140
|
+
className
|
|
141
|
+
),
|
|
142
|
+
...props,
|
|
143
|
+
children: [
|
|
144
|
+
children,
|
|
145
|
+
/* @__PURE__ */ jsx(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
function CommandShortcut({
|
|
151
|
+
className,
|
|
152
|
+
...props
|
|
153
|
+
}) {
|
|
154
|
+
return /* @__PURE__ */ jsx(
|
|
155
|
+
"span",
|
|
156
|
+
{
|
|
157
|
+
"data-slot": "command-shortcut",
|
|
158
|
+
className: cn(
|
|
159
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
160
|
+
className
|
|
161
|
+
),
|
|
162
|
+
...props
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
function Popover({
|
|
167
|
+
...props
|
|
168
|
+
}) {
|
|
169
|
+
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
170
|
+
}
|
|
171
|
+
function PopoverTrigger({
|
|
172
|
+
...props
|
|
173
|
+
}) {
|
|
174
|
+
return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
175
|
+
}
|
|
176
|
+
function PopoverContent({
|
|
177
|
+
className,
|
|
178
|
+
align = "center",
|
|
179
|
+
sideOffset = 4,
|
|
180
|
+
...props
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
183
|
+
Popover$1.Content,
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "popover-content",
|
|
186
|
+
align,
|
|
187
|
+
sideOffset,
|
|
188
|
+
className: cn(
|
|
189
|
+
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-none bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
190
|
+
className
|
|
191
|
+
),
|
|
192
|
+
...props
|
|
193
|
+
}
|
|
194
|
+
) });
|
|
195
|
+
}
|
|
196
|
+
function PopoverAnchor({
|
|
197
|
+
...props
|
|
198
|
+
}) {
|
|
199
|
+
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
200
|
+
}
|
|
201
|
+
function PopoverHeader({ className, ...props }) {
|
|
202
|
+
return /* @__PURE__ */ jsx(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "popover-header",
|
|
206
|
+
className: cn("flex flex-col gap-1 text-xs", className),
|
|
207
|
+
...props
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
function PopoverTitle({ className, ...props }) {
|
|
212
|
+
return /* @__PURE__ */ jsx(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
"data-slot": "popover-title",
|
|
216
|
+
className: cn("text-sm font-medium", className),
|
|
217
|
+
...props
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
function PopoverDescription({
|
|
222
|
+
className,
|
|
223
|
+
...props
|
|
224
|
+
}) {
|
|
225
|
+
return /* @__PURE__ */ jsx(
|
|
226
|
+
"p",
|
|
227
|
+
{
|
|
228
|
+
"data-slot": "popover-description",
|
|
229
|
+
className: cn("text-xs/relaxed text-muted-foreground", className),
|
|
230
|
+
...props
|
|
231
|
+
}
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
236
|
+
//# sourceMappingURL=chunk-5M44N7SV.js.map
|
|
237
|
+
//# sourceMappingURL=chunk-5M44N7SV.js.map
|