@rafal.lemieszewski/tide-ui 0.84.3 → 0.84.4
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/cjs/components/fundamental/breadcrumb.cjs +1 -1
- package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -1
- package/dist/cjs/components/fundamental/icon.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.cjs +1 -1
- package/dist/es/components/fundamental/icon.js +130 -119
- package/dist/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),C=require("react"),S=require("@radix-ui/react-slot"),m=require("lucide-react"),o=require("../../lib/utils.cjs"),d=require("./popover.cjs"),n=require("./command.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),C=require("react"),S=require("@radix-ui/react-slot"),m=require("lucide-react"),o=require("../../lib/utils.cjs"),d=require("./popover.cjs"),n=require("./command.cjs");function k(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,c.get?c:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const s=k(C),p=s.forwardRef(({...e},a)=>r.jsx("nav",{ref:a,"aria-label":"breadcrumb",...e}));p.displayName="Breadcrumb";const f=s.forwardRef(({className:e,...a},t)=>r.jsx("ol",{ref:t,className:o.cn("[&]:text-body-md flex flex-wrap items-center gap-[var(--space-s)] text-[var(--color-text-secondary)]",e),...a}));f.displayName="BreadcrumbList";const x=s.forwardRef(({className:e,...a},t)=>r.jsx("li",{ref:t,className:o.cn("inline-flex items-center gap-[var(--space-s)]",e),...a}));x.displayName="BreadcrumbItem";const b=s.forwardRef(({asChild:e,className:a,...t},c)=>{const l=e?S.Slot:"a";return r.jsx(l,{ref:c,className:o.cn("rounded-xs cursor-pointer underline-offset-2 transition-colors hover:text-[var(--color-text-primary)] hover:underline focus:ring-2 focus:ring-[var(--color-border-focused)] focus:ring-offset-2 focus:outline-none",a),...t})});b.displayName="BreadcrumbLink";const v=s.forwardRef(({className:e,...a},t)=>r.jsx("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:o.cn("!text-body-medium-md text-[var(--color-text-primary)]",e),...a}));v.displayName="BreadcrumbPage";const g=s.forwardRef(({children:e,className:a,siblings:t,value:c,onSelect:l,searchPlaceholder:j="Search...",emptyMessage:y="No items found.",...B},N)=>{const[P,u]=s.useState(!1);return r.jsxs(d.Popover,{open:P,onOpenChange:u,children:[r.jsx(d.PopoverTrigger,{asChild:!0,children:r.jsxs("button",{ref:N,"aria-current":"page",className:o.cn("!text-body-medium-md inline-flex cursor-pointer items-center gap-[var(--space-xs)] text-[var(--color-text-primary)] underline-offset-2 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-border-focused)] focus-visible:ring-offset-2",a),...B,children:[e,r.jsx(m.ChevronDown,{className:"h-[var(--size-3xs)] w-[var(--size-3xs)] shrink-0 text-[var(--color-icon-tertiary)]"})]})}),r.jsx(d.PopoverContent,{align:"start",className:"min-w-[16rem] p-0",children:r.jsxs(n.Command,{children:[r.jsx(n.CommandInput,{placeholder:j}),r.jsxs(n.CommandList,{children:[r.jsx(n.CommandEmpty,{children:y}),r.jsx(n.CommandGroup,{children:t.map(i=>r.jsxs(n.CommandItem,{value:i.value,onSelect:w=>{l(w),u(!1)},children:[i.label,r.jsx(m.Check,{className:o.cn("ml-auto h-4 w-4 text-[var(--color-icon-brand-bold)]",c===i.value?"opacity-100":"opacity-0")})]},i.value))})]})]})})]})});g.displayName="BreadcrumbPagePicker";const h=({children:e,className:a,...t})=>r.jsx("li",{role:"presentation","aria-hidden":"true",className:o.cn("text-[var(--color-text-tertiary)]",a),...t,children:e??r.jsx(m.ArrowRight,{className:"h-[var(--size-3xs)] w-[var(--size-3xs)]"})});h.displayName="BreadcrumbSeparator";exports.Breadcrumb=p;exports.BreadcrumbItem=x;exports.BreadcrumbLink=b;exports.BreadcrumbList=f;exports.BreadcrumbPage=v;exports.BreadcrumbPagePicker=g;exports.BreadcrumbSeparator=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),s=require("react"),O=require("@tanstack/react-virtual"),k=require("lucide-react"),F=require("./button.cjs"),c=require("./command.cjs"),w=require("./popover.cjs"),S=require("./flag.cjs"),G=require("../../lib/utils.cjs"),U=require("country-data-list"),Y=t=>t<=12?"s":t<=16?"m":t<=20?"l":"xl",J=8,z=()=>U.countries.all.filter(t=>["assigned","officially assigned"].includes(t.status)&&!["AQ","BV","HM","GS"].includes(t.alpha2)).map(t=>({name:t.name,alpha2:t.alpha2,alpha3:t.alpha3,numeric:t.numeric||"000",emoji:t.emoji})).sort((t,l)=>t.name.localeCompare(l.name));function Q({value:t,onValueChange:l,placeholder:m="Select country...",searchPlaceholder:o="Search countries...",disabled:r=!1,className:B,flagSize:b=16,showFlag:h=!0,showCode:C=!1,variant:p="default",priorityCountries:j=["US","GB","CA","AU","DE","FR","JP","CN","IN","BR"],trigger:L,clearable:E}){const[g,q]=s.useState(!1),[x,D]=s.useState(""),[P,R]=s.useState(null),u=s.useMemo(()=>z(),[]),f=s.useMemo(()=>Y(b),[b]),v=s.useMemo(()=>{const e=j.map(y=>u.find(I=>I.alpha2===y)).filter(Boolean),n=u.filter(y=>!j.includes(y.alpha2));return[...e,...n]},[u,j]),d=s.useMemo(()=>{if(!x)return v;const e=x.toLowerCase();return v.filter(n=>n.name.toLowerCase().includes(e)||n.alpha2.toLowerCase().includes(e)||n.alpha3.toLowerCase().includes(e))},[v,x]),V=d.length>J,$=Math.min(d.length*40,300),N=O.useVirtualizer({count:V?d.length:0,getScrollElement:()=>P,estimateSize:()=>40,overscan:5}),i=s.useMemo(()=>u.find(e=>e.alpha2===t),[u,t]),M=s.useCallback(e=>{l?.(e),q(!1)},[l]),T=s.useCallback((e,n)=>a.jsxs(c.CommandItem,{value:`${e.name} ${e.alpha2} ${e.alpha3}`,onSelect:()=>M(e.alpha2),className:"flex items-center gap-[var(--space-s)] cursor-pointer","data-index":n,children:[h&&a.jsx(S.Flag,{country:e.alpha2,size:f}),a.jsx("span",{className:"flex-1",children:e.name}),C&&a.jsx("span",{className:"text-body-sm text-[var(--color-text-secondary)]",children:e.alpha2}),t===e.alpha2&&a.jsx(k.Check,{className:"h-4 w-4 text-[var(--color-icon-brand-bold)]"})]},e.alpha2),[h,f,C,t,M]),A=()=>p==="slim"&&i?a.jsx("div",{className:"flex items-center",children:h&&a.jsx(S.Flag,{country:i.alpha2,size:f})}):i?a.jsxs("div",{className:"flex items-center gap-[var(--space-s)]",children:[h&&a.jsx(S.Flag,{country:i.alpha2,size:f}),a.jsx("span",{className:"flex-1 truncate text-left",children:i.name}),C&&a.jsx("span",{className:"text-body-sm text-[var(--color-text-secondary)]",children:i.alpha2})]}):a.jsx("span",{className:"text-[var(--color-text-secondary)]",children:m}),H=()=>a.jsxs(F.Button,{variant:"default",role:"combobox","aria-expanded":g,disabled:r,className:G.cn("justify-between",p==="slim"?"w-auto px-[var(--space-s)]":"w-full",B),children:[A(),p!=="slim"&&a.jsx(k.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]});return a.jsxs(w.Popover,{open:g,onOpenChange:q,children:[a.jsx(w.PopoverTrigger,{asChild:!0,children:L?L({open:g,selectedCountry:i,placeholder:m,disabled:r}):H()}),a.jsx(w.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] min-w-[300px] p-0",align:"start",children:a.jsxs(c.Command,{shouldFilter:!1,children:[a.jsx(c.CommandInput,{placeholder:o,className:"h-9",value:x,onValueChange:D,clearable:E,onClear:()=>D("")}),a.jsxs(c.CommandList,{className:"max-h-[300px]",children:[a.jsx(c.CommandEmpty,{children:"No country found"}),a.jsx(c.CommandGroup,{children:V?a.jsx("div",{ref:R,className:"h-[300px] overflow-y-auto overflow-x-hidden",style:{contain:"strict"},children:a.jsx("div",{style:{height:`${N.getTotalSize()}px`,width:"100%",position:"relative"},children:N.getVirtualItems().map(e=>{const n=d[e.index];return n?a.jsx("div",{"data-index":e.index,ref:N.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start}px)`},children:T(n,e.index)},e.key):null})})}):a.jsx("div",{style:{maxHeight:`${$}px`,overflowY:"auto"},children:d.map((e,n)=>T(e,n))})})]})]})})]})}function Z(){const t=s.useMemo(()=>z(),[]),l=s.useCallback(o=>t.find(r=>r.alpha2===o||r.alpha3===o||r.numeric===o),[t]),m=s.useCallback(o=>t.find(r=>r.name.toLowerCase()===o.toLowerCase()),[t]);return{countries:t,getCountryByCode:l,getCountryByName:m}}exports.CountryDropdown=Q;exports.useCountryData=Z;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react"),w=require("../../lib/utils.cjs"),r=require("lucide-react"),x=require("./custom-icons.cjs");function m(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(c,t,i.get?i:{enumerable:!0,get:()=>e[t]})}}return c.default=e,Object.freeze(c)}const y=m(r),p={primary:"text-[var(--color-icon-primary)]",secondary:"text-[var(--color-icon-secondary)]",tertiary:"text-[var(--color-icon-tertiary)]","tertiary-hover":"text-[var(--color-icon-tertiary-hovered)]",disabled:"text-[var(--color-icon-disabled)]","neutral-selected":"text-[var(--color-icon-neutral-bold-selected)]",information:"text-[var(--color-icon-info-bold)]",success:"text-[var(--color-icon-success-bold)]",error:"text-[var(--color-icon-error-bold)]",warning:"text-[var(--color-icon-warning-bold)]",selected:"text-[var(--color-icon-brand-bold-selected)]",brand:"text-[var(--color-icon-brand-bold)]","brand-hover":"text-[var(--color-icon-brand-bold-hovered)]","on-action":"text-[var(--color-icon-on-action)]",inverse:"text-[var(--color-icon-inverse)]",violet:"text-[var(--violet-500)]"},C={s:"w-[var(--size-3xs)] h-[var(--size-3xs)]",m:"w-[var(--size-2xs)] h-[var(--size-2xs)]",l:"w-[var(--size-xs)] h-[var(--size-xs)]",xl:"w-[var(--size-s)] h-[var(--size-s)]"},g={"alert-circle":r.AlertCircle,anchor:r.Anchor,archive:r.Archive,"arrow-down":r.ArrowDown,"arrow-down-0-1":r.ArrowDown01,"arrow-down-1-0":r.ArrowDown10,"arrow-down-a-z":r.ArrowDownAZ,"arrow-down-narrow-wide":r.ArrowDownNarrowWide,"arrow-down-to-line":r.ArrowDownToLine,"arrow-down-wide-narrow":r.ArrowDownWideNarrow,"arrow-down-z-a":r.ArrowDownZA,"arrow-left":r.ArrowLeft,"arrow-left-to-line":r.ArrowLeftToLine,"arrow-right":r.ArrowRight,"arrow-right-to-line":r.ArrowRightToLine,"arrow-up":r.ArrowUp,"arrow-up-to-line":r.ArrowUpToLine,bookmark:r.Bookmark,"calendar-days":r.CalendarDays,check:r.Check,"check-circle":r.CheckCircle,"chevron-down":r.ChevronDown,"chevron-left":r.ChevronLeft,"chevron-right":r.ChevronRight,"chevron-up":r.ChevronUp,circle:r.Circle,"circle-alert":r.CircleAlert,"circle-check":r.CircleCheck,"circle-check-big":r.CircleCheckBig,"circle-dollar-sign":r.CircleDollarSign,"circle-help":r.CircleHelp,code:r.Code,copy:r.Copy,"credit-card":r.CreditCard,dot:r.Dot,download:r.Download,edit:r.Edit,ellipsis:r.Ellipsis,"external-link":r.ExternalLink,eye:r.Eye,"file-text":r.FileText,filter:r.Filter,"grid-2x2-plus":r.Grid2X2Plus,handshake:r.Handshake,info:r.Info,"layout-dashboard":r.LayoutDashboard,link:r.Link,"list-filter":r.ListFilter,"loader-2":r.Loader2,"log-out":r.LogOut,mail:r.Mail,"map-pin":r.MapPin,"message-circle":r.MessageCircle,"message-square":r.MessageSquare,"more-horizontal":r.MoreHorizontal,navigation:r.Navigation,package:r.Package,"panel-left":r.PanelLeft,"panel-right-close":r.PanelRightClose,pencil:r.Pencil,plus:r.Plus,"plus-circle":r.PlusCircle,"refresh-cw":r.RefreshCw,"rotate-ccw":r.RotateCcw,route:r.Route,search:r.Search,send:r.Send,settings:r.Settings,share:r.Share,"share-2":r.Share2,"shield-check":r.ShieldCheck,ship:r.Ship,sparkles:r.Sparkles,"square-plus":r.SquarePlus,star:r.Star,"table-2":r.Table2,"text-cursor-input":r.TextCursorInput,trash:r.Trash,"trash-2":r.Trash2,"triangle-alert":r.TriangleAlert,truck:r.Truck,upload:r.Upload,user:r.User,users:r.Users,weight:r.Weight,x:r.X},f=b.forwardRef(({name:e,size:c="m",color:t,className:i,"aria-label":n,...l},s)=>{const a=t?p[t]:"text-current",d=C[c],h=n?{"aria-label":n,role:"img"}:{"aria-hidden":!0};if(e in x.customIcons)return o.jsxs("svg",{ref:s,viewBox:"0 0 24 24",fill:"none",className:w.cn("shrink-0",d,a,i),...h,...l,children:[n&&o.jsx("title",{children:n}),x.customIcons[e]]});if(e in g){const u=g[e];return o.jsx(u,{ref:s,className:w.cn("shrink-0",d,a,i),...h,...l})}const k=e.split("-").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join(""),v=y[k];return v?o.jsx(v,{ref:s,className:w.cn("shrink-0",d,a,i),...h,...l}):(console.warn(`Icon "${e}" not found in custom icons or Lucide icons`),o.jsxs("svg",{ref:s,viewBox:"0 0 24 24",fill:"none",className:w.cn("shrink-0",d,a,i),...h,...l,children:[n&&o.jsx("title",{children:n}),o.jsx("rect",{x:"2",y:"2",width:"20",height:"20",stroke:"currentColor",strokeWidth:"2",fill:"none"}),o.jsx("text",{x:"12",y:"16",textAnchor:"middle",fontSize:"12",fill:"currentColor",children:"?"})]}))});f.displayName="Icon";exports.Icon=f;exports.iconColors=p;exports.iconSizes=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),f=require("lucide-react"),u=require("../../lib/utils.cjs"),P=require("./button.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),f=require("lucide-react"),u=require("../../lib/utils.cjs"),P=require("./button.cjs");function E(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(o,s,c.get?c:{enumerable:!0,get:()=>e[s]})}}return o.default=e,Object.freeze(o)}const t=E(T),m=t.createContext(null),O=()=>{const e=t.useContext(m);if(!e)throw new Error("useTree must be used within a TreeProvider");return e},k=t.forwardRef(({item:e,level:o},s)=>{const{selectedItemId:c,expandedItems:a,handleExpand:h,handleSelect:y,defaultNodeIcon:x,defaultLeafIcon:p}=O(),d=a.has(e.id),b=c===e.id,l=e.children&&e.children.length>0,i=b&&!l,v=t.useMemo(()=>e.disabled?p||f.FileIcon:b&&e.selectedIcon?e.selectedIcon:l?d&&e.openIcon?e.openIcon:e.icon||x||f.FolderIcon:e.icon||p||f.FileIcon,[e.disabled,e.selectedIcon,e.openIcon,e.icon,b,l,d,x,p]),j=()=>{e.disabled||(l&&h(e.id),y(e),e.onClick?.())},w=n=>{n.stopPropagation(),l&&!e.disabled&&h(e.id)};return r.jsxs("div",{ref:s,className:"relative",children:[r.jsxs("div",{className:u.cn("flex items-center gap-1 rounded-s py-1 pr-1 cursor-pointer transition-colors","hover:bg-[var(--color-background-neutral-subtlest-hovered)]",i&&"bg-[var(--color-background-blue-subtle-selected)] hover:bg-[var(--color-background-blue-subtle-selected-hovered)]",e.disabled&&"opacity-50 cursor-not-allowed"),style:{paddingLeft:`${o*16+8}px`},onClick:j,children:[l?r.jsx(P.Button,{variant:"ghost",size:"s",className:"h-4 w-4 p-0 opacity-50 hover:opacity-100",onClick:w,disabled:e.disabled,children:r.jsx(f.ChevronRightIcon,{className:u.cn("h-3 w-3 transition-transform duration-200",d&&"transform rotate-90")})}):r.jsx("div",{className:"h-4 w-4"}),r.jsx(v,{className:u.cn("h-4 w-4 shrink-0",i&&"text-[var(--color-icon-brand-bold-selected)]")}),r.jsx("span",{className:u.cn("flex-1 truncate",i?"text-body-strong-sm":"text-body-sm"),children:r.jsx("span",{className:u.cn(i&&"text-[var(--color-text-brand-bold-selected)]"),children:e.name})}),e.actions&&r.jsx("div",{className:"flex items-center gap-1",onClick:n=>n.stopPropagation(),children:e.actions})]}),l&&d&&r.jsx("div",{children:e.children?.map(n=>r.jsx(k,{item:n,level:o+1},n.id))})]})});k.displayName="TreeItem";const C=t.forwardRef(({data:e,initialSelectedItemId:o,onSelectChange:s,expandAll:c=!1,defaultNodeIcon:a=f.FolderIcon,defaultLeafIcon:h=f.FileIcon,className:y,...x},p)=>{const[d,b]=t.useState(o),[l,g]=t.useState(new Set(c?N(Array.isArray(e)?e:[e]):[]));t.useEffect(()=>{c&&g(new Set(N(Array.isArray(e)?e:[e])))},[e,c]);const i=t.useCallback(n=>{g(S=>{const I=new Set(S);return I.has(n)?I.delete(n):I.add(n),I})},[]),v=t.useCallback(n=>{n.disabled||(b(n.id),s?.(n))},[s]),j=t.useMemo(()=>({selectedItemId:d,expandedItems:l,handleExpand:i,handleSelect:v,onSelectChange:s,defaultNodeIcon:a,defaultLeafIcon:h}),[d,l,i,v,s,a,h]),w=Array.isArray(e)?e:[e];return r.jsx(m.Provider,{value:j,children:r.jsx("div",{ref:p,className:u.cn("space-y-1",y),...x,children:w.map(n=>r.jsx(k,{item:n,level:0},n.id))})})});C.displayName="Tree";function N(e){const o=[];function s(c){for(const a of c)o.push(a.id),a.children&&s(a.children)}return s(e),o}exports.Tree=C;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { jsxs as u, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import C from "react";
|
|
3
|
+
import { cn as d } from "../../lib/utils.js";
|
|
4
|
+
import * as f from "lucide-react";
|
|
5
|
+
import { X as k, Weight as m, Users as A, User as y, Upload as b, Truck as z, TriangleAlert as S, Trash2 as D, Trash as L, TextCursorInput as T, Table2 as I, Star as P, SquarePlus as R, Sparkles as U, Ship as N, ShieldCheck as M, Share2 as q, Share as B, Settings as E, Send as W, Search as j, Route as F, RotateCcw as H, RefreshCw as X, PlusCircle as Z, Plus as _, Pencil as G, PanelRightClose as O, PanelLeft as $, Package as J, Navigation as K, MoreHorizontal as Q, MessageSquare as V, MessageCircle as Y, MapPin as rr, Mail as er, LogOut as or, Loader2 as ir, ListFilter as tr, Link as nr, LayoutDashboard as cr, Info as lr, Handshake as ar, Grid2X2Plus as sr, Filter as dr, FileText as hr, Eye as wr, ExternalLink as ur, Ellipsis as vr, Edit as pr, Download as xr, Dot as gr, CreditCard as Cr, Copy as fr, Code as kr, CircleHelp as mr, CircleDollarSign as Ar, CircleCheckBig as yr, CircleCheck as br, CircleAlert as zr, Circle as Sr, ChevronUp as Dr, ChevronRight as Lr, ChevronLeft as Tr, ChevronDown as Ir, CheckCircle as Pr, Check as Rr, CalendarDays as Ur, Bookmark as Nr, ArrowUpToLine as Mr, ArrowUp as qr, ArrowRightToLine as Br, ArrowRight as Er, ArrowLeftToLine as Wr, ArrowLeft as jr, ArrowDownZA as Fr, ArrowDownWideNarrow as Hr, ArrowDownToLine as Xr, ArrowDownNarrowWide as Zr, ArrowDownAZ as _r, ArrowDown10 as Gr, ArrowDown01 as Or, ArrowDown as $r, Archive as Jr, Anchor as Kr, AlertCircle as Qr } from "lucide-react";
|
|
6
|
+
import { customIcons as v } from "./custom-icons.js";
|
|
7
|
+
const Vr = {
|
|
7
8
|
primary: "text-[var(--color-icon-primary)]",
|
|
8
9
|
secondary: "text-[var(--color-icon-secondary)]",
|
|
9
10
|
tertiary: "text-[var(--color-icon-tertiary)]",
|
|
@@ -20,7 +21,7 @@ const $r = {
|
|
|
20
21
|
"on-action": "text-[var(--color-icon-on-action)]",
|
|
21
22
|
inverse: "text-[var(--color-icon-inverse)]",
|
|
22
23
|
violet: "text-[var(--violet-500)]"
|
|
23
|
-
},
|
|
24
|
+
}, Yr = {
|
|
24
25
|
s: "w-[var(--size-3xs)] h-[var(--size-3xs)]",
|
|
25
26
|
// 12px
|
|
26
27
|
m: "w-[var(--size-2xs)] h-[var(--size-2xs)]",
|
|
@@ -29,141 +30,151 @@ const $r = {
|
|
|
29
30
|
// 20px
|
|
30
31
|
xl: "w-[var(--size-s)] h-[var(--size-s)]"
|
|
31
32
|
// 24px
|
|
32
|
-
},
|
|
33
|
-
"alert-circle":
|
|
34
|
-
anchor:
|
|
35
|
-
archive:
|
|
36
|
-
"arrow-down":
|
|
37
|
-
"arrow-down-0-1":
|
|
38
|
-
"arrow-down-1-0":
|
|
39
|
-
"arrow-down-a-z":
|
|
40
|
-
"arrow-down-narrow-wide":
|
|
41
|
-
"arrow-down-to-line":
|
|
42
|
-
"arrow-down-wide-narrow":
|
|
43
|
-
"arrow-down-z-a":
|
|
44
|
-
"arrow-left":
|
|
45
|
-
"arrow-left-to-line":
|
|
46
|
-
"arrow-right":
|
|
47
|
-
"arrow-right-to-line":
|
|
48
|
-
"arrow-up":
|
|
49
|
-
"arrow-up-to-line":
|
|
50
|
-
bookmark:
|
|
51
|
-
"calendar-days":
|
|
52
|
-
check:
|
|
53
|
-
"check-circle":
|
|
54
|
-
"chevron-down":
|
|
55
|
-
"chevron-left":
|
|
56
|
-
"chevron-right":
|
|
57
|
-
"chevron-up":
|
|
58
|
-
circle:
|
|
59
|
-
"circle-alert":
|
|
60
|
-
"circle-check
|
|
61
|
-
"circle-
|
|
62
|
-
"circle-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"message-
|
|
86
|
-
"
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"panel-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
33
|
+
}, p = {
|
|
34
|
+
"alert-circle": Qr,
|
|
35
|
+
anchor: Kr,
|
|
36
|
+
archive: Jr,
|
|
37
|
+
"arrow-down": $r,
|
|
38
|
+
"arrow-down-0-1": Or,
|
|
39
|
+
"arrow-down-1-0": Gr,
|
|
40
|
+
"arrow-down-a-z": _r,
|
|
41
|
+
"arrow-down-narrow-wide": Zr,
|
|
42
|
+
"arrow-down-to-line": Xr,
|
|
43
|
+
"arrow-down-wide-narrow": Hr,
|
|
44
|
+
"arrow-down-z-a": Fr,
|
|
45
|
+
"arrow-left": jr,
|
|
46
|
+
"arrow-left-to-line": Wr,
|
|
47
|
+
"arrow-right": Er,
|
|
48
|
+
"arrow-right-to-line": Br,
|
|
49
|
+
"arrow-up": qr,
|
|
50
|
+
"arrow-up-to-line": Mr,
|
|
51
|
+
bookmark: Nr,
|
|
52
|
+
"calendar-days": Ur,
|
|
53
|
+
check: Rr,
|
|
54
|
+
"check-circle": Pr,
|
|
55
|
+
"chevron-down": Ir,
|
|
56
|
+
"chevron-left": Tr,
|
|
57
|
+
"chevron-right": Lr,
|
|
58
|
+
"chevron-up": Dr,
|
|
59
|
+
circle: Sr,
|
|
60
|
+
"circle-alert": zr,
|
|
61
|
+
"circle-check": br,
|
|
62
|
+
"circle-check-big": yr,
|
|
63
|
+
"circle-dollar-sign": Ar,
|
|
64
|
+
"circle-help": mr,
|
|
65
|
+
code: kr,
|
|
66
|
+
copy: fr,
|
|
67
|
+
"credit-card": Cr,
|
|
68
|
+
dot: gr,
|
|
69
|
+
download: xr,
|
|
70
|
+
edit: pr,
|
|
71
|
+
ellipsis: vr,
|
|
72
|
+
"external-link": ur,
|
|
73
|
+
eye: wr,
|
|
74
|
+
"file-text": hr,
|
|
75
|
+
filter: dr,
|
|
76
|
+
"grid-2x2-plus": sr,
|
|
77
|
+
handshake: ar,
|
|
78
|
+
info: lr,
|
|
79
|
+
"layout-dashboard": cr,
|
|
80
|
+
link: nr,
|
|
81
|
+
"list-filter": tr,
|
|
82
|
+
"loader-2": ir,
|
|
83
|
+
"log-out": or,
|
|
84
|
+
mail: er,
|
|
85
|
+
"map-pin": rr,
|
|
86
|
+
"message-circle": Y,
|
|
87
|
+
"message-square": V,
|
|
88
|
+
"more-horizontal": Q,
|
|
89
|
+
navigation: K,
|
|
90
|
+
package: J,
|
|
91
|
+
"panel-left": $,
|
|
92
|
+
"panel-right-close": O,
|
|
93
|
+
pencil: G,
|
|
94
|
+
plus: _,
|
|
95
|
+
"plus-circle": Z,
|
|
96
|
+
"refresh-cw": X,
|
|
97
|
+
"rotate-ccw": H,
|
|
98
|
+
route: F,
|
|
99
|
+
search: j,
|
|
100
|
+
send: W,
|
|
101
|
+
settings: E,
|
|
102
|
+
share: B,
|
|
103
|
+
"share-2": q,
|
|
104
|
+
"shield-check": M,
|
|
105
|
+
ship: N,
|
|
106
|
+
sparkles: U,
|
|
107
|
+
"square-plus": R,
|
|
108
|
+
star: P,
|
|
109
|
+
"table-2": I,
|
|
110
|
+
"text-cursor-input": T,
|
|
111
|
+
trash: L,
|
|
112
|
+
"trash-2": D,
|
|
113
|
+
"triangle-alert": S,
|
|
114
|
+
truck: z,
|
|
115
|
+
upload: b,
|
|
116
|
+
user: y,
|
|
117
|
+
users: A,
|
|
118
|
+
weight: m,
|
|
119
|
+
x: k
|
|
120
|
+
}, re = /* @__PURE__ */ C.forwardRef(
|
|
119
121
|
({
|
|
120
|
-
name:
|
|
121
|
-
size:
|
|
122
|
-
color:
|
|
122
|
+
name: r,
|
|
123
|
+
size: x = "m",
|
|
124
|
+
color: h,
|
|
123
125
|
className: i,
|
|
124
|
-
"aria-label":
|
|
126
|
+
"aria-label": e,
|
|
125
127
|
...t
|
|
126
128
|
}, n) => {
|
|
127
|
-
const
|
|
128
|
-
if (
|
|
129
|
-
return /* @__PURE__ */
|
|
129
|
+
const c = h ? Vr[h] : "text-current", l = Yr[x], a = e ? { "aria-label": e, role: "img" } : { "aria-hidden": !0 };
|
|
130
|
+
if (r in v)
|
|
131
|
+
return /* @__PURE__ */ u(
|
|
130
132
|
"svg",
|
|
131
133
|
{
|
|
132
134
|
ref: n,
|
|
133
135
|
viewBox: "0 0 24 24",
|
|
134
136
|
fill: "none",
|
|
135
|
-
className:
|
|
136
|
-
...
|
|
137
|
+
className: d("shrink-0", l, c, i),
|
|
138
|
+
...a,
|
|
137
139
|
...t,
|
|
138
140
|
children: [
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
e && /* @__PURE__ */ o("title", { children: e }),
|
|
142
|
+
v[r]
|
|
141
143
|
]
|
|
142
144
|
}
|
|
143
145
|
);
|
|
144
|
-
if (
|
|
145
|
-
const
|
|
146
|
+
if (r in p) {
|
|
147
|
+
const s = p[r];
|
|
146
148
|
return /* @__PURE__ */ o(
|
|
147
|
-
|
|
149
|
+
s,
|
|
148
150
|
{
|
|
149
151
|
ref: n,
|
|
150
|
-
className:
|
|
151
|
-
...
|
|
152
|
+
className: d("shrink-0", l, c, i),
|
|
153
|
+
...a,
|
|
152
154
|
...t
|
|
153
155
|
}
|
|
154
156
|
);
|
|
155
157
|
}
|
|
156
|
-
|
|
158
|
+
const g = r.split("-").map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join(""), w = f[g];
|
|
159
|
+
return w ? /* @__PURE__ */ o(
|
|
160
|
+
w,
|
|
161
|
+
{
|
|
162
|
+
ref: n,
|
|
163
|
+
className: d("shrink-0", l, c, i),
|
|
164
|
+
...a,
|
|
165
|
+
...t
|
|
166
|
+
}
|
|
167
|
+
) : (console.warn(`Icon "${r}" not found in custom icons or Lucide icons`), /* @__PURE__ */ u(
|
|
157
168
|
"svg",
|
|
158
169
|
{
|
|
159
170
|
ref: n,
|
|
160
171
|
viewBox: "0 0 24 24",
|
|
161
172
|
fill: "none",
|
|
162
|
-
className:
|
|
163
|
-
...
|
|
173
|
+
className: d("shrink-0", l, c, i),
|
|
174
|
+
...a,
|
|
164
175
|
...t,
|
|
165
176
|
children: [
|
|
166
|
-
|
|
177
|
+
e && /* @__PURE__ */ o("title", { children: e }),
|
|
167
178
|
/* @__PURE__ */ o(
|
|
168
179
|
"rect",
|
|
169
180
|
{
|
|
@@ -189,12 +200,12 @@ const $r = {
|
|
|
189
200
|
)
|
|
190
201
|
]
|
|
191
202
|
}
|
|
192
|
-
);
|
|
203
|
+
));
|
|
193
204
|
}
|
|
194
205
|
);
|
|
195
|
-
|
|
206
|
+
re.displayName = "Icon";
|
|
196
207
|
export {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
208
|
+
re as Icon,
|
|
209
|
+
Vr as iconColors,
|
|
210
|
+
Yr as iconSizes
|
|
200
211
|
};
|