@xenide-io/the-old-ui-theme 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{Chip-DKT-82Lf.d.mts → Chip-Dw2g2t8D.d.mts} +14 -2
  2. package/dist/{Chip-DKT-82Lf.d.ts → Chip-Dw2g2t8D.d.ts} +14 -2
  3. package/dist/{chunk-LHE4ROON.mjs → chunk-RIPGN6FG.mjs} +412 -61
  4. package/dist/index.d.mts +3 -2
  5. package/dist/index.d.ts +3 -2
  6. package/dist/index.js +355 -23
  7. package/dist/index.mjs +11 -3
  8. package/dist/suite-analytics--Mf1RZbw.d.mts +29 -0
  9. package/dist/suite-analytics--Mf1RZbw.d.ts +29 -0
  10. package/dist/suite.d.mts +14 -4
  11. package/dist/suite.d.ts +14 -4
  12. package/dist/suite.js +920 -513
  13. package/dist/suite.mjs +898 -523
  14. package/dist/ui.d.mts +2 -2
  15. package/dist/ui.d.ts +2 -2
  16. package/dist/ui.js +401 -66
  17. package/dist/ui.mjs +3 -1
  18. package/package.json +1 -1
  19. package/src/app/globals.css +57 -1
  20. package/src/components/ui/BrandSpinner.tsx +256 -0
  21. package/src/components/ui/CodeBlock.tsx +11 -1
  22. package/src/components/ui/Marketing.tsx +17 -1
  23. package/src/components/ui/SettingsLayout.tsx +4 -0
  24. package/src/components/ui/Table.tsx +32 -9
  25. package/src/components/ui/brand-spinner.test.tsx +62 -0
  26. package/src/components/ui/index.ts +7 -0
  27. package/src/components/ui/table.test.tsx +31 -4
  28. package/src/styles/suite-skin.css +78 -46
  29. package/src/suite/components/ai-draft-editor.tsx +184 -0
  30. package/src/suite/components/ai-panel-workflows.test.tsx +179 -0
  31. package/src/suite/components/ai-panel.tsx +184 -14
  32. package/src/suite/components/app-switcher.tsx +13 -0
  33. package/src/suite/components/command-palette-host.tsx +20 -2
  34. package/src/suite/components/suite-notification-bell.tsx +23 -2
  35. package/src/suite/components/suite-notification-settings.tsx +11 -0
  36. package/src/suite/components/suite-settings-layout.tsx +1 -1
  37. package/src/suite/components/suite-settings-mobile-nav.tsx +5 -1
  38. package/src/suite/components/suite-sidebar.tsx +2 -2
  39. package/src/suite/components/theme-provider.tsx +2 -0
  40. package/src/suite/components/today-ui.tsx +33 -28
  41. package/src/suite/index.ts +8 -0
  42. package/src/suite/lib/suite-notifications.tsx +5 -0
@@ -134,18 +134,32 @@ function MarketingHeader(_a) {
134
134
  "actions",
135
135
  "className"
136
136
  ]);
137
- return /* @__PURE__ */ jsx3("header", __spreadProps(__spreadValues({}, props), { className: cn("marketing-header", className), children: /* @__PURE__ */ jsxs3("div", { className: "marketing-header__inner", children: [
138
- /* @__PURE__ */ jsx3("div", { className: "marketing-header__brand", children: brand }),
139
- /* @__PURE__ */ jsx3(
140
- "nav",
141
- {
142
- className: "marketing-header__navigation",
143
- "aria-label": "Product navigation",
144
- children: navigation
145
- }
146
- ),
147
- /* @__PURE__ */ jsx3("div", { className: "marketing-header__actions", children: actions })
148
- ] }) }));
137
+ const [scrolled, setScrolled] = useState(false);
138
+ useEffect(() => {
139
+ const onScroll = () => setScrolled(window.scrollY > 4);
140
+ onScroll();
141
+ window.addEventListener("scroll", onScroll, { passive: true });
142
+ return () => window.removeEventListener("scroll", onScroll);
143
+ }, []);
144
+ return /* @__PURE__ */ jsx3(
145
+ "header",
146
+ __spreadProps(__spreadValues({}, props), {
147
+ "data-scrolled": scrolled ? "true" : "false",
148
+ className: cn("marketing-header", className),
149
+ children: /* @__PURE__ */ jsxs3("div", { className: "marketing-header__inner", children: [
150
+ /* @__PURE__ */ jsx3("div", { className: "marketing-header__brand", children: brand }),
151
+ /* @__PURE__ */ jsx3(
152
+ "nav",
153
+ {
154
+ className: "marketing-header__navigation",
155
+ "aria-label": "Product navigation",
156
+ children: navigation
157
+ }
158
+ ),
159
+ /* @__PURE__ */ jsx3("div", { className: "marketing-header__actions", children: actions })
160
+ ] })
161
+ })
162
+ );
149
163
  }
