@hanzo/ui 5.3.12 → 5.3.14
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/dock/limelight-nav.js +1 -1
- package/dist/dock/limelight-nav.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/dist/primitives/index.js +2 -2
- package/dist/primitives/index.mjs +2 -2
- package/dist/primitives-export.js +2 -2
- package/dist/primitives-export.mjs +2 -2
- package/dist/textarea.js +1 -1
- package/dist/textarea.mjs +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var p=require('react'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var p__namespace=/*#__PURE__*/_interopNamespace(p);var C=Object.defineProperty;var
|
|
1
|
+
'use strict';var p=require('react'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var p__namespace=/*#__PURE__*/_interopNamespace(p);var C=Object.defineProperty;var u=(a,r)=>C(a,"name",{value:r,configurable:true});function s(...a){return tailwindMerge.twMerge(clsx.clsx(a))}u(s,"cn");var S=classVarianceAuthority.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground shadow hover:bg-primary/90",linkFG:"text-primary underline-offset-4 hover:underline",linkMuted:"text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),h=p__namespace.forwardRef(({className:a,variant:r,size:o,asChild:t=false,isLoading:f=false,children:i,...d},c)=>jsxRuntime.jsxs(t?reactSlot.Slot:"button",{className:s(S({variant:r,size:o,className:a})),ref:c,...d,children:[f?jsxRuntime.jsx(lucideReact.Loader2,{className:s("h-4 w-4 animate-spin",o!=="icon"&&"mr-2")}):null,f&&o==="icon"?null:i]}));h.displayName="Button";var z=classVarianceAuthority.cva("focus:ring-ring border-divider inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow",outline:"hover:bg-bg-secondary text-text-secondary hover:text-text-default border border-gray-500 bg-transparent shadow-xs",inputAdornment:"bg-gray-600 px-2 font-medium text-white",tags:"text-text-secondary border-divider bg-bg-quaternary rounded-lg px-2 py-1 font-normal capitalize"}},defaultVariants:{variant:"default"}}),x=p__namespace.forwardRef(({className:a,variant:r,...o},t)=>jsxRuntime.jsx("div",{ref:t,className:s(z({variant:r}),a),...o}));x.displayName="Badge";var N=u(({className:a,type:r,startAdornment:o,endAdornment:t,hidePasswordToggle:f,ref:i,...d})=>{let c=p.useRef(null),b=p.useRef(null),e=p.useRef(null),[n,y]=p__namespace.useState(false),B=u(()=>{y(!n);},"togglePasswordVisibility"),w={};o&&(w.paddingLeft=`${(b?.current?.offsetWidth??0)+20}px`),t&&(w.paddingRight=`${(e?.current?.offsetWidth??0)+20}px`),p.useImperativeHandle(i,()=>c.current,[]),p.useEffect(()=>{d.autoFocus&&setTimeout(()=>{c?.current?.focus();},0);},[d.autoFocus]);let P=r==="password"&&n?"text":r;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{className:s("h-input border-border-input bg-bg-secondary focus:border-border-input-focus disabled:bg-bg-input-disabled peer placeholder-shown:border-border-input text-text-default w-full rounded-lg border px-4 py-3 pt-8 text-sm font-medium placeholder-transparent outline outline-0 transition-all placeholder-shown:border focus:border focus:outline-0 disabled:border-0 disabled:text-gray-400",o&&"pl-[var(--custom-padding-left-input)]",t&&"pr-[var(--custom-padding-right-input)]",r==="password"&&"pr-[60px]",a),placeholder:" ",ref:c,spellCheck:false,style:w,type:P,...d}),o?jsxRuntime.jsx(x,{className:"peer/adornment adornment absolute top-[30px] left-4",ref:b,variant:"inputAdornment",children:o}):null,t&&typeof t=="string"?jsxRuntime.jsx(x,{className:"peer/adornment adornment absolute top-[30px] right-4",ref:e,variant:"inputAdornment",children:t}):null,t&&typeof t!="string"&&p__namespace.isValidElement(t)?p__namespace.cloneElement(t,{ref:e}):null,r==="password"&&!f&&jsxRuntime.jsx(h,{"aria-label":n?"Hide password":"Show password",className:"absolute top-3 right-3",onClick:B,size:"icon",type:"button",variant:"ghost",children:n?jsxRuntime.jsx(lucideReact.EyeOffIcon,{"aria-hidden":"true",className:"h-4 w-4"}):jsxRuntime.jsx(lucideReact.EyeIcon,{"aria-hidden":"true",className:"h-4 w-4"})})]})},"Input");N.displayName="Input";var X=p__namespace.forwardRef(({className:a,items:r=[],...o},t)=>{let[f,i]=p__namespace.useState(false),[d,c]=p__namespace.useState("");p__namespace.useEffect(()=>{let e=u(n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),i(y=>!y));},"down");return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let b=r.filter(e=>e.label.toLowerCase().includes(d.toLowerCase()));return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("nav",{ref:t,className:s("flex items-center gap-4",a),...o,children:[jsxRuntime.jsxs(h,{variant:"outline",onClick:()=>i(true),className:"relative w-64 justify-start",children:[jsxRuntime.jsx(lucideReact.Search,{className:"mr-2 h-4 w-4"}),jsxRuntime.jsx("span",{className:"text-muted-foreground",children:"Search..."}),jsxRuntime.jsxs("kbd",{className:"pointer-events-none absolute right-2 hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex",children:[jsxRuntime.jsx(lucideReact.Command,{className:"h-3 w-3"}),"K"]})]}),r.slice(0,4).map(e=>jsxRuntime.jsx("a",{href:e.href,className:"text-sm font-medium transition-colors hover:text-primary",children:e.label},e.href))]}),f&&jsxRuntime.jsx("div",{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",onClick:()=>i(false),children:jsxRuntime.jsxs("div",{className:"fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-card p-6 shadow-lg",onClick:e=>e.stopPropagation(),children:[jsxRuntime.jsx(N,{placeholder:"Search navigation...",value:d,onChange:e=>c(e.target.value),autoFocus:true,className:"mb-4"}),jsxRuntime.jsx("div",{className:"max-h-96 space-y-1 overflow-auto",children:b.map(e=>jsxRuntime.jsx("a",{href:e.href,className:"block rounded-md px-4 py-2 hover:bg-accent",onClick:()=>i(false),children:e.label},e.href))})]})})]})});X.displayName="LimelightNav";exports.LimelightNav=X;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as p from'react';import {useRef,useImperativeHandle,useEffect}from'react';import {Loader2,Search,Command,EyeOffIcon,EyeIcon}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var C=Object.defineProperty;var
|
|
1
|
+
import*as p from'react';import {useRef,useImperativeHandle,useEffect}from'react';import {Loader2,Search,Command,EyeOffIcon,EyeIcon}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var C=Object.defineProperty;var u=(a,r)=>C(a,"name",{value:r,configurable:true});function s(...a){return twMerge(clsx(a))}u(s,"cn");var S=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground shadow hover:bg-primary/90",linkFG:"text-primary underline-offset-4 hover:underline",linkMuted:"text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),h=p.forwardRef(({className:a,variant:r,size:o,asChild:t=false,isLoading:f=false,children:i,...d},c)=>jsxs(t?Slot:"button",{className:s(S({variant:r,size:o,className:a})),ref:c,...d,children:[f?jsx(Loader2,{className:s("h-4 w-4 animate-spin",o!=="icon"&&"mr-2")}):null,f&&o==="icon"?null:i]}));h.displayName="Button";var z=cva("focus:ring-ring border-divider inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow",outline:"hover:bg-bg-secondary text-text-secondary hover:text-text-default border border-gray-500 bg-transparent shadow-xs",inputAdornment:"bg-gray-600 px-2 font-medium text-white",tags:"text-text-secondary border-divider bg-bg-quaternary rounded-lg px-2 py-1 font-normal capitalize"}},defaultVariants:{variant:"default"}}),x=p.forwardRef(({className:a,variant:r,...o},t)=>jsx("div",{ref:t,className:s(z({variant:r}),a),...o}));x.displayName="Badge";var N=u(({className:a,type:r,startAdornment:o,endAdornment:t,hidePasswordToggle:f,ref:i,...d})=>{let c=useRef(null),b=useRef(null),e=useRef(null),[n,y]=p.useState(false),B=u(()=>{y(!n);},"togglePasswordVisibility"),w={};o&&(w.paddingLeft=`${(b?.current?.offsetWidth??0)+20}px`),t&&(w.paddingRight=`${(e?.current?.offsetWidth??0)+20}px`),useImperativeHandle(i,()=>c.current,[]),useEffect(()=>{d.autoFocus&&setTimeout(()=>{c?.current?.focus();},0);},[d.autoFocus]);let P=r==="password"&&n?"text":r;return jsxs(Fragment,{children:[jsx("input",{className:s("h-input border-border-input bg-bg-secondary focus:border-border-input-focus disabled:bg-bg-input-disabled peer placeholder-shown:border-border-input text-text-default w-full rounded-lg border px-4 py-3 pt-8 text-sm font-medium placeholder-transparent outline outline-0 transition-all placeholder-shown:border focus:border focus:outline-0 disabled:border-0 disabled:text-gray-400",o&&"pl-[var(--custom-padding-left-input)]",t&&"pr-[var(--custom-padding-right-input)]",r==="password"&&"pr-[60px]",a),placeholder:" ",ref:c,spellCheck:false,style:w,type:P,...d}),o?jsx(x,{className:"peer/adornment adornment absolute top-[30px] left-4",ref:b,variant:"inputAdornment",children:o}):null,t&&typeof t=="string"?jsx(x,{className:"peer/adornment adornment absolute top-[30px] right-4",ref:e,variant:"inputAdornment",children:t}):null,t&&typeof t!="string"&&p.isValidElement(t)?p.cloneElement(t,{ref:e}):null,r==="password"&&!f&&jsx(h,{"aria-label":n?"Hide password":"Show password",className:"absolute top-3 right-3",onClick:B,size:"icon",type:"button",variant:"ghost",children:n?jsx(EyeOffIcon,{"aria-hidden":"true",className:"h-4 w-4"}):jsx(EyeIcon,{"aria-hidden":"true",className:"h-4 w-4"})})]})},"Input");N.displayName="Input";var X=p.forwardRef(({className:a,items:r=[],...o},t)=>{let[f,i]=p.useState(false),[d,c]=p.useState("");p.useEffect(()=>{let e=u(n=>{n.key==="k"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),i(y=>!y));},"down");return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let b=r.filter(e=>e.label.toLowerCase().includes(d.toLowerCase()));return jsxs(Fragment,{children:[jsxs("nav",{ref:t,className:s("flex items-center gap-4",a),...o,children:[jsxs(h,{variant:"outline",onClick:()=>i(true),className:"relative w-64 justify-start",children:[jsx(Search,{className:"mr-2 h-4 w-4"}),jsx("span",{className:"text-muted-foreground",children:"Search..."}),jsxs("kbd",{className:"pointer-events-none absolute right-2 hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex",children:[jsx(Command,{className:"h-3 w-3"}),"K"]})]}),r.slice(0,4).map(e=>jsx("a",{href:e.href,className:"text-sm font-medium transition-colors hover:text-primary",children:e.label},e.href))]}),f&&jsx("div",{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm",onClick:()=>i(false),children:jsxs("div",{className:"fixed left-1/2 top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border bg-card p-6 shadow-lg",onClick:e=>e.stopPropagation(),children:[jsx(N,{placeholder:"Search navigation...",value:d,onChange:e=>c(e.target.value),autoFocus:true,className:"mb-4"}),jsx("div",{className:"max-h-96 space-y-1 overflow-auto",children:b.map(e=>jsx("a",{href:e.href,className:"block rounded-md px-4 py-2 hover:bg-accent",onClick:()=>i(false),children:e.label},e.href))})]})})]})});X.displayName="LimelightNav";export{X as LimelightNav};
|