@pixpilot/shadcn-ui 0.0.6 → 0.0.7

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/Button.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./AbsoluteFill.cjs`),n=require(`./spinner/spinner.cjs`);require(`./spinner/index.cjs`);let r=require(`@pixpilot/shadcn`);r=e.__toESM(r);let i=require(`react`);i=e.__toESM(i);let a=require(`react/jsx-runtime`);a=e.__toESM(a);const o=14,s=16,c=20;function l(e){return e===`sm`||e===`icon-sm`?14:e===`lg`||e===`icon-lg`?20:16}function u(e){let{children:o,disabled:s,onClick:c,disabledTooltip:u,loading:d,LoaderProps:f,onDisabledClick:p,tooltip:m,title:h,TooltipProps:g,className:_,variant:v,size:y,ref:b,...x}=e,{placement:S=`end`,...C}=f||{},w=(0,i.useCallback)(e=>{c&&!s&&c(e)},[s,c]),T=s||d,E=!!m||!!h,D=!!u&&T,O=E||D,k=D?u??``:m??h??``,A=(0,a.jsx)(`div`,{className:(0,r.cn)(`flex items-center justify-center`,S===`center`&&`rounded-0 absolute inset-0 bg-white/60 dark:bg-black/60`,S===`start`&&`mr-1`,S===`end`&&`ml-1`),children:(0,a.jsx)(n.Spinner,{className:(0,r.cn)({"text-black dark:text-white":S===`center`}),size:l(y),...C})}),j=(0,a.jsxs)(r.Button,{...x,ref:b,disabled:T,onClick:w,className:(0,r.cn)(`relative`,_),variant:v,size:y,children:[!!u&&T&&(0,a.jsxs)(r.Tooltip,{...g,children:[(0,a.jsx)(r.TooltipTrigger,{asChild:!0,children:(0,a.jsx)(t.AbsoluteFill,{onClick:p,style:{pointerEvents:`all`,cursor:`not-allowed`}})}),(0,a.jsx)(r.TooltipContent,{children:(0,a.jsx)(`p`,{children:u})})]}),d&&S===`start`&&A,o,d&&(S===`end`||S===`center`)&&A]});return O&&!(u&&T)?(0,a.jsxs)(r.Tooltip,{...g,children:[(0,a.jsx)(r.TooltipTrigger,{asChild:!0,children:j}),(0,a.jsx)(r.TooltipContent,{children:(0,a.jsx)(`p`,{children:k})})]}):j}u.displayName=`Button`,exports.Button=u;
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./AbsoluteFill.cjs`);let n=require(`@pixpilot/shadcn`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`lucide-react`);a=e.__toESM(a);const o=14,s=16,c=20;function l(e){return e===`sm`||e===`icon-sm`?14:e===`lg`||e===`icon-lg`?20:16}function u(e){let{children:o,disabled:s,onClick:c,disabledTooltip:u,loading:d,LoaderProps:f,onDisabledClick:p,tooltip:m,title:h,TooltipProps:g,className:_,variant:v,size:y,ref:b,...x}=e,{placement:S=`end`}=f||{},C=(0,r.useCallback)(e=>{c&&!s&&c(e)},[s,c]),w=s||d,T=!!m||!!h,E=!!u&&w,D=T||E,O=E?u??``:m??h??``,k=(0,i.jsx)(`div`,{className:(0,n.cn)(`flex items-center justify-center`,S===`center`&&`rounded-0 absolute inset-0`,S===`start`&&`mr-1`,S===`end`&&`ml-1`),children:(0,i.jsx)(a.Loader2,{className:`text-background animate-spin`,style:{height:l(y),width:l(y)}})}),A=(0,i.jsxs)(n.Button,{...x,ref:b,disabled:w,onClick:C,className:(0,n.cn)(`relative`,_),variant:v,size:y,children:[!!u&&w&&(0,i.jsxs)(n.Tooltip,{...g,children:[(0,i.jsx)(n.TooltipTrigger,{asChild:!0,children:(0,i.jsx)(t.AbsoluteFill,{onClick:p,style:{pointerEvents:`all`,cursor:`not-allowed`}})}),(0,i.jsx)(n.TooltipContent,{children:(0,i.jsx)(`p`,{children:u})})]}),d&&S===`start`&&k,o,d&&(S===`end`||S===`center`)&&k]});return D&&!(u&&w)?(0,i.jsxs)(n.Tooltip,{...g,children:[(0,i.jsx)(n.TooltipTrigger,{asChild:!0,children:A}),(0,i.jsx)(n.TooltipContent,{children:(0,i.jsx)(`p`,{children:O})})]}):A}u.displayName=`Button`,exports.Button=u;
package/dist/Button.js CHANGED
@@ -1 +1 @@
1
- import{AbsoluteFill as e}from"./AbsoluteFill.js";import{Spinner as t}from"./spinner/spinner.js";import"./spinner/index.js";import{Button as n,Tooltip as r,TooltipContent as i,TooltipTrigger as a,cn as o}from"@pixpilot/shadcn";import s,{useCallback as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";function d(e){return e===`sm`||e===`icon-sm`?14:e===`lg`||e===`icon-lg`?20:16}function f(s){let{children:f,disabled:p,onClick:m,disabledTooltip:h,loading:g,LoaderProps:_,onDisabledClick:v,tooltip:y,title:b,TooltipProps:x,className:S,variant:C,size:w,ref:T,...E}=s,{placement:D=`end`,...O}=_||{},k=c(e=>{m&&!p&&m(e)},[p,m]),A=p||g,j=!!y||!!b,M=!!h&&A,N=j||M,P=M?h??``:y??b??``,F=l(`div`,{className:o(`flex items-center justify-center`,D===`center`&&`rounded-0 absolute inset-0 bg-white/60 dark:bg-black/60`,D===`start`&&`mr-1`,D===`end`&&`ml-1`),children:l(t,{className:o({"text-black dark:text-white":D===`center`}),size:d(w),...O})}),I=u(n,{...E,ref:T,disabled:A,onClick:k,className:o(`relative`,S),variant:C,size:w,children:[!!h&&A&&u(r,{...x,children:[l(a,{asChild:!0,children:l(e,{onClick:v,style:{pointerEvents:`all`,cursor:`not-allowed`}})}),l(i,{children:l(`p`,{children:h})})]}),g&&D===`start`&&F,f,g&&(D===`end`||D===`center`)&&F]});return N&&!(h&&A)?u(r,{...x,children:[l(a,{asChild:!0,children:I}),l(i,{children:l(`p`,{children:P})})]}):I}f.displayName=`Button`;export{f as Button};
1
+ import{AbsoluteFill as e}from"./AbsoluteFill.js";import{Button as t,Tooltip as n,TooltipContent as r,TooltipTrigger as i,cn as a}from"@pixpilot/shadcn";import o,{useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{Loader2 as u}from"lucide-react";function d(e){return e===`sm`||e===`icon-sm`?14:e===`lg`||e===`icon-lg`?20:16}function f(o){let{children:f,disabled:p,onClick:m,disabledTooltip:h,loading:g,LoaderProps:_,onDisabledClick:v,tooltip:y,title:b,TooltipProps:x,className:S,variant:C,size:w,ref:T,...E}=o,{placement:D=`end`}=_||{},O=s(e=>{m&&!p&&m(e)},[p,m]),k=p||g,A=!!y||!!b,j=!!h&&k,M=A||j,N=j?h??``:y??b??``,P=c(`div`,{className:a(`flex items-center justify-center`,D===`center`&&`rounded-0 absolute inset-0`,D===`start`&&`mr-1`,D===`end`&&`ml-1`),children:c(u,{className:`text-background animate-spin`,style:{height:d(w),width:d(w)}})}),F=l(t,{...E,ref:T,disabled:k,onClick:O,className:a(`relative`,S),variant:C,size:w,children:[!!h&&k&&l(n,{...x,children:[c(i,{asChild:!0,children:c(e,{onClick:v,style:{pointerEvents:`all`,cursor:`not-allowed`}})}),c(r,{children:c(`p`,{children:h})})]}),g&&D===`start`&&P,f,g&&(D===`end`||D===`center`)&&P]});return M&&!(h&&k)?l(n,{...x,children:[c(i,{asChild:!0,children:F}),c(r,{children:c(`p`,{children:N})})]}):F}f.displayName=`Button`;export{f as Button};
@@ -1,5 +1,5 @@
1
1
  import { FileUploadProps } from "@pixpilot/shadcn";
2
- import * as react_jsx_runtime3 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/FileUploadInline.d.ts
5
5
  interface FileUploadInlineProps extends Omit<FileUploadProps, 'value'> {
@@ -70,6 +70,6 @@ declare function FileUploadInline({
70
70
  maxFiles,
71
71
  multiple,
72
72
  ...rest
73
- }: FileUploadInlineProps): react_jsx_runtime3.JSX.Element;
73
+ }: FileUploadInlineProps): react_jsx_runtime4.JSX.Element;
74
74
  //#endregion
75
75
  export { FileUploadInline, FileUploadInlineProps };
package/dist/Select.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Select } from "@pixpilot/shadcn";
2
2
  import { ComponentProps } from "react";
