@parto-system-design/ui 1.0.3 → 1.0.5
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 +865 -628
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +65 -3
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +847 -614
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -167,6 +167,7 @@ __export(index_exports, {
|
|
|
167
167
|
FormItem: () => FormItem,
|
|
168
168
|
FormLabel: () => FormLabel,
|
|
169
169
|
FormMessage: () => FormMessage,
|
|
170
|
+
HashtagInput: () => HashtagInput,
|
|
170
171
|
HoverCard: () => HoverCard,
|
|
171
172
|
HoverCardContent: () => HoverCardContent,
|
|
172
173
|
HoverCardTrigger: () => HoverCardTrigger,
|
|
@@ -315,6 +316,7 @@ __export(index_exports, {
|
|
|
315
316
|
TabsContent: () => TabsContent,
|
|
316
317
|
TabsList: () => TabsList,
|
|
317
318
|
TabsTrigger: () => TabsTrigger,
|
|
319
|
+
TagInput: () => TagInput,
|
|
318
320
|
Textarea: () => Textarea,
|
|
319
321
|
Toaster: () => Toaster,
|
|
320
322
|
Toggle: () => Toggle,
|
|
@@ -342,9 +344,11 @@ __export(index_exports, {
|
|
|
342
344
|
getPersianWeekdayName: () => getPersianWeekdayName,
|
|
343
345
|
getPersianYear: () => getPersianYear,
|
|
344
346
|
getPersianYearsForDropdown: () => getPersianYearsForDropdown,
|
|
347
|
+
hashtagInputVariants: () => hashtagInputVariants,
|
|
345
348
|
instagramPostVariants: () => instagramPostVariants,
|
|
346
349
|
jalaliToGregorian: () => jalaliToGregorian,
|
|
347
350
|
navigationMenuTriggerStyle: () => navigationMenuTriggerStyle,
|
|
351
|
+
tagInputVariants: () => tagInputVariants,
|
|
348
352
|
toEnglishDigits: () => toEnglishDigits,
|
|
349
353
|
toPersianDigits: () => toPersianDigits,
|
|
350
354
|
toast: () => import_sonner2.toast,
|
|
@@ -4313,14 +4317,271 @@ function HoverCardContent({
|
|
|
4313
4317
|
) });
|
|
4314
4318
|
}
|
|
4315
4319
|
|
|
4316
|
-
// src/components/ui/input
|
|
4320
|
+
// src/components/ui/tag-input.tsx
|
|
4317
4321
|
var React14 = __toESM(require("react"), 1);
|
|
4322
|
+
var import_lucide_react15 = require("lucide-react");
|
|
4318
4323
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
4324
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
4325
|
+
var tagInputVariants = (0, import_class_variance_authority7.cva)(
|
|
4326
|
+
"flex min-h-[38px] w-full flex-wrap gap-2 rounded-md border border-control bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4327
|
+
{
|
|
4328
|
+
variants: {
|
|
4329
|
+
variant: {
|
|
4330
|
+
default: "bg-background",
|
|
4331
|
+
secondary: "bg-secondary"
|
|
4332
|
+
}
|
|
4333
|
+
},
|
|
4334
|
+
defaultVariants: {
|
|
4335
|
+
variant: "default"
|
|
4336
|
+
}
|
|
4337
|
+
}
|
|
4338
|
+
);
|
|
4339
|
+
var TagInput = React14.forwardRef(
|
|
4340
|
+
({
|
|
4341
|
+
className,
|
|
4342
|
+
variant,
|
|
4343
|
+
value: controlledValue,
|
|
4344
|
+
defaultValue,
|
|
4345
|
+
onChange,
|
|
4346
|
+
placeholder,
|
|
4347
|
+
disabled,
|
|
4348
|
+
maxTags,
|
|
4349
|
+
...props
|
|
4350
|
+
}, ref) => {
|
|
4351
|
+
const [value, setValue] = React14.useState(
|
|
4352
|
+
controlledValue || defaultValue || []
|
|
4353
|
+
);
|
|
4354
|
+
const [inputValue, setInputValue] = React14.useState("");
|
|
4355
|
+
const inputRef = React14.useRef(null);
|
|
4356
|
+
React14.useEffect(() => {
|
|
4357
|
+
if (controlledValue !== void 0) {
|
|
4358
|
+
setValue(controlledValue);
|
|
4359
|
+
}
|
|
4360
|
+
}, [controlledValue]);
|
|
4361
|
+
const handleKeyDown = (e) => {
|
|
4362
|
+
if (e.key === "Enter") {
|
|
4363
|
+
e.preventDefault();
|
|
4364
|
+
const newTag = inputValue.trim();
|
|
4365
|
+
if (newTag && !value.includes(newTag)) {
|
|
4366
|
+
if (maxTags && value.length >= maxTags) return;
|
|
4367
|
+
const newValue = [...value, newTag];
|
|
4368
|
+
if (controlledValue === void 0) {
|
|
4369
|
+
setValue(newValue);
|
|
4370
|
+
}
|
|
4371
|
+
onChange?.(newValue);
|
|
4372
|
+
setInputValue("");
|
|
4373
|
+
}
|
|
4374
|
+
} else if (e.key === "Backspace" && !inputValue && value.length > 0) {
|
|
4375
|
+
const newValue = value.slice(0, -1);
|
|
4376
|
+
if (controlledValue === void 0) {
|
|
4377
|
+
setValue(newValue);
|
|
4378
|
+
}
|
|
4379
|
+
onChange?.(newValue);
|
|
4380
|
+
}
|
|
4381
|
+
};
|
|
4382
|
+
const removeTag = (tagToRemove) => {
|
|
4383
|
+
const newValue = value.filter((tag) => tag !== tagToRemove);
|
|
4384
|
+
if (controlledValue === void 0) {
|
|
4385
|
+
setValue(newValue);
|
|
4386
|
+
}
|
|
4387
|
+
onChange?.(newValue);
|
|
4388
|
+
inputRef.current?.focus();
|
|
4389
|
+
};
|
|
4390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4391
|
+
"div",
|
|
4392
|
+
{
|
|
4393
|
+
ref,
|
|
4394
|
+
className: cn(tagInputVariants({ variant }), className),
|
|
4395
|
+
onClick: () => inputRef.current?.focus(),
|
|
4396
|
+
...props,
|
|
4397
|
+
children: [
|
|
4398
|
+
value.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4399
|
+
Badge,
|
|
4400
|
+
{
|
|
4401
|
+
variant: "secondary",
|
|
4402
|
+
className: "gap-1 pe-1 ps-2 h-7 hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4403
|
+
children: [
|
|
4404
|
+
tag,
|
|
4405
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
4406
|
+
"button",
|
|
4407
|
+
{
|
|
4408
|
+
type: "button",
|
|
4409
|
+
onClick: (e) => {
|
|
4410
|
+
e.stopPropagation();
|
|
4411
|
+
removeTag(tag);
|
|
4412
|
+
},
|
|
4413
|
+
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4414
|
+
disabled,
|
|
4415
|
+
children: [
|
|
4416
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react15.X, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4417
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "sr-only", children: [
|
|
4418
|
+
"Remove ",
|
|
4419
|
+
tag
|
|
4420
|
+
] })
|
|
4421
|
+
]
|
|
4422
|
+
}
|
|
4423
|
+
)
|
|
4424
|
+
]
|
|
4425
|
+
},
|
|
4426
|
+
tag
|
|
4427
|
+
)),
|
|
4428
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
4429
|
+
"input",
|
|
4430
|
+
{
|
|
4431
|
+
ref: inputRef,
|
|
4432
|
+
type: "text",
|
|
4433
|
+
value: inputValue,
|
|
4434
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
4435
|
+
onKeyDown: handleKeyDown,
|
|
4436
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground min-w-[120px] text-sm h-7",
|
|
4437
|
+
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4438
|
+
disabled
|
|
4439
|
+
}
|
|
4440
|
+
)
|
|
4441
|
+
]
|
|
4442
|
+
}
|
|
4443
|
+
);
|
|
4444
|
+
}
|
|
4445
|
+
);
|
|
4446
|
+
TagInput.displayName = "TagInput";
|
|
4447
|
+
|
|
4448
|
+
// src/components/ui/hashtag-input.tsx
|
|
4449
|
+
var React15 = __toESM(require("react"), 1);
|
|
4450
|
+
var import_lucide_react16 = require("lucide-react");
|
|
4451
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
4452
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
4453
|
+
var hashtagInputVariants = (0, import_class_variance_authority8.cva)(
|
|
4454
|
+
"flex min-h-[38px] w-full flex-wrap gap-2 rounded-md border border-control bg-background px-3 py-2 text-sm ring-offset-background focus-within:ring-2 focus-within:ring-background-control focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
4455
|
+
{
|
|
4456
|
+
variants: {
|
|
4457
|
+
variant: {
|
|
4458
|
+
default: "bg-background",
|
|
4459
|
+
secondary: "bg-secondary"
|
|
4460
|
+
}
|
|
4461
|
+
},
|
|
4462
|
+
defaultVariants: {
|
|
4463
|
+
variant: "default"
|
|
4464
|
+
}
|
|
4465
|
+
}
|
|
4466
|
+
);
|
|
4467
|
+
var HashtagInput = React15.forwardRef(
|
|
4468
|
+
({
|
|
4469
|
+
className,
|
|
4470
|
+
variant,
|
|
4471
|
+
value: controlledValue,
|
|
4472
|
+
defaultValue,
|
|
4473
|
+
onChange,
|
|
4474
|
+
placeholder,
|
|
4475
|
+
disabled,
|
|
4476
|
+
maxTags,
|
|
4477
|
+
...props
|
|
4478
|
+
}, ref) => {
|
|
4479
|
+
const [value, setValue] = React15.useState(
|
|
4480
|
+
controlledValue || defaultValue || []
|
|
4481
|
+
);
|
|
4482
|
+
const [inputValue, setInputValue] = React15.useState("");
|
|
4483
|
+
const inputRef = React15.useRef(null);
|
|
4484
|
+
React15.useEffect(() => {
|
|
4485
|
+
if (controlledValue !== void 0) {
|
|
4486
|
+
setValue(controlledValue);
|
|
4487
|
+
}
|
|
4488
|
+
}, [controlledValue]);
|
|
4489
|
+
const handleKeyDown = (e) => {
|
|
4490
|
+
if (e.key === "Enter") {
|
|
4491
|
+
e.preventDefault();
|
|
4492
|
+
const rawTag = inputValue.trim().replace(/^#/, "");
|
|
4493
|
+
if (rawTag && !value.includes(rawTag)) {
|
|
4494
|
+
if (maxTags && value.length >= maxTags) return;
|
|
4495
|
+
const newValue = [...value, rawTag];
|
|
4496
|
+
if (controlledValue === void 0) {
|
|
4497
|
+
setValue(newValue);
|
|
4498
|
+
}
|
|
4499
|
+
onChange?.(newValue);
|
|
4500
|
+
setInputValue("");
|
|
4501
|
+
}
|
|
4502
|
+
} else if (e.key === "Backspace" && !inputValue && value.length > 0) {
|
|
4503
|
+
const newValue = value.slice(0, -1);
|
|
4504
|
+
if (controlledValue === void 0) {
|
|
4505
|
+
setValue(newValue);
|
|
4506
|
+
}
|
|
4507
|
+
onChange?.(newValue);
|
|
4508
|
+
}
|
|
4509
|
+
};
|
|
4510
|
+
const removeTag = (tagToRemove) => {
|
|
4511
|
+
const newValue = value.filter((tag) => tag !== tagToRemove);
|
|
4512
|
+
if (controlledValue === void 0) {
|
|
4513
|
+
setValue(newValue);
|
|
4514
|
+
}
|
|
4515
|
+
onChange?.(newValue);
|
|
4516
|
+
inputRef.current?.focus();
|
|
4517
|
+
};
|
|
4518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4519
|
+
"div",
|
|
4520
|
+
{
|
|
4521
|
+
ref,
|
|
4522
|
+
className: cn(hashtagInputVariants({ variant }), className),
|
|
4523
|
+
onClick: () => inputRef.current?.focus(),
|
|
4524
|
+
...props,
|
|
4525
|
+
children: [
|
|
4526
|
+
value.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4527
|
+
Badge,
|
|
4528
|
+
{
|
|
4529
|
+
variant: "secondary",
|
|
4530
|
+
className: "gap-1 pe-1 ps-2 h-7 hover:!bg-primary/20 hover:!text-primary transition-colors [&:hover_svg]:!text-primary",
|
|
4531
|
+
children: [
|
|
4532
|
+
"#",
|
|
4533
|
+
tag,
|
|
4534
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
4535
|
+
"button",
|
|
4536
|
+
{
|
|
4537
|
+
type: "button",
|
|
4538
|
+
onClick: (e) => {
|
|
4539
|
+
e.stopPropagation();
|
|
4540
|
+
removeTag(tag);
|
|
4541
|
+
},
|
|
4542
|
+
className: "rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:!bg-primary/20 transition-colors",
|
|
4543
|
+
disabled,
|
|
4544
|
+
children: [
|
|
4545
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react16.X, { className: "h-3 w-3 text-muted-foreground" }),
|
|
4546
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "sr-only", children: [
|
|
4547
|
+
"Remove ",
|
|
4548
|
+
tag
|
|
4549
|
+
] })
|
|
4550
|
+
]
|
|
4551
|
+
}
|
|
4552
|
+
)
|
|
4553
|
+
]
|
|
4554
|
+
},
|
|
4555
|
+
tag
|
|
4556
|
+
)),
|
|
4557
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
4558
|
+
"input",
|
|
4559
|
+
{
|
|
4560
|
+
ref: inputRef,
|
|
4561
|
+
type: "text",
|
|
4562
|
+
value: inputValue,
|
|
4563
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
4564
|
+
onKeyDown: handleKeyDown,
|
|
4565
|
+
className: "flex-1 bg-transparent outline-none placeholder:text-muted-foreground min-w-[120px] text-sm h-7",
|
|
4566
|
+
placeholder: value.length === 0 ? placeholder : void 0,
|
|
4567
|
+
disabled
|
|
4568
|
+
}
|
|
4569
|
+
)
|
|
4570
|
+
]
|
|
4571
|
+
}
|
|
4572
|
+
);
|
|
4573
|
+
}
|
|
4574
|
+
);
|
|
4575
|
+
HashtagInput.displayName = "HashtagInput";
|
|
4576
|
+
|
|
4577
|
+
// src/components/ui/input-group.tsx
|
|
4578
|
+
var React16 = __toESM(require("react"), 1);
|
|
4579
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
4319
4580
|
|
|
4320
4581
|
// src/components/ui/textarea.tsx
|
|
4321
|
-
var
|
|
4582
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
4322
4583
|
function Textarea({ className, ...props }) {
|
|
4323
|
-
return /* @__PURE__ */ (0,
|
|
4584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
4324
4585
|
"textarea",
|
|
4325
4586
|
{
|
|
4326
4587
|
"data-slot": "textarea",
|
|
@@ -4343,14 +4604,14 @@ function Textarea({ className, ...props }) {
|
|
|
4343
4604
|
}
|
|
4344
4605
|
|
|
4345
4606
|
// src/components/ui/input-group.tsx
|
|
4346
|
-
var
|
|
4347
|
-
var InputGroupContext =
|
|
4607
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4608
|
+
var InputGroupContext = React16.createContext({});
|
|
4348
4609
|
function useInputGroup() {
|
|
4349
|
-
return
|
|
4610
|
+
return React16.useContext(InputGroupContext);
|
|
4350
4611
|
}
|
|
4351
4612
|
function InputGroup({ className, dir, ...props }) {
|
|
4352
|
-
const contextValue =
|
|
4353
|
-
return /* @__PURE__ */ (0,
|
|
4613
|
+
const contextValue = React16.useMemo(() => ({ dir }), [dir]);
|
|
4614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(InputGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4354
4615
|
"div",
|
|
4355
4616
|
{
|
|
4356
4617
|
"data-slot": "input-group",
|
|
@@ -4375,7 +4636,7 @@ function InputGroup({ className, dir, ...props }) {
|
|
|
4375
4636
|
}
|
|
4376
4637
|
) });
|
|
4377
4638
|
}
|
|
4378
|
-
var inputGroupAddonVariants = (0,
|
|
4639
|
+
var inputGroupAddonVariants = (0, import_class_variance_authority9.cva)(
|
|
4379
4640
|
"text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50",
|
|
4380
4641
|
{
|
|
4381
4642
|
variants: {
|
|
@@ -4396,7 +4657,7 @@ function InputGroupAddon({
|
|
|
4396
4657
|
align = "inline-start",
|
|
4397
4658
|
...props
|
|
4398
4659
|
}) {
|
|
4399
|
-
return /* @__PURE__ */ (0,
|
|
4660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4400
4661
|
"div",
|
|
4401
4662
|
{
|
|
4402
4663
|
role: "group",
|
|
@@ -4413,7 +4674,7 @@ function InputGroupAddon({
|
|
|
4413
4674
|
}
|
|
4414
4675
|
);
|
|
4415
4676
|
}
|
|
4416
|
-
var inputGroupButtonVariants = (0,
|
|
4677
|
+
var inputGroupButtonVariants = (0, import_class_variance_authority9.cva)(
|
|
4417
4678
|
"text-sm shadow-none flex gap-2 items-center",
|
|
4418
4679
|
{
|
|
4419
4680
|
variants: {
|
|
@@ -4436,7 +4697,7 @@ function InputGroupButton({
|
|
|
4436
4697
|
size = "xs",
|
|
4437
4698
|
...props
|
|
4438
4699
|
}) {
|
|
4439
|
-
return /* @__PURE__ */ (0,
|
|
4700
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4440
4701
|
Button,
|
|
4441
4702
|
{
|
|
4442
4703
|
type,
|
|
@@ -4448,7 +4709,7 @@ function InputGroupButton({
|
|
|
4448
4709
|
);
|
|
4449
4710
|
}
|
|
4450
4711
|
function InputGroupText({ className, ...props }) {
|
|
4451
|
-
return /* @__PURE__ */ (0,
|
|
4712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4452
4713
|
"span",
|
|
4453
4714
|
{
|
|
4454
4715
|
className: cn(
|
|
@@ -4469,7 +4730,7 @@ function InputGroupInput({
|
|
|
4469
4730
|
const { dir: contextDir } = useInputGroup();
|
|
4470
4731
|
const isLTRType = type === "url" || type === "email" || type === "tel" || type === "number" || props.inputMode === "numeric";
|
|
4471
4732
|
const dir = dirProp ?? contextDir ?? (isLTRType ? "ltr" : void 0);
|
|
4472
|
-
return /* @__PURE__ */ (0,
|
|
4733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4473
4734
|
Input,
|
|
4474
4735
|
{
|
|
4475
4736
|
"data-slot": "input-group-control",
|
|
@@ -4490,7 +4751,7 @@ function InputGroupTextarea({
|
|
|
4490
4751
|
className,
|
|
4491
4752
|
...props
|
|
4492
4753
|
}) {
|
|
4493
|
-
return /* @__PURE__ */ (0,
|
|
4754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4494
4755
|
Textarea,
|
|
4495
4756
|
{
|
|
4496
4757
|
"data-slot": "input-group-control",
|
|
@@ -4504,17 +4765,17 @@ function InputGroupTextarea({
|
|
|
4504
4765
|
}
|
|
4505
4766
|
|
|
4506
4767
|
// src/components/ui/input-otp.tsx
|
|
4507
|
-
var
|
|
4768
|
+
var React17 = __toESM(require("react"), 1);
|
|
4508
4769
|
var import_input_otp = require("input-otp");
|
|
4509
|
-
var
|
|
4510
|
-
var
|
|
4770
|
+
var import_lucide_react17 = require("lucide-react");
|
|
4771
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4511
4772
|
function InputOTP({
|
|
4512
4773
|
className,
|
|
4513
4774
|
containerClassName,
|
|
4514
4775
|
dir = "ltr",
|
|
4515
4776
|
...props
|
|
4516
4777
|
}) {
|
|
4517
|
-
return /* @__PURE__ */ (0,
|
|
4778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { dir: dir ?? "ltr", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4518
4779
|
import_input_otp.OTPInput,
|
|
4519
4780
|
{
|
|
4520
4781
|
"data-slot": "input-otp",
|
|
@@ -4529,7 +4790,7 @@ function InputOTP({
|
|
|
4529
4790
|
) });
|
|
4530
4791
|
}
|
|
4531
4792
|
function InputOTPGroup({ className, ...props }) {
|
|
4532
|
-
return /* @__PURE__ */ (0,
|
|
4793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4533
4794
|
"div",
|
|
4534
4795
|
{
|
|
4535
4796
|
"data-slot": "input-otp-group",
|
|
@@ -4544,9 +4805,9 @@ function InputOTPSlot({
|
|
|
4544
4805
|
className,
|
|
4545
4806
|
...props
|
|
4546
4807
|
}) {
|
|
4547
|
-
const inputOTPContext =
|
|
4808
|
+
const inputOTPContext = React17.useContext(import_input_otp.OTPInputContext);
|
|
4548
4809
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4549
|
-
return /* @__PURE__ */ (0,
|
|
4810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4550
4811
|
"div",
|
|
4551
4812
|
{
|
|
4552
4813
|
"data-slot": "input-otp-slot",
|
|
@@ -4559,37 +4820,36 @@ function InputOTPSlot({
|
|
|
4559
4820
|
...props,
|
|
4560
4821
|
children: [
|
|
4561
4822
|
char,
|
|
4562
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
4823
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
4563
4824
|
]
|
|
4564
4825
|
}
|
|
4565
4826
|
);
|
|
4566
4827
|
}
|
|
4567
4828
|
function InputOTPSeparator({ ...props }) {
|
|
4568
|
-
return /* @__PURE__ */ (0,
|
|
4829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4569
4830
|
"div",
|
|
4570
4831
|
{
|
|
4571
4832
|
"data-slot": "input-otp-separator",
|
|
4572
4833
|
role: "separator",
|
|
4573
4834
|
dir: "ltr",
|
|
4574
4835
|
...props,
|
|
4575
|
-
children: /* @__PURE__ */ (0,
|
|
4836
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react17.MinusIcon, {})
|
|
4576
4837
|
}
|
|
4577
4838
|
);
|
|
4578
4839
|
}
|
|
4579
4840
|
|
|
4580
4841
|
// src/components/ui/instagram-post.tsx
|
|
4581
|
-
var
|
|
4582
|
-
var
|
|
4583
|
-
var import_react_player = __toESM(require("react-player"), 1);
|
|
4842
|
+
var React19 = __toESM(require("react"), 1);
|
|
4843
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
4584
4844
|
|
|
4585
4845
|
// src/components/ui/tooltip.tsx
|
|
4586
|
-
var
|
|
4846
|
+
var React18 = __toESM(require("react"), 1);
|
|
4587
4847
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4588
|
-
var
|
|
4848
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4589
4849
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4590
4850
|
var Tooltip = TooltipPrimitive.Root;
|
|
4591
4851
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4592
|
-
var TooltipContent =
|
|
4852
|
+
var TooltipContent = React18.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
4593
4853
|
TooltipPrimitive.Content,
|
|
4594
4854
|
{
|
|
4595
4855
|
ref,
|
|
@@ -4604,8 +4864,9 @@ var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
4604
4864
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4605
4865
|
|
|
4606
4866
|
// src/components/ui/instagram-post.tsx
|
|
4607
|
-
var
|
|
4608
|
-
var
|
|
4867
|
+
var import_lucide_react18 = require("lucide-react");
|
|
4868
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4869
|
+
var instagramPostVariants = (0, import_class_variance_authority10.cva)(
|
|
4609
4870
|
"relative border bg-background-surface-100",
|
|
4610
4871
|
{
|
|
4611
4872
|
variants: {
|
|
@@ -4625,17 +4886,22 @@ function InstagramPostMedia({
|
|
|
4625
4886
|
variant = "vertical",
|
|
4626
4887
|
placeholderText = "No media available"
|
|
4627
4888
|
}) {
|
|
4889
|
+
const [imageError, setImageError] = React19.useState({});
|
|
4890
|
+
const handleImageError = (url) => {
|
|
4891
|
+
setImageError((prev) => ({ ...prev, [url]: true }));
|
|
4892
|
+
};
|
|
4893
|
+
const renderPlaceholder = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full h-full flex items-center justify-center bg-muted/10 dark:bg-muted/5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.ImageOff, { className: "size-12 text-muted-foreground/50" }) });
|
|
4628
4894
|
if (!media || media.length === 0) {
|
|
4629
|
-
return /* @__PURE__ */ (0,
|
|
4895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4630
4896
|
"div",
|
|
4631
4897
|
{
|
|
4632
4898
|
className: cn(
|
|
4633
4899
|
"flex items-center justify-center bg-muted/30",
|
|
4634
4900
|
variant === "vertical" ? "aspect-square" : "w-[20%] shrink-0 h-full min-h-[200px] -my-[1px] -ms-[1px]"
|
|
4635
4901
|
),
|
|
4636
|
-
children: /* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4902
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "text-center p-4", children: [
|
|
4903
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_lucide_react18.ImageOff, { className: "size-12 mx-auto mb-2 text-muted-foreground" }),
|
|
4904
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-muted-foreground", children: placeholderText })
|
|
4639
4905
|
] })
|
|
4640
4906
|
}
|
|
4641
4907
|
);
|
|
@@ -4643,27 +4909,29 @@ function InstagramPostMedia({
|
|
|
4643
4909
|
if (mediaType === "image" || media.length === 1 && media[0].type === "image") {
|
|
4644
4910
|
const item = media[0];
|
|
4645
4911
|
if (variant === "horizontal") {
|
|
4646
|
-
return /* @__PURE__ */ (0,
|
|
4647
|
-
/* @__PURE__ */ (0,
|
|
4648
|
-
/* @__PURE__ */ (0,
|
|
4912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: [
|
|
4913
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4914
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4649
4915
|
"img",
|
|
4650
4916
|
{
|
|
4651
4917
|
src: item.url,
|
|
4652
4918
|
alt: "Post media",
|
|
4653
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4919
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4920
|
+
onError: () => handleImageError(item.url)
|
|
4654
4921
|
}
|
|
4655
4922
|
)
|
|
4656
4923
|
] });
|
|
4657
4924
|
}
|
|
4658
4925
|
const ratio = getAspectRatio(item.aspectRatio || "1:1");
|
|
4659
|
-
return /* @__PURE__ */ (0,
|
|
4660
|
-
/* @__PURE__ */ (0,
|
|
4661
|
-
/* @__PURE__ */ (0,
|
|
4926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30", style: { aspectRatio: ratio }, children: [
|
|
4927
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4928
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4662
4929
|
"img",
|
|
4663
4930
|
{
|
|
4664
4931
|
src: item.url,
|
|
4665
4932
|
alt: "Post media",
|
|
4666
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4933
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4934
|
+
onError: () => handleImageError(item.url)
|
|
4667
4935
|
}
|
|
4668
4936
|
)
|
|
4669
4937
|
] });
|
|
@@ -4671,109 +4939,74 @@ function InstagramPostMedia({
|
|
|
4671
4939
|
if (mediaType === "video" || media.length === 1 && media[0].type === "video") {
|
|
4672
4940
|
const item = media[0];
|
|
4673
4941
|
if (variant === "horizontal") {
|
|
4674
|
-
return /* @__PURE__ */ (0,
|
|
4675
|
-
/* @__PURE__ */ (0,
|
|
4676
|
-
|
|
4677
|
-
|
|
4942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: [
|
|
4943
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4944
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4945
|
+
"img",
|
|
4678
4946
|
{
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
playing: false,
|
|
4684
|
-
light: true
|
|
4947
|
+
src: item.url,
|
|
4948
|
+
alt: "Post media",
|
|
4949
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4950
|
+
onError: () => handleImageError(item.url)
|
|
4685
4951
|
}
|
|
4686
|
-
)
|
|
4952
|
+
)
|
|
4687
4953
|
] });
|
|
4688
4954
|
}
|
|
4689
4955
|
const ratio = getAspectRatio(item.aspectRatio || "16:9");
|
|
4690
|
-
return /* @__PURE__ */ (0,
|
|
4691
|
-
/* @__PURE__ */ (0,
|
|
4692
|
-
|
|
4693
|
-
|
|
4956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30", style: { aspectRatio: ratio }, children: [
|
|
4957
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4958
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4959
|
+
"img",
|
|
4694
4960
|
{
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
playing: false,
|
|
4700
|
-
light: true
|
|
4961
|
+
src: item.url,
|
|
4962
|
+
alt: "Post media",
|
|
4963
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4964
|
+
onError: () => handleImageError(item.url)
|
|
4701
4965
|
}
|
|
4702
|
-
)
|
|
4966
|
+
)
|
|
4703
4967
|
] });
|
|
4704
4968
|
}
|
|
4705
4969
|
if (mediaType === "carousel" || media.length > 1) {
|
|
4706
4970
|
if (variant === "horizontal") {
|
|
4707
|
-
return /* @__PURE__ */ (0,
|
|
4708
|
-
/* @__PURE__ */ (0,
|
|
4709
|
-
/* @__PURE__ */ (0,
|
|
4710
|
-
/* @__PURE__ */ (0,
|
|
4971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-[20%] shrink-0 relative overflow-hidden group cursor-pointer h-full -my-[1px] -ms-[1px] bg-muted/30", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Carousel, { className: "w-full h-full", children: [
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselContent, { className: "h-full", children: media.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(CarouselItem, { className: "h-full", children: [
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4974
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4711
4975
|
"img",
|
|
4712
4976
|
{
|
|
4713
4977
|
src: item.url,
|
|
4714
4978
|
alt: `Post media ${index + 1}`,
|
|
4715
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4979
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4980
|
+
onError: () => handleImageError(item.url)
|
|
4716
4981
|
}
|
|
4717
4982
|
)
|
|
4718
|
-
] }
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
import_react_player.default,
|
|
4722
|
-
{
|
|
4723
|
-
url: item.url,
|
|
4724
|
-
width: "100%",
|
|
4725
|
-
height: "100%",
|
|
4726
|
-
controls: true,
|
|
4727
|
-
playing: false,
|
|
4728
|
-
light: true
|
|
4729
|
-
}
|
|
4730
|
-
) })
|
|
4731
|
-
] }) }, index)) }),
|
|
4732
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
4733
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(CarouselNext, { className: "me-2" })
|
|
4983
|
+
] }, index)) }),
|
|
4984
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4734
4986
|
] }) });
|
|
4735
4987
|
}
|
|
4736
|
-
return /* @__PURE__ */ (0,
|
|
4737
|
-
/* @__PURE__ */ (0,
|
|
4988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Carousel, { className: "w-full", children: [
|
|
4989
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselContent, { children: media.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselItem, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
4738
4990
|
"div",
|
|
4739
4991
|
{
|
|
4740
|
-
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4741
|
-
style: { aspectRatio: getAspectRatio(item.aspectRatio || "1:1") },
|
|
4992
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30",
|
|
4993
|
+
style: { aspectRatio: getAspectRatio(item.aspectRatio || (item.type === "video" ? "16:9" : "1:1")) },
|
|
4742
4994
|
children: [
|
|
4743
|
-
/* @__PURE__ */ (0,
|
|
4744
|
-
/* @__PURE__ */ (0,
|
|
4995
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10" }),
|
|
4996
|
+
imageError[item.url] ? renderPlaceholder() : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4745
4997
|
"img",
|
|
4746
4998
|
{
|
|
4747
4999
|
src: item.url,
|
|
4748
5000
|
alt: `Post media ${index + 1}`,
|
|
4749
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
5001
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
5002
|
+
onError: () => handleImageError(item.url)
|
|
4750
5003
|
}
|
|
4751
5004
|
)
|
|
4752
5005
|
]
|
|
4753
5006
|
}
|
|
4754
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
4755
|
-
"div",
|
|
4756
|
-
{
|
|
4757
|
-
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4758
|
-
style: { aspectRatio: getAspectRatio(item.aspectRatio || "16:9") },
|
|
4759
|
-
children: [
|
|
4760
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors duration-300 z-10 pointer-events-none" }),
|
|
4761
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full h-full group-hover:scale-110 transition-transform duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
4762
|
-
import_react_player.default,
|
|
4763
|
-
{
|
|
4764
|
-
url: item.url,
|
|
4765
|
-
width: "100%",
|
|
4766
|
-
height: "100%",
|
|
4767
|
-
controls: true,
|
|
4768
|
-
playing: false,
|
|
4769
|
-
light: true
|
|
4770
|
-
}
|
|
4771
|
-
) })
|
|
4772
|
-
]
|
|
4773
|
-
}
|
|
4774
5007
|
) }, index)) }),
|
|
4775
|
-
/* @__PURE__ */ (0,
|
|
4776
|
-
/* @__PURE__ */ (0,
|
|
5008
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
5009
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4777
5010
|
] });
|
|
4778
5011
|
}
|
|
4779
5012
|
return null;
|
|
@@ -4793,10 +5026,10 @@ function InstagramPostCaption({
|
|
|
4793
5026
|
maxLines = 3,
|
|
4794
5027
|
variant = "vertical"
|
|
4795
5028
|
}) {
|
|
4796
|
-
const [isExpanded, setIsExpanded] =
|
|
4797
|
-
const [shouldShowMore, setShouldShowMore] =
|
|
4798
|
-
const textRef =
|
|
4799
|
-
|
|
5029
|
+
const [isExpanded, setIsExpanded] = React19.useState(false);
|
|
5030
|
+
const [shouldShowMore, setShouldShowMore] = React19.useState(false);
|
|
5031
|
+
const textRef = React19.useRef(null);
|
|
5032
|
+
React19.useEffect(() => {
|
|
4800
5033
|
if (variant === "vertical" && textRef.current && !isExpanded) {
|
|
4801
5034
|
const lineHeight = parseInt(window.getComputedStyle(textRef.current).lineHeight);
|
|
4802
5035
|
const maxHeight = lineHeight * maxLines;
|
|
@@ -4807,11 +5040,11 @@ function InstagramPostCaption({
|
|
|
4807
5040
|
}, [caption, maxLines, isExpanded, variant]);
|
|
4808
5041
|
if (!caption) return null;
|
|
4809
5042
|
const parsedCaption = parseCaption(caption);
|
|
4810
|
-
return /* @__PURE__ */ (0,
|
|
5043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn(
|
|
4811
5044
|
"px-4 py-2",
|
|
4812
5045
|
variant === "horizontal" && "overflow-visible"
|
|
4813
5046
|
), children: [
|
|
4814
|
-
/* @__PURE__ */ (0,
|
|
5047
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4815
5048
|
"p",
|
|
4816
5049
|
{
|
|
4817
5050
|
ref: textRef,
|
|
@@ -4828,7 +5061,7 @@ function InstagramPostCaption({
|
|
|
4828
5061
|
} : void 0,
|
|
4829
5062
|
children: parsedCaption.map((part, index) => {
|
|
4830
5063
|
if (part.type === "hashtag") {
|
|
4831
|
-
return /* @__PURE__ */ (0,
|
|
5064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4832
5065
|
"span",
|
|
4833
5066
|
{
|
|
4834
5067
|
className: "text-brand-link hover:underline cursor-pointer",
|
|
@@ -4838,7 +5071,7 @@ function InstagramPostCaption({
|
|
|
4838
5071
|
);
|
|
4839
5072
|
}
|
|
4840
5073
|
if (part.type === "mention") {
|
|
4841
|
-
return /* @__PURE__ */ (0,
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4842
5075
|
"span",
|
|
4843
5076
|
{
|
|
4844
5077
|
className: "text-brand-link hover:underline cursor-pointer font-medium",
|
|
@@ -4847,11 +5080,11 @@ function InstagramPostCaption({
|
|
|
4847
5080
|
index
|
|
4848
5081
|
);
|
|
4849
5082
|
}
|
|
4850
|
-
return /* @__PURE__ */ (0,
|
|
5083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: part.text }, index);
|
|
4851
5084
|
})
|
|
4852
5085
|
}
|
|
4853
5086
|
),
|
|
4854
|
-
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0,
|
|
5087
|
+
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4855
5088
|
"button",
|
|
4856
5089
|
{
|
|
4857
5090
|
onClick: () => setIsExpanded(!isExpanded),
|
|
@@ -4957,15 +5190,15 @@ function InstagramPostStats({
|
|
|
4957
5190
|
});
|
|
4958
5191
|
}
|
|
4959
5192
|
if (items.length === 0) return null;
|
|
4960
|
-
return /* @__PURE__ */ (0,
|
|
5193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "px-4 py-2 flex items-center gap-4 text-sm text-foreground-light border-t border-border-default", dir: "ltr", children: items.map((item, index) => {
|
|
4961
5194
|
const Icon2 = item.icon;
|
|
4962
|
-
return /* @__PURE__ */ (0,
|
|
4963
|
-
/* @__PURE__ */ (0,
|
|
4964
|
-
/* @__PURE__ */ (0,
|
|
4965
|
-
/* @__PURE__ */ (0,
|
|
4966
|
-
/* @__PURE__ */ (0,
|
|
5195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5196
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-1.5 cursor-default", children: [
|
|
5197
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon2, { className: "size-4" }),
|
|
5198
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: item.isPostType ? "text-xs" : "", children: item.value }),
|
|
5199
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "sr-only", children: item.labelEn })
|
|
4967
5200
|
] }) }),
|
|
4968
|
-
/* @__PURE__ */ (0,
|
|
5201
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { children: [
|
|
4969
5202
|
item.label,
|
|
4970
5203
|
": ",
|
|
4971
5204
|
item.exactValue
|
|
@@ -4980,7 +5213,7 @@ function InstagramPostProfile({
|
|
|
4980
5213
|
}) {
|
|
4981
5214
|
if (!profile) return null;
|
|
4982
5215
|
const displayAvatarUrl = avatarUrl || profile.avatarUrl || profile.profilePicture;
|
|
4983
|
-
return /* @__PURE__ */ (0,
|
|
5216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
4984
5217
|
"div",
|
|
4985
5218
|
{
|
|
4986
5219
|
className: cn(
|
|
@@ -4989,13 +5222,13 @@ function InstagramPostProfile({
|
|
|
4989
5222
|
variant === "horizontal" && "pb-2"
|
|
4990
5223
|
),
|
|
4991
5224
|
children: [
|
|
4992
|
-
/* @__PURE__ */ (0,
|
|
4993
|
-
displayAvatarUrl && /* @__PURE__ */ (0,
|
|
4994
|
-
/* @__PURE__ */ (0,
|
|
5225
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Avatar, { className: "size-10", children: [
|
|
5226
|
+
displayAvatarUrl && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AvatarImage, { src: displayAvatarUrl, alt: profile.username }),
|
|
5227
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(AvatarFallback, { children: profile.username.charAt(0).toUpperCase() })
|
|
4995
5228
|
] }),
|
|
4996
|
-
/* @__PURE__ */ (0,
|
|
4997
|
-
/* @__PURE__ */ (0,
|
|
4998
|
-
profile.fullName && /* @__PURE__ */ (0,
|
|
5229
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "font-semibold text-sm truncate", children: profile.username }),
|
|
5231
|
+
profile.fullName && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-xs text-muted-foreground truncate", children: profile.fullName })
|
|
4999
5232
|
] })
|
|
5000
5233
|
]
|
|
5001
5234
|
}
|
|
@@ -5032,9 +5265,9 @@ function InstagramPostActions({
|
|
|
5032
5265
|
onAIAnalysis();
|
|
5033
5266
|
}
|
|
5034
5267
|
};
|
|
5035
|
-
return /* @__PURE__ */ (0,
|
|
5036
|
-
/* @__PURE__ */ (0,
|
|
5037
|
-
/* @__PURE__ */ (0,
|
|
5268
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "absolute top-2 end-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity z-10", children: [
|
|
5269
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5270
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5038
5271
|
Button,
|
|
5039
5272
|
{
|
|
5040
5273
|
variant: "ghost",
|
|
@@ -5042,13 +5275,13 @@ function InstagramPostActions({
|
|
|
5042
5275
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5043
5276
|
onClick: handleCommentAnalyzer,
|
|
5044
5277
|
"aria-label": "Comment Analyzer",
|
|
5045
|
-
children: /* @__PURE__ */ (0,
|
|
5278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.messageCircle, { className: "size-4" })
|
|
5046
5279
|
}
|
|
5047
5280
|
) }),
|
|
5048
|
-
/* @__PURE__ */ (0,
|
|
5281
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u06A9\u0627\u0645\u0646\u062A\u200C\u0647\u0627" }) })
|
|
5049
5282
|
] }),
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5051
|
-
/* @__PURE__ */ (0,
|
|
5283
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5284
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5052
5285
|
Button,
|
|
5053
5286
|
{
|
|
5054
5287
|
variant: "ghost",
|
|
@@ -5056,13 +5289,13 @@ function InstagramPostActions({
|
|
|
5056
5289
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5057
5290
|
onClick: handleBooster,
|
|
5058
5291
|
"aria-label": "Booster",
|
|
5059
|
-
children: /* @__PURE__ */ (0,
|
|
5292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.rocket, { className: "size-4" })
|
|
5060
5293
|
}
|
|
5061
5294
|
) }),
|
|
5062
|
-
/* @__PURE__ */ (0,
|
|
5295
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u0628\u0648\u0633\u062A\u0631" }) })
|
|
5063
5296
|
] }),
|
|
5064
|
-
/* @__PURE__ */ (0,
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5297
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5298
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5066
5299
|
Button,
|
|
5067
5300
|
{
|
|
5068
5301
|
variant: "ghost",
|
|
@@ -5070,13 +5303,13 @@ function InstagramPostActions({
|
|
|
5070
5303
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5071
5304
|
onClick: handleAIAnalysis,
|
|
5072
5305
|
"aria-label": "AI Analysis",
|
|
5073
|
-
children: /* @__PURE__ */ (0,
|
|
5306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.sparkles, { className: "size-4" })
|
|
5074
5307
|
}
|
|
5075
5308
|
) }),
|
|
5076
|
-
/* @__PURE__ */ (0,
|
|
5309
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u062A\u062D\u0644\u06CC\u0644 \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06CC" }) })
|
|
5077
5310
|
] }),
|
|
5078
|
-
/* @__PURE__ */ (0,
|
|
5079
|
-
/* @__PURE__ */ (0,
|
|
5311
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
5312
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5080
5313
|
Button,
|
|
5081
5314
|
{
|
|
5082
5315
|
variant: "ghost",
|
|
@@ -5084,10 +5317,10 @@ function InstagramPostActions({
|
|
|
5084
5317
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5085
5318
|
onClick: handleOpenInstagram,
|
|
5086
5319
|
"aria-label": "Open on Instagram",
|
|
5087
|
-
children: /* @__PURE__ */ (0,
|
|
5320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.instagram, { className: "size-4" })
|
|
5088
5321
|
}
|
|
5089
5322
|
) }),
|
|
5090
|
-
/* @__PURE__ */ (0,
|
|
5323
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u0628\u0627\u0632 \u06A9\u0631\u062F\u0646 \u062F\u0631 \u0627\u06CC\u0646\u0633\u062A\u0627\u06AF\u0631\u0627\u0645" }) })
|
|
5091
5324
|
] })
|
|
5092
5325
|
] }) });
|
|
5093
5326
|
}
|
|
@@ -5099,25 +5332,25 @@ function InstagramPostTime({
|
|
|
5099
5332
|
const relativeTime = formatRelativeTime(publishTime);
|
|
5100
5333
|
const absoluteTime = formatAbsoluteTime(publishTime);
|
|
5101
5334
|
if (timeFormat === "absolute") {
|
|
5102
|
-
return /* @__PURE__ */ (0,
|
|
5103
|
-
/* @__PURE__ */ (0,
|
|
5104
|
-
/* @__PURE__ */ (0,
|
|
5335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "px-4 py-1 text-xs text-muted-foreground flex items-center gap-1.5", dir: "ltr", children: [
|
|
5336
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.clock, { className: "size-3" }),
|
|
5337
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: absoluteTime })
|
|
5105
5338
|
] });
|
|
5106
5339
|
}
|
|
5107
|
-
return /* @__PURE__ */ (0,
|
|
5340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5108
5341
|
"div",
|
|
5109
5342
|
{
|
|
5110
5343
|
className: "px-4 py-1 text-xs text-muted-foreground cursor-default flex items-center gap-1.5",
|
|
5111
5344
|
title: absoluteTime,
|
|
5112
5345
|
dir: "ltr",
|
|
5113
5346
|
children: [
|
|
5114
|
-
/* @__PURE__ */ (0,
|
|
5115
|
-
/* @__PURE__ */ (0,
|
|
5347
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.clock, { className: "size-3" }),
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: relativeTime })
|
|
5116
5349
|
]
|
|
5117
5350
|
}
|
|
5118
5351
|
);
|
|
5119
5352
|
}
|
|
5120
|
-
var InstagramPost =
|
|
5353
|
+
var InstagramPost = React19.forwardRef(
|
|
5121
5354
|
({
|
|
5122
5355
|
className,
|
|
5123
5356
|
variant = "vertical",
|
|
@@ -5148,7 +5381,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5148
5381
|
...props
|
|
5149
5382
|
}, ref) => {
|
|
5150
5383
|
const isVertical = variant === "vertical";
|
|
5151
|
-
return /* @__PURE__ */ (0,
|
|
5384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5152
5385
|
"div",
|
|
5153
5386
|
{
|
|
5154
5387
|
ref,
|
|
@@ -5156,7 +5389,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5156
5389
|
dir,
|
|
5157
5390
|
...props,
|
|
5158
5391
|
children: [
|
|
5159
|
-
showActions && /* @__PURE__ */ (0,
|
|
5392
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5160
5393
|
InstagramPostActions,
|
|
5161
5394
|
{
|
|
5162
5395
|
showActions,
|
|
@@ -5167,9 +5400,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5167
5400
|
instagramUrl
|
|
5168
5401
|
}
|
|
5169
5402
|
),
|
|
5170
|
-
isVertical ? /* @__PURE__ */ (0,
|
|
5171
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5172
|
-
/* @__PURE__ */ (0,
|
|
5403
|
+
isVertical ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5404
|
+
showProfile && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostProfile, { profile, variant: variant || "vertical", avatarUrl }),
|
|
5405
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5173
5406
|
InstagramPostMedia,
|
|
5174
5407
|
{
|
|
5175
5408
|
media,
|
|
@@ -5178,7 +5411,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5178
5411
|
placeholderText
|
|
5179
5412
|
}
|
|
5180
5413
|
) }),
|
|
5181
|
-
/* @__PURE__ */ (0,
|
|
5414
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5182
5415
|
InstagramPostStats,
|
|
5183
5416
|
{
|
|
5184
5417
|
stats,
|
|
@@ -5190,16 +5423,16 @@ var InstagramPost = React17.forwardRef(
|
|
|
5190
5423
|
postType
|
|
5191
5424
|
}
|
|
5192
5425
|
),
|
|
5193
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5194
|
-
/* @__PURE__ */ (0,
|
|
5426
|
+
showCaption && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostCaption, { caption, variant: variant || "vertical" }),
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5195
5428
|
InstagramPostTime,
|
|
5196
5429
|
{
|
|
5197
5430
|
publishTime,
|
|
5198
5431
|
timeFormat
|
|
5199
5432
|
}
|
|
5200
5433
|
) })
|
|
5201
|
-
] }) : /* @__PURE__ */ (0,
|
|
5202
|
-
/* @__PURE__ */ (0,
|
|
5434
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5435
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5203
5436
|
InstagramPostMedia,
|
|
5204
5437
|
{
|
|
5205
5438
|
media,
|
|
@@ -5208,9 +5441,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5208
5441
|
placeholderText
|
|
5209
5442
|
}
|
|
5210
5443
|
),
|
|
5211
|
-
/* @__PURE__ */ (0,
|
|
5212
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5213
|
-
/* @__PURE__ */ (0,
|
|
5444
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 flex flex-col min-w-0 overflow-hidden rounded-e-lg", children: [
|
|
5445
|
+
showProfile && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostProfile, { profile, variant: variant || "horizontal", avatarUrl }),
|
|
5446
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5214
5447
|
InstagramPostStats,
|
|
5215
5448
|
{
|
|
5216
5449
|
stats,
|
|
@@ -5222,8 +5455,8 @@ var InstagramPost = React17.forwardRef(
|
|
|
5222
5455
|
postType
|
|
5223
5456
|
}
|
|
5224
5457
|
),
|
|
5225
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5226
|
-
/* @__PURE__ */ (0,
|
|
5458
|
+
showCaption && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(InstagramPostCaption, { caption, variant: variant || "horizontal" }),
|
|
5459
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mt-auto w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5227
5460
|
InstagramPostTime,
|
|
5228
5461
|
{
|
|
5229
5462
|
publishTime,
|
|
@@ -5240,9 +5473,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5240
5473
|
InstagramPost.displayName = "InstagramPost";
|
|
5241
5474
|
|
|
5242
5475
|
// src/components/ui/kbd.tsx
|
|
5243
|
-
var
|
|
5476
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5244
5477
|
function Kbd({ className, ...props }) {
|
|
5245
|
-
return /* @__PURE__ */ (0,
|
|
5478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5246
5479
|
"kbd",
|
|
5247
5480
|
{
|
|
5248
5481
|
"data-slot": "kbd",
|
|
@@ -5257,7 +5490,7 @@ function Kbd({ className, ...props }) {
|
|
|
5257
5490
|
);
|
|
5258
5491
|
}
|
|
5259
5492
|
function KbdGroup({ className, ...props }) {
|
|
5260
|
-
return /* @__PURE__ */ (0,
|
|
5493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5261
5494
|
"kbd",
|
|
5262
5495
|
{
|
|
5263
5496
|
"data-slot": "kbd-group",
|
|
@@ -5269,13 +5502,13 @@ function KbdGroup({ className, ...props }) {
|
|
|
5269
5502
|
|
|
5270
5503
|
// src/components/ui/menubar.tsx
|
|
5271
5504
|
var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
5272
|
-
var
|
|
5273
|
-
var
|
|
5505
|
+
var import_lucide_react19 = require("lucide-react");
|
|
5506
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5274
5507
|
function Menubar({
|
|
5275
5508
|
className,
|
|
5276
5509
|
...props
|
|
5277
5510
|
}) {
|
|
5278
|
-
return /* @__PURE__ */ (0,
|
|
5511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5279
5512
|
MenubarPrimitive.Root,
|
|
5280
5513
|
{
|
|
5281
5514
|
"data-slot": "menubar",
|
|
@@ -5290,28 +5523,28 @@ function Menubar({
|
|
|
5290
5523
|
function MenubarMenu({
|
|
5291
5524
|
...props
|
|
5292
5525
|
}) {
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
5294
5527
|
}
|
|
5295
5528
|
function MenubarGroup({
|
|
5296
5529
|
...props
|
|
5297
5530
|
}) {
|
|
5298
|
-
return /* @__PURE__ */ (0,
|
|
5531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
5299
5532
|
}
|
|
5300
5533
|
function MenubarPortal({
|
|
5301
5534
|
...props
|
|
5302
5535
|
}) {
|
|
5303
|
-
return /* @__PURE__ */ (0,
|
|
5536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
5304
5537
|
}
|
|
5305
5538
|
function MenubarRadioGroup({
|
|
5306
5539
|
...props
|
|
5307
5540
|
}) {
|
|
5308
|
-
return /* @__PURE__ */ (0,
|
|
5541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
5309
5542
|
}
|
|
5310
5543
|
function MenubarTrigger({
|
|
5311
5544
|
className,
|
|
5312
5545
|
...props
|
|
5313
5546
|
}) {
|
|
5314
|
-
return /* @__PURE__ */ (0,
|
|
5547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5315
5548
|
MenubarPrimitive.Trigger,
|
|
5316
5549
|
{
|
|
5317
5550
|
"data-slot": "menubar-trigger",
|
|
@@ -5330,7 +5563,7 @@ function MenubarContent({
|
|
|
5330
5563
|
sideOffset = 8,
|
|
5331
5564
|
...props
|
|
5332
5565
|
}) {
|
|
5333
|
-
return /* @__PURE__ */ (0,
|
|
5566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5334
5567
|
MenubarPrimitive.Content,
|
|
5335
5568
|
{
|
|
5336
5569
|
"data-slot": "menubar-content",
|
|
@@ -5351,7 +5584,7 @@ function MenubarItem({
|
|
|
5351
5584
|
variant = "default",
|
|
5352
5585
|
...props
|
|
5353
5586
|
}) {
|
|
5354
|
-
return /* @__PURE__ */ (0,
|
|
5587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5355
5588
|
MenubarPrimitive.Item,
|
|
5356
5589
|
{
|
|
5357
5590
|
"data-slot": "menubar-item",
|
|
@@ -5371,7 +5604,7 @@ function MenubarCheckboxItem({
|
|
|
5371
5604
|
checked,
|
|
5372
5605
|
...props
|
|
5373
5606
|
}) {
|
|
5374
|
-
return /* @__PURE__ */ (0,
|
|
5607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5375
5608
|
MenubarPrimitive.CheckboxItem,
|
|
5376
5609
|
{
|
|
5377
5610
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -5382,7 +5615,7 @@ function MenubarCheckboxItem({
|
|
|
5382
5615
|
checked,
|
|
5383
5616
|
...props,
|
|
5384
5617
|
children: [
|
|
5385
|
-
/* @__PURE__ */ (0,
|
|
5618
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react19.CheckIcon, { className: "size-4" }) }) }),
|
|
5386
5619
|
children
|
|
5387
5620
|
]
|
|
5388
5621
|
}
|
|
@@ -5393,7 +5626,7 @@ function MenubarRadioItem({
|
|
|
5393
5626
|
children,
|
|
5394
5627
|
...props
|
|
5395
5628
|
}) {
|
|
5396
|
-
return /* @__PURE__ */ (0,
|
|
5629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5397
5630
|
MenubarPrimitive.RadioItem,
|
|
5398
5631
|
{
|
|
5399
5632
|
"data-slot": "menubar-radio-item",
|
|
@@ -5403,7 +5636,7 @@ function MenubarRadioItem({
|
|
|
5403
5636
|
),
|
|
5404
5637
|
...props,
|
|
5405
5638
|
children: [
|
|
5406
|
-
/* @__PURE__ */ (0,
|
|
5639
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute start-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react19.CircleIcon, { className: "size-2 fill-current" }) }) }),
|
|
5407
5640
|
children
|
|
5408
5641
|
]
|
|
5409
5642
|
}
|
|
@@ -5414,7 +5647,7 @@ function MenubarLabel({
|
|
|
5414
5647
|
inset,
|
|
5415
5648
|
...props
|
|
5416
5649
|
}) {
|
|
5417
|
-
return /* @__PURE__ */ (0,
|
|
5650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5418
5651
|
MenubarPrimitive.Label,
|
|
5419
5652
|
{
|
|
5420
5653
|
"data-slot": "menubar-label",
|
|
@@ -5431,7 +5664,7 @@ function MenubarSeparator({
|
|
|
5431
5664
|
className,
|
|
5432
5665
|
...props
|
|
5433
5666
|
}) {
|
|
5434
|
-
return /* @__PURE__ */ (0,
|
|
5667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5435
5668
|
MenubarPrimitive.Separator,
|
|
5436
5669
|
{
|
|
5437
5670
|
"data-slot": "menubar-separator",
|
|
@@ -5444,7 +5677,7 @@ function MenubarShortcut({
|
|
|
5444
5677
|
className,
|
|
5445
5678
|
...props
|
|
5446
5679
|
}) {
|
|
5447
|
-
return /* @__PURE__ */ (0,
|
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5448
5681
|
"span",
|
|
5449
5682
|
{
|
|
5450
5683
|
"data-slot": "menubar-shortcut",
|
|
@@ -5459,7 +5692,7 @@ function MenubarShortcut({
|
|
|
5459
5692
|
function MenubarSub({
|
|
5460
5693
|
...props
|
|
5461
5694
|
}) {
|
|
5462
|
-
return /* @__PURE__ */ (0,
|
|
5695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
5463
5696
|
}
|
|
5464
5697
|
function MenubarSubTrigger({
|
|
5465
5698
|
className,
|
|
@@ -5467,7 +5700,7 @@ function MenubarSubTrigger({
|
|
|
5467
5700
|
children,
|
|
5468
5701
|
...props
|
|
5469
5702
|
}) {
|
|
5470
|
-
return /* @__PURE__ */ (0,
|
|
5703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5471
5704
|
MenubarPrimitive.SubTrigger,
|
|
5472
5705
|
{
|
|
5473
5706
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -5479,7 +5712,7 @@ function MenubarSubTrigger({
|
|
|
5479
5712
|
...props,
|
|
5480
5713
|
children: [
|
|
5481
5714
|
children,
|
|
5482
|
-
/* @__PURE__ */ (0,
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react19.ChevronRightIcon, { className: "ms-auto h-4 w-4 rtl:rotate-180" })
|
|
5483
5716
|
]
|
|
5484
5717
|
}
|
|
5485
5718
|
);
|
|
@@ -5488,7 +5721,7 @@ function MenubarSubContent({
|
|
|
5488
5721
|
className,
|
|
5489
5722
|
...props
|
|
5490
5723
|
}) {
|
|
5491
|
-
return /* @__PURE__ */ (0,
|
|
5724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5492
5725
|
MenubarPrimitive.SubContent,
|
|
5493
5726
|
{
|
|
5494
5727
|
"data-slot": "menubar-sub-content",
|
|
@@ -5502,14 +5735,14 @@ function MenubarSubContent({
|
|
|
5502
5735
|
}
|
|
5503
5736
|
|
|
5504
5737
|
// src/components/ui/metric-card.tsx
|
|
5505
|
-
var
|
|
5506
|
-
var
|
|
5738
|
+
var React20 = __toESM(require("react"), 1);
|
|
5739
|
+
var import_lucide_react20 = require("lucide-react");
|
|
5507
5740
|
var import_date_fns2 = require("date-fns");
|
|
5508
5741
|
|
|
5509
5742
|
// src/components/ui/skeleton.tsx
|
|
5510
|
-
var
|
|
5743
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5511
5744
|
function Skeleton({ className, ...props }) {
|
|
5512
|
-
return /* @__PURE__ */ (0,
|
|
5745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5513
5746
|
"div",
|
|
5514
5747
|
{
|
|
5515
5748
|
"data-slot": "skeleton",
|
|
@@ -5520,25 +5753,25 @@ function Skeleton({ className, ...props }) {
|
|
|
5520
5753
|
}
|
|
5521
5754
|
|
|
5522
5755
|
// src/components/ui/metric-card.tsx
|
|
5523
|
-
var
|
|
5524
|
-
var MetricCard =
|
|
5756
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5757
|
+
var MetricCard = React20.forwardRef(
|
|
5525
5758
|
({ className, isLoading, children, ...props }, ref) => {
|
|
5526
5759
|
if (isLoading) {
|
|
5527
|
-
return /* @__PURE__ */ (0,
|
|
5760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5528
5761
|
Card,
|
|
5529
5762
|
{
|
|
5530
5763
|
ref,
|
|
5531
5764
|
className: cn("py-4 space-y-3", className),
|
|
5532
5765
|
...props,
|
|
5533
5766
|
children: [
|
|
5534
|
-
/* @__PURE__ */ (0,
|
|
5535
|
-
/* @__PURE__ */ (0,
|
|
5536
|
-
/* @__PURE__ */ (0,
|
|
5767
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-4 w-24" }),
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-8 w-16" }),
|
|
5769
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Skeleton, { className: "h-12 w-full" })
|
|
5537
5770
|
]
|
|
5538
5771
|
}
|
|
5539
5772
|
);
|
|
5540
5773
|
}
|
|
5541
|
-
return /* @__PURE__ */ (0,
|
|
5774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5542
5775
|
Card,
|
|
5543
5776
|
{
|
|
5544
5777
|
ref,
|
|
@@ -5550,9 +5783,9 @@ var MetricCard = React18.forwardRef(
|
|
|
5550
5783
|
}
|
|
5551
5784
|
);
|
|
5552
5785
|
MetricCard.displayName = "MetricCard";
|
|
5553
|
-
var MetricCardHeader =
|
|
5786
|
+
var MetricCardHeader = React20.forwardRef(
|
|
5554
5787
|
({ className, href, children, ...props }, ref) => {
|
|
5555
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5556
5789
|
"div",
|
|
5557
5790
|
{
|
|
5558
5791
|
ref,
|
|
@@ -5560,14 +5793,14 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5560
5793
|
...props,
|
|
5561
5794
|
children: [
|
|
5562
5795
|
children,
|
|
5563
|
-
href && /* @__PURE__ */ (0,
|
|
5796
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5564
5797
|
"a",
|
|
5565
5798
|
{
|
|
5566
5799
|
href,
|
|
5567
5800
|
target: "_blank",
|
|
5568
5801
|
rel: "noopener noreferrer",
|
|
5569
5802
|
className: "text-foreground-lighter hover:text-foreground transition-colors",
|
|
5570
|
-
children: /* @__PURE__ */ (0,
|
|
5803
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react20.ExternalLink, { className: "h-3.5 w-3.5" })
|
|
5571
5804
|
}
|
|
5572
5805
|
)
|
|
5573
5806
|
]
|
|
@@ -5576,9 +5809,9 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5576
5809
|
}
|
|
5577
5810
|
);
|
|
5578
5811
|
MetricCardHeader.displayName = "MetricCardHeader";
|
|
5579
|
-
var MetricCardLabel =
|
|
5812
|
+
var MetricCardLabel = React20.forwardRef(
|
|
5580
5813
|
({ className, tooltip, icon, children, ...props }, ref) => {
|
|
5581
|
-
const label = /* @__PURE__ */ (0,
|
|
5814
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5582
5815
|
"h3",
|
|
5583
5816
|
{
|
|
5584
5817
|
ref,
|
|
@@ -5587,28 +5820,28 @@ var MetricCardLabel = React18.forwardRef(
|
|
|
5587
5820
|
className
|
|
5588
5821
|
),
|
|
5589
5822
|
...props,
|
|
5590
|
-
children: /* @__PURE__ */ (0,
|
|
5591
|
-
icon && /* @__PURE__ */ (0,
|
|
5592
|
-
/* @__PURE__ */ (0,
|
|
5823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
5824
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "flex-shrink-0", children: icon }),
|
|
5825
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children })
|
|
5593
5826
|
] })
|
|
5594
5827
|
}
|
|
5595
5828
|
);
|
|
5596
5829
|
if (tooltip) {
|
|
5597
|
-
return /* @__PURE__ */ (0,
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5830
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Tooltip, { children: [
|
|
5831
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-1.5 cursor-help", children: [
|
|
5599
5832
|
label,
|
|
5600
|
-
/* @__PURE__ */ (0,
|
|
5833
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react20.Info, { className: "h-3.5 w-3.5 text-foreground-lighter" })
|
|
5601
5834
|
] }) }),
|
|
5602
|
-
/* @__PURE__ */ (0,
|
|
5835
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "max-w-xs", children: tooltip }) })
|
|
5603
5836
|
] }) });
|
|
5604
5837
|
}
|
|
5605
5838
|
return label;
|
|
5606
5839
|
}
|
|
5607
5840
|
);
|
|
5608
5841
|
MetricCardLabel.displayName = "MetricCardLabel";
|
|
5609
|
-
var MetricCardContent =
|
|
5842
|
+
var MetricCardContent = React20.forwardRef(
|
|
5610
5843
|
({ className, children, ...props }, ref) => {
|
|
5611
|
-
return /* @__PURE__ */ (0,
|
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5612
5845
|
"div",
|
|
5613
5846
|
{
|
|
5614
5847
|
ref,
|
|
@@ -5620,9 +5853,9 @@ var MetricCardContent = React18.forwardRef(
|
|
|
5620
5853
|
}
|
|
5621
5854
|
);
|
|
5622
5855
|
MetricCardContent.displayName = "MetricCardContent";
|
|
5623
|
-
var MetricCardValue =
|
|
5856
|
+
var MetricCardValue = React20.forwardRef(
|
|
5624
5857
|
({ className, children, ...props }, ref) => {
|
|
5625
|
-
return /* @__PURE__ */ (0,
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5626
5859
|
"div",
|
|
5627
5860
|
{
|
|
5628
5861
|
ref,
|
|
@@ -5634,7 +5867,7 @@ var MetricCardValue = React18.forwardRef(
|
|
|
5634
5867
|
}
|
|
5635
5868
|
);
|
|
5636
5869
|
MetricCardValue.displayName = "MetricCardValue";
|
|
5637
|
-
var MetricCardDifferential =
|
|
5870
|
+
var MetricCardDifferential = React20.forwardRef(
|
|
5638
5871
|
({ className, variant = "positive", children, ...props }, ref) => {
|
|
5639
5872
|
const childrenString = typeof children === "string" ? children : String(children);
|
|
5640
5873
|
const signMatch = childrenString.match(/^([+\-])|([+\-])$/);
|
|
@@ -5644,7 +5877,7 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5644
5877
|
sign = signMatch[1] || signMatch[2] || "";
|
|
5645
5878
|
value = childrenString.replace(/^[+\-]|[+\-]$/, "").trim();
|
|
5646
5879
|
}
|
|
5647
|
-
return /* @__PURE__ */ (0,
|
|
5880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5648
5881
|
"div",
|
|
5649
5882
|
{
|
|
5650
5883
|
ref,
|
|
@@ -5655,19 +5888,19 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5655
5888
|
),
|
|
5656
5889
|
...props,
|
|
5657
5890
|
children: [
|
|
5658
|
-
/* @__PURE__ */ (0,
|
|
5659
|
-
sign && /* @__PURE__ */ (0,
|
|
5891
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: value }),
|
|
5892
|
+
sign && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "inline-block", dir: "ltr", children: sign })
|
|
5660
5893
|
]
|
|
5661
5894
|
}
|
|
5662
5895
|
);
|
|
5663
5896
|
}
|
|
5664
5897
|
);
|
|
5665
5898
|
MetricCardDifferential.displayName = "MetricCardDifferential";
|
|
5666
|
-
var MetricCardSparkline =
|
|
5899
|
+
var MetricCardSparkline = React20.forwardRef(
|
|
5667
5900
|
({ data, dataKey, usePersianCalendar = false, className }, _ref) => {
|
|
5668
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
5669
|
-
const [tooltipPosition, setTooltipPosition] =
|
|
5670
|
-
const containerRef =
|
|
5901
|
+
const [hoveredIndex, setHoveredIndex] = React20.useState(null);
|
|
5902
|
+
const [tooltipPosition, setTooltipPosition] = React20.useState({ x: 0, y: 0 });
|
|
5903
|
+
const containerRef = React20.useRef(null);
|
|
5671
5904
|
if (!data || data.length === 0) return null;
|
|
5672
5905
|
const values = data.map((item) => item[dataKey]);
|
|
5673
5906
|
const timestamps = data.map((item) => new Date(item.timestamp));
|
|
@@ -5693,7 +5926,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5693
5926
|
areaPath += ` L ${points[0].x},${height}`;
|
|
5694
5927
|
areaPath += ` Z`;
|
|
5695
5928
|
const isPositive = values[values.length - 1] >= values[0];
|
|
5696
|
-
const gradientId =
|
|
5929
|
+
const gradientId = React20.useId();
|
|
5697
5930
|
const handleMouseMove = (e) => {
|
|
5698
5931
|
if (!containerRef.current) return;
|
|
5699
5932
|
const rect = containerRef.current.getBoundingClientRect();
|
|
@@ -5728,7 +5961,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5728
5961
|
return (0, import_date_fns2.format)(date, "MMM d");
|
|
5729
5962
|
}
|
|
5730
5963
|
};
|
|
5731
|
-
return /* @__PURE__ */ (0,
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5732
5965
|
"div",
|
|
5733
5966
|
{
|
|
5734
5967
|
ref: containerRef,
|
|
@@ -5736,7 +5969,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5736
5969
|
onMouseMove: handleMouseMove,
|
|
5737
5970
|
onMouseLeave: handleMouseLeave,
|
|
5738
5971
|
children: [
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
5972
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5740
5973
|
"svg",
|
|
5741
5974
|
{
|
|
5742
5975
|
width: "100%",
|
|
@@ -5745,8 +5978,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5745
5978
|
preserveAspectRatio: "none",
|
|
5746
5979
|
className: "overflow-visible",
|
|
5747
5980
|
children: [
|
|
5748
|
-
/* @__PURE__ */ (0,
|
|
5749
|
-
/* @__PURE__ */ (0,
|
|
5981
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: gradientId, x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5750
5983
|
"stop",
|
|
5751
5984
|
{
|
|
5752
5985
|
offset: "0%",
|
|
@@ -5757,7 +5990,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5757
5990
|
)
|
|
5758
5991
|
}
|
|
5759
5992
|
),
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5761
5994
|
"stop",
|
|
5762
5995
|
{
|
|
5763
5996
|
offset: "100%",
|
|
@@ -5769,14 +6002,14 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5769
6002
|
}
|
|
5770
6003
|
)
|
|
5771
6004
|
] }) }),
|
|
5772
|
-
/* @__PURE__ */ (0,
|
|
6005
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5773
6006
|
"path",
|
|
5774
6007
|
{
|
|
5775
6008
|
d: areaPath,
|
|
5776
6009
|
fill: `url(#${gradientId})`
|
|
5777
6010
|
}
|
|
5778
6011
|
),
|
|
5779
|
-
/* @__PURE__ */ (0,
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5780
6013
|
"path",
|
|
5781
6014
|
{
|
|
5782
6015
|
d: pathData,
|
|
@@ -5790,8 +6023,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5790
6023
|
)
|
|
5791
6024
|
}
|
|
5792
6025
|
),
|
|
5793
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
5794
|
-
/* @__PURE__ */ (0,
|
|
6026
|
+
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
|
|
6027
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5795
6028
|
"line",
|
|
5796
6029
|
{
|
|
5797
6030
|
x1: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5804,7 +6037,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5804
6037
|
className: "text-foreground-lighter opacity-50"
|
|
5805
6038
|
}
|
|
5806
6039
|
),
|
|
5807
|
-
/* @__PURE__ */ (0,
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5808
6041
|
"circle",
|
|
5809
6042
|
{
|
|
5810
6043
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5818,7 +6051,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5818
6051
|
)
|
|
5819
6052
|
}
|
|
5820
6053
|
),
|
|
5821
|
-
/* @__PURE__ */ (0,
|
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5822
6055
|
"circle",
|
|
5823
6056
|
{
|
|
5824
6057
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5834,7 +6067,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5834
6067
|
]
|
|
5835
6068
|
}
|
|
5836
6069
|
),
|
|
5837
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
6070
|
+
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5838
6071
|
"div",
|
|
5839
6072
|
{
|
|
5840
6073
|
className: "absolute z-50 pointer-events-none",
|
|
@@ -5842,9 +6075,9 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5842
6075
|
left: `${tooltipPosition.x + 8}px`,
|
|
5843
6076
|
top: `${tooltipPosition.y - 40}px`
|
|
5844
6077
|
},
|
|
5845
|
-
children: /* @__PURE__ */ (0,
|
|
5846
|
-
/* @__PURE__ */ (0,
|
|
5847
|
-
/* @__PURE__ */ (0,
|
|
6078
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "bg-background-surface-100 border border-border-default rounded-md shadow-lg px-2 py-1.5", children: [
|
|
6079
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs text-foreground-lighter", children: formatDate(points[hoveredIndex].timestamp) }),
|
|
6080
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "text-xs font-medium tabular-nums mt-0.5", children: points[hoveredIndex].value.toLocaleString(usePersianCalendar ? "fa-IR" : "en-US") })
|
|
5848
6081
|
] })
|
|
5849
6082
|
}
|
|
5850
6083
|
)
|
|
@@ -5856,16 +6089,16 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5856
6089
|
MetricCardSparkline.displayName = "MetricCardSparkline";
|
|
5857
6090
|
|
|
5858
6091
|
// src/components/ui/native-select.tsx
|
|
5859
|
-
var
|
|
5860
|
-
var
|
|
6092
|
+
var import_lucide_react21 = require("lucide-react");
|
|
6093
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5861
6094
|
function NativeSelect({ className, ...props }) {
|
|
5862
|
-
return /* @__PURE__ */ (0,
|
|
6095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
5863
6096
|
"div",
|
|
5864
6097
|
{
|
|
5865
6098
|
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
5866
6099
|
"data-slot": "native-select-wrapper",
|
|
5867
6100
|
children: [
|
|
5868
|
-
/* @__PURE__ */ (0,
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5869
6102
|
"select",
|
|
5870
6103
|
{
|
|
5871
6104
|
"data-slot": "native-select",
|
|
@@ -5887,8 +6120,8 @@ function NativeSelect({ className, ...props }) {
|
|
|
5887
6120
|
...props
|
|
5888
6121
|
}
|
|
5889
6122
|
),
|
|
5890
|
-
/* @__PURE__ */ (0,
|
|
5891
|
-
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6124
|
+
import_lucide_react21.ChevronDownIcon,
|
|
5892
6125
|
{
|
|
5893
6126
|
className: "pointer-events-none absolute top-1/2 end-3 size-4 -translate-y-1/2 text-foreground-muted select-none",
|
|
5894
6127
|
"aria-hidden": "true",
|
|
@@ -5900,13 +6133,13 @@ function NativeSelect({ className, ...props }) {
|
|
|
5900
6133
|
);
|
|
5901
6134
|
}
|
|
5902
6135
|
function NativeSelectOption({ ...props }) {
|
|
5903
|
-
return /* @__PURE__ */ (0,
|
|
6136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { "data-slot": "native-select-option", ...props });
|
|
5904
6137
|
}
|
|
5905
6138
|
function NativeSelectOptGroup({
|
|
5906
6139
|
className,
|
|
5907
6140
|
...props
|
|
5908
6141
|
}) {
|
|
5909
|
-
return /* @__PURE__ */ (0,
|
|
6142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5910
6143
|
"optgroup",
|
|
5911
6144
|
{
|
|
5912
6145
|
"data-slot": "native-select-optgroup",
|
|
@@ -5918,16 +6151,16 @@ function NativeSelectOptGroup({
|
|
|
5918
6151
|
|
|
5919
6152
|
// src/components/ui/navigation-menu.tsx
|
|
5920
6153
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
5921
|
-
var
|
|
5922
|
-
var
|
|
5923
|
-
var
|
|
6154
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
6155
|
+
var import_lucide_react22 = require("lucide-react");
|
|
6156
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5924
6157
|
function NavigationMenu({
|
|
5925
6158
|
className,
|
|
5926
6159
|
children,
|
|
5927
6160
|
viewport = true,
|
|
5928
6161
|
...props
|
|
5929
6162
|
}) {
|
|
5930
|
-
return /* @__PURE__ */ (0,
|
|
6163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5931
6164
|
NavigationMenuPrimitive.Root,
|
|
5932
6165
|
{
|
|
5933
6166
|
"data-slot": "navigation-menu",
|
|
@@ -5939,7 +6172,7 @@ function NavigationMenu({
|
|
|
5939
6172
|
...props,
|
|
5940
6173
|
children: [
|
|
5941
6174
|
children,
|
|
5942
|
-
viewport && /* @__PURE__ */ (0,
|
|
6175
|
+
viewport && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NavigationMenuViewport, {})
|
|
5943
6176
|
]
|
|
5944
6177
|
}
|
|
5945
6178
|
);
|
|
@@ -5948,7 +6181,7 @@ function NavigationMenuList({
|
|
|
5948
6181
|
className,
|
|
5949
6182
|
...props
|
|
5950
6183
|
}) {
|
|
5951
|
-
return /* @__PURE__ */ (0,
|
|
6184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5952
6185
|
NavigationMenuPrimitive.List,
|
|
5953
6186
|
{
|
|
5954
6187
|
"data-slot": "navigation-menu-list",
|
|
@@ -5964,7 +6197,7 @@ function NavigationMenuItem({
|
|
|
5964
6197
|
className,
|
|
5965
6198
|
...props
|
|
5966
6199
|
}) {
|
|
5967
|
-
return /* @__PURE__ */ (0,
|
|
6200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5968
6201
|
NavigationMenuPrimitive.Item,
|
|
5969
6202
|
{
|
|
5970
6203
|
"data-slot": "navigation-menu-item",
|
|
@@ -5973,7 +6206,7 @@ function NavigationMenuItem({
|
|
|
5973
6206
|
}
|
|
5974
6207
|
);
|
|
5975
6208
|
}
|
|
5976
|
-
var navigationMenuTriggerStyle = (0,
|
|
6209
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority11.cva)(
|
|
5977
6210
|
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
5978
6211
|
);
|
|
5979
6212
|
function NavigationMenuTrigger({
|
|
@@ -5981,7 +6214,7 @@ function NavigationMenuTrigger({
|
|
|
5981
6214
|
children,
|
|
5982
6215
|
...props
|
|
5983
6216
|
}) {
|
|
5984
|
-
return /* @__PURE__ */ (0,
|
|
6217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5985
6218
|
NavigationMenuPrimitive.Trigger,
|
|
5986
6219
|
{
|
|
5987
6220
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -5990,8 +6223,8 @@ function NavigationMenuTrigger({
|
|
|
5990
6223
|
children: [
|
|
5991
6224
|
children,
|
|
5992
6225
|
" ",
|
|
5993
|
-
/* @__PURE__ */ (0,
|
|
5994
|
-
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6227
|
+
import_lucide_react22.ChevronDownIcon,
|
|
5995
6228
|
{
|
|
5996
6229
|
className: "relative top-[1px] ms-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
5997
6230
|
"aria-hidden": "true"
|
|
@@ -6005,7 +6238,7 @@ function NavigationMenuContent({
|
|
|
6005
6238
|
className,
|
|
6006
6239
|
...props
|
|
6007
6240
|
}) {
|
|
6008
|
-
return /* @__PURE__ */ (0,
|
|
6241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6009
6242
|
NavigationMenuPrimitive.Content,
|
|
6010
6243
|
{
|
|
6011
6244
|
"data-slot": "navigation-menu-content",
|
|
@@ -6022,13 +6255,13 @@ function NavigationMenuViewport({
|
|
|
6022
6255
|
className,
|
|
6023
6256
|
...props
|
|
6024
6257
|
}) {
|
|
6025
|
-
return /* @__PURE__ */ (0,
|
|
6258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6026
6259
|
"div",
|
|
6027
6260
|
{
|
|
6028
6261
|
className: cn(
|
|
6029
6262
|
"absolute top-full start-0 isolate z-50 flex justify-center"
|
|
6030
6263
|
),
|
|
6031
|
-
children: /* @__PURE__ */ (0,
|
|
6264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6032
6265
|
NavigationMenuPrimitive.Viewport,
|
|
6033
6266
|
{
|
|
6034
6267
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -6046,7 +6279,7 @@ function NavigationMenuLink({
|
|
|
6046
6279
|
className,
|
|
6047
6280
|
...props
|
|
6048
6281
|
}) {
|
|
6049
|
-
return /* @__PURE__ */ (0,
|
|
6282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6050
6283
|
NavigationMenuPrimitive.Link,
|
|
6051
6284
|
{
|
|
6052
6285
|
"data-slot": "navigation-menu-link",
|
|
@@ -6062,7 +6295,7 @@ function NavigationMenuIndicator({
|
|
|
6062
6295
|
className,
|
|
6063
6296
|
...props
|
|
6064
6297
|
}) {
|
|
6065
|
-
return /* @__PURE__ */ (0,
|
|
6298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6066
6299
|
NavigationMenuPrimitive.Indicator,
|
|
6067
6300
|
{
|
|
6068
6301
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -6071,18 +6304,18 @@ function NavigationMenuIndicator({
|
|
|
6071
6304
|
className
|
|
6072
6305
|
),
|
|
6073
6306
|
...props,
|
|
6074
|
-
children: /* @__PURE__ */ (0,
|
|
6307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
6075
6308
|
}
|
|
6076
6309
|
);
|
|
6077
6310
|
}
|
|
6078
6311
|
|
|
6079
6312
|
// src/components/ui/pagination.tsx
|
|
6080
|
-
var
|
|
6081
|
-
var
|
|
6082
|
-
var
|
|
6083
|
-
var PaginationDirectionContext =
|
|
6313
|
+
var React21 = __toESM(require("react"), 1);
|
|
6314
|
+
var import_lucide_react23 = require("lucide-react");
|
|
6315
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6316
|
+
var PaginationDirectionContext = React21.createContext("rtl");
|
|
6084
6317
|
function usePaginationDirection() {
|
|
6085
|
-
return
|
|
6318
|
+
return React21.useContext(PaginationDirectionContext);
|
|
6086
6319
|
}
|
|
6087
6320
|
function Pagination({
|
|
6088
6321
|
className,
|
|
@@ -6091,7 +6324,7 @@ function Pagination({
|
|
|
6091
6324
|
...props
|
|
6092
6325
|
}) {
|
|
6093
6326
|
const resolvedDir = dir ?? "rtl";
|
|
6094
|
-
return /* @__PURE__ */ (0,
|
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PaginationDirectionContext.Provider, { value: resolvedDir, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6095
6328
|
"nav",
|
|
6096
6329
|
{
|
|
6097
6330
|
role: "navigation",
|
|
@@ -6109,7 +6342,7 @@ function PaginationContent({
|
|
|
6109
6342
|
...props
|
|
6110
6343
|
}) {
|
|
6111
6344
|
const dir = usePaginationDirection();
|
|
6112
|
-
return /* @__PURE__ */ (0,
|
|
6345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6113
6346
|
"ul",
|
|
6114
6347
|
{
|
|
6115
6348
|
"data-slot": "pagination-content",
|
|
@@ -6123,7 +6356,7 @@ function PaginationContent({
|
|
|
6123
6356
|
);
|
|
6124
6357
|
}
|
|
6125
6358
|
function PaginationItem({ ...props }) {
|
|
6126
|
-
return /* @__PURE__ */ (0,
|
|
6359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
6127
6360
|
}
|
|
6128
6361
|
function PaginationLink({
|
|
6129
6362
|
className,
|
|
@@ -6134,7 +6367,7 @@ function PaginationLink({
|
|
|
6134
6367
|
}) {
|
|
6135
6368
|
const contextDir = usePaginationDirection();
|
|
6136
6369
|
const linkDir = dir ?? (contextDir === "rtl" ? "rtl" : "ltr");
|
|
6137
|
-
return /* @__PURE__ */ (0,
|
|
6370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6138
6371
|
"a",
|
|
6139
6372
|
{
|
|
6140
6373
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -6167,8 +6400,8 @@ function PaginationPrevious({
|
|
|
6167
6400
|
const dir = usePaginationDirection();
|
|
6168
6401
|
const isRTL = dir === "rtl";
|
|
6169
6402
|
const label = isRTL ? "\u0642\u0628\u0644\u06CC" : "Previous";
|
|
6170
|
-
const Icon2 = isRTL ?
|
|
6171
|
-
return /* @__PURE__ */ (0,
|
|
6403
|
+
const Icon2 = isRTL ? import_lucide_react23.ChevronRightIcon : import_lucide_react23.ChevronLeftIcon;
|
|
6404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6172
6405
|
PaginationLink,
|
|
6173
6406
|
{
|
|
6174
6407
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0642\u0628\u0644\u06CC" : "Go to previous page",
|
|
@@ -6180,8 +6413,8 @@ function PaginationPrevious({
|
|
|
6180
6413
|
dir: "ltr",
|
|
6181
6414
|
...props,
|
|
6182
6415
|
children: [
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6416
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" }),
|
|
6417
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label })
|
|
6185
6418
|
]
|
|
6186
6419
|
}
|
|
6187
6420
|
);
|
|
@@ -6193,8 +6426,8 @@ function PaginationNext({
|
|
|
6193
6426
|
const dir = usePaginationDirection();
|
|
6194
6427
|
const isRTL = dir === "rtl";
|
|
6195
6428
|
const label = isRTL ? "\u0628\u0639\u062F\u06CC" : "Next";
|
|
6196
|
-
const Icon2 = isRTL ?
|
|
6197
|
-
return /* @__PURE__ */ (0,
|
|
6429
|
+
const Icon2 = isRTL ? import_lucide_react23.ChevronLeftIcon : import_lucide_react23.ChevronRightIcon;
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6198
6431
|
PaginationLink,
|
|
6199
6432
|
{
|
|
6200
6433
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0628\u0639\u062F\u06CC" : "Go to next page",
|
|
@@ -6205,12 +6438,12 @@ function PaginationNext({
|
|
|
6205
6438
|
),
|
|
6206
6439
|
dir: "ltr",
|
|
6207
6440
|
...props,
|
|
6208
|
-
children: isRTL ? /* @__PURE__ */ (0,
|
|
6209
|
-
/* @__PURE__ */ (0,
|
|
6210
|
-
/* @__PURE__ */ (0,
|
|
6211
|
-
] }) : /* @__PURE__ */ (0,
|
|
6212
|
-
/* @__PURE__ */ (0,
|
|
6213
|
-
/* @__PURE__ */ (0,
|
|
6441
|
+
children: isRTL ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
6442
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" }),
|
|
6443
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label })
|
|
6444
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
|
|
6445
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "hidden sm:inline no-underline", children: label }),
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Icon2, { className: "size-4" })
|
|
6214
6447
|
] })
|
|
6215
6448
|
}
|
|
6216
6449
|
);
|
|
@@ -6219,7 +6452,7 @@ function PaginationEllipsis({
|
|
|
6219
6452
|
className,
|
|
6220
6453
|
...props
|
|
6221
6454
|
}) {
|
|
6222
|
-
return /* @__PURE__ */ (0,
|
|
6455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6223
6456
|
"span",
|
|
6224
6457
|
{
|
|
6225
6458
|
"aria-hidden": true,
|
|
@@ -6227,15 +6460,15 @@ function PaginationEllipsis({
|
|
|
6227
6460
|
className: cn("flex size-9 items-center justify-center", className),
|
|
6228
6461
|
...props,
|
|
6229
6462
|
children: [
|
|
6230
|
-
/* @__PURE__ */ (0,
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6463
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.MoreHorizontalIcon, { className: "size-4" }),
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
6232
6465
|
]
|
|
6233
6466
|
}
|
|
6234
6467
|
);
|
|
6235
6468
|
}
|
|
6236
6469
|
|
|
6237
6470
|
// src/components/ui/pagination-controlled.tsx
|
|
6238
|
-
var
|
|
6471
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6239
6472
|
function PaginationControlled({
|
|
6240
6473
|
currentPage,
|
|
6241
6474
|
totalPages,
|
|
@@ -6298,8 +6531,8 @@ function PaginationControlled({
|
|
|
6298
6531
|
const pageNumbers = generatePageNumbers();
|
|
6299
6532
|
const showFirstButton = showFirstLast && !pageNumbers.includes(1) && currentPage > 1;
|
|
6300
6533
|
const showLastButton = showFirstLast && !pageNumbers.includes(totalPages) && currentPage < totalPages;
|
|
6301
|
-
return /* @__PURE__ */ (0,
|
|
6302
|
-
showFirstButton && /* @__PURE__ */ (0,
|
|
6534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Pagination, { className, dir, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(PaginationContent, { children: [
|
|
6535
|
+
showFirstButton && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6303
6536
|
PaginationLink,
|
|
6304
6537
|
{
|
|
6305
6538
|
href: "#",
|
|
@@ -6310,7 +6543,7 @@ function PaginationControlled({
|
|
|
6310
6543
|
children: 1 .toLocaleString("fa-IR")
|
|
6311
6544
|
}
|
|
6312
6545
|
) }),
|
|
6313
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6546
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6314
6547
|
PaginationPrevious,
|
|
6315
6548
|
{
|
|
6316
6549
|
href: "#",
|
|
@@ -6323,9 +6556,9 @@ function PaginationControlled({
|
|
|
6323
6556
|
) }),
|
|
6324
6557
|
pageNumbers.map((page, index) => {
|
|
6325
6558
|
if (page === "ellipsis") {
|
|
6326
|
-
return /* @__PURE__ */ (0,
|
|
6559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationEllipsis, {}) }, `ellipsis-${index}`);
|
|
6327
6560
|
}
|
|
6328
|
-
return /* @__PURE__ */ (0,
|
|
6561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6329
6562
|
PaginationLink,
|
|
6330
6563
|
{
|
|
6331
6564
|
href: "#",
|
|
@@ -6338,7 +6571,7 @@ function PaginationControlled({
|
|
|
6338
6571
|
}
|
|
6339
6572
|
) }, page);
|
|
6340
6573
|
}),
|
|
6341
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6574
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6342
6575
|
PaginationNext,
|
|
6343
6576
|
{
|
|
6344
6577
|
href: "#",
|
|
@@ -6349,7 +6582,7 @@ function PaginationControlled({
|
|
|
6349
6582
|
className: currentPage === totalPages ? "pointer-events-none opacity-50" : ""
|
|
6350
6583
|
}
|
|
6351
6584
|
) }),
|
|
6352
|
-
showLastButton && /* @__PURE__ */ (0,
|
|
6585
|
+
showLastButton && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6353
6586
|
PaginationLink,
|
|
6354
6587
|
{
|
|
6355
6588
|
href: "#",
|
|
@@ -6364,8 +6597,8 @@ function PaginationControlled({
|
|
|
6364
6597
|
}
|
|
6365
6598
|
|
|
6366
6599
|
// src/components/ui/profile-card.tsx
|
|
6367
|
-
var
|
|
6368
|
-
var
|
|
6600
|
+
var React22 = __toESM(require("react"), 1);
|
|
6601
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6369
6602
|
var formatFollowers2 = (count) => {
|
|
6370
6603
|
if (count >= 1e6) {
|
|
6371
6604
|
return `${(count / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
@@ -6375,7 +6608,7 @@ var formatFollowers2 = (count) => {
|
|
|
6375
6608
|
}
|
|
6376
6609
|
return count.toString();
|
|
6377
6610
|
};
|
|
6378
|
-
var ProfileCard =
|
|
6611
|
+
var ProfileCard = React22.forwardRef(
|
|
6379
6612
|
({
|
|
6380
6613
|
className,
|
|
6381
6614
|
name,
|
|
@@ -6423,7 +6656,7 @@ var ProfileCard = React20.forwardRef(
|
|
|
6423
6656
|
transparent: "bg-transparent border border-border"
|
|
6424
6657
|
};
|
|
6425
6658
|
const currentSize = sizeClasses[size];
|
|
6426
|
-
return /* @__PURE__ */ (0,
|
|
6659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6427
6660
|
"div",
|
|
6428
6661
|
{
|
|
6429
6662
|
ref,
|
|
@@ -6437,22 +6670,22 @@ var ProfileCard = React20.forwardRef(
|
|
|
6437
6670
|
onClick: onCardClick,
|
|
6438
6671
|
...props,
|
|
6439
6672
|
children: [
|
|
6440
|
-
/* @__PURE__ */ (0,
|
|
6441
|
-
/* @__PURE__ */ (0,
|
|
6442
|
-
/* @__PURE__ */ (0,
|
|
6443
|
-
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ (0,
|
|
6444
|
-
/* @__PURE__ */ (0,
|
|
6445
|
-
/* @__PURE__ */ (0,
|
|
6446
|
-
] }) : /* @__PURE__ */ (0,
|
|
6447
|
-
/* @__PURE__ */ (0,
|
|
6448
|
-
/* @__PURE__ */ (0,
|
|
6673
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative flex-shrink-0", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-amber-500 via-yellow-400 to-amber-500", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6674
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6675
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6676
|
+
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-offset-2 ring-offset-background ring-primary"), children: [
|
|
6677
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6678
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6679
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Avatar, { className: currentSize.avatar, children: [
|
|
6680
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6681
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6449
6682
|
] }) }),
|
|
6450
|
-
/* @__PURE__ */ (0,
|
|
6451
|
-
/* @__PURE__ */ (0,
|
|
6452
|
-
/* @__PURE__ */ (0,
|
|
6453
|
-
followers !== void 0 && /* @__PURE__ */ (0,
|
|
6454
|
-
followersIcon && /* @__PURE__ */ (0,
|
|
6455
|
-
/* @__PURE__ */ (0,
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col items-center gap-0.5 w-full", children: [
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("h3", { className: cn("font-semibold text-foreground text-center", currentSize.name), children: name }),
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: cn("text-muted-foreground text-center", currentSize.username), children: username }),
|
|
6686
|
+
followers !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex items-center gap-1.5 text-muted-foreground mt-0.5", currentSize.followers), children: [
|
|
6687
|
+
followersIcon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn("flex-shrink-0", currentSize.iconSize), children: followersIcon }),
|
|
6688
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "font-medium", children: formatFollowers2(followers) })
|
|
6456
6689
|
] })
|
|
6457
6690
|
] })
|
|
6458
6691
|
]
|
|
@@ -6463,9 +6696,9 @@ var ProfileCard = React20.forwardRef(
|
|
|
6463
6696
|
ProfileCard.displayName = "ProfileCard";
|
|
6464
6697
|
|
|
6465
6698
|
// src/components/ui/profile-info.tsx
|
|
6466
|
-
var
|
|
6467
|
-
var
|
|
6468
|
-
var ProfileInfo =
|
|
6699
|
+
var React23 = __toESM(require("react"), 1);
|
|
6700
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6701
|
+
var ProfileInfo = React23.forwardRef(
|
|
6469
6702
|
({
|
|
6470
6703
|
className,
|
|
6471
6704
|
name,
|
|
@@ -6520,7 +6753,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6520
6753
|
none: ""
|
|
6521
6754
|
};
|
|
6522
6755
|
const currentSize = sizeClasses[size];
|
|
6523
|
-
return /* @__PURE__ */ (0,
|
|
6756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6524
6757
|
"div",
|
|
6525
6758
|
{
|
|
6526
6759
|
ref,
|
|
@@ -6534,24 +6767,24 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6534
6767
|
onClick: onProfileClick,
|
|
6535
6768
|
...props,
|
|
6536
6769
|
children: [
|
|
6537
|
-
/* @__PURE__ */ (0,
|
|
6538
|
-
/* @__PURE__ */ (0,
|
|
6539
|
-
/* @__PURE__ */ (0,
|
|
6540
|
-
/* @__PURE__ */ (0,
|
|
6541
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
6542
|
-
/* @__PURE__ */ (0,
|
|
6543
|
-
/* @__PURE__ */ (0,
|
|
6770
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
6771
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "relative", children: avatarBorderVariant === "gold" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "relative p-0.5 rounded-full bg-gradient-to-br from-amber-500 via-yellow-400 to-amber-500", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Avatar, { className: cn(currentSize.avatar, "ring-2 ring-background"), children: [
|
|
6772
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6773
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6774
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Avatar, { className: cn(currentSize.avatar, borderClasses[avatarBorderVariant]), children: [
|
|
6775
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarImage, { src: avatarSrc, alt: avatarAlt || name }),
|
|
6776
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(AvatarFallback, { className: "bg-surface-300 text-foreground font-medium", children: initials || name.charAt(0) })
|
|
6544
6777
|
] }) }),
|
|
6545
|
-
/* @__PURE__ */ (0,
|
|
6546
|
-
/* @__PURE__ */ (0,
|
|
6547
|
-
/* @__PURE__ */ (0,
|
|
6548
|
-
infoText && /* @__PURE__ */ (0,
|
|
6549
|
-
infoIcon && /* @__PURE__ */ (0,
|
|
6550
|
-
/* @__PURE__ */ (0,
|
|
6778
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
6779
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("h3", { className: cn("font-semibold text-foreground", currentSize.name), children: name }),
|
|
6780
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: cn("text-muted-foreground", currentSize.username), children: username }),
|
|
6781
|
+
infoText && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex items-center gap-1.5 text-muted-foreground", currentSize.info), children: [
|
|
6782
|
+
infoIcon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex-shrink-0", children: infoIcon }),
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-medium", children: infoText })
|
|
6551
6784
|
] })
|
|
6552
6785
|
] })
|
|
6553
6786
|
] }),
|
|
6554
|
-
(actionIcon || onActionClick) && /* @__PURE__ */ (0,
|
|
6787
|
+
(actionIcon || onActionClick) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6555
6788
|
Button,
|
|
6556
6789
|
{
|
|
6557
6790
|
variant: "ghost",
|
|
@@ -6562,7 +6795,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6562
6795
|
onActionClick?.();
|
|
6563
6796
|
},
|
|
6564
6797
|
"aria-label": "\u0639\u0645\u0644\u06CC\u0627\u062A",
|
|
6565
|
-
children: actionIcon || /* @__PURE__ */ (0,
|
|
6798
|
+
children: actionIcon || /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6566
6799
|
"svg",
|
|
6567
6800
|
{
|
|
6568
6801
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6575,9 +6808,9 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6575
6808
|
strokeLinecap: "round",
|
|
6576
6809
|
strokeLinejoin: "round",
|
|
6577
6810
|
children: [
|
|
6578
|
-
/* @__PURE__ */ (0,
|
|
6579
|
-
/* @__PURE__ */ (0,
|
|
6580
|
-
/* @__PURE__ */ (0,
|
|
6811
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
|
6812
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "5", r: "1" }),
|
|
6813
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: "12", cy: "19", r: "1" })
|
|
6581
6814
|
]
|
|
6582
6815
|
}
|
|
6583
6816
|
)
|
|
@@ -6591,9 +6824,9 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6591
6824
|
ProfileInfo.displayName = "ProfileInfo";
|
|
6592
6825
|
|
|
6593
6826
|
// src/components/ui/engagement-rate.tsx
|
|
6594
|
-
var
|
|
6595
|
-
var
|
|
6596
|
-
var
|
|
6827
|
+
var React24 = __toESM(require("react"), 1);
|
|
6828
|
+
var import_lucide_react24 = require("lucide-react");
|
|
6829
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
6597
6830
|
var convertToLocalNumbers2 = (text, locale) => {
|
|
6598
6831
|
if (locale === "fa" || locale === "ar") {
|
|
6599
6832
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -6652,17 +6885,17 @@ var getGroupIcon = (group) => {
|
|
|
6652
6885
|
const iconClass = "w-12 h-12 text-primary";
|
|
6653
6886
|
switch (group) {
|
|
6654
6887
|
case "nano":
|
|
6655
|
-
return /* @__PURE__ */ (0,
|
|
6888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Users, { className: iconClass });
|
|
6656
6889
|
case "micro":
|
|
6657
|
-
return /* @__PURE__ */ (0,
|
|
6890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.UserCheck, { className: iconClass });
|
|
6658
6891
|
case "mid":
|
|
6659
|
-
return /* @__PURE__ */ (0,
|
|
6892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.TrendingUp, { className: iconClass });
|
|
6660
6893
|
case "macro":
|
|
6661
|
-
return /* @__PURE__ */ (0,
|
|
6894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Award, { className: iconClass });
|
|
6662
6895
|
case "mega":
|
|
6663
|
-
return /* @__PURE__ */ (0,
|
|
6896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Crown, { className: iconClass });
|
|
6664
6897
|
default:
|
|
6665
|
-
return /* @__PURE__ */ (0,
|
|
6898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Users, { className: iconClass });
|
|
6666
6899
|
}
|
|
6667
6900
|
};
|
|
6668
6901
|
var translations = {
|
|
@@ -6733,7 +6966,7 @@ var translations = {
|
|
|
6733
6966
|
mega: "Mega"
|
|
6734
6967
|
}
|
|
6735
6968
|
};
|
|
6736
|
-
var EngagementRate =
|
|
6969
|
+
var EngagementRate = React24.forwardRef(
|
|
6737
6970
|
({ className, currentRate, followers, locale = "fa", showCategoryCard = true, ...props }, ref) => {
|
|
6738
6971
|
const isRTL = locale === "fa" || locale === "ar";
|
|
6739
6972
|
const t = translations[locale];
|
|
@@ -6855,13 +7088,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6855
7088
|
return `${formatNumber2(1e3)} ${t.to} ${formatNumber2(1e4)} ${t.followers}`;
|
|
6856
7089
|
}
|
|
6857
7090
|
};
|
|
6858
|
-
return /* @__PURE__ */ (0,
|
|
6859
|
-
/* @__PURE__ */ (0,
|
|
6860
|
-
/* @__PURE__ */ (0,
|
|
7091
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { ref, className: cn("space-y-4", className), dir: isRTL ? "rtl" : "ltr", ...props, children: [
|
|
7092
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-center", children: [
|
|
7093
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "text-4xl font-bold text-primary mb-2", children: [
|
|
6861
7094
|
convertToLocalNumbers2((currentRate * 100).toFixed(3), locale),
|
|
6862
7095
|
"%"
|
|
6863
7096
|
] }),
|
|
6864
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7097
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6865
7098
|
Badge,
|
|
6866
7099
|
{
|
|
6867
7100
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -6870,13 +7103,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6870
7103
|
}
|
|
6871
7104
|
)
|
|
6872
7105
|
] }),
|
|
6873
|
-
/* @__PURE__ */ (0,
|
|
6874
|
-
/* @__PURE__ */ (0,
|
|
6875
|
-
/* @__PURE__ */ (0,
|
|
6876
|
-
/* @__PURE__ */ (0,
|
|
7106
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-3", children: [
|
|
7107
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
|
|
7108
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: isRTL ? t.excellent : t.low }),
|
|
7109
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: isRTL ? t.low : t.excellent })
|
|
6877
7110
|
] }),
|
|
6878
|
-
/* @__PURE__ */ (0,
|
|
6879
|
-
/* @__PURE__ */ (0,
|
|
7111
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "relative", children: [
|
|
7112
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex gap-1 h-6 rounded overflow-hidden", children: engagementRanges.map((range, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6880
7113
|
"div",
|
|
6881
7114
|
{
|
|
6882
7115
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -6897,35 +7130,35 @@ var EngagementRate = React22.forwardRef(
|
|
|
6897
7130
|
},
|
|
6898
7131
|
index
|
|
6899
7132
|
)) }),
|
|
6900
|
-
/* @__PURE__ */ (0,
|
|
7133
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6901
7134
|
"div",
|
|
6902
7135
|
{
|
|
6903
7136
|
className: "absolute -top-1 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
6904
7137
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
6905
|
-
children: /* @__PURE__ */ (0,
|
|
7138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6906
7139
|
"svg",
|
|
6907
7140
|
{
|
|
6908
7141
|
width: "20",
|
|
6909
7142
|
height: "14",
|
|
6910
7143
|
viewBox: "0 0 20 14",
|
|
6911
|
-
className: "fill-
|
|
6912
|
-
children: /* @__PURE__ */ (0,
|
|
7144
|
+
className: "fill-white dark:fill-white drop-shadow-md transition-transform duration-300",
|
|
7145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 14L0 0H20L10 14Z" })
|
|
6913
7146
|
}
|
|
6914
7147
|
)
|
|
6915
7148
|
}
|
|
6916
7149
|
)
|
|
6917
7150
|
] })
|
|
6918
7151
|
] }),
|
|
6919
|
-
showCategoryCard && /* @__PURE__ */ (0,
|
|
6920
|
-
/* @__PURE__ */ (0,
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
6922
|
-
/* @__PURE__ */ (0,
|
|
6923
|
-
/* @__PURE__ */ (0,
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
7152
|
+
showCategoryCard && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mt-6 bg-surface-100 rounded-lg border border-border p-5", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
|
7153
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center justify-center order-1 lg:order-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "w-full h-full flex flex-col justify-center items-center text-center space-y-4", children: [
|
|
7154
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "mb-2", children: getGroupIcon(engagementData.groupKey) }),
|
|
7155
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-2", children: [
|
|
7156
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-lg font-semibold", children: t.yourCategory }),
|
|
7157
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-3xl font-black text-primary", children: locale === "en" ? `${engagementData.group} ${t.influencer}` : `${engagementData.group} ${t.influencer}` })
|
|
6925
7158
|
] }),
|
|
6926
|
-
/* @__PURE__ */ (0,
|
|
6927
|
-
/* @__PURE__ */ (0,
|
|
6928
|
-
/* @__PURE__ */ (0,
|
|
7159
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-2", children: [
|
|
7160
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-base font-medium text-muted-foreground", children: getFollowerRange() }),
|
|
7161
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-xl font-bold", children: [
|
|
6929
7162
|
"(",
|
|
6930
7163
|
formatNumber2(followers),
|
|
6931
7164
|
" ",
|
|
@@ -6934,9 +7167,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6934
7167
|
] })
|
|
6935
7168
|
] })
|
|
6936
7169
|
] }) }),
|
|
6937
|
-
/* @__PURE__ */ (0,
|
|
6938
|
-
/* @__PURE__ */ (0,
|
|
6939
|
-
/* @__PURE__ */ (0,
|
|
7170
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-3 order-2 lg:order-2", children: [
|
|
7171
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-base font-semibold mb-3", children: locale === "en" ? `${engagementData.group} ${t.influencer} ${t.criteria}` : `${t.criteria} ${engagementData.group} ${t.influencer}` }),
|
|
7172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "space-y-2.5", children: engagementRanges.map((range, index) => {
|
|
6940
7173
|
const isCurrentRange = index === currentRangeIndex;
|
|
6941
7174
|
const hexToRgb = (hex) => {
|
|
6942
7175
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -6949,7 +7182,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6949
7182
|
const rgb = hexToRgb(range.color);
|
|
6950
7183
|
const bgColor = isCurrentRange && rgb ? `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.1)` : "transparent";
|
|
6951
7184
|
const displayText = index === 0 ? convertToLocalNumbers2(`${range.min}% ${t.and}`, locale) : index === engagementRanges.length - 1 ? convertToLocalNumbers2(`${t.lessThan} ${range.max}%`, locale) : convertToLocalNumbers2(`${range.min}% ${t.to} ${range.max}%`, locale);
|
|
6952
|
-
return /* @__PURE__ */ (0,
|
|
7185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6953
7186
|
"div",
|
|
6954
7187
|
{
|
|
6955
7188
|
className: cn(
|
|
@@ -6961,9 +7194,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6961
7194
|
borderColor: isCurrentRange ? range.color : void 0
|
|
6962
7195
|
},
|
|
6963
7196
|
children: [
|
|
6964
|
-
/* @__PURE__ */ (0,
|
|
6965
|
-
/* @__PURE__ */ (0,
|
|
6966
|
-
/* @__PURE__ */ (0,
|
|
7197
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
7198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-2.5 h-2.5 rounded-full", style: { backgroundColor: range.color } }),
|
|
7199
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6967
7200
|
"span",
|
|
6968
7201
|
{
|
|
6969
7202
|
className: cn(
|
|
@@ -6972,7 +7205,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6972
7205
|
),
|
|
6973
7206
|
children: [
|
|
6974
7207
|
range.label,
|
|
6975
|
-
isCurrentRange && /* @__PURE__ */ (0,
|
|
7208
|
+
isCurrentRange && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: cn("text-xs font-normal text-muted-foreground", isRTL ? "mr-1" : "ml-1"), children: [
|
|
6976
7209
|
"(",
|
|
6977
7210
|
t.you,
|
|
6978
7211
|
")"
|
|
@@ -6981,7 +7214,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6981
7214
|
}
|
|
6982
7215
|
)
|
|
6983
7216
|
] }),
|
|
6984
|
-
/* @__PURE__ */ (0,
|
|
7217
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6985
7218
|
"span",
|
|
6986
7219
|
{
|
|
6987
7220
|
className: cn("text-sm font-semibold", !isCurrentRange && "text-muted-foreground"),
|
|
@@ -7002,8 +7235,8 @@ var EngagementRate = React22.forwardRef(
|
|
|
7002
7235
|
EngagementRate.displayName = "EngagementRate";
|
|
7003
7236
|
|
|
7004
7237
|
// src/components/ui/engagement-rate-bar.tsx
|
|
7005
|
-
var
|
|
7006
|
-
var
|
|
7238
|
+
var React25 = __toESM(require("react"), 1);
|
|
7239
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7007
7240
|
var convertToLocalNumbers3 = (text, locale) => {
|
|
7008
7241
|
if (locale === "fa" || locale === "ar") {
|
|
7009
7242
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -7084,7 +7317,7 @@ var translations2 = {
|
|
|
7084
7317
|
low: "Low"
|
|
7085
7318
|
}
|
|
7086
7319
|
};
|
|
7087
|
-
var EngagementRateBar =
|
|
7320
|
+
var EngagementRateBar = React25.forwardRef(
|
|
7088
7321
|
({ className, currentRate, followers, locale = "fa", showHelperText = true, ...props }, ref) => {
|
|
7089
7322
|
const isRTL = locale === "fa" || locale === "ar";
|
|
7090
7323
|
const t = translations2[locale];
|
|
@@ -7179,7 +7412,7 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7179
7412
|
};
|
|
7180
7413
|
const trianglePosition = getTrianglePosition();
|
|
7181
7414
|
const adjustedTrianglePosition = isRTL ? 100 - trianglePosition : trianglePosition;
|
|
7182
|
-
return /* @__PURE__ */ (0,
|
|
7415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7183
7416
|
"div",
|
|
7184
7417
|
{
|
|
7185
7418
|
ref,
|
|
@@ -7187,12 +7420,12 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7187
7420
|
dir: isRTL ? "rtl" : "ltr",
|
|
7188
7421
|
...props,
|
|
7189
7422
|
children: [
|
|
7190
|
-
/* @__PURE__ */ (0,
|
|
7191
|
-
/* @__PURE__ */ (0,
|
|
7423
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-center", children: [
|
|
7424
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-4xl font-bold text-primary mb-2", children: [
|
|
7192
7425
|
convertToLocalNumbers3((currentRate * 100).toFixed(3), locale),
|
|
7193
7426
|
"%"
|
|
7194
7427
|
] }),
|
|
7195
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7428
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7196
7429
|
Badge,
|
|
7197
7430
|
{
|
|
7198
7431
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -7201,13 +7434,13 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7201
7434
|
}
|
|
7202
7435
|
)
|
|
7203
7436
|
] }),
|
|
7204
|
-
/* @__PURE__ */ (0,
|
|
7205
|
-
showHelperText && /* @__PURE__ */ (0,
|
|
7206
|
-
/* @__PURE__ */ (0,
|
|
7207
|
-
/* @__PURE__ */ (0,
|
|
7437
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-3", children: [
|
|
7438
|
+
showHelperText && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
|
|
7439
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: isRTL ? t.excellent : t.low }),
|
|
7440
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: isRTL ? t.low : t.excellent })
|
|
7208
7441
|
] }),
|
|
7209
|
-
/* @__PURE__ */ (0,
|
|
7210
|
-
/* @__PURE__ */ (0,
|
|
7442
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
7443
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex gap-1 h-6 rounded overflow-hidden", children: engagementRanges.map((range, index) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7211
7444
|
"div",
|
|
7212
7445
|
{
|
|
7213
7446
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -7228,14 +7461,14 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7228
7461
|
},
|
|
7229
7462
|
index
|
|
7230
7463
|
)) }),
|
|
7231
|
-
/* @__PURE__ */ (0,
|
|
7464
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7232
7465
|
"div",
|
|
7233
7466
|
{
|
|
7234
7467
|
className: "absolute -top-2 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
7235
7468
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
7236
|
-
children: /* @__PURE__ */ (0,
|
|
7237
|
-
/* @__PURE__ */ (0,
|
|
7238
|
-
/* @__PURE__ */ (0,
|
|
7469
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
7470
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-0 h-0 border-l-[20px] rotate-180 border-r-[20px] border-b-[24px] border-l-transparent border-r-transparent border-b-background transition-transform duration-300" }),
|
|
7471
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "w-0 h-0 border-l-[12px] rotate-180 border-r-[12px] border-b-[16px] border-l-transparent border-r-transparent border-b-foreground transition-transform duration-300 absolute top-[4px] left-1/2 transform -translate-x-1/2" })
|
|
7239
7472
|
] })
|
|
7240
7473
|
}
|
|
7241
7474
|
)
|
|
@@ -7250,9 +7483,9 @@ EngagementRateBar.displayName = "EngagementRateBar";
|
|
|
7250
7483
|
|
|
7251
7484
|
// src/components/ui/progress.tsx
|
|
7252
7485
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
7253
|
-
var
|
|
7254
|
-
var
|
|
7255
|
-
var progressVariants = (0,
|
|
7486
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
7487
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7488
|
+
var progressVariants = (0, import_class_variance_authority12.cva)(
|
|
7256
7489
|
"relative w-full overflow-hidden rounded-full bg-surface-300",
|
|
7257
7490
|
{
|
|
7258
7491
|
variants: {
|
|
@@ -7267,7 +7500,7 @@ var progressVariants = (0, import_class_variance_authority10.cva)(
|
|
|
7267
7500
|
}
|
|
7268
7501
|
}
|
|
7269
7502
|
);
|
|
7270
|
-
var progressIndicatorVariants = (0,
|
|
7503
|
+
var progressIndicatorVariants = (0, import_class_variance_authority12.cva)(
|
|
7271
7504
|
"h-full w-full flex-1 transition-all origin-left rtl:origin-right",
|
|
7272
7505
|
{
|
|
7273
7506
|
variants: {
|
|
@@ -7295,19 +7528,19 @@ function Progress({
|
|
|
7295
7528
|
}) {
|
|
7296
7529
|
const clampedValue = Math.max(0, Math.min(100, value ?? 0));
|
|
7297
7530
|
const displayValue = `${Math.round(clampedValue)}%`;
|
|
7298
|
-
return /* @__PURE__ */ (0,
|
|
7299
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
7300
|
-
label && /* @__PURE__ */ (0,
|
|
7301
|
-
showValue && /* @__PURE__ */ (0,
|
|
7531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "w-full space-y-2", children: [
|
|
7532
|
+
(label || showValue) && /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center justify-between text-sm", children: [
|
|
7533
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-foreground", children: label }),
|
|
7534
|
+
showValue && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "text-foreground-light font-medium", children: displayValue })
|
|
7302
7535
|
] }),
|
|
7303
|
-
/* @__PURE__ */ (0,
|
|
7536
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7304
7537
|
ProgressPrimitive.Root,
|
|
7305
7538
|
{
|
|
7306
7539
|
"data-slot": "progress",
|
|
7307
7540
|
className: cn(progressVariants({ size }), className),
|
|
7308
7541
|
value,
|
|
7309
7542
|
...props,
|
|
7310
|
-
children: /* @__PURE__ */ (0,
|
|
7543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7311
7544
|
ProgressPrimitive.Indicator,
|
|
7312
7545
|
{
|
|
7313
7546
|
"data-slot": "progress-indicator",
|
|
@@ -7322,13 +7555,13 @@ function Progress({
|
|
|
7322
7555
|
|
|
7323
7556
|
// src/components/ui/radio-group.tsx
|
|
7324
7557
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7325
|
-
var
|
|
7326
|
-
var
|
|
7558
|
+
var import_lucide_react25 = require("lucide-react");
|
|
7559
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7327
7560
|
function RadioGroup4({
|
|
7328
7561
|
className,
|
|
7329
7562
|
...props
|
|
7330
7563
|
}) {
|
|
7331
|
-
return /* @__PURE__ */ (0,
|
|
7564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7332
7565
|
RadioGroupPrimitive.Root,
|
|
7333
7566
|
{
|
|
7334
7567
|
"data-slot": "radio-group",
|
|
@@ -7341,7 +7574,7 @@ function RadioGroupItem({
|
|
|
7341
7574
|
className,
|
|
7342
7575
|
...props
|
|
7343
7576
|
}) {
|
|
7344
|
-
return /* @__PURE__ */ (0,
|
|
7577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7345
7578
|
RadioGroupPrimitive.Item,
|
|
7346
7579
|
{
|
|
7347
7580
|
"data-slot": "radio-group-item",
|
|
@@ -7350,12 +7583,12 @@ function RadioGroupItem({
|
|
|
7350
7583
|
className
|
|
7351
7584
|
),
|
|
7352
7585
|
...props,
|
|
7353
|
-
children: /* @__PURE__ */ (0,
|
|
7586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7354
7587
|
RadioGroupPrimitive.Indicator,
|
|
7355
7588
|
{
|
|
7356
7589
|
"data-slot": "radio-group-indicator",
|
|
7357
7590
|
className: "relative flex items-center justify-center",
|
|
7358
|
-
children: /* @__PURE__ */ (0,
|
|
7591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_lucide_react25.CircleIcon, { className: "fill-brand absolute top-1/2 start-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rtl:translate-x-1/2" })
|
|
7359
7592
|
}
|
|
7360
7593
|
)
|
|
7361
7594
|
}
|
|
@@ -7363,14 +7596,14 @@ function RadioGroupItem({
|
|
|
7363
7596
|
}
|
|
7364
7597
|
|
|
7365
7598
|
// src/components/ui/radio-card.tsx
|
|
7366
|
-
var
|
|
7599
|
+
var React26 = __toESM(require("react"), 1);
|
|
7367
7600
|
var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7368
|
-
var
|
|
7369
|
-
var RadioCards =
|
|
7601
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7602
|
+
var RadioCards = React26.forwardRef(({ className, columns = 1, dir = "rtl", children, ...props }, ref) => {
|
|
7370
7603
|
const gridCols = typeof columns === "number" ? `grid-cols-${columns}` : Object.entries(columns).map(
|
|
7371
7604
|
([key, val]) => key === "initial" ? `grid-cols-${val}` : `${key}:grid-cols-${val}`
|
|
7372
7605
|
).join(" ");
|
|
7373
|
-
return /* @__PURE__ */ (0,
|
|
7606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7374
7607
|
RadioGroupPrimitive2.Root,
|
|
7375
7608
|
{
|
|
7376
7609
|
ref,
|
|
@@ -7383,8 +7616,8 @@ var RadioCards = React24.forwardRef(({ className, columns = 1, dir = "rtl", chil
|
|
|
7383
7616
|
);
|
|
7384
7617
|
});
|
|
7385
7618
|
RadioCards.displayName = "RadioCards";
|
|
7386
|
-
var RadioCardItem =
|
|
7387
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
+
var RadioCardItem = React26.forwardRef(({ className, children, ...props }, ref) => {
|
|
7620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7388
7621
|
RadioGroupPrimitive2.Item,
|
|
7389
7622
|
{
|
|
7390
7623
|
ref,
|
|
@@ -7403,7 +7636,7 @@ var RadioCardItem = React24.forwardRef(({ className, children, ...props }, ref)
|
|
|
7403
7636
|
);
|
|
7404
7637
|
});
|
|
7405
7638
|
RadioCardItem.displayName = "RadioCardItem";
|
|
7406
|
-
var RadioCardTitle =
|
|
7639
|
+
var RadioCardTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7407
7640
|
"h4",
|
|
7408
7641
|
{
|
|
7409
7642
|
ref,
|
|
@@ -7412,7 +7645,7 @@ var RadioCardTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
7412
7645
|
}
|
|
7413
7646
|
));
|
|
7414
7647
|
RadioCardTitle.displayName = "RadioCardTitle";
|
|
7415
|
-
var RadioCardDescription =
|
|
7648
|
+
var RadioCardDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7416
7649
|
"p",
|
|
7417
7650
|
{
|
|
7418
7651
|
ref,
|
|
@@ -7423,14 +7656,14 @@ var RadioCardDescription = React24.forwardRef(({ className, ...props }, ref) =>
|
|
|
7423
7656
|
RadioCardDescription.displayName = "RadioCardDescription";
|
|
7424
7657
|
|
|
7425
7658
|
// src/components/ui/resizable.tsx
|
|
7426
|
-
var
|
|
7659
|
+
var import_lucide_react26 = require("lucide-react");
|
|
7427
7660
|
var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
|
|
7428
|
-
var
|
|
7661
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7429
7662
|
function ResizablePanelGroup({
|
|
7430
7663
|
className,
|
|
7431
7664
|
...props
|
|
7432
7665
|
}) {
|
|
7433
|
-
return /* @__PURE__ */ (0,
|
|
7666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7434
7667
|
ResizablePrimitive.PanelGroup,
|
|
7435
7668
|
{
|
|
7436
7669
|
"data-slot": "resizable-panel-group",
|
|
@@ -7445,14 +7678,14 @@ function ResizablePanelGroup({
|
|
|
7445
7678
|
function ResizablePanel({
|
|
7446
7679
|
...props
|
|
7447
7680
|
}) {
|
|
7448
|
-
return /* @__PURE__ */ (0,
|
|
7681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
7449
7682
|
}
|
|
7450
7683
|
function ResizableHandle({
|
|
7451
7684
|
withHandle,
|
|
7452
7685
|
className,
|
|
7453
7686
|
...props
|
|
7454
7687
|
}) {
|
|
7455
|
-
return /* @__PURE__ */ (0,
|
|
7688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7456
7689
|
ResizablePrimitive.PanelResizeHandle,
|
|
7457
7690
|
{
|
|
7458
7691
|
"data-slot": "resizable-handle",
|
|
@@ -7461,27 +7694,27 @@ function ResizableHandle({
|
|
|
7461
7694
|
className
|
|
7462
7695
|
),
|
|
7463
7696
|
...props,
|
|
7464
|
-
children: withHandle && /* @__PURE__ */ (0,
|
|
7697
|
+
children: withHandle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react26.GripVerticalIcon, { className: "size-2.5" }) })
|
|
7465
7698
|
}
|
|
7466
7699
|
);
|
|
7467
7700
|
}
|
|
7468
7701
|
|
|
7469
7702
|
// src/components/ui/scroll-area.tsx
|
|
7470
7703
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
7471
|
-
var
|
|
7704
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7472
7705
|
function ScrollArea({
|
|
7473
7706
|
className,
|
|
7474
7707
|
children,
|
|
7475
7708
|
...props
|
|
7476
7709
|
}) {
|
|
7477
|
-
return /* @__PURE__ */ (0,
|
|
7710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
7478
7711
|
ScrollAreaPrimitive.Root,
|
|
7479
7712
|
{
|
|
7480
7713
|
"data-slot": "scroll-area",
|
|
7481
7714
|
className: cn("relative", className),
|
|
7482
7715
|
...props,
|
|
7483
7716
|
children: [
|
|
7484
|
-
/* @__PURE__ */ (0,
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7485
7718
|
ScrollAreaPrimitive.Viewport,
|
|
7486
7719
|
{
|
|
7487
7720
|
"data-slot": "scroll-area-viewport",
|
|
@@ -7489,8 +7722,8 @@ function ScrollArea({
|
|
|
7489
7722
|
children
|
|
7490
7723
|
}
|
|
7491
7724
|
),
|
|
7492
|
-
/* @__PURE__ */ (0,
|
|
7493
|
-
/* @__PURE__ */ (0,
|
|
7725
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollBar, {}),
|
|
7726
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
7494
7727
|
]
|
|
7495
7728
|
}
|
|
7496
7729
|
);
|
|
@@ -7500,7 +7733,7 @@ function ScrollBar({
|
|
|
7500
7733
|
orientation = "vertical",
|
|
7501
7734
|
...props
|
|
7502
7735
|
}) {
|
|
7503
|
-
return /* @__PURE__ */ (0,
|
|
7736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7504
7737
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7505
7738
|
{
|
|
7506
7739
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -7512,7 +7745,7 @@ function ScrollBar({
|
|
|
7512
7745
|
className
|
|
7513
7746
|
),
|
|
7514
7747
|
...props,
|
|
7515
|
-
children: /* @__PURE__ */ (0,
|
|
7748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7516
7749
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
7517
7750
|
{
|
|
7518
7751
|
"data-slot": "scroll-area-thumb",
|
|
@@ -7524,14 +7757,14 @@ function ScrollBar({
|
|
|
7524
7757
|
}
|
|
7525
7758
|
|
|
7526
7759
|
// src/components/ui/select.tsx
|
|
7527
|
-
var
|
|
7760
|
+
var React27 = __toESM(require("react"), 1);
|
|
7528
7761
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
7529
|
-
var
|
|
7530
|
-
var
|
|
7531
|
-
var
|
|
7762
|
+
var import_lucide_react27 = require("lucide-react");
|
|
7763
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
7764
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7532
7765
|
var Select = SelectPrimitive.Root;
|
|
7533
7766
|
var SelectGroup = SelectPrimitive.Group;
|
|
7534
|
-
var SelectTriggerVariants = (0,
|
|
7767
|
+
var SelectTriggerVariants = (0, import_class_variance_authority13.cva)("", {
|
|
7535
7768
|
variants: {
|
|
7536
7769
|
size: {
|
|
7537
7770
|
...SIZE_VARIANTS
|
|
@@ -7541,16 +7774,16 @@ var SelectTriggerVariants = (0, import_class_variance_authority11.cva)("", {
|
|
|
7541
7774
|
size: SIZE_VARIANTS_DEFAULT
|
|
7542
7775
|
}
|
|
7543
7776
|
});
|
|
7544
|
-
var SelectValue =
|
|
7777
|
+
var SelectValue = React27.forwardRef(({ placeholder, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7545
7778
|
SelectPrimitive.Value,
|
|
7546
7779
|
{
|
|
7547
|
-
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0,
|
|
7780
|
+
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: placeholder }) : placeholder,
|
|
7548
7781
|
...props,
|
|
7549
7782
|
ref
|
|
7550
7783
|
}
|
|
7551
7784
|
));
|
|
7552
7785
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
7553
|
-
var SelectTrigger =
|
|
7786
|
+
var SelectTrigger = React27.forwardRef(({ className, children, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7554
7787
|
SelectPrimitive.Trigger,
|
|
7555
7788
|
{
|
|
7556
7789
|
ref,
|
|
@@ -7565,12 +7798,12 @@ var SelectTrigger = React25.forwardRef(({ className, children, size, ...props },
|
|
|
7565
7798
|
...props,
|
|
7566
7799
|
children: [
|
|
7567
7800
|
children,
|
|
7568
|
-
/* @__PURE__ */ (0,
|
|
7801
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.ChevronDown, { className: "h-4 w-4 text-foreground-lighter flex-shrink-0", strokeWidth: 1.5 }) })
|
|
7569
7802
|
]
|
|
7570
7803
|
}
|
|
7571
7804
|
));
|
|
7572
7805
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
7573
|
-
var SelectScrollUpButton =
|
|
7806
|
+
var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7574
7807
|
SelectPrimitive.ScrollUpButton,
|
|
7575
7808
|
{
|
|
7576
7809
|
ref,
|
|
@@ -7579,11 +7812,11 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
7579
7812
|
className
|
|
7580
7813
|
),
|
|
7581
7814
|
...props,
|
|
7582
|
-
children: /* @__PURE__ */ (0,
|
|
7815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.ChevronUp, { className: "h-4 w-4" })
|
|
7583
7816
|
}
|
|
7584
7817
|
));
|
|
7585
7818
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
7586
|
-
var SelectScrollDownButton =
|
|
7819
|
+
var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7587
7820
|
SelectPrimitive.ScrollDownButton,
|
|
7588
7821
|
{
|
|
7589
7822
|
ref,
|
|
@@ -7592,11 +7825,11 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
7592
7825
|
className
|
|
7593
7826
|
),
|
|
7594
7827
|
...props,
|
|
7595
|
-
children: /* @__PURE__ */ (0,
|
|
7828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.ChevronDown, { className: "h-4 w-4" })
|
|
7596
7829
|
}
|
|
7597
7830
|
));
|
|
7598
7831
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
7599
|
-
var SelectContent =
|
|
7832
|
+
var SelectContent = React27.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7600
7833
|
SelectPrimitive.Content,
|
|
7601
7834
|
{
|
|
7602
7835
|
ref,
|
|
@@ -7608,8 +7841,8 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7608
7841
|
position,
|
|
7609
7842
|
...props,
|
|
7610
7843
|
children: [
|
|
7611
|
-
/* @__PURE__ */ (0,
|
|
7612
|
-
/* @__PURE__ */ (0,
|
|
7844
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollUpButton, {}),
|
|
7845
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7613
7846
|
SelectPrimitive.Viewport,
|
|
7614
7847
|
{
|
|
7615
7848
|
className: cn(
|
|
@@ -7619,12 +7852,12 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7619
7852
|
children
|
|
7620
7853
|
}
|
|
7621
7854
|
),
|
|
7622
|
-
/* @__PURE__ */ (0,
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollDownButton, {})
|
|
7623
7856
|
]
|
|
7624
7857
|
}
|
|
7625
7858
|
) }));
|
|
7626
7859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
7627
|
-
var SelectLabel =
|
|
7860
|
+
var SelectLabel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7628
7861
|
SelectPrimitive.Label,
|
|
7629
7862
|
{
|
|
7630
7863
|
ref,
|
|
@@ -7636,7 +7869,7 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7636
7869
|
}
|
|
7637
7870
|
));
|
|
7638
7871
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7639
|
-
var SelectItem =
|
|
7872
|
+
var SelectItem = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7640
7873
|
SelectPrimitive.Item,
|
|
7641
7874
|
{
|
|
7642
7875
|
ref,
|
|
@@ -7647,13 +7880,13 @@ var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7647
7880
|
),
|
|
7648
7881
|
...props,
|
|
7649
7882
|
children: [
|
|
7650
|
-
/* @__PURE__ */ (0,
|
|
7651
|
-
/* @__PURE__ */ (0,
|
|
7883
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute start-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.ItemIndicator, { className: "h-3.5 w-3.5 bg-foreground rounded-full flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.Check, { className: "h-2 w-2 text-background-overlay", strokeWidth: 6 }) }) }),
|
|
7884
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectPrimitive.ItemText, { children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children }) : children })
|
|
7652
7885
|
]
|
|
7653
7886
|
}
|
|
7654
7887
|
));
|
|
7655
7888
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7656
|
-
var SelectSeparator =
|
|
7889
|
+
var SelectSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7657
7890
|
SelectPrimitive.Separator,
|
|
7658
7891
|
{
|
|
7659
7892
|
ref,
|
|
@@ -7665,31 +7898,31 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7665
7898
|
|
|
7666
7899
|
// src/components/ui/sheet.tsx
|
|
7667
7900
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7668
|
-
var
|
|
7669
|
-
var
|
|
7901
|
+
var import_lucide_react28 = require("lucide-react");
|
|
7902
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7670
7903
|
function Sheet({ ...props }) {
|
|
7671
|
-
return /* @__PURE__ */ (0,
|
|
7904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
7672
7905
|
}
|
|
7673
7906
|
function SheetTrigger({
|
|
7674
7907
|
...props
|
|
7675
7908
|
}) {
|
|
7676
|
-
return /* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
7677
7910
|
}
|
|
7678
7911
|
function SheetClose({
|
|
7679
7912
|
...props
|
|
7680
7913
|
}) {
|
|
7681
|
-
return /* @__PURE__ */ (0,
|
|
7914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
7682
7915
|
}
|
|
7683
7916
|
function SheetPortal({
|
|
7684
7917
|
...props
|
|
7685
7918
|
}) {
|
|
7686
|
-
return /* @__PURE__ */ (0,
|
|
7919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
7687
7920
|
}
|
|
7688
7921
|
function SheetOverlay({
|
|
7689
7922
|
className,
|
|
7690
7923
|
...props
|
|
7691
7924
|
}) {
|
|
7692
|
-
return /* @__PURE__ */ (0,
|
|
7925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7693
7926
|
SheetPrimitive.Overlay,
|
|
7694
7927
|
{
|
|
7695
7928
|
"data-slot": "sheet-overlay",
|
|
@@ -7707,9 +7940,9 @@ function SheetContent({
|
|
|
7707
7940
|
side = "right",
|
|
7708
7941
|
...props
|
|
7709
7942
|
}) {
|
|
7710
|
-
return /* @__PURE__ */ (0,
|
|
7711
|
-
/* @__PURE__ */ (0,
|
|
7712
|
-
/* @__PURE__ */ (0,
|
|
7943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SheetPortal, { children: [
|
|
7944
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetOverlay, {}),
|
|
7945
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
7713
7946
|
SheetPrimitive.Content,
|
|
7714
7947
|
{
|
|
7715
7948
|
"data-slot": "sheet-content",
|
|
@@ -7724,9 +7957,9 @@ function SheetContent({
|
|
|
7724
7957
|
...props,
|
|
7725
7958
|
children: [
|
|
7726
7959
|
children,
|
|
7727
|
-
/* @__PURE__ */ (0,
|
|
7728
|
-
/* @__PURE__ */ (0,
|
|
7729
|
-
/* @__PURE__ */ (0,
|
|
7960
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(SheetPrimitive.Close, { className: "absolute top-4 end-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-brand-default focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-selection data-[state=open]:text-foreground-muted", children: [
|
|
7961
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react28.XIcon, { className: "size-4" }),
|
|
7962
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "sr-only", children: "Close" })
|
|
7730
7963
|
] })
|
|
7731
7964
|
]
|
|
7732
7965
|
}
|
|
@@ -7734,7 +7967,7 @@ function SheetContent({
|
|
|
7734
7967
|
] });
|
|
7735
7968
|
}
|
|
7736
7969
|
function SheetHeader({ className, ...props }) {
|
|
7737
|
-
return /* @__PURE__ */ (0,
|
|
7970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7738
7971
|
"div",
|
|
7739
7972
|
{
|
|
7740
7973
|
"data-slot": "sheet-header",
|
|
@@ -7744,7 +7977,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
7744
7977
|
);
|
|
7745
7978
|
}
|
|
7746
7979
|
function SheetFooter({ className, ...props }) {
|
|
7747
|
-
return /* @__PURE__ */ (0,
|
|
7980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7748
7981
|
"div",
|
|
7749
7982
|
{
|
|
7750
7983
|
"data-slot": "sheet-footer",
|
|
@@ -7757,7 +7990,7 @@ function SheetTitle({
|
|
|
7757
7990
|
className,
|
|
7758
7991
|
...props
|
|
7759
7992
|
}) {
|
|
7760
|
-
return /* @__PURE__ */ (0,
|
|
7993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7761
7994
|
SheetPrimitive.Title,
|
|
7762
7995
|
{
|
|
7763
7996
|
"data-slot": "sheet-title",
|
|
@@ -7770,7 +8003,7 @@ function SheetDescription({
|
|
|
7770
8003
|
className,
|
|
7771
8004
|
...props
|
|
7772
8005
|
}) {
|
|
7773
|
-
return /* @__PURE__ */ (0,
|
|
8006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7774
8007
|
SheetPrimitive.Description,
|
|
7775
8008
|
{
|
|
7776
8009
|
"data-slot": "sheet-description",
|
|
@@ -7781,17 +8014,17 @@ function SheetDescription({
|
|
|
7781
8014
|
}
|
|
7782
8015
|
|
|
7783
8016
|
// src/components/ui/sidebar.tsx
|
|
7784
|
-
var
|
|
8017
|
+
var React29 = __toESM(require("react"), 1);
|
|
7785
8018
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
7786
|
-
var
|
|
7787
|
-
var
|
|
8019
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
8020
|
+
var import_lucide_react29 = require("lucide-react");
|
|
7788
8021
|
|
|
7789
8022
|
// src/hooks/use-mobile.ts
|
|
7790
|
-
var
|
|
8023
|
+
var React28 = __toESM(require("react"), 1);
|
|
7791
8024
|
var MOBILE_BREAKPOINT = 768;
|
|
7792
8025
|
function useIsMobile() {
|
|
7793
|
-
const [isMobile, setIsMobile] =
|
|
7794
|
-
|
|
8026
|
+
const [isMobile, setIsMobile] = React28.useState(void 0);
|
|
8027
|
+
React28.useEffect(() => {
|
|
7795
8028
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
7796
8029
|
const onChange = () => {
|
|
7797
8030
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -7804,16 +8037,16 @@ function useIsMobile() {
|
|
|
7804
8037
|
}
|
|
7805
8038
|
|
|
7806
8039
|
// src/components/ui/sidebar.tsx
|
|
7807
|
-
var
|
|
8040
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7808
8041
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
7809
8042
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
7810
8043
|
var SIDEBAR_WIDTH = "16rem";
|
|
7811
8044
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
7812
8045
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
7813
8046
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
7814
|
-
var SidebarContext =
|
|
8047
|
+
var SidebarContext = React29.createContext(null);
|
|
7815
8048
|
function useSidebar() {
|
|
7816
|
-
const context =
|
|
8049
|
+
const context = React29.useContext(SidebarContext);
|
|
7817
8050
|
if (!context) {
|
|
7818
8051
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
7819
8052
|
}
|
|
@@ -7829,10 +8062,10 @@ function SidebarProvider({
|
|
|
7829
8062
|
...props
|
|
7830
8063
|
}) {
|
|
7831
8064
|
const isMobile = useIsMobile();
|
|
7832
|
-
const [openMobile, setOpenMobile] =
|
|
7833
|
-
const [_open, _setOpen] =
|
|
8065
|
+
const [openMobile, setOpenMobile] = React29.useState(false);
|
|
8066
|
+
const [_open, _setOpen] = React29.useState(defaultOpen);
|
|
7834
8067
|
const open = openProp ?? _open;
|
|
7835
|
-
const setOpen =
|
|
8068
|
+
const setOpen = React29.useCallback(
|
|
7836
8069
|
(value) => {
|
|
7837
8070
|
const openState = typeof value === "function" ? value(open) : value;
|
|
7838
8071
|
if (setOpenProp) {
|
|
@@ -7844,10 +8077,10 @@ function SidebarProvider({
|
|
|
7844
8077
|
},
|
|
7845
8078
|
[setOpenProp, open]
|
|
7846
8079
|
);
|
|
7847
|
-
const toggleSidebar =
|
|
8080
|
+
const toggleSidebar = React29.useCallback(() => {
|
|
7848
8081
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
7849
8082
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
7850
|
-
|
|
8083
|
+
React29.useEffect(() => {
|
|
7851
8084
|
const handleKeyDown = (event) => {
|
|
7852
8085
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
7853
8086
|
event.preventDefault();
|
|
@@ -7858,7 +8091,7 @@ function SidebarProvider({
|
|
|
7858
8091
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7859
8092
|
}, [toggleSidebar]);
|
|
7860
8093
|
const state = open ? "expanded" : "collapsed";
|
|
7861
|
-
const contextValue =
|
|
8094
|
+
const contextValue = React29.useMemo(
|
|
7862
8095
|
() => ({
|
|
7863
8096
|
state,
|
|
7864
8097
|
open,
|
|
@@ -7870,7 +8103,7 @@ function SidebarProvider({
|
|
|
7870
8103
|
}),
|
|
7871
8104
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
7872
8105
|
);
|
|
7873
|
-
return /* @__PURE__ */ (0,
|
|
8106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7874
8107
|
"div",
|
|
7875
8108
|
{
|
|
7876
8109
|
"data-slot": "sidebar-wrapper",
|
|
@@ -7898,7 +8131,7 @@ function Sidebar({
|
|
|
7898
8131
|
}) {
|
|
7899
8132
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
7900
8133
|
if (collapsible === "none") {
|
|
7901
|
-
return /* @__PURE__ */ (0,
|
|
8134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7902
8135
|
"div",
|
|
7903
8136
|
{
|
|
7904
8137
|
"data-slot": "sidebar",
|
|
@@ -7912,7 +8145,7 @@ function Sidebar({
|
|
|
7912
8145
|
);
|
|
7913
8146
|
}
|
|
7914
8147
|
if (isMobile) {
|
|
7915
|
-
return /* @__PURE__ */ (0,
|
|
8148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7916
8149
|
SheetContent,
|
|
7917
8150
|
{
|
|
7918
8151
|
"data-sidebar": "sidebar",
|
|
@@ -7924,16 +8157,16 @@ function Sidebar({
|
|
|
7924
8157
|
},
|
|
7925
8158
|
side,
|
|
7926
8159
|
children: [
|
|
7927
|
-
/* @__PURE__ */ (0,
|
|
7928
|
-
/* @__PURE__ */ (0,
|
|
7929
|
-
/* @__PURE__ */ (0,
|
|
8160
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
8161
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
8162
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
7930
8163
|
] }),
|
|
7931
|
-
/* @__PURE__ */ (0,
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
7932
8165
|
]
|
|
7933
8166
|
}
|
|
7934
8167
|
) });
|
|
7935
8168
|
}
|
|
7936
|
-
return /* @__PURE__ */ (0,
|
|
8169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7937
8170
|
"div",
|
|
7938
8171
|
{
|
|
7939
8172
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -7943,7 +8176,7 @@ function Sidebar({
|
|
|
7943
8176
|
"data-side": side,
|
|
7944
8177
|
"data-slot": "sidebar",
|
|
7945
8178
|
children: [
|
|
7946
|
-
/* @__PURE__ */ (0,
|
|
8179
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7947
8180
|
"div",
|
|
7948
8181
|
{
|
|
7949
8182
|
"data-slot": "sidebar-gap",
|
|
@@ -7955,7 +8188,7 @@ function Sidebar({
|
|
|
7955
8188
|
)
|
|
7956
8189
|
}
|
|
7957
8190
|
),
|
|
7958
|
-
/* @__PURE__ */ (0,
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7959
8192
|
"div",
|
|
7960
8193
|
{
|
|
7961
8194
|
"data-slot": "sidebar-container",
|
|
@@ -7967,7 +8200,7 @@ function Sidebar({
|
|
|
7967
8200
|
className
|
|
7968
8201
|
),
|
|
7969
8202
|
...props,
|
|
7970
|
-
children: /* @__PURE__ */ (0,
|
|
8203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7971
8204
|
"div",
|
|
7972
8205
|
{
|
|
7973
8206
|
"data-sidebar": "sidebar",
|
|
@@ -7988,7 +8221,7 @@ function SidebarTrigger({
|
|
|
7988
8221
|
...props
|
|
7989
8222
|
}) {
|
|
7990
8223
|
const { toggleSidebar } = useSidebar();
|
|
7991
|
-
return /* @__PURE__ */ (0,
|
|
8224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7992
8225
|
Button,
|
|
7993
8226
|
{
|
|
7994
8227
|
"data-sidebar": "trigger",
|
|
@@ -8002,15 +8235,15 @@ function SidebarTrigger({
|
|
|
8002
8235
|
},
|
|
8003
8236
|
...props,
|
|
8004
8237
|
children: [
|
|
8005
|
-
/* @__PURE__ */ (0,
|
|
8006
|
-
/* @__PURE__ */ (0,
|
|
8238
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react29.PanelLeftIcon, {}),
|
|
8239
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
8007
8240
|
]
|
|
8008
8241
|
}
|
|
8009
8242
|
);
|
|
8010
8243
|
}
|
|
8011
8244
|
function SidebarRail({ className, ...props }) {
|
|
8012
8245
|
const { toggleSidebar } = useSidebar();
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8014
8247
|
"button",
|
|
8015
8248
|
{
|
|
8016
8249
|
"data-sidebar": "rail",
|
|
@@ -8033,7 +8266,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
8033
8266
|
);
|
|
8034
8267
|
}
|
|
8035
8268
|
function SidebarInset({ className, ...props }) {
|
|
8036
|
-
return /* @__PURE__ */ (0,
|
|
8269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8037
8270
|
"main",
|
|
8038
8271
|
{
|
|
8039
8272
|
"data-slot": "sidebar-inset",
|
|
@@ -8050,7 +8283,7 @@ function SidebarInput({
|
|
|
8050
8283
|
className,
|
|
8051
8284
|
...props
|
|
8052
8285
|
}) {
|
|
8053
|
-
return /* @__PURE__ */ (0,
|
|
8286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8054
8287
|
Input,
|
|
8055
8288
|
{
|
|
8056
8289
|
"data-slot": "sidebar-input",
|
|
@@ -8061,7 +8294,7 @@ function SidebarInput({
|
|
|
8061
8294
|
);
|
|
8062
8295
|
}
|
|
8063
8296
|
function SidebarHeader({ className, ...props }) {
|
|
8064
|
-
return /* @__PURE__ */ (0,
|
|
8297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8065
8298
|
"div",
|
|
8066
8299
|
{
|
|
8067
8300
|
"data-slot": "sidebar-header",
|
|
@@ -8072,7 +8305,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
8072
8305
|
);
|
|
8073
8306
|
}
|
|
8074
8307
|
function SidebarFooter({ className, ...props }) {
|
|
8075
|
-
return /* @__PURE__ */ (0,
|
|
8308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8076
8309
|
"div",
|
|
8077
8310
|
{
|
|
8078
8311
|
"data-slot": "sidebar-footer",
|
|
@@ -8086,7 +8319,7 @@ function SidebarSeparator({
|
|
|
8086
8319
|
className,
|
|
8087
8320
|
...props
|
|
8088
8321
|
}) {
|
|
8089
|
-
return /* @__PURE__ */ (0,
|
|
8322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8090
8323
|
Separator,
|
|
8091
8324
|
{
|
|
8092
8325
|
"data-slot": "sidebar-separator",
|
|
@@ -8097,7 +8330,7 @@ function SidebarSeparator({
|
|
|
8097
8330
|
);
|
|
8098
8331
|
}
|
|
8099
8332
|
function SidebarContent({ className, ...props }) {
|
|
8100
|
-
return /* @__PURE__ */ (0,
|
|
8333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8101
8334
|
"div",
|
|
8102
8335
|
{
|
|
8103
8336
|
"data-slot": "sidebar-content",
|
|
@@ -8111,7 +8344,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
8111
8344
|
);
|
|
8112
8345
|
}
|
|
8113
8346
|
function SidebarGroup({ className, ...props }) {
|
|
8114
|
-
return /* @__PURE__ */ (0,
|
|
8347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8115
8348
|
"div",
|
|
8116
8349
|
{
|
|
8117
8350
|
"data-slot": "sidebar-group",
|
|
@@ -8127,7 +8360,7 @@ function SidebarGroupLabel({
|
|
|
8127
8360
|
...props
|
|
8128
8361
|
}) {
|
|
8129
8362
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
8130
|
-
return /* @__PURE__ */ (0,
|
|
8363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8131
8364
|
Comp,
|
|
8132
8365
|
{
|
|
8133
8366
|
"data-slot": "sidebar-group-label",
|
|
@@ -8147,7 +8380,7 @@ function SidebarGroupAction({
|
|
|
8147
8380
|
...props
|
|
8148
8381
|
}) {
|
|
8149
8382
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8150
|
-
return /* @__PURE__ */ (0,
|
|
8383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8151
8384
|
Comp,
|
|
8152
8385
|
{
|
|
8153
8386
|
"data-slot": "sidebar-group-action",
|
|
@@ -8167,7 +8400,7 @@ function SidebarGroupContent({
|
|
|
8167
8400
|
className,
|
|
8168
8401
|
...props
|
|
8169
8402
|
}) {
|
|
8170
|
-
return /* @__PURE__ */ (0,
|
|
8403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8171
8404
|
"div",
|
|
8172
8405
|
{
|
|
8173
8406
|
"data-slot": "sidebar-group-content",
|
|
@@ -8178,7 +8411,7 @@ function SidebarGroupContent({
|
|
|
8178
8411
|
);
|
|
8179
8412
|
}
|
|
8180
8413
|
function SidebarMenu({ className, ...props }) {
|
|
8181
|
-
return /* @__PURE__ */ (0,
|
|
8414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8182
8415
|
"ul",
|
|
8183
8416
|
{
|
|
8184
8417
|
"data-slot": "sidebar-menu",
|
|
@@ -8189,7 +8422,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
8189
8422
|
);
|
|
8190
8423
|
}
|
|
8191
8424
|
function SidebarMenuItem({ className, ...props }) {
|
|
8192
|
-
return /* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8193
8426
|
"li",
|
|
8194
8427
|
{
|
|
8195
8428
|
"data-slot": "sidebar-menu-item",
|
|
@@ -8199,7 +8432,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
8199
8432
|
}
|
|
8200
8433
|
);
|
|
8201
8434
|
}
|
|
8202
|
-
var sidebarMenuButtonVariants = (0,
|
|
8435
|
+
var sidebarMenuButtonVariants = (0, import_class_variance_authority14.cva)(
|
|
8203
8436
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-start text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pe-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
8204
8437
|
{
|
|
8205
8438
|
variants: {
|
|
@@ -8230,7 +8463,7 @@ function SidebarMenuButton({
|
|
|
8230
8463
|
}) {
|
|
8231
8464
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8232
8465
|
const { isMobile, state } = useSidebar();
|
|
8233
|
-
const button = /* @__PURE__ */ (0,
|
|
8466
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8234
8467
|
Comp,
|
|
8235
8468
|
{
|
|
8236
8469
|
"data-slot": "sidebar-menu-button",
|
|
@@ -8249,9 +8482,9 @@ function SidebarMenuButton({
|
|
|
8249
8482
|
children: tooltip
|
|
8250
8483
|
};
|
|
8251
8484
|
}
|
|
8252
|
-
return /* @__PURE__ */ (0,
|
|
8253
|
-
/* @__PURE__ */ (0,
|
|
8254
|
-
/* @__PURE__ */ (0,
|
|
8485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(Tooltip, { children: [
|
|
8486
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
8487
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8255
8488
|
TooltipContent,
|
|
8256
8489
|
{
|
|
8257
8490
|
side: "right",
|
|
@@ -8269,7 +8502,7 @@ function SidebarMenuAction({
|
|
|
8269
8502
|
...props
|
|
8270
8503
|
}) {
|
|
8271
8504
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8272
|
-
return /* @__PURE__ */ (0,
|
|
8505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8273
8506
|
Comp,
|
|
8274
8507
|
{
|
|
8275
8508
|
"data-slot": "sidebar-menu-action",
|
|
@@ -8293,7 +8526,7 @@ function SidebarMenuBadge({
|
|
|
8293
8526
|
className,
|
|
8294
8527
|
...props
|
|
8295
8528
|
}) {
|
|
8296
|
-
return /* @__PURE__ */ (0,
|
|
8529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8297
8530
|
"div",
|
|
8298
8531
|
{
|
|
8299
8532
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -8316,10 +8549,10 @@ function SidebarMenuSkeleton({
|
|
|
8316
8549
|
showIcon = false,
|
|
8317
8550
|
...props
|
|
8318
8551
|
}) {
|
|
8319
|
-
const width =
|
|
8552
|
+
const width = React29.useMemo(() => {
|
|
8320
8553
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
8321
8554
|
}, []);
|
|
8322
|
-
return /* @__PURE__ */ (0,
|
|
8555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8323
8556
|
"div",
|
|
8324
8557
|
{
|
|
8325
8558
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -8327,14 +8560,14 @@ function SidebarMenuSkeleton({
|
|
|
8327
8560
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
8328
8561
|
...props,
|
|
8329
8562
|
children: [
|
|
8330
|
-
showIcon && /* @__PURE__ */ (0,
|
|
8563
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8331
8564
|
Skeleton,
|
|
8332
8565
|
{
|
|
8333
8566
|
className: "size-4 rounded-md",
|
|
8334
8567
|
"data-sidebar": "menu-skeleton-icon"
|
|
8335
8568
|
}
|
|
8336
8569
|
),
|
|
8337
|
-
/* @__PURE__ */ (0,
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8338
8571
|
Skeleton,
|
|
8339
8572
|
{
|
|
8340
8573
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -8349,7 +8582,7 @@ function SidebarMenuSkeleton({
|
|
|
8349
8582
|
);
|
|
8350
8583
|
}
|
|
8351
8584
|
function SidebarMenuSub({ className, ...props }) {
|
|
8352
|
-
return /* @__PURE__ */ (0,
|
|
8585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8353
8586
|
"ul",
|
|
8354
8587
|
{
|
|
8355
8588
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -8367,7 +8600,7 @@ function SidebarMenuSubItem({
|
|
|
8367
8600
|
className,
|
|
8368
8601
|
...props
|
|
8369
8602
|
}) {
|
|
8370
|
-
return /* @__PURE__ */ (0,
|
|
8603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8371
8604
|
"li",
|
|
8372
8605
|
{
|
|
8373
8606
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -8385,7 +8618,7 @@ function SidebarMenuSubButton({
|
|
|
8385
8618
|
...props
|
|
8386
8619
|
}) {
|
|
8387
8620
|
const Comp = asChild ? import_react_slot5.Slot : "a";
|
|
8388
|
-
return /* @__PURE__ */ (0,
|
|
8621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8389
8622
|
Comp,
|
|
8390
8623
|
{
|
|
8391
8624
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -8406,12 +8639,12 @@ function SidebarMenuSubButton({
|
|
|
8406
8639
|
}
|
|
8407
8640
|
|
|
8408
8641
|
// src/components/ui/slider.tsx
|
|
8409
|
-
var
|
|
8642
|
+
var React30 = __toESM(require("react"), 1);
|
|
8410
8643
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
8411
|
-
var
|
|
8644
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8412
8645
|
function useDocumentDirection2() {
|
|
8413
|
-
const [direction, setDirection] =
|
|
8414
|
-
|
|
8646
|
+
const [direction, setDirection] = React30.useState("rtl");
|
|
8647
|
+
React30.useEffect(() => {
|
|
8415
8648
|
const getDirection = () => {
|
|
8416
8649
|
if (typeof document === "undefined") return "rtl";
|
|
8417
8650
|
const htmlDir = document.documentElement.getAttribute("dir");
|
|
@@ -8442,13 +8675,13 @@ function Slider({
|
|
|
8442
8675
|
dir,
|
|
8443
8676
|
...props
|
|
8444
8677
|
}) {
|
|
8445
|
-
const _values =
|
|
8678
|
+
const _values = React30.useMemo(
|
|
8446
8679
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
8447
8680
|
[value, defaultValue, min, max]
|
|
8448
8681
|
);
|
|
8449
8682
|
const documentDir = useDocumentDirection2();
|
|
8450
8683
|
const resolvedDir = dir ?? documentDir;
|
|
8451
|
-
return /* @__PURE__ */ (0,
|
|
8684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
8452
8685
|
SliderPrimitive.Root,
|
|
8453
8686
|
{
|
|
8454
8687
|
"data-slot": "slider",
|
|
@@ -8463,14 +8696,14 @@ function Slider({
|
|
|
8463
8696
|
),
|
|
8464
8697
|
...props,
|
|
8465
8698
|
children: [
|
|
8466
|
-
/* @__PURE__ */ (0,
|
|
8699
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8467
8700
|
SliderPrimitive.Track,
|
|
8468
8701
|
{
|
|
8469
8702
|
"data-slot": "slider-track",
|
|
8470
8703
|
className: cn(
|
|
8471
8704
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
8472
8705
|
),
|
|
8473
|
-
children: /* @__PURE__ */ (0,
|
|
8706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8474
8707
|
SliderPrimitive.Range,
|
|
8475
8708
|
{
|
|
8476
8709
|
"data-slot": "slider-range",
|
|
@@ -8481,7 +8714,7 @@ function Slider({
|
|
|
8481
8714
|
)
|
|
8482
8715
|
}
|
|
8483
8716
|
),
|
|
8484
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0,
|
|
8717
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8485
8718
|
SliderPrimitive.Thumb,
|
|
8486
8719
|
{
|
|
8487
8720
|
"data-slot": "slider-thumb",
|
|
@@ -8495,16 +8728,16 @@ function Slider({
|
|
|
8495
8728
|
}
|
|
8496
8729
|
|
|
8497
8730
|
// src/components/ui/sonner.tsx
|
|
8498
|
-
var
|
|
8731
|
+
var import_lucide_react30 = require("lucide-react");
|
|
8499
8732
|
var import_next_themes = require("next-themes");
|
|
8500
8733
|
var import_sonner = require("sonner");
|
|
8501
8734
|
var import_sonner2 = require("sonner");
|
|
8502
|
-
var
|
|
8735
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8503
8736
|
var SONNER_DEFAULT_DURATION = 4e3;
|
|
8504
|
-
var StatusIconSuccess = () => /* @__PURE__ */ (0,
|
|
8505
|
-
var StatusIconInfo = () => /* @__PURE__ */ (0,
|
|
8506
|
-
var StatusIconWarning = () => /* @__PURE__ */ (0,
|
|
8507
|
-
var StatusIconError = () => /* @__PURE__ */ (0,
|
|
8737
|
+
var StatusIconSuccess = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-brand-600 dark:bg-brand-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react30.CheckIcon, { className: "size-3 text-white", strokeWidth: 3 }) });
|
|
8738
|
+
var StatusIconInfo = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-foreground-lighter p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react30.InfoIcon, { className: "size-3 text-background-surface-200" }) });
|
|
8739
|
+
var StatusIconWarning = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-warning-600 dark:bg-warning-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react30.TriangleAlertIcon, { className: "size-3 text-white" }) });
|
|
8740
|
+
var StatusIconError = () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "flex size-4 shrink-0 items-center justify-center rounded bg-destructive-600 dark:bg-destructive-500 p-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react30.XCircleIcon, { className: "size-3 text-white" }) });
|
|
8508
8741
|
var Toaster = ({
|
|
8509
8742
|
dir = "rtl",
|
|
8510
8743
|
position = "bottom-left",
|
|
@@ -8513,15 +8746,15 @@ var Toaster = ({
|
|
|
8513
8746
|
...props
|
|
8514
8747
|
}) => {
|
|
8515
8748
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
8516
|
-
return /* @__PURE__ */ (0,
|
|
8749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8517
8750
|
import_sonner.Toaster,
|
|
8518
8751
|
{
|
|
8519
8752
|
icons: {
|
|
8520
|
-
success: /* @__PURE__ */ (0,
|
|
8521
|
-
info: /* @__PURE__ */ (0,
|
|
8522
|
-
warning: /* @__PURE__ */ (0,
|
|
8523
|
-
error: /* @__PURE__ */ (0,
|
|
8524
|
-
loading: /* @__PURE__ */ (0,
|
|
8753
|
+
success: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconSuccess, {}),
|
|
8754
|
+
info: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconInfo, {}),
|
|
8755
|
+
warning: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconWarning, {}),
|
|
8756
|
+
error: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(StatusIconError, {}),
|
|
8757
|
+
loading: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react30.Loader2Icon, { className: "size-4 animate-spin" })
|
|
8525
8758
|
},
|
|
8526
8759
|
theme,
|
|
8527
8760
|
className: "toaster group pointer-events-auto",
|
|
@@ -8571,11 +8804,11 @@ var Toaster = ({
|
|
|
8571
8804
|
};
|
|
8572
8805
|
|
|
8573
8806
|
// src/components/ui/switch.tsx
|
|
8574
|
-
var
|
|
8807
|
+
var React31 = __toESM(require("react"), 1);
|
|
8575
8808
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
|
|
8576
|
-
var
|
|
8577
|
-
var
|
|
8578
|
-
var switchRootVariants = (0,
|
|
8809
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
8810
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8811
|
+
var switchRootVariants = (0, import_class_variance_authority15.cva)(
|
|
8579
8812
|
"peer inline-flex shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-brand data-[state=checked]:hover:bg-brand-600/90 data-[state=unchecked]:bg-control data-[state=unchecked]:hover:bg-border",
|
|
8580
8813
|
{
|
|
8581
8814
|
variants: {
|
|
@@ -8590,7 +8823,7 @@ var switchRootVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8590
8823
|
}
|
|
8591
8824
|
}
|
|
8592
8825
|
);
|
|
8593
|
-
var switchThumbVariants = (0,
|
|
8826
|
+
var switchThumbVariants = (0, import_class_variance_authority15.cva)(
|
|
8594
8827
|
"pointer-events-none block rounded-full bg-foreground-lighter data-[state=checked]:bg-white shadow-lg ring-0 transition-transform",
|
|
8595
8828
|
{
|
|
8596
8829
|
variants: {
|
|
@@ -8605,14 +8838,14 @@ var switchThumbVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8605
8838
|
}
|
|
8606
8839
|
}
|
|
8607
8840
|
);
|
|
8608
|
-
var Switch =
|
|
8841
|
+
var Switch = React31.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8609
8842
|
SwitchPrimitive.Root,
|
|
8610
8843
|
{
|
|
8611
8844
|
"data-slot": "switch",
|
|
8612
8845
|
className: cn(switchRootVariants({ size }), className),
|
|
8613
8846
|
...props,
|
|
8614
8847
|
ref,
|
|
8615
|
-
children: /* @__PURE__ */ (0,
|
|
8848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8616
8849
|
SwitchPrimitive.Thumb,
|
|
8617
8850
|
{
|
|
8618
8851
|
"data-slot": "switch-thumb",
|
|
@@ -8624,14 +8857,14 @@ var Switch = React29.forwardRef(({ className, size, ...props }, ref) => /* @__PU
|
|
|
8624
8857
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
8625
8858
|
|
|
8626
8859
|
// src/components/ui/table.tsx
|
|
8627
|
-
var
|
|
8860
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8628
8861
|
function Table({ className, ...props }) {
|
|
8629
|
-
return /* @__PURE__ */ (0,
|
|
8862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8630
8863
|
"div",
|
|
8631
8864
|
{
|
|
8632
8865
|
"data-slot": "table-container",
|
|
8633
8866
|
className: "relative w-full overflow-x-auto",
|
|
8634
|
-
children: /* @__PURE__ */ (0,
|
|
8867
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8635
8868
|
"table",
|
|
8636
8869
|
{
|
|
8637
8870
|
"data-slot": "table",
|
|
@@ -8643,7 +8876,7 @@ function Table({ className, ...props }) {
|
|
|
8643
8876
|
);
|
|
8644
8877
|
}
|
|
8645
8878
|
function TableHeader({ className, ...props }) {
|
|
8646
|
-
return /* @__PURE__ */ (0,
|
|
8879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8647
8880
|
"thead",
|
|
8648
8881
|
{
|
|
8649
8882
|
"data-slot": "table-header",
|
|
@@ -8653,7 +8886,7 @@ function TableHeader({ className, ...props }) {
|
|
|
8653
8886
|
);
|
|
8654
8887
|
}
|
|
8655
8888
|
function TableBody({ className, ...props }) {
|
|
8656
|
-
return /* @__PURE__ */ (0,
|
|
8889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8657
8890
|
"tbody",
|
|
8658
8891
|
{
|
|
8659
8892
|
"data-slot": "table-body",
|
|
@@ -8663,7 +8896,7 @@ function TableBody({ className, ...props }) {
|
|
|
8663
8896
|
);
|
|
8664
8897
|
}
|
|
8665
8898
|
function TableFooter({ className, ...props }) {
|
|
8666
|
-
return /* @__PURE__ */ (0,
|
|
8899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8667
8900
|
"tfoot",
|
|
8668
8901
|
{
|
|
8669
8902
|
"data-slot": "table-footer",
|
|
@@ -8676,7 +8909,7 @@ function TableFooter({ className, ...props }) {
|
|
|
8676
8909
|
);
|
|
8677
8910
|
}
|
|
8678
8911
|
function TableRow({ className, ...props }) {
|
|
8679
|
-
return /* @__PURE__ */ (0,
|
|
8912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8680
8913
|
"tr",
|
|
8681
8914
|
{
|
|
8682
8915
|
"data-slot": "table-row",
|
|
@@ -8689,7 +8922,7 @@ function TableRow({ className, ...props }) {
|
|
|
8689
8922
|
);
|
|
8690
8923
|
}
|
|
8691
8924
|
function TableHead({ className, ...props }) {
|
|
8692
|
-
return /* @__PURE__ */ (0,
|
|
8925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8693
8926
|
"th",
|
|
8694
8927
|
{
|
|
8695
8928
|
"data-slot": "table-head",
|
|
@@ -8702,7 +8935,7 @@ function TableHead({ className, ...props }) {
|
|
|
8702
8935
|
);
|
|
8703
8936
|
}
|
|
8704
8937
|
function TableCell({ className, ...props }) {
|
|
8705
|
-
return /* @__PURE__ */ (0,
|
|
8938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8706
8939
|
"td",
|
|
8707
8940
|
{
|
|
8708
8941
|
"data-slot": "table-cell",
|
|
@@ -8718,7 +8951,7 @@ function TableCaption({
|
|
|
8718
8951
|
className,
|
|
8719
8952
|
...props
|
|
8720
8953
|
}) {
|
|
8721
|
-
return /* @__PURE__ */ (0,
|
|
8954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8722
8955
|
"caption",
|
|
8723
8956
|
{
|
|
8724
8957
|
"data-slot": "table-caption",
|
|
@@ -8729,11 +8962,11 @@ function TableCaption({
|
|
|
8729
8962
|
}
|
|
8730
8963
|
|
|
8731
8964
|
// src/components/ui/tabs.tsx
|
|
8732
|
-
var
|
|
8965
|
+
var React32 = __toESM(require("react"), 1);
|
|
8733
8966
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
8734
|
-
var
|
|
8967
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8735
8968
|
var Tabs = TabsPrimitive.Root;
|
|
8736
|
-
var TabsList =
|
|
8969
|
+
var TabsList = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8737
8970
|
TabsPrimitive.List,
|
|
8738
8971
|
{
|
|
8739
8972
|
ref,
|
|
@@ -8745,7 +8978,7 @@ var TabsList = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
8745
8978
|
}
|
|
8746
8979
|
));
|
|
8747
8980
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8748
|
-
var TabsTrigger =
|
|
8981
|
+
var TabsTrigger = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8749
8982
|
TabsPrimitive.Trigger,
|
|
8750
8983
|
{
|
|
8751
8984
|
ref,
|
|
@@ -8757,7 +8990,7 @@ var TabsTrigger = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
8757
8990
|
}
|
|
8758
8991
|
));
|
|
8759
8992
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
8760
|
-
var TabsContent =
|
|
8993
|
+
var TabsContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8761
8994
|
TabsPrimitive.Content,
|
|
8762
8995
|
{
|
|
8763
8996
|
ref,
|
|
@@ -8772,9 +9005,9 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
8772
9005
|
|
|
8773
9006
|
// src/components/ui/toggle.tsx
|
|
8774
9007
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
8775
|
-
var
|
|
8776
|
-
var
|
|
8777
|
-
var toggleVariants = (0,
|
|
9008
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
9009
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
9010
|
+
var toggleVariants = (0, import_class_variance_authority16.cva)(
|
|
8778
9011
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-background-control focus-visible:ring-offset-2 transition-[color,box-shadow] whitespace-nowrap",
|
|
8779
9012
|
{
|
|
8780
9013
|
variants: {
|
|
@@ -8800,7 +9033,7 @@ function Toggle({
|
|
|
8800
9033
|
size,
|
|
8801
9034
|
...props
|
|
8802
9035
|
}) {
|
|
8803
|
-
return /* @__PURE__ */ (0,
|
|
9036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8804
9037
|
TogglePrimitive.Root,
|
|
8805
9038
|
{
|
|
8806
9039
|
"data-slot": "toggle",
|
|
@@ -8811,10 +9044,10 @@ function Toggle({
|
|
|
8811
9044
|
}
|
|
8812
9045
|
|
|
8813
9046
|
// src/components/ui/toggle-group.tsx
|
|
8814
|
-
var
|
|
9047
|
+
var React33 = __toESM(require("react"), 1);
|
|
8815
9048
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
8816
|
-
var
|
|
8817
|
-
var ToggleGroupContext =
|
|
9049
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
9050
|
+
var ToggleGroupContext = React33.createContext({
|
|
8818
9051
|
size: "default",
|
|
8819
9052
|
variant: "default"
|
|
8820
9053
|
});
|
|
@@ -8825,13 +9058,13 @@ function ToggleGroup({
|
|
|
8825
9058
|
children,
|
|
8826
9059
|
...props
|
|
8827
9060
|
}) {
|
|
8828
|
-
return /* @__PURE__ */ (0,
|
|
9061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8829
9062
|
ToggleGroupPrimitive.Root,
|
|
8830
9063
|
{
|
|
8831
9064
|
"data-slot": "toggle-group",
|
|
8832
9065
|
className: cn("flex items-center justify-center gap-1", className),
|
|
8833
9066
|
...props,
|
|
8834
|
-
children: /* @__PURE__ */ (0,
|
|
9067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
8835
9068
|
}
|
|
8836
9069
|
);
|
|
8837
9070
|
}
|
|
@@ -8842,8 +9075,8 @@ function ToggleGroupItem({
|
|
|
8842
9075
|
size,
|
|
8843
9076
|
...props
|
|
8844
9077
|
}) {
|
|
8845
|
-
const context =
|
|
8846
|
-
return /* @__PURE__ */ (0,
|
|
9078
|
+
const context = React33.useContext(ToggleGroupContext);
|
|
9079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8847
9080
|
ToggleGroupPrimitive.Item,
|
|
8848
9081
|
{
|
|
8849
9082
|
"data-slot": "toggle-group-item",
|
|
@@ -8907,7 +9140,7 @@ function resolveCssColor(styles, variable, fallback) {
|
|
|
8907
9140
|
}
|
|
8908
9141
|
|
|
8909
9142
|
// src/components/charts/PartoLineChart.tsx
|
|
8910
|
-
var
|
|
9143
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8911
9144
|
var FALLBACKS = {
|
|
8912
9145
|
foreground: "hsl(0 0% 98%)",
|
|
8913
9146
|
border: "hsl(0 0% 45%)",
|
|
@@ -8995,12 +9228,12 @@ function PartoLineChart({ className, ...props }) {
|
|
|
8995
9228
|
getColor("--chart-4", FALLBACKS.chart4),
|
|
8996
9229
|
getColor("--chart-5", FALLBACKS.chart5)
|
|
8997
9230
|
];
|
|
8998
|
-
return /* @__PURE__ */ (0,
|
|
9231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_line.ResponsiveLine, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
8999
9232
|
}
|
|
9000
9233
|
|
|
9001
9234
|
// src/components/charts/PartoBarChart.tsx
|
|
9002
9235
|
var import_bar = require("@nivo/bar");
|
|
9003
|
-
var
|
|
9236
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
9004
9237
|
var FALLBACKS2 = {
|
|
9005
9238
|
foreground: "hsl(0 0% 98%)",
|
|
9006
9239
|
border: "hsl(0 0% 45%)",
|
|
@@ -9078,12 +9311,12 @@ function PartoBarChart({ className, ...props }) {
|
|
|
9078
9311
|
getColor("--chart-4", FALLBACKS2.chart4),
|
|
9079
9312
|
getColor("--chart-5", FALLBACKS2.chart5)
|
|
9080
9313
|
];
|
|
9081
|
-
return /* @__PURE__ */ (0,
|
|
9314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_bar.ResponsiveBar, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9082
9315
|
}
|
|
9083
9316
|
|
|
9084
9317
|
// src/components/charts/PartoPieChart.tsx
|
|
9085
9318
|
var import_pie = require("@nivo/pie");
|
|
9086
|
-
var
|
|
9319
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
9087
9320
|
var FALLBACKS3 = {
|
|
9088
9321
|
foreground: "hsl(0 0% 98%)",
|
|
9089
9322
|
popover: "hsl(0 0% 12%)",
|
|
@@ -9128,12 +9361,12 @@ function PartoPieChart({ className, ...props }) {
|
|
|
9128
9361
|
getColor("--chart-4", FALLBACKS3.chart4),
|
|
9129
9362
|
getColor("--chart-5", FALLBACKS3.chart5)
|
|
9130
9363
|
];
|
|
9131
|
-
return /* @__PURE__ */ (0,
|
|
9364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className, dir: "ltr", style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_pie.ResponsivePie, { theme: nivoTheme, colors: defaultColors, ...props }) });
|
|
9132
9365
|
}
|
|
9133
9366
|
|
|
9134
9367
|
// src/components/charts/PartoHeatMap.tsx
|
|
9135
9368
|
var import_heatmap = require("@nivo/heatmap");
|
|
9136
|
-
var
|
|
9369
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
9137
9370
|
var FALLBACKS4 = {
|
|
9138
9371
|
foreground: "hsl(0 0% 98%)",
|
|
9139
9372
|
border: "hsl(0 0% 45%)",
|
|
@@ -9260,16 +9493,16 @@ function PartoHeatMap({
|
|
|
9260
9493
|
}
|
|
9261
9494
|
};
|
|
9262
9495
|
const defaultValueFormat = (value) => formatNumber2(value);
|
|
9263
|
-
const defaultTooltip = ({ cell }) => /* @__PURE__ */ (0,
|
|
9264
|
-
/* @__PURE__ */ (0,
|
|
9496
|
+
const defaultTooltip = ({ cell }) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "bg-popover text-popover-foreground rounded-md shadow-lg px-3 py-2 border border-border min-w-[140px] text-center", children: [
|
|
9497
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "font-semibold text-sm mb-1.5 whitespace-nowrap", children: [
|
|
9265
9498
|
formatWeekday(String(cell.serieId)),
|
|
9266
9499
|
" - ",
|
|
9267
9500
|
formatNumber2(cell.data.x)
|
|
9268
9501
|
] }),
|
|
9269
|
-
/* @__PURE__ */ (0,
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "text-xs whitespace-nowrap", children: [
|
|
9270
9503
|
isPersian ? "\u0634\u062F\u062A \u0641\u0639\u0627\u0644\u06CC\u062A" : "Activity",
|
|
9271
9504
|
": ",
|
|
9272
|
-
/* @__PURE__ */ (0,
|
|
9505
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "font-bold text-primary", children: formatNumber2(cell.value ?? 0) })
|
|
9273
9506
|
] })
|
|
9274
9507
|
] });
|
|
9275
9508
|
const processAxisConfig = (axisConfig) => {
|
|
@@ -9298,13 +9531,13 @@ function PartoHeatMap({
|
|
|
9298
9531
|
return formatWeekday(String(formatted));
|
|
9299
9532
|
}
|
|
9300
9533
|
} : null;
|
|
9301
|
-
return /* @__PURE__ */ (0,
|
|
9534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9302
9535
|
"div",
|
|
9303
9536
|
{
|
|
9304
9537
|
className,
|
|
9305
9538
|
dir: "ltr",
|
|
9306
9539
|
style: { position: "relative", width: "100%", height: "100%" },
|
|
9307
|
-
children: /* @__PURE__ */ (0,
|
|
9540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9308
9541
|
import_heatmap.ResponsiveHeatMap,
|
|
9309
9542
|
{
|
|
9310
9543
|
data,
|
|
@@ -9336,12 +9569,12 @@ function PartoHeatMap({
|
|
|
9336
9569
|
}
|
|
9337
9570
|
|
|
9338
9571
|
// src/components/charts/PartoWordCloud.tsx
|
|
9339
|
-
var
|
|
9572
|
+
var React34 = __toESM(require("react"), 1);
|
|
9340
9573
|
var import_react_dom3 = require("react-dom");
|
|
9341
9574
|
var import_wordcloud = require("@visx/wordcloud");
|
|
9342
9575
|
var import_scale = require("@visx/scale");
|
|
9343
9576
|
var import_text = require("@visx/text");
|
|
9344
|
-
var
|
|
9577
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
9345
9578
|
var FALLBACKS5 = {
|
|
9346
9579
|
primary: "hsl(12 76% 61%)"
|
|
9347
9580
|
};
|
|
@@ -9373,11 +9606,11 @@ function PartoWordCloud({
|
|
|
9373
9606
|
fontWeight = 600
|
|
9374
9607
|
}) {
|
|
9375
9608
|
const styles = useRootStyles();
|
|
9376
|
-
const [hovered, setHovered] =
|
|
9377
|
-
const containerRef =
|
|
9609
|
+
const [hovered, setHovered] = React34.useState(null);
|
|
9610
|
+
const containerRef = React34.useRef(null);
|
|
9378
9611
|
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9379
9612
|
const primaryColor = getColor("--primary", FALLBACKS5.primary);
|
|
9380
|
-
const formattedWords =
|
|
9613
|
+
const formattedWords = React34.useMemo(() => {
|
|
9381
9614
|
return words.map((word) => ({
|
|
9382
9615
|
...word,
|
|
9383
9616
|
text: formatHashtagDirection(word.text)
|
|
@@ -9404,7 +9637,7 @@ function PartoWordCloud({
|
|
|
9404
9637
|
color: primaryColor
|
|
9405
9638
|
});
|
|
9406
9639
|
};
|
|
9407
|
-
return /* @__PURE__ */ (0,
|
|
9640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
9408
9641
|
"div",
|
|
9409
9642
|
{
|
|
9410
9643
|
ref: containerRef,
|
|
@@ -9412,7 +9645,7 @@ function PartoWordCloud({
|
|
|
9412
9645
|
style: { position: "relative", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
9413
9646
|
dir: "rtl",
|
|
9414
9647
|
children: [
|
|
9415
|
-
/* @__PURE__ */ (0,
|
|
9648
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { style: { position: "relative", width, height, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9416
9649
|
import_wordcloud.Wordcloud,
|
|
9417
9650
|
{
|
|
9418
9651
|
words: formattedWords,
|
|
@@ -9428,7 +9661,7 @@ function PartoWordCloud({
|
|
|
9428
9661
|
const originalData = formattedWords.find((item) => item.text === w.text);
|
|
9429
9662
|
const value = originalData?.value || 0;
|
|
9430
9663
|
if (!w.x || !w.y || !w.text) return null;
|
|
9431
|
-
return /* @__PURE__ */ (0,
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9432
9665
|
import_text.Text,
|
|
9433
9666
|
{
|
|
9434
9667
|
fill: primaryColor,
|
|
@@ -9452,7 +9685,7 @@ function PartoWordCloud({
|
|
|
9452
9685
|
}
|
|
9453
9686
|
) }),
|
|
9454
9687
|
hovered && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
|
|
9455
|
-
/* @__PURE__ */ (0,
|
|
9688
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9456
9689
|
"div",
|
|
9457
9690
|
{
|
|
9458
9691
|
className: "pointer-events-none fixed z-[9999]",
|
|
@@ -9462,14 +9695,14 @@ function PartoWordCloud({
|
|
|
9462
9695
|
top: `${hovered.y - 10}px`,
|
|
9463
9696
|
transform: "translate(-50%, -100%)"
|
|
9464
9697
|
},
|
|
9465
|
-
children: /* @__PURE__ */ (0,
|
|
9466
|
-
/* @__PURE__ */ (0,
|
|
9467
|
-
/* @__PURE__ */ (0,
|
|
9468
|
-
/* @__PURE__ */ (0,
|
|
9698
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", dir: "rtl", children: [
|
|
9699
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9700
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-2.5 w-2.5 rounded-[2px]", style: { backgroundColor: hovered.color } }),
|
|
9701
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-medium", children: hovered.text })
|
|
9469
9702
|
] }),
|
|
9470
|
-
/* @__PURE__ */ (0,
|
|
9471
|
-
/* @__PURE__ */ (0,
|
|
9472
|
-
/* @__PURE__ */ (0,
|
|
9703
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
9704
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "text-muted-foreground", children: "\u062A\u0639\u062F\u0627\u062F" }),
|
|
9705
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-mono font-medium tabular-nums", children: hovered.value.toLocaleString("fa-IR") })
|
|
9473
9706
|
] })
|
|
9474
9707
|
] })
|
|
9475
9708
|
}
|
|
@@ -9619,6 +9852,7 @@ function PartoWordCloud({
|
|
|
9619
9852
|
FormItem,
|
|
9620
9853
|
FormLabel,
|
|
9621
9854
|
FormMessage,
|
|
9855
|
+
HashtagInput,
|
|
9622
9856
|
HoverCard,
|
|
9623
9857
|
HoverCardContent,
|
|
9624
9858
|
HoverCardTrigger,
|
|
@@ -9767,6 +10001,7 @@ function PartoWordCloud({
|
|
|
9767
10001
|
TabsContent,
|
|
9768
10002
|
TabsList,
|
|
9769
10003
|
TabsTrigger,
|
|
10004
|
+
TagInput,
|
|
9770
10005
|
Textarea,
|
|
9771
10006
|
Toaster,
|
|
9772
10007
|
Toggle,
|
|
@@ -9794,9 +10029,11 @@ function PartoWordCloud({
|
|
|
9794
10029
|
getPersianWeekdayName,
|
|
9795
10030
|
getPersianYear,
|
|
9796
10031
|
getPersianYearsForDropdown,
|
|
10032
|
+
hashtagInputVariants,
|
|
9797
10033
|
instagramPostVariants,
|
|
9798
10034
|
jalaliToGregorian,
|
|
9799
10035
|
navigationMenuTriggerStyle,
|
|
10036
|
+
tagInputVariants,
|
|
9800
10037
|
toEnglishDigits,
|
|
9801
10038
|
toPersianDigits,
|
|
9802
10039
|
toast,
|