@parto-system-design/ui 1.0.4 → 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 +854 -577
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +65 -0
- package/dist/index.d.cts +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +836 -563
- 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,36 +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
|
|
4842
|
+
var React19 = __toESM(require("react"), 1);
|
|
4843
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
4583
4844
|
|
|
4584
4845
|
// src/components/ui/tooltip.tsx
|
|
4585
|
-
var
|
|
4846
|
+
var React18 = __toESM(require("react"), 1);
|
|
4586
4847
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4587
|
-
var
|
|
4848
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4588
4849
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4589
4850
|
var Tooltip = TooltipPrimitive.Root;
|
|
4590
4851
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
4591
|
-
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)(
|
|
4592
4853
|
TooltipPrimitive.Content,
|
|
4593
4854
|
{
|
|
4594
4855
|
ref,
|
|
@@ -4603,8 +4864,9 @@ var TooltipContent = React16.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
4603
4864
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
4604
4865
|
|
|
4605
4866
|
// src/components/ui/instagram-post.tsx
|
|
4606
|
-
var
|
|
4607
|
-
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)(
|
|
4608
4870
|
"relative border bg-background-surface-100",
|
|
4609
4871
|
{
|
|
4610
4872
|
variants: {
|
|
@@ -4624,17 +4886,22 @@ function InstagramPostMedia({
|
|
|
4624
4886
|
variant = "vertical",
|
|
4625
4887
|
placeholderText = "No media available"
|
|
4626
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" }) });
|
|
4627
4894
|
if (!media || media.length === 0) {
|
|
4628
|
-
return /* @__PURE__ */ (0,
|
|
4895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4629
4896
|
"div",
|
|
4630
4897
|
{
|
|
4631
4898
|
className: cn(
|
|
4632
4899
|
"flex items-center justify-center bg-muted/30",
|
|
4633
4900
|
variant === "vertical" ? "aspect-square" : "w-[20%] shrink-0 h-full min-h-[200px] -my-[1px] -ms-[1px]"
|
|
4634
4901
|
),
|
|
4635
|
-
children: /* @__PURE__ */ (0,
|
|
4636
|
-
/* @__PURE__ */ (0,
|
|
4637
|
-
/* @__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 })
|
|
4638
4905
|
] })
|
|
4639
4906
|
}
|
|
4640
4907
|
);
|
|
@@ -4642,27 +4909,29 @@ function InstagramPostMedia({
|
|
|
4642
4909
|
if (mediaType === "image" || media.length === 1 && media[0].type === "image") {
|
|
4643
4910
|
const item = media[0];
|
|
4644
4911
|
if (variant === "horizontal") {
|
|
4645
|
-
return /* @__PURE__ */ (0,
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4647
|
-
/* @__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)(
|
|
4648
4915
|
"img",
|
|
4649
4916
|
{
|
|
4650
4917
|
src: item.url,
|
|
4651
4918
|
alt: "Post media",
|
|
4652
|
-
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)
|
|
4653
4921
|
}
|
|
4654
4922
|
)
|
|
4655
4923
|
] });
|
|
4656
4924
|
}
|
|
4657
4925
|
const ratio = getAspectRatio(item.aspectRatio || "1:1");
|
|
4658
|
-
return /* @__PURE__ */ (0,
|
|
4659
|
-
/* @__PURE__ */ (0,
|
|
4660
|
-
/* @__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)(
|
|
4661
4929
|
"img",
|
|
4662
4930
|
{
|
|
4663
4931
|
src: item.url,
|
|
4664
4932
|
alt: "Post media",
|
|
4665
|
-
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)
|
|
4666
4935
|
}
|
|
4667
4936
|
)
|
|
4668
4937
|
] });
|
|
@@ -4670,70 +4939,74 @@ function InstagramPostMedia({
|
|
|
4670
4939
|
if (mediaType === "video" || media.length === 1 && media[0].type === "video") {
|
|
4671
4940
|
const item = media[0];
|
|
4672
4941
|
if (variant === "horizontal") {
|
|
4673
|
-
return /* @__PURE__ */ (0,
|
|
4674
|
-
/* @__PURE__ */ (0,
|
|
4675
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4676
4945
|
"img",
|
|
4677
4946
|
{
|
|
4678
4947
|
src: item.url,
|
|
4679
4948
|
alt: "Post media",
|
|
4680
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4949
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4950
|
+
onError: () => handleImageError(item.url)
|
|
4681
4951
|
}
|
|
4682
4952
|
)
|
|
4683
4953
|
] });
|
|
4684
4954
|
}
|
|
4685
4955
|
const ratio = getAspectRatio(item.aspectRatio || "16:9");
|
|
4686
|
-
return /* @__PURE__ */ (0,
|
|
4687
|
-
/* @__PURE__ */ (0,
|
|
4688
|
-
/* @__PURE__ */ (0,
|
|
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)(
|
|
4689
4959
|
"img",
|
|
4690
4960
|
{
|
|
4691
4961
|
src: item.url,
|
|
4692
4962
|
alt: "Post media",
|
|
4693
|
-
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300"
|
|
4963
|
+
className: "w-full h-full object-cover group-hover:scale-110 transition-transform duration-300",
|
|
4964
|
+
onError: () => handleImageError(item.url)
|
|
4694
4965
|
}
|
|
4695
4966
|
)
|
|
4696
4967
|
] });
|
|
4697
4968
|
}
|
|
4698
4969
|
if (mediaType === "carousel" || media.length > 1) {
|
|
4699
4970
|
if (variant === "horizontal") {
|
|
4700
|
-
return /* @__PURE__ */ (0,
|
|
4701
|
-
/* @__PURE__ */ (0,
|
|
4702
|
-
/* @__PURE__ */ (0,
|
|
4703
|
-
/* @__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)(
|
|
4704
4975
|
"img",
|
|
4705
4976
|
{
|
|
4706
4977
|
src: item.url,
|
|
4707
4978
|
alt: `Post media ${index + 1}`,
|
|
4708
|
-
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)
|
|
4709
4981
|
}
|
|
4710
4982
|
)
|
|
4711
4983
|
] }, index)) }),
|
|
4712
|
-
/* @__PURE__ */ (0,
|
|
4713
|
-
/* @__PURE__ */ (0,
|
|
4984
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
4985
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4714
4986
|
] }) });
|
|
4715
4987
|
}
|
|
4716
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
-
/* @__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)(
|
|
4718
4990
|
"div",
|
|
4719
4991
|
{
|
|
4720
|
-
className: "w-full relative overflow-hidden group cursor-pointer",
|
|
4992
|
+
className: "w-full relative overflow-hidden group cursor-pointer bg-muted/30",
|
|
4721
4993
|
style: { aspectRatio: getAspectRatio(item.aspectRatio || (item.type === "video" ? "16:9" : "1:1")) },
|
|
4722
4994
|
children: [
|
|
4723
|
-
/* @__PURE__ */ (0,
|
|
4724
|
-
/* @__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)(
|
|
4725
4997
|
"img",
|
|
4726
4998
|
{
|
|
4727
4999
|
src: item.url,
|
|
4728
5000
|
alt: `Post media ${index + 1}`,
|
|
4729
|
-
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)
|
|
4730
5003
|
}
|
|
4731
5004
|
)
|
|
4732
5005
|
]
|
|
4733
5006
|
}
|
|
4734
5007
|
) }, index)) }),
|
|
4735
|
-
/* @__PURE__ */ (0,
|
|
4736
|
-
/* @__PURE__ */ (0,
|
|
5008
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselPrevious, { className: "ms-2" }),
|
|
5009
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CarouselNext, { className: "me-2" })
|
|
4737
5010
|
] });
|
|
4738
5011
|
}
|
|
4739
5012
|
return null;
|
|
@@ -4753,10 +5026,10 @@ function InstagramPostCaption({
|
|
|
4753
5026
|
maxLines = 3,
|
|
4754
5027
|
variant = "vertical"
|
|
4755
5028
|
}) {
|
|
4756
|
-
const [isExpanded, setIsExpanded] =
|
|
4757
|
-
const [shouldShowMore, setShouldShowMore] =
|
|
4758
|
-
const textRef =
|
|
4759
|
-
|
|
5029
|
+
const [isExpanded, setIsExpanded] = React19.useState(false);
|
|
5030
|
+
const [shouldShowMore, setShouldShowMore] = React19.useState(false);
|
|
5031
|
+
const textRef = React19.useRef(null);
|
|
5032
|
+
React19.useEffect(() => {
|
|
4760
5033
|
if (variant === "vertical" && textRef.current && !isExpanded) {
|
|
4761
5034
|
const lineHeight = parseInt(window.getComputedStyle(textRef.current).lineHeight);
|
|
4762
5035
|
const maxHeight = lineHeight * maxLines;
|
|
@@ -4767,11 +5040,11 @@ function InstagramPostCaption({
|
|
|
4767
5040
|
}, [caption, maxLines, isExpanded, variant]);
|
|
4768
5041
|
if (!caption) return null;
|
|
4769
5042
|
const parsedCaption = parseCaption(caption);
|
|
4770
|
-
return /* @__PURE__ */ (0,
|
|
5043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: cn(
|
|
4771
5044
|
"px-4 py-2",
|
|
4772
5045
|
variant === "horizontal" && "overflow-visible"
|
|
4773
5046
|
), children: [
|
|
4774
|
-
/* @__PURE__ */ (0,
|
|
5047
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4775
5048
|
"p",
|
|
4776
5049
|
{
|
|
4777
5050
|
ref: textRef,
|
|
@@ -4788,7 +5061,7 @@ function InstagramPostCaption({
|
|
|
4788
5061
|
} : void 0,
|
|
4789
5062
|
children: parsedCaption.map((part, index) => {
|
|
4790
5063
|
if (part.type === "hashtag") {
|
|
4791
|
-
return /* @__PURE__ */ (0,
|
|
5064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4792
5065
|
"span",
|
|
4793
5066
|
{
|
|
4794
5067
|
className: "text-brand-link hover:underline cursor-pointer",
|
|
@@ -4798,7 +5071,7 @@ function InstagramPostCaption({
|
|
|
4798
5071
|
);
|
|
4799
5072
|
}
|
|
4800
5073
|
if (part.type === "mention") {
|
|
4801
|
-
return /* @__PURE__ */ (0,
|
|
5074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4802
5075
|
"span",
|
|
4803
5076
|
{
|
|
4804
5077
|
className: "text-brand-link hover:underline cursor-pointer font-medium",
|
|
@@ -4807,11 +5080,11 @@ function InstagramPostCaption({
|
|
|
4807
5080
|
index
|
|
4808
5081
|
);
|
|
4809
5082
|
}
|
|
4810
|
-
return /* @__PURE__ */ (0,
|
|
5083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: part.text }, index);
|
|
4811
5084
|
})
|
|
4812
5085
|
}
|
|
4813
5086
|
),
|
|
4814
|
-
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0,
|
|
5087
|
+
shouldShowMore && variant === "vertical" && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
4815
5088
|
"button",
|
|
4816
5089
|
{
|
|
4817
5090
|
onClick: () => setIsExpanded(!isExpanded),
|
|
@@ -4917,15 +5190,15 @@ function InstagramPostStats({
|
|
|
4917
5190
|
});
|
|
4918
5191
|
}
|
|
4919
5192
|
if (items.length === 0) return null;
|
|
4920
|
-
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) => {
|
|
4921
5194
|
const Icon2 = item.icon;
|
|
4922
|
-
return /* @__PURE__ */ (0,
|
|
4923
|
-
/* @__PURE__ */ (0,
|
|
4924
|
-
/* @__PURE__ */ (0,
|
|
4925
|
-
/* @__PURE__ */ (0,
|
|
4926
|
-
/* @__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 })
|
|
4927
5200
|
] }) }),
|
|
4928
|
-
/* @__PURE__ */ (0,
|
|
5201
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("p", { children: [
|
|
4929
5202
|
item.label,
|
|
4930
5203
|
": ",
|
|
4931
5204
|
item.exactValue
|
|
@@ -4940,7 +5213,7 @@ function InstagramPostProfile({
|
|
|
4940
5213
|
}) {
|
|
4941
5214
|
if (!profile) return null;
|
|
4942
5215
|
const displayAvatarUrl = avatarUrl || profile.avatarUrl || profile.profilePicture;
|
|
4943
|
-
return /* @__PURE__ */ (0,
|
|
5216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
4944
5217
|
"div",
|
|
4945
5218
|
{
|
|
4946
5219
|
className: cn(
|
|
@@ -4949,13 +5222,13 @@ function InstagramPostProfile({
|
|
|
4949
5222
|
variant === "horizontal" && "pb-2"
|
|
4950
5223
|
),
|
|
4951
5224
|
children: [
|
|
4952
|
-
/* @__PURE__ */ (0,
|
|
4953
|
-
displayAvatarUrl && /* @__PURE__ */ (0,
|
|
4954
|
-
/* @__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() })
|
|
4955
5228
|
] }),
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4958
|
-
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 })
|
|
4959
5232
|
] })
|
|
4960
5233
|
]
|
|
4961
5234
|
}
|
|
@@ -4992,9 +5265,9 @@ function InstagramPostActions({
|
|
|
4992
5265
|
onAIAnalysis();
|
|
4993
5266
|
}
|
|
4994
5267
|
};
|
|
4995
|
-
return /* @__PURE__ */ (0,
|
|
4996
|
-
/* @__PURE__ */ (0,
|
|
4997
|
-
/* @__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)(
|
|
4998
5271
|
Button,
|
|
4999
5272
|
{
|
|
5000
5273
|
variant: "ghost",
|
|
@@ -5002,13 +5275,13 @@ function InstagramPostActions({
|
|
|
5002
5275
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5003
5276
|
onClick: handleCommentAnalyzer,
|
|
5004
5277
|
"aria-label": "Comment Analyzer",
|
|
5005
|
-
children: /* @__PURE__ */ (0,
|
|
5278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.messageCircle, { className: "size-4" })
|
|
5006
5279
|
}
|
|
5007
5280
|
) }),
|
|
5008
|
-
/* @__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" }) })
|
|
5009
5282
|
] }),
|
|
5010
|
-
/* @__PURE__ */ (0,
|
|
5011
|
-
/* @__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)(
|
|
5012
5285
|
Button,
|
|
5013
5286
|
{
|
|
5014
5287
|
variant: "ghost",
|
|
@@ -5016,13 +5289,13 @@ function InstagramPostActions({
|
|
|
5016
5289
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5017
5290
|
onClick: handleBooster,
|
|
5018
5291
|
"aria-label": "Booster",
|
|
5019
|
-
children: /* @__PURE__ */ (0,
|
|
5292
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.rocket, { className: "size-4" })
|
|
5020
5293
|
}
|
|
5021
5294
|
) }),
|
|
5022
|
-
/* @__PURE__ */ (0,
|
|
5295
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { children: "\u0628\u0648\u0633\u062A\u0631" }) })
|
|
5023
5296
|
] }),
|
|
5024
|
-
/* @__PURE__ */ (0,
|
|
5025
|
-
/* @__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)(
|
|
5026
5299
|
Button,
|
|
5027
5300
|
{
|
|
5028
5301
|
variant: "ghost",
|
|
@@ -5030,13 +5303,13 @@ function InstagramPostActions({
|
|
|
5030
5303
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5031
5304
|
onClick: handleAIAnalysis,
|
|
5032
5305
|
"aria-label": "AI Analysis",
|
|
5033
|
-
children: /* @__PURE__ */ (0,
|
|
5306
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.sparkles, { className: "size-4" })
|
|
5034
5307
|
}
|
|
5035
5308
|
) }),
|
|
5036
|
-
/* @__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" }) })
|
|
5037
5310
|
] }),
|
|
5038
|
-
/* @__PURE__ */ (0,
|
|
5039
|
-
/* @__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)(
|
|
5040
5313
|
Button,
|
|
5041
5314
|
{
|
|
5042
5315
|
variant: "ghost",
|
|
@@ -5044,10 +5317,10 @@ function InstagramPostActions({
|
|
|
5044
5317
|
className: "size-8 bg-background/80 backdrop-blur-sm hover:bg-background",
|
|
5045
5318
|
onClick: handleOpenInstagram,
|
|
5046
5319
|
"aria-label": "Open on Instagram",
|
|
5047
|
-
children: /* @__PURE__ */ (0,
|
|
5320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.instagram, { className: "size-4" })
|
|
5048
5321
|
}
|
|
5049
5322
|
) }),
|
|
5050
|
-
/* @__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" }) })
|
|
5051
5324
|
] })
|
|
5052
5325
|
] }) });
|
|
5053
5326
|
}
|
|
@@ -5059,25 +5332,25 @@ function InstagramPostTime({
|
|
|
5059
5332
|
const relativeTime = formatRelativeTime(publishTime);
|
|
5060
5333
|
const absoluteTime = formatAbsoluteTime(publishTime);
|
|
5061
5334
|
if (timeFormat === "absolute") {
|
|
5062
|
-
return /* @__PURE__ */ (0,
|
|
5063
|
-
/* @__PURE__ */ (0,
|
|
5064
|
-
/* @__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 })
|
|
5065
5338
|
] });
|
|
5066
5339
|
}
|
|
5067
|
-
return /* @__PURE__ */ (0,
|
|
5340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5068
5341
|
"div",
|
|
5069
5342
|
{
|
|
5070
5343
|
className: "px-4 py-1 text-xs text-muted-foreground cursor-default flex items-center gap-1.5",
|
|
5071
5344
|
title: absoluteTime,
|
|
5072
5345
|
dir: "ltr",
|
|
5073
5346
|
children: [
|
|
5074
|
-
/* @__PURE__ */ (0,
|
|
5075
|
-
/* @__PURE__ */ (0,
|
|
5347
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icons.clock, { className: "size-3" }),
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { children: relativeTime })
|
|
5076
5349
|
]
|
|
5077
5350
|
}
|
|
5078
5351
|
);
|
|
5079
5352
|
}
|
|
5080
|
-
var InstagramPost =
|
|
5353
|
+
var InstagramPost = React19.forwardRef(
|
|
5081
5354
|
({
|
|
5082
5355
|
className,
|
|
5083
5356
|
variant = "vertical",
|
|
@@ -5108,7 +5381,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5108
5381
|
...props
|
|
5109
5382
|
}, ref) => {
|
|
5110
5383
|
const isVertical = variant === "vertical";
|
|
5111
|
-
return /* @__PURE__ */ (0,
|
|
5384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
5112
5385
|
"div",
|
|
5113
5386
|
{
|
|
5114
5387
|
ref,
|
|
@@ -5116,7 +5389,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5116
5389
|
dir,
|
|
5117
5390
|
...props,
|
|
5118
5391
|
children: [
|
|
5119
|
-
showActions && /* @__PURE__ */ (0,
|
|
5392
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5120
5393
|
InstagramPostActions,
|
|
5121
5394
|
{
|
|
5122
5395
|
showActions,
|
|
@@ -5127,9 +5400,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5127
5400
|
instagramUrl
|
|
5128
5401
|
}
|
|
5129
5402
|
),
|
|
5130
|
-
isVertical ? /* @__PURE__ */ (0,
|
|
5131
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5132
|
-
/* @__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)(
|
|
5133
5406
|
InstagramPostMedia,
|
|
5134
5407
|
{
|
|
5135
5408
|
media,
|
|
@@ -5138,7 +5411,7 @@ var InstagramPost = React17.forwardRef(
|
|
|
5138
5411
|
placeholderText
|
|
5139
5412
|
}
|
|
5140
5413
|
) }),
|
|
5141
|
-
/* @__PURE__ */ (0,
|
|
5414
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5142
5415
|
InstagramPostStats,
|
|
5143
5416
|
{
|
|
5144
5417
|
stats,
|
|
@@ -5150,16 +5423,16 @@ var InstagramPost = React17.forwardRef(
|
|
|
5150
5423
|
postType
|
|
5151
5424
|
}
|
|
5152
5425
|
),
|
|
5153
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5154
|
-
/* @__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)(
|
|
5155
5428
|
InstagramPostTime,
|
|
5156
5429
|
{
|
|
5157
5430
|
publishTime,
|
|
5158
5431
|
timeFormat
|
|
5159
5432
|
}
|
|
5160
5433
|
) })
|
|
5161
|
-
] }) : /* @__PURE__ */ (0,
|
|
5162
|
-
/* @__PURE__ */ (0,
|
|
5434
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
5435
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5163
5436
|
InstagramPostMedia,
|
|
5164
5437
|
{
|
|
5165
5438
|
media,
|
|
@@ -5168,9 +5441,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5168
5441
|
placeholderText
|
|
5169
5442
|
}
|
|
5170
5443
|
),
|
|
5171
|
-
/* @__PURE__ */ (0,
|
|
5172
|
-
showProfile && /* @__PURE__ */ (0,
|
|
5173
|
-
/* @__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)(
|
|
5174
5447
|
InstagramPostStats,
|
|
5175
5448
|
{
|
|
5176
5449
|
stats,
|
|
@@ -5182,8 +5455,8 @@ var InstagramPost = React17.forwardRef(
|
|
|
5182
5455
|
postType
|
|
5183
5456
|
}
|
|
5184
5457
|
),
|
|
5185
|
-
showCaption && /* @__PURE__ */ (0,
|
|
5186
|
-
/* @__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)(
|
|
5187
5460
|
InstagramPostTime,
|
|
5188
5461
|
{
|
|
5189
5462
|
publishTime,
|
|
@@ -5200,9 +5473,9 @@ var InstagramPost = React17.forwardRef(
|
|
|
5200
5473
|
InstagramPost.displayName = "InstagramPost";
|
|
5201
5474
|
|
|
5202
5475
|
// src/components/ui/kbd.tsx
|
|
5203
|
-
var
|
|
5476
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5204
5477
|
function Kbd({ className, ...props }) {
|
|
5205
|
-
return /* @__PURE__ */ (0,
|
|
5478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5206
5479
|
"kbd",
|
|
5207
5480
|
{
|
|
5208
5481
|
"data-slot": "kbd",
|
|
@@ -5217,7 +5490,7 @@ function Kbd({ className, ...props }) {
|
|
|
5217
5490
|
);
|
|
5218
5491
|
}
|
|
5219
5492
|
function KbdGroup({ className, ...props }) {
|
|
5220
|
-
return /* @__PURE__ */ (0,
|
|
5493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5221
5494
|
"kbd",
|
|
5222
5495
|
{
|
|
5223
5496
|
"data-slot": "kbd-group",
|
|
@@ -5229,13 +5502,13 @@ function KbdGroup({ className, ...props }) {
|
|
|
5229
5502
|
|
|
5230
5503
|
// src/components/ui/menubar.tsx
|
|
5231
5504
|
var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"), 1);
|
|
5232
|
-
var
|
|
5233
|
-
var
|
|
5505
|
+
var import_lucide_react19 = require("lucide-react");
|
|
5506
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5234
5507
|
function Menubar({
|
|
5235
5508
|
className,
|
|
5236
5509
|
...props
|
|
5237
5510
|
}) {
|
|
5238
|
-
return /* @__PURE__ */ (0,
|
|
5511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5239
5512
|
MenubarPrimitive.Root,
|
|
5240
5513
|
{
|
|
5241
5514
|
"data-slot": "menubar",
|
|
@@ -5250,28 +5523,28 @@ function Menubar({
|
|
|
5250
5523
|
function MenubarMenu({
|
|
5251
5524
|
...props
|
|
5252
5525
|
}) {
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
|
|
5254
5527
|
}
|
|
5255
5528
|
function MenubarGroup({
|
|
5256
5529
|
...props
|
|
5257
5530
|
}) {
|
|
5258
|
-
return /* @__PURE__ */ (0,
|
|
5531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
|
|
5259
5532
|
}
|
|
5260
5533
|
function MenubarPortal({
|
|
5261
5534
|
...props
|
|
5262
5535
|
}) {
|
|
5263
|
-
return /* @__PURE__ */ (0,
|
|
5536
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Portal, { "data-slot": "menubar-portal", ...props });
|
|
5264
5537
|
}
|
|
5265
5538
|
function MenubarRadioGroup({
|
|
5266
5539
|
...props
|
|
5267
5540
|
}) {
|
|
5268
|
-
return /* @__PURE__ */ (0,
|
|
5541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.RadioGroup, { "data-slot": "menubar-radio-group", ...props });
|
|
5269
5542
|
}
|
|
5270
5543
|
function MenubarTrigger({
|
|
5271
5544
|
className,
|
|
5272
5545
|
...props
|
|
5273
5546
|
}) {
|
|
5274
|
-
return /* @__PURE__ */ (0,
|
|
5547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5275
5548
|
MenubarPrimitive.Trigger,
|
|
5276
5549
|
{
|
|
5277
5550
|
"data-slot": "menubar-trigger",
|
|
@@ -5290,7 +5563,7 @@ function MenubarContent({
|
|
|
5290
5563
|
sideOffset = 8,
|
|
5291
5564
|
...props
|
|
5292
5565
|
}) {
|
|
5293
|
-
return /* @__PURE__ */ (0,
|
|
5566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5294
5567
|
MenubarPrimitive.Content,
|
|
5295
5568
|
{
|
|
5296
5569
|
"data-slot": "menubar-content",
|
|
@@ -5311,7 +5584,7 @@ function MenubarItem({
|
|
|
5311
5584
|
variant = "default",
|
|
5312
5585
|
...props
|
|
5313
5586
|
}) {
|
|
5314
|
-
return /* @__PURE__ */ (0,
|
|
5587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5315
5588
|
MenubarPrimitive.Item,
|
|
5316
5589
|
{
|
|
5317
5590
|
"data-slot": "menubar-item",
|
|
@@ -5331,7 +5604,7 @@ function MenubarCheckboxItem({
|
|
|
5331
5604
|
checked,
|
|
5332
5605
|
...props
|
|
5333
5606
|
}) {
|
|
5334
|
-
return /* @__PURE__ */ (0,
|
|
5607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5335
5608
|
MenubarPrimitive.CheckboxItem,
|
|
5336
5609
|
{
|
|
5337
5610
|
"data-slot": "menubar-checkbox-item",
|
|
@@ -5342,7 +5615,7 @@ function MenubarCheckboxItem({
|
|
|
5342
5615
|
checked,
|
|
5343
5616
|
...props,
|
|
5344
5617
|
children: [
|
|
5345
|
-
/* @__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" }) }) }),
|
|
5346
5619
|
children
|
|
5347
5620
|
]
|
|
5348
5621
|
}
|
|
@@ -5353,7 +5626,7 @@ function MenubarRadioItem({
|
|
|
5353
5626
|
children,
|
|
5354
5627
|
...props
|
|
5355
5628
|
}) {
|
|
5356
|
-
return /* @__PURE__ */ (0,
|
|
5629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5357
5630
|
MenubarPrimitive.RadioItem,
|
|
5358
5631
|
{
|
|
5359
5632
|
"data-slot": "menubar-radio-item",
|
|
@@ -5363,7 +5636,7 @@ function MenubarRadioItem({
|
|
|
5363
5636
|
),
|
|
5364
5637
|
...props,
|
|
5365
5638
|
children: [
|
|
5366
|
-
/* @__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" }) }) }),
|
|
5367
5640
|
children
|
|
5368
5641
|
]
|
|
5369
5642
|
}
|
|
@@ -5374,7 +5647,7 @@ function MenubarLabel({
|
|
|
5374
5647
|
inset,
|
|
5375
5648
|
...props
|
|
5376
5649
|
}) {
|
|
5377
|
-
return /* @__PURE__ */ (0,
|
|
5650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5378
5651
|
MenubarPrimitive.Label,
|
|
5379
5652
|
{
|
|
5380
5653
|
"data-slot": "menubar-label",
|
|
@@ -5391,7 +5664,7 @@ function MenubarSeparator({
|
|
|
5391
5664
|
className,
|
|
5392
5665
|
...props
|
|
5393
5666
|
}) {
|
|
5394
|
-
return /* @__PURE__ */ (0,
|
|
5667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5395
5668
|
MenubarPrimitive.Separator,
|
|
5396
5669
|
{
|
|
5397
5670
|
"data-slot": "menubar-separator",
|
|
@@ -5404,7 +5677,7 @@ function MenubarShortcut({
|
|
|
5404
5677
|
className,
|
|
5405
5678
|
...props
|
|
5406
5679
|
}) {
|
|
5407
|
-
return /* @__PURE__ */ (0,
|
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5408
5681
|
"span",
|
|
5409
5682
|
{
|
|
5410
5683
|
"data-slot": "menubar-shortcut",
|
|
@@ -5419,7 +5692,7 @@ function MenubarShortcut({
|
|
|
5419
5692
|
function MenubarSub({
|
|
5420
5693
|
...props
|
|
5421
5694
|
}) {
|
|
5422
|
-
return /* @__PURE__ */ (0,
|
|
5695
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(MenubarPrimitive.Sub, { "data-slot": "menubar-sub", ...props });
|
|
5423
5696
|
}
|
|
5424
5697
|
function MenubarSubTrigger({
|
|
5425
5698
|
className,
|
|
@@ -5427,7 +5700,7 @@ function MenubarSubTrigger({
|
|
|
5427
5700
|
children,
|
|
5428
5701
|
...props
|
|
5429
5702
|
}) {
|
|
5430
|
-
return /* @__PURE__ */ (0,
|
|
5703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5431
5704
|
MenubarPrimitive.SubTrigger,
|
|
5432
5705
|
{
|
|
5433
5706
|
"data-slot": "menubar-sub-trigger",
|
|
@@ -5439,7 +5712,7 @@ function MenubarSubTrigger({
|
|
|
5439
5712
|
...props,
|
|
5440
5713
|
children: [
|
|
5441
5714
|
children,
|
|
5442
|
-
/* @__PURE__ */ (0,
|
|
5715
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react19.ChevronRightIcon, { className: "ms-auto h-4 w-4 rtl:rotate-180" })
|
|
5443
5716
|
]
|
|
5444
5717
|
}
|
|
5445
5718
|
);
|
|
@@ -5448,7 +5721,7 @@ function MenubarSubContent({
|
|
|
5448
5721
|
className,
|
|
5449
5722
|
...props
|
|
5450
5723
|
}) {
|
|
5451
|
-
return /* @__PURE__ */ (0,
|
|
5724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5452
5725
|
MenubarPrimitive.SubContent,
|
|
5453
5726
|
{
|
|
5454
5727
|
"data-slot": "menubar-sub-content",
|
|
@@ -5462,14 +5735,14 @@ function MenubarSubContent({
|
|
|
5462
5735
|
}
|
|
5463
5736
|
|
|
5464
5737
|
// src/components/ui/metric-card.tsx
|
|
5465
|
-
var
|
|
5466
|
-
var
|
|
5738
|
+
var React20 = __toESM(require("react"), 1);
|
|
5739
|
+
var import_lucide_react20 = require("lucide-react");
|
|
5467
5740
|
var import_date_fns2 = require("date-fns");
|
|
5468
5741
|
|
|
5469
5742
|
// src/components/ui/skeleton.tsx
|
|
5470
|
-
var
|
|
5743
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5471
5744
|
function Skeleton({ className, ...props }) {
|
|
5472
|
-
return /* @__PURE__ */ (0,
|
|
5745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5473
5746
|
"div",
|
|
5474
5747
|
{
|
|
5475
5748
|
"data-slot": "skeleton",
|
|
@@ -5480,25 +5753,25 @@ function Skeleton({ className, ...props }) {
|
|
|
5480
5753
|
}
|
|
5481
5754
|
|
|
5482
5755
|
// src/components/ui/metric-card.tsx
|
|
5483
|
-
var
|
|
5484
|
-
var MetricCard =
|
|
5756
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
5757
|
+
var MetricCard = React20.forwardRef(
|
|
5485
5758
|
({ className, isLoading, children, ...props }, ref) => {
|
|
5486
5759
|
if (isLoading) {
|
|
5487
|
-
return /* @__PURE__ */ (0,
|
|
5760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5488
5761
|
Card,
|
|
5489
5762
|
{
|
|
5490
5763
|
ref,
|
|
5491
5764
|
className: cn("py-4 space-y-3", className),
|
|
5492
5765
|
...props,
|
|
5493
5766
|
children: [
|
|
5494
|
-
/* @__PURE__ */ (0,
|
|
5495
|
-
/* @__PURE__ */ (0,
|
|
5496
|
-
/* @__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" })
|
|
5497
5770
|
]
|
|
5498
5771
|
}
|
|
5499
5772
|
);
|
|
5500
5773
|
}
|
|
5501
|
-
return /* @__PURE__ */ (0,
|
|
5774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5502
5775
|
Card,
|
|
5503
5776
|
{
|
|
5504
5777
|
ref,
|
|
@@ -5510,9 +5783,9 @@ var MetricCard = React18.forwardRef(
|
|
|
5510
5783
|
}
|
|
5511
5784
|
);
|
|
5512
5785
|
MetricCard.displayName = "MetricCard";
|
|
5513
|
-
var MetricCardHeader =
|
|
5786
|
+
var MetricCardHeader = React20.forwardRef(
|
|
5514
5787
|
({ className, href, children, ...props }, ref) => {
|
|
5515
|
-
return /* @__PURE__ */ (0,
|
|
5788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5516
5789
|
"div",
|
|
5517
5790
|
{
|
|
5518
5791
|
ref,
|
|
@@ -5520,14 +5793,14 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5520
5793
|
...props,
|
|
5521
5794
|
children: [
|
|
5522
5795
|
children,
|
|
5523
|
-
href && /* @__PURE__ */ (0,
|
|
5796
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5524
5797
|
"a",
|
|
5525
5798
|
{
|
|
5526
5799
|
href,
|
|
5527
5800
|
target: "_blank",
|
|
5528
5801
|
rel: "noopener noreferrer",
|
|
5529
5802
|
className: "text-foreground-lighter hover:text-foreground transition-colors",
|
|
5530
|
-
children: /* @__PURE__ */ (0,
|
|
5803
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react20.ExternalLink, { className: "h-3.5 w-3.5" })
|
|
5531
5804
|
}
|
|
5532
5805
|
)
|
|
5533
5806
|
]
|
|
@@ -5536,9 +5809,9 @@ var MetricCardHeader = React18.forwardRef(
|
|
|
5536
5809
|
}
|
|
5537
5810
|
);
|
|
5538
5811
|
MetricCardHeader.displayName = "MetricCardHeader";
|
|
5539
|
-
var MetricCardLabel =
|
|
5812
|
+
var MetricCardLabel = React20.forwardRef(
|
|
5540
5813
|
({ className, tooltip, icon, children, ...props }, ref) => {
|
|
5541
|
-
const label = /* @__PURE__ */ (0,
|
|
5814
|
+
const label = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5542
5815
|
"h3",
|
|
5543
5816
|
{
|
|
5544
5817
|
ref,
|
|
@@ -5547,28 +5820,28 @@ var MetricCardLabel = React18.forwardRef(
|
|
|
5547
5820
|
className
|
|
5548
5821
|
),
|
|
5549
5822
|
...props,
|
|
5550
|
-
children: /* @__PURE__ */ (0,
|
|
5551
|
-
icon && /* @__PURE__ */ (0,
|
|
5552
|
-
/* @__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 })
|
|
5553
5826
|
] })
|
|
5554
5827
|
}
|
|
5555
5828
|
);
|
|
5556
5829
|
if (tooltip) {
|
|
5557
|
-
return /* @__PURE__ */ (0,
|
|
5558
|
-
/* @__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: [
|
|
5559
5832
|
label,
|
|
5560
|
-
/* @__PURE__ */ (0,
|
|
5833
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react20.Info, { className: "h-3.5 w-3.5 text-foreground-lighter" })
|
|
5561
5834
|
] }) }),
|
|
5562
|
-
/* @__PURE__ */ (0,
|
|
5835
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "max-w-xs", children: tooltip }) })
|
|
5563
5836
|
] }) });
|
|
5564
5837
|
}
|
|
5565
5838
|
return label;
|
|
5566
5839
|
}
|
|
5567
5840
|
);
|
|
5568
5841
|
MetricCardLabel.displayName = "MetricCardLabel";
|
|
5569
|
-
var MetricCardContent =
|
|
5842
|
+
var MetricCardContent = React20.forwardRef(
|
|
5570
5843
|
({ className, children, ...props }, ref) => {
|
|
5571
|
-
return /* @__PURE__ */ (0,
|
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5572
5845
|
"div",
|
|
5573
5846
|
{
|
|
5574
5847
|
ref,
|
|
@@ -5580,9 +5853,9 @@ var MetricCardContent = React18.forwardRef(
|
|
|
5580
5853
|
}
|
|
5581
5854
|
);
|
|
5582
5855
|
MetricCardContent.displayName = "MetricCardContent";
|
|
5583
|
-
var MetricCardValue =
|
|
5856
|
+
var MetricCardValue = React20.forwardRef(
|
|
5584
5857
|
({ className, children, ...props }, ref) => {
|
|
5585
|
-
return /* @__PURE__ */ (0,
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5586
5859
|
"div",
|
|
5587
5860
|
{
|
|
5588
5861
|
ref,
|
|
@@ -5594,7 +5867,7 @@ var MetricCardValue = React18.forwardRef(
|
|
|
5594
5867
|
}
|
|
5595
5868
|
);
|
|
5596
5869
|
MetricCardValue.displayName = "MetricCardValue";
|
|
5597
|
-
var MetricCardDifferential =
|
|
5870
|
+
var MetricCardDifferential = React20.forwardRef(
|
|
5598
5871
|
({ className, variant = "positive", children, ...props }, ref) => {
|
|
5599
5872
|
const childrenString = typeof children === "string" ? children : String(children);
|
|
5600
5873
|
const signMatch = childrenString.match(/^([+\-])|([+\-])$/);
|
|
@@ -5604,7 +5877,7 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5604
5877
|
sign = signMatch[1] || signMatch[2] || "";
|
|
5605
5878
|
value = childrenString.replace(/^[+\-]|[+\-]$/, "").trim();
|
|
5606
5879
|
}
|
|
5607
|
-
return /* @__PURE__ */ (0,
|
|
5880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5608
5881
|
"div",
|
|
5609
5882
|
{
|
|
5610
5883
|
ref,
|
|
@@ -5615,19 +5888,19 @@ var MetricCardDifferential = React18.forwardRef(
|
|
|
5615
5888
|
),
|
|
5616
5889
|
...props,
|
|
5617
5890
|
children: [
|
|
5618
|
-
/* @__PURE__ */ (0,
|
|
5619
|
-
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 })
|
|
5620
5893
|
]
|
|
5621
5894
|
}
|
|
5622
5895
|
);
|
|
5623
5896
|
}
|
|
5624
5897
|
);
|
|
5625
5898
|
MetricCardDifferential.displayName = "MetricCardDifferential";
|
|
5626
|
-
var MetricCardSparkline =
|
|
5899
|
+
var MetricCardSparkline = React20.forwardRef(
|
|
5627
5900
|
({ data, dataKey, usePersianCalendar = false, className }, _ref) => {
|
|
5628
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
5629
|
-
const [tooltipPosition, setTooltipPosition] =
|
|
5630
|
-
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);
|
|
5631
5904
|
if (!data || data.length === 0) return null;
|
|
5632
5905
|
const values = data.map((item) => item[dataKey]);
|
|
5633
5906
|
const timestamps = data.map((item) => new Date(item.timestamp));
|
|
@@ -5653,7 +5926,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5653
5926
|
areaPath += ` L ${points[0].x},${height}`;
|
|
5654
5927
|
areaPath += ` Z`;
|
|
5655
5928
|
const isPositive = values[values.length - 1] >= values[0];
|
|
5656
|
-
const gradientId =
|
|
5929
|
+
const gradientId = React20.useId();
|
|
5657
5930
|
const handleMouseMove = (e) => {
|
|
5658
5931
|
if (!containerRef.current) return;
|
|
5659
5932
|
const rect = containerRef.current.getBoundingClientRect();
|
|
@@ -5688,7 +5961,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5688
5961
|
return (0, import_date_fns2.format)(date, "MMM d");
|
|
5689
5962
|
}
|
|
5690
5963
|
};
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5692
5965
|
"div",
|
|
5693
5966
|
{
|
|
5694
5967
|
ref: containerRef,
|
|
@@ -5696,7 +5969,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5696
5969
|
onMouseMove: handleMouseMove,
|
|
5697
5970
|
onMouseLeave: handleMouseLeave,
|
|
5698
5971
|
children: [
|
|
5699
|
-
/* @__PURE__ */ (0,
|
|
5972
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
5700
5973
|
"svg",
|
|
5701
5974
|
{
|
|
5702
5975
|
width: "100%",
|
|
@@ -5705,8 +5978,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5705
5978
|
preserveAspectRatio: "none",
|
|
5706
5979
|
className: "overflow-visible",
|
|
5707
5980
|
children: [
|
|
5708
|
-
/* @__PURE__ */ (0,
|
|
5709
|
-
/* @__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)(
|
|
5710
5983
|
"stop",
|
|
5711
5984
|
{
|
|
5712
5985
|
offset: "0%",
|
|
@@ -5717,7 +5990,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5717
5990
|
)
|
|
5718
5991
|
}
|
|
5719
5992
|
),
|
|
5720
|
-
/* @__PURE__ */ (0,
|
|
5993
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5721
5994
|
"stop",
|
|
5722
5995
|
{
|
|
5723
5996
|
offset: "100%",
|
|
@@ -5729,14 +6002,14 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5729
6002
|
}
|
|
5730
6003
|
)
|
|
5731
6004
|
] }) }),
|
|
5732
|
-
/* @__PURE__ */ (0,
|
|
6005
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5733
6006
|
"path",
|
|
5734
6007
|
{
|
|
5735
6008
|
d: areaPath,
|
|
5736
6009
|
fill: `url(#${gradientId})`
|
|
5737
6010
|
}
|
|
5738
6011
|
),
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
6012
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5740
6013
|
"path",
|
|
5741
6014
|
{
|
|
5742
6015
|
d: pathData,
|
|
@@ -5750,8 +6023,8 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5750
6023
|
)
|
|
5751
6024
|
}
|
|
5752
6025
|
),
|
|
5753
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
5754
|
-
/* @__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)(
|
|
5755
6028
|
"line",
|
|
5756
6029
|
{
|
|
5757
6030
|
x1: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5764,7 +6037,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5764
6037
|
className: "text-foreground-lighter opacity-50"
|
|
5765
6038
|
}
|
|
5766
6039
|
),
|
|
5767
|
-
/* @__PURE__ */ (0,
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5768
6041
|
"circle",
|
|
5769
6042
|
{
|
|
5770
6043
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5778,7 +6051,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5778
6051
|
)
|
|
5779
6052
|
}
|
|
5780
6053
|
),
|
|
5781
|
-
/* @__PURE__ */ (0,
|
|
6054
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5782
6055
|
"circle",
|
|
5783
6056
|
{
|
|
5784
6057
|
cx: (points[hoveredIndex].x + points[hoveredIndex + 1].x) / 2,
|
|
@@ -5794,7 +6067,7 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5794
6067
|
]
|
|
5795
6068
|
}
|
|
5796
6069
|
),
|
|
5797
|
-
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0,
|
|
6070
|
+
hoveredIndex !== null && hoveredIndex < points.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5798
6071
|
"div",
|
|
5799
6072
|
{
|
|
5800
6073
|
className: "absolute z-50 pointer-events-none",
|
|
@@ -5802,9 +6075,9 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5802
6075
|
left: `${tooltipPosition.x + 8}px`,
|
|
5803
6076
|
top: `${tooltipPosition.y - 40}px`
|
|
5804
6077
|
},
|
|
5805
|
-
children: /* @__PURE__ */ (0,
|
|
5806
|
-
/* @__PURE__ */ (0,
|
|
5807
|
-
/* @__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") })
|
|
5808
6081
|
] })
|
|
5809
6082
|
}
|
|
5810
6083
|
)
|
|
@@ -5816,16 +6089,16 @@ var MetricCardSparkline = React18.forwardRef(
|
|
|
5816
6089
|
MetricCardSparkline.displayName = "MetricCardSparkline";
|
|
5817
6090
|
|
|
5818
6091
|
// src/components/ui/native-select.tsx
|
|
5819
|
-
var
|
|
5820
|
-
var
|
|
6092
|
+
var import_lucide_react21 = require("lucide-react");
|
|
6093
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5821
6094
|
function NativeSelect({ className, ...props }) {
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
6095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
5823
6096
|
"div",
|
|
5824
6097
|
{
|
|
5825
6098
|
className: "group/native-select relative w-fit has-[select:disabled]:opacity-50",
|
|
5826
6099
|
"data-slot": "native-select-wrapper",
|
|
5827
6100
|
children: [
|
|
5828
|
-
/* @__PURE__ */ (0,
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5829
6102
|
"select",
|
|
5830
6103
|
{
|
|
5831
6104
|
"data-slot": "native-select",
|
|
@@ -5847,8 +6120,8 @@ function NativeSelect({ className, ...props }) {
|
|
|
5847
6120
|
...props
|
|
5848
6121
|
}
|
|
5849
6122
|
),
|
|
5850
|
-
/* @__PURE__ */ (0,
|
|
5851
|
-
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6124
|
+
import_lucide_react21.ChevronDownIcon,
|
|
5852
6125
|
{
|
|
5853
6126
|
className: "pointer-events-none absolute top-1/2 end-3 size-4 -translate-y-1/2 text-foreground-muted select-none",
|
|
5854
6127
|
"aria-hidden": "true",
|
|
@@ -5860,13 +6133,13 @@ function NativeSelect({ className, ...props }) {
|
|
|
5860
6133
|
);
|
|
5861
6134
|
}
|
|
5862
6135
|
function NativeSelectOption({ ...props }) {
|
|
5863
|
-
return /* @__PURE__ */ (0,
|
|
6136
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("option", { "data-slot": "native-select-option", ...props });
|
|
5864
6137
|
}
|
|
5865
6138
|
function NativeSelectOptGroup({
|
|
5866
6139
|
className,
|
|
5867
6140
|
...props
|
|
5868
6141
|
}) {
|
|
5869
|
-
return /* @__PURE__ */ (0,
|
|
6142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
5870
6143
|
"optgroup",
|
|
5871
6144
|
{
|
|
5872
6145
|
"data-slot": "native-select-optgroup",
|
|
@@ -5878,16 +6151,16 @@ function NativeSelectOptGroup({
|
|
|
5878
6151
|
|
|
5879
6152
|
// src/components/ui/navigation-menu.tsx
|
|
5880
6153
|
var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"), 1);
|
|
5881
|
-
var
|
|
5882
|
-
var
|
|
5883
|
-
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");
|
|
5884
6157
|
function NavigationMenu({
|
|
5885
6158
|
className,
|
|
5886
6159
|
children,
|
|
5887
6160
|
viewport = true,
|
|
5888
6161
|
...props
|
|
5889
6162
|
}) {
|
|
5890
|
-
return /* @__PURE__ */ (0,
|
|
6163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5891
6164
|
NavigationMenuPrimitive.Root,
|
|
5892
6165
|
{
|
|
5893
6166
|
"data-slot": "navigation-menu",
|
|
@@ -5899,7 +6172,7 @@ function NavigationMenu({
|
|
|
5899
6172
|
...props,
|
|
5900
6173
|
children: [
|
|
5901
6174
|
children,
|
|
5902
|
-
viewport && /* @__PURE__ */ (0,
|
|
6175
|
+
viewport && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(NavigationMenuViewport, {})
|
|
5903
6176
|
]
|
|
5904
6177
|
}
|
|
5905
6178
|
);
|
|
@@ -5908,7 +6181,7 @@ function NavigationMenuList({
|
|
|
5908
6181
|
className,
|
|
5909
6182
|
...props
|
|
5910
6183
|
}) {
|
|
5911
|
-
return /* @__PURE__ */ (0,
|
|
6184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5912
6185
|
NavigationMenuPrimitive.List,
|
|
5913
6186
|
{
|
|
5914
6187
|
"data-slot": "navigation-menu-list",
|
|
@@ -5924,7 +6197,7 @@ function NavigationMenuItem({
|
|
|
5924
6197
|
className,
|
|
5925
6198
|
...props
|
|
5926
6199
|
}) {
|
|
5927
|
-
return /* @__PURE__ */ (0,
|
|
6200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5928
6201
|
NavigationMenuPrimitive.Item,
|
|
5929
6202
|
{
|
|
5930
6203
|
"data-slot": "navigation-menu-item",
|
|
@@ -5933,7 +6206,7 @@ function NavigationMenuItem({
|
|
|
5933
6206
|
}
|
|
5934
6207
|
);
|
|
5935
6208
|
}
|
|
5936
|
-
var navigationMenuTriggerStyle = (0,
|
|
6209
|
+
var navigationMenuTriggerStyle = (0, import_class_variance_authority11.cva)(
|
|
5937
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"
|
|
5938
6211
|
);
|
|
5939
6212
|
function NavigationMenuTrigger({
|
|
@@ -5941,7 +6214,7 @@ function NavigationMenuTrigger({
|
|
|
5941
6214
|
children,
|
|
5942
6215
|
...props
|
|
5943
6216
|
}) {
|
|
5944
|
-
return /* @__PURE__ */ (0,
|
|
6217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
5945
6218
|
NavigationMenuPrimitive.Trigger,
|
|
5946
6219
|
{
|
|
5947
6220
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -5950,8 +6223,8 @@ function NavigationMenuTrigger({
|
|
|
5950
6223
|
children: [
|
|
5951
6224
|
children,
|
|
5952
6225
|
" ",
|
|
5953
|
-
/* @__PURE__ */ (0,
|
|
5954
|
-
|
|
6226
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6227
|
+
import_lucide_react22.ChevronDownIcon,
|
|
5955
6228
|
{
|
|
5956
6229
|
className: "relative top-[1px] ms-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
5957
6230
|
"aria-hidden": "true"
|
|
@@ -5965,7 +6238,7 @@ function NavigationMenuContent({
|
|
|
5965
6238
|
className,
|
|
5966
6239
|
...props
|
|
5967
6240
|
}) {
|
|
5968
|
-
return /* @__PURE__ */ (0,
|
|
6241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5969
6242
|
NavigationMenuPrimitive.Content,
|
|
5970
6243
|
{
|
|
5971
6244
|
"data-slot": "navigation-menu-content",
|
|
@@ -5982,13 +6255,13 @@ function NavigationMenuViewport({
|
|
|
5982
6255
|
className,
|
|
5983
6256
|
...props
|
|
5984
6257
|
}) {
|
|
5985
|
-
return /* @__PURE__ */ (0,
|
|
6258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5986
6259
|
"div",
|
|
5987
6260
|
{
|
|
5988
6261
|
className: cn(
|
|
5989
6262
|
"absolute top-full start-0 isolate z-50 flex justify-center"
|
|
5990
6263
|
),
|
|
5991
|
-
children: /* @__PURE__ */ (0,
|
|
6264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
5992
6265
|
NavigationMenuPrimitive.Viewport,
|
|
5993
6266
|
{
|
|
5994
6267
|
"data-slot": "navigation-menu-viewport",
|
|
@@ -6006,7 +6279,7 @@ function NavigationMenuLink({
|
|
|
6006
6279
|
className,
|
|
6007
6280
|
...props
|
|
6008
6281
|
}) {
|
|
6009
|
-
return /* @__PURE__ */ (0,
|
|
6282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6010
6283
|
NavigationMenuPrimitive.Link,
|
|
6011
6284
|
{
|
|
6012
6285
|
"data-slot": "navigation-menu-link",
|
|
@@ -6022,7 +6295,7 @@ function NavigationMenuIndicator({
|
|
|
6022
6295
|
className,
|
|
6023
6296
|
...props
|
|
6024
6297
|
}) {
|
|
6025
|
-
return /* @__PURE__ */ (0,
|
|
6298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6026
6299
|
NavigationMenuPrimitive.Indicator,
|
|
6027
6300
|
{
|
|
6028
6301
|
"data-slot": "navigation-menu-indicator",
|
|
@@ -6031,18 +6304,18 @@ function NavigationMenuIndicator({
|
|
|
6031
6304
|
className
|
|
6032
6305
|
),
|
|
6033
6306
|
...props,
|
|
6034
|
-
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" })
|
|
6035
6308
|
}
|
|
6036
6309
|
);
|
|
6037
6310
|
}
|
|
6038
6311
|
|
|
6039
6312
|
// src/components/ui/pagination.tsx
|
|
6040
|
-
var
|
|
6041
|
-
var
|
|
6042
|
-
var
|
|
6043
|
-
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");
|
|
6044
6317
|
function usePaginationDirection() {
|
|
6045
|
-
return
|
|
6318
|
+
return React21.useContext(PaginationDirectionContext);
|
|
6046
6319
|
}
|
|
6047
6320
|
function Pagination({
|
|
6048
6321
|
className,
|
|
@@ -6051,7 +6324,7 @@ function Pagination({
|
|
|
6051
6324
|
...props
|
|
6052
6325
|
}) {
|
|
6053
6326
|
const resolvedDir = dir ?? "rtl";
|
|
6054
|
-
return /* @__PURE__ */ (0,
|
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PaginationDirectionContext.Provider, { value: resolvedDir, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6055
6328
|
"nav",
|
|
6056
6329
|
{
|
|
6057
6330
|
role: "navigation",
|
|
@@ -6069,7 +6342,7 @@ function PaginationContent({
|
|
|
6069
6342
|
...props
|
|
6070
6343
|
}) {
|
|
6071
6344
|
const dir = usePaginationDirection();
|
|
6072
|
-
return /* @__PURE__ */ (0,
|
|
6345
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6073
6346
|
"ul",
|
|
6074
6347
|
{
|
|
6075
6348
|
"data-slot": "pagination-content",
|
|
@@ -6083,7 +6356,7 @@ function PaginationContent({
|
|
|
6083
6356
|
);
|
|
6084
6357
|
}
|
|
6085
6358
|
function PaginationItem({ ...props }) {
|
|
6086
|
-
return /* @__PURE__ */ (0,
|
|
6359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { "data-slot": "pagination-item", ...props });
|
|
6087
6360
|
}
|
|
6088
6361
|
function PaginationLink({
|
|
6089
6362
|
className,
|
|
@@ -6094,7 +6367,7 @@ function PaginationLink({
|
|
|
6094
6367
|
}) {
|
|
6095
6368
|
const contextDir = usePaginationDirection();
|
|
6096
6369
|
const linkDir = dir ?? (contextDir === "rtl" ? "rtl" : "ltr");
|
|
6097
|
-
return /* @__PURE__ */ (0,
|
|
6370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6098
6371
|
"a",
|
|
6099
6372
|
{
|
|
6100
6373
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -6127,8 +6400,8 @@ function PaginationPrevious({
|
|
|
6127
6400
|
const dir = usePaginationDirection();
|
|
6128
6401
|
const isRTL = dir === "rtl";
|
|
6129
6402
|
const label = isRTL ? "\u0642\u0628\u0644\u06CC" : "Previous";
|
|
6130
|
-
const Icon2 = isRTL ?
|
|
6131
|
-
return /* @__PURE__ */ (0,
|
|
6403
|
+
const Icon2 = isRTL ? import_lucide_react23.ChevronRightIcon : import_lucide_react23.ChevronLeftIcon;
|
|
6404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6132
6405
|
PaginationLink,
|
|
6133
6406
|
{
|
|
6134
6407
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0642\u0628\u0644\u06CC" : "Go to previous page",
|
|
@@ -6140,8 +6413,8 @@ function PaginationPrevious({
|
|
|
6140
6413
|
dir: "ltr",
|
|
6141
6414
|
...props,
|
|
6142
6415
|
children: [
|
|
6143
|
-
/* @__PURE__ */ (0,
|
|
6144
|
-
/* @__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 })
|
|
6145
6418
|
]
|
|
6146
6419
|
}
|
|
6147
6420
|
);
|
|
@@ -6153,8 +6426,8 @@ function PaginationNext({
|
|
|
6153
6426
|
const dir = usePaginationDirection();
|
|
6154
6427
|
const isRTL = dir === "rtl";
|
|
6155
6428
|
const label = isRTL ? "\u0628\u0639\u062F\u06CC" : "Next";
|
|
6156
|
-
const Icon2 = isRTL ?
|
|
6157
|
-
return /* @__PURE__ */ (0,
|
|
6429
|
+
const Icon2 = isRTL ? import_lucide_react23.ChevronLeftIcon : import_lucide_react23.ChevronRightIcon;
|
|
6430
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
6158
6431
|
PaginationLink,
|
|
6159
6432
|
{
|
|
6160
6433
|
"aria-label": isRTL ? "\u0631\u0641\u062A\u0646 \u0628\u0647 \u0635\u0641\u062D\u0647 \u0628\u0639\u062F\u06CC" : "Go to next page",
|
|
@@ -6165,12 +6438,12 @@ function PaginationNext({
|
|
|
6165
6438
|
),
|
|
6166
6439
|
dir: "ltr",
|
|
6167
6440
|
...props,
|
|
6168
|
-
children: isRTL ? /* @__PURE__ */ (0,
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6170
|
-
/* @__PURE__ */ (0,
|
|
6171
|
-
] }) : /* @__PURE__ */ (0,
|
|
6172
|
-
/* @__PURE__ */ (0,
|
|
6173
|
-
/* @__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" })
|
|
6174
6447
|
] })
|
|
6175
6448
|
}
|
|
6176
6449
|
);
|
|
@@ -6179,7 +6452,7 @@ function PaginationEllipsis({
|
|
|
6179
6452
|
className,
|
|
6180
6453
|
...props
|
|
6181
6454
|
}) {
|
|
6182
|
-
return /* @__PURE__ */ (0,
|
|
6455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
6183
6456
|
"span",
|
|
6184
6457
|
{
|
|
6185
6458
|
"aria-hidden": true,
|
|
@@ -6187,15 +6460,15 @@ function PaginationEllipsis({
|
|
|
6187
6460
|
className: cn("flex size-9 items-center justify-center", className),
|
|
6188
6461
|
...props,
|
|
6189
6462
|
children: [
|
|
6190
|
-
/* @__PURE__ */ (0,
|
|
6191
|
-
/* @__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" })
|
|
6192
6465
|
]
|
|
6193
6466
|
}
|
|
6194
6467
|
);
|
|
6195
6468
|
}
|
|
6196
6469
|
|
|
6197
6470
|
// src/components/ui/pagination-controlled.tsx
|
|
6198
|
-
var
|
|
6471
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
6199
6472
|
function PaginationControlled({
|
|
6200
6473
|
currentPage,
|
|
6201
6474
|
totalPages,
|
|
@@ -6258,8 +6531,8 @@ function PaginationControlled({
|
|
|
6258
6531
|
const pageNumbers = generatePageNumbers();
|
|
6259
6532
|
const showFirstButton = showFirstLast && !pageNumbers.includes(1) && currentPage > 1;
|
|
6260
6533
|
const showLastButton = showFirstLast && !pageNumbers.includes(totalPages) && currentPage < totalPages;
|
|
6261
|
-
return /* @__PURE__ */ (0,
|
|
6262
|
-
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)(
|
|
6263
6536
|
PaginationLink,
|
|
6264
6537
|
{
|
|
6265
6538
|
href: "#",
|
|
@@ -6270,7 +6543,7 @@ function PaginationControlled({
|
|
|
6270
6543
|
children: 1 .toLocaleString("fa-IR")
|
|
6271
6544
|
}
|
|
6272
6545
|
) }),
|
|
6273
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6546
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6274
6547
|
PaginationPrevious,
|
|
6275
6548
|
{
|
|
6276
6549
|
href: "#",
|
|
@@ -6283,9 +6556,9 @@ function PaginationControlled({
|
|
|
6283
6556
|
) }),
|
|
6284
6557
|
pageNumbers.map((page, index) => {
|
|
6285
6558
|
if (page === "ellipsis") {
|
|
6286
|
-
return /* @__PURE__ */ (0,
|
|
6559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationEllipsis, {}) }, `ellipsis-${index}`);
|
|
6287
6560
|
}
|
|
6288
|
-
return /* @__PURE__ */ (0,
|
|
6561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6289
6562
|
PaginationLink,
|
|
6290
6563
|
{
|
|
6291
6564
|
href: "#",
|
|
@@ -6298,7 +6571,7 @@ function PaginationControlled({
|
|
|
6298
6571
|
}
|
|
6299
6572
|
) }, page);
|
|
6300
6573
|
}),
|
|
6301
|
-
showPrevNext && /* @__PURE__ */ (0,
|
|
6574
|
+
showPrevNext && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6302
6575
|
PaginationNext,
|
|
6303
6576
|
{
|
|
6304
6577
|
href: "#",
|
|
@@ -6309,7 +6582,7 @@ function PaginationControlled({
|
|
|
6309
6582
|
className: currentPage === totalPages ? "pointer-events-none opacity-50" : ""
|
|
6310
6583
|
}
|
|
6311
6584
|
) }),
|
|
6312
|
-
showLastButton && /* @__PURE__ */ (0,
|
|
6585
|
+
showLastButton && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
6313
6586
|
PaginationLink,
|
|
6314
6587
|
{
|
|
6315
6588
|
href: "#",
|
|
@@ -6324,8 +6597,8 @@ function PaginationControlled({
|
|
|
6324
6597
|
}
|
|
6325
6598
|
|
|
6326
6599
|
// src/components/ui/profile-card.tsx
|
|
6327
|
-
var
|
|
6328
|
-
var
|
|
6600
|
+
var React22 = __toESM(require("react"), 1);
|
|
6601
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
6329
6602
|
var formatFollowers2 = (count) => {
|
|
6330
6603
|
if (count >= 1e6) {
|
|
6331
6604
|
return `${(count / 1e6).toFixed(1).replace(/\.0$/, "")}M`;
|
|
@@ -6335,7 +6608,7 @@ var formatFollowers2 = (count) => {
|
|
|
6335
6608
|
}
|
|
6336
6609
|
return count.toString();
|
|
6337
6610
|
};
|
|
6338
|
-
var ProfileCard =
|
|
6611
|
+
var ProfileCard = React22.forwardRef(
|
|
6339
6612
|
({
|
|
6340
6613
|
className,
|
|
6341
6614
|
name,
|
|
@@ -6383,7 +6656,7 @@ var ProfileCard = React20.forwardRef(
|
|
|
6383
6656
|
transparent: "bg-transparent border border-border"
|
|
6384
6657
|
};
|
|
6385
6658
|
const currentSize = sizeClasses[size];
|
|
6386
|
-
return /* @__PURE__ */ (0,
|
|
6659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
6387
6660
|
"div",
|
|
6388
6661
|
{
|
|
6389
6662
|
ref,
|
|
@@ -6397,22 +6670,22 @@ var ProfileCard = React20.forwardRef(
|
|
|
6397
6670
|
onClick: onCardClick,
|
|
6398
6671
|
...props,
|
|
6399
6672
|
children: [
|
|
6400
|
-
/* @__PURE__ */ (0,
|
|
6401
|
-
/* @__PURE__ */ (0,
|
|
6402
|
-
/* @__PURE__ */ (0,
|
|
6403
|
-
] }) }) : avatarBorderVariant === "primary" ? /* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6405
|
-
/* @__PURE__ */ (0,
|
|
6406
|
-
] }) : /* @__PURE__ */ (0,
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6408
|
-
/* @__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) })
|
|
6409
6682
|
] }) }),
|
|
6410
|
-
/* @__PURE__ */ (0,
|
|
6411
|
-
/* @__PURE__ */ (0,
|
|
6412
|
-
/* @__PURE__ */ (0,
|
|
6413
|
-
followers !== void 0 && /* @__PURE__ */ (0,
|
|
6414
|
-
followersIcon && /* @__PURE__ */ (0,
|
|
6415
|
-
/* @__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) })
|
|
6416
6689
|
] })
|
|
6417
6690
|
] })
|
|
6418
6691
|
]
|
|
@@ -6423,9 +6696,9 @@ var ProfileCard = React20.forwardRef(
|
|
|
6423
6696
|
ProfileCard.displayName = "ProfileCard";
|
|
6424
6697
|
|
|
6425
6698
|
// src/components/ui/profile-info.tsx
|
|
6426
|
-
var
|
|
6427
|
-
var
|
|
6428
|
-
var ProfileInfo =
|
|
6699
|
+
var React23 = __toESM(require("react"), 1);
|
|
6700
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
6701
|
+
var ProfileInfo = React23.forwardRef(
|
|
6429
6702
|
({
|
|
6430
6703
|
className,
|
|
6431
6704
|
name,
|
|
@@ -6480,7 +6753,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6480
6753
|
none: ""
|
|
6481
6754
|
};
|
|
6482
6755
|
const currentSize = sizeClasses[size];
|
|
6483
|
-
return /* @__PURE__ */ (0,
|
|
6756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6484
6757
|
"div",
|
|
6485
6758
|
{
|
|
6486
6759
|
ref,
|
|
@@ -6494,24 +6767,24 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6494
6767
|
onClick: onProfileClick,
|
|
6495
6768
|
...props,
|
|
6496
6769
|
children: [
|
|
6497
|
-
/* @__PURE__ */ (0,
|
|
6498
|
-
/* @__PURE__ */ (0,
|
|
6499
|
-
/* @__PURE__ */ (0,
|
|
6500
|
-
/* @__PURE__ */ (0,
|
|
6501
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
6502
|
-
/* @__PURE__ */ (0,
|
|
6503
|
-
/* @__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) })
|
|
6504
6777
|
] }) }),
|
|
6505
|
-
/* @__PURE__ */ (0,
|
|
6506
|
-
/* @__PURE__ */ (0,
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6508
|
-
infoText && /* @__PURE__ */ (0,
|
|
6509
|
-
infoIcon && /* @__PURE__ */ (0,
|
|
6510
|
-
/* @__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 })
|
|
6511
6784
|
] })
|
|
6512
6785
|
] })
|
|
6513
6786
|
] }),
|
|
6514
|
-
(actionIcon || onActionClick) && /* @__PURE__ */ (0,
|
|
6787
|
+
(actionIcon || onActionClick) && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
6515
6788
|
Button,
|
|
6516
6789
|
{
|
|
6517
6790
|
variant: "ghost",
|
|
@@ -6522,7 +6795,7 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6522
6795
|
onActionClick?.();
|
|
6523
6796
|
},
|
|
6524
6797
|
"aria-label": "\u0639\u0645\u0644\u06CC\u0627\u062A",
|
|
6525
|
-
children: actionIcon || /* @__PURE__ */ (0,
|
|
6798
|
+
children: actionIcon || /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
6526
6799
|
"svg",
|
|
6527
6800
|
{
|
|
6528
6801
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -6535,9 +6808,9 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6535
6808
|
strokeLinecap: "round",
|
|
6536
6809
|
strokeLinejoin: "round",
|
|
6537
6810
|
children: [
|
|
6538
|
-
/* @__PURE__ */ (0,
|
|
6539
|
-
/* @__PURE__ */ (0,
|
|
6540
|
-
/* @__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" })
|
|
6541
6814
|
]
|
|
6542
6815
|
}
|
|
6543
6816
|
)
|
|
@@ -6551,9 +6824,9 @@ var ProfileInfo = React21.forwardRef(
|
|
|
6551
6824
|
ProfileInfo.displayName = "ProfileInfo";
|
|
6552
6825
|
|
|
6553
6826
|
// src/components/ui/engagement-rate.tsx
|
|
6554
|
-
var
|
|
6555
|
-
var
|
|
6556
|
-
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");
|
|
6557
6830
|
var convertToLocalNumbers2 = (text, locale) => {
|
|
6558
6831
|
if (locale === "fa" || locale === "ar") {
|
|
6559
6832
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -6612,17 +6885,17 @@ var getGroupIcon = (group) => {
|
|
|
6612
6885
|
const iconClass = "w-12 h-12 text-primary";
|
|
6613
6886
|
switch (group) {
|
|
6614
6887
|
case "nano":
|
|
6615
|
-
return /* @__PURE__ */ (0,
|
|
6888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Users, { className: iconClass });
|
|
6616
6889
|
case "micro":
|
|
6617
|
-
return /* @__PURE__ */ (0,
|
|
6890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.UserCheck, { className: iconClass });
|
|
6618
6891
|
case "mid":
|
|
6619
|
-
return /* @__PURE__ */ (0,
|
|
6892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.TrendingUp, { className: iconClass });
|
|
6620
6893
|
case "macro":
|
|
6621
|
-
return /* @__PURE__ */ (0,
|
|
6894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Award, { className: iconClass });
|
|
6622
6895
|
case "mega":
|
|
6623
|
-
return /* @__PURE__ */ (0,
|
|
6896
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Crown, { className: iconClass });
|
|
6624
6897
|
default:
|
|
6625
|
-
return /* @__PURE__ */ (0,
|
|
6898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_lucide_react24.Users, { className: iconClass });
|
|
6626
6899
|
}
|
|
6627
6900
|
};
|
|
6628
6901
|
var translations = {
|
|
@@ -6693,7 +6966,7 @@ var translations = {
|
|
|
6693
6966
|
mega: "Mega"
|
|
6694
6967
|
}
|
|
6695
6968
|
};
|
|
6696
|
-
var EngagementRate =
|
|
6969
|
+
var EngagementRate = React24.forwardRef(
|
|
6697
6970
|
({ className, currentRate, followers, locale = "fa", showCategoryCard = true, ...props }, ref) => {
|
|
6698
6971
|
const isRTL = locale === "fa" || locale === "ar";
|
|
6699
6972
|
const t = translations[locale];
|
|
@@ -6815,13 +7088,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6815
7088
|
return `${formatNumber2(1e3)} ${t.to} ${formatNumber2(1e4)} ${t.followers}`;
|
|
6816
7089
|
}
|
|
6817
7090
|
};
|
|
6818
|
-
return /* @__PURE__ */ (0,
|
|
6819
|
-
/* @__PURE__ */ (0,
|
|
6820
|
-
/* @__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: [
|
|
6821
7094
|
convertToLocalNumbers2((currentRate * 100).toFixed(3), locale),
|
|
6822
7095
|
"%"
|
|
6823
7096
|
] }),
|
|
6824
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7097
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6825
7098
|
Badge,
|
|
6826
7099
|
{
|
|
6827
7100
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -6830,13 +7103,13 @@ var EngagementRate = React22.forwardRef(
|
|
|
6830
7103
|
}
|
|
6831
7104
|
)
|
|
6832
7105
|
] }),
|
|
6833
|
-
/* @__PURE__ */ (0,
|
|
6834
|
-
/* @__PURE__ */ (0,
|
|
6835
|
-
/* @__PURE__ */ (0,
|
|
6836
|
-
/* @__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 })
|
|
6837
7110
|
] }),
|
|
6838
|
-
/* @__PURE__ */ (0,
|
|
6839
|
-
/* @__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)(
|
|
6840
7113
|
"div",
|
|
6841
7114
|
{
|
|
6842
7115
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -6857,35 +7130,35 @@ var EngagementRate = React22.forwardRef(
|
|
|
6857
7130
|
},
|
|
6858
7131
|
index
|
|
6859
7132
|
)) }),
|
|
6860
|
-
/* @__PURE__ */ (0,
|
|
7133
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6861
7134
|
"div",
|
|
6862
7135
|
{
|
|
6863
7136
|
className: "absolute -top-1 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
6864
7137
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
6865
|
-
children: /* @__PURE__ */ (0,
|
|
7138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6866
7139
|
"svg",
|
|
6867
7140
|
{
|
|
6868
7141
|
width: "20",
|
|
6869
7142
|
height: "14",
|
|
6870
7143
|
viewBox: "0 0 20 14",
|
|
6871
7144
|
className: "fill-white dark:fill-white drop-shadow-md transition-transform duration-300",
|
|
6872
|
-
children: /* @__PURE__ */ (0,
|
|
7145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { d: "M10 14L0 0H20L10 14Z" })
|
|
6873
7146
|
}
|
|
6874
7147
|
)
|
|
6875
7148
|
}
|
|
6876
7149
|
)
|
|
6877
7150
|
] })
|
|
6878
7151
|
] }),
|
|
6879
|
-
showCategoryCard && /* @__PURE__ */ (0,
|
|
6880
|
-
/* @__PURE__ */ (0,
|
|
6881
|
-
/* @__PURE__ */ (0,
|
|
6882
|
-
/* @__PURE__ */ (0,
|
|
6883
|
-
/* @__PURE__ */ (0,
|
|
6884
|
-
/* @__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}` })
|
|
6885
7158
|
] }),
|
|
6886
|
-
/* @__PURE__ */ (0,
|
|
6887
|
-
/* @__PURE__ */ (0,
|
|
6888
|
-
/* @__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: [
|
|
6889
7162
|
"(",
|
|
6890
7163
|
formatNumber2(followers),
|
|
6891
7164
|
" ",
|
|
@@ -6894,9 +7167,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6894
7167
|
] })
|
|
6895
7168
|
] })
|
|
6896
7169
|
] }) }),
|
|
6897
|
-
/* @__PURE__ */ (0,
|
|
6898
|
-
/* @__PURE__ */ (0,
|
|
6899
|
-
/* @__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) => {
|
|
6900
7173
|
const isCurrentRange = index === currentRangeIndex;
|
|
6901
7174
|
const hexToRgb = (hex) => {
|
|
6902
7175
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
@@ -6909,7 +7182,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6909
7182
|
const rgb = hexToRgb(range.color);
|
|
6910
7183
|
const bgColor = isCurrentRange && rgb ? `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, 0.1)` : "transparent";
|
|
6911
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);
|
|
6912
|
-
return /* @__PURE__ */ (0,
|
|
7185
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
6913
7186
|
"div",
|
|
6914
7187
|
{
|
|
6915
7188
|
className: cn(
|
|
@@ -6921,9 +7194,9 @@ var EngagementRate = React22.forwardRef(
|
|
|
6921
7194
|
borderColor: isCurrentRange ? range.color : void 0
|
|
6922
7195
|
},
|
|
6923
7196
|
children: [
|
|
6924
|
-
/* @__PURE__ */ (0,
|
|
6925
|
-
/* @__PURE__ */ (0,
|
|
6926
|
-
/* @__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)(
|
|
6927
7200
|
"span",
|
|
6928
7201
|
{
|
|
6929
7202
|
className: cn(
|
|
@@ -6932,7 +7205,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6932
7205
|
),
|
|
6933
7206
|
children: [
|
|
6934
7207
|
range.label,
|
|
6935
|
-
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: [
|
|
6936
7209
|
"(",
|
|
6937
7210
|
t.you,
|
|
6938
7211
|
")"
|
|
@@ -6941,7 +7214,7 @@ var EngagementRate = React22.forwardRef(
|
|
|
6941
7214
|
}
|
|
6942
7215
|
)
|
|
6943
7216
|
] }),
|
|
6944
|
-
/* @__PURE__ */ (0,
|
|
7217
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
6945
7218
|
"span",
|
|
6946
7219
|
{
|
|
6947
7220
|
className: cn("text-sm font-semibold", !isCurrentRange && "text-muted-foreground"),
|
|
@@ -6962,8 +7235,8 @@ var EngagementRate = React22.forwardRef(
|
|
|
6962
7235
|
EngagementRate.displayName = "EngagementRate";
|
|
6963
7236
|
|
|
6964
7237
|
// src/components/ui/engagement-rate-bar.tsx
|
|
6965
|
-
var
|
|
6966
|
-
var
|
|
7238
|
+
var React25 = __toESM(require("react"), 1);
|
|
7239
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
6967
7240
|
var convertToLocalNumbers3 = (text, locale) => {
|
|
6968
7241
|
if (locale === "fa" || locale === "ar") {
|
|
6969
7242
|
const persianDigits = ["\u06F0", "\u06F1", "\u06F2", "\u06F3", "\u06F4", "\u06F5", "\u06F6", "\u06F7", "\u06F8", "\u06F9"];
|
|
@@ -7044,7 +7317,7 @@ var translations2 = {
|
|
|
7044
7317
|
low: "Low"
|
|
7045
7318
|
}
|
|
7046
7319
|
};
|
|
7047
|
-
var EngagementRateBar =
|
|
7320
|
+
var EngagementRateBar = React25.forwardRef(
|
|
7048
7321
|
({ className, currentRate, followers, locale = "fa", showHelperText = true, ...props }, ref) => {
|
|
7049
7322
|
const isRTL = locale === "fa" || locale === "ar";
|
|
7050
7323
|
const t = translations2[locale];
|
|
@@ -7139,7 +7412,7 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7139
7412
|
};
|
|
7140
7413
|
const trianglePosition = getTrianglePosition();
|
|
7141
7414
|
const adjustedTrianglePosition = isRTL ? 100 - trianglePosition : trianglePosition;
|
|
7142
|
-
return /* @__PURE__ */ (0,
|
|
7415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
7143
7416
|
"div",
|
|
7144
7417
|
{
|
|
7145
7418
|
ref,
|
|
@@ -7147,12 +7420,12 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7147
7420
|
dir: isRTL ? "rtl" : "ltr",
|
|
7148
7421
|
...props,
|
|
7149
7422
|
children: [
|
|
7150
|
-
/* @__PURE__ */ (0,
|
|
7151
|
-
/* @__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: [
|
|
7152
7425
|
convertToLocalNumbers3((currentRate * 100).toFixed(3), locale),
|
|
7153
7426
|
"%"
|
|
7154
7427
|
] }),
|
|
7155
|
-
currentRangeIndex !== -1 && /* @__PURE__ */ (0,
|
|
7428
|
+
currentRangeIndex !== -1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7156
7429
|
Badge,
|
|
7157
7430
|
{
|
|
7158
7431
|
className: "text-sm font-medium text-white border-0",
|
|
@@ -7161,13 +7434,13 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7161
7434
|
}
|
|
7162
7435
|
)
|
|
7163
7436
|
] }),
|
|
7164
|
-
/* @__PURE__ */ (0,
|
|
7165
|
-
showHelperText && /* @__PURE__ */ (0,
|
|
7166
|
-
/* @__PURE__ */ (0,
|
|
7167
|
-
/* @__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 })
|
|
7168
7441
|
] }),
|
|
7169
|
-
/* @__PURE__ */ (0,
|
|
7170
|
-
/* @__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)(
|
|
7171
7444
|
"div",
|
|
7172
7445
|
{
|
|
7173
7446
|
className: "flex-1 transition-all duration-300 cursor-pointer group relative",
|
|
@@ -7188,14 +7461,14 @@ var EngagementRateBar = React23.forwardRef(
|
|
|
7188
7461
|
},
|
|
7189
7462
|
index
|
|
7190
7463
|
)) }),
|
|
7191
|
-
/* @__PURE__ */ (0,
|
|
7464
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7192
7465
|
"div",
|
|
7193
7466
|
{
|
|
7194
7467
|
className: "absolute -top-2 transform -translate-x-1/2 transition-all duration-500 z-10",
|
|
7195
7468
|
style: { left: `${adjustedTrianglePosition}%` },
|
|
7196
|
-
children: /* @__PURE__ */ (0,
|
|
7197
|
-
/* @__PURE__ */ (0,
|
|
7198
|
-
/* @__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" })
|
|
7199
7472
|
] })
|
|
7200
7473
|
}
|
|
7201
7474
|
)
|
|
@@ -7210,9 +7483,9 @@ EngagementRateBar.displayName = "EngagementRateBar";
|
|
|
7210
7483
|
|
|
7211
7484
|
// src/components/ui/progress.tsx
|
|
7212
7485
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"), 1);
|
|
7213
|
-
var
|
|
7214
|
-
var
|
|
7215
|
-
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)(
|
|
7216
7489
|
"relative w-full overflow-hidden rounded-full bg-surface-300",
|
|
7217
7490
|
{
|
|
7218
7491
|
variants: {
|
|
@@ -7227,7 +7500,7 @@ var progressVariants = (0, import_class_variance_authority10.cva)(
|
|
|
7227
7500
|
}
|
|
7228
7501
|
}
|
|
7229
7502
|
);
|
|
7230
|
-
var progressIndicatorVariants = (0,
|
|
7503
|
+
var progressIndicatorVariants = (0, import_class_variance_authority12.cva)(
|
|
7231
7504
|
"h-full w-full flex-1 transition-all origin-left rtl:origin-right",
|
|
7232
7505
|
{
|
|
7233
7506
|
variants: {
|
|
@@ -7255,19 +7528,19 @@ function Progress({
|
|
|
7255
7528
|
}) {
|
|
7256
7529
|
const clampedValue = Math.max(0, Math.min(100, value ?? 0));
|
|
7257
7530
|
const displayValue = `${Math.round(clampedValue)}%`;
|
|
7258
|
-
return /* @__PURE__ */ (0,
|
|
7259
|
-
(label || showValue) && /* @__PURE__ */ (0,
|
|
7260
|
-
label && /* @__PURE__ */ (0,
|
|
7261
|
-
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 })
|
|
7262
7535
|
] }),
|
|
7263
|
-
/* @__PURE__ */ (0,
|
|
7536
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7264
7537
|
ProgressPrimitive.Root,
|
|
7265
7538
|
{
|
|
7266
7539
|
"data-slot": "progress",
|
|
7267
7540
|
className: cn(progressVariants({ size }), className),
|
|
7268
7541
|
value,
|
|
7269
7542
|
...props,
|
|
7270
|
-
children: /* @__PURE__ */ (0,
|
|
7543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7271
7544
|
ProgressPrimitive.Indicator,
|
|
7272
7545
|
{
|
|
7273
7546
|
"data-slot": "progress-indicator",
|
|
@@ -7282,13 +7555,13 @@ function Progress({
|
|
|
7282
7555
|
|
|
7283
7556
|
// src/components/ui/radio-group.tsx
|
|
7284
7557
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7285
|
-
var
|
|
7286
|
-
var
|
|
7558
|
+
var import_lucide_react25 = require("lucide-react");
|
|
7559
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7287
7560
|
function RadioGroup4({
|
|
7288
7561
|
className,
|
|
7289
7562
|
...props
|
|
7290
7563
|
}) {
|
|
7291
|
-
return /* @__PURE__ */ (0,
|
|
7564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7292
7565
|
RadioGroupPrimitive.Root,
|
|
7293
7566
|
{
|
|
7294
7567
|
"data-slot": "radio-group",
|
|
@@ -7301,7 +7574,7 @@ function RadioGroupItem({
|
|
|
7301
7574
|
className,
|
|
7302
7575
|
...props
|
|
7303
7576
|
}) {
|
|
7304
|
-
return /* @__PURE__ */ (0,
|
|
7577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7305
7578
|
RadioGroupPrimitive.Item,
|
|
7306
7579
|
{
|
|
7307
7580
|
"data-slot": "radio-group-item",
|
|
@@ -7310,12 +7583,12 @@ function RadioGroupItem({
|
|
|
7310
7583
|
className
|
|
7311
7584
|
),
|
|
7312
7585
|
...props,
|
|
7313
|
-
children: /* @__PURE__ */ (0,
|
|
7586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7314
7587
|
RadioGroupPrimitive.Indicator,
|
|
7315
7588
|
{
|
|
7316
7589
|
"data-slot": "radio-group-indicator",
|
|
7317
7590
|
className: "relative flex items-center justify-center",
|
|
7318
|
-
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" })
|
|
7319
7592
|
}
|
|
7320
7593
|
)
|
|
7321
7594
|
}
|
|
@@ -7323,14 +7596,14 @@ function RadioGroupItem({
|
|
|
7323
7596
|
}
|
|
7324
7597
|
|
|
7325
7598
|
// src/components/ui/radio-card.tsx
|
|
7326
|
-
var
|
|
7599
|
+
var React26 = __toESM(require("react"), 1);
|
|
7327
7600
|
var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
7328
|
-
var
|
|
7329
|
-
var RadioCards =
|
|
7601
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7602
|
+
var RadioCards = React26.forwardRef(({ className, columns = 1, dir = "rtl", children, ...props }, ref) => {
|
|
7330
7603
|
const gridCols = typeof columns === "number" ? `grid-cols-${columns}` : Object.entries(columns).map(
|
|
7331
7604
|
([key, val]) => key === "initial" ? `grid-cols-${val}` : `${key}:grid-cols-${val}`
|
|
7332
7605
|
).join(" ");
|
|
7333
|
-
return /* @__PURE__ */ (0,
|
|
7606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7334
7607
|
RadioGroupPrimitive2.Root,
|
|
7335
7608
|
{
|
|
7336
7609
|
ref,
|
|
@@ -7343,8 +7616,8 @@ var RadioCards = React24.forwardRef(({ className, columns = 1, dir = "rtl", chil
|
|
|
7343
7616
|
);
|
|
7344
7617
|
});
|
|
7345
7618
|
RadioCards.displayName = "RadioCards";
|
|
7346
|
-
var RadioCardItem =
|
|
7347
|
-
return /* @__PURE__ */ (0,
|
|
7619
|
+
var RadioCardItem = React26.forwardRef(({ className, children, ...props }, ref) => {
|
|
7620
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7348
7621
|
RadioGroupPrimitive2.Item,
|
|
7349
7622
|
{
|
|
7350
7623
|
ref,
|
|
@@ -7363,7 +7636,7 @@ var RadioCardItem = React24.forwardRef(({ className, children, ...props }, ref)
|
|
|
7363
7636
|
);
|
|
7364
7637
|
});
|
|
7365
7638
|
RadioCardItem.displayName = "RadioCardItem";
|
|
7366
|
-
var RadioCardTitle =
|
|
7639
|
+
var RadioCardTitle = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7367
7640
|
"h4",
|
|
7368
7641
|
{
|
|
7369
7642
|
ref,
|
|
@@ -7372,7 +7645,7 @@ var RadioCardTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
7372
7645
|
}
|
|
7373
7646
|
));
|
|
7374
7647
|
RadioCardTitle.displayName = "RadioCardTitle";
|
|
7375
|
-
var RadioCardDescription =
|
|
7648
|
+
var RadioCardDescription = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7376
7649
|
"p",
|
|
7377
7650
|
{
|
|
7378
7651
|
ref,
|
|
@@ -7383,14 +7656,14 @@ var RadioCardDescription = React24.forwardRef(({ className, ...props }, ref) =>
|
|
|
7383
7656
|
RadioCardDescription.displayName = "RadioCardDescription";
|
|
7384
7657
|
|
|
7385
7658
|
// src/components/ui/resizable.tsx
|
|
7386
|
-
var
|
|
7659
|
+
var import_lucide_react26 = require("lucide-react");
|
|
7387
7660
|
var ResizablePrimitive = __toESM(require("react-resizable-panels"), 1);
|
|
7388
|
-
var
|
|
7661
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7389
7662
|
function ResizablePanelGroup({
|
|
7390
7663
|
className,
|
|
7391
7664
|
...props
|
|
7392
7665
|
}) {
|
|
7393
|
-
return /* @__PURE__ */ (0,
|
|
7666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7394
7667
|
ResizablePrimitive.PanelGroup,
|
|
7395
7668
|
{
|
|
7396
7669
|
"data-slot": "resizable-panel-group",
|
|
@@ -7405,14 +7678,14 @@ function ResizablePanelGroup({
|
|
|
7405
7678
|
function ResizablePanel({
|
|
7406
7679
|
...props
|
|
7407
7680
|
}) {
|
|
7408
|
-
return /* @__PURE__ */ (0,
|
|
7681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ResizablePrimitive.Panel, { "data-slot": "resizable-panel", ...props });
|
|
7409
7682
|
}
|
|
7410
7683
|
function ResizableHandle({
|
|
7411
7684
|
withHandle,
|
|
7412
7685
|
className,
|
|
7413
7686
|
...props
|
|
7414
7687
|
}) {
|
|
7415
|
-
return /* @__PURE__ */ (0,
|
|
7688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
7416
7689
|
ResizablePrimitive.PanelResizeHandle,
|
|
7417
7690
|
{
|
|
7418
7691
|
"data-slot": "resizable-handle",
|
|
@@ -7421,27 +7694,27 @@ function ResizableHandle({
|
|
|
7421
7694
|
className
|
|
7422
7695
|
),
|
|
7423
7696
|
...props,
|
|
7424
|
-
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" }) })
|
|
7425
7698
|
}
|
|
7426
7699
|
);
|
|
7427
7700
|
}
|
|
7428
7701
|
|
|
7429
7702
|
// src/components/ui/scroll-area.tsx
|
|
7430
7703
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
7431
|
-
var
|
|
7704
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7432
7705
|
function ScrollArea({
|
|
7433
7706
|
className,
|
|
7434
7707
|
children,
|
|
7435
7708
|
...props
|
|
7436
7709
|
}) {
|
|
7437
|
-
return /* @__PURE__ */ (0,
|
|
7710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
7438
7711
|
ScrollAreaPrimitive.Root,
|
|
7439
7712
|
{
|
|
7440
7713
|
"data-slot": "scroll-area",
|
|
7441
7714
|
className: cn("relative", className),
|
|
7442
7715
|
...props,
|
|
7443
7716
|
children: [
|
|
7444
|
-
/* @__PURE__ */ (0,
|
|
7717
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7445
7718
|
ScrollAreaPrimitive.Viewport,
|
|
7446
7719
|
{
|
|
7447
7720
|
"data-slot": "scroll-area-viewport",
|
|
@@ -7449,8 +7722,8 @@ function ScrollArea({
|
|
|
7449
7722
|
children
|
|
7450
7723
|
}
|
|
7451
7724
|
),
|
|
7452
|
-
/* @__PURE__ */ (0,
|
|
7453
|
-
/* @__PURE__ */ (0,
|
|
7725
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollBar, {}),
|
|
7726
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
7454
7727
|
]
|
|
7455
7728
|
}
|
|
7456
7729
|
);
|
|
@@ -7460,7 +7733,7 @@ function ScrollBar({
|
|
|
7460
7733
|
orientation = "vertical",
|
|
7461
7734
|
...props
|
|
7462
7735
|
}) {
|
|
7463
|
-
return /* @__PURE__ */ (0,
|
|
7736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7464
7737
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7465
7738
|
{
|
|
7466
7739
|
"data-slot": "scroll-area-scrollbar",
|
|
@@ -7472,7 +7745,7 @@ function ScrollBar({
|
|
|
7472
7745
|
className
|
|
7473
7746
|
),
|
|
7474
7747
|
...props,
|
|
7475
|
-
children: /* @__PURE__ */ (0,
|
|
7748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
7476
7749
|
ScrollAreaPrimitive.ScrollAreaThumb,
|
|
7477
7750
|
{
|
|
7478
7751
|
"data-slot": "scroll-area-thumb",
|
|
@@ -7484,14 +7757,14 @@ function ScrollBar({
|
|
|
7484
7757
|
}
|
|
7485
7758
|
|
|
7486
7759
|
// src/components/ui/select.tsx
|
|
7487
|
-
var
|
|
7760
|
+
var React27 = __toESM(require("react"), 1);
|
|
7488
7761
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
7489
|
-
var
|
|
7490
|
-
var
|
|
7491
|
-
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");
|
|
7492
7765
|
var Select = SelectPrimitive.Root;
|
|
7493
7766
|
var SelectGroup = SelectPrimitive.Group;
|
|
7494
|
-
var SelectTriggerVariants = (0,
|
|
7767
|
+
var SelectTriggerVariants = (0, import_class_variance_authority13.cva)("", {
|
|
7495
7768
|
variants: {
|
|
7496
7769
|
size: {
|
|
7497
7770
|
...SIZE_VARIANTS
|
|
@@ -7501,16 +7774,16 @@ var SelectTriggerVariants = (0, import_class_variance_authority11.cva)("", {
|
|
|
7501
7774
|
size: SIZE_VARIANTS_DEFAULT
|
|
7502
7775
|
}
|
|
7503
7776
|
});
|
|
7504
|
-
var SelectValue =
|
|
7777
|
+
var SelectValue = React27.forwardRef(({ placeholder, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7505
7778
|
SelectPrimitive.Value,
|
|
7506
7779
|
{
|
|
7507
|
-
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0,
|
|
7780
|
+
placeholder: typeof placeholder === "string" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: placeholder }) : placeholder,
|
|
7508
7781
|
...props,
|
|
7509
7782
|
ref
|
|
7510
7783
|
}
|
|
7511
7784
|
));
|
|
7512
7785
|
SelectValue.displayName = SelectPrimitive.Value.displayName;
|
|
7513
|
-
var SelectTrigger =
|
|
7786
|
+
var SelectTrigger = React27.forwardRef(({ className, children, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7514
7787
|
SelectPrimitive.Trigger,
|
|
7515
7788
|
{
|
|
7516
7789
|
ref,
|
|
@@ -7525,12 +7798,12 @@ var SelectTrigger = React25.forwardRef(({ className, children, size, ...props },
|
|
|
7525
7798
|
...props,
|
|
7526
7799
|
children: [
|
|
7527
7800
|
children,
|
|
7528
|
-
/* @__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 }) })
|
|
7529
7802
|
]
|
|
7530
7803
|
}
|
|
7531
7804
|
));
|
|
7532
7805
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
7533
|
-
var SelectScrollUpButton =
|
|
7806
|
+
var SelectScrollUpButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7534
7807
|
SelectPrimitive.ScrollUpButton,
|
|
7535
7808
|
{
|
|
7536
7809
|
ref,
|
|
@@ -7539,11 +7812,11 @@ var SelectScrollUpButton = React25.forwardRef(({ className, ...props }, ref) =>
|
|
|
7539
7812
|
className
|
|
7540
7813
|
),
|
|
7541
7814
|
...props,
|
|
7542
|
-
children: /* @__PURE__ */ (0,
|
|
7815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.ChevronUp, { className: "h-4 w-4" })
|
|
7543
7816
|
}
|
|
7544
7817
|
));
|
|
7545
7818
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
7546
|
-
var SelectScrollDownButton =
|
|
7819
|
+
var SelectScrollDownButton = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7547
7820
|
SelectPrimitive.ScrollDownButton,
|
|
7548
7821
|
{
|
|
7549
7822
|
ref,
|
|
@@ -7552,11 +7825,11 @@ var SelectScrollDownButton = React25.forwardRef(({ className, ...props }, ref) =
|
|
|
7552
7825
|
className
|
|
7553
7826
|
),
|
|
7554
7827
|
...props,
|
|
7555
|
-
children: /* @__PURE__ */ (0,
|
|
7828
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react27.ChevronDown, { className: "h-4 w-4" })
|
|
7556
7829
|
}
|
|
7557
7830
|
));
|
|
7558
7831
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
7559
|
-
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)(
|
|
7560
7833
|
SelectPrimitive.Content,
|
|
7561
7834
|
{
|
|
7562
7835
|
ref,
|
|
@@ -7568,8 +7841,8 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7568
7841
|
position,
|
|
7569
7842
|
...props,
|
|
7570
7843
|
children: [
|
|
7571
|
-
/* @__PURE__ */ (0,
|
|
7572
|
-
/* @__PURE__ */ (0,
|
|
7844
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollUpButton, {}),
|
|
7845
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7573
7846
|
SelectPrimitive.Viewport,
|
|
7574
7847
|
{
|
|
7575
7848
|
className: cn(
|
|
@@ -7579,12 +7852,12 @@ var SelectContent = React25.forwardRef(({ className, children, position = "poppe
|
|
|
7579
7852
|
children
|
|
7580
7853
|
}
|
|
7581
7854
|
),
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
7855
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(SelectScrollDownButton, {})
|
|
7583
7856
|
]
|
|
7584
7857
|
}
|
|
7585
7858
|
) }));
|
|
7586
7859
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
7587
|
-
var SelectLabel =
|
|
7860
|
+
var SelectLabel = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7588
7861
|
SelectPrimitive.Label,
|
|
7589
7862
|
{
|
|
7590
7863
|
ref,
|
|
@@ -7596,7 +7869,7 @@ var SelectLabel = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7596
7869
|
}
|
|
7597
7870
|
));
|
|
7598
7871
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
7599
|
-
var SelectItem =
|
|
7872
|
+
var SelectItem = React27.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
7600
7873
|
SelectPrimitive.Item,
|
|
7601
7874
|
{
|
|
7602
7875
|
ref,
|
|
@@ -7607,13 +7880,13 @@ var SelectItem = React25.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7607
7880
|
),
|
|
7608
7881
|
...props,
|
|
7609
7882
|
children: [
|
|
7610
|
-
/* @__PURE__ */ (0,
|
|
7611
|
-
/* @__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 })
|
|
7612
7885
|
]
|
|
7613
7886
|
}
|
|
7614
7887
|
));
|
|
7615
7888
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
7616
|
-
var SelectSeparator =
|
|
7889
|
+
var SelectSeparator = React27.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7617
7890
|
SelectPrimitive.Separator,
|
|
7618
7891
|
{
|
|
7619
7892
|
ref,
|
|
@@ -7625,31 +7898,31 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
7625
7898
|
|
|
7626
7899
|
// src/components/ui/sheet.tsx
|
|
7627
7900
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
7628
|
-
var
|
|
7629
|
-
var
|
|
7901
|
+
var import_lucide_react28 = require("lucide-react");
|
|
7902
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7630
7903
|
function Sheet({ ...props }) {
|
|
7631
|
-
return /* @__PURE__ */ (0,
|
|
7904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
7632
7905
|
}
|
|
7633
7906
|
function SheetTrigger({
|
|
7634
7907
|
...props
|
|
7635
7908
|
}) {
|
|
7636
|
-
return /* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
7637
7910
|
}
|
|
7638
7911
|
function SheetClose({
|
|
7639
7912
|
...props
|
|
7640
7913
|
}) {
|
|
7641
|
-
return /* @__PURE__ */ (0,
|
|
7914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
7642
7915
|
}
|
|
7643
7916
|
function SheetPortal({
|
|
7644
7917
|
...props
|
|
7645
7918
|
}) {
|
|
7646
|
-
return /* @__PURE__ */ (0,
|
|
7919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
7647
7920
|
}
|
|
7648
7921
|
function SheetOverlay({
|
|
7649
7922
|
className,
|
|
7650
7923
|
...props
|
|
7651
7924
|
}) {
|
|
7652
|
-
return /* @__PURE__ */ (0,
|
|
7925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7653
7926
|
SheetPrimitive.Overlay,
|
|
7654
7927
|
{
|
|
7655
7928
|
"data-slot": "sheet-overlay",
|
|
@@ -7667,9 +7940,9 @@ function SheetContent({
|
|
|
7667
7940
|
side = "right",
|
|
7668
7941
|
...props
|
|
7669
7942
|
}) {
|
|
7670
|
-
return /* @__PURE__ */ (0,
|
|
7671
|
-
/* @__PURE__ */ (0,
|
|
7672
|
-
/* @__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)(
|
|
7673
7946
|
SheetPrimitive.Content,
|
|
7674
7947
|
{
|
|
7675
7948
|
"data-slot": "sheet-content",
|
|
@@ -7684,9 +7957,9 @@ function SheetContent({
|
|
|
7684
7957
|
...props,
|
|
7685
7958
|
children: [
|
|
7686
7959
|
children,
|
|
7687
|
-
/* @__PURE__ */ (0,
|
|
7688
|
-
/* @__PURE__ */ (0,
|
|
7689
|
-
/* @__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" })
|
|
7690
7963
|
] })
|
|
7691
7964
|
]
|
|
7692
7965
|
}
|
|
@@ -7694,7 +7967,7 @@ function SheetContent({
|
|
|
7694
7967
|
] });
|
|
7695
7968
|
}
|
|
7696
7969
|
function SheetHeader({ className, ...props }) {
|
|
7697
|
-
return /* @__PURE__ */ (0,
|
|
7970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7698
7971
|
"div",
|
|
7699
7972
|
{
|
|
7700
7973
|
"data-slot": "sheet-header",
|
|
@@ -7704,7 +7977,7 @@ function SheetHeader({ className, ...props }) {
|
|
|
7704
7977
|
);
|
|
7705
7978
|
}
|
|
7706
7979
|
function SheetFooter({ className, ...props }) {
|
|
7707
|
-
return /* @__PURE__ */ (0,
|
|
7980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7708
7981
|
"div",
|
|
7709
7982
|
{
|
|
7710
7983
|
"data-slot": "sheet-footer",
|
|
@@ -7717,7 +7990,7 @@ function SheetTitle({
|
|
|
7717
7990
|
className,
|
|
7718
7991
|
...props
|
|
7719
7992
|
}) {
|
|
7720
|
-
return /* @__PURE__ */ (0,
|
|
7993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7721
7994
|
SheetPrimitive.Title,
|
|
7722
7995
|
{
|
|
7723
7996
|
"data-slot": "sheet-title",
|
|
@@ -7730,7 +8003,7 @@ function SheetDescription({
|
|
|
7730
8003
|
className,
|
|
7731
8004
|
...props
|
|
7732
8005
|
}) {
|
|
7733
|
-
return /* @__PURE__ */ (0,
|
|
8006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7734
8007
|
SheetPrimitive.Description,
|
|
7735
8008
|
{
|
|
7736
8009
|
"data-slot": "sheet-description",
|
|
@@ -7741,17 +8014,17 @@ function SheetDescription({
|
|
|
7741
8014
|
}
|
|
7742
8015
|
|
|
7743
8016
|
// src/components/ui/sidebar.tsx
|
|
7744
|
-
var
|
|
8017
|
+
var React29 = __toESM(require("react"), 1);
|
|
7745
8018
|
var import_react_slot5 = require("@radix-ui/react-slot");
|
|
7746
|
-
var
|
|
7747
|
-
var
|
|
8019
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
8020
|
+
var import_lucide_react29 = require("lucide-react");
|
|
7748
8021
|
|
|
7749
8022
|
// src/hooks/use-mobile.ts
|
|
7750
|
-
var
|
|
8023
|
+
var React28 = __toESM(require("react"), 1);
|
|
7751
8024
|
var MOBILE_BREAKPOINT = 768;
|
|
7752
8025
|
function useIsMobile() {
|
|
7753
|
-
const [isMobile, setIsMobile] =
|
|
7754
|
-
|
|
8026
|
+
const [isMobile, setIsMobile] = React28.useState(void 0);
|
|
8027
|
+
React28.useEffect(() => {
|
|
7755
8028
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
7756
8029
|
const onChange = () => {
|
|
7757
8030
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -7764,16 +8037,16 @@ function useIsMobile() {
|
|
|
7764
8037
|
}
|
|
7765
8038
|
|
|
7766
8039
|
// src/components/ui/sidebar.tsx
|
|
7767
|
-
var
|
|
8040
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7768
8041
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
7769
8042
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
7770
8043
|
var SIDEBAR_WIDTH = "16rem";
|
|
7771
8044
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
7772
8045
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
7773
8046
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
7774
|
-
var SidebarContext =
|
|
8047
|
+
var SidebarContext = React29.createContext(null);
|
|
7775
8048
|
function useSidebar() {
|
|
7776
|
-
const context =
|
|
8049
|
+
const context = React29.useContext(SidebarContext);
|
|
7777
8050
|
if (!context) {
|
|
7778
8051
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
7779
8052
|
}
|
|
@@ -7789,10 +8062,10 @@ function SidebarProvider({
|
|
|
7789
8062
|
...props
|
|
7790
8063
|
}) {
|
|
7791
8064
|
const isMobile = useIsMobile();
|
|
7792
|
-
const [openMobile, setOpenMobile] =
|
|
7793
|
-
const [_open, _setOpen] =
|
|
8065
|
+
const [openMobile, setOpenMobile] = React29.useState(false);
|
|
8066
|
+
const [_open, _setOpen] = React29.useState(defaultOpen);
|
|
7794
8067
|
const open = openProp ?? _open;
|
|
7795
|
-
const setOpen =
|
|
8068
|
+
const setOpen = React29.useCallback(
|
|
7796
8069
|
(value) => {
|
|
7797
8070
|
const openState = typeof value === "function" ? value(open) : value;
|
|
7798
8071
|
if (setOpenProp) {
|
|
@@ -7804,10 +8077,10 @@ function SidebarProvider({
|
|
|
7804
8077
|
},
|
|
7805
8078
|
[setOpenProp, open]
|
|
7806
8079
|
);
|
|
7807
|
-
const toggleSidebar =
|
|
8080
|
+
const toggleSidebar = React29.useCallback(() => {
|
|
7808
8081
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
7809
8082
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
7810
|
-
|
|
8083
|
+
React29.useEffect(() => {
|
|
7811
8084
|
const handleKeyDown = (event) => {
|
|
7812
8085
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
7813
8086
|
event.preventDefault();
|
|
@@ -7818,7 +8091,7 @@ function SidebarProvider({
|
|
|
7818
8091
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
7819
8092
|
}, [toggleSidebar]);
|
|
7820
8093
|
const state = open ? "expanded" : "collapsed";
|
|
7821
|
-
const contextValue =
|
|
8094
|
+
const contextValue = React29.useMemo(
|
|
7822
8095
|
() => ({
|
|
7823
8096
|
state,
|
|
7824
8097
|
open,
|
|
@@ -7830,7 +8103,7 @@ function SidebarProvider({
|
|
|
7830
8103
|
}),
|
|
7831
8104
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
7832
8105
|
);
|
|
7833
|
-
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)(
|
|
7834
8107
|
"div",
|
|
7835
8108
|
{
|
|
7836
8109
|
"data-slot": "sidebar-wrapper",
|
|
@@ -7858,7 +8131,7 @@ function Sidebar({
|
|
|
7858
8131
|
}) {
|
|
7859
8132
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
7860
8133
|
if (collapsible === "none") {
|
|
7861
|
-
return /* @__PURE__ */ (0,
|
|
8134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7862
8135
|
"div",
|
|
7863
8136
|
{
|
|
7864
8137
|
"data-slot": "sidebar",
|
|
@@ -7872,7 +8145,7 @@ function Sidebar({
|
|
|
7872
8145
|
);
|
|
7873
8146
|
}
|
|
7874
8147
|
if (isMobile) {
|
|
7875
|
-
return /* @__PURE__ */ (0,
|
|
8148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7876
8149
|
SheetContent,
|
|
7877
8150
|
{
|
|
7878
8151
|
"data-sidebar": "sidebar",
|
|
@@ -7884,16 +8157,16 @@ function Sidebar({
|
|
|
7884
8157
|
},
|
|
7885
8158
|
side,
|
|
7886
8159
|
children: [
|
|
7887
|
-
/* @__PURE__ */ (0,
|
|
7888
|
-
/* @__PURE__ */ (0,
|
|
7889
|
-
/* @__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." })
|
|
7890
8163
|
] }),
|
|
7891
|
-
/* @__PURE__ */ (0,
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
7892
8165
|
]
|
|
7893
8166
|
}
|
|
7894
8167
|
) });
|
|
7895
8168
|
}
|
|
7896
|
-
return /* @__PURE__ */ (0,
|
|
8169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7897
8170
|
"div",
|
|
7898
8171
|
{
|
|
7899
8172
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
@@ -7903,7 +8176,7 @@ function Sidebar({
|
|
|
7903
8176
|
"data-side": side,
|
|
7904
8177
|
"data-slot": "sidebar",
|
|
7905
8178
|
children: [
|
|
7906
|
-
/* @__PURE__ */ (0,
|
|
8179
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7907
8180
|
"div",
|
|
7908
8181
|
{
|
|
7909
8182
|
"data-slot": "sidebar-gap",
|
|
@@ -7915,7 +8188,7 @@ function Sidebar({
|
|
|
7915
8188
|
)
|
|
7916
8189
|
}
|
|
7917
8190
|
),
|
|
7918
|
-
/* @__PURE__ */ (0,
|
|
8191
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7919
8192
|
"div",
|
|
7920
8193
|
{
|
|
7921
8194
|
"data-slot": "sidebar-container",
|
|
@@ -7927,7 +8200,7 @@ function Sidebar({
|
|
|
7927
8200
|
className
|
|
7928
8201
|
),
|
|
7929
8202
|
...props,
|
|
7930
|
-
children: /* @__PURE__ */ (0,
|
|
8203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7931
8204
|
"div",
|
|
7932
8205
|
{
|
|
7933
8206
|
"data-sidebar": "sidebar",
|
|
@@ -7948,7 +8221,7 @@ function SidebarTrigger({
|
|
|
7948
8221
|
...props
|
|
7949
8222
|
}) {
|
|
7950
8223
|
const { toggleSidebar } = useSidebar();
|
|
7951
|
-
return /* @__PURE__ */ (0,
|
|
8224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
7952
8225
|
Button,
|
|
7953
8226
|
{
|
|
7954
8227
|
"data-sidebar": "trigger",
|
|
@@ -7962,15 +8235,15 @@ function SidebarTrigger({
|
|
|
7962
8235
|
},
|
|
7963
8236
|
...props,
|
|
7964
8237
|
children: [
|
|
7965
|
-
/* @__PURE__ */ (0,
|
|
7966
|
-
/* @__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" })
|
|
7967
8240
|
]
|
|
7968
8241
|
}
|
|
7969
8242
|
);
|
|
7970
8243
|
}
|
|
7971
8244
|
function SidebarRail({ className, ...props }) {
|
|
7972
8245
|
const { toggleSidebar } = useSidebar();
|
|
7973
|
-
return /* @__PURE__ */ (0,
|
|
8246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7974
8247
|
"button",
|
|
7975
8248
|
{
|
|
7976
8249
|
"data-sidebar": "rail",
|
|
@@ -7993,7 +8266,7 @@ function SidebarRail({ className, ...props }) {
|
|
|
7993
8266
|
);
|
|
7994
8267
|
}
|
|
7995
8268
|
function SidebarInset({ className, ...props }) {
|
|
7996
|
-
return /* @__PURE__ */ (0,
|
|
8269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
7997
8270
|
"main",
|
|
7998
8271
|
{
|
|
7999
8272
|
"data-slot": "sidebar-inset",
|
|
@@ -8010,7 +8283,7 @@ function SidebarInput({
|
|
|
8010
8283
|
className,
|
|
8011
8284
|
...props
|
|
8012
8285
|
}) {
|
|
8013
|
-
return /* @__PURE__ */ (0,
|
|
8286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8014
8287
|
Input,
|
|
8015
8288
|
{
|
|
8016
8289
|
"data-slot": "sidebar-input",
|
|
@@ -8021,7 +8294,7 @@ function SidebarInput({
|
|
|
8021
8294
|
);
|
|
8022
8295
|
}
|
|
8023
8296
|
function SidebarHeader({ className, ...props }) {
|
|
8024
|
-
return /* @__PURE__ */ (0,
|
|
8297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8025
8298
|
"div",
|
|
8026
8299
|
{
|
|
8027
8300
|
"data-slot": "sidebar-header",
|
|
@@ -8032,7 +8305,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
8032
8305
|
);
|
|
8033
8306
|
}
|
|
8034
8307
|
function SidebarFooter({ className, ...props }) {
|
|
8035
|
-
return /* @__PURE__ */ (0,
|
|
8308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8036
8309
|
"div",
|
|
8037
8310
|
{
|
|
8038
8311
|
"data-slot": "sidebar-footer",
|
|
@@ -8046,7 +8319,7 @@ function SidebarSeparator({
|
|
|
8046
8319
|
className,
|
|
8047
8320
|
...props
|
|
8048
8321
|
}) {
|
|
8049
|
-
return /* @__PURE__ */ (0,
|
|
8322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8050
8323
|
Separator,
|
|
8051
8324
|
{
|
|
8052
8325
|
"data-slot": "sidebar-separator",
|
|
@@ -8057,7 +8330,7 @@ function SidebarSeparator({
|
|
|
8057
8330
|
);
|
|
8058
8331
|
}
|
|
8059
8332
|
function SidebarContent({ className, ...props }) {
|
|
8060
|
-
return /* @__PURE__ */ (0,
|
|
8333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8061
8334
|
"div",
|
|
8062
8335
|
{
|
|
8063
8336
|
"data-slot": "sidebar-content",
|
|
@@ -8071,7 +8344,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
8071
8344
|
);
|
|
8072
8345
|
}
|
|
8073
8346
|
function SidebarGroup({ className, ...props }) {
|
|
8074
|
-
return /* @__PURE__ */ (0,
|
|
8347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8075
8348
|
"div",
|
|
8076
8349
|
{
|
|
8077
8350
|
"data-slot": "sidebar-group",
|
|
@@ -8087,7 +8360,7 @@ function SidebarGroupLabel({
|
|
|
8087
8360
|
...props
|
|
8088
8361
|
}) {
|
|
8089
8362
|
const Comp = asChild ? import_react_slot5.Slot : "div";
|
|
8090
|
-
return /* @__PURE__ */ (0,
|
|
8363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8091
8364
|
Comp,
|
|
8092
8365
|
{
|
|
8093
8366
|
"data-slot": "sidebar-group-label",
|
|
@@ -8107,7 +8380,7 @@ function SidebarGroupAction({
|
|
|
8107
8380
|
...props
|
|
8108
8381
|
}) {
|
|
8109
8382
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8110
|
-
return /* @__PURE__ */ (0,
|
|
8383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8111
8384
|
Comp,
|
|
8112
8385
|
{
|
|
8113
8386
|
"data-slot": "sidebar-group-action",
|
|
@@ -8127,7 +8400,7 @@ function SidebarGroupContent({
|
|
|
8127
8400
|
className,
|
|
8128
8401
|
...props
|
|
8129
8402
|
}) {
|
|
8130
|
-
return /* @__PURE__ */ (0,
|
|
8403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8131
8404
|
"div",
|
|
8132
8405
|
{
|
|
8133
8406
|
"data-slot": "sidebar-group-content",
|
|
@@ -8138,7 +8411,7 @@ function SidebarGroupContent({
|
|
|
8138
8411
|
);
|
|
8139
8412
|
}
|
|
8140
8413
|
function SidebarMenu({ className, ...props }) {
|
|
8141
|
-
return /* @__PURE__ */ (0,
|
|
8414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8142
8415
|
"ul",
|
|
8143
8416
|
{
|
|
8144
8417
|
"data-slot": "sidebar-menu",
|
|
@@ -8149,7 +8422,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
8149
8422
|
);
|
|
8150
8423
|
}
|
|
8151
8424
|
function SidebarMenuItem({ className, ...props }) {
|
|
8152
|
-
return /* @__PURE__ */ (0,
|
|
8425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8153
8426
|
"li",
|
|
8154
8427
|
{
|
|
8155
8428
|
"data-slot": "sidebar-menu-item",
|
|
@@ -8159,7 +8432,7 @@ function SidebarMenuItem({ className, ...props }) {
|
|
|
8159
8432
|
}
|
|
8160
8433
|
);
|
|
8161
8434
|
}
|
|
8162
|
-
var sidebarMenuButtonVariants = (0,
|
|
8435
|
+
var sidebarMenuButtonVariants = (0, import_class_variance_authority14.cva)(
|
|
8163
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",
|
|
8164
8437
|
{
|
|
8165
8438
|
variants: {
|
|
@@ -8190,7 +8463,7 @@ function SidebarMenuButton({
|
|
|
8190
8463
|
}) {
|
|
8191
8464
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8192
8465
|
const { isMobile, state } = useSidebar();
|
|
8193
|
-
const button = /* @__PURE__ */ (0,
|
|
8466
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8194
8467
|
Comp,
|
|
8195
8468
|
{
|
|
8196
8469
|
"data-slot": "sidebar-menu-button",
|
|
@@ -8209,9 +8482,9 @@ function SidebarMenuButton({
|
|
|
8209
8482
|
children: tooltip
|
|
8210
8483
|
};
|
|
8211
8484
|
}
|
|
8212
|
-
return /* @__PURE__ */ (0,
|
|
8213
|
-
/* @__PURE__ */ (0,
|
|
8214
|
-
/* @__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)(
|
|
8215
8488
|
TooltipContent,
|
|
8216
8489
|
{
|
|
8217
8490
|
side: "right",
|
|
@@ -8229,7 +8502,7 @@ function SidebarMenuAction({
|
|
|
8229
8502
|
...props
|
|
8230
8503
|
}) {
|
|
8231
8504
|
const Comp = asChild ? import_react_slot5.Slot : "button";
|
|
8232
|
-
return /* @__PURE__ */ (0,
|
|
8505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8233
8506
|
Comp,
|
|
8234
8507
|
{
|
|
8235
8508
|
"data-slot": "sidebar-menu-action",
|
|
@@ -8253,7 +8526,7 @@ function SidebarMenuBadge({
|
|
|
8253
8526
|
className,
|
|
8254
8527
|
...props
|
|
8255
8528
|
}) {
|
|
8256
|
-
return /* @__PURE__ */ (0,
|
|
8529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8257
8530
|
"div",
|
|
8258
8531
|
{
|
|
8259
8532
|
"data-slot": "sidebar-menu-badge",
|
|
@@ -8276,10 +8549,10 @@ function SidebarMenuSkeleton({
|
|
|
8276
8549
|
showIcon = false,
|
|
8277
8550
|
...props
|
|
8278
8551
|
}) {
|
|
8279
|
-
const width =
|
|
8552
|
+
const width = React29.useMemo(() => {
|
|
8280
8553
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
8281
8554
|
}, []);
|
|
8282
|
-
return /* @__PURE__ */ (0,
|
|
8555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
8283
8556
|
"div",
|
|
8284
8557
|
{
|
|
8285
8558
|
"data-slot": "sidebar-menu-skeleton",
|
|
@@ -8287,14 +8560,14 @@ function SidebarMenuSkeleton({
|
|
|
8287
8560
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
8288
8561
|
...props,
|
|
8289
8562
|
children: [
|
|
8290
|
-
showIcon && /* @__PURE__ */ (0,
|
|
8563
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8291
8564
|
Skeleton,
|
|
8292
8565
|
{
|
|
8293
8566
|
className: "size-4 rounded-md",
|
|
8294
8567
|
"data-sidebar": "menu-skeleton-icon"
|
|
8295
8568
|
}
|
|
8296
8569
|
),
|
|
8297
|
-
/* @__PURE__ */ (0,
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8298
8571
|
Skeleton,
|
|
8299
8572
|
{
|
|
8300
8573
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
@@ -8309,7 +8582,7 @@ function SidebarMenuSkeleton({
|
|
|
8309
8582
|
);
|
|
8310
8583
|
}
|
|
8311
8584
|
function SidebarMenuSub({ className, ...props }) {
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8585
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8313
8586
|
"ul",
|
|
8314
8587
|
{
|
|
8315
8588
|
"data-slot": "sidebar-menu-sub",
|
|
@@ -8327,7 +8600,7 @@ function SidebarMenuSubItem({
|
|
|
8327
8600
|
className,
|
|
8328
8601
|
...props
|
|
8329
8602
|
}) {
|
|
8330
|
-
return /* @__PURE__ */ (0,
|
|
8603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8331
8604
|
"li",
|
|
8332
8605
|
{
|
|
8333
8606
|
"data-slot": "sidebar-menu-sub-item",
|
|
@@ -8345,7 +8618,7 @@ function SidebarMenuSubButton({
|
|
|
8345
8618
|
...props
|
|
8346
8619
|
}) {
|
|
8347
8620
|
const Comp = asChild ? import_react_slot5.Slot : "a";
|
|
8348
|
-
return /* @__PURE__ */ (0,
|
|
8621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8349
8622
|
Comp,
|
|
8350
8623
|
{
|
|
8351
8624
|
"data-slot": "sidebar-menu-sub-button",
|
|
@@ -8366,12 +8639,12 @@ function SidebarMenuSubButton({
|
|
|
8366
8639
|
}
|
|
8367
8640
|
|
|
8368
8641
|
// src/components/ui/slider.tsx
|
|
8369
|
-
var
|
|
8642
|
+
var React30 = __toESM(require("react"), 1);
|
|
8370
8643
|
var SliderPrimitive = __toESM(require("@radix-ui/react-slider"), 1);
|
|
8371
|
-
var
|
|
8644
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8372
8645
|
function useDocumentDirection2() {
|
|
8373
|
-
const [direction, setDirection] =
|
|
8374
|
-
|
|
8646
|
+
const [direction, setDirection] = React30.useState("rtl");
|
|
8647
|
+
React30.useEffect(() => {
|
|
8375
8648
|
const getDirection = () => {
|
|
8376
8649
|
if (typeof document === "undefined") return "rtl";
|
|
8377
8650
|
const htmlDir = document.documentElement.getAttribute("dir");
|
|
@@ -8402,13 +8675,13 @@ function Slider({
|
|
|
8402
8675
|
dir,
|
|
8403
8676
|
...props
|
|
8404
8677
|
}) {
|
|
8405
|
-
const _values =
|
|
8678
|
+
const _values = React30.useMemo(
|
|
8406
8679
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
8407
8680
|
[value, defaultValue, min, max]
|
|
8408
8681
|
);
|
|
8409
8682
|
const documentDir = useDocumentDirection2();
|
|
8410
8683
|
const resolvedDir = dir ?? documentDir;
|
|
8411
|
-
return /* @__PURE__ */ (0,
|
|
8684
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
8412
8685
|
SliderPrimitive.Root,
|
|
8413
8686
|
{
|
|
8414
8687
|
"data-slot": "slider",
|
|
@@ -8423,14 +8696,14 @@ function Slider({
|
|
|
8423
8696
|
),
|
|
8424
8697
|
...props,
|
|
8425
8698
|
children: [
|
|
8426
|
-
/* @__PURE__ */ (0,
|
|
8699
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8427
8700
|
SliderPrimitive.Track,
|
|
8428
8701
|
{
|
|
8429
8702
|
"data-slot": "slider-track",
|
|
8430
8703
|
className: cn(
|
|
8431
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"
|
|
8432
8705
|
),
|
|
8433
|
-
children: /* @__PURE__ */ (0,
|
|
8706
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8434
8707
|
SliderPrimitive.Range,
|
|
8435
8708
|
{
|
|
8436
8709
|
"data-slot": "slider-range",
|
|
@@ -8441,7 +8714,7 @@ function Slider({
|
|
|
8441
8714
|
)
|
|
8442
8715
|
}
|
|
8443
8716
|
),
|
|
8444
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0,
|
|
8717
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8445
8718
|
SliderPrimitive.Thumb,
|
|
8446
8719
|
{
|
|
8447
8720
|
"data-slot": "slider-thumb",
|
|
@@ -8455,16 +8728,16 @@ function Slider({
|
|
|
8455
8728
|
}
|
|
8456
8729
|
|
|
8457
8730
|
// src/components/ui/sonner.tsx
|
|
8458
|
-
var
|
|
8731
|
+
var import_lucide_react30 = require("lucide-react");
|
|
8459
8732
|
var import_next_themes = require("next-themes");
|
|
8460
8733
|
var import_sonner = require("sonner");
|
|
8461
8734
|
var import_sonner2 = require("sonner");
|
|
8462
|
-
var
|
|
8735
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8463
8736
|
var SONNER_DEFAULT_DURATION = 4e3;
|
|
8464
|
-
var StatusIconSuccess = () => /* @__PURE__ */ (0,
|
|
8465
|
-
var StatusIconInfo = () => /* @__PURE__ */ (0,
|
|
8466
|
-
var StatusIconWarning = () => /* @__PURE__ */ (0,
|
|
8467
|
-
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" }) });
|
|
8468
8741
|
var Toaster = ({
|
|
8469
8742
|
dir = "rtl",
|
|
8470
8743
|
position = "bottom-left",
|
|
@@ -8473,15 +8746,15 @@ var Toaster = ({
|
|
|
8473
8746
|
...props
|
|
8474
8747
|
}) => {
|
|
8475
8748
|
const { theme = "system" } = (0, import_next_themes.useTheme)();
|
|
8476
|
-
return /* @__PURE__ */ (0,
|
|
8749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8477
8750
|
import_sonner.Toaster,
|
|
8478
8751
|
{
|
|
8479
8752
|
icons: {
|
|
8480
|
-
success: /* @__PURE__ */ (0,
|
|
8481
|
-
info: /* @__PURE__ */ (0,
|
|
8482
|
-
warning: /* @__PURE__ */ (0,
|
|
8483
|
-
error: /* @__PURE__ */ (0,
|
|
8484
|
-
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" })
|
|
8485
8758
|
},
|
|
8486
8759
|
theme,
|
|
8487
8760
|
className: "toaster group pointer-events-auto",
|
|
@@ -8531,11 +8804,11 @@ var Toaster = ({
|
|
|
8531
8804
|
};
|
|
8532
8805
|
|
|
8533
8806
|
// src/components/ui/switch.tsx
|
|
8534
|
-
var
|
|
8807
|
+
var React31 = __toESM(require("react"), 1);
|
|
8535
8808
|
var SwitchPrimitive = __toESM(require("@radix-ui/react-switch"), 1);
|
|
8536
|
-
var
|
|
8537
|
-
var
|
|
8538
|
-
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)(
|
|
8539
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",
|
|
8540
8813
|
{
|
|
8541
8814
|
variants: {
|
|
@@ -8550,7 +8823,7 @@ var switchRootVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8550
8823
|
}
|
|
8551
8824
|
}
|
|
8552
8825
|
);
|
|
8553
|
-
var switchThumbVariants = (0,
|
|
8826
|
+
var switchThumbVariants = (0, import_class_variance_authority15.cva)(
|
|
8554
8827
|
"pointer-events-none block rounded-full bg-foreground-lighter data-[state=checked]:bg-white shadow-lg ring-0 transition-transform",
|
|
8555
8828
|
{
|
|
8556
8829
|
variants: {
|
|
@@ -8565,14 +8838,14 @@ var switchThumbVariants = (0, import_class_variance_authority13.cva)(
|
|
|
8565
8838
|
}
|
|
8566
8839
|
}
|
|
8567
8840
|
);
|
|
8568
|
-
var Switch =
|
|
8841
|
+
var Switch = React31.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8569
8842
|
SwitchPrimitive.Root,
|
|
8570
8843
|
{
|
|
8571
8844
|
"data-slot": "switch",
|
|
8572
8845
|
className: cn(switchRootVariants({ size }), className),
|
|
8573
8846
|
...props,
|
|
8574
8847
|
ref,
|
|
8575
|
-
children: /* @__PURE__ */ (0,
|
|
8848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8576
8849
|
SwitchPrimitive.Thumb,
|
|
8577
8850
|
{
|
|
8578
8851
|
"data-slot": "switch-thumb",
|
|
@@ -8584,14 +8857,14 @@ var Switch = React29.forwardRef(({ className, size, ...props }, ref) => /* @__PU
|
|
|
8584
8857
|
Switch.displayName = SwitchPrimitive.Root.displayName;
|
|
8585
8858
|
|
|
8586
8859
|
// src/components/ui/table.tsx
|
|
8587
|
-
var
|
|
8860
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
8588
8861
|
function Table({ className, ...props }) {
|
|
8589
|
-
return /* @__PURE__ */ (0,
|
|
8862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8590
8863
|
"div",
|
|
8591
8864
|
{
|
|
8592
8865
|
"data-slot": "table-container",
|
|
8593
8866
|
className: "relative w-full overflow-x-auto",
|
|
8594
|
-
children: /* @__PURE__ */ (0,
|
|
8867
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8595
8868
|
"table",
|
|
8596
8869
|
{
|
|
8597
8870
|
"data-slot": "table",
|
|
@@ -8603,7 +8876,7 @@ function Table({ className, ...props }) {
|
|
|
8603
8876
|
);
|
|
8604
8877
|
}
|
|
8605
8878
|
function TableHeader({ className, ...props }) {
|
|
8606
|
-
return /* @__PURE__ */ (0,
|
|
8879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8607
8880
|
"thead",
|
|
8608
8881
|
{
|
|
8609
8882
|
"data-slot": "table-header",
|
|
@@ -8613,7 +8886,7 @@ function TableHeader({ className, ...props }) {
|
|
|
8613
8886
|
);
|
|
8614
8887
|
}
|
|
8615
8888
|
function TableBody({ className, ...props }) {
|
|
8616
|
-
return /* @__PURE__ */ (0,
|
|
8889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8617
8890
|
"tbody",
|
|
8618
8891
|
{
|
|
8619
8892
|
"data-slot": "table-body",
|
|
@@ -8623,7 +8896,7 @@ function TableBody({ className, ...props }) {
|
|
|
8623
8896
|
);
|
|
8624
8897
|
}
|
|
8625
8898
|
function TableFooter({ className, ...props }) {
|
|
8626
|
-
return /* @__PURE__ */ (0,
|
|
8899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8627
8900
|
"tfoot",
|
|
8628
8901
|
{
|
|
8629
8902
|
"data-slot": "table-footer",
|
|
@@ -8636,7 +8909,7 @@ function TableFooter({ className, ...props }) {
|
|
|
8636
8909
|
);
|
|
8637
8910
|
}
|
|
8638
8911
|
function TableRow({ className, ...props }) {
|
|
8639
|
-
return /* @__PURE__ */ (0,
|
|
8912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8640
8913
|
"tr",
|
|
8641
8914
|
{
|
|
8642
8915
|
"data-slot": "table-row",
|
|
@@ -8649,7 +8922,7 @@ function TableRow({ className, ...props }) {
|
|
|
8649
8922
|
);
|
|
8650
8923
|
}
|
|
8651
8924
|
function TableHead({ className, ...props }) {
|
|
8652
|
-
return /* @__PURE__ */ (0,
|
|
8925
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8653
8926
|
"th",
|
|
8654
8927
|
{
|
|
8655
8928
|
"data-slot": "table-head",
|
|
@@ -8662,7 +8935,7 @@ function TableHead({ className, ...props }) {
|
|
|
8662
8935
|
);
|
|
8663
8936
|
}
|
|
8664
8937
|
function TableCell({ className, ...props }) {
|
|
8665
|
-
return /* @__PURE__ */ (0,
|
|
8938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8666
8939
|
"td",
|
|
8667
8940
|
{
|
|
8668
8941
|
"data-slot": "table-cell",
|
|
@@ -8678,7 +8951,7 @@ function TableCaption({
|
|
|
8678
8951
|
className,
|
|
8679
8952
|
...props
|
|
8680
8953
|
}) {
|
|
8681
|
-
return /* @__PURE__ */ (0,
|
|
8954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
8682
8955
|
"caption",
|
|
8683
8956
|
{
|
|
8684
8957
|
"data-slot": "table-caption",
|
|
@@ -8689,11 +8962,11 @@ function TableCaption({
|
|
|
8689
8962
|
}
|
|
8690
8963
|
|
|
8691
8964
|
// src/components/ui/tabs.tsx
|
|
8692
|
-
var
|
|
8965
|
+
var React32 = __toESM(require("react"), 1);
|
|
8693
8966
|
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
8694
|
-
var
|
|
8967
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8695
8968
|
var Tabs = TabsPrimitive.Root;
|
|
8696
|
-
var TabsList =
|
|
8969
|
+
var TabsList = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8697
8970
|
TabsPrimitive.List,
|
|
8698
8971
|
{
|
|
8699
8972
|
ref,
|
|
@@ -8705,7 +8978,7 @@ var TabsList = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
8705
8978
|
}
|
|
8706
8979
|
));
|
|
8707
8980
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
8708
|
-
var TabsTrigger =
|
|
8981
|
+
var TabsTrigger = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8709
8982
|
TabsPrimitive.Trigger,
|
|
8710
8983
|
{
|
|
8711
8984
|
ref,
|
|
@@ -8717,7 +8990,7 @@ var TabsTrigger = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
8717
8990
|
}
|
|
8718
8991
|
));
|
|
8719
8992
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
8720
|
-
var TabsContent =
|
|
8993
|
+
var TabsContent = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8721
8994
|
TabsPrimitive.Content,
|
|
8722
8995
|
{
|
|
8723
8996
|
ref,
|
|
@@ -8732,9 +9005,9 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
|
8732
9005
|
|
|
8733
9006
|
// src/components/ui/toggle.tsx
|
|
8734
9007
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
8735
|
-
var
|
|
8736
|
-
var
|
|
8737
|
-
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)(
|
|
8738
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",
|
|
8739
9012
|
{
|
|
8740
9013
|
variants: {
|
|
@@ -8760,7 +9033,7 @@ function Toggle({
|
|
|
8760
9033
|
size,
|
|
8761
9034
|
...props
|
|
8762
9035
|
}) {
|
|
8763
|
-
return /* @__PURE__ */ (0,
|
|
9036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8764
9037
|
TogglePrimitive.Root,
|
|
8765
9038
|
{
|
|
8766
9039
|
"data-slot": "toggle",
|
|
@@ -8771,10 +9044,10 @@ function Toggle({
|
|
|
8771
9044
|
}
|
|
8772
9045
|
|
|
8773
9046
|
// src/components/ui/toggle-group.tsx
|
|
8774
|
-
var
|
|
9047
|
+
var React33 = __toESM(require("react"), 1);
|
|
8775
9048
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
8776
|
-
var
|
|
8777
|
-
var ToggleGroupContext =
|
|
9049
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
9050
|
+
var ToggleGroupContext = React33.createContext({
|
|
8778
9051
|
size: "default",
|
|
8779
9052
|
variant: "default"
|
|
8780
9053
|
});
|
|
@@ -8785,13 +9058,13 @@ function ToggleGroup({
|
|
|
8785
9058
|
children,
|
|
8786
9059
|
...props
|
|
8787
9060
|
}) {
|
|
8788
|
-
return /* @__PURE__ */ (0,
|
|
9061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8789
9062
|
ToggleGroupPrimitive.Root,
|
|
8790
9063
|
{
|
|
8791
9064
|
"data-slot": "toggle-group",
|
|
8792
9065
|
className: cn("flex items-center justify-center gap-1", className),
|
|
8793
9066
|
...props,
|
|
8794
|
-
children: /* @__PURE__ */ (0,
|
|
9067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
8795
9068
|
}
|
|
8796
9069
|
);
|
|
8797
9070
|
}
|
|
@@ -8802,8 +9075,8 @@ function ToggleGroupItem({
|
|
|
8802
9075
|
size,
|
|
8803
9076
|
...props
|
|
8804
9077
|
}) {
|
|
8805
|
-
const context =
|
|
8806
|
-
return /* @__PURE__ */ (0,
|
|
9078
|
+
const context = React33.useContext(ToggleGroupContext);
|
|
9079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8807
9080
|
ToggleGroupPrimitive.Item,
|
|
8808
9081
|
{
|
|
8809
9082
|
"data-slot": "toggle-group-item",
|
|
@@ -8867,7 +9140,7 @@ function resolveCssColor(styles, variable, fallback) {
|
|
|
8867
9140
|
}
|
|
8868
9141
|
|
|
8869
9142
|
// src/components/charts/PartoLineChart.tsx
|
|
8870
|
-
var
|
|
9143
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
8871
9144
|
var FALLBACKS = {
|
|
8872
9145
|
foreground: "hsl(0 0% 98%)",
|
|
8873
9146
|
border: "hsl(0 0% 45%)",
|
|
@@ -8955,12 +9228,12 @@ function PartoLineChart({ className, ...props }) {
|
|
|
8955
9228
|
getColor("--chart-4", FALLBACKS.chart4),
|
|
8956
9229
|
getColor("--chart-5", FALLBACKS.chart5)
|
|
8957
9230
|
];
|
|
8958
|
-
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 }) });
|
|
8959
9232
|
}
|
|
8960
9233
|
|
|
8961
9234
|
// src/components/charts/PartoBarChart.tsx
|
|
8962
9235
|
var import_bar = require("@nivo/bar");
|
|
8963
|
-
var
|
|
9236
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
8964
9237
|
var FALLBACKS2 = {
|
|
8965
9238
|
foreground: "hsl(0 0% 98%)",
|
|
8966
9239
|
border: "hsl(0 0% 45%)",
|
|
@@ -9038,12 +9311,12 @@ function PartoBarChart({ className, ...props }) {
|
|
|
9038
9311
|
getColor("--chart-4", FALLBACKS2.chart4),
|
|
9039
9312
|
getColor("--chart-5", FALLBACKS2.chart5)
|
|
9040
9313
|
];
|
|
9041
|
-
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 }) });
|
|
9042
9315
|
}
|
|
9043
9316
|
|
|
9044
9317
|
// src/components/charts/PartoPieChart.tsx
|
|
9045
9318
|
var import_pie = require("@nivo/pie");
|
|
9046
|
-
var
|
|
9319
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
9047
9320
|
var FALLBACKS3 = {
|
|
9048
9321
|
foreground: "hsl(0 0% 98%)",
|
|
9049
9322
|
popover: "hsl(0 0% 12%)",
|
|
@@ -9088,12 +9361,12 @@ function PartoPieChart({ className, ...props }) {
|
|
|
9088
9361
|
getColor("--chart-4", FALLBACKS3.chart4),
|
|
9089
9362
|
getColor("--chart-5", FALLBACKS3.chart5)
|
|
9090
9363
|
];
|
|
9091
|
-
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 }) });
|
|
9092
9365
|
}
|
|
9093
9366
|
|
|
9094
9367
|
// src/components/charts/PartoHeatMap.tsx
|
|
9095
9368
|
var import_heatmap = require("@nivo/heatmap");
|
|
9096
|
-
var
|
|
9369
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
9097
9370
|
var FALLBACKS4 = {
|
|
9098
9371
|
foreground: "hsl(0 0% 98%)",
|
|
9099
9372
|
border: "hsl(0 0% 45%)",
|
|
@@ -9220,16 +9493,16 @@ function PartoHeatMap({
|
|
|
9220
9493
|
}
|
|
9221
9494
|
};
|
|
9222
9495
|
const defaultValueFormat = (value) => formatNumber2(value);
|
|
9223
|
-
const defaultTooltip = ({ cell }) => /* @__PURE__ */ (0,
|
|
9224
|
-
/* @__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: [
|
|
9225
9498
|
formatWeekday(String(cell.serieId)),
|
|
9226
9499
|
" - ",
|
|
9227
9500
|
formatNumber2(cell.data.x)
|
|
9228
9501
|
] }),
|
|
9229
|
-
/* @__PURE__ */ (0,
|
|
9502
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "text-xs whitespace-nowrap", children: [
|
|
9230
9503
|
isPersian ? "\u0634\u062F\u062A \u0641\u0639\u0627\u0644\u06CC\u062A" : "Activity",
|
|
9231
9504
|
": ",
|
|
9232
|
-
/* @__PURE__ */ (0,
|
|
9505
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "font-bold text-primary", children: formatNumber2(cell.value ?? 0) })
|
|
9233
9506
|
] })
|
|
9234
9507
|
] });
|
|
9235
9508
|
const processAxisConfig = (axisConfig) => {
|
|
@@ -9258,13 +9531,13 @@ function PartoHeatMap({
|
|
|
9258
9531
|
return formatWeekday(String(formatted));
|
|
9259
9532
|
}
|
|
9260
9533
|
} : null;
|
|
9261
|
-
return /* @__PURE__ */ (0,
|
|
9534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9262
9535
|
"div",
|
|
9263
9536
|
{
|
|
9264
9537
|
className,
|
|
9265
9538
|
dir: "ltr",
|
|
9266
9539
|
style: { position: "relative", width: "100%", height: "100%" },
|
|
9267
|
-
children: /* @__PURE__ */ (0,
|
|
9540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
9268
9541
|
import_heatmap.ResponsiveHeatMap,
|
|
9269
9542
|
{
|
|
9270
9543
|
data,
|
|
@@ -9296,12 +9569,12 @@ function PartoHeatMap({
|
|
|
9296
9569
|
}
|
|
9297
9570
|
|
|
9298
9571
|
// src/components/charts/PartoWordCloud.tsx
|
|
9299
|
-
var
|
|
9572
|
+
var React34 = __toESM(require("react"), 1);
|
|
9300
9573
|
var import_react_dom3 = require("react-dom");
|
|
9301
9574
|
var import_wordcloud = require("@visx/wordcloud");
|
|
9302
9575
|
var import_scale = require("@visx/scale");
|
|
9303
9576
|
var import_text = require("@visx/text");
|
|
9304
|
-
var
|
|
9577
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
9305
9578
|
var FALLBACKS5 = {
|
|
9306
9579
|
primary: "hsl(12 76% 61%)"
|
|
9307
9580
|
};
|
|
@@ -9333,11 +9606,11 @@ function PartoWordCloud({
|
|
|
9333
9606
|
fontWeight = 600
|
|
9334
9607
|
}) {
|
|
9335
9608
|
const styles = useRootStyles();
|
|
9336
|
-
const [hovered, setHovered] =
|
|
9337
|
-
const containerRef =
|
|
9609
|
+
const [hovered, setHovered] = React34.useState(null);
|
|
9610
|
+
const containerRef = React34.useRef(null);
|
|
9338
9611
|
const getColor = (variable, fallback) => resolveCssColor(styles, variable, fallback);
|
|
9339
9612
|
const primaryColor = getColor("--primary", FALLBACKS5.primary);
|
|
9340
|
-
const formattedWords =
|
|
9613
|
+
const formattedWords = React34.useMemo(() => {
|
|
9341
9614
|
return words.map((word) => ({
|
|
9342
9615
|
...word,
|
|
9343
9616
|
text: formatHashtagDirection(word.text)
|
|
@@ -9364,7 +9637,7 @@ function PartoWordCloud({
|
|
|
9364
9637
|
color: primaryColor
|
|
9365
9638
|
});
|
|
9366
9639
|
};
|
|
9367
|
-
return /* @__PURE__ */ (0,
|
|
9640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
9368
9641
|
"div",
|
|
9369
9642
|
{
|
|
9370
9643
|
ref: containerRef,
|
|
@@ -9372,7 +9645,7 @@ function PartoWordCloud({
|
|
|
9372
9645
|
style: { position: "relative", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" },
|
|
9373
9646
|
dir: "rtl",
|
|
9374
9647
|
children: [
|
|
9375
|
-
/* @__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)(
|
|
9376
9649
|
import_wordcloud.Wordcloud,
|
|
9377
9650
|
{
|
|
9378
9651
|
words: formattedWords,
|
|
@@ -9388,7 +9661,7 @@ function PartoWordCloud({
|
|
|
9388
9661
|
const originalData = formattedWords.find((item) => item.text === w.text);
|
|
9389
9662
|
const value = originalData?.value || 0;
|
|
9390
9663
|
if (!w.x || !w.y || !w.text) return null;
|
|
9391
|
-
return /* @__PURE__ */ (0,
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9392
9665
|
import_text.Text,
|
|
9393
9666
|
{
|
|
9394
9667
|
fill: primaryColor,
|
|
@@ -9412,7 +9685,7 @@ function PartoWordCloud({
|
|
|
9412
9685
|
}
|
|
9413
9686
|
) }),
|
|
9414
9687
|
hovered && typeof document !== "undefined" && (0, import_react_dom3.createPortal)(
|
|
9415
|
-
/* @__PURE__ */ (0,
|
|
9688
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
9416
9689
|
"div",
|
|
9417
9690
|
{
|
|
9418
9691
|
className: "pointer-events-none fixed z-[9999]",
|
|
@@ -9422,14 +9695,14 @@ function PartoWordCloud({
|
|
|
9422
9695
|
top: `${hovered.y - 10}px`,
|
|
9423
9696
|
transform: "translate(-50%, -100%)"
|
|
9424
9697
|
},
|
|
9425
|
-
children: /* @__PURE__ */ (0,
|
|
9426
|
-
/* @__PURE__ */ (0,
|
|
9427
|
-
/* @__PURE__ */ (0,
|
|
9428
|
-
/* @__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 })
|
|
9429
9702
|
] }),
|
|
9430
|
-
/* @__PURE__ */ (0,
|
|
9431
|
-
/* @__PURE__ */ (0,
|
|
9432
|
-
/* @__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") })
|
|
9433
9706
|
] })
|
|
9434
9707
|
] })
|
|
9435
9708
|
}
|
|
@@ -9579,6 +9852,7 @@ function PartoWordCloud({
|
|
|
9579
9852
|
FormItem,
|
|
9580
9853
|
FormLabel,
|
|
9581
9854
|
FormMessage,
|
|
9855
|
+
HashtagInput,
|
|
9582
9856
|
HoverCard,
|
|
9583
9857
|
HoverCardContent,
|
|
9584
9858
|
HoverCardTrigger,
|
|
@@ -9727,6 +10001,7 @@ function PartoWordCloud({
|
|
|
9727
10001
|
TabsContent,
|
|
9728
10002
|
TabsList,
|
|
9729
10003
|
TabsTrigger,
|
|
10004
|
+
TagInput,
|
|
9730
10005
|
Textarea,
|
|
9731
10006
|
Toaster,
|
|
9732
10007
|
Toggle,
|
|
@@ -9754,9 +10029,11 @@ function PartoWordCloud({
|
|
|
9754
10029
|
getPersianWeekdayName,
|
|
9755
10030
|
getPersianYear,
|
|
9756
10031
|
getPersianYearsForDropdown,
|
|
10032
|
+
hashtagInputVariants,
|
|
9757
10033
|
instagramPostVariants,
|
|
9758
10034
|
jalaliToGregorian,
|
|
9759
10035
|
navigationMenuTriggerStyle,
|
|
10036
|
+
tagInputVariants,
|
|
9760
10037
|
toEnglishDigits,
|
|
9761
10038
|
toPersianDigits,
|
|
9762
10039
|
toast,
|