@xenide-io/the-old-ui-theme 0.6.14 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VOCHIR3W.mjs → chunk-YB4TBWHV.mjs} +1423 -375
- package/dist/index.js +3 -1
- package/dist/index.mjs +43 -45
- package/dist/suite.d.mts +29 -3
- package/dist/suite.d.ts +29 -3
- package/dist/suite.js +1550 -325
- package/dist/suite.mjs +136 -44
- package/dist/ui.js +3 -1
- package/dist/ui.mjs +10 -12
- package/package.json +1 -1
- package/scripts/sync-posthog-icons.mjs +3 -4
- package/src/components/icons/icons.tsx +3 -1
- package/src/suite/components/app-switcher.test.tsx +96 -0
- package/src/suite/components/app-switcher.tsx +57 -39
- package/src/suite/components/suite-integration-picker.tsx +68 -0
- package/src/suite/components/suite-notification-bell.test.tsx +6 -5
- package/src/suite/components/suite-notification-bell.tsx +8 -6
- package/src/suite/index.ts +6 -0
- package/dist/chunk-E5ZBQYEX.mjs +0 -1073
package/dist/suite.js
CHANGED
|
@@ -64,7 +64,7 @@ function preventGesture(event) {
|
|
|
64
64
|
event.preventDefault();
|
|
65
65
|
}
|
|
66
66
|
function useLockMobilePageZoom() {
|
|
67
|
-
(0,
|
|
67
|
+
(0, import_react10.useEffect)(() => {
|
|
68
68
|
if (typeof window.matchMedia !== "function") return;
|
|
69
69
|
const media = window.matchMedia(MOBILE_PAGE_ZOOM_QUERY);
|
|
70
70
|
const meta = document.querySelector('meta[name="viewport"]');
|
|
@@ -96,12 +96,12 @@ function useLockMobilePageZoom() {
|
|
|
96
96
|
};
|
|
97
97
|
}, []);
|
|
98
98
|
}
|
|
99
|
-
var
|
|
99
|
+
var import_react10, MOBILE_PAGE_ZOOM_QUERY, LOCKED_VIEWPORT;
|
|
100
100
|
var init_use_lock_mobile_page_zoom = __esm({
|
|
101
101
|
"src/suite/lib/use-lock-mobile-page-zoom.ts"() {
|
|
102
102
|
"use strict";
|
|
103
103
|
"use client";
|
|
104
|
-
|
|
104
|
+
import_react10 = require("react");
|
|
105
105
|
MOBILE_PAGE_ZOOM_QUERY = "(hover: none) and (pointer: coarse)";
|
|
106
106
|
LOCKED_VIEWPORT = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover";
|
|
107
107
|
}
|
|
@@ -145,7 +145,7 @@ function SuiteThemeProvider({
|
|
|
145
145
|
children
|
|
146
146
|
}) {
|
|
147
147
|
useLockMobilePageZoom();
|
|
148
|
-
const [state, setState] = (0,
|
|
148
|
+
const [state, setState] = (0, import_react11.useState)(() => {
|
|
149
149
|
const theme2 = readStoredTheme(config.storageKey);
|
|
150
150
|
if (typeof document === "undefined") {
|
|
151
151
|
return { theme: theme2, resolvedTheme: config.fallbackTheme };
|
|
@@ -155,10 +155,10 @@ function SuiteThemeProvider({
|
|
|
155
155
|
return { theme: theme2, resolvedTheme: resolvedTheme2 };
|
|
156
156
|
});
|
|
157
157
|
const { theme, resolvedTheme } = state;
|
|
158
|
-
(0,
|
|
158
|
+
(0, import_react11.useEffect)(() => {
|
|
159
159
|
applyTheme(theme, config);
|
|
160
160
|
}, [theme, config]);
|
|
161
|
-
(0,
|
|
161
|
+
(0, import_react11.useEffect)(() => {
|
|
162
162
|
if (theme !== "system") return;
|
|
163
163
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
164
164
|
const update = () => {
|
|
@@ -168,7 +168,7 @@ function SuiteThemeProvider({
|
|
|
168
168
|
media.addEventListener("change", update);
|
|
169
169
|
return () => media.removeEventListener("change", update);
|
|
170
170
|
}, [theme, config]);
|
|
171
|
-
const setTheme = (0,
|
|
171
|
+
const setTheme = (0, import_react11.useCallback)(
|
|
172
172
|
(next) => {
|
|
173
173
|
const resolved = applyTheme(next, config);
|
|
174
174
|
setState({ theme: next, resolvedTheme: resolved });
|
|
@@ -176,7 +176,7 @@ function SuiteThemeProvider({
|
|
|
176
176
|
},
|
|
177
177
|
[config]
|
|
178
178
|
);
|
|
179
|
-
const toggleTheme = (0,
|
|
179
|
+
const toggleTheme = (0, import_react11.useCallback)(() => {
|
|
180
180
|
setState((prev) => {
|
|
181
181
|
const next = resolveTheme(prev.theme, config.fallbackTheme) === "dark" ? "light" : "dark";
|
|
182
182
|
const resolved = applyTheme(next, config);
|
|
@@ -184,26 +184,26 @@ function SuiteThemeProvider({
|
|
|
184
184
|
return { theme: next, resolvedTheme: resolved };
|
|
185
185
|
});
|
|
186
186
|
}, [config]);
|
|
187
|
-
const value = (0,
|
|
187
|
+
const value = (0, import_react11.useMemo)(
|
|
188
188
|
() => ({ theme, resolvedTheme, setTheme, toggleTheme }),
|
|
189
189
|
[theme, resolvedTheme, setTheme, toggleTheme]
|
|
190
190
|
);
|
|
191
|
-
return /* @__PURE__ */ (0,
|
|
191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SuiteThemeContext.Provider, { value, children });
|
|
192
192
|
}
|
|
193
193
|
function useSuiteTheme() {
|
|
194
|
-
const ctx = (0,
|
|
194
|
+
const ctx = (0, import_react11.useContext)(SuiteThemeContext);
|
|
195
195
|
if (!ctx) throw new Error("useTheme must be used within ThemeProvider");
|
|
196
196
|
return ctx;
|
|
197
197
|
}
|
|
198
|
-
var
|
|
198
|
+
var import_react11, import_jsx_runtime22, SuiteThemeContext;
|
|
199
199
|
var init_theme_provider = __esm({
|
|
200
200
|
"src/suite/components/theme-provider.tsx"() {
|
|
201
201
|
"use strict";
|
|
202
202
|
"use client";
|
|
203
|
-
|
|
203
|
+
import_react11 = require("react");
|
|
204
204
|
init_use_lock_mobile_page_zoom();
|
|
205
|
-
|
|
206
|
-
SuiteThemeContext = (0,
|
|
205
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
206
|
+
SuiteThemeContext = (0, import_react11.createContext)(null);
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
|
|
@@ -216,8 +216,8 @@ function SuiteAiBlockNoteMessage({
|
|
|
216
216
|
markdown
|
|
217
217
|
}) {
|
|
218
218
|
const { resolvedTheme } = useSuiteTheme();
|
|
219
|
-
const editor = (0,
|
|
220
|
-
(0,
|
|
219
|
+
const editor = (0, import_react14.useCreateBlockNote)({ schema: assistantSchema });
|
|
220
|
+
(0, import_react13.useEffect)(() => {
|
|
221
221
|
try {
|
|
222
222
|
const blocks = editor.tryParseMarkdownToBlocks(markdown);
|
|
223
223
|
editor.replaceBlocks(
|
|
@@ -230,8 +230,8 @@ function SuiteAiBlockNoteMessage({
|
|
|
230
230
|
]);
|
|
231
231
|
}
|
|
232
232
|
}, [editor, markdown]);
|
|
233
|
-
return /* @__PURE__ */ (0,
|
|
234
|
-
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
234
|
+
import_react14.BlockNoteViewRaw,
|
|
235
235
|
{
|
|
236
236
|
editor,
|
|
237
237
|
editable: false,
|
|
@@ -247,17 +247,17 @@ function SuiteAiBlockNoteMessage({
|
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
}
|
|
250
|
-
var
|
|
250
|
+
var import_react13, import_core, import_react14, import_style, import_jsx_runtime24, assistantSchema;
|
|
251
251
|
var init_ai_message_blocknote = __esm({
|
|
252
252
|
"src/suite/components/ai-message-blocknote.tsx"() {
|
|
253
253
|
"use strict";
|
|
254
254
|
"use client";
|
|
255
|
-
|
|
255
|
+
import_react13 = require("react");
|
|
256
256
|
import_core = require("@blocknote/core");
|
|
257
|
-
|
|
257
|
+
import_react14 = require("@blocknote/react");
|
|
258
258
|
import_style = require("@blocknote/react/style.css");
|
|
259
259
|
init_theme_provider();
|
|
260
|
-
|
|
260
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
261
261
|
assistantSchema = import_core.BlockNoteSchema.create({
|
|
262
262
|
blockSpecs: {
|
|
263
263
|
paragraph: import_core.defaultBlockSpecs.paragraph,
|
|
@@ -311,6 +311,7 @@ __export(suite_exports, {
|
|
|
311
311
|
SuiteBreadcrumbs: () => SuiteBreadcrumbs,
|
|
312
312
|
SuiteEmptyState: () => SuiteEmptyState,
|
|
313
313
|
SuiteIcon: () => SuiteIcon,
|
|
314
|
+
SuiteIntegrationPicker: () => SuiteIntegrationPicker,
|
|
314
315
|
SuiteMobileDrawer: () => SuiteMobileDrawer,
|
|
315
316
|
SuiteMobileHeader: () => SuiteMobileHeader,
|
|
316
317
|
SuiteMotionProvider: () => SuiteMotionProvider,
|
|
@@ -350,7 +351,7 @@ __export(suite_exports, {
|
|
|
350
351
|
consumePendingAskAiPrompt: () => consumePendingAskAiPrompt,
|
|
351
352
|
consumeSuiteAskAiOpenFromLocation: () => consumeSuiteAskAiOpenFromLocation,
|
|
352
353
|
getTodayGreeting: () => getTodayGreeting,
|
|
353
|
-
m: () =>
|
|
354
|
+
m: () => import_react18.m,
|
|
354
355
|
openSuiteAskAi: () => openSuiteAskAi,
|
|
355
356
|
pathWithSuiteAskAiOpen: () => pathWithSuiteAskAiOpen,
|
|
356
357
|
persistSidebarWidth: () => persistSidebarWidth,
|
|
@@ -474,7 +475,7 @@ var APP_GLYPHS = {
|
|
|
474
475
|
// src/suite/icons/glyph-parts.tsx
|
|
475
476
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
476
477
|
function GlyphElement({ element }) {
|
|
477
|
-
const
|
|
478
|
+
const fill2 = element.filled ? "currentColor" : "none";
|
|
478
479
|
const stroke = element.filled ? "none" : void 0;
|
|
479
480
|
switch (element.kind) {
|
|
480
481
|
case "path":
|
|
@@ -482,7 +483,7 @@ function GlyphElement({ element }) {
|
|
|
482
483
|
"path",
|
|
483
484
|
{
|
|
484
485
|
d: element.d,
|
|
485
|
-
fill,
|
|
486
|
+
fill: fill2,
|
|
486
487
|
stroke,
|
|
487
488
|
transform: element.transform
|
|
488
489
|
}
|
|
@@ -494,7 +495,7 @@ function GlyphElement({ element }) {
|
|
|
494
495
|
cx: element.cx,
|
|
495
496
|
cy: element.cy,
|
|
496
497
|
r: element.r,
|
|
497
|
-
fill,
|
|
498
|
+
fill: fill2,
|
|
498
499
|
stroke
|
|
499
500
|
}
|
|
500
501
|
);
|
|
@@ -507,7 +508,7 @@ function GlyphElement({ element }) {
|
|
|
507
508
|
width: element.width,
|
|
508
509
|
height: element.height,
|
|
509
510
|
rx: element.rx,
|
|
510
|
-
fill,
|
|
511
|
+
fill: fill2,
|
|
511
512
|
stroke
|
|
512
513
|
}
|
|
513
514
|
);
|
|
@@ -1370,43 +1371,53 @@ function AppSwitcher({
|
|
|
1370
1371
|
),
|
|
1371
1372
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { id: "app-switcher-menu", className: "p-1", "data-test": "app-switcher-menu", children: [
|
|
1372
1373
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "px-3 py-2 text-[10px] font-semibold uppercase tracking-[0.14em] text-ph-mutedtext", children: "Switch application" }),
|
|
1373
|
-
apps.map((app) => /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1374
|
+
apps.filter((app) => app.slug !== currentApp).map((app) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "relative", children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1376
|
+
DropdownItem2,
|
|
1377
|
+
{
|
|
1378
|
+
id: `switch-app-${app.slug}`,
|
|
1379
|
+
"data-test": `switch-app-${app.slug}`,
|
|
1380
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1381
|
+
onClick: () => {
|
|
1382
|
+
setOpen(false);
|
|
1383
|
+
onSelect(app);
|
|
1384
|
+
},
|
|
1385
|
+
className: cn(appSwitcherMenuItemClass(), "pr-11"),
|
|
1386
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex min-w-0 items-center gap-3", children: [
|
|
1387
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1388
|
+
import_image.default,
|
|
1389
|
+
{
|
|
1390
|
+
src: app.icon,
|
|
1391
|
+
alt: "",
|
|
1392
|
+
width: 28,
|
|
1393
|
+
height: 28,
|
|
1394
|
+
className: "h-7 w-7 shrink-0 rounded-md object-contain"
|
|
1395
|
+
}
|
|
1396
|
+
),
|
|
1397
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
1398
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: app.name }),
|
|
1399
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "block truncate text-xs text-ph-mutedtext", children: app.description })
|
|
1400
|
+
] })
|
|
1401
|
+
] })
|
|
1402
|
+
}
|
|
1403
|
+
),
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1405
|
+
"button",
|
|
1406
|
+
{
|
|
1407
|
+
type: "button",
|
|
1408
|
+
id: `switch-app-${app.slug}-new-tab`,
|
|
1409
|
+
"data-test": `switch-app-${app.slug}-new-tab`,
|
|
1410
|
+
"aria-label": `Open ${app.name} in a new tab`,
|
|
1411
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
1412
|
+
onClick: () => {
|
|
1413
|
+
setOpen(false);
|
|
1414
|
+
onSelect(app, { newTab: true });
|
|
1415
|
+
},
|
|
1416
|
+
className: "absolute right-1.5 top-1/2 z-[1] flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-md text-ph-mutedtext transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-ph-brand/35",
|
|
1417
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_iconoir_react2.OpenNewWindow, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
1418
|
+
}
|
|
1419
|
+
)
|
|
1420
|
+
] }, app.slug))
|
|
1410
1421
|
] })
|
|
1411
1422
|
}
|
|
1412
1423
|
);
|
|
@@ -1643,10 +1654,10 @@ function SuiteNotificationBell({
|
|
|
1643
1654
|
panelClassName: "w-80 overflow-hidden p-0",
|
|
1644
1655
|
open,
|
|
1645
1656
|
onOpenChange,
|
|
1646
|
-
trigger: /* @__PURE__ */ (0, import_jsx_runtime7.
|
|
1657
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "relative inline-flex h-11 w-11 items-center justify-center overflow-visible rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "relative inline-flex h-5 w-5", children: [
|
|
1647
1658
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_iconoir_react3.Bell, { className: "h-5 w-5", strokeWidth: 1.75, "aria-hidden": true }),
|
|
1648
|
-
unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pointer-events-none absolute right-
|
|
1649
|
-
] }),
|
|
1659
|
+
unread > 0 ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "pointer-events-none absolute -right-2 -top-2 z-[1] flex h-4 min-w-4 items-center justify-center rounded-full bg-ph-brand px-1 text-[9px] font-semibold leading-none text-white ring-2 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
|
|
1660
|
+
] }) }),
|
|
1650
1661
|
children: [
|
|
1651
1662
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center justify-between border-b border-ph-border px-3 py-2", children: [
|
|
1652
1663
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-sm font-semibold text-ph-ink", children: "Notifications" }),
|
|
@@ -2259,13 +2270,552 @@ var import_iconoir_react6 = require("iconoir-react");
|
|
|
2259
2270
|
// src/components/ui/DropdownMenu.tsx
|
|
2260
2271
|
var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2261
2272
|
|
|
2273
|
+
// src/components/icons/IconBase.tsx
|
|
2274
|
+
var import_react7 = require("react");
|
|
2275
|
+
|
|
2262
2276
|
// src/lib/cn.ts
|
|
2263
2277
|
function cn2(...parts) {
|
|
2264
2278
|
return parts.filter(Boolean).join(" ");
|
|
2265
2279
|
}
|
|
2266
2280
|
|
|
2267
|
-
// src/components/
|
|
2281
|
+
// src/components/icons/IconBase.tsx
|
|
2268
2282
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2283
|
+
var IconBase = (0, import_react7.forwardRef)(function IconBase2(_a, ref) {
|
|
2284
|
+
var _b = _a, {
|
|
2285
|
+
className,
|
|
2286
|
+
size,
|
|
2287
|
+
children,
|
|
2288
|
+
viewBox = "0 0 24 24",
|
|
2289
|
+
fill: fill2 = "none",
|
|
2290
|
+
xmlns = "http://www.w3.org/2000/svg",
|
|
2291
|
+
focusable = "false",
|
|
2292
|
+
style,
|
|
2293
|
+
role,
|
|
2294
|
+
"aria-hidden": ariaHidden,
|
|
2295
|
+
"aria-label": ariaLabel,
|
|
2296
|
+
"aria-labelledby": ariaLabelledBy
|
|
2297
|
+
} = _b, props = __objRest(_b, [
|
|
2298
|
+
"className",
|
|
2299
|
+
"size",
|
|
2300
|
+
"children",
|
|
2301
|
+
"viewBox",
|
|
2302
|
+
"fill",
|
|
2303
|
+
"xmlns",
|
|
2304
|
+
"focusable",
|
|
2305
|
+
"style",
|
|
2306
|
+
"role",
|
|
2307
|
+
"aria-hidden",
|
|
2308
|
+
"aria-label",
|
|
2309
|
+
"aria-labelledby"
|
|
2310
|
+
]);
|
|
2311
|
+
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
2312
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2313
|
+
"svg",
|
|
2314
|
+
__spreadProps(__spreadValues({
|
|
2315
|
+
ref,
|
|
2316
|
+
className: cn2("ph-icon", className),
|
|
2317
|
+
viewBox,
|
|
2318
|
+
fill: fill2,
|
|
2319
|
+
xmlns,
|
|
2320
|
+
focusable,
|
|
2321
|
+
role: role != null ? role : hasAccessibleName ? "img" : void 0,
|
|
2322
|
+
"aria-hidden": ariaHidden != null ? ariaHidden : hasAccessibleName ? void 0 : true,
|
|
2323
|
+
"aria-label": ariaLabel,
|
|
2324
|
+
"aria-labelledby": ariaLabelledBy,
|
|
2325
|
+
style: __spreadValues({ width: size, height: size }, style)
|
|
2326
|
+
}, props), {
|
|
2327
|
+
children
|
|
2328
|
+
})
|
|
2329
|
+
);
|
|
2330
|
+
});
|
|
2331
|
+
IconBase.displayName = "IconBase";
|
|
2332
|
+
|
|
2333
|
+
// src/components/icons/createIconBase.tsx
|
|
2334
|
+
var import_react8 = require("react");
|
|
2335
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2336
|
+
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
2337
|
+
const IconGlyph = (0, import_react8.forwardRef)(function IconGlyph2(props, ref) {
|
|
2338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
2339
|
+
});
|
|
2340
|
+
IconGlyph.displayName = name;
|
|
2341
|
+
return IconGlyph;
|
|
2342
|
+
}
|
|
2343
|
+
function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
2344
|
+
return createIconBase({
|
|
2345
|
+
name,
|
|
2346
|
+
viewBox,
|
|
2347
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d, fill: "currentColor" })
|
|
2348
|
+
});
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
// src/components/icons/icons.tsx
|
|
2352
|
+
var import_react9 = require("react");
|
|
2353
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2354
|
+
var fill = (d) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d, fill: "currentColor" });
|
|
2355
|
+
var IconAreaChart = createIconBase({
|
|
2356
|
+
paths: fill("M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z")
|
|
2357
|
+
});
|
|
2358
|
+
var IconCumulativeChart = createIconBase({
|
|
2359
|
+
paths: fill(
|
|
2360
|
+
"M20.8805 7.97408C15.0614 18.7809 6.51281 19.5979 2.71265 18.4578L3.28734 16.5422C6.15384 17.4021 13.7386 17.0191 19.1195 7.02588L20.8805 7.97408Z"
|
|
2361
|
+
)
|
|
2362
|
+
});
|
|
2363
|
+
var IconTableChart = createIconBase({
|
|
2364
|
+
paths: fill(
|
|
2365
|
+
"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"
|
|
2366
|
+
)
|
|
2367
|
+
});
|
|
2368
|
+
var IconHandClick = createIconBase({
|
|
2369
|
+
viewBox: "0 0 18 18",
|
|
2370
|
+
paths: fill(
|
|
2371
|
+
"M14.9942 7.90164C14.9942 7.82992 14.9583 7.46993 14.6342 7.10993C14.2925 6.71407 13.7524 6.49822 13.05 6.44407C12.9783 6.33579 12.8883 6.22822 12.7442 6.11993C12.3483 5.81407 11.7359 5.65164 10.9442 5.63407C10.8724 5.54407 10.7459 5.43578 10.6024 5.32822C10.2425 5.0765 9.79245 4.93236 9.23416 4.87822V3.41993C9.23416 3.27579 9.25244 2.66407 8.83831 2.23164C8.65831 2.03335 8.31659 1.79993 7.74002 1.79993C7.14587 1.79993 6.80416 2.03407 6.60587 2.23164C6.22759 2.64578 6.22759 3.18578 6.22759 3.31164V8.46C5.88587 8.1 5.50759 7.70414 5.29173 7.56C4.84173 7.21829 3.99587 7.39828 3.51002 7.75829C3.04173 8.1 2.88002 8.62243 3.06002 9.12658C3.38416 10.0266 4.19416 10.9266 4.39173 11.1424C4.57173 11.4841 5.38173 12.9782 6.10173 13.5182C6.48002 13.8065 6.76759 14.9941 6.84002 15.7499L6.87588 16.1457H13.6801V14.364C13.7701 14.1123 13.9859 13.5723 14.2201 13.3199C14.7783 12.7616 14.9583 11.3582 14.9583 10.9257V7.91986L14.9942 7.90164ZM14.1117 10.89C14.1117 11.4117 13.8959 12.4017 13.6259 12.6717C13.1576 13.14 12.87 14.04 12.8517 14.13L12.8335 14.1841V15.2283H7.68583C7.64997 15.03 7.61411 14.7783 7.54169 14.5083C7.32583 13.6441 7.03754 13.0866 6.65998 12.7983C6.13826 12.4024 5.39998 11.1241 5.16583 10.6566L5.09411 10.5484C5.09411 10.5301 4.2124 9.63008 3.90582 8.80251C3.86996 8.69423 3.86996 8.60422 3.99582 8.47836C4.22997 8.26251 4.67997 8.20836 4.78754 8.24422C5.05754 8.46008 5.88582 9.34251 6.35339 9.86422L7.12754 10.7284L7.12824 3.29418V3.25762C7.12824 3.1859 7.14652 2.95176 7.27238 2.82591C7.36238 2.71763 7.52409 2.66419 7.75824 2.66419C7.95652 2.66419 8.09995 2.71833 8.20824 2.80833C8.35238 2.97005 8.36996 3.25833 8.36996 3.36662V8.02826H9.25167V5.7599C10.0617 5.8499 10.2958 6.19161 10.3317 6.24575L10.3675 6.33575V8.02747H11.2492V6.53332C12.0051 6.60504 12.2934 6.83918 12.3651 6.94747V8.65747H13.2468V7.34332C14.021 7.4516 14.1468 7.86504 14.1651 7.95504L14.1658 10.8899L14.1117 10.89Z"
|
|
2372
|
+
)
|
|
2373
|
+
});
|
|
2374
|
+
var IconSurveys = createIconBase({
|
|
2375
|
+
paths: fill(
|
|
2376
|
+
"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z"
|
|
2377
|
+
)
|
|
2378
|
+
});
|
|
2379
|
+
var IconCohort = createIconBase({
|
|
2380
|
+
paths: fill(
|
|
2381
|
+
"m4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58-.74.32-1.22 1.04-1.22 1.85v1.57h4.5v-1.61c0-.83.23-1.61.63-2.29zm14.87-1.1c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29v1.61h4.5zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9s-3.07.39-4.24.9c-1.08.48-1.76 1.56-1.76 2.74v1.61h12v-1.61c0-1.18-.68-2.26-1.76-2.74zm-8.17 2.35c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zm3.93-8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
|
|
2382
|
+
)
|
|
2383
|
+
});
|
|
2384
|
+
var IconRecording = createIconBase({
|
|
2385
|
+
paths: fill(
|
|
2386
|
+
"m10 8v8l5-4zm9-5h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z"
|
|
2387
|
+
)
|
|
2388
|
+
});
|
|
2389
|
+
var IconFlare = createIconBase({
|
|
2390
|
+
paths: fill(
|
|
2391
|
+
"m7 11h-6v2h6zm2.17-3.24-2.12-2.12-1.41 1.41 2.12 2.12zm3.83-6.76h-2v6h2zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41zm-1.36 3.95v2h6v-2zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41zm5.36 6.05h2v-6h-2z"
|
|
2392
|
+
)
|
|
2393
|
+
});
|
|
2394
|
+
var IconSelectEvents = createIconBase({
|
|
2395
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2396
|
+
fill("M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z"),
|
|
2397
|
+
fill("M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z"),
|
|
2398
|
+
fill("M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z"),
|
|
2399
|
+
fill("M16.23 14.26L20 13L10 10L13 20L14.26 16.23L18.53 20.5L20.51 18.52L16.23 14.26Z")
|
|
2400
|
+
] })
|
|
2401
|
+
});
|
|
2402
|
+
var IconClipboardEdit = createIconBase({
|
|
2403
|
+
paths: fill(
|
|
2404
|
+
"M21.04 12.13C21.18 12.13 21.31 12.19 21.42 12.3L22.7 13.58C22.92 13.79 22.92 14.14 22.7 14.35L21.7 15.35L19.65 13.3L20.65 12.3C20.76 12.19 20.9 12.13 21.04 12.13M19.07 13.88L21.12 15.93L15.06 22H13V19.94L19.07 13.88M11 19L9 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3H19C20.1 3 21 3.9 21 5V9L19 11V5H17V7H7V5H5V19H11M12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4C13 3.45 12.55 3 12 3Z"
|
|
2405
|
+
)
|
|
2406
|
+
});
|
|
2407
|
+
var IconQueryEditor = createIconBase({
|
|
2408
|
+
paths: fill(
|
|
2409
|
+
"M4,14V17C4,19 7.05,20.72 11,21V18.11L11.13,18C7.12,17.76 4,16.06 4,14M12,13C7.58,13 4,11.21 4,9V12C4,14.21 7.58,16 12,16C12.39,16 12.77,16 13.16,16L17,12.12C15.4,12.72 13.71,13 12,13M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M21,11.13C20.85,11.13 20.71,11.19 20.61,11.3L19.61,12.3L21.66,14.3L22.66,13.3C22.87,13.1 22.88,12.76 22.66,12.53L21.42,11.3C21.32,11.19 21.18,11.13 21.04,11.13M19.04,12.88L13,18.94V21H15.06L21.12,14.93L19.04,12.88Z"
|
|
2410
|
+
)
|
|
2411
|
+
});
|
|
2412
|
+
var IconTuning = createIconBase({
|
|
2413
|
+
paths: fill(
|
|
2414
|
+
"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"
|
|
2415
|
+
)
|
|
2416
|
+
});
|
|
2417
|
+
var IconSync = createIconBase({
|
|
2418
|
+
paths: fill(
|
|
2419
|
+
"m12.5 4v-3l-4 4 4 4v-3c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46c.78-1.23 1.24-2.69 1.24-4.26 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8l-1.46-1.46c-.78 1.23-1.24 2.69-1.24 4.26 0 4.42 3.58 8 8 8v3l4-4-4-4z"
|
|
2420
|
+
)
|
|
2421
|
+
});
|
|
2422
|
+
var IconPlayCircle = createIconBase({
|
|
2423
|
+
paths: fill(
|
|
2424
|
+
"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM9.5 16.5L16.5 12L9.5 7.5V16.5Z"
|
|
2425
|
+
)
|
|
2426
|
+
});
|
|
2427
|
+
var IconGridView = createIconBase({
|
|
2428
|
+
paths: fill(
|
|
2429
|
+
"M3,3v8h8V3H3z M9,9H5V5h4V9z M3,13v8h8v-8H3z M9,19H5v-4h4V19z M13,3v8h8V3H13z M19,9h-4V5h4V9z M13,13v8h8v-8H13z M19,19h-4v-4h4V19z"
|
|
2430
|
+
)
|
|
2431
|
+
});
|
|
2432
|
+
var IconListView = createIconBase({
|
|
2433
|
+
paths: fill(
|
|
2434
|
+
"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z"
|
|
2435
|
+
)
|
|
2436
|
+
});
|
|
2437
|
+
var IconPremium = createIconBase({
|
|
2438
|
+
paths: fill(
|
|
2439
|
+
"m9.68 13.69 2.32-1.76 2.31 1.76-.88-2.85 2.32-1.84h-2.84l-.91-2.81-.91 2.81h-2.84l2.31 1.84zm10.32-3.69c0-4.42-3.58-8-8-8s-8 3.58-8 8c0 2.03.76 3.87 2 5.28v7.72l6-2 6 2v-7.72c1.24-1.41 2-3.25 2-5.28zm-8-6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zm0 15-4 1.02v-3.1c1.18.68 2.54 1.08 4 1.08s2.82-.4 4-1.08v3.1z"
|
|
2440
|
+
)
|
|
2441
|
+
});
|
|
2442
|
+
var IconGift = createIconBase({
|
|
2443
|
+
paths: fill(
|
|
2444
|
+
"M14.4495 4.55495C15.264 4.31223 15.8631 4.48426 16.1 4.80007C16.4013 5.20182 16.4765 5.57305 16.4336 5.91424C16.3888 6.27088 16.2084 6.63998 15.9211 7.00139C15.3397 7.73275 14.4193 8.30877 13.8244 8.53186C13.598 8.61674 13.4648 8.85138 13.508 9.08924C13.5511 9.32709 13.7582 9.50002 13.9999 9.50002L19.4999 9.50002V12.5H17.9999C17.7237 12.5 17.4999 12.7239 17.4999 13V20.5H6.49988V14.5C6.49988 14.2239 6.27602 14 5.99988 14C5.72374 14 5.49988 14.2239 5.49988 14.5V21C5.49988 21.2762 5.72374 21.5 5.99988 21.5H17.9999C18.276 21.5 18.4999 21.2762 18.4999 21V13.5H19.9999C20.276 13.5 20.4999 13.2762 20.4999 13V9.00002C20.4999 8.86741 20.4472 8.74023 20.3534 8.64646C20.2597 8.5527 20.1325 8.50002 19.9999 8.50002L15.8202 8.50002C16.1407 8.24235 16.4465 7.94742 16.7039 7.62365C17.0625 7.17257 17.3508 6.63541 17.4258 6.03894C17.5027 5.42702 17.3487 4.79826 16.8999 4.20003C16.2882 3.3845 15.1373 3.30652 14.1639 3.5966C13.3806 3.83005 12.5842 4.3279 12.0008 5.07014C11.4285 4.33982 10.6586 3.86464 9.88727 3.64427C8.91382 3.36616 7.82238 3.47045 7.14633 4.14645C6.65753 4.63523 6.41235 5.18234 6.41347 5.75925C6.41457 6.32144 6.64952 6.84016 6.97799 7.28883C7.30058 7.72946 7.7389 8.13769 8.22434 8.50002L3.99988 8.50002C3.86727 8.50002 3.74009 8.5527 3.64632 8.64646C3.55256 8.74023 3.49988 8.86741 3.49988 9.00002V13C3.49988 13.2762 3.72374 13.5 3.99988 13.5H15.4999C15.776 13.5 15.9999 13.2762 15.9999 13C15.9999 12.7239 15.776 12.5 15.4999 12.5H4.49988V9.50002L9.99995 9.50002C10.2318 9.50002 10.4333 9.34058 10.4866 9.1149C10.5398 8.88921 10.431 8.65651 10.2236 8.55281C9.25206 8.06706 8.29723 7.39797 7.78487 6.69811C7.53216 6.35292 7.41402 6.03722 7.41347 5.7573C7.41295 5.49209 7.51758 5.1894 7.85342 4.85358C8.17738 4.52964 8.83597 4.38393 9.61256 4.6058C10.3657 4.82096 11.1212 5.36045 11.5528 6.22359C11.6375 6.39298 11.8106 6.49997 12 6.49997C12.1894 6.49997 12.3625 6.39297 12.4472 6.22358C12.8783 5.36141 13.672 4.78667 14.4495 4.55495Z"
|
|
2445
|
+
)
|
|
2446
|
+
});
|
|
2447
|
+
var IconRobot = createIconBase({
|
|
2448
|
+
paths: fill(
|
|
2449
|
+
"M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z"
|
|
2450
|
+
)
|
|
2451
|
+
});
|
|
2452
|
+
var IconExclamation = createIconBase({
|
|
2453
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("g", { fill: "currentColor", children: [
|
|
2454
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z" }),
|
|
2455
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "m10 3h4v12h-4z" })
|
|
2456
|
+
] })
|
|
2457
|
+
});
|
|
2458
|
+
var IconErrorOutline = createIconBase({
|
|
2459
|
+
paths: fill(
|
|
2460
|
+
"m11 15h2v2h-2zm0-8h2v6h-2zm.99-5c-5.52 0-9.99 4.48-9.99 10s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10s-4.48-10-10.01-10zm.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
2461
|
+
)
|
|
2462
|
+
});
|
|
2463
|
+
var IconInfo = createIconBase({
|
|
2464
|
+
name: "IconInfo",
|
|
2465
|
+
paths: fill(
|
|
2466
|
+
"M11 10h2v7h-2v-7zm0-3h2v2h-2V7zm1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
2467
|
+
)
|
|
2468
|
+
});
|
|
2469
|
+
var IconCancel = createIconBase({
|
|
2470
|
+
paths: fill(
|
|
2471
|
+
"m12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13-3.59 3.59-3.59-3.59-1.41 1.41 3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59z"
|
|
2472
|
+
)
|
|
2473
|
+
});
|
|
2474
|
+
var IconCheckCircle = createIconBase({
|
|
2475
|
+
paths: fill(
|
|
2476
|
+
"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
2477
|
+
)
|
|
2478
|
+
});
|
|
2479
|
+
var IconArrowUp = createIconBase({
|
|
2480
|
+
paths: fill("M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z")
|
|
2481
|
+
});
|
|
2482
|
+
var IconArrowDown = createIconBase({
|
|
2483
|
+
paths: fill("M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z")
|
|
2484
|
+
});
|
|
2485
|
+
var IconChevronLeft = createIconBasePath("M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z");
|
|
2486
|
+
var IconChevronRight = createIconBasePath("M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z");
|
|
2487
|
+
var IconChevronDown = createIconBasePath("M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z");
|
|
2488
|
+
var IconSubArrowRight = createIconBase({
|
|
2489
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("g", { transform: "translate(4 5.5)", children: fill("M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z") })
|
|
2490
|
+
});
|
|
2491
|
+
var IconSearch = createIconBasePath(
|
|
2492
|
+
"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
2493
|
+
);
|
|
2494
|
+
var IconBell = createIconBasePath(
|
|
2495
|
+
"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"
|
|
2496
|
+
);
|
|
2497
|
+
var IconBellOff = createIconBasePath(
|
|
2498
|
+
"M20 18.69 7.84 6.14 5.27 3.49 4 4.76l2.8 2.8v.01c-.52.99-.8 2.16-.8 3.42v5l-2 2v1h13.73l2 2L21 19.72zM12 22c1.11 0 2-.89 2-2h-4c0 1.11.89 2 2 2m6-7.32V11c0-3.08-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.15.03-.29.08-.42.12-.1.03-.2.07-.3.11h-.01c-.01 0-.01 0-.02.01-.23.09-.46.2-.68.31 0 0-.01 0-.01.01z"
|
|
2499
|
+
);
|
|
2500
|
+
var IconPerson = createIconBasePath(
|
|
2501
|
+
"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
2502
|
+
);
|
|
2503
|
+
var IconHome = createIconBasePath("M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z");
|
|
2504
|
+
var IconPanelRight = createIconBasePath(
|
|
2505
|
+
"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2zm12 4h-5v10h5V9zm-7 0H5v10h3V9z"
|
|
2506
|
+
);
|
|
2507
|
+
var IconPlus = createIconBasePath("M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z");
|
|
2508
|
+
var IconCheck = createIconBasePath("M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z");
|
|
2509
|
+
var IconClose = createIconBasePath("M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z");
|
|
2510
|
+
var IconTrash = createIconBasePath("M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z");
|
|
2511
|
+
var IconDownload = createIconBasePath("M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z");
|
|
2512
|
+
var IconUpload = createIconBasePath("M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z");
|
|
2513
|
+
var IconSave = createIconBasePath(
|
|
2514
|
+
"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"
|
|
2515
|
+
);
|
|
2516
|
+
var IconCopy = createIconBasePath(
|
|
2517
|
+
"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"
|
|
2518
|
+
);
|
|
2519
|
+
var IconEdit = createIconBasePath(
|
|
2520
|
+
"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"
|
|
2521
|
+
);
|
|
2522
|
+
var IconLogout = createIconBasePath(
|
|
2523
|
+
"M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.59L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"
|
|
2524
|
+
);
|
|
2525
|
+
var IconStar = createIconBasePath(
|
|
2526
|
+
"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
|
|
2527
|
+
);
|
|
2528
|
+
var IconMail = createIconBasePath(
|
|
2529
|
+
"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"
|
|
2530
|
+
);
|
|
2531
|
+
var IconShoppingCart = createIconBasePath(
|
|
2532
|
+
"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"
|
|
2533
|
+
);
|
|
2534
|
+
var IconMoon = createIconBasePath(
|
|
2535
|
+
"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"
|
|
2536
|
+
);
|
|
2537
|
+
var IconSun = createIconBasePath(
|
|
2538
|
+
"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"
|
|
2539
|
+
);
|
|
2540
|
+
var IconVolume = createIconBasePath(
|
|
2541
|
+
"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"
|
|
2542
|
+
);
|
|
2543
|
+
var IconVolumeOff = createIconBasePath(
|
|
2544
|
+
"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"
|
|
2545
|
+
);
|
|
2546
|
+
var IconFlag = createIconBasePath("M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6z");
|
|
2547
|
+
var IconDatabase = createIconBasePath(
|
|
2548
|
+
"M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4 8-1.79 8-4-3.58-4-8-4zM4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4zm0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4z"
|
|
2549
|
+
);
|
|
2550
|
+
var IconLayers = createIconBasePath("M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z");
|
|
2551
|
+
var IconBox = createIconBasePath(
|
|
2552
|
+
"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
|
|
2553
|
+
);
|
|
2554
|
+
var IconBolt = createIconBasePath(
|
|
2555
|
+
"M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66-.19-.34-.04-.12-.07-.12C8.48 10.94 10.42 7.54 11 7V3h1v4c.58 0 .57.32.38.66-.19-.34-.04-.12-.07-.12-.95 2.28-2.96 5.66-3.31 6.22H13l-1 7h-1z"
|
|
2556
|
+
);
|
|
2557
|
+
var IconRadar = createIconBasePath(
|
|
2558
|
+
"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z"
|
|
2559
|
+
);
|
|
2560
|
+
var IconToggle = createIconBasePath(
|
|
2561
|
+
"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8H7c-1.66 0-3-1.34-3-3s1.34-3 3-3h10c1.66 0 3 1.34 3 3s-1.34 3-3 3zM7 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
|
2562
|
+
);
|
|
2563
|
+
var IconRocket = createIconBasePath(
|
|
2564
|
+
"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55l1.33 1.26zm5.45 8.67l-1.33-1.26c-.66-.13-1.34.08-1.81.55L2 18.31l3.62 3.57c.31-.13 3.6-1.53 5.89-3.57 1.53-1.72 2.52-3.76 2.87-5.02zM12 2c-1.1 0-2 .9-2 2v1.09c2.84.48 5 2.94 5 5.91 0 2.97-2.16 5.43-5 5.91V20c0 1.1.9 2 2 2s2-.9 2-2v-1.09c-2.84-.48-5-2.94-5-5.91 0-2.97 2.16-5.43 5-5.91V4c0-1.1-.9-2-2-2z"
|
|
2565
|
+
);
|
|
2566
|
+
var IconTerminal = createIconBase({
|
|
2567
|
+
name: "IconTerminal",
|
|
2568
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2569
|
+
"path",
|
|
2570
|
+
{
|
|
2571
|
+
d: "M3 4v16h18V4H3zm2 2h14v12H5V6zm2 2.2L10.8 12 7 15.8 8.4 17.2l5.2-5.2-5.2-5.2L7 8.2zM13 17h5v-2h-5v2z",
|
|
2572
|
+
fill: "currentColor",
|
|
2573
|
+
fillRule: "evenodd",
|
|
2574
|
+
clipRule: "evenodd"
|
|
2575
|
+
}
|
|
2576
|
+
)
|
|
2577
|
+
});
|
|
2578
|
+
var IconOldWindow = createIconBase({
|
|
2579
|
+
name: "IconOldWindow",
|
|
2580
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2581
|
+
"path",
|
|
2582
|
+
{
|
|
2583
|
+
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
2584
|
+
fill: "currentColor",
|
|
2585
|
+
fillRule: "evenodd",
|
|
2586
|
+
clipRule: "evenodd"
|
|
2587
|
+
}
|
|
2588
|
+
)
|
|
2589
|
+
});
|
|
2590
|
+
var IconCommandCursor = createIconBase({
|
|
2591
|
+
name: "IconCommandCursor",
|
|
2592
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2593
|
+
"path",
|
|
2594
|
+
{
|
|
2595
|
+
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
2596
|
+
fill: "currentColor",
|
|
2597
|
+
fillRule: "evenodd",
|
|
2598
|
+
clipRule: "evenodd"
|
|
2599
|
+
}
|
|
2600
|
+
)
|
|
2601
|
+
});
|
|
2602
|
+
var IconDataReel = createIconBase({
|
|
2603
|
+
name: "IconDataReel",
|
|
2604
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2605
|
+
"path",
|
|
2606
|
+
{
|
|
2607
|
+
d: "M3 5v14h18V5H3zm2 2h14v10H5V7zm3 1a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm8 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM10 11h4v1.5h-4V11z",
|
|
2608
|
+
fill: "currentColor",
|
|
2609
|
+
fillRule: "evenodd",
|
|
2610
|
+
clipRule: "evenodd"
|
|
2611
|
+
}
|
|
2612
|
+
)
|
|
2613
|
+
});
|
|
2614
|
+
var IconCodePreview = createIconBase({
|
|
2615
|
+
name: "IconCodePreview",
|
|
2616
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2617
|
+
"path",
|
|
2618
|
+
{
|
|
2619
|
+
d: "M3 3v15h18V3H3zm2 2h14v11H5V5zm3.5 2L5 10.5 8.5 14l1.4-1.4-2.1-2.1 2.1-2.1L8.5 7zm7 0-1.4 1.4 2.1 2.1-2.1 2.1 1.4 1.4 3.5-3.5L15.5 7zM9 20h6v2H9v-2z",
|
|
2620
|
+
fill: "currentColor",
|
|
2621
|
+
fillRule: "evenodd",
|
|
2622
|
+
clipRule: "evenodd"
|
|
2623
|
+
}
|
|
2624
|
+
)
|
|
2625
|
+
});
|
|
2626
|
+
var IconInsightBoard = createIconBase({
|
|
2627
|
+
name: "IconInsightBoard",
|
|
2628
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2629
|
+
"path",
|
|
2630
|
+
{
|
|
2631
|
+
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
2632
|
+
fill: "currentColor",
|
|
2633
|
+
fillRule: "evenodd",
|
|
2634
|
+
clipRule: "evenodd"
|
|
2635
|
+
}
|
|
2636
|
+
)
|
|
2637
|
+
});
|
|
2638
|
+
var IconEventStream = createIconBase({
|
|
2639
|
+
name: "IconEventStream",
|
|
2640
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
2642
|
+
fill("M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0 8a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm5-6h10v2H11V5zm0 8h7v2h-7v-2zm0 5h10v2H11v-2z")
|
|
2643
|
+
] })
|
|
2644
|
+
});
|
|
2645
|
+
var IconFeatureGate = createIconBase({
|
|
2646
|
+
name: "IconFeatureGate",
|
|
2647
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2648
|
+
"path",
|
|
2649
|
+
{
|
|
2650
|
+
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
2651
|
+
fill: "currentColor",
|
|
2652
|
+
fillRule: "evenodd",
|
|
2653
|
+
clipRule: "evenodd"
|
|
2654
|
+
}
|
|
2655
|
+
)
|
|
2656
|
+
});
|
|
2657
|
+
var IconReplayFrame = createIconBase({
|
|
2658
|
+
name: "IconReplayFrame",
|
|
2659
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2660
|
+
"path",
|
|
2661
|
+
{
|
|
2662
|
+
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
2663
|
+
fill: "currentColor",
|
|
2664
|
+
fillRule: "evenodd",
|
|
2665
|
+
clipRule: "evenodd"
|
|
2666
|
+
}
|
|
2667
|
+
)
|
|
2668
|
+
});
|
|
2669
|
+
var IconQueryStack = createIconBase({
|
|
2670
|
+
name: "IconQueryStack",
|
|
2671
|
+
paths: fill(
|
|
2672
|
+
"M4 5c0-1.66 3.58-3 8-3s8 1.34 8 3-3.58 3-8 3-8-1.34-8-3zm0 3v3c0 1.66 3.58 3 8 3 .7 0 1.38-.04 2-.12V11.8c-.64.13-1.31.2-2 .2-4.42 0-8-1.34-8-3zm0 6v3c0 1.66 3.58 3 8 3 .7 0 1.38-.04 2-.12v-2.08c-.64.13-1.31.2-2 .2-4.42 0-8-1.34-8-3zm12-1 5 4-5 4v-3h-4v-2h4v-3z"
|
|
2673
|
+
)
|
|
2674
|
+
});
|
|
2675
|
+
var IconExperimentSplit = createIconBase({
|
|
2676
|
+
name: "IconExperimentSplit",
|
|
2677
|
+
paths: fill(
|
|
2678
|
+
"M5 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm14 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM5 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm1-6h2c0 2.2 1.8 4 4 4h2.17A3 3 0 0 1 19 11v2a3 3 0 0 1-4.83-2H12a6 6 0 0 1-6-6v4zm0 4a6 6 0 0 0 6-6h2a8 8 0 0 1-8 8v-2z"
|
|
2679
|
+
)
|
|
2680
|
+
});
|
|
2681
|
+
var IconSurveyCard = createIconBase({
|
|
2682
|
+
name: "IconSurveyCard",
|
|
2683
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2684
|
+
"path",
|
|
2685
|
+
{
|
|
2686
|
+
d: "M3 3v18h18V3H3zm2 2h14v14H5V5zm2 2h7v2H7V7zm0 4h4v2H7v-2zm7-.4-2.5 2.5-1-1-1.4 1.4 2.4 2.4 3.9-3.9-1.4-1.4zM7 16h10v1H7v-1z",
|
|
2687
|
+
fill: "currentColor",
|
|
2688
|
+
fillRule: "evenodd",
|
|
2689
|
+
clipRule: "evenodd"
|
|
2690
|
+
}
|
|
2691
|
+
)
|
|
2692
|
+
});
|
|
2693
|
+
var IconActivity = createIconBasePath(
|
|
2694
|
+
"M22 12h-4l-3 9L9 3l-3 9H2v2h6.76l2.24-6.72L15 15l2.24-6.72L19 14h3v-2z"
|
|
2695
|
+
);
|
|
2696
|
+
var IconFlask = createIconBasePath(
|
|
2697
|
+
"M19.8 18.4L14 10.67V6.5l1.35-1.35c.39-.39.39-1.02 0-1.41L14.65 2.7a.9959.9959 0 0 0-1.41 0L9.35 6.54c-.39.39-.39 1.02 0 1.41L10.7 9.3v4.17L4.2 18.4C3.53 19.07 4.04 20.25 5 20.25h14c.96 0 1.47-1.18.8-1.85zM6.91 18.25l5.09-5.09 5.09 5.09H6.91z"
|
|
2698
|
+
);
|
|
2699
|
+
var IconSpinner = (0, import_react9.forwardRef)(function IconSpinner2(_a, ref) {
|
|
2700
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconSync, __spreadValues({ ref, className: cn2("ph-icon-spin", className) }, props));
|
|
2702
|
+
});
|
|
2703
|
+
IconSpinner.displayName = "IconSpinner";
|
|
2704
|
+
var CANONICAL_ICONS = {
|
|
2705
|
+
activity: IconActivity,
|
|
2706
|
+
areaChart: IconAreaChart,
|
|
2707
|
+
arrowDown: IconArrowDown,
|
|
2708
|
+
arrowUp: IconArrowUp,
|
|
2709
|
+
bell: IconBell,
|
|
2710
|
+
bellOff: IconBellOff,
|
|
2711
|
+
bolt: IconBolt,
|
|
2712
|
+
box: IconBox,
|
|
2713
|
+
cancel: IconCancel,
|
|
2714
|
+
check: IconCheck,
|
|
2715
|
+
checkCircle: IconCheckCircle,
|
|
2716
|
+
chevronDown: IconChevronDown,
|
|
2717
|
+
chevronLeft: IconChevronLeft,
|
|
2718
|
+
chevronRight: IconChevronRight,
|
|
2719
|
+
clipboardEdit: IconClipboardEdit,
|
|
2720
|
+
close: IconClose,
|
|
2721
|
+
codePreview: IconCodePreview,
|
|
2722
|
+
cohort: IconCohort,
|
|
2723
|
+
commandCursor: IconCommandCursor,
|
|
2724
|
+
copy: IconCopy,
|
|
2725
|
+
cumulativeChart: IconCumulativeChart,
|
|
2726
|
+
dataReel: IconDataReel,
|
|
2727
|
+
database: IconDatabase,
|
|
2728
|
+
download: IconDownload,
|
|
2729
|
+
edit: IconEdit,
|
|
2730
|
+
errorOutline: IconErrorOutline,
|
|
2731
|
+
eventStream: IconEventStream,
|
|
2732
|
+
exclamation: IconExclamation,
|
|
2733
|
+
experimentSplit: IconExperimentSplit,
|
|
2734
|
+
featureGate: IconFeatureGate,
|
|
2735
|
+
flag: IconFlag,
|
|
2736
|
+
flare: IconFlare,
|
|
2737
|
+
flask: IconFlask,
|
|
2738
|
+
gift: IconGift,
|
|
2739
|
+
gridView: IconGridView,
|
|
2740
|
+
handClick: IconHandClick,
|
|
2741
|
+
home: IconHome,
|
|
2742
|
+
info: IconInfo,
|
|
2743
|
+
insightBoard: IconInsightBoard,
|
|
2744
|
+
layers: IconLayers,
|
|
2745
|
+
listView: IconListView,
|
|
2746
|
+
logout: IconLogout,
|
|
2747
|
+
mail: IconMail,
|
|
2748
|
+
moon: IconMoon,
|
|
2749
|
+
oldWindow: IconOldWindow,
|
|
2750
|
+
panelRight: IconPanelRight,
|
|
2751
|
+
person: IconPerson,
|
|
2752
|
+
playCircle: IconPlayCircle,
|
|
2753
|
+
plus: IconPlus,
|
|
2754
|
+
premium: IconPremium,
|
|
2755
|
+
queryEditor: IconQueryEditor,
|
|
2756
|
+
queryStack: IconQueryStack,
|
|
2757
|
+
radar: IconRadar,
|
|
2758
|
+
recording: IconRecording,
|
|
2759
|
+
replayFrame: IconReplayFrame,
|
|
2760
|
+
robot: IconRobot,
|
|
2761
|
+
rocket: IconRocket,
|
|
2762
|
+
save: IconSave,
|
|
2763
|
+
search: IconSearch,
|
|
2764
|
+
selectEvents: IconSelectEvents,
|
|
2765
|
+
shoppingCart: IconShoppingCart,
|
|
2766
|
+
spinner: IconSpinner,
|
|
2767
|
+
star: IconStar,
|
|
2768
|
+
subArrowRight: IconSubArrowRight,
|
|
2769
|
+
sun: IconSun,
|
|
2770
|
+
surveyCard: IconSurveyCard,
|
|
2771
|
+
surveys: IconSurveys,
|
|
2772
|
+
sync: IconSync,
|
|
2773
|
+
tableChart: IconTableChart,
|
|
2774
|
+
terminal: IconTerminal,
|
|
2775
|
+
toggle: IconToggle,
|
|
2776
|
+
trash: IconTrash,
|
|
2777
|
+
tuning: IconTuning,
|
|
2778
|
+
upload: IconUpload,
|
|
2779
|
+
volume: IconVolume,
|
|
2780
|
+
volumeOff: IconVolumeOff
|
|
2781
|
+
};
|
|
2782
|
+
var PH_ICON_ALIASES = {
|
|
2783
|
+
clipboard: IconClipboardEdit,
|
|
2784
|
+
grid: IconGridView,
|
|
2785
|
+
list: IconListView,
|
|
2786
|
+
play: IconPlayCircle,
|
|
2787
|
+
settings: IconTuning,
|
|
2788
|
+
trendingUp: IconArrowUp,
|
|
2789
|
+
warning: IconExclamation,
|
|
2790
|
+
xCircle: IconCancel
|
|
2791
|
+
};
|
|
2792
|
+
var PH_ICONS = __spreadValues(__spreadValues({}, CANONICAL_ICONS), PH_ICON_ALIASES);
|
|
2793
|
+
for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
2794
|
+
const namedIcon = Icon;
|
|
2795
|
+
if (!namedIcon.displayName || namedIcon.displayName === "IconGlyph") {
|
|
2796
|
+
namedIcon.displayName = `Icon${name[0].toUpperCase()}${name.slice(1)}`;
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
var IconByName = (0, import_react9.forwardRef)(function IconByName2(_a, ref) {
|
|
2800
|
+
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
2801
|
+
const Icon = PH_ICONS[name];
|
|
2802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, __spreadValues({ ref }, props));
|
|
2803
|
+
});
|
|
2804
|
+
IconByName.displayName = "IconByName";
|
|
2805
|
+
|
|
2806
|
+
// src/components/ui/ButtonChrome.tsx
|
|
2807
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2808
|
+
function ButtonChrome({ label, icon, sideIcon, split }) {
|
|
2809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ph-btn-chrome", children: [
|
|
2810
|
+
icon != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ph-btn-icon", children: icon }) : null,
|
|
2811
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ph-btn-label", children: label }) : null,
|
|
2812
|
+
split ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ph-btn-split-divider", "aria-hidden": true }) : null,
|
|
2813
|
+
sideIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "ph-btn-side-icon", children: sideIcon }) : null
|
|
2814
|
+
] });
|
|
2815
|
+
}
|
|
2816
|
+
|
|
2817
|
+
// src/components/ui/DropdownMenu.tsx
|
|
2818
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2269
2819
|
function DropdownContent({
|
|
2270
2820
|
children,
|
|
2271
2821
|
align = "start",
|
|
@@ -2276,7 +2826,7 @@ function DropdownContent({
|
|
|
2276
2826
|
avoidCollisions = true,
|
|
2277
2827
|
panelClassName
|
|
2278
2828
|
}) {
|
|
2279
|
-
return /* @__PURE__ */ (0,
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2280
2830
|
DropdownPrimitive.Content,
|
|
2281
2831
|
{
|
|
2282
2832
|
className: cn2("ph-dropdown-panel", panelClassName),
|
|
@@ -2289,7 +2839,7 @@ function DropdownContent({
|
|
|
2289
2839
|
sticky: "partial",
|
|
2290
2840
|
children: [
|
|
2291
2841
|
children,
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2842
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2293
2843
|
DropdownPrimitive.Arrow,
|
|
2294
2844
|
{
|
|
2295
2845
|
className: "ph-dropdown-arrow",
|
|
@@ -2341,7 +2891,7 @@ function DropdownMenu(_a) {
|
|
|
2341
2891
|
"modal",
|
|
2342
2892
|
"disabled"
|
|
2343
2893
|
]);
|
|
2344
|
-
return /* @__PURE__ */ (0,
|
|
2894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", __spreadProps(__spreadValues({ className: cn2("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2345
2895
|
DropdownPrimitive.Root,
|
|
2346
2896
|
{
|
|
2347
2897
|
open,
|
|
@@ -2349,7 +2899,7 @@ function DropdownMenu(_a) {
|
|
|
2349
2899
|
onOpenChange,
|
|
2350
2900
|
modal,
|
|
2351
2901
|
children: [
|
|
2352
|
-
/* @__PURE__ */ (0,
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2353
2903
|
"button",
|
|
2354
2904
|
{
|
|
2355
2905
|
type: "button",
|
|
@@ -2360,7 +2910,7 @@ function DropdownMenu(_a) {
|
|
|
2360
2910
|
children: trigger
|
|
2361
2911
|
}
|
|
2362
2912
|
) }),
|
|
2363
|
-
/* @__PURE__ */ (0,
|
|
2913
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2364
2914
|
DropdownContent,
|
|
2365
2915
|
{
|
|
2366
2916
|
align,
|
|
@@ -2387,7 +2937,7 @@ function DropdownItem(_a) {
|
|
|
2387
2937
|
"children",
|
|
2388
2938
|
"disabled"
|
|
2389
2939
|
]);
|
|
2390
|
-
return /* @__PURE__ */ (0,
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2391
2941
|
"button",
|
|
2392
2942
|
__spreadProps(__spreadValues({
|
|
2393
2943
|
type: "button",
|
|
@@ -2400,7 +2950,7 @@ function DropdownItem(_a) {
|
|
|
2400
2950
|
}
|
|
2401
2951
|
|
|
2402
2952
|
// src/suite/components/suite-user-menu.tsx
|
|
2403
|
-
var
|
|
2953
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2404
2954
|
function computeInitials(name, email) {
|
|
2405
2955
|
const source = (name || email || "?").trim();
|
|
2406
2956
|
return source.split(/[\s@]+/).filter(Boolean).slice(0, 2).map((part) => part[0]).join("").toUpperCase();
|
|
@@ -2435,7 +2985,7 @@ function SuiteUserMenu({
|
|
|
2435
2985
|
const router = (0, import_navigation2.useRouter)();
|
|
2436
2986
|
const initials = fallbackInitials != null ? fallbackInitials : computeInitials(name, email);
|
|
2437
2987
|
const fallbackColor = avatarColorClass(email || name || "?");
|
|
2438
|
-
const avatar = /* @__PURE__ */ (0,
|
|
2988
|
+
const avatar = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "inline-flex h-10 w-10 items-center justify-center overflow-hidden rounded-full border border-ph-border", children: image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2439
2989
|
import_image2.default,
|
|
2440
2990
|
{
|
|
2441
2991
|
src: image,
|
|
@@ -2445,7 +2995,7 @@ function SuiteUserMenu({
|
|
|
2445
2995
|
className: "h-full w-full object-cover",
|
|
2446
2996
|
unoptimized: true
|
|
2447
2997
|
}
|
|
2448
|
-
) : /* @__PURE__ */ (0,
|
|
2998
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2449
2999
|
"span",
|
|
2450
3000
|
{
|
|
2451
3001
|
className: cn(
|
|
@@ -2455,7 +3005,7 @@ function SuiteUserMenu({
|
|
|
2455
3005
|
children: initials
|
|
2456
3006
|
}
|
|
2457
3007
|
) });
|
|
2458
|
-
const accountMenu = /* @__PURE__ */ (0,
|
|
3008
|
+
const accountMenu = /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2459
3009
|
DropdownMenu,
|
|
2460
3010
|
{
|
|
2461
3011
|
trigger: avatar,
|
|
@@ -2473,24 +3023,24 @@ function SuiteUserMenu({
|
|
|
2473
3023
|
),
|
|
2474
3024
|
"data-test": dataTest,
|
|
2475
3025
|
children: [
|
|
2476
|
-
/* @__PURE__ */ (0,
|
|
2477
|
-
/* @__PURE__ */ (0,
|
|
2478
|
-
email ? /* @__PURE__ */ (0,
|
|
3026
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "px-2 py-1.5", children: [
|
|
3027
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "truncate text-sm font-medium text-ph-ink", children: name || email || "Account" }),
|
|
3028
|
+
email ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "truncate text-xs text-ph-mutedtext", children: email }) : null
|
|
2479
3029
|
] }),
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2481
|
-
/* @__PURE__ */ (0,
|
|
3030
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "my-1 border-t border-ph-border" }),
|
|
3031
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2482
3032
|
DropdownItem,
|
|
2483
3033
|
{
|
|
2484
3034
|
"data-test": `${dataTest}-settings`,
|
|
2485
3035
|
onClick: () => router.push(settingsHref),
|
|
2486
3036
|
children: [
|
|
2487
|
-
/* @__PURE__ */ (0,
|
|
3037
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_iconoir_react6.Settings, { className: "h-4 w-4 text-ph-mutedtext", "aria-hidden": true }),
|
|
2488
3038
|
"Profile settings"
|
|
2489
3039
|
]
|
|
2490
3040
|
}
|
|
2491
3041
|
),
|
|
2492
|
-
/* @__PURE__ */ (0,
|
|
2493
|
-
/* @__PURE__ */ (0,
|
|
3042
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DropdownItem, { "data-test": `${dataTest}-sign-out`, onClick: onSignOut, children: [
|
|
3043
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_iconoir_react6.LogOut, { className: "h-4 w-4 text-ph-mutedtext", "aria-hidden": true }),
|
|
2494
3044
|
"Sign out"
|
|
2495
3045
|
] })
|
|
2496
3046
|
]
|
|
@@ -2499,7 +3049,7 @@ function SuiteUserMenu({
|
|
|
2499
3049
|
if (!showSignOutAction) {
|
|
2500
3050
|
return accountMenu;
|
|
2501
3051
|
}
|
|
2502
|
-
return /* @__PURE__ */ (0,
|
|
3052
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2503
3053
|
"div",
|
|
2504
3054
|
{
|
|
2505
3055
|
className: cn(
|
|
@@ -2507,8 +3057,8 @@ function SuiteUserMenu({
|
|
|
2507
3057
|
className
|
|
2508
3058
|
),
|
|
2509
3059
|
children: [
|
|
2510
|
-
/* @__PURE__ */ (0,
|
|
2511
|
-
/* @__PURE__ */ (0,
|
|
3060
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "shrink-0", children: accountMenu }),
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2512
3062
|
"button",
|
|
2513
3063
|
{
|
|
2514
3064
|
type: "button",
|
|
@@ -2517,7 +3067,7 @@ function SuiteUserMenu({
|
|
|
2517
3067
|
"aria-label": "Sign out",
|
|
2518
3068
|
className: "inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-ph-mutedtext transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ph-focus-ring",
|
|
2519
3069
|
onClick: onSignOut,
|
|
2520
|
-
children: /* @__PURE__ */ (0,
|
|
3070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_iconoir_react6.LogOut, { className: "h-4 w-4", "aria-hidden": true })
|
|
2521
3071
|
}
|
|
2522
3072
|
)
|
|
2523
3073
|
]
|
|
@@ -2527,7 +3077,7 @@ function SuiteUserMenu({
|
|
|
2527
3077
|
|
|
2528
3078
|
// src/suite/components/suite-bottom-nav.tsx
|
|
2529
3079
|
var import_link = __toESM(require("next/link"));
|
|
2530
|
-
var
|
|
3080
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2531
3081
|
function SuiteBottomNav({
|
|
2532
3082
|
items,
|
|
2533
3083
|
ariaLabel = "Primary navigation",
|
|
@@ -2540,8 +3090,8 @@ function SuiteBottomNav({
|
|
|
2540
3090
|
);
|
|
2541
3091
|
}
|
|
2542
3092
|
const activeIndex = items.findIndex((item) => item.active);
|
|
2543
|
-
return /* @__PURE__ */ (0,
|
|
2544
|
-
/* @__PURE__ */ (0,
|
|
3093
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
3094
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2545
3095
|
"div",
|
|
2546
3096
|
{
|
|
2547
3097
|
"aria-hidden": true,
|
|
@@ -2549,7 +3099,7 @@ function SuiteBottomNav({
|
|
|
2549
3099
|
style: { height: "calc(60px + env(safe-area-inset-bottom))" }
|
|
2550
3100
|
}
|
|
2551
3101
|
),
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2553
3103
|
"nav",
|
|
2554
3104
|
{
|
|
2555
3105
|
"aria-label": ariaLabel,
|
|
@@ -2564,12 +3114,12 @@ function SuiteBottomNav({
|
|
|
2564
3114
|
"--suite-nav-active": activeIndex >= 0 ? activeIndex : 0
|
|
2565
3115
|
},
|
|
2566
3116
|
children: [
|
|
2567
|
-
activeIndex >= 0 ? /* @__PURE__ */ (0,
|
|
3117
|
+
activeIndex >= 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { "aria-hidden": true, className: "suite-bottom-nav__indicator" }) : null,
|
|
2568
3118
|
items.map((item) => {
|
|
2569
3119
|
var _a;
|
|
2570
3120
|
const Icon = item.icon;
|
|
2571
3121
|
const active = Boolean(item.active);
|
|
2572
|
-
return /* @__PURE__ */ (0,
|
|
3122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
2573
3123
|
import_link.default,
|
|
2574
3124
|
{
|
|
2575
3125
|
href: item.href,
|
|
@@ -2581,14 +3131,14 @@ function SuiteBottomNav({
|
|
|
2581
3131
|
active && "font-semibold text-ph-brand"
|
|
2582
3132
|
),
|
|
2583
3133
|
children: [
|
|
2584
|
-
/* @__PURE__ */ (0,
|
|
3134
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2585
3135
|
"span",
|
|
2586
3136
|
{
|
|
2587
3137
|
className: cn(
|
|
2588
3138
|
"suite-bottom-nav__icon relative z-10 inline-flex items-center justify-center",
|
|
2589
3139
|
active && "suite-bottom-nav__icon--active"
|
|
2590
3140
|
),
|
|
2591
|
-
children: /* @__PURE__ */ (0,
|
|
3141
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2592
3142
|
Icon,
|
|
2593
3143
|
{
|
|
2594
3144
|
className: "h-6 w-6",
|
|
@@ -2598,7 +3148,7 @@ function SuiteBottomNav({
|
|
|
2598
3148
|
)
|
|
2599
3149
|
}
|
|
2600
3150
|
),
|
|
2601
|
-
/* @__PURE__ */ (0,
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "relative z-10 max-w-full truncate", children: item.label })
|
|
2602
3152
|
]
|
|
2603
3153
|
},
|
|
2604
3154
|
item.href
|
|
@@ -2612,7 +3162,7 @@ function SuiteBottomNav({
|
|
|
2612
3162
|
|
|
2613
3163
|
// src/suite/components/today-calibrating.tsx
|
|
2614
3164
|
var import_iconoir_react7 = require("iconoir-react");
|
|
2615
|
-
var
|
|
3165
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2616
3166
|
function TodayCalibrating({
|
|
2617
3167
|
onRetry,
|
|
2618
3168
|
retrying = false,
|
|
@@ -2622,7 +3172,7 @@ function TodayCalibrating({
|
|
|
2622
3172
|
retrySpinnerClassName = "text-ph-brand"
|
|
2623
3173
|
}) {
|
|
2624
3174
|
void _variant;
|
|
2625
|
-
return /* @__PURE__ */ (0,
|
|
3175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2626
3176
|
"div",
|
|
2627
3177
|
{
|
|
2628
3178
|
className: cn(
|
|
@@ -2631,18 +3181,18 @@ function TodayCalibrating({
|
|
|
2631
3181
|
),
|
|
2632
3182
|
"data-test": "today-calibrating",
|
|
2633
3183
|
children: [
|
|
2634
|
-
/* @__PURE__ */ (0,
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2635
3185
|
"div",
|
|
2636
3186
|
{
|
|
2637
3187
|
className: "pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_35%,rgba(251,191,36,0.1),transparent_55%)]",
|
|
2638
3188
|
"aria-hidden": true
|
|
2639
3189
|
}
|
|
2640
3190
|
),
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
onRetry ? /* @__PURE__ */ (0,
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "relative mb-5 flex h-14 w-14 items-center justify-center rounded-2xl border border-ph-border bg-ph-surface text-ph-ink shadow-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_iconoir_react7.SunLight, { className: "h-8 w-8", strokeWidth: 2, "aria-hidden": true }) }),
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("h2", { className: "relative text-base font-semibold tracking-tight text-ph-ink sm:text-lg md:text-xl", children: "Calibrating your day" }),
|
|
3193
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "relative mt-1.5 max-w-sm text-sm sm:text-[15px] leading-relaxed text-ph-subtle", children: "Pulling together tasks, time and updates from your workspace\u2026" }),
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "relative mt-5 flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Spinner, { size: "sm", className: "opacity-70", label: "Loading today" }) }),
|
|
3195
|
+
onRetry ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2646
3196
|
"button",
|
|
2647
3197
|
{
|
|
2648
3198
|
type: "button",
|
|
@@ -2650,7 +3200,7 @@ function TodayCalibrating({
|
|
|
2650
3200
|
disabled: retrying,
|
|
2651
3201
|
className: "relative mt-6 inline-flex items-center gap-2 rounded-xl border border-ph-border bg-ph-canvas px-4 py-2 text-sm font-medium text-ph-ink transition hover:bg-ph-muted disabled:opacity-60",
|
|
2652
3202
|
children: [
|
|
2653
|
-
retrying ? /* @__PURE__ */ (0,
|
|
3203
|
+
retrying ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Spinner, { size: "sm", className: retrySpinnerClassName }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_iconoir_react7.Refresh, { className: "h-4 w-4", "aria-hidden": true }),
|
|
2654
3204
|
"Try again"
|
|
2655
3205
|
]
|
|
2656
3206
|
}
|
|
@@ -2664,14 +3214,14 @@ function TodayCalibrating({
|
|
|
2664
3214
|
init_theme_provider();
|
|
2665
3215
|
|
|
2666
3216
|
// src/suite/components/ai-panel.tsx
|
|
2667
|
-
var
|
|
3217
|
+
var import_react15 = require("react");
|
|
2668
3218
|
var import_iconoir_react8 = require("iconoir-react");
|
|
2669
3219
|
|
|
2670
3220
|
// src/components/ui/Tooltip.tsx
|
|
2671
|
-
var
|
|
3221
|
+
var import_react12 = require("react");
|
|
2672
3222
|
var import_react_dom = require("react-dom");
|
|
2673
|
-
var
|
|
2674
|
-
var TooltipDelayContext = (0,
|
|
3223
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3224
|
+
var TooltipDelayContext = (0, import_react12.createContext)(0);
|
|
2675
3225
|
function tooltipPosition(trigger, side, align, offset) {
|
|
2676
3226
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
2677
3227
|
const vertical = align === "start" ? trigger.top : align === "end" ? trigger.bottom : trigger.top + trigger.height / 2;
|
|
@@ -2711,12 +3261,12 @@ function Tooltip({
|
|
|
2711
3261
|
onOpenChange,
|
|
2712
3262
|
delayDuration
|
|
2713
3263
|
}) {
|
|
2714
|
-
const providerDelay = (0,
|
|
2715
|
-
const generatedId = (0,
|
|
2716
|
-
const triggerRef = (0,
|
|
2717
|
-
const timerRef = (0,
|
|
2718
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2719
|
-
const [position, setPosition] = (0,
|
|
3264
|
+
const providerDelay = (0, import_react12.useContext)(TooltipDelayContext);
|
|
3265
|
+
const generatedId = (0, import_react12.useId)().replace(/:/g, "");
|
|
3266
|
+
const triggerRef = (0, import_react12.useRef)(null);
|
|
3267
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
3268
|
+
const [internalOpen, setInternalOpen] = (0, import_react12.useState)(defaultOpen);
|
|
3269
|
+
const [position, setPosition] = (0, import_react12.useState)(null);
|
|
2720
3270
|
const isOpen = open != null ? open : internalOpen;
|
|
2721
3271
|
const triggerId = children.props.id;
|
|
2722
3272
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -2750,7 +3300,7 @@ function Tooltip({
|
|
|
2750
3300
|
clearTimer();
|
|
2751
3301
|
setOpen(false);
|
|
2752
3302
|
}
|
|
2753
|
-
(0,
|
|
3303
|
+
(0, import_react12.useEffect)(() => {
|
|
2754
3304
|
if (!isOpen) return;
|
|
2755
3305
|
const reposition = () => updatePosition();
|
|
2756
3306
|
window.addEventListener("resize", reposition);
|
|
@@ -2760,11 +3310,11 @@ function Tooltip({
|
|
|
2760
3310
|
window.removeEventListener("scroll", reposition, true);
|
|
2761
3311
|
};
|
|
2762
3312
|
});
|
|
2763
|
-
(0,
|
|
3313
|
+
(0, import_react12.useEffect)(() => () => clearTimer(), []);
|
|
2764
3314
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
2765
|
-
const trigger = (0,
|
|
2766
|
-
return /* @__PURE__ */ (0,
|
|
2767
|
-
/* @__PURE__ */ (0,
|
|
3315
|
+
const trigger = (0, import_react12.cloneElement)(children, { "aria-describedby": describedBy });
|
|
3316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2768
3318
|
"span",
|
|
2769
3319
|
{
|
|
2770
3320
|
ref: triggerRef,
|
|
@@ -2780,12 +3330,12 @@ function Tooltip({
|
|
|
2780
3330
|
}
|
|
2781
3331
|
),
|
|
2782
3332
|
isOpen && position && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
|
|
2783
|
-
/* @__PURE__ */ (0,
|
|
3333
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2784
3334
|
"span",
|
|
2785
3335
|
{
|
|
2786
3336
|
style: __spreadValues({ position: "fixed" }, position),
|
|
2787
3337
|
className: "pointer-events-none z-[200]",
|
|
2788
|
-
children: /* @__PURE__ */ (0,
|
|
3338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2789
3339
|
"span",
|
|
2790
3340
|
{
|
|
2791
3341
|
id: tooltipId,
|
|
@@ -2803,8 +3353,8 @@ function Tooltip({
|
|
|
2803
3353
|
}
|
|
2804
3354
|
|
|
2805
3355
|
// src/suite/components/ai-panel.tsx
|
|
2806
|
-
var
|
|
2807
|
-
var SuiteAiBlockNoteMessage2 = (0,
|
|
3356
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3357
|
+
var SuiteAiBlockNoteMessage2 = (0, import_react15.lazy)(() => Promise.resolve().then(() => (init_ai_message_blocknote(), ai_message_blocknote_exports)));
|
|
2808
3358
|
var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
|
|
2809
3359
|
var SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
|
|
2810
3360
|
var SUITE_ASK_AI_OPEN_QUERY = "shelly";
|
|
@@ -2888,11 +3438,11 @@ function SuiteAiPanel({
|
|
|
2888
3438
|
onSameAppNavigate,
|
|
2889
3439
|
resolveAction
|
|
2890
3440
|
}) {
|
|
2891
|
-
const inputId = (0,
|
|
2892
|
-
const [uncontrolledOpen, setUncontrolledOpen] = (0,
|
|
2893
|
-
const [resolvingId, setResolvingId] = (0,
|
|
3441
|
+
const inputId = (0, import_react15.useId)();
|
|
3442
|
+
const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react15.useState)(false);
|
|
3443
|
+
const [resolvingId, setResolvingId] = (0, import_react15.useState)("");
|
|
2894
3444
|
const open = openProp != null ? openProp : uncontrolledOpen;
|
|
2895
|
-
const setOpen = (0,
|
|
3445
|
+
const setOpen = (0, import_react15.useCallback)(
|
|
2896
3446
|
(next) => {
|
|
2897
3447
|
persistSuiteAskAiOpen(next);
|
|
2898
3448
|
if (openProp === void 0) setUncontrolledOpen(next);
|
|
@@ -2900,17 +3450,17 @@ function SuiteAiPanel({
|
|
|
2900
3450
|
},
|
|
2901
3451
|
[onOpenChange, openProp]
|
|
2902
3452
|
);
|
|
2903
|
-
const [prompt, setPrompt] = (0,
|
|
2904
|
-
const [messages, setMessages] = (0,
|
|
2905
|
-
const [loading, setLoading] = (0,
|
|
2906
|
-
const [hydrating, setHydrating] = (0,
|
|
2907
|
-
const [error, setError] = (0,
|
|
2908
|
-
const [atBottom, setAtBottom] = (0,
|
|
2909
|
-
const scrollerRef = (0,
|
|
2910
|
-
const textareaRef = (0,
|
|
2911
|
-
const abortRef = (0,
|
|
2912
|
-
const pendingPromptRef = (0,
|
|
2913
|
-
(0,
|
|
3453
|
+
const [prompt, setPrompt] = (0, import_react15.useState)("");
|
|
3454
|
+
const [messages, setMessages] = (0, import_react15.useState)([]);
|
|
3455
|
+
const [loading, setLoading] = (0, import_react15.useState)(false);
|
|
3456
|
+
const [hydrating, setHydrating] = (0, import_react15.useState)(false);
|
|
3457
|
+
const [error, setError] = (0, import_react15.useState)("");
|
|
3458
|
+
const [atBottom, setAtBottom] = (0, import_react15.useState)(true);
|
|
3459
|
+
const scrollerRef = (0, import_react15.useRef)(null);
|
|
3460
|
+
const textareaRef = (0, import_react15.useRef)(null);
|
|
3461
|
+
const abortRef = (0, import_react15.useRef)(null);
|
|
3462
|
+
const pendingPromptRef = (0, import_react15.useRef)(null);
|
|
3463
|
+
(0, import_react15.useEffect)(() => {
|
|
2914
3464
|
function onOpen(event) {
|
|
2915
3465
|
var _a;
|
|
2916
3466
|
const detail = event.detail;
|
|
@@ -2924,19 +3474,19 @@ function SuiteAiPanel({
|
|
|
2924
3474
|
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
2925
3475
|
return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
2926
3476
|
}, [setOpen]);
|
|
2927
|
-
const scrollToBottom = (0,
|
|
3477
|
+
const scrollToBottom = (0, import_react15.useCallback)((behavior = "auto") => {
|
|
2928
3478
|
const el = scrollerRef.current;
|
|
2929
3479
|
if (!el) return;
|
|
2930
3480
|
el.scrollTo({ top: el.scrollHeight, behavior });
|
|
2931
3481
|
setAtBottom(true);
|
|
2932
3482
|
}, []);
|
|
2933
|
-
const handleScroll = (0,
|
|
3483
|
+
const handleScroll = (0, import_react15.useCallback)(() => {
|
|
2934
3484
|
const el = scrollerRef.current;
|
|
2935
3485
|
if (!el) return;
|
|
2936
3486
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
2937
3487
|
setAtBottom(distance < 64);
|
|
2938
3488
|
}, []);
|
|
2939
|
-
const hydrate = (0,
|
|
3489
|
+
const hydrate = (0, import_react15.useCallback)(async () => {
|
|
2940
3490
|
var _a;
|
|
2941
3491
|
setHydrating(true);
|
|
2942
3492
|
setError("");
|
|
@@ -2954,7 +3504,7 @@ function SuiteAiPanel({
|
|
|
2954
3504
|
setHydrating(false);
|
|
2955
3505
|
}
|
|
2956
3506
|
}, [fetchChat]);
|
|
2957
|
-
(0,
|
|
3507
|
+
(0, import_react15.useEffect)(() => {
|
|
2958
3508
|
var _a;
|
|
2959
3509
|
if (!open) return;
|
|
2960
3510
|
const queued = (_a = pendingPromptRef.current) != null ? _a : consumePendingAskAiPrompt();
|
|
@@ -2965,14 +3515,14 @@ function SuiteAiPanel({
|
|
|
2965
3515
|
if (pending) setPrompt(pending);
|
|
2966
3516
|
});
|
|
2967
3517
|
}, [open, hydrate]);
|
|
2968
|
-
(0,
|
|
3518
|
+
(0, import_react15.useEffect)(() => {
|
|
2969
3519
|
if (open && atBottom) scrollToBottom();
|
|
2970
3520
|
}, [messages, loading, open, atBottom, scrollToBottom]);
|
|
2971
|
-
(0,
|
|
3521
|
+
(0, import_react15.useEffect)(() => {
|
|
2972
3522
|
var _a;
|
|
2973
3523
|
if (open && !hydrating) (_a = textareaRef.current) == null ? void 0 : _a.focus();
|
|
2974
3524
|
}, [open, hydrating]);
|
|
2975
|
-
(0,
|
|
3525
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
2976
3526
|
const el = textareaRef.current;
|
|
2977
3527
|
if (!el) return;
|
|
2978
3528
|
el.style.height = "auto";
|
|
@@ -3097,16 +3647,16 @@ function SuiteAiPanel({
|
|
|
3097
3647
|
}
|
|
3098
3648
|
if (!open) return null;
|
|
3099
3649
|
const Icon = BrandIcon != null ? BrandIcon : import_iconoir_react8.Sparks;
|
|
3100
|
-
return /* @__PURE__ */ (0,
|
|
3650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3101
3651
|
"aside",
|
|
3102
3652
|
{
|
|
3103
3653
|
className: "flex h-full min-h-0 flex-col bg-ph-canvas",
|
|
3104
3654
|
"data-test": "suite-ask-ai-panel",
|
|
3105
3655
|
"aria-label": title,
|
|
3106
3656
|
children: [
|
|
3107
|
-
/* @__PURE__ */ (0,
|
|
3108
|
-
/* @__PURE__ */ (0,
|
|
3109
|
-
messages.length > 0 ? /* @__PURE__ */ (0,
|
|
3657
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("header", { className: "flex items-center gap-2 px-2 pb-2", children: [
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: "sr-only", children: title }),
|
|
3659
|
+
messages.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3110
3660
|
"button",
|
|
3111
3661
|
{
|
|
3112
3662
|
type: "button",
|
|
@@ -3115,14 +3665,14 @@ function SuiteAiPanel({
|
|
|
3115
3665
|
className: "ml-auto inline-flex h-9 items-center gap-1.5 rounded-lg px-2 text-xs font-medium text-ph-subtle transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-focus disabled:opacity-40",
|
|
3116
3666
|
"data-test": "ask-ai-clear",
|
|
3117
3667
|
children: [
|
|
3118
|
-
/* @__PURE__ */ (0,
|
|
3668
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.Erase, { className: "h-3.5 w-3.5" }),
|
|
3119
3669
|
"Clear"
|
|
3120
3670
|
]
|
|
3121
3671
|
}
|
|
3122
3672
|
) : null
|
|
3123
3673
|
] }),
|
|
3124
|
-
/* @__PURE__ */ (0,
|
|
3125
|
-
/* @__PURE__ */ (0,
|
|
3674
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative min-h-0 flex-1", children: [
|
|
3675
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3126
3676
|
"div",
|
|
3127
3677
|
{
|
|
3128
3678
|
ref: scrollerRef,
|
|
@@ -3133,15 +3683,15 @@ function SuiteAiPanel({
|
|
|
3133
3683
|
"aria-label": "Conversation",
|
|
3134
3684
|
className: "suite-scroll-lock h-full space-y-5 overflow-y-auto px-2 py-3",
|
|
3135
3685
|
children: [
|
|
3136
|
-
hydrating && messages.length === 0 ? /* @__PURE__ */ (0,
|
|
3137
|
-
/* @__PURE__ */ (0,
|
|
3686
|
+
hydrating && messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2 text-sm text-ph-subtle", children: [
|
|
3687
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Spinner, { className: "h-4 w-4 animate-spin" }),
|
|
3138
3688
|
"Loading your chat\u2026"
|
|
3139
3689
|
] }) : null,
|
|
3140
|
-
!hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0,
|
|
3141
|
-
/* @__PURE__ */ (0,
|
|
3142
|
-
/* @__PURE__ */ (0,
|
|
3143
|
-
/* @__PURE__ */ (0,
|
|
3144
|
-
presets.length > 0 ? /* @__PURE__ */ (0,
|
|
3690
|
+
!hydrating && messages.length === 0 && !error ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mx-auto mt-4 flex max-w-sm flex-col items-center px-1 text-center", children: [
|
|
3691
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex h-10 w-10 items-center justify-center rounded-2xl bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { className: "h-5 w-5" }) }),
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-3 font-display text-base font-semibold text-ph-ink", children: "How can I help?" }),
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-sm leading-relaxed text-ph-subtle", children: emptyState }),
|
|
3694
|
+
presets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "mt-4 flex w-full flex-col gap-2", children: presets.map((preset) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3145
3695
|
"button",
|
|
3146
3696
|
{
|
|
3147
3697
|
type: "button",
|
|
@@ -3149,9 +3699,9 @@ function SuiteAiPanel({
|
|
|
3149
3699
|
disabled: loading || hydrating,
|
|
3150
3700
|
className: "group flex w-full items-center gap-2 rounded-xl border border-ph-border bg-ph-surface px-3 py-2 text-left text-sm text-ph-ink transition-colors hover:border-ph-brand/40 hover:bg-ph-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-focus disabled:opacity-40",
|
|
3151
3701
|
children: [
|
|
3152
|
-
/* @__PURE__ */ (0,
|
|
3153
|
-
/* @__PURE__ */ (0,
|
|
3154
|
-
/* @__PURE__ */ (0,
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.Sparks, { className: "h-4 w-4 shrink-0 text-ph-brand" }),
|
|
3703
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "min-w-0 flex-1 truncate", children: preset.label }),
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.ArrowUp, { className: "h-3.5 w-3.5 shrink-0 rotate-45 text-ph-mutedtext transition-transform group-hover:translate-x-0.5" })
|
|
3155
3705
|
]
|
|
3156
3706
|
},
|
|
3157
3707
|
preset.label
|
|
@@ -3161,48 +3711,48 @@ function SuiteAiPanel({
|
|
|
3161
3711
|
var _a;
|
|
3162
3712
|
const isUser = message.role === "user";
|
|
3163
3713
|
if (isUser) {
|
|
3164
|
-
return /* @__PURE__ */ (0,
|
|
3714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3165
3715
|
"div",
|
|
3166
3716
|
{
|
|
3167
3717
|
className: "flex justify-end",
|
|
3168
3718
|
"data-test": "ask-ai-user",
|
|
3169
|
-
children: /* @__PURE__ */ (0,
|
|
3719
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-fit max-w-[85%] whitespace-pre-wrap break-words rounded-2xl rounded-br-md bg-ph-brand px-3 py-2 text-sm leading-relaxed text-[var(--ph-on-accent)] [overflow-wrap:anywhere]", children: message.content })
|
|
3170
3720
|
},
|
|
3171
3721
|
`user-${index}`
|
|
3172
3722
|
);
|
|
3173
3723
|
}
|
|
3174
|
-
return /* @__PURE__ */ (0,
|
|
3724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3175
3725
|
"div",
|
|
3176
3726
|
{
|
|
3177
3727
|
className: "flex items-end gap-2",
|
|
3178
3728
|
"data-test": "ask-ai-assistant",
|
|
3179
3729
|
children: [
|
|
3180
|
-
/* @__PURE__ */ (0,
|
|
3730
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3181
3731
|
"span",
|
|
3182
3732
|
{
|
|
3183
3733
|
className: "mb-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-ph-brand/10 text-ph-brand",
|
|
3184
3734
|
"aria-hidden": true,
|
|
3185
|
-
children: /* @__PURE__ */ (0,
|
|
3735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { className: "h-3.5 w-3.5" })
|
|
3186
3736
|
}
|
|
3187
3737
|
),
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
|
|
3738
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 max-w-[85%] space-y-2", children: [
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2 text-sm leading-relaxed text-ph-ink", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3740
|
+
import_react15.Suspense,
|
|
3191
3741
|
{
|
|
3192
|
-
fallback: /* @__PURE__ */ (0,
|
|
3193
|
-
children: /* @__PURE__ */ (0,
|
|
3742
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "whitespace-pre-wrap break-words", children: message.content }),
|
|
3743
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SuiteAiBlockNoteMessage2, { markdown: message.content })
|
|
3194
3744
|
}
|
|
3195
3745
|
) }),
|
|
3196
|
-
((_a = message.actions) != null ? _a : []).map((action) => /* @__PURE__ */ (0,
|
|
3746
|
+
((_a = message.actions) != null ? _a : []).map((action) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3197
3747
|
"div",
|
|
3198
3748
|
{
|
|
3199
3749
|
"data-test": "ask-ai-action",
|
|
3200
3750
|
"data-status": action.status,
|
|
3201
3751
|
className: "rounded-xl border border-ph-border bg-ph-surface px-3 py-2 text-sm text-ph-ink",
|
|
3202
3752
|
children: [
|
|
3203
|
-
/* @__PURE__ */ (0,
|
|
3204
|
-
action.status === "proposed" ? /* @__PURE__ */ (0,
|
|
3205
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-medium", children: action.summary }),
|
|
3754
|
+
action.status === "proposed" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mt-2 flex flex-wrap gap-2", children: [
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3206
3756
|
"button",
|
|
3207
3757
|
{
|
|
3208
3758
|
type: "button",
|
|
@@ -3213,7 +3763,7 @@ function SuiteAiPanel({
|
|
|
3213
3763
|
children: resolvingId === action.id ? "Working\u2026" : "Confirm"
|
|
3214
3764
|
}
|
|
3215
3765
|
),
|
|
3216
|
-
/* @__PURE__ */ (0,
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3217
3767
|
"button",
|
|
3218
3768
|
{
|
|
3219
3769
|
type: "button",
|
|
@@ -3225,11 +3775,11 @@ function SuiteAiPanel({
|
|
|
3225
3775
|
}
|
|
3226
3776
|
)
|
|
3227
3777
|
] }) : null,
|
|
3228
|
-
action.status === "applied" ? /* @__PURE__ */ (0,
|
|
3778
|
+
action.status === "applied" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "mt-1 text-xs text-ph-subtle", children: [
|
|
3229
3779
|
"Done",
|
|
3230
|
-
action.href ? /* @__PURE__ */ (0,
|
|
3780
|
+
action.href ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3231
3781
|
" \xB7 ",
|
|
3232
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3233
3783
|
"a",
|
|
3234
3784
|
{
|
|
3235
3785
|
href: action.href,
|
|
@@ -3239,8 +3789,8 @@ function SuiteAiPanel({
|
|
|
3239
3789
|
)
|
|
3240
3790
|
] }) : null
|
|
3241
3791
|
] }) : null,
|
|
3242
|
-
action.status === "cancelled" ? /* @__PURE__ */ (0,
|
|
3243
|
-
action.status === "failed" ? /* @__PURE__ */ (0,
|
|
3792
|
+
action.status === "cancelled" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: "Cancelled" }) : null,
|
|
3793
|
+
action.status === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-1 text-xs text-ph-danger", children: action.error || "Could not apply that." }) : null
|
|
3244
3794
|
]
|
|
3245
3795
|
},
|
|
3246
3796
|
action.id
|
|
@@ -3251,26 +3801,26 @@ function SuiteAiPanel({
|
|
|
3251
3801
|
`assistant-${index}`
|
|
3252
3802
|
);
|
|
3253
3803
|
}),
|
|
3254
|
-
loading ? /* @__PURE__ */ (0,
|
|
3255
|
-
/* @__PURE__ */ (0,
|
|
3256
|
-
/* @__PURE__ */ (0,
|
|
3257
|
-
/* @__PURE__ */ (0,
|
|
3258
|
-
/* @__PURE__ */ (0,
|
|
3259
|
-
/* @__PURE__ */ (0,
|
|
3804
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-end gap-2", "aria-hidden": true, children: [
|
|
3805
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "mb-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-ph-brand/10 text-ph-brand", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Icon, { className: "h-3.5 w-3.5" }) }),
|
|
3806
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1.5 rounded-2xl rounded-bl-md bg-ph-muted px-3 py-2.5", children: [
|
|
3807
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-ph-mutedtext motion-safe:animate-bounce" }),
|
|
3808
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-ph-mutedtext motion-safe:animate-bounce [animation-delay:0.15s]" }),
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-ph-mutedtext motion-safe:animate-bounce [animation-delay:0.3s]" })
|
|
3260
3810
|
] })
|
|
3261
3811
|
] }) : null,
|
|
3262
|
-
loading ? /* @__PURE__ */ (0,
|
|
3263
|
-
error ? /* @__PURE__ */ (0,
|
|
3812
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "sr-only", "aria-live": "polite", children: "Assistant is responding\u2026" }) : null,
|
|
3813
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3264
3814
|
"div",
|
|
3265
3815
|
{
|
|
3266
3816
|
role: "alert",
|
|
3267
3817
|
className: "flex items-start gap-2 rounded-xl border border-ph-danger/30 bg-ph-danger/10 px-3 py-2.5 text-sm text-ph-ink",
|
|
3268
3818
|
children: [
|
|
3269
|
-
/* @__PURE__ */ (0,
|
|
3270
|
-
/* @__PURE__ */ (0,
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3272
|
-
/* @__PURE__ */ (0,
|
|
3273
|
-
/* @__PURE__ */ (0,
|
|
3819
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.WarningTriangle, { className: "mt-0.5 h-4 w-4 shrink-0 text-ph-danger" }),
|
|
3820
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
3821
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-medium text-ph-danger", children: "Something went wrong" }),
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "mt-0.5 text-ph-subtle", children: error }),
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3274
3824
|
"button",
|
|
3275
3825
|
{
|
|
3276
3826
|
type: "button",
|
|
@@ -3287,20 +3837,20 @@ function SuiteAiPanel({
|
|
|
3287
3837
|
]
|
|
3288
3838
|
}
|
|
3289
3839
|
),
|
|
3290
|
-
!atBottom ? /* @__PURE__ */ (0,
|
|
3840
|
+
!atBottom ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "absolute bottom-3 left-1/2 -translate-x-1/2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { content: "Scroll to latest", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3291
3841
|
"button",
|
|
3292
3842
|
{
|
|
3293
3843
|
type: "button",
|
|
3294
3844
|
onClick: () => scrollToBottom("smooth"),
|
|
3295
3845
|
className: "flex h-9 w-9 items-center justify-center rounded-full border border-ph-border bg-ph-surface text-ph-subtle shadow-ph-md transition-colors hover:text-ph-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-focus",
|
|
3296
3846
|
"aria-label": "Scroll to latest",
|
|
3297
|
-
children: /* @__PURE__ */ (0,
|
|
3847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.ArrowDown, { className: "h-4 w-4" })
|
|
3298
3848
|
}
|
|
3299
3849
|
) }) }) : null
|
|
3300
3850
|
] }),
|
|
3301
|
-
/* @__PURE__ */ (0,
|
|
3302
|
-
/* @__PURE__ */ (0,
|
|
3303
|
-
/* @__PURE__ */ (0,
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "px-2 pt-2 pb-[max(2rem,calc(env(safe-area-inset-bottom)+1rem))]", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-end gap-1.5 rounded-2xl border border-ph-border bg-ph-surface px-1.5 py-1 transition-colors focus-within:border-ph-brand/45 focus-within:ring-2 focus-within:ring-ph-focus/35", children: [
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("label", { htmlFor: inputId, className: "sr-only", children: "Ask a question" }),
|
|
3853
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3304
3854
|
"textarea",
|
|
3305
3855
|
{
|
|
3306
3856
|
id: inputId,
|
|
@@ -3319,7 +3869,7 @@ function SuiteAiPanel({
|
|
|
3319
3869
|
className: "max-h-36 min-h-10 flex-1 resize-none bg-transparent px-1.5 py-2 text-sm leading-relaxed text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
3320
3870
|
}
|
|
3321
3871
|
),
|
|
3322
|
-
loading ? /* @__PURE__ */ (0,
|
|
3872
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { content: "Stop generating", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3323
3873
|
"button",
|
|
3324
3874
|
{
|
|
3325
3875
|
type: "button",
|
|
@@ -3327,9 +3877,9 @@ function SuiteAiPanel({
|
|
|
3327
3877
|
"data-test": "ask-ai-stop",
|
|
3328
3878
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-ph-muted text-ph-ink transition-colors hover:bg-ph-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-focus",
|
|
3329
3879
|
"aria-label": "Stop generating",
|
|
3330
|
-
children: /* @__PURE__ */ (0,
|
|
3880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.Square, { className: "h-3.5 w-3.5 fill-current" })
|
|
3331
3881
|
}
|
|
3332
|
-
) }) : /* @__PURE__ */ (0,
|
|
3882
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Tooltip, { content: "Send message", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3333
3883
|
"button",
|
|
3334
3884
|
{
|
|
3335
3885
|
type: "button",
|
|
@@ -3338,7 +3888,7 @@ function SuiteAiPanel({
|
|
|
3338
3888
|
"data-test": "ask-ai-send",
|
|
3339
3889
|
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-ph-brand text-[color:var(--ph-on-accent)] transition-opacity hover:bg-ph-brand-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-focus disabled:opacity-40",
|
|
3340
3890
|
"aria-label": "Send message",
|
|
3341
|
-
children: /* @__PURE__ */ (0,
|
|
3891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_iconoir_react8.ArrowUp, { className: "h-4 w-4" })
|
|
3342
3892
|
}
|
|
3343
3893
|
) })
|
|
3344
3894
|
] }) })
|
|
@@ -3348,9 +3898,9 @@ function SuiteAiPanel({
|
|
|
3348
3898
|
}
|
|
3349
3899
|
|
|
3350
3900
|
// src/suite/components/workspace-switcher.tsx
|
|
3351
|
-
var
|
|
3901
|
+
var import_react16 = require("react");
|
|
3352
3902
|
var import_iconoir_react9 = require("iconoir-react");
|
|
3353
|
-
var
|
|
3903
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3354
3904
|
function SuiteWorkspaceSwitcher({
|
|
3355
3905
|
workspaces = [],
|
|
3356
3906
|
groups,
|
|
@@ -3366,9 +3916,9 @@ function SuiteWorkspaceSwitcher({
|
|
|
3366
3916
|
footer
|
|
3367
3917
|
}) {
|
|
3368
3918
|
var _a;
|
|
3369
|
-
const [open, setOpen] = (0,
|
|
3919
|
+
const [open, setOpen] = (0, import_react16.useState)(false);
|
|
3370
3920
|
const sections = (_a = groups == null ? void 0 : groups.filter((group) => group.workspaces.length > 0)) != null ? _a : workspaces.length > 0 ? [{ id: "workspaces", label: "Switch workspace", workspaces }] : [];
|
|
3371
|
-
return /* @__PURE__ */ (0,
|
|
3921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3372
3922
|
DropdownMenu2,
|
|
3373
3923
|
{
|
|
3374
3924
|
"aria-label": "Switch workspace",
|
|
@@ -3379,7 +3929,7 @@ function SuiteWorkspaceSwitcher({
|
|
|
3379
3929
|
align: "start",
|
|
3380
3930
|
open,
|
|
3381
3931
|
onOpenChange: setOpen,
|
|
3382
|
-
trigger: /* @__PURE__ */ (0,
|
|
3932
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3383
3933
|
"span",
|
|
3384
3934
|
{
|
|
3385
3935
|
className: cn(
|
|
@@ -3390,10 +3940,10 @@ function SuiteWorkspaceSwitcher({
|
|
|
3390
3940
|
"data-test": "workspace-switcher-trigger",
|
|
3391
3941
|
"aria-expanded": open,
|
|
3392
3942
|
children: [
|
|
3393
|
-
/* @__PURE__ */ (0,
|
|
3394
|
-
!collapsed ? /* @__PURE__ */ (0,
|
|
3395
|
-
/* @__PURE__ */ (0,
|
|
3396
|
-
/* @__PURE__ */ (0,
|
|
3943
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_iconoir_react9.Building, { className: "h-4 w-4 shrink-0 text-ph-ink", "aria-hidden": true }),
|
|
3944
|
+
!collapsed ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
3945
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: name }),
|
|
3946
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3397
3947
|
import_iconoir_react9.NavArrowDown,
|
|
3398
3948
|
{
|
|
3399
3949
|
className: cn(
|
|
@@ -3407,16 +3957,16 @@ function SuiteWorkspaceSwitcher({
|
|
|
3407
3957
|
]
|
|
3408
3958
|
}
|
|
3409
3959
|
),
|
|
3410
|
-
children: /* @__PURE__ */ (0,
|
|
3960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
3411
3961
|
"div",
|
|
3412
3962
|
{
|
|
3413
3963
|
id: "workspace-switcher-menu",
|
|
3414
3964
|
className: "p-1",
|
|
3415
3965
|
"data-test": "workspace-switcher-menu",
|
|
3416
3966
|
children: [
|
|
3417
|
-
sections.length === 0 ? /* @__PURE__ */ (0,
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3419
|
-
section.workspaces.map((workspace) => /* @__PURE__ */ (0,
|
|
3967
|
+
sections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "px-3 py-2 text-sm text-ph-mutedtext", children: emptyLabel }) : sections.map((section) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "px-3 py-2 text-[10px] font-semibold uppercase tracking-[0.14em] text-ph-mutedtext", children: section.label }),
|
|
3969
|
+
section.workspaces.map((workspace) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3420
3970
|
DropdownItem2,
|
|
3421
3971
|
{
|
|
3422
3972
|
id: `workspace-option-${workspace.id}`,
|
|
@@ -3430,12 +3980,12 @@ function SuiteWorkspaceSwitcher({
|
|
|
3430
3980
|
onSelect(workspace);
|
|
3431
3981
|
},
|
|
3432
3982
|
className: appSwitcherMenuItemClass(),
|
|
3433
|
-
children: /* @__PURE__ */ (0,
|
|
3434
|
-
/* @__PURE__ */ (0,
|
|
3435
|
-
/* @__PURE__ */ (0,
|
|
3436
|
-
workspace.description ? /* @__PURE__ */ (0,
|
|
3983
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex min-w-0 w-full items-center gap-3", children: [
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "block truncate text-sm font-medium text-ph-ink", children: workspace.name }),
|
|
3986
|
+
workspace.description ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "block truncate text-xs text-ph-mutedtext", children: workspace.description }) : null
|
|
3437
3987
|
] }),
|
|
3438
|
-
workspace.id === currentId ? /* @__PURE__ */ (0,
|
|
3988
|
+
workspace.id === currentId ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3439
3989
|
import_iconoir_react9.Check,
|
|
3440
3990
|
{
|
|
3441
3991
|
className: "h-4 w-4 shrink-0 text-ph-brand",
|
|
@@ -3447,7 +3997,7 @@ function SuiteWorkspaceSwitcher({
|
|
|
3447
3997
|
workspace.id
|
|
3448
3998
|
))
|
|
3449
3999
|
] }, section.id)),
|
|
3450
|
-
footer ? /* @__PURE__ */ (0,
|
|
4000
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mt-1 border-t border-ph-border pt-1", children: footer }) : null
|
|
3451
4001
|
]
|
|
3452
4002
|
}
|
|
3453
4003
|
)
|
|
@@ -3456,7 +4006,7 @@ function SuiteWorkspaceSwitcher({
|
|
|
3456
4006
|
}
|
|
3457
4007
|
|
|
3458
4008
|
// src/suite/lib/use-sidebar-width.ts
|
|
3459
|
-
var
|
|
4009
|
+
var import_react17 = require("react");
|
|
3460
4010
|
var SIDEBAR_RAIL_WIDTH = 56;
|
|
3461
4011
|
var SIDEBAR_COLLAPSE_THRESHOLD = 80;
|
|
3462
4012
|
var SIDEBAR_MIN_EXPANDED_WIDTH = 180;
|
|
@@ -3585,10 +4135,10 @@ function resetSuiteSidebarWidth() {
|
|
|
3585
4135
|
}
|
|
3586
4136
|
function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SIDEBAR_DEFAULT_WIDTH) {
|
|
3587
4137
|
const fallbackWidth = snapWidth(clampWidth(defaultWidth));
|
|
3588
|
-
const [width, setWidth] = (0,
|
|
3589
|
-
const [narrowViewport, setNarrowViewport] = (0,
|
|
4138
|
+
const [width, setWidth] = (0, import_react17.useState)(fallbackWidth);
|
|
4139
|
+
const [narrowViewport, setNarrowViewport] = (0, import_react17.useState)(false);
|
|
3590
4140
|
const collapsed = narrowViewport || width <= SIDEBAR_COLLAPSE_THRESHOLD;
|
|
3591
|
-
(0,
|
|
4141
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3592
4142
|
const sync = () => {
|
|
3593
4143
|
const stored = readSidebarWidth(storageKey);
|
|
3594
4144
|
if (stored == null) return;
|
|
@@ -3604,20 +4154,20 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
3604
4154
|
document.removeEventListener("visibilitychange", sync);
|
|
3605
4155
|
};
|
|
3606
4156
|
}, [storageKey]);
|
|
3607
|
-
(0,
|
|
4157
|
+
(0, import_react17.useLayoutEffect)(() => {
|
|
3608
4158
|
const media = window.matchMedia("(max-width: 639px)");
|
|
3609
4159
|
const sync = () => setNarrowViewport(media.matches);
|
|
3610
4160
|
sync();
|
|
3611
4161
|
media.addEventListener("change", sync);
|
|
3612
4162
|
return () => media.removeEventListener("change", sync);
|
|
3613
4163
|
}, []);
|
|
3614
|
-
const persist = (0,
|
|
4164
|
+
const persist = (0, import_react17.useCallback)(
|
|
3615
4165
|
(value) => {
|
|
3616
4166
|
persistSidebarWidth(storageKey, value);
|
|
3617
4167
|
},
|
|
3618
4168
|
[storageKey]
|
|
3619
4169
|
);
|
|
3620
|
-
const setCollapsed = (0,
|
|
4170
|
+
const setCollapsed = (0, import_react17.useCallback)(
|
|
3621
4171
|
(value) => {
|
|
3622
4172
|
setWidth((current) => {
|
|
3623
4173
|
const next = value ? SIDEBAR_RAIL_WIDTH : current <= SIDEBAR_COLLAPSE_THRESHOLD ? fallbackWidth : snapWidth(current);
|
|
@@ -3627,11 +4177,11 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
3627
4177
|
},
|
|
3628
4178
|
[fallbackWidth, persist]
|
|
3629
4179
|
);
|
|
3630
|
-
const resetWidth = (0,
|
|
4180
|
+
const resetWidth = (0, import_react17.useCallback)(() => {
|
|
3631
4181
|
setWidth(fallbackWidth);
|
|
3632
4182
|
persist(fallbackWidth);
|
|
3633
4183
|
}, [fallbackWidth, persist]);
|
|
3634
|
-
const startResize = (0,
|
|
4184
|
+
const startResize = (0, import_react17.useCallback)(
|
|
3635
4185
|
(event) => {
|
|
3636
4186
|
event.preventDefault();
|
|
3637
4187
|
const startX = event.clientX;
|
|
@@ -3653,7 +4203,7 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
3653
4203
|
},
|
|
3654
4204
|
[persist, width]
|
|
3655
4205
|
);
|
|
3656
|
-
const resizeBy = (0,
|
|
4206
|
+
const resizeBy = (0, import_react17.useCallback)(
|
|
3657
4207
|
(delta) => {
|
|
3658
4208
|
setWidth((current) => {
|
|
3659
4209
|
const next = clampWidth(current + delta);
|
|
@@ -3667,10 +4217,10 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
3667
4217
|
}
|
|
3668
4218
|
|
|
3669
4219
|
// src/suite/lib/motion.tsx
|
|
3670
|
-
var
|
|
3671
|
-
var
|
|
4220
|
+
var import_react18 = require("motion/react");
|
|
4221
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3672
4222
|
function SuiteMotionProvider({ children }) {
|
|
3673
|
-
return /* @__PURE__ */ (0,
|
|
4223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react18.LazyMotion, { features: import_react18.domAnimation, strict: true, children });
|
|
3674
4224
|
}
|
|
3675
4225
|
var SUITE_SPRINGS = {
|
|
3676
4226
|
/** Snappy panel/sheet entrances — small overshoot. */
|
|
@@ -3682,24 +4232,24 @@ var SUITE_SPRINGS = {
|
|
|
3682
4232
|
};
|
|
3683
4233
|
|
|
3684
4234
|
// src/suite/components/suite-skeleton.tsx
|
|
3685
|
-
var
|
|
4235
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3686
4236
|
function SuiteSkeleton({
|
|
3687
4237
|
className,
|
|
3688
4238
|
lines = 1,
|
|
3689
4239
|
circle,
|
|
3690
4240
|
width
|
|
3691
4241
|
}) {
|
|
3692
|
-
return /* @__PURE__ */ (0,
|
|
4242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3693
4243
|
"div",
|
|
3694
4244
|
{
|
|
3695
4245
|
className: cn("space-y-2", circle ? "flex flex-col items-center" : ""),
|
|
3696
4246
|
"aria-hidden": true,
|
|
3697
|
-
children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0,
|
|
4247
|
+
children: Array.from({ length: lines }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3698
4248
|
"div",
|
|
3699
4249
|
{
|
|
3700
4250
|
className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
|
|
3701
4251
|
style: { animationDelay: `${index * 80}ms` },
|
|
3702
|
-
children: /* @__PURE__ */ (0,
|
|
4252
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3703
4253
|
"div",
|
|
3704
4254
|
{
|
|
3705
4255
|
className: cn(
|
|
@@ -3723,7 +4273,7 @@ function SuiteSkeletonCard({
|
|
|
3723
4273
|
rows = 3,
|
|
3724
4274
|
header = true
|
|
3725
4275
|
}) {
|
|
3726
|
-
return /* @__PURE__ */ (0,
|
|
4276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3727
4277
|
"div",
|
|
3728
4278
|
{
|
|
3729
4279
|
className: cn(
|
|
@@ -3732,26 +4282,26 @@ function SuiteSkeletonCard({
|
|
|
3732
4282
|
),
|
|
3733
4283
|
"aria-hidden": true,
|
|
3734
4284
|
children: [
|
|
3735
|
-
header ? /* @__PURE__ */ (0,
|
|
4285
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3736
4286
|
"div",
|
|
3737
4287
|
{
|
|
3738
4288
|
className: "mb-5 flex items-center gap-3 animate-[skeleton-stagger_0.5s_ease-out_both]",
|
|
3739
4289
|
style: { animationDelay: "100ms" },
|
|
3740
4290
|
children: [
|
|
3741
|
-
/* @__PURE__ */ (0,
|
|
3742
|
-
/* @__PURE__ */ (0,
|
|
3743
|
-
/* @__PURE__ */ (0,
|
|
3744
|
-
/* @__PURE__ */ (0,
|
|
4291
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-xl" }),
|
|
4292
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
4293
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-4 w-1/3" }),
|
|
4294
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
|
|
3745
4295
|
] })
|
|
3746
4296
|
]
|
|
3747
4297
|
}
|
|
3748
4298
|
) : null,
|
|
3749
|
-
/* @__PURE__ */ (0,
|
|
4299
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "space-y-3", children: Array.from({ length: rows }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3750
4300
|
"div",
|
|
3751
4301
|
{
|
|
3752
4302
|
className: "animate-[skeleton-stagger_0.5s_ease-out_both]",
|
|
3753
4303
|
style: { animationDelay: `${200 + index * 80}ms` },
|
|
3754
|
-
children: /* @__PURE__ */ (0,
|
|
4304
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3755
4305
|
"div",
|
|
3756
4306
|
{
|
|
3757
4307
|
className: "ph-skeleton h-3",
|
|
@@ -3769,16 +4319,16 @@ function SuiteSkeletonList({
|
|
|
3769
4319
|
className,
|
|
3770
4320
|
items = 4
|
|
3771
4321
|
}) {
|
|
3772
|
-
return /* @__PURE__ */ (0,
|
|
4322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("space-y-3", className), "aria-hidden": true, children: Array.from({ length: items }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3773
4323
|
"div",
|
|
3774
4324
|
{
|
|
3775
4325
|
className: "animate-[skeleton-stagger_0.6s_ease-out_both]",
|
|
3776
4326
|
style: { animationDelay: `${index * 100}ms` },
|
|
3777
|
-
children: /* @__PURE__ */ (0,
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3779
|
-
/* @__PURE__ */ (0,
|
|
3780
|
-
/* @__PURE__ */ (0,
|
|
3781
|
-
/* @__PURE__ */ (0,
|
|
4327
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-3 rounded-xl border border-ph-border bg-ph-surface p-4", children: [
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-10 w-10 rounded-lg" }),
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-3.5 w-3/4" }),
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "ph-skeleton h-3 w-1/2" })
|
|
3782
4332
|
] })
|
|
3783
4333
|
] })
|
|
3784
4334
|
},
|
|
@@ -3793,7 +4343,7 @@ function SuiteEmptyState({
|
|
|
3793
4343
|
className,
|
|
3794
4344
|
size = "md"
|
|
3795
4345
|
}) {
|
|
3796
|
-
return /* @__PURE__ */ (0,
|
|
4346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
3797
4347
|
"div",
|
|
3798
4348
|
{
|
|
3799
4349
|
className: cn(
|
|
@@ -3802,13 +4352,13 @@ function SuiteEmptyState({
|
|
|
3802
4352
|
className
|
|
3803
4353
|
),
|
|
3804
4354
|
children: [
|
|
3805
|
-
/* @__PURE__ */ (0,
|
|
3806
|
-
/* @__PURE__ */ (0,
|
|
3807
|
-
/* @__PURE__ */ (0,
|
|
4355
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "pointer-events-none absolute inset-0 overflow-hidden opacity-60", "aria-hidden": true, children: [
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute -left-10 -top-10 h-40 w-40 rounded-full bg-ph-brand/10 blur-3xl" }),
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "absolute -bottom-10 -right-10 h-40 w-40 rounded-full bg-ph-accent/10 blur-3xl" })
|
|
3808
4358
|
] }),
|
|
3809
|
-
/* @__PURE__ */ (0,
|
|
3810
|
-
icon ? /* @__PURE__ */ (0,
|
|
3811
|
-
/* @__PURE__ */ (0,
|
|
4359
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative", children: [
|
|
4360
|
+
icon ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mx-auto mb-4 inline-flex items-center justify-center rounded-2xl bg-ph-muted p-3 shadow-sm ring-1 ring-black/[0.06]", children: icon }) : null,
|
|
4361
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3812
4362
|
"h3",
|
|
3813
4363
|
{
|
|
3814
4364
|
className: cn(
|
|
@@ -3818,8 +4368,8 @@ function SuiteEmptyState({
|
|
|
3818
4368
|
children: title
|
|
3819
4369
|
}
|
|
3820
4370
|
),
|
|
3821
|
-
description ? /* @__PURE__ */ (0,
|
|
3822
|
-
action ? /* @__PURE__ */ (0,
|
|
4371
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "mx-auto mt-2 max-w-sm text-sm leading-relaxed text-ph-subtle", children: description }) : null,
|
|
4372
|
+
action ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mt-5 flex flex-wrap items-center justify-center gap-2", children: action }) : null
|
|
3823
4373
|
] })
|
|
3824
4374
|
]
|
|
3825
4375
|
}
|
|
@@ -3827,8 +4377,8 @@ function SuiteEmptyState({
|
|
|
3827
4377
|
}
|
|
3828
4378
|
|
|
3829
4379
|
// src/suite/components/suite-settings-mobile-nav.tsx
|
|
3830
|
-
var
|
|
3831
|
-
var
|
|
4380
|
+
var import_react19 = require("react");
|
|
4381
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3832
4382
|
function SuiteSettingsMobileNav({
|
|
3833
4383
|
items,
|
|
3834
4384
|
activeHref,
|
|
@@ -3837,16 +4387,16 @@ function SuiteSettingsMobileNav({
|
|
|
3837
4387
|
ariaLabel = "Settings sections",
|
|
3838
4388
|
className
|
|
3839
4389
|
}) {
|
|
3840
|
-
return /* @__PURE__ */ (0,
|
|
4390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3841
4391
|
"nav",
|
|
3842
4392
|
{
|
|
3843
4393
|
"data-test": dataTest,
|
|
3844
4394
|
"aria-label": ariaLabel,
|
|
3845
4395
|
className: cn("suite-settings-mobile-nav lg:hidden", className),
|
|
3846
|
-
children: /* @__PURE__ */ (0,
|
|
4396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex snap-x gap-2 overflow-x-auto pb-3 pt-1 scrollbar-hide [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", children: items.map((item) => {
|
|
3847
4397
|
const Icon = item.icon;
|
|
3848
4398
|
const active = activeHref === item.href || activeHref.startsWith(`${item.href}/`);
|
|
3849
|
-
const iconNode = (0,
|
|
4399
|
+
const iconNode = (0, import_react19.isValidElement)(item.icon) ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
3850
4400
|
Icon,
|
|
3851
4401
|
{
|
|
3852
4402
|
className: cn(
|
|
@@ -3856,7 +4406,7 @@ function SuiteSettingsMobileNav({
|
|
|
3856
4406
|
"aria-hidden": true
|
|
3857
4407
|
}
|
|
3858
4408
|
);
|
|
3859
|
-
return /* @__PURE__ */ (0,
|
|
4409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3860
4410
|
"button",
|
|
3861
4411
|
{
|
|
3862
4412
|
type: "button",
|
|
@@ -3871,8 +4421,8 @@ function SuiteSettingsMobileNav({
|
|
|
3871
4421
|
),
|
|
3872
4422
|
children: [
|
|
3873
4423
|
iconNode,
|
|
3874
|
-
/* @__PURE__ */ (0,
|
|
3875
|
-
active ? /* @__PURE__ */ (0,
|
|
4424
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "whitespace-nowrap", children: item.label }),
|
|
4425
|
+
active ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "absolute inset-x-0 -bottom-3 h-0.5 rounded-full bg-ph-ink lg:hidden" }) : null
|
|
3876
4426
|
]
|
|
3877
4427
|
},
|
|
3878
4428
|
item.href
|
|
@@ -3884,9 +4434,9 @@ function SuiteSettingsMobileNav({
|
|
|
3884
4434
|
|
|
3885
4435
|
// src/suite/components/suite-sidebar.tsx
|
|
3886
4436
|
var import_link2 = __toESM(require("next/link"));
|
|
3887
|
-
var
|
|
4437
|
+
var import_react20 = require("react");
|
|
3888
4438
|
var import_iconoir_react10 = require("iconoir-react");
|
|
3889
|
-
var
|
|
4439
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3890
4440
|
function renderNode(node, collapsed) {
|
|
3891
4441
|
if (typeof node === "function") return node(collapsed);
|
|
3892
4442
|
return node;
|
|
@@ -3909,14 +4459,14 @@ function SuiteSidebar({
|
|
|
3909
4459
|
}) {
|
|
3910
4460
|
const showAskAi = Boolean(onAskAiOpenChange && askAi);
|
|
3911
4461
|
const chatOpen = showAskAi && askAiOpen && !collapsed;
|
|
3912
|
-
const setAskAi = (0,
|
|
4462
|
+
const setAskAi = (0, import_react20.useCallback)(
|
|
3913
4463
|
(next) => {
|
|
3914
4464
|
persistSuiteAskAiOpen(next);
|
|
3915
4465
|
onAskAiOpenChange == null ? void 0 : onAskAiOpenChange(next);
|
|
3916
4466
|
},
|
|
3917
4467
|
[onAskAiOpenChange]
|
|
3918
4468
|
);
|
|
3919
|
-
(0,
|
|
4469
|
+
(0, import_react20.useEffect)(() => {
|
|
3920
4470
|
if (!onAskAiOpenChange) return;
|
|
3921
4471
|
function onOpen() {
|
|
3922
4472
|
onRequestExpand == null ? void 0 : onRequestExpand();
|
|
@@ -3925,7 +4475,7 @@ function SuiteSidebar({
|
|
|
3925
4475
|
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
3926
4476
|
return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
3927
4477
|
}, [onAskAiOpenChange, onRequestExpand, setAskAi]);
|
|
3928
|
-
(0,
|
|
4478
|
+
(0, import_react20.useEffect)(() => {
|
|
3929
4479
|
if (!chatOpen) return;
|
|
3930
4480
|
function onKey(event) {
|
|
3931
4481
|
if (event.key === "Escape") setAskAi(false);
|
|
@@ -3941,7 +4491,7 @@ function SuiteSidebar({
|
|
|
3941
4491
|
if (collapsed) onRequestExpand == null ? void 0 : onRequestExpand();
|
|
3942
4492
|
setAskAi(true);
|
|
3943
4493
|
}
|
|
3944
|
-
const askAiButton = /* @__PURE__ */ (0,
|
|
4494
|
+
const askAiButton = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3945
4495
|
"button",
|
|
3946
4496
|
{
|
|
3947
4497
|
type: "button",
|
|
@@ -3953,11 +4503,11 @@ function SuiteSidebar({
|
|
|
3953
4503
|
"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ph-focus-ring",
|
|
3954
4504
|
askAiOpen ? "bg-ph-brand/10 text-ph-brand" : "text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink"
|
|
3955
4505
|
),
|
|
3956
|
-
children: /* @__PURE__ */ (0,
|
|
4506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_iconoir_react10.Sparks, { className: "h-4 w-4", "aria-hidden": true })
|
|
3957
4507
|
}
|
|
3958
4508
|
);
|
|
3959
4509
|
if (chatOpen) {
|
|
3960
|
-
return /* @__PURE__ */ (0,
|
|
4510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3961
4511
|
"div",
|
|
3962
4512
|
{
|
|
3963
4513
|
"data-suite-chat-open": "",
|
|
@@ -3967,7 +4517,7 @@ function SuiteSidebar({
|
|
|
3967
4517
|
className
|
|
3968
4518
|
),
|
|
3969
4519
|
children: [
|
|
3970
|
-
/* @__PURE__ */ (0,
|
|
4520
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3971
4521
|
"div",
|
|
3972
4522
|
{
|
|
3973
4523
|
className: cn(
|
|
@@ -3975,7 +4525,7 @@ function SuiteSidebar({
|
|
|
3975
4525
|
surface ? "bg-ph-surface" : "bg-ph-canvas"
|
|
3976
4526
|
),
|
|
3977
4527
|
children: [
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
4528
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Tooltip, { content: "Back to navigation", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3979
4529
|
"button",
|
|
3980
4530
|
{
|
|
3981
4531
|
type: "button",
|
|
@@ -3983,19 +4533,19 @@ function SuiteSidebar({
|
|
|
3983
4533
|
"aria-label": "Back to navigation",
|
|
3984
4534
|
onClick: () => setAskAi(false),
|
|
3985
4535
|
className: "inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-ph-subtle transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-brand",
|
|
3986
|
-
children: /* @__PURE__ */ (0,
|
|
4536
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_iconoir_react10.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true })
|
|
3987
4537
|
}
|
|
3988
4538
|
) }),
|
|
3989
|
-
/* @__PURE__ */ (0,
|
|
4539
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
|
|
3990
4540
|
]
|
|
3991
4541
|
}
|
|
3992
4542
|
),
|
|
3993
|
-
/* @__PURE__ */ (0,
|
|
4543
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
|
|
3994
4544
|
]
|
|
3995
4545
|
}
|
|
3996
4546
|
);
|
|
3997
4547
|
}
|
|
3998
|
-
return /* @__PURE__ */ (0,
|
|
4548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3999
4549
|
"div",
|
|
4000
4550
|
{
|
|
4001
4551
|
className: cn(
|
|
@@ -4004,7 +4554,7 @@ function SuiteSidebar({
|
|
|
4004
4554
|
className
|
|
4005
4555
|
),
|
|
4006
4556
|
children: [
|
|
4007
|
-
appSwitcher || notificationBell ? /* @__PURE__ */ (0,
|
|
4557
|
+
appSwitcher || notificationBell ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4008
4558
|
"div",
|
|
4009
4559
|
{
|
|
4010
4560
|
className: cn(
|
|
@@ -4013,12 +4563,12 @@ function SuiteSidebar({
|
|
|
4013
4563
|
collapsed ? "flex-col items-center gap-1 px-1 py-2" : "h-14 items-center justify-between gap-2 px-3"
|
|
4014
4564
|
),
|
|
4015
4565
|
children: [
|
|
4016
|
-
/* @__PURE__ */ (0,
|
|
4017
|
-
collapsed ? null : /* @__PURE__ */ (0,
|
|
4566
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("min-w-0", collapsed ? "shrink-0" : "flex-1"), children: renderNode(appSwitcher, collapsed) }),
|
|
4567
|
+
collapsed ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "shrink-0", children: renderNode(notificationBell, collapsed) })
|
|
4018
4568
|
]
|
|
4019
4569
|
}
|
|
4020
4570
|
) : null,
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4571
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4022
4572
|
"div",
|
|
4023
4573
|
{
|
|
4024
4574
|
className: cn(
|
|
@@ -4028,10 +4578,10 @@ function SuiteSidebar({
|
|
|
4028
4578
|
collapsed ? "px-1.5 py-2" : "p-2"
|
|
4029
4579
|
),
|
|
4030
4580
|
children: [
|
|
4031
|
-
/* @__PURE__ */ (0,
|
|
4032
|
-
chatOpen ? /* @__PURE__ */ (0,
|
|
4033
|
-
/* @__PURE__ */ (0,
|
|
4034
|
-
/* @__PURE__ */ (0,
|
|
4581
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("mb-3 w-full shrink-0", collapsed && "flex justify-center"), children: renderNode(contextSwitcher, collapsed) }),
|
|
4582
|
+
chatOpen ? /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
4583
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "mb-2 flex shrink-0 items-center gap-1", children: [
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4035
4585
|
"button",
|
|
4036
4586
|
{
|
|
4037
4587
|
type: "button",
|
|
@@ -4039,20 +4589,20 @@ function SuiteSidebar({
|
|
|
4039
4589
|
onClick: () => setAskAi(false),
|
|
4040
4590
|
className: "inline-flex h-9 items-center gap-1 rounded-lg px-2 text-sm font-medium text-ph-subtle transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-brand",
|
|
4041
4591
|
children: [
|
|
4042
|
-
/* @__PURE__ */ (0,
|
|
4592
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_iconoir_react10.NavArrowLeft, { className: "h-4 w-4", "aria-hidden": true }),
|
|
4043
4593
|
"Nav"
|
|
4044
4594
|
]
|
|
4045
4595
|
}
|
|
4046
4596
|
),
|
|
4047
|
-
/* @__PURE__ */ (0,
|
|
4597
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate text-sm font-semibold text-ph-ink", children: "Shelly AI" })
|
|
4048
4598
|
] }),
|
|
4049
|
-
/* @__PURE__ */ (0,
|
|
4050
|
-
] }) : /* @__PURE__ */ (0,
|
|
4051
|
-
/* @__PURE__ */ (0,
|
|
4599
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "min-h-0 flex-1", children: askAi })
|
|
4600
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
4601
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("nav", { "aria-label": "Pages", className: "shrink-0 space-y-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "space-y-0.5", children: navItems.map((item) => {
|
|
4052
4602
|
var _a;
|
|
4053
4603
|
const Icon = item.icon;
|
|
4054
4604
|
const active = Boolean(item.active);
|
|
4055
|
-
const link = /* @__PURE__ */ (0,
|
|
4605
|
+
const link = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4056
4606
|
import_link2.default,
|
|
4057
4607
|
{
|
|
4058
4608
|
href: item.href,
|
|
@@ -4066,7 +4616,7 @@ function SuiteSidebar({
|
|
|
4066
4616
|
collapsed ? "mx-auto size-11 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
|
|
4067
4617
|
),
|
|
4068
4618
|
children: [
|
|
4069
|
-
/* @__PURE__ */ (0,
|
|
4619
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4070
4620
|
"span",
|
|
4071
4621
|
{
|
|
4072
4622
|
className: cn(
|
|
@@ -4074,7 +4624,7 @@ function SuiteSidebar({
|
|
|
4074
4624
|
item.iconClassName
|
|
4075
4625
|
),
|
|
4076
4626
|
"aria-hidden": true,
|
|
4077
|
-
children: /* @__PURE__ */ (0,
|
|
4627
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4078
4628
|
Icon,
|
|
4079
4629
|
{
|
|
4080
4630
|
className: "h-full w-full",
|
|
@@ -4083,7 +4633,7 @@ function SuiteSidebar({
|
|
|
4083
4633
|
)
|
|
4084
4634
|
}
|
|
4085
4635
|
),
|
|
4086
|
-
/* @__PURE__ */ (0,
|
|
4636
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4087
4637
|
"span",
|
|
4088
4638
|
{
|
|
4089
4639
|
className: cn(
|
|
@@ -4094,14 +4644,14 @@ function SuiteSidebar({
|
|
|
4094
4644
|
children: item.label
|
|
4095
4645
|
}
|
|
4096
4646
|
),
|
|
4097
|
-
!collapsed && item.badge ? /* @__PURE__ */ (0,
|
|
4647
|
+
!collapsed && item.badge ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "relative ml-auto shrink-0", children: item.badge }) : null
|
|
4098
4648
|
]
|
|
4099
4649
|
},
|
|
4100
4650
|
item.label
|
|
4101
4651
|
);
|
|
4102
|
-
return collapsed ? /* @__PURE__ */ (0,
|
|
4652
|
+
return collapsed ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Tooltip, { content: item.label, side: "right", children: link }, item.label) : link;
|
|
4103
4653
|
}) }) }),
|
|
4104
|
-
secondaryNav ? /* @__PURE__ */ (0,
|
|
4654
|
+
secondaryNav ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4105
4655
|
"div",
|
|
4106
4656
|
{
|
|
4107
4657
|
className: "min-h-0 flex-1",
|
|
@@ -4113,7 +4663,7 @@ function SuiteSidebar({
|
|
|
4113
4663
|
]
|
|
4114
4664
|
}
|
|
4115
4665
|
),
|
|
4116
|
-
/* @__PURE__ */ (0,
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4117
4667
|
"div",
|
|
4118
4668
|
{
|
|
4119
4669
|
className: cn(
|
|
@@ -4121,7 +4671,7 @@ function SuiteSidebar({
|
|
|
4121
4671
|
surface ? "bg-ph-surface" : "bg-ph-canvas",
|
|
4122
4672
|
collapsed ? "p-1.5" : "p-3"
|
|
4123
4673
|
),
|
|
4124
|
-
children: /* @__PURE__ */ (0,
|
|
4674
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
4125
4675
|
"div",
|
|
4126
4676
|
{
|
|
4127
4677
|
className: cn(
|
|
@@ -4130,14 +4680,14 @@ function SuiteSidebar({
|
|
|
4130
4680
|
),
|
|
4131
4681
|
children: [
|
|
4132
4682
|
renderNode(userMenu, collapsed),
|
|
4133
|
-
showAskAi ? /* @__PURE__ */ (0,
|
|
4683
|
+
showAskAi ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4134
4684
|
"div",
|
|
4135
4685
|
{
|
|
4136
4686
|
className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"),
|
|
4137
|
-
children: /* @__PURE__ */ (0,
|
|
4687
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Tooltip, { content: "Shelly AI", side: collapsed ? "right" : "top", children: askAiButton })
|
|
4138
4688
|
}
|
|
4139
|
-
) : footerExtras ? /* @__PURE__ */ (0,
|
|
4140
|
-
showAskAi && footerExtras ? /* @__PURE__ */ (0,
|
|
4689
|
+
) : footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("shrink-0", collapsed ? "mt-2" : "ml-auto"), children: renderNode(footerExtras, collapsed) }) : null,
|
|
4690
|
+
showAskAi && footerExtras ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("shrink-0", collapsed && "mt-2"), children: renderNode(footerExtras, collapsed) }) : null
|
|
4141
4691
|
]
|
|
4142
4692
|
}
|
|
4143
4693
|
)
|
|
@@ -4149,7 +4699,7 @@ function SuiteSidebar({
|
|
|
4149
4699
|
}
|
|
4150
4700
|
|
|
4151
4701
|
// src/suite/components/suite-app-layout.tsx
|
|
4152
|
-
var
|
|
4702
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4153
4703
|
function SuiteAppLayout({
|
|
4154
4704
|
sidebar,
|
|
4155
4705
|
children,
|
|
@@ -4163,7 +4713,7 @@ function SuiteAppLayout({
|
|
|
4163
4713
|
onResetWidth,
|
|
4164
4714
|
className
|
|
4165
4715
|
}) {
|
|
4166
|
-
return /* @__PURE__ */ (0,
|
|
4716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4167
4717
|
"div",
|
|
4168
4718
|
{
|
|
4169
4719
|
"data-test": "app-shell",
|
|
@@ -4172,15 +4722,15 @@ function SuiteAppLayout({
|
|
|
4172
4722
|
className
|
|
4173
4723
|
),
|
|
4174
4724
|
children: [
|
|
4175
|
-
/* @__PURE__ */ (0,
|
|
4725
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
4176
4726
|
"aside",
|
|
4177
4727
|
{
|
|
4178
4728
|
className: "relative hidden shrink-0 flex-col overflow-visible border-r border-ph-border ease-out lg:flex",
|
|
4179
4729
|
style: { width: `${sidebarWidth}px` },
|
|
4180
4730
|
"data-collapsed": collapsed ? "true" : "false",
|
|
4181
4731
|
children: [
|
|
4182
|
-
/* @__PURE__ */ (0,
|
|
4183
|
-
onStartResize ? /* @__PURE__ */ (0,
|
|
4732
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "relative z-0 h-full min-h-0 isolate", children: sidebar }),
|
|
4733
|
+
onStartResize ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4184
4734
|
"div",
|
|
4185
4735
|
{
|
|
4186
4736
|
role: "separator",
|
|
@@ -4208,9 +4758,9 @@ function SuiteAppLayout({
|
|
|
4208
4758
|
]
|
|
4209
4759
|
}
|
|
4210
4760
|
),
|
|
4211
|
-
/* @__PURE__ */ (0,
|
|
4212
|
-
mobileHeader ? /* @__PURE__ */ (0,
|
|
4213
|
-
/* @__PURE__ */ (0,
|
|
4761
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
4762
|
+
mobileHeader ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "shrink-0 lg:hidden", children: mobileHeader }) : null,
|
|
4763
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
4214
4764
|
"main",
|
|
4215
4765
|
{
|
|
4216
4766
|
id: "main-content",
|
|
@@ -4224,12 +4774,686 @@ function SuiteAppLayout({
|
|
|
4224
4774
|
children
|
|
4225
4775
|
}
|
|
4226
4776
|
),
|
|
4227
|
-
bottomNav ? /* @__PURE__ */ (0,
|
|
4777
|
+
bottomNav ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "shrink-0 lg:hidden", children: bottomNav }) : null
|
|
4228
4778
|
] })
|
|
4229
4779
|
]
|
|
4230
4780
|
}
|
|
4231
4781
|
);
|
|
4232
4782
|
}
|
|
4783
|
+
|
|
4784
|
+
// src/suite/components/suite-integration-picker.tsx
|
|
4785
|
+
var import_react25 = require("react");
|
|
4786
|
+
var import_iconoir_react11 = require("iconoir-react");
|
|
4787
|
+
|
|
4788
|
+
// src/components/ui/Button.tsx
|
|
4789
|
+
var import_react21 = require("react");
|
|
4790
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4791
|
+
var variantClass = {
|
|
4792
|
+
primary: "ph-btn-primary",
|
|
4793
|
+
secondary: "ph-btn-secondary",
|
|
4794
|
+
tertiary: "ph-btn-tertiary",
|
|
4795
|
+
signal: "ph-btn-signal",
|
|
4796
|
+
accent: "ph-btn-accent",
|
|
4797
|
+
neutral: "ph-btn-neutral",
|
|
4798
|
+
info: "ph-btn-info",
|
|
4799
|
+
success: "ph-btn-success",
|
|
4800
|
+
warning: "ph-btn-warning",
|
|
4801
|
+
danger: "ph-btn-danger",
|
|
4802
|
+
ghost: "ph-btn-ghost",
|
|
4803
|
+
link: "ph-btn-link"
|
|
4804
|
+
};
|
|
4805
|
+
var sizeClass = {
|
|
4806
|
+
xs: "ph-btn-xs",
|
|
4807
|
+
sm: "ph-btn-sm",
|
|
4808
|
+
md: "",
|
|
4809
|
+
lg: "ph-btn-lg"
|
|
4810
|
+
};
|
|
4811
|
+
var shapeClass = {
|
|
4812
|
+
default: "",
|
|
4813
|
+
circle: "ph-btn-circle",
|
|
4814
|
+
square: "ph-btn-square",
|
|
4815
|
+
wide: "ph-btn-wide"
|
|
4816
|
+
};
|
|
4817
|
+
var Button = (0, import_react21.forwardRef)(function Button2(_a, ref) {
|
|
4818
|
+
var _b = _a, {
|
|
4819
|
+
variant = "secondary",
|
|
4820
|
+
size = "md",
|
|
4821
|
+
shape = "default",
|
|
4822
|
+
outline = false,
|
|
4823
|
+
split = false,
|
|
4824
|
+
icon,
|
|
4825
|
+
sideIcon,
|
|
4826
|
+
loading = false,
|
|
4827
|
+
loadingLabel,
|
|
4828
|
+
className,
|
|
4829
|
+
children,
|
|
4830
|
+
type = "button",
|
|
4831
|
+
disabled
|
|
4832
|
+
} = _b, props = __objRest(_b, [
|
|
4833
|
+
"variant",
|
|
4834
|
+
"size",
|
|
4835
|
+
"shape",
|
|
4836
|
+
"outline",
|
|
4837
|
+
"split",
|
|
4838
|
+
"icon",
|
|
4839
|
+
"sideIcon",
|
|
4840
|
+
"loading",
|
|
4841
|
+
"loadingLabel",
|
|
4842
|
+
"className",
|
|
4843
|
+
"children",
|
|
4844
|
+
"type",
|
|
4845
|
+
"disabled"
|
|
4846
|
+
]);
|
|
4847
|
+
const usesLemonChrome = !["tertiary", "ghost", "link"].includes(variant);
|
|
4848
|
+
const label = loadingLabel != null ? loadingLabel : children;
|
|
4849
|
+
const leadingIcon = loading ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ph-btn-spinner", "aria-hidden": true }) : icon;
|
|
4850
|
+
const content = usesLemonChrome ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ButtonChrome, { label, icon: leadingIcon, sideIcon, split }) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
4851
|
+
leadingIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ph-btn-icon", children: leadingIcon }) : null,
|
|
4852
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ph-btn-label", children: label }) : null,
|
|
4853
|
+
split ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ph-btn-split-divider", "aria-hidden": true }) : null,
|
|
4854
|
+
sideIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "ph-btn-side-icon", children: sideIcon }) : null
|
|
4855
|
+
] });
|
|
4856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
4857
|
+
"button",
|
|
4858
|
+
__spreadProps(__spreadValues({
|
|
4859
|
+
ref,
|
|
4860
|
+
type,
|
|
4861
|
+
disabled: disabled || loading,
|
|
4862
|
+
"aria-busy": loading || void 0,
|
|
4863
|
+
className: cn2(
|
|
4864
|
+
"ph-btn",
|
|
4865
|
+
usesLemonChrome && "ph-btn-raised",
|
|
4866
|
+
outline && "ph-btn-outline",
|
|
4867
|
+
variantClass[variant],
|
|
4868
|
+
sizeClass[size],
|
|
4869
|
+
shapeClass[shape],
|
|
4870
|
+
split && "ph-btn-split",
|
|
4871
|
+
className
|
|
4872
|
+
)
|
|
4873
|
+
}, props), {
|
|
4874
|
+
children: content
|
|
4875
|
+
})
|
|
4876
|
+
);
|
|
4877
|
+
});
|
|
4878
|
+
Button.displayName = "Button";
|
|
4879
|
+
|
|
4880
|
+
// src/components/ui/Input.tsx
|
|
4881
|
+
var import_react23 = require("react");
|
|
4882
|
+
|
|
4883
|
+
// src/components/ui/FormField.tsx
|
|
4884
|
+
var import_react22 = require("react");
|
|
4885
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
4886
|
+
function FormField(_a) {
|
|
4887
|
+
var _b = _a, {
|
|
4888
|
+
controlId,
|
|
4889
|
+
label,
|
|
4890
|
+
hideLabel = false,
|
|
4891
|
+
helperText,
|
|
4892
|
+
error,
|
|
4893
|
+
required = false,
|
|
4894
|
+
disabled = false,
|
|
4895
|
+
children,
|
|
4896
|
+
className
|
|
4897
|
+
} = _b, props = __objRest(_b, [
|
|
4898
|
+
"controlId",
|
|
4899
|
+
"label",
|
|
4900
|
+
"hideLabel",
|
|
4901
|
+
"helperText",
|
|
4902
|
+
"error",
|
|
4903
|
+
"required",
|
|
4904
|
+
"disabled",
|
|
4905
|
+
"children",
|
|
4906
|
+
"className"
|
|
4907
|
+
]);
|
|
4908
|
+
const generatedId = (0, import_react22.useId)();
|
|
4909
|
+
const id = controlId != null ? controlId : generatedId;
|
|
4910
|
+
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
4911
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
4912
|
+
const controlProps = {
|
|
4913
|
+
id,
|
|
4914
|
+
"aria-describedby": descriptionId,
|
|
4915
|
+
"aria-errormessage": errorId,
|
|
4916
|
+
"aria-invalid": error ? true : void 0
|
|
4917
|
+
};
|
|
4918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", __spreadProps(__spreadValues({ className: cn2("ph-field", className) }, props), { children: [
|
|
4919
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
4920
|
+
"label",
|
|
4921
|
+
{
|
|
4922
|
+
htmlFor: id,
|
|
4923
|
+
className: cn2("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
4924
|
+
children: [
|
|
4925
|
+
label,
|
|
4926
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
|
|
4927
|
+
]
|
|
4928
|
+
}
|
|
4929
|
+
) : null,
|
|
4930
|
+
typeof children === "function" ? children(controlProps) : children,
|
|
4931
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
4932
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
4933
|
+
] }));
|
|
4934
|
+
}
|
|
4935
|
+
|
|
4936
|
+
// src/components/ui/Input.tsx
|
|
4937
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
4938
|
+
var sizeMap = {
|
|
4939
|
+
sm: "ph-input-sm",
|
|
4940
|
+
md: "",
|
|
4941
|
+
lg: "ph-input-lg"
|
|
4942
|
+
};
|
|
4943
|
+
function joinIds(...ids) {
|
|
4944
|
+
const value = ids.filter(Boolean).join(" ");
|
|
4945
|
+
return value || void 0;
|
|
4946
|
+
}
|
|
4947
|
+
var Input = (0, import_react23.forwardRef)(function Input2(_a, ref) {
|
|
4948
|
+
var _b = _a, {
|
|
4949
|
+
id: idProp,
|
|
4950
|
+
label,
|
|
4951
|
+
hideLabel = false,
|
|
4952
|
+
error,
|
|
4953
|
+
helperText,
|
|
4954
|
+
size = "md",
|
|
4955
|
+
variant = "default",
|
|
4956
|
+
className,
|
|
4957
|
+
wrapperClassName,
|
|
4958
|
+
disabled,
|
|
4959
|
+
required,
|
|
4960
|
+
"aria-describedby": ariaDescribedBy
|
|
4961
|
+
} = _b, props = __objRest(_b, [
|
|
4962
|
+
"id",
|
|
4963
|
+
"label",
|
|
4964
|
+
"hideLabel",
|
|
4965
|
+
"error",
|
|
4966
|
+
"helperText",
|
|
4967
|
+
"size",
|
|
4968
|
+
"variant",
|
|
4969
|
+
"className",
|
|
4970
|
+
"wrapperClassName",
|
|
4971
|
+
"disabled",
|
|
4972
|
+
"required",
|
|
4973
|
+
"aria-describedby"
|
|
4974
|
+
]);
|
|
4975
|
+
const autoId = (0, import_react23.useId)();
|
|
4976
|
+
const id = idProp != null ? idProp : autoId;
|
|
4977
|
+
const hasError = Boolean(error);
|
|
4978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4979
|
+
FormField,
|
|
4980
|
+
{
|
|
4981
|
+
controlId: id,
|
|
4982
|
+
label,
|
|
4983
|
+
hideLabel,
|
|
4984
|
+
helperText,
|
|
4985
|
+
error,
|
|
4986
|
+
required,
|
|
4987
|
+
disabled,
|
|
4988
|
+
className: wrapperClassName,
|
|
4989
|
+
children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
4990
|
+
"input",
|
|
4991
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
4992
|
+
ref,
|
|
4993
|
+
disabled,
|
|
4994
|
+
required,
|
|
4995
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
4996
|
+
className: cn2(
|
|
4997
|
+
"ph-input w-full",
|
|
4998
|
+
sizeMap[size],
|
|
4999
|
+
variant === "ghost" && "ph-input-ghost",
|
|
5000
|
+
hasError && "ph-input-error",
|
|
5001
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
5002
|
+
className
|
|
5003
|
+
)
|
|
5004
|
+
}), props)
|
|
5005
|
+
)
|
|
5006
|
+
}
|
|
5007
|
+
);
|
|
5008
|
+
});
|
|
5009
|
+
Input.displayName = "Input";
|
|
5010
|
+
var Select = (0, import_react23.forwardRef)(function Select2(_a, ref) {
|
|
5011
|
+
var _b = _a, {
|
|
5012
|
+
id: idProp,
|
|
5013
|
+
label,
|
|
5014
|
+
hideLabel = false,
|
|
5015
|
+
error,
|
|
5016
|
+
helperText,
|
|
5017
|
+
size = "md",
|
|
5018
|
+
className,
|
|
5019
|
+
wrapperClassName,
|
|
5020
|
+
disabled,
|
|
5021
|
+
children,
|
|
5022
|
+
required,
|
|
5023
|
+
"aria-describedby": ariaDescribedBy
|
|
5024
|
+
} = _b, props = __objRest(_b, [
|
|
5025
|
+
"id",
|
|
5026
|
+
"label",
|
|
5027
|
+
"hideLabel",
|
|
5028
|
+
"error",
|
|
5029
|
+
"helperText",
|
|
5030
|
+
"size",
|
|
5031
|
+
"className",
|
|
5032
|
+
"wrapperClassName",
|
|
5033
|
+
"disabled",
|
|
5034
|
+
"children",
|
|
5035
|
+
"required",
|
|
5036
|
+
"aria-describedby"
|
|
5037
|
+
]);
|
|
5038
|
+
const autoId = (0, import_react23.useId)();
|
|
5039
|
+
const id = idProp != null ? idProp : autoId;
|
|
5040
|
+
const hasError = Boolean(error);
|
|
5041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5042
|
+
"select",
|
|
5043
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
5044
|
+
ref,
|
|
5045
|
+
disabled,
|
|
5046
|
+
required,
|
|
5047
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
5048
|
+
className: cn2(
|
|
5049
|
+
"ph-select w-full",
|
|
5050
|
+
sizeMap[size],
|
|
5051
|
+
hasError && "ph-input-error",
|
|
5052
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
5053
|
+
className
|
|
5054
|
+
)
|
|
5055
|
+
}), props), {
|
|
5056
|
+
children
|
|
5057
|
+
})
|
|
5058
|
+
) });
|
|
5059
|
+
});
|
|
5060
|
+
Select.displayName = "Select";
|
|
5061
|
+
var Textarea = (0, import_react23.forwardRef)(function Textarea2(_a, ref) {
|
|
5062
|
+
var _b = _a, {
|
|
5063
|
+
id: idProp,
|
|
5064
|
+
label,
|
|
5065
|
+
hideLabel = false,
|
|
5066
|
+
error,
|
|
5067
|
+
helperText,
|
|
5068
|
+
size = "md",
|
|
5069
|
+
className,
|
|
5070
|
+
wrapperClassName,
|
|
5071
|
+
disabled,
|
|
5072
|
+
required,
|
|
5073
|
+
"aria-describedby": ariaDescribedBy
|
|
5074
|
+
} = _b, props = __objRest(_b, [
|
|
5075
|
+
"id",
|
|
5076
|
+
"label",
|
|
5077
|
+
"hideLabel",
|
|
5078
|
+
"error",
|
|
5079
|
+
"helperText",
|
|
5080
|
+
"size",
|
|
5081
|
+
"className",
|
|
5082
|
+
"wrapperClassName",
|
|
5083
|
+
"disabled",
|
|
5084
|
+
"required",
|
|
5085
|
+
"aria-describedby"
|
|
5086
|
+
]);
|
|
5087
|
+
const autoId = (0, import_react23.useId)();
|
|
5088
|
+
const id = idProp != null ? idProp : autoId;
|
|
5089
|
+
const hasError = Boolean(error);
|
|
5090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5091
|
+
"textarea",
|
|
5092
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
5093
|
+
ref,
|
|
5094
|
+
disabled,
|
|
5095
|
+
required,
|
|
5096
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
5097
|
+
className: cn2(
|
|
5098
|
+
"ph-textarea w-full",
|
|
5099
|
+
sizeMap[size],
|
|
5100
|
+
hasError && "ph-input-error",
|
|
5101
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
5102
|
+
className
|
|
5103
|
+
)
|
|
5104
|
+
}), props)
|
|
5105
|
+
) });
|
|
5106
|
+
});
|
|
5107
|
+
Textarea.displayName = "Textarea";
|
|
5108
|
+
var Checkbox = (0, import_react23.forwardRef)(function Checkbox2(_a, ref) {
|
|
5109
|
+
var _b = _a, {
|
|
5110
|
+
id: idProp,
|
|
5111
|
+
label,
|
|
5112
|
+
error,
|
|
5113
|
+
helperText,
|
|
5114
|
+
className,
|
|
5115
|
+
wrapperClassName,
|
|
5116
|
+
disabled,
|
|
5117
|
+
"aria-describedby": ariaDescribedBy
|
|
5118
|
+
} = _b, props = __objRest(_b, [
|
|
5119
|
+
"id",
|
|
5120
|
+
"label",
|
|
5121
|
+
"error",
|
|
5122
|
+
"helperText",
|
|
5123
|
+
"className",
|
|
5124
|
+
"wrapperClassName",
|
|
5125
|
+
"disabled",
|
|
5126
|
+
"aria-describedby"
|
|
5127
|
+
]);
|
|
5128
|
+
const autoId = (0, import_react23.useId)();
|
|
5129
|
+
const id = idProp != null ? idProp : autoId;
|
|
5130
|
+
const hasError = Boolean(error);
|
|
5131
|
+
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
5132
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
5133
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn2("ph-control-row", wrapperClassName), children: [
|
|
5134
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "ph-checkbox-wrap", children: [
|
|
5135
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5136
|
+
"input",
|
|
5137
|
+
__spreadValues({
|
|
5138
|
+
ref,
|
|
5139
|
+
id,
|
|
5140
|
+
type: "checkbox",
|
|
5141
|
+
disabled,
|
|
5142
|
+
"aria-invalid": hasError || void 0,
|
|
5143
|
+
"aria-describedby": joinIds(ariaDescribedBy, descriptionId),
|
|
5144
|
+
"aria-errormessage": errorId,
|
|
5145
|
+
className: cn2(
|
|
5146
|
+
"ph-checkbox",
|
|
5147
|
+
hasError && "border-ph-danger",
|
|
5148
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
5149
|
+
className
|
|
5150
|
+
)
|
|
5151
|
+
}, props)
|
|
5152
|
+
),
|
|
5153
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
5154
|
+
] }),
|
|
5155
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ph-control-copy", children: [
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: id, className: cn2("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
5157
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
5158
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
5159
|
+
] })
|
|
5160
|
+
] });
|
|
5161
|
+
});
|
|
5162
|
+
Checkbox.displayName = "Checkbox";
|
|
5163
|
+
var Radio = (0, import_react23.forwardRef)(function Radio2(_a, ref) {
|
|
5164
|
+
var _b = _a, {
|
|
5165
|
+
id: idProp,
|
|
5166
|
+
label,
|
|
5167
|
+
className,
|
|
5168
|
+
wrapperClassName,
|
|
5169
|
+
disabled
|
|
5170
|
+
} = _b, props = __objRest(_b, [
|
|
5171
|
+
"id",
|
|
5172
|
+
"label",
|
|
5173
|
+
"className",
|
|
5174
|
+
"wrapperClassName",
|
|
5175
|
+
"disabled"
|
|
5176
|
+
]);
|
|
5177
|
+
const autoId = (0, import_react23.useId)();
|
|
5178
|
+
const id = idProp != null ? idProp : autoId;
|
|
5179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn2("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5181
|
+
"input",
|
|
5182
|
+
__spreadValues({
|
|
5183
|
+
ref,
|
|
5184
|
+
id,
|
|
5185
|
+
type: "radio",
|
|
5186
|
+
disabled,
|
|
5187
|
+
className: cn2("ph-radio", disabled && "cursor-not-allowed", className)
|
|
5188
|
+
}, props)
|
|
5189
|
+
),
|
|
5190
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: id, className: cn2("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
5191
|
+
] });
|
|
5192
|
+
});
|
|
5193
|
+
Radio.displayName = "Radio";
|
|
5194
|
+
var Toggle = (0, import_react23.forwardRef)(function Toggle2(_a, ref) {
|
|
5195
|
+
var _b = _a, {
|
|
5196
|
+
id: idProp,
|
|
5197
|
+
label,
|
|
5198
|
+
className,
|
|
5199
|
+
wrapperClassName,
|
|
5200
|
+
disabled
|
|
5201
|
+
} = _b, props = __objRest(_b, [
|
|
5202
|
+
"id",
|
|
5203
|
+
"label",
|
|
5204
|
+
"className",
|
|
5205
|
+
"wrapperClassName",
|
|
5206
|
+
"disabled"
|
|
5207
|
+
]);
|
|
5208
|
+
const autoId = (0, import_react23.useId)();
|
|
5209
|
+
const id = idProp != null ? idProp : autoId;
|
|
5210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { className: cn2("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
5211
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
5212
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5213
|
+
"input",
|
|
5214
|
+
__spreadValues({
|
|
5215
|
+
ref,
|
|
5216
|
+
id,
|
|
5217
|
+
type: "checkbox",
|
|
5218
|
+
role: "switch",
|
|
5219
|
+
disabled,
|
|
5220
|
+
className: cn2("ph-toggle", disabled && "cursor-not-allowed", className)
|
|
5221
|
+
}, props)
|
|
5222
|
+
)
|
|
5223
|
+
] });
|
|
5224
|
+
});
|
|
5225
|
+
Toggle.displayName = "Toggle";
|
|
5226
|
+
var Range = (0, import_react23.forwardRef)(function Range2(_a, ref) {
|
|
5227
|
+
var _b = _a, {
|
|
5228
|
+
id: idProp,
|
|
5229
|
+
label,
|
|
5230
|
+
minLabel,
|
|
5231
|
+
maxLabel,
|
|
5232
|
+
valueLabel,
|
|
5233
|
+
wrapperClassName,
|
|
5234
|
+
className
|
|
5235
|
+
} = _b, props = __objRest(_b, [
|
|
5236
|
+
"id",
|
|
5237
|
+
"label",
|
|
5238
|
+
"minLabel",
|
|
5239
|
+
"maxLabel",
|
|
5240
|
+
"valueLabel",
|
|
5241
|
+
"wrapperClassName",
|
|
5242
|
+
"className"
|
|
5243
|
+
]);
|
|
5244
|
+
const autoId = (0, import_react23.useId)();
|
|
5245
|
+
const id = idProp != null ? idProp : autoId;
|
|
5246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn2("ph-field", wrapperClassName), children: [
|
|
5247
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
5248
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn2("ph-range", className) }, props)),
|
|
5249
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
5250
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: minLabel }),
|
|
5251
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: valueLabel }),
|
|
5252
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: maxLabel })
|
|
5253
|
+
] })
|
|
5254
|
+
] });
|
|
5255
|
+
});
|
|
5256
|
+
Range.displayName = "Range";
|
|
5257
|
+
var FileUpload = (0, import_react23.forwardRef)(function FileUpload2(_a, ref) {
|
|
5258
|
+
var _b = _a, {
|
|
5259
|
+
id: idProp,
|
|
5260
|
+
label,
|
|
5261
|
+
prompt = "Drop file or browse",
|
|
5262
|
+
wrapperClassName,
|
|
5263
|
+
className
|
|
5264
|
+
} = _b, props = __objRest(_b, [
|
|
5265
|
+
"id",
|
|
5266
|
+
"label",
|
|
5267
|
+
"prompt",
|
|
5268
|
+
"wrapperClassName",
|
|
5269
|
+
"className"
|
|
5270
|
+
]);
|
|
5271
|
+
const autoId = (0, import_react23.useId)();
|
|
5272
|
+
const id = idProp != null ? idProp : autoId;
|
|
5273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: cn2("ph-field", wrapperClassName), children: [
|
|
5274
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
5275
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
5276
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn2("sr-only", className) }, props)),
|
|
5277
|
+
prompt
|
|
5278
|
+
] })
|
|
5279
|
+
] });
|
|
5280
|
+
});
|
|
5281
|
+
FileUpload.displayName = "FileUpload";
|
|
5282
|
+
|
|
5283
|
+
// src/components/ui/Modal.tsx
|
|
5284
|
+
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
5285
|
+
var import_react24 = require("react");
|
|
5286
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5287
|
+
var sizeMap2 = {
|
|
5288
|
+
sm: "max-w-sm",
|
|
5289
|
+
md: "max-w-lg",
|
|
5290
|
+
lg: "max-w-2xl",
|
|
5291
|
+
xl: "max-w-4xl",
|
|
5292
|
+
full: "max-w-none"
|
|
5293
|
+
};
|
|
5294
|
+
function Modal({
|
|
5295
|
+
open = false,
|
|
5296
|
+
onClose,
|
|
5297
|
+
title,
|
|
5298
|
+
description,
|
|
5299
|
+
children,
|
|
5300
|
+
footer,
|
|
5301
|
+
size = "md",
|
|
5302
|
+
className,
|
|
5303
|
+
customLayout = false,
|
|
5304
|
+
showCloseButton = true,
|
|
5305
|
+
closeOnOutsideClick = true,
|
|
5306
|
+
closeOnEscape = true,
|
|
5307
|
+
dataTest,
|
|
5308
|
+
panelDataTest,
|
|
5309
|
+
zIndex,
|
|
5310
|
+
id,
|
|
5311
|
+
"aria-label": ariaLabel,
|
|
5312
|
+
"aria-labelledby": ariaLabelledBy
|
|
5313
|
+
}) {
|
|
5314
|
+
const canDismiss = Boolean(onClose);
|
|
5315
|
+
const restoreFocusRef = (0, import_react24.useRef)(null);
|
|
5316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5317
|
+
Dialog.Root,
|
|
5318
|
+
{
|
|
5319
|
+
open,
|
|
5320
|
+
onOpenChange: (nextOpen) => {
|
|
5321
|
+
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
5322
|
+
},
|
|
5323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Dialog.Portal, { children: [
|
|
5324
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5325
|
+
Dialog.Overlay,
|
|
5326
|
+
{
|
|
5327
|
+
"data-test": dataTest,
|
|
5328
|
+
className: "ph-modal-overlay",
|
|
5329
|
+
style: zIndex ? { zIndex } : void 0
|
|
5330
|
+
}
|
|
5331
|
+
),
|
|
5332
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5333
|
+
Dialog.Content,
|
|
5334
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
5335
|
+
id,
|
|
5336
|
+
"data-test": panelDataTest,
|
|
5337
|
+
className: cn2("ph-modal-panel", sizeMap2[size], className)
|
|
5338
|
+
}, ariaLabel ? { "aria-label": ariaLabel } : {}), ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}), {
|
|
5339
|
+
style: zIndex ? { zIndex } : void 0
|
|
5340
|
+
}), description ? {} : { "aria-describedby": void 0 }), {
|
|
5341
|
+
onOpenAutoFocus: () => {
|
|
5342
|
+
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
5343
|
+
},
|
|
5344
|
+
onCloseAutoFocus: (event) => {
|
|
5345
|
+
var _a;
|
|
5346
|
+
event.preventDefault();
|
|
5347
|
+
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
5348
|
+
},
|
|
5349
|
+
onEscapeKeyDown: (event) => {
|
|
5350
|
+
if (!canDismiss || !closeOnEscape) event.preventDefault();
|
|
5351
|
+
},
|
|
5352
|
+
onPointerDownOutside: (event) => {
|
|
5353
|
+
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
5354
|
+
},
|
|
5355
|
+
children: customLayout ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
5357
|
+
children
|
|
5358
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
5359
|
+
title ? null : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
5360
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("header", { className: "ph-modal-header", children: [
|
|
5361
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0", children: [
|
|
5362
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
5363
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
5364
|
+
] }),
|
|
5365
|
+
showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5366
|
+
"button",
|
|
5367
|
+
{
|
|
5368
|
+
type: "button",
|
|
5369
|
+
className: "ph-modal-close",
|
|
5370
|
+
"aria-label": "Close dialog",
|
|
5371
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconClose, { className: "h-5 w-5", "aria-hidden": true })
|
|
5372
|
+
}
|
|
5373
|
+
) }) : null
|
|
5374
|
+
] }) : null,
|
|
5375
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ph-modal-body", children }),
|
|
5376
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
|
|
5377
|
+
] })
|
|
5378
|
+
})
|
|
5379
|
+
)
|
|
5380
|
+
] })
|
|
5381
|
+
}
|
|
5382
|
+
);
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
// src/suite/components/suite-integration-picker.tsx
|
|
5386
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5387
|
+
var DESCRIPTION_LIMIT = 90;
|
|
5388
|
+
function SuiteIntegrationPicker({
|
|
5389
|
+
open,
|
|
5390
|
+
items,
|
|
5391
|
+
connectedItems = [],
|
|
5392
|
+
loading = false,
|
|
5393
|
+
onClose,
|
|
5394
|
+
onConnect,
|
|
5395
|
+
onDisconnect,
|
|
5396
|
+
title = "Integrate an app",
|
|
5397
|
+
description = "Connect an app to this workspace securely.",
|
|
5398
|
+
dataTest = "suite-integration-picker"
|
|
5399
|
+
}) {
|
|
5400
|
+
const [query, setQuery] = (0, import_react25.useState)("");
|
|
5401
|
+
const [category, setCategory] = (0, import_react25.useState)("all");
|
|
5402
|
+
const [expanded, setExpanded] = (0, import_react25.useState)(null);
|
|
5403
|
+
const categories = (0, import_react25.useMemo)(
|
|
5404
|
+
() => Array.from(new Set(items.flatMap((item) => {
|
|
5405
|
+
var _a;
|
|
5406
|
+
return (_a = item.categories) != null ? _a : [];
|
|
5407
|
+
}))).sort(),
|
|
5408
|
+
[items]
|
|
5409
|
+
);
|
|
5410
|
+
const filtered = items.filter((item) => {
|
|
5411
|
+
var _a;
|
|
5412
|
+
const haystack = `${item.label} ${item.description}`.toLowerCase();
|
|
5413
|
+
return haystack.includes(query.trim().toLowerCase()) && (category === "all" || ((_a = item.categories) != null ? _a : []).includes(category));
|
|
5414
|
+
});
|
|
5415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { open, onClose, title, description, size: "xl", dataTest, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-4", children: [
|
|
5416
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Input, { value: query, onChange: (event) => setQuery(event.target.value), placeholder: "Search apps...", "aria-label": "Search apps" }),
|
|
5417
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex flex-wrap gap-2", role: "group", "aria-label": "Integration categories", children: ["all", ...categories].map((value) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", onClick: () => setCategory(value), className: category === value ? "rounded-full bg-ph-brand px-3 py-1.5 text-xs font-semibold text-white" : "rounded-full border border-ph-border px-3 py-1.5 text-xs text-ph-subtle hover:bg-ph-muted", children: value === "all" ? "All apps" : value }, value)) }),
|
|
5418
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-sm text-ph-subtle", children: "Loading apps..." }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "grid max-h-[60vh] gap-3 overflow-y-auto sm:grid-cols-2 lg:grid-cols-3", children: filtered.map((item) => {
|
|
5419
|
+
var _a, _b;
|
|
5420
|
+
const isExpanded = expanded === item.id;
|
|
5421
|
+
const longDescription = item.description.length > DESCRIPTION_LIMIT;
|
|
5422
|
+
const text = isExpanded || !longDescription ? item.description : `${item.description.slice(0, DESCRIPTION_LIMIT).trimEnd()}...`;
|
|
5423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-h-36 flex-col justify-between rounded-xl border border-ph-border bg-ph-surface p-4", children: [
|
|
5424
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", className: "text-left", onClick: () => longDescription && setExpanded(isExpanded ? null : item.id), "aria-expanded": isExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex items-start gap-3", children: [
|
|
5425
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-ph-muted text-ph-ink", children: (_a = item.icon) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_iconoir_react11.Server, { className: "h-5 w-5", "aria-hidden": true }) }),
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "min-w-0", children: [
|
|
5427
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "block font-medium text-ph-ink", children: item.label }),
|
|
5428
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "mt-1 block text-xs text-ph-subtle", children: text }),
|
|
5429
|
+
longDescription ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "mt-1 block text-xs font-medium text-ph-brand", children: [
|
|
5430
|
+
isExpanded ? "See less" : "See more",
|
|
5431
|
+
" ",
|
|
5432
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_iconoir_react11.NavArrowUp, { className: "inline h-3 w-3" }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_iconoir_react11.NavArrowDown, { className: "inline h-3 w-3" })
|
|
5433
|
+
] }) : null
|
|
5434
|
+
] })
|
|
5435
|
+
] }) }),
|
|
5436
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { type: "button", variant: "primary", className: "mt-3 self-start", disabled: Boolean(item.unavailableReason) || item.connecting, onClick: () => onConnect(item), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
5437
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_iconoir_react11.Server, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
5438
|
+
item.connecting ? "Connecting..." : (_b = item.unavailableReason) != null ? _b : "Connect"
|
|
5439
|
+
] }) })
|
|
5440
|
+
] }, item.id);
|
|
5441
|
+
}) }),
|
|
5442
|
+
connectedItems.length > 0 && onDisconnect ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-2 border-t border-ph-border pt-4", children: [
|
|
5443
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h3", { className: "font-medium text-ph-ink", children: "Connected apps" }),
|
|
5444
|
+
connectedItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-between gap-3 rounded-lg border border-ph-border bg-ph-muted p-3", children: [
|
|
5445
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-sm text-ph-ink", children: [
|
|
5446
|
+
item.icon,
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "truncate", children: item.label })
|
|
5448
|
+
] }),
|
|
5449
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { type: "button", variant: "danger", onClick: () => onDisconnect(item), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
5450
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_iconoir_react11.Xmark, { className: "h-4 w-4", "aria-hidden": true }),
|
|
5451
|
+
"Disconnect"
|
|
5452
|
+
] }) })
|
|
5453
|
+
] }, item.id))
|
|
5454
|
+
] }) : null
|
|
5455
|
+
] }) });
|
|
5456
|
+
}
|
|
4233
5457
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4234
5458
|
0 && (module.exports = {
|
|
4235
5459
|
APP_ACCENTS,
|
|
@@ -4266,6 +5490,7 @@ function SuiteAppLayout({
|
|
|
4266
5490
|
SuiteBreadcrumbs,
|
|
4267
5491
|
SuiteEmptyState,
|
|
4268
5492
|
SuiteIcon,
|
|
5493
|
+
SuiteIntegrationPicker,
|
|
4269
5494
|
SuiteMobileDrawer,
|
|
4270
5495
|
SuiteMobileHeader,
|
|
4271
5496
|
SuiteMotionProvider,
|