@xploreu/components 0.4.0 → 0.4.1
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/chunk-2TQHUVNP.js +2 -0
- package/dist/chunk-2TQHUVNP.js.map +1 -0
- package/dist/chunk-7YLS2ZSI.js +2 -0
- package/dist/{chunk-HQEFYA3Z.js.map → chunk-7YLS2ZSI.js.map} +1 -1
- package/dist/chunk-DSH6THYW.js +2 -0
- package/dist/chunk-DSH6THYW.js.map +1 -0
- package/dist/chunk-RBLL355H.js +2 -0
- package/dist/chunk-RBLL355H.js.map +1 -0
- package/dist/composites/combobox-chip-outside.js +1 -1
- package/dist/composites/index.js +1 -1
- package/dist/composites/index.js.map +1 -1
- package/dist/composites/phone-input.js +1 -1
- package/dist/form/form-input.js +1 -1
- package/dist/form/index.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/primitives/alert-dialog.d.ts +34 -0
- package/dist/primitives/alert-dialog.js +2 -0
- package/dist/primitives/alert-dialog.js.map +1 -0
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.js +1 -1
- package/dist/ui/alert-dialog.d.ts +27 -0
- package/dist/ui/alert-dialog.js +2 -0
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/dialog.d.ts +2 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/index.d.ts +4 -1
- package/dist/ui/index.js +1 -1
- package/dist/ui/input.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-6VN6YGMG.js +0 -2
- package/dist/chunk-6VN6YGMG.js.map +0 -1
- package/dist/chunk-HQEFYA3Z.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$1,c,g,d,f as f$1,j,k as k$1,e}from'./chunk-RBLL355H.js';import'react';import {cn}from'@xploreu/lib/cn';import {jsx,jsxs}from'react/jsx-runtime';function u(r){return jsx(b$1,{...r})}function v(r){return jsx(c,{...r})}function x(r){return jsx(g,{...r})}function n({className:r,...e$1}){return jsx(e,{className:cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",r),...e$1})}function f({className:r,children:e,...A}){return jsxs(d,{children:[jsx(n,{}),jsx(f$1,{className:cn("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-md translate-x-[-50%] translate-y-[-50%] border border-border-primary bg-bg-primary shadow-xp-lg rounded-xp-card-base overflow-hidden",r),...A,children:e})]})}function b({className:r,...e}){return jsx("div",{"data-slot":"alert-dialog-header",className:cn("relative px-4 py-3 flex flex-col bg-bg-primary has-[[data-slot=alert-dialog-icon]]:pl-16",r),...e})}function T({className:r,...e}){return jsx("div",{"data-slot":"alert-dialog-content",className:cn("px-4 py-4 max-h-[60vh] overflow-y-auto",r),...e})}function C({className:r,...e}){return jsx("div",{"data-slot":"alert-dialog-footer",className:cn("flex gap-2 items-center justify-end bg-bg-primary px-4 py-3",r),...e})}function _({className:r,...e}){return jsx(j,{className:cn("text-label-bold-2 text-text-primary",r),...e})}function h({className:r,...e}){return jsx(k$1,{className:cn("mt-0.5 text-body-regular-3 text-text-secondary",r),...e})}function k({className:r,...e}){return jsx("div",{"data-slot":"alert-dialog-icon",className:cn("absolute top-[13px] left-4 flex items-center justify-center rounded-lg bg-bg-primary p-2.5 [&_svg]:size-4 bg-bg-brand-solid text-fg-white shadow-[0px_1px_2px_-1px_var(--color-shadow-lg-01),0px_1px_3px_0px_var(--color-shadow-md-01),0px_0px_0px_4px_var(--color-focus-ring-secondary)]",r),...e})}export{u as a,v as b,x as c,f as d,b as e,T as f,C as g,_ as h,h as i,k as j};//# sourceMappingURL=chunk-2TQHUVNP.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-2TQHUVNP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/alert-dialog.tsx"],"names":["AlertDialog","props","jsx","AlertDialogTrigger","AlertDialogClose","AlertDialogBackdrop","className","cn","AlertDialogPopup","children","jsxs","AlertDialogPortal","AlertDialogHeader","AlertDialogContent","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogIcon"],"mappings":"+JAwBA,SAASA,CAAAA,CAAYC,CAAAA,CAAyB,CAC5C,OAAOC,GAAAA,CAACF,GAAAA,CAAA,CAAsB,GAAGC,CAAAA,CAAO,CAC1C,CAIA,SAASE,CAAAA,CAAmBF,CAAAA,CAAgC,CAC1D,OAAOC,GAAAA,CAACC,EAAA,CAA6B,GAAGF,CAAAA,CAAO,CACjD,CAIA,SAASG,CAAAA,CAAiBH,CAAAA,CAA8B,CACtD,OAAOC,GAAAA,CAACE,CAAAA,CAAA,CAA2B,GAAGH,EAAO,CAC/C,CAIA,SAASI,CAAAA,CAAoB,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGL,GAAM,CAAA,CAA6B,CAC9E,OACEC,GAAAA,CAACG,CAAAA,CAAA,CACC,SAAA,CAAWE,EAAAA,CAAG,iDAAA,CAAmDD,CAAS,CAAA,CACzE,GAAGL,GAAAA,CACN,CAEJ,CAIA,SAASO,CAAAA,CAAiB,CAAE,SAAA,CAAAF,CAAAA,CAAW,SAAAG,CAAAA,CAAU,GAAGR,CAAM,CAAA,CAA0B,CAClF,OACES,IAAAA,CAACC,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAT,GAAAA,CAACG,CAAAA,CAAA,EAAoB,CAAA,CACrBH,IAACM,GAAAA,CAAA,CACC,SAAA,CAAWD,EAAAA,CACT,sMAAA,CACAD,CACF,CAAA,CACC,GAAGL,CAAAA,CAEH,QAAA,CAAAQ,CAAAA,CACH,CAAA,CAAA,CACF,CAEJ,CAIA,SAASG,CAAAA,CAAkB,CAAE,SAAA,CAAAN,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAA2B,CAC1E,OACEC,GAAAA,CAAC,KAAA,CAAA,CACC,WAAA,CAAU,qBAAA,CACV,SAAA,CAAWK,GACT,0FAAA,CACAD,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ertDialogPrimitive,\r\n AlertDialogTrigger as AlertDialogTriggerPrimitive,\r\n AlertDialogPortal as AlertDialogPortalPrimitive,\r\n AlertDialogBackdrop as AlertDialogBackdropPrimitive,\r\n AlertDialogPopup as AlertDialogPopupPrimitive,\r\n AlertDialogClose as AlertDialogClosePrimitive,\r\n AlertDialogTitle as AlertDialogTitlePrimitive,\r\n AlertDialogDescription as AlertDialogDescriptionPrimitive,\r\n type AlertDialogProps as AlertDialogPrimitiveProps,\r\n type AlertDialogTriggerProps as AlertDialogTriggerPrimitiveProps,\r\n type AlertDialogPortalProps as AlertDialogPortalPrimitiveProps,\r\n type AlertDialogBackdropProps as AlertDialogBackdropPrimitiveProps,\r\n type AlertDialogPopupProps as AlertDialogPopupPrimitiveProps,\r\n type AlertDialogCloseProps as AlertDialogClosePrimitiveProps,\r\n type AlertDialogTitleProps as AlertDialogTitlePrimitiveProps,\r\n type AlertDialogDescriptionProps as AlertDialogDescriptionPrimitiveProps,\r\n} from '../primitives/alert-dialog';\r\nimport { cn } from '@xploreu/lib/cn';\r\n\r\ntype AlertDialogProps = AlertDialogPrimitiveProps;\r\n\r\nfunction AlertDialog(props: AlertDialogProps) {\r\n return <AlertDialogPrimitive {...props} />;\r\n}\r\n\r\ntype AlertDialogTriggerProps = AlertDialogTriggerPrimitiveProps;\r\n\r\nfunction AlertDialogTrigger(props: AlertDialogTriggerProps) {\r\n return <AlertDialogTriggerPrimitive {...props} />;\r\n}\r\n\r\ntype AlertDialogCloseProps = AlertDialogClosePrimitiveProps;\r\n\r\nfunction AlertDialogClose(props: AlertDialogCloseProps) {\r\n return <AlertDialogClosePrimitive {...props} />;\r\n}\r\n\r\ntype AlertDialogBackdropProps = AlertDialogBackdropPrimitiveProps;\r\n\r\nfunction AlertDialogBackdrop({ className, ...props }: AlertDialogBackdropProps) {\r\n return (\r\n <AlertDialogBackdropPrimitive\r\n className={cn('fixed inset-0 z-50 bg-black/50 backdrop-blur-sm', className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogPopupProps = AlertDialogPopupPrimitiveProps;\r\n\r\nfunction AlertDialogPopup({ className, children, ...props }: AlertDialogPopupProps) {\r\n return (\r\n <AlertDialogPortalPrimitive>\r\n <AlertDialogBackdrop />\r\n <AlertDialogPopupPrimitive\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-md translate-x-[-50%] translate-y-[-50%] border border-border-primary bg-bg-primary shadow-xp-lg rounded-xp-card-base overflow-hidden\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n </AlertDialogPopupPrimitive>\r\n </AlertDialogPortalPrimitive>\r\n );\r\n}\r\n\r\ntype AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\r\n\r\nfunction AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps) {\r\n return (\r\n <div\r\n data-slot=\"alert-dialog-header\"\r\n className={cn(\r\n \"relative px-4 py-3 flex flex-col bg-bg-primary has-[[data-slot=alert-dialog-icon]]:pl-16\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogContentProps = React.HTMLAttributes<HTMLDivElement>;\r\n\r\nfunction AlertDialogContent({ className, ...props }: AlertDialogContentProps) {\r\n return (\r\n <div\r\n data-slot=\"alert-dialog-content\"\r\n className={cn(\"px-4 py-4 max-h-[60vh] overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\r\n\r\nfunction AlertDialogFooter({ className, ...props }: AlertDialogFooterProps) {\r\n return (\r\n <div\r\n data-slot=\"alert-dialog-footer\"\r\n className={cn(\r\n \"flex gap-2 items-center justify-end bg-bg-primary px-4 py-3\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogTitleProps = AlertDialogTitlePrimitiveProps;\r\n\r\nfunction AlertDialogTitle({ className, ...props }: AlertDialogTitleProps) {\r\n return (\r\n <AlertDialogTitlePrimitive\r\n className={cn(\"text-label-bold-2 text-text-primary\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogDescriptionProps = AlertDialogDescriptionPrimitiveProps;\r\n\r\nfunction AlertDialogDescription({ className, ...props }: AlertDialogDescriptionProps) {\r\n return (\r\n <AlertDialogDescriptionPrimitive\r\n className={cn(\"mt-0.5 text-body-regular-3 text-text-secondary\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogIconProps = React.ComponentProps<\"div\">;\r\n\r\nfunction AlertDialogIcon({ className, ...props }: AlertDialogIconProps) {\r\n return (\r\n <div\r\n data-slot=\"alert-dialog-icon\"\r\n className={cn(\r\n \"absolute top-[13px] left-4 flex items-center justify-center rounded-lg bg-bg-primary p-2.5 [&_svg]:size-4 bg-bg-brand-solid text-fg-white shadow-[0px_1px_2px_-1px_var(--color-shadow-lg-01),0px_1px_3px_0px_var(--color-shadow-md-01),0px_0px_0px_4px_var(--color-focus-ring-secondary)]\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogTrigger,\r\n AlertDialogClose,\r\n AlertDialogPopup,\r\n AlertDialogHeader,\r\n AlertDialogContent,\r\n AlertDialogFooter,\r\n AlertDialogTitle,\r\n AlertDialogDescription,\r\n AlertDialogIcon,\r\n type AlertDialogProps,\r\n type AlertDialogTriggerProps,\r\n type AlertDialogCloseProps,\r\n type AlertDialogPopupProps,\r\n type AlertDialogHeaderProps,\r\n type AlertDialogContentProps,\r\n type AlertDialogFooterProps,\r\n type AlertDialogTitleProps,\r\n type AlertDialogDescriptionProps,\r\n};\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-7YLS2ZSI.js"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b,c,g,d,f,h as h$1,i,j,k as k$1,e}from'./chunk-5YDJTHDG.js';import'react';import {XIcon}from'lucide-react';import {cn}from'@xploreu/lib/cn';import {jsx,jsxs}from'react/jsx-runtime';function C(o){return jsx(b,{...o})}function h(o){return jsx(c,{...o})}function k(o){return jsx(g,{...o})}function x({className:o,...i}){return jsx(e,{className:cn("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",o),...i})}function H({className:o,children:i,showCloseButton:c=true,closeClassName:y,...v}){return jsxs(d,{children:[jsx(x,{}),jsxs(f,{className:cn("fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] border border-border-primary bg-bg-primary shadow-xp-lg rounded-xp-card-base overflow-hidden",o),...v,children:[i,c&&jsxs(g,{className:cn("data-[state=open]:bg-bg-primary data-[state=open]:text-text-primary absolute top-3 right-4 rounded-xs transition-colors hover:text-text-error-primary-hover disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",y),children:[jsx(XIcon,{}),jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function N({className:o,...i}){return jsx(h$1,{className:cn("relative px-4 py-3 flex flex-col bg-bg-primary border-b border-border-primary bg-radial-[100%_200%_at_0%_0%] from-modal-dialog-stop-0 to-bg-primary has-[[data-slot=dialog-icon]]:pl-16",o),...i})}function w({className:o,...i}){return jsx("div",{"data-slot":"dialog-content",className:cn("px-4 py-4 max-h-[60vh] overflow-y-auto",o),...i})}function B({className:o,...i$1}){return jsx(i,{className:cn("flex gap-2 items-center justify-end bg-bg-primary border-t border-border-primary px-4 py-3",o),...i$1})}function F({className:o,...i}){return jsx(j,{className:cn("text-label-bold-2 text-text-primary",o),...i})}function z({className:o,...i}){return jsx(k$1,{className:cn("mt-0.5 text-body-regular-3 text-text-secondary",o),...i})}function R({className:o,...i}){return jsx("div",{"data-slot":"dialog-icon",className:cn("absolute top-[13px] left-4 flex items-center justify-center rounded-lg bg-bg-primary p-2.5 [&_svg]:size-4 bg-bg-brand-solid text-fg-white shadow-[0px_1px_2px_-1px_var(--color-shadow-lg-01),0px_1px_3px_0px_var(--color-shadow-md-01),0px_0px_0px_4px_var(--color-focus-ring-secondary)]",o),...i})}export{C as a,h as b,k as c,H as d,N as e,w as f,B as g,F as h,z as i,R as j};//# sourceMappingURL=chunk-DSH6THYW.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-DSH6THYW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ui/dialog.tsx"],"names":["Dialog","props","jsx","DialogTrigger","DialogClose","DialogBackdrop","className","cn","DialogPopup","children","showCloseButton","closeClassName","jsxs","DialogPortal","XIcon","DialogHeader","DialogContent","DialogFooter","DialogTitle","DialogDescription","DialogIcon"],"mappings":"6LA4BA,SAASA,CAAAA,CAAOC,CAAAA,CAAoB,CAClC,OAAOC,GAAAA,CAACF,CAAAA,CAAA,CAAiB,GAAGC,CAAAA,CAAO,CACrC,CAIA,SAASE,CAAAA,CAAcF,EAA2B,CAChD,OAAOC,GAAAA,CAACC,CAAAA,CAAA,CAAwB,GAAGF,CAAAA,CAAO,CAC5C,CAIA,SAASG,CAAAA,CAAYH,CAAAA,CAAyB,CAC5C,OAAOC,GAAAA,CAACE,CAAAA,CAAA,CAAsB,GAAGH,CAAAA,CAAO,CAC1C,CAIA,SAASI,CAAAA,CAAe,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAAwB,CACpE,OACEC,GAAAA,CAACG,CAAAA,CAAA,CACC,SAAA,CAAWE,EAAAA,CAAG,iDAAA,CAAmDD,CAAS,CAAA,CACzE,GAAGL,CAAAA,CACN,CAEJ,CAOA,SAASO,CAAAA,CAAY,CACnB,SAAA,CAAAF,CAAAA,CACA,QAAA,CAAAG,CAAAA,CACA,eAAA,CAAAC,CAAAA,CAAkB,IAAA,CAClB,cAAA,CAAAC,CA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AASiB,CAAAA,CAAY,CAAE,SAAA,CAAAZ,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAAqB,CAC9D,OACEC,GAAAA,CAACgB,CAAAA,CAAA,CACC,UAAWX,EAAAA,CAAG,qCAAA,CAAuCD,CAAS,CAAA,CAC7D,GAAGL,CAAAA,CACN,CAEJ,CAIA,SAASkB,CAAAA,CAAkB,CAAE,SAAA,CAAAb,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAA2B,CAC1E,OACEC,GAAAA,CAACiB,GAAAA,CAAA,CACC,SAAA,CAAWZ,EAAAA,CAAG,gDAAA,CAAkDD,CAAS,CAAA,CACxE,GAAGL,CAAAA,CACN,CAEJ,CAEA,SAASmB,CAAAA,CAAW,CAAE,UAAAd,CAAAA,CAAW,GAAGL,CAAM,CAAA,CAAgC,CACxE,OACEC,GAAAA,CAAC,KAAA,CAAA,CACC,WAAA,CAAU,aAAA,CACV,SAAA,CAAWK,EAAAA,CAAG,2RAAA,CAA6RD,CAAS,CAAA,CACnT,GAAGL,EACN,CAEJ","file":"chunk-DSH6THYW.js","sourcesContent":["import * as React from 'react';\r\nimport { XIcon } from 'lucide-react';\r\n\r\nimport {\r\n Dialog as DialogPrimitive,\r\n DialogPopup as DialogPopupPrimitive,\r\n DialogDescription as DialogDescriptionPrimitive,\r\n DialogFooter as DialogFooterPrimitive,\r\n DialogHeader as DialogHeaderPrimitive,\r\n DialogTitle as DialogTitlePrimitive,\r\n DialogTrigger as DialogTriggerPrimitive,\r\n DialogPortal as DialogPortalPrimitive,\r\n DialogBackdrop as DialogBackdropPrimitive,\r\n DialogClose as DialogClosePrimitive,\r\n type DialogProps as DialogPrimitiveProps,\r\n type DialogPopupProps as DialogPopupPrimitiveProps,\r\n type DialogDescriptionProps as DialogDescriptionPrimitiveProps,\r\n type DialogFooterProps as DialogFooterPrimitiveProps,\r\n type DialogHeaderProps as DialogHeaderPrimitiveProps,\r\n type DialogTitleProps as DialogTitlePrimitiveProps,\r\n type DialogTriggerProps as DialogTriggerPrimitiveProps,\r\n type DialogBackdropProps as DialogBackdropPrimitiveProps,\r\n type DialogCloseProps as DialogClosePrimitiveProps,\r\n} from '../primitives/dialog';\r\nimport { cn } from '@xploreu/lib/cn';\r\n\r\ntype DialogProps = DialogPrimitiveProps;\r\n\r\nfunction Dialog(props: DialogProps) {\r\n return <DialogPrimitive {...props} />;\r\n}\r\n\r\ntype DialogTriggerProps = DialogTriggerPrimitiveProps;\r\n\r\nfunction DialogTrigger(props: DialogTriggerProps) {\r\n return <DialogTriggerPrimitive {...props} />;\r\n}\r\n\r\ntype DialogCloseProps = DialogClosePrimitiveProps;\r\n\r\nfunction DialogClose(props: DialogCloseProps) {\r\n return <DialogClosePrimitive {...props} />;\r\n}\r\n\r\ntype DialogBackdropProps = DialogBackdropPrimitiveProps;\r\n\r\nfunction DialogBackdrop({ className, ...props }: DialogBackdropProps) {\r\n return (\r\n <DialogBackdropPrimitive\r\n className={cn('fixed inset-0 z-50 bg-black/50 backdrop-blur-sm', className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype DialogPopupProps = DialogPopupPrimitiveProps & {\r\n showCloseButton?: boolean;\r\n closeClassName?: string;\r\n};\r\n\r\nfunction DialogPopup({\r\n className,\r\n children,\r\n showCloseButton = true,\r\n closeClassName,\r\n ...props\r\n}: DialogPopupProps) {\r\n return (\r\n <DialogPortalPrimitive>\r\n <DialogBackdrop />\r\n <DialogPopupPrimitive\r\n className={cn(\r\n \"fixed left-[50%] top-[50%] z-50 grid w-[calc(100%-2rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] border border-border-primary bg-bg-primary shadow-xp-lg rounded-xp-card-base overflow-hidden\",\r\n className,\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n {showCloseButton && (\r\n <DialogClosePrimitive\r\n className={cn(\r\n \"data-[state=open]:bg-bg-primary data-[state=open]:text-text-primary absolute top-3 right-4 rounded-xs transition-colors hover:text-text-error-primary-hover disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\r\n closeClassName\r\n )}\r\n >\r\n <XIcon />\r\n <span className=\"sr-only\">Close</span>\r\n </DialogClosePrimitive>\r\n )}\r\n </DialogPopupPrimitive>\r\n </DialogPortalPrimitive>\r\n );\r\n}\r\n\r\ntype DialogHeaderProps = DialogHeaderPrimitiveProps;\r\n\r\nfunction DialogHeader({ className, ...props }: DialogHeaderProps) {\r\n return (\r\n <DialogHeaderPrimitive\r\n className={cn(\"relative px-4 py-3 flex flex-col bg-bg-primary border-b border-border-primary bg-radial-[100%_200%_at_0%_0%] from-modal-dialog-stop-0 to-bg-primary has-[[data-slot=dialog-icon]]:pl-16\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype DialogContentProps = React.HTMLAttributes<HTMLDivElement>;\r\n\r\nfunction DialogContent({ className, ...props }: DialogContentProps) {\r\n return (\r\n <div\r\n data-slot=\"dialog-content\"\r\n className={cn(\"px-4 py-4 max-h-[60vh] overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype DialogFooterProps = DialogFooterPrimitiveProps;\r\n\r\nfunction DialogFooter({ className, ...props }: DialogFooterProps) {\r\n return (\r\n <DialogFooterPrimitive\r\n className={cn(\r\n \"flex gap-2 items-center justify-end bg-bg-primary border-t border-border-primary px-4 py-3\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype DialogTitleProps = DialogTitlePrimitiveProps;\r\n\r\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\r\n return (\r\n <DialogTitlePrimitive\r\n className={cn(\"text-label-bold-2 text-text-primary\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype DialogDescriptionProps = DialogDescriptionPrimitiveProps;\r\n\r\nfunction DialogDescription({ className, ...props }: DialogDescriptionProps) {\r\n return (\r\n <DialogDescriptionPrimitive\r\n className={cn(\"mt-0.5 text-body-regular-3 text-text-secondary\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction DialogIcon({ className, ...props }: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot=\"dialog-icon\"\r\n className={cn(\"absolute top-[13px] left-4 flex items-center justify-center rounded-lg bg-bg-primary p-2.5 [&_svg]:size-4 bg-bg-brand-solid text-fg-white shadow-[0px_1px_2px_-1px_var(--color-shadow-lg-01),0px_1px_3px_0px_var(--color-shadow-md-01),0px_0px_0px_4px_var(--color-focus-ring-secondary)]\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {\r\n Dialog,\r\n DialogTrigger,\r\n DialogClose,\r\n DialogPopup,\r\n DialogHeader,\r\n DialogContent,\r\n DialogFooter,\r\n DialogTitle,\r\n DialogDescription,\r\n DialogIcon,\r\n type DialogProps,\r\n type DialogTriggerProps,\r\n type DialogCloseProps,\r\n type DialogPopupProps,\r\n type DialogHeaderProps,\r\n type DialogContentProps,\r\n type DialogFooterProps,\r\n type DialogTitleProps,\r\n type DialogDescriptionProps,\r\n};"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as l from'react';import {AlertDialog}from'@base-ui/react/alert-dialog';import {AnimatePresence,motion}from'motion/react';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {getStrictContext}from'@xploreu/lib/get-strict-context';import {cn}from'@xploreu/lib/cn';import {jsx}from'react/jsx-runtime';var [v,P]=getStrictContext("AlertDialogContext");function F(t){let[r,i]=useControlledState({value:t?.open,defaultValue:t?.defaultOpen,onChange:t?.onOpenChange});return jsx(v,{value:{open:r,setOpen:i},children:jsx(AlertDialog.Root,{"data-slot":"alert-dialog",...t,onOpenChange:i})})}function M(t){return jsx(AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function H(t){let{open:r}=P();return jsx(AnimatePresence,{children:r&&jsx(AlertDialog.Portal,{"data-slot":"alert-dialog-portal",keepMounted:true,...t})})}function h({transition:t={duration:.2,ease:"easeInOut"},...r}){return jsx(AlertDialog.Backdrop,{"data-slot":"alert-dialog-backdrop",render:jsx(motion.div,{initial:{opacity:0,filter:"blur(4px)"},animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(4px)"},transition:t,...r},"alert-dialog-backdrop")})}function B({from:t="left",initialFocus:r,finalFocus:i,transition:d={type:"spring",stiffness:150,damping:25},className:D,...A}){let n=t==="bottom"||t==="left"?"20deg":"-20deg",a=t==="top"||t==="bottom"?"rotateX":"rotateY",[u,s]=l.useState(false),{open:g}=P();return l.useEffect(()=>{g||s(false);},[g]),jsx(AlertDialog.Popup,{initialFocus:r,finalFocus:i,render:jsx(motion.div,{"data-slot":"alert-dialog-popup","data-opened":u?"":void 0,className:cn("data-[opened]:!transform-none",D),animate:{opacity:1,filter:"blur(0px)",transform:`perspective(500px) ${a}(0deg) scale(1)`},exit:{opacity:0,filter:"blur(4px)",transform:`perspective(500px) ${a}(${n}) scale(0.8)`},initial:{opacity:0,filter:"blur(4px)",transform:`perspective(500px) ${a}(${n}) scale(0.8)`},transition:d,onAnimationComplete:p=>{typeof p=="object"&&"opacity"in p&&p.opacity!==1||requestAnimationFrame(()=>{s(true);});},...A},"alert-dialog-popup")})}function $(t){return jsx(AlertDialog.Close,{"data-slot":"alert-dialog-close",...t})}function L(t){return jsx("div",{"data-slot":"alert-dialog-header",...t})}function S(t){return jsx("div",{"data-slot":"alert-dialog-footer",...t})}function V(t){return jsx(AlertDialog.Title,{"data-slot":"alert-dialog-title",...t})}function q(t){return jsx(AlertDialog.Description,{"data-slot":"alert-dialog-description",...t})}export{P as a,F as b,M as c,H as d,h as e,B as f,$ as g,L as h,S as i,V as j,q as k};//# sourceMappingURL=chunk-RBLL355H.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-RBLL355H.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/primitives/alert-dialog.tsx"],"names":["AlertDialogProvider","useAlertDialog","getStrictContext","AlertDialog","props","open","setOpen","useControlledState","jsx","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","AnimatePresence","AlertDialogBackdrop","transition","motion","AlertDialogPopup","from","initialFocus","finalFocus","className","initialRotation","rotateAxis","opened","setOpened","cn","latest","AlertDialogClose","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription"],"mappings":"yUAeA,IAAM,CAACA,EAAqBC,CAAc,CAAA,CACxCC,gBAAAA,CAAyC,oBAAoB,EAI/D,SAASC,EAAYC,CAAAA,CAAyB,CAC5C,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIC,kBAAAA,CAAmB,CACzC,KAAA,CAAOH,CAAAA,EAAO,IAAA,CACd,aAAcA,CAAAA,EAAO,WAAA,CACrB,SAAUA,CAAAA,EAAO,YACnB,CAAC,CAAA,CAED,OACEI,GAAAA,CAACR,CAAAA,CAAA,CAAoB,KAAA,CAAO,CAAE,IAAA,CAAAK,CAAAA,CAAM,QAAAC,CAAQ,CAAA,CAC1C,SAAAE,GAAAA,CAACC,WAAAA,CAAqB,IAAA,CAArB,CACC,WAAA,CAAU,cAAA,CACT,GAAGL,CAAAA,CACJ,YAAA,CAAcE,EAChB,CAAA,CACF,CAEJ,CAMA,SAASI,CAAAA,CAAmBN,CAAAA,CAAgC,CAC1D,OACEI,GAAAA,CAACC,YAAqB,OAAA,CAArB,CAA6B,YAAU,sBAAA,CAAwB,GAAGL,EAAO,CAE9E,CAOA,SAASO,CAAAA,CAAkBP,CAAAA,CAA+B,CACxD,GAAM,CAAE,IAAA,CAAAC,CAAK,CAAA,CAAIJ,CAAAA,GAEjB,OACEO,GAAAA,CAACI,gBAAA,CACE,QAAA,CAAAP,GACCG,GAAAA,CAACC,WAAAA,CAAqB,OAArB,CACC,WAAA,CAAU,sBACV,WAAA,CAAW,IAAA,CACV,GAAGL,CAAAA,CACN,CAAA,CAEJ,CAEJ,CAQA,SAASS,CAAAA,CAAoB,CAC3B,UAAA,CAAAC,CAAAA,CAAa,CAAE,QAAA,CAAU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ACEI,GAAAA,CAACC,WAAAA,CAAqB,MAArB,CAA2B,WAAA,CAAU,qBAAsB,GAAGL,CAAAA,CAAO,CAE1E,CAMA,SAAS2B,CAAAA,CAAuB3B,EAAoC,CAClE,OACEI,IAACC,WAAAA,CAAqB,WAAA,CAArB,CACC,WAAA,CAAU,0BAAA,CACT,GAAGL,CAAAA,CACN,CAEJ","file":"chunk-RBLL355H.js","sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\r\nimport { AnimatePresence, motion, type HTMLMotionProps } from 'motion/react';\r\n\r\nimport { useControlledState } from '@xploreu/hooks/use-controlled-state';\r\nimport { getStrictContext } from '@xploreu/lib/get-strict-context';\r\nimport { cn } from '@xploreu/lib/cn';\r\n\r\ntype AlertDialogContextType = {\r\n open: boolean;\r\n setOpen: AlertDialogProps['onOpenChange'];\r\n};\r\n\r\nconst [AlertDialogProvider, useAlertDialog] =\r\n getStrictContext<AlertDialogContextType>('AlertDialogContext');\r\n\r\ntype AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>;\r\n\r\nfunction AlertDialog(props: AlertDialogProps) {\r\n const [open, setOpen] = useControlledState({\r\n value: props?.open,\r\n defaultValue: props?.defaultOpen,\r\n onChange: props?.onOpenChange,\r\n });\r\n\r\n return (\r\n <AlertDialogProvider value={{ open, setOpen }}>\r\n <AlertDialogPrimitive.Root\r\n data-slot=\"alert-dialog\"\r\n {...props}\r\n onOpenChange={setOpen}\r\n />\r\n </AlertDialogProvider>\r\n );\r\n}\r\n\r\ntype AlertDialogTriggerProps = React.ComponentProps<\r\n typeof AlertDialogPrimitive.Trigger\r\n>;\r\n\r\nfunction AlertDialogTrigger(props: AlertDialogTriggerProps) {\r\n return (\r\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\r\n );\r\n}\r\n\r\ntype AlertDialogPortalProps = Omit<\r\n React.ComponentProps<typeof AlertDialogPrimitive.Portal>,\r\n 'keepMounted'\r\n>;\r\n\r\nfunction AlertDialogPortal(props: AlertDialogPortalProps) {\r\n const { open } = useAlertDialog();\r\n\r\n return (\r\n <AnimatePresence>\r\n {open && (\r\n <AlertDialogPrimitive.Portal\r\n data-slot=\"alert-dialog-portal\"\r\n keepMounted\r\n {...props}\r\n />\r\n )}\r\n </AnimatePresence>\r\n );\r\n}\r\n\r\ntype AlertDialogBackdropProps = Omit<\r\n React.ComponentProps<typeof AlertDialogPrimitive.Backdrop>,\r\n 'render'\r\n> &\r\n HTMLMotionProps<'div'>;\r\n\r\nfunction AlertDialogBackdrop({\r\n transition = { duration: 0.2, ease: 'easeInOut' },\r\n ...props\r\n}: AlertDialogBackdropProps) {\r\n return (\r\n <AlertDialogPrimitive.Backdrop\r\n data-slot=\"alert-dialog-backdrop\"\r\n render={\r\n <motion.div\r\n key=\"alert-dialog-backdrop\"\r\n initial={{ opacity: 0, filter: 'blur(4px)' }}\r\n animate={{ opacity: 1, filter: 'blur(0px)' }}\r\n exit={{ opacity: 0, filter: 'blur(4px)' }}\r\n transition={transition}\r\n {...props}\r\n />\r\n }\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogFlipDirection = 'top' | 'bottom' | 'left' | 'right';\r\n\r\ntype AlertDialogPopupProps = Omit<\r\n React.ComponentProps<typeof AlertDialogPrimitive.Popup>,\r\n 'render'\r\n> &\r\n HTMLMotionProps<'div'> & {\r\n from?: AlertDialogFlipDirection;\r\n };\r\n\r\nfunction AlertDialogPopup({\r\n from = 'left',\r\n initialFocus,\r\n finalFocus,\r\n transition = { type: 'spring', stiffness: 150, damping: 25 },\r\n className,\r\n ...props\r\n}: AlertDialogPopupProps) {\r\n const initialRotation =\r\n from === 'bottom' || from === 'left' ? '20deg' : '-20deg';\r\n const isVertical = from === 'top' || from === 'bottom';\r\n const rotateAxis = isVertical ? 'rotateX' : 'rotateY';\r\n\r\n const [opened, setOpened] = React.useState(false);\r\n\r\n const { open } = useAlertDialog();\r\n\r\n React.useEffect(() => {\r\n if (open) return;\r\n\r\n setOpened(false);\r\n }, [open]);\r\n\r\n return (\r\n <AlertDialogPrimitive.Popup\r\n initialFocus={initialFocus}\r\n finalFocus={finalFocus}\r\n render={\r\n <motion.div\r\n key=\"alert-dialog-popup\"\r\n data-slot=\"alert-dialog-popup\"\r\n data-opened={opened ? '' : undefined}\r\n className={cn('data-[opened]:!transform-none', className)}\r\n animate={{\r\n opacity: 1,\r\n filter: 'blur(0px)',\r\n transform: `perspective(500px) ${rotateAxis}(0deg) scale(1)`,\r\n }}\r\n exit={{\r\n opacity: 0,\r\n filter: 'blur(4px)',\r\n transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`,\r\n }}\r\n initial={{\r\n opacity: 0,\r\n filter: 'blur(4px)',\r\n transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`,\r\n }}\r\n transition={transition}\r\n onAnimationComplete={(latest) => {\r\n if (\r\n typeof latest === 'object' &&\r\n 'opacity' in latest &&\r\n latest.opacity !== 1\r\n )\r\n return;\r\n\r\n requestAnimationFrame(() => {\r\n setOpened(true);\r\n });\r\n }}\r\n {...props}\r\n />\r\n }\r\n />\r\n );\r\n}\r\n\r\ntype AlertDialogCloseProps = React.ComponentProps<\r\n typeof AlertDialogPrimitive.Close\r\n>;\r\n\r\nfunction AlertDialogClose(props: AlertDialogCloseProps) {\r\n return (\r\n <AlertDialogPrimitive.Close data-slot=\"alert-dialog-close\" {...props} />\r\n );\r\n}\r\n\r\ntype AlertDialogHeaderProps = React.ComponentProps<'div'>;\r\n\r\nfunction AlertDialogHeader(props: AlertDialogHeaderProps) {\r\n return <div data-slot=\"alert-dialog-header\" {...props} />;\r\n}\r\n\r\ntype AlertDialogFooterProps = React.ComponentProps<'div'>;\r\n\r\nfunction AlertDialogFooter(props: AlertDialogFooterProps) {\r\n return <div data-slot=\"alert-dialog-footer\" {...props} />;\r\n}\r\n\r\ntype AlertDialogTitleProps = React.ComponentProps<\r\n typeof AlertDialogPrimitive.Title\r\n>;\r\n\r\nfunction AlertDialogTitle(props: AlertDialogTitleProps) {\r\n return (\r\n <AlertDialogPrimitive.Title data-slot=\"alert-dialog-title\" {...props} />\r\n );\r\n}\r\n\r\ntype AlertDialogDescriptionProps = React.ComponentProps<\r\n typeof AlertDialogPrimitive.Description\r\n>;\r\n\r\nfunction AlertDialogDescription(props: AlertDialogDescriptionProps) {\r\n return (\r\n <AlertDialogPrimitive.Description\r\n data-slot=\"alert-dialog-description\"\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogPortal,\r\n AlertDialogBackdrop,\r\n AlertDialogClose,\r\n AlertDialogTrigger,\r\n AlertDialogPopup,\r\n AlertDialogHeader,\r\n AlertDialogFooter,\r\n AlertDialogTitle,\r\n AlertDialogDescription,\r\n useAlertDialog,\r\n type AlertDialogProps,\r\n type AlertDialogTriggerProps,\r\n type AlertDialogPortalProps,\r\n type AlertDialogCloseProps,\r\n type AlertDialogBackdropProps,\r\n type AlertDialogPopupProps,\r\n type AlertDialogHeaderProps,\r\n type AlertDialogFooterProps,\r\n type AlertDialogTitleProps,\r\n type AlertDialogDescriptionProps,\r\n};\r\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as ComboboxChipOutside}from'../chunk-YZCOEN5Y.js';import'../chunk-
|
|
1
|
+
export{a as ComboboxChipOutside}from'../chunk-YZCOEN5Y.js';import'../chunk-7YLS2ZSI.js';import'../chunk-J6UNQSKZ.js';import'../chunk-3ASGRRVT.js';import'../chunk-K2BMQ2TN.js';import'../chunk-G6HDEOYZ.js';import'../chunk-K7GGFR7W.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-VNAMAKPG.js';import'../chunk-BT5SLUEA.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-DSH6THYW.js';import'../chunk-5YDJTHDG.js';import'../chunk-2TQHUVNP.js';import'../chunk-RBLL355H.js';import'../chunk-TED2PUK6.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';//# sourceMappingURL=combobox-chip-outside.js.map
|
|
2
2
|
//# sourceMappingURL=combobox-chip-outside.js.map
|
package/dist/composites/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as ComboboxChipOutside}from'../chunk-YZCOEN5Y.js';export{a as PhoneInput}from'../chunk-S2GJ24IN.js';import'../chunk-HQEFYA3Z.js';import'../chunk-J6UNQSKZ.js';import'../chunk-3ASGRRVT.js';import'../chunk-K2BMQ2TN.js';import'../chunk-G6HDEOYZ.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-VNAMAKPG.js';import {d,a,m,l,n,o,b,p,t,v,z,G,e,h,x,c}from'../chunk-BT5SLUEA.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-6VN6YGMG.js';import'../chunk-5YDJTHDG.js';import'../chunk-TED2PUK6.js';import {a as a$1}from'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-K7GGFR7W.js';import*as C from'react';import {cn}from'@xploreu/lib/cn';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {ChevronDownIcon,CheckCircle2Icon}from'lucide-react';function te({multiple:t$1=true,inputPlaceholder:b$1="Search...",container:x,items:m$1,infiniteScroll:$,isPending:k,taggable:P=false,maxVisible:f,...g}){let[j,L]=useControlledState({value:g?.inputValue?.toString(),defaultValue:g?.defaultInputValue?.toString(),onChange:g?.onInputValueChange}),[r,v$1]=useControlledState({value:g?.value??[],defaultValue:g?.defaultValue??[],onChange:g?.onValueChange}),[M,z$1]=C.useState([]),y=C.useRef(new Set);C.useEffect(()=>{let o=new Set(r.map(s=>s.value));z$1(s=>{let i=s.filter(e=>o.has(e.value));return i.length===s.length?s:(y.current=new Set(i.map(e=>e.value)),i)});},[r]);let n$1=j?.toString().trim()??"",c=C.useMemo(()=>n$1?r.some(o=>o.value.toLowerCase()===n$1.toLowerCase()):false,[n$1,r]),h=C.useMemo(()=>!P||!n$1?false:!m$1?.some(o=>o.label.toLowerCase()===n$1.toLowerCase()),[P,n$1,m$1]),A=C.useMemo(()=>{let o=[...m$1??[],...M];return h?[...o,{label:n$1,value:n$1,tag:true}]:o},[m$1,M,h,n$1]);return jsxs(d,{...g,behavior:"chip-outside",multiple:true,items:P?A:m$1,isItemEqualToValue:(o,s)=>o.value===s.value,onValueChange:(o,s)=>{if(P){let i=o.filter(e=>e?.tag===true&&!y.current.has(e.value));if(i.length>0){for(let e of i)y.current.add(e.value);z$1(e=>[...e,...i]);}}v$1(t$1?o:[o[o.length-1]],s);},onInputValueChange:L,children:[jsx(a,{className:cn(a$1(),"h-auto min-h-13 flex flex-wrap items-center gap-1.5 px-3 py-1.5 cursor-text"),children:jsxs(m,{className:cn("contents",f!==void 0&&"flex-nowrap overflow-hidden"),children:[jsx(l,{children:o$1=>{let s=f!==void 0?o$1.slice(0,f):o$1,i=f!==void 0?o$1.length-f:0;return jsxs(Fragment,{children:[s?.map(e=>jsxs(n,{className:cn(f!==void 0&&"min-w-0 shrink"),children:[e?.image&&jsx("img",{src:e.image,alt:e?.label||"",className:"size-4 rounded-full object-cover shrink-0 mr-1"}),f!==void 0?jsx("span",{className:"truncate",children:e?.label||""}):e?.label||"",jsx(o,{})]},e?.value||"")),i>0&&jsxs(n,{className:"shrink-0",children:["+",i]})]})}}),jsx(b,{render:jsx("input",{className:"flex-1 min-w-[80px] bg-transparent outline-none text-body-regular-1 text-text-primary placeholder:text-text-placeholder",placeholder:r.length===0?b$1:void 0})})]})}),jsxs(p,{container:x,children:[jsx(t,{status:k||m$1===void 0?"pending":m$1?.length===0&&!h?"empty":null}),jsxs(v,{children:[m$1?.map(o=>jsx(z,{value:o,children:jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[o.image&&jsx("img",{src:o.image,alt:o.label,className:"size-6 rounded-full object-cover shrink-0"}),jsx("span",{className:"truncate",children:o.label})]})},o.value)),h&&jsx(z,{value:{label:n$1,value:n$1,tag:true},children:jsxs("div",{className:"flex items-center gap-1.5 w-full min-w-0",children:[!c&&jsx("span",{className:"text-text-secondary",children:"Create:"}),jsx("span",{className:"font-medium text-text-primary truncate",children:n$1})]})}),jsx(G,{...$})]})]})]})}function le({checked:t}){return jsx("span",{"data-checked":t?"":void 0,className:cn("flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors",t?"border-border-brand bg-bg-brand-solid text-white":"border-border-primary bg-bg-primary"),children:t&&jsx("svg",{viewBox:"0 0 12 12",className:"size-3",fill:"none",children:jsx("path",{d:"M2.5 6L4.75 8.25L9.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}function _({...t}){return jsx(x,{children:jsx(z,{...t,withIndicator:false})})}function se(t){return jsx(c,{...t})}function ie(t$1){let{items:b,placeholder:x="Select",icon:m,container:$,isPending:k,className:P,triggerClassName:f,contentClassName:g,disabled:j,infiniteScroll:L}=t$1,r=t$1.multiple===true,v$1=C.useMemo(()=>{if(r)return t$1.value;let e=t$1.value;return e?[e]:[]},[r,t$1.value,t$1.value]),M=C.useMemo(()=>{if(r)return t$1.defaultValue??[];let e=t$1.defaultValue;return e?[e]:[]},[r,t$1.defaultValue,t$1.defaultValue]),[z,y]=C.useState(()=>(v$1!==void 0?v$1:M)??[]);C.useEffect(()=>{v$1!==void 0&&y(v$1);},[v$1]);let n=z??[],c=n.length>0,[h$1,A]=C.useState(""),B=C.useMemo(()=>{if(!h$1.trim())return b;let e=h$1.toLowerCase();return b?.filter(u=>u.label.toLowerCase().includes(e)||u.value.toLowerCase().includes(e))},[b,h$1]),o=e=>{let u=e;if(r)y(u),t$1.onValueChange?.(u);else {let N=u.length>0?u[u.length-1]:null;y(N?[N]:[]),t$1.onValueChange?.(N);}},s=()=>{y([]),r?t$1.onValueChange?.([]):t$1.onValueChange?.(null);},i=C.useMemo(()=>c?r?`${x} (${n.length})`:n[0]?.label??x:r?`All ${x}`:x,[c,r,x,n]);return jsxs(d,{multiple:true,items:b,value:n,onValueChange:o,isItemEqualToValue:(e,u)=>e.value===u.value,disabled:j,children:[jsxs(e,{className:cn("group flex h-9 w-fit max-w-[220px] items-center gap-2 rounded-xp-card-base border bg-bg-primary px-3 text-body-medium-3 transition-colors","border-border-primary text-text-secondary hover:bg-bg-primary-hover",c&&"border-border-brand bg-bg-brand-primary text-text-brand-secondary","disabled:pointer-events-none disabled:opacity-50","data-[popup-open]:border-border-brand data-[popup-open]:bg-bg-brand-primary data-[popup-open]:text-text-brand-secondary",f,P),children:[m&&jsx("span",{className:cn("size-4 shrink-0",c?"text-fg-brand-primary":"text-fg-quaternary"),children:m}),jsx("span",{className:"truncate",children:i}),jsx(ChevronDownIcon,{className:cn("size-4 shrink-0 transition-transform group-data-[popup-open]:rotate-180",c?"text-fg-brand-primary":"text-fg-quaternary")})]}),jsx(p,{container:$,className:cn("w-72",g),align:"start",sideOffset:8,children:r?jsxs("div",{className:"flex flex-col",children:[jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border-primary",children:[jsx("span",{className:"text-label-semibold-3 text-text-primary",children:x}),jsxs("button",{type:"button",disabled:!c,onClick:s,className:cn("text-body-medium-3 transition-colors",c?"cursor-pointer text-text-brand-secondary hover:text-text-brand-secondary-hover":"cursor-not-allowed text-text-disabled"),children:["Clear",c?` (${n.length})`:""]})]}),jsx(h,{value:h$1,onChange:e=>A(e.target.value),placeholder:`Search ${x.toLowerCase()}...`}),jsx(t,{status:k||b===void 0?"pending":B?.length===0?"empty":null}),jsxs(v,{children:[B?.map(e=>{let u=n.some(N=>N.value===e.value);return jsxs(_,{value:e,children:[jsx(le,{checked:u}),jsx("span",{className:"truncate",children:e.label})]},e.value)}),jsx(G,{...L})]})]}):jsxs(Fragment,{children:[jsx(t,{status:k||b===void 0?"pending":b?.length===0?"empty":null}),jsxs(v,{children:[b?.map(e=>jsxs(_,{value:e,className:"justify-between",children:[jsx("span",{className:"truncate",children:e.label}),jsx(se,{children:jsx(CheckCircle2Icon,{className:"size-5 shrink-0 text-fg-brand-primary"})})]},e.value)),jsx(G,{...L})]})]})})]})}export{te as ComboboxChip,ie as FilterCombobox};//# sourceMappingURL=index.js.map
|
|
1
|
+
export{a as ComboboxChipOutside}from'../chunk-YZCOEN5Y.js';export{a as PhoneInput}from'../chunk-S2GJ24IN.js';import'../chunk-7YLS2ZSI.js';import'../chunk-J6UNQSKZ.js';import'../chunk-3ASGRRVT.js';import'../chunk-K2BMQ2TN.js';import'../chunk-G6HDEOYZ.js';import'../chunk-K7GGFR7W.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-VNAMAKPG.js';import {d,a,m,l,n,o,b,p,t,v,z,G,e,h,x,c}from'../chunk-BT5SLUEA.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-DSH6THYW.js';import'../chunk-5YDJTHDG.js';import'../chunk-2TQHUVNP.js';import'../chunk-RBLL355H.js';import'../chunk-TED2PUK6.js';import {a as a$1}from'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';import*as C from'react';import {cn}from'@xploreu/lib/cn';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {ChevronDownIcon,CheckCircle2Icon}from'lucide-react';function te({multiple:t$1=true,inputPlaceholder:b$1="Search...",container:x,items:m$1,infiniteScroll:$,isPending:k,taggable:P=false,maxVisible:f,...g}){let[j,L]=useControlledState({value:g?.inputValue?.toString(),defaultValue:g?.defaultInputValue?.toString(),onChange:g?.onInputValueChange}),[r,v$1]=useControlledState({value:g?.value??[],defaultValue:g?.defaultValue??[],onChange:g?.onValueChange}),[M,z$1]=C.useState([]),y=C.useRef(new Set);C.useEffect(()=>{let o=new Set(r.map(s=>s.value));z$1(s=>{let i=s.filter(e=>o.has(e.value));return i.length===s.length?s:(y.current=new Set(i.map(e=>e.value)),i)});},[r]);let n$1=j?.toString().trim()??"",c=C.useMemo(()=>n$1?r.some(o=>o.value.toLowerCase()===n$1.toLowerCase()):false,[n$1,r]),h=C.useMemo(()=>!P||!n$1?false:!m$1?.some(o=>o.label.toLowerCase()===n$1.toLowerCase()),[P,n$1,m$1]),A=C.useMemo(()=>{let o=[...m$1??[],...M];return h?[...o,{label:n$1,value:n$1,tag:true}]:o},[m$1,M,h,n$1]);return jsxs(d,{...g,behavior:"chip-outside",multiple:true,items:P?A:m$1,isItemEqualToValue:(o,s)=>o.value===s.value,onValueChange:(o,s)=>{if(P){let i=o.filter(e=>e?.tag===true&&!y.current.has(e.value));if(i.length>0){for(let e of i)y.current.add(e.value);z$1(e=>[...e,...i]);}}v$1(t$1?o:[o[o.length-1]],s);},onInputValueChange:L,children:[jsx(a,{className:cn(a$1(),"h-auto min-h-13 flex flex-wrap items-center gap-1.5 px-3 py-1.5 cursor-text"),children:jsxs(m,{className:cn("contents",f!==void 0&&"flex-nowrap overflow-hidden"),children:[jsx(l,{children:o$1=>{let s=f!==void 0?o$1.slice(0,f):o$1,i=f!==void 0?o$1.length-f:0;return jsxs(Fragment,{children:[s?.map(e=>jsxs(n,{className:cn(f!==void 0&&"min-w-0 shrink"),children:[e?.image&&jsx("img",{src:e.image,alt:e?.label||"",className:"size-4 rounded-full object-cover shrink-0 mr-1"}),f!==void 0?jsx("span",{className:"truncate",children:e?.label||""}):e?.label||"",jsx(o,{})]},e?.value||"")),i>0&&jsxs(n,{className:"shrink-0",children:["+",i]})]})}}),jsx(b,{render:jsx("input",{className:"flex-1 min-w-[80px] bg-transparent outline-none text-body-regular-1 text-text-primary placeholder:text-text-placeholder",placeholder:r.length===0?b$1:void 0})})]})}),jsxs(p,{container:x,children:[jsx(t,{status:k||m$1===void 0?"pending":m$1?.length===0&&!h?"empty":null}),jsxs(v,{children:[m$1?.map(o=>jsx(z,{value:o,children:jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[o.image&&jsx("img",{src:o.image,alt:o.label,className:"size-6 rounded-full object-cover shrink-0"}),jsx("span",{className:"truncate",children:o.label})]})},o.value)),h&&jsx(z,{value:{label:n$1,value:n$1,tag:true},children:jsxs("div",{className:"flex items-center gap-1.5 w-full min-w-0",children:[!c&&jsx("span",{className:"text-text-secondary",children:"Create:"}),jsx("span",{className:"font-medium text-text-primary truncate",children:n$1})]})}),jsx(G,{...$})]})]})]})}function le({checked:t}){return jsx("span",{"data-checked":t?"":void 0,className:cn("flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors",t?"border-border-brand bg-bg-brand-solid text-white":"border-border-primary bg-bg-primary"),children:t&&jsx("svg",{viewBox:"0 0 12 12",className:"size-3",fill:"none",children:jsx("path",{d:"M2.5 6L4.75 8.25L9.5 3.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}function _({...t}){return jsx(x,{children:jsx(z,{...t,withIndicator:false})})}function se(t){return jsx(c,{...t})}function ie(t$1){let{items:b,placeholder:x="Select",icon:m,container:$,isPending:k,className:P,triggerClassName:f,contentClassName:g,disabled:j,infiniteScroll:L}=t$1,r=t$1.multiple===true,v$1=C.useMemo(()=>{if(r)return t$1.value;let e=t$1.value;return e?[e]:[]},[r,t$1.value,t$1.value]),M=C.useMemo(()=>{if(r)return t$1.defaultValue??[];let e=t$1.defaultValue;return e?[e]:[]},[r,t$1.defaultValue,t$1.defaultValue]),[z,y]=C.useState(()=>(v$1!==void 0?v$1:M)??[]);C.useEffect(()=>{v$1!==void 0&&y(v$1);},[v$1]);let n=z??[],c=n.length>0,[h$1,A]=C.useState(""),B=C.useMemo(()=>{if(!h$1.trim())return b;let e=h$1.toLowerCase();return b?.filter(u=>u.label.toLowerCase().includes(e)||u.value.toLowerCase().includes(e))},[b,h$1]),o=e=>{let u=e;if(r)y(u),t$1.onValueChange?.(u);else {let N=u.length>0?u[u.length-1]:null;y(N?[N]:[]),t$1.onValueChange?.(N);}},s=()=>{y([]),r?t$1.onValueChange?.([]):t$1.onValueChange?.(null);},i=C.useMemo(()=>c?r?`${x} (${n.length})`:n[0]?.label??x:r?`All ${x}`:x,[c,r,x,n]);return jsxs(d,{multiple:true,items:b,value:n,onValueChange:o,isItemEqualToValue:(e,u)=>e.value===u.value,disabled:j,children:[jsxs(e,{className:cn("group flex h-9 w-fit max-w-[220px] items-center gap-2 rounded-xp-card-base border bg-bg-primary px-3 text-body-medium-3 transition-colors","border-border-primary text-text-secondary hover:bg-bg-primary-hover",c&&"border-border-brand bg-bg-brand-primary text-text-brand-secondary","disabled:pointer-events-none disabled:opacity-50","data-[popup-open]:border-border-brand data-[popup-open]:bg-bg-brand-primary data-[popup-open]:text-text-brand-secondary",f,P),children:[m&&jsx("span",{className:cn("size-4 shrink-0",c?"text-fg-brand-primary":"text-fg-quaternary"),children:m}),jsx("span",{className:"truncate",children:i}),jsx(ChevronDownIcon,{className:cn("size-4 shrink-0 transition-transform group-data-[popup-open]:rotate-180",c?"text-fg-brand-primary":"text-fg-quaternary")})]}),jsx(p,{container:$,className:cn("w-72",g),align:"start",sideOffset:8,children:r?jsxs("div",{className:"flex flex-col",children:[jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border-primary",children:[jsx("span",{className:"text-label-semibold-3 text-text-primary",children:x}),jsxs("button",{type:"button",disabled:!c,onClick:s,className:cn("text-body-medium-3 transition-colors",c?"cursor-pointer text-text-brand-secondary hover:text-text-brand-secondary-hover":"cursor-not-allowed text-text-disabled"),children:["Clear",c?` (${n.length})`:""]})]}),jsx(h,{value:h$1,onChange:e=>A(e.target.value),placeholder:`Search ${x.toLowerCase()}...`}),jsx(t,{status:k||b===void 0?"pending":B?.length===0?"empty":null}),jsxs(v,{children:[B?.map(e=>{let u=n.some(N=>N.value===e.value);return jsxs(_,{value:e,children:[jsx(le,{checked:u}),jsx("span",{className:"truncate",children:e.label})]},e.value)}),jsx(G,{...L})]})]}):jsxs(Fragment,{children:[jsx(t,{status:k||b===void 0?"pending":b?.length===0?"empty":null}),jsxs(v,{children:[b?.map(e=>jsxs(_,{value:e,className:"justify-between",children:[jsx("span",{className:"truncate",children:e.label}),jsx(se,{children:jsx(CheckCircle2Icon,{className:"size-5 shrink-0 text-fg-brand-primary"})})]},e.value)),jsx(G,{...L})]})]})})]})}export{te as ComboboxChip,ie as FilterCombobox};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/composites/combobox-chip.tsx","../../src/composites/filter-combobox.tsx"],"names":["ComboboxChip","multiple","inputPlaceholder","container","items","infiniteScroll","isPending","taggable","maxVisible","props","inputValue","setInputValue","useControlledState","value","setValue","createdItems","setCreatedItems","p","createdValuesRef","currentValues","v","prev","next","item","trimmedInput","isInputSelected","isCreatingItem","combinedItems","base","jsxs","Combobox","a","b","eventDetails","newTags","tag","jsx","ComboboxInputGroup","cn","inputVariants","ComboboxChips","ComboboxValue","visible","overflow","Fragment","ComboboxChipRemove","ComboboxInput","ComboboxPopup","ComboboxStatus","ComboboxList","ComboboxItem","ComboboxInfiniteScroll","MiniCheckbox","checked","FilterItem","ComboboxHighlightItem","FilterItemIndicator","ComboboxItemIndicator","FilterCombobox","placeholder","icon","className","triggerClassName","contentClassName","disabled","isMultiple","controlledArray","single","defaultArray","internalValue","setInternalValue","valueArray","hasValue","search","setSearch","filteredItems","q","it","handleValueChange","arr","handleClear","triggerLabel","ComboboxTrigger","ChevronDownIcon","CheckCircle2Icon"],"mappings":"u9QA6CA,SAASA,EAAAA,CAAyF,CAChG,QAAA,CAAAC,GAAAA,CAAW,IAAA,CACX,iBAAAC,GAAAA,CAAmB,WAAA,CACnB,SAAA,CAAAC,CAAAA,CACA,MAAAC,GAAAA,CACA,cAAA,CAAAC,CAAAA,CAC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B,CAAAA,CAAA,CAA4B,KAAA,CAAO/B,CAAAA,CAAM,SAAA,CAAU,iBAAA,CAClD,QAAA,CAAA,CAAAa,GAAAA,CAAC,QAAK,SAAA,CAAU,UAAA,CAAY,QAAA,CAAAb,CAAAA,CAAK,MAAM,CAAA,CACvCa,GAAAA,CAACoB,EAAAA,CAAA,CACC,SAAApB,GAAAA,CAACgD,gBAAAA,CAAA,CAAiB,SAAA,CAAU,wCAAwC,CAAA,CACtE,CAAA,CAAA,CAAA,CAJe7D,CAAAA,CAAK,KAKtB,CACD,CAAA,CACDa,GAAAA,CAACe,CAAAA,CAAA,CAAwB,GAAG9C,CAAAA,CAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,CAAA,CAEJ,GACF,CAEJ","file":"index.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport {\r\n ComboboxInput as ComboboxInputPrimitive,\r\n ComboboxInputGroup,\r\n} from \"../primitives/combobox\"\r\nimport {\r\n Combobox,\r\n ComboboxChip as ComboboxChipUI,\r\n ComboboxChipRemove,\r\n ComboboxChips,\r\n ComboboxInfiniteScroll,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPortal,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxValue,\r\n type ComboboxProps\r\n} from \"../ui/combobox\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\nimport { inputVariants } from \"../ui/input\"\r\n\r\ntype ComboboxChipProps<Value> = Omit<ComboboxProps<Value, true>, \"multiple\"> & {\r\n multiple?: boolean\r\n inputPlaceholder?: string\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n items: ({ label: string; value: string; image?: string }[]) | undefined\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n isPending?: boolean\r\n /**\r\n * When true, enables creatable / taggable mode.\r\n * If the typed value has no exact match in the current item list,\r\n * a \"Create \\\"…\\\"\" option is shown at the top of the dropdown.\r\n * Created items are appended to the value with `{ label, value, tag: true }`.\r\n */\r\n taggable?: boolean\r\n /**\r\n * Maximum number of chips to show before collapsing the rest into a \"+N\" chip.\r\n * When undefined, all chips are shown.\r\n */\r\n maxVisible?: number\r\n}\r\n\r\nfunction ComboboxChip<Value extends { label: string; value: string; image?: string; tag?: true }>({\r\n multiple = true,\r\n inputPlaceholder = \"Search...\",\r\n container,\r\n items,\r\n infiniteScroll,\r\n isPending,\r\n taggable = false,\r\n maxVisible,\r\n ...props\r\n}: ComboboxChipProps<Value>) {\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [value, setValue] = useControlledState({\r\n value: props?.value ?? [],\r\n defaultValue: props?.defaultValue ?? [],\r\n onChange: props?.onValueChange,\r\n })\r\n\r\n // Track items created via taggable mode\r\n // Sync with value to avoid stale tags when controlled value is reset from outside\r\n const [createdItems, setCreatedItems] = React.useState<Value[]>([])\r\n const createdValuesRef = React.useRef<Set<string>>(new Set())\r\n\r\n React.useEffect(() => {\r\n const currentValues = new Set(value.map((v) => v.value))\r\n setCreatedItems((prev) => {\r\n const next = prev.filter((item) => currentValues.has(item.value))\r\n if (next.length === prev.length) return prev\r\n createdValuesRef.current = new Set(next.map((v) => v.value))\r\n return next\r\n })\r\n }, [value])\r\n\r\n const trimmedInput = inputValue?.toString().trim() ?? \"\"\r\n const isInputSelected = React.useMemo(() => {\r\n if (!trimmedInput) return false\r\n return value.some(\r\n (item) => item.value.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [trimmedInput, value])\r\n\r\n // true = show the taggable item in dropdown (either as \"Create:\" or as checked item)\r\n const isCreatingItem = React.useMemo(() => {\r\n if (!taggable || !trimmedInput) return false\r\n return !items?.some(\r\n (item) => item.label.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [taggable, trimmedInput, items])\r\n\r\n // Merge server items with locally created tags + the \"Create\" placeholder\r\n const combinedItems = React.useMemo(() => {\r\n const base: Value[] = [\r\n ...items ?? [],\r\n ...createdItems,\r\n ]\r\n\r\n if (isCreatingItem) {\r\n return [...base, { label: trimmedInput, value: trimmedInput, tag: true } as unknown as Value]\r\n }\r\n\r\n return base\r\n }, [items, createdItems, isCreatingItem, trimmedInput])\r\n\r\n const handleValueChange: ComboboxProps<Value, true>[\"onValueChange\"] = (value, eventDetails) => {\r\n if (taggable) {\r\n const newTags = value.filter(\r\n (v) => v?.tag === true && !createdValuesRef.current.has(v.value)\r\n )\r\n if (newTags.length > 0) {\r\n for (const tag of newTags) {\r\n createdValuesRef.current.add(tag.value)\r\n }\r\n setCreatedItems((prev) => [...prev, ...newTags])\r\n }\r\n }\r\n\r\n if (!multiple) {\r\n setValue([value[value.length - 1]], eventDetails)\r\n } else {\r\n setValue(value, eventDetails)\r\n }\r\n }\r\n\r\n return (\r\n <Combobox\r\n {...props}\r\n behavior=\"chip-outside\"\r\n multiple\r\n items={taggable ? combinedItems : items}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n >\r\n {/* Input box with chips inside */}\r\n <ComboboxInputGroup\r\n className={cn(\r\n inputVariants(),\r\n \"h-auto min-h-13 flex flex-wrap items-center gap-1.5 px-3 py-1.5 cursor-text\"\r\n )}\r\n >\r\n {/* Chips inside the input box */}\r\n <ComboboxChips\r\n className={cn(\r\n \"contents\",\r\n maxVisible !== undefined && \"flex-nowrap overflow-hidden\"\r\n )}\r\n >\r\n <ComboboxValue>\r\n {(value: Value[]) => {\r\n const visible = maxVisible !== undefined ? value.slice(0, maxVisible) : value\r\n const overflow = maxVisible !== undefined ? value.length - maxVisible : 0\r\n return (\r\n <>\r\n {visible?.map((item) => (\r\n <ComboboxChipUI\r\n key={item?.value || \"\"}\r\n className={cn(maxVisible !== undefined && \"min-w-0 shrink\")}\r\n >\r\n {item?.image && (\r\n <img\r\n src={item.image}\r\n alt={item?.label || \"\"}\r\n className=\"size-4 rounded-full object-cover shrink-0 mr-1\"\r\n />\r\n )}\r\n {maxVisible !== undefined\r\n ? <span className=\"truncate\">{item?.label || \"\"}</span>\r\n : (item?.label || \"\")\r\n }\r\n <ComboboxChipRemove />\r\n </ComboboxChipUI>\r\n ))}\r\n {overflow > 0 && (\r\n <ComboboxChipUI className=\"shrink-0\">\r\n +{overflow}\r\n </ComboboxChipUI>\r\n )}\r\n </>\r\n )\r\n }}\r\n </ComboboxValue>\r\n {/* Text input — shrinks to fit remaining space (inside Chips so backspace works) */}\r\n <ComboboxInputPrimitive\r\n render={\r\n <input\r\n className=\"flex-1 min-w-[80px] bg-transparent outline-none text-body-regular-1 text-text-primary placeholder:text-text-placeholder\"\r\n placeholder={value.length === 0 ? inputPlaceholder : undefined}\r\n />\r\n }\r\n />\r\n </ComboboxChips>\r\n </ComboboxInputGroup>\r\n\r\n <ComboboxPopup container={container}>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0 && !isCreatingItem\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <ComboboxItem\r\n key={item.value}\r\n value={item as Value}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n {item.image && (\r\n <img\r\n src={item.image}\r\n alt={item.label}\r\n className=\"size-6 rounded-full object-cover shrink-0\"\r\n />\r\n )}\r\n <span className=\"truncate\">{item.label}</span>\r\n </div>\r\n </ComboboxItem>\r\n ))}\r\n {isCreatingItem && (\r\n <ComboboxItem\r\n value={{ label: trimmedInput, value: trimmedInput, tag: true }}\r\n >\r\n <div className=\"flex items-center gap-1.5 w-full min-w-0\">\r\n {!isInputSelected && (\r\n <span className=\"text-text-secondary\">Create:</span>\r\n )}\r\n <span className=\"font-medium text-text-primary truncate\">\r\n {trimmedInput}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { ComboboxChip }\r\nexport type { ComboboxChipProps }\r\n","\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { CheckCircle2Icon, ChevronDownIcon, SearchIcon } from \"lucide-react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport {\r\n ComboboxItemIndicator as ComboboxItemIndicatorPrimitive\r\n} from \"../primitives/combobox\"\r\nimport { ComboboxHighlightItem, ComboboxItem } from \"../ui/combobox\"\r\nimport { Input } from \"../ui/input\"\r\nimport {\r\n Combobox,\r\n ComboboxInfiniteScroll,\r\n ComboboxInput,\r\n ComboboxList,\r\n ComboboxPopup,\r\n ComboboxPortal,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n type ComboboxProps,\r\n} from \"../ui/combobox\"\r\n\r\n// ─── Types ───\r\n\r\nexport type FilterComboboxItem = {\r\n label: string\r\n value: string\r\n}\r\n\r\ntype BaseProps = {\r\n items: FilterComboboxItem[] | undefined\r\n placeholder?: string\r\n icon?: React.ReactNode\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n isPending?: boolean\r\n className?: string\r\n triggerClassName?: string\r\n contentClassName?: string\r\n disabled?: boolean\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n}\r\n\r\ntype SingleProps = BaseProps & {\r\n multiple?: false\r\n value?: FilterComboboxItem | null\r\n defaultValue?: FilterComboboxItem | null\r\n onValueChange?: (value: FilterComboboxItem | null) => void\r\n}\r\n\r\ntype MultipleProps = BaseProps & {\r\n multiple: true\r\n value?: FilterComboboxItem[]\r\n defaultValue?: FilterComboboxItem[]\r\n onValueChange?: (value: FilterComboboxItem[]) => void\r\n}\r\n\r\nexport type FilterComboboxProps = SingleProps | MultipleProps\r\n\r\n// ─── Mini checkbox (no extra dep) ───\r\n\r\nfunction MiniCheckbox({ checked }: { checked: boolean }) {\r\n return (\r\n <span\r\n data-checked={checked ? \"\" : undefined}\r\n className={cn(\r\n \"flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors\",\r\n checked\r\n ? \"border-border-brand bg-bg-brand-solid text-white\"\r\n : \"border-border-primary bg-bg-primary\"\r\n )}\r\n >\r\n {checked && (\r\n <svg viewBox=\"0 0 12 12\" className=\"size-3\" fill=\"none\">\r\n <path\r\n d=\"M2.5 6L4.75 8.25L9.5 3.5\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.5\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n )}\r\n </span>\r\n )\r\n}\r\n\r\n// ─── Clean item without default indicator (fix double checkbox bug) ───\r\n\r\nfunction FilterItem({\r\n ...props\r\n}: React.ComponentProps<typeof ComboboxItem>) {\r\n return (\r\n <ComboboxHighlightItem>\r\n <ComboboxItem\r\n {...props}\r\n withIndicator={false}\r\n />\r\n </ComboboxHighlightItem>\r\n )\r\n}\r\n\r\nfunction FilterItemIndicator(props: React.ComponentProps<typeof ComboboxItemIndicatorPrimitive>) {\r\n return <ComboboxItemIndicatorPrimitive {...props} />\r\n}\r\n\r\n// ─── Component ───\r\n\r\nfunction FilterCombobox(props: FilterComboboxProps) {\r\n const {\r\n items,\r\n placeholder = \"Select\",\r\n icon,\r\n container,\r\n isPending,\r\n className,\r\n triggerClassName,\r\n contentClassName,\r\n disabled,\r\n infiniteScroll,\r\n } = props\r\n\r\n const isMultiple = props.multiple === true\r\n\r\n // Normalize controlled value to array for internal combobox (always multiple=true internally)\r\n const controlledArray = React.useMemo(() => {\r\n if (isMultiple) {\r\n return (props as MultipleProps).value\r\n }\r\n const single = (props as SingleProps).value\r\n return single ? [single] : []\r\n }, [isMultiple, (props as SingleProps).value, (props as MultipleProps).value])\r\n\r\n const defaultArray = React.useMemo(() => {\r\n if (isMultiple) {\r\n return (props as MultipleProps).defaultValue ?? []\r\n }\r\n const single = (props as SingleProps).defaultValue\r\n return single ? [single] : []\r\n }, [isMultiple, (props as SingleProps).defaultValue, (props as MultipleProps).defaultValue])\r\n\r\n const [internalValue, setInternalValue] = React.useState<FilterComboboxItem[]>(\r\n () =>\r\n (controlledArray !== undefined\r\n ? (controlledArray as FilterComboboxItem[])\r\n : (defaultArray as FilterComboboxItem[])) ?? []\r\n )\r\n\r\n // Sync when controlled value changes externally\r\n React.useEffect(() => {\r\n if (controlledArray !== undefined) {\r\n setInternalValue(controlledArray as FilterComboboxItem[])\r\n }\r\n }, [controlledArray])\r\n\r\n const valueArray = internalValue ?? []\r\n const hasValue = valueArray.length > 0\r\n\r\n // Search for multiple variant\r\n const [search, setSearch] = React.useState(\"\")\r\n\r\n const filteredItems = React.useMemo(() => {\r\n if (!search.trim()) return items\r\n const q = search.toLowerCase()\r\n return items?.filter(\r\n (it) => it.label.toLowerCase().includes(q) || it.value.toLowerCase().includes(q)\r\n )\r\n }, [items, search])\r\n\r\n const handleValueChange: ComboboxProps<FilterComboboxItem, boolean>[\"onValueChange\"] = (\r\n next\r\n ) => {\r\n const arr = next as FilterComboboxItem[]\r\n if (isMultiple) {\r\n setInternalValue(arr)\r\n ; (props as MultipleProps).onValueChange?.(arr)\r\n } else {\r\n // single: take last selected (base-ui gives array)\r\n const single = arr.length > 0 ? arr[arr.length - 1] : null\r\n const normalized = single ? [single] : []\r\n setInternalValue(normalized)\r\n ; (props as SingleProps).onValueChange?.(single)\r\n }\r\n }\r\n\r\n const handleClear = () => {\r\n setInternalValue([])\r\n if (isMultiple) {\r\n ; (props as MultipleProps).onValueChange?.([])\r\n } else {\r\n ; (props as SingleProps).onValueChange?.(null)\r\n }\r\n }\r\n\r\n // Trigger label\r\n const triggerLabel = React.useMemo(() => {\r\n if (!hasValue) {\r\n return isMultiple ? `All ${placeholder}` : placeholder\r\n }\r\n if (isMultiple) {\r\n return `${placeholder} (${valueArray.length})`\r\n }\r\n return valueArray[0]?.label ?? placeholder\r\n }, [hasValue, isMultiple, placeholder, valueArray])\r\n\r\n return (\r\n <Combobox\r\n multiple\r\n items={items}\r\n value={valueArray}\r\n onValueChange={handleValueChange}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n disabled={disabled}\r\n >\r\n <ComboboxTrigger\r\n className={cn(\r\n \"group flex h-9 w-fit max-w-[220px] items-center gap-2 rounded-xp-card-base border bg-bg-primary px-3 text-body-medium-3 transition-colors\",\r\n \"border-border-primary text-text-secondary hover:bg-bg-primary-hover\",\r\n hasValue && \"border-border-brand bg-bg-brand-primary text-text-brand-secondary\",\r\n \"disabled:pointer-events-none disabled:opacity-50\",\r\n \"data-[popup-open]:border-border-brand data-[popup-open]:bg-bg-brand-primary data-[popup-open]:text-text-brand-secondary\",\r\n triggerClassName,\r\n className\r\n )}\r\n >\r\n {icon && (\r\n <span\r\n className={cn(\r\n \"size-4 shrink-0\",\r\n hasValue ? \"text-fg-brand-primary\" : \"text-fg-quaternary\"\r\n )}\r\n >\r\n {icon}\r\n </span>\r\n )}\r\n <span className=\"truncate\">{triggerLabel}</span>\r\n <ChevronDownIcon\r\n className={cn(\r\n \"size-4 shrink-0 transition-transform group-data-[popup-open]:rotate-180\",\r\n hasValue ? \"text-fg-brand-primary\" : \"text-fg-quaternary\"\r\n )}\r\n />\r\n </ComboboxTrigger>\r\n\r\n <ComboboxPopup\r\n container={container}\r\n className={cn(\"w-72\", contentClassName)}\r\n align=\"start\"\r\n sideOffset={8}\r\n >\r\n {isMultiple ? (\r\n <div className=\"flex flex-col\">\r\n {/* Header: title + Clear (n) */}\r\n <div className=\"flex items-center justify-between px-3 py-2 border-b border-border-primary\">\r\n <span className=\"text-label-semibold-3 text-text-primary\">{placeholder}</span>\r\n <button\r\n type=\"button\"\r\n disabled={!hasValue}\r\n onClick={handleClear}\r\n className={cn(\r\n \"text-body-medium-3 transition-colors\",\r\n hasValue\r\n ? \"cursor-pointer text-text-brand-secondary hover:text-text-brand-secondary-hover\"\r\n : \"cursor-not-allowed text-text-disabled\"\r\n )}\r\n >\r\n Clear{hasValue ? ` (${valueArray.length})` : \"\"}\r\n </button>\r\n </div>\r\n\r\n {/* Search */}\r\n <ComboboxInput\r\n value={search}\r\n onChange={(e) => setSearch(e.target.value)}\r\n placeholder={`Search ${placeholder.toLowerCase()}...`}\r\n />\r\n\r\n {/* List */}\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : filteredItems?.length === 0\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {filteredItems?.map((item) => {\r\n const checked = valueArray.some((v) => v.value === item.value)\r\n return (\r\n <FilterItem key={item.value} value={item}>\r\n <MiniCheckbox checked={checked} />\r\n <span className=\"truncate\">{item.label}</span>\r\n </FilterItem>\r\n )\r\n })}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </div>\r\n ) : (\r\n <>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <FilterItem key={item.value} value={item} className=\"justify-between\">\r\n <span className=\"truncate\">{item.label}</span>\r\n <FilterItemIndicator>\r\n <CheckCircle2Icon className=\"size-5 shrink-0 text-fg-brand-primary\" />\r\n </FilterItemIndicator>\r\n </FilterItem>\r\n ))}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </>\r\n )}\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { FilterCombobox }\r\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/composites/combobox-chip.tsx","../../src/composites/filter-combobox.tsx"],"names":["ComboboxChip","multiple","inputPlaceholder","container","items","infiniteScroll","isPending","taggable","maxVisible","props","inputValue","setInputValue","useControlledState","value","setValue","createdItems","setCreatedItems","p","createdValuesRef","currentValues","v","prev","next","item","trimmedInput","isInputSelected","isCreatingItem","combinedItems","base","jsxs","Combobox","a","b","eventDetails","newTags","tag","jsx","ComboboxInputGroup","cn","inputVariants","ComboboxChips","ComboboxValue","visible","overflow","Fragment","ComboboxChipRemove","ComboboxInput","ComboboxPopup","ComboboxStatus","ComboboxList","ComboboxItem","ComboboxInfiniteScroll","MiniCheckbox","checked","FilterItem","ComboboxHighlightItem","FilterItemIndicator","ComboboxItemIndicator","FilterCombobox","placeholder","icon","className","triggerClassName","contentClassName","disabled","isMultiple","controlledArray","single","defaultArray","internalValue","setInternalValue","valueArray","hasValue","search","setSearch","filteredItems","q","it","handleValueChange","arr","handleClear","triggerLabel","ComboboxTrigger","ChevronDownIcon","CheckCircle2Icon"],"mappings":"ihRA6CA,SAASA,EAAAA,CAAyF,CAChG,QAAA,CAAAC,GAAAA,CAAW,IAAA,CACX,iBAAAC,GAAAA,CAAmB,WAAA,CACnB,SAAA,CAAAC,CAAAA,CACA,MAAAC,GAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,EACA,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,UAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAA6B,CAC3B,GAAM,CAACC,CAAAA,CAAYC,CAAa,EAAIC,kBAAAA,CAAmB,CACrD,KAAA,CAAOH,CAAAA,EAAO,YAAY,QAAA,EAAS,CACnC,YAAA,CAAcA,CAAAA,EAAO,iBAAA,EAAmB,QAAA,EAAS,CACjD,QAAA,CAAUA,GAAO,kBACnB,CAAC,CAAA,CAEK,CAACI,EAAOC,GAAQ,CAAA,CAAIF,kBAAAA,CAAmB,CAC3C,MAAOH,CAAAA,EAAO,KAAA,EAAS,EAAC,CACxB,YAAA,CAAcA,CAAAA,EAAO,YAAA,EAAgB,GACrC,QAAA,CAAUA,CAAAA,EAAO,aACnB,CAAC,EAIK,CAACM,CAAAA,CAAcC,GAAe,CAAA,CAAUC,WAAkB,EAAE,CAAA,CAC5DC,CAAAA,CAAyBD,CAAA,CAAA,MAAA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AAAA,CAAA,CAAa,OAAA,CAASC,EAAS,CAAA,CAChCjB,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,WAAY,QAAA,CAAAb,CAAAA,CAAK,KAAA,CAAM,CAAA,CAAA,CAAA,CAFxBA,EAAK,KAGtB,CAEJ,CAAC,CAAA,CACDa,GAAAA,CAACe,CAAAA,CAAA,CAAwB,GAAG9C,EAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,CAAA,CAEAwB,IAAAA,CAAAe,SAAA,CACE,QAAA,CAAA,CAAAR,GAAAA,CAACY,CAAAA,CAAA,CACC,MAAA,CACE1C,CAAAA,EAAaF,CAAAA,GAAU,MAAA,CACnB,SAAA,CACAA,CAAAA,EAAO,MAAA,GAAW,CAAA,CAChB,QACA,IAAA,CAEV,CAAA,CACAyB,IAAAA,CAACoB,CAAAA,CAAA,CACE,QAAA,CAAA,CAAA7C,CAAAA,EAAO,GAAA,CAAKmB,CAAAA,EACXM,KAACyB,CAAAA,CAAA,CAA4B,KAAA,CAAO/B,CAAAA,CAAM,SAAA,CAAU,iBAAA,CAClD,QAAA,CAAA,CAAAa,GAAAA,CAAC,QAAK,SAAA,CAAU,UAAA,CAAY,QAAA,CAAAb,CAAAA,CAAK,MAAM,CAAA,CACvCa,GAAAA,CAACoB,EAAAA,CAAA,CACC,SAAApB,GAAAA,CAACgD,gBAAAA,CAAA,CAAiB,SAAA,CAAU,wCAAwC,CAAA,CACtE,CAAA,CAAA,CAAA,CAJe7D,CAAAA,CAAK,KAKtB,CACD,CAAA,CACDa,GAAAA,CAACe,CAAAA,CAAA,CAAwB,GAAG9C,CAAAA,CAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,CAAA,CAEJ,GACF,CAEJ","file":"index.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport {\r\n ComboboxInput as ComboboxInputPrimitive,\r\n ComboboxInputGroup,\r\n} from \"../primitives/combobox\"\r\nimport {\r\n Combobox,\r\n ComboboxChip as ComboboxChipUI,\r\n ComboboxChipRemove,\r\n ComboboxChips,\r\n ComboboxInfiniteScroll,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPortal,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxValue,\r\n type ComboboxProps\r\n} from \"../ui/combobox\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\nimport { inputVariants } from \"../ui/input\"\r\n\r\ntype ComboboxChipProps<Value> = Omit<ComboboxProps<Value, true>, \"multiple\"> & {\r\n multiple?: boolean\r\n inputPlaceholder?: string\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n items: ({ label: string; value: string; image?: string }[]) | undefined\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n isPending?: boolean\r\n /**\r\n * When true, enables creatable / taggable mode.\r\n * If the typed value has no exact match in the current item list,\r\n * a \"Create \\\"…\\\"\" option is shown at the top of the dropdown.\r\n * Created items are appended to the value with `{ label, value, tag: true }`.\r\n */\r\n taggable?: boolean\r\n /**\r\n * Maximum number of chips to show before collapsing the rest into a \"+N\" chip.\r\n * When undefined, all chips are shown.\r\n */\r\n maxVisible?: number\r\n}\r\n\r\nfunction ComboboxChip<Value extends { label: string; value: string; image?: string; tag?: true }>({\r\n multiple = true,\r\n inputPlaceholder = \"Search...\",\r\n container,\r\n items,\r\n infiniteScroll,\r\n isPending,\r\n taggable = false,\r\n maxVisible,\r\n ...props\r\n}: ComboboxChipProps<Value>) {\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [value, setValue] = useControlledState({\r\n value: props?.value ?? [],\r\n defaultValue: props?.defaultValue ?? [],\r\n onChange: props?.onValueChange,\r\n })\r\n\r\n // Track items created via taggable mode\r\n // Sync with value to avoid stale tags when controlled value is reset from outside\r\n const [createdItems, setCreatedItems] = React.useState<Value[]>([])\r\n const createdValuesRef = React.useRef<Set<string>>(new Set())\r\n\r\n React.useEffect(() => {\r\n const currentValues = new Set(value.map((v) => v.value))\r\n setCreatedItems((prev) => {\r\n const next = prev.filter((item) => currentValues.has(item.value))\r\n if (next.length === prev.length) return prev\r\n createdValuesRef.current = new Set(next.map((v) => v.value))\r\n return next\r\n })\r\n }, [value])\r\n\r\n const trimmedInput = inputValue?.toString().trim() ?? \"\"\r\n const isInputSelected = React.useMemo(() => {\r\n if (!trimmedInput) return false\r\n return value.some(\r\n (item) => item.value.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [trimmedInput, value])\r\n\r\n // true = show the taggable item in dropdown (either as \"Create:\" or as checked item)\r\n const isCreatingItem = React.useMemo(() => {\r\n if (!taggable || !trimmedInput) return false\r\n return !items?.some(\r\n (item) => item.label.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [taggable, trimmedInput, items])\r\n\r\n // Merge server items with locally created tags + the \"Create\" placeholder\r\n const combinedItems = React.useMemo(() => {\r\n const base: Value[] = [\r\n ...items ?? [],\r\n ...createdItems,\r\n ]\r\n\r\n if (isCreatingItem) {\r\n return [...base, { label: trimmedInput, value: trimmedInput, tag: true } as unknown as Value]\r\n }\r\n\r\n return base\r\n }, [items, createdItems, isCreatingItem, trimmedInput])\r\n\r\n const handleValueChange: ComboboxProps<Value, true>[\"onValueChange\"] = (value, eventDetails) => {\r\n if (taggable) {\r\n const newTags = value.filter(\r\n (v) => v?.tag === true && !createdValuesRef.current.has(v.value)\r\n )\r\n if (newTags.length > 0) {\r\n for (const tag of newTags) {\r\n createdValuesRef.current.add(tag.value)\r\n }\r\n setCreatedItems((prev) => [...prev, ...newTags])\r\n }\r\n }\r\n\r\n if (!multiple) {\r\n setValue([value[value.length - 1]], eventDetails)\r\n } else {\r\n setValue(value, eventDetails)\r\n }\r\n }\r\n\r\n return (\r\n <Combobox\r\n {...props}\r\n behavior=\"chip-outside\"\r\n multiple\r\n items={taggable ? combinedItems : items}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n >\r\n {/* Input box with chips inside */}\r\n <ComboboxInputGroup\r\n className={cn(\r\n inputVariants(),\r\n \"h-auto min-h-13 flex flex-wrap items-center gap-1.5 px-3 py-1.5 cursor-text\"\r\n )}\r\n >\r\n {/* Chips inside the input box */}\r\n <ComboboxChips\r\n className={cn(\r\n \"contents\",\r\n maxVisible !== undefined && \"flex-nowrap overflow-hidden\"\r\n )}\r\n >\r\n <ComboboxValue>\r\n {(value: Value[]) => {\r\n const visible = maxVisible !== undefined ? value.slice(0, maxVisible) : value\r\n const overflow = maxVisible !== undefined ? value.length - maxVisible : 0\r\n return (\r\n <>\r\n {visible?.map((item) => (\r\n <ComboboxChipUI\r\n key={item?.value || \"\"}\r\n className={cn(maxVisible !== undefined && \"min-w-0 shrink\")}\r\n >\r\n {item?.image && (\r\n <img\r\n src={item.image}\r\n alt={item?.label || \"\"}\r\n className=\"size-4 rounded-full object-cover shrink-0 mr-1\"\r\n />\r\n )}\r\n {maxVisible !== undefined\r\n ? <span className=\"truncate\">{item?.label || \"\"}</span>\r\n : (item?.label || \"\")\r\n }\r\n <ComboboxChipRemove />\r\n </ComboboxChipUI>\r\n ))}\r\n {overflow > 0 && (\r\n <ComboboxChipUI className=\"shrink-0\">\r\n +{overflow}\r\n </ComboboxChipUI>\r\n )}\r\n </>\r\n )\r\n }}\r\n </ComboboxValue>\r\n {/* Text input — shrinks to fit remaining space (inside Chips so backspace works) */}\r\n <ComboboxInputPrimitive\r\n render={\r\n <input\r\n className=\"flex-1 min-w-[80px] bg-transparent outline-none text-body-regular-1 text-text-primary placeholder:text-text-placeholder\"\r\n placeholder={value.length === 0 ? inputPlaceholder : undefined}\r\n />\r\n }\r\n />\r\n </ComboboxChips>\r\n </ComboboxInputGroup>\r\n\r\n <ComboboxPopup container={container}>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0 && !isCreatingItem\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <ComboboxItem\r\n key={item.value}\r\n value={item as Value}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n {item.image && (\r\n <img\r\n src={item.image}\r\n alt={item.label}\r\n className=\"size-6 rounded-full object-cover shrink-0\"\r\n />\r\n )}\r\n <span className=\"truncate\">{item.label}</span>\r\n </div>\r\n </ComboboxItem>\r\n ))}\r\n {isCreatingItem && (\r\n <ComboboxItem\r\n value={{ label: trimmedInput, value: trimmedInput, tag: true }}\r\n >\r\n <div className=\"flex items-center gap-1.5 w-full min-w-0\">\r\n {!isInputSelected && (\r\n <span className=\"text-text-secondary\">Create:</span>\r\n )}\r\n <span className=\"font-medium text-text-primary truncate\">\r\n {trimmedInput}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { ComboboxChip }\r\nexport type { ComboboxChipProps }\r\n","\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { CheckCircle2Icon, ChevronDownIcon, SearchIcon } from \"lucide-react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport {\r\n ComboboxItemIndicator as ComboboxItemIndicatorPrimitive\r\n} from \"../primitives/combobox\"\r\nimport { ComboboxHighlightItem, ComboboxItem } from \"../ui/combobox\"\r\nimport { Input } from \"../ui/input\"\r\nimport {\r\n Combobox,\r\n ComboboxInfiniteScroll,\r\n ComboboxInput,\r\n ComboboxList,\r\n ComboboxPopup,\r\n ComboboxPortal,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n type ComboboxProps,\r\n} from \"../ui/combobox\"\r\n\r\n// ─── Types ───\r\n\r\nexport type FilterComboboxItem = {\r\n label: string\r\n value: string\r\n}\r\n\r\ntype BaseProps = {\r\n items: FilterComboboxItem[] | undefined\r\n placeholder?: string\r\n icon?: React.ReactNode\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n isPending?: boolean\r\n className?: string\r\n triggerClassName?: string\r\n contentClassName?: string\r\n disabled?: boolean\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n}\r\n\r\ntype SingleProps = BaseProps & {\r\n multiple?: false\r\n value?: FilterComboboxItem | null\r\n defaultValue?: FilterComboboxItem | null\r\n onValueChange?: (value: FilterComboboxItem | null) => void\r\n}\r\n\r\ntype MultipleProps = BaseProps & {\r\n multiple: true\r\n value?: FilterComboboxItem[]\r\n defaultValue?: FilterComboboxItem[]\r\n onValueChange?: (value: FilterComboboxItem[]) => void\r\n}\r\n\r\nexport type FilterComboboxProps = SingleProps | MultipleProps\r\n\r\n// ─── Mini checkbox (no extra dep) ───\r\n\r\nfunction MiniCheckbox({ checked }: { checked: boolean }) {\r\n return (\r\n <span\r\n data-checked={checked ? \"\" : undefined}\r\n className={cn(\r\n \"flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors\",\r\n checked\r\n ? \"border-border-brand bg-bg-brand-solid text-white\"\r\n : \"border-border-primary bg-bg-primary\"\r\n )}\r\n >\r\n {checked && (\r\n <svg viewBox=\"0 0 12 12\" className=\"size-3\" fill=\"none\">\r\n <path\r\n d=\"M2.5 6L4.75 8.25L9.5 3.5\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"1.5\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n )}\r\n </span>\r\n )\r\n}\r\n\r\n// ─── Clean item without default indicator (fix double checkbox bug) ───\r\n\r\nfunction FilterItem({\r\n ...props\r\n}: React.ComponentProps<typeof ComboboxItem>) {\r\n return (\r\n <ComboboxHighlightItem>\r\n <ComboboxItem\r\n {...props}\r\n withIndicator={false}\r\n />\r\n </ComboboxHighlightItem>\r\n )\r\n}\r\n\r\nfunction FilterItemIndicator(props: React.ComponentProps<typeof ComboboxItemIndicatorPrimitive>) {\r\n return <ComboboxItemIndicatorPrimitive {...props} />\r\n}\r\n\r\n// ─── Component ───\r\n\r\nfunction FilterCombobox(props: FilterComboboxProps) {\r\n const {\r\n items,\r\n placeholder = \"Select\",\r\n icon,\r\n container,\r\n isPending,\r\n className,\r\n triggerClassName,\r\n contentClassName,\r\n disabled,\r\n infiniteScroll,\r\n } = props\r\n\r\n const isMultiple = props.multiple === true\r\n\r\n // Normalize controlled value to array for internal combobox (always multiple=true internally)\r\n const controlledArray = React.useMemo(() => {\r\n if (isMultiple) {\r\n return (props as MultipleProps).value\r\n }\r\n const single = (props as SingleProps).value\r\n return single ? [single] : []\r\n }, [isMultiple, (props as SingleProps).value, (props as MultipleProps).value])\r\n\r\n const defaultArray = React.useMemo(() => {\r\n if (isMultiple) {\r\n return (props as MultipleProps).defaultValue ?? []\r\n }\r\n const single = (props as SingleProps).defaultValue\r\n return single ? [single] : []\r\n }, [isMultiple, (props as SingleProps).defaultValue, (props as MultipleProps).defaultValue])\r\n\r\n const [internalValue, setInternalValue] = React.useState<FilterComboboxItem[]>(\r\n () =>\r\n (controlledArray !== undefined\r\n ? (controlledArray as FilterComboboxItem[])\r\n : (defaultArray as FilterComboboxItem[])) ?? []\r\n )\r\n\r\n // Sync when controlled value changes externally\r\n React.useEffect(() => {\r\n if (controlledArray !== undefined) {\r\n setInternalValue(controlledArray as FilterComboboxItem[])\r\n }\r\n }, [controlledArray])\r\n\r\n const valueArray = internalValue ?? []\r\n const hasValue = valueArray.length > 0\r\n\r\n // Search for multiple variant\r\n const [search, setSearch] = React.useState(\"\")\r\n\r\n const filteredItems = React.useMemo(() => {\r\n if (!search.trim()) return items\r\n const q = search.toLowerCase()\r\n return items?.filter(\r\n (it) => it.label.toLowerCase().includes(q) || it.value.toLowerCase().includes(q)\r\n )\r\n }, [items, search])\r\n\r\n const handleValueChange: ComboboxProps<FilterComboboxItem, boolean>[\"onValueChange\"] = (\r\n next\r\n ) => {\r\n const arr = next as FilterComboboxItem[]\r\n if (isMultiple) {\r\n setInternalValue(arr)\r\n ; (props as MultipleProps).onValueChange?.(arr)\r\n } else {\r\n // single: take last selected (base-ui gives array)\r\n const single = arr.length > 0 ? arr[arr.length - 1] : null\r\n const normalized = single ? [single] : []\r\n setInternalValue(normalized)\r\n ; (props as SingleProps).onValueChange?.(single)\r\n }\r\n }\r\n\r\n const handleClear = () => {\r\n setInternalValue([])\r\n if (isMultiple) {\r\n ; (props as MultipleProps).onValueChange?.([])\r\n } else {\r\n ; (props as SingleProps).onValueChange?.(null)\r\n }\r\n }\r\n\r\n // Trigger label\r\n const triggerLabel = React.useMemo(() => {\r\n if (!hasValue) {\r\n return isMultiple ? `All ${placeholder}` : placeholder\r\n }\r\n if (isMultiple) {\r\n return `${placeholder} (${valueArray.length})`\r\n }\r\n return valueArray[0]?.label ?? placeholder\r\n }, [hasValue, isMultiple, placeholder, valueArray])\r\n\r\n return (\r\n <Combobox\r\n multiple\r\n items={items}\r\n value={valueArray}\r\n onValueChange={handleValueChange}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n disabled={disabled}\r\n >\r\n <ComboboxTrigger\r\n className={cn(\r\n \"group flex h-9 w-fit max-w-[220px] items-center gap-2 rounded-xp-card-base border bg-bg-primary px-3 text-body-medium-3 transition-colors\",\r\n \"border-border-primary text-text-secondary hover:bg-bg-primary-hover\",\r\n hasValue && \"border-border-brand bg-bg-brand-primary text-text-brand-secondary\",\r\n \"disabled:pointer-events-none disabled:opacity-50\",\r\n \"data-[popup-open]:border-border-brand data-[popup-open]:bg-bg-brand-primary data-[popup-open]:text-text-brand-secondary\",\r\n triggerClassName,\r\n className\r\n )}\r\n >\r\n {icon && (\r\n <span\r\n className={cn(\r\n \"size-4 shrink-0\",\r\n hasValue ? \"text-fg-brand-primary\" : \"text-fg-quaternary\"\r\n )}\r\n >\r\n {icon}\r\n </span>\r\n )}\r\n <span className=\"truncate\">{triggerLabel}</span>\r\n <ChevronDownIcon\r\n className={cn(\r\n \"size-4 shrink-0 transition-transform group-data-[popup-open]:rotate-180\",\r\n hasValue ? \"text-fg-brand-primary\" : \"text-fg-quaternary\"\r\n )}\r\n />\r\n </ComboboxTrigger>\r\n\r\n <ComboboxPopup\r\n container={container}\r\n className={cn(\"w-72\", contentClassName)}\r\n align=\"start\"\r\n sideOffset={8}\r\n >\r\n {isMultiple ? (\r\n <div className=\"flex flex-col\">\r\n {/* Header: title + Clear (n) */}\r\n <div className=\"flex items-center justify-between px-3 py-2 border-b border-border-primary\">\r\n <span className=\"text-label-semibold-3 text-text-primary\">{placeholder}</span>\r\n <button\r\n type=\"button\"\r\n disabled={!hasValue}\r\n onClick={handleClear}\r\n className={cn(\r\n \"text-body-medium-3 transition-colors\",\r\n hasValue\r\n ? \"cursor-pointer text-text-brand-secondary hover:text-text-brand-secondary-hover\"\r\n : \"cursor-not-allowed text-text-disabled\"\r\n )}\r\n >\r\n Clear{hasValue ? ` (${valueArray.length})` : \"\"}\r\n </button>\r\n </div>\r\n\r\n {/* Search */}\r\n <ComboboxInput\r\n value={search}\r\n onChange={(e) => setSearch(e.target.value)}\r\n placeholder={`Search ${placeholder.toLowerCase()}...`}\r\n />\r\n\r\n {/* List */}\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : filteredItems?.length === 0\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {filteredItems?.map((item) => {\r\n const checked = valueArray.some((v) => v.value === item.value)\r\n return (\r\n <FilterItem key={item.value} value={item}>\r\n <MiniCheckbox checked={checked} />\r\n <span className=\"truncate\">{item.label}</span>\r\n </FilterItem>\r\n )\r\n })}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </div>\r\n ) : (\r\n <>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <FilterItem key={item.value} value={item} className=\"justify-between\">\r\n <span className=\"truncate\">{item.label}</span>\r\n <FilterItemIndicator>\r\n <CheckCircle2Icon className=\"size-5 shrink-0 text-fg-brand-primary\" />\r\n </FilterItemIndicator>\r\n </FilterItem>\r\n ))}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </>\r\n )}\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { FilterCombobox }\r\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as PhoneInput}from'../chunk-S2GJ24IN.js';import'../chunk-BT5SLUEA.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-TED2PUK6.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-
|
|
1
|
+
export{a as PhoneInput}from'../chunk-S2GJ24IN.js';import'../chunk-BT5SLUEA.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-TED2PUK6.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';//# sourceMappingURL=phone-input.js.map
|
|
2
2
|
//# sourceMappingURL=phone-input.js.map
|
package/dist/form/form-input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as FormInput}from'../chunk-J6UNQSKZ.js';import'../chunk-G6HDEOYZ.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-
|
|
1
|
+
export{a as FormInput}from'../chunk-J6UNQSKZ.js';import'../chunk-G6HDEOYZ.js';import'../chunk-K7GGFR7W.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';//# sourceMappingURL=form-input.js.map
|
|
2
2
|
//# sourceMappingURL=form-input.js.map
|