@pixpilot/shadcn 0.1.7 → 0.1.9
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/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.d.cts +30 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.js +1 -0
- package/dist/components/ui/OrContinueWithSeparator.cjs +1 -0
- package/dist/components/ui/OrContinueWithSeparator.d.cts +11 -0
- package/dist/components/ui/OrContinueWithSeparator.d.ts +11 -0
- package/dist/components/ui/OrContinueWithSeparator.js +1 -0
- package/dist/components/ui/alert-dialog.cjs +1 -0
- package/dist/components/ui/alert-dialog.d.cts +48 -0
- package/dist/components/ui/alert-dialog.d.ts +48 -0
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert.cjs +1 -0
- package/dist/components/ui/alert.d.cts +24 -0
- package/dist/components/ui/alert.d.ts +24 -0
- package/dist/components/ui/alert.js +1 -0
- package/dist/components/ui/avatar.cjs +1 -0
- package/dist/components/ui/avatar.d.cts +19 -0
- package/dist/components/ui/avatar.d.ts +19 -0
- package/dist/components/ui/avatar.js +1 -0
- package/dist/components/ui/badge.cjs +1 -0
- package/dist/components/ui/badge.d.cts +19 -0
- package/dist/components/ui/badge.d.ts +19 -0
- package/dist/components/ui/badge.js +1 -0
- package/dist/components/ui/button.cjs +1 -0
- package/dist/components/ui/button.d.cts +21 -0
- package/dist/components/ui/button.d.ts +21 -0
- package/dist/components/ui/button.js +1 -0
- package/dist/components/ui/calendar.cjs +1 -0
- package/dist/components/ui/calendar.d.cts +26 -0
- package/dist/components/ui/calendar.d.ts +26 -0
- package/dist/components/ui/calendar.js +1 -0
- package/dist/components/ui/card.cjs +1 -0
- package/dist/components/ui/card.d.cts +34 -0
- package/dist/components/ui/card.d.ts +34 -0
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/checkbox.cjs +1 -0
- package/dist/components/ui/checkbox.d.cts +11 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/checkbox.js +1 -0
- package/dist/components/ui/command.cjs +1 -0
- package/dist/components/ui/command.d.cts +52 -0
- package/dist/components/ui/command.d.ts +52 -0
- package/dist/components/ui/command.js +1 -0
- package/dist/components/ui/dialog.cjs +1 -0
- package/dist/components/ui/dialog.d.cts +47 -0
- package/dist/components/ui/dialog.d.ts +47 -0
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/dropdown-menu.cjs +1 -0
- package/dist/components/ui/dropdown-menu.d.cts +77 -0
- package/dist/components/ui/dropdown-menu.d.ts +77 -0
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/file-upload.cjs +1 -0
- package/dist/components/ui/file-upload.d.cts +94 -0
- package/dist/components/ui/file-upload.d.ts +94 -0
- package/dist/components/ui/file-upload.js +1 -0
- package/dist/components/ui/form.cjs +1 -0
- package/dist/components/ui/form.d.cts +45 -0
- package/dist/components/ui/form.d.ts +45 -0
- package/dist/components/ui/form.js +1 -0
- package/dist/components/ui/index.cjs +1 -0
- package/dist/components/ui/index.d.cts +29 -0
- package/dist/components/ui/index.d.ts +29 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/input.cjs +1 -0
- package/dist/components/ui/input.d.cts +11 -0
- package/dist/components/ui/input.d.ts +11 -0
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/label.cjs +1 -0
- package/dist/components/ui/label.d.cts +11 -0
- package/dist/components/ui/label.d.ts +11 -0
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/pagination.cjs +1 -0
- package/dist/components/ui/pagination.d.cts +40 -0
- package/dist/components/ui/pagination.d.ts +39 -0
- package/dist/components/ui/pagination.js +1 -0
- package/dist/components/ui/popover.cjs +1 -0
- package/dist/components/ui/popover.d.cts +22 -0
- package/dist/components/ui/popover.d.ts +22 -0
- package/dist/components/ui/popover.js +1 -0
- package/dist/components/ui/radio-group.cjs +1 -0
- package/dist/components/ui/radio-group.d.cts +15 -0
- package/dist/components/ui/radio-group.d.ts +15 -0
- package/dist/components/ui/radio-group.js +1 -0
- package/dist/components/ui/select.cjs +1 -0
- package/dist/components/ui/select.d.cts +52 -0
- package/dist/components/ui/select.d.ts +52 -0
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/separator.cjs +1 -0
- package/dist/components/ui/separator.d.cts +13 -0
- package/dist/components/ui/separator.d.ts +13 -0
- package/dist/components/ui/separator.js +1 -0
- package/dist/components/ui/shadcn-io/tags/index.cjs +1 -0
- package/dist/components/ui/shadcn-io/tags/index.d.cts +70 -0
- package/dist/components/ui/shadcn-io/tags/index.d.ts +70 -0
- package/dist/components/ui/shadcn-io/tags/index.js +1 -0
- package/dist/components/ui/shadcn-io/tags-input-inline/index.cjs +1 -0
- package/dist/components/ui/shadcn-io/tags-input-inline/index.d.cts +31 -0
- package/dist/components/ui/shadcn-io/tags-input-inline/index.d.ts +31 -0
- package/dist/components/ui/shadcn-io/tags-input-inline/index.js +1 -0
- package/dist/components/ui/sheet.cjs +1 -0
- package/dist/components/ui/sheet.d.cts +40 -0
- package/dist/components/ui/sheet.d.ts +40 -0
- package/dist/components/ui/sheet.js +1 -0
- package/dist/components/ui/slider.cjs +1 -0
- package/dist/components/ui/slider.d.cts +15 -0
- package/dist/components/ui/slider.d.ts +15 -0
- package/dist/components/ui/slider.js +1 -0
- package/dist/components/ui/switch.cjs +1 -0
- package/dist/components/ui/switch.d.cts +11 -0
- package/dist/components/ui/switch.d.ts +11 -0
- package/dist/components/ui/switch.js +1 -0
- package/dist/components/ui/tabs.cjs +1 -0
- package/dist/components/ui/tabs.d.cts +23 -0
- package/dist/components/ui/tabs.d.ts +23 -0
- package/dist/components/ui/tabs.js +1 -0
- package/dist/components/ui/textarea.cjs +1 -0
- package/dist/components/ui/textarea.d.cts +10 -0
- package/dist/components/ui/textarea.d.ts +10 -0
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/tooltip.cjs +1 -0
- package/dist/components/ui/tooltip.d.cts +23 -0
- package/dist/components/ui/tooltip.d.ts +23 -0
- package/dist/components/ui/tooltip.js +1 -0
- package/dist/dist/components/ui/OrContinueWithSeparator.d.cts +1 -0
- package/dist/dist/components/ui/alert-dialog.d.cts +3 -0
- package/dist/dist/components/ui/alert.d.cts +3 -0
- package/dist/dist/components/ui/avatar.d.cts +3 -0
- package/dist/dist/components/ui/badge.d.cts +3 -0
- package/dist/dist/components/ui/button.d.cts +23 -0
- package/dist/dist/components/ui/calendar.d.cts +4 -0
- package/dist/dist/components/ui/card.d.cts +2 -0
- package/dist/dist/components/ui/checkbox.d.cts +3 -0
- package/dist/dist/components/ui/command.d.cts +4 -0
- package/dist/dist/components/ui/dialog.d.cts +3 -0
- package/dist/dist/components/ui/dropdown-menu.d.cts +3 -0
- package/dist/dist/components/ui/file-upload.d.cts +2 -0
- package/dist/dist/components/ui/form.d.cts +5 -0
- package/dist/dist/components/ui/input.d.cts +2 -0
- package/dist/dist/components/ui/label.d.cts +3 -0
- package/dist/dist/components/ui/pagination.d.cts +3 -0
- package/dist/dist/components/ui/popover.d.cts +3 -0
- package/dist/dist/components/ui/radio-group.d.cts +3 -0
- package/dist/dist/components/ui/select.d.cts +3 -0
- package/dist/dist/components/ui/separator.d.cts +3 -0
- package/dist/dist/components/ui/shadcn-io/tags/index.d.cts +6 -0
- package/dist/dist/components/ui/shadcn-io/tags-input-inline/index.d.cts +2 -0
- package/dist/dist/components/ui/sheet.d.cts +3 -0
- package/dist/dist/components/ui/slider.d.cts +3 -0
- package/dist/dist/components/ui/switch.d.cts +3 -0
- package/dist/dist/components/ui/tabs.d.cts +3 -0
- package/dist/dist/components/ui/textarea.d.cts +2 -0
- package/dist/dist/components/ui/tooltip.d.cts +3 -0
- package/dist/dist/index.d.cts +30 -0
- package/dist/dist/lib/utils.d.cts +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +33 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +1 -2278
- package/dist/lib/index.cjs +1 -0
- package/dist/lib/index.d.cts +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/utils.cjs +1 -0
- package/dist/lib/utils.d.cts +6 -0
- package/dist/lib/utils.d.ts +6 -0
- package/dist/lib/utils.js +1 -0
- package/package.json +8 -4
- package/dist/index-ZnekuREv.d.ts +0 -795
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime47 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ui/file-upload.d.ts
|
|
5
|
+
type Direction = 'ltr' | 'rtl';
|
|
6
|
+
interface FileState {
|
|
7
|
+
file: File;
|
|
8
|
+
progress: number;
|
|
9
|
+
error?: string;
|
|
10
|
+
status: 'idle' | 'uploading' | 'error' | 'success';
|
|
11
|
+
}
|
|
12
|
+
interface StoreState {
|
|
13
|
+
files: Map<File, FileState>;
|
|
14
|
+
dragOver: boolean;
|
|
15
|
+
invalid: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare function useStore<T>(selector: (state: StoreState) => T): T;
|
|
18
|
+
interface FileUploadRootProps extends Omit<React.ComponentProps<'div'>, 'defaultValue' | 'onChange'> {
|
|
19
|
+
value?: File[];
|
|
20
|
+
defaultValue?: File[];
|
|
21
|
+
onValueChange?: (files: File[]) => void;
|
|
22
|
+
onAccept?: (files: File[]) => void;
|
|
23
|
+
onFileAccept?: (file: File) => void;
|
|
24
|
+
onFileReject?: (file: File, message: string) => void;
|
|
25
|
+
onFilesReject?: (files: Array<{
|
|
26
|
+
file: File;
|
|
27
|
+
message: string;
|
|
28
|
+
}>) => void;
|
|
29
|
+
onFileValidate?: (file: File) => string | null | undefined;
|
|
30
|
+
onUpload?: (files: File[], options: {
|
|
31
|
+
onProgress: (file: File, progress: number) => void;
|
|
32
|
+
onSuccess: (file: File) => void;
|
|
33
|
+
onError: (file: File, error: Error) => void;
|
|
34
|
+
}) => Promise<void> | void;
|
|
35
|
+
accept?: string;
|
|
36
|
+
maxFiles?: number;
|
|
37
|
+
maxSize?: number;
|
|
38
|
+
dir?: Direction;
|
|
39
|
+
label?: string;
|
|
40
|
+
name?: string;
|
|
41
|
+
asChild?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
invalid?: boolean;
|
|
44
|
+
multiple?: boolean;
|
|
45
|
+
required?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare function FileUploadRoot(props: FileUploadRootProps): react_jsx_runtime47.JSX.Element;
|
|
48
|
+
interface FileUploadDropzoneProps extends React.ComponentProps<'div'> {
|
|
49
|
+
asChild?: boolean;
|
|
50
|
+
}
|
|
51
|
+
declare function FileUploadDropzone(props: FileUploadDropzoneProps): react_jsx_runtime47.JSX.Element;
|
|
52
|
+
interface FileUploadTriggerProps extends React.ComponentProps<'button'> {
|
|
53
|
+
asChild?: boolean;
|
|
54
|
+
}
|
|
55
|
+
declare function FileUploadTrigger(props: FileUploadTriggerProps): react_jsx_runtime47.JSX.Element;
|
|
56
|
+
interface FileUploadListProps extends React.ComponentProps<'div'> {
|
|
57
|
+
orientation?: 'horizontal' | 'vertical';
|
|
58
|
+
asChild?: boolean;
|
|
59
|
+
forceMount?: boolean;
|
|
60
|
+
}
|
|
61
|
+
declare function FileUploadList(props: FileUploadListProps): react_jsx_runtime47.JSX.Element | null;
|
|
62
|
+
interface FileUploadItemProps extends React.ComponentProps<'div'> {
|
|
63
|
+
value: File;
|
|
64
|
+
asChild?: boolean;
|
|
65
|
+
}
|
|
66
|
+
declare function FileUploadItem(props: FileUploadItemProps): react_jsx_runtime47.JSX.Element | null;
|
|
67
|
+
interface FileUploadItemPreviewProps extends React.ComponentProps<'div'> {
|
|
68
|
+
render?: (file: File, fallback: () => React.ReactNode) => React.ReactNode;
|
|
69
|
+
asChild?: boolean;
|
|
70
|
+
}
|
|
71
|
+
declare function FileUploadItemPreview(props: FileUploadItemPreviewProps): react_jsx_runtime47.JSX.Element | null;
|
|
72
|
+
interface FileUploadItemMetadataProps extends React.ComponentProps<'div'> {
|
|
73
|
+
asChild?: boolean;
|
|
74
|
+
size?: 'default' | 'sm';
|
|
75
|
+
}
|
|
76
|
+
declare function FileUploadItemMetadata(props: FileUploadItemMetadataProps): react_jsx_runtime47.JSX.Element | null;
|
|
77
|
+
interface FileUploadItemProgressProps extends React.ComponentProps<'div'> {
|
|
78
|
+
variant?: 'linear' | 'circular' | 'fill';
|
|
79
|
+
size?: number;
|
|
80
|
+
asChild?: boolean;
|
|
81
|
+
forceMount?: boolean;
|
|
82
|
+
}
|
|
83
|
+
declare function FileUploadItemProgress(props: FileUploadItemProgressProps): react_jsx_runtime47.JSX.Element | null;
|
|
84
|
+
interface FileUploadItemDeleteProps extends React.ComponentProps<'button'> {
|
|
85
|
+
asChild?: boolean;
|
|
86
|
+
}
|
|
87
|
+
declare function FileUploadItemDelete(props: FileUploadItemDeleteProps): react_jsx_runtime47.JSX.Element | null;
|
|
88
|
+
interface FileUploadClearProps extends React.ComponentProps<'button'> {
|
|
89
|
+
forceMount?: boolean;
|
|
90
|
+
asChild?: boolean;
|
|
91
|
+
}
|
|
92
|
+
declare function FileUploadClear(props: FileUploadClearProps): react_jsx_runtime47.JSX.Element | null;
|
|
93
|
+
//#endregion
|
|
94
|
+
export { FileUploadClear, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, FileUploadList, FileUploadRoot, FileUploadRootProps, FileUploadTrigger, useStore };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import*as t from"react";import{Fragment as n,jsx as r,jsxs as i}from"react/jsx-runtime";import{Slot as a}from"@radix-ui/react-slot";import{FileArchiveIcon as o,FileAudioIcon as s,FileCodeIcon as c,FileCogIcon as l,FileIcon as u,FileTextIcon as d,FileVideoIcon as f}from"lucide-react";import{useDirection as p}from"@radix-ui/react-direction";const m=`FileUpload`,h=`FileUploadDropzone`,g=`FileUploadItem`,_=`FileUploadItemPreview`,v=`FileUploadItemMetadata`,y=`FileUploadItemDelete`,b=`FileUploadClear`;function x(e){let n=t.useRef(null);return n.current===null&&(n.current=e()),n}function S(e,t,n,r,i){let a={files:t,dragOver:!1,invalid:r};function o(e,r){switch(r.type){case`ADD_FILES`:for(let e of r.files)t.set(e,{file:e,progress:0,status:`idle`});return i&&i(Array.from(t.values()).map(e=>e.file)),{...e,files:t};case`SET_FILES`:{let n=new Set(r.files);for(let e of t.keys())n.has(e)||t.delete(e);for(let e of r.files)t.get(e)||t.set(e,{file:e,progress:0,status:`idle`});return{...e,files:t}}case`SET_PROGRESS`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,progress:r.progress,status:`uploading`}),{...e,files:t}}case`SET_SUCCESS`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,progress:100,status:`success`}),{...e,files:t}}case`SET_ERROR`:{let n=t.get(r.file);return n&&t.set(r.file,{...n,error:r.error,status:`error`}),{...e,files:t}}case`REMOVE_FILE`:if(n){let e=n.get(r.file);e&&(URL.revokeObjectURL(e),n.delete(r.file))}return t.delete(r.file),i&&i(Array.from(t.values()).map(e=>e.file)),{...e,files:t};case`SET_DRAG_OVER`:return{...e,dragOver:r.dragOver};case`SET_INVALID`:return{...e,invalid:r.invalid};case`CLEAR`:if(n)for(let e of t.keys()){let t=n.get(e);t&&(URL.revokeObjectURL(t),n.delete(e))}return t.clear(),i&&i([]),{...e,files:t,invalid:!1};default:return e}}function s(){return a}function c(t){a=o(a,t);for(let t of e)t()}function l(t){return e.add(t),()=>e.delete(t)}return{getState:s,dispatch:c,subscribe:l}}const C=t.createContext(null);function w(e){let n=t.use(C);if(!n)throw Error(`\`${e}\` must be used within \`${m}\``);return n}function T(e){let n=w(`useStore`),r=x(()=>null),i=t.useCallback(()=>{let t=n.getState(),i=r.current;if(i&&i.state===t)return i.value;let a=e(t);return r.current={value:a,state:t},a},[n,e,r]);return t.useSyncExternalStore(n.subscribe,i,i)}const E=t.createContext(null);function D(e){let n=t.use(E);if(!n)throw Error(`\`${e}\` must be used within \`${m}\``);return n}function O(n){let{value:o,defaultValue:s,onValueChange:c,onAccept:l,onFileAccept:u,onFileReject:d,onFilesReject:f,onFileValidate:m,onUpload:h,accept:g,maxFiles:_,maxSize:v,dir:y,label:b,name:w,asChild:T,disabled:D=!1,invalid:O=!1,multiple:k=!1,required:A=!1,children:j,className:M,...N}=n,P=t.useId(),F=t.useId(),I=t.useId(),L=t.useId(),R=p(y),z=x(()=>new Set).current,B=x(()=>new Map).current,V=x(()=>new WeakMap).current,H=t.useRef(null),U=o!==void 0,W=t.useMemo(()=>S(z,B,V,O,c),[z,B,O,c,V]),G=t.useMemo(()=>g?.split(`,`).map(e=>e.trim())??null,[g]),K=x(()=>{let e=0;return(t,n)=>{e||=requestAnimationFrame(()=>{e=0,W.dispatch({type:`SET_PROGRESS`,file:t,progress:Math.min(Math.max(0,n),100)})})}}).current;t.useEffect(()=>{U?W.dispatch({type:`SET_FILES`,files:o}):s&&s.length>0&&!W.getState().files.size&&W.dispatch({type:`SET_FILES`,files:s})},[o,s,U,W]),t.useEffect(()=>()=>{for(let e of B.keys()){let t=V.get(e);t&&URL.revokeObjectURL(t)}},[B,V]);let q=t.useCallback(async e=>{try{for(let t of e)W.dispatch({type:`SET_PROGRESS`,file:t,progress:0});if(h)await h(e,{onProgress:K,onSuccess:e=>{W.dispatch({type:`SET_SUCCESS`,file:e})},onError:(e,t)=>{W.dispatch({type:`SET_ERROR`,file:e,error:t.message??`Upload failed`})}});else for(let t of e)W.dispatch({type:`SET_SUCCESS`,file:t})}catch(t){let n=t instanceof Error?t.message:`Upload failed`;for(let t of e)W.dispatch({type:`SET_ERROR`,file:t,error:n})}},[W,h,K]),J=t.useCallback(e=>{if(D)return;let t=[...e],n=!1,r=[];if(_){let e=W.getState().files.size,i=Math.max(0,_-e);if(i<t.length){let e=t.slice(i);n=!0,t=t.slice(0,i);for(let t of e){let e=`Maximum ${_} files allowed`;if(m){let n=m(t);n&&(e=n)}d?.(t,e),r.push({file:t,message:e})}}}let i=[],a=[];for(let e of t){let t=!1,r=``;if(m){let i=m(e);if(i){r=i,d?.(e,r),t=!0,n=!0;continue}}if(G){let i=e.type,a=`.${e.name.split(`.`).pop()}`;G.some(e=>e===i||e===a||e.includes(`/*`)&&i.startsWith(e.replace(`/*`,`/`)))||(r=`File type not accepted`,d?.(e,r),t=!0,n=!0)}v&&e.size>v&&(r=`File too large`,d?.(e,r),t=!0,n=!0),t?a.push({file:e,message:r}):i.push(e)}if(r.push(...a),n&&(W.dispatch({type:`SET_INVALID`,invalid:n}),setTimeout(()=>{W.dispatch({type:`SET_INVALID`,invalid:!1})},2e3)),r.length>0&&f?.(r),i.length>0){W.dispatch({type:`ADD_FILES`,files:i}),U&&c&&c([...Array.from(W.getState().files.values()).map(e=>e.file)]),l&&l(i);for(let e of i)u?.(e);h&&requestAnimationFrame(()=>{q(i)})}},[W,U,c,l,u,h,q,_,m,d,f,G,v,D]),Y=t.useCallback(e=>{J(Array.from(e.target.files??[])),e.target.value=``},[J]),X=t.useMemo(()=>({dropzoneId:F,inputId:P,listId:I,labelId:L,dir:R,disabled:D,inputRef:H,urlCache:V}),[F,P,I,L,R,D,V]),Z=T?a:`div`;return r(C.Provider,{value:W,children:r(E.Provider,{value:X,children:i(Z,{"data-disabled":D?``:void 0,"data-slot":`file-upload`,dir:R,...N,className:e(`relative flex flex-col gap-2`,M),children:[j,r(`input`,{type:`file`,id:P,"aria-labelledby":L,"aria-describedby":F,ref:H,tabIndex:-1,accept:g,name:w,className:`sr-only`,disabled:D,multiple:k,required:A,onChange:Y}),r(`span`,{id:L,className:`sr-only`,children:b??`File upload`})]})})})}function k(n){let{asChild:i,className:o,onClick:s,onDragOver:c,onDragEnter:l,onDragLeave:u,onDrop:d,onPaste:f,onKeyDown:p,...m}=n,g=D(h),_=w(h),v=T(e=>e.dragOver),y=T(e=>e.invalid),b=t.useCallback(e=>{if(s?.(e),e.defaultPrevented)return;let{target:t}=e;t instanceof HTMLElement&&t.closest(`[data-slot="file-upload-trigger"]`)||g.inputRef.current?.click()},[g.inputRef,s]),x=t.useCallback(e=>{c?.(e),!e.defaultPrevented&&(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!0}))},[_,c]),S=t.useCallback(e=>{l?.(e),!e.defaultPrevented&&(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!0}))},[_,l]),C=t.useCallback(e=>{if(u?.(e),e.defaultPrevented)return;let{relatedTarget:t}=e;t&&t instanceof Node&&e.currentTarget.contains(t)||(e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1}))},[_,u]),E=t.useCallback(e=>{if(d?.(e),e.defaultPrevented)return;e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1});let t=Array.from(e.dataTransfer.files),n=g.inputRef.current;if(!n)return;let r=new DataTransfer;for(let e of t)r.items.add(e);n.files=r.files,n.dispatchEvent(new Event(`change`,{bubbles:!0}))},[_,g.inputRef,d]),O=t.useCallback(e=>{if(f?.(e),e.defaultPrevented)return;e.preventDefault(),_.dispatch({type:`SET_DRAG_OVER`,dragOver:!1});let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r?.kind===`file`){let e=r.getAsFile();e&&n.push(e)}}if(n.length===0)return;let r=g.inputRef.current;if(!r)return;let i=new DataTransfer;for(let e of n)i.items.add(e);r.files=i.files,r.dispatchEvent(new Event(`change`,{bubbles:!0}))},[_,g.inputRef,f]),k=t.useCallback(e=>{p?.(e),!e.defaultPrevented&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g.inputRef.current?.click())},[g.inputRef,p]);return r(i?a:`div`,{role:`region`,id:g.dropzoneId,"aria-controls":`${g.inputId} ${g.listId}`,"aria-disabled":g.disabled,"aria-invalid":y,"data-disabled":g.disabled?``:void 0,"data-dragging":v?``:void 0,"data-invalid":y?``:void 0,"data-slot":`file-upload-dropzone`,dir:g.dir,tabIndex:g.disabled?void 0:0,...m,className:e(`relative flex select-none flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-6 outline-none transition-colors hover:bg-accent/30 focus-visible:border-ring/50 data-disabled:pointer-events-none data-dragging:border-primary/30 data-invalid:border-destructive data-dragging:bg-accent/30 data-invalid:ring-destructive/20`,o),onClick:b,onDragEnter:S,onDragLeave:C,onDragOver:x,onDrop:E,onKeyDown:k,onPaste:O})}function A(e){let{asChild:n,onClick:i,...o}=e,s=D(`FileUploadTrigger`),c=t.useCallback(e=>{i?.(e),!e.defaultPrevented&&s.inputRef.current?.click()},[s.inputRef,i]);return r(n?a:`button`,{type:`button`,"aria-controls":s.inputId,"data-disabled":s.disabled?``:void 0,"data-slot":`file-upload-trigger`,...o,disabled:s.disabled,onClick:c})}function j(t){let{className:n,orientation:i=`vertical`,asChild:o,forceMount:s,...c}=t,l=D(`FileUploadList`),u=T(e=>e.files.size),d=s||u>0;return d?r(o?a:`div`,{role:`list`,id:l.listId,"aria-orientation":i,"data-orientation":i,"data-slot":`file-upload-list`,"data-state":d?`active`:`inactive`,dir:l.dir,...c,className:e(`data-[state=inactive]:fade-out-0 data-[state=active]:fade-in-0 data-[state=inactive]:slide-out-to-top-2 data-[state=active]:slide-in-from-top-2 flex flex-col gap-2 data-[state=active]:animate-in data-[state=inactive]:animate-out`,i===`horizontal`&&`flex-row overflow-x-auto p-1.5`,n)}):null}const M=t.createContext(null);function N(e){let n=t.use(M);if(!n)throw Error(`\`${e}\` must be used within \`${g}\``);return n}function P(n){let{value:o,asChild:s,className:c,...l}=n,u=t.useId(),d=`${u}-status`,f=`${u}-name`,p=`${u}-size`,m=`${u}-message`,h=D(g),_=T(e=>e.files.get(o)),v=T(e=>e.files.size),y=T(e=>Array.from(e.files.keys()).indexOf(o)+1),b=t.useMemo(()=>({id:u,fileState:_,nameId:f,sizeId:p,statusId:d,messageId:m}),[u,_,d,f,p,m]);if(!_)return null;let x=_.error?`Error: ${_.error}`:_.status===`uploading`?`Uploading: ${_.progress}% complete`:_.status===`success`?`Upload complete`:`Ready to upload`,S=s?a:`div`;return r(M.Provider,{value:b,children:i(S,{role:`listitem`,id:u,"aria-setsize":v,"aria-posinset":y,"aria-describedby":`${f} ${p} ${d} ${_.error?m:``}`,"aria-labelledby":f,"data-slot":`file-upload-item`,dir:h.dir,...l,className:e(`relative flex items-center rounded-md border p-3`,c),children:[n.children,r(`span`,{id:d,className:`sr-only`,children:x})]})})}function F(e){if(e===0)return`0 B`;let t=[`B`,`KB`,`MB`,`GB`,`TB`],n=Math.floor(Math.log(e)/Math.log(1024));return`${(e/1024**n).toFixed(n?1:0)} ${t[n]}`}function I(e){let{type:t}=e,n=e.name.split(`.`).pop()?.toLowerCase()??``;return t.startsWith(`video/`)?r(f,{}):t.startsWith(`audio/`)?r(s,{}):t.startsWith(`text/`)||[`txt`,`md`,`rtf`,`pdf`].includes(n)?r(d,{}):[`html`,`css`,`js`,`jsx`,`ts`,`tsx`,`json`,`xml`,`php`,`py`,`rb`,`java`,`c`,`cpp`,`cs`].includes(n)?r(c,{}):[`zip`,`rar`,`7z`,`tar`,`gz`,`bz2`].includes(n)?r(o,{}):[`exe`,`msi`,`app`,`apk`,`deb`,`rpm`].includes(n)||t.startsWith(`application/`)?r(l,{}):r(u,{})}function L(n){let{render:o,asChild:s,children:c,className:l,...u}=n,d=N(_),f=D(_),p=t.useCallback(e=>{if(d.fileState?.file.type.startsWith(`image/`)){let t=f.urlCache.get(e);return t||(t=URL.createObjectURL(e),f.urlCache.set(e,t)),r(`img`,{src:t,alt:e.name,className:`size-full object-cover`})}return I(e)},[d.fileState?.file.type,f.urlCache]),m=t.useCallback(async e=>o?o(e,()=>p(e)):p(e),[o,p]);return d.fileState?i(s?a:`div`,{"aria-labelledby":d.nameId,"data-slot":`file-upload-preview`,...u,className:e(`relative flex size-10 shrink-0 items-center justify-center overflow-hidden rounded border bg-accent/50 [&>svg]:size-10`,l),children:[m(d.fileState.file),c]}):null}function R(t){let{asChild:o,size:s=`default`,children:c,className:l,...u}=t,d=D(v),f=N(v);return f.fileState?r(o?a:`div`,{"data-slot":`file-upload-metadata`,dir:d.dir,...u,className:e(`flex min-w-0 flex-1 flex-col`,l),children:c??i(n,{children:[r(`span`,{id:f.nameId,className:e(`truncate font-medium text-sm`,s===`sm`&&`font-normal text-[13px] leading-snug`),children:f.fileState.file.name}),r(`span`,{id:f.sizeId,className:e(`truncate text-muted-foreground text-xs`,s===`sm`&&`text-[11px] leading-snug`),children:F(f.fileState.file.size)}),f.fileState.error&&r(`span`,{id:f.messageId,className:`text-destructive text-xs`,children:f.fileState.error})]})}):null}function z(t){let{variant:n=`linear`,size:o=40,asChild:s,forceMount:c,className:l,...u}=t,d=N(`FileUploadItemProgress`);if(!d.fileState||!(c||d.fileState.progress!==100))return null;let f=s?a:`div`;switch(n){case`circular`:{let t=2*Math.PI*((o-4)/2),n=t-d.fileState.progress/100*t;return r(f,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d.fileState.progress,"aria-valuetext":`${d.fileState.progress}%`,"aria-labelledby":d.nameId,"data-slot":`file-upload-progress`,...u,className:e(`-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-1/2`,l),children:i(`svg`,{className:`-rotate-90 transform`,width:o,height:o,viewBox:`0 0 ${o} ${o}`,fill:`none`,stroke:`currentColor`,children:[r(`circle`,{className:`text-primary/20`,strokeWidth:`2`,cx:o/2,cy:o/2,r:(o-4)/2}),r(`circle`,{className:`text-primary transition-[stroke-dashoffset] duration-300 ease-linear`,strokeWidth:`2`,strokeLinecap:`round`,strokeDasharray:t,strokeDashoffset:n,cx:o/2,cy:o/2,r:(o-4)/2})]})})}case`fill`:{let t=d.fileState.progress,n=100-t;return r(f,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t,"aria-valuetext":`${t}%`,"aria-labelledby":d.nameId,"data-slot":`file-upload-progress`,...u,className:e(`absolute inset-0 bg-primary/50 transition-[clip-path] duration-300 ease-linear`,l),style:{clipPath:`inset(${n}% 0% 0% 0%)`}})}default:return r(f,{role:`progressbar`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":d.fileState.progress,"aria-valuetext":`${d.fileState.progress}%`,"aria-labelledby":d.nameId,"data-slot":`file-upload-progress`,...u,className:e(`relative h-1.5 w-full overflow-hidden rounded-full bg-primary/20`,l),children:r(`div`,{className:`h-full w-full flex-1 bg-primary transition-transform duration-300 ease-linear`,style:{transform:`translateX(-${100-d.fileState.progress}%)`}})})}}function B(e){let{asChild:n,onClick:i,...o}=e,s=w(y),c=N(y),l=t.useCallback(e=>{i?.(e),!(!c.fileState||e.defaultPrevented)&&s.dispatch({type:`REMOVE_FILE`,file:c.fileState.file})},[s,c.fileState,i]);return c.fileState?r(n?a:`button`,{type:`button`,"aria-controls":c.id,"aria-describedby":c.nameId,"data-slot":`file-upload-item-delete`,...o,onClick:l}):null}function V(e){let{asChild:n,forceMount:i,disabled:o,onClick:s,...c}=e,l=D(b),u=w(b),d=T(e=>e.files.size),f=o||l.disabled,p=t.useCallback(e=>{s?.(e),!e.defaultPrevented&&u.dispatch({type:`CLEAR`})},[u,s]);return i||d>0?r(n?a:`button`,{type:`button`,"aria-controls":l.listId,"data-slot":`file-upload-clear`,"data-disabled":f?``:void 0,...c,disabled:f,onClick:p}):null}export{V as FileUploadClear,k as FileUploadDropzone,P as FileUploadItem,B as FileUploadItemDelete,R as FileUploadItemMetadata,L as FileUploadItemPreview,z as FileUploadItemProgress,j as FileUploadList,O as FileUploadRoot,A as FileUploadTrigger,T as useStore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);const n=require(`./label.cjs`);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`@radix-ui/react-slot`);a=e.__toESM(a);let o=require(`react-hook-form`);o=e.__toESM(o);const s=o.FormProvider,c=r.createContext({});function l({...e}){return(0,i.jsx)(c,{value:{name:e.name},children:(0,i.jsx)(o.Controller,{...e})})}function u(){let e=r.use(c),t=r.use(d),{getFieldState:n}=(0,o.useFormContext)(),i=(0,o.useFormState)({name:e.name}),a=n(e.name,i);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}}const d=r.createContext({});function f({className:e,...n}){return(0,i.jsx)(d,{value:{id:r.useId()},children:(0,i.jsx)(`div`,{"data-slot":`form-item`,className:t.cn(`grid gap-2`,e),...n})})}function p({className:e,...r}){let{error:a,formItemId:o}=u();return(0,i.jsx)(n.Label,{"data-slot":`form-label`,"data-error":!!a,className:t.cn(`data-[error=true]:text-destructive`,e),htmlFor:o,...r})}function m({...e}){let{error:t,formItemId:n,formDescriptionId:r,formMessageId:o}=u();return(0,i.jsx)(a.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${o}`:`${r}`,"aria-invalid":!!t,...e})}function h({className:e,...n}){let{formDescriptionId:r}=u();return(0,i.jsx)(`p`,{"data-slot":`form-description`,id:r,className:t.cn(`text-muted-foreground text-sm`,e),...n})}function g({className:e,...n}){let{error:r,formMessageId:a}=u(),o=r?String(r?.message??``):n.children;return o?(0,i.jsx)(`p`,{"data-slot":`form-message`,id:a,className:t.cn(`text-destructive text-sm`,e),...n,children:o}):null}exports.Form=s,exports.FormControl=m,exports.FormDescription=h,exports.FormField=l,exports.FormItem=f,exports.FormLabel=p,exports.FormMessage=g,exports.useFormField=u;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as react_jsx_runtime73 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as react_hook_form0 from "react-hook-form";
|
|
4
|
+
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
5
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ui/form.d.ts
|
|
9
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
10
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
11
|
+
...props
|
|
12
|
+
}: ControllerProps<TFieldValues, TName>): react_jsx_runtime73.JSX.Element;
|
|
13
|
+
declare function useFormField(): {
|
|
14
|
+
invalid: boolean;
|
|
15
|
+
isDirty: boolean;
|
|
16
|
+
isTouched: boolean;
|
|
17
|
+
isValidating: boolean;
|
|
18
|
+
error?: react_hook_form0.FieldError;
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
formItemId: string;
|
|
22
|
+
formDescriptionId: string;
|
|
23
|
+
formMessageId: string;
|
|
24
|
+
};
|
|
25
|
+
declare function FormItem({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime73.JSX.Element;
|
|
29
|
+
declare function FormLabel({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime73.JSX.Element;
|
|
33
|
+
declare function FormControl({
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof Slot>): react_jsx_runtime73.JSX.Element;
|
|
36
|
+
declare function FormDescription({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime73.JSX.Element;
|
|
40
|
+
declare function FormMessage({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime73.JSX.Element | null;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime57 from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import * as react_hook_form0 from "react-hook-form";
|
|
5
|
+
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
6
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
7
|
+
|
|
8
|
+
//#region src/components/ui/form.d.ts
|
|
9
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
10
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
11
|
+
...props
|
|
12
|
+
}: ControllerProps<TFieldValues, TName>): react_jsx_runtime57.JSX.Element;
|
|
13
|
+
declare function useFormField(): {
|
|
14
|
+
invalid: boolean;
|
|
15
|
+
isDirty: boolean;
|
|
16
|
+
isTouched: boolean;
|
|
17
|
+
isValidating: boolean;
|
|
18
|
+
error?: react_hook_form0.FieldError;
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
formItemId: string;
|
|
22
|
+
formDescriptionId: string;
|
|
23
|
+
formMessageId: string;
|
|
24
|
+
};
|
|
25
|
+
declare function FormItem({
|
|
26
|
+
className,
|
|
27
|
+
...props
|
|
28
|
+
}: React.ComponentProps<'div'>): react_jsx_runtime57.JSX.Element;
|
|
29
|
+
declare function FormLabel({
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime57.JSX.Element;
|
|
33
|
+
declare function FormControl({
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<typeof Slot>): react_jsx_runtime57.JSX.Element;
|
|
36
|
+
declare function FormDescription({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime57.JSX.Element;
|
|
40
|
+
declare function FormMessage({
|
|
41
|
+
className,
|
|
42
|
+
...props
|
|
43
|
+
}: React.ComponentProps<'p'>): react_jsx_runtime57.JSX.Element | null;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import{Label as t}from"./label.js";import*as n from"react";import{jsx as r}from"react/jsx-runtime";import{Slot as i}from"@radix-ui/react-slot";import{Controller as a,FormProvider as o,useFormContext as s,useFormState as c}from"react-hook-form";const l=o,u=n.createContext({});function d({...e}){return r(u,{value:{name:e.name},children:r(a,{...e})})}function f(){let e=n.use(u),t=n.use(p),{getFieldState:r}=s(),i=c({name:e.name}),a=r(e.name,i);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:o}=t;return{id:o,name:e.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}}const p=n.createContext({});function m({className:t,...i}){return r(p,{value:{id:n.useId()},children:r(`div`,{"data-slot":`form-item`,className:e(`grid gap-2`,t),...i})})}function h({className:n,...i}){let{error:a,formItemId:o}=f();return r(t,{"data-slot":`form-label`,"data-error":!!a,className:e(`data-[error=true]:text-destructive`,n),htmlFor:o,...i})}function g({...e}){let{error:t,formItemId:n,formDescriptionId:a,formMessageId:o}=f();return r(i,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${a} ${o}`:`${a}`,"aria-invalid":!!t,...e})}function _({className:t,...n}){let{formDescriptionId:i}=f();return r(`p`,{"data-slot":`form-description`,id:i,className:e(`text-muted-foreground text-sm`,t),...n})}function v({className:t,...n}){let{error:i,formMessageId:a}=f(),o=i?String(i?.message??``):n.children;return o?r(`p`,{"data-slot":`form-message`,id:a,className:e(`text-destructive text-sm`,t),...n,children:o}):null}export{l as Form,g as FormControl,_ as FormDescription,d as FormField,m as FormItem,h as FormLabel,v as FormMessage,f as useFormField};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./alert.cjs`),t=require(`./alert-dialog.cjs`),n=require(`./avatar.cjs`),r=require(`./badge.cjs`),i=require(`./button.cjs`),a=require(`./calendar.cjs`),o=require(`./card.cjs`),s=require(`./checkbox.cjs`),c=require(`./dialog.cjs`),l=require(`./command.cjs`),u=require(`./dropdown-menu.cjs`),d=require(`./file-upload.cjs`),f=require(`./label.cjs`),p=require(`./form.cjs`),m=require(`./input.cjs`),h=require(`./separator.cjs`),g=require(`./OrContinueWithSeparator.cjs`),_=require(`./pagination.cjs`),v=require(`./popover.cjs`),y=require(`./radio-group.cjs`),b=require(`./select.cjs`),x=require(`./shadcn-io/tags/index.cjs`),S=require(`./shadcn-io/tags-input-inline/index.cjs`),C=require(`./sheet.cjs`),w=require(`./slider.cjs`),T=require(`./switch.cjs`),E=require(`./tabs.cjs`),D=require(`./textarea.cjs`),O=require(`./tooltip.cjs`);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Alert, AlertDescription, AlertTitle } from "./alert.cjs";
|
|
2
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./alert-dialog.cjs";
|
|
3
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.cjs";
|
|
4
|
+
import { Badge, badgeVariants } from "./badge.cjs";
|
|
5
|
+
import { Button, buttonVariants } from "./button.cjs";
|
|
6
|
+
import { Calendar, CalendarDayButton } from "./calendar.cjs";
|
|
7
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.cjs";
|
|
8
|
+
import { Checkbox } from "./checkbox.cjs";
|
|
9
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.cjs";
|
|
10
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./command.cjs";
|
|
11
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.cjs";
|
|
12
|
+
import { FileUploadClear, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, FileUploadList, FileUploadRoot, FileUploadRootProps, FileUploadTrigger, useStore } from "./file-upload.cjs";
|
|
13
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./form.cjs";
|
|
14
|
+
import { Input } from "./input.cjs";
|
|
15
|
+
import { Label } from "./label.cjs";
|
|
16
|
+
import { OrContinueWithSeparator } from "./OrContinueWithSeparator.cjs";
|
|
17
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./pagination.cjs";
|
|
18
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.cjs";
|
|
19
|
+
import { RadioGroup, RadioGroupItem } from "./radio-group.cjs";
|
|
20
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.cjs";
|
|
21
|
+
import { Separator } from "./separator.cjs";
|
|
22
|
+
import { Tags, TagsContent, TagsContentProps, TagsEmpty, TagsEmptyProps, TagsGroup, TagsGroupProps, TagsInput, TagsInputProps, TagsItem, TagsItemProps, TagsList, TagsListProps, TagsProps, TagsTrigger, TagsTriggerProps, TagsValue, TagsValueProps } from "./shadcn-io/tags/index.cjs";
|
|
23
|
+
import { TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot } from "./shadcn-io/tags-input-inline/index.cjs";
|
|
24
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./sheet.cjs";
|
|
25
|
+
import { Slider } from "./slider.cjs";
|
|
26
|
+
import { Switch } from "./switch.cjs";
|
|
27
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.cjs";
|
|
28
|
+
import { Textarea } from "./textarea.cjs";
|
|
29
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.cjs";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Alert, AlertDescription, AlertTitle } from "./alert.js";
|
|
2
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./alert-dialog.js";
|
|
3
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
|
|
4
|
+
import { Badge, badgeVariants } from "./badge.js";
|
|
5
|
+
import { Button, buttonVariants } from "./button.js";
|
|
6
|
+
import { Calendar, CalendarDayButton } from "./calendar.js";
|
|
7
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./card.js";
|
|
8
|
+
import { Checkbox } from "./checkbox.js";
|
|
9
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js";
|
|
10
|
+
import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut } from "./command.js";
|
|
11
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
12
|
+
import { FileUploadClear, FileUploadDropzone, FileUploadItem, FileUploadItemDelete, FileUploadItemMetadata, FileUploadItemPreview, FileUploadItemProgress, FileUploadList, FileUploadRoot, FileUploadRootProps, FileUploadTrigger, useStore } from "./file-upload.js";
|
|
13
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./form.js";
|
|
14
|
+
import { Input } from "./input.js";
|
|
15
|
+
import { Label } from "./label.js";
|
|
16
|
+
import { OrContinueWithSeparator } from "./OrContinueWithSeparator.js";
|
|
17
|
+
import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious } from "./pagination.js";
|
|
18
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
19
|
+
import { RadioGroup, RadioGroupItem } from "./radio-group.js";
|
|
20
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
21
|
+
import { Separator } from "./separator.js";
|
|
22
|
+
import { Tags, TagsContent, TagsContentProps, TagsEmpty, TagsEmptyProps, TagsGroup, TagsGroupProps, TagsInput, TagsInputProps, TagsItem, TagsItemProps, TagsList, TagsListProps, TagsProps, TagsTrigger, TagsTriggerProps, TagsValue, TagsValueProps } from "./shadcn-io/tags/index.js";
|
|
23
|
+
import { TagsInputInLineClear, TagsInputInLineInput, TagsInputInLineItem, TagsInputInLineLabel, TagsInputInLineList, TagsInputInLineRoot } from "./shadcn-io/tags-input-inline/index.js";
|
|
24
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
25
|
+
import { Slider } from "./slider.js";
|
|
26
|
+
import { Switch } from "./switch.js";
|
|
27
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
28
|
+
import { Textarea } from "./textarea.js";
|
|
29
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Alert as e,AlertDescription as t,AlertTitle as n}from"./alert.js";import{AlertDialog as r,AlertDialogAction as i,AlertDialogCancel as a,AlertDialogContent as o,AlertDialogDescription as s,AlertDialogFooter as c,AlertDialogHeader as l,AlertDialogOverlay as u,AlertDialogPortal as d,AlertDialogTitle as f,AlertDialogTrigger as p}from"./alert-dialog.js";import{Avatar as m,AvatarFallback as h,AvatarImage as g}from"./avatar.js";import{Badge as _,badgeVariants as v}from"./badge.js";import{Button as y,buttonVariants as b}from"./button.js";import{Calendar as x,CalendarDayButton as S}from"./calendar.js";import{Card as C,CardAction as w,CardContent as T,CardDescription as E,CardFooter as D,CardHeader as O,CardTitle as k}from"./card.js";import{Checkbox as A}from"./checkbox.js";import{Dialog as j,DialogClose as M,DialogContent as N,DialogDescription as P,DialogFooter as F,DialogHeader as I,DialogOverlay as L,DialogPortal as R,DialogTitle as z,DialogTrigger as B}from"./dialog.js";import{Command as V,CommandDialog as H,CommandEmpty as U,CommandGroup as W,CommandInput as G,CommandItem as K,CommandList as q,CommandSeparator as J,CommandShortcut as Y}from"./command.js";import{DropdownMenu as X,DropdownMenuCheckboxItem as Z,DropdownMenuContent as Q,DropdownMenuGroup as $,DropdownMenuItem as ee,DropdownMenuLabel as te,DropdownMenuPortal as ne,DropdownMenuRadioGroup as re,DropdownMenuRadioItem as ie,DropdownMenuSeparator as ae,DropdownMenuShortcut as oe,DropdownMenuSub as se,DropdownMenuSubContent as ce,DropdownMenuSubTrigger as le,DropdownMenuTrigger as ue}from"./dropdown-menu.js";import{FileUploadClear as de,FileUploadDropzone as fe,FileUploadItem as pe,FileUploadItemDelete as me,FileUploadItemMetadata as he,FileUploadItemPreview as ge,FileUploadItemProgress as _e,FileUploadList as ve,FileUploadRoot as ye,FileUploadTrigger as be,useStore as xe}from"./file-upload.js";import{Label as Se}from"./label.js";import{Form as Ce,FormControl as we,FormDescription as Te,FormField as Ee,FormItem as De,FormLabel as Oe,FormMessage as ke,useFormField as Ae}from"./form.js";import{Input as je}from"./input.js";import{Separator as Me}from"./separator.js";import{OrContinueWithSeparator as Ne}from"./OrContinueWithSeparator.js";import{Pagination as Pe,PaginationContent as Fe,PaginationEllipsis as Ie,PaginationItem as Le,PaginationLink as Re,PaginationNext as ze,PaginationPrevious as Be}from"./pagination.js";import{Popover as Ve,PopoverAnchor as He,PopoverContent as Ue,PopoverTrigger as We}from"./popover.js";import{RadioGroup as Ge,RadioGroupItem as Ke}from"./radio-group.js";import{Select as qe,SelectContent as Je,SelectGroup as Ye,SelectItem as Xe,SelectLabel as Ze,SelectScrollDownButton as Qe,SelectScrollUpButton as $e,SelectSeparator as et,SelectTrigger as tt,SelectValue as nt}from"./select.js";import{Tags as rt,TagsContent as it,TagsEmpty as at,TagsGroup as ot,TagsInput as st,TagsItem as ct,TagsList as lt,TagsTrigger as ut,TagsValue as dt}from"./shadcn-io/tags/index.js";import{TagsInputInLineClear as ft,TagsInputInLineInput as pt,TagsInputInLineItem as mt,TagsInputInLineLabel as ht,TagsInputInLineList as gt,TagsInputInLineRoot as _t}from"./shadcn-io/tags-input-inline/index.js";import{Sheet as vt,SheetClose as yt,SheetContent as bt,SheetDescription as xt,SheetFooter as St,SheetHeader as Ct,SheetTitle as wt,SheetTrigger as Tt}from"./sheet.js";import{Slider as Et}from"./slider.js";import{Switch as Dt}from"./switch.js";import{Tabs as Ot,TabsContent as kt,TabsList as At,TabsTrigger as jt}from"./tabs.js";import{Textarea as Mt}from"./textarea.js";import{Tooltip as Nt,TooltipContent as Pt,TooltipProvider as Ft,TooltipTrigger as It}from"./tooltip.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);function i({className:e,type:n,...i}){return(0,r.jsx)(`input`,{type:n,"data-slot":`input`,className:t.cn(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,e),...i})}exports.Input=i;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime72 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ui/input.d.ts
|
|
5
|
+
declare function Input({
|
|
6
|
+
className,
|
|
7
|
+
type,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<'input'>): react_jsx_runtime72.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime80 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/ui/input.d.ts
|
|
5
|
+
declare function Input({
|
|
6
|
+
className,
|
|
7
|
+
type,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<'input'>): react_jsx_runtime80.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import"react";import{jsx as t}from"react/jsx-runtime";function n({className:n,type:r,...i}){return t(`input`,{type:r,"data-slot":`input`,className:e(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,n),...i})}export{n as Input};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@radix-ui/react-label`);i=e.__toESM(i);function a({className:e,...n}){return(0,r.jsx)(i.Root,{"data-slot":`label`,className:t.cn(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...n})}exports.Label=a;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime84 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/label.d.ts
|
|
6
|
+
declare function Label({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime84.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Label };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime78 from "react/jsx-runtime";
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/label.d.ts
|
|
6
|
+
declare function Label({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime78.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Label };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import"react";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-label";function r({className:r,...i}){return t(n.Root,{"data-slot":`label`,className:e(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r),...i})}export{r as Label};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@pixpilot/shadcn`);i=e.__toESM(i);let a=require(`lucide-react`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:t.cn(`mx-auto flex w-full justify-center`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`ul`,{"data-slot":`pagination-content`,className:t.cn(`flex flex-row items-center gap-1`,e),...n})}function c({...e}){return(0,r.jsx)(`li`,{"data-slot":`pagination-item`,...e})}function l({className:e,isActive:n,size:a=`icon`,...o}){return(0,r.jsx)(`a`,{"aria-current":n?`page`:void 0,"data-slot":`pagination-link`,"data-active":n,className:t.cn((0,i.buttonVariants)({variant:n?`outline`:`ghost`,size:a}),e),...o})}function u({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to previous page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pl-2.5`,e),...n,children:[(0,r.jsx)(a.ChevronLeftIcon,{}),(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function d({className:e,...n}){return(0,r.jsxs)(l,{"aria-label":`Go to next page`,size:`default`,className:t.cn(`gap-1 px-2.5 sm:pr-2.5`,e),...n,children:[(0,r.jsx)(`span`,{className:`hidden sm:block`,children:`Next`}),(0,r.jsx)(a.ChevronRightIcon,{})]})}function f({className:e,...n}){return(0,r.jsxs)(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:t.cn(`flex size-9 items-center justify-center`,e),...n,children:[(0,r.jsx)(a.MoreHorizontalIcon,{className:`size-4`}),(0,r.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}exports.Pagination=o,exports.PaginationContent=s,exports.PaginationEllipsis=f,exports.PaginationItem=c,exports.PaginationLink=l,exports.PaginationNext=d,exports.PaginationPrevious=u;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Button } from "../../dist/components/ui/button.cjs";
|
|
2
|
+
import "../../dist/index.cjs";
|
|
3
|
+
import * as react_jsx_runtime85 from "react/jsx-runtime";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/ui/pagination.d.ts
|
|
7
|
+
declare function Pagination({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<'nav'>): react_jsx_runtime85.JSX.Element;
|
|
11
|
+
declare function PaginationContent({
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime85.JSX.Element;
|
|
15
|
+
declare function PaginationItem({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime85.JSX.Element;
|
|
18
|
+
type PaginationLinkProps = {
|
|
19
|
+
isActive?: boolean;
|
|
20
|
+
} & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
|
|
21
|
+
declare function PaginationLink({
|
|
22
|
+
className,
|
|
23
|
+
isActive,
|
|
24
|
+
size,
|
|
25
|
+
...props
|
|
26
|
+
}: PaginationLinkProps): react_jsx_runtime85.JSX.Element;
|
|
27
|
+
declare function PaginationPrevious({
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
}: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime85.JSX.Element;
|
|
31
|
+
declare function PaginationNext({
|
|
32
|
+
className,
|
|
33
|
+
...props
|
|
34
|
+
}: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime85.JSX.Element;
|
|
35
|
+
declare function PaginationEllipsis({
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
}: React.ComponentProps<'span'>): react_jsx_runtime85.JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime81 from "react/jsx-runtime";
|
|
3
|
+
import { Button } from "@pixpilot/shadcn";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/pagination.d.ts
|
|
6
|
+
declare function Pagination({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<'nav'>): react_jsx_runtime81.JSX.Element;
|
|
10
|
+
declare function PaginationContent({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<'ul'>): react_jsx_runtime81.JSX.Element;
|
|
14
|
+
declare function PaginationItem({
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<'li'>): react_jsx_runtime81.JSX.Element;
|
|
17
|
+
type PaginationLinkProps = {
|
|
18
|
+
isActive?: boolean;
|
|
19
|
+
} & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
|
|
20
|
+
declare function PaginationLink({
|
|
21
|
+
className,
|
|
22
|
+
isActive,
|
|
23
|
+
size,
|
|
24
|
+
...props
|
|
25
|
+
}: PaginationLinkProps): react_jsx_runtime81.JSX.Element;
|
|
26
|
+
declare function PaginationPrevious({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime81.JSX.Element;
|
|
30
|
+
declare function PaginationNext({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime81.JSX.Element;
|
|
34
|
+
declare function PaginationEllipsis({
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}: React.ComponentProps<'span'>): react_jsx_runtime81.JSX.Element;
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{buttonVariants as r}from"@pixpilot/shadcn";import{ChevronLeftIcon as i,ChevronRightIcon as a,MoreHorizontalIcon as o}from"lucide-react";function s({className:n,...r}){return t(`nav`,{role:`navigation`,"aria-label":`pagination`,"data-slot":`pagination`,className:e(`mx-auto flex w-full justify-center`,n),...r})}function c({className:n,...r}){return t(`ul`,{"data-slot":`pagination-content`,className:e(`flex flex-row items-center gap-1`,n),...r})}function l({...e}){return t(`li`,{"data-slot":`pagination-item`,...e})}function u({className:n,isActive:i,size:a=`icon`,...o}){return t(`a`,{"aria-current":i?`page`:void 0,"data-slot":`pagination-link`,"data-active":i,className:e(r({variant:i?`outline`:`ghost`,size:a}),n),...o})}function d({className:r,...a}){return n(u,{"aria-label":`Go to previous page`,size:`default`,className:e(`gap-1 px-2.5 sm:pl-2.5`,r),...a,children:[t(i,{}),t(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function f({className:r,...i}){return n(u,{"aria-label":`Go to next page`,size:`default`,className:e(`gap-1 px-2.5 sm:pr-2.5`,r),...i,children:[t(`span`,{className:`hidden sm:block`,children:`Next`}),t(a,{})]})}function p({className:r,...i}){return n(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:e(`flex size-9 items-center justify-center`,r),...i,children:[t(o,{className:`size-4`}),t(`span`,{className:`sr-only`,children:`More pages`})]})}export{s as Pagination,c as PaginationContent,p as PaginationEllipsis,l as PaginationItem,u as PaginationLink,f as PaginationNext,d as PaginationPrevious};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@radix-ui/react-popover`);i=e.__toESM(i);function a({...e}){return(0,r.jsx)(i.Root,{"data-slot":`popover`,...e})}function o({...e}){return(0,r.jsx)(i.Trigger,{"data-slot":`popover-trigger`,...e})}function s({className:e,align:n=`center`,sideOffset:a=4,...o}){return(0,r.jsx)(i.Portal,{children:(0,r.jsx)(i.Content,{"data-slot":`popover-content`,align:n,sideOffset:a,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,e),...o})})}function c({...e}){return(0,r.jsx)(i.Anchor,{"data-slot":`popover-anchor`,...e})}exports.Popover=a,exports.PopoverAnchor=c,exports.PopoverContent=s,exports.PopoverTrigger=o;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime80 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/popover.d.ts
|
|
6
|
+
declare function Popover({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime80.JSX.Element;
|
|
9
|
+
declare function PopoverTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime80.JSX.Element;
|
|
12
|
+
declare function PopoverContent({
|
|
13
|
+
className,
|
|
14
|
+
align,
|
|
15
|
+
sideOffset,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime80.JSX.Element;
|
|
18
|
+
declare function PopoverAnchor({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime80.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime88 from "react/jsx-runtime";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/popover.d.ts
|
|
6
|
+
declare function Popover({
|
|
7
|
+
...props
|
|
8
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>): react_jsx_runtime88.JSX.Element;
|
|
9
|
+
declare function PopoverTrigger({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>): react_jsx_runtime88.JSX.Element;
|
|
12
|
+
declare function PopoverContent({
|
|
13
|
+
className,
|
|
14
|
+
align,
|
|
15
|
+
sideOffset,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>): react_jsx_runtime88.JSX.Element;
|
|
18
|
+
declare function PopoverAnchor({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>): react_jsx_runtime88.JSX.Element;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import"react";import{jsx as t}from"react/jsx-runtime";import*as n from"@radix-ui/react-popover";function r({...e}){return t(n.Root,{"data-slot":`popover`,...e})}function i({...e}){return t(n.Trigger,{"data-slot":`popover-trigger`,...e})}function a({className:r,align:i=`center`,sideOffset:a=4,...o}){return t(n.Portal,{children:t(n.Content,{"data-slot":`popover-content`,align:i,sideOffset:a,className:e(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden`,r),...o})})}function o({...e}){return t(n.Anchor,{"data-slot":`popover-anchor`,...e})}export{r as Popover,o as PopoverAnchor,a as PopoverContent,i as PopoverTrigger};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`lucide-react`);i=e.__toESM(i);let a=require(`@radix-ui/react-radio-group`);a=e.__toESM(a);function o({className:e,...n}){return(0,r.jsx)(a.Root,{"data-slot":`radio-group`,className:t.cn(`grid gap-3`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(a.Item,{"data-slot":`radio-group-item`,className:t.cn(`border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,r.jsx)(a.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:(0,r.jsx)(i.CircleIcon,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}exports.RadioGroup=o,exports.RadioGroupItem=s;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime102 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/radio-group.d.ts
|
|
6
|
+
declare function RadioGroup({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime102.JSX.Element;
|
|
10
|
+
declare function RadioGroupItem({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime102.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime92 from "react/jsx-runtime";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
|
|
5
|
+
//#region src/components/ui/radio-group.d.ts
|
|
6
|
+
declare function RadioGroup({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime92.JSX.Element;
|
|
10
|
+
declare function RadioGroupItem({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime92.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../lib/utils.js";import"../../lib/index.js";import"react";import{jsx as t}from"react/jsx-runtime";import{CircleIcon as n}from"lucide-react";import*as r from"@radix-ui/react-radio-group";function i({className:n,...i}){return t(r.Root,{"data-slot":`radio-group`,className:e(`grid gap-3`,n),...i})}function a({className:i,...a}){return t(r.Item,{"data-slot":`radio-group-item`,className:e(`border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,i),...a,children:t(r.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:t(n,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}export{i as RadioGroup,a as RadioGroupItem};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../lib/utils.cjs`);require(`../../lib/index.cjs`);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`lucide-react`);i=e.__toESM(i);let a=require(`@radix-ui/react-select`);a=e.__toESM(a);function o({...e}){return(0,r.jsx)(a.Root,{"data-slot":`select`,...e})}function s({...e}){return(0,r.jsx)(a.Group,{"data-slot":`select-group`,...e})}function c({...e}){return(0,r.jsx)(a.Value,{"data-slot":`select-value`,...e})}function l({className:e,size:n=`default`,children:o,...s}){return(0,r.jsxs)(a.Trigger,{"data-slot":`select-trigger`,"data-size":n,className:t.cn(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...s,children:[o,(0,r.jsx)(a.Icon,{asChild:!0,children:(0,r.jsx)(i.ChevronDownIcon,{className:`size-4 opacity-50`})})]})}function u({className:e,children:n,position:i=`popper`,align:o=`center`,...s}){return(0,r.jsx)(a.Portal,{children:(0,r.jsxs)(a.Content,{"data-slot":`select-content`,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,i===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:i,align:o,...s,children:[(0,r.jsx)(m,{}),(0,r.jsx)(a.Viewport,{className:t.cn(`p-1`,i===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:n}),(0,r.jsx)(h,{})]})})}function d({className:e,...n}){return(0,r.jsx)(a.Label,{"data-slot":`select-label`,className:t.cn(`text-muted-foreground px-2 py-1.5 text-xs`,e),...n})}function f({className:e,children:n,...o}){return(0,r.jsxs)(a.Item,{"data-slot":`select-item`,className:t.cn(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...o,children:[(0,r.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,r.jsx)(a.ItemIndicator,{children:(0,r.jsx)(i.CheckIcon,{className:`size-4`})})}),(0,r.jsx)(a.ItemText,{children:n})]})}function p({className:e,...n}){return(0,r.jsx)(a.Separator,{"data-slot":`select-separator`,className:t.cn(`bg-border pointer-events-none -mx-1 my-1 h-px`,e),...n})}function m({className:e,...n}){return(0,r.jsx)(a.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...n,children:(0,r.jsx)(i.ChevronUpIcon,{className:`size-4`})})}function h({className:e,...n}){return(0,r.jsx)(a.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...n,children:(0,r.jsx)(i.ChevronDownIcon,{className:`size-4`})})}exports.Select=o,exports.SelectContent=u,exports.SelectGroup=s,exports.SelectItem=f,exports.SelectLabel=d,exports.SelectScrollDownButton=h,exports.SelectScrollUpButton=m,exports.SelectSeparator=p,exports.SelectTrigger=l,exports.SelectValue=c;
|