@pollinations/ui 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -10
- package/dist/{Button-DMJ2K6Gr.d.ts → Button-Bn8pGg6N.d.ts} +1 -1
- package/dist/{Button-CNzpisJf.d.cts → Button-CWUBCiIc.d.cts} +1 -1
- package/dist/{Chip-BS8ronOu.d.ts → Chip-C5impfYd.d.ts} +2 -2
- package/dist/{Chip-DyqWrq0r.d.cts → Chip-SM52sUbZ.d.cts} +2 -2
- package/dist/app.css +1 -1
- package/dist/auth/index.cjs +1 -9
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +1 -2
- package/dist/auth/index.d.ts +1 -2
- package/dist/auth/index.js +1 -9
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.d.cts +2 -2
- package/dist/auth/sdk.d.ts +2 -2
- package/dist/index.cjs +354 -177
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -9
- package/dist/index.d.ts +47 -9
- package/dist/index.js +346 -176
- package/dist/index.js.map +1 -1
- package/dist/modality/index.cjs +6 -38
- package/dist/modality/index.cjs.map +1 -1
- package/dist/modality/index.d.cts +7 -27
- package/dist/modality/index.d.ts +7 -27
- package/dist/modality/index.js +6 -37
- package/dist/modality/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme-VMRlhqST.d.cts +9 -0
- package/dist/theme-VMRlhqST.d.ts +9 -0
- package/dist/wallet/index.cjs +4 -1
- package/dist/wallet/index.cjs.map +1 -1
- package/dist/wallet/index.d.cts +2 -2
- package/dist/wallet/index.d.ts +2 -2
- package/dist/wallet/index.js +4 -1
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/sdk.cjs +4 -1
- package/dist/wallet/sdk.cjs.map +1 -1
- package/dist/wallet/sdk.js +4 -1
- package/dist/wallet/sdk.js.map +1 -1
- package/package.json +3 -8
- package/dist/showcase/index.cjs +0 -2851
- package/dist/showcase/index.cjs.map +0 -1
- package/dist/showcase/index.d.cts +0 -19
- package/dist/showcase/index.d.ts +0 -19
- package/dist/showcase/index.js +0 -2839
- package/dist/showcase/index.js.map +0 -1
- package/dist/theme-DfHMjWB7.d.cts +0 -16
- package/dist/theme-DfHMjWB7.d.ts +0 -16
package/dist/index.cjs
CHANGED
|
@@ -20,10 +20,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var src_exports = {};
|
|
22
22
|
__export(src_exports, {
|
|
23
|
+
Alert: () => Alert,
|
|
23
24
|
AppIcon: () => AppIcon,
|
|
24
25
|
BeakerIcon: () => BeakerIcon,
|
|
25
26
|
BookIcon: () => BookIcon,
|
|
26
27
|
Button: () => Button,
|
|
28
|
+
ButtonGroup: () => ButtonGroup,
|
|
27
29
|
CheckIcon: () => CheckIcon,
|
|
28
30
|
ChevronIcon: () => ChevronIcon,
|
|
29
31
|
Chip: () => Chip,
|
|
@@ -58,6 +60,12 @@ __export(src_exports, {
|
|
|
58
60
|
Surface: () => Surface,
|
|
59
61
|
Switch: () => Switch,
|
|
60
62
|
TabButton: () => TabButton,
|
|
63
|
+
Table: () => Table,
|
|
64
|
+
TableBody: () => TableBody,
|
|
65
|
+
TableCell: () => TableCell,
|
|
66
|
+
TableHead: () => TableHead,
|
|
67
|
+
TableHeaderCell: () => TableHeaderCell,
|
|
68
|
+
TableRow: () => TableRow,
|
|
61
69
|
TerminalIcon: () => TerminalIcon,
|
|
62
70
|
TokensIcon: () => TokensIcon,
|
|
63
71
|
Tooltip: () => Tooltip,
|
|
@@ -68,7 +76,6 @@ __export(src_exports, {
|
|
|
68
76
|
currentPeriod: () => currentPeriod,
|
|
69
77
|
getPeriodBucketKeys: () => getPeriodBucketKeys,
|
|
70
78
|
periodBucketKeyToDate: () => periodBucketKeyToDate,
|
|
71
|
-
themeColors: () => themeColors,
|
|
72
79
|
themes: () => themes,
|
|
73
80
|
useScrollLock: () => useScrollLock
|
|
74
81
|
});
|
|
@@ -243,15 +250,46 @@ function cn2(...inputs) {
|
|
|
243
250
|
return twMerge2((0, import_clsx2.clsx)(...inputs));
|
|
244
251
|
}
|
|
245
252
|
|
|
246
|
-
// src/primitives/
|
|
253
|
+
// src/primitives/Alert.tsx
|
|
247
254
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
255
|
+
var intentClasses = {
|
|
256
|
+
info: "polli:border-theme-border polli:bg-theme-bg-pale polli:text-theme-text-strong",
|
|
257
|
+
success: "polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
|
|
258
|
+
warning: "polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
259
|
+
danger: "polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
260
|
+
};
|
|
261
|
+
var Alert = ({
|
|
262
|
+
intent = "info",
|
|
263
|
+
title,
|
|
264
|
+
className,
|
|
265
|
+
children,
|
|
266
|
+
...rest
|
|
267
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
268
|
+
"div",
|
|
269
|
+
{
|
|
270
|
+
...rest,
|
|
271
|
+
role: intent === "danger" ? "alert" : "status",
|
|
272
|
+
className: cn2(
|
|
273
|
+
"polli:rounded-xl polli:border polli:px-3 polli:py-2 polli:text-sm",
|
|
274
|
+
intentClasses[intent],
|
|
275
|
+
className
|
|
276
|
+
),
|
|
277
|
+
children: [
|
|
278
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "polli:mb-1 polli:text-xs polli:font-bold polli:uppercase polli:tracking-wide", children: title }),
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children })
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
// src/primitives/Button.tsx
|
|
285
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
248
286
|
var sizes = {
|
|
249
287
|
small: "polli:px-2 polli:pt-0.5 polli:pb-1",
|
|
250
288
|
medium: "polli:px-4 polli:pt-1.5 polli:pb-2",
|
|
251
289
|
large: "polli:px-6 polli:py-3"
|
|
252
290
|
};
|
|
253
291
|
var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
|
|
254
|
-
var
|
|
292
|
+
var intentClasses2 = {
|
|
255
293
|
danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-[oklch(0.88_0.075_25)] polli:transition-colors"
|
|
256
294
|
};
|
|
257
295
|
var buttonClasses = ({
|
|
@@ -261,7 +299,7 @@ var buttonClasses = ({
|
|
|
261
299
|
className,
|
|
262
300
|
disabled
|
|
263
301
|
}) => {
|
|
264
|
-
const colorClasses = intent ?
|
|
302
|
+
const colorClasses = intent ? intentClasses2[intent] : themeClasses;
|
|
265
303
|
return cn2(
|
|
266
304
|
"polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:placeholder-green-950 polli:font-medium polli:leading-normal polli:box-border",
|
|
267
305
|
disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
|
|
@@ -281,7 +319,7 @@ function Button({
|
|
|
281
319
|
...buttonProps
|
|
282
320
|
}) {
|
|
283
321
|
const Component = as || "button";
|
|
284
|
-
return /* @__PURE__ */ (0,
|
|
322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
285
323
|
Component,
|
|
286
324
|
{
|
|
287
325
|
"data-theme": intent ? void 0 : theme,
|
|
@@ -299,9 +337,31 @@ function Button({
|
|
|
299
337
|
);
|
|
300
338
|
}
|
|
301
339
|
|
|
340
|
+
// src/primitives/ButtonGroup.tsx
|
|
341
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
342
|
+
var ButtonGroup = ({
|
|
343
|
+
wrap = true,
|
|
344
|
+
className,
|
|
345
|
+
children,
|
|
346
|
+
role = "group",
|
|
347
|
+
...rest
|
|
348
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
349
|
+
"div",
|
|
350
|
+
{
|
|
351
|
+
...rest,
|
|
352
|
+
role,
|
|
353
|
+
className: cn2(
|
|
354
|
+
"polli:flex polli:min-w-0 polli:items-center polli:gap-1.5",
|
|
355
|
+
wrap ? "polli:flex-wrap" : "polli:flex-nowrap",
|
|
356
|
+
className
|
|
357
|
+
),
|
|
358
|
+
children
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
|
|
302
362
|
// src/primitives/ChevronIcon.tsx
|
|
303
|
-
var
|
|
304
|
-
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0,
|
|
363
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
364
|
+
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
305
365
|
"svg",
|
|
306
366
|
{
|
|
307
367
|
"aria-hidden": "true",
|
|
@@ -313,7 +373,7 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
313
373
|
expanded && "polli:rotate-180",
|
|
314
374
|
className
|
|
315
375
|
),
|
|
316
|
-
children: /* @__PURE__ */ (0,
|
|
376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
317
377
|
"path",
|
|
318
378
|
{
|
|
319
379
|
d: "M3 4.5 6 7.5l3-3",
|
|
@@ -328,16 +388,19 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
328
388
|
);
|
|
329
389
|
|
|
330
390
|
// src/primitives/Chip.tsx
|
|
331
|
-
var
|
|
391
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
332
392
|
var chipSizes = {
|
|
333
393
|
sm: "polli:px-2 polli:py-0.5 polli:text-xs",
|
|
334
394
|
md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
|
|
335
395
|
lg: "polli:px-3 polli:py-1 polli:text-sm"
|
|
336
396
|
};
|
|
337
|
-
var
|
|
397
|
+
var intentClasses3 = {
|
|
338
398
|
news: "polli:bg-[oklch(0.935_0.06_158)] polli:text-[oklch(0.46_0.13_158)]",
|
|
339
399
|
alpha: "polli:bg-[oklch(0.93_0.06_300)] polli:text-[oklch(0.42_0.18_300)]",
|
|
340
|
-
neutral: "polli:border polli:border-gray-400/70 polli:bg-gray-100/80 polli:text-gray-900"
|
|
400
|
+
neutral: "polli:border polli:border-gray-400/70 polli:bg-gray-100/80 polli:text-gray-900",
|
|
401
|
+
success: "polli:border polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
|
|
402
|
+
warning: "polli:border polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
403
|
+
danger: "polli:border polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
341
404
|
};
|
|
342
405
|
var Chip = ({
|
|
343
406
|
theme,
|
|
@@ -347,8 +410,8 @@ var Chip = ({
|
|
|
347
410
|
children,
|
|
348
411
|
...rest
|
|
349
412
|
}) => {
|
|
350
|
-
const intentClass = intent ?
|
|
351
|
-
return /* @__PURE__ */ (0,
|
|
413
|
+
const intentClass = intent ? intentClasses3[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
352
415
|
"span",
|
|
353
416
|
{
|
|
354
417
|
...rest,
|
|
@@ -365,7 +428,7 @@ var Chip = ({
|
|
|
365
428
|
};
|
|
366
429
|
|
|
367
430
|
// src/primitives/Collapsible.tsx
|
|
368
|
-
var
|
|
431
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
369
432
|
var Collapsible = ({
|
|
370
433
|
label,
|
|
371
434
|
expanded,
|
|
@@ -377,7 +440,7 @@ var Collapsible = ({
|
|
|
377
440
|
focusClassName,
|
|
378
441
|
panelClassName = "polli:border-t polli:border-theme-border polli:px-3 polli:pt-3 polli:pb-3",
|
|
379
442
|
ariaLabel
|
|
380
|
-
}) => /* @__PURE__ */ (0,
|
|
443
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
381
444
|
"div",
|
|
382
445
|
{
|
|
383
446
|
className: cn2(
|
|
@@ -386,7 +449,7 @@ var Collapsible = ({
|
|
|
386
449
|
disabled && "polli:opacity-50"
|
|
387
450
|
),
|
|
388
451
|
children: [
|
|
389
|
-
/* @__PURE__ */ (0,
|
|
452
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
390
453
|
"button",
|
|
391
454
|
{
|
|
392
455
|
type: "button",
|
|
@@ -402,8 +465,8 @@ var Collapsible = ({
|
|
|
402
465
|
disabled ? "polli:cursor-not-allowed" : "polli:cursor-pointer"
|
|
403
466
|
),
|
|
404
467
|
children: [
|
|
405
|
-
/* @__PURE__ */ (0,
|
|
406
|
-
/* @__PURE__ */ (0,
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "polli:flex-1 polli:min-w-0", children: label }),
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
407
470
|
ChevronIcon,
|
|
408
471
|
{
|
|
409
472
|
expanded,
|
|
@@ -413,7 +476,7 @@ var Collapsible = ({
|
|
|
413
476
|
]
|
|
414
477
|
}
|
|
415
478
|
),
|
|
416
|
-
expanded && /* @__PURE__ */ (0,
|
|
479
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: panelClassName, children })
|
|
417
480
|
]
|
|
418
481
|
}
|
|
419
482
|
);
|
|
@@ -423,7 +486,7 @@ var import_react3 = require("react");
|
|
|
423
486
|
|
|
424
487
|
// src/primitives/Tooltip.tsx
|
|
425
488
|
var import_react2 = require("react");
|
|
426
|
-
var
|
|
489
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
427
490
|
var TOOLTIP_MAX_WIDTH = 288;
|
|
428
491
|
var TOOLTIP_VIEWPORT_MARGIN = 12;
|
|
429
492
|
var Tooltip = ({
|
|
@@ -470,9 +533,9 @@ var Tooltip = ({
|
|
|
470
533
|
);
|
|
471
534
|
const cursorClass = displayContents ? "polli:contents" : "polli:cursor-help";
|
|
472
535
|
const popupClasses = "polli:fixed polli:w-max polli:px-2 polli:py-1 polli:bg-theme-bg-pale polli:text-theme-text-strong polli:border polli:border-theme-border polli:text-xs polli:rounded-md polli:shadow-sm polli:z-50 polli:pointer-events-none polli:transition-opacity polli:whitespace-pre-line polli:break-words";
|
|
473
|
-
const contentNode = /* @__PURE__ */ (0,
|
|
474
|
-
/* @__PURE__ */ (0,
|
|
475
|
-
/* @__PURE__ */ (0,
|
|
536
|
+
const contentNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cursorClass, children }),
|
|
538
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
476
539
|
"span",
|
|
477
540
|
{
|
|
478
541
|
style: {
|
|
@@ -507,7 +570,7 @@ var Tooltip = ({
|
|
|
507
570
|
style
|
|
508
571
|
};
|
|
509
572
|
if (triggerAs === "span") {
|
|
510
|
-
return /* @__PURE__ */ (0,
|
|
573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
511
574
|
"span",
|
|
512
575
|
{
|
|
513
576
|
ref: (node) => {
|
|
@@ -518,7 +581,7 @@ var Tooltip = ({
|
|
|
518
581
|
}
|
|
519
582
|
);
|
|
520
583
|
}
|
|
521
|
-
return /* @__PURE__ */ (0,
|
|
584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
522
585
|
"button",
|
|
523
586
|
{
|
|
524
587
|
ref: (node) => {
|
|
@@ -537,7 +600,7 @@ var Tooltip = ({
|
|
|
537
600
|
};
|
|
538
601
|
|
|
539
602
|
// src/primitives/CopyButton.tsx
|
|
540
|
-
var
|
|
603
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
541
604
|
function CopyButton({
|
|
542
605
|
value,
|
|
543
606
|
children,
|
|
@@ -574,7 +637,7 @@ function CopyButton({
|
|
|
574
637
|
onCopyError?.(error);
|
|
575
638
|
}
|
|
576
639
|
}
|
|
577
|
-
const button = /* @__PURE__ */ (0,
|
|
640
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
578
641
|
"button",
|
|
579
642
|
{
|
|
580
643
|
...buttonProps,
|
|
@@ -586,7 +649,7 @@ function CopyButton({
|
|
|
586
649
|
children: typeof children === "function" ? children(copied) : children
|
|
587
650
|
}
|
|
588
651
|
);
|
|
589
|
-
return /* @__PURE__ */ (0,
|
|
652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
590
653
|
Tooltip,
|
|
591
654
|
{
|
|
592
655
|
triggerAs: "span",
|
|
@@ -600,7 +663,7 @@ function CopyButton({
|
|
|
600
663
|
// src/primitives/Dialog.tsx
|
|
601
664
|
var import_dialog = require("@ark-ui/react/dialog");
|
|
602
665
|
var import_portal = require("@ark-ui/react/portal");
|
|
603
|
-
var
|
|
666
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
604
667
|
var sizeClasses = {
|
|
605
668
|
sm: "polli:max-w-md",
|
|
606
669
|
md: "polli:max-w-xl",
|
|
@@ -623,13 +686,13 @@ var Dialog = ({
|
|
|
623
686
|
positionerClassName,
|
|
624
687
|
contentClassName,
|
|
625
688
|
children
|
|
626
|
-
}) => /* @__PURE__ */ (0,
|
|
689
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
627
690
|
import_dialog.Dialog.Root,
|
|
628
691
|
{
|
|
629
692
|
open,
|
|
630
693
|
onOpenChange: (details) => onOpenChange?.(details.open),
|
|
631
694
|
children: [
|
|
632
|
-
trigger && /* @__PURE__ */ (0,
|
|
695
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
633
696
|
import_dialog.Dialog.Trigger,
|
|
634
697
|
{
|
|
635
698
|
asChild: triggerAsChild,
|
|
@@ -637,8 +700,8 @@ var Dialog = ({
|
|
|
637
700
|
children: trigger
|
|
638
701
|
}
|
|
639
702
|
),
|
|
640
|
-
/* @__PURE__ */ (0,
|
|
641
|
-
showBackdrop && /* @__PURE__ */ (0,
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_portal.Portal, { children: [
|
|
704
|
+
showBackdrop && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
642
705
|
import_dialog.Dialog.Backdrop,
|
|
643
706
|
{
|
|
644
707
|
className: cn2(
|
|
@@ -647,14 +710,14 @@ var Dialog = ({
|
|
|
647
710
|
)
|
|
648
711
|
}
|
|
649
712
|
),
|
|
650
|
-
/* @__PURE__ */ (0,
|
|
713
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
651
714
|
import_dialog.Dialog.Positioner,
|
|
652
715
|
{
|
|
653
716
|
className: cn2(
|
|
654
717
|
"polli:fixed polli:inset-0 polli:z-[110] polli:flex polli:h-dvh polli:items-start polli:justify-center polli:overflow-hidden polli:p-4",
|
|
655
718
|
positionerClassName
|
|
656
719
|
),
|
|
657
|
-
children: /* @__PURE__ */ (0,
|
|
720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
658
721
|
import_dialog.Dialog.Content,
|
|
659
722
|
{
|
|
660
723
|
"data-theme": theme,
|
|
@@ -666,7 +729,7 @@ var Dialog = ({
|
|
|
666
729
|
contentClassName
|
|
667
730
|
),
|
|
668
731
|
children: [
|
|
669
|
-
title && /* @__PURE__ */ (0,
|
|
732
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
670
733
|
DialogTitle,
|
|
671
734
|
{
|
|
672
735
|
className: cn2(
|
|
@@ -692,7 +755,7 @@ var DialogTitle = import_dialog.Dialog.Title;
|
|
|
692
755
|
var import_popover = require("@ark-ui/react/popover");
|
|
693
756
|
var import_portal2 = require("@ark-ui/react/portal");
|
|
694
757
|
var import_react4 = require("react");
|
|
695
|
-
var
|
|
758
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
696
759
|
var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-surface-white polli:shadow-lg";
|
|
697
760
|
var Dropdown = ({
|
|
698
761
|
theme,
|
|
@@ -711,7 +774,7 @@ var Dropdown = ({
|
|
|
711
774
|
if (!isControlled) setInternalOpen(next);
|
|
712
775
|
onOpenChange?.(next);
|
|
713
776
|
};
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
715
778
|
import_popover.Popover.Root,
|
|
716
779
|
{
|
|
717
780
|
open,
|
|
@@ -720,8 +783,8 @@ var Dropdown = ({
|
|
|
720
783
|
placement: align === "end" ? "bottom-end" : "bottom-start"
|
|
721
784
|
},
|
|
722
785
|
children: [
|
|
723
|
-
/* @__PURE__ */ (0,
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
786
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
|
|
787
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_portal2.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
725
788
|
import_popover.Popover.Content,
|
|
726
789
|
{
|
|
727
790
|
"data-theme": theme,
|
|
@@ -739,7 +802,7 @@ var Dropdown = ({
|
|
|
739
802
|
};
|
|
740
803
|
|
|
741
804
|
// src/primitives/icons/index.tsx
|
|
742
|
-
var
|
|
805
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
743
806
|
var strokeProps = {
|
|
744
807
|
fill: "none",
|
|
745
808
|
stroke: "currentColor",
|
|
@@ -748,26 +811,26 @@ var strokeProps = {
|
|
|
748
811
|
strokeLinejoin: "round"
|
|
749
812
|
};
|
|
750
813
|
function AppIcon(props) {
|
|
751
|
-
return /* @__PURE__ */ (0,
|
|
752
|
-
/* @__PURE__ */ (0,
|
|
753
|
-
/* @__PURE__ */ (0,
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
815
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "2", y: "4", width: "20", height: "14", rx: "2" }),
|
|
816
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M2 20h20" })
|
|
754
817
|
] });
|
|
755
818
|
}
|
|
756
819
|
function BeakerIcon(props) {
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
821
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M9 3h6" }),
|
|
822
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M10 3v6.5L4.5 18a2 2 0 0 0 1.7 3h11.6a2 2 0 0 0 1.7-3L14 9.5V3" }),
|
|
823
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 14h10" })
|
|
761
824
|
] });
|
|
762
825
|
}
|
|
763
826
|
function BookIcon(props) {
|
|
764
|
-
return /* @__PURE__ */ (0,
|
|
765
|
-
/* @__PURE__ */ (0,
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
828
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z" }),
|
|
829
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z" })
|
|
767
830
|
] });
|
|
768
831
|
}
|
|
769
832
|
function CheckIcon(props) {
|
|
770
|
-
return /* @__PURE__ */ (0,
|
|
833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
771
834
|
"svg",
|
|
772
835
|
{
|
|
773
836
|
"aria-hidden": "true",
|
|
@@ -775,24 +838,24 @@ function CheckIcon(props) {
|
|
|
775
838
|
...strokeProps,
|
|
776
839
|
strokeWidth: 2.5,
|
|
777
840
|
...props,
|
|
778
|
-
children: /* @__PURE__ */ (0,
|
|
841
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
779
842
|
}
|
|
780
843
|
);
|
|
781
844
|
}
|
|
782
845
|
function ClipboardIcon(props) {
|
|
783
|
-
return /* @__PURE__ */ (0,
|
|
784
|
-
/* @__PURE__ */ (0,
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
847
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
786
849
|
] });
|
|
787
850
|
}
|
|
788
851
|
function ClockIcon(props) {
|
|
789
|
-
return /* @__PURE__ */ (0,
|
|
790
|
-
/* @__PURE__ */ (0,
|
|
791
|
-
/* @__PURE__ */ (0,
|
|
852
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M12 7v5l3 2" })
|
|
792
855
|
] });
|
|
793
856
|
}
|
|
794
857
|
function DiscordIcon(props) {
|
|
795
|
-
return /* @__PURE__ */ (0,
|
|
858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
796
859
|
"path",
|
|
797
860
|
{
|
|
798
861
|
fill: "currentColor",
|
|
@@ -801,23 +864,23 @@ function DiscordIcon(props) {
|
|
|
801
864
|
) });
|
|
802
865
|
}
|
|
803
866
|
function DownloadIcon(props) {
|
|
804
|
-
return /* @__PURE__ */ (0,
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
869
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "7 10 12 15 17 10" }),
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
808
871
|
] });
|
|
809
872
|
}
|
|
810
873
|
function ExternalLinkIcon(props) {
|
|
811
|
-
return /* @__PURE__ */ (0,
|
|
874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
|
|
812
875
|
}
|
|
813
876
|
function GenApiIcon(props) {
|
|
814
|
-
return /* @__PURE__ */ (0,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m8 3 4 1.5L16 3v18l-4-1.5L8 21z" }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M8 3v18M16 3v18" })
|
|
817
880
|
] });
|
|
818
881
|
}
|
|
819
882
|
function GitHubIcon(props) {
|
|
820
|
-
return /* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
821
884
|
"path",
|
|
822
885
|
{
|
|
823
886
|
fill: "currentColor",
|
|
@@ -826,69 +889,69 @@ function GitHubIcon(props) {
|
|
|
826
889
|
) });
|
|
827
890
|
}
|
|
828
891
|
function ImageIcon(props) {
|
|
829
|
-
return /* @__PURE__ */ (0,
|
|
830
|
-
/* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
893
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
894
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m21 15-5-5L5 21" })
|
|
833
896
|
] });
|
|
834
897
|
}
|
|
835
898
|
function LockIcon(props) {
|
|
836
|
-
return /* @__PURE__ */ (0,
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
838
|
-
/* @__PURE__ */ (0,
|
|
899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
|
|
901
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
839
902
|
] });
|
|
840
903
|
}
|
|
841
904
|
function MailIcon(props) {
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
844
|
-
/* @__PURE__ */ (0,
|
|
905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "m3 7 9 7 9-7" })
|
|
845
908
|
] });
|
|
846
909
|
}
|
|
847
910
|
function McpIcon(props) {
|
|
848
|
-
return /* @__PURE__ */ (0,
|
|
849
|
-
/* @__PURE__ */ (0,
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "2", y: "7", width: "8", height: "10", rx: "1.5" }),
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { x: "14", y: "7", width: "8", height: "10", rx: "1.5" }),
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M10 12h4" })
|
|
852
915
|
] });
|
|
853
916
|
}
|
|
854
917
|
function MenuIcon(props) {
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 7h16M4 12h16M4 17h16" }) });
|
|
856
919
|
}
|
|
857
920
|
function TerminalIcon(props) {
|
|
858
|
-
return /* @__PURE__ */ (0,
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "4 8 8 12 4 16" }),
|
|
923
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("line", { x1: "12", y1: "20", x2: "20", y2: "20" })
|
|
861
924
|
] });
|
|
862
925
|
}
|
|
863
926
|
function TokensIcon(props) {
|
|
864
|
-
return /* @__PURE__ */ (0,
|
|
927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M4 9h16M4 15h16M10 3 8 21M16 3l-2 18" }) });
|
|
865
928
|
}
|
|
866
929
|
function TrendUpIcon(props) {
|
|
867
|
-
return /* @__PURE__ */ (0,
|
|
868
|
-
/* @__PURE__ */ (0,
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
931
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "3 17 9 11 13 15 21 7" }),
|
|
932
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("polyline", { points: "15 7 21 7 21 13" })
|
|
870
933
|
] });
|
|
871
934
|
}
|
|
872
935
|
function WalletIcon(props) {
|
|
873
|
-
return /* @__PURE__ */ (0,
|
|
874
|
-
/* @__PURE__ */ (0,
|
|
875
|
-
/* @__PURE__ */ (0,
|
|
876
|
-
/* @__PURE__ */ (0,
|
|
936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
937
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M3 11a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" }),
|
|
939
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
|
|
877
940
|
] });
|
|
878
941
|
}
|
|
879
942
|
function XIcon(props) {
|
|
880
|
-
return /* @__PURE__ */ (0,
|
|
943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M18 6 6 18M6 6l12 12" }) });
|
|
881
944
|
}
|
|
882
945
|
|
|
883
946
|
// src/primitives/ExternalLinkButton.tsx
|
|
884
|
-
var
|
|
947
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
885
948
|
var ExternalLinkButton = ({
|
|
886
949
|
theme,
|
|
887
950
|
href,
|
|
888
951
|
size = "medium",
|
|
889
952
|
className,
|
|
890
953
|
children
|
|
891
|
-
}) => /* @__PURE__ */ (0,
|
|
954
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
892
955
|
Button,
|
|
893
956
|
{
|
|
894
957
|
as: "a",
|
|
@@ -899,8 +962,8 @@ var ExternalLinkButton = ({
|
|
|
899
962
|
size,
|
|
900
963
|
className: cn2("polli:gap-2", className),
|
|
901
964
|
children: [
|
|
902
|
-
/* @__PURE__ */ (0,
|
|
903
|
-
/* @__PURE__ */ (0,
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children }),
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
904
967
|
ExternalLinkIcon,
|
|
905
968
|
{
|
|
906
969
|
className: "polli:h-4 polli:w-4 polli:shrink-0 polli:opacity-60",
|
|
@@ -915,8 +978,8 @@ var ExternalLinkButton = ({
|
|
|
915
978
|
var import_field = require("@ark-ui/react/field");
|
|
916
979
|
|
|
917
980
|
// src/primitives/IconButton.tsx
|
|
918
|
-
var
|
|
919
|
-
var
|
|
981
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
982
|
+
var intentClasses4 = {
|
|
920
983
|
danger: "polli:bg-intent-danger-bg-light polli:hover:bg-[oklch(0.88_0.075_25)] polli:text-intent-danger-text"
|
|
921
984
|
};
|
|
922
985
|
var defaultClasses = "polli:bg-theme-bg-active polli:hover:bg-theme-bg-hover polli:text-theme-text-soft polli:hover:text-theme-text-strong";
|
|
@@ -926,7 +989,7 @@ var IconButton = ({
|
|
|
926
989
|
onClick,
|
|
927
990
|
children,
|
|
928
991
|
className
|
|
929
|
-
}) => /* @__PURE__ */ (0,
|
|
992
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
930
993
|
"button",
|
|
931
994
|
{
|
|
932
995
|
type: "button",
|
|
@@ -935,7 +998,7 @@ var IconButton = ({
|
|
|
935
998
|
"aria-label": title,
|
|
936
999
|
className: cn2(
|
|
937
1000
|
"polli:inline-flex polli:h-6 polli:w-6 polli:cursor-pointer polli:items-center polli:justify-center polli:rounded polli:transition-colors",
|
|
938
|
-
intent ?
|
|
1001
|
+
intent ? intentClasses4[intent] : defaultClasses,
|
|
939
1002
|
className
|
|
940
1003
|
),
|
|
941
1004
|
children
|
|
@@ -943,18 +1006,18 @@ var IconButton = ({
|
|
|
943
1006
|
);
|
|
944
1007
|
|
|
945
1008
|
// src/primitives/InfoTip.tsx
|
|
946
|
-
var
|
|
1009
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
947
1010
|
var InfoTip = ({
|
|
948
1011
|
text,
|
|
949
1012
|
content,
|
|
950
1013
|
label = "More info"
|
|
951
|
-
}) => /* @__PURE__ */ (0,
|
|
1014
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Tooltip, { content: content ?? text, ariaLabel: label, className: "polli:ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "polli:inline-flex polli:h-3.5 polli:w-3.5 polli:items-center polli:justify-center polli:rounded-full polli:border polli:border-theme-border polli:bg-theme-bg-active polli:font-bold polli:text-micro polli:text-theme-text-strong polli:transition-colors", children: "i" }) });
|
|
952
1015
|
|
|
953
1016
|
// src/primitives/Input.tsx
|
|
954
1017
|
var import_react5 = require("react");
|
|
955
|
-
var
|
|
1018
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
956
1019
|
var Input = (0, import_react5.forwardRef)(
|
|
957
|
-
({ className, error, hideNumberSteppers, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1020
|
+
({ className, error, hideNumberSteppers, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
958
1021
|
"input",
|
|
959
1022
|
{
|
|
960
1023
|
ref,
|
|
@@ -972,18 +1035,17 @@ var Input = (0, import_react5.forwardRef)(
|
|
|
972
1035
|
|
|
973
1036
|
// src/primitives/ScrollArea.tsx
|
|
974
1037
|
var import_react6 = require("react");
|
|
975
|
-
var
|
|
1038
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
976
1039
|
var axisClasses = {
|
|
977
1040
|
y: "polli:overflow-y-auto polli:overflow-x-hidden",
|
|
978
|
-
x: "polli:overflow-x-auto polli:overflow-y-hidden"
|
|
979
|
-
both: "polli:overflow-auto"
|
|
1041
|
+
x: "polli:overflow-x-auto polli:overflow-y-hidden"
|
|
980
1042
|
};
|
|
981
1043
|
function assignRef(ref, value) {
|
|
982
1044
|
if (typeof ref === "function") ref(value);
|
|
983
1045
|
else if (ref) ref.current = value;
|
|
984
1046
|
}
|
|
985
1047
|
var ScrollArea = (0, import_react6.forwardRef)(
|
|
986
|
-
({ theme, axis = "y",
|
|
1048
|
+
({ theme, axis = "y", className, children, ...rest }, externalRef) => {
|
|
987
1049
|
const innerRef = (0, import_react6.useRef)(null);
|
|
988
1050
|
const setRef = (0, import_react6.useCallback)(
|
|
989
1051
|
(node) => {
|
|
@@ -1012,7 +1074,7 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1012
1074
|
};
|
|
1013
1075
|
const scheduleHide = () => {
|
|
1014
1076
|
clearHideTimer();
|
|
1015
|
-
hideTimer = window.setTimeout(hide,
|
|
1077
|
+
hideTimer = window.setTimeout(hide, 2e3);
|
|
1016
1078
|
};
|
|
1017
1079
|
const handleInteraction = () => {
|
|
1018
1080
|
show();
|
|
@@ -1042,15 +1104,15 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1042
1104
|
element.removeEventListener("focusin", handleInteraction);
|
|
1043
1105
|
element.removeEventListener("focusout", scheduleHide);
|
|
1044
1106
|
};
|
|
1045
|
-
}, [
|
|
1046
|
-
return /* @__PURE__ */ (0,
|
|
1107
|
+
}, []);
|
|
1108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1047
1109
|
"div",
|
|
1048
1110
|
{
|
|
1049
1111
|
...rest,
|
|
1050
1112
|
ref: setRef,
|
|
1051
1113
|
"data-theme": theme,
|
|
1052
1114
|
className: cn2(
|
|
1053
|
-
"polli-scrollbar-subtle",
|
|
1115
|
+
"polli-scrollbar-subtle polli:min-w-0 polli:max-w-full",
|
|
1054
1116
|
axisClasses[axis],
|
|
1055
1117
|
className
|
|
1056
1118
|
),
|
|
@@ -1062,7 +1124,7 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1062
1124
|
ScrollArea.displayName = "ScrollArea";
|
|
1063
1125
|
|
|
1064
1126
|
// src/primitives/MultiSelect.tsx
|
|
1065
|
-
var
|
|
1127
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1066
1128
|
var TRIGGER_BASE = "polli:inline-flex polli:min-h-8 polli:min-w-[140px] polli:items-center polli:gap-2 polli:rounded-full polli:border polli:px-3 polli:py-1.5 polli:text-xs polli:font-medium polli:transition-all polli:duration-200";
|
|
1067
1129
|
var ROW_BASE = "polli:flex polli:w-full polli:items-center polli:gap-3 polli:px-3 polli:py-2 polli:text-left polli:text-xs polli:transition-colors";
|
|
1068
1130
|
var CHECK_BASE = "polli:flex polli:h-4 polli:w-4 polli:flex-shrink-0 polli:items-center polli:justify-center polli:rounded polli:border polli:border-theme-border polli:text-xs";
|
|
@@ -1087,16 +1149,16 @@ var MultiSelect = ({
|
|
|
1087
1149
|
};
|
|
1088
1150
|
const selectAll = () => onChange([]);
|
|
1089
1151
|
const displayText = disabled ? disabledText : isAllSelected ? "All" : `${selected.length} selected`;
|
|
1090
|
-
const labelNode = label ? /* @__PURE__ */ (0,
|
|
1152
|
+
const labelNode = label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "polli:text-xs polli:font-medium polli:text-theme-text-soft", children: label }) : null;
|
|
1091
1153
|
if (disabled) {
|
|
1092
|
-
return /* @__PURE__ */ (0,
|
|
1154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1093
1155
|
"div",
|
|
1094
1156
|
{
|
|
1095
1157
|
"data-theme": theme,
|
|
1096
1158
|
className: "polli:group polli:relative polli:flex polli:items-center polli:gap-2",
|
|
1097
1159
|
children: [
|
|
1098
1160
|
labelNode,
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1100
1162
|
"button",
|
|
1101
1163
|
{
|
|
1102
1164
|
type: "button",
|
|
@@ -1106,8 +1168,8 @@ var MultiSelect = ({
|
|
|
1106
1168
|
"polli:cursor-not-allowed polli:border-theme-border polli:bg-theme-bg-subtle polli:opacity-60"
|
|
1107
1169
|
),
|
|
1108
1170
|
children: [
|
|
1109
|
-
/* @__PURE__ */ (0,
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "polli:flex-1 polli:truncate polli:text-left polli:text-theme-text-soft/60", children: displayText }),
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1111
1173
|
ChevronIcon,
|
|
1112
1174
|
{
|
|
1113
1175
|
expanded: false,
|
|
@@ -1117,25 +1179,25 @@ var MultiSelect = ({
|
|
|
1117
1179
|
]
|
|
1118
1180
|
}
|
|
1119
1181
|
),
|
|
1120
|
-
/* @__PURE__ */ (0,
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "polli:pointer-events-none polli:absolute polli:-top-8 polli:left-1/2 polli:z-[100] polli:-translate-x-1/2 polli:whitespace-nowrap polli:rounded-md polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:px-2 polli:py-1 polli:text-xs polli:text-theme-text-strong polli:opacity-0 polli:shadow-sm polli:transition-opacity polli:group-hover:opacity-100", children: "No items available" })
|
|
1121
1183
|
]
|
|
1122
1184
|
}
|
|
1123
1185
|
);
|
|
1124
1186
|
}
|
|
1125
|
-
return /* @__PURE__ */ (0,
|
|
1187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1126
1188
|
"div",
|
|
1127
1189
|
{
|
|
1128
1190
|
"data-theme": theme,
|
|
1129
1191
|
className: "polli:flex polli:items-center polli:gap-2",
|
|
1130
1192
|
children: [
|
|
1131
1193
|
labelNode,
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1194
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1133
1195
|
Dropdown,
|
|
1134
1196
|
{
|
|
1135
1197
|
theme,
|
|
1136
1198
|
align,
|
|
1137
1199
|
className: "polli:min-w-[320px]",
|
|
1138
|
-
trigger: (open) => /* @__PURE__ */ (0,
|
|
1200
|
+
trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1139
1201
|
"button",
|
|
1140
1202
|
{
|
|
1141
1203
|
type: "button",
|
|
@@ -1144,7 +1206,7 @@ var MultiSelect = ({
|
|
|
1144
1206
|
open ? "polli:border-theme-border polli:bg-theme-bg-active" : "polli:border-theme-border polli:bg-theme-bg-subtle polli:hover:bg-theme-bg-pale"
|
|
1145
1207
|
),
|
|
1146
1208
|
children: [
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1148
1210
|
"span",
|
|
1149
1211
|
{
|
|
1150
1212
|
className: cn2(
|
|
@@ -1154,7 +1216,7 @@ var MultiSelect = ({
|
|
|
1154
1216
|
children: displayText
|
|
1155
1217
|
}
|
|
1156
1218
|
),
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1219
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1158
1220
|
ChevronIcon,
|
|
1159
1221
|
{
|
|
1160
1222
|
expanded: open,
|
|
@@ -1167,8 +1229,8 @@ var MultiSelect = ({
|
|
|
1167
1229
|
]
|
|
1168
1230
|
}
|
|
1169
1231
|
),
|
|
1170
|
-
children: /* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(ScrollArea, { theme, className: "polli:max-h-64", children: [
|
|
1233
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1172
1234
|
"button",
|
|
1173
1235
|
{
|
|
1174
1236
|
type: "button",
|
|
@@ -1178,7 +1240,7 @@ var MultiSelect = ({
|
|
|
1178
1240
|
isAllSelected ? "polli:bg-theme-bg-active polli:font-medium polli:text-theme-text-strong" : "polli:text-theme-text-base polli:hover:bg-theme-bg-subtle"
|
|
1179
1241
|
),
|
|
1180
1242
|
children: [
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1243
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1182
1244
|
"span",
|
|
1183
1245
|
{
|
|
1184
1246
|
className: cn2(
|
|
@@ -1194,7 +1256,7 @@ var MultiSelect = ({
|
|
|
1194
1256
|
),
|
|
1195
1257
|
options.map((opt) => {
|
|
1196
1258
|
const isChecked = selected.includes(opt.value);
|
|
1197
|
-
return /* @__PURE__ */ (0,
|
|
1259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1198
1260
|
"button",
|
|
1199
1261
|
{
|
|
1200
1262
|
type: "button",
|
|
@@ -1204,7 +1266,7 @@ var MultiSelect = ({
|
|
|
1204
1266
|
isChecked ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-theme-text-base polli:hover:bg-theme-bg-subtle"
|
|
1205
1267
|
),
|
|
1206
1268
|
children: [
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1208
1270
|
"span",
|
|
1209
1271
|
{
|
|
1210
1272
|
className: cn2(
|
|
@@ -1214,7 +1276,7 @@ var MultiSelect = ({
|
|
|
1214
1276
|
children: isChecked && "\u2713"
|
|
1215
1277
|
}
|
|
1216
1278
|
),
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1279
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "polli:whitespace-nowrap", children: opt.label })
|
|
1218
1280
|
]
|
|
1219
1281
|
},
|
|
1220
1282
|
opt.value
|
|
@@ -1232,7 +1294,7 @@ var MultiSelect = ({
|
|
|
1232
1294
|
var import_react7 = require("react");
|
|
1233
1295
|
|
|
1234
1296
|
// src/primitives/TabButton.tsx
|
|
1235
|
-
var
|
|
1297
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1236
1298
|
var sizeClasses2 = {
|
|
1237
1299
|
medium: "polli:px-4 polli:py-1.5 polli:text-base",
|
|
1238
1300
|
small: "polli:px-3 polli:py-1.5 polli:text-sm"
|
|
@@ -1247,7 +1309,7 @@ var TabButton = ({
|
|
|
1247
1309
|
disabled = false,
|
|
1248
1310
|
className
|
|
1249
1311
|
}) => {
|
|
1250
|
-
return /* @__PURE__ */ (0,
|
|
1312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1251
1313
|
"button",
|
|
1252
1314
|
{
|
|
1253
1315
|
type: "button",
|
|
@@ -1269,7 +1331,7 @@ var TabButton = ({
|
|
|
1269
1331
|
};
|
|
1270
1332
|
|
|
1271
1333
|
// src/primitives/PeriodPicker.tsx
|
|
1272
|
-
var
|
|
1334
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1273
1335
|
var WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
1274
1336
|
var MONTH_LABELS = [
|
|
1275
1337
|
"Jan",
|
|
@@ -1349,14 +1411,14 @@ var PeriodPicker = ({
|
|
|
1349
1411
|
month: "long",
|
|
1350
1412
|
year: "numeric"
|
|
1351
1413
|
});
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1353
1415
|
"div",
|
|
1354
1416
|
{
|
|
1355
1417
|
"data-theme": theme,
|
|
1356
1418
|
className: "polli:flex polli:flex-wrap polli:items-center polli:gap-2",
|
|
1357
1419
|
children: [
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
(granularity2) => /* @__PURE__ */ (0,
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:flex polli:flex-wrap polli:gap-1.5", children: ["day", "week", "month"].map(
|
|
1421
|
+
(granularity2) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1360
1422
|
TabButton,
|
|
1361
1423
|
{
|
|
1362
1424
|
active: value.granularity === granularity2,
|
|
@@ -1366,14 +1428,14 @@ var PeriodPicker = ({
|
|
|
1366
1428
|
granularity2
|
|
1367
1429
|
)
|
|
1368
1430
|
) }),
|
|
1369
|
-
/* @__PURE__ */ (0,
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1370
1432
|
Dropdown,
|
|
1371
1433
|
{
|
|
1372
1434
|
theme,
|
|
1373
1435
|
open,
|
|
1374
1436
|
onOpenChange: setOpen,
|
|
1375
1437
|
className: "polli:w-[304px] polli:rounded-xl polli:p-3",
|
|
1376
|
-
trigger: (isOpen) => /* @__PURE__ */ (0,
|
|
1438
|
+
trigger: (isOpen) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1377
1439
|
"button",
|
|
1378
1440
|
{
|
|
1379
1441
|
type: "button",
|
|
@@ -1385,14 +1447,14 @@ var PeriodPicker = ({
|
|
|
1385
1447
|
isOpen && "polli:bg-theme-bg-active polli:text-theme-text-strong polli:shadow-sm"
|
|
1386
1448
|
),
|
|
1387
1449
|
children: [
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1450
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: formatPeriodLabel(value) }),
|
|
1451
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ChevronIcon, { expanded: isOpen })
|
|
1390
1452
|
]
|
|
1391
1453
|
}
|
|
1392
1454
|
),
|
|
1393
1455
|
children: [
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1456
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "polli:mb-3 polli:flex polli:items-center polli:justify-between", children: [
|
|
1457
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1396
1458
|
"button",
|
|
1397
1459
|
{
|
|
1398
1460
|
type: "button",
|
|
@@ -1406,8 +1468,8 @@ var PeriodPicker = ({
|
|
|
1406
1468
|
children: "<"
|
|
1407
1469
|
}
|
|
1408
1470
|
),
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1410
|
-
/* @__PURE__ */ (0,
|
|
1471
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:text-sm polli:font-bold polli:text-theme-text-base", children: viewLabel }),
|
|
1472
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1411
1473
|
"button",
|
|
1412
1474
|
{
|
|
1413
1475
|
type: "button",
|
|
@@ -1422,7 +1484,7 @@ var PeriodPicker = ({
|
|
|
1422
1484
|
}
|
|
1423
1485
|
)
|
|
1424
1486
|
] }),
|
|
1425
|
-
value.granularity === "month" ? /* @__PURE__ */ (0,
|
|
1487
|
+
value.granularity === "month" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:grid polli:grid-cols-3 polli:gap-1.5", children: MONTH_LABELS.map((label, monthIndex) => {
|
|
1426
1488
|
const date = new Date(
|
|
1427
1489
|
Date.UTC(
|
|
1428
1490
|
viewDate.getUTCFullYear(),
|
|
@@ -1441,7 +1503,7 @@ var PeriodPicker = ({
|
|
|
1441
1503
|
year: "numeric"
|
|
1442
1504
|
});
|
|
1443
1505
|
const selected = date.getUTCFullYear() === selectedWindow.start.getUTCFullYear() && date.getUTCMonth() === selectedWindow.start.getUTCMonth();
|
|
1444
|
-
return /* @__PURE__ */ (0,
|
|
1506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1445
1507
|
"button",
|
|
1446
1508
|
{
|
|
1447
1509
|
type: "button",
|
|
@@ -1457,9 +1519,9 @@ var PeriodPicker = ({
|
|
|
1457
1519
|
},
|
|
1458
1520
|
label
|
|
1459
1521
|
);
|
|
1460
|
-
}) }) : /* @__PURE__ */ (0,
|
|
1461
|
-
/* @__PURE__ */ (0,
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1522
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
1523
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:mb-1 polli:grid polli:grid-cols-7 polli:gap-1 polli:text-center polli:text-micro polli:font-bold polli:uppercase polli:text-gray-400", children: WEEKDAY_LABELS.map((label) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: label }, label)) }),
|
|
1524
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "polli:grid polli:grid-cols-7 polli:gap-1", children: dates.map((date) => {
|
|
1463
1525
|
const inCurrentMonth = date.getUTCMonth() === viewDate.getUTCMonth();
|
|
1464
1526
|
const selectable = isPeriodSelectable(
|
|
1465
1527
|
periodFromDate(value.granularity, date),
|
|
@@ -1477,7 +1539,7 @@ var PeriodPicker = ({
|
|
|
1477
1539
|
}
|
|
1478
1540
|
)}`;
|
|
1479
1541
|
const selected = value.granularity === "day" ? sameUtcDay(date, selectedWindow.start) : date >= selectedWindow.start && date < selectedWindow.end;
|
|
1480
|
-
return /* @__PURE__ */ (0,
|
|
1542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1481
1543
|
"button",
|
|
1482
1544
|
{
|
|
1483
1545
|
type: "button",
|
|
@@ -1506,7 +1568,7 @@ var PeriodPicker = ({
|
|
|
1506
1568
|
};
|
|
1507
1569
|
|
|
1508
1570
|
// src/primitives/Surface.tsx
|
|
1509
|
-
var
|
|
1571
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1510
1572
|
var variantClasses = {
|
|
1511
1573
|
panel: "polli:rounded-2xl polli:border polli:border-theme-border polli:bg-theme-bg-subtle polli:p-6",
|
|
1512
1574
|
card: "polli:rounded-xl polli:bg-surface-white polli:p-4",
|
|
@@ -1518,7 +1580,7 @@ var Surface = ({
|
|
|
1518
1580
|
className,
|
|
1519
1581
|
children,
|
|
1520
1582
|
...rest
|
|
1521
|
-
}) => /* @__PURE__ */ (0,
|
|
1583
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1522
1584
|
"div",
|
|
1523
1585
|
{
|
|
1524
1586
|
...rest,
|
|
@@ -1529,7 +1591,7 @@ var Surface = ({
|
|
|
1529
1591
|
);
|
|
1530
1592
|
|
|
1531
1593
|
// src/primitives/Section.tsx
|
|
1532
|
-
var
|
|
1594
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1533
1595
|
var Section = ({
|
|
1534
1596
|
title,
|
|
1535
1597
|
theme,
|
|
@@ -1539,9 +1601,9 @@ var Section = ({
|
|
|
1539
1601
|
actionClassName,
|
|
1540
1602
|
children,
|
|
1541
1603
|
className
|
|
1542
|
-
}) => /* @__PURE__ */ (0,
|
|
1543
|
-
/* @__PURE__ */ (0,
|
|
1544
|
-
/* @__PURE__ */ (0,
|
|
1604
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("section", { id, className: cn2("scroll-mt-10 space-y-2", className), children: [
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-1", children: [
|
|
1606
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1545
1607
|
"h2",
|
|
1546
1608
|
{
|
|
1547
1609
|
"data-theme": theme,
|
|
@@ -1549,14 +1611,14 @@ var Section = ({
|
|
|
1549
1611
|
children: title
|
|
1550
1612
|
}
|
|
1551
1613
|
),
|
|
1552
|
-
action && /* @__PURE__ */ (0,
|
|
1614
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn2("shrink-0", actionClassName), children: action })
|
|
1553
1615
|
] }),
|
|
1554
|
-
framed ? /* @__PURE__ */ (0,
|
|
1616
|
+
framed ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Surface, { variant: "panel", theme, children }) : children
|
|
1555
1617
|
] });
|
|
1556
1618
|
|
|
1557
1619
|
// src/primitives/Slider.tsx
|
|
1558
1620
|
var import_react8 = require("react");
|
|
1559
|
-
var
|
|
1621
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1560
1622
|
var toNumber = (value) => {
|
|
1561
1623
|
if (typeof value === "number") return value;
|
|
1562
1624
|
if (typeof value !== "string" || value.trim() === "") return void 0;
|
|
@@ -1596,7 +1658,7 @@ var Slider = (0, import_react8.forwardRef)(
|
|
|
1596
1658
|
...style,
|
|
1597
1659
|
...progressPercent === void 0 ? null : { "--polli-slider-progress": `${progressPercent}%` }
|
|
1598
1660
|
};
|
|
1599
|
-
return /* @__PURE__ */ (0,
|
|
1661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1600
1662
|
"input",
|
|
1601
1663
|
{
|
|
1602
1664
|
ref,
|
|
@@ -1614,7 +1676,7 @@ var Slider = (0, import_react8.forwardRef)(
|
|
|
1614
1676
|
);
|
|
1615
1677
|
|
|
1616
1678
|
// src/primitives/StatCard.tsx
|
|
1617
|
-
var
|
|
1679
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1618
1680
|
var StatCard = ({
|
|
1619
1681
|
label,
|
|
1620
1682
|
value,
|
|
@@ -1624,8 +1686,8 @@ var StatCard = ({
|
|
|
1624
1686
|
labelClassName,
|
|
1625
1687
|
valueClassName,
|
|
1626
1688
|
detailClassName
|
|
1627
|
-
}) => /* @__PURE__ */ (0,
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
1689
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { "data-theme": theme, className: cn2("polli:text-sm", className), children: [
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1629
1691
|
"div",
|
|
1630
1692
|
{
|
|
1631
1693
|
className: cn2(
|
|
@@ -1635,7 +1697,7 @@ var StatCard = ({
|
|
|
1635
1697
|
children: label
|
|
1636
1698
|
}
|
|
1637
1699
|
),
|
|
1638
|
-
/* @__PURE__ */ (0,
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1639
1701
|
"div",
|
|
1640
1702
|
{
|
|
1641
1703
|
className: cn2(
|
|
@@ -1645,7 +1707,7 @@ var StatCard = ({
|
|
|
1645
1707
|
children: value
|
|
1646
1708
|
}
|
|
1647
1709
|
),
|
|
1648
|
-
detail && /* @__PURE__ */ (0,
|
|
1710
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1649
1711
|
"div",
|
|
1650
1712
|
{
|
|
1651
1713
|
className: cn2(
|
|
@@ -1658,7 +1720,7 @@ var StatCard = ({
|
|
|
1658
1720
|
] });
|
|
1659
1721
|
|
|
1660
1722
|
// src/primitives/Switch.tsx
|
|
1661
|
-
var
|
|
1723
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1662
1724
|
var trackClasses = {
|
|
1663
1725
|
off: "polli:bg-gray-200",
|
|
1664
1726
|
on: "polli:bg-[oklch(0.88_0.12_158)]",
|
|
@@ -1674,7 +1736,7 @@ var Switch = ({
|
|
|
1674
1736
|
}) => {
|
|
1675
1737
|
const effectiveStatus = status ?? (checked ? "on" : "off");
|
|
1676
1738
|
const resolvedAriaLabel = ariaLabel ?? (checked ? "Turn off toggle" : "Turn on toggle");
|
|
1677
|
-
return /* @__PURE__ */ (0,
|
|
1739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1678
1740
|
"button",
|
|
1679
1741
|
{
|
|
1680
1742
|
type: "button",
|
|
@@ -1688,7 +1750,7 @@ var Switch = ({
|
|
|
1688
1750
|
trackClasses[effectiveStatus],
|
|
1689
1751
|
className
|
|
1690
1752
|
),
|
|
1691
|
-
children: /* @__PURE__ */ (0,
|
|
1753
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1692
1754
|
"span",
|
|
1693
1755
|
{
|
|
1694
1756
|
className: cn2(
|
|
@@ -1701,6 +1763,118 @@ var Switch = ({
|
|
|
1701
1763
|
);
|
|
1702
1764
|
};
|
|
1703
1765
|
|
|
1766
|
+
// src/primitives/Table.tsx
|
|
1767
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1768
|
+
var alignClasses = {
|
|
1769
|
+
left: "polli:text-left",
|
|
1770
|
+
center: "polli:text-center",
|
|
1771
|
+
right: "polli:text-right"
|
|
1772
|
+
};
|
|
1773
|
+
var rowIntentClasses = {
|
|
1774
|
+
default: "",
|
|
1775
|
+
success: "polli:bg-intent-success-bg-light/55",
|
|
1776
|
+
warning: "polli:bg-intent-warning-bg-light/65",
|
|
1777
|
+
danger: "polli:bg-intent-danger-bg-light/65"
|
|
1778
|
+
};
|
|
1779
|
+
var Table = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1780
|
+
"table",
|
|
1781
|
+
{
|
|
1782
|
+
...rest,
|
|
1783
|
+
className: cn2(
|
|
1784
|
+
"polli:w-full polli:border-collapse polli:text-sm",
|
|
1785
|
+
className
|
|
1786
|
+
)
|
|
1787
|
+
}
|
|
1788
|
+
);
|
|
1789
|
+
var TableHead = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1790
|
+
"thead",
|
|
1791
|
+
{
|
|
1792
|
+
...rest,
|
|
1793
|
+
className: cn2(
|
|
1794
|
+
"polli:bg-theme-bg-active polli:text-micro polli:text-theme-text-muted",
|
|
1795
|
+
className
|
|
1796
|
+
)
|
|
1797
|
+
}
|
|
1798
|
+
);
|
|
1799
|
+
var TableBody = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1800
|
+
"tbody",
|
|
1801
|
+
{
|
|
1802
|
+
...rest,
|
|
1803
|
+
className: cn2("polli:divide-y polli:divide-theme-border/65", className)
|
|
1804
|
+
}
|
|
1805
|
+
);
|
|
1806
|
+
var TableRow = ({
|
|
1807
|
+
intent = "default",
|
|
1808
|
+
className,
|
|
1809
|
+
...rest
|
|
1810
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1811
|
+
"tr",
|
|
1812
|
+
{
|
|
1813
|
+
...rest,
|
|
1814
|
+
className: cn2(
|
|
1815
|
+
"polli:transition-colors polli:hover:bg-theme-bg-subtle",
|
|
1816
|
+
rowIntentClasses[intent],
|
|
1817
|
+
className
|
|
1818
|
+
)
|
|
1819
|
+
}
|
|
1820
|
+
);
|
|
1821
|
+
var TableHeaderCell = ({
|
|
1822
|
+
align = "left",
|
|
1823
|
+
active = false,
|
|
1824
|
+
sortDirection,
|
|
1825
|
+
onSort,
|
|
1826
|
+
className,
|
|
1827
|
+
children,
|
|
1828
|
+
...rest
|
|
1829
|
+
}) => {
|
|
1830
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1831
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { children }),
|
|
1832
|
+
active && sortDirection && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { "aria-hidden": "true", children: sortDirection === "asc" ? "^" : "v" })
|
|
1833
|
+
] });
|
|
1834
|
+
const classes = cn2(
|
|
1835
|
+
"polli:px-3 polli:py-2 polli:font-bold polli:uppercase polli:tracking-wide",
|
|
1836
|
+
alignClasses[align],
|
|
1837
|
+
active && "polli:text-theme-text-strong",
|
|
1838
|
+
onSort && "polli:cursor-pointer polli:select-none polli:hover:text-theme-text-strong",
|
|
1839
|
+
className
|
|
1840
|
+
);
|
|
1841
|
+
if (!onSort) {
|
|
1842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("th", { ...rest, className: classes, children: content });
|
|
1843
|
+
}
|
|
1844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("th", { ...rest, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1845
|
+
"button",
|
|
1846
|
+
{
|
|
1847
|
+
type: "button",
|
|
1848
|
+
onClick: onSort,
|
|
1849
|
+
className: cn2(
|
|
1850
|
+
"polli:inline-flex polli:w-full polli:items-center polli:gap-1 polli:bg-transparent polli:p-0 polli:font-bold polli:text-inherit",
|
|
1851
|
+
align === "right" && "polli:justify-end",
|
|
1852
|
+
align === "center" && "polli:justify-center"
|
|
1853
|
+
),
|
|
1854
|
+
children: content
|
|
1855
|
+
}
|
|
1856
|
+
) });
|
|
1857
|
+
};
|
|
1858
|
+
var TableCell = ({
|
|
1859
|
+
align = "left",
|
|
1860
|
+
numeric = false,
|
|
1861
|
+
muted = false,
|
|
1862
|
+
className,
|
|
1863
|
+
...rest
|
|
1864
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1865
|
+
"td",
|
|
1866
|
+
{
|
|
1867
|
+
...rest,
|
|
1868
|
+
className: cn2(
|
|
1869
|
+
"polli:px-3 polli:py-2 polli:align-middle",
|
|
1870
|
+
alignClasses[align],
|
|
1871
|
+
numeric && "polli:tabular-nums",
|
|
1872
|
+
muted && "polli:text-theme-text-muted",
|
|
1873
|
+
className
|
|
1874
|
+
)
|
|
1875
|
+
}
|
|
1876
|
+
);
|
|
1877
|
+
|
|
1704
1878
|
// src/theme.ts
|
|
1705
1879
|
var themes = [
|
|
1706
1880
|
"amber",
|
|
@@ -1710,16 +1884,14 @@ var themes = [
|
|
|
1710
1884
|
"violet",
|
|
1711
1885
|
"green"
|
|
1712
1886
|
];
|
|
1713
|
-
var themeColors = {
|
|
1714
|
-
amber: "#FEF3C7",
|
|
1715
|
-
blue: "#DBEAFE"
|
|
1716
|
-
};
|
|
1717
1887
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1718
1888
|
0 && (module.exports = {
|
|
1889
|
+
Alert,
|
|
1719
1890
|
AppIcon,
|
|
1720
1891
|
BeakerIcon,
|
|
1721
1892
|
BookIcon,
|
|
1722
1893
|
Button,
|
|
1894
|
+
ButtonGroup,
|
|
1723
1895
|
CheckIcon,
|
|
1724
1896
|
ChevronIcon,
|
|
1725
1897
|
Chip,
|
|
@@ -1754,6 +1926,12 @@ var themeColors = {
|
|
|
1754
1926
|
Surface,
|
|
1755
1927
|
Switch,
|
|
1756
1928
|
TabButton,
|
|
1929
|
+
Table,
|
|
1930
|
+
TableBody,
|
|
1931
|
+
TableCell,
|
|
1932
|
+
TableHead,
|
|
1933
|
+
TableHeaderCell,
|
|
1934
|
+
TableRow,
|
|
1757
1935
|
TerminalIcon,
|
|
1758
1936
|
TokensIcon,
|
|
1759
1937
|
Tooltip,
|
|
@@ -1764,7 +1942,6 @@ var themeColors = {
|
|
|
1764
1942
|
currentPeriod,
|
|
1765
1943
|
getPeriodBucketKeys,
|
|
1766
1944
|
periodBucketKeyToDate,
|
|
1767
|
-
themeColors,
|
|
1768
1945
|
themes,
|
|
1769
1946
|
useScrollLock
|
|
1770
1947
|
});
|