@rafal.lemieszewski/tide-ui 0.84.4 → 0.85.0
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/icon.cjs +1 -1
- package/dist/es/components/fundamental/icon.js +44 -35
- package/dist/types/components/fundamental/icon.d.ts +5 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/product/app-frame.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),b=require("react"),u=require("../../lib/utils.cjs"),r=require("lucide-react"),x=require("./custom-icons.cjs");function y(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const t=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(l,i,t.get?t:{enumerable:!0,get:()=>e[i]})}}return l.default=e,Object.freeze(l)}const m=y(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)]"},f={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},C=b.forwardRef(({name:e,size:l="m",color:i,className:t,"aria-label":n,...s},w)=>{const a=i?p[i]:"text-current",d=f[l],h=n?{"aria-label":n,role:"img"}:{"aria-hidden":!0};if(typeof e!="string"){const c=e;return o.jsx(c,{className:u.cn("shrink-0",d,a,t),...h,...s})}if(e in x.customIcons)return o.jsxs("svg",{ref:w,viewBox:"0 0 24 24",fill:"none",className:u.cn("shrink-0",d,a,t),...h,...s,children:[n&&o.jsx("title",{children:n}),x.customIcons[e]]});if(e in g){const c=g[e];return o.jsx(c,{ref:w,className:u.cn("shrink-0",d,a,t),...h,...s})}const k=e.split("-").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(""),v=m[k];return v?o.jsx(v,{ref:w,className:u.cn("shrink-0",d,a,t),...h,...s}):(console.warn(`Icon "${e}" not found in custom icons or Lucide icons`),o.jsxs("svg",{ref:w,viewBox:"0 0 24 24",fill:"none",className:u.cn("shrink-0",d,a,t),...h,...s,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:"?"})]}))});C.displayName="Icon";exports.Icon=C;exports.iconColors=p;exports.iconSizes=f;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
1
|
+
import { jsx as e, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import g from "react";
|
|
3
|
+
import { cn as s } from "../../lib/utils.js";
|
|
4
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
|
|
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 N, Ship as U, 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 Cr, CreditCard as gr, 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 Nr, Bookmark as Ur, 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
6
|
import { customIcons as v } from "./custom-icons.js";
|
|
7
7
|
const Vr = {
|
|
8
8
|
primary: "text-[var(--color-icon-primary)]",
|
|
@@ -48,8 +48,8 @@ const Vr = {
|
|
|
48
48
|
"arrow-right-to-line": Br,
|
|
49
49
|
"arrow-up": qr,
|
|
50
50
|
"arrow-up-to-line": Mr,
|
|
51
|
-
bookmark:
|
|
52
|
-
"calendar-days":
|
|
51
|
+
bookmark: Ur,
|
|
52
|
+
"calendar-days": Nr,
|
|
53
53
|
check: Rr,
|
|
54
54
|
"check-circle": Pr,
|
|
55
55
|
"chevron-down": Ir,
|
|
@@ -64,8 +64,8 @@ const Vr = {
|
|
|
64
64
|
"circle-help": mr,
|
|
65
65
|
code: kr,
|
|
66
66
|
copy: fr,
|
|
67
|
-
"credit-card":
|
|
68
|
-
dot:
|
|
67
|
+
"credit-card": gr,
|
|
68
|
+
dot: Cr,
|
|
69
69
|
download: xr,
|
|
70
70
|
edit: pr,
|
|
71
71
|
ellipsis: vr,
|
|
@@ -102,8 +102,8 @@ const Vr = {
|
|
|
102
102
|
share: B,
|
|
103
103
|
"share-2": q,
|
|
104
104
|
"shield-check": M,
|
|
105
|
-
ship:
|
|
106
|
-
sparkles:
|
|
105
|
+
ship: U,
|
|
106
|
+
sparkles: N,
|
|
107
107
|
"square-plus": R,
|
|
108
108
|
star: P,
|
|
109
109
|
"table-2": I,
|
|
@@ -117,65 +117,74 @@ const Vr = {
|
|
|
117
117
|
users: A,
|
|
118
118
|
weight: m,
|
|
119
119
|
x: k
|
|
120
|
-
}, re = /* @__PURE__ */
|
|
120
|
+
}, re = /* @__PURE__ */ g.forwardRef(
|
|
121
121
|
({
|
|
122
122
|
name: r,
|
|
123
123
|
size: x = "m",
|
|
124
124
|
color: h,
|
|
125
125
|
className: i,
|
|
126
|
-
"aria-label":
|
|
126
|
+
"aria-label": o,
|
|
127
127
|
...t
|
|
128
|
-
},
|
|
129
|
-
const
|
|
128
|
+
}, d) => {
|
|
129
|
+
const n = h ? Vr[h] : "text-current", c = Yr[x], l = o ? { "aria-label": o, role: "img" } : { "aria-hidden": !0 };
|
|
130
|
+
if (typeof r != "string")
|
|
131
|
+
return /* @__PURE__ */ e(
|
|
132
|
+
r,
|
|
133
|
+
{
|
|
134
|
+
className: s("shrink-0", c, n, i),
|
|
135
|
+
...l,
|
|
136
|
+
...t
|
|
137
|
+
}
|
|
138
|
+
);
|
|
130
139
|
if (r in v)
|
|
131
140
|
return /* @__PURE__ */ u(
|
|
132
141
|
"svg",
|
|
133
142
|
{
|
|
134
|
-
ref:
|
|
143
|
+
ref: d,
|
|
135
144
|
viewBox: "0 0 24 24",
|
|
136
145
|
fill: "none",
|
|
137
|
-
className:
|
|
138
|
-
...
|
|
146
|
+
className: s("shrink-0", c, n, i),
|
|
147
|
+
...l,
|
|
139
148
|
...t,
|
|
140
149
|
children: [
|
|
141
|
-
|
|
150
|
+
o && /* @__PURE__ */ e("title", { children: o }),
|
|
142
151
|
v[r]
|
|
143
152
|
]
|
|
144
153
|
}
|
|
145
154
|
);
|
|
146
155
|
if (r in p) {
|
|
147
|
-
const
|
|
148
|
-
return /* @__PURE__ */
|
|
149
|
-
|
|
156
|
+
const a = p[r];
|
|
157
|
+
return /* @__PURE__ */ e(
|
|
158
|
+
a,
|
|
150
159
|
{
|
|
151
|
-
ref:
|
|
152
|
-
className:
|
|
153
|
-
...
|
|
160
|
+
ref: d,
|
|
161
|
+
className: s("shrink-0", c, n, i),
|
|
162
|
+
...l,
|
|
154
163
|
...t
|
|
155
164
|
}
|
|
156
165
|
);
|
|
157
166
|
}
|
|
158
|
-
const
|
|
159
|
-
return w ? /* @__PURE__ */
|
|
167
|
+
const C = r.split("-").map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(""), w = f[C];
|
|
168
|
+
return w ? /* @__PURE__ */ e(
|
|
160
169
|
w,
|
|
161
170
|
{
|
|
162
|
-
ref:
|
|
163
|
-
className:
|
|
164
|
-
...
|
|
171
|
+
ref: d,
|
|
172
|
+
className: s("shrink-0", c, n, i),
|
|
173
|
+
...l,
|
|
165
174
|
...t
|
|
166
175
|
}
|
|
167
176
|
) : (console.warn(`Icon "${r}" not found in custom icons or Lucide icons`), /* @__PURE__ */ u(
|
|
168
177
|
"svg",
|
|
169
178
|
{
|
|
170
|
-
ref:
|
|
179
|
+
ref: d,
|
|
171
180
|
viewBox: "0 0 24 24",
|
|
172
181
|
fill: "none",
|
|
173
|
-
className:
|
|
174
|
-
...
|
|
182
|
+
className: s("shrink-0", c, n, i),
|
|
183
|
+
...l,
|
|
175
184
|
...t,
|
|
176
185
|
children: [
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */
|
|
186
|
+
o && /* @__PURE__ */ e("title", { children: o }),
|
|
187
|
+
/* @__PURE__ */ e(
|
|
179
188
|
"rect",
|
|
180
189
|
{
|
|
181
190
|
x: "2",
|
|
@@ -187,7 +196,7 @@ const Vr = {
|
|
|
187
196
|
fill: "none"
|
|
188
197
|
}
|
|
189
198
|
),
|
|
190
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ e(
|
|
191
200
|
"text",
|
|
192
201
|
{
|
|
193
202
|
x: "12",
|
|
@@ -28,8 +28,11 @@ export type IconColor = keyof typeof iconColors;
|
|
|
28
28
|
export type IconSize = keyof typeof iconSizes;
|
|
29
29
|
export type { CustomIconName };
|
|
30
30
|
export type LucideIconName = string;
|
|
31
|
-
export type
|
|
32
|
-
|
|
31
|
+
export type IconComponent = React.ComponentType<{
|
|
32
|
+
className?: string;
|
|
33
|
+
}>;
|
|
34
|
+
export type IconType = CustomIconName | LucideIconName | IconComponent;
|
|
35
|
+
export interface IconProps extends Omit<React.SVGAttributes<SVGElement>, "color" | "name"> {
|
|
33
36
|
name: IconType;
|
|
34
37
|
size?: IconSize;
|
|
35
38
|
color?: IconColor;
|
|
@@ -70,7 +70,7 @@ export type { TreeProps, TreeDataItem } from './fundamental/tree.js';
|
|
|
70
70
|
export { CountryDropdown, useCountryData } from './fundamental/country-dropdown.js';
|
|
71
71
|
export type { Country, CountryDropdownProps, CountryDropdownTriggerProps } from './fundamental/country-dropdown.js';
|
|
72
72
|
export { Icon } from './fundamental/icon.js';
|
|
73
|
-
export type { IconColor, IconSize, CustomIconName } from './fundamental/icon.js';
|
|
73
|
+
export type { IconColor, IconSize, CustomIconName, IconComponent, IconType } from './fundamental/icon.js';
|
|
74
74
|
export { Kbd, KbdGroup } from './fundamental/kbd.js';
|
|
75
75
|
export type { KbdProps, KbdGroupProps } from './fundamental/kbd.js';
|
|
76
76
|
export { MonthPicker } from './fundamental/month-picker.js';
|
package/package.json
CHANGED