boottent-design 0.1.263 → 0.1.264

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.
Files changed (80) hide show
  1. package/dist/components/youtube-video-modal.cjs.js +1 -1
  2. package/dist/components/youtube-video-modal.es.js +1 -1
  3. package/dist/components.cjs.js +1 -1
  4. package/dist/components.es.js +1 -1
  5. package/dist/design-system/components/article-asset-card.md +1 -1
  6. package/dist/design-system/components/blog-review-card.md +1 -1
  7. package/dist/design-system/components/camp-card.md +1 -1
  8. package/dist/design-system/components/company-info-card.md +1 -1
  9. package/dist/design-system/components/dday-card.md +1 -1
  10. package/dist/design-system/components/environment-asset-photo.md +1 -1
  11. package/dist/design-system/components/event-asset-banner.md +1 -1
  12. package/dist/design-system/components/event-card.md +1 -1
  13. package/dist/design-system/components/lecturer-card.md +1 -1
  14. package/dist/design-system/components/main-banner-image.md +1 -1
  15. package/dist/design-system/components/mobile-camp-card.md +1 -1
  16. package/dist/design-system/components/partner-list-card.md +1 -1
  17. package/dist/design-system/components/portfolio-asset-card.md +1 -1
  18. package/dist/design-system/components/premium-card.md +1 -1
  19. package/dist/design-system/components/title-tag-card.md +1 -1
  20. package/dist/design-system/components/youtube-video-modal.md +1 -1
  21. package/dist/design-system/design-system.md +1 -1
  22. package/dist/design-system/tokens.md +1 -1
  23. package/dist/design-system/ui/accordion.md +1 -1
  24. package/dist/design-system/ui/alert-dialog.md +1 -1
  25. package/dist/design-system/ui/anchor.md +1 -1
  26. package/dist/design-system/ui/aspect-ratio.md +1 -1
  27. package/dist/design-system/ui/avatar.md +1 -1
  28. package/dist/design-system/ui/badge.md +1 -1
  29. package/dist/design-system/ui/button.md +1 -1
  30. package/dist/design-system/ui/calendar.md +1 -1
  31. package/dist/design-system/ui/callout.md +1 -1
  32. package/dist/design-system/ui/card-label.md +1 -1
  33. package/dist/design-system/ui/card.md +1 -1
  34. package/dist/design-system/ui/checkbox.md +1 -1
  35. package/dist/design-system/ui/circled-check-button.md +1 -1
  36. package/dist/design-system/ui/command.md +1 -1
  37. package/dist/design-system/ui/dialog.md +1 -1
  38. package/dist/design-system/ui/dropdown-menu.md +1 -1
  39. package/dist/design-system/ui/file-uploader.md +1 -1
  40. package/dist/design-system/ui/form.md +1 -1
  41. package/dist/design-system/ui/highlight-text.md +1 -1
  42. package/dist/design-system/ui/icons.md +1 -1
  43. package/dist/design-system/ui/image.md +1 -1
  44. package/dist/design-system/ui/input.md +1 -1
  45. package/dist/design-system/ui/label.md +1 -1
  46. package/dist/design-system/ui/month-picker.md +1 -1
  47. package/dist/design-system/ui/multi-select.md +1 -1
  48. package/dist/design-system/ui/navigation-menu.md +1 -1
  49. package/dist/design-system/ui/popover.md +1 -1
  50. package/dist/design-system/ui/portal.md +1 -1
  51. package/dist/design-system/ui/progress.md +1 -1
  52. package/dist/design-system/ui/radio-group.md +1 -1
  53. package/dist/design-system/ui/scroll-area.md +1 -1
  54. package/dist/design-system/ui/select.md +1 -1
  55. package/dist/design-system/ui/separator.md +1 -1
  56. package/dist/design-system/ui/simple-table.md +1 -1
  57. package/dist/design-system/ui/skeleton.md +1 -1
  58. package/dist/design-system/ui/slider.md +1 -1
  59. package/dist/design-system/ui/switch.md +1 -1
  60. package/dist/design-system/ui/symbols.md +1 -1
  61. package/dist/design-system/ui/tabs.md +1 -1
  62. package/dist/design-system/ui/tag.md +1 -1
  63. package/dist/design-system/ui/text.md +1 -1
  64. package/dist/design-system/ui/textarea.md +1 -1
  65. package/dist/design-system/ui/toast.md +1 -1
  66. package/dist/design-system/ui/toggle-group.md +1 -1
  67. package/dist/design-system/ui/toggle.md +1 -1
  68. package/dist/design-system/ui/tooltip.md +1 -1
  69. package/dist/design-system/usage.md +1 -1
  70. package/dist/design-system/when-to-use.md +1 -1
  71. package/dist/styles.css +1 -1
  72. package/dist/types/toast.d.ts +13 -6
  73. package/dist/types/ui.d.ts +13 -6
  74. package/dist/ui/toast.cjs.js +1 -1
  75. package/dist/ui/toast.es.js +64 -54
  76. package/dist/youtube-video-modal-C2GWcF5u.cjs +1 -0
  77. package/dist/youtube-video-modal-CAy1hYoA.js +84 -0
  78. package/package.json +1 -1
  79. package/dist/youtube-video-modal-CNTPCinc.cjs +0 -1
  80. package/dist/youtube-video-modal-CrkV3YQc.js +0 -84
@@ -15,7 +15,7 @@ export declare function toast({ ...props }: Toast_2): {
15
15
  update: (props: ToasterProps) => void;
16
16
  };
17
17
 
18
- declare type Toast_2 = Omit<ToasterProps, "id">;
18
+ declare type Toast_2 = ToastInstanceProps;
19
19
 
20
20
  export declare const ToastAction: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
21
21
 
@@ -25,8 +25,11 @@ export declare const ToastClose: React_2.ForwardRefExoticComponent<Omit<ToastPri
25
25
 