150
164
  function MarketingLink(_a) {
151
165
  var _b = _a, {
@@ -1514,6 +1528,34 @@ function AuthDivider(_a) {
1514
1528
  return /* @__PURE__ */ jsx13("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ jsx13("span", { children }) }));
1515
1529
  }
1516
1530
 
1531
+ // src/lib/suite-analytics.ts
1532
+ var SUITE_ANALYTICS_EVENT = "shellstack:analytics";
1533
+ function trackSuiteEvent(event, properties) {
1534
+ if (typeof window === "undefined" || !event) return;
1535
+ try {
1536
+ window.dispatchEvent(
1537
+ new CustomEvent(SUITE_ANALYTICS_EVENT, {
1538
+ detail: { event, properties }
1539
+ })
1540
+ );
1541
+ } catch (e) {
1542
+ }
1543
+ }
1544
+ function subscribeSuiteAnalytics(handler) {
1545
+ if (typeof window === "undefined") return () => {
1546
+ };
1547
+ const listener = (raw) => {
1548
+ const detail = raw.detail;
1549
+ if (!(detail == null ? void 0 : detail.event)) return;
1550
+ try {
1551
+ handler(detail.event, detail.properties);
1552
+ } catch (e) {
1553
+ }
1554
+ };
1555
+ window.addEventListener(SUITE_ANALYTICS_EVENT, listener);
1556
+ return () => window.removeEventListener(SUITE_ANALYTICS_EVENT, listener);
1557
+ }
1558
+
1517
1559
  // src/components/ui/SettingsLayout.tsx
1518
1560
  import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1519
1561
  function SettingsNav(_a) {
@@ -1531,6 +1573,7 @@ function SettingsNav(_a) {
1531
1573
  item.active && "ph-settings-nav__item--active"
1532
1574
  ),
1533
1575
  "aria-current": item.active ? "page" : void 0,
1576
+ onClick: () => trackSuiteEvent("Tab Viewed", { tab: item.id }),
1534
1577
  children: [
1535
1578
  item.icon ? /* @__PURE__ */ jsx14("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
1536
1579
  /* @__PURE__ */ jsx14("span", { children: item.label }),
@@ -2496,24 +2539,41 @@ function Table({
2496
2539
  getRowStyle,
2497
2540
  getRowKey,
2498
2541
  className,
2542
+ tableClassName,
2543
+ variant = "default",
2499
2544
  caption,
2500
2545
  emptyState = "No data available."
2501
2546
  }) {
2502
2547
  return /* @__PURE__ */ jsx21(
2503
2548
  "div",
2504
2549
  {
2505
- className: cn("ph-table-wrap", compact && "ph-table-compact", className),
2550
+ className: cn(
2551
+ variant === "report" ? "ph-table-report-wrap" : "ph-table-wrap",
2552
+ compact && "ph-table-compact",
2553
+ className
2554
+ ),
2506
2555
  role: "region",
2507
2556
  "aria-label": caption != null ? caption : "Data table",
2508
2557
  tabIndex: 0,
2509
- children: /* @__PURE__ */ jsxs18("table", { className: cn("ph-table", zebra && "ph-table-zebra", ribbon && "ph-table--ribbon"), children: [
2510
- caption && /* @__PURE__ */ jsx21("caption", { className: "sr-only", children: caption }),
2511
- /* @__PURE__ */ jsx21("thead", { children: /* @__PURE__ */ jsx21("tr", { children: columns.map((col) => /* @__PURE__ */ jsx21("th", { className: col.className, children: col.header }, col.key)) }) }),
2512
- /* @__PURE__ */ jsx21("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx21("tr", { children: /* @__PURE__ */ jsx21("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
2513
- var _a;
2514
- return /* @__PURE__ */ jsx21("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ jsx21("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
2515
- }) })
2516
- ] })
2558
+ children: /* @__PURE__ */ jsxs18(
2559
+ "table",
2560
+ {
2561
+ className: cn(
2562
+ variant === "report" ? "ph-table-report" : "ph-table",
2563
+ zebra && "ph-table-zebra",
2564
+ ribbon && "ph-table--ribbon",
2565
+ tableClassName
2566
+ ),
2567
+ children: [
2568
+ caption && /* @__PURE__ */ jsx21("caption", { className: "sr-only", children: caption }),
2569
+ /* @__PURE__ */ jsx21("thead", { children: /* @__PURE__ */ jsx21("tr", { children: columns.map((col) => /* @__PURE__ */ jsx21("th", { scope: "col", className: col.className, children: col.header }, col.key)) }) }),
2570
+ /* @__PURE__ */ jsx21("tbody", { children: data.length === 0 ? emptyState === null ? null : /* @__PURE__ */ jsx21("tr", { children: /* @__PURE__ */ jsx21("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
2571
+ var _a;
2572
+ return /* @__PURE__ */ jsx21("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ jsx21("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
2573
+ }) })
2574
+ ]
2575
+ }
2576
+ )
2517
2577
  }
2518
2578
  );
2519
2579
  }
@@ -3625,7 +3685,16 @@ import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
3625
3685
  function CodeBlock({ code, language = "tsx", filename, className }) {
3626
3686
  const [copied, setCopied] = useState8(false);
3627
3687
  const handleCopy = async () => {
3628
- await navigator.clipboard.writeText(code);
3688
+ try {
3689
+ await navigator.clipboard.writeText(code);
3690
+ } catch (e) {
3691
+ return;
3692
+ }
3693
+ trackSuiteEvent("Link Copied", {
3694
+ kind: "code",
3695
+ copy_kind: "code_block",
3696
+ label: filename != null ? filename : language
3697
+ });
3629
3698
  setCopied(true);
3630
3699
  setTimeout(() => setCopied(false), 2e3);
3631
3700
  };
@@ -4107,8 +4176,286 @@ function Spinner(_a) {
4107
4176
  }
4108
4177
  Spinner.displayName = "Spinner";
4109
4178
 
4179
+ // src/components/ui/BrandSpinner.tsx
4180
+ import { useId as useId12, useSyncExternalStore } from "react";
4181
+ import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
4182
+ var sizes = { sm: 20, md: 40, lg: 56 };
4183
+ var reducedMotionQuery = "(prefers-reduced-motion: reduce)";
4184
+ function subscribeMotion(onChange) {
4185
+ var _a;
4186
+ const media = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery);
4187
+ media == null ? void 0 : media.addEventListener("change", onChange);
4188
+ return () => media == null ? void 0 : media.removeEventListener("change", onChange);
4189
+ }
4190
+ function readReducedMotion() {
4191
+ var _a, _b;
4192
+ return (_b = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery).matches) != null ? _b : false;
4193
+ }
4194
+ function BrandSpinner(_a) {
4195
+ var _b = _a, {
4196
+ variant = "ring",
4197
+ size = "md",
4198
+ label = "Loading",
4199
+ className
4200
+ } = _b, props = __objRest(_b, [
4201
+ "variant",
4202
+ "size",
4203
+ "label",
4204
+ "className"
4205
+ ]);
4206
+ const gradientId = `ph-spinner-${useId12().replace(/:/g, "")}`;
4207
+ const reducedMotion = useSyncExternalStore(
4208
+ subscribeMotion,
4209
+ readReducedMotion,
4210
+ () => true
4211
+ );
4212
+ const dimension = sizes[size];
4213
+ return /* @__PURE__ */ jsx42(
4214
+ "div",
4215
+ __spreadProps(__spreadValues({
4216
+ role: "status",
4217
+ "aria-label": label,
4218
+ "data-test": "app-spinner",
4219
+ className: cn(
4220
+ "inline-flex shrink-0",
4221
+ variant !== "orbit" && "text-ph-brand",
4222
+ className
4223
+ )
4224
+ }, props), {
4225
+ children: /* @__PURE__ */ jsx42(
4226
+ "svg",
4227
+ {
4228
+ width: dimension,
4229
+ height: dimension,
4230
+ viewBox: variant === "ring" ? "0 0 24 24" : "0 0 40 40",
4231
+ "aria-hidden": true,
4232
+ className: variant === "timer" || variant === "ring" ? "animate-spin motion-reduce:animate-none" : void 0,
4233
+ children: variant === "ring" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
4234
+ /* @__PURE__ */ jsx42(
4235
+ "circle",
4236
+ {
4237
+ cx: "12",
4238
+ cy: "12",
4239
+ r: "10",
4240
+ fill: "none",
4241
+ stroke: "currentColor",
4242
+ strokeWidth: "3",
4243
+ opacity: "0.2"
4244
+ }
4245
+ ),
4246
+ /* @__PURE__ */ jsx42(
4247
+ "path",
4248
+ {
4249
+ d: "M12 2a10 10 0 0 1 10 10",
4250
+ fill: "none",
4251
+ stroke: "currentColor",
4252
+ strokeWidth: "3",
4253
+ strokeLinecap: "round"
4254
+ }
4255
+ )
4256
+ ] }) : variant === "timer" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
4257
+ /* @__PURE__ */ jsx42(
4258
+ "circle",
4259
+ {
4260
+ cx: "20",
4261
+ cy: "20",
4262
+ r: "15",
4263
+ fill: "none",
4264
+ stroke: "currentColor",
4265
+ strokeOpacity: "0.18",
4266
+ strokeWidth: "2.5"
4267
+ }
4268
+ ),
4269
+ /* @__PURE__ */ jsx42(
4270
+ "circle",
4271
+ {
4272
+ cx: "20",
4273
+ cy: "20",
4274
+ r: "15",
4275
+ fill: "none",
4276
+ stroke: "currentColor",
4277
+ strokeWidth: "2.5",
4278
+ strokeLinecap: "round",
4279
+ strokeDasharray: "24 70"
4280
+ }
4281
+ ),
4282
+ /* @__PURE__ */ jsx42("circle", { cx: "20", cy: "5", r: "2.25", fill: "currentColor" })
4283
+ ] }) : variant === "columns" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
4284
+ /* @__PURE__ */ jsx42(
4285
+ "rect",
4286
+ {
4287
+ x: "9",
4288
+ y: "16",
4289
+ width: "6",
4290
+ height: "14",
4291
+ rx: "2",
4292
+ fill: "currentColor",
4293
+ fillOpacity: "0.35",
4294
+ className: "ph-brand-spinner__column"
4295
+ }
4296
+ ),
4297
+ /* @__PURE__ */ jsx42(
4298
+ "rect",
4299
+ {
4300
+ x: "17",
4301
+ y: "11",
4302
+ width: "6",
4303
+ height: "19",
4304
+ rx: "2",
4305
+ fill: "currentColor",
4306
+ className: "ph-brand-spinner__column",
4307
+ style: { animationDelay: "0.14s" }
4308
+ }
4309
+ ),
4310
+ /* @__PURE__ */ jsx42(
4311
+ "rect",
4312
+ {
4313
+ x: "25",
4314
+ y: "14",
4315
+ width: "6",
4316
+ height: "16",
4317
+ rx: "2",
4318
+ fill: "currentColor",
4319
+ fillOpacity: "0.55",
4320
+ className: "ph-brand-spinner__column",
4321
+ style: { animationDelay: "0.28s" }
4322
+ }
4323
+ )
4324
+ ] }) : variant === "orbit" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
4325
+ /* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsxs37(
4326
+ "linearGradient",
4327
+ {
4328
+ id: gradientId,
4329
+ x1: "0%",
4330
+ y1: "0%",
4331
+ x2: "100%",
4332
+ y2: "100%",
4333
+ children: [
4334
+ /* @__PURE__ */ jsx42("stop", { offset: "0%", stopColor: "#1877f2" }),
4335
+ /* @__PURE__ */ jsx42("stop", { offset: "100%", stopColor: "#ebbcba" })
4336
+ ]
4337
+ }
4338
+ ) }),
4339
+ /* @__PURE__ */ jsx42(
4340
+ "circle",
4341
+ {
4342
+ cx: "20",
4343
+ cy: "20",
4344
+ r: "15",
4345
+ fill: "none",
4346
+ stroke: `url(#${gradientId})`,
4347
+ strokeOpacity: "0.25",
4348
+ strokeWidth: "2"
4349
+ }
4350
+ ),
4351
+ /* @__PURE__ */ jsx42("g", { className: "origin-[20px_20px] animate-spin motion-reduce:animate-none", children: /* @__PURE__ */ jsx42(
4352
+ "circle",
4353
+ {
4354
+ cx: "20",
4355
+ cy: "20",
4356
+ r: "15",
4357
+ fill: "none",
4358
+ stroke: `url(#${gradientId})`,
4359
+ strokeWidth: "2.5",
4360
+ strokeLinecap: "round",
4361
+ strokeDasharray: "22 72"
4362
+ }
4363
+ ) }),
4364
+ /* @__PURE__ */ jsx42("g", { className: "origin-[20px_20px] animate-[spin_1.6s_linear_infinite_reverse] motion-reduce:animate-none", children: /* @__PURE__ */ jsx42(
4365
+ "circle",
4366
+ {
4367
+ cx: "20",
4368
+ cy: "20",
4369
+ r: "9",
4370
+ fill: "none",
4371
+ stroke: "#ebbcba",
4372
+ strokeWidth: "2",
4373
+ strokeLinecap: "round",
4374
+ strokeDasharray: "12 45",
4375
+ strokeOpacity: "0.9"
4376
+ }
4377
+ ) }),
4378
+ /* @__PURE__ */ jsx42(
4379
+ "circle",
4380
+ {
4381
+ cx: "20",
4382
+ cy: "20",
4383
+ r: "2.5",
4384
+ fill: "#1877f2",
4385
+ className: "animate-pulse motion-reduce:animate-none"
4386
+ }
4387
+ )
4388
+ ] }) : /* @__PURE__ */ jsxs37(Fragment7, { children: [
4389
+ /* @__PURE__ */ jsxs37("g", { children: [
4390
+ !reducedMotion ? /* @__PURE__ */ jsx42(
4391
+ "animateTransform",
4392
+ {
4393
+ attributeName: "transform",
4394
+ type: "rotate",
4395
+ from: "0 20 20",
4396
+ to: "360 20 20",
4397
+ dur: "2.4s",
4398
+ repeatCount: "indefinite"
4399
+ }
4400
+ ) : null,
4401
+ /* @__PURE__ */ jsx42(
4402
+ "circle",
4403
+ {
4404
+ cx: "20",
4405
+ cy: "20",
4406
+ r: "16",
4407
+ fill: "none",
4408
+ stroke: "currentColor",
4409
+ strokeOpacity: "0.2",
4410
+ strokeWidth: "1.5",
4411
+ strokeDasharray: "3 5"
4412
+ }
4413
+ )
4414
+ ] }),
4415
+ /* @__PURE__ */ jsxs37("g", { children: [
4416
+ !reducedMotion ? /* @__PURE__ */ jsx42(
4417
+ "animateTransform",
4418
+ {
4419
+ attributeName: "transform",
4420
+ type: "rotate",
4421
+ from: "360 20 20",
4422
+ to: "0 20 20",
4423
+ dur: "1.1s",
4424
+ repeatCount: "indefinite"
4425
+ }
4426
+ ) : null,
4427
+ /* @__PURE__ */ jsx42(
4428
+ "circle",
4429
+ {
4430
+ cx: "20",
4431
+ cy: "20",
4432
+ r: "11",
4433
+ fill: "none",
4434
+ stroke: "currentColor",
4435
+ strokeWidth: "2",
4436
+ strokeLinecap: "round",
4437
+ strokeDasharray: "18 52"
4438
+ }
4439
+ )
4440
+ ] }),
4441
+ /* @__PURE__ */ jsx42(
4442
+ "path",
4443
+ {
4444
+ d: "M16 14h8v12a1 1 0 0 1-1.4.9L20 25.5l-2.6 1.4A1 1 0 0 1 16 26V14z",
4445
+ fill: "currentColor",
4446
+ fillOpacity: "0.85",
4447
+ className: "animate-pulse motion-reduce:animate-none"
4448
+ }
4449
+ )
4450
+ ] })
4451
+ }
4452
+ )
4453
+ })
4454
+ );
4455
+ }
4456
+
4110
4457
  // src/components/ui/Dot.tsx
