@pixpilot/shadcn-ui 0.0.3 → 0.0.5
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/AbsoluteFill.cjs +1 -0
- package/dist/AbsoluteFill.d.cts +18 -0
- package/dist/AbsoluteFill.d.ts +18 -0
- package/dist/AbsoluteFill.js +1 -0
- package/dist/Alert.cjs +1 -0
- package/dist/Alert.d.cts +16 -0
- package/dist/Alert.d.ts +16 -0
- package/dist/Alert.js +1 -0
- package/dist/Button.cjs +1 -0
- package/dist/Button.d.cts +47 -0
- package/dist/Button.d.ts +47 -0
- package/dist/Button.js +1 -0
- package/dist/CloseButtonAbsolute.cjs +1 -0
- package/dist/CloseButtonAbsolute.d.cts +8 -0
- package/dist/CloseButtonAbsolute.d.ts +8 -0
- package/dist/CloseButtonAbsolute.js +1 -0
- package/dist/CloseButtonRounded.cjs +1 -0
- package/dist/CloseButtonRounded.d.cts +8 -0
- package/dist/CloseButtonRounded.d.ts +8 -0
- package/dist/CloseButtonRounded.js +1 -0
- package/dist/Combobox.cjs +1 -0
- package/dist/Combobox.d.cts +16 -0
- package/dist/Combobox.d.ts +16 -0
- package/dist/Combobox.js +1 -0
- package/dist/CommandOptionList.cjs +1 -0
- package/dist/CommandOptionList.d.cts +7 -0
- package/dist/CommandOptionList.d.ts +7 -0
- package/dist/CommandOptionList.js +1 -0
- package/dist/ContentCard.cjs +1 -0
- package/dist/ContentCard.d.cts +16 -0
- package/dist/ContentCard.d.ts +16 -0
- package/dist/ContentCard.js +1 -0
- package/dist/DatePicker.cjs +1 -0
- package/dist/DatePicker.d.cts +16 -0
- package/dist/DatePicker.d.ts +16 -0
- package/dist/DatePicker.js +1 -0
- package/dist/FileUploadInline.cjs +1 -0
- package/dist/FileUploadInline.d.cts +75 -0
- package/dist/FileUploadInline.d.ts +75 -0
- package/dist/FileUploadInline.js +1 -0
- package/dist/Loader.cjs +1 -0
- package/dist/Loader.d.cts +21 -0
- package/dist/Loader.d.ts +21 -0
- package/dist/Loader.js +1 -0
- package/dist/Pagination/Pagination.cjs +1 -0
- package/dist/Pagination/Pagination.d.cts +88 -0
- package/dist/Pagination/Pagination.d.ts +88 -0
- package/dist/Pagination/Pagination.js +1 -0
- package/dist/Pagination/index.cjs +1 -0
- package/dist/Pagination/index.d.cts +1 -0
- package/dist/Pagination/index.d.ts +1 -0
- package/dist/Pagination/index.js +1 -0
- package/dist/PopoverContent.cjs +1 -0
- package/dist/PopoverContent.d.cts +8 -0
- package/dist/PopoverContent.d.ts +8 -0
- package/dist/PopoverContent.js +1 -0
- package/dist/Select.cjs +1 -0
- package/dist/Select.d.cts +18 -0
- package/dist/Select.d.ts +18 -0
- package/dist/Select.js +1 -0
- package/dist/Slider.cjs +1 -0
- package/dist/Slider.d.cts +8 -0
- package/dist/Slider.d.ts +8 -0
- package/dist/Slider.js +1 -0
- package/dist/ThemeToggle.cjs +1 -0
- package/dist/ThemeToggle.d.cts +6 -0
- package/dist/ThemeToggle.d.ts +6 -0
- package/dist/ThemeToggle.js +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.d.cts +13 -0
- package/dist/confirmation-dialog/ConfirmationDialog.d.ts +14 -0
- package/dist/confirmation-dialog/ConfirmationDialog.js +1 -0
- package/dist/confirmation-dialog/DialogProvider.cjs +1 -0
- package/dist/confirmation-dialog/DialogProvider.d.cts +9 -0
- package/dist/confirmation-dialog/DialogProvider.d.ts +9 -0
- package/dist/confirmation-dialog/DialogProvider.js +1 -0
- package/dist/confirmation-dialog/confirmation-dialogs.cjs +1 -0
- package/dist/confirmation-dialog/confirmation-dialogs.d.cts +7 -0
- package/dist/confirmation-dialog/confirmation-dialogs.d.ts +7 -0
- package/dist/confirmation-dialog/confirmation-dialogs.js +1 -0
- package/dist/confirmation-dialog/index.cjs +1 -0
- package/dist/confirmation-dialog/index.d.cts +3 -0
- package/dist/confirmation-dialog/index.d.ts +3 -0
- package/dist/confirmation-dialog/index.js +1 -0
- package/dist/index.cjs +1 -96
- package/dist/index.d.cts +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +1 -96
- package/dist/shadcn/src/components/ui/alert.cjs +1 -0
- package/dist/shadcn/src/components/ui/alert.js +1 -0
- package/dist/shadcn/src/components/ui/dialog.cjs +1 -0
- package/dist/shadcn/src/components/ui/dialog.js +1 -0
- package/dist/shadcn/src/lib/index.cjs +1 -0
- package/dist/shadcn/src/lib/index.js +1 -0
- package/dist/shadcn/src/lib/utils.cjs +1 -0
- package/dist/shadcn/src/lib/utils.js +1 -0
- package/dist/spinner/index.cjs +1 -0
- package/dist/spinner/index.d.cts +1 -0
- package/dist/spinner/index.d.ts +1 -0
- package/dist/spinner/index.js +1 -0
- package/dist/spinner/spinner.cjs +7 -0
- package/dist/spinner/spinner.d.cts +46 -0
- package/dist/spinner/spinner.d.ts +46 -0
- package/dist/spinner/spinner.js +7 -0
- package/dist/spinner/styles.cjs +46 -0
- package/dist/spinner/styles.js +46 -0
- package/dist/tags-input.cjs +1 -0
- package/dist/tags-input.d.cts +60 -0
- package/dist/tags-input.d.ts +60 -0
- package/dist/tags-input.js +1 -0
- package/dist/theme-provider/ThemeProvider.cjs +1 -0
- package/dist/theme-provider/ThemeProvider.d.cts +16 -0
- package/dist/theme-provider/ThemeProvider.d.ts +16 -0
- package/dist/theme-provider/ThemeProvider.js +1 -0
- package/dist/theme-provider/index.cjs +1 -0
- package/dist/theme-provider/index.d.cts +3 -0
- package/dist/theme-provider/index.d.ts +3 -0
- package/dist/theme-provider/index.js +1 -0
- package/dist/toast/AlertToast.cjs +1 -0
- package/dist/toast/AlertToast.d.cts +9 -0
- package/dist/toast/AlertToast.d.ts +9 -0
- package/dist/toast/AlertToast.js +1 -0
- package/dist/toast/index.cjs +1 -0
- package/dist/toast/index.d.cts +1 -0
- package/dist/toast/index.d.ts +1 -0
- package/dist/toast/index.js +1 -0
- package/dist/toast/toast.cjs +1 -0
- package/dist/toast/toast.d.cts +20 -0
- package/dist/toast/toast.d.ts +20 -0
- package/dist/toast/toast.js +1 -0
- package/package.json +5 -5
- package/dist/index-BMHRJkpu.d.ts +0 -470
- package/dist/index-JkmaV8h2.d.cts +0 -470
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/Pagination/Pagination.d.ts
|
|
4
|
+
interface PaginationProps {
|
|
5
|
+
/**
|
|
6
|
+
* Current page number (1-indexed)
|
|
7
|
+
*/
|
|
8
|
+
page: number;
|
|
9
|
+
/**
|
|
10
|
+
* Total number of pages
|
|
11
|
+
*/
|
|
12
|
+
totalPages: number;
|
|
13
|
+
/**
|
|
14
|
+
* Callback when page changes
|
|
15
|
+
*/
|
|
16
|
+
onPageChange: (event: React.ChangeEvent<unknown>, page: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of page numbers to display (excluding ellipsis)
|
|
19
|
+
* For example, with maxVisiblePages=4 and 10 total pages:
|
|
20
|
+
* - Page 1: <1 2 3 ... 10>
|
|
21
|
+
* - Page 5: <1 ... 5 ... 10>
|
|
22
|
+
* - Page 10: <1 ... 8 9 10>
|
|
23
|
+
* Set to 0 to hide page numbers entirely (only show prev/next buttons)
|
|
24
|
+
*
|
|
25
|
+
* @default 4
|
|
26
|
+
*/
|
|
27
|
+
maxVisiblePages?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Display variant:
|
|
30
|
+
* - 'full': Shows page numbers with prev/next (e.g., < 1 2 3 ... 10 >)
|
|
31
|
+
* - 'simple': Only shows prev/next buttons (e.g., < >)
|
|
32
|
+
* - 'compact': Shows page indicator with all nav buttons (e.g., << < 2/10 > >>)
|
|
33
|
+
*
|
|
34
|
+
* @default 'full'
|
|
35
|
+
*/
|
|
36
|
+
variant?: 'full' | 'simple' | 'compact';
|
|
37
|
+
/**
|
|
38
|
+
* Size of the pagination component
|
|
39
|
+
* @default 'medium'
|
|
40
|
+
*/
|
|
41
|
+
size?: 'small' | 'medium' | 'large';
|
|
42
|
+
/**
|
|
43
|
+
* Whether to show first/last page buttons
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
showFirstLastButtons?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to show page info text (e.g., "Page 1 of 10")
|
|
49
|
+
* Only used with 'simple' variant
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
showPageInfo?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Reusable pagination component with configurable page number display.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Full variant - default with page numbers
|
|
60
|
+
* <Pagination
|
|
61
|
+
* page={currentPage}
|
|
62
|
+
* totalPages={totalPages}
|
|
63
|
+
* onPageChange={handlePageChange}
|
|
64
|
+
* variant="full"
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Compact variant - page indicator with first/prev/next/last buttons
|
|
69
|
+
* <Pagination
|
|
70
|
+
* page={currentPage}
|
|
71
|
+
* totalPages={totalPages}
|
|
72
|
+
* onPageChange={handlePageChange}
|
|
73
|
+
* variant="compact"
|
|
74
|
+
* />
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // Simple variant - only prev/next buttons
|
|
78
|
+
* <Pagination
|
|
79
|
+
* page={currentPage}
|
|
80
|
+
* totalPages={totalPages}
|
|
81
|
+
* onPageChange={handlePageChange}
|
|
82
|
+
* variant="simple"
|
|
83
|
+
* showPageInfo={true}
|
|
84
|
+
* />
|
|
85
|
+
*/
|
|
86
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Pagination, PaginationProps };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/Pagination/Pagination.d.ts
|
|
4
|
+
interface PaginationProps {
|
|
5
|
+
/**
|
|
6
|
+
* Current page number (1-indexed)
|
|
7
|
+
*/
|
|
8
|
+
page: number;
|
|
9
|
+
/**
|
|
10
|
+
* Total number of pages
|
|
11
|
+
*/
|
|
12
|
+
totalPages: number;
|
|
13
|
+
/**
|
|
14
|
+
* Callback when page changes
|
|
15
|
+
*/
|
|
16
|
+
onPageChange: (event: React.ChangeEvent<unknown>, page: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum number of page numbers to display (excluding ellipsis)
|
|
19
|
+
* For example, with maxVisiblePages=4 and 10 total pages:
|
|
20
|
+
* - Page 1: <1 2 3 ... 10>
|
|
21
|
+
* - Page 5: <1 ... 5 ... 10>
|
|
22
|
+
* - Page 10: <1 ... 8 9 10>
|
|
23
|
+
* Set to 0 to hide page numbers entirely (only show prev/next buttons)
|
|
24
|
+
*
|
|
25
|
+
* @default 4
|
|
26
|
+
*/
|
|
27
|
+
maxVisiblePages?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Display variant:
|
|
30
|
+
* - 'full': Shows page numbers with prev/next (e.g., < 1 2 3 ... 10 >)
|
|
31
|
+
* - 'simple': Only shows prev/next buttons (e.g., < >)
|
|
32
|
+
* - 'compact': Shows page indicator with all nav buttons (e.g., << < 2/10 > >>)
|
|
33
|
+
*
|
|
34
|
+
* @default 'full'
|
|
35
|
+
*/
|
|
36
|
+
variant?: 'full' | 'simple' | 'compact';
|
|
37
|
+
/**
|
|
38
|
+
* Size of the pagination component
|
|
39
|
+
* @default 'medium'
|
|
40
|
+
*/
|
|
41
|
+
size?: 'small' | 'medium' | 'large';
|
|
42
|
+
/**
|
|
43
|
+
* Whether to show first/last page buttons
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
showFirstLastButtons?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether to show page info text (e.g., "Page 1 of 10")
|
|
49
|
+
* Only used with 'simple' variant
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
showPageInfo?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Reusable pagination component with configurable page number display.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* // Full variant - default with page numbers
|
|
60
|
+
* <Pagination
|
|
61
|
+
* page={currentPage}
|
|
62
|
+
* totalPages={totalPages}
|
|
63
|
+
* onPageChange={handlePageChange}
|
|
64
|
+
* variant="full"
|
|
65
|
+
* />
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* // Compact variant - page indicator with first/prev/next/last buttons
|
|
69
|
+
* <Pagination
|
|
70
|
+
* page={currentPage}
|
|
71
|
+
* totalPages={totalPages}
|
|
72
|
+
* onPageChange={handlePageChange}
|
|
73
|
+
* variant="compact"
|
|
74
|
+
* />
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // Simple variant - only prev/next buttons
|
|
78
|
+
* <Pagination
|
|
79
|
+
* page={currentPage}
|
|
80
|
+
* totalPages={totalPages}
|
|
81
|
+
* onPageChange={handlePageChange}
|
|
82
|
+
* variant="simple"
|
|
83
|
+
* showPageInfo={true}
|
|
84
|
+
* />
|
|
85
|
+
*/
|
|
86
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Pagination, PaginationProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pagination as e,PaginationContent as t,PaginationEllipsis as n,PaginationItem as r,PaginationLink as i,PaginationNext as a,PaginationPrevious as o}from"@pixpilot/shadcn";import s from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{ChevronsLeft as u,ChevronsRight as d}from"lucide-react";const f=({page:s,totalPages:f,onPageChange:p,maxVisiblePages:m=6,variant:h=`full`,showPageInfo:g=!1,className:_})=>{if(f<=1)return null;let v=e=>t=>{t.preventDefault(),p(t,e)},y=(()=>{let e=[];if(f<=m){for(let t=1;t<=f;t++)e.push(t);return e}let t=f,n=s<=m-1,r=s>=f-(m-2);if(n){for(let t=1;t<m;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}else if(r){e.push(1),e.push(`ellipsis-start`);for(let t=f-(m-2);t<=f;t++)e.push(t)}else{let n=m-2;e.push(1),e.push(`ellipsis-start`);let r=s-Math.floor(n/2),i=r+n-1;r=Math.max(2,r),i=Math.min(t-1,i),i-r+1<n&&(r===2?i=r+n-1:r=i-n+1);for(let t=r;t<=i;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}return e})();return h===`compact`?c(e,{className:_,children:l(t,{children:[c(r,{children:c(i,{onClick:v(1),"aria-label":`Go to first page`,className:`gap-1 px-2`,children:c(u,{className:`h-4 w-4`})})}),c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),c(r,{children:l(`span`,{className:`flex h-9 items-center justify-center px-4 text-sm font-medium`,children:[s,`/`,f]})}),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})}),c(r,{children:c(i,{onClick:v(f),"aria-label":`Go to last page`,className:`gap-1 px-2`,children:c(d,{className:`h-4 w-4`})})})]})}):h===`simple`?l(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&l(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,s,` of `,f]}),c(e,{children:l(t,{children:[c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})})]})})]}):l(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&l(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,s,` of `,f]}),c(e,{children:l(t,{children:[c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),y.map(e=>typeof e==`string`?c(r,{children:c(n,{})},e):c(r,{children:c(i,{onClick:v(e),isActive:e===s,children:e})},e)),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})})]})})]})};export{f as Pagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./Pagination.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Pagination, PaginationProps } from "./Pagination.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Pagination, PaginationProps } from "./Pagination.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pagination as e}from"./Pagination.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);const i=e=>(0,r.jsx)(t.PopoverContent,{...e,className:`w-auto max-w-[100vw] border-0 bg-transparent p-0 sm:max-w-[calc(100vw-2rem)]`});i.displayName=`PopoverContent`,exports.PopoverContent=i;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PopoverContent } from "@pixpilot/shadcn";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/PopoverContent.d.ts
|
|
5
|
+
interface PopoverContentProps extends React.ComponentProps<typeof PopoverContent> {}
|
|
6
|
+
declare const PopoverContent$1: React.FC<PopoverContentProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { PopoverContent$1 as PopoverContent, PopoverContentProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PopoverContent } from "@pixpilot/shadcn";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/PopoverContent.d.ts
|
|
5
|
+
interface PopoverContentProps extends React.ComponentProps<typeof PopoverContent> {}
|
|
6
|
+
declare const PopoverContent$1: React.FC<PopoverContentProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { PopoverContent$1 as PopoverContent, PopoverContentProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{PopoverContent as e}from"@pixpilot/shadcn";import t from"react";import{jsx as n}from"react/jsx-runtime";const r=t=>n(e,{...t,className:`w-auto max-w-[100vw] border-0 bg-transparent p-0 sm:max-w-[calc(100vw-2rem)]`});r.displayName=`PopoverContent`;export{r as PopoverContent};
|
package/dist/Select.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);function i(e){let{options:n,value:i=``,onChange:a,placeholder:o,...s}=e;return(0,r.jsxs)(t.Select,{value:i,onValueChange:a,...s,children:[(0,r.jsx)(t.SelectTrigger,{className:`w-full`,children:(0,r.jsx)(t.SelectValue,{placeholder:o})}),(0,r.jsx)(t.SelectContent,{children:n?.map(e=>(0,r.jsx)(t.SelectItem,{value:String(e.value),children:e.label},e.value))})]})}exports.Select=i;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Select } from "@pixpilot/shadcn";
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/Select.d.ts
|
|
6
|
+
interface SelectOption {
|
|
7
|
+
value: string | number;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
type BaseSelectProps = {
|
|
11
|
+
options?: SelectOption[];
|
|
12
|
+
value?: string;
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
} & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
|
|
16
|
+
declare function Select$1(props: BaseSelectProps): react_jsx_runtime4.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Select$1 as Select, SelectOption };
|
package/dist/Select.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Select } from "@pixpilot/shadcn";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/Select.d.ts
|
|
6
|
+
interface SelectOption {
|
|
7
|
+
value: string | number;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
type BaseSelectProps = {
|
|
11
|
+
options?: SelectOption[];
|
|
12
|
+
value?: string;
|
|
13
|
+
onChange?: (value: string) => void;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
} & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
|
|
16
|
+
declare function Select$1(props: BaseSelectProps): react_jsx_runtime4.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Select$1 as Select, SelectOption };
|
package/dist/Select.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Select as e,SelectContent as t,SelectItem as n,SelectTrigger as r,SelectValue as i}from"@pixpilot/shadcn";import a from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function c(a){let{options:c,value:l=``,onChange:u,placeholder:d,...f}=a;return s(e,{value:l,onValueChange:u,...f,children:[o(r,{className:`w-full`,children:o(i,{placeholder:d})}),o(t,{children:c?.map(e=>o(n,{value:String(e.value),children:e.label},e.value))})]})}export{c as Select};
|
package/dist/Slider.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);const i=e=>(0,r.jsx)(t.Slider,{...e,className:(0,t.cn)(`py-2`,e.className)});i.displayName=`Slider`,exports.Slider=i;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Slider } from "@pixpilot/shadcn";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/Slider.d.ts
|
|
5
|
+
interface SliderProps extends React.ComponentProps<typeof Slider> {}
|
|
6
|
+
declare const Slider$1: React.FC<SliderProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Slider$1 as Slider, SliderProps };
|
package/dist/Slider.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Slider } from "@pixpilot/shadcn";
|
|
2
|
+
import React from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/Slider.d.ts
|
|
5
|
+
interface SliderProps extends React.ComponentProps<typeof Slider> {}
|
|
6
|
+
declare const Slider$1: React.FC<SliderProps>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { Slider$1 as Slider, SliderProps };
|
package/dist/Slider.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Slider as e,cn as t}from"@pixpilot/shadcn";import n from"react";import{jsx as r}from"react/jsx-runtime";const i=n=>r(e,{...n,className:t(`py-2`,n.className)});i.displayName=`Slider`;export{i as Slider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);let r=require(`next-themes`);r=e.__toESM(r);function i(){return(0,n.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z`})})}function a(){return(0,n.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z`})})}function o(){return(0,n.jsx)(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})})}function s(){let[e,s]=(0,t.useState)(!1),{theme:c,setTheme:l}=(0,r.useTheme)();return(0,t.useEffect)(()=>{let e=setTimeout(()=>{s(!0)},0);return()=>{clearTimeout(e)}},[]),e?(0,n.jsx)(`button`,{onClick:()=>{l(c===`light`?`dark`:c===`dark`?`system`:`light`)},className:`flex h-9 w-9 items-center justify-center rounded-md border border-gray-200 bg-white text-gray-900 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-gray-800`,title:(()=>c===`light`?`Switch to Dark mode`:c===`dark`?`Switch to System mode`:`Switch to Light mode`)(),type:`button`,children:(()=>c===`light`?(0,n.jsx)(a,{}):c===`dark`?(0,n.jsx)(o,{}):(0,n.jsx)(i,{}))()}):(0,n.jsx)(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-md border border-gray-200 dark:border-gray-700`,children:(0,n.jsx)(`div`,{className:`h-5 w-5 animate-pulse rounded bg-gray-300 dark:bg-gray-600`})})}exports.ThemeToggle=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import e,{useEffect as t,useState as n}from"react";import{jsx as r}from"react/jsx-runtime";import{useTheme as i}from"next-themes";function a(){return r(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:r(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z`})})}function o(){return r(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:r(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z`})})}function s(){return r(`svg`,{className:`h-5 w-5`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,xmlns:`http://www.w3.org/2000/svg`,children:r(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z`})})}function c(){let[e,c]=n(!1),{theme:l,setTheme:u}=i();return t(()=>{let e=setTimeout(()=>{c(!0)},0);return()=>{clearTimeout(e)}},[]),e?r(`button`,{onClick:()=>{u(l===`light`?`dark`:l===`dark`?`system`:`light`)},className:`flex h-9 w-9 items-center justify-center rounded-md border border-gray-200 bg-white text-gray-900 transition-colors hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-gray-800`,title:(()=>l===`light`?`Switch to Dark mode`:l===`dark`?`Switch to System mode`:`Switch to Light mode`)(),type:`button`,children:(()=>r(l===`light`?o:l===`dark`?s:a,{}))()}):r(`div`,{className:`flex h-9 w-9 items-center justify-center rounded-md border border-gray-200 dark:border-gray-700`,children:r(`div`,{className:`h-5 w-5 animate-pulse rounded bg-gray-300 dark:bg-gray-600`})})}export{c as ThemeToggle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../shadcn/src/components/ui/dialog.cjs`);let n=require(`@pixpilot/shadcn`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@ebay/nice-modal-react`);i=e.__toESM(i);const a=i.default.create(e=>{let{title:a=`Confirmation Dialog`}=e,o=(0,i.useModal)(),s=()=>{e.onConfirm?.(),o.resolve(!0),o.hide()},c=()=>{e.onCancel?.(),o.resolve(!1),o.hide()};return(0,r.jsx)(t.Dialog,{open:o.visible,onOpenChange:e=>{e||c()},children:(0,r.jsxs)(t.DialogContent,{children:[(0,r.jsxs)(t.DialogHeader,{children:[(0,r.jsx)(t.DialogTitle,{children:a}),e.description!=null&&(0,r.jsx)(t.DialogDescription,{children:e.description})]}),(0,r.jsxs)(t.DialogFooter,{children:[(0,r.jsx)(t.DialogClose,{asChild:!0,children:(0,r.jsx)(n.Button,{variant:`outline`,onClick:c,children:e.cancelText??`Cancel`})}),(0,r.jsx)(n.Button,{onClick:s,children:e.confirmText??`Confirm`})]})]})})});a.displayName=`ConfirmationDialog`;var o=a;exports.default=o;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
|
|
3
|
+
//#region src/confirmation-dialog/ConfirmationDialog.d.ts
|
|
4
|
+
interface ConfirmationDialogProps {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
confirmText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
onConfirm?: () => void;
|
|
10
|
+
onCancel?: () => void;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ConfirmationDialogProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import "@ebay/nice-modal-react";
|
|
3
|
+
|
|
4
|
+
//#region src/confirmation-dialog/ConfirmationDialog.d.ts
|
|
5
|
+
interface ConfirmationDialogProps {
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
confirmText?: string;
|
|
9
|
+
cancelText?: string;
|
|
10
|
+
onConfirm?: () => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { ConfirmationDialogProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dialog as e,DialogClose as t,DialogContent as n,DialogDescription as r,DialogFooter as i,DialogHeader as a,DialogTitle as o}from"../shadcn/src/components/ui/dialog.js";import{Button as s}from"@pixpilot/shadcn";import{jsx as c,jsxs as l}from"react/jsx-runtime";import u,{useModal as d}from"@ebay/nice-modal-react";const f=u.create(u=>{let{title:f=`Confirmation Dialog`}=u,p=d(),m=()=>{u.onConfirm?.(),p.resolve(!0),p.hide()},h=()=>{u.onCancel?.(),p.resolve(!1),p.hide()};return c(e,{open:p.visible,onOpenChange:e=>{e||h()},children:l(n,{children:[l(a,{children:[c(o,{children:f}),u.description!=null&&c(r,{children:u.description})]}),l(i,{children:[c(t,{asChild:!0,children:c(s,{variant:`outline`,onClick:h,children:u.cancelText??`Cancel`})}),c(s,{onClick:m,children:u.confirmText??`Confirm`})]})]})})});f.displayName=`ConfirmationDialog`;var p=f;export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);let r=require(`@ebay/nice-modal-react`);r=e.__toESM(r);const i=e=>(0,n.jsx)(r.default.Provider,{children:e.children});i.displayName=`DialogProvider`,exports.DialogProvider=i;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/confirmation-dialog/DialogProvider.d.ts
|
|
4
|
+
interface DialogProviderProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const DialogProvider: React.FC<DialogProviderProps>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DialogProvider, DialogProviderProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/confirmation-dialog/DialogProvider.d.ts
|
|
4
|
+
interface DialogProviderProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const DialogProvider: React.FC<DialogProviderProps>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DialogProvider, DialogProviderProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{jsx as t}from"react/jsx-runtime";import n from"@ebay/nice-modal-react";const r=e=>t(n.Provider,{children:e.children});r.displayName=`DialogProvider`;export{r as DialogProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./ConfirmationDialog.cjs`);let n=require(`@ebay/nice-modal-react`);n=e.__toESM(n);async function r(e){let r=crypto.randomUUID();return n.default.register(r,t.default),n.default.show(r,e)}exports.showConfirmDialog=r;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfirmationDialogProps } from "./ConfirmationDialog.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/confirmation-dialog/confirmation-dialogs.d.ts
|
|
4
|
+
interface ConfirmDialog extends ConfirmationDialogProps {}
|
|
5
|
+
declare function showConfirmDialog(props: ConfirmDialog): Promise<boolean>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { showConfirmDialog };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfirmationDialogProps } from "./ConfirmationDialog.js";
|
|
2
|
+
|
|
3
|
+
//#region src/confirmation-dialog/confirmation-dialogs.d.ts
|
|
4
|
+
interface ConfirmDialog extends ConfirmationDialogProps {}
|
|
5
|
+
declare function showConfirmDialog(props: ConfirmDialog): Promise<boolean>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { showConfirmDialog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./ConfirmationDialog.js";import t from"@ebay/nice-modal-react";async function n(n){let r=crypto.randomUUID();return t.register(r,e),t.show(r,n)}export{n as showConfirmDialog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";require(`./ConfirmationDialog.cjs`);const e=require(`./confirmation-dialogs.cjs`),t=require(`./DialogProvider.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"./ConfirmationDialog.js";import{showConfirmDialog as e}from"./confirmation-dialogs.js";import{DialogProvider as t}from"./DialogProvider.js";
|