26
26
  export declare const ToastDescription: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
27
27
 
28
- export declare type ToasterProps = ToastProps & ToastViewportProps & {
29
- id?: string;
28
+ export declare type ToasterProps = ToastInstanceProps;
29
+
30
+ export declare function ToastForm(props: ToastStoreItem): JSX_2.Element;
31
+
32
+ declare type ToastInstanceProps = ToastProps & {
30
33
  title?: React_2.ReactNode;
31
34
  description?: React_2.ReactNode;
32
35
  onAction?: () => void;
@@ -35,8 +38,6 @@ export declare type ToasterProps = ToastProps & ToastViewportProps & {
35
38
  onClose?: () => void;
36
39
  };
37
40
 
38
- export declare function ToastForm(props: ToasterProps): JSX_2.Element;
39
-
40
41
  export declare function ToastManager(): JSX_2.Element;
41
42
 
42
43
  export declare type ToastPositionsType = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
@@ -47,6 +48,12 @@ export declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
47
48
 
48
49
  export declare const ToastProvider: React_2.FC<ToastPrimitives.ToastProviderProps>;
49
50
 
51
+ declare type ToastStoreItem = ToastInstanceProps & {
52
+ id: string;
53
+ open: boolean;
54
+ onOpenChange: (open: boolean) => void;
55
+ };
56
+
50
57
  export declare const ToastTitle: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
51
58
 
52
59
  export declare const toastVariants: (props?: ({
@@ -63,7 +70,7 @@ export declare type ToastViewportProps = React_2.ComponentPropsWithoutRef<typeof
63
70
  export declare function useToast(): {
64
71
  toast: typeof toast;
65
72
  dismiss: (toastId?: string) => void;
66
- toasts: ToasterProps[];
73
+ toasts: ToastStoreItem[];
67
74
  };
68
75
 
69
76
  export { }
@@ -810,7 +810,7 @@ export declare function toast({ ...props }: Toast_2): {
810
810
  update: (props: ToasterProps) => void;
811
811
  };
812
812
 
813
- declare type Toast_2 = Omit<ToasterProps, "id">;
813
+ declare type Toast_2 = ToastInstanceProps;
814
814
 
815
815
  export declare const ToastAction: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
816
816
 
@@ -820,8 +820,11 @@ export declare const ToastClose: React_2.ForwardRefExoticComponent<Omit<ToastPri
820
820
 
821
821
  export declare const ToastDescription: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
822
822
 
823
- export declare type ToasterProps = ToastProps & ToastViewportProps & {
824
- id?: string;
823
+ export declare type ToasterProps = ToastInstanceProps;
824
+
825
+ export declare function ToastForm(props: ToastStoreItem): JSX_2.Element;
826
+
827
+ declare type ToastInstanceProps = ToastProps & {
825
828
  title?: React_2.ReactNode;
826
829
  description?: React_2.ReactNode;
827
830
  onAction?: () => void;
@@ -830,8 +833,6 @@ export declare type ToasterProps = ToastProps & ToastViewportProps & {
830
833
  onClose?: () => void;
831
834
  };
832
835
 
833
- export declare function ToastForm(props: ToasterProps): JSX_2.Element;
834
-
835
836
  export declare function ToastManager(): JSX_2.Element;
836
837
 
837
838
  export declare type ToastPositionsType = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
@@ -842,6 +843,12 @@ export declare type ToastProps = React_2.ComponentPropsWithoutRef<typeof Toast>;
842
843
 
843
844
  export declare const ToastProvider: React_2.FC<ToastPrimitives.ToastProviderProps>;
844
845
 
846
+ declare type ToastStoreItem = ToastInstanceProps & {
847
+ id: string;
848
+ open: boolean;
849
+ onOpenChange: (open: boolean) => void;
850
+ };
851
+
845
852
  export declare const ToastTitle: React_2.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
846
853
 
847
854
  export declare const toastVariants: (props?: ({
@@ -967,7 +974,7 @@ export declare const useFormField: () => {
967
974
  export declare function useToast(): {
968
975
  toast: typeof toast;
969
976
  dismiss: (toastId?: string) => void;
970
- toasts: ToasterProps[];
977
+ toasts: ToastStoreItem[];
971
978
  };
972
979
 
973
980
  declare function ViewCard({ size, fill, }: SvgIconType): JSX_2.Element;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),P=require("@radix-ui/react-toast"),C=require("class-variance-authority"),k=require("react"),A=require("./button.cjs.js"),i=require("../common-DeneXo5X.cjs"),q=require("./icons.cjs.js");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const n=N(P),c=N(k),z=5,B=2e3;let m=0;function j(){return m=(m+1)%Number.MAX_SAFE_INTEGER,m.toString()}const p=new Map,v=t=>{if(p.has(t))return;const e=setTimeout(()=>{p.delete(t),d({type:"REMOVE_TOAST",toastId:t})},B);p.set(t,e)},F=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,z)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=e;return o?v(o):t.toasts.forEach(s=>{v(s.id||j())}),{...t,toasts:t.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)}}},f=new Set;let u={toasts:[]};const L=u;function d(t){u=F(u,t),f.forEach(e=>{e()})}function U(t){return f.add(t),()=>{f.delete(t)}}function G(){return u}function Q(){return L}function _({...t}){const e=j(),o=r=>d({type:"UPDATE_TOAST",toast:{...r,id:e}}),s=()=>d({type:"DISMISS_TOAST",toastId:e});return d({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:r=>{var l;r||(s(),(l=t.onClose)==null||l.call(t))}}}),{id:e,dismiss:s,update:o}}function O(){return{...c.useSyncExternalStore(U,G,Q),toast:_,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}function R(t){const{id:e,variant:o,title:s,closeButton:r,onAction:l,actionBtnText:h,description:I}=t,S=l&&h,M=o==="black"?"solid":"outline";return a.jsx(g,{variant:o,...t,children:a.jsxs("div",{className:i.cn("relative flex w-full items-center justify-between gap-2 whitespace-pre-wrap p-4",{"items-end":s,"pr-7":r,"justify-center":!S}),children:[a.jsxs("div",{className:"flex flex-col gap-1",children:[s&&(typeof s!="string"||s.trim().length>0)&&a.jsx(b,{children:s}),a.jsx(w,{children:I})]}),S&&a.jsx(x,{altText:e||"toast action",onClick:l,className:i.cn(A.buttonVariants({variant:M,size:"sm",theme:"secondary"}),{"border-grey-800 bg-grey-800 text-grey-50":o==="black","border-grey-100 bg-gray-50 text-grey-800":o==="white"},"px-2 py-1 text-xs"),children:h}),r&&a.jsx(y,{children:a.jsx(q.Icon.Cancel,{size:"10",className:i.cn({"fill-grey-600 hover:fill-grey-800":o==="white","fill-grey-100 hover:fill-white":o==="black"})})})]})},e)}function X(){const{toasts:t}=O();return a.jsxs(D,{children:[t.map(e=>a.jsx(R,{...e},e.id)),a.jsx(T,{})]})}const D=n.Provider,E={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},T=c.forwardRef(({className:t,id:e,position:o="top-center",...s},r)=>a.jsx(n.Viewport,{ref:r,id:e,className:i.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent",E[o],t),...s}));T.displayName=n.Viewport.displayName;const V=C.cva("group pointer-events-auto bg-opacity-90 overflow-hidden rounded-lg border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),g=c.forwardRef(({className:t,variant:e,size:o,...s},r)=>a.jsx(n.Root,{ref:r,className:i.cn(V({variant:e,size:o}),t),duration:3e3,...s}));g.displayName=n.Root.displayName;const x=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Action,{ref:o,className:i.cn(A.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),t),...e}));x.displayName=n.Action.displayName;const y=c.forwardRef(({className:t,children:e,...o},s)=>a.jsx(n.Close,{ref:s,className:i.cn("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none",t),"toast-close":"",...o,children:e}));y.displayName=n.Close.displayName;const b=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Title,{ref:o,className:i.cn("text-sm font-semibold",t),...e}));b.displayName=n.Title.displayName;const w=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Description,{ref:o,className:i.cn("text-sm font-normal",t),...e}));w.displayName=n.Description.displayName;exports.Toast=g;exports.ToastAction=x;exports.ToastClose=y;exports.ToastDescription=w;exports.ToastForm=R;exports.ToastManager=X;exports.ToastProvider=D;exports.ToastTitle=b;exports.ToastViewport=T;exports.toast=_;exports.toastPositionVariants=E;exports.toastVariants=V;exports.useToast=O;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),C=require("@radix-ui/react-toast"),k=require("class-variance-authority"),q=require("react"),A=require("./button.cjs.js"),i=require("../common-DeneXo5X.cjs"),z=require("./icons.cjs.js");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return e.default=t,Object.freeze(e)}const n=N(C),c=N(q),B=5,F=2e3;let m=0;function j(){return m=(m+1)%Number.MAX_SAFE_INTEGER,m.toString()}const p=new Map,v=t=>{if(p.has(t))return;const e=setTimeout(()=>{p.delete(t),d({type:"REMOVE_TOAST",toastId:t})},F);p.set(t,e)},L=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,B)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case"DISMISS_TOAST":{const{toastId:o}=e;return o?v(o):t.toasts.forEach(s=>{v(s.id||j())}),{...t,toasts:t.toasts.map(s=>s.id===o||o===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)}}},f=new Set;let u={toasts:[]};const U=u;function d(t){u=L(u,t),f.forEach(e=>{e()})}function G(t){return f.add(t),()=>{f.delete(t)}}function Q(){return u}function X(){return U}function _({...t}){const e=j(),o=r=>d({type:"UPDATE_TOAST",toast:{...r,id:e}}),s=()=>d({type:"DISMISS_TOAST",toastId:e});return d({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:r=>{var l;r||(s(),(l=t.onClose)==null||l.call(t))}}}),{id:e,dismiss:s,update:o}}function O(){return{...c.useSyncExternalStore(G,Q,X),toast:_,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}function R(t){const{id:e,variant:o,title:s,closeButton:r,onAction:l,actionBtnText:h,description:I,onClose:H,...M}=t,S=l&&h,P=o==="black"?"solid":"outline";return a.jsx(g,{id:e,variant:o,...M,children:a.jsxs("div",{className:i.cn("relative flex w-full items-center justify-between gap-2 whitespace-pre-wrap p-4",{"items-end":s,"pr-7":r,"justify-center":!S}),children:[a.jsxs("div",{className:"flex flex-col gap-1",children:[s&&(typeof s!="string"||s.trim().length>0)&&a.jsx(b,{children:s}),a.jsx(w,{children:I})]}),S&&a.jsx(x,{altText:e||"toast action",onClick:l,className:i.cn(A.buttonVariants({variant:P,size:"sm",theme:"secondary"}),{"border-grey-800 bg-grey-800 text-grey-50":o==="black","border-grey-100 bg-gray-50 text-grey-800":o==="white"},"px-2 py-1 text-xs"),children:h}),r&&a.jsx(y,{children:a.jsx(z.Icon.Cancel,{size:"10",className:i.cn({"fill-grey-600 hover:fill-grey-800":o==="white","fill-grey-100 hover:fill-white":o==="black"})})})]})},e)}function Y(){const{toasts:t}=O();return a.jsxs(D,{children:[t.map(e=>a.jsx(R,{...e},e.id)),a.jsx(T,{})]})}const D=n.Provider,E={"top-left":"top-0 left-0 bottom-auto mt-10 items-start","top-center":"top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center","top-right":"top-0 right-0 bottom-auto items-end mt-10","bottom-left":"top-auto bottom-4 left-0 items-start","bottom-center":"top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center","bottom-right":"top-auto bottom-4 right-0 items-end"},T=c.forwardRef(({className:t,id:e,position:o="top-center",...s},r)=>a.jsx(n.Viewport,{ref:r,id:e,className:i.cn("fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent",E[o],t),...s}));T.displayName=n.Viewport.displayName;const V=k.cva("group pointer-events-auto bg-opacity-90 overflow-hidden rounded-lg border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",{variants:{variant:{black:"group border bg-grey-800 border-grey-800 text-grey-50",white:"group border bg-grey-50 border-grey-50 text-grey-800"},size:{sm:"w-[300px]",md:"w-[400px]",lg:"w-[600px]",xl:"w-[800px]",full:"w-[90vw]",fit:"w-fit"}},defaultVariants:{variant:"black",size:"fit"}}),g=c.forwardRef(({className:t,variant:e,size:o,...s},r)=>a.jsx(n.Root,{ref:r,className:i.cn(V({variant:e,size:o}),t),duration:3e3,...s}));g.displayName=n.Root.displayName;const x=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Action,{ref:o,className:i.cn(A.buttonVariants({variant:"outline",size:"sm",theme:"secondary"}),t),...e}));x.displayName=n.Action.displayName;const y=c.forwardRef(({className:t,children:e,...o},s)=>a.jsx(n.Close,{ref:s,className:i.cn("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none",t),"toast-close":"",...o,children:e}));y.displayName=n.Close.displayName;const b=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Title,{ref:o,className:i.cn("text-sm font-semibold",t),...e}));b.displayName=n.Title.displayName;const w=c.forwardRef(({className:t,...e},o)=>a.jsx(n.Description,{ref:o,className:i.cn("text-sm font-normal",t),...e}));w.displayName=n.Description.displayName;exports.Toast=g;exports.ToastAction=x;exports.ToastClose=y;exports.ToastDescription=w;exports.ToastForm=R;exports.ToastManager=Y;exports.ToastProvider=D;exports.ToastTitle=b;exports.ToastViewport=T;exports.toast=_;exports.toastPositionVariants=E;exports.toastVariants=V;exports.useToast=O;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as u } from "react/jsx-runtime";
