@xenide-io/the-old-ui-theme 0.9.14 → 0.9.16
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/suite.d.mts +3 -5
- package/dist/suite.d.ts +3 -5
- package/dist/suite.js +258 -259
- package/dist/suite.mjs +110 -111
- package/package.json +1 -1
- package/src/suite/components/suite-entity-icon.tsx +11 -11
- package/src/suite/components/suite-notification-bell.test.tsx +75 -1
- package/src/suite/components/suite-notification-bell.tsx +13 -4
- package/src/suite/lib/suite-notifications.tsx +1 -23
package/dist/suite.js
CHANGED
|
@@ -217,7 +217,7 @@ __export(suite_exports, {
|
|
|
217
217
|
fetchPaletteLibrary: () => fetchPaletteLibrary,
|
|
218
218
|
findPaletteIcons: () => findPaletteIcons,
|
|
219
219
|
getTodayGreeting: () => getTodayGreeting,
|
|
220
|
-
m: () =>
|
|
220
|
+
m: () => import_react16.m,
|
|
221
221
|
openSuiteAskAi: () => openSuiteAskAi,
|
|
222
222
|
pathWithSuiteAskAiOpen: () => pathWithSuiteAskAiOpen,
|
|
223
223
|
persistSidebarWidth: () => persistSidebarWidth,
|
|
@@ -1243,6 +1243,7 @@ function AppSwitcher({
|
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
1245
|
// src/suite/components/suite-notification-bell.tsx
|
|
1246
|
+
var import_react3 = require("react");
|
|
1246
1247
|
var import_iconoir_react3 = require("iconoir-react");
|
|
1247
1248
|
|
|
1248
1249
|
// src/suite/lib/suite-notifications.tsx
|
|
@@ -1375,7 +1376,6 @@ function SuiteNotificationsProvider({
|
|
|
1375
1376
|
const router = (0, import_navigation.useRouter)();
|
|
1376
1377
|
const [notifications, setNotifications] = (0, import_react2.useState)([]);
|
|
1377
1378
|
const [unreadCount, setUnreadCount] = (0, import_react2.useState)(0);
|
|
1378
|
-
const [open, setOpen] = (0, import_react2.useState)(false);
|
|
1379
1379
|
const load = (0, import_react2.useCallback)(async () => {
|
|
1380
1380
|
try {
|
|
1381
1381
|
const data = await fetchNotifications();
|
|
@@ -1436,16 +1436,8 @@ function SuiteNotificationsProvider({
|
|
|
1436
1436
|
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
1437
1437
|
};
|
|
1438
1438
|
}, [enabled, load, pollMs, cacheKey]);
|
|
1439
|
-
const setOpenAndRefresh = (0, import_react2.useCallback)(
|
|
1440
|
-
(next) => {
|
|
1441
|
-
setOpen(next);
|
|
1442
|
-
if (next) void load();
|
|
1443
|
-
},
|
|
1444
|
-
[load]
|
|
1445
|
-
);
|
|
1446
1439
|
const select = (0, import_react2.useCallback)(
|
|
1447
1440
|
(notification) => {
|
|
1448
|
-
setOpen(false);
|
|
1449
1441
|
if (!notification.read_at) {
|
|
1450
1442
|
setNotifications(
|
|
1451
1443
|
(prev) => prev.map(
|
|
@@ -1518,21 +1510,11 @@ function SuiteNotificationsProvider({
|
|
|
1518
1510
|
() => ({
|
|
1519
1511
|
notifications,
|
|
1520
1512
|
unreadCount,
|
|
1521
|
-
open,
|
|
1522
|
-
setOpen: setOpenAndRefresh,
|
|
1523
1513
|
refresh: () => void load(),
|
|
1524
1514
|
select,
|
|
1525
1515
|
markAllRead
|
|
1526
1516
|
}),
|
|
1527
|
-
[
|
|
1528
|
-
notifications,
|
|
1529
|
-
unreadCount,
|
|
1530
|
-
open,
|
|
1531
|
-
setOpenAndRefresh,
|
|
1532
|
-
load,
|
|
1533
|
-
select,
|
|
1534
|
-
markAllRead
|
|
1535
|
-
]
|
|
1517
|
+
[notifications, unreadCount, load, select, markAllRead]
|
|
1536
1518
|
);
|
|
1537
1519
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SuiteNotificationsContext.Provider, { value, children });
|
|
1538
1520
|
}
|
|
@@ -1559,11 +1541,15 @@ function SuiteNotificationBell({
|
|
|
1559
1541
|
const {
|
|
1560
1542
|
notifications,
|
|
1561
1543
|
unreadCount: unread,
|
|
1562
|
-
|
|
1563
|
-
setOpen,
|
|
1544
|
+
refresh,
|
|
1564
1545
|
select,
|
|
1565
1546
|
markAllRead
|
|
1566
1547
|
} = useSuiteNotifications();
|
|
1548
|
+
const [open, setOpen] = (0, import_react3.useState)(false);
|
|
1549
|
+
const onOpenChange = (next) => {
|
|
1550
|
+
setOpen(next);
|
|
1551
|
+
if (next) refresh();
|
|
1552
|
+
};
|
|
1567
1553
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1568
1554
|
DropdownMenu2,
|
|
1569
1555
|
{
|
|
@@ -1573,7 +1559,7 @@ function SuiteNotificationBell({
|
|
|
1573
1559
|
align: "end",
|
|
1574
1560
|
panelClassName: "w-80 overflow-hidden p-0",
|
|
1575
1561
|
open,
|
|
1576
|
-
onOpenChange
|
|
1562
|
+
onOpenChange,
|
|
1577
1563
|
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: [
|
|
1578
1564
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_iconoir_react3.Bell, { className: "h-5 w-5", strokeWidth: 1.75, "aria-hidden": true }),
|
|
1579
1565
|
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-[var(--ph-on-accent)] ring-2 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
|
|
@@ -1598,7 +1584,10 @@ function SuiteNotificationBell({
|
|
|
1598
1584
|
{
|
|
1599
1585
|
id: `${dataTest}-item-${n.id}`,
|
|
1600
1586
|
"data-test": `${dataTest}-item-${n.id}`,
|
|
1601
|
-
onClick: () =>
|
|
1587
|
+
onClick: () => {
|
|
1588
|
+
setOpen(false);
|
|
1589
|
+
select(n);
|
|
1590
|
+
},
|
|
1602
1591
|
className: "flex w-full flex-col gap-0.5 px-3 py-2 text-left transition hover:bg-ph-muted",
|
|
1603
1592
|
children: [
|
|
1604
1593
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "flex items-center gap-2", children: [
|
|
@@ -1627,7 +1616,7 @@ function SuiteNotificationBell({
|
|
|
1627
1616
|
}
|
|
1628
1617
|
|
|
1629
1618
|
// src/suite/components/command-palette-host.tsx
|
|
1630
|
-
var
|
|
1619
|
+
var import_react4 = require("react");
|
|
1631
1620
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1632
1621
|
function isEditableTarget() {
|
|
1633
1622
|
if (typeof document === "undefined") return false;
|
|
@@ -1648,8 +1637,8 @@ function CommandPaletteHost({
|
|
|
1648
1637
|
inputDataTest,
|
|
1649
1638
|
commandPalette: CommandPalette
|
|
1650
1639
|
}) {
|
|
1651
|
-
const [open, setOpen] = (0,
|
|
1652
|
-
(0,
|
|
1640
|
+
const [open, setOpen] = (0, import_react4.useState)(false);
|
|
1641
|
+
(0, import_react4.useEffect)(() => {
|
|
1653
1642
|
const onKey = (e) => {
|
|
1654
1643
|
if (!((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k")) return;
|
|
1655
1644
|
if (!open && isEditableTarget()) return;
|
|
@@ -1676,10 +1665,10 @@ function CommandPaletteHost({
|
|
|
1676
1665
|
}
|
|
1677
1666
|
|
|
1678
1667
|
// src/suite/lib/use-idle-mount.ts
|
|
1679
|
-
var
|
|
1668
|
+
var import_react5 = require("react");
|
|
1680
1669
|
function useIdleMount(timeoutMs = 1200) {
|
|
1681
|
-
const [ready, setReady] = (0,
|
|
1682
|
-
(0,
|
|
1670
|
+
const [ready, setReady] = (0, import_react5.useState)(false);
|
|
1671
|
+
(0, import_react5.useEffect)(() => {
|
|
1683
1672
|
let timeoutId = 0;
|
|
1684
1673
|
let idleId = 0;
|
|
1685
1674
|
const activate = () => setReady(true);
|
|
@@ -1703,7 +1692,7 @@ function DeferredChrome({ children }) {
|
|
|
1703
1692
|
|
|
1704
1693
|
// src/suite/components/suite-mobile-drawer.tsx
|
|
1705
1694
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
1706
|
-
var
|
|
1695
|
+
var import_react6 = require("react");
|
|
1707
1696
|
var import_iconoir_react4 = require("iconoir-react");
|
|
1708
1697
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1709
1698
|
function SuiteMobileDrawer({
|
|
@@ -1725,9 +1714,9 @@ function SuiteMobileDrawer({
|
|
|
1725
1714
|
closeButtonDataTest,
|
|
1726
1715
|
panelClassName
|
|
1727
1716
|
}) {
|
|
1728
|
-
const [rendered, setRendered] = (0,
|
|
1729
|
-
const [shown, setShown] = (0,
|
|
1730
|
-
(0,
|
|
1717
|
+
const [rendered, setRendered] = (0, import_react6.useState)(open);
|
|
1718
|
+
const [shown, setShown] = (0, import_react6.useState)(open);
|
|
1719
|
+
(0, import_react6.useEffect)(() => {
|
|
1731
1720
|
if (open) {
|
|
1732
1721
|
queueMicrotask(() => setRendered(true));
|
|
1733
1722
|
let inner = 0;
|
|
@@ -1863,7 +1852,7 @@ function SuiteMobileHeader({
|
|
|
1863
1852
|
}
|
|
1864
1853
|
|
|
1865
1854
|
// src/suite/components/suite-layout.tsx
|
|
1866
|
-
var
|
|
1855
|
+
var import_react7 = require("react");
|
|
1867
1856
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1868
1857
|
function SuiteBreadcrumbs({ items, className }) {
|
|
1869
1858
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { "aria-label": "Breadcrumb", className, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("ol", { className: "flex min-w-0 items-center gap-1.5", children: items.map((item, index) => {
|
|
@@ -1942,9 +1931,9 @@ function SuitePageHeader({
|
|
|
1942
1931
|
*/
|
|
1943
1932
|
sticky = true
|
|
1944
1933
|
}) {
|
|
1945
|
-
const headerRef = (0,
|
|
1946
|
-
const [stuck, setStuck] = (0,
|
|
1947
|
-
(0,
|
|
1934
|
+
const headerRef = (0, import_react7.useRef)(null);
|
|
1935
|
+
const [stuck, setStuck] = (0, import_react7.useState)(false);
|
|
1936
|
+
(0, import_react7.useEffect)(() => {
|
|
1948
1937
|
if (!sticky) return;
|
|
1949
1938
|
if (typeof IntersectionObserver === "undefined") return;
|
|
1950
1939
|
const el = headerRef.current;
|
|
@@ -2161,7 +2150,7 @@ var import_iconoir_react6 = require("iconoir-react");
|
|
|
2161
2150
|
var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
2162
2151
|
|
|
2163
2152
|
// src/components/icons/IconBase.tsx
|
|
2164
|
-
var
|
|
2153
|
+
var import_react8 = require("react");
|
|
2165
2154
|
|
|
2166
2155
|
// src/lib/cn.ts
|
|
2167
2156
|
function cn2(...parts) {
|
|
@@ -2170,7 +2159,7 @@ function cn2(...parts) {
|
|
|
2170
2159
|
|
|
2171
2160
|
// src/components/icons/IconBase.tsx
|
|
2172
2161
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2173
|
-
var IconBase = (0,
|
|
2162
|
+
var IconBase = (0, import_react8.forwardRef)(function IconBase2(_a2, ref) {
|
|
2174
2163
|
var _b = _a2, {
|
|
2175
2164
|
className,
|
|
2176
2165
|
size,
|
|
@@ -2221,10 +2210,10 @@ var IconBase = (0, import_react7.forwardRef)(function IconBase2(_a2, ref) {
|
|
|
2221
2210
|
IconBase.displayName = "IconBase";
|
|
2222
2211
|
|
|
2223
2212
|
// src/components/icons/createIconBase.tsx
|
|
2224
|
-
var
|
|
2213
|
+
var import_react9 = require("react");
|
|
2225
2214
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2226
2215
|
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
2227
|
-
const IconGlyph = (0,
|
|
2216
|
+
const IconGlyph = (0, import_react9.forwardRef)(function IconGlyph2(props, ref) {
|
|
2228
2217
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
2229
2218
|
});
|
|
2230
2219
|
IconGlyph.displayName = name;
|
|
@@ -2239,7 +2228,7 @@ function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
|
2239
2228
|
}
|
|
2240
2229
|
|
|
2241
2230
|
// src/components/icons/icons.tsx
|
|
2242
|
-
var
|
|
2231
|
+
var import_react10 = require("react");
|
|
2243
2232
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2244
2233
|
var fill = (d) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d, fill: "currentColor" });
|
|
2245
2234
|
var IconAreaChart = createIconBase({
|
|
@@ -2586,7 +2575,7 @@ var IconActivity = createIconBasePath(
|
|
|
2586
2575
|
var IconFlask = createIconBasePath(
|
|
2587
2576
|
"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"
|
|
2588
2577
|
);
|
|
2589
|
-
var IconSpinner = (0,
|
|
2578
|
+
var IconSpinner = (0, import_react10.forwardRef)(function IconSpinner2(_a2, ref) {
|
|
2590
2579
|
var _b = _a2, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2591
2580
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconSync, __spreadValues({ ref, className: cn2("ph-icon-spin", className) }, props));
|
|
2592
2581
|
});
|
|
@@ -2686,7 +2675,7 @@ for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
|
2686
2675
|
namedIcon.displayName = `Icon${name[0].toUpperCase()}${name.slice(1)}`;
|
|
2687
2676
|
}
|
|
2688
2677
|
}
|
|
2689
|
-
var IconByName = (0,
|
|
2678
|
+
var IconByName = (0, import_react10.forwardRef)(function IconByName2(_a2, ref) {
|
|
2690
2679
|
var _b = _a2, { name } = _b, props = __objRest(_b, ["name"]);
|
|
2691
2680
|
const Icon = PH_ICONS[name];
|
|
2692
2681
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Icon, __spreadValues({ ref }, props));
|
|
@@ -3112,7 +3101,7 @@ function TodayCalibrating({
|
|
|
3112
3101
|
}
|
|
3113
3102
|
|
|
3114
3103
|
// src/suite/components/theme-provider.tsx
|
|
3115
|
-
var
|
|
3104
|
+
var import_react11 = require("react");
|
|
3116
3105
|
|
|
3117
3106
|
// src/suite/lib/cookies.ts
|
|
3118
3107
|
function suiteCookieDomainAttr() {
|
|
@@ -3166,7 +3155,7 @@ var SUITE_THEME_CHANNEL = "xenide-suite-theme";
|
|
|
3166
3155
|
|
|
3167
3156
|
// src/suite/components/theme-provider.tsx
|
|
3168
3157
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3169
|
-
var SuiteThemeContext = (0,
|
|
3158
|
+
var SuiteThemeContext = (0, import_react11.createContext)(null);
|
|
3170
3159
|
var suiteThemeChannel = null;
|
|
3171
3160
|
function broadcastTheme(theme) {
|
|
3172
3161
|
if (typeof BroadcastChannel === "undefined") return;
|
|
@@ -3232,7 +3221,7 @@ function SuiteThemeProvider({
|
|
|
3232
3221
|
config,
|
|
3233
3222
|
children
|
|
3234
3223
|
}) {
|
|
3235
|
-
const [state, setState] = (0,
|
|
3224
|
+
const [state, setState] = (0, import_react11.useState)(() => {
|
|
3236
3225
|
const theme = readStoredTheme(config.storageKey);
|
|
3237
3226
|
if (typeof document === "undefined") {
|
|
3238
3227
|
return { theme, resolvedTheme: config.fallbackTheme };
|
|
@@ -3241,15 +3230,15 @@ function SuiteThemeProvider({
|
|
|
3241
3230
|
const resolvedTheme = domTheme === config.darkThemeId ? "dark" : domTheme === config.lightThemeId ? "light" : resolveTheme(theme, config.fallbackTheme);
|
|
3242
3231
|
return { theme, resolvedTheme };
|
|
3243
3232
|
});
|
|
3244
|
-
const themeRef = (0,
|
|
3233
|
+
const themeRef = (0, import_react11.useRef)(state.theme);
|
|
3245
3234
|
themeRef.current = state.theme;
|
|
3246
|
-
(0,
|
|
3235
|
+
(0, import_react11.useEffect)(() => {
|
|
3247
3236
|
applyTheme(state.theme, config);
|
|
3248
3237
|
}, [state.theme, config]);
|
|
3249
|
-
(0,
|
|
3238
|
+
(0, import_react11.useEffect)(() => {
|
|
3250
3239
|
if (readSharedTheme() == null) writeSharedTheme(state.theme);
|
|
3251
3240
|
}, []);
|
|
3252
|
-
(0,
|
|
3241
|
+
(0, import_react11.useEffect)(() => {
|
|
3253
3242
|
if (state.theme !== "system") return;
|
|
3254
3243
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3255
3244
|
const update = () => {
|
|
@@ -3259,7 +3248,7 @@ function SuiteThemeProvider({
|
|
|
3259
3248
|
media.addEventListener("change", update);
|
|
3260
3249
|
return () => media.removeEventListener("change", update);
|
|
3261
3250
|
}, [state.theme, config]);
|
|
3262
|
-
(0,
|
|
3251
|
+
(0, import_react11.useEffect)(() => {
|
|
3263
3252
|
let channel = null;
|
|
3264
3253
|
try {
|
|
3265
3254
|
channel = new BroadcastChannel(SUITE_THEME_CHANNEL);
|
|
@@ -3313,7 +3302,7 @@ function SuiteThemeProvider({
|
|
|
3313
3302
|
stopPolling();
|
|
3314
3303
|
};
|
|
3315
3304
|
}, [config]);
|
|
3316
|
-
const setTheme = (0,
|
|
3305
|
+
const setTheme = (0, import_react11.useCallback)(
|
|
3317
3306
|
(next) => {
|
|
3318
3307
|
const resolved = applyTheme(next, config);
|
|
3319
3308
|
setState({ theme: next, resolvedTheme: resolved });
|
|
@@ -3326,18 +3315,18 @@ function SuiteThemeProvider({
|
|
|
3326
3315
|
},
|
|
3327
3316
|
[config]
|
|
3328
3317
|
);
|
|
3329
|
-
const toggleTheme = (0,
|
|
3318
|
+
const toggleTheme = (0, import_react11.useCallback)(() => {
|
|
3330
3319
|
const next = resolveTheme(themeRef.current, config.fallbackTheme) === "dark" ? "light" : "dark";
|
|
3331
3320
|
setTheme(next);
|
|
3332
3321
|
}, [config, setTheme]);
|
|
3333
|
-
const value = (0,
|
|
3322
|
+
const value = (0, import_react11.useMemo)(
|
|
3334
3323
|
() => ({ theme: state.theme, resolvedTheme: state.resolvedTheme, setTheme, toggleTheme }),
|
|
3335
3324
|
[state.theme, state.resolvedTheme, setTheme, toggleTheme]
|
|
3336
3325
|
);
|
|
3337
3326
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SuiteThemeContext.Provider, { value, children });
|
|
3338
3327
|
}
|
|
3339
3328
|
function useSuiteTheme() {
|
|
3340
|
-
const ctx = (0,
|
|
3329
|
+
const ctx = (0, import_react11.useContext)(SuiteThemeContext);
|
|
3341
3330
|
if (!ctx) throw new Error("useTheme must be used within ThemeProvider");
|
|
3342
3331
|
return ctx;
|
|
3343
3332
|
}
|
|
@@ -3355,14 +3344,14 @@ function suiteThemeBootScript(options) {
|
|
|
3355
3344
|
}
|
|
3356
3345
|
|
|
3357
3346
|
// src/suite/components/ai-panel.tsx
|
|
3358
|
-
var
|
|
3347
|
+
var import_react13 = require("react");
|
|
3359
3348
|
var import_iconoir_react8 = require("iconoir-react");
|
|
3360
3349
|
|
|
3361
3350
|
// src/components/ui/Tooltip.tsx
|
|
3362
|
-
var
|
|
3351
|
+
var import_react12 = require("react");
|
|
3363
3352
|
var import_react_dom = require("react-dom");
|
|
3364
3353
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3365
|
-
var TooltipDelayContext = (0,
|
|
3354
|
+
var TooltipDelayContext = (0, import_react12.createContext)(0);
|
|
3366
3355
|
function tooltipPosition(trigger, content, side, align, offset, collisionPadding) {
|
|
3367
3356
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
3368
3357
|
const vertical = align === "start" ? trigger.top : align === "end" ? trigger.bottom : trigger.top + trigger.height / 2;
|
|
@@ -3388,13 +3377,13 @@ function Tooltip({
|
|
|
3388
3377
|
delayDuration,
|
|
3389
3378
|
disableHoverableContent = false
|
|
3390
3379
|
}) {
|
|
3391
|
-
const providerDelay = (0,
|
|
3392
|
-
const generatedId = (0,
|
|
3393
|
-
const triggerRef = (0,
|
|
3394
|
-
const contentRef = (0,
|
|
3395
|
-
const timerRef = (0,
|
|
3396
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
3397
|
-
const [position, setPosition] = (0,
|
|
3380
|
+
const providerDelay = (0, import_react12.useContext)(TooltipDelayContext);
|
|
3381
|
+
const generatedId = (0, import_react12.useId)().replace(/:/g, "");
|
|
3382
|
+
const triggerRef = (0, import_react12.useRef)(null);
|
|
3383
|
+
const contentRef = (0, import_react12.useRef)(null);
|
|
3384
|
+
const timerRef = (0, import_react12.useRef)(null);
|
|
3385
|
+
const [internalOpen, setInternalOpen] = (0, import_react12.useState)(defaultOpen);
|
|
3386
|
+
const [position, setPosition] = (0, import_react12.useState)(null);
|
|
3398
3387
|
const isOpen = open != null ? open : internalOpen;
|
|
3399
3388
|
const triggerId = children.props.id;
|
|
3400
3389
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -3406,7 +3395,7 @@ function Tooltip({
|
|
|
3406
3395
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
3407
3396
|
timerRef.current = null;
|
|
3408
3397
|
}
|
|
3409
|
-
const updatePosition = (0,
|
|
3398
|
+
const updatePosition = (0, import_react12.useCallback)(() => {
|
|
3410
3399
|
if (!triggerRef.current || !contentRef.current) return;
|
|
3411
3400
|
setPosition(
|
|
3412
3401
|
tooltipPosition(
|
|
@@ -3438,10 +3427,10 @@ function Tooltip({
|
|
|
3438
3427
|
clearTimer();
|
|
3439
3428
|
timerRef.current = setTimeout(() => setOpen(false), 100);
|
|
3440
3429
|
}
|
|
3441
|
-
(0,
|
|
3430
|
+
(0, import_react12.useLayoutEffect)(() => {
|
|
3442
3431
|
if (isOpen) updatePosition();
|
|
3443
3432
|
}, [isOpen, updatePosition]);
|
|
3444
|
-
(0,
|
|
3433
|
+
(0, import_react12.useEffect)(() => {
|
|
3445
3434
|
if (!isOpen) return;
|
|
3446
3435
|
const reposition = () => updatePosition();
|
|
3447
3436
|
window.addEventListener("resize", reposition);
|
|
@@ -3451,9 +3440,9 @@ function Tooltip({
|
|
|
3451
3440
|
window.removeEventListener("scroll", reposition, true);
|
|
3452
3441
|
};
|
|
3453
3442
|
}, [isOpen, updatePosition]);
|
|
3454
|
-
(0,
|
|
3443
|
+
(0, import_react12.useEffect)(() => () => clearTimer(), []);
|
|
3455
3444
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
3456
|
-
const trigger = (0,
|
|
3445
|
+
const trigger = (0, import_react12.cloneElement)(children, { "aria-describedby": describedBy });
|
|
3457
3446
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
|
|
3458
3447
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3459
3448
|
"span",
|
|
@@ -3502,7 +3491,7 @@ function Tooltip({
|
|
|
3502
3491
|
|
|
3503
3492
|
// src/suite/components/ai-panel.tsx
|
|
3504
3493
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3505
|
-
var SuiteAiMarkdownMessage2 = (0,
|
|
3494
|
+
var SuiteAiMarkdownMessage2 = (0, import_react13.lazy)(() => Promise.resolve().then(() => (init_ai_message_markdown(), ai_message_markdown_exports)));
|
|
3506
3495
|
var SUITE_OPEN_ASK_AI_EVENT = "shellstack:open-ask-ai";
|
|
3507
3496
|
var SUITE_ASK_AI_OPEN_KEY = "shellstack:shelly-open";
|
|
3508
3497
|
var SUITE_ASK_AI_OPEN_QUERY = "shelly";
|
|
@@ -3589,11 +3578,11 @@ function SuiteAiPanel({
|
|
|
3589
3578
|
resolveAction,
|
|
3590
3579
|
isWaitingForReply = false
|
|
3591
3580
|
}) {
|
|
3592
|
-
const inputId = (0,
|
|
3593
|
-
const [uncontrolledOpen, setUncontrolledOpen] = (0,
|
|
3594
|
-
const [resolvingId, setResolvingId] = (0,
|
|
3581
|
+
const inputId = (0, import_react13.useId)();
|
|
3582
|
+
const [uncontrolledOpen, setUncontrolledOpen] = (0, import_react13.useState)(false);
|
|
3583
|
+
const [resolvingId, setResolvingId] = (0, import_react13.useState)("");
|
|
3595
3584
|
const open = openProp != null ? openProp : uncontrolledOpen;
|
|
3596
|
-
const setOpen = (0,
|
|
3585
|
+
const setOpen = (0, import_react13.useCallback)(
|
|
3597
3586
|
(next) => {
|
|
3598
3587
|
persistSuiteAskAiOpen(next);
|
|
3599
3588
|
if (openProp === void 0) setUncontrolledOpen(next);
|
|
@@ -3601,21 +3590,21 @@ function SuiteAiPanel({
|
|
|
3601
3590
|
},
|
|
3602
3591
|
[onOpenChange, openProp]
|
|
3603
3592
|
);
|
|
3604
|
-
const [prompt, setPrompt] = (0,
|
|
3605
|
-
const [messages, setMessages] = (0,
|
|
3606
|
-
const [loading, setLoading] = (0,
|
|
3607
|
-
const [hydrating, setHydrating] = (0,
|
|
3608
|
-
const [error, setError] = (0,
|
|
3609
|
-
const [atBottom, setAtBottom] = (0,
|
|
3610
|
-
const scrollerRef = (0,
|
|
3611
|
-
const textareaRef = (0,
|
|
3612
|
-
const abortRef = (0,
|
|
3613
|
-
const pendingPromptRef = (0,
|
|
3614
|
-
const [editingIndex, setEditingIndex] = (0,
|
|
3615
|
-
const [editDraft, setEditDraft] = (0,
|
|
3616
|
-
const [copiedIndex, setCopiedIndex] = (0,
|
|
3593
|
+
const [prompt, setPrompt] = (0, import_react13.useState)("");
|
|
3594
|
+
const [messages, setMessages] = (0, import_react13.useState)([]);
|
|
3595
|
+
const [loading, setLoading] = (0, import_react13.useState)(false);
|
|
3596
|
+
const [hydrating, setHydrating] = (0, import_react13.useState)(false);
|
|
3597
|
+
const [error, setError] = (0, import_react13.useState)("");
|
|
3598
|
+
const [atBottom, setAtBottom] = (0, import_react13.useState)(true);
|
|
3599
|
+
const scrollerRef = (0, import_react13.useRef)(null);
|
|
3600
|
+
const textareaRef = (0, import_react13.useRef)(null);
|
|
3601
|
+
const abortRef = (0, import_react13.useRef)(null);
|
|
3602
|
+
const pendingPromptRef = (0, import_react13.useRef)(null);
|
|
3603
|
+
const [editingIndex, setEditingIndex] = (0, import_react13.useState)(null);
|
|
3604
|
+
const [editDraft, setEditDraft] = (0, import_react13.useState)("");
|
|
3605
|
+
const [copiedIndex, setCopiedIndex] = (0, import_react13.useState)(null);
|
|
3617
3606
|
const waiting = loading || isWaitingForReply;
|
|
3618
|
-
(0,
|
|
3607
|
+
(0, import_react13.useEffect)(() => {
|
|
3619
3608
|
function onOpen(event) {
|
|
3620
3609
|
var _a2;
|
|
3621
3610
|
const detail = event.detail;
|
|
@@ -3629,19 +3618,19 @@ function SuiteAiPanel({
|
|
|
3629
3618
|
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
3630
3619
|
return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
3631
3620
|
}, [setOpen]);
|
|
3632
|
-
const scrollToBottom = (0,
|
|
3621
|
+
const scrollToBottom = (0, import_react13.useCallback)((behavior = "auto") => {
|
|
3633
3622
|
const el = scrollerRef.current;
|
|
3634
3623
|
if (!el) return;
|
|
3635
3624
|
el.scrollTo({ top: el.scrollHeight, behavior });
|
|
3636
3625
|
setAtBottom(true);
|
|
3637
3626
|
}, []);
|
|
3638
|
-
const handleScroll = (0,
|
|
3627
|
+
const handleScroll = (0, import_react13.useCallback)(() => {
|
|
3639
3628
|
const el = scrollerRef.current;
|
|
3640
3629
|
if (!el) return;
|
|
3641
3630
|
const distance = el.scrollHeight - el.scrollTop - el.clientHeight;
|
|
3642
3631
|
setAtBottom(distance < 64);
|
|
3643
3632
|
}, []);
|
|
3644
|
-
const hydrate = (0,
|
|
3633
|
+
const hydrate = (0, import_react13.useCallback)(async () => {
|
|
3645
3634
|
var _a2, _b, _c;
|
|
3646
3635
|
setHydrating(true);
|
|
3647
3636
|
setError("");
|
|
@@ -3664,7 +3653,7 @@ function SuiteAiPanel({
|
|
|
3664
3653
|
setHydrating(false);
|
|
3665
3654
|
}
|
|
3666
3655
|
}, [fetchChat]);
|
|
3667
|
-
(0,
|
|
3656
|
+
(0, import_react13.useEffect)(() => {
|
|
3668
3657
|
var _a2;
|
|
3669
3658
|
if (!open) return;
|
|
3670
3659
|
const queued = (_a2 = pendingPromptRef.current) != null ? _a2 : consumePendingAskAiPrompt();
|
|
@@ -3675,19 +3664,19 @@ function SuiteAiPanel({
|
|
|
3675
3664
|
if (pending) setPrompt(pending);
|
|
3676
3665
|
});
|
|
3677
3666
|
}, [open, hydrate]);
|
|
3678
|
-
(0,
|
|
3667
|
+
(0, import_react13.useEffect)(() => {
|
|
3679
3668
|
if (open && atBottom) scrollToBottom();
|
|
3680
3669
|
}, [messages, waiting, open, atBottom, scrollToBottom]);
|
|
3681
|
-
(0,
|
|
3670
|
+
(0, import_react13.useEffect)(() => {
|
|
3682
3671
|
var _a2;
|
|
3683
3672
|
if (open && !hydrating) (_a2 = textareaRef.current) == null ? void 0 : _a2.focus();
|
|
3684
3673
|
}, [open, hydrating]);
|
|
3685
|
-
(0,
|
|
3674
|
+
(0, import_react13.useEffect)(() => {
|
|
3686
3675
|
if (!open) return;
|
|
3687
3676
|
void Promise.resolve().then(() => (init_ai_message_markdown(), ai_message_markdown_exports)).catch(() => {
|
|
3688
3677
|
});
|
|
3689
3678
|
}, [open]);
|
|
3690
|
-
(0,
|
|
3679
|
+
(0, import_react13.useLayoutEffect)(() => {
|
|
3691
3680
|
const el = textareaRef.current;
|
|
3692
3681
|
if (!el) return;
|
|
3693
3682
|
el.style.height = "auto";
|
|
@@ -4047,7 +4036,7 @@ function SuiteAiPanel({
|
|
|
4047
4036
|
),
|
|
4048
4037
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "suite-msg-bubble min-w-0 max-w-[85%] space-y-2", children: [
|
|
4049
4038
|
/* @__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)(
|
|
4050
|
-
|
|
4039
|
+
import_react13.Suspense,
|
|
4051
4040
|
{
|
|
4052
4041
|
fallback: (
|
|
4053
4042
|
// The chunk is pre-warmed above, so this only shows on a
|
|
@@ -4219,7 +4208,7 @@ function SuiteAiPanel({
|
|
|
4219
4208
|
}
|
|
4220
4209
|
|
|
4221
4210
|
// src/suite/components/workspace-switcher.tsx
|
|
4222
|
-
var
|
|
4211
|
+
var import_react14 = require("react");
|
|
4223
4212
|
var import_iconoir_react9 = require("iconoir-react");
|
|
4224
4213
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4225
4214
|
function SuiteWorkspaceSwitcher({
|
|
@@ -4237,7 +4226,7 @@ function SuiteWorkspaceSwitcher({
|
|
|
4237
4226
|
footer
|
|
4238
4227
|
}) {
|
|
4239
4228
|
var _a2;
|
|
4240
|
-
const [open, setOpen] = (0,
|
|
4229
|
+
const [open, setOpen] = (0, import_react14.useState)(false);
|
|
4241
4230
|
const sections = (_a2 = groups == null ? void 0 : groups.filter((group) => group.workspaces.length > 0)) != null ? _a2 : workspaces.length > 0 ? [{ id: "workspaces", label: "Switch workspace", workspaces }] : [];
|
|
4242
4231
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4243
4232
|
DropdownMenu2,
|
|
@@ -4382,7 +4371,7 @@ function SuiteIcon({
|
|
|
4382
4371
|
}
|
|
4383
4372
|
|
|
4384
4373
|
// src/suite/lib/use-sidebar-width.ts
|
|
4385
|
-
var
|
|
4374
|
+
var import_react15 = require("react");
|
|
4386
4375
|
var SIDEBAR_RAIL_WIDTH = 56;
|
|
4387
4376
|
var SIDEBAR_COLLAPSE_THRESHOLD = 80;
|
|
4388
4377
|
var SIDEBAR_MIN_EXPANDED_WIDTH = 180;
|
|
@@ -4467,10 +4456,10 @@ function resetSuiteSidebarWidth() {
|
|
|
4467
4456
|
}
|
|
4468
4457
|
function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SIDEBAR_DEFAULT_WIDTH) {
|
|
4469
4458
|
const fallbackWidth = snapWidth(clampWidth(defaultWidth));
|
|
4470
|
-
const [width, setWidth] = (0,
|
|
4471
|
-
const [narrowViewport, setNarrowViewport] = (0,
|
|
4459
|
+
const [width, setWidth] = (0, import_react15.useState)(fallbackWidth);
|
|
4460
|
+
const [narrowViewport, setNarrowViewport] = (0, import_react15.useState)(false);
|
|
4472
4461
|
const collapsed = narrowViewport || width <= SIDEBAR_COLLAPSE_THRESHOLD;
|
|
4473
|
-
(0,
|
|
4462
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
4474
4463
|
const sync = () => {
|
|
4475
4464
|
const stored = readSidebarWidth(storageKey);
|
|
4476
4465
|
if (stored == null) return;
|
|
@@ -4486,20 +4475,20 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
4486
4475
|
document.removeEventListener("visibilitychange", sync);
|
|
4487
4476
|
};
|
|
4488
4477
|
}, [storageKey]);
|
|
4489
|
-
(0,
|
|
4478
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
4490
4479
|
const media = window.matchMedia("(max-width: 639px)");
|
|
4491
4480
|
const sync = () => setNarrowViewport(media.matches);
|
|
4492
4481
|
sync();
|
|
4493
4482
|
media.addEventListener("change", sync);
|
|
4494
4483
|
return () => media.removeEventListener("change", sync);
|
|
4495
4484
|
}, []);
|
|
4496
|
-
const persist = (0,
|
|
4485
|
+
const persist = (0, import_react15.useCallback)(
|
|
4497
4486
|
(value) => {
|
|
4498
4487
|
persistSidebarWidth(storageKey, value);
|
|
4499
4488
|
},
|
|
4500
4489
|
[storageKey]
|
|
4501
4490
|
);
|
|
4502
|
-
const setCollapsed = (0,
|
|
4491
|
+
const setCollapsed = (0, import_react15.useCallback)(
|
|
4503
4492
|
(value) => {
|
|
4504
4493
|
setWidth((current) => {
|
|
4505
4494
|
const next = value ? SIDEBAR_RAIL_WIDTH : current <= SIDEBAR_COLLAPSE_THRESHOLD ? fallbackWidth : snapWidth(current);
|
|
@@ -4509,11 +4498,11 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
4509
4498
|
},
|
|
4510
4499
|
[fallbackWidth, persist]
|
|
4511
4500
|
);
|
|
4512
|
-
const resetWidth = (0,
|
|
4501
|
+
const resetWidth = (0, import_react15.useCallback)(() => {
|
|
4513
4502
|
setWidth(fallbackWidth);
|
|
4514
4503
|
persist(fallbackWidth);
|
|
4515
4504
|
}, [fallbackWidth, persist]);
|
|
4516
|
-
const startResize = (0,
|
|
4505
|
+
const startResize = (0, import_react15.useCallback)(
|
|
4517
4506
|
(event) => {
|
|
4518
4507
|
event.preventDefault();
|
|
4519
4508
|
const startX = event.clientX;
|
|
@@ -4535,7 +4524,7 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
4535
4524
|
},
|
|
4536
4525
|
[persist, width]
|
|
4537
4526
|
);
|
|
4538
|
-
const resizeBy = (0,
|
|
4527
|
+
const resizeBy = (0, import_react15.useCallback)(
|
|
4539
4528
|
(delta) => {
|
|
4540
4529
|
setWidth((current) => {
|
|
4541
4530
|
const next = clampWidth(current + delta);
|
|
@@ -4549,10 +4538,10 @@ function useSidebarWidth(storageKey = SUITE_SIDEBAR_WIDTH_KEY, defaultWidth = SI
|
|
|
4549
4538
|
}
|
|
4550
4539
|
|
|
4551
4540
|
// src/suite/lib/motion.tsx
|
|
4552
|
-
var
|
|
4541
|
+
var import_react16 = require("motion/react");
|
|
4553
4542
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4554
4543
|
function SuiteMotionProvider({ children }) {
|
|
4555
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
4544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react16.LazyMotion, { features: import_react16.domAnimation, strict: true, children });
|
|
4556
4545
|
}
|
|
4557
4546
|
var SUITE_SPRINGS = {
|
|
4558
4547
|
/** Snappy panel/sheet entrances — small overshoot. */
|
|
@@ -4709,7 +4698,7 @@ function SuiteEmptyState({
|
|
|
4709
4698
|
}
|
|
4710
4699
|
|
|
4711
4700
|
// src/suite/components/suite-settings-mobile-nav.tsx
|
|
4712
|
-
var
|
|
4701
|
+
var import_react17 = require("react");
|
|
4713
4702
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4714
4703
|
function SuiteSettingsMobileNav({
|
|
4715
4704
|
items,
|
|
@@ -4728,7 +4717,7 @@ function SuiteSettingsMobileNav({
|
|
|
4728
4717
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.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) => {
|
|
4729
4718
|
const Icon = item.icon;
|
|
4730
4719
|
const active = activeHref === item.href || activeHref.startsWith(`${item.href}/`);
|
|
4731
|
-
const iconNode = (0,
|
|
4720
|
+
const iconNode = (0, import_react17.isValidElement)(item.icon) ? item.icon : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4732
4721
|
Icon,
|
|
4733
4722
|
{
|
|
4734
4723
|
className: cn(
|
|
@@ -4766,7 +4755,7 @@ function SuiteSettingsMobileNav({
|
|
|
4766
4755
|
|
|
4767
4756
|
// src/suite/components/suite-sidebar.tsx
|
|
4768
4757
|
var import_link2 = __toESM(require("next/link"));
|
|
4769
|
-
var
|
|
4758
|
+
var import_react18 = require("react");
|
|
4770
4759
|
var import_iconoir_react10 = require("iconoir-react");
|
|
4771
4760
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
4772
4761
|
function renderNode(node, collapsed) {
|
|
@@ -4791,14 +4780,14 @@ function SuiteSidebar({
|
|
|
4791
4780
|
}) {
|
|
4792
4781
|
const showAskAi = Boolean(onAskAiOpenChange && askAi);
|
|
4793
4782
|
const chatOpen = showAskAi && askAiOpen && !collapsed;
|
|
4794
|
-
const setAskAi = (0,
|
|
4783
|
+
const setAskAi = (0, import_react18.useCallback)(
|
|
4795
4784
|
(next) => {
|
|
4796
4785
|
persistSuiteAskAiOpen(next);
|
|
4797
4786
|
onAskAiOpenChange == null ? void 0 : onAskAiOpenChange(next);
|
|
4798
4787
|
},
|
|
4799
4788
|
[onAskAiOpenChange]
|
|
4800
4789
|
);
|
|
4801
|
-
(0,
|
|
4790
|
+
(0, import_react18.useEffect)(() => {
|
|
4802
4791
|
if (!onAskAiOpenChange) return;
|
|
4803
4792
|
function onOpen() {
|
|
4804
4793
|
onRequestExpand == null ? void 0 : onRequestExpand();
|
|
@@ -4807,7 +4796,7 @@ function SuiteSidebar({
|
|
|
4807
4796
|
window.addEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
4808
4797
|
return () => window.removeEventListener(SUITE_OPEN_ASK_AI_EVENT, onOpen);
|
|
4809
4798
|
}, [onAskAiOpenChange, onRequestExpand, setAskAi]);
|
|
4810
|
-
(0,
|
|
4799
|
+
(0, import_react18.useEffect)(() => {
|
|
4811
4800
|
if (!chatOpen) return;
|
|
4812
4801
|
function onKey(event) {
|
|
4813
4802
|
if (event.key === "Escape") setAskAi(false);
|
|
@@ -5122,11 +5111,11 @@ function SuiteAppLayout({
|
|
|
5122
5111
|
}
|
|
5123
5112
|
|
|
5124
5113
|
// src/suite/components/suite-integration-picker.tsx
|
|
5125
|
-
var
|
|
5114
|
+
var import_react26 = require("react");
|
|
5126
5115
|
var import_iconoir_react12 = require("iconoir-react");
|
|
5127
5116
|
|
|
5128
5117
|
// src/components/ui/Button.tsx
|
|
5129
|
-
var
|
|
5118
|
+
var import_react19 = require("react");
|
|
5130
5119
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5131
5120
|
var variantClass = {
|
|
5132
5121
|
primary: "ph-btn-primary",
|
|
@@ -5154,7 +5143,7 @@ var shapeClass = {
|
|
|
5154
5143
|
square: "ph-btn-square",
|
|
5155
5144
|
wide: "ph-btn-wide"
|
|
5156
5145
|
};
|
|
5157
|
-
var Button = (0,
|
|
5146
|
+
var Button = (0, import_react19.forwardRef)(function Button2(_a2, ref) {
|
|
5158
5147
|
var _b = _a2, {
|
|
5159
5148
|
variant = "secondary",
|
|
5160
5149
|
size = "md",
|
|
@@ -5218,7 +5207,7 @@ var Button = (0, import_react18.forwardRef)(function Button2(_a2, ref) {
|
|
|
5218
5207
|
Button.displayName = "Button";
|
|
5219
5208
|
|
|
5220
5209
|
// src/components/ui/Alert.tsx
|
|
5221
|
-
var
|
|
5210
|
+
var import_react20 = require("react");
|
|
5222
5211
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5223
5212
|
var statusConfig = {
|
|
5224
5213
|
info: { icon: IconInfo },
|
|
@@ -5232,7 +5221,7 @@ var statusClassMap = {
|
|
|
5232
5221
|
warning: "ph-alert-warning",
|
|
5233
5222
|
danger: "ph-alert-danger"
|
|
5234
5223
|
};
|
|
5235
|
-
var Alert = (0,
|
|
5224
|
+
var Alert = (0, import_react20.forwardRef)(function Alert2(_a2, ref) {
|
|
5236
5225
|
var _b = _a2, {
|
|
5237
5226
|
status = "info",
|
|
5238
5227
|
title,
|
|
@@ -5290,7 +5279,7 @@ var Alert = (0, import_react19.forwardRef)(function Alert2(_a2, ref) {
|
|
|
5290
5279
|
Alert.displayName = "Alert";
|
|
5291
5280
|
|
|
5292
5281
|
// src/components/ui/Badge.tsx
|
|
5293
|
-
var
|
|
5282
|
+
var import_react21 = require("react");
|
|
5294
5283
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5295
5284
|
var variantMap = {
|
|
5296
5285
|
brand: "ph-badge-brand",
|
|
@@ -5305,7 +5294,7 @@ var sizeMap = {
|
|
|
5305
5294
|
sm: "text-[10px] px-1.5 py-0.5",
|
|
5306
5295
|
md: ""
|
|
5307
5296
|
};
|
|
5308
|
-
var Badge = (0,
|
|
5297
|
+
var Badge = (0, import_react21.forwardRef)(function Badge2(_a2, ref) {
|
|
5309
5298
|
var _b = _a2, {
|
|
5310
5299
|
variant = "neutral",
|
|
5311
5300
|
size = "md",
|
|
@@ -5335,7 +5324,7 @@ var Badge = (0, import_react20.forwardRef)(function Badge2(_a2, ref) {
|
|
|
5335
5324
|
Badge.displayName = "Badge";
|
|
5336
5325
|
|
|
5337
5326
|
// src/components/ui/Card.tsx
|
|
5338
|
-
var
|
|
5327
|
+
var import_react22 = require("react");
|
|
5339
5328
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5340
5329
|
var variantMap2 = {
|
|
5341
5330
|
default: "",
|
|
@@ -5343,7 +5332,7 @@ var variantMap2 = {
|
|
|
5343
5332
|
elevated: "ph-card-elevated",
|
|
5344
5333
|
highlighted: "ph-card-highlighted"
|
|
5345
5334
|
};
|
|
5346
|
-
var Card = (0,
|
|
5335
|
+
var Card = (0, import_react22.forwardRef)(function Card2(_a2, ref) {
|
|
5347
5336
|
var _b = _a2, {
|
|
5348
5337
|
children,
|
|
5349
5338
|
title,
|
|
@@ -5430,11 +5419,11 @@ var Card = (0, import_react21.forwardRef)(function Card2(_a2, ref) {
|
|
|
5430
5419
|
Card.displayName = "Card";
|
|
5431
5420
|
|
|
5432
5421
|
// src/components/ui/Input.tsx
|
|
5433
|
-
var
|
|
5422
|
+
var import_react24 = require("react");
|
|
5434
5423
|
var import_iconoir_react11 = require("iconoir-react");
|
|
5435
5424
|
|
|
5436
5425
|
// src/components/ui/FormField.tsx
|
|
5437
|
-
var
|
|
5426
|
+
var import_react23 = require("react");
|
|
5438
5427
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5439
5428
|
function FormField(_a2) {
|
|
5440
5429
|
var _b = _a2, {
|
|
@@ -5458,7 +5447,7 @@ function FormField(_a2) {
|
|
|
5458
5447
|
"children",
|
|
5459
5448
|
"className"
|
|
5460
5449
|
]);
|
|
5461
|
-
const generatedId = (0,
|
|
5450
|
+
const generatedId = (0, import_react23.useId)();
|
|
5462
5451
|
const id = controlId != null ? controlId : generatedId;
|
|
5463
5452
|
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
5464
5453
|
const errorId = error ? `${id}-error` : void 0;
|
|
@@ -5497,7 +5486,7 @@ function joinIds(...ids) {
|
|
|
5497
5486
|
const value = ids.filter(Boolean).join(" ");
|
|
5498
5487
|
return value || void 0;
|
|
5499
5488
|
}
|
|
5500
|
-
var Input = (0,
|
|
5489
|
+
var Input = (0, import_react24.forwardRef)(function Input2(_a2, ref) {
|
|
5501
5490
|
var _b = _a2, {
|
|
5502
5491
|
id: idProp,
|
|
5503
5492
|
label,
|
|
@@ -5527,11 +5516,11 @@ var Input = (0, import_react23.forwardRef)(function Input2(_a2, ref) {
|
|
|
5527
5516
|
"required",
|
|
5528
5517
|
"aria-describedby"
|
|
5529
5518
|
]);
|
|
5530
|
-
const autoId = (0,
|
|
5519
|
+
const autoId = (0, import_react24.useId)();
|
|
5531
5520
|
const id = idProp != null ? idProp : autoId;
|
|
5532
5521
|
const hasError = Boolean(error);
|
|
5533
5522
|
const isPassword = type === "password";
|
|
5534
|
-
const [revealed, setRevealed] = (0,
|
|
5523
|
+
const [revealed, setRevealed] = (0, import_react24.useState)(false);
|
|
5535
5524
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5536
5525
|
FormField,
|
|
5537
5526
|
{
|
|
@@ -5580,7 +5569,7 @@ var Input = (0, import_react23.forwardRef)(function Input2(_a2, ref) {
|
|
|
5580
5569
|
);
|
|
5581
5570
|
});
|
|
5582
5571
|
Input.displayName = "Input";
|
|
5583
|
-
var Select = (0,
|
|
5572
|
+
var Select = (0, import_react24.forwardRef)(function Select2(_a2, ref) {
|
|
5584
5573
|
var _b = _a2, {
|
|
5585
5574
|
id: idProp,
|
|
5586
5575
|
label,
|
|
@@ -5608,7 +5597,7 @@ var Select = (0, import_react23.forwardRef)(function Select2(_a2, ref) {
|
|
|
5608
5597
|
"required",
|
|
5609
5598
|
"aria-describedby"
|
|
5610
5599
|
]);
|
|
5611
|
-
const autoId = (0,
|
|
5600
|
+
const autoId = (0, import_react24.useId)();
|
|
5612
5601
|
const id = idProp != null ? idProp : autoId;
|
|
5613
5602
|
const hasError = Boolean(error);
|
|
5614
5603
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -5631,7 +5620,7 @@ var Select = (0, import_react23.forwardRef)(function Select2(_a2, ref) {
|
|
|
5631
5620
|
) });
|
|
5632
5621
|
});
|
|
5633
5622
|
Select.displayName = "Select";
|
|
5634
|
-
var Textarea = (0,
|
|
5623
|
+
var Textarea = (0, import_react24.forwardRef)(function Textarea2(_a2, ref) {
|
|
5635
5624
|
var _b = _a2, {
|
|
5636
5625
|
id: idProp,
|
|
5637
5626
|
label,
|
|
@@ -5657,7 +5646,7 @@ var Textarea = (0, import_react23.forwardRef)(function Textarea2(_a2, ref) {
|
|
|
5657
5646
|
"required",
|
|
5658
5647
|
"aria-describedby"
|
|
5659
5648
|
]);
|
|
5660
|
-
const autoId = (0,
|
|
5649
|
+
const autoId = (0, import_react24.useId)();
|
|
5661
5650
|
const id = idProp != null ? idProp : autoId;
|
|
5662
5651
|
const hasError = Boolean(error);
|
|
5663
5652
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -5678,7 +5667,7 @@ var Textarea = (0, import_react23.forwardRef)(function Textarea2(_a2, ref) {
|
|
|
5678
5667
|
) });
|
|
5679
5668
|
});
|
|
5680
5669
|
Textarea.displayName = "Textarea";
|
|
5681
|
-
var Checkbox = (0,
|
|
5670
|
+
var Checkbox = (0, import_react24.forwardRef)(function Checkbox2(_a2, ref) {
|
|
5682
5671
|
var _b = _a2, {
|
|
5683
5672
|
id: idProp,
|
|
5684
5673
|
label,
|
|
@@ -5698,7 +5687,7 @@ var Checkbox = (0, import_react23.forwardRef)(function Checkbox2(_a2, ref) {
|
|
|
5698
5687
|
"disabled",
|
|
5699
5688
|
"aria-describedby"
|
|
5700
5689
|
]);
|
|
5701
|
-
const autoId = (0,
|
|
5690
|
+
const autoId = (0, import_react24.useId)();
|
|
5702
5691
|
const id = idProp != null ? idProp : autoId;
|
|
5703
5692
|
const hasError = Boolean(error);
|
|
5704
5693
|
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
@@ -5733,7 +5722,7 @@ var Checkbox = (0, import_react23.forwardRef)(function Checkbox2(_a2, ref) {
|
|
|
5733
5722
|
] });
|
|
5734
5723
|
});
|
|
5735
5724
|
Checkbox.displayName = "Checkbox";
|
|
5736
|
-
var Radio = (0,
|
|
5725
|
+
var Radio = (0, import_react24.forwardRef)(function Radio2(_a2, ref) {
|
|
5737
5726
|
var _b = _a2, {
|
|
5738
5727
|
id: idProp,
|
|
5739
5728
|
label,
|
|
@@ -5747,7 +5736,7 @@ var Radio = (0, import_react23.forwardRef)(function Radio2(_a2, ref) {
|
|
|
5747
5736
|
"wrapperClassName",
|
|
5748
5737
|
"disabled"
|
|
5749
5738
|
]);
|
|
5750
|
-
const autoId = (0,
|
|
5739
|
+
const autoId = (0, import_react24.useId)();
|
|
5751
5740
|
const id = idProp != null ? idProp : autoId;
|
|
5752
5741
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn2("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
5753
5742
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -5764,7 +5753,7 @@ var Radio = (0, import_react23.forwardRef)(function Radio2(_a2, ref) {
|
|
|
5764
5753
|
] });
|
|
5765
5754
|
});
|
|
5766
5755
|
Radio.displayName = "Radio";
|
|
5767
|
-
var Toggle = (0,
|
|
5756
|
+
var Toggle = (0, import_react24.forwardRef)(function Toggle2(_a2, ref) {
|
|
5768
5757
|
var _b = _a2, {
|
|
5769
5758
|
id: idProp,
|
|
5770
5759
|
label,
|
|
@@ -5778,7 +5767,7 @@ var Toggle = (0, import_react23.forwardRef)(function Toggle2(_a2, ref) {
|
|
|
5778
5767
|
"wrapperClassName",
|
|
5779
5768
|
"disabled"
|
|
5780
5769
|
]);
|
|
5781
|
-
const autoId = (0,
|
|
5770
|
+
const autoId = (0, import_react24.useId)();
|
|
5782
5771
|
const id = idProp != null ? idProp : autoId;
|
|
5783
5772
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("label", { className: cn2("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
5784
5773
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
@@ -5796,7 +5785,7 @@ var Toggle = (0, import_react23.forwardRef)(function Toggle2(_a2, ref) {
|
|
|
5796
5785
|
] });
|
|
5797
5786
|
});
|
|
5798
5787
|
Toggle.displayName = "Toggle";
|
|
5799
|
-
var Range = (0,
|
|
5788
|
+
var Range = (0, import_react24.forwardRef)(function Range2(_a2, ref) {
|
|
5800
5789
|
var _b = _a2, {
|
|
5801
5790
|
id: idProp,
|
|
5802
5791
|
label,
|
|
@@ -5814,7 +5803,7 @@ var Range = (0, import_react23.forwardRef)(function Range2(_a2, ref) {
|
|
|
5814
5803
|
"wrapperClassName",
|
|
5815
5804
|
"className"
|
|
5816
5805
|
]);
|
|
5817
|
-
const autoId = (0,
|
|
5806
|
+
const autoId = (0, import_react24.useId)();
|
|
5818
5807
|
const id = idProp != null ? idProp : autoId;
|
|
5819
5808
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn2("ph-field", wrapperClassName), children: [
|
|
5820
5809
|
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
@@ -5827,7 +5816,7 @@ var Range = (0, import_react23.forwardRef)(function Range2(_a2, ref) {
|
|
|
5827
5816
|
] });
|
|
5828
5817
|
});
|
|
5829
5818
|
Range.displayName = "Range";
|
|
5830
|
-
var FileUpload = (0,
|
|
5819
|
+
var FileUpload = (0, import_react24.forwardRef)(function FileUpload2(_a2, ref) {
|
|
5831
5820
|
var _b = _a2, {
|
|
5832
5821
|
id: idProp,
|
|
5833
5822
|
label,
|
|
@@ -5841,7 +5830,7 @@ var FileUpload = (0, import_react23.forwardRef)(function FileUpload2(_a2, ref) {
|
|
|
5841
5830
|
"wrapperClassName",
|
|
5842
5831
|
"className"
|
|
5843
5832
|
]);
|
|
5844
|
-
const autoId = (0,
|
|
5833
|
+
const autoId = (0, import_react24.useId)();
|
|
5845
5834
|
const id = idProp != null ? idProp : autoId;
|
|
5846
5835
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn2("ph-field", wrapperClassName), children: [
|
|
5847
5836
|
label && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
@@ -5855,7 +5844,7 @@ FileUpload.displayName = "FileUpload";
|
|
|
5855
5844
|
|
|
5856
5845
|
// src/components/ui/Modal.tsx
|
|
5857
5846
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
5858
|
-
var
|
|
5847
|
+
var import_react25 = require("react");
|
|
5859
5848
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5860
5849
|
var sizeMap3 = {
|
|
5861
5850
|
sm: "max-w-sm",
|
|
@@ -5886,7 +5875,7 @@ function Modal({
|
|
|
5886
5875
|
"aria-labelledby": ariaLabelledBy
|
|
5887
5876
|
}) {
|
|
5888
5877
|
const canDismiss = Boolean(onClose);
|
|
5889
|
-
const restoreFocusRef = (0,
|
|
5878
|
+
const restoreFocusRef = (0, import_react25.useRef)(null);
|
|
5890
5879
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
5891
5880
|
Dialog2.Root,
|
|
5892
5881
|
{
|
|
@@ -6036,35 +6025,35 @@ function SuiteIntegrationPicker({
|
|
|
6036
6025
|
description = "Connect an app to this workspace securely.",
|
|
6037
6026
|
dataTest = "suite-integration-picker"
|
|
6038
6027
|
}) {
|
|
6039
|
-
const [query, setQuery] = (0,
|
|
6040
|
-
const [category, setCategory] = (0,
|
|
6041
|
-
const [categoryQuery, setCategoryQuery] = (0,
|
|
6042
|
-
const [categoryMenuOpen, setCategoryMenuOpen] = (0,
|
|
6043
|
-
const [expanded, setExpanded] = (0,
|
|
6044
|
-
const [bridgeOnlyInternal, setBridgeOnlyInternal] = (0,
|
|
6045
|
-
const categoryMenuRef = (0,
|
|
6046
|
-
const categoryTriggerRef = (0,
|
|
6047
|
-
const categorySearchRef = (0,
|
|
6048
|
-
const categoryOptionRefs = (0,
|
|
6049
|
-
const pendingCategoryFocus = (0,
|
|
6028
|
+
const [query, setQuery] = (0, import_react26.useState)("");
|
|
6029
|
+
const [category, setCategory] = (0, import_react26.useState)("all");
|
|
6030
|
+
const [categoryQuery, setCategoryQuery] = (0, import_react26.useState)("");
|
|
6031
|
+
const [categoryMenuOpen, setCategoryMenuOpen] = (0, import_react26.useState)(false);
|
|
6032
|
+
const [expanded, setExpanded] = (0, import_react26.useState)(null);
|
|
6033
|
+
const [bridgeOnlyInternal, setBridgeOnlyInternal] = (0, import_react26.useState)(false);
|
|
6034
|
+
const categoryMenuRef = (0, import_react26.useRef)(null);
|
|
6035
|
+
const categoryTriggerRef = (0, import_react26.useRef)(null);
|
|
6036
|
+
const categorySearchRef = (0, import_react26.useRef)(null);
|
|
6037
|
+
const categoryOptionRefs = (0, import_react26.useRef)({});
|
|
6038
|
+
const pendingCategoryFocus = (0, import_react26.useRef)(
|
|
6050
6039
|
null
|
|
6051
6040
|
);
|
|
6052
|
-
const scrollViewportRef = (0,
|
|
6053
|
-
const loadMoreSentinelRef = (0,
|
|
6054
|
-
const loadMoreInFlightRef = (0,
|
|
6055
|
-
const sentinelVisibleRef = (0,
|
|
6056
|
-
const authRequestRef = (0,
|
|
6057
|
-
const [methodItem, setMethodItem] = (0,
|
|
6058
|
-
const [authItem, setAuthItem] = (0,
|
|
6059
|
-
const [authValues, setAuthValues] = (0,
|
|
6060
|
-
const [authLoading, setAuthLoading] = (0,
|
|
6061
|
-
const [authSubmitting, setAuthSubmitting] = (0,
|
|
6062
|
-
const [authError, setAuthError] = (0,
|
|
6063
|
-
const [connectionError, setConnectionError] = (0,
|
|
6064
|
-
const [itemToDisconnect, setItemToDisconnect] = (0,
|
|
6065
|
-
const [disconnecting, setDisconnecting] = (0,
|
|
6066
|
-
const [disconnectError, setDisconnectError] = (0,
|
|
6067
|
-
const itemCategories = (0,
|
|
6041
|
+
const scrollViewportRef = (0, import_react26.useRef)(null);
|
|
6042
|
+
const loadMoreSentinelRef = (0, import_react26.useRef)(null);
|
|
6043
|
+
const loadMoreInFlightRef = (0, import_react26.useRef)(false);
|
|
6044
|
+
const sentinelVisibleRef = (0, import_react26.useRef)(false);
|
|
6045
|
+
const authRequestRef = (0, import_react26.useRef)(0);
|
|
6046
|
+
const [methodItem, setMethodItem] = (0, import_react26.useState)(null);
|
|
6047
|
+
const [authItem, setAuthItem] = (0, import_react26.useState)(null);
|
|
6048
|
+
const [authValues, setAuthValues] = (0, import_react26.useState)({});
|
|
6049
|
+
const [authLoading, setAuthLoading] = (0, import_react26.useState)(false);
|
|
6050
|
+
const [authSubmitting, setAuthSubmitting] = (0, import_react26.useState)(false);
|
|
6051
|
+
const [authError, setAuthError] = (0, import_react26.useState)(null);
|
|
6052
|
+
const [connectionError, setConnectionError] = (0, import_react26.useState)(null);
|
|
6053
|
+
const [itemToDisconnect, setItemToDisconnect] = (0, import_react26.useState)(null);
|
|
6054
|
+
const [disconnecting, setDisconnecting] = (0, import_react26.useState)(false);
|
|
6055
|
+
const [disconnectError, setDisconnectError] = (0, import_react26.useState)(null);
|
|
6056
|
+
const itemCategories = (0, import_react26.useMemo)(
|
|
6068
6057
|
() => Array.from(
|
|
6069
6058
|
new Set(items.flatMap((item) => {
|
|
6070
6059
|
var _a2;
|
|
@@ -6254,7 +6243,7 @@ function SuiteIntegrationPicker({
|
|
|
6254
6243
|
setAuthSubmitting(false);
|
|
6255
6244
|
}
|
|
6256
6245
|
}
|
|
6257
|
-
(0,
|
|
6246
|
+
(0, import_react26.useEffect)(() => {
|
|
6258
6247
|
if (!categoryMenuOpen) return;
|
|
6259
6248
|
const handlePointerDown = (event) => {
|
|
6260
6249
|
var _a2;
|
|
@@ -6272,7 +6261,7 @@ function SuiteIntegrationPicker({
|
|
|
6272
6261
|
document.removeEventListener("keydown", handleKeyDown);
|
|
6273
6262
|
};
|
|
6274
6263
|
}, [categoryMenuOpen]);
|
|
6275
|
-
(0,
|
|
6264
|
+
(0, import_react26.useEffect)(() => {
|
|
6276
6265
|
var _a2, _b, _c;
|
|
6277
6266
|
const target = pendingCategoryFocus.current;
|
|
6278
6267
|
if (!target) return;
|
|
@@ -6281,10 +6270,10 @@ function SuiteIntegrationPicker({
|
|
|
6281
6270
|
else if (target === "search") (_b = categorySearchRef.current) == null ? void 0 : _b.focus();
|
|
6282
6271
|
else (_c = categoryOptionRefs.current[target]) == null ? void 0 : _c.focus();
|
|
6283
6272
|
}, [activeCategory, categoryMenuOpen, categoryQuery, visibleCategories]);
|
|
6284
|
-
(0,
|
|
6273
|
+
(0, import_react26.useEffect)(() => {
|
|
6285
6274
|
if (!loadingMore) loadMoreInFlightRef.current = false;
|
|
6286
6275
|
}, [loadingMore]);
|
|
6287
|
-
(0,
|
|
6276
|
+
(0, import_react26.useEffect)(() => {
|
|
6288
6277
|
const root = scrollViewportRef.current;
|
|
6289
6278
|
const sentinel = loadMoreSentinelRef.current;
|
|
6290
6279
|
if (!open || !root || !sentinel) {
|
|
@@ -6755,7 +6744,7 @@ function SuiteIntegrationPicker({
|
|
|
6755
6744
|
}
|
|
6756
6745
|
|
|
6757
6746
|
// src/suite/components/suite-integration-rules.tsx
|
|
6758
|
-
var
|
|
6747
|
+
var import_react27 = require("react");
|
|
6759
6748
|
var import_iconoir_react13 = require("iconoir-react");
|
|
6760
6749
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6761
6750
|
var ACTION_LABELS = {
|
|
@@ -6787,18 +6776,18 @@ function SuiteIntegrationRules({
|
|
|
6787
6776
|
onRefresh,
|
|
6788
6777
|
dataTest = "integration-rules"
|
|
6789
6778
|
}) {
|
|
6790
|
-
const [formOpen, setFormOpen] = (0,
|
|
6791
|
-
const [name, setName] = (0,
|
|
6792
|
-
const [trigger, setTrigger] = (0,
|
|
6793
|
-
const [actionType, setActionType] = (0,
|
|
6794
|
-
const [projectId, setProjectId] = (0,
|
|
6795
|
-
const [minutes, setMinutes] = (0,
|
|
6796
|
-
const [priority, setPriority] = (0,
|
|
6797
|
-
const [submitting, setSubmitting] = (0,
|
|
6798
|
-
const [formError, setFormError] = (0,
|
|
6799
|
-
const [busyId, setBusyId] = (0,
|
|
6800
|
-
const [ruleToDelete, setRuleToDelete] = (0,
|
|
6801
|
-
const [deleteError, setDeleteError] = (0,
|
|
6779
|
+
const [formOpen, setFormOpen] = (0, import_react27.useState)(false);
|
|
6780
|
+
const [name, setName] = (0, import_react27.useState)("");
|
|
6781
|
+
const [trigger, setTrigger] = (0, import_react27.useState)("");
|
|
6782
|
+
const [actionType, setActionType] = (0, import_react27.useState)("create_tides_task");
|
|
6783
|
+
const [projectId, setProjectId] = (0, import_react27.useState)("");
|
|
6784
|
+
const [minutes, setMinutes] = (0, import_react27.useState)("");
|
|
6785
|
+
const [priority, setPriority] = (0, import_react27.useState)("low");
|
|
6786
|
+
const [submitting, setSubmitting] = (0, import_react27.useState)(false);
|
|
6787
|
+
const [formError, setFormError] = (0, import_react27.useState)(null);
|
|
6788
|
+
const [busyId, setBusyId] = (0, import_react27.useState)(null);
|
|
6789
|
+
const [ruleToDelete, setRuleToDelete] = (0, import_react27.useState)(null);
|
|
6790
|
+
const [deleteError, setDeleteError] = (0, import_react27.useState)(null);
|
|
6802
6791
|
const needsProject = actionType === "create_tides_task" || actionType === "draft_time_entry";
|
|
6803
6792
|
async function submitForm(event) {
|
|
6804
6793
|
event.preventDefault();
|
|
@@ -7153,8 +7142,11 @@ function SuiteIntegrationRules({
|
|
|
7153
7142
|
}
|
|
7154
7143
|
|
|
7155
7144
|
// src/suite/components/suite-clients-projects-directory.tsx
|
|
7156
|
-
var
|
|
7157
|
-
var
|
|
7145
|
+
var import_react29 = require("react");
|
|
7146
|
+
var import_iconoir_react16 = require("iconoir-react");
|
|
7147
|
+
|
|
7148
|
+
// src/suite/components/suite-entity-icon.tsx
|
|
7149
|
+
var import_iconoir_react14 = require("iconoir-react");
|
|
7158
7150
|
|
|
7159
7151
|
// src/suite/lib/palette-api.ts
|
|
7160
7152
|
var _a;
|
|
@@ -7239,12 +7231,11 @@ function SuiteEntityIcon({
|
|
|
7239
7231
|
}
|
|
7240
7232
|
);
|
|
7241
7233
|
}
|
|
7242
|
-
const initial = label == null ? void 0 : label.trim().charAt(0).toUpperCase();
|
|
7243
7234
|
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7244
7235
|
"span",
|
|
7245
7236
|
{
|
|
7246
7237
|
className: cn2(
|
|
7247
|
-
"inline-flex shrink-0 items-center justify-center
|
|
7238
|
+
"inline-flex shrink-0 items-center justify-center leading-none",
|
|
7248
7239
|
roundedClass,
|
|
7249
7240
|
className
|
|
7250
7241
|
),
|
|
@@ -7253,14 +7244,22 @@ function SuiteEntityIcon({
|
|
|
7253
7244
|
backgroundColor: tint ? `${tint}18` : neutralBackground
|
|
7254
7245
|
}, style),
|
|
7255
7246
|
"aria-hidden": "true",
|
|
7256
|
-
|
|
7247
|
+
title: label != null ? label : void 0,
|
|
7248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
7249
|
+
import_iconoir_react14.Folder,
|
|
7250
|
+
{
|
|
7251
|
+
className: "h-[0.85em] w-[0.85em]",
|
|
7252
|
+
strokeWidth: 1.8,
|
|
7253
|
+
"aria-hidden": true
|
|
7254
|
+
}
|
|
7255
|
+
)
|
|
7257
7256
|
}
|
|
7258
7257
|
);
|
|
7259
7258
|
}
|
|
7260
7259
|
|
|
7261
7260
|
// src/suite/components/suite-palette-library.tsx
|
|
7262
|
-
var
|
|
7263
|
-
var
|
|
7261
|
+
var import_react28 = require("react");
|
|
7262
|
+
var import_iconoir_react15 = require("iconoir-react");
|
|
7264
7263
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
7265
7264
|
var PAGE_SIZE = 60;
|
|
7266
7265
|
var DISCOVER_LIMIT = 120;
|
|
@@ -7298,7 +7297,7 @@ function FilterSelect({
|
|
|
7298
7297
|
}
|
|
7299
7298
|
),
|
|
7300
7299
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7301
|
-
|
|
7300
|
+
import_iconoir_react15.NavArrowDown,
|
|
7302
7301
|
{
|
|
7303
7302
|
className: "pointer-events-none absolute right-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ph-mutedtext",
|
|
7304
7303
|
"aria-hidden": true
|
|
@@ -7310,21 +7309,21 @@ function SuitePaletteLibrary({
|
|
|
7310
7309
|
onPick
|
|
7311
7310
|
}) {
|
|
7312
7311
|
var _a2, _b;
|
|
7313
|
-
const [collections, setCollections] = (0,
|
|
7314
|
-
const [typeFilter, setTypeFilter] = (0,
|
|
7315
|
-
const [collectionFilter, setCollectionFilter] = (0,
|
|
7316
|
-
const [libraryOpen, setLibraryOpen] = (0,
|
|
7317
|
-
const [libraryQuery, setLibraryQuery] = (0,
|
|
7318
|
-
const libraryRef = (0,
|
|
7319
|
-
const [icons, setIcons] = (0,
|
|
7320
|
-
const [total, setTotal] = (0,
|
|
7321
|
-
const [page, setPage] = (0,
|
|
7322
|
-
const [query, setQuery] = (0,
|
|
7323
|
-
const [loading, setLoading] = (0,
|
|
7324
|
-
const [loadingMore, setLoadingMore] = (0,
|
|
7325
|
-
const [error, setError] = (0,
|
|
7326
|
-
const requestId = (0,
|
|
7327
|
-
const libraryOptions = (0,
|
|
7312
|
+
const [collections, setCollections] = (0, import_react28.useState)([]);
|
|
7313
|
+
const [typeFilter, setTypeFilter] = (0, import_react28.useState)("all");
|
|
7314
|
+
const [collectionFilter, setCollectionFilter] = (0, import_react28.useState)("");
|
|
7315
|
+
const [libraryOpen, setLibraryOpen] = (0, import_react28.useState)(false);
|
|
7316
|
+
const [libraryQuery, setLibraryQuery] = (0, import_react28.useState)("");
|
|
7317
|
+
const libraryRef = (0, import_react28.useRef)(null);
|
|
7318
|
+
const [icons, setIcons] = (0, import_react28.useState)([]);
|
|
7319
|
+
const [total, setTotal] = (0, import_react28.useState)(0);
|
|
7320
|
+
const [page, setPage] = (0, import_react28.useState)(1);
|
|
7321
|
+
const [query, setQuery] = (0, import_react28.useState)("");
|
|
7322
|
+
const [loading, setLoading] = (0, import_react28.useState)(true);
|
|
7323
|
+
const [loadingMore, setLoadingMore] = (0, import_react28.useState)(false);
|
|
7324
|
+
const [error, setError] = (0, import_react28.useState)(null);
|
|
7325
|
+
const requestId = (0, import_react28.useRef)(0);
|
|
7326
|
+
const libraryOptions = (0, import_react28.useMemo)(() => {
|
|
7328
7327
|
const list = collections.filter(
|
|
7329
7328
|
(item) => typeFilter === "all" || item.style === typeFilter
|
|
7330
7329
|
);
|
|
@@ -7332,7 +7331,7 @@ function SuitePaletteLibrary({
|
|
|
7332
7331
|
(a, b) => Number(b.featured) - Number(a.featured) || a.name.localeCompare(b.name)
|
|
7333
7332
|
);
|
|
7334
7333
|
}, [collections, typeFilter]);
|
|
7335
|
-
const discoverIcons = (0,
|
|
7334
|
+
const discoverIcons = (0, import_react28.useMemo)(() => {
|
|
7336
7335
|
const seen = /* @__PURE__ */ new Set();
|
|
7337
7336
|
const out = [];
|
|
7338
7337
|
for (const collection of libraryOptions) {
|
|
@@ -7345,7 +7344,7 @@ function SuitePaletteLibrary({
|
|
|
7345
7344
|
}
|
|
7346
7345
|
return out;
|
|
7347
7346
|
}, [libraryOptions]);
|
|
7348
|
-
const loadCollection = (0,
|
|
7347
|
+
const loadCollection = (0, import_react28.useCallback)(async (slug, nextPage = 1) => {
|
|
7349
7348
|
const id = ++requestId.current;
|
|
7350
7349
|
if (nextPage === 1) {
|
|
7351
7350
|
setLoading(true);
|
|
@@ -7376,7 +7375,7 @@ function SuitePaletteLibrary({
|
|
|
7376
7375
|
}
|
|
7377
7376
|
}
|
|
7378
7377
|
}, []);
|
|
7379
|
-
(0,
|
|
7378
|
+
(0, import_react28.useEffect)(() => {
|
|
7380
7379
|
let cancelled = false;
|
|
7381
7380
|
fetchPaletteLibrary().then((library) => {
|
|
7382
7381
|
if (cancelled) return;
|
|
@@ -7390,13 +7389,13 @@ function SuitePaletteLibrary({
|
|
|
7390
7389
|
cancelled = true;
|
|
7391
7390
|
};
|
|
7392
7391
|
}, []);
|
|
7393
|
-
(0,
|
|
7392
|
+
(0, import_react28.useEffect)(() => {
|
|
7394
7393
|
if (!collections.length) return;
|
|
7395
7394
|
if (collectionFilter && !libraryOptions.some((c) => c.slug === collectionFilter)) {
|
|
7396
7395
|
setCollectionFilter("");
|
|
7397
7396
|
}
|
|
7398
7397
|
}, [libraryOptions, collectionFilter, collections.length]);
|
|
7399
|
-
(0,
|
|
7398
|
+
(0, import_react28.useEffect)(() => {
|
|
7400
7399
|
if (query.trim()) return;
|
|
7401
7400
|
if (collectionFilter) {
|
|
7402
7401
|
void loadCollection(collectionFilter, 1);
|
|
@@ -7408,7 +7407,7 @@ function SuitePaletteLibrary({
|
|
|
7408
7407
|
setIcons(discoverIcons);
|
|
7409
7408
|
setTotal(discoverIcons.length);
|
|
7410
7409
|
}, [collectionFilter, query, loadCollection, discoverIcons]);
|
|
7411
|
-
(0,
|
|
7410
|
+
(0, import_react28.useEffect)(() => {
|
|
7412
7411
|
const term = query.trim();
|
|
7413
7412
|
if (!term) return;
|
|
7414
7413
|
const id = ++requestId.current;
|
|
@@ -7445,12 +7444,12 @@ function SuitePaletteLibrary({
|
|
|
7445
7444
|
}, [query, collectionFilter, typeFilter]);
|
|
7446
7445
|
const searching = Boolean(query.trim());
|
|
7447
7446
|
const activeLibrary = (_a2 = collections.find((c) => c.slug === collectionFilter)) != null ? _a2 : null;
|
|
7448
|
-
const filteredLibraries = (0,
|
|
7447
|
+
const filteredLibraries = (0, import_react28.useMemo)(() => {
|
|
7449
7448
|
const term = libraryQuery.trim().toLowerCase();
|
|
7450
7449
|
if (!term) return libraryOptions;
|
|
7451
7450
|
return libraryOptions.filter((c) => c.name.toLowerCase().includes(term));
|
|
7452
7451
|
}, [libraryOptions, libraryQuery]);
|
|
7453
|
-
(0,
|
|
7452
|
+
(0, import_react28.useEffect)(() => {
|
|
7454
7453
|
if (!libraryOpen) return;
|
|
7455
7454
|
const onPointerDown = (event) => {
|
|
7456
7455
|
var _a3;
|
|
@@ -7464,7 +7463,7 @@ function SuitePaletteLibrary({
|
|
|
7464
7463
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex flex-col gap-2 sm:flex-row", children: [
|
|
7465
7464
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative flex-1", children: [
|
|
7466
7465
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7467
|
-
|
|
7466
|
+
import_iconoir_react15.Search,
|
|
7468
7467
|
{
|
|
7469
7468
|
className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
|
|
7470
7469
|
"aria-hidden": true
|
|
@@ -7491,10 +7490,10 @@ function SuitePaletteLibrary({
|
|
|
7491
7490
|
onClick: () => setLibraryOpen((open) => !open),
|
|
7492
7491
|
className: "flex items-center gap-2 rounded-lg border border-ph-border bg-ph-surface px-2.5 py-2 text-sm text-ph-ink hover:border-ph-brand focus:outline-none focus-visible:ring-2 focus-visible:ring-ph-brand",
|
|
7493
7492
|
children: [
|
|
7494
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7493
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_iconoir_react15.FilterList, { className: "h-4 w-4 shrink-0 text-ph-mutedtext", "aria-hidden": true }),
|
|
7495
7494
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "max-w-[10rem] truncate", children: (_b = activeLibrary == null ? void 0 : activeLibrary.name) != null ? _b : "All libraries" }),
|
|
7496
7495
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7497
|
-
|
|
7496
|
+
import_iconoir_react15.NavArrowDown,
|
|
7498
7497
|
{
|
|
7499
7498
|
className: cn2(
|
|
7500
7499
|
"h-3.5 w-3.5 shrink-0 text-ph-mutedtext transition-transform",
|
|
@@ -7509,7 +7508,7 @@ function SuitePaletteLibrary({
|
|
|
7509
7508
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7510
7509
|
FilterSelect,
|
|
7511
7510
|
{
|
|
7512
|
-
icon:
|
|
7511
|
+
icon: import_iconoir_react15.Filter,
|
|
7513
7512
|
label: "Filter by icon type",
|
|
7514
7513
|
value: typeFilter,
|
|
7515
7514
|
onChange: setTypeFilter,
|
|
@@ -7520,7 +7519,7 @@ function SuitePaletteLibrary({
|
|
|
7520
7519
|
libraryOpen ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "rounded-lg border border-ph-border bg-ph-surface p-2", children: [
|
|
7521
7520
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative mb-2", children: [
|
|
7522
7521
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
7523
|
-
|
|
7522
|
+
import_iconoir_react15.Search,
|
|
7524
7523
|
{
|
|
7525
7524
|
className: "pointer-events-none absolute left-2.5 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
|
|
7526
7525
|
"aria-hidden": true
|
|
@@ -7693,7 +7692,7 @@ function DirectoryIconPicker({
|
|
|
7693
7692
|
className: "mt-2 inline-flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-ph-mutedtext hover:bg-ph-surface hover:text-ph-ink",
|
|
7694
7693
|
onClick: onClear,
|
|
7695
7694
|
children: [
|
|
7696
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7695
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.Trash, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
7697
7696
|
" Remove image"
|
|
7698
7697
|
]
|
|
7699
7698
|
}
|
|
@@ -7732,32 +7731,32 @@ function SuiteClientsProjectsDirectory({
|
|
|
7732
7731
|
dataTest = "suite-clients-projects-directory"
|
|
7733
7732
|
}) {
|
|
7734
7733
|
var _a2;
|
|
7735
|
-
const [query, setQuery] = (0,
|
|
7736
|
-
const [selectedClientId, setSelectedClientId] = (0,
|
|
7737
|
-
const [mobileDetail, setMobileDetail] = (0,
|
|
7738
|
-
const [editing, setEditing] = (0,
|
|
7739
|
-
const [draft, setDraft] = (0,
|
|
7734
|
+
const [query, setQuery] = (0, import_react29.useState)("");
|
|
7735
|
+
const [selectedClientId, setSelectedClientId] = (0, import_react29.useState)(null);
|
|
7736
|
+
const [mobileDetail, setMobileDetail] = (0, import_react29.useState)(false);
|
|
7737
|
+
const [editing, setEditing] = (0, import_react29.useState)(null);
|
|
7738
|
+
const [draft, setDraft] = (0, import_react29.useState)({
|
|
7740
7739
|
name: "",
|
|
7741
7740
|
icon: DEFAULT_ICON,
|
|
7742
7741
|
color: DEFAULT_COLOR
|
|
7743
7742
|
});
|
|
7744
|
-
const [draftClientId, setDraftClientId] = (0,
|
|
7745
|
-
const [preview, setPreview] = (0,
|
|
7746
|
-
const [libraryOpen, setLibraryOpen] = (0,
|
|
7747
|
-
const [draftArchived, setDraftArchived] = (0,
|
|
7748
|
-
const [confirming, setConfirming] = (0,
|
|
7749
|
-
const [saving, setSaving] = (0,
|
|
7750
|
-
const [mutationError, setMutationError] = (0,
|
|
7751
|
-
const clientButtonRefs = (0,
|
|
7752
|
-
const backToClientsRef = (0,
|
|
7753
|
-
const mobileFocusTarget = (0,
|
|
7754
|
-
(0,
|
|
7743
|
+
const [draftClientId, setDraftClientId] = (0, import_react29.useState)(null);
|
|
7744
|
+
const [preview, setPreview] = (0, import_react29.useState)(null);
|
|
7745
|
+
const [libraryOpen, setLibraryOpen] = (0, import_react29.useState)(false);
|
|
7746
|
+
const [draftArchived, setDraftArchived] = (0, import_react29.useState)(false);
|
|
7747
|
+
const [confirming, setConfirming] = (0, import_react29.useState)(null);
|
|
7748
|
+
const [saving, setSaving] = (0, import_react29.useState)(false);
|
|
7749
|
+
const [mutationError, setMutationError] = (0, import_react29.useState)(null);
|
|
7750
|
+
const clientButtonRefs = (0, import_react29.useRef)({});
|
|
7751
|
+
const backToClientsRef = (0, import_react29.useRef)(null);
|
|
7752
|
+
const mobileFocusTarget = (0, import_react29.useRef)(null);
|
|
7753
|
+
(0, import_react29.useEffect)(() => {
|
|
7755
7754
|
var _a3, _b;
|
|
7756
7755
|
if (selectedClientId && clients.some((client) => client.id === selectedClientId))
|
|
7757
7756
|
return;
|
|
7758
7757
|
setSelectedClientId((_b = (_a3 = clients[0]) == null ? void 0 : _a3.id) != null ? _b : null);
|
|
7759
7758
|
}, [clients, selectedClientId]);
|
|
7760
|
-
(0,
|
|
7759
|
+
(0, import_react29.useEffect)(() => {
|
|
7761
7760
|
var _a3, _b;
|
|
7762
7761
|
const target = mobileFocusTarget.current;
|
|
7763
7762
|
if (!target) return;
|
|
@@ -7766,7 +7765,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
7766
7765
|
else if (selectedClientId)
|
|
7767
7766
|
(_b = clientButtonRefs.current[selectedClientId]) == null ? void 0 : _b.focus();
|
|
7768
7767
|
}, [mobileDetail, selectedClientId]);
|
|
7769
|
-
const filteredClients = (0,
|
|
7768
|
+
const filteredClients = (0, import_react29.useMemo)(() => {
|
|
7770
7769
|
const value = query.trim().toLowerCase();
|
|
7771
7770
|
return [...clients].sort((a, b) => a.name.localeCompare(b.name)).filter((client) => !value || client.name.toLowerCase().includes(value));
|
|
7772
7771
|
}, [clients, query]);
|
|
@@ -7948,7 +7947,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
7948
7947
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex h-14 items-center gap-2 border-b border-ph-border px-3", children: [
|
|
7949
7948
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative min-w-0 flex-1", children: [
|
|
7950
7949
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7951
|
-
|
|
7950
|
+
import_iconoir_react16.Search,
|
|
7952
7951
|
{
|
|
7953
7952
|
className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-ph-mutedtext",
|
|
7954
7953
|
"aria-hidden": true
|
|
@@ -7971,7 +7970,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
7971
7970
|
{
|
|
7972
7971
|
size: "sm",
|
|
7973
7972
|
variant: "primary",
|
|
7974
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7973
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
|
|
7975
7974
|
onClick: () => openNew("client"),
|
|
7976
7975
|
children: "New client"
|
|
7977
7976
|
}
|
|
@@ -8043,7 +8042,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8043
8042
|
setMobileDetail(false);
|
|
8044
8043
|
},
|
|
8045
8044
|
"aria-label": "Back to clients",
|
|
8046
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.ArrowLeft, { className: "h-4 w-4" })
|
|
8047
8046
|
}
|
|
8048
8047
|
),
|
|
8049
8048
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(DirectoryIcon, { item: selectedClient }),
|
|
@@ -8061,7 +8060,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8061
8060
|
"aria-label": `Actions for ${selectedClient.name}`,
|
|
8062
8061
|
align: "end",
|
|
8063
8062
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
|
|
8064
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8063
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.MoreHoriz, { className: "h-4 w-4", "aria-hidden": true }),
|
|
8065
8064
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "sr-only", children: "Client actions" })
|
|
8066
8065
|
] }),
|
|
8067
8066
|
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "p-1", children: [
|
|
@@ -8088,7 +8087,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8088
8087
|
Button,
|
|
8089
8088
|
{
|
|
8090
8089
|
variant: "primary",
|
|
8091
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8090
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.Plus, { className: "h-4 w-4" }),
|
|
8092
8091
|
onClick: () => openNew("project"),
|
|
8093
8092
|
children: "Add project"
|
|
8094
8093
|
}
|
|
@@ -8130,7 +8129,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8130
8129
|
align: "end",
|
|
8131
8130
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-ph-mutedtext hover:bg-ph-muted hover:text-ph-ink", children: [
|
|
8132
8131
|
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8133
|
-
|
|
8132
|
+
import_iconoir_react16.MoreHoriz,
|
|
8134
8133
|
{
|
|
8135
8134
|
className: "h-4 w-4",
|
|
8136
8135
|
"aria-hidden": true
|
|
@@ -8227,7 +8226,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8227
8226
|
"flex h-8 w-8 items-center justify-center rounded-full border border-ph-border bg-ph-surface text-ph-mutedtext ring-offset-2",
|
|
8228
8227
|
!draft.color && "ring-2 ring-ph-brand"
|
|
8229
8228
|
),
|
|
8230
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.Prohibition, { className: "h-4 w-4", "aria-hidden": true })
|
|
8231
8230
|
}
|
|
8232
8231
|
),
|
|
8233
8232
|
[
|
|
@@ -8281,7 +8280,7 @@ function SuiteClientsProjectsDirectory({
|
|
|
8281
8280
|
"#ef4444",
|
|
8282
8281
|
"#a855f7",
|
|
8283
8282
|
"#64748b"
|
|
8284
|
-
].includes(draft.color) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8283
|
+
].includes(draft.color) ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_iconoir_react16.Plus, { className: "h-3 w-3 text-ph-ink", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8285
8284
|
"span",
|
|
8286
8285
|
{
|
|
8287
8286
|
className: "h-2.5 w-2.5 rounded-full",
|