3
- import * as react_jsx_runtime4 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/Select.d.ts
6
6
  interface SelectOption {
@@ -13,6 +13,6 @@ type BaseSelectProps = {
13
13
  onChange?: (value: string) => void;
14
14
  placeholder?: string;
15
15
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
16
- declare function Select$1(props: BaseSelectProps): react_jsx_runtime4.JSX.Element;
16
+ declare function Select$1(props: BaseSelectProps): react_jsx_runtime3.JSX.Element;
17
17
  //#endregion
18
18
  export { Select$1 as Select, SelectOption };
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/ThemeToggle.d.ts
4
- declare function ThemeToggle(): react_jsx_runtime5.JSX.Element;
4
+ declare function ThemeToggle(): react_jsx_runtime6.JSX.Element;
5
5
  //#endregion
6
6
  export { ThemeToggle };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./AbsoluteFill.cjs`),n=require(`./Alert.cjs`),r=require(`./spinner/spinner.cjs`);require(`./spinner/index.cjs`);const i=require(`./Button.cjs`),a=require(`./CloseButtonRounded.cjs`),o=require(`./CloseButtonAbsolute.cjs`),s=require(`./Combobox.cjs`),c=require(`./confirmation-dialog/confirmation-dialogs.cjs`),l=require(`./confirmation-dialog/DialogProvider.cjs`);require(`./confirmation-dialog/index.cjs`);const u=require(`./ContentCard.cjs`),d=require(`./DatePicker.cjs`),f=require(`./FileUploadInline.cjs`),p=require(`./Loader.cjs`),m=require(`./Pagination/Pagination.cjs`);require(`./Pagination/index.cjs`);const h=require(`./PopoverContent.cjs`),g=require(`./Select.cjs`),_=require(`./Slider.cjs`),v=require(`./tags-input.cjs`),y=require(`./theme-provider/ThemeProvider.cjs`);require(`./theme-provider/index.cjs`);const b=require(`./ThemeToggle.cjs`),x=require(`./toast/toast.cjs`);require(`./toast/index.cjs`);let S=require(`@pixpilot/shadcn`);S=e.__toESM(S);let C=require(`next-themes`);C=e.__toESM(C),exports.AbsoluteFill=t.AbsoluteFill,exports.Alert=n.Alert,exports.Button=i.Button,exports.CloseButtonAbsolute=o.CloseButtonAbsolute,exports.CloseButtonRounded=a.CloseButtonRounded,exports.Combobox=s.Combobox,exports.ContentCard=u.ContentCard,exports.DEFAULT_ALERT_DURATION=x.DEFAULT_ALERT_DURATION,exports.DatePicker=d.DatePicker,exports.DialogProvider=l.DialogProvider,exports.FileUploadInline=f.FileUploadInline,exports.Loader=p.Loader,exports.Pagination=m.Pagination,exports.PopoverContent=h.PopoverContent,exports.Select=g.Select,exports.Slider=_.Slider,exports.Spinner=r.Spinner,exports.TagsInput=v.TagsInput,exports.ThemeProvider=y.ThemeProvider,exports.ThemeToggle=b.ThemeToggle,exports.cn=S.cn,exports.showConfirmDialog=c.showConfirmDialog,exports.toast=x.toast,exports.toastError=x.toastError,exports.toastInfo=x.toastInfo,exports.toastSuccess=x.toastSuccess,exports.toastWarning=x.toastWarning,Object.defineProperty(exports,`useTheme`,{enumerable:!0,get:function(){return C.useTheme}});
1
+ const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./AbsoluteFill.cjs`),n=require(`./Alert.cjs`),r=require(`./Button.cjs`),i=require(`./CloseButtonRounded.cjs`),a=require(`./CloseButtonAbsolute.cjs`),o=require(`./Combobox.cjs`),s=require(`./confirmation-dialog/confirmation-dialogs.cjs`),c=require(`./confirmation-dialog/DialogProvider.cjs`);require(`./confirmation-dialog/index.cjs`);const l=require(`./ContentCard.cjs`),u=require(`./DatePicker.cjs`),d=require(`./FileUploadInline.cjs`),f=require(`./Loader.cjs`),p=require(`./Pagination/Pagination.cjs`);require(`./Pagination/index.cjs`);const m=require(`./PopoverContent.cjs`),h=require(`./Select.cjs`),g=require(`./Slider.cjs`),_=require(`./spinner/spinner.cjs`);require(`./spinner/index.cjs`);const v=require(`./tags-input.cjs`),y=require(`./theme-provider/ThemeProvider.cjs`);require(`./theme-provider/index.cjs`);const b=require(`./ThemeToggle.cjs`),x=require(`./toast/toast.cjs`);require(`./toast/index.cjs`);let S=require(`@pixpilot/shadcn`);S=e.__toESM(S);let C=require(`next-themes`);C=e.__toESM(C),exports.AbsoluteFill=t.AbsoluteFill,exports.Alert=n.Alert,exports.Button=r.Button,exports.CloseButtonAbsolute=a.CloseButtonAbsolute,exports.CloseButtonRounded=i.CloseButtonRounded,exports.Combobox=o.Combobox,exports.ContentCard=l.ContentCard,exports.DEFAULT_ALERT_DURATION=x.DEFAULT_ALERT_DURATION,exports.DatePicker=u.DatePicker,exports.DialogProvider=c.DialogProvider,exports.FileUploadInline=d.FileUploadInline,exports.Loader=f.Loader,exports.Pagination=p.Pagination,exports.PopoverContent=m.PopoverContent,exports.Select=h.Select,exports.Slider=g.Slider,exports.Spinner=_.Spinner,exports.TagsInput=v.TagsInput,exports.ThemeProvider=y.ThemeProvider,exports.ThemeToggle=b.ThemeToggle,exports.cn=S.cn,exports.showConfirmDialog=s.showConfirmDialog,exports.toast=x.toast,exports.toastError=x.toastError,exports.toastInfo=x.toastInfo,exports.toastSuccess=x.toastSuccess,exports.toastWarning=x.toastWarning,Object.defineProperty(exports,`useTheme`,{enumerable:!0,get:function(){return C.useTheme}});
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{AbsoluteFill as e}from"./AbsoluteFill.js";import{Alert as t}from"./Alert.js";import{Spinner as n}from"./spinner/spinner.js";import"./spinner/index.js";import{Button as r}from"./Button.js";import{CloseButtonRounded as i}from"./CloseButtonRounded.js";import{CloseButtonAbsolute as a}from"./CloseButtonAbsolute.js";import{Combobox as o}from"./Combobox.js";import{showConfirmDialog as s}from"./confirmation-dialog/confirmation-dialogs.js";import{DialogProvider as c}from"./confirmation-dialog/DialogProvider.js";import"./confirmation-dialog/index.js";import{ContentCard as l}from"./ContentCard.js";import{DatePicker as u}from"./DatePicker.js";import{FileUploadInline as d}from"./FileUploadInline.js";import{Loader as f}from"./Loader.js";import{Pagination as p}from"./Pagination/Pagination.js";import"./Pagination/index.js";import{PopoverContent as m}from"./PopoverContent.js";import{Select as h}from"./Select.js";import{Slider as g}from"./Slider.js";import{TagsInput as _}from"./tags-input.js";import{ThemeProvider as v}from"./theme-provider/ThemeProvider.js";import{useTheme as y}from"./theme-provider/index.js";import{ThemeToggle as b}from"./ThemeToggle.js";import{DEFAULT_ALERT_DURATION as x,toast as S,toastError as C,toastInfo as w,toastSuccess as T,toastWarning as E}from"./toast/toast.js";import"./toast/index.js";import{cn as D}from"@pixpilot/shadcn";export{e as AbsoluteFill,t as Alert,r as Button,a as CloseButtonAbsolute,i as CloseButtonRounded,o as Combobox,l as ContentCard,x as DEFAULT_ALERT_DURATION,u as DatePicker,c as DialogProvider,d as FileUploadInline,f as Loader,p as Pagination,m as PopoverContent,h as Select,g as Slider,n as Spinner,_ as TagsInput,v as ThemeProvider,b as ThemeToggle,D as cn,s as showConfirmDialog,S as toast,C as toastError,w as toastInfo,T as toastSuccess,E as toastWarning,y as useTheme};
1
+ import{AbsoluteFill as e}from"./AbsoluteFill.js";import{Alert as t}from"./Alert.js";import{Button as n}from"./Button.js";import{CloseButtonRounded as r}from"./CloseButtonRounded.js";import{CloseButtonAbsolute as i}from"./CloseButtonAbsolute.js";import{Combobox as a}from"./Combobox.js";import{showConfirmDialog as o}from"./confirmation-dialog/confirmation-dialogs.js";import{DialogProvider as s}from"./confirmation-dialog/DialogProvider.js";import"./confirmation-dialog/index.js";import{ContentCard as c}from"./ContentCard.js";import{DatePicker as l}from"./DatePicker.js";import{FileUploadInline as u}from"./FileUploadInline.js";import{Loader as d}from"./Loader.js";import{Pagination as f}from"./Pagination/Pagination.js";import"./Pagination/index.js";import{PopoverContent as p}from"./PopoverContent.js";import{Select as m}from"./Select.js";import{Slider as h}from"./Slider.js";import{Spinner as g}from"./spinner/spinner.js";import"./spinner/index.js";import{TagsInput as _}from"./tags-input.js";import{ThemeProvider as v}from"./theme-provider/ThemeProvider.js";import{useTheme as y}from"./theme-provider/index.js";import{ThemeToggle as b}from"./ThemeToggle.js";import{DEFAULT_ALERT_DURATION as x,toast as S,toastError as C,toastInfo as w,toastSuccess as T,toastWarning as E}from"./toast/toast.js";import"./toast/index.js";import{cn as D}from"@pixpilot/shadcn";export{e as AbsoluteFill,t as Alert,n as Button,i as CloseButtonAbsolute,r as CloseButtonRounded,a as Combobox,c as ContentCard,x as DEFAULT_ALERT_DURATION,l as DatePicker,s as DialogProvider,u as FileUploadInline,d as Loader,f as Pagination,p as PopoverContent,m as Select,h as Slider,g as Spinner,_ as TagsInput,v as ThemeProvider,b as ThemeToggle,D as cn,o as showConfirmDialog,S as toast,C as toastError,w as toastInfo,T as toastSuccess,E as toastWarning,y as useTheme};
@@ -1,5 +1,5 @@
1
1
  import { CommandOptionListItem } from "./CommandOptionList.cjs";
2
- import * as react_jsx_runtime6 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/tags-input.d.ts
5
5
  interface TagsInputProps {
@@ -55,6 +55,6 @@ declare function TagsInput({
55
55
  addOnPaste,
56
56
  addOnTab,
57
57
  onValidate
58
- }: TagsInputProps): react_jsx_runtime6.JSX.Element;
58
+ }: TagsInputProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { TagsInput, TagsInputProps };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/shadcn-ui",
3
3
  "type": "module",
4
- "version": "0.0.6",
4
+ "version": "0.0.7",
5
5
  "description": "Custom UI components and utilities built with shadcn/ui.",
6
6
  "author": "m.doaie <m.doaie@hotmail.com>",
7
7
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  "lucide-react": "0.553.0",
36
36
  "next-themes": "0.4.6",
37
37
  "sonner": "2.0.7",
38
- "@pixpilot/shadcn": "0.1.10"
38
+ "@pixpilot/shadcn": "0.1.11"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@storybook/react": "^8.5.3",
@@ -47,8 +47,8 @@
47
47
  "tsdown": "^0.15.8",
48
48
  "typescript": "^5.9.3",
49
49
  "@internal/eslint-config": "0.3.0",
50
- "@internal/tsdown-config": "0.1.0",
51
50
  "@internal/prettier-config": "0.0.1",
51
+ "@internal/tsdown-config": "0.1.0",
52
52
  "@internal/tsconfig": "0.1.0",
53
53
  "@internal/vitest-config": "0.1.0"
54
54
  },