@l3mpire/ui 2.25.1 → 2.25.2
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/USAGE.md +24 -11
- package/dist/index.js +87 -63
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -73
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/styles/globals.css +1 -0
package/dist/index.mjs
CHANGED
|
@@ -343,7 +343,7 @@ var Button = React2.forwardRef(
|
|
|
343
343
|
Button.displayName = "Button";
|
|
344
344
|
|
|
345
345
|
// src/components/ui/browser-tab.tsx
|
|
346
|
-
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
346
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
347
347
|
var BrowserTabContext = React3.createContext(null);
|
|
348
348
|
var BrowserTabItem = React3.forwardRef(
|
|
349
349
|
({ className, icon, label, badge, isActive = false, onClose, onRename, ...props }, ref) => {
|
|
@@ -380,6 +380,7 @@ var BrowserTabItem = React3.forwardRef(
|
|
|
380
380
|
} : {};
|
|
381
381
|
const isDragged = ctx?.draggable && ctx.dragIndex === ctx.itemIndex;
|
|
382
382
|
const isDropTarget = ctx?.draggable && ctx.dropIndex === ctx.itemIndex && ctx.dragIndex !== ctx.itemIndex;
|
|
383
|
+
const showGrip = ctx?.draggable && isHovered;
|
|
383
384
|
return /* @__PURE__ */ jsxs3(
|
|
384
385
|
"div",
|
|
385
386
|
{
|
|
@@ -387,78 +388,101 @@ var BrowserTabItem = React3.forwardRef(
|
|
|
387
388
|
onMouseEnter: () => setIsHovered(true),
|
|
388
389
|
onMouseLeave: () => setIsHovered(false),
|
|
389
390
|
className: cn(
|
|
390
|
-
"
|
|
391
|
-
"
|
|
392
|
-
isActive ? "border-l border-r border-t
|
|
391
|
+
"relative shrink-0 p-xs rounded-tl-base rounded-tr-base cursor-pointer select-none transition-opacity",
|
|
392
|
+
"border-solid border-browser-tab-item-border",
|
|
393
|
+
isActive ? "bg-browser-tab-item-bg border-l border-r border-t mb-[-1px] z-10" : "border-0",
|
|
393
394
|
isDragged && "opacity-40",
|
|
394
|
-
isDropTarget && "ring-2 ring-inset ring-blue-400
|
|
395
|
+
isDropTarget && "ring-2 ring-inset ring-blue-400",
|
|
395
396
|
className
|
|
396
397
|
),
|
|
397
398
|
...dragProps,
|
|
398
399
|
...props,
|
|
399
400
|
children: [
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
{
|
|
403
|
-
icon: ctx?.draggable && isHovered ? faGripDotsVerticalSolid : icon,
|
|
404
|
-
size: "xs",
|
|
405
|
-
className: cn(
|
|
406
|
-
ctx?.draggable && isHovered ? "text-browser-tab-item-hover-icon cursor-grab" : isActive ? "text-browser-tab-item-active-icon" : "text-browser-tab-item-inactive-icon"
|
|
407
|
-
)
|
|
408
|
-
}
|
|
409
|
-
) }),
|
|
410
|
-
isEditing ? /* @__PURE__ */ jsx3(
|
|
411
|
-
"input",
|
|
412
|
-
{
|
|
413
|
-
ref: inputRef,
|
|
414
|
-
value: editValue,
|
|
415
|
-
onChange: (e) => setEditValue(e.target.value),
|
|
416
|
-
onBlur: commitRename,
|
|
417
|
-
onKeyDown: (e) => {
|
|
418
|
-
if (e.key === "Enter") commitRename();
|
|
419
|
-
if (e.key === "Escape") cancelRename();
|
|
420
|
-
},
|
|
421
|
-
onClick: (e) => e.stopPropagation(),
|
|
422
|
-
className: cn(
|
|
423
|
-
"text-sm font-medium leading-sm bg-transparent outline-none p-0 m-0",
|
|
424
|
-
"border-b border-browser-tab-item-border border-dashed border-t-0 border-l-0 border-r-0",
|
|
425
|
-
isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
426
|
-
),
|
|
427
|
-
style: { width: `${Math.max(editValue.length + 1, 2)}ch` }
|
|
428
|
-
}
|
|
429
|
-
) : /* @__PURE__ */ jsx3(
|
|
430
|
-
"span",
|
|
401
|
+
/* @__PURE__ */ jsxs3(
|
|
402
|
+
"div",
|
|
431
403
|
{
|
|
432
404
|
className: cn(
|
|
433
|
-
"
|
|
434
|
-
isActive ? "
|
|
405
|
+
"flex items-center gap-base px-xs py-2xs transition-[background-color,border-radius,box-shadow]",
|
|
406
|
+
isHovered && !isActive ? "bg-browser-tab-item-hover-bg rounded-sm shadow-sm" : "bg-browser-tab-item-bg rounded-base"
|
|
435
407
|
),
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
408
|
+
children: [
|
|
409
|
+
icon && /* @__PURE__ */ jsx3("div", { className: "shrink-0", children: /* @__PURE__ */ jsx3(
|
|
410
|
+
Icon3,
|
|
411
|
+
{
|
|
412
|
+
icon: showGrip ? faGripDotsVerticalSolid : icon,
|
|
413
|
+
size: "xs",
|
|
414
|
+
className: cn(
|
|
415
|
+
showGrip ? "text-browser-tab-item-hover-icon cursor-grab" : isActive ? "text-browser-tab-item-active-icon" : "text-browser-tab-item-inactive-icon"
|
|
416
|
+
)
|
|
417
|
+
}
|
|
418
|
+
) }),
|
|
419
|
+
isEditing ? /* @__PURE__ */ jsx3(
|
|
420
|
+
"input",
|
|
421
|
+
{
|
|
422
|
+
ref: inputRef,
|
|
423
|
+
value: editValue,
|
|
424
|
+
onChange: (e) => setEditValue(e.target.value),
|
|
425
|
+
onBlur: commitRename,
|
|
426
|
+
onKeyDown: (e) => {
|
|
427
|
+
if (e.key === "Enter") commitRename();
|
|
428
|
+
if (e.key === "Escape") cancelRename();
|
|
429
|
+
},
|
|
430
|
+
onClick: (e) => e.stopPropagation(),
|
|
431
|
+
className: cn(
|
|
432
|
+
"text-sm font-medium leading-sm bg-transparent outline-none p-0 m-0",
|
|
433
|
+
"border-b border-browser-tab-item-border border-dashed border-t-0 border-l-0 border-r-0",
|
|
434
|
+
isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
435
|
+
),
|
|
436
|
+
style: { width: `${Math.max(editValue.length + 1, 2)}ch` }
|
|
437
|
+
}
|
|
438
|
+
) : /* @__PURE__ */ jsx3(
|
|
439
|
+
"span",
|
|
440
|
+
{
|
|
441
|
+
className: cn(
|
|
442
|
+
"text-sm font-medium leading-sm whitespace-nowrap",
|
|
443
|
+
isActive ? "text-browser-tab-item-active-text" : "text-browser-tab-item-inactive-text"
|
|
444
|
+
),
|
|
445
|
+
onDoubleClick: (e) => {
|
|
446
|
+
if (onRename) {
|
|
447
|
+
e.stopPropagation();
|
|
448
|
+
setEditValue(label);
|
|
449
|
+
setIsEditing(true);
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
children: label
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
badge && /* @__PURE__ */ jsx3(Badge, { variant: "light", type: "neutral", size: "sm", children: badge }),
|
|
456
|
+
onClose && /* @__PURE__ */ jsx3(
|
|
457
|
+
"button",
|
|
458
|
+
{
|
|
459
|
+
onClick: (e) => {
|
|
460
|
+
e.stopPropagation();
|
|
461
|
+
onClose(e);
|
|
462
|
+
},
|
|
463
|
+
className: cn(
|
|
464
|
+
"shrink-0 flex items-center justify-center cursor-pointer",
|
|
465
|
+
isActive ? "text-browser-tab-item-active-icon" : "text-browser-tab-item-inactive-icon"
|
|
466
|
+
),
|
|
467
|
+
"aria-label": `Close ${label}`,
|
|
468
|
+
children: /* @__PURE__ */ jsx3(Icon3, { icon: faXmarkOutline, size: "xs" })
|
|
469
|
+
}
|
|
470
|
+
)
|
|
471
|
+
]
|
|
444
472
|
}
|
|
445
473
|
),
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
"
|
|
449
|
-
{
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
className:
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
"aria-label": `Close ${label}`,
|
|
459
|
-
children: /* @__PURE__ */ jsx3(Icon3, { icon: faXmarkOutline, size: "xs" })
|
|
460
|
-
}
|
|
461
|
-
)
|
|
474
|
+
isActive && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
475
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "pointer-events-none absolute bottom-0 left-[-1px] w-px h-[8px] bg-browser-tab-item-bg" }),
|
|
476
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "pointer-events-none absolute bottom-0 right-[-1px] w-px h-[8px] bg-browser-tab-item-bg" }),
|
|
477
|
+
/* @__PURE__ */ jsxs3("span", { "aria-hidden": true, className: "pointer-events-none absolute bottom-0 left-[-8px] size-[8px]", children: [
|
|
478
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute bottom-0 left-0 right-0 h-px bg-browser-tab-item-bg" }),
|
|
479
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute inset-0 rounded-br-[8px] border-b border-r border-solid border-browser-tab-item-border" })
|
|
480
|
+
] }),
|
|
481
|
+
/* @__PURE__ */ jsxs3("span", { "aria-hidden": true, className: "pointer-events-none absolute bottom-0 right-[-8px] size-[8px]", children: [
|
|
482
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute bottom-0 left-0 right-0 h-px bg-browser-tab-item-bg" }),
|
|
483
|
+
/* @__PURE__ */ jsx3("span", { className: "absolute inset-0 rounded-bl-[8px] border-b border-l border-solid border-browser-tab-item-border" })
|
|
484
|
+
] })
|
|
485
|
+
] })
|
|
462
486
|
]
|
|
463
487
|
}
|
|
464
488
|
);
|
|
@@ -539,7 +563,7 @@ var BrowserTab = React3.forwardRef(
|
|
|
539
563
|
{
|
|
540
564
|
ref,
|
|
541
565
|
className: cn(
|
|
542
|
-
"flex items-end w-full h-[44px] border-b border-browser-tab-border
|
|
566
|
+
"flex items-end w-full h-[44px] border-b border-browser-tab-border pl-base pr-lg",
|
|
543
567
|
className
|
|
544
568
|
),
|
|
545
569
|
...props,
|
|
@@ -548,7 +572,7 @@ var BrowserTab = React3.forwardRef(
|
|
|
548
572
|
"div",
|
|
549
573
|
{
|
|
550
574
|
ref: tabsContainerRef,
|
|
551
|
-
className: "flex items-center flex-1 min-w-0",
|
|
575
|
+
className: "flex items-center flex-1 min-w-0 pl-base",
|
|
552
576
|
style: { overflowX: "clip", overflowY: "visible" },
|
|
553
577
|
children: [
|
|
554
578
|
childArray.map((child, index) => /* @__PURE__ */ jsx3(BrowserTabContext.Provider, { value: { ...ctxBase, itemIndex: index }, children: child }, index)),
|
|
@@ -1780,7 +1804,7 @@ var ProductLogo = React13.forwardRef(
|
|
|
1780
1804
|
ProductLogo.displayName = "ProductLogo";
|
|
1781
1805
|
|
|
1782
1806
|
// src/components/ui/sidebar.tsx
|
|
1783
|
-
import { Fragment, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1807
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1784
1808
|
var SidebarContext = React14.createContext({
|
|
1785
1809
|
isCollapsed: false,
|
|
1786
1810
|
isHovered: false,
|
|
@@ -1816,7 +1840,7 @@ var SidebarHeader = React14.forwardRef(
|
|
|
1816
1840
|
) : /* @__PURE__ */ jsx14(ProductLogo, { product: "lemlist", size: "sm", hasText: false })
|
|
1817
1841
|
) : (
|
|
1818
1842
|
// Expanded: logo + collapse button
|
|
1819
|
-
/* @__PURE__ */ jsxs13(
|
|
1843
|
+
/* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
1820
1844
|
/* @__PURE__ */ jsx14(ProductLogo, { product: "lemlist", size: "sm", hasText: true }),
|
|
1821
1845
|
/* @__PURE__ */ jsx14(
|
|
1822
1846
|
"button",
|
|
@@ -1870,7 +1894,7 @@ var Sidebar = React14.forwardRef(
|
|
|
1870
1894
|
const rest = childArray.filter(
|
|
1871
1895
|
(child) => !(React14.isValidElement(child) && child.type?.displayName === "SidebarFooter")
|
|
1872
1896
|
);
|
|
1873
|
-
return /* @__PURE__ */ jsxs13(
|
|
1897
|
+
return /* @__PURE__ */ jsxs13(Fragment2, { children: [
|
|
1874
1898
|
/* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-lg p-lg flex-1 overflow-y-auto", children: rest }),
|
|
1875
1899
|
footer
|
|
1876
1900
|
] });
|
|
@@ -1914,7 +1938,7 @@ var SidebarFooter = React14.forwardRef(
|
|
|
1914
1938
|
SidebarFooter.displayName = "SidebarFooter";
|
|
1915
1939
|
|
|
1916
1940
|
// src/components/ui/search-bar.tsx
|
|
1917
|
-
import { Fragment as
|
|
1941
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1918
1942
|
var searchBarVariants = cva8(
|
|
1919
1943
|
[
|
|
1920
1944
|
"inline-flex w-full items-center rounded-md border transition-colors",
|
|
@@ -1976,7 +2000,7 @@ var SearchBar = React15.forwardRef(
|
|
|
1976
2000
|
className: "shrink-0 text-search-bar-icon"
|
|
1977
2001
|
}
|
|
1978
2002
|
),
|
|
1979
|
-
!isCollapsed && /* @__PURE__ */ jsxs14(
|
|
2003
|
+
!isCollapsed && /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
1980
2004
|
/* @__PURE__ */ jsx15(
|
|
1981
2005
|
"input",
|
|
1982
2006
|
{
|
|
@@ -2387,7 +2411,7 @@ SidebarHeadingItem.displayName = "SidebarHeadingItem";
|
|
|
2387
2411
|
import * as React21 from "react";
|
|
2388
2412
|
import { cva as cva10 } from "class-variance-authority";
|
|
2389
2413
|
import { Icon as Icon15, faChevronDownSolid as faChevronDownSolid2, faStarsOutline } from "@l3mpire/icons";
|
|
2390
|
-
import { Fragment as
|
|
2414
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2391
2415
|
var sidebarItemVariants = cva10(
|
|
2392
2416
|
[
|
|
2393
2417
|
"flex items-center gap-base rounded-base transition-colors cursor-pointer"
|
|
@@ -2457,7 +2481,7 @@ var SidebarItem = React21.forwardRef(
|
|
|
2457
2481
|
className: cn("shrink-0", iconColorClass)
|
|
2458
2482
|
}
|
|
2459
2483
|
) : null,
|
|
2460
|
-
!isCollapsed && /* @__PURE__ */ jsxs19(
|
|
2484
|
+
!isCollapsed && /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
2461
2485
|
/* @__PURE__ */ jsx21(
|
|
2462
2486
|
"span",
|
|
2463
2487
|
{
|
|
@@ -8190,7 +8214,7 @@ var FilterNodeActions = ({
|
|
|
8190
8214
|
FilterNodeActions.displayName = "FilterNodeActions";
|
|
8191
8215
|
|
|
8192
8216
|
// src/components/ui/filter/advanced-row.tsx
|
|
8193
|
-
import { Fragment as
|
|
8217
|
+
import { Fragment as Fragment5, jsx as jsx59, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
8194
8218
|
var selectBtnStyle = [
|
|
8195
8219
|
"flex items-center gap-base",
|
|
8196
8220
|
"px-base py-sm",
|
|
@@ -8396,7 +8420,7 @@ var AdvancedRow = ({
|
|
|
8396
8420
|
type: "button",
|
|
8397
8421
|
className: cn(selectBtnStyle, "flex-1 min-w-[80px] justify-between overflow-hidden"),
|
|
8398
8422
|
children: [
|
|
8399
|
-
multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx59(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsxs53(
|
|
8423
|
+
multiTags && multiTags.length > 0 ? /* @__PURE__ */ jsx59(ValueTagRow, { tags: multiTags }) : /* @__PURE__ */ jsxs53(Fragment5, { children: [
|
|
8400
8424
|
valueLeadingIcon && /* @__PURE__ */ jsx59(
|
|
8401
8425
|
Icon37,
|
|
8402
8426
|
{
|