@akira-io/ui 1.3.1 → 2.1.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 +2 -2
- package/dist/blocks.d.ts +100 -10
- package/dist/blocks.js +547 -270
- package/dist/blocks.js.map +1 -1
- package/dist/{chunk-3Z2VGVPI.js → chunk-53V4J7MC.js} +17 -7
- package/dist/chunk-53V4J7MC.js.map +1 -0
- package/dist/chunk-BH3B26DK.js +394 -0
- package/dist/chunk-BH3B26DK.js.map +1 -0
- package/dist/chunk-BP2YDMMI.js +29 -0
- package/dist/chunk-BP2YDMMI.js.map +1 -0
- package/dist/chunk-BR3JI3KN.js +458 -0
- package/dist/chunk-BR3JI3KN.js.map +1 -0
- package/dist/{chunk-YBXRJSR3.js → chunk-CAUTXZ4U.js} +15 -7
- package/dist/chunk-CAUTXZ4U.js.map +1 -0
- package/dist/{chunk-I6VVCFZ2.js → chunk-DPLCEU34.js} +342 -238
- package/dist/chunk-DPLCEU34.js.map +1 -0
- package/dist/chunk-IQMRJXEO.js +5 -4
- package/dist/chunk-IQMRJXEO.js.map +1 -1
- package/dist/chunk-L2H5GIF7.js +5 -4
- package/dist/chunk-L2H5GIF7.js.map +1 -1
- package/dist/{chunk-2V6HUWST.js → chunk-NKPFIA32.js} +19 -6
- package/dist/chunk-NKPFIA32.js.map +1 -0
- package/dist/{chunk-QNF4LJVT.js → chunk-OS7YY5R4.js} +8 -6
- package/dist/chunk-OS7YY5R4.js.map +1 -0
- package/dist/{chunk-IDNOI4OK.js → chunk-PCYYU332.js} +15 -8
- package/dist/chunk-PCYYU332.js.map +1 -0
- package/dist/{chunk-KHOA4TEI.js → chunk-PPWJK5T3.js} +60 -25
- package/dist/chunk-PPWJK5T3.js.map +1 -0
- package/dist/{chunk-N2KIFFI7.js → chunk-QZRSQVCN.js} +30 -34
- package/dist/chunk-QZRSQVCN.js.map +1 -0
- package/dist/{chunk-SZUXATOF.js → chunk-XLAOE5MV.js} +170 -76
- package/dist/chunk-XLAOE5MV.js.map +1 -0
- package/dist/{chunk-B3L6PRLX.js → chunk-ZQXZ4UGE.js} +208 -100
- package/dist/chunk-ZQXZ4UGE.js.map +1 -0
- package/dist/code.d.ts +2 -2
- package/dist/code.js +96 -52
- package/dist/code.js.map +1 -1
- package/dist/{context-OwSoVEri.d.ts → context-2wTOwxCk.d.ts} +13 -5
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +135 -52
- package/dist/editor.js.map +1 -1
- package/dist/{field-DWm5NXeV.d.ts → field-C1TdmC2t.d.ts} +1 -1
- package/dist/index.d.ts +15 -12
- package/dist/index.js +1105 -633
- package/dist/index.js.map +1 -1
- package/dist/inertia.d.ts +11 -3
- package/dist/inertia.js +66 -12
- package/dist/inertia.js.map +1 -1
- package/dist/{input-Dxnsxi-f.d.ts → input-B4uEClxB.d.ts} +1 -1
- package/dist/{json-viewer-BARA2RCW.d.ts → json-viewer-Bssv9mTD.d.ts} +1 -1
- package/dist/locales/fr.d.ts +44 -0
- package/dist/locales/fr.js +248 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/pt.d.ts +10 -9
- package/dist/locales/pt.js +40 -3
- package/dist/locales/pt.js.map +1 -1
- package/dist/shells.d.ts +46 -5
- package/dist/shells.js +211 -71
- package/dist/shells.js.map +1 -1
- package/dist/{sidebar-Bp6Q46j-.d.ts → sidebar-BLL2tgTt.d.ts} +2 -2
- package/dist/types-1LUmNJf_.d.ts +41 -0
- package/dist/{types-cmBL8zOc.d.ts → types-CMZRvMV5.d.ts} +1 -1
- package/dist/{types-B-eGPoFD.d.ts → types-CfAUvz--.d.ts} +1 -1
- package/package.json +8 -2
- package/theme.css +11 -0
- package/dist/chunk-2V6HUWST.js.map +0 -1
- package/dist/chunk-3Z2VGVPI.js.map +0 -1
- package/dist/chunk-B3L6PRLX.js.map +0 -1
- package/dist/chunk-I6VVCFZ2.js.map +0 -1
- package/dist/chunk-IDNOI4OK.js.map +0 -1
- package/dist/chunk-KHOA4TEI.js.map +0 -1
- package/dist/chunk-N2KIFFI7.js.map +0 -1
- package/dist/chunk-NGMG2UWX.js +0 -172
- package/dist/chunk-NGMG2UWX.js.map +0 -1
- package/dist/chunk-QNF4LJVT.js.map +0 -1
- package/dist/chunk-SZUXATOF.js.map +0 -1
- package/dist/chunk-YBXRJSR3.js.map +0 -1
- package/dist/types-u1qfmJQi.d.ts +0 -28
package/dist/editor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ui/editor/context.tsx","../src/components/ui/editor/content.tsx","../src/components/ui/editor/toolbar.tsx","../src/components/ui/editor/controls.tsx","../src/components/ui/editor/extensions.ts","../src/components/ui/editor/labels.ts","../src/components/ui/editor/editor.tsx","../src/components/ui/editor/link.tsx","../src/components/ui/editor/rich-text-editor.tsx"],"names":["TiptapContent","jsx","revision","useState","jsxs"],"mappings":";;;;;;;;;;AAYA,IAAM,aAAA,GAAgB,cAAyC,IAAI,CAAA;AAE5D,IAAM,wBAAwB,aAAA,CAAc,QAAA;AAE5C,SAAS,gBAAA,GAAuC;AACnD,EAAA,MAAM,OAAA,GAAU,WAAW,aAAa,CAAA;AAExC,EAAA,IAAI,YAAY,IAAA,EAAM;AAClB,IAAA,MAAM,IAAI,MAAM,4CAA4C,CAAA;AAAA,EAChE;AAEA,EAAA,OAAO,OAAA;AACX;ACdO,SAAS,aAAA,CAAc;AAAA,EAC1B,SAAA;AAAA,EACA,QAAA,GAAW;AACf,CAAA,EAAuC;AACnC,EAAA,MAAM,EAAE,MAAA,EAAQ,WAAA,EAAY,GAAI,gBAAA,EAAiB;AAEjD,EAAA,uBACI,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,kBAAA,EAAkB,WAAA;AAAA,MAClB,YAAA,EAAY,MAAA,CAAO,OAAA,GAAU,EAAA,GAAK,MAAA;AAAA,MAClC,SAAA,EAAW,EAAA;AAAA,QACP,sRAAA;AAAA,QACA;AAAA,OACJ;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ACAA,IAAC,aAAA,EAAA,EAAc;AAAA,GAAA,EACnB,CAAA;AAER","file":"editor.js","sourcesContent":["import type { Editor as TiptapEditor } from '@tiptap/core';\nimport { createContext, useContext } from 'react';\n\nimport type { EditorLabels } from '@/components/ui/editor/labels';\n\nexport interface EditorContextValue {\n editor: TiptapEditor;\n labels: EditorLabels;\n editable: boolean;\n placeholder?: string;\n}\n\nconst EditorContext = createContext<EditorContextValue | null>(null);\n\nexport const EditorContextProvider = EditorContext.Provider;\n\nexport function useEditorContext(): EditorContextValue {\n const context = useContext(EditorContext);\n\n if (context === null) {\n throw new Error('Editor parts must be used inside <Editor>.');\n }\n\n return context;\n}\n","import { EditorContent as TiptapContent } from '@tiptap/react';\n\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorContentProps {\n className?: string;\n}\n\nexport function EditorContent({\n className,\n slotName = 'editor-content',\n}: EditorContentProps & SlotNameProps) {\n const { editor, placeholder } = useEditorContext();\n\n return (\n <div\n data-placeholder={placeholder}\n data-empty={editor.isEmpty ? '' : undefined}\n className={cn(\n 'data-empty:before:top-3 data-empty:before:left-4 data-empty:before:text-sm data-empty:before:font-medium relative w-full data-empty:before:pointer-events-none data-empty:before:absolute data-empty:before:text-muted-foreground data-empty:before:content-[attr(data-placeholder)]',\n className,\n )}\n data-slot={slotName}\n >\n <TiptapContent editor={editor} />\n </div>\n );\n}\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { Toggle } from '@/components/ui/toggle';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorToolbarProps {\n children: ReactNode;\n className?: string;\n}\n\nexport function EditorToolbar({\n children,\n className,\n slotName = 'editor-toolbar',\n}: EditorToolbarProps & SlotNameProps) {\n const { labels } = useEditorContext();\n\n return (\n <div\n role=\"toolbar\"\n aria-label={labels.toolbarLabel}\n aria-orientation=\"horizontal\"\n className={cn('gap-1 flex flex-wrap items-center', className)}\n data-slot={slotName}\n >\n {children}\n </div>\n );\n}\n\nexport interface EditorControlProps {\n label: string;\n icon: LucideIcon;\n pressed?: boolean;\n disabled?: boolean;\n onActivate: () => void;\n className?: string;\n}\n\nexport function EditorControl({\n label,\n icon: Icon,\n pressed = false,\n disabled = false,\n onActivate,\n className,\n slotName = 'editor-control',\n}: EditorControlProps & SlotNameProps) {\n const { editable } = useEditorContext();\n\n return (\n <Toggle\n size=\"sm\"\n aria-label={label}\n title={label}\n pressed={pressed}\n disabled={disabled || !editable}\n onPressedChange={onActivate}\n className={className}\n slotName={slotName}\n >\n <Icon aria-hidden=\"true\" />\n </Toggle>\n );\n}\n","import {\n Bold,\n Code,\n Heading1,\n Heading2,\n Heading3,\n Heading4,\n Heading5,\n Heading6,\n Italic,\n List,\n ListOrdered,\n Quote,\n Redo2,\n Strikethrough,\n Undo2,\n type LucideIcon,\n} from 'lucide-react';\n\nimport { Button } from '@/components/ui/button';\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { EditorControl } from '@/components/ui/editor/toolbar';\nimport type { SlotNameProps } from '@/types';\n\nexport type EditorMarkName = 'bold' | 'italic' | 'strike' | 'code';\n\nconst MARK_ICONS: Record<EditorMarkName, LucideIcon> = {\n bold: Bold,\n italic: Italic,\n strike: Strikethrough,\n code: Code,\n};\n\nexport interface EditorMarkProps {\n mark: EditorMarkName;\n label?: string;\n className?: string;\n}\n\nexport function EditorMark({ mark, label, className }: EditorMarkProps) {\n const { editor, labels } = useEditorContext();\n\n const names: Record<EditorMarkName, string> = {\n bold: labels.boldLabel,\n italic: labels.italicLabel,\n strike: labels.strikeLabel,\n code: labels.codeLabel,\n };\n\n return (\n <EditorControl\n label={label ?? names[mark]}\n icon={MARK_ICONS[mark]}\n pressed={editor.isActive(mark)}\n disabled={!editor.can().toggleMark(mark)}\n onActivate={() => editor.chain().focus().toggleMark(mark).run()}\n className={className}\n />\n );\n}\n\nconst HEADING_ICONS: Record<number, LucideIcon> = {\n 1: Heading1,\n 2: Heading2,\n 3: Heading3,\n 4: Heading4,\n 5: Heading5,\n 6: Heading6,\n};\n\nexport interface EditorHeadingProps {\n level: 1 | 2 | 3 | 4 | 5 | 6;\n label?: string;\n className?: string;\n}\n\nexport function EditorHeading({ level, label, className }: EditorHeadingProps) {\n const { editor, labels } = useEditorContext();\n\n return (\n <EditorControl\n label={label ?? labels.headingLabel(level)}\n icon={HEADING_ICONS[level]}\n pressed={editor.isActive('heading', { level })}\n disabled={\n !editor.can().toggleNode('heading', 'paragraph', { level })\n }\n onActivate={() =>\n editor.chain().focus().toggleHeading({ level }).run()\n }\n className={className}\n />\n );\n}\n\nexport type EditorListVariant = 'bullet' | 'ordered';\n\nexport interface EditorListProps {\n variant: EditorListVariant;\n label?: string;\n className?: string;\n}\n\nexport function EditorList({ variant, label, className }: EditorListProps) {\n const { editor, labels } = useEditorContext();\n const name = variant === 'bullet' ? 'bulletList' : 'orderedList';\n\n return (\n <EditorControl\n label={\n label ??\n (variant === 'bullet'\n ? labels.bulletListLabel\n : labels.orderedListLabel)\n }\n icon={variant === 'bullet' ? List : ListOrdered}\n pressed={editor.isActive(name)}\n disabled={!editor.can().toggleList(name, 'listItem')}\n onActivate={() =>\n variant === 'bullet'\n ? editor.chain().focus().toggleBulletList().run()\n : editor.chain().focus().toggleOrderedList().run()\n }\n className={className}\n />\n );\n}\n\nexport interface EditorBlockquoteProps {\n label?: string;\n className?: string;\n}\n\nexport function EditorBlockquote({ label, className }: EditorBlockquoteProps) {\n const { editor, labels } = useEditorContext();\n\n return (\n <EditorControl\n label={label ?? labels.blockquoteLabel}\n icon={Quote}\n pressed={editor.isActive('blockquote')}\n disabled={!editor.can().toggleWrap('blockquote')}\n onActivate={() => editor.chain().focus().toggleBlockquote().run()}\n className={className}\n />\n );\n}\n\nexport type EditorHistoryAction = 'undo' | 'redo';\n\nexport interface EditorHistoryProps {\n action: EditorHistoryAction;\n label?: string;\n className?: string;\n}\n\nexport function EditorHistory({\n action,\n label,\n className,\n slotName = 'editor-history',\n}: EditorHistoryProps & SlotNameProps) {\n const { editor, labels, editable } = useEditorContext();\n const undoing = action === 'undo';\n const available = undoing ? editor.can().undo() : editor.can().redo();\n const Icon = undoing ? Undo2 : Redo2;\n\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={\n label ?? (undoing ? labels.undoLabel : labels.redoLabel)\n }\n title={label ?? (undoing ? labels.undoLabel : labels.redoLabel)}\n disabled={!available || !editable}\n onClick={() =>\n undoing\n ? editor.chain().focus().undo().run()\n : editor.chain().focus().redo().run()\n }\n className={className}\n slotName={slotName}\n >\n <Icon aria-hidden=\"true\" />\n </Button>\n );\n}\n","import type { Extensions } from '@tiptap/core';\nimport StarterKit from '@tiptap/starter-kit';\n\nconst SAFE_PROTOCOLS = ['http', 'https', 'mailto', 'tel'];\n\nexport function isSafeEditorUrl(url: string): boolean {\n const protocol = /^([a-z][a-z0-9+.-]*):/i.exec(url.trim())?.[1];\n\n return (\n protocol === undefined ||\n SAFE_PROTOCOLS.includes(protocol.toLowerCase())\n );\n}\n\nexport function defaultEditorExtensions(): Extensions {\n return [\n StarterKit.configure({\n link: {\n openOnClick: false,\n autolink: true,\n protocols: SAFE_PROTOCOLS,\n isAllowedUri: (url) => isSafeEditorUrl(url),\n HTMLAttributes: {\n rel: 'noopener noreferrer nofollow',\n target: '_blank',\n },\n },\n }),\n ];\n}\n","export interface EditorLabels {\n toolbarLabel: string;\n boldLabel: string;\n italicLabel: string;\n strikeLabel: string;\n codeLabel: string;\n headingLabel: (level: number) => string;\n bulletListLabel: string;\n orderedListLabel: string;\n blockquoteLabel: string;\n undoLabel: string;\n redoLabel: string;\n linkLabel: string;\n linkDialogTitle: string;\n linkDialogDescription: string;\n linkUrlLabel: string;\n linkUrlPlaceholder: string;\n linkApplyLabel: string;\n linkRemoveLabel: string;\n linkCancelLabel: string;\n}\n\nexport const editorLabels: EditorLabels = {\n toolbarLabel: 'Formatting',\n boldLabel: 'Bold',\n italicLabel: 'Italic',\n strikeLabel: 'Strikethrough',\n codeLabel: 'Code',\n headingLabel: (level) => `Heading ${level}`,\n bulletListLabel: 'Bullet list',\n orderedListLabel: 'Numbered list',\n blockquoteLabel: 'Quote',\n undoLabel: 'Undo',\n redoLabel: 'Redo',\n linkLabel: 'Link',\n linkDialogTitle: 'Link',\n linkDialogDescription: 'Point the selected text at an address.',\n linkUrlLabel: 'Address',\n linkUrlPlaceholder: 'https://example.com',\n linkApplyLabel: 'Apply',\n linkRemoveLabel: 'Remove',\n linkCancelLabel: 'Cancel',\n};\n","import type { Extensions, JSONContent } from '@tiptap/core';\nimport { useEditor } from '@tiptap/react';\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from 'react';\n\nimport {\n EditorContextProvider,\n type EditorContextValue,\n} from '@/components/ui/editor/context';\nimport { defaultEditorExtensions } from '@/components/ui/editor/extensions';\nimport { editorLabels, type EditorLabels } from '@/components/ui/editor/labels';\nimport { fieldSurface, focusRing } from '@/lib/language';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport type EditorOutput = 'html' | 'json';\n\nexport type EditorDocument = string | JSONContent;\n\ninterface EditorSharedProps {\n extensions?: Extensions;\n labels?: EditorLabels;\n placeholder?: string;\n label?: string;\n disabled?: boolean;\n readOnly?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport type EditorProps = EditorSharedProps &\n (\n | {\n output?: 'html';\n value: string;\n onChange: (value: string) => void;\n }\n | {\n output: 'json';\n value: JSONContent;\n onChange: (value: JSONContent) => void;\n }\n );\n\nconst editorProse =\n 'text-sm font-medium leading-relaxed [&_p]:my-2 [&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:mt-4 [&_h2]:mb-2 [&_h2]:text-xl [&_h2]:font-bold [&_h3]:mt-3 [&_h3]:mb-2 [&_h3]:text-lg [&_h3]:font-semibold [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1 [&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground [&_a]:text-primary [&_a]:underline [&_a]:underline-offset-4 [&_code]:rounded-md [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-normal [&_pre]:my-3 [&_pre]:rounded-xl [&_pre]:bg-muted [&_pre]:p-4 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_hr]:my-4 [&_hr]:border-border';\n\nconst editingSurface = `${fieldSurface} ${focusRing} ${editorProse} min-h-32 w-full px-4 py-3 selection:bg-primary selection:text-primary-foreground`;\n\nfunction read(\n editor: { getHTML: () => string; getJSON: () => JSONContent },\n output: EditorOutput,\n): EditorDocument {\n return output === 'json' ? editor.getJSON() : editor.getHTML();\n}\n\nfunction isSameDocument(left: EditorDocument, right: EditorDocument): boolean {\n if (typeof left === 'string' && typeof right === 'string') {\n return left === right;\n }\n\n return JSON.stringify(left) === JSON.stringify(right);\n}\n\nexport function Editor({\n value,\n onChange,\n output = 'html',\n extensions,\n labels = editorLabels,\n placeholder,\n label,\n disabled = false,\n readOnly = false,\n className,\n children,\n slotName = 'editor',\n}: EditorProps & SlotNameProps) {\n const [revision, setRevision] = useState(0);\n const editable = !disabled && !readOnly;\n const emit = useRef(onChange as (next: EditorDocument) => void);\n emit.current = onChange as (next: EditorDocument) => void;\n const emitted = useRef<EditorDocument | null>(null);\n\n const extensionSet = useMemo(\n () => extensions ?? defaultEditorExtensions(),\n [extensions],\n );\n\n const editor = useEditor(\n {\n extensions: extensionSet,\n content: value,\n editable,\n immediatelyRender: false,\n editorProps: {\n attributes: {\n 'data-slot': 'editor-surface',\n role: 'textbox',\n 'aria-multiline': 'true',\n ...(label === undefined ? {} : { 'aria-label': label }),\n class: editingSurface,\n },\n },\n onUpdate: ({ editor: instance }) => {\n const next = read(instance, output);\n\n emitted.current = next;\n emit.current(next);\n },\n },\n [extensionSet],\n );\n\n useEffect(() => {\n if (editor === null) {\n return;\n }\n\n const rerender = () => setRevision((revision) => revision + 1);\n\n editor.on('transaction', rerender);\n\n return () => {\n editor.off('transaction', rerender);\n };\n }, [editor]);\n\n useEffect(() => {\n editor?.setEditable(editable, false);\n }, [editor, editable]);\n\n useEffect(() => {\n if (editor === null) {\n return;\n }\n\n const echoed =\n emitted.current !== null && isSameDocument(emitted.current, value);\n\n if (echoed || isSameDocument(read(editor, output), value)) {\n return;\n }\n\n emitted.current = null;\n editor.commands.setContent(value, { emitUpdate: false });\n }, [editor, value, output]);\n\n const context = useMemo<EditorContextValue | null>(\n () =>\n editor === null ? null : { editor, labels, editable, placeholder },\n [editor, labels, editable, placeholder, revision],\n );\n\n if (context === null) {\n return null;\n }\n\n return (\n <EditorContextProvider value={context}>\n <div\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n className={cn(\n 'gap-2 flex w-full flex-col data-disabled:opacity-50',\n className,\n )}\n data-slot={slotName}\n >\n {children}\n </div>\n </EditorContextProvider>\n );\n}\n","import { Link2 } from 'lucide-react';\nimport { useId, useState } from 'react';\n\nimport { Button } from '@/components/ui/button';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '@/components/ui/dialog';\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { isSafeEditorUrl } from '@/components/ui/editor/extensions';\nimport { EditorControl } from '@/components/ui/editor/toolbar';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorLinkProps {\n label?: string;\n className?: string;\n}\n\nexport function EditorLink({\n label,\n className,\n slotName = 'editor-link-dialog',\n}: EditorLinkProps & SlotNameProps) {\n const { editor, labels, editable } = useEditorContext();\n const [open, setOpen] = useState(false);\n const [href, setHref] = useState('');\n const attached = editor.isActive('link');\n const fieldId = useId();\n\n function openDialog() {\n setHref(editor.getAttributes('link').href ?? '');\n setOpen(true);\n }\n\n function apply() {\n if (!isSafeEditorUrl(href)) {\n return;\n }\n\n editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: href.trim() })\n .run();\n\n setOpen(false);\n }\n\n function remove() {\n editor.chain().focus().extendMarkRange('link').unsetLink().run();\n setOpen(false);\n }\n\n return (\n <>\n <EditorControl\n label={label ?? labels.linkLabel}\n icon={Link2}\n pressed={attached}\n disabled={!editable}\n onActivate={openDialog}\n className={className}\n />\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogContent slotName={slotName}>\n <DialogHeader>\n <DialogTitle>{labels.linkDialogTitle}</DialogTitle>\n <DialogDescription>\n {labels.linkDialogDescription}\n </DialogDescription>\n </DialogHeader>\n <div className=\"gap-2 flex flex-col\">\n <Label htmlFor={fieldId}>{labels.linkUrlLabel}</Label>\n <Input\n id={fieldId}\n slotName=\"editor-link-url\"\n value={href}\n placeholder={labels.linkUrlPlaceholder}\n onChange={(event) => setHref(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n apply();\n }\n }}\n />\n </div>\n <DialogFooter>\n {attached && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={remove}\n >\n {labels.linkRemoveLabel}\n </Button>\n )}\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setOpen(false)}\n >\n {labels.linkCancelLabel}\n </Button>\n <Button\n type=\"button\"\n onClick={apply}\n disabled={href.trim() === ''}\n >\n {labels.linkApplyLabel}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}\n","import { EditorContent } from '@/components/ui/editor/content';\nimport {\n EditorBlockquote,\n EditorHeading,\n EditorHistory,\n EditorList,\n EditorMark,\n} from '@/components/ui/editor/controls';\nimport { Editor, type EditorProps } from '@/components/ui/editor/editor';\nimport { EditorLink } from '@/components/ui/editor/link';\nimport { EditorToolbar } from '@/components/ui/editor/toolbar';\nimport { Separator } from '@/components/ui/separator';\n\ntype WithoutChildren<T> = T extends unknown ? Omit<T, 'children'> : never;\n\nexport type RichTextEditorProps = WithoutChildren<EditorProps>;\n\nexport function RichTextEditor(props: RichTextEditorProps) {\n return (\n <Editor {...props}>\n <EditorToolbar>\n <EditorMark mark=\"bold\" />\n <EditorMark mark=\"italic\" />\n <EditorMark mark=\"strike\" />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorHeading level={2} />\n <EditorHeading level={3} />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorList variant=\"bullet\" />\n <EditorList variant=\"ordered\" />\n <EditorBlockquote />\n <EditorMark mark=\"code\" />\n <EditorLink />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorHistory action=\"undo\" />\n <EditorHistory action=\"redo\" />\n </EditorToolbar>\n <EditorContent />\n </Editor>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/editor/content.tsx","../src/components/ui/editor/context.tsx","../src/components/ui/editor/controls.tsx","../src/components/ui/editor/toolbar.tsx","../src/components/ui/editor/editor.tsx","../src/components/ui/editor/extensions.ts","../src/components/ui/editor/labels.ts","../src/components/ui/editor/link.tsx","../src/components/ui/editor/rich-text-editor.tsx"],"sourcesContent":["import { EditorContent as TiptapContent } from '@tiptap/react';\n\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorContentProps {\n className?: string;\n}\n\nexport function EditorContent({\n className,\n slotName = 'editor-content',\n}: EditorContentProps & SlotNameProps) {\n const { editor, placeholder } = useEditorContext();\n\n return (\n <div\n data-placeholder={placeholder}\n data-empty={editor.isEmpty ? '' : undefined}\n className={cn(\n 'data-empty:before:top-3 data-empty:before:left-4 data-empty:before:text-sm data-empty:before:font-medium relative w-full data-empty:before:pointer-events-none data-empty:before:absolute data-empty:before:text-muted-foreground data-empty:before:content-[attr(data-placeholder)]',\n className,\n )}\n data-slot={slotName}\n >\n <TiptapContent editor={editor} />\n </div>\n );\n}\n","import type { Editor as TiptapEditor } from '@tiptap/core';\nimport { createContext, useContext } from 'react';\n\nimport type { EditorLabels } from '@/components/ui/editor/labels';\n\nexport interface EditorContextValue {\n editor: TiptapEditor;\n labels: EditorLabels;\n editable: boolean;\n placeholder?: string;\n}\n\nconst EditorContext = createContext<EditorContextValue | null>(null);\n\nexport const EditorContextProvider = EditorContext.Provider;\n\nexport function useEditorContext(): EditorContextValue {\n const context = useContext(EditorContext);\n\n if (context === null) {\n throw new Error('Editor parts must be used inside <Editor>.');\n }\n\n return context;\n}\n","import {\n Bold,\n Code,\n Heading1,\n Heading2,\n Heading3,\n Heading4,\n Heading5,\n Heading6,\n Italic,\n List,\n ListOrdered,\n Quote,\n Redo2,\n Strikethrough,\n Undo2,\n type LucideIcon,\n} from 'lucide-react';\n\nimport { Button } from '@/components/ui/button';\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { EditorControl } from '@/components/ui/editor/toolbar';\nimport type { SlotNameProps } from '@/types';\n\nexport type EditorMarkName = 'bold' | 'italic' | 'strike' | 'code';\n\nconst MARK_ICONS: Record<EditorMarkName, LucideIcon> = {\n bold: Bold,\n italic: Italic,\n strike: Strikethrough,\n code: Code,\n};\n\nexport interface EditorMarkProps {\n mark: EditorMarkName;\n label?: string;\n className?: string;\n}\n\nexport function EditorMark({ mark, label, className }: EditorMarkProps) {\n const { editor, labels } = useEditorContext();\n\n const names: Record<EditorMarkName, string> = {\n bold: labels.boldLabel,\n italic: labels.italicLabel,\n strike: labels.strikeLabel,\n code: labels.codeLabel,\n };\n\n return (\n <EditorControl\n label={label ?? names[mark]}\n icon={MARK_ICONS[mark]}\n pressed={editor.isActive(mark)}\n disabled={!editor.can().toggleMark(mark)}\n onActivate={() => editor.chain().focus().toggleMark(mark).run()}\n className={className}\n />\n );\n}\n\nconst HEADING_ICONS: Record<number, LucideIcon> = {\n 1: Heading1,\n 2: Heading2,\n 3: Heading3,\n 4: Heading4,\n 5: Heading5,\n 6: Heading6,\n};\n\nexport interface EditorHeadingProps {\n level: 1 | 2 | 3 | 4 | 5 | 6;\n label?: string;\n className?: string;\n}\n\nexport function EditorHeading({ level, label, className }: EditorHeadingProps) {\n const { editor, labels } = useEditorContext();\n\n return (\n <EditorControl\n label={label ?? labels.headingLabel(level)}\n icon={HEADING_ICONS[level]}\n pressed={editor.isActive('heading', { level })}\n disabled={\n !editor.can().toggleNode('heading', 'paragraph', { level })\n }\n onActivate={() =>\n editor.chain().focus().toggleHeading({ level }).run()\n }\n className={className}\n />\n );\n}\n\nexport type EditorListVariant = 'bullet' | 'ordered';\n\nexport interface EditorListProps {\n variant: EditorListVariant;\n label?: string;\n className?: string;\n}\n\nexport function EditorList({ variant, label, className }: EditorListProps) {\n const { editor, labels } = useEditorContext();\n const name = variant === 'bullet' ? 'bulletList' : 'orderedList';\n\n return (\n <EditorControl\n label={\n label ??\n (variant === 'bullet'\n ? labels.bulletListLabel\n : labels.orderedListLabel)\n }\n icon={variant === 'bullet' ? List : ListOrdered}\n pressed={editor.isActive(name)}\n disabled={!editor.can().toggleList(name, 'listItem')}\n onActivate={() =>\n variant === 'bullet'\n ? editor.chain().focus().toggleBulletList().run()\n : editor.chain().focus().toggleOrderedList().run()\n }\n className={className}\n />\n );\n}\n\nexport interface EditorBlockquoteProps {\n label?: string;\n className?: string;\n}\n\nexport function EditorBlockquote({ label, className }: EditorBlockquoteProps) {\n const { editor, labels } = useEditorContext();\n\n return (\n <EditorControl\n label={label ?? labels.blockquoteLabel}\n icon={Quote}\n pressed={editor.isActive('blockquote')}\n disabled={!editor.can().toggleWrap('blockquote')}\n onActivate={() => editor.chain().focus().toggleBlockquote().run()}\n className={className}\n />\n );\n}\n\nexport type EditorHistoryAction = 'undo' | 'redo';\n\nexport interface EditorHistoryProps {\n action: EditorHistoryAction;\n label?: string;\n className?: string;\n}\n\nexport function EditorHistory({\n action,\n label,\n className,\n slotName = 'editor-history',\n}: EditorHistoryProps & SlotNameProps) {\n const { editor, labels, editable } = useEditorContext();\n const undoing = action === 'undo';\n const available = undoing ? editor.can().undo() : editor.can().redo();\n const Icon = undoing ? Undo2 : Redo2;\n\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={\n label ?? (undoing ? labels.undoLabel : labels.redoLabel)\n }\n title={label ?? (undoing ? labels.undoLabel : labels.redoLabel)}\n disabled={!available || !editable}\n onClick={() =>\n undoing\n ? editor.chain().focus().undo().run()\n : editor.chain().focus().redo().run()\n }\n className={className}\n slotName={slotName}\n >\n <Icon aria-hidden=\"true\" />\n </Button>\n );\n}\n","import type { LucideIcon } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { Toggle } from '@/components/ui/toggle';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorToolbarProps {\n children: ReactNode;\n className?: string;\n}\n\nexport function EditorToolbar({\n children,\n className,\n slotName = 'editor-toolbar',\n}: EditorToolbarProps & SlotNameProps) {\n const { labels } = useEditorContext();\n\n return (\n <div\n role=\"toolbar\"\n aria-label={labels.toolbarLabel}\n aria-orientation=\"horizontal\"\n className={cn('gap-1 flex flex-wrap items-center', className)}\n data-slot={slotName}\n >\n {children}\n </div>\n );\n}\n\nexport interface EditorControlProps {\n label: string;\n icon: LucideIcon;\n pressed?: boolean;\n disabled?: boolean;\n onActivate: () => void;\n className?: string;\n}\n\nexport function EditorControl({\n label,\n icon: Icon,\n pressed = false,\n disabled = false,\n onActivate,\n className,\n slotName = 'editor-control',\n}: EditorControlProps & SlotNameProps) {\n const { editable } = useEditorContext();\n\n return (\n <Toggle\n size=\"sm\"\n aria-label={label}\n title={label}\n pressed={pressed}\n disabled={disabled || !editable}\n onPressedChange={onActivate}\n className={className}\n slotName={slotName}\n >\n <Icon aria-hidden=\"true\" />\n </Toggle>\n );\n}\n","import type { Extensions, JSONContent } from '@tiptap/core';\nimport { useEditor } from '@tiptap/react';\nimport { useEffect, useMemo, useRef, useState, type ReactNode } from 'react';\n\nimport {\n EditorContextProvider,\n type EditorContextValue,\n} from '@/components/ui/editor/context';\nimport { defaultEditorExtensions } from '@/components/ui/editor/extensions';\nimport { editorLabels, type EditorLabels } from '@/components/ui/editor/labels';\nimport { fieldSurface, focusRing } from '@/lib/language';\nimport { cn } from '@/lib/utils';\nimport type { SlotNameProps } from '@/types';\n\nexport type EditorOutput = 'html' | 'json';\n\nexport type EditorDocument = string | JSONContent;\n\ninterface EditorSharedProps {\n extensions?: Extensions;\n labels?: EditorLabels;\n placeholder?: string;\n label?: string;\n disabled?: boolean;\n readOnly?: boolean;\n className?: string;\n children: ReactNode;\n}\n\nexport type EditorProps = EditorSharedProps &\n (\n | {\n output?: 'html';\n value: string;\n onChange: (value: string) => void;\n }\n | {\n output: 'json';\n value: JSONContent;\n onChange: (value: JSONContent) => void;\n }\n );\n\nconst editorProse =\n 'text-sm font-medium leading-relaxed [&_p]:my-2 [&_h1]:mt-4 [&_h1]:mb-2 [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:mt-4 [&_h2]:mb-2 [&_h2]:text-xl [&_h2]:font-bold [&_h3]:mt-3 [&_h3]:mb-2 [&_h3]:text-lg [&_h3]:font-semibold [&_ul]:my-2 [&_ul]:list-disc [&_ul]:pl-6 [&_ol]:my-2 [&_ol]:list-decimal [&_ol]:pl-6 [&_li]:my-1 [&_blockquote]:my-3 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:text-muted-foreground [&_a]:text-primary [&_a]:underline [&_a]:underline-offset-4 [&_code]:rounded-md [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-normal [&_pre]:my-3 [&_pre]:rounded-xl [&_pre]:bg-muted [&_pre]:p-4 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_hr]:my-4 [&_hr]:border-border';\n\nconst editingSurface = `${fieldSurface} ${focusRing} ${editorProse} min-h-32 w-full px-4 py-3 selection:bg-primary selection:text-primary-foreground`;\n\nfunction read(\n editor: { getHTML: () => string; getJSON: () => JSONContent },\n output: EditorOutput,\n): EditorDocument {\n return output === 'json' ? editor.getJSON() : editor.getHTML();\n}\n\nfunction isSameDocument(left: EditorDocument, right: EditorDocument): boolean {\n if (typeof left === 'string' && typeof right === 'string') {\n return left === right;\n }\n\n return JSON.stringify(left) === JSON.stringify(right);\n}\n\nexport function Editor({\n value,\n onChange,\n output = 'html',\n extensions,\n labels = editorLabels,\n placeholder,\n label,\n disabled = false,\n readOnly = false,\n className,\n children,\n slotName = 'editor',\n}: EditorProps & SlotNameProps) {\n const [revision, setRevision] = useState(0);\n const editable = !disabled && !readOnly;\n const emit = useRef(onChange as (next: EditorDocument) => void);\n emit.current = onChange as (next: EditorDocument) => void;\n const emitted = useRef<EditorDocument | null>(null);\n\n const extensionSet = useMemo(\n () => extensions ?? defaultEditorExtensions(),\n [extensions],\n );\n\n const editor = useEditor(\n {\n extensions: extensionSet,\n content: value,\n editable,\n immediatelyRender: false,\n editorProps: {\n attributes: {\n 'data-slot': 'editor-surface',\n role: 'textbox',\n 'aria-multiline': 'true',\n ...(label === undefined ? {} : { 'aria-label': label }),\n class: editingSurface,\n },\n },\n onUpdate: ({ editor: instance }) => {\n const next = read(instance, output);\n\n emitted.current = next;\n emit.current(next);\n },\n },\n [extensionSet],\n );\n\n useEffect(() => {\n if (editor === null) {\n return;\n }\n\n const rerender = () => setRevision((revision) => revision + 1);\n\n editor.on('transaction', rerender);\n\n return () => {\n editor.off('transaction', rerender);\n };\n }, [editor]);\n\n useEffect(() => {\n editor?.setEditable(editable, false);\n }, [editor, editable]);\n\n useEffect(() => {\n if (editor === null) {\n return;\n }\n\n const echoed =\n emitted.current !== null && isSameDocument(emitted.current, value);\n\n if (echoed || isSameDocument(read(editor, output), value)) {\n return;\n }\n\n emitted.current = null;\n editor.commands.setContent(value, { emitUpdate: false });\n }, [editor, value, output]);\n\n const context = useMemo<EditorContextValue | null>(\n () =>\n editor === null ? null : { editor, labels, editable, placeholder },\n [editor, labels, editable, placeholder, revision],\n );\n\n if (context === null) {\n return null;\n }\n\n return (\n <EditorContextProvider value={context}>\n <div\n data-disabled={disabled ? '' : undefined}\n data-readonly={readOnly ? '' : undefined}\n className={cn(\n 'gap-2 flex w-full flex-col data-disabled:opacity-50',\n className,\n )}\n data-slot={slotName}\n >\n {children}\n </div>\n </EditorContextProvider>\n );\n}\n","import type { Extensions } from '@tiptap/core';\nimport StarterKit from '@tiptap/starter-kit';\n\nconst SAFE_PROTOCOLS = ['http', 'https', 'mailto', 'tel'];\n\nexport function isSafeEditorUrl(url: string): boolean {\n const protocol = /^([a-z][a-z0-9+.-]*):/i.exec(url.trim())?.[1];\n\n return (\n protocol === undefined ||\n SAFE_PROTOCOLS.includes(protocol.toLowerCase())\n );\n}\n\nexport function defaultEditorExtensions(): Extensions {\n return [\n StarterKit.configure({\n link: {\n openOnClick: false,\n autolink: true,\n protocols: SAFE_PROTOCOLS,\n isAllowedUri: (url) => isSafeEditorUrl(url),\n HTMLAttributes: {\n rel: 'noopener noreferrer nofollow',\n target: '_blank',\n },\n },\n }),\n ];\n}\n","export interface EditorLabels {\n toolbarLabel: string;\n boldLabel: string;\n italicLabel: string;\n strikeLabel: string;\n codeLabel: string;\n headingLabel: (level: number) => string;\n bulletListLabel: string;\n orderedListLabel: string;\n blockquoteLabel: string;\n undoLabel: string;\n redoLabel: string;\n linkLabel: string;\n linkDialogTitle: string;\n linkDialogDescription: string;\n linkUrlLabel: string;\n linkUrlPlaceholder: string;\n linkApplyLabel: string;\n linkRemoveLabel: string;\n linkCancelLabel: string;\n}\n\nexport const editorLabels: EditorLabels = {\n toolbarLabel: 'Formatting',\n boldLabel: 'Bold',\n italicLabel: 'Italic',\n strikeLabel: 'Strikethrough',\n codeLabel: 'Code',\n headingLabel: (level) => `Heading ${level}`,\n bulletListLabel: 'Bullet list',\n orderedListLabel: 'Numbered list',\n blockquoteLabel: 'Quote',\n undoLabel: 'Undo',\n redoLabel: 'Redo',\n linkLabel: 'Link',\n linkDialogTitle: 'Link',\n linkDialogDescription: 'Point the selected text at an address.',\n linkUrlLabel: 'Address',\n linkUrlPlaceholder: 'https://example.com',\n linkApplyLabel: 'Apply',\n linkRemoveLabel: 'Remove',\n linkCancelLabel: 'Cancel',\n};\n","import { Link2 } from 'lucide-react';\nimport { useId, useState } from 'react';\n\nimport { Button } from '@/components/ui/button';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from '@/components/ui/dialog';\nimport { useEditorContext } from '@/components/ui/editor/context';\nimport { isSafeEditorUrl } from '@/components/ui/editor/extensions';\nimport { EditorControl } from '@/components/ui/editor/toolbar';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport type { SlotNameProps } from '@/types';\n\nexport interface EditorLinkProps {\n label?: string;\n className?: string;\n}\n\nexport function EditorLink({\n label,\n className,\n slotName = 'editor-link-dialog',\n}: EditorLinkProps & SlotNameProps) {\n const { editor, labels, editable } = useEditorContext();\n const [open, setOpen] = useState(false);\n const [href, setHref] = useState('');\n const attached = editor.isActive('link');\n const fieldId = useId();\n\n function openDialog() {\n setHref(editor.getAttributes('link').href ?? '');\n setOpen(true);\n }\n\n function apply() {\n if (!isSafeEditorUrl(href)) {\n return;\n }\n\n editor\n .chain()\n .focus()\n .extendMarkRange('link')\n .setLink({ href: href.trim() })\n .run();\n\n setOpen(false);\n }\n\n function remove() {\n editor.chain().focus().extendMarkRange('link').unsetLink().run();\n setOpen(false);\n }\n\n return (\n <>\n <EditorControl\n label={label ?? labels.linkLabel}\n icon={Link2}\n pressed={attached}\n disabled={!editable}\n onActivate={openDialog}\n className={className}\n />\n <Dialog open={open} onOpenChange={setOpen}>\n <DialogContent slotName={slotName}>\n <DialogHeader>\n <DialogTitle>{labels.linkDialogTitle}</DialogTitle>\n <DialogDescription>\n {labels.linkDialogDescription}\n </DialogDescription>\n </DialogHeader>\n <div className=\"gap-2 flex flex-col\">\n <Label htmlFor={fieldId}>{labels.linkUrlLabel}</Label>\n <Input\n id={fieldId}\n slotName=\"editor-link-url\"\n value={href}\n placeholder={labels.linkUrlPlaceholder}\n onChange={(event) => setHref(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n apply();\n }\n }}\n />\n </div>\n <DialogFooter>\n {attached && (\n <Button\n type=\"button\"\n variant=\"ghost\"\n onClick={remove}\n >\n {labels.linkRemoveLabel}\n </Button>\n )}\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => setOpen(false)}\n >\n {labels.linkCancelLabel}\n </Button>\n <Button\n type=\"button\"\n onClick={apply}\n disabled={href.trim() === ''}\n >\n {labels.linkApplyLabel}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n </>\n );\n}\n","import { EditorContent } from '@/components/ui/editor/content';\nimport {\n EditorBlockquote,\n EditorHeading,\n EditorHistory,\n EditorList,\n EditorMark,\n} from '@/components/ui/editor/controls';\nimport { Editor, type EditorProps } from '@/components/ui/editor/editor';\nimport { EditorLink } from '@/components/ui/editor/link';\nimport { EditorToolbar } from '@/components/ui/editor/toolbar';\nimport { Separator } from '@/components/ui/separator';\n\ntype WithoutChildren<T> = T extends unknown ? Omit<T, 'children'> : never;\n\nexport type RichTextEditorProps = WithoutChildren<EditorProps>;\n\nexport function RichTextEditor(props: RichTextEditorProps) {\n return (\n <Editor {...props}>\n <EditorToolbar>\n <EditorMark mark=\"bold\" />\n <EditorMark mark=\"italic\" />\n <EditorMark mark=\"strike\" />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorHeading level={2} />\n <EditorHeading level={3} />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorList variant=\"bullet\" />\n <EditorList variant=\"ordered\" />\n <EditorBlockquote />\n <EditorMark mark=\"code\" />\n <EditorLink />\n <Separator orientation=\"vertical\" className=\"mx-1 h-6\" />\n <EditorHistory action=\"undo\" />\n <EditorHistory action=\"redo\" />\n </EditorToolbar>\n <EditorContent />\n </Editor>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,iBAAiB,qBAAqB;;;ACC/C,SAAS,eAAe,kBAAkB;AAW1C,IAAM,gBAAgB,cAAyC,IAAI;AAE5D,IAAM,wBAAwB,cAAc;AAE5C,SAAS,mBAAuC;AACnD,QAAM,UAAU,WAAW,aAAa;AAExC,MAAI,YAAY,MAAM;AAClB,UAAM,IAAI,MAAM,4CAA4C;AAAA,EAChE;AAEA,SAAO;AACX;;;ADEY;AAhBL,SAAS,cAAc;AAAA,EAC1B;AAAA,EACA,WAAW;AACf,GAAuC;AACnC,QAAM,EAAE,QAAQ,YAAY,IAAI,iBAAiB;AAEjD,SACI;AAAA,IAAC;AAAA;AAAA,MACG,oBAAkB;AAAA,MAClB,cAAY,OAAO,UAAU,KAAK;AAAA,MAClC,WAAW;AAAA,QACP;AAAA,QACA;AAAA,MACJ;AAAA,MACA,aAAW;AAAA,MAEX,8BAAC,iBAAc,QAAgB;AAAA;AAAA,EACnC;AAER;;;AE7BA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEG;;;ACIC,gBAAAA,YAAA;AARD,SAAS,cAAc;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,WAAW;AACf,GAAuC;AACnC,QAAM,EAAE,OAAO,IAAI,iBAAiB;AAEpC,SACI,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACG,MAAK;AAAA,MACL,cAAY,OAAO;AAAA,MACnB,oBAAiB;AAAA,MACjB,WAAW,GAAG,qCAAqC,SAAS;AAAA,M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AA;AAAA,YACG,MAAK;AAAA,YACL,SAAS;AAAA,YACT,UAAU,KAAK,KAAK,MAAM;AAAA,YAEzB,iBAAO;AAAA;AAAA,QACZ;AAAA,SACJ;AAAA,OACJ,GACJ;AAAA,KACJ;AAER;;;ACvGY,SACI,OAAAE,MADJ,QAAAC,aAAA;AAHL,SAAS,eAAe,OAA4B;AACvD,SACI,gBAAAA,MAAC,UAAQ,GAAG,OACR;AAAA,oBAAAA,MAAC,iBACG;AAAA,sBAAAD,KAAC,cAAW,MAAK,QAAO;AAAA,MACxB,gBAAAA,KAAC,cAAW,MAAK,UAAS;AAAA,MAC1B,gBAAAA,KAAC,cAAW,MAAK,UAAS;AAAA,MAC1B,gBAAAA,KAAC,aAAU,aAAY,YAAW,WAAU,YAAW;AAAA,MACvD,gBAAAA,KAAC,iBAAc,OAAO,GAAG;AAAA,MACzB,gBAAAA,KAAC,iBAAc,OAAO,GAAG;AAAA,MACzB,gBAAAA,KAAC,aAAU,aAAY,YAAW,WAAU,YAAW;AAAA,MACvD,gBAAAA,KAAC,cAAW,SAAQ,UAAS;AAAA,MAC7B,gBAAAA,KAAC,cAAW,SAAQ,WAAU;AAAA,MAC9B,gBAAAA,KAAC,oBAAiB;AAAA,MAClB,gBAAAA,KAAC,cAAW,MAAK,QAAO;AAAA,MACxB,gBAAAA,KAAC,cAAW;AAAA,MACZ,gBAAAA,KAAC,aAAU,aAAY,YAAW,WAAU,YAAW;AAAA,MACvD,gBAAAA,KAAC,iBAAc,QAAO,QAAO;AAAA,MAC7B,gBAAAA,KAAC,iBAAc,QAAO,QAAO;AAAA,OACjC;AAAA,IACA,gBAAAA,KAAC,iBAAc;AAAA,KACnB;AAER;","names":["jsx","jsx","jsx","revision","useState","jsx","useState","jsx","jsxs"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Slot } from '@radix-ui/react-slot';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
-
import { S as SlotNameProps } from './types-
|
|
4
|
+
import { S as SlotNameProps } from './types-CMZRvMV5.js';
|
|
5
5
|
|
|
6
6
|
type FieldOrientation = 'vertical' | 'horizontal';
|
|
7
7
|
interface FieldContextValue {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ export { S as SurfaceProps, c as controlFill, e as elevatedSurface, f as focusRi
|
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
7
|
-
import { S as SlotNameProps, I as IconComponent } from './types-
|
|
8
|
-
export { C as Column, a as ColumnDef, F as FilterFn,
|
|
9
|
-
import { F as FloatingSheetLabels } from './context-
|
|
10
|
-
export { B as Alert, E as AlertDescription, G as AlertLabels, H as AlertTitle, I as AppearanceToggle, J as AppearanceToggleLabels, K as AppearanceToggleProps, L as Combobox, M as ComboboxLabels, N as ComboboxOption, O as ComboboxProps, P as ConfirmDialog, Q as ConfirmDialogLabels, R as CopyButton, C as CopyButtonLabels, T as CopyButtonProps, V as DataTable, W as DataTableFacetedFilterLabels, X as DataTableFilter, Y as DataTableLabels, Z as DataTableRowAction, _ as DataTableServerFilter, $ as DatePicker, a0 as DatePickerLabels, a1 as DatePickerProps, a2 as DateRangeFilter, a3 as DateRangeFilterLabels, a4 as DateRangeFilterProps, a5 as FacetedFilter, a6 as PasswordInput, a7 as PasswordInputLabels, a8 as RowActionsMenu, a9 as SAVED_DURATION, aa as SaveStatus, ab as SaveStatusLabels, ac as SaveStatusProps, ad as SaveStatusState, ae as ServerFacetedFilter, U as UiLabelSections, v as UiLabels, w as UiLocaleProvider, af as alertDefaultLabels, ag as appearanceToggleDefaultLabels, ah as comboboxDefaultLabels, ai as confirmDialogDefaultLabels, aj as copyButtonLabels, ak as dataTableDefaultLabels, al as dataTableFacetedFilterDefaultLabels, am as datePickerDefaultLabels, an as dateRangeFilterDefaultLabels, ao as floatingSheetDefaultLabels, ap as passwordInputDefaultLabels, aq as saveStatusLabels, z as useUiLabels, A as useUiLocale } from './context-
|
|
7
|
+
import { S as SlotNameProps, I as IconComponent } from './types-CMZRvMV5.js';
|
|
8
|
+
export { C as Column, a as ColumnDef, F as FilterFn, b as LucideIcon, R as Row, T as TableInstance, U as UrlLike } from './types-CMZRvMV5.js';
|
|
9
|
+
import { F as FloatingSheetLabels } from './context-2wTOwxCk.js';
|
|
10
|
+
export { B as Alert, E as AlertDescription, G as AlertLabels, H as AlertTitle, I as AppearanceToggle, J as AppearanceToggleLabels, K as AppearanceToggleProps, L as Combobox, M as ComboboxLabels, N as ComboboxOption, O as ComboboxProps, P as ConfirmDialog, Q as ConfirmDialogLabels, R as CopyButton, C as CopyButtonLabels, T as CopyButtonProps, V as DataTable, W as DataTableFacetedFilterLabels, X as DataTableFilter, Y as DataTableLabels, Z as DataTableRowAction, _ as DataTableServerFilter, $ as DatePicker, a0 as DatePickerLabels, a1 as DatePickerProps, a2 as DateRangeFilter, a3 as DateRangeFilterLabels, a4 as DateRangeFilterProps, a5 as FacetedFilter, a6 as PasswordInput, a7 as PasswordInputLabels, a8 as RowActionsMenu, a9 as SAVED_DURATION, aa as SaveStatus, ab as SaveStatusLabels, ac as SaveStatusProps, ad as SaveStatusState, ae as ServerFacetedFilter, U as UiLabelSections, v as UiLabels, w as UiLocaleProvider, af as alertDefaultLabels, ag as appearanceToggleDefaultLabels, ah as comboboxDefaultLabels, ai as confirmDialogDefaultLabels, aj as copyButtonLabels, ak as dataTableDefaultLabels, al as dataTableFacetedFilterDefaultLabels, am as datePickerDefaultLabels, an as dateRangeFilterDefaultLabels, ao as floatingSheetDefaultLabels, ap as passwordInputDefaultLabels, aq as saveStatusLabels, z as useUiLabels, A as useUiLocale } from './context-2wTOwxCk.js';
|
|
11
11
|
import { AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Dialog as Dialog$1, ContextMenu as ContextMenu$1, HoverCard as HoverCard$1, Menubar as Menubar$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, Slider as Slider$1 } from 'radix-ui';
|
|
12
|
-
import { B as Button } from './input-
|
|
13
|
-
export { a as ButtonProps, I as Input, b as buttonVariants } from './input-
|
|
12
|
+
import { B as Button } from './input-B4uEClxB.js';
|
|
13
|
+
export { a as ButtonProps, I as Input, b as buttonVariants } from './input-B4uEClxB.js';
|
|
14
14
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
15
15
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
16
16
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -24,7 +24,7 @@ import { Command as Command$1 } from 'cmdk';
|
|
|
24
24
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
25
25
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
26
26
|
import { LucideIcon } from 'lucide-react';
|
|
27
|
-
export { F as Field, a as FieldContextValue, b as FieldControl, c as FieldDescription, d as FieldGroup, e as FieldLabel, f as FieldLabels, g as FieldOrientation, L as Label, u as useField } from './field-
|
|
27
|
+
export { F as Field, a as FieldContextValue, b as FieldControl, c as FieldDescription, d as FieldGroup, e as FieldLabel, f as FieldLabels, g as FieldOrientation, L as Label, u as useField } from './field-C1TdmC2t.js';
|
|
28
28
|
import * as react_hook_form from 'react-hook-form';
|
|
29
29
|
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
30
30
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
@@ -33,7 +33,7 @@ import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
|
33
33
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
34
34
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
35
35
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
36
|
-
export { S as Separator, a as Sidebar, b as SidebarContent, c as SidebarFooter, d as SidebarGroup, e as SidebarGroupAction, f as SidebarGroupContent, g as SidebarGroupLabel, h as SidebarHeader, i as SidebarInput, j as SidebarInset, k as SidebarMenu, l as SidebarMenuAction, m as SidebarMenuBadge, n as SidebarMenuButton, o as SidebarMenuItem, p as SidebarMenuSkeleton, q as SidebarMenuSub, r as SidebarMenuSubButton, s as SidebarMenuSubItem, t as SidebarProvider, u as SidebarRail, v as SidebarSeparator, w as SidebarTrigger, T as Tooltip, x as TooltipContent, y as TooltipProvider, z as TooltipTrigger, A as useSidebar } from './sidebar-
|
|
36
|
+
export { S as Separator, a as Sidebar, b as SidebarContent, c as SidebarFooter, d as SidebarGroup, e as SidebarGroupAction, f as SidebarGroupContent, g as SidebarGroupLabel, h as SidebarHeader, i as SidebarInput, j as SidebarInset, k as SidebarMenu, l as SidebarMenuAction, m as SidebarMenuBadge, n as SidebarMenuButton, o as SidebarMenuItem, p as SidebarMenuSkeleton, q as SidebarMenuSub, r as SidebarMenuSubButton, s as SidebarMenuSubItem, t as SidebarProvider, u as SidebarRail, v as SidebarSeparator, w as SidebarTrigger, T as Tooltip, x as TooltipContent, y as TooltipProvider, z as TooltipTrigger, A as useSidebar } from './sidebar-BLL2tgTt.js';
|
|
37
37
|
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
38
38
|
import { ToasterProps } from 'sonner';
|
|
39
39
|
export { toast } from 'sonner';
|
|
@@ -42,8 +42,8 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
|
42
42
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
43
43
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
44
44
|
import '@tanstack/react-table';
|
|
45
|
-
import './types-
|
|
46
|
-
import './json-viewer-
|
|
45
|
+
import './types-1LUmNJf_.js';
|
|
46
|
+
import './json-viewer-Bssv9mTD.js';
|
|
47
47
|
import '@radix-ui/react-slot';
|
|
48
48
|
import '@radix-ui/react-separator';
|
|
49
49
|
import '@radix-ui/react-tooltip';
|
|
@@ -82,6 +82,9 @@ declare const AccordionItem: React$1.ForwardRefExoticComponent<Omit<AccordionPri
|
|
|
82
82
|
declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & SlotNameProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
83
83
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & SlotNameProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
84
84
|
|
|
85
|
+
type AkiraMarkProps = React$1.SVGProps<SVGSVGElement>;
|
|
86
|
+
declare function AkiraMark({ slotName, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }: AkiraMarkProps & SlotNameProps): React$1.JSX.Element;
|
|
87
|
+
|
|
85
88
|
declare function AlertDialog({ slotName, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Root> & SlotNameProps): React$1.JSX.Element;
|
|
86
89
|
declare function AlertDialogTrigger({ slotName, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Trigger> & SlotNameProps): React$1.JSX.Element;
|
|
87
90
|
declare function AlertDialogPortal({ slotName, ...props }: React$1.ComponentProps<typeof AlertDialog$1.Portal> & SlotNameProps): React$1.JSX.Element;
|
|
@@ -318,7 +321,7 @@ declare function FloatingSheet({ open, onOpenChange, title, description, persist
|
|
|
318
321
|
description?: React$1.ReactNode;
|
|
319
322
|
persistent?: boolean;
|
|
320
323
|
} & SlotNameProps): React$1.ReactPortal | null;
|
|
321
|
-
declare function FloatingSheetBody({ className, slotName, ...props }: React$1.ComponentProps<'div'> & SlotNameProps): React$1.JSX.Element;
|
|
324
|
+
declare function FloatingSheetBody({ className, slotName, children, ...props }: React$1.ComponentProps<'div'> & SlotNameProps): React$1.JSX.Element;
|
|
322
325
|
declare function FloatingSheetFooter({ className, slotName, ...props }: React$1.ComponentProps<'div'> & SlotNameProps): React$1.JSX.Element;
|
|
323
326
|
|
|
324
327
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React$1.JSX.Element;
|
|
@@ -539,4 +542,4 @@ declare function Toggle({ className, variant, size, slotName, ...props }: React$
|
|
|
539
542
|
declare function ToggleGroup({ className, variant, size, children, slotName, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleVariants> & SlotNameProps): React$1.JSX.Element;
|
|
540
543
|
declare function ToggleGroupItem({ className, children, variant, size, slotName, ...props }: React$1.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleVariants> & SlotNameProps): React$1.JSX.Element;
|
|
541
544
|
|
|
542
|
-
export { AUTOSAVE_DELAY, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, type AutosaveStatus, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateLabels, type EmptyStateProps, FieldError, FloatingSheet, FloatingSheetBody, FloatingSheetFooter, FloatingSheetLabels, FloatingSheetStack, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Icon, IconComponent, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PlaceholderPattern, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, SlotNameProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextLink, type TextLinkProps, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type UseAutosaveOptions, type UseAutosaveResult, type UseConfirmDialogOptions, badgeVariants, cardVariants, cn, emptyStateLabels, navigationMenuTriggerStyle, spinnerVariants, statusBadgeVariants, textLinkVariants, toggleVariants, useAutosave, useConfirmDialog, useFormField };
|
|
545
|
+
export { AUTOSAVE_DELAY, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AkiraMark, type AkiraMarkProps, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AspectRatio, type AutosaveStatus, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateLabels, type EmptyStateProps, FieldError, FloatingSheet, FloatingSheetBody, FloatingSheetFooter, FloatingSheetLabels, FloatingSheetStack, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, HoverCardTrigger, Icon, IconComponent, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PlaceholderPattern, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, SlotNameProps, Spinner, type SpinnerProps, StatusBadge, type StatusBadgeProps, type StatusBadgeStatus, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextLink, type TextLinkProps, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, type UseAutosaveOptions, type UseAutosaveResult, type UseConfirmDialogOptions, badgeVariants, cardVariants, cn, emptyStateLabels, navigationMenuTriggerStyle, spinnerVariants, statusBadgeVariants, textLinkVariants, toggleVariants, useAutosave, useConfirmDialog, useFormField };
|