4111
- import { jsx as jsx42 } from "react/jsx-runtime";
4458
+ import { jsx as jsx43 } from "react/jsx-runtime";
4112
4459
  var colorMap = {
4113
4460
  green: "bg-ph-success",
4114
4461
  yellow: "bg-ph-warning",
@@ -4118,7 +4465,7 @@ var colorMap = {
4118
4465
  };
4119
4466
  function Dot(_a) {
4120
4467
  var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
4121
- return /* @__PURE__ */ jsx42(
4468
+ return /* @__PURE__ */ jsx43(
4122
4469
  "span",
4123
4470
  __spreadValues({
4124
4471
  className: cn(
@@ -4135,7 +4482,7 @@ Dot.displayName = "Dot";
4135
4482
 
4136
4483
  // src/components/ui/Chip.tsx
4137
4484
  import { forwardRef as forwardRef11 } from "react";
4138
- import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4485
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4139
4486
  var Chip = forwardRef11(function Chip2(_a, ref) {
4140
4487
  var _b = _a, {
4141
4488
  selected = false,
@@ -4155,18 +4502,18 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
4155
4502
  );
4156
4503
  if (onRemove) {
4157
4504
  const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
4158
- return /* @__PURE__ */ jsxs37("span", { className: chipClassName, children: [
4159
- /* @__PURE__ */ jsx43(
4505
+ return /* @__PURE__ */ jsxs38("span", { className: chipClassName, children: [
4506
+ /* @__PURE__ */ jsx44(
4160
4507
  "button",
4161
4508
  __spreadProps(__spreadValues({
4162
4509
  ref,
4163
4510
  type: "button",
4164
4511
  className: "min-w-0 bg-transparent p-0 text-inherit"
4165
4512
  }, props), {
4166
- children: /* @__PURE__ */ jsx43("span", { className: "ph-chip__text", children })
4513
+ children: /* @__PURE__ */ jsx44("span", { className: "ph-chip__text", children })
4167
4514
  })
4168
4515
  ),
4169
- /* @__PURE__ */ jsx43(
4516
+ /* @__PURE__ */ jsx44(
4170
4517
  "button",
4171
4518
  {
4172
4519
  type: "button",
@@ -4174,19 +4521,19 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
4174
4521
  disabled: props.disabled,
4175
4522
  className: "ph-chip__remove",
4176
4523
  "aria-label": removeLabel,
4177
- children: /* @__PURE__ */ jsx43("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("path", { d: "M2 2l6 6M8 2l-6 6" }) })
4524
+ children: /* @__PURE__ */ jsx44("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "M2 2l6 6M8 2l-6 6" }) })
4178
4525
  }
4179
4526
  )
4180
4527
  ] });
4181
4528
  }
4182
- return /* @__PURE__ */ jsx43(
4529
+ return /* @__PURE__ */ jsx44(
4183
4530
  "button",
4184
4531
  __spreadProps(__spreadValues({
4185
4532
  ref,
4186
4533
  type: "button",
4187
4534
  className: chipClassName
4188
4535
  }, props), {
4189
- children: /* @__PURE__ */ jsx43("span", { className: "ph-chip__text", children })
4536
+ children: /* @__PURE__ */ jsx44("span", { className: "ph-chip__text", children })
4190
4537
  })
4191
4538
  );
4192
4539
  });
@@ -4232,12 +4579,12 @@ function useChartTokens() {
4232
4579
  }
4233
4580
 
4234
4581
  // src/components/ui/Charts.tsx
4235
- import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4582
+ import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
4236
4583
  function percent(value, total) {
4237
4584
  return total > 0 ? Math.round(value / total * 100) : 0;
4238
4585
  }
4239
4586
  function EmptyChart() {
4240
- return /* @__PURE__ */ jsx44("p", { className: "text-sm text-ph-subtle", children: "No data for this period." });
4587
+ return /* @__PURE__ */ jsx45("p", { className: "text-sm text-ph-subtle", children: "No data for this period." });
4241
4588
  }
4242
4589
  function sliceColour(slice, index, series) {
4243
4590
  var _a;
@@ -4247,7 +4594,7 @@ function DonutChart({ slices, label, formatValue, className }) {
4247
4594
  const { series } = useChartTokens();
4248
4595
  const visible = slices.filter((slice) => slice.value > 0);
4249
4596
  const total = visible.reduce((sum, slice) => sum + slice.value, 0);
4250
- if (total <= 0) return /* @__PURE__ */ jsx44(EmptyChart, {});
4597
+ if (total <= 0) return /* @__PURE__ */ jsx45(EmptyChart, {});
4251
4598
  const stops = visible.map((slice, index) => {
4252
4599
  const colour = sliceColour(slice, index, series);
4253
4600
  const before = visible.slice(0, index).reduce((sum, item) => sum + item.value, 0);
@@ -4255,15 +4602,15 @@ function DonutChart({ slices, label, formatValue, className }) {
4255
4602
  const end = (before + slice.value) / total * 360;
4256
4603
  return `${colour} ${start}deg ${end}deg`;
4257
4604
  }).join(", ");
4258
- return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col items-center gap-4 sm:flex-row sm:items-center", className), children: [
4259
- /* @__PURE__ */ jsx44(
4605
+ return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col items-center gap-4 sm:flex-row sm:items-center", className), children: [
4606
+ /* @__PURE__ */ jsx45(
4260
4607
  "div",
4261
4608
  {
4262
4609
  role: "img",
4263
4610
  "aria-label": label,
4264
4611
  className: "relative h-36 w-36 shrink-0 rounded-full",
4265
4612
  style: { background: `conic-gradient(${stops})` },
4266
- children: /* @__PURE__ */ jsx44(
4613
+ children: /* @__PURE__ */ jsx45(
4267
4614
  "span",
4268
4615
  {
4269
4616
  className: "absolute inset-[22%] rounded-full bg-ph-surface ring-1 ring-ph-border",
@@ -4272,14 +4619,14 @@ function DonutChart({ slices, label, formatValue, className }) {
4272
4619
  )
4273
4620
  }
4274
4621
  ),
4275
- /* @__PURE__ */ jsx44("ul", { className: "min-w-0 w-full flex-1 space-y-2", children: visible.map((slice, index) => {
4622
+ /* @__PURE__ */ jsx45("ul", { className: "min-w-0 w-full flex-1 space-y-2", children: visible.map((slice, index) => {
4276
4623
  const colour = sliceColour(slice, index, series);
4277
- return /* @__PURE__ */ jsxs38("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
4278
- /* @__PURE__ */ jsxs38("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
4279
- /* @__PURE__ */ jsx44("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
4280
- /* @__PURE__ */ jsx44("span", { className: "truncate", children: slice.label })
4624
+ return /* @__PURE__ */ jsxs39("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
4625
+ /* @__PURE__ */ jsxs39("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
4626
+ /* @__PURE__ */ jsx45("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
4627
+ /* @__PURE__ */ jsx45("span", { className: "truncate", children: slice.label })
4281
4628
  ] }),
4282
- /* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
4629
+ /* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
4283
4630
  ] }, slice.label);
4284
4631
  }) })
4285
4632
  ] });
@@ -4288,15 +4635,15 @@ function BarChart({ items, formatValue, className }) {
4288
4635
  const { series } = useChartTokens();
4289
4636
  const visible = items.filter((item) => item.value > 0);
4290
4637
  const max = Math.max(...visible.map((item) => item.value), 1);
4291
- if (!visible.length) return /* @__PURE__ */ jsx44(EmptyChart, {});
4292
- return /* @__PURE__ */ jsx44("ul", { className: cn("space-y-3", className), children: visible.map((item, index) => {
4638
+ if (!visible.length) return /* @__PURE__ */ jsx45(EmptyChart, {});
4639
+ return /* @__PURE__ */ jsx45("ul", { className: cn("space-y-3", className), children: visible.map((item, index) => {
4293
4640
  const colour = sliceColour(item, index, series);
4294
- return /* @__PURE__ */ jsxs38("li", { children: [
4295
- /* @__PURE__ */ jsxs38("div", { className: "mb-1 flex items-center justify-between gap-3 text-sm", children: [
4296
- /* @__PURE__ */ jsx44("span", { className: "truncate text-ph-subtle", children: item.label }),
4297
- /* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(item.value) : item.value.toLocaleString("en-AU") })
4641
+ return /* @__PURE__ */ jsxs39("li", { children: [
4642
+ /* @__PURE__ */ jsxs39("div", { className: "mb-1 flex items-center justify-between gap-3 text-sm", children: [
4643
+ /* @__PURE__ */ jsx45("span", { className: "truncate text-ph-subtle", children: item.label }),
4644
+ /* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(item.value) : item.value.toLocaleString("en-AU") })
4298
4645
  ] }),
4299
- /* @__PURE__ */ jsx44("div", { className: "h-2.5 rounded-full bg-ph-muted ring-1 ring-ph-border", children: /* @__PURE__ */ jsx44(
4646
+ /* @__PURE__ */ jsx45("div", { className: "h-2.5 rounded-full bg-ph-muted ring-1 ring-ph-border", children: /* @__PURE__ */ jsx45(
4300
4647
  "div",
4301
4648
  {
4302
4649
  className: "h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none",
@@ -4318,15 +4665,15 @@ function StackedBarChart({
4318
4665
  const { series } = useChartTokens();
4319
4666
  const visible = slices.filter((slice) => slice.value > 0);
4320
4667
  const total = visible.reduce((sum, slice) => sum + slice.value, 0);
4321
- if (total <= 0) return /* @__PURE__ */ jsx44(EmptyChart, {});
4322
- return /* @__PURE__ */ jsxs38("div", { className: cn("space-y-3", className), children: [
4323
- /* @__PURE__ */ jsx44(
4668
+ if (total <= 0) return /* @__PURE__ */ jsx45(EmptyChart, {});
4669
+ return /* @__PURE__ */ jsxs39("div", { className: cn("space-y-3", className), children: [
4670
+ /* @__PURE__ */ jsx45(
4324
4671
  "div",
4325
4672
  {
4326
4673
  role: "img",
4327
4674
  "aria-label": label,
4328
4675
  className: "flex h-3 overflow-hidden rounded-full bg-ph-muted ring-1 ring-ph-border",
4329
- children: visible.map((slice, index) => /* @__PURE__ */ jsx44(
4676
+ children: visible.map((slice, index) => /* @__PURE__ */ jsx45(
4330
4677
  "span",
4331
4678
  {
4332
4679
  className: "h-full",
@@ -4339,14 +4686,14 @@ function StackedBarChart({
4339
4686
  ))
4340
4687
  }
4341
4688
  ),
4342
- /* @__PURE__ */ jsx44("ul", { className: "space-y-2", children: visible.map((slice, index) => {
4689
+ /* @__PURE__ */ jsx45("ul", { className: "space-y-2", children: visible.map((slice, index) => {
4343
4690
  const colour = sliceColour(slice, index, series);
4344
- return /* @__PURE__ */ jsxs38("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
4345
- /* @__PURE__ */ jsxs38("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
4346
- /* @__PURE__ */ jsx44("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
4347
- /* @__PURE__ */ jsx44("span", { className: "truncate", children: slice.label })
4691
+ return /* @__PURE__ */ jsxs39("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
4692
+ /* @__PURE__ */ jsxs39("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
4693
+ /* @__PURE__ */ jsx45("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
4694
+ /* @__PURE__ */ jsx45("span", { className: "truncate", children: slice.label })
4348
4695
  ] }),
4349
- /* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
4696
+ /* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
4350
4697
  ] }, slice.label);
4351
4698
  }) })
4352
4699
  ] });
@@ -4456,6 +4803,9 @@ export {
4456
4803
  AuthLayout,
4457
4804
  AuthCard,
4458
4805
  AuthDivider,
4806
+ SUITE_ANALYTICS_EVENT,
4807
+ trackSuiteEvent,
4808
+ subscribeSuiteAnalytics,
4459
4809
  SettingsNav,
4460
4810
  SettingsLayout,
4461
4811
  DropdownMenu,
@@ -4523,6 +4873,7 @@ export {
4523
4873
  Progress,
4524
4874
  Link,
4525
4875
  Spinner,
4876
+ BrandSpinner,
4526
4877
  Dot,
4527
4878
  Chip,
4528
4879
  useChartTokens,