@bubo-squared/ui-framework 0.1.6 → 0.1.9
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.cjs +890 -207
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -26
- package/dist/index.d.ts +96 -26
- package/dist/index.js +882 -197
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -4
- package/src/style.d.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -63,8 +63,8 @@ var buttonTextVariants = cva("flex text-center justify-center font-normal", {
|
|
|
63
63
|
size: {
|
|
64
64
|
sm: ["text-xl", "leading-7"],
|
|
65
65
|
md: ["text-2xl", "leading-8"],
|
|
66
|
-
lg: ["
|
|
67
|
-
xl: ["
|
|
66
|
+
lg: ["text-3xl", "leading-9"],
|
|
67
|
+
xl: ["text-4xl", "leading-11"]
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -102,7 +102,7 @@ Button.displayName = "Button";
|
|
|
102
102
|
import { cva as cva2 } from "class-variance-authority";
|
|
103
103
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
104
104
|
var buttonGroupVariants = cva2(
|
|
105
|
-
"flex items-center justify-center gap-4 pt-4 w-
|
|
105
|
+
"flex items-center justify-center gap-4 pt-4 w-[320px] min-w-[320px]",
|
|
106
106
|
{
|
|
107
107
|
variants: {
|
|
108
108
|
variant: {
|
|
@@ -1099,7 +1099,7 @@ var Dropdown = (props) => {
|
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
|
-
isOpen && options.length > 0 && /* @__PURE__ */ jsx18("div", { className: "absolute z-10 mt-1 w-full min-w-343 rounded-4 border border-(--border-primary-hover) bg-(--background-neutral) shadow-card-md flex overflow-y-scroll dropdown-scrollbar max-h-
|
|
1102
|
+
isOpen && options.length > 0 && /* @__PURE__ */ jsx18("div", { className: "absolute z-10 mt-1 w-full min-w-343 rounded-4 border border-(--border-primary-hover) bg-(--background-neutral) shadow-card-md flex overflow-y-scroll dropdown-scrollbar max-h-79", children: /* @__PURE__ */ jsx18("ul", { role: "listbox", className: "flex flex-1 flex-col", children: options.map((opt) => {
|
|
1103
1103
|
const selected = opt.value === currentValue;
|
|
1104
1104
|
return /* @__PURE__ */ jsx18(
|
|
1105
1105
|
"li",
|
|
@@ -1141,39 +1141,9 @@ var Dropdown = (props) => {
|
|
|
1141
1141
|
};
|
|
1142
1142
|
Dropdown.displayName = "Dropdown";
|
|
1143
1143
|
|
|
1144
|
-
// src/components/Inputs/PasswordInput.tsx
|
|
1145
|
-
import * as React20 from "react";
|
|
1146
|
-
import { cva as cva14 } from "class-variance-authority";
|
|
1147
|
-
|
|
1148
|
-
// src/components/ui/input.tsx
|
|
1149
|
-
import * as React17 from "react";
|
|
1150
|
-
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1151
|
-
var Input = React17.forwardRef(
|
|
1152
|
-
({ className, type, variant = "default", ...props }, ref) => {
|
|
1153
|
-
const base = "text-(--text-primary) placeholder:text-(--text-secondary) disabled:text-(--text-primary-disabled) disabled:placeholder:text-(--text-primary-disabled) selection:bg-primary selection:text-primary-foreground file:text-foreground";
|
|
1154
|
-
const defaultStyles = "dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive";
|
|
1155
|
-
const bareStyles = "bg-transparent outline-none w-full";
|
|
1156
|
-
return /* @__PURE__ */ jsx19(
|
|
1157
|
-
"input",
|
|
1158
|
-
{
|
|
1159
|
-
ref,
|
|
1160
|
-
type,
|
|
1161
|
-
"data-slot": "input",
|
|
1162
|
-
className: cn(
|
|
1163
|
-
base,
|
|
1164
|
-
variant === "default" ? defaultStyles : bareStyles,
|
|
1165
|
-
className
|
|
1166
|
-
),
|
|
1167
|
-
...props
|
|
1168
|
-
}
|
|
1169
|
-
);
|
|
1170
|
-
}
|
|
1171
|
-
);
|
|
1172
|
-
Input.displayName = "Input";
|
|
1173
|
-
|
|
1174
1144
|
// src/components/Inputs/Field.tsx
|
|
1175
|
-
import * as
|
|
1176
|
-
import { jsx as
|
|
1145
|
+
import * as React17 from "react";
|
|
1146
|
+
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1177
1147
|
var fieldBase = "flex flex-col gap-2 items-start min-w-[343px]";
|
|
1178
1148
|
var Field = (props) => {
|
|
1179
1149
|
const {
|
|
@@ -1184,13 +1154,13 @@ var Field = (props) => {
|
|
|
1184
1154
|
className,
|
|
1185
1155
|
children
|
|
1186
1156
|
} = props;
|
|
1187
|
-
const fieldId =
|
|
1157
|
+
const fieldId = React17.useId();
|
|
1188
1158
|
const labelId = label ? `${fieldId}-label` : void 0;
|
|
1189
1159
|
const hintId = hint ? `${fieldId}-hint` : void 0;
|
|
1190
1160
|
const hintColorClass = disabled ? "text-(--text-primary-disabled)" : status === "success" ? "text-(--text-success)" : status === "error" ? "text-(--text-error)" : "text-(--text-secondary)";
|
|
1191
1161
|
const labelColorClass = disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)";
|
|
1192
1162
|
return /* @__PURE__ */ jsxs13("div", { className: cn(fieldBase, className), children: [
|
|
1193
|
-
label && /* @__PURE__ */
|
|
1163
|
+
label && /* @__PURE__ */ jsx19(
|
|
1194
1164
|
"label",
|
|
1195
1165
|
{
|
|
1196
1166
|
id: labelId,
|
|
@@ -1199,8 +1169,8 @@ var Field = (props) => {
|
|
|
1199
1169
|
children: label
|
|
1200
1170
|
}
|
|
1201
1171
|
),
|
|
1202
|
-
/* @__PURE__ */
|
|
1203
|
-
/* @__PURE__ */
|
|
1172
|
+
/* @__PURE__ */ jsx19("div", { className: "relative w-full", children }),
|
|
1173
|
+
/* @__PURE__ */ jsx19(
|
|
1204
1174
|
"p",
|
|
1205
1175
|
{
|
|
1206
1176
|
id: hint ? hintId : void 0,
|
|
@@ -1213,6 +1183,36 @@ var Field = (props) => {
|
|
|
1213
1183
|
};
|
|
1214
1184
|
Field.displayName = "Field";
|
|
1215
1185
|
|
|
1186
|
+
// src/components/Inputs/PasswordInput.tsx
|
|
1187
|
+
import * as React20 from "react";
|
|
1188
|
+
import { cva as cva14 } from "class-variance-authority";
|
|
1189
|
+
|
|
1190
|
+
// src/components/ui/input.tsx
|
|
1191
|
+
import * as React18 from "react";
|
|
1192
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1193
|
+
var Input = React18.forwardRef(
|
|
1194
|
+
({ className, type, variant = "default", ...props }, ref) => {
|
|
1195
|
+
const base = "text-(--text-primary) placeholder:text-(--text-secondary) disabled:text-(--text-primary-disabled) disabled:placeholder:text-(--text-primary-disabled) selection:bg-primary selection:text-primary-foreground file:text-foreground";
|
|
1196
|
+
const defaultStyles = "dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 shadow-xs transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive";
|
|
1197
|
+
const bareStyles = "bg-transparent outline-none w-full";
|
|
1198
|
+
return /* @__PURE__ */ jsx20(
|
|
1199
|
+
"input",
|
|
1200
|
+
{
|
|
1201
|
+
ref,
|
|
1202
|
+
type,
|
|
1203
|
+
"data-slot": "input",
|
|
1204
|
+
className: cn(
|
|
1205
|
+
base,
|
|
1206
|
+
variant === "default" ? defaultStyles : bareStyles,
|
|
1207
|
+
className
|
|
1208
|
+
),
|
|
1209
|
+
...props
|
|
1210
|
+
}
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
);
|
|
1214
|
+
Input.displayName = "Input";
|
|
1215
|
+
|
|
1216
1216
|
// src/components/Inputs/InputShell.tsx
|
|
1217
1217
|
import * as React19 from "react";
|
|
1218
1218
|
import { cva as cva13 } from "class-variance-authority";
|
|
@@ -1420,10 +1420,497 @@ var PasswordInput = (props) => {
|
|
|
1420
1420
|
};
|
|
1421
1421
|
PasswordInput.displayName = "PasswordInput";
|
|
1422
1422
|
|
|
1423
|
+
// src/components/Inputs/PhoneInput.tsx
|
|
1424
|
+
import * as React26 from "react";
|
|
1425
|
+
import { CheckIcon as CheckIcon3, CodeIcon } from "@bubo-squared/icons";
|
|
1426
|
+
import * as RPNInput from "react-phone-number-input";
|
|
1427
|
+
import flags from "react-phone-number-input/flags";
|
|
1428
|
+
|
|
1429
|
+
// src/components/ui/button.tsx
|
|
1430
|
+
import "react";
|
|
1431
|
+
import { Slot as Slot7 } from "@radix-ui/react-slot";
|
|
1432
|
+
import { cva as cva15 } from "class-variance-authority";
|
|
1433
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1434
|
+
var buttonVariants2 = cva15(
|
|
1435
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-0 focus-visible:shadow-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1436
|
+
{
|
|
1437
|
+
variants: {
|
|
1438
|
+
variant: {
|
|
1439
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1440
|
+
destructive: "bg-destructive text-white hover:bg-destructive/90 dark:bg-destructive/60",
|
|
1441
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
1442
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1443
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1444
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
1445
|
+
},
|
|
1446
|
+
size: {
|
|
1447
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
1448
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
1449
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1450
|
+
icon: "size-9",
|
|
1451
|
+
"icon-sm": "size-8",
|
|
1452
|
+
"icon-lg": "size-10"
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
defaultVariants: {
|
|
1456
|
+
variant: "default",
|
|
1457
|
+
size: "default"
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
);
|
|
1461
|
+
function Button2({
|
|
1462
|
+
className,
|
|
1463
|
+
variant = "default",
|
|
1464
|
+
size = "default",
|
|
1465
|
+
asChild = false,
|
|
1466
|
+
...props
|
|
1467
|
+
}) {
|
|
1468
|
+
const Comp = asChild ? Slot7 : "button";
|
|
1469
|
+
return /* @__PURE__ */ jsx23(
|
|
1470
|
+
Comp,
|
|
1471
|
+
{
|
|
1472
|
+
"data-slot": "button",
|
|
1473
|
+
"data-variant": variant,
|
|
1474
|
+
"data-size": size,
|
|
1475
|
+
className: cn(buttonVariants2({ variant, size, className })),
|
|
1476
|
+
...props
|
|
1477
|
+
}
|
|
1478
|
+
);
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
// src/components/ui/command.tsx
|
|
1482
|
+
import "react";
|
|
1483
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1484
|
+
import { SearchIcon } from "@bubo-squared/icons";
|
|
1485
|
+
|
|
1486
|
+
// src/components/ui/dialog.tsx
|
|
1487
|
+
import "react";
|
|
1488
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1489
|
+
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1490
|
+
|
|
1491
|
+
// src/components/ui/command.tsx
|
|
1492
|
+
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1493
|
+
function Command({
|
|
1494
|
+
className,
|
|
1495
|
+
...props
|
|
1496
|
+
}) {
|
|
1497
|
+
return /* @__PURE__ */ jsx25(
|
|
1498
|
+
CommandPrimitive,
|
|
1499
|
+
{
|
|
1500
|
+
"data-slot": "command",
|
|
1501
|
+
className: cn(
|
|
1502
|
+
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
1503
|
+
className
|
|
1504
|
+
),
|
|
1505
|
+
...props
|
|
1506
|
+
}
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
function CommandInput({
|
|
1510
|
+
className,
|
|
1511
|
+
...props
|
|
1512
|
+
}) {
|
|
1513
|
+
return /* @__PURE__ */ jsxs16(
|
|
1514
|
+
"div",
|
|
1515
|
+
{
|
|
1516
|
+
"data-slot": "command-input-wrapper",
|
|
1517
|
+
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1518
|
+
children: [
|
|
1519
|
+
/* @__PURE__ */ jsx25(SearchIcon, { className: "size-4 shrink-0 opacity-50 text-(--text-secondary)" }),
|
|
1520
|
+
/* @__PURE__ */ jsx25(
|
|
1521
|
+
CommandPrimitive.Input,
|
|
1522
|
+
{
|
|
1523
|
+
"data-slot": "command-input",
|
|
1524
|
+
className: cn(
|
|
1525
|
+
"placeholder:text-(--text-secondary) text-(--text-primary) flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
1526
|
+
className
|
|
1527
|
+
),
|
|
1528
|
+
...props
|
|
1529
|
+
}
|
|
1530
|
+
)
|
|
1531
|
+
]
|
|
1532
|
+
}
|
|
1533
|
+
);
|
|
1534
|
+
}
|
|
1535
|
+
function CommandList({
|
|
1536
|
+
className,
|
|
1537
|
+
...props
|
|
1538
|
+
}) {
|
|
1539
|
+
return /* @__PURE__ */ jsx25(
|
|
1540
|
+
CommandPrimitive.List,
|
|
1541
|
+
{
|
|
1542
|
+
"data-slot": "command-list",
|
|
1543
|
+
className: cn(
|
|
1544
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
1545
|
+
className
|
|
1546
|
+
),
|
|
1547
|
+
...props
|
|
1548
|
+
}
|
|
1549
|
+
);
|
|
1550
|
+
}
|
|
1551
|
+
function CommandEmpty({
|
|
1552
|
+
...props
|
|
1553
|
+
}) {
|
|
1554
|
+
return /* @__PURE__ */ jsx25(
|
|
1555
|
+
CommandPrimitive.Empty,
|
|
1556
|
+
{
|
|
1557
|
+
"data-slot": "command-empty",
|
|
1558
|
+
className: "py-6 text-center text-sm",
|
|
1559
|
+
...props
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
}
|
|
1563
|
+
function CommandGroup({
|
|
1564
|
+
className,
|
|
1565
|
+
...props
|
|
1566
|
+
}) {
|
|
1567
|
+
return /* @__PURE__ */ jsx25(
|
|
1568
|
+
CommandPrimitive.Group,
|
|
1569
|
+
{
|
|
1570
|
+
"data-slot": "command-group",
|
|
1571
|
+
className: cn(
|
|
1572
|
+
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
1573
|
+
className
|
|
1574
|
+
),
|
|
1575
|
+
...props
|
|
1576
|
+
}
|
|
1577
|
+
);
|
|
1578
|
+
}
|
|
1579
|
+
function CommandItem({
|
|
1580
|
+
className,
|
|
1581
|
+
...props
|
|
1582
|
+
}) {
|
|
1583
|
+
return /* @__PURE__ */ jsx25(
|
|
1584
|
+
CommandPrimitive.Item,
|
|
1585
|
+
{
|
|
1586
|
+
"data-slot": "command-item",
|
|
1587
|
+
className: cn(
|
|
1588
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1589
|
+
className
|
|
1590
|
+
),
|
|
1591
|
+
...props
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
// src/components/ui/popover.tsx
|
|
1597
|
+
import "react";
|
|
1598
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
1599
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1600
|
+
function Popover({
|
|
1601
|
+
...props
|
|
1602
|
+
}) {
|
|
1603
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
1604
|
+
}
|
|
1605
|
+
function PopoverTrigger({
|
|
1606
|
+
...props
|
|
1607
|
+
}) {
|
|
1608
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
1609
|
+
}
|
|
1610
|
+
function PopoverContent({
|
|
1611
|
+
className,
|
|
1612
|
+
align = "center",
|
|
1613
|
+
sideOffset = 4,
|
|
1614
|
+
...props
|
|
1615
|
+
}) {
|
|
1616
|
+
return /* @__PURE__ */ jsx26(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx26(
|
|
1617
|
+
PopoverPrimitive.Content,
|
|
1618
|
+
{
|
|
1619
|
+
"data-slot": "popover-content",
|
|
1620
|
+
align,
|
|
1621
|
+
sideOffset,
|
|
1622
|
+
className: cn(
|
|
1623
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
1624
|
+
className
|
|
1625
|
+
),
|
|
1626
|
+
...props
|
|
1627
|
+
}
|
|
1628
|
+
) });
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
// src/components/ui/scroll-area.tsx
|
|
1632
|
+
import "react";
|
|
1633
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1634
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1635
|
+
function ScrollArea({
|
|
1636
|
+
className,
|
|
1637
|
+
children,
|
|
1638
|
+
...props
|
|
1639
|
+
}) {
|
|
1640
|
+
return /* @__PURE__ */ jsxs17(
|
|
1641
|
+
ScrollAreaPrimitive.Root,
|
|
1642
|
+
{
|
|
1643
|
+
"data-slot": "scroll-area",
|
|
1644
|
+
className: cn("relative", className),
|
|
1645
|
+
...props,
|
|
1646
|
+
children: [
|
|
1647
|
+
/* @__PURE__ */ jsx27(
|
|
1648
|
+
ScrollAreaPrimitive.Viewport,
|
|
1649
|
+
{
|
|
1650
|
+
"data-slot": "scroll-area-viewport",
|
|
1651
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
1652
|
+
children
|
|
1653
|
+
}
|
|
1654
|
+
),
|
|
1655
|
+
/* @__PURE__ */ jsx27(ScrollBar, {}),
|
|
1656
|
+
/* @__PURE__ */ jsx27(ScrollAreaPrimitive.Corner, {})
|
|
1657
|
+
]
|
|
1658
|
+
}
|
|
1659
|
+
);
|
|
1660
|
+
}
|
|
1661
|
+
function ScrollBar({
|
|
1662
|
+
className,
|
|
1663
|
+
orientation = "vertical",
|
|
1664
|
+
...props
|
|
1665
|
+
}) {
|
|
1666
|
+
return /* @__PURE__ */ jsx27(
|
|
1667
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
1668
|
+
{
|
|
1669
|
+
"data-slot": "scroll-area-scrollbar",
|
|
1670
|
+
orientation,
|
|
1671
|
+
className: cn(
|
|
1672
|
+
// Base scrollbar track styling
|
|
1673
|
+
"flex touch-none transition-colors select-none ml-1 pt-1 pb-1",
|
|
1674
|
+
orientation === "vertical" && "h-full w-4",
|
|
1675
|
+
orientation === "horizontal" && "h-4 flex-col",
|
|
1676
|
+
className
|
|
1677
|
+
),
|
|
1678
|
+
...props,
|
|
1679
|
+
children: /* @__PURE__ */ jsx27(
|
|
1680
|
+
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
1681
|
+
{
|
|
1682
|
+
"data-slot": "scroll-area-thumb",
|
|
1683
|
+
className: "bg-(--background-secondary) relative flex-1 rounded mr-1 w-full ml-1"
|
|
1684
|
+
}
|
|
1685
|
+
)
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// src/components/Inputs/PhoneInput.tsx
|
|
1691
|
+
import { cva as cva16 } from "class-variance-authority";
|
|
1692
|
+
import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1693
|
+
var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
|
|
1694
|
+
var sizeBase = cva16(
|
|
1695
|
+
"flex w-full",
|
|
1696
|
+
{
|
|
1697
|
+
variants: {
|
|
1698
|
+
size: {
|
|
1699
|
+
large: "h-11 [&_button]:gap-2",
|
|
1700
|
+
"extra-large": "h-14 [&_button]:gap-3"
|
|
1701
|
+
}
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1704
|
+
);
|
|
1705
|
+
var inputTextVariants = cva16("", {
|
|
1706
|
+
variants: {
|
|
1707
|
+
size: {
|
|
1708
|
+
large: "subtitle",
|
|
1709
|
+
"extra-large": "h6-title"
|
|
1710
|
+
},
|
|
1711
|
+
disabled: {
|
|
1712
|
+
true: "text-(--text-primary-disabled) border-(--border-secondary-disabled)"
|
|
1713
|
+
}
|
|
1714
|
+
},
|
|
1715
|
+
defaultVariants: {
|
|
1716
|
+
size: "large"
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1719
|
+
var wrapperStatusClass = {
|
|
1720
|
+
default: "input-default-nested",
|
|
1721
|
+
success: "input-success-nested",
|
|
1722
|
+
error: "input-error-nested"
|
|
1723
|
+
};
|
|
1724
|
+
var PhoneInput = React26.forwardRef(
|
|
1725
|
+
(props, ref) => {
|
|
1726
|
+
const {
|
|
1727
|
+
className,
|
|
1728
|
+
onChange,
|
|
1729
|
+
value,
|
|
1730
|
+
label,
|
|
1731
|
+
hint,
|
|
1732
|
+
placeholder,
|
|
1733
|
+
size = "large",
|
|
1734
|
+
disabled = false,
|
|
1735
|
+
status = "default",
|
|
1736
|
+
...rest
|
|
1737
|
+
} = props;
|
|
1738
|
+
return /* @__PURE__ */ jsx28(
|
|
1739
|
+
Field,
|
|
1740
|
+
{
|
|
1741
|
+
label,
|
|
1742
|
+
hint,
|
|
1743
|
+
status,
|
|
1744
|
+
disabled,
|
|
1745
|
+
className,
|
|
1746
|
+
children: /* @__PURE__ */ jsx28("div", { className: cn("w-full", wrapperStatusClass[status]), children: /* @__PURE__ */ jsx28(
|
|
1747
|
+
RPNInput.default,
|
|
1748
|
+
{
|
|
1749
|
+
ref,
|
|
1750
|
+
className: cn(
|
|
1751
|
+
sizeBase({ size }),
|
|
1752
|
+
inputTextVariants({ size, disabled })
|
|
1753
|
+
),
|
|
1754
|
+
style: { marginBottom: 0 },
|
|
1755
|
+
flagComponent: FlagComponent,
|
|
1756
|
+
countrySelectComponent: CountrySelect,
|
|
1757
|
+
inputComponent: InputComponent,
|
|
1758
|
+
smartCaret: false,
|
|
1759
|
+
value: value || void 0,
|
|
1760
|
+
international: true,
|
|
1761
|
+
countryCallingCodeEditable: false,
|
|
1762
|
+
onChange: (value2) => onChange?.(value2 || ""),
|
|
1763
|
+
placeholder,
|
|
1764
|
+
disabled,
|
|
1765
|
+
...rest
|
|
1766
|
+
}
|
|
1767
|
+
) })
|
|
1768
|
+
}
|
|
1769
|
+
);
|
|
1770
|
+
}
|
|
1771
|
+
);
|
|
1772
|
+
PhoneInput.displayName = "PhoneInput";
|
|
1773
|
+
var InputComponent = React26.forwardRef((props, ref) => {
|
|
1774
|
+
const { className, ...rest } = props;
|
|
1775
|
+
return /* @__PURE__ */ jsx28(
|
|
1776
|
+
Input,
|
|
1777
|
+
{
|
|
1778
|
+
ref,
|
|
1779
|
+
placeholder: rest.placeholder,
|
|
1780
|
+
className: cn(inputBase, className),
|
|
1781
|
+
...rest
|
|
1782
|
+
}
|
|
1783
|
+
);
|
|
1784
|
+
});
|
|
1785
|
+
InputComponent.displayName = "InputComponent";
|
|
1786
|
+
var CountrySelect = ({
|
|
1787
|
+
disabled,
|
|
1788
|
+
value: selectedCountry,
|
|
1789
|
+
options: countryList,
|
|
1790
|
+
onChange
|
|
1791
|
+
}) => {
|
|
1792
|
+
const scrollAreaRef = React26.useRef(null);
|
|
1793
|
+
const [searchValue, setSearchValue] = React26.useState("");
|
|
1794
|
+
const [isOpen, setIsOpen] = React26.useState(false);
|
|
1795
|
+
return /* @__PURE__ */ jsxs18(
|
|
1796
|
+
Popover,
|
|
1797
|
+
{
|
|
1798
|
+
open: isOpen,
|
|
1799
|
+
modal: true,
|
|
1800
|
+
onOpenChange: (open) => {
|
|
1801
|
+
setIsOpen(open);
|
|
1802
|
+
open && setSearchValue("");
|
|
1803
|
+
},
|
|
1804
|
+
children: [
|
|
1805
|
+
/* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs18(
|
|
1806
|
+
Button2,
|
|
1807
|
+
{
|
|
1808
|
+
type: "button",
|
|
1809
|
+
variant: "outline",
|
|
1810
|
+
className: cn(inputBase, "flex gap-1 rounded-4 px-3 focus:z-10 mr-(--space-12) text-(--text-primary-disabled) hover:text-(--text-primary-hover) focus:text-(--text-primary-focus)"),
|
|
1811
|
+
disabled,
|
|
1812
|
+
children: [
|
|
1813
|
+
/* @__PURE__ */ jsx28(
|
|
1814
|
+
FlagComponent,
|
|
1815
|
+
{
|
|
1816
|
+
country: selectedCountry,
|
|
1817
|
+
countryName: selectedCountry
|
|
1818
|
+
}
|
|
1819
|
+
),
|
|
1820
|
+
/* @__PURE__ */ jsx28(
|
|
1821
|
+
CodeIcon,
|
|
1822
|
+
{
|
|
1823
|
+
className: cn(
|
|
1824
|
+
"-mr-2 size-4 opacity-50 rotate-90",
|
|
1825
|
+
disabled ? "hidden" : "opacity-100"
|
|
1826
|
+
)
|
|
1827
|
+
}
|
|
1828
|
+
)
|
|
1829
|
+
]
|
|
1830
|
+
}
|
|
1831
|
+
) }),
|
|
1832
|
+
/* @__PURE__ */ jsx28(PopoverContent, { className: "w-[300px] p-0 relative left-4.5 bg-(--background-primary) shadow-card-md rounded-4 border-none outline-1 outline-solid outline-(--border-primary-hover) **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)", children: /* @__PURE__ */ jsxs18(Command, { children: [
|
|
1833
|
+
/* @__PURE__ */ jsx28(
|
|
1834
|
+
CommandInput,
|
|
1835
|
+
{
|
|
1836
|
+
value: searchValue,
|
|
1837
|
+
onValueChange: (value) => {
|
|
1838
|
+
setSearchValue(value);
|
|
1839
|
+
setTimeout(() => {
|
|
1840
|
+
if (scrollAreaRef.current) {
|
|
1841
|
+
const viewportElement = scrollAreaRef.current.querySelector(
|
|
1842
|
+
"[data-radix-scroll-area-viewport]"
|
|
1843
|
+
);
|
|
1844
|
+
if (viewportElement) {
|
|
1845
|
+
viewportElement.scrollTop = 0;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
}, 0);
|
|
1849
|
+
},
|
|
1850
|
+
placeholder: "Search country..."
|
|
1851
|
+
}
|
|
1852
|
+
),
|
|
1853
|
+
/* @__PURE__ */ jsx28(CommandList, { children: /* @__PURE__ */ jsxs18(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
|
|
1854
|
+
/* @__PURE__ */ jsx28(CommandEmpty, { children: "No country found." }),
|
|
1855
|
+
/* @__PURE__ */ jsx28(CommandGroup, { className: "[&>div>div]:pl-4 [&>div>div]:pr-2 [&>div>div]:py-2 [&>div>div]:border-b [&>div>div]:border-b-(--border-secondary) [&>div>div]:cursor-pointer [&>div>div]:hover:bg-(--background-primary-hover) [&>div>div]:text-(--text-primary) [&>div>div]:hover:text-(--text-primary) p-0 pr-4", children: countryList.map(
|
|
1856
|
+
({ value, label }) => value ? /* @__PURE__ */ jsx28(
|
|
1857
|
+
CountrySelectOption,
|
|
1858
|
+
{
|
|
1859
|
+
country: value,
|
|
1860
|
+
countryName: label,
|
|
1861
|
+
selectedCountry,
|
|
1862
|
+
onChange,
|
|
1863
|
+
onSelectComplete: () => setIsOpen(false)
|
|
1864
|
+
},
|
|
1865
|
+
value
|
|
1866
|
+
) : null
|
|
1867
|
+
) })
|
|
1868
|
+
] }) })
|
|
1869
|
+
] }) })
|
|
1870
|
+
]
|
|
1871
|
+
}
|
|
1872
|
+
);
|
|
1873
|
+
};
|
|
1874
|
+
var CountrySelectOption = (props) => {
|
|
1875
|
+
const {
|
|
1876
|
+
country,
|
|
1877
|
+
countryName,
|
|
1878
|
+
selectedCountry,
|
|
1879
|
+
onChange,
|
|
1880
|
+
onSelectComplete
|
|
1881
|
+
} = props;
|
|
1882
|
+
const handleSelect = () => {
|
|
1883
|
+
onChange(country);
|
|
1884
|
+
onSelectComplete();
|
|
1885
|
+
};
|
|
1886
|
+
return /* @__PURE__ */ jsxs18(
|
|
1887
|
+
CommandItem,
|
|
1888
|
+
{
|
|
1889
|
+
className: "gap-2 data-[selected=true]:text-(--text-primary)",
|
|
1890
|
+
onSelect: handleSelect,
|
|
1891
|
+
children: [
|
|
1892
|
+
/* @__PURE__ */ jsx28(FlagComponent, { country, countryName }),
|
|
1893
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-1 text-sm", children: countryName }),
|
|
1894
|
+
/* @__PURE__ */ jsx28("span", { className: "text-sm text-foreground/50", children: `+${RPNInput.getCountryCallingCode(country)}` }),
|
|
1895
|
+
/* @__PURE__ */ jsx28(
|
|
1896
|
+
CheckIcon3,
|
|
1897
|
+
{
|
|
1898
|
+
className: `ml-auto size-4 ${country === selectedCountry ? "opacity-100" : "opacity-0"}`
|
|
1899
|
+
}
|
|
1900
|
+
)
|
|
1901
|
+
]
|
|
1902
|
+
}
|
|
1903
|
+
);
|
|
1904
|
+
};
|
|
1905
|
+
var FlagComponent = ({ country, countryName }) => {
|
|
1906
|
+
const Flag = flags[country];
|
|
1907
|
+
return /* @__PURE__ */ jsx28("span", { className: "flex h-4 w-6 overflow-hidden rounded-2 bg-foreground/20 [&_svg:not([class*='size-'])]:size-full", children: Flag && /* @__PURE__ */ jsx28(Flag, { title: countryName }) });
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1423
1910
|
// src/components/Inputs/RadioGroup.tsx
|
|
1424
|
-
import * as
|
|
1911
|
+
import * as React27 from "react";
|
|
1425
1912
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
1426
|
-
import { jsx as
|
|
1913
|
+
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1427
1914
|
var wrapperBase = "flex flex-col gap-2 items-start min-w-[343px]";
|
|
1428
1915
|
var RadioGroup = ({
|
|
1429
1916
|
label,
|
|
@@ -1437,14 +1924,14 @@ var RadioGroup = ({
|
|
|
1437
1924
|
className,
|
|
1438
1925
|
...rootProps
|
|
1439
1926
|
}) => {
|
|
1440
|
-
const groupId =
|
|
1927
|
+
const groupId = React27.useId();
|
|
1441
1928
|
const hintId = hint ? `${groupId}-hint` : void 0;
|
|
1442
1929
|
const handleValueChange = (next) => {
|
|
1443
1930
|
onValueChange?.(next);
|
|
1444
1931
|
};
|
|
1445
1932
|
const isHorizontal = orientation === "horizontal";
|
|
1446
|
-
return /* @__PURE__ */
|
|
1447
|
-
label && /* @__PURE__ */
|
|
1933
|
+
return /* @__PURE__ */ jsxs19("div", { className: wrapperBase, children: [
|
|
1934
|
+
label && /* @__PURE__ */ jsx29(
|
|
1448
1935
|
"span",
|
|
1449
1936
|
{
|
|
1450
1937
|
className: cn(
|
|
@@ -1455,7 +1942,7 @@ var RadioGroup = ({
|
|
|
1455
1942
|
children: label
|
|
1456
1943
|
}
|
|
1457
1944
|
),
|
|
1458
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ jsx29(
|
|
1459
1946
|
RadioGroupPrimitive.Root,
|
|
1460
1947
|
{
|
|
1461
1948
|
...rootProps,
|
|
@@ -1468,13 +1955,13 @@ var RadioGroup = ({
|
|
|
1468
1955
|
isHorizontal ? "flex-row gap-6" : "flex-col gap-2",
|
|
1469
1956
|
className
|
|
1470
1957
|
),
|
|
1471
|
-
children: options.map((option) => /* @__PURE__ */
|
|
1958
|
+
children: options.map((option) => /* @__PURE__ */ jsx29(
|
|
1472
1959
|
RadioGroupPrimitive.Item,
|
|
1473
1960
|
{
|
|
1474
1961
|
value: option.value,
|
|
1475
1962
|
disabled: disabled || option.disabled,
|
|
1476
1963
|
asChild: true,
|
|
1477
|
-
children: /* @__PURE__ */
|
|
1964
|
+
children: /* @__PURE__ */ jsxs19(
|
|
1478
1965
|
"button",
|
|
1479
1966
|
{
|
|
1480
1967
|
type: "button",
|
|
@@ -1484,7 +1971,7 @@ var RadioGroup = ({
|
|
|
1484
1971
|
disabled || option.disabled ? "cursor-default" : "cursor-pointer"
|
|
1485
1972
|
),
|
|
1486
1973
|
children: [
|
|
1487
|
-
/* @__PURE__ */
|
|
1974
|
+
/* @__PURE__ */ jsx29(
|
|
1488
1975
|
"span",
|
|
1489
1976
|
{
|
|
1490
1977
|
className: cn(
|
|
@@ -1510,7 +1997,7 @@ var RadioGroup = ({
|
|
|
1510
1997
|
"group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
|
|
1511
1998
|
"group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
|
|
1512
1999
|
),
|
|
1513
|
-
children: /* @__PURE__ */
|
|
2000
|
+
children: /* @__PURE__ */ jsx29(
|
|
1514
2001
|
"span",
|
|
1515
2002
|
{
|
|
1516
2003
|
className: cn(
|
|
@@ -1525,7 +2012,7 @@ var RadioGroup = ({
|
|
|
1525
2012
|
)
|
|
1526
2013
|
}
|
|
1527
2014
|
),
|
|
1528
|
-
/* @__PURE__ */
|
|
2015
|
+
/* @__PURE__ */ jsx29(
|
|
1529
2016
|
"span",
|
|
1530
2017
|
{
|
|
1531
2018
|
className: cn(
|
|
@@ -1544,7 +2031,7 @@ var RadioGroup = ({
|
|
|
1544
2031
|
))
|
|
1545
2032
|
}
|
|
1546
2033
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
2034
|
+
/* @__PURE__ */ jsx29(
|
|
1548
2035
|
"p",
|
|
1549
2036
|
{
|
|
1550
2037
|
id: hintId,
|
|
@@ -1560,11 +2047,11 @@ var RadioGroup = ({
|
|
|
1560
2047
|
};
|
|
1561
2048
|
|
|
1562
2049
|
// src/components/Inputs/SearchInput.tsx
|
|
1563
|
-
import * as
|
|
1564
|
-
import { cva as
|
|
1565
|
-
import { SearchIcon } from "@bubo-squared/icons";
|
|
1566
|
-
import { jsx as
|
|
1567
|
-
var searchTextVariants =
|
|
2050
|
+
import * as React28 from "react";
|
|
2051
|
+
import { cva as cva17 } from "class-variance-authority";
|
|
2052
|
+
import { SearchIcon as SearchIcon2 } from "@bubo-squared/icons";
|
|
2053
|
+
import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2054
|
+
var searchTextVariants = cva17("truncate", {
|
|
1568
2055
|
variants: {
|
|
1569
2056
|
size: {
|
|
1570
2057
|
large: "subtitle",
|
|
@@ -1575,7 +2062,7 @@ var searchTextVariants = cva15("truncate", {
|
|
|
1575
2062
|
size: "large"
|
|
1576
2063
|
}
|
|
1577
2064
|
});
|
|
1578
|
-
var iconWrapperVariants2 =
|
|
2065
|
+
var iconWrapperVariants2 = cva17("flex items-center justify-center shrink-0 text-(--icon-primary)", {
|
|
1579
2066
|
variants: {
|
|
1580
2067
|
size: {
|
|
1581
2068
|
large: "size-5 [&>svg]:size-5",
|
|
@@ -1599,12 +2086,12 @@ var SearchInput = (props) => {
|
|
|
1599
2086
|
showLeadingIcon = true,
|
|
1600
2087
|
...inputProps
|
|
1601
2088
|
} = props;
|
|
1602
|
-
const inputRef =
|
|
2089
|
+
const inputRef = React28.useRef(null);
|
|
1603
2090
|
const handleContainerClick = () => {
|
|
1604
2091
|
if (disabled) return;
|
|
1605
2092
|
inputRef.current?.focus();
|
|
1606
2093
|
};
|
|
1607
|
-
return /* @__PURE__ */
|
|
2094
|
+
return /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2 items-start min-w-[343px]", children: /* @__PURE__ */ jsx30("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs20(
|
|
1608
2095
|
InputShell,
|
|
1609
2096
|
{
|
|
1610
2097
|
size,
|
|
@@ -1613,8 +2100,8 @@ var SearchInput = (props) => {
|
|
|
1613
2100
|
className,
|
|
1614
2101
|
onClick: handleContainerClick,
|
|
1615
2102
|
children: [
|
|
1616
|
-
showLeadingIcon && /* @__PURE__ */
|
|
1617
|
-
/* @__PURE__ */
|
|
2103
|
+
showLeadingIcon && /* @__PURE__ */ jsx30("span", { className: cn(iconWrapperVariants2({ size, disabled: !!disabled })), children: leadingIcon ?? /* @__PURE__ */ jsx30(SearchIcon2, {}) }),
|
|
2104
|
+
/* @__PURE__ */ jsx30(
|
|
1618
2105
|
Input,
|
|
1619
2106
|
{
|
|
1620
2107
|
ref: inputRef,
|
|
@@ -1636,8 +2123,8 @@ var SearchInput = (props) => {
|
|
|
1636
2123
|
SearchInput.displayName = "SearchInput";
|
|
1637
2124
|
|
|
1638
2125
|
// src/components/Inputs/Slider.tsx
|
|
1639
|
-
import * as
|
|
1640
|
-
import { jsx as
|
|
2126
|
+
import * as React29 from "react";
|
|
2127
|
+
import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1641
2128
|
var wrapperBase2 = "flex flex-col gap-2 items-start min-w-[343px]";
|
|
1642
2129
|
var Slider = (props) => {
|
|
1643
2130
|
const {
|
|
@@ -1657,7 +2144,7 @@ var Slider = (props) => {
|
|
|
1657
2144
|
} = props;
|
|
1658
2145
|
const isControlled = value !== void 0;
|
|
1659
2146
|
const expectedLength = type === "multi" ? 2 : 1;
|
|
1660
|
-
const normalizeArray =
|
|
2147
|
+
const normalizeArray = React29.useCallback(
|
|
1661
2148
|
(arr, fallback) => {
|
|
1662
2149
|
if (!arr || arr.length === 0) return fallback;
|
|
1663
2150
|
if (arr.length === expectedLength) return arr;
|
|
@@ -1669,15 +2156,15 @@ var Slider = (props) => {
|
|
|
1669
2156
|
},
|
|
1670
2157
|
[expectedLength, max]
|
|
1671
2158
|
);
|
|
1672
|
-
const defaultInternal =
|
|
2159
|
+
const defaultInternal = React29.useMemo(() => {
|
|
1673
2160
|
if (defaultValue) return normalizeArray(defaultValue, []);
|
|
1674
2161
|
if (type === "multi") return [min, Math.min(min + (max - min) / 4, max)];
|
|
1675
2162
|
return [min + (max - min) / 3];
|
|
1676
2163
|
}, [defaultValue, min, max, type, normalizeArray]);
|
|
1677
|
-
const [internalValue, setInternalValue] =
|
|
2164
|
+
const [internalValue, setInternalValue] = React29.useState(
|
|
1678
2165
|
() => normalizeArray(isControlled ? value : defaultInternal, defaultInternal)
|
|
1679
2166
|
);
|
|
1680
|
-
|
|
2167
|
+
React29.useEffect(() => {
|
|
1681
2168
|
if (isControlled) {
|
|
1682
2169
|
setInternalValue(
|
|
1683
2170
|
(current2) => normalizeArray(value, current2.length ? current2 : defaultInternal)
|
|
@@ -1685,13 +2172,13 @@ var Slider = (props) => {
|
|
|
1685
2172
|
}
|
|
1686
2173
|
}, [isControlled, value, normalizeArray, defaultInternal]);
|
|
1687
2174
|
const current = internalValue;
|
|
1688
|
-
const trackRef =
|
|
2175
|
+
const trackRef = React29.useRef(null);
|
|
1689
2176
|
const clamp = (val) => {
|
|
1690
2177
|
if (val < min) return min;
|
|
1691
2178
|
if (val > max) return max;
|
|
1692
2179
|
return val;
|
|
1693
2180
|
};
|
|
1694
|
-
|
|
2181
|
+
React29.useEffect(() => {
|
|
1695
2182
|
if (!isControlled) {
|
|
1696
2183
|
setInternalValue((prev) => {
|
|
1697
2184
|
const clamped = prev.map((v) => clamp(v));
|
|
@@ -1876,7 +2363,7 @@ var Slider = (props) => {
|
|
|
1876
2363
|
const trackHeight = 32;
|
|
1877
2364
|
const thumbWidth = 18;
|
|
1878
2365
|
const thumbRadius = thumbWidth / 2;
|
|
1879
|
-
const renderTooltipBubble = (key, percent, labelText) => /* @__PURE__ */
|
|
2366
|
+
const renderTooltipBubble = (key, percent, labelText) => /* @__PURE__ */ jsx31(
|
|
1880
2367
|
"div",
|
|
1881
2368
|
{
|
|
1882
2369
|
className: "absolute -translate-x-1/2 flex flex-col items-center",
|
|
@@ -1887,7 +2374,7 @@ var Slider = (props) => {
|
|
|
1887
2374
|
marginBottom: isTooltipAbove ? 8 : void 0,
|
|
1888
2375
|
marginTop: isTooltipAbove ? void 0 : 8
|
|
1889
2376
|
},
|
|
1890
|
-
children: /* @__PURE__ */
|
|
2377
|
+
children: /* @__PURE__ */ jsxs21(
|
|
1891
2378
|
"div",
|
|
1892
2379
|
{
|
|
1893
2380
|
className: cn(
|
|
@@ -1896,7 +2383,7 @@ var Slider = (props) => {
|
|
|
1896
2383
|
),
|
|
1897
2384
|
style: { marginBottom: 0 },
|
|
1898
2385
|
children: [
|
|
1899
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ jsx31(
|
|
1900
2387
|
"p",
|
|
1901
2388
|
{
|
|
1902
2389
|
className: cn(
|
|
@@ -1907,7 +2394,7 @@ var Slider = (props) => {
|
|
|
1907
2394
|
children: labelText
|
|
1908
2395
|
}
|
|
1909
2396
|
),
|
|
1910
|
-
/* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ jsx31(
|
|
1911
2398
|
"div",
|
|
1912
2399
|
{
|
|
1913
2400
|
className: cn(
|
|
@@ -1925,7 +2412,7 @@ var Slider = (props) => {
|
|
|
1925
2412
|
);
|
|
1926
2413
|
const renderHandle = (index, percent, ariaValueText) => {
|
|
1927
2414
|
const val = index === 0 ? primary : secondary;
|
|
1928
|
-
return /* @__PURE__ */
|
|
2415
|
+
return /* @__PURE__ */ jsx31(
|
|
1929
2416
|
"button",
|
|
1930
2417
|
{
|
|
1931
2418
|
type: "button",
|
|
@@ -1956,11 +2443,11 @@ var Slider = (props) => {
|
|
|
1956
2443
|
index
|
|
1957
2444
|
);
|
|
1958
2445
|
};
|
|
1959
|
-
return /* @__PURE__ */
|
|
1960
|
-
/* @__PURE__ */
|
|
2446
|
+
return /* @__PURE__ */ jsx31("div", { className: wrapperBase2, children: /* @__PURE__ */ jsxs21("div", { className: cn("w-[354px] flex flex-col gap-1", className), children: [
|
|
2447
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative w-full", children: [
|
|
1961
2448
|
showTooltip && primary !== void 0 && renderTooltipBubble("primary", primaryPercent, formatDisplayValue(primary)),
|
|
1962
2449
|
showTooltip && type === "multi" && secondary !== void 0 && renderTooltipBubble("secondary", secondaryPercent, formatDisplayValue(secondary)),
|
|
1963
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ jsxs21(
|
|
1964
2451
|
"div",
|
|
1965
2452
|
{
|
|
1966
2453
|
className: cn(
|
|
@@ -1971,7 +2458,7 @@ var Slider = (props) => {
|
|
|
1971
2458
|
ref: trackRef,
|
|
1972
2459
|
onPointerDown: handleTrackPointerDown,
|
|
1973
2460
|
children: [
|
|
1974
|
-
/* @__PURE__ */
|
|
2461
|
+
/* @__PURE__ */ jsx31(
|
|
1975
2462
|
"div",
|
|
1976
2463
|
{
|
|
1977
2464
|
className: cn(
|
|
@@ -1990,7 +2477,7 @@ var Slider = (props) => {
|
|
|
1990
2477
|
}
|
|
1991
2478
|
)
|
|
1992
2479
|
] }),
|
|
1993
|
-
showNumeric && /* @__PURE__ */
|
|
2480
|
+
showNumeric && /* @__PURE__ */ jsx31(
|
|
1994
2481
|
"p",
|
|
1995
2482
|
{
|
|
1996
2483
|
className: cn(
|
|
@@ -2006,9 +2493,9 @@ var Slider = (props) => {
|
|
|
2006
2493
|
Slider.displayName = "Slider";
|
|
2007
2494
|
|
|
2008
2495
|
// src/components/Inputs/TextArea.tsx
|
|
2009
|
-
import * as
|
|
2496
|
+
import * as React30 from "react";
|
|
2010
2497
|
import { MaximizeIcon } from "@bubo-squared/icons";
|
|
2011
|
-
import { jsx as
|
|
2498
|
+
import { jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2012
2499
|
var wrapperBase3 = "flex flex-col gap-2 items-start min-w-[343px]";
|
|
2013
2500
|
var TextArea = (props) => {
|
|
2014
2501
|
const {
|
|
@@ -2026,7 +2513,7 @@ var TextArea = (props) => {
|
|
|
2026
2513
|
...textareaProps
|
|
2027
2514
|
} = props;
|
|
2028
2515
|
const isControlled = value !== void 0;
|
|
2029
|
-
const [internalValue, setInternalValue] =
|
|
2516
|
+
const [internalValue, setInternalValue] = React30.useState(
|
|
2030
2517
|
defaultValue ?? ""
|
|
2031
2518
|
);
|
|
2032
2519
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
@@ -2034,10 +2521,10 @@ var TextArea = (props) => {
|
|
|
2034
2521
|
const currentLength = currentValue.length;
|
|
2035
2522
|
const effectiveMaxLength = type === "character-limit" ? maxLength ?? 144 : void 0;
|
|
2036
2523
|
const showCharacterLimit = type === "character-limit" && typeof effectiveMaxLength === "number";
|
|
2037
|
-
const textareaRef =
|
|
2038
|
-
const containerRef =
|
|
2039
|
-
const [height, setHeight] =
|
|
2040
|
-
const [width, setWidth] =
|
|
2524
|
+
const textareaRef = React30.useRef(null);
|
|
2525
|
+
const containerRef = React30.useRef(null);
|
|
2526
|
+
const [height, setHeight] = React30.useState(void 0);
|
|
2527
|
+
const [width, setWidth] = React30.useState(void 0);
|
|
2041
2528
|
const minHeight = 80;
|
|
2042
2529
|
const minWidth = 240;
|
|
2043
2530
|
const handleContainerClick = () => {
|
|
@@ -2050,7 +2537,7 @@ var TextArea = (props) => {
|
|
|
2050
2537
|
}
|
|
2051
2538
|
onChange?.(event);
|
|
2052
2539
|
};
|
|
2053
|
-
const inputId =
|
|
2540
|
+
const inputId = React30.useId();
|
|
2054
2541
|
const labelId = `${inputId}-label`;
|
|
2055
2542
|
const hintId = `${inputId}-hint`;
|
|
2056
2543
|
const statusBorderClass = {
|
|
@@ -2089,8 +2576,8 @@ var TextArea = (props) => {
|
|
|
2089
2576
|
window.addEventListener("pointermove", handlePointerMove);
|
|
2090
2577
|
window.addEventListener("pointerup", handlePointerUp);
|
|
2091
2578
|
};
|
|
2092
|
-
return /* @__PURE__ */
|
|
2093
|
-
label && /* @__PURE__ */
|
|
2579
|
+
return /* @__PURE__ */ jsxs22("div", { className: wrapperBase3, children: [
|
|
2580
|
+
label && /* @__PURE__ */ jsx32(
|
|
2094
2581
|
"label",
|
|
2095
2582
|
{
|
|
2096
2583
|
htmlFor: inputId,
|
|
@@ -2103,7 +2590,7 @@ var TextArea = (props) => {
|
|
|
2103
2590
|
children: label
|
|
2104
2591
|
}
|
|
2105
2592
|
),
|
|
2106
|
-
/* @__PURE__ */
|
|
2593
|
+
/* @__PURE__ */ jsx32("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs22(
|
|
2107
2594
|
"div",
|
|
2108
2595
|
{
|
|
2109
2596
|
className: cn(
|
|
@@ -2122,7 +2609,7 @@ var TextArea = (props) => {
|
|
|
2122
2609
|
onClick: handleContainerClick,
|
|
2123
2610
|
"aria-disabled": disabled || void 0,
|
|
2124
2611
|
children: [
|
|
2125
|
-
/* @__PURE__ */
|
|
2612
|
+
/* @__PURE__ */ jsx32(
|
|
2126
2613
|
"textarea",
|
|
2127
2614
|
{
|
|
2128
2615
|
id: inputId,
|
|
@@ -2144,7 +2631,7 @@ var TextArea = (props) => {
|
|
|
2144
2631
|
...textareaProps
|
|
2145
2632
|
}
|
|
2146
2633
|
),
|
|
2147
|
-
showCharacterLimit && /* @__PURE__ */
|
|
2634
|
+
showCharacterLimit && /* @__PURE__ */ jsxs22(
|
|
2148
2635
|
"span",
|
|
2149
2636
|
{
|
|
2150
2637
|
className: cn(
|
|
@@ -2158,19 +2645,19 @@ var TextArea = (props) => {
|
|
|
2158
2645
|
]
|
|
2159
2646
|
}
|
|
2160
2647
|
),
|
|
2161
|
-
type === "responsive" && /* @__PURE__ */
|
|
2648
|
+
type === "responsive" && /* @__PURE__ */ jsx32(
|
|
2162
2649
|
"div",
|
|
2163
2650
|
{
|
|
2164
2651
|
className: "absolute bottom-1 right-1 h-3 w-3 " + (disabled ? "cursor-auto" : "cursor-nwse-resize"),
|
|
2165
2652
|
onPointerDown: disabled ? void 0 : handleResizePointerDown,
|
|
2166
|
-
children: /* @__PURE__ */
|
|
2653
|
+
children: /* @__PURE__ */ jsx32(
|
|
2167
2654
|
"span",
|
|
2168
2655
|
{
|
|
2169
2656
|
className: cn(
|
|
2170
2657
|
"absolute bottom-0 right-0 flex h-4 w-4 items-center justify-center text-(--icon-primary)",
|
|
2171
2658
|
disabled && "text-(--icon-primary-disabled)"
|
|
2172
2659
|
),
|
|
2173
|
-
children: /* @__PURE__ */
|
|
2660
|
+
children: /* @__PURE__ */ jsx32(MaximizeIcon, {})
|
|
2174
2661
|
}
|
|
2175
2662
|
)
|
|
2176
2663
|
}
|
|
@@ -2178,7 +2665,7 @@ var TextArea = (props) => {
|
|
|
2178
2665
|
]
|
|
2179
2666
|
}
|
|
2180
2667
|
) }),
|
|
2181
|
-
/* @__PURE__ */
|
|
2668
|
+
/* @__PURE__ */ jsx32(
|
|
2182
2669
|
"p",
|
|
2183
2670
|
{
|
|
2184
2671
|
id: hint ? hintId : void 0,
|
|
@@ -2192,10 +2679,10 @@ var TextArea = (props) => {
|
|
|
2192
2679
|
TextArea.displayName = "TextArea";
|
|
2193
2680
|
|
|
2194
2681
|
// src/components/Inputs/TextInput.tsx
|
|
2195
|
-
import * as
|
|
2196
|
-
import { cva as
|
|
2197
|
-
import { jsx as
|
|
2198
|
-
var
|
|
2682
|
+
import * as React31 from "react";
|
|
2683
|
+
import { cva as cva18 } from "class-variance-authority";
|
|
2684
|
+
import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2685
|
+
var inputTextVariants2 = cva18("truncate", {
|
|
2199
2686
|
variants: {
|
|
2200
2687
|
size: {
|
|
2201
2688
|
large: "subtitle",
|
|
@@ -2206,7 +2693,7 @@ var inputTextVariants = cva16("truncate", {
|
|
|
2206
2693
|
size: "large"
|
|
2207
2694
|
}
|
|
2208
2695
|
});
|
|
2209
|
-
var iconWrapperVariants3 =
|
|
2696
|
+
var iconWrapperVariants3 = cva18(
|
|
2210
2697
|
"flex items-center justify-center shrink-0 text-(--icon-primary)",
|
|
2211
2698
|
{
|
|
2212
2699
|
variants: {
|
|
@@ -2240,11 +2727,11 @@ var TextInput = (props) => {
|
|
|
2240
2727
|
...inputProps
|
|
2241
2728
|
} = props;
|
|
2242
2729
|
const isControlled = value !== void 0;
|
|
2243
|
-
const [internalValue, setInternalValue] =
|
|
2730
|
+
const [internalValue, setInternalValue] = React31.useState(
|
|
2244
2731
|
defaultValue ?? ""
|
|
2245
2732
|
);
|
|
2246
2733
|
const currentValue = (isControlled ? value : internalValue) ?? "";
|
|
2247
|
-
const inputRef =
|
|
2734
|
+
const inputRef = React31.useRef(null);
|
|
2248
2735
|
const handleContainerClick = () => {
|
|
2249
2736
|
if (disabled) return;
|
|
2250
2737
|
inputRef.current?.focus();
|
|
@@ -2257,14 +2744,14 @@ var TextInput = (props) => {
|
|
|
2257
2744
|
};
|
|
2258
2745
|
const showLeadingIcon = !!leadingIcon;
|
|
2259
2746
|
const showTrailingIcon = !!trailingIcon;
|
|
2260
|
-
return /* @__PURE__ */
|
|
2747
|
+
return /* @__PURE__ */ jsx33(
|
|
2261
2748
|
Field,
|
|
2262
2749
|
{
|
|
2263
2750
|
label,
|
|
2264
2751
|
hint,
|
|
2265
2752
|
status,
|
|
2266
2753
|
disabled,
|
|
2267
|
-
children: /* @__PURE__ */
|
|
2754
|
+
children: /* @__PURE__ */ jsxs23(
|
|
2268
2755
|
InputShell,
|
|
2269
2756
|
{
|
|
2270
2757
|
size,
|
|
@@ -2273,7 +2760,7 @@ var TextInput = (props) => {
|
|
|
2273
2760
|
className,
|
|
2274
2761
|
onClick: handleContainerClick,
|
|
2275
2762
|
children: [
|
|
2276
|
-
showLeadingIcon && /* @__PURE__ */
|
|
2763
|
+
showLeadingIcon && /* @__PURE__ */ jsx33(
|
|
2277
2764
|
"span",
|
|
2278
2765
|
{
|
|
2279
2766
|
className: cn(
|
|
@@ -2282,7 +2769,7 @@ var TextInput = (props) => {
|
|
|
2282
2769
|
children: leadingIcon
|
|
2283
2770
|
}
|
|
2284
2771
|
),
|
|
2285
|
-
/* @__PURE__ */
|
|
2772
|
+
/* @__PURE__ */ jsx33(
|
|
2286
2773
|
Input,
|
|
2287
2774
|
{
|
|
2288
2775
|
ref: inputRef,
|
|
@@ -2294,14 +2781,14 @@ var TextInput = (props) => {
|
|
|
2294
2781
|
onChange: handleChange,
|
|
2295
2782
|
variant: "bare",
|
|
2296
2783
|
className: cn(
|
|
2297
|
-
|
|
2784
|
+
inputTextVariants2({ size }),
|
|
2298
2785
|
"bg-transparent outline-none w-full"
|
|
2299
2786
|
),
|
|
2300
2787
|
style: { marginBottom: 0 },
|
|
2301
2788
|
...inputProps
|
|
2302
2789
|
}
|
|
2303
2790
|
),
|
|
2304
|
-
showTrailingIcon && /* @__PURE__ */
|
|
2791
|
+
showTrailingIcon && /* @__PURE__ */ jsx33(
|
|
2305
2792
|
"span",
|
|
2306
2793
|
{
|
|
2307
2794
|
className: cn(
|
|
@@ -2320,10 +2807,10 @@ TextInput.displayName = "TextInput";
|
|
|
2320
2807
|
|
|
2321
2808
|
// src/components/Inputs/Toggle.tsx
|
|
2322
2809
|
import "react";
|
|
2323
|
-
import { jsx as
|
|
2810
|
+
import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2324
2811
|
var Toggle = (props) => {
|
|
2325
2812
|
const { label, className, disabled, ...inputProps } = props;
|
|
2326
|
-
return /* @__PURE__ */
|
|
2813
|
+
return /* @__PURE__ */ jsxs24(
|
|
2327
2814
|
"label",
|
|
2328
2815
|
{
|
|
2329
2816
|
className: cn(
|
|
@@ -2331,8 +2818,8 @@ var Toggle = (props) => {
|
|
|
2331
2818
|
disabled ? "cursor-default" : "cursor-pointer"
|
|
2332
2819
|
),
|
|
2333
2820
|
children: [
|
|
2334
|
-
/* @__PURE__ */
|
|
2335
|
-
/* @__PURE__ */
|
|
2821
|
+
/* @__PURE__ */ jsxs24("span", { className: "relative inline-flex items-center", children: [
|
|
2822
|
+
/* @__PURE__ */ jsx34(
|
|
2336
2823
|
"input",
|
|
2337
2824
|
{
|
|
2338
2825
|
type: "checkbox",
|
|
@@ -2341,7 +2828,7 @@ var Toggle = (props) => {
|
|
|
2341
2828
|
...inputProps
|
|
2342
2829
|
}
|
|
2343
2830
|
),
|
|
2344
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ jsx34(
|
|
2345
2832
|
"span",
|
|
2346
2833
|
{
|
|
2347
2834
|
className: cn(
|
|
@@ -2381,7 +2868,7 @@ var Toggle = (props) => {
|
|
|
2381
2868
|
"peer-disabled:[&>.knob]:peer-checked:bg-(--background-primary-hover)",
|
|
2382
2869
|
className
|
|
2383
2870
|
),
|
|
2384
|
-
children: /* @__PURE__ */
|
|
2871
|
+
children: /* @__PURE__ */ jsx34(
|
|
2385
2872
|
"span",
|
|
2386
2873
|
{
|
|
2387
2874
|
className: cn(
|
|
@@ -2393,7 +2880,7 @@ var Toggle = (props) => {
|
|
|
2393
2880
|
}
|
|
2394
2881
|
)
|
|
2395
2882
|
] }),
|
|
2396
|
-
label && /* @__PURE__ */
|
|
2883
|
+
label && /* @__PURE__ */ jsx34(
|
|
2397
2884
|
"span",
|
|
2398
2885
|
{
|
|
2399
2886
|
className: cn(
|
|
@@ -2412,7 +2899,7 @@ Toggle.displayName = "Toggle";
|
|
|
2412
2899
|
|
|
2413
2900
|
// src/components/Inputs/WebsiteInput.tsx
|
|
2414
2901
|
import "react";
|
|
2415
|
-
import { jsx as
|
|
2902
|
+
import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2416
2903
|
var WebsiteInput = (props) => {
|
|
2417
2904
|
const {
|
|
2418
2905
|
hierarchy = "prefix",
|
|
@@ -2448,15 +2935,15 @@ var WebsiteInput = (props) => {
|
|
|
2448
2935
|
size === "extra-large" ? "[&>svg]:w-6 [&>svg]:h-6" : "[&>svg]:w-5 [&>svg]:h-5",
|
|
2449
2936
|
disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
|
|
2450
2937
|
);
|
|
2451
|
-
const prefixAddon = /* @__PURE__ */
|
|
2452
|
-
/* @__PURE__ */
|
|
2453
|
-
icon != null && /* @__PURE__ */
|
|
2938
|
+
const prefixAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
|
|
2939
|
+
/* @__PURE__ */ jsx35("div", { className: addonTextClass, children: protocolLabel }),
|
|
2940
|
+
icon != null && /* @__PURE__ */ jsx35("span", { className: iconWrapperClass, children: icon })
|
|
2454
2941
|
] });
|
|
2455
|
-
const suffixAddon = /* @__PURE__ */
|
|
2456
|
-
icon != null && /* @__PURE__ */
|
|
2457
|
-
/* @__PURE__ */
|
|
2942
|
+
const suffixAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
|
|
2943
|
+
icon != null && /* @__PURE__ */ jsx35("span", { className: iconWrapperClass, children: icon }),
|
|
2944
|
+
/* @__PURE__ */ jsx35("div", { className: addonTextClass, children: protocolLabel })
|
|
2458
2945
|
] });
|
|
2459
|
-
return /* @__PURE__ */
|
|
2946
|
+
return /* @__PURE__ */ jsx35(
|
|
2460
2947
|
TextInput,
|
|
2461
2948
|
{
|
|
2462
2949
|
...rest,
|
|
@@ -2470,102 +2957,300 @@ var WebsiteInput = (props) => {
|
|
|
2470
2957
|
};
|
|
2471
2958
|
WebsiteInput.displayName = "WebsiteInput";
|
|
2472
2959
|
|
|
2473
|
-
// src/components/
|
|
2474
|
-
import
|
|
2475
|
-
import
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2960
|
+
// src/components/Feedback/Popover.tsx
|
|
2961
|
+
import * as React34 from "react";
|
|
2962
|
+
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
2963
|
+
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2964
|
+
var PopoverArrow = PopoverPrimitive2.Arrow;
|
|
2965
|
+
var Popover2 = (props) => {
|
|
2966
|
+
const {
|
|
2967
|
+
strapline,
|
|
2968
|
+
title,
|
|
2969
|
+
description,
|
|
2970
|
+
onOk,
|
|
2971
|
+
okText,
|
|
2972
|
+
onCancel,
|
|
2973
|
+
cancelText,
|
|
2974
|
+
showArrow = true,
|
|
2975
|
+
className,
|
|
2976
|
+
placement = "bottom",
|
|
2977
|
+
offset = 10,
|
|
2978
|
+
children
|
|
2979
|
+
} = props;
|
|
2980
|
+
const [open, setOpen] = React34.useState(false);
|
|
2981
|
+
const handleCancel = () => {
|
|
2982
|
+
onCancel?.();
|
|
2983
|
+
setOpen(false);
|
|
2984
|
+
};
|
|
2985
|
+
const handleOk = () => {
|
|
2986
|
+
onOk?.();
|
|
2987
|
+
setOpen(false);
|
|
2988
|
+
};
|
|
2989
|
+
const popoverClasses = "bg-(--background-popover) fill-(--background-popover) popover w-80 shadow-card-md border-none [&_span]:scale-240 rounded-4";
|
|
2990
|
+
const mapPlacementToSideAndAlign = (placement2) => {
|
|
2991
|
+
switch (placement2) {
|
|
2992
|
+
case "top":
|
|
2993
|
+
return { side: "top", align: "center" };
|
|
2994
|
+
case "topLeft":
|
|
2995
|
+
return { side: "top", align: "start" };
|
|
2996
|
+
case "topRight":
|
|
2997
|
+
return { side: "top", align: "end" };
|
|
2998
|
+
case "bottom":
|
|
2999
|
+
return { side: "bottom", align: "center" };
|
|
3000
|
+
case "bottomLeft":
|
|
3001
|
+
return { side: "bottom", align: "start" };
|
|
3002
|
+
case "bottomRight":
|
|
3003
|
+
return { side: "bottom", align: "end" };
|
|
3004
|
+
case "left":
|
|
3005
|
+
return { side: "left", align: "center" };
|
|
3006
|
+
case "leftTop":
|
|
3007
|
+
return { side: "left", align: "start" };
|
|
3008
|
+
case "leftBottom":
|
|
3009
|
+
return { side: "left", align: "end" };
|
|
3010
|
+
case "right":
|
|
3011
|
+
return { side: "right", align: "center" };
|
|
3012
|
+
case "rightTop":
|
|
3013
|
+
return { side: "right", align: "start" };
|
|
3014
|
+
case "rightBottom":
|
|
3015
|
+
return { side: "right", align: "end" };
|
|
3016
|
+
default:
|
|
3017
|
+
return { side: "bottom", align: "center" };
|
|
3018
|
+
}
|
|
3019
|
+
};
|
|
3020
|
+
const arrowShadowClass = (side2) => {
|
|
3021
|
+
switch (side2) {
|
|
3022
|
+
case "top":
|
|
3023
|
+
return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
|
|
3024
|
+
case "bottom":
|
|
3025
|
+
return "drop-shadow(0px -1px 1px color-mix(in srgb, var(--color-b-black-10) 66%, transparent))";
|
|
3026
|
+
case "left":
|
|
3027
|
+
case "right":
|
|
3028
|
+
return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
|
|
3029
|
+
default:
|
|
3030
|
+
return "";
|
|
3031
|
+
}
|
|
3032
|
+
};
|
|
3033
|
+
const { side, align } = mapPlacementToSideAndAlign(placement);
|
|
3034
|
+
return /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
|
|
3035
|
+
/* @__PURE__ */ jsx36(PopoverTrigger, { asChild: true, children }),
|
|
3036
|
+
/* @__PURE__ */ jsxs26(
|
|
3037
|
+
PopoverContent,
|
|
3038
|
+
{
|
|
3039
|
+
side,
|
|
3040
|
+
align,
|
|
3041
|
+
sideOffset: offset,
|
|
3042
|
+
className: cn(popoverClasses, side === "top" ? "[&_span]:bottom-1! " : "", className),
|
|
3043
|
+
children: [
|
|
3044
|
+
showArrow && /* @__PURE__ */ jsx36(
|
|
3045
|
+
PopoverArrow,
|
|
3046
|
+
{
|
|
3047
|
+
style: { filter: arrowShadowClass(side) }
|
|
3048
|
+
}
|
|
3049
|
+
),
|
|
3050
|
+
/* @__PURE__ */ jsxs26("div", { className: "grid gap-4", children: [
|
|
3051
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
|
|
3052
|
+
/* @__PURE__ */ jsx36("span", { className: "caption text-secondary", style: { marginBottom: 0 }, children: strapline }),
|
|
3053
|
+
/* @__PURE__ */ jsx36("h4", { className: "subtitle-medium text-primary", style: { marginBottom: 0 }, children: title }),
|
|
3054
|
+
/* @__PURE__ */ jsx36("p", { className: "paragraph-s text-primary", style: { marginBottom: 0 }, children: description })
|
|
3055
|
+
] }),
|
|
3056
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex justify-start items-center gap-4", children: [
|
|
3057
|
+
/* @__PURE__ */ jsx36(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
|
|
3058
|
+
/* @__PURE__ */ jsx36(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
|
|
3059
|
+
] })
|
|
3060
|
+
] })
|
|
3061
|
+
]
|
|
3062
|
+
}
|
|
3063
|
+
)
|
|
3064
|
+
] });
|
|
2502
3065
|
};
|
|
2503
|
-
|
|
3066
|
+
Popover2.displayName = "Popover";
|
|
2504
3067
|
|
|
2505
|
-
// src/components/
|
|
2506
|
-
import
|
|
2507
|
-
import {
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
};
|
|
2511
|
-
var
|
|
3068
|
+
// src/components/Navigation/Breadcrumb.tsx
|
|
3069
|
+
import * as React35 from "react";
|
|
3070
|
+
import { Slot as Slot8 } from "@radix-ui/react-slot";
|
|
3071
|
+
import { cva as cva19 } from "class-variance-authority";
|
|
3072
|
+
import { ChevronRightIcon } from "@bubo-squared/icons";
|
|
3073
|
+
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3074
|
+
var breadcrumbBase = "group inline-flex items-center gap-[var(--space-8)] pl-0 pr-[var(--space-8)] py-[6px] rounded-full transition-colors select-none disabled:cursor-default disabled:pointer-events-none";
|
|
3075
|
+
var breadcrumbIconVariants = cva19(
|
|
3076
|
+
"flex shrink-0 items-center justify-center w-5 h-5 *:w-5 *:h-5",
|
|
3077
|
+
{
|
|
3078
|
+
variants: {
|
|
3079
|
+
variant: {
|
|
3080
|
+
colored: "text-(--icon-brand) group-hover:text-(--icon-brand-hover) group-focus-visible:text-(--icon-brand-focus) group-disabled:text-(--icon-brand-disabled)",
|
|
3081
|
+
flat: "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-visible:text-(--icon-primary-focus) group-disabled:text-(--icon-primary-disabled)"
|
|
3082
|
+
}
|
|
3083
|
+
},
|
|
3084
|
+
defaultVariants: {
|
|
3085
|
+
variant: "flat"
|
|
3086
|
+
}
|
|
3087
|
+
}
|
|
3088
|
+
);
|
|
3089
|
+
var breadcrumbTextVariants = cva19(
|
|
3090
|
+
"font-normal text-[length:var(--font-size-paragraph-l-18)] leading-[var(--font-line-height-28)] tracking-[var(--font-letter-spacing-02)] whitespace-nowrap",
|
|
3091
|
+
{
|
|
3092
|
+
variants: {
|
|
3093
|
+
variant: {
|
|
3094
|
+
colored: "text-(--text-brand) group-hover:text-(--text-brand-hover) group-focus-visible:text-(--text-brand-focus) group-disabled:text-(--text-brand-disabled)",
|
|
3095
|
+
flat: "text-(--text-primary) group-hover:text-(--text-primary-hover) group-focus-visible:text-(--text-primary-focus) group-disabled:text-(--text-primary-disabled)"
|
|
3096
|
+
}
|
|
3097
|
+
},
|
|
3098
|
+
defaultVariants: {
|
|
3099
|
+
variant: "flat"
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
);
|
|
3103
|
+
var Breadcrumb = React35.forwardRef((props, ref) => {
|
|
3104
|
+
const {
|
|
3105
|
+
asChild = false,
|
|
3106
|
+
variant = "flat",
|
|
3107
|
+
label = "Header",
|
|
3108
|
+
showIcon = true,
|
|
3109
|
+
showText = true,
|
|
3110
|
+
icon,
|
|
3111
|
+
className,
|
|
3112
|
+
children,
|
|
3113
|
+
...rest
|
|
3114
|
+
} = props;
|
|
3115
|
+
const Comp = asChild ? Slot8 : "button";
|
|
3116
|
+
const content = showText ? children ?? label : null;
|
|
3117
|
+
return /* @__PURE__ */ jsxs27(
|
|
3118
|
+
Comp,
|
|
3119
|
+
{
|
|
3120
|
+
type: asChild ? void 0 : "button",
|
|
3121
|
+
className: cn(breadcrumbBase, className),
|
|
3122
|
+
ref,
|
|
3123
|
+
...rest,
|
|
3124
|
+
children: [
|
|
3125
|
+
showIcon && /* @__PURE__ */ jsx37("span", { className: cn(breadcrumbIconVariants({ variant })), children: icon ?? /* @__PURE__ */ jsx37(ChevronRightIcon, {}) }),
|
|
3126
|
+
content && /* @__PURE__ */ jsx37("span", { className: cn(breadcrumbTextVariants({ variant })), children: content })
|
|
3127
|
+
]
|
|
3128
|
+
}
|
|
3129
|
+
);
|
|
3130
|
+
});
|
|
3131
|
+
Breadcrumb.displayName = "Breadcrumb";
|
|
2512
3132
|
|
|
2513
|
-
// src/components/Logo/
|
|
2514
|
-
import {
|
|
2515
|
-
import { jsx as
|
|
2516
|
-
var
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
3133
|
+
// src/components/Logo/LogoIcon.tsx
|
|
3134
|
+
import { cva as cva20 } from "class-variance-authority";
|
|
3135
|
+
import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3136
|
+
var LogoIconSvg = (props) => /* @__PURE__ */ jsxs28("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3137
|
+
/* @__PURE__ */ jsx38("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
3138
|
+
/* @__PURE__ */ jsx38("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
3139
|
+
/* @__PURE__ */ jsx38("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
3140
|
+
/* @__PURE__ */ jsx38("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
3141
|
+
/* @__PURE__ */ jsx38("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3142
|
+
] });
|
|
3143
|
+
var logoIconVariants = cva20(
|
|
3144
|
+
"relative bg-linear-to-t from-gray-800 to-gray-950 overflow-hidden flex justify-center items-center",
|
|
3145
|
+
{
|
|
3146
|
+
variants: {
|
|
3147
|
+
size: {
|
|
3148
|
+
xs: ["size-8", "rounded-[5px]"],
|
|
3149
|
+
sm: ["size-14", "rounded-8"],
|
|
3150
|
+
md: ["size-32", "rounded-20"],
|
|
3151
|
+
lg: ["size-64", "rounded-40"],
|
|
3152
|
+
xl: ["size-128", "rounded-80"]
|
|
3153
|
+
}
|
|
3154
|
+
},
|
|
3155
|
+
defaultVariants: {
|
|
3156
|
+
size: "md"
|
|
3157
|
+
}
|
|
3158
|
+
}
|
|
3159
|
+
);
|
|
3160
|
+
var logoIconSizeClass = {
|
|
3161
|
+
xs: "size-6",
|
|
3162
|
+
sm: "size-10",
|
|
3163
|
+
md: "size-24",
|
|
3164
|
+
lg: "size-44",
|
|
3165
|
+
xl: "size-96"
|
|
2521
3166
|
};
|
|
2522
|
-
var
|
|
2523
|
-
|
|
2524
|
-
// src/components/Logo/LogoInlineSmall.tsx
|
|
2525
|
-
import { LogoIconMIcon as LogoIconMIcon6, LogoTextMIcon as LogoTextMIcon2 } from "@bubo-squared/icons";
|
|
2526
|
-
import { jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2527
|
-
var LogoInline2 = () => {
|
|
2528
|
-
return /* @__PURE__ */ jsxs23("div", { className: "w-32 h-9 inline-flex justify-start items-center gap-3", children: [
|
|
2529
|
-
/* @__PURE__ */ jsx36(LogoIconMIcon6, { className: "size-9" }),
|
|
2530
|
-
/* @__PURE__ */ jsx36(LogoTextMIcon2, { className: "h-6 w-[83px] text-(--text-primary)" })
|
|
2531
|
-
] });
|
|
3167
|
+
var LogoIcon = ({ className, size = "md" }) => {
|
|
3168
|
+
return /* @__PURE__ */ jsx38("div", { className: cn(logoIconVariants({ size }), className), children: /* @__PURE__ */ jsx38(LogoIconSvg, { className: logoIconSizeClass[size] }) });
|
|
2532
3169
|
};
|
|
2533
|
-
var LogoInlineSmall_default = LogoInline2;
|
|
2534
3170
|
|
|
2535
|
-
// src/components/Logo/
|
|
2536
|
-
import {
|
|
2537
|
-
import { jsx as
|
|
2538
|
-
var
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
3171
|
+
// src/components/Logo/Logo.tsx
|
|
3172
|
+
import { cva as cva21 } from "class-variance-authority";
|
|
3173
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3174
|
+
var LogoIconSvg2 = (props) => /* @__PURE__ */ jsxs29("svg", { width: "89", height: "88", viewBox: "0 0 89 88", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3175
|
+
/* @__PURE__ */ jsx39("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M83.7156 3.88535C78.5352 -1.29512 70.136 -1.29512 64.9555 3.88535L43.9999 24.8409L43.9995 24.8405L62.3536 6.48637C52.2379 16.5949 35.8584 16.6179 25.7142 6.55523L23.4434 4.28438C18.2629 -0.896082 9.86373 -0.89608 4.68327 4.28438C-0.497191 9.46484 -0.49719 17.864 4.68327 23.0445L6.88526 25.2465C17.0191 35.3875 17.0168 51.8235 6.87859 61.9618L25.2395 43.6008L25.2398 43.601L3.88534 64.9555C-1.29512 70.136 -1.29511 78.5351 3.88535 83.7156C9.06581 88.8961 17.465 88.8961 22.6455 83.7156L25.6458 80.7151L25.6864 80.6747C35.7981 70.6137 52.1313 70.597 62.2636 80.6248L65.7534 84.1146C70.9339 89.2951 79.3331 89.2951 84.5135 84.1146C89.694 78.9342 89.694 70.535 84.5135 65.3545L62.76 43.601L62.7602 43.6009L81.1144 61.9552C70.9806 51.8142 70.9829 35.3782 81.1211 25.24L83.7156 22.6455C88.8961 17.465 88.8961 9.06581 83.7156 3.88535Z", fill: "#1685FF" }),
|
|
3176
|
+
/* @__PURE__ */ jsx39("path", { d: "M44.0667 50.4863C44.1213 50.4317 44.21 50.4317 44.2646 50.4863L48.6465 54.8682C48.6942 54.9158 48.7011 54.9907 48.663 55.0463L44.2812 61.4453C44.2256 61.5265 44.1057 61.5265 44.0501 61.4453L39.6683 55.0463C39.6302 54.9907 39.6371 54.9158 39.6848 54.8682L44.0667 50.4863Z", fill: "white" }),
|
|
3177
|
+
/* @__PURE__ */ jsx39("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M44.107 45.3938C44.0536 45.289 43.9013 45.289 43.8479 45.3938C41.8622 49.293 37.8104 51.9638 33.1347 51.9638C26.4991 51.9638 21.1199 46.5846 21.1199 39.9489C21.1199 33.3133 26.4991 27.9341 33.1347 27.9341C37.8104 27.9341 41.8622 30.6049 43.8479 34.5041C43.9013 34.6089 44.0536 34.6089 44.107 34.5041C46.0926 30.6049 50.1445 27.9341 54.8201 27.9341C61.4558 27.9341 66.835 33.3133 66.835 39.9489C66.835 46.5846 61.4558 51.9638 54.8201 51.9638C50.1445 51.9638 46.0926 49.293 44.107 45.3938Z", fill: "white" }),
|
|
3178
|
+
/* @__PURE__ */ jsx39("path", { d: "M60.1113 40.0006C60.1113 43.052 57.6377 45.5256 54.5863 45.5256C51.535 45.5256 49.0614 43.052 49.0614 40.0006C49.0614 36.9493 51.535 34.4757 54.5863 34.4757C57.6377 34.4757 60.1113 36.9493 60.1113 40.0006Z", fill: "#1685FF" }),
|
|
3179
|
+
/* @__PURE__ */ jsx39("path", { d: "M38.8954 40.0006C38.8954 43.052 36.4218 45.5256 33.3705 45.5256C30.3192 45.5256 27.8456 43.052 27.8456 40.0006C27.8456 36.9493 30.3192 34.4757 33.3705 34.4757C36.4218 34.4757 38.8954 36.9493 38.8954 40.0006Z", fill: "#1685FF" })
|
|
3180
|
+
] });
|
|
3181
|
+
var LogoTextSvg = (props) => /* @__PURE__ */ jsxs29("svg", { width: "111", height: "32", viewBox: "0 0 111 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
|
|
3182
|
+
/* @__PURE__ */ jsx39("path", { d: "M72.7324 20.9658C72.7324 14.4559 77.4246 9.9751 83.8922 9.9751C90.3598 9.9751 95.052 14.4559 95.052 20.9658C95.052 27.4757 90.3598 31.9565 83.8922 31.9565C77.4246 31.9565 72.7324 27.4757 72.7324 20.9658ZM77.8896 20.9658C77.8896 24.7703 80.3414 27.3489 83.8922 27.3489C87.4431 27.3489 89.8948 24.7703 89.8948 20.9658C89.8948 17.1613 87.4431 14.5827 83.8922 14.5827C80.3414 14.5827 77.8896 17.1613 77.8896 20.9658Z", fill: "currentColor" }),
|
|
3183
|
+
/* @__PURE__ */ jsx39("path", { d: "M53.4056 31.4503H48.6289V0H53.7861V13.6116C55.1388 11.2866 57.9287 9.89163 61.0991 9.89163C67.0595 9.89163 70.6949 14.5415 70.6949 21.136C70.6949 27.5613 66.7636 31.9998 60.761 31.9998C57.6328 31.9998 54.9697 30.6049 53.7438 28.1954L53.4056 31.4503ZM53.8284 20.9246C53.8284 24.6868 56.1533 27.2654 59.7042 27.2654C63.3395 27.2654 65.4954 24.6445 65.4954 20.9246C65.4954 17.2047 63.3395 14.5415 59.7042 14.5415C56.1533 14.5415 53.8284 17.1624 53.8284 20.9246Z", fill: "currentColor" }),
|
|
3184
|
+
/* @__PURE__ */ jsx39("path", { d: "M38.9929 10.5681H44.15V31.4504H39.3733L38.9929 28.6605C37.7247 30.6473 35.0193 32 32.2293 32C27.4103 32 24.5781 28.745 24.5781 23.6301V10.5681H29.7353V21.8124C29.7353 25.786 31.2994 27.3923 34.1739 27.3923C37.4288 27.3923 38.9929 25.4901 38.9929 21.5165V10.5681Z", fill: "currentColor" }),
|
|
3185
|
+
/* @__PURE__ */ jsx39("path", { d: "M4.77673 31.4503H0V0H5.15718V13.6116C6.50988 11.2866 9.29983 9.89163 12.4702 9.89163C18.4306 9.89163 22.066 14.5415 22.066 21.136C22.066 27.5613 18.1347 31.9998 12.132 31.9998C9.00392 31.9998 6.34079 30.6049 5.1149 28.1954L4.77673 31.4503ZM5.19945 20.9246C5.19945 24.6868 7.52441 27.2654 11.0752 27.2654C14.7106 27.2654 16.8665 24.6445 16.8665 20.9246C16.8665 17.2047 14.7106 14.5415 11.0752 14.5415C7.52441 14.5415 5.19945 17.1624 5.19945 20.9246Z", fill: "currentColor" }),
|
|
3186
|
+
/* @__PURE__ */ jsx39("path", { d: "M103.555 0.5C107.084 0.5 109.944 3.36029 109.944 6.88867C109.944 10.4172 107.084 13.2773 103.555 13.2773C100.027 13.2772 97.1667 10.4171 97.1667 6.88867C97.1669 3.36036 100.027 0.500118 103.555 0.5Z", stroke: "currentColor" }),
|
|
3187
|
+
/* @__PURE__ */ jsx39("path", { d: "M105.778 9.98355L101.687 10.0001V9.00978L103.578 7.33457C104.19 6.79817 104.445 6.41856 104.445 5.91517C104.445 5.29625 104.159 4.96616 103.647 4.96616C103.113 4.96616 102.803 5.35402 102.803 6.03896H101.556C101.556 4.66908 102.377 3.77783 103.64 3.77783C104.949 3.77783 105.731 4.52879 105.731 5.83265C105.731 6.66613 105.259 7.34282 104.546 7.97825L103.686 8.74571H105.778V9.98355Z", fill: "currentColor" })
|
|
3188
|
+
] });
|
|
3189
|
+
var logoWrapperVariants = cva21("inline-flex", {
|
|
3190
|
+
variants: {
|
|
3191
|
+
variant: {
|
|
3192
|
+
inline: ["w-44", "h-12", "justify-start", "items-center", "gap-4"],
|
|
3193
|
+
inlineSmall: ["w-32", "h-9", "justify-start", "items-center", "gap-3"],
|
|
3194
|
+
multiline: ["w-36", "flex-col", "justify-start", "items-start", "gap-2"]
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3197
|
+
defaultVariants: {
|
|
3198
|
+
variant: "inline"
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3201
|
+
var logoIconSizeVariants = cva21("", {
|
|
3202
|
+
variants: {
|
|
3203
|
+
variant: {
|
|
3204
|
+
inline: "size-12",
|
|
3205
|
+
inlineSmall: "size-9",
|
|
3206
|
+
multiline: "size-12"
|
|
3207
|
+
}
|
|
3208
|
+
},
|
|
3209
|
+
defaultVariants: {
|
|
3210
|
+
variant: "inline"
|
|
3211
|
+
}
|
|
3212
|
+
});
|
|
3213
|
+
var logoTextSizeVariants = cva21("", {
|
|
3214
|
+
variants: {
|
|
3215
|
+
variant: {
|
|
3216
|
+
inline: "h-8 w-27.5",
|
|
3217
|
+
inlineSmall: "h-6 w-20.75",
|
|
3218
|
+
multiline: "h-8 w-27.75"
|
|
3219
|
+
}
|
|
3220
|
+
},
|
|
3221
|
+
defaultVariants: {
|
|
3222
|
+
variant: "inline"
|
|
3223
|
+
}
|
|
3224
|
+
});
|
|
3225
|
+
var Logo = ({ className, textColor, variant = "inline" }) => {
|
|
3226
|
+
const textColorClass = textColor === "light" ? "text-(--color-b-white)" : textColor === "dark" ? "text-(--color-b-black)" : "text-(--text-primary)";
|
|
3227
|
+
return /* @__PURE__ */ jsxs29("div", { className: cn(logoWrapperVariants({ variant }), className), children: [
|
|
3228
|
+
/* @__PURE__ */ jsx39(LogoIconSvg2, { className: logoIconSizeVariants({ variant }) }),
|
|
3229
|
+
/* @__PURE__ */ jsx39(LogoTextSvg, { className: cn(logoTextSizeVariants({ variant }), textColorClass) })
|
|
2542
3230
|
] });
|
|
2543
3231
|
};
|
|
2544
|
-
var LogoMultiline_default = LogoMultiline;
|
|
2545
3232
|
export {
|
|
2546
3233
|
Avatar,
|
|
2547
3234
|
Badge,
|
|
2548
3235
|
BadgeDigit,
|
|
2549
3236
|
BadgeDot,
|
|
2550
3237
|
BadgeStatus,
|
|
3238
|
+
Breadcrumb,
|
|
2551
3239
|
Button,
|
|
2552
3240
|
ButtonGroup,
|
|
2553
3241
|
Checkbox,
|
|
2554
3242
|
Divider,
|
|
2555
3243
|
Dropdown,
|
|
3244
|
+
Field,
|
|
2556
3245
|
IconButton,
|
|
2557
3246
|
IconButtonGroup,
|
|
2558
3247
|
LinkButton,
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
LogoIconLarge_default as LogoIconLarge,
|
|
2562
|
-
LogoIconMedium_default as LogoIconMedium,
|
|
2563
|
-
LogoIconSmall_default as LogoIconSmall,
|
|
2564
|
-
LogoInline_default as LogoInline,
|
|
2565
|
-
LogoInlineSmall_default as LogoInlineSmall,
|
|
2566
|
-
LogoMultiline_default as LogoMultiline,
|
|
3248
|
+
Logo,
|
|
3249
|
+
LogoIcon,
|
|
2567
3250
|
MessageButton,
|
|
2568
3251
|
PasswordInput,
|
|
3252
|
+
PhoneInput,
|
|
3253
|
+
Popover2 as Popover,
|
|
2569
3254
|
Progress,
|
|
2570
3255
|
RadioGroup,
|
|
2571
3256
|
SearchInput,
|