ivt 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge/index.mjs +1 -1
- package/dist/base/index.mjs +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/chunks/badge-CPhxsSVZ.mjs +2 -0
- package/dist/chunks/badge-CPhxsSVZ.mjs.map +1 -0
- package/dist/chunks/{calendar-BCdWZz2_.mjs → calendar-CvUHWFGI.mjs} +2 -2
- package/dist/chunks/{calendar-BCdWZz2_.mjs.map → calendar-CvUHWFGI.mjs.map} +1 -1
- package/dist/multi-select/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunks/badge-DQMrqIyu.mjs +0 -2
- package/dist/chunks/badge-DQMrqIyu.mjs.map +0 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
import{cva as e}from"class-variance-authority";import*as t from"react";import{c as r}from"../chunks/utils-C1EKaz-p.mjs";import{c as a}from"../chunks/createLucideIcon-Bub0IDlo.mjs";import{X as n}from"../chunks/x-B1PdcxpA.mjs";import{S as s}from"../chunks/separator-DbIrm4r-.mjs";import{C as o}from"../chunks/chevron-down-DDHw_qmV.mjs";import{C as m}from"../chunks/check-CTdDPXjk.mjs";import{C as l,b as c,c as i,d as u,e as d,f as p,h}from"../chunks/command-B20MmNTS.mjs";import{P as f,a as x,b as g}from"../chunks/popover-CLYjD1Mz.mjs";import{B as k}from"../chunks/button-Dhe5fFAk.mjs";import{B as v}from"../chunks/badge-
|
1
|
+
import{cva as e}from"class-variance-authority";import*as t from"react";import{c as r}from"../chunks/utils-C1EKaz-p.mjs";import{c as a}from"../chunks/createLucideIcon-Bub0IDlo.mjs";import{X as n}from"../chunks/x-B1PdcxpA.mjs";import{S as s}from"../chunks/separator-DbIrm4r-.mjs";import{C as o}from"../chunks/chevron-down-DDHw_qmV.mjs";import{C as m}from"../chunks/check-CTdDPXjk.mjs";import{C as l,b as c,c as i,d as u,e as d,f as p,h}from"../chunks/command-B20MmNTS.mjs";import{P as f,a as x,b as g}from"../chunks/popover-CLYjD1Mz.mjs";import{B as k}from"../chunks/button-Dhe5fFAk.mjs";import{B as v}from"../chunks/badge-CPhxsSVZ.mjs";import"../chunks/bundle-mjs-DRUwh-0R.mjs";import"../chunks/index-DuDVR7ID.mjs";import"react-dom";import"@radix-ui/react-slot";import"react/jsx-runtime";import"../chunks/index-BOWDavn2.mjs";import"../chunks/index-CaYe_hNP.mjs";import"../chunks/index-DmBXPUeL.mjs";import"../chunks/index-DBp_Gx1M.mjs";import"../chunks/index-ZCQr-O7f.mjs";import"../chunks/index-DZgHf-gI.mjs";import"../chunks/index-VuwFoF4R.mjs";import"../chunks/index-GOFmxCuq.mjs";import"../chunks/index-Cu6LwID6.mjs";import"../chunks/index-CzTsDkbO.mjs";import"../chunks/tslib.es6-mR5Ag05r.mjs";import"../chunks/index-B7nzlBcT.mjs";import"../chunks/dialog-DvFOk-pv.mjs";import"../chunks/index-Bo9g9ZHj.mjs";import"../chunks/index-gfwlB8lL.mjs";const y=a("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),b=a("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),E=e("m-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300",{variants:{variant:{default:"border-foreground/10 text-foreground bg-card hover:bg-card/80",secondary:"border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",inverted:"inverted"}},defaultVariants:{variant:"default"}}),j=t.forwardRef(({options:e,onValueChange:a,variant:j,defaultValue:N=[],placeholder:w="Select options",animation:C=0,maxCount:S=3,modalPopover:M=!1,asChild:P=!1,className:B,...D},q)=>{const[z,L]=t.useState(N),[V,$]=t.useState(!1),[_,H]=t.useState(!1),K=e=>{const t=z.includes(e)?z.filter(t=>t!==e):[...z,e];L(t),a(t)},A=()=>{L([]),a([])};return t.createElement(f,{open:V,onOpenChange:$,modal:M},t.createElement(x,{asChild:!0},t.createElement(k,{ref:q,...D,onClick:()=>{$(e=>!e)},className:r("flex h-auto min-h-10 w-full items-center justify-between rounded-md border bg-inherit p-1 hover:bg-inherit [&_svg]:pointer-events-auto",B)},z.length>0?t.createElement("div",{className:"flex w-full items-center justify-between"},t.createElement("div",{className:"flex flex-wrap items-center"},z.slice(0,S).map(a=>{const n=e.find(e=>e.value===a),s=n?.icon;return t.createElement(v,{key:a,className:r(_?"animate-bounce":"",E({variant:j})),style:{animationDuration:`${C}s`}},s&&t.createElement(s,{className:"mr-2 h-4 w-4"}),n?.label,t.createElement(y,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:e=>{e.stopPropagation(),K(a)}}))}),z.length>S&&t.createElement(v,{className:r("text-foreground border-foreground/1 bg-transparent hover:bg-transparent",_?"animate-bounce":"",E({variant:j})),style:{animationDuration:`${C}s`}},`+ ${z.length-S} more`,t.createElement(y,{className:"ml-2 h-4 w-4 cursor-pointer",onClick:e=>{e.stopPropagation(),(()=>{const e=z.slice(0,S);L(e),a(e)})()}}))),t.createElement("div",{className:"flex items-center justify-between"},t.createElement(n,{className:"text-muted-foreground mx-2 h-4 cursor-pointer",onClick:e=>{e.stopPropagation(),A()}}),t.createElement(s,{orientation:"vertical",className:"flex h-full min-h-6"}),t.createElement(o,{className:"text-muted-foreground mx-2 h-4 cursor-pointer"}))):t.createElement("div",{className:"mx-auto flex w-full items-center justify-between"},t.createElement("span",{className:"text-muted-foreground mx-3 text-sm"},w),t.createElement(o,{className:"text-muted-foreground mx-2 h-4 cursor-pointer"})))),t.createElement(g,{className:"w-auto p-0",align:"start",onEscapeKeyDown:()=>$(!1)},t.createElement(l,null,t.createElement(c,{placeholder:"Search...",onKeyDown:e=>{if("Enter"===e.key)$(!0);else if("Backspace"===e.key&&!e.currentTarget.value){const e=[...z];e.pop(),L(e),a(e)}}}),t.createElement(i,null,t.createElement(u,null,"No results found."),t.createElement(d,null,t.createElement(p,{key:"all",onSelect:()=>{if(z.length===e.length)A();else{const t=e.map(e=>e.value);L(t),a(t)}},className:"cursor-pointer"},t.createElement("div",{className:r("border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",z.length===e.length?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible")},t.createElement(m,{className:"h-4 w-4 text-white"})),t.createElement("span",null,"(Select All)")),e.map(e=>{const a=z.includes(e.value);return t.createElement(p,{key:e.value,onSelect:()=>K(e.value),className:"cursor-pointer"},t.createElement("div",{className:r("border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",a?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible")},t.createElement(m,{className:"h-4 w-4 text-white"})),e.icon&&t.createElement(e.icon,{className:"text-muted-foreground mr-2 h-4 w-4"}),t.createElement("span",null,e.label))})),t.createElement(h,null),t.createElement(d,null,t.createElement("div",{className:"flex items-center justify-between"},z.length>0&&t.createElement(t.Fragment,null,t.createElement(p,{onSelect:A,className:"flex-1 cursor-pointer justify-center"},"Clear"),t.createElement(s,{orientation:"vertical",className:"flex h-full min-h-6"})),t.createElement(p,{onSelect:()=>$(!1),className:"max-w-full flex-1 cursor-pointer justify-center"},"Close")))))),C>0&&z.length>0&&t.createElement(b,{className:r("text-foreground bg-background my-2 h-3 w-3 cursor-pointer",_?"":"text-muted-foreground"),onClick:()=>H(!_)}))});j.displayName="MultiSelect";export{j as MultiSelect};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{c as r}from"./utils-C1EKaz-p.mjs";import{Slot as e}from"@radix-ui/react-slot";import{cva as t}from"class-variance-authority";import o from"react";const n=t("inline-flex items-center cursor-default select-none rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",positive:"border-transparent bg-positive text-positive-foreground shadow hover:bg-positive/80",warning:"border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80",info:"border-transparent bg-info text-info-foreground shadow hover:bg-info/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function a({className:t,variant:a,asChild:s=!1,...i}){const d=s?e:"span";return o.createElement(d,{"data-slot":"badge",className:r(n({variant:a}),t),...i})}export{a as B,n as b};
|
2
|
-
//# sourceMappingURL=badge-DQMrqIyu.mjs.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"badge-DQMrqIyu.mjs","sources":["../../src/components/ui/badge/badge.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport React from \"react\";\n\nexport type BadgeVariants = VariantProps<typeof badgeVariants>[\"variant\"];\n\nexport interface BadgeProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof badgeVariants> {}\n\nconst badgeVariants = cva(\n\t\"inline-flex items-center cursor-default select-none rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80\",\n\t\t\t\tpositive:\n\t\t\t\t\t\"border-transparent bg-positive text-positive-foreground shadow hover:bg-positive/80\",\n\t\t\t\twarning: \"border-transparent bg-warning text-warning-foreground shadow hover:bg-warning/80\",\n\t\t\t\tinfo: \"border-transparent bg-info text-info-foreground shadow hover:bg-info/80\",\n\t\t\t\toutline: \"text-foreground\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nfunction Badge({\n\tclassName,\n\tvariant,\n\tasChild = false,\n\t...props\n}: React.ComponentProps<\"span\"> & VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n\tconst Comp = asChild ? Slot : \"span\";\n\n\treturn (\n\t\t<Comp data-slot=\"badge\" className={cn(badgeVariants({ variant }), className)} {...props} />\n\t);\n}\n\nexport { Badge, badgeVariants };\n"],"names":["badgeVariants","cva","variants","variant","default","secondary","destructive","positive","warning","info","outline","defaultVariants","Badge","className","asChild","props","Comp","Slot","React","createElement","data-slot","cn"],"mappings":"yJAWA,MAAMA,EAAgBC,EACrB,oMACA,CACCC,SAAU,CACTC,QAAS,CACRC,QAAS,mFACTC,UACC,kFACDC,YACC,+FACDC,SACC,sFACDC,QAAS,mFACTC,KAAM,0EACNC,QAAS,oBAGXC,gBAAiB,CAChBR,QAAS,aAKZ,SAASS,GAAMC,UACdA,EAASV,QACTA,EAAOW,QACPA,GAAU,KACPC,IAEH,MAAMC,EAAOF,EAAUG,EAAO,OAE9B,OACCC,EAAAC,cAACH,EAAAA,CAAKI,YAAU,QAAQP,UAAWQ,EAAGrB,EAAc,CAAEG,YAAYU,MAAgBE,GAEpF"}
|