@l3mpire/ui 2.5.1 → 2.5.3
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/index.js +608 -605
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +630 -627
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/styles/globals.css +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1148,454 +1148,17 @@ var Switch = React9.forwardRef(({ className, label, disabled, id, ...props }, re
|
|
|
1148
1148
|
Switch.displayName = "Switch";
|
|
1149
1149
|
|
|
1150
1150
|
// src/components/ui/search-bar.tsx
|
|
1151
|
-
import * as React10 from "react";
|
|
1152
|
-
import { cva as cva7 } from "class-variance-authority";
|
|
1153
|
-
import { Icon as Icon8, faMagnifyingGlassSolid, faXmarkSolid as faXmarkSolid3 } from "@l3mpire/icons";
|
|
1154
|
-
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1155
|
-
var searchBarVariants = cva7(
|
|
1156
|
-
[
|
|
1157
|
-
"inline-flex w-full items-center rounded-md border transition-colors",
|
|
1158
|
-
"border-search-bar-border-default",
|
|
1159
|
-
"hover:border-search-bar-border-hover",
|
|
1160
|
-
"focus-within:border-search-bar-border-active",
|
|
1161
|
-
"focus-within:shadow-focus-ring"
|
|
1162
|
-
],
|
|
1163
|
-
{
|
|
1164
|
-
variants: {
|
|
1165
|
-
variant: {
|
|
1166
|
-
white: "bg-search-bar-white-bg",
|
|
1167
|
-
grey: "bg-search-bar-grey-bg"
|
|
1168
|
-
},
|
|
1169
|
-
size: {
|
|
1170
|
-
sm: "gap-sm px-base py-sm",
|
|
1171
|
-
md: "gap-base px-md py-base"
|
|
1172
|
-
}
|
|
1173
|
-
},
|
|
1174
|
-
defaultVariants: { variant: "white", size: "md" }
|
|
1175
|
-
}
|
|
1176
|
-
);
|
|
1177
|
-
var inputStyle = "flex-1 min-w-0 bg-transparent outline-none text-sm font-regular leading-sm text-search-bar-text placeholder:text-search-bar-placeholder";
|
|
1178
|
-
var clearButtonStyle = "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-search-bar-clear hover:bg-black/5 transition-colors";
|
|
1179
|
-
var SearchBar = React10.forwardRef(
|
|
1180
|
-
({
|
|
1181
|
-
className,
|
|
1182
|
-
variant,
|
|
1183
|
-
size = "md",
|
|
1184
|
-
value,
|
|
1185
|
-
defaultValue,
|
|
1186
|
-
onChange,
|
|
1187
|
-
onClear,
|
|
1188
|
-
hasShortcut = false,
|
|
1189
|
-
placeholder = "Search...",
|
|
1190
|
-
...props
|
|
1191
|
-
}, ref) => {
|
|
1192
|
-
const [internalValue, setInternalValue] = React10.useState(defaultValue ?? "");
|
|
1193
|
-
const isControlled = value !== void 0;
|
|
1194
|
-
const currentValue = isControlled ? value : internalValue;
|
|
1195
|
-
const hasValue = String(currentValue).length > 0;
|
|
1196
|
-
const iconSize = size === "sm" ? "xs" : "sm";
|
|
1197
|
-
const handleChange = (e) => {
|
|
1198
|
-
if (!isControlled) setInternalValue(e.target.value);
|
|
1199
|
-
onChange?.(e);
|
|
1200
|
-
};
|
|
1201
|
-
const handleClear = () => {
|
|
1202
|
-
if (!isControlled) setInternalValue("");
|
|
1203
|
-
onClear?.();
|
|
1204
|
-
};
|
|
1205
|
-
return /* @__PURE__ */ jsxs10("div", { className: cn(searchBarVariants({ variant, size }), className), children: [
|
|
1206
|
-
/* @__PURE__ */ jsx10(
|
|
1207
|
-
Icon8,
|
|
1208
|
-
{
|
|
1209
|
-
icon: faMagnifyingGlassSolid,
|
|
1210
|
-
size: iconSize,
|
|
1211
|
-
className: "shrink-0 text-search-bar-icon"
|
|
1212
|
-
}
|
|
1213
|
-
),
|
|
1214
|
-
/* @__PURE__ */ jsx10(
|
|
1215
|
-
"input",
|
|
1216
|
-
{
|
|
1217
|
-
ref,
|
|
1218
|
-
type: "text",
|
|
1219
|
-
value: currentValue,
|
|
1220
|
-
defaultValue: void 0,
|
|
1221
|
-
onChange: handleChange,
|
|
1222
|
-
placeholder,
|
|
1223
|
-
className: inputStyle,
|
|
1224
|
-
...props
|
|
1225
|
-
}
|
|
1226
|
-
),
|
|
1227
|
-
hasShortcut && !hasValue && /* @__PURE__ */ jsx10("span", { className: "shrink-0 text-xs text-search-bar-placeholder", children: "\u2318K" }),
|
|
1228
|
-
hasValue && /* @__PURE__ */ jsx10(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs10(Tooltip, { children: [
|
|
1229
|
-
/* @__PURE__ */ jsx10(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx10(
|
|
1230
|
-
"button",
|
|
1231
|
-
{
|
|
1232
|
-
type: "button",
|
|
1233
|
-
onClick: handleClear,
|
|
1234
|
-
className: clearButtonStyle,
|
|
1235
|
-
"aria-label": "Erase",
|
|
1236
|
-
children: /* @__PURE__ */ jsx10(Icon8, { icon: faXmarkSolid3, size: "xs" })
|
|
1237
|
-
}
|
|
1238
|
-
) }),
|
|
1239
|
-
/* @__PURE__ */ jsx10(TooltipContent, { children: "Erase" })
|
|
1240
|
-
] }) })
|
|
1241
|
-
] });
|
|
1242
|
-
}
|
|
1243
|
-
);
|
|
1244
|
-
SearchBar.displayName = "SearchBar";
|
|
1245
|
-
|
|
1246
|
-
// src/components/ui/avatar.tsx
|
|
1247
|
-
import * as React11 from "react";
|
|
1248
|
-
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
1249
|
-
import { cva as cva8 } from "class-variance-authority";
|
|
1250
|
-
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1251
|
-
var avatarVariants = cva8(
|
|
1252
|
-
"relative inline-flex shrink-0 items-center justify-center overflow-clip",
|
|
1253
|
-
{
|
|
1254
|
-
variants: {
|
|
1255
|
-
size: {
|
|
1256
|
-
sm: "size-4",
|
|
1257
|
-
md: "size-5",
|
|
1258
|
-
lg: "size-6",
|
|
1259
|
-
xl: "size-8"
|
|
1260
|
-
},
|
|
1261
|
-
shape: {
|
|
1262
|
-
rounded: "rounded-full",
|
|
1263
|
-
squared: ""
|
|
1264
|
-
}
|
|
1265
|
-
},
|
|
1266
|
-
compoundVariants: [
|
|
1267
|
-
{ shape: "squared", size: "sm", class: "rounded-xs" },
|
|
1268
|
-
{ shape: "squared", size: "md", class: "rounded-sm" },
|
|
1269
|
-
{ shape: "squared", size: "lg", class: "rounded-base" },
|
|
1270
|
-
{ shape: "squared", size: "xl", class: "rounded-base" }
|
|
1271
|
-
],
|
|
1272
|
-
defaultVariants: {
|
|
1273
|
-
size: "xl",
|
|
1274
|
-
shape: "rounded"
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
);
|
|
1278
|
-
var initialsFontSize = {
|
|
1279
|
-
sm: "text-[8px] leading-[14px]",
|
|
1280
|
-
md: "text-xs leading-2xs",
|
|
1281
|
-
lg: "text-sm leading-sm",
|
|
1282
|
-
xl: "text-base leading-base"
|
|
1283
|
-
};
|
|
1284
|
-
var Avatar = React11.forwardRef(({ className, size = "xl", shape = "rounded", src, alt, initials, badge, ...props }, ref) => {
|
|
1285
|
-
return /* @__PURE__ */ jsxs11("div", { className: "relative inline-flex", children: [
|
|
1286
|
-
/* @__PURE__ */ jsxs11(
|
|
1287
|
-
AvatarPrimitive.Root,
|
|
1288
|
-
{
|
|
1289
|
-
ref,
|
|
1290
|
-
className: cn(
|
|
1291
|
-
avatarVariants({ size, shape }),
|
|
1292
|
-
"bg-avatar-fallback-bg",
|
|
1293
|
-
className
|
|
1294
|
-
),
|
|
1295
|
-
...props,
|
|
1296
|
-
children: [
|
|
1297
|
-
/* @__PURE__ */ jsx11(
|
|
1298
|
-
AvatarPrimitive.Image,
|
|
1299
|
-
{
|
|
1300
|
-
src,
|
|
1301
|
-
alt: alt ?? "",
|
|
1302
|
-
className: "absolute inset-0 size-full object-cover"
|
|
1303
|
-
}
|
|
1304
|
-
),
|
|
1305
|
-
/* @__PURE__ */ jsx11(
|
|
1306
|
-
AvatarPrimitive.Fallback,
|
|
1307
|
-
{
|
|
1308
|
-
delayMs: 0,
|
|
1309
|
-
className: cn(
|
|
1310
|
-
"font-medium",
|
|
1311
|
-
"text-avatar-fallback-text",
|
|
1312
|
-
"select-none text-center",
|
|
1313
|
-
initialsFontSize[size ?? "xl"]
|
|
1314
|
-
),
|
|
1315
|
-
children: initials ?? "??"
|
|
1316
|
-
}
|
|
1317
|
-
)
|
|
1318
|
-
]
|
|
1319
|
-
}
|
|
1320
|
-
),
|
|
1321
|
-
badge && size === "xl" && /* @__PURE__ */ jsx11("div", { className: "absolute bottom-0 right-0 size-4 overflow-clip rounded-full", children: badge })
|
|
1322
|
-
] });
|
|
1323
|
-
});
|
|
1324
|
-
Avatar.displayName = "Avatar";
|
|
1325
|
-
|
|
1326
|
-
// src/components/ui/checkbox.tsx
|
|
1327
1151
|
import * as React12 from "react";
|
|
1328
|
-
import
|
|
1329
|
-
import { Icon as Icon9,
|
|
1330
|
-
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1331
|
-
var rootStyles = {
|
|
1332
|
-
base: "peer shrink-0 size-4 rounded-sm inline-flex items-center justify-center transition-colors cursor-pointer focus-visible:outline-none",
|
|
1333
|
-
unchecked: [
|
|
1334
|
-
"bg-checkbox-unchecked-bg",
|
|
1335
|
-
"border border-checkbox-unchecked-border-default",
|
|
1336
|
-
"hover:border-checkbox-unchecked-border-hover",
|
|
1337
|
-
"active:border-checkbox-unchecked-border-pressed",
|
|
1338
|
-
"active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1339
|
-
],
|
|
1340
|
-
checked: [
|
|
1341
|
-
"data-[state=checked]:bg-checkbox-checked-bg-default",
|
|
1342
|
-
"data-[state=checked]:border-transparent",
|
|
1343
|
-
"data-[state=checked]:hover:bg-checkbox-checked-bg-hover",
|
|
1344
|
-
"data-[state=checked]:active:bg-checkbox-checked-bg-pressed",
|
|
1345
|
-
"data-[state=checked]:active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1346
|
-
],
|
|
1347
|
-
disabled: [
|
|
1348
|
-
"disabled:pointer-events-none",
|
|
1349
|
-
"disabled:bg-checkbox-disabled-bg",
|
|
1350
|
-
"disabled:border-checkbox-disabled-border",
|
|
1351
|
-
"data-[state=checked]:disabled:bg-checkbox-disabled-bg",
|
|
1352
|
-
"data-[state=checked]:disabled:border-transparent"
|
|
1353
|
-
]
|
|
1354
|
-
};
|
|
1355
|
-
var iconStyle = {
|
|
1356
|
-
default: "text-checkbox-checked-icon",
|
|
1357
|
-
disabled: "text-checkbox-disabled-icon"
|
|
1358
|
-
};
|
|
1359
|
-
var labelBase2 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium leading-sm";
|
|
1360
|
-
var labelColor2 = {
|
|
1361
|
-
default: "text-checkbox-label-default",
|
|
1362
|
-
disabled: "pointer-events-none text-checkbox-label-disabled"
|
|
1363
|
-
};
|
|
1364
|
-
var Checkbox = React12.forwardRef(({ className, label, disabled, id, ...props }, ref) => {
|
|
1365
|
-
const innerId = id ?? React12.useId();
|
|
1366
|
-
return /* @__PURE__ */ jsxs12("div", { className: "inline-flex items-center gap-base", children: [
|
|
1367
|
-
/* @__PURE__ */ jsx12(
|
|
1368
|
-
CheckboxPrimitive.Root,
|
|
1369
|
-
{
|
|
1370
|
-
ref,
|
|
1371
|
-
id: innerId,
|
|
1372
|
-
disabled,
|
|
1373
|
-
className: cn(
|
|
1374
|
-
rootStyles.base,
|
|
1375
|
-
rootStyles.unchecked,
|
|
1376
|
-
rootStyles.checked,
|
|
1377
|
-
rootStyles.disabled,
|
|
1378
|
-
className
|
|
1379
|
-
),
|
|
1380
|
-
...props,
|
|
1381
|
-
children: /* @__PURE__ */ jsx12(
|
|
1382
|
-
CheckboxPrimitive.Indicator,
|
|
1383
|
-
{
|
|
1384
|
-
forceMount: true,
|
|
1385
|
-
className: cn(
|
|
1386
|
-
"flex items-center justify-center transition-opacity",
|
|
1387
|
-
"data-[state=unchecked]:opacity-0",
|
|
1388
|
-
"data-[state=checked]:opacity-100",
|
|
1389
|
-
"data-[state=indeterminate]:opacity-100"
|
|
1390
|
-
),
|
|
1391
|
-
children: /* @__PURE__ */ jsx12(
|
|
1392
|
-
Icon9,
|
|
1393
|
-
{
|
|
1394
|
-
icon: faCheckSolid,
|
|
1395
|
-
size: "xs",
|
|
1396
|
-
className: iconStyle[disabled ? "disabled" : "default"]
|
|
1397
|
-
}
|
|
1398
|
-
)
|
|
1399
|
-
}
|
|
1400
|
-
)
|
|
1401
|
-
}
|
|
1402
|
-
),
|
|
1403
|
-
label && /* @__PURE__ */ jsx12(
|
|
1404
|
-
"label",
|
|
1405
|
-
{
|
|
1406
|
-
htmlFor: innerId,
|
|
1407
|
-
className: cn(labelBase2, labelColor2[disabled ? "disabled" : "default"]),
|
|
1408
|
-
children: label
|
|
1409
|
-
}
|
|
1410
|
-
)
|
|
1411
|
-
] });
|
|
1412
|
-
});
|
|
1413
|
-
Checkbox.displayName = "Checkbox";
|
|
1414
|
-
|
|
1415
|
-
// src/components/ui/dropdown-menu.tsx
|
|
1416
|
-
import * as React13 from "react";
|
|
1417
|
-
import * as DropdownMenuPrimitive2 from "@radix-ui/react-dropdown-menu";
|
|
1418
|
-
import { Icon as Icon10 } from "@l3mpire/icons";
|
|
1419
|
-
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1420
|
-
var textSm = "text-sm font-regular leading-sm";
|
|
1421
|
-
var textXs = "text-xs font-regular leading-xs";
|
|
1422
|
-
var textXsMedium = "text-xs font-medium leading-xs";
|
|
1423
|
-
var textSmMedium = "text-sm font-medium leading-sm";
|
|
1424
|
-
var containerStyle = [
|
|
1425
|
-
"flex flex-col gap-base overflow-clip",
|
|
1426
|
-
"bg-dropdown-bg",
|
|
1427
|
-
"border border-dropdown-border",
|
|
1428
|
-
"rounded-md",
|
|
1429
|
-
"p-base",
|
|
1430
|
-
"shadow-lg"
|
|
1431
|
-
];
|
|
1432
|
-
var DropdownMenu = React13.forwardRef(
|
|
1433
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13("div", { ref, className: cn(containerStyle, className), ...props, children })
|
|
1434
|
-
);
|
|
1435
|
-
DropdownMenu.displayName = "DropdownMenu";
|
|
1436
|
-
var DropdownMenuRoot = DropdownMenuPrimitive2.Root;
|
|
1437
|
-
var DropdownMenuTrigger = DropdownMenuPrimitive2.Trigger;
|
|
1438
|
-
var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsx13(DropdownMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx13(
|
|
1439
|
-
DropdownMenuPrimitive2.Content,
|
|
1440
|
-
{
|
|
1441
|
-
ref,
|
|
1442
|
-
sideOffset,
|
|
1443
|
-
className: cn(
|
|
1444
|
-
containerStyle,
|
|
1445
|
-
"z-50",
|
|
1446
|
-
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1447
|
-
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1448
|
-
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1449
|
-
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
1450
|
-
className
|
|
1451
|
-
),
|
|
1452
|
-
...props,
|
|
1453
|
-
children
|
|
1454
|
-
}
|
|
1455
|
-
) }));
|
|
1456
|
-
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1457
|
-
var DropdownMenuList = React13.forwardRef(
|
|
1458
|
-
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13("div", { ref, className: cn("flex flex-col", className), role: "listbox", ...props, children })
|
|
1459
|
-
);
|
|
1460
|
-
DropdownMenuList.displayName = "DropdownMenuList";
|
|
1461
|
-
var itemStyle = "flex items-center gap-base p-base rounded-base cursor-pointer hover:bg-dropdown-item-hover";
|
|
1462
|
-
var DropdownMenuItem = React13.forwardRef(
|
|
1463
|
-
({
|
|
1464
|
-
className,
|
|
1465
|
-
icon,
|
|
1466
|
-
avatar,
|
|
1467
|
-
flag,
|
|
1468
|
-
label,
|
|
1469
|
-
description,
|
|
1470
|
-
badge,
|
|
1471
|
-
action,
|
|
1472
|
-
isActive,
|
|
1473
|
-
children,
|
|
1474
|
-
...props
|
|
1475
|
-
}, ref) => /* @__PURE__ */ jsxs13(
|
|
1476
|
-
"div",
|
|
1477
|
-
{
|
|
1478
|
-
ref,
|
|
1479
|
-
role: "option",
|
|
1480
|
-
"aria-selected": isActive,
|
|
1481
|
-
className: cn(
|
|
1482
|
-
itemStyle,
|
|
1483
|
-
isActive && "bg-dropdown-item-hover",
|
|
1484
|
-
className
|
|
1485
|
-
),
|
|
1486
|
-
...props,
|
|
1487
|
-
children: [
|
|
1488
|
-
children,
|
|
1489
|
-
avatar,
|
|
1490
|
-
flag,
|
|
1491
|
-
icon && /* @__PURE__ */ jsx13(
|
|
1492
|
-
Icon10,
|
|
1493
|
-
{
|
|
1494
|
-
icon,
|
|
1495
|
-
size: "sm",
|
|
1496
|
-
className: "shrink-0 text-dropdown-item-icon"
|
|
1497
|
-
}
|
|
1498
|
-
),
|
|
1499
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
1500
|
-
/* @__PURE__ */ jsx13("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
1501
|
-
description && /* @__PURE__ */ jsx13("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
1502
|
-
] }),
|
|
1503
|
-
badge,
|
|
1504
|
-
action
|
|
1505
|
-
]
|
|
1506
|
-
}
|
|
1507
|
-
)
|
|
1508
|
-
);
|
|
1509
|
-
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1510
|
-
var DropdownMenuRadixItem = React13.forwardRef(
|
|
1511
|
-
({
|
|
1512
|
-
className,
|
|
1513
|
-
icon,
|
|
1514
|
-
avatar,
|
|
1515
|
-
flag,
|
|
1516
|
-
label,
|
|
1517
|
-
description,
|
|
1518
|
-
badge,
|
|
1519
|
-
action,
|
|
1520
|
-
children,
|
|
1521
|
-
...props
|
|
1522
|
-
}, ref) => /* @__PURE__ */ jsxs13(
|
|
1523
|
-
DropdownMenuPrimitive2.Item,
|
|
1524
|
-
{
|
|
1525
|
-
ref,
|
|
1526
|
-
className: cn(
|
|
1527
|
-
itemStyle,
|
|
1528
|
-
"outline-none focus:bg-dropdown-item-hover",
|
|
1529
|
-
className
|
|
1530
|
-
),
|
|
1531
|
-
...props,
|
|
1532
|
-
children: [
|
|
1533
|
-
children,
|
|
1534
|
-
avatar,
|
|
1535
|
-
flag,
|
|
1536
|
-
icon && /* @__PURE__ */ jsx13(
|
|
1537
|
-
Icon10,
|
|
1538
|
-
{
|
|
1539
|
-
icon,
|
|
1540
|
-
size: "sm",
|
|
1541
|
-
className: "shrink-0 text-dropdown-item-icon"
|
|
1542
|
-
}
|
|
1543
|
-
),
|
|
1544
|
-
/* @__PURE__ */ jsxs13("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
1545
|
-
/* @__PURE__ */ jsx13("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
1546
|
-
description && /* @__PURE__ */ jsx13("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
1547
|
-
] }),
|
|
1548
|
-
badge,
|
|
1549
|
-
action
|
|
1550
|
-
]
|
|
1551
|
-
}
|
|
1552
|
-
)
|
|
1553
|
-
);
|
|
1554
|
-
DropdownMenuRadixItem.displayName = "DropdownMenuRadixItem";
|
|
1555
|
-
var DropdownMenuHeading = React13.forwardRef(({ className, action, children, ...props }, ref) => /* @__PURE__ */ jsxs13(
|
|
1556
|
-
"div",
|
|
1557
|
-
{
|
|
1558
|
-
ref,
|
|
1559
|
-
className: cn(
|
|
1560
|
-
"flex items-center gap-base p-base rounded-base",
|
|
1561
|
-
className
|
|
1562
|
-
),
|
|
1563
|
-
...props,
|
|
1564
|
-
children: [
|
|
1565
|
-
/* @__PURE__ */ jsx13("span", { className: cn("flex-1 truncate uppercase", textXsMedium, "text-dropdown-heading-text"), children }),
|
|
1566
|
-
action
|
|
1567
|
-
]
|
|
1568
|
-
}
|
|
1569
|
-
));
|
|
1570
|
-
DropdownMenuHeading.displayName = "DropdownMenuHeading";
|
|
1571
|
-
var clearStyle = [
|
|
1572
|
-
"sticky bottom-0 -mx-base -mb-base",
|
|
1573
|
-
"flex items-center justify-center",
|
|
1574
|
-
"h-10 min-w-[80px] px-md py-[10px]",
|
|
1575
|
-
"bg-gradient-to-t from-[#fbfbfb] from-[10%] to-white",
|
|
1576
|
-
"border border-dropdown-border",
|
|
1577
|
-
"shadow-sm",
|
|
1578
|
-
"cursor-pointer"
|
|
1579
|
-
];
|
|
1580
|
-
var DropdownMenuClear = React13.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
1581
|
-
"button",
|
|
1582
|
-
{
|
|
1583
|
-
ref,
|
|
1584
|
-
type: "button",
|
|
1585
|
-
className: cn(clearStyle, textSmMedium, "text-dropdown-clear-text", className),
|
|
1586
|
-
...props,
|
|
1587
|
-
children
|
|
1588
|
-
}
|
|
1589
|
-
));
|
|
1590
|
-
DropdownMenuClear.displayName = "DropdownMenuClear";
|
|
1152
|
+
import { cva as cva8 } from "class-variance-authority";
|
|
1153
|
+
import { Icon as Icon9, faMagnifyingGlassSolid, faXmarkSolid as faXmarkSolid3 } from "@l3mpire/icons";
|
|
1591
1154
|
|
|
1592
1155
|
// src/components/ui/sidebar.tsx
|
|
1593
|
-
import * as
|
|
1594
|
-
import { Icon as
|
|
1156
|
+
import * as React11 from "react";
|
|
1157
|
+
import { Icon as Icon8, faArrowLeftFromLineOutline, faArrowRightFromLineOutline } from "@l3mpire/icons";
|
|
1595
1158
|
|
|
1596
1159
|
// src/components/ui/product-logo.tsx
|
|
1597
|
-
import * as
|
|
1598
|
-
import { cva as
|
|
1160
|
+
import * as React10 from "react";
|
|
1161
|
+
import { cva as cva7 } from "class-variance-authority";
|
|
1599
1162
|
|
|
1600
1163
|
// src/assets/logos/lemlist-sm-picto.svg
|
|
1601
1164
|
var lemlist_sm_picto_default = '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M16.4386 0H3.56138C1.59448 0 0 1.59448 0 3.56138V16.4386C0 18.4055 1.59448 20 3.56138 20H16.4386C18.4055 20 20 18.4055 20 16.4386V3.56138C20 1.59448 18.4055 0 16.4386 0Z" fill="#316BFF"/>\n<path d="M14.6428 13.3821V14.1178C14.6428 14.4076 14.4076 14.6428 14.1178 14.6428H7.41337C6.30968 14.5723 5.42773 13.6903 5.35718 12.5866V5.88215C5.35718 5.59237 5.59236 5.35719 5.88215 5.35719H6.61794C6.90772 5.35719 7.14291 5.59237 7.14291 5.88215V11.4922C7.14291 12.2464 7.75355 12.8571 8.50782 12.8571H14.1178C14.4076 12.8571 14.6428 13.0923 14.6428 13.3821Z" fill="white"/>\n<path d="M14.1178 5.35718H9.45362C9.16369 5.35718 8.92865 5.59222 8.92865 5.88215V6.61795C8.92865 6.90788 9.16369 7.14291 9.45362 7.14291H14.1178C14.4078 7.14291 14.6428 6.90788 14.6428 6.61795V5.88215C14.6428 5.59222 14.4078 5.35718 14.1178 5.35718Z" fill="white"/>\n<path d="M13.2846 9.10755H9.45362C9.16369 9.10755 8.92865 9.34259 8.92865 9.63252V10.3683C8.92865 10.6582 9.16369 10.8933 9.45362 10.8933H13.2846C13.5746 10.8933 13.8096 10.6582 13.8096 10.3683V9.63252C13.8096 9.34259 13.5746 9.10755 13.2846 9.10755Z" fill="white"/>\n</svg>\n';
|
|
@@ -1724,8 +1287,8 @@ var lemcal_md_logotype_dark_default = '<svg width="111" height="28" viewBox="0 0
|
|
|
1724
1287
|
var lemcal_lg_logotype_dark_default = '<svg width="127" height="32" viewBox="0 0 127 32" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M43.4336 6.48746V25.7729C43.4336 26.237 43.0592 26.6136 42.5979 26.6136H41.1979C40.7366 26.6136 40.3622 26.237 40.3622 25.7729V6.48746C40.3622 6.02341 40.7366 5.6468 41.1979 5.6468H42.5979C43.0592 5.6468 43.4336 6.02341 43.4336 6.48746Z" fill="white"/>\n<path d="M49.4964 20.2429C49.7651 22.4932 51.613 23.962 54.2967 23.962C55.5402 23.962 57.0525 23.5652 58.0393 22.8429C58.3696 22.6008 58.8228 22.6291 59.117 22.9156L59.9313 23.7105C60.2883 24.0589 60.2696 24.6453 59.8845 24.9601C58.3522 26.2137 56.194 26.8418 54.2365 26.8418C49.4054 26.8418 46.3046 23.7522 46.3046 19.0135C46.3046 14.2749 49.4362 11.305 54.0279 11.305C58.6196 11.305 61.6923 13.9548 61.477 19.4372C61.4597 19.8878 61.0893 20.2443 60.6413 20.2443H49.495L49.4964 20.2429ZM58.4712 17.6335C58.292 15.2944 56.5925 14.0637 54.1175 14.0637C51.8805 14.0637 50.0326 15.2931 49.5552 17.6335H58.4712Z" fill="white"/>\n<path d="M73.9362 25.7729V17.9998C73.9362 16.0508 72.3678 14.4273 70.4303 14.4663C68.2975 14.508 66.9577 16.3212 66.9577 18.4854V25.7729C66.9577 26.2369 66.5833 26.6136 66.122 26.6136H64.7221C64.2607 26.6136 63.8864 26.2369 63.8864 25.7729V12.514C63.8864 12.05 64.2607 11.6733 64.7221 11.6733H65.9977C66.4256 11.6733 66.7839 11.9975 66.8294 12.4252L66.9591 13.775C67.7934 12.1555 69.5237 11.5556 71.0748 11.5556C72.9534 11.5556 74.8615 12.3357 75.6972 14.5255C76.8899 12.3357 78.7392 11.5865 80.7369 11.5865C84.7924 11.5865 86.9692 14.1664 86.9692 18.4262V25.7742C86.9692 26.2383 86.5948 26.6149 86.1335 26.6149H84.7041C84.2428 26.6149 83.8684 26.2383 83.8684 25.7742V17.8344C83.8684 16.0199 82.4297 14.4999 80.6259 14.4973C78.445 14.4932 77.0397 16.2943 77.0397 18.4867V25.7742C77.0397 26.2383 76.6653 26.6149 76.204 26.6149H74.7746C74.3133 26.6149 73.9389 26.2383 73.9389 25.7742L73.9362 25.7729Z" fill="white"/>\n<path d="M102.135 23.9274C102.492 24.2811 102.46 24.8703 102.068 25.185C100.613 26.3566 99.014 26.8663 97.1942 26.8663C92.9595 26.8663 89.4415 24.1964 89.4415 19.0973C89.4415 13.9981 92.9301 11.3282 97.1942 11.3282C98.9338 11.3282 100.431 11.7909 101.819 12.9073C102.203 13.2167 102.243 13.7897 101.904 14.1474L101.069 15.0258C100.786 15.3244 100.326 15.3728 99.9901 15.1347C99.1571 14.5456 98.1716 14.2685 97.225 14.2685C94.5707 14.2685 92.5129 16.1583 92.5129 19.0973C92.5129 22.2165 94.6603 23.8669 97.1942 23.8669C98.2265 23.8669 99.2774 23.6019 100.149 22.9563C100.481 22.7101 100.939 22.7424 101.232 23.0329L102.135 23.9274Z" fill="white"/>\n<path d="M117.171 11.6677H118.513C118.975 11.6677 119.349 12.0443 119.349 12.5084V25.7779C119.349 26.2419 118.975 26.6185 118.513 26.6185H117.212C116.771 26.6185 116.406 26.2728 116.378 25.8303L116.278 24.0228C115.294 25.9126 113.027 26.8125 111.209 26.8125C106.915 26.842 103.665 24.0524 103.665 19.0138C103.665 13.9752 107.034 11.3052 111.269 11.3052C113.356 11.3052 115.354 12.2952 116.278 13.9752L116.337 12.4774C116.354 12.0255 116.723 11.6691 117.172 11.6691L117.171 11.6677ZM106.735 19.0138C106.735 22.0738 108.882 23.9327 111.505 23.9327C117.857 23.9327 117.857 14.1245 111.505 14.1245C108.882 14.1245 106.735 15.9847 106.735 19.0138Z" fill="white"/>\n<path d="M126.118 6.48746V25.7729C126.118 26.237 125.743 26.6136 125.282 26.6136H123.882C123.421 26.6136 123.046 26.237 123.046 25.7729V6.48746C123.046 6.02341 123.421 5.6468 123.882 5.6468H125.282C125.743 5.6468 126.118 6.02341 126.118 6.48746Z" fill="white"/>\n<path d="M26.1467 0H5.66461C2.53613 0 0 2.55117 0 5.69821V26.3018C0 29.4488 2.53613 32 5.66461 32H26.1467C29.2752 32 31.8113 29.4488 31.8113 26.3018V5.69821C31.8113 2.55117 29.2752 0 26.1467 0Z" fill="#FF4D4D"/>\n<path d="M16.6453 14.6362H15.199C14.7829 14.6362 14.4456 14.9754 14.4456 15.3938V16.8682C14.4456 17.2866 14.7829 17.6258 15.199 17.6258H16.6453C17.0615 17.6258 17.3988 17.2866 17.3988 16.8682V15.3938C17.3988 14.9754 17.0615 14.6362 16.6453 14.6362Z" fill="#0C1521"/>\n<path d="M20.3798 13.8921V12.4371C20.3798 12.0189 20.0423 11.6795 19.6264 11.6795H13.7556C12.5078 11.6795 11.4953 12.6976 11.4953 13.9521L11.4666 18.3396C11.4666 19.5955 12.4792 20.6122 13.7269 20.6122H18.0636C19.3126 20.6122 20.3239 19.7839 20.3239 18.5294V18.3423C20.3239 17.9241 20.6614 17.5861 21.0773 17.5861H22.5189C22.9348 17.5861 23.2724 17.9241 23.2724 18.3423V19.8573C23.2724 21.5047 22.2013 22.8995 20.7197 23.3751C20.3676 23.4887 19.9902 23.5501 19.5995 23.5501H12.1818C11.7911 23.5501 11.4885 23.4887 11.135 23.3751C9.65469 22.8995 8.51031 21.5047 8.51031 19.8587L8.53897 12.4442C8.53897 10.7969 9.61048 9.24501 11.0921 8.76938C11.1811 8.74132 11.3982 8.71593 11.4899 8.69456L11.4907 8.07134C11.4907 7.61041 11.8628 7.23632 12.3212 7.23632H13.6146C14.073 7.23632 14.4451 7.61041 14.4451 8.07134V8.69535H17.3929V8.07134C17.3929 7.61041 17.7649 7.23632 18.2234 7.23632H19.5238C19.9822 7.23632 20.3543 7.61041 20.3543 8.07134V8.68418C20.446 8.70556 20.658 8.73094 20.747 8.759C22.2287 9.23329 23.301 10.7955 23.301 12.4429V13.8921C23.301 14.3102 22.9635 14.6496 22.5476 14.6496H21.1332C20.7173 14.6496 20.3798 14.3102 20.3798 13.8921Z" fill="#0C1521"/>\n</svg>\n';
|
|
1725
1288
|
|
|
1726
1289
|
// src/components/ui/product-logo.tsx
|
|
1727
|
-
import { jsx as
|
|
1728
|
-
var productLogoVariants =
|
|
1290
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1291
|
+
var productLogoVariants = cva7(["inline-flex items-center shrink-0"], {
|
|
1729
1292
|
variants: {
|
|
1730
1293
|
size: {
|
|
1731
1294
|
sm: "",
|
|
@@ -1737,198 +1300,641 @@ var productLogoVariants = cva9(["inline-flex items-center shrink-0"], {
|
|
|
1737
1300
|
defaultVariants: {
|
|
1738
1301
|
size: "lg"
|
|
1739
1302
|
}
|
|
1740
|
-
});
|
|
1741
|
-
var svgMap = {
|
|
1742
|
-
lemlist: {
|
|
1743
|
-
sm: { light: { picto: lemlist_sm_picto_default, logotype: lemlist_sm_logotype_default }, dark: { picto: lemlist_sm_picto_dark_default, logotype: lemlist_sm_logotype_dark_default } },
|
|
1744
|
-
md: { light: { picto: lemlist_md_picto_default, logotype: lemlist_md_logotype_default }, dark: { picto: lemlist_md_picto_dark_default, logotype: lemlist_md_logotype_dark_default } },
|
|
1745
|
-
lg: { light: { picto: lemlist_lg_picto_default, logotype: lemlist_lg_logotype_default }, dark: { picto: lemlist_lg_picto_dark_default, logotype: lemlist_lg_logotype_dark_default } },
|
|
1746
|
-
xl: { light: { picto: lemlist_xl_picto_default }, dark: { picto: lemlist_xl_picto_dark_default } }
|
|
1747
|
-
},
|
|
1748
|
-
lemwarm: {
|
|
1749
|
-
sm: { light: { picto: lemwarm_sm_picto_default, logotype: lemwarm_sm_logotype_default }, dark: { picto: lemwarm_sm_picto_dark_default, logotype: lemwarm_sm_logotype_dark_default } },
|
|
1750
|
-
md: { light: { picto: lemwarm_md_picto_default, logotype: lemwarm_md_logotype_default }, dark: { picto: lemwarm_md_picto_dark_default, logotype: lemwarm_md_logotype_dark_default } },
|
|
1751
|
-
lg: { light: { picto: lemwarm_lg_picto_default, logotype: lemwarm_lg_logotype_default }, dark: { picto: lemwarm_lg_picto_dark_default, logotype: lemwarm_lg_logotype_dark_default } },
|
|
1752
|
-
xl: { light: { picto: lemwarm_xl_picto_default }, dark: { picto: lemwarm_xl_picto_dark_default } }
|
|
1753
|
-
},
|
|
1754
|
-
lemcal: {
|
|
1755
|
-
sm: { light: { picto: lemcal_sm_picto_default, logotype: lemcal_sm_logotype_default }, dark: { picto: lemcal_sm_picto_dark_default, logotype: lemcal_sm_logotype_dark_default } },
|
|
1756
|
-
md: { light: { picto: lemcal_md_picto_default, logotype: lemcal_md_logotype_default }, dark: { picto: lemcal_md_picto_dark_default, logotype: lemcal_md_logotype_dark_default } },
|
|
1757
|
-
lg: { light: { picto: lemcal_lg_picto_default, logotype: lemcal_lg_logotype_default }, dark: { picto: lemcal_lg_picto_dark_default, logotype: lemcal_lg_logotype_dark_default } },
|
|
1758
|
-
xl: { light: { picto: lemcal_xl_picto_default }, dark: { picto: lemcal_xl_picto_dark_default } }
|
|
1303
|
+
});
|
|
1304
|
+
var svgMap = {
|
|
1305
|
+
lemlist: {
|
|
1306
|
+
sm: { light: { picto: lemlist_sm_picto_default, logotype: lemlist_sm_logotype_default }, dark: { picto: lemlist_sm_picto_dark_default, logotype: lemlist_sm_logotype_dark_default } },
|
|
1307
|
+
md: { light: { picto: lemlist_md_picto_default, logotype: lemlist_md_logotype_default }, dark: { picto: lemlist_md_picto_dark_default, logotype: lemlist_md_logotype_dark_default } },
|
|
1308
|
+
lg: { light: { picto: lemlist_lg_picto_default, logotype: lemlist_lg_logotype_default }, dark: { picto: lemlist_lg_picto_dark_default, logotype: lemlist_lg_logotype_dark_default } },
|
|
1309
|
+
xl: { light: { picto: lemlist_xl_picto_default }, dark: { picto: lemlist_xl_picto_dark_default } }
|
|
1310
|
+
},
|
|
1311
|
+
lemwarm: {
|
|
1312
|
+
sm: { light: { picto: lemwarm_sm_picto_default, logotype: lemwarm_sm_logotype_default }, dark: { picto: lemwarm_sm_picto_dark_default, logotype: lemwarm_sm_logotype_dark_default } },
|
|
1313
|
+
md: { light: { picto: lemwarm_md_picto_default, logotype: lemwarm_md_logotype_default }, dark: { picto: lemwarm_md_picto_dark_default, logotype: lemwarm_md_logotype_dark_default } },
|
|
1314
|
+
lg: { light: { picto: lemwarm_lg_picto_default, logotype: lemwarm_lg_logotype_default }, dark: { picto: lemwarm_lg_picto_dark_default, logotype: lemwarm_lg_logotype_dark_default } },
|
|
1315
|
+
xl: { light: { picto: lemwarm_xl_picto_default }, dark: { picto: lemwarm_xl_picto_dark_default } }
|
|
1316
|
+
},
|
|
1317
|
+
lemcal: {
|
|
1318
|
+
sm: { light: { picto: lemcal_sm_picto_default, logotype: lemcal_sm_logotype_default }, dark: { picto: lemcal_sm_picto_dark_default, logotype: lemcal_sm_logotype_dark_default } },
|
|
1319
|
+
md: { light: { picto: lemcal_md_picto_default, logotype: lemcal_md_logotype_default }, dark: { picto: lemcal_md_picto_dark_default, logotype: lemcal_md_logotype_dark_default } },
|
|
1320
|
+
lg: { light: { picto: lemcal_lg_picto_default, logotype: lemcal_lg_logotype_default }, dark: { picto: lemcal_lg_picto_dark_default, logotype: lemcal_lg_logotype_dark_default } },
|
|
1321
|
+
xl: { light: { picto: lemcal_xl_picto_default }, dark: { picto: lemcal_xl_picto_dark_default } }
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
function useIsDarkTheme() {
|
|
1325
|
+
const [isDark, setIsDark] = React10.useState(false);
|
|
1326
|
+
React10.useEffect(() => {
|
|
1327
|
+
const root = document.documentElement;
|
|
1328
|
+
const check = () => setIsDark(root.getAttribute("data-theme") === "dark");
|
|
1329
|
+
check();
|
|
1330
|
+
const observer = new MutationObserver(check);
|
|
1331
|
+
observer.observe(root, { attributes: true, attributeFilter: ["data-theme"] });
|
|
1332
|
+
return () => observer.disconnect();
|
|
1333
|
+
}, []);
|
|
1334
|
+
return isDark;
|
|
1335
|
+
}
|
|
1336
|
+
function SvgImage({ svg, alt, className }) {
|
|
1337
|
+
const dataUri = React10.useMemo(
|
|
1338
|
+
() => `data:image/svg+xml,${encodeURIComponent(svg)}`,
|
|
1339
|
+
[svg]
|
|
1340
|
+
);
|
|
1341
|
+
return /* @__PURE__ */ jsx10("img", { src: dataUri, alt, className });
|
|
1342
|
+
}
|
|
1343
|
+
var ProductLogo = React10.forwardRef(
|
|
1344
|
+
({ className, product = "lemlist", size = "lg", hasText = true, ...props }, ref) => {
|
|
1345
|
+
const resolvedSize = size ?? "lg";
|
|
1346
|
+
const isDark = useIsDarkTheme();
|
|
1347
|
+
const entry = svgMap[product][resolvedSize][isDark ? "dark" : "light"];
|
|
1348
|
+
const svg = hasText && entry.logotype ? entry.logotype : entry.picto;
|
|
1349
|
+
return /* @__PURE__ */ jsx10(
|
|
1350
|
+
"div",
|
|
1351
|
+
{
|
|
1352
|
+
ref,
|
|
1353
|
+
className: cn(productLogoVariants({ size }), className),
|
|
1354
|
+
...props,
|
|
1355
|
+
children: /* @__PURE__ */ jsx10(SvgImage, { svg, alt: `${product} logo`, className: "h-auto w-auto" })
|
|
1356
|
+
}
|
|
1357
|
+
);
|
|
1358
|
+
}
|
|
1359
|
+
);
|
|
1360
|
+
ProductLogo.displayName = "ProductLogo";
|
|
1361
|
+
|
|
1362
|
+
// src/components/ui/sidebar.tsx
|
|
1363
|
+
import { Fragment, jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1364
|
+
var SidebarContext = React11.createContext({
|
|
1365
|
+
isCollapsed: false,
|
|
1366
|
+
isHovered: false,
|
|
1367
|
+
setCollapsed: () => {
|
|
1368
|
+
}
|
|
1369
|
+
});
|
|
1370
|
+
function useSidebarContext() {
|
|
1371
|
+
return React11.useContext(SidebarContext);
|
|
1372
|
+
}
|
|
1373
|
+
var SidebarHeader = React11.forwardRef(
|
|
1374
|
+
({ className, ...props }, ref) => {
|
|
1375
|
+
const { isCollapsed, isHovered, setCollapsed } = useSidebarContext();
|
|
1376
|
+
return /* @__PURE__ */ jsx11(
|
|
1377
|
+
"div",
|
|
1378
|
+
{
|
|
1379
|
+
ref,
|
|
1380
|
+
className: cn(
|
|
1381
|
+
"flex items-center shrink-0 h-[44px] border-b border-sidebar-border",
|
|
1382
|
+
isCollapsed ? "justify-center px-lg" : "justify-between px-lg",
|
|
1383
|
+
className
|
|
1384
|
+
),
|
|
1385
|
+
...props,
|
|
1386
|
+
children: isCollapsed ? (
|
|
1387
|
+
// Collapsed: show picto, on sidebar hover show expand button
|
|
1388
|
+
isHovered ? /* @__PURE__ */ jsx11(
|
|
1389
|
+
"button",
|
|
1390
|
+
{
|
|
1391
|
+
onClick: () => setCollapsed(false),
|
|
1392
|
+
className: "flex items-center justify-center size-6 rounded-base hover:bg-sidebar-item-hover-bg transition-colors cursor-pointer",
|
|
1393
|
+
"aria-label": "Expand sidebar",
|
|
1394
|
+
children: /* @__PURE__ */ jsx11(Icon8, { icon: faArrowRightFromLineOutline, size: "xs", className: "text-sidebar-item-default-icon" })
|
|
1395
|
+
}
|
|
1396
|
+
) : /* @__PURE__ */ jsx11(ProductLogo, { product: "lemlist", size: "sm", hasText: false })
|
|
1397
|
+
) : (
|
|
1398
|
+
// Expanded: logo + collapse button
|
|
1399
|
+
/* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
1400
|
+
/* @__PURE__ */ jsx11(ProductLogo, { product: "lemlist", size: "sm", hasText: true }),
|
|
1401
|
+
/* @__PURE__ */ jsx11(
|
|
1402
|
+
"button",
|
|
1403
|
+
{
|
|
1404
|
+
onClick: () => setCollapsed(true),
|
|
1405
|
+
className: "flex items-center justify-center size-6 rounded-base hover:bg-sidebar-item-hover-bg transition-colors cursor-pointer",
|
|
1406
|
+
"aria-label": "Collapse sidebar",
|
|
1407
|
+
children: /* @__PURE__ */ jsx11(Icon8, { icon: faArrowLeftFromLineOutline, size: "xs", className: "text-sidebar-item-default-icon" })
|
|
1408
|
+
}
|
|
1409
|
+
)
|
|
1410
|
+
] })
|
|
1411
|
+
)
|
|
1412
|
+
}
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
);
|
|
1416
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
1417
|
+
var Sidebar = React11.forwardRef(
|
|
1418
|
+
({ className, isCollapsed: isCollapsedProp = false, onCollapsedChange, children, ...props }, ref) => {
|
|
1419
|
+
const [isCollapsedInternal, setCollapsedInternal] = React11.useState(isCollapsedProp);
|
|
1420
|
+
const [isHovered, setIsHovered] = React11.useState(false);
|
|
1421
|
+
React11.useEffect(() => {
|
|
1422
|
+
setCollapsedInternal(isCollapsedProp);
|
|
1423
|
+
}, [isCollapsedProp]);
|
|
1424
|
+
const setCollapsed = React11.useCallback(
|
|
1425
|
+
(collapsed) => {
|
|
1426
|
+
setCollapsedInternal(collapsed);
|
|
1427
|
+
onCollapsedChange?.(collapsed);
|
|
1428
|
+
},
|
|
1429
|
+
[onCollapsedChange]
|
|
1430
|
+
);
|
|
1431
|
+
return /* @__PURE__ */ jsx11(SidebarContext.Provider, { value: { isCollapsed: isCollapsedInternal, isHovered, setCollapsed }, children: /* @__PURE__ */ jsxs10(
|
|
1432
|
+
"aside",
|
|
1433
|
+
{
|
|
1434
|
+
ref,
|
|
1435
|
+
onMouseEnter: () => setIsHovered(true),
|
|
1436
|
+
onMouseLeave: () => setIsHovered(false),
|
|
1437
|
+
className: cn(
|
|
1438
|
+
"flex flex-col shrink-0 bg-sidebar-bg border-r border-sidebar-border h-full transition-[width] duration-200",
|
|
1439
|
+
isCollapsedInternal ? "w-[72px]" : "w-[298px]",
|
|
1440
|
+
className
|
|
1441
|
+
),
|
|
1442
|
+
...props,
|
|
1443
|
+
children: [
|
|
1444
|
+
/* @__PURE__ */ jsx11(SidebarHeader, {}),
|
|
1445
|
+
(() => {
|
|
1446
|
+
const childArray = React11.Children.toArray(children);
|
|
1447
|
+
const footer = childArray.filter(
|
|
1448
|
+
(child) => React11.isValidElement(child) && child.type?.displayName === "SidebarFooter"
|
|
1449
|
+
);
|
|
1450
|
+
const rest = childArray.filter(
|
|
1451
|
+
(child) => !(React11.isValidElement(child) && child.type?.displayName === "SidebarFooter")
|
|
1452
|
+
);
|
|
1453
|
+
return /* @__PURE__ */ jsxs10(Fragment, { children: [
|
|
1454
|
+
/* @__PURE__ */ jsx11("div", { className: "flex flex-col gap-lg p-lg flex-1 overflow-y-auto", children: rest }),
|
|
1455
|
+
footer
|
|
1456
|
+
] });
|
|
1457
|
+
})()
|
|
1458
|
+
]
|
|
1459
|
+
}
|
|
1460
|
+
) });
|
|
1461
|
+
}
|
|
1462
|
+
);
|
|
1463
|
+
Sidebar.displayName = "Sidebar";
|
|
1464
|
+
var SidebarSection = React11.forwardRef(
|
|
1465
|
+
({ className, children, ...props }, ref) => {
|
|
1466
|
+
return /* @__PURE__ */ jsx11(
|
|
1467
|
+
"div",
|
|
1468
|
+
{
|
|
1469
|
+
ref,
|
|
1470
|
+
className: cn("flex flex-col w-full", className),
|
|
1471
|
+
...props,
|
|
1472
|
+
children
|
|
1473
|
+
}
|
|
1474
|
+
);
|
|
1759
1475
|
}
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
const check = () => setIsDark(root.getAttribute("data-theme") === "dark");
|
|
1766
|
-
check();
|
|
1767
|
-
const observer = new MutationObserver(check);
|
|
1768
|
-
observer.observe(root, { attributes: true, attributeFilter: ["data-theme"] });
|
|
1769
|
-
return () => observer.disconnect();
|
|
1770
|
-
}, []);
|
|
1771
|
-
return isDark;
|
|
1772
|
-
}
|
|
1773
|
-
function SvgImage({ svg, alt, className }) {
|
|
1774
|
-
const dataUri = React14.useMemo(
|
|
1775
|
-
() => `data:image/svg+xml,${encodeURIComponent(svg)}`,
|
|
1776
|
-
[svg]
|
|
1777
|
-
);
|
|
1778
|
-
return /* @__PURE__ */ jsx14("img", { src: dataUri, alt, className });
|
|
1779
|
-
}
|
|
1780
|
-
var ProductLogo = React14.forwardRef(
|
|
1781
|
-
({ className, product = "lemlist", size = "lg", hasText = true, ...props }, ref) => {
|
|
1782
|
-
const resolvedSize = size ?? "lg";
|
|
1783
|
-
const isDark = useIsDarkTheme();
|
|
1784
|
-
const entry = svgMap[product][resolvedSize][isDark ? "dark" : "light"];
|
|
1785
|
-
const svg = hasText && entry.logotype ? entry.logotype : entry.picto;
|
|
1786
|
-
return /* @__PURE__ */ jsx14(
|
|
1476
|
+
);
|
|
1477
|
+
SidebarSection.displayName = "SidebarSection";
|
|
1478
|
+
var SidebarFooter = React11.forwardRef(
|
|
1479
|
+
({ className, children, ...props }, ref) => {
|
|
1480
|
+
return /* @__PURE__ */ jsx11(
|
|
1787
1481
|
"div",
|
|
1788
1482
|
{
|
|
1789
1483
|
ref,
|
|
1790
|
-
className: cn(
|
|
1484
|
+
className: cn(
|
|
1485
|
+
"flex flex-col p-lg bg-sidebar-footer-bg border-t border-sidebar-border mt-auto w-full",
|
|
1486
|
+
className
|
|
1487
|
+
),
|
|
1791
1488
|
...props,
|
|
1792
|
-
children
|
|
1489
|
+
children
|
|
1793
1490
|
}
|
|
1794
1491
|
);
|
|
1795
1492
|
}
|
|
1796
1493
|
);
|
|
1797
|
-
|
|
1494
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
1798
1495
|
|
|
1799
|
-
// src/components/ui/
|
|
1800
|
-
import { Fragment, jsx as
|
|
1801
|
-
var
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1496
|
+
// src/components/ui/search-bar.tsx
|
|
1497
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1498
|
+
var searchBarVariants = cva8(
|
|
1499
|
+
[
|
|
1500
|
+
"inline-flex w-full items-center rounded-md border transition-colors",
|
|
1501
|
+
"border-search-bar-border-default",
|
|
1502
|
+
"hover:border-search-bar-border-hover",
|
|
1503
|
+
"focus-within:border-search-bar-border-active",
|
|
1504
|
+
"focus-within:shadow-focus-ring"
|
|
1505
|
+
],
|
|
1506
|
+
{
|
|
1507
|
+
variants: {
|
|
1508
|
+
variant: {
|
|
1509
|
+
white: "bg-search-bar-white-bg",
|
|
1510
|
+
grey: "bg-search-bar-grey-bg"
|
|
1511
|
+
},
|
|
1512
|
+
size: {
|
|
1513
|
+
sm: "gap-sm px-base py-sm",
|
|
1514
|
+
md: "gap-base px-md py-base"
|
|
1515
|
+
}
|
|
1516
|
+
},
|
|
1517
|
+
defaultVariants: { variant: "white", size: "md" }
|
|
1518
|
+
}
|
|
1519
|
+
);
|
|
1520
|
+
var inputStyle = "flex-1 min-w-0 bg-transparent outline-none text-sm font-regular leading-sm text-search-bar-text placeholder:text-search-bar-placeholder";
|
|
1521
|
+
var clearButtonStyle = "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-search-bar-clear hover:bg-black/5 transition-colors";
|
|
1522
|
+
var SearchBar = React12.forwardRef(
|
|
1523
|
+
({
|
|
1524
|
+
className,
|
|
1525
|
+
variant,
|
|
1526
|
+
size = "md",
|
|
1527
|
+
value,
|
|
1528
|
+
defaultValue,
|
|
1529
|
+
onChange,
|
|
1530
|
+
onClear,
|
|
1531
|
+
hasShortcut = false,
|
|
1532
|
+
placeholder = "Search...",
|
|
1533
|
+
...props
|
|
1534
|
+
}, ref) => {
|
|
1535
|
+
const [internalValue, setInternalValue] = React12.useState(defaultValue ?? "");
|
|
1536
|
+
const isControlled = value !== void 0;
|
|
1537
|
+
const currentValue = isControlled ? value : internalValue;
|
|
1538
|
+
const hasValue = String(currentValue).length > 0;
|
|
1539
|
+
const iconSize = size === "sm" ? "xs" : "sm";
|
|
1540
|
+
const sidebarCtx = useSidebarContext();
|
|
1541
|
+
const isCollapsed = sidebarCtx.isCollapsed;
|
|
1542
|
+
const handleChange = (e) => {
|
|
1543
|
+
if (!isControlled) setInternalValue(e.target.value);
|
|
1544
|
+
onChange?.(e);
|
|
1545
|
+
};
|
|
1546
|
+
const handleClear = () => {
|
|
1547
|
+
if (!isControlled) setInternalValue("");
|
|
1548
|
+
onClear?.();
|
|
1549
|
+
};
|
|
1550
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn(searchBarVariants({ variant, size }), isCollapsed && "justify-center", className), children: [
|
|
1551
|
+
/* @__PURE__ */ jsx12(
|
|
1552
|
+
Icon9,
|
|
1553
|
+
{
|
|
1554
|
+
icon: faMagnifyingGlassSolid,
|
|
1555
|
+
size: iconSize,
|
|
1556
|
+
className: "shrink-0 text-search-bar-icon"
|
|
1557
|
+
}
|
|
1558
|
+
),
|
|
1559
|
+
!isCollapsed && /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1560
|
+
/* @__PURE__ */ jsx12(
|
|
1561
|
+
"input",
|
|
1562
|
+
{
|
|
1563
|
+
ref,
|
|
1564
|
+
type: "text",
|
|
1565
|
+
value: currentValue,
|
|
1566
|
+
defaultValue: void 0,
|
|
1567
|
+
onChange: handleChange,
|
|
1568
|
+
placeholder,
|
|
1569
|
+
className: inputStyle,
|
|
1570
|
+
...props
|
|
1571
|
+
}
|
|
1572
|
+
),
|
|
1573
|
+
hasShortcut && !hasValue && /* @__PURE__ */ jsx12("span", { className: "shrink-0 text-xs text-search-bar-placeholder", children: "\u2318K" }),
|
|
1574
|
+
hasValue && /* @__PURE__ */ jsx12(TooltipProvider, { delayDuration: 300, children: /* @__PURE__ */ jsxs11(Tooltip, { children: [
|
|
1575
|
+
/* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx12(
|
|
1576
|
+
"button",
|
|
1577
|
+
{
|
|
1578
|
+
type: "button",
|
|
1579
|
+
onClick: handleClear,
|
|
1580
|
+
className: clearButtonStyle,
|
|
1581
|
+
"aria-label": "Erase",
|
|
1582
|
+
children: /* @__PURE__ */ jsx12(Icon9, { icon: faXmarkSolid3, size: "xs" })
|
|
1583
|
+
}
|
|
1584
|
+
) }),
|
|
1585
|
+
/* @__PURE__ */ jsx12(TooltipContent, { children: "Erase" })
|
|
1586
|
+
] }) })
|
|
1587
|
+
] })
|
|
1588
|
+
] });
|
|
1589
|
+
}
|
|
1590
|
+
);
|
|
1591
|
+
SearchBar.displayName = "SearchBar";
|
|
1592
|
+
|
|
1593
|
+
// src/components/ui/avatar.tsx
|
|
1594
|
+
import * as React13 from "react";
|
|
1595
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
1596
|
+
import { cva as cva9 } from "class-variance-authority";
|
|
1597
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1598
|
+
var avatarVariants = cva9(
|
|
1599
|
+
"relative inline-flex shrink-0 items-center justify-center overflow-clip",
|
|
1600
|
+
{
|
|
1601
|
+
variants: {
|
|
1602
|
+
size: {
|
|
1603
|
+
sm: "size-4",
|
|
1604
|
+
md: "size-5",
|
|
1605
|
+
lg: "size-6",
|
|
1606
|
+
xl: "size-8"
|
|
1607
|
+
},
|
|
1608
|
+
shape: {
|
|
1609
|
+
rounded: "rounded-full",
|
|
1610
|
+
squared: ""
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
compoundVariants: [
|
|
1614
|
+
{ shape: "squared", size: "sm", class: "rounded-xs" },
|
|
1615
|
+
{ shape: "squared", size: "md", class: "rounded-sm" },
|
|
1616
|
+
{ shape: "squared", size: "lg", class: "rounded-base" },
|
|
1617
|
+
{ shape: "squared", size: "xl", class: "rounded-base" }
|
|
1618
|
+
],
|
|
1619
|
+
defaultVariants: {
|
|
1620
|
+
size: "xl",
|
|
1621
|
+
shape: "rounded"
|
|
1622
|
+
}
|
|
1805
1623
|
}
|
|
1624
|
+
);
|
|
1625
|
+
var initialsFontSize = {
|
|
1626
|
+
sm: "text-[8px] leading-[14px]",
|
|
1627
|
+
md: "text-xs leading-2xs",
|
|
1628
|
+
lg: "text-sm leading-sm",
|
|
1629
|
+
xl: "text-base leading-base"
|
|
1630
|
+
};
|
|
1631
|
+
var Avatar = React13.forwardRef(({ className, size = "xl", shape = "rounded", src, alt, initials, badge, ...props }, ref) => {
|
|
1632
|
+
return /* @__PURE__ */ jsxs12("div", { className: "relative inline-flex", children: [
|
|
1633
|
+
/* @__PURE__ */ jsxs12(
|
|
1634
|
+
AvatarPrimitive.Root,
|
|
1635
|
+
{
|
|
1636
|
+
ref,
|
|
1637
|
+
className: cn(
|
|
1638
|
+
avatarVariants({ size, shape }),
|
|
1639
|
+
"bg-avatar-fallback-bg",
|
|
1640
|
+
className
|
|
1641
|
+
),
|
|
1642
|
+
...props,
|
|
1643
|
+
children: [
|
|
1644
|
+
/* @__PURE__ */ jsx13(
|
|
1645
|
+
AvatarPrimitive.Image,
|
|
1646
|
+
{
|
|
1647
|
+
src,
|
|
1648
|
+
alt: alt ?? "",
|
|
1649
|
+
className: "absolute inset-0 size-full object-cover"
|
|
1650
|
+
}
|
|
1651
|
+
),
|
|
1652
|
+
/* @__PURE__ */ jsx13(
|
|
1653
|
+
AvatarPrimitive.Fallback,
|
|
1654
|
+
{
|
|
1655
|
+
delayMs: 0,
|
|
1656
|
+
className: cn(
|
|
1657
|
+
"font-medium",
|
|
1658
|
+
"text-avatar-fallback-text",
|
|
1659
|
+
"select-none text-center",
|
|
1660
|
+
initialsFontSize[size ?? "xl"]
|
|
1661
|
+
),
|
|
1662
|
+
children: initials ?? "??"
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
]
|
|
1666
|
+
}
|
|
1667
|
+
),
|
|
1668
|
+
badge && size === "xl" && /* @__PURE__ */ jsx13("div", { className: "absolute bottom-0 right-0 size-4 overflow-clip rounded-full", children: badge })
|
|
1669
|
+
] });
|
|
1806
1670
|
});
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1671
|
+
Avatar.displayName = "Avatar";
|
|
1672
|
+
|
|
1673
|
+
// src/components/ui/checkbox.tsx
|
|
1674
|
+
import * as React14 from "react";
|
|
1675
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1676
|
+
import { Icon as Icon10, faCheckSolid } from "@l3mpire/icons";
|
|
1677
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1678
|
+
var rootStyles = {
|
|
1679
|
+
base: "peer shrink-0 size-4 rounded-sm inline-flex items-center justify-center transition-colors cursor-pointer focus-visible:outline-none",
|
|
1680
|
+
unchecked: [
|
|
1681
|
+
"bg-checkbox-unchecked-bg",
|
|
1682
|
+
"border border-checkbox-unchecked-border-default",
|
|
1683
|
+
"hover:border-checkbox-unchecked-border-hover",
|
|
1684
|
+
"active:border-checkbox-unchecked-border-pressed",
|
|
1685
|
+
"active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1686
|
+
],
|
|
1687
|
+
checked: [
|
|
1688
|
+
"data-[state=checked]:bg-checkbox-checked-bg-default",
|
|
1689
|
+
"data-[state=checked]:border-transparent",
|
|
1690
|
+
"data-[state=checked]:hover:bg-checkbox-checked-bg-hover",
|
|
1691
|
+
"data-[state=checked]:active:bg-checkbox-checked-bg-pressed",
|
|
1692
|
+
"data-[state=checked]:active:[box-shadow:0_0_0_3px_#316bff26]"
|
|
1693
|
+
],
|
|
1694
|
+
disabled: [
|
|
1695
|
+
"disabled:pointer-events-none",
|
|
1696
|
+
"disabled:bg-checkbox-disabled-bg",
|
|
1697
|
+
"disabled:border-checkbox-disabled-border",
|
|
1698
|
+
"data-[state=checked]:disabled:bg-checkbox-disabled-bg",
|
|
1699
|
+
"data-[state=checked]:disabled:border-transparent"
|
|
1700
|
+
]
|
|
1701
|
+
};
|
|
1702
|
+
var iconStyle = {
|
|
1703
|
+
default: "text-checkbox-checked-icon",
|
|
1704
|
+
disabled: "text-checkbox-disabled-icon"
|
|
1705
|
+
};
|
|
1706
|
+
var labelBase2 = "cursor-pointer select-none overflow-hidden text-ellipsis whitespace-nowrap text-sm font-medium leading-sm";
|
|
1707
|
+
var labelColor2 = {
|
|
1708
|
+
default: "text-checkbox-label-default",
|
|
1709
|
+
disabled: "pointer-events-none text-checkbox-label-disabled"
|
|
1710
|
+
};
|
|
1711
|
+
var Checkbox = React14.forwardRef(({ className, label, disabled, id, ...props }, ref) => {
|
|
1712
|
+
const innerId = id ?? React14.useId();
|
|
1713
|
+
return /* @__PURE__ */ jsxs13("div", { className: "inline-flex items-center gap-base", children: [
|
|
1714
|
+
/* @__PURE__ */ jsx14(
|
|
1715
|
+
CheckboxPrimitive.Root,
|
|
1815
1716
|
{
|
|
1816
1717
|
ref,
|
|
1718
|
+
id: innerId,
|
|
1719
|
+
disabled,
|
|
1817
1720
|
className: cn(
|
|
1818
|
-
|
|
1819
|
-
|
|
1721
|
+
rootStyles.base,
|
|
1722
|
+
rootStyles.unchecked,
|
|
1723
|
+
rootStyles.checked,
|
|
1724
|
+
rootStyles.disabled,
|
|
1820
1725
|
className
|
|
1821
1726
|
),
|
|
1822
1727
|
...props,
|
|
1823
|
-
children:
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
"
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
// Expanded: logo + collapse button
|
|
1836
|
-
/* @__PURE__ */ jsxs14(Fragment, { children: [
|
|
1837
|
-
/* @__PURE__ */ jsx15(ProductLogo, { product: "lemlist", size: "sm", hasText: true }),
|
|
1838
|
-
/* @__PURE__ */ jsx15(
|
|
1839
|
-
"button",
|
|
1728
|
+
children: /* @__PURE__ */ jsx14(
|
|
1729
|
+
CheckboxPrimitive.Indicator,
|
|
1730
|
+
{
|
|
1731
|
+
forceMount: true,
|
|
1732
|
+
className: cn(
|
|
1733
|
+
"flex items-center justify-center transition-opacity",
|
|
1734
|
+
"data-[state=unchecked]:opacity-0",
|
|
1735
|
+
"data-[state=checked]:opacity-100",
|
|
1736
|
+
"data-[state=indeterminate]:opacity-100"
|
|
1737
|
+
),
|
|
1738
|
+
children: /* @__PURE__ */ jsx14(
|
|
1739
|
+
Icon10,
|
|
1840
1740
|
{
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
"
|
|
1844
|
-
children: /* @__PURE__ */ jsx15(Icon11, { icon: faArrowLeftFromLineOutline, size: "xs", className: "text-sidebar-item-default-icon" })
|
|
1741
|
+
icon: faCheckSolid,
|
|
1742
|
+
size: "xs",
|
|
1743
|
+
className: iconStyle[disabled ? "disabled" : "default"]
|
|
1845
1744
|
}
|
|
1846
1745
|
)
|
|
1847
|
-
|
|
1746
|
+
}
|
|
1848
1747
|
)
|
|
1849
1748
|
}
|
|
1850
|
-
)
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
SidebarHeader.displayName = "SidebarHeader";
|
|
1854
|
-
var Sidebar = React15.forwardRef(
|
|
1855
|
-
({ className, isCollapsed: isCollapsedProp = false, onCollapsedChange, children, ...props }, ref) => {
|
|
1856
|
-
const [isCollapsedInternal, setCollapsedInternal] = React15.useState(isCollapsedProp);
|
|
1857
|
-
const [isHovered, setIsHovered] = React15.useState(false);
|
|
1858
|
-
React15.useEffect(() => {
|
|
1859
|
-
setCollapsedInternal(isCollapsedProp);
|
|
1860
|
-
}, [isCollapsedProp]);
|
|
1861
|
-
const setCollapsed = React15.useCallback(
|
|
1862
|
-
(collapsed) => {
|
|
1863
|
-
setCollapsedInternal(collapsed);
|
|
1864
|
-
onCollapsedChange?.(collapsed);
|
|
1865
|
-
},
|
|
1866
|
-
[onCollapsedChange]
|
|
1867
|
-
);
|
|
1868
|
-
return /* @__PURE__ */ jsx15(SidebarContext.Provider, { value: { isCollapsed: isCollapsedInternal, isHovered, setCollapsed }, children: /* @__PURE__ */ jsxs14(
|
|
1869
|
-
"aside",
|
|
1749
|
+
),
|
|
1750
|
+
label && /* @__PURE__ */ jsx14(
|
|
1751
|
+
"label",
|
|
1870
1752
|
{
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
className: cn(
|
|
1875
|
-
"flex flex-col shrink-0 bg-sidebar-bg border-r border-sidebar-border h-full transition-[width] duration-200",
|
|
1876
|
-
isCollapsedInternal ? "w-[72px]" : "w-[298px]",
|
|
1877
|
-
className
|
|
1878
|
-
),
|
|
1879
|
-
...props,
|
|
1880
|
-
children: [
|
|
1881
|
-
/* @__PURE__ */ jsx15(SidebarHeader, {}),
|
|
1882
|
-
(() => {
|
|
1883
|
-
const childArray = React15.Children.toArray(children);
|
|
1884
|
-
const footer = childArray.filter(
|
|
1885
|
-
(child) => React15.isValidElement(child) && child.type?.displayName === "SidebarFooter"
|
|
1886
|
-
);
|
|
1887
|
-
const rest = childArray.filter(
|
|
1888
|
-
(child) => !(React15.isValidElement(child) && child.type?.displayName === "SidebarFooter")
|
|
1889
|
-
);
|
|
1890
|
-
return /* @__PURE__ */ jsxs14(Fragment, { children: [
|
|
1891
|
-
/* @__PURE__ */ jsx15("div", { className: "flex flex-col gap-lg p-lg flex-1 overflow-y-auto", children: rest }),
|
|
1892
|
-
footer
|
|
1893
|
-
] });
|
|
1894
|
-
})()
|
|
1895
|
-
]
|
|
1753
|
+
htmlFor: innerId,
|
|
1754
|
+
className: cn(labelBase2, labelColor2[disabled ? "disabled" : "default"]),
|
|
1755
|
+
children: label
|
|
1896
1756
|
}
|
|
1897
|
-
)
|
|
1898
|
-
}
|
|
1757
|
+
)
|
|
1758
|
+
] });
|
|
1759
|
+
});
|
|
1760
|
+
Checkbox.displayName = "Checkbox";
|
|
1761
|
+
|
|
1762
|
+
// src/components/ui/dropdown-menu.tsx
|
|
1763
|
+
import * as React15 from "react";
|
|
1764
|
+
import * as DropdownMenuPrimitive2 from "@radix-ui/react-dropdown-menu";
|
|
1765
|
+
import { Icon as Icon11 } from "@l3mpire/icons";
|
|
1766
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1767
|
+
var textSm = "text-sm font-regular leading-sm";
|
|
1768
|
+
var textXs = "text-xs font-regular leading-xs";
|
|
1769
|
+
var textXsMedium = "text-xs font-medium leading-xs";
|
|
1770
|
+
var textSmMedium = "text-sm font-medium leading-sm";
|
|
1771
|
+
var containerStyle = [
|
|
1772
|
+
"flex flex-col gap-base overflow-clip",
|
|
1773
|
+
"bg-dropdown-bg",
|
|
1774
|
+
"border border-dropdown-border",
|
|
1775
|
+
"rounded-md",
|
|
1776
|
+
"p-base",
|
|
1777
|
+
"shadow-lg"
|
|
1778
|
+
];
|
|
1779
|
+
var DropdownMenu = React15.forwardRef(
|
|
1780
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn(containerStyle, className), ...props, children })
|
|
1899
1781
|
);
|
|
1900
|
-
|
|
1901
|
-
var
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1782
|
+
DropdownMenu.displayName = "DropdownMenu";
|
|
1783
|
+
var DropdownMenuRoot = DropdownMenuPrimitive2.Root;
|
|
1784
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive2.Trigger;
|
|
1785
|
+
var DropdownMenuContent = React15.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsx15(DropdownMenuPrimitive2.Portal, { children: /* @__PURE__ */ jsx15(
|
|
1786
|
+
DropdownMenuPrimitive2.Content,
|
|
1787
|
+
{
|
|
1788
|
+
ref,
|
|
1789
|
+
sideOffset,
|
|
1790
|
+
className: cn(
|
|
1791
|
+
containerStyle,
|
|
1792
|
+
"z-50",
|
|
1793
|
+
"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1794
|
+
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
1795
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1796
|
+
"data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2",
|
|
1797
|
+
className
|
|
1798
|
+
),
|
|
1799
|
+
...props,
|
|
1800
|
+
children
|
|
1912
1801
|
}
|
|
1802
|
+
) }));
|
|
1803
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
1804
|
+
var DropdownMenuList = React15.forwardRef(
|
|
1805
|
+
({ className, children, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn("flex flex-col", className), role: "listbox", ...props, children })
|
|
1913
1806
|
);
|
|
1914
|
-
|
|
1915
|
-
var
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1807
|
+
DropdownMenuList.displayName = "DropdownMenuList";
|
|
1808
|
+
var itemStyle = "flex items-center gap-base p-base rounded-base cursor-pointer hover:bg-dropdown-item-hover";
|
|
1809
|
+
var DropdownMenuItem = React15.forwardRef(
|
|
1810
|
+
({
|
|
1811
|
+
className,
|
|
1812
|
+
icon,
|
|
1813
|
+
avatar,
|
|
1814
|
+
flag,
|
|
1815
|
+
label,
|
|
1816
|
+
description,
|
|
1817
|
+
badge,
|
|
1818
|
+
action,
|
|
1819
|
+
isActive,
|
|
1820
|
+
children,
|
|
1821
|
+
...props
|
|
1822
|
+
}, ref) => /* @__PURE__ */ jsxs14(
|
|
1823
|
+
"div",
|
|
1824
|
+
{
|
|
1825
|
+
ref,
|
|
1826
|
+
role: "option",
|
|
1827
|
+
"aria-selected": isActive,
|
|
1828
|
+
className: cn(
|
|
1829
|
+
itemStyle,
|
|
1830
|
+
isActive && "bg-dropdown-item-hover",
|
|
1831
|
+
className
|
|
1832
|
+
),
|
|
1833
|
+
...props,
|
|
1834
|
+
children: [
|
|
1835
|
+
children,
|
|
1836
|
+
avatar,
|
|
1837
|
+
flag,
|
|
1838
|
+
icon && /* @__PURE__ */ jsx15(
|
|
1839
|
+
Icon11,
|
|
1840
|
+
{
|
|
1841
|
+
icon,
|
|
1842
|
+
size: "sm",
|
|
1843
|
+
className: "shrink-0 text-dropdown-item-icon"
|
|
1844
|
+
}
|
|
1924
1845
|
),
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1846
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
1847
|
+
/* @__PURE__ */ jsx15("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
1848
|
+
description && /* @__PURE__ */ jsx15("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
1849
|
+
] }),
|
|
1850
|
+
badge,
|
|
1851
|
+
action
|
|
1852
|
+
]
|
|
1853
|
+
}
|
|
1854
|
+
)
|
|
1930
1855
|
);
|
|
1931
|
-
|
|
1856
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
1857
|
+
var DropdownMenuRadixItem = React15.forwardRef(
|
|
1858
|
+
({
|
|
1859
|
+
className,
|
|
1860
|
+
icon,
|
|
1861
|
+
avatar,
|
|
1862
|
+
flag,
|
|
1863
|
+
label,
|
|
1864
|
+
description,
|
|
1865
|
+
badge,
|
|
1866
|
+
action,
|
|
1867
|
+
children,
|
|
1868
|
+
...props
|
|
1869
|
+
}, ref) => /* @__PURE__ */ jsxs14(
|
|
1870
|
+
DropdownMenuPrimitive2.Item,
|
|
1871
|
+
{
|
|
1872
|
+
ref,
|
|
1873
|
+
className: cn(
|
|
1874
|
+
itemStyle,
|
|
1875
|
+
"outline-none focus:bg-dropdown-item-hover",
|
|
1876
|
+
className
|
|
1877
|
+
),
|
|
1878
|
+
...props,
|
|
1879
|
+
children: [
|
|
1880
|
+
children,
|
|
1881
|
+
avatar,
|
|
1882
|
+
flag,
|
|
1883
|
+
icon && /* @__PURE__ */ jsx15(
|
|
1884
|
+
Icon11,
|
|
1885
|
+
{
|
|
1886
|
+
icon,
|
|
1887
|
+
size: "sm",
|
|
1888
|
+
className: "shrink-0 text-dropdown-item-icon"
|
|
1889
|
+
}
|
|
1890
|
+
),
|
|
1891
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-1 items-center gap-sm min-w-0", children: [
|
|
1892
|
+
/* @__PURE__ */ jsx15("span", { className: cn("truncate shrink-0", textSm, "text-dropdown-item-text"), children: label }),
|
|
1893
|
+
description && /* @__PURE__ */ jsx15("span", { className: cn("truncate", textXs, "text-dropdown-item-secondary"), children: description })
|
|
1894
|
+
] }),
|
|
1895
|
+
badge,
|
|
1896
|
+
action
|
|
1897
|
+
]
|
|
1898
|
+
}
|
|
1899
|
+
)
|
|
1900
|
+
);
|
|
1901
|
+
DropdownMenuRadixItem.displayName = "DropdownMenuRadixItem";
|
|
1902
|
+
var DropdownMenuHeading = React15.forwardRef(({ className, action, children, ...props }, ref) => /* @__PURE__ */ jsxs14(
|
|
1903
|
+
"div",
|
|
1904
|
+
{
|
|
1905
|
+
ref,
|
|
1906
|
+
className: cn(
|
|
1907
|
+
"flex items-center gap-base p-base rounded-base",
|
|
1908
|
+
className
|
|
1909
|
+
),
|
|
1910
|
+
...props,
|
|
1911
|
+
children: [
|
|
1912
|
+
/* @__PURE__ */ jsx15("span", { className: cn("flex-1 truncate uppercase", textXsMedium, "text-dropdown-heading-text"), children }),
|
|
1913
|
+
action
|
|
1914
|
+
]
|
|
1915
|
+
}
|
|
1916
|
+
));
|
|
1917
|
+
DropdownMenuHeading.displayName = "DropdownMenuHeading";
|
|
1918
|
+
var clearStyle = [
|
|
1919
|
+
"sticky bottom-0 -mx-base -mb-base",
|
|
1920
|
+
"flex items-center justify-center",
|
|
1921
|
+
"h-10 min-w-[80px] px-md py-[10px]",
|
|
1922
|
+
"bg-gradient-to-t from-[#fbfbfb] from-[10%] to-white",
|
|
1923
|
+
"border border-dropdown-border",
|
|
1924
|
+
"shadow-sm",
|
|
1925
|
+
"cursor-pointer"
|
|
1926
|
+
];
|
|
1927
|
+
var DropdownMenuClear = React15.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx15(
|
|
1928
|
+
"button",
|
|
1929
|
+
{
|
|
1930
|
+
ref,
|
|
1931
|
+
type: "button",
|
|
1932
|
+
className: cn(clearStyle, textSmMedium, "text-dropdown-clear-text", className),
|
|
1933
|
+
...props,
|
|
1934
|
+
children
|
|
1935
|
+
}
|
|
1936
|
+
));
|
|
1937
|
+
DropdownMenuClear.displayName = "DropdownMenuClear";
|
|
1932
1938
|
|
|
1933
1939
|
// src/components/ui/sidebar-heading-item.tsx
|
|
1934
1940
|
import * as React16 from "react";
|
|
@@ -1960,7 +1966,7 @@ SidebarHeadingItem.displayName = "SidebarHeadingItem";
|
|
|
1960
1966
|
import * as React17 from "react";
|
|
1961
1967
|
import { cva as cva10 } from "class-variance-authority";
|
|
1962
1968
|
import { Icon as Icon12, faChevronDownSolid as faChevronDownSolid2, faStarsOutline } from "@l3mpire/icons";
|
|
1963
|
-
import { Fragment as
|
|
1969
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1964
1970
|
var sidebarItemVariants = cva10(
|
|
1965
1971
|
[
|
|
1966
1972
|
"flex items-center gap-base rounded-base transition-colors cursor-pointer"
|
|
@@ -2030,7 +2036,7 @@ var SidebarItem = React17.forwardRef(
|
|
|
2030
2036
|
className: cn("shrink-0", iconColorClass)
|
|
2031
2037
|
}
|
|
2032
2038
|
) : null,
|
|
2033
|
-
!isCollapsed && /* @__PURE__ */ jsxs15(
|
|
2039
|
+
!isCollapsed && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
2034
2040
|
/* @__PURE__ */ jsx17(
|
|
2035
2041
|
"span",
|
|
2036
2042
|
{
|
|
@@ -2786,7 +2792,7 @@ import { Icon as Icon17, faXmarkSolid as faXmarkSolid5, faCircleInfoSolid as faC
|
|
|
2786
2792
|
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2787
2793
|
var modalVariants = cva15(
|
|
2788
2794
|
[
|
|
2789
|
-
"fixed top-[50%] left-[50%] z-50",
|
|
2795
|
+
"fixed top-[50%] left-[50%] -translate-x-1/2 -translate-y-1/2 z-50",
|
|
2790
2796
|
"flex flex-col",
|
|
2791
2797
|
"bg-modal-bg border border-modal-border rounded-md shadow-sm overflow-clip",
|
|
2792
2798
|
"outline-none",
|
|
@@ -2795,10 +2801,10 @@ var modalVariants = cva15(
|
|
|
2795
2801
|
{
|
|
2796
2802
|
variants: {
|
|
2797
2803
|
size: {
|
|
2798
|
-
sm: "w-[500px] max-h-[80vh]
|
|
2799
|
-
md: "w-[800px] max-h-[85vh]
|
|
2800
|
-
lg: "w-[1100px] max-h-[90vh]
|
|
2801
|
-
full: "w-[calc(100%-32px)] h-[calc(100%-32px)]
|
|
2804
|
+
sm: "w-[500px] max-h-[80vh]",
|
|
2805
|
+
md: "w-[800px] max-h-[85vh]",
|
|
2806
|
+
lg: "w-[1100px] max-h-[90vh]",
|
|
2807
|
+
full: "w-[calc(100%-32px)] h-[calc(100%-32px)]"
|
|
2802
2808
|
}
|
|
2803
2809
|
},
|
|
2804
2810
|
defaultVariants: { size: "md" }
|
|
@@ -2846,19 +2852,16 @@ var ModalHeader = React25.forwardRef(
|
|
|
2846
2852
|
...props,
|
|
2847
2853
|
children: [
|
|
2848
2854
|
/* @__PURE__ */ jsx25("div", { className: "flex flex-1 flex-col gap-2xs", children }),
|
|
2849
|
-
onClose && /* @__PURE__ */ jsx25(
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
) }) }),
|
|
2860
|
-
/* @__PURE__ */ jsx25(TooltipContent, { children: "Close" })
|
|
2861
|
-
] }) })
|
|
2855
|
+
onClose && /* @__PURE__ */ jsx25(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsx25(
|
|
2856
|
+
"button",
|
|
2857
|
+
{
|
|
2858
|
+
type: "button",
|
|
2859
|
+
onClick: onClose,
|
|
2860
|
+
className: "inline-flex shrink-0 items-center justify-center p-xs rounded-base text-modal-header-close hover:bg-black/5 transition-colors cursor-pointer",
|
|
2861
|
+
"aria-label": "Close",
|
|
2862
|
+
children: /* @__PURE__ */ jsx25(Icon17, { icon: faXmarkSolid5, size: "sm" })
|
|
2863
|
+
}
|
|
2864
|
+
) })
|
|
2862
2865
|
]
|
|
2863
2866
|
}
|
|
2864
2867
|
)
|