3
3
  import * as r from "@radix-ui/react-toast";
4
- import { cva as R } from "class-variance-authority";
4
+ import { cva as O } from "class-variance-authority";
5
5
  import * as l from "react";
6
6
  import { buttonVariants as x } from "./button.es.js";
7
- import { c as n } from "../common-zQ5XY0UN.js";
8
- import { Icon as _ } from "./icons.es.js";
9
- const D = 5, V = 2e3;
7
+ import { c as i } from "../common-zQ5XY0UN.js";
8
+ import { Icon as D } from "./icons.es.js";
9
+ const V = 5, M = 2e3;
10
10
  let p = 0;
11
11
  function b() {
12
12
  return p = (p + 1) % Number.MAX_SAFE_INTEGER, p.toString();
@@ -19,14 +19,14 @@ const f = /* @__PURE__ */ new Map(), w = (t) => {
19
19
  type: "REMOVE_TOAST",
20
20
  toastId: t
21
21
  });
22
- }, V);
22
+ }, M);
23
23
  f.set(t, e);
24
- }, M = (t, e) => {
24
+ }, C = (t, e) => {
25
25
  switch (e.type) {
26
26
  case "ADD_TOAST":
27
27
  return {
28
28
  ...t,
29
- toasts: [e.toast, ...t.toasts].slice(0, D)
29
+ toasts: [e.toast, ...t.toasts].slice(0, V)
30
30
  };
31
31
  case "UPDATE_TOAST":
32
32
  return {
@@ -58,9 +58,9 @@ const f = /* @__PURE__ */ new Map(), w = (t) => {
58
58
  }
59
59
  }, T = /* @__PURE__ */ new Set();
60
60
  let m = { toasts: [] };
61
- const C = m;
61
+ const P = m;
62
62
  function d(t) {
63
- m = M(m, t), T.forEach((e) => {
63
+ m = C(m, t), T.forEach((e) => {
64
64
  e();
65
65
  });
66
66
  }
@@ -72,13 +72,13 @@ function k(t) {
72
72
  function z() {
73
73
  return m;
74
74
  }
75
- function P() {
76
- return C;
75
+ function j() {
76
+ return P;
77
77
  }
78
- function j({ ...t }) {
79
- const e = b(), o = (i) => d({
78
+ function B({ ...t }) {
79
+ const e = b(), o = (n) => d({
80
80
  type: "UPDATE_TOAST",
81
- toast: { ...i, id: e }
81
+ toast: { ...n, id: e }
82
82
  }), a = () => d({ type: "DISMISS_TOAST", toastId: e });
83
83
  return d({
84
84
  type: "ADD_TOAST",
@@ -86,9 +86,9 @@ function j({ ...t }) {
86
86
  ...t,
87
87
  id: e,
88
88
  open: !0,
89
- onOpenChange: (i) => {
89
+ onOpenChange: (n) => {
90
90
  var c;
91
- i || (a(), (c = t.onClose) == null || c.call(t));
91
+ n || (a(), (c = t.onClose) == null || c.call(t));
92
92
  }
93
93
  }
94
94
  }), {
@@ -97,35 +97,45 @@ function j({ ...t }) {
97
97
  update: o
98
98
  };
99
99
  }
100
- function B() {
100
+ function L() {
101
101
  return {
102
- ...l.useSyncExternalStore(k, z, P),
103
- toast: j,
102
+ ...l.useSyncExternalStore(k, z, j),
103
+ toast: B,
104
104
  dismiss: (e) => d({ type: "DISMISS_TOAST", toastId: e })
105
105
  };
106
106
  }
107
- function L(t) {
108
- const { id: e, variant: o, title: a, closeButton: i, onAction: c, actionBtnText: g, description: I } = t, y = c && g, O = o === "black" ? "solid" : "outline";
109
- return /* @__PURE__ */ s(S, { variant: o, ...t, children: /* @__PURE__ */ u(
107
+ function F(t) {
108
+ const {
109
+ id: e,
110
+ variant: o,
111
+ title: a,
112
+ closeButton: n,
113
+ onAction: c,
114
+ actionBtnText: g,
115
+ description: R,
116
+ onClose: X,
117
+ ..._
118
+ } = t, y = c && g, I = o === "black" ? "solid" : "outline";
119
+ return /* @__PURE__ */ s(S, { id: e, variant: o, ..._, children: /* @__PURE__ */ u(
110
120
  "div",
111
121
  {
112
- className: n("relative flex w-full items-center justify-between gap-2 whitespace-pre-wrap p-4", {
122
+ className: i("relative flex w-full items-center justify-between gap-2 whitespace-pre-wrap p-4", {
113
123
  "items-end": a,
114
- "pr-7": i,
124
+ "pr-7": n,
115
125
  "justify-center": !y
116
126
  }),
117
127
  children: [
118
128
  /* @__PURE__ */ u("div", { className: "flex flex-col gap-1", children: [
119
129
  a && (typeof a != "string" || a.trim().length > 0) && /* @__PURE__ */ s(N, { children: a }),
120
- /* @__PURE__ */ s(E, { children: I })
130
+ /* @__PURE__ */ s(E, { children: R })
121
131
  ] }),
122
132
  y && /* @__PURE__ */ s(
123
133
  v,
124
134
  {
125
135
  altText: e || "toast action",
126
136
  onClick: c,
127
- className: n(
128
- x({ variant: O, size: "sm", theme: "secondary" }),
137
+ className: i(
138
+ x({ variant: I, size: "sm", theme: "secondary" }),
129
139
  {
130
140
  "border-grey-800 bg-grey-800 text-grey-50": o === "black",
131
141
  "border-grey-100 bg-gray-50 text-grey-800": o === "white"
@@ -135,11 +145,11 @@ function L(t) {
135
145
  children: g
136
146
  }
137
147
  ),
138
- i && /* @__PURE__ */ s(A, { children: /* @__PURE__ */ s(
139
- _.Cancel,
148
+ n && /* @__PURE__ */ s(A, { children: /* @__PURE__ */ s(
149
+ D.Cancel,
140
150
  {
141
151
  size: "10",
142
- className: n({
152
+ className: i({
143
153
  "fill-grey-600 hover:fill-grey-800": o === "white",
144
154
  "fill-grey-100 hover:fill-white": o === "black"
145
155
  })
@@ -149,35 +159,35 @@ function L(t) {
149
159
  }
150
160
  ) }, e);
151
161
  }
152
- function J() {
153
- const { toasts: t } = B();
154
- return /* @__PURE__ */ u(F, { children: [
155
- t.map((e) => /* @__PURE__ */ s(L, { ...e }, e.id)),
162
+ function W() {
163
+ const { toasts: t } = L();
164
+ return /* @__PURE__ */ u(U, { children: [
165
+ t.map((e) => /* @__PURE__ */ s(F, { ...e }, e.id)),
156
166
  /* @__PURE__ */ s(h, {})
157
167
  ] });
158
168
  }
159
- const F = r.Provider, U = {
169
+ const U = r.Provider, G = {
160
170
  "top-left": "top-0 left-0 bottom-auto mt-10 items-start",
161
171
  "top-center": "top-0 left-1/2 bottom-auto transform -translate-x-1/2 mt-10 items-center",
162
172
  "top-right": "top-0 right-0 bottom-auto items-end mt-10",
163
173
  "bottom-left": "top-auto bottom-4 left-0 items-start",
164
174
  "bottom-center": "top-auto bottom-4 left-1/2 transform -translate-x-1/2 items-center",
165
175
  "bottom-right": "top-auto bottom-4 right-0 items-end"
166
- }, h = l.forwardRef(({ className: t, id: e, position: o = "top-center", ...a }, i) => /* @__PURE__ */ s(
176
+ }, h = l.forwardRef(({ className: t, id: e, position: o = "top-center", ...a }, n) => /* @__PURE__ */ s(
167
177
  r.Viewport,
168
178
  {
169
- ref: i,
179
+ ref: n,
170
180
  id: e,
171
- className: n(
181
+ className: i(
172
182
  "fixed z-[100] flex flex-col-reverse gap-2 p-4 outline-none ring-transparent",
173
- U[o],
183
+ G[o],
174
184
  t
175
185
  ),
176
186
  ...a
177
187
  }
178
188
  ));
179
189
  h.displayName = r.Viewport.displayName;
180
- const G = R(
190
+ const Q = O(
181
191
  "group pointer-events-auto bg-opacity-90 overflow-hidden rounded-lg border shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-top-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-top-full",
182
192
  {
183
193
  variants: {
@@ -199,11 +209,11 @@ const G = R(
199
209
  size: "fit"
200
210
  }
201
211
  }
202
- ), S = l.forwardRef(({ className: t, variant: e, size: o, ...a }, i) => /* @__PURE__ */ s(
212
+ ), S = l.forwardRef(({ className: t, variant: e, size: o, ...a }, n) => /* @__PURE__ */ s(
203
213
  r.Root,
204
214
  {
205
- ref: i,
206
- className: n(G({ variant: e, size: o }), t),
215
+ ref: n,
216
+ className: i(Q({ variant: e, size: o }), t),
207
217
  duration: 3e3,
208
218
  ...a
209
219
  }
@@ -213,7 +223,7 @@ const v = l.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(
213
223
  r.Action,
214
224
  {
215
225
  ref: o,
216
- className: n(x({ variant: "outline", size: "sm", theme: "secondary" }), t),
226
+ className: i(x({ variant: "outline", size: "sm", theme: "secondary" }), t),
217
227
  ...e
218
228
  }
219
229
  ));
@@ -222,29 +232,29 @@ const A = l.forwardRef(({ className: t, children: e, ...o }, a) => /* @__PURE__
222
232
  r.Close,
223
233
  {
224
234
  ref: a,
225
- className: n("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none", t),
235
+ className: i("absolute right-1.5 top-1.5 rounded-md p-1 focus:outline-none", t),
226
236
  "toast-close": "",
227
237
  ...o,
228
238
  children: e
229
239
  }
230
240
  ));
231
241
  A.displayName = r.Close.displayName;
232
- const N = l.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(r.Title, { ref: o, className: n("text-sm font-semibold", t), ...e }));
242
+ const N = l.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(r.Title, { ref: o, className: i("text-sm font-semibold", t), ...e }));
233
243
  N.displayName = r.Title.displayName;
234
- const E = l.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(r.Description, { ref: o, className: n("text-sm font-normal", t), ...e }));
244
+ const E = l.forwardRef(({ className: t, ...e }, o) => /* @__PURE__ */ s(r.Description, { ref: o, className: i("text-sm font-normal", t), ...e }));
235
245
  E.displayName = r.Description.displayName;
236
246
  export {
237
247
  S as Toast,
238
248
  v as ToastAction,
239
249
  A as ToastClose,
240
250
  E as ToastDescription,
241
- L as ToastForm,
242
- J as ToastManager,
243
- F as ToastProvider,
251
+ F as ToastForm,
252
+ W as ToastManager,
253
+ U as ToastProvider,
244
254
  N as ToastTitle,
245
255
  h as ToastViewport,
246
- j as toast,
247
- U as toastPositionVariants,
248
- G as toastVariants,
249
- B as useToast
256
+ B as toast,
257
+ G as toastPositionVariants,
258
+ Q as toastVariants,
259
+ L as useToast
250
260
  };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime");require("./ui/accordion.cjs.js");require("./ui/alert-dialog.cjs.js");const n=require("./common-DeneXo5X.cjs");require("@radix-ui/react-aspect-ratio");require("./ui/avatar.cjs.js");require("./ui/badge.cjs.js");const a=require("./ui/button.cjs.js");require("./ui/calendar.cjs.js");require("./ui/callout.cjs.js");require("./ui/card.cjs.js");require("./ui/card-label.cjs.js");require("./ui/checkbox.cjs.js");const q=require("lucide-react");require("./ui/command.cjs.js");const i=require("./ui/dialog.cjs.js");require("./ui/dropdown-menu.cjs.js");require("./ui/file-uploader.cjs.js");require("./ui/form.cjs.js");require("./ui/input.cjs.js");require("./ui/label.cjs.js");require("./ui/month-picker.cjs.js");require("./ui/multi-select.cjs.js");require("./ui/navigation-menu.cjs.js");require("./ui/popover.cjs.js");require("./ui/progress.cjs.js");require("./ui/radio-group.cjs.js");require("./ui/scroll-area.cjs.js");require("./ui/select.cjs.js");require("./ui/separator.cjs.js");require("@radix-ui/react-slider");require("react");require("./ui/switch.cjs.js");require("./ui/tabs.cjs.js");require("./ui/tag.cjs.js");require("./ui/text.cjs.js");require("./ui/textarea.cjs.js");require("./ui/toast.cjs.js");require("./ui/toggle.cjs.js");require("./ui/toggle-group.cjs.js");require("./ui/tooltip.cjs.js");const m=r=>{var u;return r.includes("youtu.be")?`https://www.youtube.com/embed/${r.split("/").pop()}`:r.includes("youtube.com/watch")?`https://www.youtube.com/embed/${((u=r.split("v=")[1])==null?void 0:u.split("&")[0])??""}`:r};function p({open:r,onOpenChange:u,url:t,title:o="YouTube video player",autoPlay:s=!0,className:c}){if(!t)return null;const l=m(t),d=s?`${l}${l.includes("?")?"&":"?"}autoplay=1`:l;return e.jsx(i.Dialog,{open:r,onOpenChange:u,children:e.jsxs(i.DialogContent,{className:n.cn("flex h-[88dvh] max-h-[calc(100dvh-32px)] w-[94vw] max-w-[1280px] flex-col gap-0 overflow-hidden bg-white p-0",c),children:[e.jsxs(i.DialogHeader,{className:"shrink-0 flex-row items-start justify-between gap-4 border-b border-grey-200 p-3 text-left md:items-center md:p-4",children:[e.jsx(i.DialogTitle,{className:"min-w-0 flex-1 break-words px-0 text-lg font-bold leading-6 md:px-0",children:o}),e.jsx(i.DialogClose,{asChild:!0,children:e.jsx(a.Button,{type:"button",variant:"text",theme:"secondary","aria-label":"닫기",children:e.jsx(q.X,{size:18})})})]}),e.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center px-4 py-4 md:px-5 md:py-5",children:e.jsx("div",{className:"h-full w-full overflow-hidden rounded-lg bg-black",children:e.jsx("iframe",{className:"h-full w-full border-0",src:d,title:o,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})})]})})}exports.YoutubeVideoModal=p;
@@ -0,0 +1,84 @@
1
+ import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
+ import "./ui/accordion.es.js";
3
+ import "./ui/alert-dialog.es.js";
4
+ import { c } from "./common-zQ5XY0UN.js";
5
+ import "@radix-ui/react-aspect-ratio";
6
+ import "./ui/avatar.es.js";
7
+ import "./ui/badge.es.js";
8
+ import { Button as n } from "./ui/button.es.js";
9
+ import "./ui/calendar.es.js";
10
+ import "./ui/callout.es.js";
11
+ import "./ui/card.es.js";
12
+ import "./ui/card-label.es.js";
13
+ import "./ui/checkbox.es.js";
14
+ import { X as s } from "lucide-react";
15
+ import "./ui/command.es.js";
16
+ import { Dialog as u, DialogContent as f, DialogHeader as b, DialogTitle as h, DialogClose as w } from "./ui/dialog.es.js";
17
+ import "./ui/dropdown-menu.es.js";
18
+ import "./ui/file-uploader.es.js";
19
+ import "./ui/form.es.js";
20
+ import "./ui/input.es.js";
21
+ import "./ui/label.es.js";
22
+ import "./ui/month-picker.es.js";
23
+ import "./ui/multi-select.es.js";
24
+ import "./ui/navigation-menu.es.js";
25
+ import "./ui/popover.es.js";
26
+ import "./ui/progress.es.js";
27
+ import "./ui/radio-group.es.js";
28
+ import "./ui/scroll-area.es.js";
29
+ import "./ui/select.es.js";
30
+ import "./ui/separator.es.js";
31
+ import "@radix-ui/react-slider";
32
+ import "react";
33
+ import "./ui/switch.es.js";
34
+ import "./ui/tabs.es.js";
35
+ import "./ui/tag.es.js";
36
+ import "./ui/text.es.js";
37
+ import "./ui/textarea.es.js";
38
+ import "./ui/toast.es.js";
39
+ import "./ui/toggle.es.js";
40
+ import "./ui/toggle-group.es.js";
41
+ import "./ui/tooltip.es.js";
42
+ const x = (e) => {
43
+ var o;
44
+ return e.includes("youtu.be") ? `https://www.youtube.com/embed/${e.split("/").pop()}` : e.includes("youtube.com/watch") ? `https://www.youtube.com/embed/${((o = e.split("v=")[1]) == null ? void 0 : o.split("&")[0]) ?? ""}` : e;
45
+ };
46
+ function pt({
47
+ open: e,
48
+ onOpenChange: o,
49
+ url: r,
50
+ title: m = "YouTube video player",
51
+ autoPlay: l = !0,
52
+ className: a
53
+ }) {
54
+ if (!r) return null;
55
+ const i = x(r), d = l ? `${i}${i.includes("?") ? "&" : "?"}autoplay=1` : i;
56
+ return /* @__PURE__ */ t(u, { open: e, onOpenChange: o, children: /* @__PURE__ */ p(
57
+ f,
58
+ {
59
+ className: c(
60
+ "flex h-[88dvh] max-h-[calc(100dvh-32px)] w-[94vw] max-w-[1280px] flex-col gap-0 overflow-hidden bg-white p-0",
61
+ a
62
+ ),
63
+ children: [
64
+ /* @__PURE__ */ p(b, { className: "shrink-0 flex-row items-start justify-between gap-4 border-b border-grey-200 p-3 text-left md:items-center md:p-4", children: [
65
+ /* @__PURE__ */ t(h, { className: "min-w-0 flex-1 break-words px-0 text-lg font-bold leading-6 md:px-0", children: m }),
66
+ /* @__PURE__ */ t(w, { asChild: !0, children: /* @__PURE__ */ t(n, { type: "button", variant: "text", theme: "secondary", "aria-label": "닫기", children: /* @__PURE__ */ t(s, { size: 18 }) }) })
67
+ ] }),
68
+ /* @__PURE__ */ t("div", { className: "flex min-h-0 flex-1 items-center justify-center px-4 py-4 md:px-5 md:py-5", children: /* @__PURE__ */ t("div", { className: "h-full w-full overflow-hidden rounded-lg bg-black", children: /* @__PURE__ */ t(
69
+ "iframe",
70
+ {
71
+ className: "h-full w-full border-0",
72
+ src: d,
73
+ title: m,
74
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
75
+ allowFullScreen: !0
76
+ }
77
+ ) }) })
78
+ ]
79
+ }
80
+ ) });
81
+ }
82
+ export {
83
+ pt as Y
84
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boottent-design",
3
- "version": "0.1.263",
3
+ "version": "0.1.264",
4
4
  "description": "부트텐트 디자인시스템 라이브러리",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- "use strict";const e=require("react/jsx-runtime");require("./ui/accordion.cjs.js");require("./ui/alert-dialog.cjs.js");const c=require("./common-DeneXo5X.cjs");require("@radix-ui/react-aspect-ratio");require("./ui/avatar.cjs.js");require("./ui/badge.cjs.js");const d=require("./ui/button.cjs.js");require("./ui/calendar.cjs.js");require("./ui/callout.cjs.js");require("./ui/card.cjs.js");require("./ui/card-label.cjs.js");require("./ui/checkbox.cjs.js");require("lucide-react");require("./ui/command.cjs.js");const i=require("./ui/dialog.cjs.js");require("./ui/dropdown-menu.cjs.js");require("./ui/file-uploader.cjs.js");require("./ui/form.cjs.js");require("./ui/input.cjs.js");require("./ui/label.cjs.js");require("./ui/month-picker.cjs.js");require("./ui/multi-select.cjs.js");require("./ui/navigation-menu.cjs.js");require("./ui/popover.cjs.js");require("./ui/progress.cjs.js");require("./ui/radio-group.cjs.js");require("./ui/scroll-area.cjs.js");require("./ui/select.cjs.js");require("./ui/separator.cjs.js");require("@radix-ui/react-slider");require("react");require("./ui/switch.cjs.js");require("./ui/tabs.cjs.js");require("./ui/tag.cjs.js");require("./ui/text.cjs.js");require("./ui/textarea.cjs.js");require("./ui/toast.cjs.js");require("./ui/toggle.cjs.js");require("./ui/toggle-group.cjs.js");require("./ui/tooltip.cjs.js");const q=r=>{var u;return r.includes("youtu.be")?`https://www.youtube.com/embed/${r.split("/").pop()}`:r.includes("youtube.com/watch")?`https://www.youtube.com/embed/${((u=r.split("v=")[1])==null?void 0:u.split("&")[0])??""}`:r};function p({open:r,onOpenChange:u,url:t,title:o="YouTube video player",autoPlay:s=!0,className:n}){if(!t)return null;const l=q(t),a=s?`${l}${l.includes("?")?"&":"?"}autoplay=1`:l;return e.jsx(i.Dialog,{open:r,onOpenChange:u,children:e.jsxs(i.DialogContent,{className:c.cn("w-[calc(100vw-32px)] max-w-screen-2xl gap-0 bg-white p-0",n),children:[e.jsxs(i.DialogHeader,{className:"flex-row items-center justify-between gap-4 p-4 text-left md:p-5",children:[e.jsx(i.DialogTitle,{className:"px-0 text-lg font-bold leading-6 md:px-0",children:o}),e.jsx(i.DialogClose,{asChild:!0,children:e.jsx(d.Button,{type:"button",variant:"outline",theme:"primary",className:"shrink-0 cursor-pointer rounded-lg border-violet-600 bg-white px-4 py-2 font-semibold text-violet-600 transition-all lg:hover:bg-violet-600 lg:hover:text-white",children:"닫기"})})]}),e.jsx("div",{className:"w-full px-4 pb-4 md:px-5 md:pb-5",children:e.jsx("div",{className:"relative overflow-hidden rounded-lg bg-black pb-[56.25%]",children:e.jsx("iframe",{className:"absolute left-0 top-0 h-full w-full",src:a,title:o,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})})]})})}exports.YoutubeVideoModal=p;
@@ -1,84 +0,0 @@
1
- import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
- import "./ui/accordion.es.js";
3
- import "./ui/alert-dialog.es.js";
4
- import { c } from "./common-zQ5XY0UN.js";
5
- import "@radix-ui/react-aspect-ratio";
6
- import "./ui/avatar.es.js";
7
- import "./ui/badge.es.js";
8
- import { Button as d } from "./ui/button.es.js";
9
- import "./ui/calendar.es.js";
10
- import "./ui/callout.es.js";
11
- import "./ui/card.es.js";
12
- import "./ui/card-label.es.js";
13
- import "./ui/checkbox.es.js";
14
- import "lucide-react";
15
- import "./ui/command.es.js";
16
- import { Dialog as s, DialogContent as u, DialogHeader as b, DialogTitle as h, DialogClose as w } from "./ui/dialog.es.js";
17
- import "./ui/dropdown-menu.es.js";
18
- import "./ui/file-uploader.es.js";
19
- import "./ui/form.es.js";
20
- import "./ui/input.es.js";
21
- import "./ui/label.es.js";
22
- import "./ui/month-picker.es.js";
23
- import "./ui/multi-select.es.js";
24
- import "./ui/navigation-menu.es.js";
25
- import "./ui/popover.es.js";
26
- import "./ui/progress.es.js";
27
- import "./ui/radio-group.es.js";
28
- import "./ui/scroll-area.es.js";
29
- import "./ui/select.es.js";
30
- import "./ui/separator.es.js";
31
- import "@radix-ui/react-slider";
32
- import "react";
33
- import "./ui/switch.es.js";
34
- import "./ui/tabs.es.js";
35
- import "./ui/tag.es.js";
36
- import "./ui/text.es.js";
37
- import "./ui/textarea.es.js";
38
- import "./ui/toast.es.js";
39
- import "./ui/toggle.es.js";
40
- import "./ui/toggle-group.es.js";
41
- import "./ui/tooltip.es.js";
42
- const f = (t) => {
43
- var e;
44
- return t.includes("youtu.be") ? `https://www.youtube.com/embed/${t.split("/").pop()}` : t.includes("youtube.com/watch") ? `https://www.youtube.com/embed/${((e = t.split("v=")[1]) == null ? void 0 : e.split("&")[0]) ?? ""}` : t;
45
- };
46
- function pt({
47
- open: t,
48
- onOpenChange: e,
49
- url: i,
50
- title: p = "YouTube video player",
51
- autoPlay: l = !0,
52
- className: a
53
- }) {
54
- if (!i) return null;
55
- const r = f(i), n = l ? `${r}${r.includes("?") ? "&" : "?"}autoplay=1` : r;
56
- return /* @__PURE__ */ o(s, { open: t, onOpenChange: e, children: /* @__PURE__ */ m(u, { className: c("w-[calc(100vw-32px)] max-w-screen-2xl gap-0 bg-white p-0", a), children: [
57
- /* @__PURE__ */ m(b, { className: "flex-row items-center justify-between gap-4 p-4 text-left md:p-5", children: [
58
- /* @__PURE__ */ o(h, { className: "px-0 text-lg font-bold leading-6 md:px-0", children: p }),
59
- /* @__PURE__ */ o(w, { asChild: !0, children: /* @__PURE__ */ o(
60
- d,
61
- {
62
- type: "button",
63
- variant: "outline",
64
- theme: "primary",
65
- className: "shrink-0 cursor-pointer rounded-lg border-violet-600 bg-white px-4 py-2 font-semibold text-violet-600 transition-all lg:hover:bg-violet-600 lg:hover:text-white",
66
- children: "닫기"
67
- }
68
- ) })
69
- ] }),
70
- /* @__PURE__ */ o("div", { className: "w-full px-4 pb-4 md:px-5 md:pb-5", children: /* @__PURE__ */ o("div", { className: "relative overflow-hidden rounded-lg bg-black pb-[56.25%]", children: /* @__PURE__ */ o(
71
- "iframe",
72
- {
73
- className: "absolute left-0 top-0 h-full w-full",
74
- src: n,
75
- title: p,
76
- allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
77
- allowFullScreen: !0
78
- }
79
- ) }) })
80
- ] }) });
81
- }
82
- export {
83
- pt as Y
84
- };