@pollinations/ui 0.0.1 → 0.1.0-alpha.0
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 +25 -16
- package/dist/{Button-DMJ2K6Gr.d.ts → Button-BvLF_Km2.d.cts} +4 -4
- package/dist/{Button-CNzpisJf.d.cts → Button-DQAZzvyQ.d.ts} +4 -4
- 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 +78 -71
- 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 +78 -71
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.cjs +7 -6
- package/dist/auth/sdk.cjs.map +1 -1
- package/dist/auth/sdk.d.cts +2 -2
- package/dist/auth/sdk.d.ts +2 -2
- package/dist/auth/sdk.js +7 -6
- package/dist/auth/sdk.js.map +1 -1
- package/dist/compositions/app-user.cjs +497 -0
- package/dist/compositions/app-user.cjs.map +1 -0
- package/dist/compositions/app-user.d.cts +18 -0
- package/dist/compositions/app-user.d.ts +18 -0
- package/dist/compositions/app-user.js +469 -0
- package/dist/compositions/app-user.js.map +1 -0
- package/dist/index.cjs +1151 -312
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +146 -13
- package/dist/index.d.ts +146 -13
- package/dist/index.js +1109 -295
- package/dist/index.js.map +1 -1
- package/dist/modality/index.cjs +27 -56
- package/dist/modality/index.cjs.map +1 -1
- package/dist/modality/index.d.cts +13 -32
- package/dist/modality/index.d.ts +13 -32
- package/dist/modality/index.js +27 -55
- package/dist/modality/index.js.map +1 -1
- package/dist/models/index.cjs +508 -0
- package/dist/models/index.cjs.map +1 -0
- package/dist/models/index.d.cts +22 -0
- package/dist/models/index.d.ts +22 -0
- package/dist/models/index.js +486 -0
- package/dist/models/index.js.map +1 -0
- 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 +17 -5
- 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 +17 -5
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/sdk.cjs +6 -3
- package/dist/wallet/sdk.cjs.map +1 -1
- package/dist/wallet/sdk.js +6 -3
- package/dist/wallet/sdk.js.map +1 -1
- package/package.json +17 -10
- 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/wallet.css +0 -73
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,15 +17,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
21
31
|
var src_exports = {};
|
|
22
32
|
__export(src_exports, {
|
|
33
|
+
Alert: () => Alert,
|
|
23
34
|
AppIcon: () => AppIcon,
|
|
24
35
|
BeakerIcon: () => BeakerIcon,
|
|
25
36
|
BookIcon: () => BookIcon,
|
|
26
37
|
Button: () => Button,
|
|
38
|
+
ButtonGroup: () => ButtonGroup,
|
|
27
39
|
CheckIcon: () => CheckIcon,
|
|
28
40
|
ChevronIcon: () => ChevronIcon,
|
|
29
41
|
Chip: () => Chip,
|
|
@@ -36,21 +48,28 @@ __export(src_exports, {
|
|
|
36
48
|
DiscordIcon: () => DiscordIcon,
|
|
37
49
|
DownloadIcon: () => DownloadIcon,
|
|
38
50
|
Dropdown: () => Dropdown,
|
|
51
|
+
DropdownItem: () => DropdownItem,
|
|
39
52
|
ExternalLinkButton: () => ExternalLinkButton,
|
|
40
53
|
ExternalLinkIcon: () => ExternalLinkIcon,
|
|
41
54
|
Field: () => import_field.Field,
|
|
55
|
+
FileUpload: () => FileUpload,
|
|
42
56
|
GenApiIcon: () => GenApiIcon,
|
|
43
57
|
GitHubIcon: () => GitHubIcon,
|
|
44
58
|
IconButton: () => IconButton,
|
|
45
59
|
ImageIcon: () => ImageIcon,
|
|
46
60
|
InfoTip: () => InfoTip,
|
|
61
|
+
InlineLink: () => InlineLink,
|
|
47
62
|
Input: () => Input,
|
|
63
|
+
LinkCard: () => LinkCard,
|
|
48
64
|
LockIcon: () => LockIcon,
|
|
49
65
|
MailIcon: () => MailIcon,
|
|
66
|
+
Markdown: () => Markdown,
|
|
50
67
|
McpIcon: () => McpIcon,
|
|
51
68
|
MenuIcon: () => MenuIcon,
|
|
52
69
|
MultiSelect: () => MultiSelect,
|
|
70
|
+
NavItem: () => NavItem,
|
|
53
71
|
PeriodPicker: () => PeriodPicker,
|
|
72
|
+
Prose: () => Prose,
|
|
54
73
|
ScrollArea: () => ScrollArea,
|
|
55
74
|
Section: () => Section,
|
|
56
75
|
Slider: () => Slider,
|
|
@@ -58,7 +77,14 @@ __export(src_exports, {
|
|
|
58
77
|
Surface: () => Surface,
|
|
59
78
|
Switch: () => Switch,
|
|
60
79
|
TabButton: () => TabButton,
|
|
80
|
+
Table: () => Table,
|
|
81
|
+
TableBody: () => TableBody,
|
|
82
|
+
TableCell: () => TableCell,
|
|
83
|
+
TableHead: () => TableHead,
|
|
84
|
+
TableHeaderCell: () => TableHeaderCell,
|
|
85
|
+
TableRow: () => TableRow,
|
|
61
86
|
TerminalIcon: () => TerminalIcon,
|
|
87
|
+
Textarea: () => Textarea,
|
|
62
88
|
TokensIcon: () => TokensIcon,
|
|
63
89
|
Tooltip: () => Tooltip,
|
|
64
90
|
TrendUpIcon: () => TrendUpIcon,
|
|
@@ -68,7 +94,6 @@ __export(src_exports, {
|
|
|
68
94
|
currentPeriod: () => currentPeriod,
|
|
69
95
|
getPeriodBucketKeys: () => getPeriodBucketKeys,
|
|
70
96
|
periodBucketKeyToDate: () => periodBucketKeyToDate,
|
|
71
|
-
themeColors: () => themeColors,
|
|
72
97
|
themes: () => themes,
|
|
73
98
|
useScrollLock: () => useScrollLock
|
|
74
99
|
});
|
|
@@ -243,16 +268,47 @@ function cn2(...inputs) {
|
|
|
243
268
|
return twMerge2((0, import_clsx2.clsx)(...inputs));
|
|
244
269
|
}
|
|
245
270
|
|
|
246
|
-
// src/primitives/
|
|
271
|
+
// src/primitives/Alert.tsx
|
|
247
272
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
273
|
+
var intentClasses = {
|
|
274
|
+
info: "polli:border-theme-border polli:bg-theme-bg-pale polli:text-theme-text-strong",
|
|
275
|
+
success: "polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
|
|
276
|
+
warning: "polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
277
|
+
danger: "polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
278
|
+
};
|
|
279
|
+
var Alert = ({
|
|
280
|
+
intent = "info",
|
|
281
|
+
title,
|
|
282
|
+
className,
|
|
283
|
+
children,
|
|
284
|
+
...rest
|
|
285
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
286
|
+
"div",
|
|
287
|
+
{
|
|
288
|
+
...rest,
|
|
289
|
+
role: intent === "danger" ? "alert" : "status",
|
|
290
|
+
className: cn2(
|
|
291
|
+
"polli:rounded-xl polli:border polli:px-3 polli:py-2 polli:text-sm",
|
|
292
|
+
intentClasses[intent],
|
|
293
|
+
className
|
|
294
|
+
),
|
|
295
|
+
children: [
|
|
296
|
+
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 }),
|
|
297
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children })
|
|
298
|
+
]
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
// src/primitives/Button.tsx
|
|
303
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
248
304
|
var sizes = {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
305
|
+
sm: "polli:px-2 polli:pt-0.5 polli:pb-1",
|
|
306
|
+
md: "polli:px-4 polli:pt-1.5 polli:pb-2",
|
|
307
|
+
lg: "polli:px-6 polli:py-3"
|
|
252
308
|
};
|
|
253
309
|
var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
|
|
254
|
-
var
|
|
255
|
-
danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-
|
|
310
|
+
var intentClasses2 = {
|
|
311
|
+
danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:transition-colors"
|
|
256
312
|
};
|
|
257
313
|
var buttonClasses = ({
|
|
258
314
|
theme: _theme,
|
|
@@ -261,12 +317,12 @@ var buttonClasses = ({
|
|
|
261
317
|
className,
|
|
262
318
|
disabled
|
|
263
319
|
}) => {
|
|
264
|
-
const colorClasses = intent ?
|
|
320
|
+
const colorClasses = intent ? intentClasses2[intent] : themeClasses;
|
|
265
321
|
return cn2(
|
|
266
|
-
"polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:
|
|
322
|
+
"polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:font-medium polli:leading-normal polli:box-border",
|
|
267
323
|
disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
|
|
268
324
|
colorClasses,
|
|
269
|
-
sizes[size || "
|
|
325
|
+
sizes[size || "md"],
|
|
270
326
|
className
|
|
271
327
|
);
|
|
272
328
|
};
|
|
@@ -281,10 +337,11 @@ function Button({
|
|
|
281
337
|
...buttonProps
|
|
282
338
|
}) {
|
|
283
339
|
const Component = as || "button";
|
|
284
|
-
return /* @__PURE__ */ (0,
|
|
340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
285
341
|
Component,
|
|
286
342
|
{
|
|
287
343
|
"data-theme": intent ? void 0 : theme,
|
|
344
|
+
"data-intent": intent,
|
|
288
345
|
className: buttonClasses({
|
|
289
346
|
theme,
|
|
290
347
|
intent,
|
|
@@ -299,9 +356,31 @@ function Button({
|
|
|
299
356
|
);
|
|
300
357
|
}
|
|
301
358
|
|
|
359
|
+
// src/primitives/ButtonGroup.tsx
|
|
360
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
361
|
+
var ButtonGroup = ({
|
|
362
|
+
wrap = true,
|
|
363
|
+
className,
|
|
364
|
+
children,
|
|
365
|
+
role = "group",
|
|
366
|
+
...rest
|
|
367
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
...rest,
|
|
371
|
+
role,
|
|
372
|
+
className: cn2(
|
|
373
|
+
"polli:flex polli:min-w-0 polli:items-center polli:gap-1.5",
|
|
374
|
+
wrap ? "polli:flex-wrap" : "polli:flex-nowrap",
|
|
375
|
+
className
|
|
376
|
+
),
|
|
377
|
+
children
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
|
|
302
381
|
// src/primitives/ChevronIcon.tsx
|
|
303
|
-
var
|
|
304
|
-
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0,
|
|
382
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
383
|
+
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
305
384
|
"svg",
|
|
306
385
|
{
|
|
307
386
|
"aria-hidden": "true",
|
|
@@ -313,7 +392,7 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
313
392
|
expanded && "polli:rotate-180",
|
|
314
393
|
className
|
|
315
394
|
),
|
|
316
|
-
children: /* @__PURE__ */ (0,
|
|
395
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
317
396
|
"path",
|
|
318
397
|
{
|
|
319
398
|
d: "M3 4.5 6 7.5l3-3",
|
|
@@ -328,16 +407,19 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
328
407
|
);
|
|
329
408
|
|
|
330
409
|
// src/primitives/Chip.tsx
|
|
331
|
-
var
|
|
410
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
332
411
|
var chipSizes = {
|
|
333
412
|
sm: "polli:px-2 polli:py-0.5 polli:text-xs",
|
|
334
413
|
md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
|
|
335
414
|
lg: "polli:px-3 polli:py-1 polli:text-sm"
|
|
336
415
|
};
|
|
337
|
-
var
|
|
338
|
-
news: "polli:bg-
|
|
339
|
-
alpha: "polli:bg-
|
|
340
|
-
neutral: "polli:border polli:border-gray-400/70 polli:bg-gray-100/80 polli:text-gray-900"
|
|
416
|
+
var intentClasses3 = {
|
|
417
|
+
news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
|
|
418
|
+
alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
|
|
419
|
+
neutral: "polli:border polli:border-gray-400/70 polli:bg-gray-100/80 polli:text-gray-900",
|
|
420
|
+
success: "polli:border polli:border-intent-success-border polli:bg-intent-success-bg-light polli:text-intent-success-text",
|
|
421
|
+
warning: "polli:border polli:border-intent-warning-border polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
422
|
+
danger: "polli:border polli:border-intent-danger-border polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
341
423
|
};
|
|
342
424
|
var Chip = ({
|
|
343
425
|
theme,
|
|
@@ -347,8 +429,8 @@ var Chip = ({
|
|
|
347
429
|
children,
|
|
348
430
|
...rest
|
|
349
431
|
}) => {
|
|
350
|
-
const intentClass = intent ?
|
|
351
|
-
return /* @__PURE__ */ (0,
|
|
432
|
+
const intentClass = intent ? intentClasses3[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
352
434
|
"span",
|
|
353
435
|
{
|
|
354
436
|
...rest,
|
|
@@ -365,7 +447,7 @@ var Chip = ({
|
|
|
365
447
|
};
|
|
366
448
|
|
|
367
449
|
// src/primitives/Collapsible.tsx
|
|
368
|
-
var
|
|
450
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
369
451
|
var Collapsible = ({
|
|
370
452
|
label,
|
|
371
453
|
expanded,
|
|
@@ -377,7 +459,7 @@ var Collapsible = ({
|
|
|
377
459
|
focusClassName,
|
|
378
460
|
panelClassName = "polli:border-t polli:border-theme-border polli:px-3 polli:pt-3 polli:pb-3",
|
|
379
461
|
ariaLabel
|
|
380
|
-
}) => /* @__PURE__ */ (0,
|
|
462
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
381
463
|
"div",
|
|
382
464
|
{
|
|
383
465
|
className: cn2(
|
|
@@ -386,7 +468,7 @@ var Collapsible = ({
|
|
|
386
468
|
disabled && "polli:opacity-50"
|
|
387
469
|
),
|
|
388
470
|
children: [
|
|
389
|
-
/* @__PURE__ */ (0,
|
|
471
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
390
472
|
"button",
|
|
391
473
|
{
|
|
392
474
|
type: "button",
|
|
@@ -395,15 +477,15 @@ var Collapsible = ({
|
|
|
395
477
|
disabled,
|
|
396
478
|
onClick: onToggle,
|
|
397
479
|
className: cn2(
|
|
398
|
-
"polli:w-full polli:flex polli:items-center polli:gap-3 polli:px-3 polli:py-2 polli:text-left polli:transition-colors",
|
|
480
|
+
"polli-control polli:w-full polli:flex polli:items-center polli:gap-3 polli:px-3 polli:py-2 polli:text-left polli:transition-colors",
|
|
399
481
|
expanded ? "polli:rounded-t-lg" : "polli:rounded-lg",
|
|
400
482
|
!disabled && hoverClassName,
|
|
401
483
|
focusClassName,
|
|
402
484
|
disabled ? "polli:cursor-not-allowed" : "polli:cursor-pointer"
|
|
403
485
|
),
|
|
404
486
|
children: [
|
|
405
|
-
/* @__PURE__ */ (0,
|
|
406
|
-
/* @__PURE__ */ (0,
|
|
487
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "polli:flex-1 polli:min-w-0", children: label }),
|
|
488
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
407
489
|
ChevronIcon,
|
|
408
490
|
{
|
|
409
491
|
expanded,
|
|
@@ -413,7 +495,7 @@ var Collapsible = ({
|
|
|
413
495
|
]
|
|
414
496
|
}
|
|
415
497
|
),
|
|
416
|
-
expanded && /* @__PURE__ */ (0,
|
|
498
|
+
expanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: panelClassName, children })
|
|
417
499
|
]
|
|
418
500
|
}
|
|
419
501
|
);
|
|
@@ -423,7 +505,7 @@ var import_react3 = require("react");
|
|
|
423
505
|
|
|
424
506
|
// src/primitives/Tooltip.tsx
|
|
425
507
|
var import_react2 = require("react");
|
|
426
|
-
var
|
|
508
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
427
509
|
var TOOLTIP_MAX_WIDTH = 288;
|
|
428
510
|
var TOOLTIP_VIEWPORT_MARGIN = 12;
|
|
429
511
|
var Tooltip = ({
|
|
@@ -465,14 +547,14 @@ var Tooltip = ({
|
|
|
465
547
|
}
|
|
466
548
|
};
|
|
467
549
|
const triggerClassName = cn2(
|
|
468
|
-
"polli:relative polli:cursor-help polli:text-left polli:inline-flex polli:items-center",
|
|
550
|
+
"polli-control polli:relative polli:cursor-help polli:text-left polli:inline-flex polli:items-center",
|
|
469
551
|
className
|
|
470
552
|
);
|
|
471
553
|
const cursorClass = displayContents ? "polli:contents" : "polli:cursor-help";
|
|
472
554
|
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,
|
|
555
|
+
const contentNode = /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: cursorClass, children }),
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
476
558
|
"span",
|
|
477
559
|
{
|
|
478
560
|
style: {
|
|
@@ -507,7 +589,7 @@ var Tooltip = ({
|
|
|
507
589
|
style
|
|
508
590
|
};
|
|
509
591
|
if (triggerAs === "span") {
|
|
510
|
-
return /* @__PURE__ */ (0,
|
|
592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
511
593
|
"span",
|
|
512
594
|
{
|
|
513
595
|
ref: (node) => {
|
|
@@ -518,7 +600,7 @@ var Tooltip = ({
|
|
|
518
600
|
}
|
|
519
601
|
);
|
|
520
602
|
}
|
|
521
|
-
return /* @__PURE__ */ (0,
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
522
604
|
"button",
|
|
523
605
|
{
|
|
524
606
|
ref: (node) => {
|
|
@@ -537,7 +619,7 @@ var Tooltip = ({
|
|
|
537
619
|
};
|
|
538
620
|
|
|
539
621
|
// src/primitives/CopyButton.tsx
|
|
540
|
-
var
|
|
622
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
541
623
|
function CopyButton({
|
|
542
624
|
value,
|
|
543
625
|
children,
|
|
@@ -574,19 +656,20 @@ function CopyButton({
|
|
|
574
656
|
onCopyError?.(error);
|
|
575
657
|
}
|
|
576
658
|
}
|
|
577
|
-
const button = /* @__PURE__ */ (0,
|
|
659
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
578
660
|
"button",
|
|
579
661
|
{
|
|
580
662
|
...buttonProps,
|
|
581
663
|
type: "button",
|
|
582
664
|
onClick: handleCopy,
|
|
583
665
|
className: cn2(
|
|
666
|
+
"polli-control",
|
|
584
667
|
typeof className === "function" ? className(copied) : className
|
|
585
668
|
),
|
|
586
669
|
children: typeof children === "function" ? children(copied) : children
|
|
587
670
|
}
|
|
588
671
|
);
|
|
589
|
-
return /* @__PURE__ */ (0,
|
|
672
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
590
673
|
Tooltip,
|
|
591
674
|
{
|
|
592
675
|
triggerAs: "span",
|
|
@@ -600,7 +683,8 @@ function CopyButton({
|
|
|
600
683
|
// src/primitives/Dialog.tsx
|
|
601
684
|
var import_dialog = require("@ark-ui/react/dialog");
|
|
602
685
|
var import_portal = require("@ark-ui/react/portal");
|
|
603
|
-
var
|
|
686
|
+
var import_react4 = require("react");
|
|
687
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
604
688
|
var sizeClasses = {
|
|
605
689
|
sm: "polli:max-w-md",
|
|
606
690
|
md: "polli:max-w-xl",
|
|
@@ -623,77 +707,83 @@ var Dialog = ({
|
|
|
623
707
|
positionerClassName,
|
|
624
708
|
contentClassName,
|
|
625
709
|
children
|
|
626
|
-
}) =>
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
children: trigger
|
|
638
|
-
}
|
|
639
|
-
),
|
|
640
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_portal.Portal, { children: [
|
|
641
|
-
showBackdrop && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
642
|
-
import_dialog.Dialog.Backdrop,
|
|
710
|
+
}) => {
|
|
711
|
+
const contentRef = (0, import_react4.useRef)(null);
|
|
712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
713
|
+
import_dialog.Dialog.Root,
|
|
714
|
+
{
|
|
715
|
+
open,
|
|
716
|
+
initialFocusEl: () => contentRef.current,
|
|
717
|
+
onOpenChange: (details) => onOpenChange?.(details.open),
|
|
718
|
+
children: [
|
|
719
|
+
trigger && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
720
|
+
import_dialog.Dialog.Trigger,
|
|
643
721
|
{
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
)
|
|
722
|
+
asChild: triggerAsChild,
|
|
723
|
+
className: triggerClassName,
|
|
724
|
+
children: trigger
|
|
648
725
|
}
|
|
649
726
|
),
|
|
650
|
-
/* @__PURE__ */ (0,
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
727
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_portal.Portal, { children: [
|
|
728
|
+
showBackdrop && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
729
|
+
import_dialog.Dialog.Backdrop,
|
|
730
|
+
{
|
|
731
|
+
className: cn2(
|
|
732
|
+
"polli:fixed polli:inset-0 polli:z-[100] polli:bg-gray-950/50",
|
|
733
|
+
backdropClassName
|
|
734
|
+
)
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
738
|
+
import_dialog.Dialog.Positioner,
|
|
739
|
+
{
|
|
740
|
+
"data-theme": theme,
|
|
741
|
+
className: cn2(
|
|
742
|
+
"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",
|
|
743
|
+
positionerClassName
|
|
744
|
+
),
|
|
745
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
746
|
+
import_dialog.Dialog.Content,
|
|
747
|
+
{
|
|
748
|
+
ref: contentRef,
|
|
749
|
+
"data-theme": theme,
|
|
750
|
+
"aria-label": ariaLabel,
|
|
751
|
+
"aria-labelledby": labelledBy,
|
|
752
|
+
className: cn2(
|
|
753
|
+
"polli:my-auto polli:w-full polli:overflow-hidden polli:rounded-lg polli:border-2 polli:border-theme-border polli:bg-white polli:shadow-lg polli:outline-none polli:focus:outline-none polli:focus-visible:outline-none",
|
|
754
|
+
sizeClasses[size],
|
|
755
|
+
contentClassName
|
|
678
756
|
),
|
|
679
|
-
children
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
757
|
+
children: [
|
|
758
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
759
|
+
DialogTitle,
|
|
760
|
+
{
|
|
761
|
+
className: cn2(
|
|
762
|
+
"polli:px-6 polli:pt-6 polli:font-subheading polli:text-xl polli:text-theme-text-strong",
|
|
763
|
+
titleClassName
|
|
764
|
+
),
|
|
765
|
+
children: title
|
|
766
|
+
}
|
|
767
|
+
),
|
|
768
|
+
children
|
|
769
|
+
]
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
}
|
|
773
|
+
)
|
|
774
|
+
] })
|
|
775
|
+
]
|
|
776
|
+
}
|
|
777
|
+
);
|
|
778
|
+
};
|
|
689
779
|
var DialogTitle = import_dialog.Dialog.Title;
|
|
690
780
|
|
|
691
781
|
// src/primitives/Dropdown.tsx
|
|
692
782
|
var import_popover = require("@ark-ui/react/popover");
|
|
693
783
|
var import_portal2 = require("@ark-ui/react/portal");
|
|
694
|
-
var
|
|
695
|
-
var
|
|
696
|
-
var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-
|
|
784
|
+
var import_react5 = require("react");
|
|
785
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
786
|
+
var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:shadow-lg";
|
|
697
787
|
var Dropdown = ({
|
|
698
788
|
theme,
|
|
699
789
|
trigger,
|
|
@@ -701,17 +791,16 @@ var Dropdown = ({
|
|
|
701
791
|
align = "start",
|
|
702
792
|
open: openProp,
|
|
703
793
|
onOpenChange,
|
|
704
|
-
panelClassName,
|
|
705
794
|
className
|
|
706
795
|
}) => {
|
|
707
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
796
|
+
const [internalOpen, setInternalOpen] = (0, import_react5.useState)(false);
|
|
708
797
|
const isControlled = openProp !== void 0;
|
|
709
798
|
const open = isControlled ? openProp : internalOpen;
|
|
710
799
|
const setOpen = (next) => {
|
|
711
800
|
if (!isControlled) setInternalOpen(next);
|
|
712
801
|
onOpenChange?.(next);
|
|
713
802
|
};
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
803
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
715
804
|
import_popover.Popover.Root,
|
|
716
805
|
{
|
|
717
806
|
open,
|
|
@@ -720,14 +809,14 @@ var Dropdown = ({
|
|
|
720
809
|
placement: align === "end" ? "bottom-end" : "bottom-start"
|
|
721
810
|
},
|
|
722
811
|
children: [
|
|
723
|
-
/* @__PURE__ */ (0,
|
|
724
|
-
/* @__PURE__ */ (0,
|
|
812
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
|
|
813
|
+
/* @__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
814
|
import_popover.Popover.Content,
|
|
726
815
|
{
|
|
727
816
|
"data-theme": theme,
|
|
728
817
|
className: cn2(
|
|
729
818
|
"polli:z-50 polli:overflow-hidden polli:focus:outline-none",
|
|
730
|
-
|
|
819
|
+
DEFAULT_PANEL,
|
|
731
820
|
className
|
|
732
821
|
),
|
|
733
822
|
children: typeof children === "function" ? children(() => setOpen(false)) : children
|
|
@@ -738,8 +827,31 @@ var Dropdown = ({
|
|
|
738
827
|
);
|
|
739
828
|
};
|
|
740
829
|
|
|
830
|
+
// src/primitives/DropdownItem.tsx
|
|
831
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
832
|
+
function DropdownItem({
|
|
833
|
+
as,
|
|
834
|
+
className,
|
|
835
|
+
children,
|
|
836
|
+
...rest
|
|
837
|
+
}) {
|
|
838
|
+
const Component = as || "button";
|
|
839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
840
|
+
Component,
|
|
841
|
+
{
|
|
842
|
+
...Component === "button" ? { type: "button" } : void 0,
|
|
843
|
+
...rest,
|
|
844
|
+
className: cn2(
|
|
845
|
+
"polli-control polli:flex polli:w-full polli:cursor-pointer polli:items-center polli:gap-2 polli:rounded-lg polli:bg-transparent polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:text-theme-text-base polli:no-underline polli:transition-colors polli:hover:bg-theme-bg-hover polli:focus-visible:bg-theme-bg-hover",
|
|
846
|
+
className
|
|
847
|
+
),
|
|
848
|
+
children
|
|
849
|
+
}
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
|
|
741
853
|
// src/primitives/icons/index.tsx
|
|
742
|
-
var
|
|
854
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
743
855
|
var strokeProps = {
|
|
744
856
|
fill: "none",
|
|
745
857
|
stroke: "currentColor",
|
|
@@ -748,26 +860,26 @@ var strokeProps = {
|
|
|
748
860
|
strokeLinejoin: "round"
|
|
749
861
|
};
|
|
750
862
|
function AppIcon(props) {
|
|
751
|
-
return /* @__PURE__ */ (0,
|
|
752
|
-
/* @__PURE__ */ (0,
|
|
753
|
-
/* @__PURE__ */ (0,
|
|
863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "2", y: "4", width: "20", height: "14", rx: "2" }),
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M2 20h20" })
|
|
754
866
|
] });
|
|
755
867
|
}
|
|
756
868
|
function BeakerIcon(props) {
|
|
757
|
-
return /* @__PURE__ */ (0,
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
759
|
-
/* @__PURE__ */ (0,
|
|
760
|
-
/* @__PURE__ */ (0,
|
|
869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
870
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M9 3h6" }),
|
|
871
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" }),
|
|
872
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 14h10" })
|
|
761
873
|
] });
|
|
762
874
|
}
|
|
763
875
|
function BookIcon(props) {
|
|
764
|
-
return /* @__PURE__ */ (0,
|
|
765
|
-
/* @__PURE__ */ (0,
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 4h5a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4z" }),
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M20 4h-5a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h6z" })
|
|
767
879
|
] });
|
|
768
880
|
}
|
|
769
881
|
function CheckIcon(props) {
|
|
770
|
-
return /* @__PURE__ */ (0,
|
|
882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
771
883
|
"svg",
|
|
772
884
|
{
|
|
773
885
|
"aria-hidden": "true",
|
|
@@ -775,24 +887,24 @@ function CheckIcon(props) {
|
|
|
775
887
|
...strokeProps,
|
|
776
888
|
strokeWidth: 2.5,
|
|
777
889
|
...props,
|
|
778
|
-
children: /* @__PURE__ */ (0,
|
|
890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "20 6 9 17 4 12" })
|
|
779
891
|
}
|
|
780
892
|
);
|
|
781
893
|
}
|
|
782
894
|
function ClipboardIcon(props) {
|
|
783
|
-
return /* @__PURE__ */ (0,
|
|
784
|
-
/* @__PURE__ */ (0,
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
896
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2" }),
|
|
897
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
786
898
|
] });
|
|
787
899
|
}
|
|
788
900
|
function ClockIcon(props) {
|
|
789
|
-
return /* @__PURE__ */ (0,
|
|
790
|
-
/* @__PURE__ */ (0,
|
|
791
|
-
/* @__PURE__ */ (0,
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
902
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "12", cy: "12", r: "9" }),
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M12 7v5l3 2" })
|
|
792
904
|
] });
|
|
793
905
|
}
|
|
794
906
|
function DiscordIcon(props) {
|
|
795
|
-
return /* @__PURE__ */ (0,
|
|
907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
796
908
|
"path",
|
|
797
909
|
{
|
|
798
910
|
fill: "currentColor",
|
|
@@ -801,23 +913,23 @@ function DiscordIcon(props) {
|
|
|
801
913
|
) });
|
|
802
914
|
}
|
|
803
915
|
function DownloadIcon(props) {
|
|
804
|
-
return /* @__PURE__ */ (0,
|
|
805
|
-
/* @__PURE__ */ (0,
|
|
806
|
-
/* @__PURE__ */ (0,
|
|
807
|
-
/* @__PURE__ */ (0,
|
|
916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
917
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
918
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "7 10 12 15 17 10" }),
|
|
919
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
|
|
808
920
|
] });
|
|
809
921
|
}
|
|
810
922
|
function ExternalLinkIcon(props) {
|
|
811
|
-
return /* @__PURE__ */ (0,
|
|
923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
|
|
812
924
|
}
|
|
813
925
|
function GenApiIcon(props) {
|
|
814
|
-
return /* @__PURE__ */ (0,
|
|
815
|
-
/* @__PURE__ */ (0,
|
|
816
|
-
/* @__PURE__ */ (0,
|
|
926
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m8 3 4 1.5L16 3v18l-4-1.5L8 21z" }),
|
|
928
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M8 3v18M16 3v18" })
|
|
817
929
|
] });
|
|
818
930
|
}
|
|
819
931
|
function GitHubIcon(props) {
|
|
820
|
-
return /* @__PURE__ */ (0,
|
|
932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
821
933
|
"path",
|
|
822
934
|
{
|
|
823
935
|
fill: "currentColor",
|
|
@@ -826,69 +938,69 @@ function GitHubIcon(props) {
|
|
|
826
938
|
) });
|
|
827
939
|
}
|
|
828
940
|
function ImageIcon(props) {
|
|
829
|
-
return /* @__PURE__ */ (0,
|
|
830
|
-
/* @__PURE__ */ (0,
|
|
831
|
-
/* @__PURE__ */ (0,
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "3", width: "18", height: "18", rx: "2" }),
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "9", cy: "9", r: "2" }),
|
|
944
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m21 15-5-5L5 21" })
|
|
833
945
|
] });
|
|
834
946
|
}
|
|
835
947
|
function LockIcon(props) {
|
|
836
|
-
return /* @__PURE__ */ (0,
|
|
837
|
-
/* @__PURE__ */ (0,
|
|
838
|
-
/* @__PURE__ */ (0,
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "11", width: "18", height: "11", rx: "2", ry: "2" }),
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
839
951
|
] });
|
|
840
952
|
}
|
|
841
953
|
function MailIcon(props) {
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
843
|
-
/* @__PURE__ */ (0,
|
|
844
|
-
/* @__PURE__ */ (0,
|
|
954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
956
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "m3 7 9 7 9-7" })
|
|
845
957
|
] });
|
|
846
958
|
}
|
|
847
959
|
function McpIcon(props) {
|
|
848
|
-
return /* @__PURE__ */ (0,
|
|
849
|
-
/* @__PURE__ */ (0,
|
|
850
|
-
/* @__PURE__ */ (0,
|
|
851
|
-
/* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "2", y: "7", width: "8", height: "10", rx: "1.5" }),
|
|
962
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("rect", { x: "14", y: "7", width: "8", height: "10", rx: "1.5" }),
|
|
963
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M10 12h4" })
|
|
852
964
|
] });
|
|
853
965
|
}
|
|
854
966
|
function MenuIcon(props) {
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 7h16M4 12h16M4 17h16" }) });
|
|
856
968
|
}
|
|
857
969
|
function TerminalIcon(props) {
|
|
858
|
-
return /* @__PURE__ */ (0,
|
|
859
|
-
/* @__PURE__ */ (0,
|
|
860
|
-
/* @__PURE__ */ (0,
|
|
970
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
971
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "4 8 8 12 4 16" }),
|
|
972
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("line", { x1: "12", y1: "20", x2: "20", y2: "20" })
|
|
861
973
|
] });
|
|
862
974
|
}
|
|
863
975
|
function TokensIcon(props) {
|
|
864
|
-
return /* @__PURE__ */ (0,
|
|
976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M4 9h16M4 15h16M10 3 8 21M16 3l-2 18" }) });
|
|
865
977
|
}
|
|
866
978
|
function TrendUpIcon(props) {
|
|
867
|
-
return /* @__PURE__ */ (0,
|
|
868
|
-
/* @__PURE__ */ (0,
|
|
869
|
-
/* @__PURE__ */ (0,
|
|
979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
980
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "3 17 9 11 13 15 21 7" }),
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("polyline", { points: "15 7 21 7 21 13" })
|
|
870
982
|
] });
|
|
871
983
|
}
|
|
872
984
|
function WalletIcon(props) {
|
|
873
|
-
return /* @__PURE__ */ (0,
|
|
874
|
-
/* @__PURE__ */ (0,
|
|
875
|
-
/* @__PURE__ */ (0,
|
|
876
|
-
/* @__PURE__ */ (0,
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
|
|
987
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.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" }),
|
|
988
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
|
|
877
989
|
] });
|
|
878
990
|
}
|
|
879
991
|
function XIcon(props) {
|
|
880
|
-
return /* @__PURE__ */ (0,
|
|
992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { d: "M18 6 6 18M6 6l12 12" }) });
|
|
881
993
|
}
|
|
882
994
|
|
|
883
995
|
// src/primitives/ExternalLinkButton.tsx
|
|
884
|
-
var
|
|
996
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
885
997
|
var ExternalLinkButton = ({
|
|
886
998
|
theme,
|
|
887
999
|
href,
|
|
888
|
-
size = "
|
|
1000
|
+
size = "md",
|
|
889
1001
|
className,
|
|
890
1002
|
children
|
|
891
|
-
}) => /* @__PURE__ */ (0,
|
|
1003
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
892
1004
|
Button,
|
|
893
1005
|
{
|
|
894
1006
|
as: "a",
|
|
@@ -899,8 +1011,8 @@ var ExternalLinkButton = ({
|
|
|
899
1011
|
size,
|
|
900
1012
|
className: cn2("polli:gap-2", className),
|
|
901
1013
|
children: [
|
|
902
|
-
/* @__PURE__ */ (0,
|
|
903
|
-
/* @__PURE__ */ (0,
|
|
1014
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children }),
|
|
1015
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
904
1016
|
ExternalLinkIcon,
|
|
905
1017
|
{
|
|
906
1018
|
className: "polli:h-4 polli:w-4 polli:shrink-0 polli:opacity-60",
|
|
@@ -914,10 +1026,48 @@ var ExternalLinkButton = ({
|
|
|
914
1026
|
// src/primitives/Field.tsx
|
|
915
1027
|
var import_field = require("@ark-ui/react/field");
|
|
916
1028
|
|
|
1029
|
+
// src/primitives/FileUpload.tsx
|
|
1030
|
+
var import_react6 = require("react");
|
|
1031
|
+
|
|
1032
|
+
// src/lib/partition-files.ts
|
|
1033
|
+
function matchesAccept(file, accept) {
|
|
1034
|
+
if (!accept) return true;
|
|
1035
|
+
const tokens = accept.split(",").map((t) => t.trim()).filter(Boolean);
|
|
1036
|
+
if (tokens.length === 0) return true;
|
|
1037
|
+
return tokens.some((token) => {
|
|
1038
|
+
if (token.startsWith(".")) {
|
|
1039
|
+
return file.name.toLowerCase().endsWith(token.toLowerCase());
|
|
1040
|
+
}
|
|
1041
|
+
if (token.endsWith("/*")) {
|
|
1042
|
+
const prefix = token.slice(0, token.length - 1);
|
|
1043
|
+
return file.type.startsWith(prefix);
|
|
1044
|
+
}
|
|
1045
|
+
return file.type === token;
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
1048
|
+
function partitionFiles(incoming, current, { maxFiles, maxSizeBytes, accept }) {
|
|
1049
|
+
const accepted = [];
|
|
1050
|
+
const rejected = [];
|
|
1051
|
+
let slots = Math.max(0, maxFiles - current.length);
|
|
1052
|
+
for (const file of incoming) {
|
|
1053
|
+
if (!matchesAccept(file, accept)) {
|
|
1054
|
+
rejected.push({ file, reason: "type" });
|
|
1055
|
+
} else if (file.size > maxSizeBytes) {
|
|
1056
|
+
rejected.push({ file, reason: "size" });
|
|
1057
|
+
} else if (slots <= 0) {
|
|
1058
|
+
rejected.push({ file, reason: "count" });
|
|
1059
|
+
} else {
|
|
1060
|
+
accepted.push(file);
|
|
1061
|
+
slots -= 1;
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
return { accepted, rejected };
|
|
1065
|
+
}
|
|
1066
|
+
|
|
917
1067
|
// src/primitives/IconButton.tsx
|
|
918
|
-
var
|
|
919
|
-
var
|
|
920
|
-
danger: "polli:bg-intent-danger-bg-light polli:hover:bg-
|
|
1068
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1069
|
+
var intentClasses4 = {
|
|
1070
|
+
danger: "polli:bg-intent-danger-bg-light polli:hover:bg-intent-danger-bg-hover polli:text-intent-danger-text"
|
|
921
1071
|
};
|
|
922
1072
|
var defaultClasses = "polli:bg-theme-bg-active polli:hover:bg-theme-bg-hover polli:text-theme-text-soft polli:hover:text-theme-text-strong";
|
|
923
1073
|
var IconButton = ({
|
|
@@ -926,73 +1076,435 @@ var IconButton = ({
|
|
|
926
1076
|
onClick,
|
|
927
1077
|
children,
|
|
928
1078
|
className
|
|
929
|
-
}) => /* @__PURE__ */ (0,
|
|
1079
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
930
1080
|
"button",
|
|
931
1081
|
{
|
|
932
1082
|
type: "button",
|
|
933
1083
|
onClick,
|
|
934
1084
|
title,
|
|
935
1085
|
"aria-label": title,
|
|
1086
|
+
"data-intent": intent,
|
|
936
1087
|
className: cn2(
|
|
937
|
-
"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 ?
|
|
1088
|
+
"polli-control polli:inline-flex polli:h-6 polli:w-6 polli:cursor-pointer polli:items-center polli:justify-center polli:rounded polli:transition-colors",
|
|
1089
|
+
intent ? intentClasses4[intent] : defaultClasses,
|
|
939
1090
|
className
|
|
940
1091
|
),
|
|
941
1092
|
children
|
|
942
1093
|
}
|
|
943
1094
|
);
|
|
944
1095
|
|
|
1096
|
+
// src/primitives/FileUpload.tsx
|
|
1097
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1098
|
+
var PREVIEWABLE_IMAGE_TYPES = /* @__PURE__ */ new Set([
|
|
1099
|
+
"image/gif",
|
|
1100
|
+
"image/jpeg",
|
|
1101
|
+
"image/png",
|
|
1102
|
+
"image/webp"
|
|
1103
|
+
]);
|
|
1104
|
+
var PREVIEW_SIZE = 64;
|
|
1105
|
+
function isPreviewableImage(file) {
|
|
1106
|
+
return PREVIEWABLE_IMAGE_TYPES.has(file.type);
|
|
1107
|
+
}
|
|
1108
|
+
function PreviewPlaceholder() {
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "polli:flex polli:h-16 polli:w-16 polli:items-center polli:justify-center polli:rounded-lg polli:bg-theme-bg-active polli:text-theme-text-soft", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageIcon, { className: "polli:h-5 polli:w-5" }) });
|
|
1110
|
+
}
|
|
1111
|
+
function FilePreview({ file }) {
|
|
1112
|
+
const canvasRef = (0, import_react6.useRef)(null);
|
|
1113
|
+
const [canPreview, setCanPreview] = (0, import_react6.useState)(
|
|
1114
|
+
() => isPreviewableImage(file)
|
|
1115
|
+
);
|
|
1116
|
+
(0, import_react6.useEffect)(() => {
|
|
1117
|
+
if (!isPreviewableImage(file)) {
|
|
1118
|
+
setCanPreview(false);
|
|
1119
|
+
return;
|
|
1120
|
+
}
|
|
1121
|
+
let cancelled = false;
|
|
1122
|
+
setCanPreview(true);
|
|
1123
|
+
async function drawPreview() {
|
|
1124
|
+
try {
|
|
1125
|
+
const bitmap = await createImageBitmap(file);
|
|
1126
|
+
if (cancelled) {
|
|
1127
|
+
bitmap.close();
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
const canvas = canvasRef.current;
|
|
1131
|
+
const context = canvas?.getContext("2d");
|
|
1132
|
+
if (!canvas || !context) {
|
|
1133
|
+
bitmap.close();
|
|
1134
|
+
setCanPreview(false);
|
|
1135
|
+
return;
|
|
1136
|
+
}
|
|
1137
|
+
canvas.width = PREVIEW_SIZE;
|
|
1138
|
+
canvas.height = PREVIEW_SIZE;
|
|
1139
|
+
const scale = Math.max(
|
|
1140
|
+
PREVIEW_SIZE / bitmap.width,
|
|
1141
|
+
PREVIEW_SIZE / bitmap.height
|
|
1142
|
+
);
|
|
1143
|
+
const width = bitmap.width * scale;
|
|
1144
|
+
const height = bitmap.height * scale;
|
|
1145
|
+
const x = (PREVIEW_SIZE - width) / 2;
|
|
1146
|
+
const y = (PREVIEW_SIZE - height) / 2;
|
|
1147
|
+
context.clearRect(0, 0, PREVIEW_SIZE, PREVIEW_SIZE);
|
|
1148
|
+
context.drawImage(bitmap, x, y, width, height);
|
|
1149
|
+
bitmap.close();
|
|
1150
|
+
} catch {
|
|
1151
|
+
if (!cancelled) setCanPreview(false);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
void drawPreview();
|
|
1155
|
+
return () => {
|
|
1156
|
+
cancelled = true;
|
|
1157
|
+
};
|
|
1158
|
+
}, [file]);
|
|
1159
|
+
if (!canPreview) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PreviewPlaceholder, {});
|
|
1160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1161
|
+
"canvas",
|
|
1162
|
+
{
|
|
1163
|
+
ref: canvasRef,
|
|
1164
|
+
role: "img",
|
|
1165
|
+
"aria-label": file.name,
|
|
1166
|
+
className: "polli:h-16 polli:w-16 polli:rounded-lg",
|
|
1167
|
+
width: PREVIEW_SIZE,
|
|
1168
|
+
height: PREVIEW_SIZE
|
|
1169
|
+
}
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
function FileUpload({
|
|
1173
|
+
value,
|
|
1174
|
+
onChange,
|
|
1175
|
+
onReject,
|
|
1176
|
+
maxFiles = 4,
|
|
1177
|
+
maxSizeBytes = 10 * 1024 * 1024,
|
|
1178
|
+
accept = "image/*",
|
|
1179
|
+
disabled = false,
|
|
1180
|
+
theme,
|
|
1181
|
+
className
|
|
1182
|
+
}) {
|
|
1183
|
+
(0, import_react6.useEffect)(() => {
|
|
1184
|
+
const prevent = (event) => event.preventDefault();
|
|
1185
|
+
document.addEventListener("dragover", prevent);
|
|
1186
|
+
document.addEventListener("drop", prevent);
|
|
1187
|
+
return () => {
|
|
1188
|
+
document.removeEventListener("dragover", prevent);
|
|
1189
|
+
document.removeEventListener("drop", prevent);
|
|
1190
|
+
};
|
|
1191
|
+
}, []);
|
|
1192
|
+
function addFiles(incoming) {
|
|
1193
|
+
if (disabled || incoming.length === 0) return;
|
|
1194
|
+
const { accepted, rejected } = partitionFiles(incoming, value, {
|
|
1195
|
+
maxFiles,
|
|
1196
|
+
maxSizeBytes,
|
|
1197
|
+
accept
|
|
1198
|
+
});
|
|
1199
|
+
if (accepted.length > 0) onChange([...value, ...accepted]);
|
|
1200
|
+
if (rejected.length > 0) onReject?.(rejected);
|
|
1201
|
+
}
|
|
1202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1203
|
+
"div",
|
|
1204
|
+
{
|
|
1205
|
+
"data-theme": theme,
|
|
1206
|
+
className: cn2("polli:flex polli:flex-col polli:gap-3", className),
|
|
1207
|
+
children: [
|
|
1208
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1209
|
+
"label",
|
|
1210
|
+
{
|
|
1211
|
+
className: cn2(
|
|
1212
|
+
"polli-control polli:flex polli:flex-col polli:items-center polli:justify-center polli:gap-2",
|
|
1213
|
+
"polli:rounded-xl polli:border polli:border-dashed polli:border-theme-border",
|
|
1214
|
+
"polli:bg-theme-bg-pale polli:px-4 polli:py-6 polli:text-center polli:text-sm",
|
|
1215
|
+
"polli:text-theme-text-soft polli:transition-colors",
|
|
1216
|
+
disabled ? "polli:cursor-not-allowed polli:opacity-50" : "polli:cursor-pointer polli:hover:bg-theme-bg-hover"
|
|
1217
|
+
),
|
|
1218
|
+
onDragOver: (e) => e.preventDefault(),
|
|
1219
|
+
onDrop: (e) => {
|
|
1220
|
+
e.preventDefault();
|
|
1221
|
+
if (disabled) return;
|
|
1222
|
+
addFiles(Array.from(e.dataTransfer.files));
|
|
1223
|
+
},
|
|
1224
|
+
children: [
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageIcon, { className: "polli:h-6 polli:w-6" }),
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { children: [
|
|
1227
|
+
"Drag images here or",
|
|
1228
|
+
" ",
|
|
1229
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "polli:underline", children: "browse" })
|
|
1230
|
+
] }),
|
|
1231
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1232
|
+
"input",
|
|
1233
|
+
{
|
|
1234
|
+
type: "file",
|
|
1235
|
+
accept,
|
|
1236
|
+
multiple: maxFiles > 1,
|
|
1237
|
+
disabled,
|
|
1238
|
+
className: "polli:sr-only",
|
|
1239
|
+
onChange: (e) => {
|
|
1240
|
+
addFiles(Array.from(e.target.files ?? []));
|
|
1241
|
+
e.target.value = "";
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
)
|
|
1245
|
+
]
|
|
1246
|
+
}
|
|
1247
|
+
),
|
|
1248
|
+
value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "polli:m-0 polli:flex polli:flex-wrap polli:gap-3 polli:p-0", children: value.map((file, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1249
|
+
"li",
|
|
1250
|
+
{
|
|
1251
|
+
className: "polli:relative polli:flex polli:list-none polli:flex-col polli:gap-1",
|
|
1252
|
+
children: [
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FilePreview, { file }),
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "polli:max-w-16 polli:truncate polli:text-xs polli:text-theme-text-muted", children: file.name }),
|
|
1255
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "polli:absolute polli:-top-2 polli:-right-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1256
|
+
IconButton,
|
|
1257
|
+
{
|
|
1258
|
+
intent: "danger",
|
|
1259
|
+
title: `Remove ${file.name}`,
|
|
1260
|
+
onClick: () => onChange(
|
|
1261
|
+
value.filter(
|
|
1262
|
+
(_, i) => i !== index
|
|
1263
|
+
)
|
|
1264
|
+
),
|
|
1265
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(XIcon, { className: "polli:h-3 polli:w-3" })
|
|
1266
|
+
}
|
|
1267
|
+
) })
|
|
1268
|
+
]
|
|
1269
|
+
},
|
|
1270
|
+
`${file.name}-${index}`
|
|
1271
|
+
)) })
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
945
1277
|
// src/primitives/InfoTip.tsx
|
|
946
|
-
var
|
|
1278
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
947
1279
|
var InfoTip = ({
|
|
948
1280
|
text,
|
|
949
1281
|
content,
|
|
950
1282
|
label = "More info"
|
|
951
|
-
}) => /* @__PURE__ */ (0,
|
|
1283
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Tooltip, { content: content ?? text, ariaLabel: label, className: "polli:ml-1", children: /* @__PURE__ */ (0, import_jsx_runtime16.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" }) });
|
|
1284
|
+
|
|
1285
|
+
// src/primitives/InlineLink.tsx
|
|
1286
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1287
|
+
function isExternalHref(href) {
|
|
1288
|
+
return typeof href === "string" && /^https?:\/\//.test(href);
|
|
1289
|
+
}
|
|
1290
|
+
function InlineLink({
|
|
1291
|
+
as,
|
|
1292
|
+
theme,
|
|
1293
|
+
external,
|
|
1294
|
+
showIcon = true,
|
|
1295
|
+
className,
|
|
1296
|
+
children,
|
|
1297
|
+
...linkProps
|
|
1298
|
+
}) {
|
|
1299
|
+
const Component = as || "a";
|
|
1300
|
+
const isExternal = external ?? isExternalHref(linkProps.href);
|
|
1301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1302
|
+
Component,
|
|
1303
|
+
{
|
|
1304
|
+
"data-theme": theme,
|
|
1305
|
+
target: isExternal ? "_blank" : void 0,
|
|
1306
|
+
rel: isExternal ? "noopener noreferrer" : void 0,
|
|
1307
|
+
className: cn2(
|
|
1308
|
+
"polli-control polli:inline-flex polli:items-center polli:gap-1 polli:rounded-sm polli:font-semibold polli:text-theme-text-strong",
|
|
1309
|
+
"polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3",
|
|
1310
|
+
"polli:transition-colors polli:hover:text-theme-text-soft polli:hover:decoration-theme-text-soft",
|
|
1311
|
+
className
|
|
1312
|
+
),
|
|
1313
|
+
...linkProps,
|
|
1314
|
+
children: [
|
|
1315
|
+
children,
|
|
1316
|
+
showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1317
|
+
ExternalLinkIcon,
|
|
1318
|
+
{
|
|
1319
|
+
"aria-hidden": "true",
|
|
1320
|
+
className: "polli:h-3.5 polli:w-3.5 polli:shrink-0 polli:opacity-65"
|
|
1321
|
+
}
|
|
1322
|
+
)
|
|
1323
|
+
]
|
|
1324
|
+
}
|
|
1325
|
+
);
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
// src/primitives/Input.tsx
|
|
1329
|
+
var import_react7 = require("react");
|
|
1330
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1331
|
+
var Input = (0, import_react7.forwardRef)(
|
|
1332
|
+
({ className, error, hideNumberSteppers, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1333
|
+
"input",
|
|
1334
|
+
{
|
|
1335
|
+
ref,
|
|
1336
|
+
"data-error": error ? "true" : void 0,
|
|
1337
|
+
className: cn2(
|
|
1338
|
+
"polli-input polli:px-3 polli:py-2 polli:border polli:rounded-lg",
|
|
1339
|
+
"polli:text-gray-950",
|
|
1340
|
+
"polli:transition-colors",
|
|
1341
|
+
"polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
|
|
1342
|
+
hideNumberSteppers && "polli-input-number-clean",
|
|
1343
|
+
className
|
|
1344
|
+
),
|
|
1345
|
+
...props
|
|
1346
|
+
}
|
|
1347
|
+
)
|
|
1348
|
+
);
|
|
1349
|
+
|
|
1350
|
+
// src/primitives/Surface.tsx
|
|
1351
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1352
|
+
var variantClasses = {
|
|
1353
|
+
panel: "polli:rounded-2xl polli:border polli:border-theme-border polli:bg-theme-bg-subtle polli:p-6",
|
|
1354
|
+
card: "polli:rounded-xl polli:bg-surface-white polli:p-4",
|
|
1355
|
+
"card-themed": "polli:rounded-xl polli:bg-theme-bg-pale polli:p-4"
|
|
1356
|
+
};
|
|
1357
|
+
var Surface = ({
|
|
1358
|
+
theme,
|
|
1359
|
+
variant = "card",
|
|
1360
|
+
className,
|
|
1361
|
+
children,
|
|
1362
|
+
...rest
|
|
1363
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1364
|
+
"div",
|
|
1365
|
+
{
|
|
1366
|
+
...rest,
|
|
1367
|
+
"data-theme": theme,
|
|
1368
|
+
className: cn2("polli:min-w-0", variantClasses[variant], className),
|
|
1369
|
+
children
|
|
1370
|
+
}
|
|
1371
|
+
);
|
|
1372
|
+
|
|
1373
|
+
// src/primitives/LinkCard.tsx
|
|
1374
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1375
|
+
function isExternalHref2(href) {
|
|
1376
|
+
return typeof href === "string" && /^https?:\/\//.test(href);
|
|
1377
|
+
}
|
|
1378
|
+
function LinkCard({
|
|
1379
|
+
as,
|
|
1380
|
+
theme,
|
|
1381
|
+
external,
|
|
1382
|
+
showIcon = true,
|
|
1383
|
+
className,
|
|
1384
|
+
surfaceClassName,
|
|
1385
|
+
children,
|
|
1386
|
+
...linkProps
|
|
1387
|
+
}) {
|
|
1388
|
+
const Component = as || "a";
|
|
1389
|
+
const isExternal = external ?? isExternalHref2(linkProps.href);
|
|
1390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1391
|
+
Component,
|
|
1392
|
+
{
|
|
1393
|
+
"data-theme": theme,
|
|
1394
|
+
target: isExternal ? "_blank" : void 0,
|
|
1395
|
+
rel: isExternal ? "noopener noreferrer" : void 0,
|
|
1396
|
+
className: cn2(
|
|
1397
|
+
"polli:group polli:block polli:h-full polli:rounded-xl polli:outline-none",
|
|
1398
|
+
className
|
|
1399
|
+
),
|
|
1400
|
+
...linkProps,
|
|
1401
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
1402
|
+
Surface,
|
|
1403
|
+
{
|
|
1404
|
+
theme,
|
|
1405
|
+
variant: "card",
|
|
1406
|
+
className: cn2(
|
|
1407
|
+
"polli:relative polli:flex polli:h-full polli:flex-col polli:gap-2 polli:bg-white/80 polli:p-5",
|
|
1408
|
+
showIcon && isExternal && "polli:pr-10",
|
|
1409
|
+
"polli:transition polli:group-hover:-translate-y-0.5 polli:group-hover:bg-white/95",
|
|
1410
|
+
"polli:group-focus-visible:ring-2 polli:group-focus-visible:ring-theme-border",
|
|
1411
|
+
surfaceClassName
|
|
1412
|
+
),
|
|
1413
|
+
children: [
|
|
1414
|
+
showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1415
|
+
ExternalLinkIcon,
|
|
1416
|
+
{
|
|
1417
|
+
"aria-hidden": "true",
|
|
1418
|
+
className: "polli:absolute polli:top-4 polli:right-4 polli:h-3.5 polli:w-3.5 polli:text-theme-text-soft"
|
|
1419
|
+
}
|
|
1420
|
+
),
|
|
1421
|
+
children
|
|
1422
|
+
]
|
|
1423
|
+
}
|
|
1424
|
+
)
|
|
1425
|
+
}
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
952
1428
|
|
|
953
|
-
// src/primitives/
|
|
954
|
-
var
|
|
955
|
-
var
|
|
956
|
-
var
|
|
957
|
-
|
|
958
|
-
|
|
1429
|
+
// src/primitives/Markdown.tsx
|
|
1430
|
+
var import_react_markdown = __toESM(require("react-markdown"), 1);
|
|
1431
|
+
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
1432
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1433
|
+
var components = {
|
|
1434
|
+
ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1435
|
+
"ul",
|
|
1436
|
+
{
|
|
1437
|
+
className: "polli:flex polli:min-w-0 polli:list-disc polli:flex-col polli:gap-1 polli:pl-5 polli:marker:text-theme-text-muted",
|
|
1438
|
+
...props
|
|
1439
|
+
}
|
|
1440
|
+
),
|
|
1441
|
+
ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1442
|
+
"ol",
|
|
1443
|
+
{
|
|
1444
|
+
className: "polli:flex polli:min-w-0 polli:list-decimal polli:flex-col polli:gap-1 polli:pl-5 polli:marker:text-theme-text-muted",
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
),
|
|
1448
|
+
p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "polli:mb-2 polli:last:mb-0", ...props }),
|
|
1449
|
+
strong: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1450
|
+
"strong",
|
|
1451
|
+
{
|
|
1452
|
+
className: "polli:font-semibold polli:text-theme-text-strong",
|
|
1453
|
+
...props
|
|
1454
|
+
}
|
|
1455
|
+
),
|
|
1456
|
+
code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1457
|
+
"code",
|
|
1458
|
+
{
|
|
1459
|
+
className: "polli:break-words polli:rounded polli:bg-theme-bg-subtle polli:px-1 polli:py-0.5 polli:font-mono polli:text-xs",
|
|
1460
|
+
...props
|
|
1461
|
+
}
|
|
1462
|
+
),
|
|
1463
|
+
a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1464
|
+
"a",
|
|
1465
|
+
{
|
|
1466
|
+
target: "_blank",
|
|
1467
|
+
rel: "noopener noreferrer",
|
|
1468
|
+
className: "polli-control polli:rounded-sm polli:font-semibold polli:text-theme-text-strong polli:underline polli:underline-offset-2",
|
|
1469
|
+
...props
|
|
1470
|
+
}
|
|
1471
|
+
)
|
|
1472
|
+
};
|
|
1473
|
+
function Markdown({ children, className }) {
|
|
1474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1475
|
+
"div",
|
|
959
1476
|
{
|
|
960
|
-
ref,
|
|
961
1477
|
className: cn2(
|
|
962
|
-
"polli:
|
|
963
|
-
"polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
|
|
964
|
-
error ? "polli:border-red-400" : "polli:border-gray-300",
|
|
965
|
-
hideNumberSteppers && "polli-input-number-clean",
|
|
1478
|
+
"polli:min-w-0 polli:font-body polli:leading-relaxed",
|
|
966
1479
|
className
|
|
967
1480
|
),
|
|
968
|
-
|
|
1481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], components, children })
|
|
969
1482
|
}
|
|
970
|
-
)
|
|
971
|
-
|
|
1483
|
+
);
|
|
1484
|
+
}
|
|
972
1485
|
|
|
973
1486
|
// src/primitives/ScrollArea.tsx
|
|
974
|
-
var
|
|
975
|
-
var
|
|
1487
|
+
var import_react8 = require("react");
|
|
1488
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
976
1489
|
var axisClasses = {
|
|
977
1490
|
y: "polli:overflow-y-auto polli:overflow-x-hidden",
|
|
978
|
-
x: "polli:overflow-x-auto polli:overflow-y-hidden"
|
|
979
|
-
both: "polli:overflow-auto"
|
|
1491
|
+
x: "polli:overflow-x-auto polli:overflow-y-hidden"
|
|
980
1492
|
};
|
|
981
1493
|
function assignRef(ref, value) {
|
|
982
1494
|
if (typeof ref === "function") ref(value);
|
|
983
1495
|
else if (ref) ref.current = value;
|
|
984
1496
|
}
|
|
985
|
-
var ScrollArea = (0,
|
|
986
|
-
({ theme, axis = "y",
|
|
987
|
-
const innerRef = (0,
|
|
988
|
-
const setRef = (0,
|
|
1497
|
+
var ScrollArea = (0, import_react8.forwardRef)(
|
|
1498
|
+
({ theme, axis = "y", className, children, ...rest }, externalRef) => {
|
|
1499
|
+
const innerRef = (0, import_react8.useRef)(null);
|
|
1500
|
+
const setRef = (0, import_react8.useCallback)(
|
|
989
1501
|
(node) => {
|
|
990
1502
|
innerRef.current = node;
|
|
991
1503
|
assignRef(externalRef, node);
|
|
992
1504
|
},
|
|
993
1505
|
[externalRef]
|
|
994
1506
|
);
|
|
995
|
-
(0,
|
|
1507
|
+
(0, import_react8.useEffect)(() => {
|
|
996
1508
|
const element = innerRef.current;
|
|
997
1509
|
if (!element) return;
|
|
998
1510
|
let hideTimer = null;
|
|
@@ -1012,7 +1524,7 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1012
1524
|
};
|
|
1013
1525
|
const scheduleHide = () => {
|
|
1014
1526
|
clearHideTimer();
|
|
1015
|
-
hideTimer = window.setTimeout(hide,
|
|
1527
|
+
hideTimer = window.setTimeout(hide, 2e3);
|
|
1016
1528
|
};
|
|
1017
1529
|
const handleInteraction = () => {
|
|
1018
1530
|
show();
|
|
@@ -1042,15 +1554,15 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1042
1554
|
element.removeEventListener("focusin", handleInteraction);
|
|
1043
1555
|
element.removeEventListener("focusout", scheduleHide);
|
|
1044
1556
|
};
|
|
1045
|
-
}, [
|
|
1046
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
+
}, []);
|
|
1558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1047
1559
|
"div",
|
|
1048
1560
|
{
|
|
1049
1561
|
...rest,
|
|
1050
1562
|
ref: setRef,
|
|
1051
1563
|
"data-theme": theme,
|
|
1052
1564
|
className: cn2(
|
|
1053
|
-
"polli-scrollbar-subtle",
|
|
1565
|
+
"polli-scrollbar-subtle polli:min-w-0 polli:max-w-full",
|
|
1054
1566
|
axisClasses[axis],
|
|
1055
1567
|
className
|
|
1056
1568
|
),
|
|
@@ -1062,9 +1574,9 @@ var ScrollArea = (0, import_react6.forwardRef)(
|
|
|
1062
1574
|
ScrollArea.displayName = "ScrollArea";
|
|
1063
1575
|
|
|
1064
1576
|
// src/primitives/MultiSelect.tsx
|
|
1065
|
-
var
|
|
1066
|
-
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
|
-
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";
|
|
1577
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1578
|
+
var TRIGGER_BASE = "polli-control 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";
|
|
1579
|
+
var ROW_BASE = "polli-control 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
1580
|
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";
|
|
1069
1581
|
var MultiSelect = ({
|
|
1070
1582
|
options,
|
|
@@ -1087,16 +1599,16 @@ var MultiSelect = ({
|
|
|
1087
1599
|
};
|
|
1088
1600
|
const selectAll = () => onChange([]);
|
|
1089
1601
|
const displayText = disabled ? disabledText : isAllSelected ? "All" : `${selected.length} selected`;
|
|
1090
|
-
const labelNode = label ? /* @__PURE__ */ (0,
|
|
1602
|
+
const labelNode = label ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:text-xs polli:font-medium polli:text-theme-text-soft", children: label }) : null;
|
|
1091
1603
|
if (disabled) {
|
|
1092
|
-
return /* @__PURE__ */ (0,
|
|
1604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1093
1605
|
"div",
|
|
1094
1606
|
{
|
|
1095
1607
|
"data-theme": theme,
|
|
1096
1608
|
className: "polli:group polli:relative polli:flex polli:items-center polli:gap-2",
|
|
1097
1609
|
children: [
|
|
1098
1610
|
labelNode,
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1611
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1100
1612
|
"button",
|
|
1101
1613
|
{
|
|
1102
1614
|
type: "button",
|
|
@@ -1106,8 +1618,8 @@ var MultiSelect = ({
|
|
|
1106
1618
|
"polli:cursor-not-allowed polli:border-theme-border polli:bg-theme-bg-subtle polli:opacity-60"
|
|
1107
1619
|
),
|
|
1108
1620
|
children: [
|
|
1109
|
-
/* @__PURE__ */ (0,
|
|
1110
|
-
/* @__PURE__ */ (0,
|
|
1621
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:flex-1 polli:truncate polli:text-left polli:text-theme-text-soft/60", children: displayText }),
|
|
1622
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1111
1623
|
ChevronIcon,
|
|
1112
1624
|
{
|
|
1113
1625
|
expanded: false,
|
|
@@ -1117,25 +1629,25 @@ var MultiSelect = ({
|
|
|
1117
1629
|
]
|
|
1118
1630
|
}
|
|
1119
1631
|
),
|
|
1120
|
-
/* @__PURE__ */ (0,
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.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
1633
|
]
|
|
1122
1634
|
}
|
|
1123
1635
|
);
|
|
1124
1636
|
}
|
|
1125
|
-
return /* @__PURE__ */ (0,
|
|
1637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1126
1638
|
"div",
|
|
1127
1639
|
{
|
|
1128
1640
|
"data-theme": theme,
|
|
1129
1641
|
className: "polli:flex polli:items-center polli:gap-2",
|
|
1130
1642
|
children: [
|
|
1131
1643
|
labelNode,
|
|
1132
|
-
/* @__PURE__ */ (0,
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1133
1645
|
Dropdown,
|
|
1134
1646
|
{
|
|
1135
1647
|
theme,
|
|
1136
1648
|
align,
|
|
1137
1649
|
className: "polli:min-w-[320px]",
|
|
1138
|
-
trigger: (open) => /* @__PURE__ */ (0,
|
|
1650
|
+
trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1139
1651
|
"button",
|
|
1140
1652
|
{
|
|
1141
1653
|
type: "button",
|
|
@@ -1144,7 +1656,7 @@ var MultiSelect = ({
|
|
|
1144
1656
|
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
1657
|
),
|
|
1146
1658
|
children: [
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1148
1660
|
"span",
|
|
1149
1661
|
{
|
|
1150
1662
|
className: cn2(
|
|
@@ -1154,7 +1666,7 @@ var MultiSelect = ({
|
|
|
1154
1666
|
children: displayText
|
|
1155
1667
|
}
|
|
1156
1668
|
),
|
|
1157
|
-
/* @__PURE__ */ (0,
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1158
1670
|
ChevronIcon,
|
|
1159
1671
|
{
|
|
1160
1672
|
expanded: open,
|
|
@@ -1167,8 +1679,8 @@ var MultiSelect = ({
|
|
|
1167
1679
|
]
|
|
1168
1680
|
}
|
|
1169
1681
|
),
|
|
1170
|
-
children: /* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1682
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ScrollArea, { theme, className: "polli:max-h-64", children: [
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1172
1684
|
"button",
|
|
1173
1685
|
{
|
|
1174
1686
|
type: "button",
|
|
@@ -1178,7 +1690,7 @@ var MultiSelect = ({
|
|
|
1178
1690
|
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
1691
|
),
|
|
1180
1692
|
children: [
|
|
1181
|
-
/* @__PURE__ */ (0,
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1182
1694
|
"span",
|
|
1183
1695
|
{
|
|
1184
1696
|
className: cn2(
|
|
@@ -1194,7 +1706,7 @@ var MultiSelect = ({
|
|
|
1194
1706
|
),
|
|
1195
1707
|
options.map((opt) => {
|
|
1196
1708
|
const isChecked = selected.includes(opt.value);
|
|
1197
|
-
return /* @__PURE__ */ (0,
|
|
1709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1198
1710
|
"button",
|
|
1199
1711
|
{
|
|
1200
1712
|
type: "button",
|
|
@@ -1204,7 +1716,7 @@ var MultiSelect = ({
|
|
|
1204
1716
|
isChecked ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-theme-text-base polli:hover:bg-theme-bg-subtle"
|
|
1205
1717
|
),
|
|
1206
1718
|
children: [
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1208
1720
|
"span",
|
|
1209
1721
|
{
|
|
1210
1722
|
className: cn2(
|
|
@@ -1214,7 +1726,7 @@ var MultiSelect = ({
|
|
|
1214
1726
|
children: isChecked && "\u2713"
|
|
1215
1727
|
}
|
|
1216
1728
|
),
|
|
1217
|
-
/* @__PURE__ */ (0,
|
|
1729
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "polli:whitespace-nowrap", children: opt.label })
|
|
1218
1730
|
]
|
|
1219
1731
|
},
|
|
1220
1732
|
opt.value
|
|
@@ -1228,26 +1740,74 @@ var MultiSelect = ({
|
|
|
1228
1740
|
);
|
|
1229
1741
|
};
|
|
1230
1742
|
|
|
1743
|
+
// src/primitives/NavItem.tsx
|
|
1744
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1745
|
+
var base = "polli-control polli:flex polli:items-center polli:gap-2 polli:rounded-full polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:whitespace-nowrap polli:transition-colors";
|
|
1746
|
+
var activeClasses = "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
1747
|
+
var inactiveClasses = "polli:text-gray-800 polli:hover:bg-white/60 polli:hover:text-gray-950";
|
|
1748
|
+
var dotClasses = "polli:h-2.5 polli:w-2.5 polli:shrink-0 polli:rounded-full polli:bg-theme-bg-hover polli:shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]";
|
|
1749
|
+
function NavItem({
|
|
1750
|
+
as,
|
|
1751
|
+
theme,
|
|
1752
|
+
active = false,
|
|
1753
|
+
className,
|
|
1754
|
+
children,
|
|
1755
|
+
...rest
|
|
1756
|
+
}) {
|
|
1757
|
+
const Component = as || "button";
|
|
1758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
1759
|
+
Component,
|
|
1760
|
+
{
|
|
1761
|
+
"data-theme": theme,
|
|
1762
|
+
"aria-current": active ? "page" : void 0,
|
|
1763
|
+
className: cn2(
|
|
1764
|
+
base,
|
|
1765
|
+
active ? activeClasses : inactiveClasses,
|
|
1766
|
+
className
|
|
1767
|
+
),
|
|
1768
|
+
...rest,
|
|
1769
|
+
children: [
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { "aria-hidden": "true", className: dotClasses }),
|
|
1771
|
+
children
|
|
1772
|
+
]
|
|
1773
|
+
}
|
|
1774
|
+
);
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1231
1777
|
// src/primitives/PeriodPicker.tsx
|
|
1232
|
-
var
|
|
1778
|
+
var import_react9 = require("react");
|
|
1233
1779
|
|
|
1234
1780
|
// src/primitives/TabButton.tsx
|
|
1235
|
-
var
|
|
1781
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1236
1782
|
var sizeClasses2 = {
|
|
1237
|
-
|
|
1238
|
-
|
|
1783
|
+
md: "polli:px-4 polli:py-1.5 polli:text-base",
|
|
1784
|
+
sm: "polli:px-3 polli:py-1.5 polli:text-sm"
|
|
1785
|
+
};
|
|
1786
|
+
var variantClasses2 = {
|
|
1787
|
+
default: {
|
|
1788
|
+
base: "polli:border",
|
|
1789
|
+
active: "polli:bg-theme-bg-active polli:text-theme-text-strong polli:border-theme-border",
|
|
1790
|
+
inactive: "polli:bg-theme-bg-subtle polli:text-theme-text-base polli:border-theme-border polli:hover:bg-theme-bg-active"
|
|
1791
|
+
},
|
|
1792
|
+
ghost: {
|
|
1793
|
+
base: "polli:border polli:border-transparent",
|
|
1794
|
+
active: "polli:bg-theme-bg-active polli:text-theme-text-strong",
|
|
1795
|
+
inactive: "polli:bg-transparent polli:text-theme-text-base polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong"
|
|
1796
|
+
}
|
|
1239
1797
|
};
|
|
1240
1798
|
var TabButton = ({
|
|
1241
1799
|
theme,
|
|
1242
1800
|
active,
|
|
1243
1801
|
onClick,
|
|
1244
1802
|
children,
|
|
1245
|
-
size = "
|
|
1803
|
+
size = "md",
|
|
1804
|
+
variant = "default",
|
|
1246
1805
|
ariaLabel,
|
|
1247
1806
|
disabled = false,
|
|
1248
1807
|
className
|
|
1249
1808
|
}) => {
|
|
1250
|
-
|
|
1809
|
+
const classes = variantClasses2[variant];
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1251
1811
|
"button",
|
|
1252
1812
|
{
|
|
1253
1813
|
type: "button",
|
|
@@ -1257,8 +1817,9 @@ var TabButton = ({
|
|
|
1257
1817
|
"aria-pressed": active,
|
|
1258
1818
|
disabled,
|
|
1259
1819
|
className: cn2(
|
|
1260
|
-
"polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:
|
|
1261
|
-
|
|
1820
|
+
"polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:font-medium polli:leading-normal polli:transition-all polli:duration-200",
|
|
1821
|
+
classes.base,
|
|
1822
|
+
active ? classes.active : classes.inactive,
|
|
1262
1823
|
disabled && "polli:cursor-not-allowed polli:opacity-50",
|
|
1263
1824
|
sizeClasses2[size],
|
|
1264
1825
|
className
|
|
@@ -1269,7 +1830,7 @@ var TabButton = ({
|
|
|
1269
1830
|
};
|
|
1270
1831
|
|
|
1271
1832
|
// src/primitives/PeriodPicker.tsx
|
|
1272
|
-
var
|
|
1833
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1273
1834
|
var WEEKDAY_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
1274
1835
|
var MONTH_LABELS = [
|
|
1275
1836
|
"Jan",
|
|
@@ -1285,7 +1846,7 @@ var MONTH_LABELS = [
|
|
|
1285
1846
|
"Nov",
|
|
1286
1847
|
"Dec"
|
|
1287
1848
|
];
|
|
1288
|
-
var NAV_BUTTON = "polli:rounded-full polli:px-2 polli:py-1 polli:text-xs polli:font-semibold polli:text-theme-text-base polli:transition-colors polli:hover:bg-theme-bg-subtle";
|
|
1849
|
+
var NAV_BUTTON = "polli-control polli:rounded-full polli:px-2 polli:py-1 polli:text-xs polli:font-semibold polli:text-theme-text-base polli:transition-colors polli:hover:bg-theme-bg-subtle";
|
|
1289
1850
|
function addUtcMonths2(date, months) {
|
|
1290
1851
|
return new Date(
|
|
1291
1852
|
Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + months, 1)
|
|
@@ -1322,13 +1883,13 @@ var PeriodPicker = ({
|
|
|
1322
1883
|
minDate = /* @__PURE__ */ new Date(0),
|
|
1323
1884
|
maxDate
|
|
1324
1885
|
}) => {
|
|
1325
|
-
const [open, setOpen] = (0,
|
|
1326
|
-
const [viewDate, setViewDate] = (0,
|
|
1886
|
+
const [open, setOpen] = (0, import_react9.useState)(false);
|
|
1887
|
+
const [viewDate, setViewDate] = (0, import_react9.useState)(() => periodDate(value));
|
|
1327
1888
|
const { granularity, period } = value;
|
|
1328
|
-
(0,
|
|
1889
|
+
(0, import_react9.useEffect)(() => {
|
|
1329
1890
|
setViewDate(periodDate({ granularity, period }));
|
|
1330
1891
|
}, [granularity, period]);
|
|
1331
|
-
const dates = (0,
|
|
1892
|
+
const dates = (0, import_react9.useMemo)(() => monthGridDates(viewDate), [viewDate]);
|
|
1332
1893
|
const selectedWindow = periodToWindow(value);
|
|
1333
1894
|
const today = startOfUtcDay(maxDate);
|
|
1334
1895
|
const previousViewDate = value.granularity === "month" ? addUtcMonths2(viewDate, -12) : addUtcMonths2(viewDate, -1);
|
|
@@ -1349,14 +1910,14 @@ var PeriodPicker = ({
|
|
|
1349
1910
|
month: "long",
|
|
1350
1911
|
year: "numeric"
|
|
1351
1912
|
});
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1353
1914
|
"div",
|
|
1354
1915
|
{
|
|
1355
1916
|
"data-theme": theme,
|
|
1356
1917
|
className: "polli:flex polli:flex-wrap polli:items-center polli:gap-2",
|
|
1357
1918
|
children: [
|
|
1358
|
-
/* @__PURE__ */ (0,
|
|
1359
|
-
(granularity2) => /* @__PURE__ */ (0,
|
|
1919
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:flex polli:flex-wrap polli:gap-1.5", children: ["day", "week", "month"].map(
|
|
1920
|
+
(granularity2) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1360
1921
|
TabButton,
|
|
1361
1922
|
{
|
|
1362
1923
|
active: value.granularity === granularity2,
|
|
@@ -1366,33 +1927,33 @@ var PeriodPicker = ({
|
|
|
1366
1927
|
granularity2
|
|
1367
1928
|
)
|
|
1368
1929
|
) }),
|
|
1369
|
-
/* @__PURE__ */ (0,
|
|
1930
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1370
1931
|
Dropdown,
|
|
1371
1932
|
{
|
|
1372
1933
|
theme,
|
|
1373
1934
|
open,
|
|
1374
1935
|
onOpenChange: setOpen,
|
|
1375
1936
|
className: "polli:w-[304px] polli:rounded-xl polli:p-3",
|
|
1376
|
-
trigger: (isOpen) => /* @__PURE__ */ (0,
|
|
1937
|
+
trigger: (isOpen) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1377
1938
|
"button",
|
|
1378
1939
|
{
|
|
1379
1940
|
type: "button",
|
|
1380
1941
|
"aria-label": `Select period, current ${formatPeriodLabel(value)}`,
|
|
1381
1942
|
className: cn2(
|
|
1382
|
-
"polli:inline-flex polli:min-w-[150px] polli:items-center polli:justify-between polli:gap-2 polli:rounded-full polli:border polli:px-4 polli:pt-1.5 polli:pb-2 polli:text-left polli:text-base polli:font-medium polli:leading-normal",
|
|
1943
|
+
"polli-control polli:inline-flex polli:min-w-[150px] polli:items-center polli:justify-between polli:gap-2 polli:rounded-full polli:border polli:px-4 polli:pt-1.5 polli:pb-2 polli:text-left polli:text-base polli:font-medium polli:leading-normal",
|
|
1383
1944
|
"polli:border-theme-border polli:bg-theme-bg-subtle polli:text-theme-text-base",
|
|
1384
1945
|
"polli:transition-all polli:duration-200 polli:ease-out polli:hover:bg-theme-bg-pale",
|
|
1385
1946
|
isOpen && "polli:bg-theme-bg-active polli:text-theme-text-strong polli:shadow-sm"
|
|
1386
1947
|
),
|
|
1387
1948
|
children: [
|
|
1388
|
-
/* @__PURE__ */ (0,
|
|
1389
|
-
/* @__PURE__ */ (0,
|
|
1949
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: formatPeriodLabel(value) }),
|
|
1950
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChevronIcon, { expanded: isOpen })
|
|
1390
1951
|
]
|
|
1391
1952
|
}
|
|
1392
1953
|
),
|
|
1393
1954
|
children: [
|
|
1394
|
-
/* @__PURE__ */ (0,
|
|
1395
|
-
/* @__PURE__ */ (0,
|
|
1955
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "polli:mb-3 polli:flex polli:items-center polli:justify-between", children: [
|
|
1956
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1396
1957
|
"button",
|
|
1397
1958
|
{
|
|
1398
1959
|
type: "button",
|
|
@@ -1406,8 +1967,8 @@ var PeriodPicker = ({
|
|
|
1406
1967
|
children: "<"
|
|
1407
1968
|
}
|
|
1408
1969
|
),
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1410
|
-
/* @__PURE__ */ (0,
|
|
1970
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:text-sm polli:font-bold polli:text-theme-text-base", children: viewLabel }),
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1411
1972
|
"button",
|
|
1412
1973
|
{
|
|
1413
1974
|
type: "button",
|
|
@@ -1422,7 +1983,7 @@ var PeriodPicker = ({
|
|
|
1422
1983
|
}
|
|
1423
1984
|
)
|
|
1424
1985
|
] }),
|
|
1425
|
-
value.granularity === "month" ? /* @__PURE__ */ (0,
|
|
1986
|
+
value.granularity === "month" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:grid polli:grid-cols-3 polli:gap-1.5", children: MONTH_LABELS.map((label, monthIndex) => {
|
|
1426
1987
|
const date = new Date(
|
|
1427
1988
|
Date.UTC(
|
|
1428
1989
|
viewDate.getUTCFullYear(),
|
|
@@ -1441,7 +2002,7 @@ var PeriodPicker = ({
|
|
|
1441
2002
|
year: "numeric"
|
|
1442
2003
|
});
|
|
1443
2004
|
const selected = date.getUTCFullYear() === selectedWindow.start.getUTCFullYear() && date.getUTCMonth() === selectedWindow.start.getUTCMonth();
|
|
1444
|
-
return /* @__PURE__ */ (0,
|
|
2005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1445
2006
|
"button",
|
|
1446
2007
|
{
|
|
1447
2008
|
type: "button",
|
|
@@ -1449,7 +2010,7 @@ var PeriodPicker = ({
|
|
|
1449
2010
|
disabled: !selectable,
|
|
1450
2011
|
onClick: () => selectDate(date),
|
|
1451
2012
|
className: cn2(
|
|
1452
|
-
"polli:rounded-lg polli:px-3 polli:py-2 polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
|
|
2013
|
+
"polli-control polli:rounded-lg polli:px-3 polli:py-2 polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
|
|
1453
2014
|
selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-gray-700 polli:hover:bg-theme-bg-subtle",
|
|
1454
2015
|
!selectable && "polli:cursor-not-allowed polli:text-gray-300 polli:hover:bg-transparent"
|
|
1455
2016
|
),
|
|
@@ -1457,9 +2018,9 @@ var PeriodPicker = ({
|
|
|
1457
2018
|
},
|
|
1458
2019
|
label
|
|
1459
2020
|
);
|
|
1460
|
-
}) }) : /* @__PURE__ */ (0,
|
|
1461
|
-
/* @__PURE__ */ (0,
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
2021
|
+
}) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2022
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.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_runtime26.jsx)("div", { children: label }, label)) }),
|
|
2023
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "polli:grid polli:grid-cols-7 polli:gap-1", children: dates.map((date) => {
|
|
1463
2024
|
const inCurrentMonth = date.getUTCMonth() === viewDate.getUTCMonth();
|
|
1464
2025
|
const selectable = isPeriodSelectable(
|
|
1465
2026
|
periodFromDate(value.granularity, date),
|
|
@@ -1477,7 +2038,7 @@ var PeriodPicker = ({
|
|
|
1477
2038
|
}
|
|
1478
2039
|
)}`;
|
|
1479
2040
|
const selected = value.granularity === "day" ? sameUtcDay(date, selectedWindow.start) : date >= selectedWindow.start && date < selectedWindow.end;
|
|
1480
|
-
return /* @__PURE__ */ (0,
|
|
2041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1481
2042
|
"button",
|
|
1482
2043
|
{
|
|
1483
2044
|
type: "button",
|
|
@@ -1485,7 +2046,7 @@ var PeriodPicker = ({
|
|
|
1485
2046
|
disabled: !selectable,
|
|
1486
2047
|
onClick: () => selectDate(date),
|
|
1487
2048
|
className: cn2(
|
|
1488
|
-
"polli:aspect-square polli:rounded-lg polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
|
|
2049
|
+
"polli-control polli:aspect-square polli:rounded-lg polli:text-xs polli:font-medium polli:transition-colors polli:duration-150",
|
|
1489
2050
|
!inCurrentMonth && "polli:text-gray-300",
|
|
1490
2051
|
sameUtcDay(date, today) && "polli:ring-1 polli:ring-theme-border",
|
|
1491
2052
|
selected ? "polli:bg-theme-bg-active polli:text-theme-text-strong" : "polli:text-gray-700 polli:hover:bg-theme-bg-subtle",
|
|
@@ -1505,58 +2066,189 @@ var PeriodPicker = ({
|
|
|
1505
2066
|
);
|
|
1506
2067
|
};
|
|
1507
2068
|
|
|
1508
|
-
// src/primitives/
|
|
1509
|
-
var
|
|
1510
|
-
var
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
2069
|
+
// src/primitives/Prose.tsx
|
|
2070
|
+
var import_react_markdown2 = __toESM(require("react-markdown"), 1);
|
|
2071
|
+
var import_rehype_slug = __toESM(require("rehype-slug"), 1);
|
|
2072
|
+
var import_remark_gfm2 = __toESM(require("remark-gfm"), 1);
|
|
2073
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2074
|
+
var components2 = {
|
|
2075
|
+
h1: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2076
|
+
"h1",
|
|
2077
|
+
{
|
|
2078
|
+
className: "polli:mt-0 polli:mb-5 polli:break-words polli:font-heading polli:text-4xl polli:leading-none polli:text-theme-text-strong",
|
|
2079
|
+
...props
|
|
2080
|
+
}
|
|
2081
|
+
),
|
|
2082
|
+
h2: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2083
|
+
"h2",
|
|
2084
|
+
{
|
|
2085
|
+
className: "polli:mt-8 polli:mb-3 polli:break-words polli:font-subheading polli:text-2xl polli:leading-tight polli:text-theme-text-strong",
|
|
2086
|
+
...props
|
|
2087
|
+
}
|
|
2088
|
+
),
|
|
2089
|
+
h3: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2090
|
+
"h3",
|
|
2091
|
+
{
|
|
2092
|
+
className: "polli:mt-6 polli:mb-2 polli:break-words polli:font-subheading polli:text-xl polli:leading-tight polli:text-theme-text-strong",
|
|
2093
|
+
...props
|
|
2094
|
+
}
|
|
2095
|
+
),
|
|
2096
|
+
p: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "polli:my-4 polli:leading-relaxed", ...props }),
|
|
2097
|
+
a: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2098
|
+
"a",
|
|
2099
|
+
{
|
|
2100
|
+
className: "polli-control polli:rounded-sm polli:font-semibold polli:text-theme-text-strong polli:underline polli:decoration-theme-border polli:decoration-2 polli:underline-offset-3 polli:hover:decoration-theme-text-soft",
|
|
2101
|
+
...props
|
|
2102
|
+
}
|
|
2103
|
+
),
|
|
2104
|
+
ul: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2105
|
+
"ul",
|
|
2106
|
+
{
|
|
2107
|
+
className: "polli:my-4 polli:list-disc polli:pl-6 polli:leading-relaxed",
|
|
2108
|
+
...props
|
|
2109
|
+
}
|
|
2110
|
+
),
|
|
2111
|
+
ol: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2112
|
+
"ol",
|
|
2113
|
+
{
|
|
2114
|
+
className: "polli:my-4 polli:list-decimal polli:pl-6 polli:leading-relaxed",
|
|
2115
|
+
...props
|
|
2116
|
+
}
|
|
2117
|
+
),
|
|
2118
|
+
blockquote: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2119
|
+
"blockquote",
|
|
2120
|
+
{
|
|
2121
|
+
className: "polli:my-4 polli:border-l-4 polli:border-theme-border polli:pl-4 polli:text-theme-text-soft",
|
|
2122
|
+
...props
|
|
2123
|
+
}
|
|
2124
|
+
),
|
|
2125
|
+
code: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2126
|
+
"code",
|
|
2127
|
+
{
|
|
2128
|
+
className: "polli:rounded polli:bg-theme-bg-active polli:px-1 polli:py-0.5 polli:font-pixel polli:text-sm",
|
|
2129
|
+
...props
|
|
2130
|
+
}
|
|
2131
|
+
),
|
|
2132
|
+
pre: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2133
|
+
"pre",
|
|
2134
|
+
{
|
|
2135
|
+
className: "polli:my-4 polli:overflow-x-auto polli:rounded-lg polli:bg-theme-bg-active polli:p-4",
|
|
2136
|
+
...props
|
|
2137
|
+
}
|
|
2138
|
+
),
|
|
2139
|
+
table: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2140
|
+
"table",
|
|
2141
|
+
{
|
|
2142
|
+
className: "polli:my-4 polli:w-full polli:border-collapse polli:text-sm",
|
|
2143
|
+
...props
|
|
2144
|
+
}
|
|
2145
|
+
),
|
|
2146
|
+
th: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2147
|
+
"th",
|
|
2148
|
+
{
|
|
2149
|
+
className: "polli:border polli:border-theme-border polli:px-3 polli:py-2 polli:text-left polli:font-semibold",
|
|
2150
|
+
...props
|
|
2151
|
+
}
|
|
2152
|
+
),
|
|
2153
|
+
td: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2154
|
+
"td",
|
|
2155
|
+
{
|
|
2156
|
+
className: "polli:border polli:border-theme-border polli:px-3 polli:py-2",
|
|
2157
|
+
...props
|
|
2158
|
+
}
|
|
2159
|
+
),
|
|
2160
|
+
hr: ({ node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("hr", { className: "polli:my-6 polli:border-theme-border", ...props })
|
|
1514
2161
|
};
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
2162
|
+
function Prose({ children, className }) {
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2164
|
+
"div",
|
|
2165
|
+
{
|
|
2166
|
+
className: cn2(
|
|
2167
|
+
"polli:font-body polli:text-theme-text-base polli:leading-relaxed",
|
|
2168
|
+
className
|
|
2169
|
+
),
|
|
2170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2171
|
+
import_react_markdown2.default,
|
|
2172
|
+
{
|
|
2173
|
+
remarkPlugins: [import_remark_gfm2.default],
|
|
2174
|
+
rehypePlugins: [import_rehype_slug.default],
|
|
2175
|
+
components: components2,
|
|
2176
|
+
children
|
|
2177
|
+
}
|
|
2178
|
+
)
|
|
2179
|
+
}
|
|
2180
|
+
);
|
|
2181
|
+
}
|
|
1530
2182
|
|
|
1531
2183
|
// src/primitives/Section.tsx
|
|
1532
|
-
var
|
|
2184
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1533
2185
|
var Section = ({
|
|
1534
2186
|
title,
|
|
1535
2187
|
theme,
|
|
1536
2188
|
id,
|
|
1537
2189
|
framed = false,
|
|
2190
|
+
intro,
|
|
1538
2191
|
action,
|
|
1539
2192
|
actionClassName,
|
|
2193
|
+
panelClassName,
|
|
2194
|
+
titleClassName,
|
|
1540
2195
|
children,
|
|
1541
2196
|
className
|
|
1542
|
-
}) => /* @__PURE__ */ (0,
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
children: title
|
|
1550
|
-
}
|
|
2197
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2198
|
+
"section",
|
|
2199
|
+
{
|
|
2200
|
+
id,
|
|
2201
|
+
className: cn2(
|
|
2202
|
+
"polli:flex polli:scroll-mt-10 polli:flex-col polli:gap-4",
|
|
2203
|
+
className
|
|
1551
2204
|
),
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
2205
|
+
children: [
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "polli:flex polli:flex-wrap polli:items-center polli:justify-between polli:gap-3 polli:px-1", children: [
|
|
2207
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2208
|
+
"h2",
|
|
2209
|
+
{
|
|
2210
|
+
"data-theme": theme,
|
|
2211
|
+
className: cn2(
|
|
2212
|
+
"polli:text-left polli:font-subheading polli:text-2xl polli:leading-tight polli:text-theme-text-strong",
|
|
2213
|
+
titleClassName
|
|
2214
|
+
),
|
|
2215
|
+
children: title
|
|
2216
|
+
}
|
|
2217
|
+
),
|
|
2218
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn2("polli:shrink-0", actionClassName), children: action })
|
|
2219
|
+
] }),
|
|
2220
|
+
framed ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2221
|
+
Surface,
|
|
2222
|
+
{
|
|
2223
|
+
variant: "panel",
|
|
2224
|
+
theme,
|
|
2225
|
+
className: cn2(
|
|
2226
|
+
"polli:flex polli:flex-col polli:gap-5",
|
|
2227
|
+
panelClassName
|
|
2228
|
+
),
|
|
2229
|
+
children: [
|
|
2230
|
+
intro && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "polli:max-w-2xl polli:text-theme-text-base", children: intro }),
|
|
2231
|
+
children
|
|
2232
|
+
]
|
|
2233
|
+
}
|
|
2234
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
2235
|
+
intro && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2236
|
+
"div",
|
|
2237
|
+
{
|
|
2238
|
+
"data-theme": theme,
|
|
2239
|
+
className: "polli:max-w-2xl polli:text-theme-text-base",
|
|
2240
|
+
children: intro
|
|
2241
|
+
}
|
|
2242
|
+
),
|
|
2243
|
+
children
|
|
2244
|
+
] })
|
|
2245
|
+
]
|
|
2246
|
+
}
|
|
2247
|
+
);
|
|
1556
2248
|
|
|
1557
2249
|
// src/primitives/Slider.tsx
|
|
1558
|
-
var
|
|
1559
|
-
var
|
|
2250
|
+
var import_react10 = require("react");
|
|
2251
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1560
2252
|
var toNumber = (value) => {
|
|
1561
2253
|
if (typeof value === "number") return value;
|
|
1562
2254
|
if (typeof value !== "string" || value.trim() === "") return void 0;
|
|
@@ -1583,7 +2275,7 @@ var getProgressPercent = ({
|
|
|
1583
2275
|
(numericValue - numericMin) / (numericMax - numericMin) * 100
|
|
1584
2276
|
);
|
|
1585
2277
|
};
|
|
1586
|
-
var Slider = (0,
|
|
2278
|
+
var Slider = (0, import_react10.forwardRef)(
|
|
1587
2279
|
({ className, defaultValue, max, min, progress, style, value, ...props }, ref) => {
|
|
1588
2280
|
const progressPercent = getProgressPercent({
|
|
1589
2281
|
progress,
|
|
@@ -1596,7 +2288,7 @@ var Slider = (0, import_react8.forwardRef)(
|
|
|
1596
2288
|
...style,
|
|
1597
2289
|
...progressPercent === void 0 ? null : { "--polli-slider-progress": `${progressPercent}%` }
|
|
1598
2290
|
};
|
|
1599
|
-
return /* @__PURE__ */ (0,
|
|
2291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1600
2292
|
"input",
|
|
1601
2293
|
{
|
|
1602
2294
|
ref,
|
|
@@ -1614,7 +2306,7 @@ var Slider = (0, import_react8.forwardRef)(
|
|
|
1614
2306
|
);
|
|
1615
2307
|
|
|
1616
2308
|
// src/primitives/StatCard.tsx
|
|
1617
|
-
var
|
|
2309
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1618
2310
|
var StatCard = ({
|
|
1619
2311
|
label,
|
|
1620
2312
|
value,
|
|
@@ -1624,8 +2316,8 @@ var StatCard = ({
|
|
|
1624
2316
|
labelClassName,
|
|
1625
2317
|
valueClassName,
|
|
1626
2318
|
detailClassName
|
|
1627
|
-
}) => /* @__PURE__ */ (0,
|
|
1628
|
-
/* @__PURE__ */ (0,
|
|
2319
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { "data-theme": theme, className: cn2("polli:text-sm", className), children: [
|
|
2320
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1629
2321
|
"div",
|
|
1630
2322
|
{
|
|
1631
2323
|
className: cn2(
|
|
@@ -1635,7 +2327,7 @@ var StatCard = ({
|
|
|
1635
2327
|
children: label
|
|
1636
2328
|
}
|
|
1637
2329
|
),
|
|
1638
|
-
/* @__PURE__ */ (0,
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1639
2331
|
"div",
|
|
1640
2332
|
{
|
|
1641
2333
|
className: cn2(
|
|
@@ -1645,7 +2337,7 @@ var StatCard = ({
|
|
|
1645
2337
|
children: value
|
|
1646
2338
|
}
|
|
1647
2339
|
),
|
|
1648
|
-
detail && /* @__PURE__ */ (0,
|
|
2340
|
+
detail && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1649
2341
|
"div",
|
|
1650
2342
|
{
|
|
1651
2343
|
className: cn2(
|
|
@@ -1658,11 +2350,11 @@ var StatCard = ({
|
|
|
1658
2350
|
] });
|
|
1659
2351
|
|
|
1660
2352
|
// src/primitives/Switch.tsx
|
|
1661
|
-
var
|
|
2353
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1662
2354
|
var trackClasses = {
|
|
1663
2355
|
off: "polli:bg-gray-200",
|
|
1664
|
-
on: "polli:bg-
|
|
1665
|
-
invalid: "polli:bg-
|
|
2356
|
+
on: "polli:bg-intent-success-bg-light",
|
|
2357
|
+
invalid: "polli:bg-intent-danger-bg-light"
|
|
1666
2358
|
};
|
|
1667
2359
|
var Switch = ({
|
|
1668
2360
|
checked,
|
|
@@ -1674,7 +2366,7 @@ var Switch = ({
|
|
|
1674
2366
|
}) => {
|
|
1675
2367
|
const effectiveStatus = status ?? (checked ? "on" : "off");
|
|
1676
2368
|
const resolvedAriaLabel = ariaLabel ?? (checked ? "Turn off toggle" : "Turn on toggle");
|
|
1677
|
-
return /* @__PURE__ */ (0,
|
|
2369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1678
2370
|
"button",
|
|
1679
2371
|
{
|
|
1680
2372
|
type: "button",
|
|
@@ -1684,11 +2376,11 @@ var Switch = ({
|
|
|
1684
2376
|
onClick: () => onChange(!checked),
|
|
1685
2377
|
disabled,
|
|
1686
2378
|
className: cn2(
|
|
1687
|
-
"polli:relative polli:inline-flex polli:h-7 polli:w-12 polli:shrink-0 polli:items-center polli:rounded-full polli:transition polli:disabled:cursor-not-allowed polli:disabled:opacity-60",
|
|
2379
|
+
"polli-control polli:relative polli:inline-flex polli:h-7 polli:w-12 polli:shrink-0 polli:items-center polli:rounded-full polli:transition polli:disabled:cursor-not-allowed polli:disabled:opacity-60",
|
|
1688
2380
|
trackClasses[effectiveStatus],
|
|
1689
2381
|
className
|
|
1690
2382
|
),
|
|
1691
|
-
children: /* @__PURE__ */ (0,
|
|
2383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1692
2384
|
"span",
|
|
1693
2385
|
{
|
|
1694
2386
|
className: cn2(
|
|
@@ -1701,6 +2393,142 @@ var Switch = ({
|
|
|
1701
2393
|
);
|
|
1702
2394
|
};
|
|
1703
2395
|
|
|
2396
|
+
// src/primitives/Table.tsx
|
|
2397
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2398
|
+
var alignClasses = {
|
|
2399
|
+
left: "polli:text-left",
|
|
2400
|
+
center: "polli:text-center",
|
|
2401
|
+
right: "polli:text-right"
|
|
2402
|
+
};
|
|
2403
|
+
var rowIntentClasses = {
|
|
2404
|
+
default: "",
|
|
2405
|
+
success: "polli:bg-intent-success-bg-light/55",
|
|
2406
|
+
warning: "polli:bg-intent-warning-bg-light/65",
|
|
2407
|
+
danger: "polli:bg-intent-danger-bg-light/65"
|
|
2408
|
+
};
|
|
2409
|
+
var Table = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2410
|
+
"table",
|
|
2411
|
+
{
|
|
2412
|
+
...rest,
|
|
2413
|
+
className: cn2(
|
|
2414
|
+
"polli:w-full polli:border-collapse polli:text-sm",
|
|
2415
|
+
className
|
|
2416
|
+
)
|
|
2417
|
+
}
|
|
2418
|
+
);
|
|
2419
|
+
var TableHead = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2420
|
+
"thead",
|
|
2421
|
+
{
|
|
2422
|
+
...rest,
|
|
2423
|
+
className: cn2(
|
|
2424
|
+
"polli:bg-theme-bg-active polli:text-micro polli:text-theme-text-muted",
|
|
2425
|
+
className
|
|
2426
|
+
)
|
|
2427
|
+
}
|
|
2428
|
+
);
|
|
2429
|
+
var TableBody = ({ className, ...rest }) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2430
|
+
"tbody",
|
|
2431
|
+
{
|
|
2432
|
+
...rest,
|
|
2433
|
+
className: cn2("polli:divide-y polli:divide-theme-border/65", className)
|
|
2434
|
+
}
|
|
2435
|
+
);
|
|
2436
|
+
var TableRow = ({
|
|
2437
|
+
intent = "default",
|
|
2438
|
+
className,
|
|
2439
|
+
...rest
|
|
2440
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2441
|
+
"tr",
|
|
2442
|
+
{
|
|
2443
|
+
...rest,
|
|
2444
|
+
className: cn2(
|
|
2445
|
+
"polli:transition-colors polli:hover:bg-theme-bg-subtle",
|
|
2446
|
+
rowIntentClasses[intent],
|
|
2447
|
+
className
|
|
2448
|
+
)
|
|
2449
|
+
}
|
|
2450
|
+
);
|
|
2451
|
+
var TableHeaderCell = ({
|
|
2452
|
+
align = "left",
|
|
2453
|
+
active = false,
|
|
2454
|
+
sortDirection,
|
|
2455
|
+
onSort,
|
|
2456
|
+
className,
|
|
2457
|
+
children,
|
|
2458
|
+
...rest
|
|
2459
|
+
}) => {
|
|
2460
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
2461
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children }),
|
|
2462
|
+
active && sortDirection && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { "aria-hidden": "true", children: sortDirection === "asc" ? "^" : "v" })
|
|
2463
|
+
] });
|
|
2464
|
+
const classes = cn2(
|
|
2465
|
+
"polli:px-3 polli:py-2 polli:font-bold polli:uppercase polli:tracking-wide",
|
|
2466
|
+
alignClasses[align],
|
|
2467
|
+
active && "polli:text-theme-text-strong",
|
|
2468
|
+
onSort && "polli:cursor-pointer polli:select-none polli:hover:text-theme-text-strong",
|
|
2469
|
+
className
|
|
2470
|
+
);
|
|
2471
|
+
if (!onSort) {
|
|
2472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { ...rest, className: classes, children: content });
|
|
2473
|
+
}
|
|
2474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { ...rest, className: classes, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2475
|
+
"button",
|
|
2476
|
+
{
|
|
2477
|
+
type: "button",
|
|
2478
|
+
onClick: onSort,
|
|
2479
|
+
className: cn2(
|
|
2480
|
+
"polli-control polli:inline-flex polli:w-full polli:items-center polli:gap-1 polli:bg-transparent polli:p-0 polli:font-bold polli:text-inherit",
|
|
2481
|
+
align === "right" && "polli:justify-end",
|
|
2482
|
+
align === "center" && "polli:justify-center"
|
|
2483
|
+
),
|
|
2484
|
+
children: content
|
|
2485
|
+
}
|
|
2486
|
+
) });
|
|
2487
|
+
};
|
|
2488
|
+
var TableCell = ({
|
|
2489
|
+
align = "left",
|
|
2490
|
+
numeric = false,
|
|
2491
|
+
muted = false,
|
|
2492
|
+
className,
|
|
2493
|
+
...rest
|
|
2494
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2495
|
+
"td",
|
|
2496
|
+
{
|
|
2497
|
+
...rest,
|
|
2498
|
+
className: cn2(
|
|
2499
|
+
"polli:px-3 polli:py-2 polli:align-middle",
|
|
2500
|
+
alignClasses[align],
|
|
2501
|
+
numeric && "polli:tabular-nums",
|
|
2502
|
+
muted && "polli:text-theme-text-muted",
|
|
2503
|
+
className
|
|
2504
|
+
)
|
|
2505
|
+
}
|
|
2506
|
+
);
|
|
2507
|
+
|
|
2508
|
+
// src/primitives/Textarea.tsx
|
|
2509
|
+
var import_react11 = require("react");
|
|
2510
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2511
|
+
var Textarea = (0, import_react11.forwardRef)(
|
|
2512
|
+
({ className, error, rows = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2513
|
+
"textarea",
|
|
2514
|
+
{
|
|
2515
|
+
ref,
|
|
2516
|
+
rows,
|
|
2517
|
+
"data-error": error ? "true" : void 0,
|
|
2518
|
+
className: cn2(
|
|
2519
|
+
"polli-textarea polli:w-full polli:rounded-lg polli:border polli:px-3 polli:py-2",
|
|
2520
|
+
"polli:min-h-20 polli:resize-y polli:font-body polli:text-base",
|
|
2521
|
+
"polli:text-gray-950",
|
|
2522
|
+
"polli:transition-colors",
|
|
2523
|
+
"polli:disabled:opacity-50 polli:disabled:cursor-not-allowed",
|
|
2524
|
+
className
|
|
2525
|
+
),
|
|
2526
|
+
...props
|
|
2527
|
+
}
|
|
2528
|
+
)
|
|
2529
|
+
);
|
|
2530
|
+
Textarea.displayName = "Textarea";
|
|
2531
|
+
|
|
1704
2532
|
// src/theme.ts
|
|
1705
2533
|
var themes = [
|
|
1706
2534
|
"amber",
|
|
@@ -1710,16 +2538,14 @@ var themes = [
|
|
|
1710
2538
|
"violet",
|
|
1711
2539
|
"green"
|
|
1712
2540
|
];
|
|
1713
|
-
var themeColors = {
|
|
1714
|
-
amber: "#FEF3C7",
|
|
1715
|
-
blue: "#DBEAFE"
|
|
1716
|
-
};
|
|
1717
2541
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1718
2542
|
0 && (module.exports = {
|
|
2543
|
+
Alert,
|
|
1719
2544
|
AppIcon,
|
|
1720
2545
|
BeakerIcon,
|
|
1721
2546
|
BookIcon,
|
|
1722
2547
|
Button,
|
|
2548
|
+
ButtonGroup,
|
|
1723
2549
|
CheckIcon,
|
|
1724
2550
|
ChevronIcon,
|
|
1725
2551
|
Chip,
|
|
@@ -1732,21 +2558,28 @@ var themeColors = {
|
|
|
1732
2558
|
DiscordIcon,
|
|
1733
2559
|
DownloadIcon,
|
|
1734
2560
|
Dropdown,
|
|
2561
|
+
DropdownItem,
|
|
1735
2562
|
ExternalLinkButton,
|
|
1736
2563
|
ExternalLinkIcon,
|
|
1737
2564
|
Field,
|
|
2565
|
+
FileUpload,
|
|
1738
2566
|
GenApiIcon,
|
|
1739
2567
|
GitHubIcon,
|
|
1740
2568
|
IconButton,
|
|
1741
2569
|
ImageIcon,
|
|
1742
2570
|
InfoTip,
|
|
2571
|
+
InlineLink,
|
|
1743
2572
|
Input,
|
|
2573
|
+
LinkCard,
|
|
1744
2574
|
LockIcon,
|
|
1745
2575
|
MailIcon,
|
|
2576
|
+
Markdown,
|
|
1746
2577
|
McpIcon,
|
|
1747
2578
|
MenuIcon,
|
|
1748
2579
|
MultiSelect,
|
|
2580
|
+
NavItem,
|
|
1749
2581
|
PeriodPicker,
|
|
2582
|
+
Prose,
|
|
1750
2583
|
ScrollArea,
|
|
1751
2584
|
Section,
|
|
1752
2585
|
Slider,
|
|
@@ -1754,7 +2587,14 @@ var themeColors = {
|
|
|
1754
2587
|
Surface,
|
|
1755
2588
|
Switch,
|
|
1756
2589
|
TabButton,
|
|
2590
|
+
Table,
|
|
2591
|
+
TableBody,
|
|
2592
|
+
TableCell,
|
|
2593
|
+
TableHead,
|
|
2594
|
+
TableHeaderCell,
|
|
2595
|
+
TableRow,
|
|
1757
2596
|
TerminalIcon,
|
|
2597
|
+
Textarea,
|
|
1758
2598
|
TokensIcon,
|
|
1759
2599
|
Tooltip,
|
|
1760
2600
|
TrendUpIcon,
|
|
@@ -1764,7 +2604,6 @@ var themeColors = {
|
|
|
1764
2604
|
currentPeriod,
|
|
1765
2605
|
getPeriodBucketKeys,
|
|
1766
2606
|
periodBucketKeyToDate,
|
|
1767
|
-
themeColors,
|
|
1768
2607
|
themes,
|
|
1769
2608
|
useScrollLock
|
|
1770
2609
|
});
|