@xenide-io/the-old-ui-theme 0.5.3 → 0.5.4

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 (49) hide show
  1. package/dist/{index-Od4pIP4F.d.mts → Chip-C5hRFAhe.d.mts} +10 -606
  2. package/dist/{index-Od4pIP4F.d.ts → Chip-C5hRFAhe.d.ts} +10 -606
  3. package/dist/{chunk-G53YLHVE.mjs → chunk-E5ZBQYEX.mjs} +59 -9
  4. package/dist/{chunk-VFTZXPXM.mjs → chunk-SBBKXV35.mjs} +144 -79
  5. package/dist/index.d.mts +3 -79
  6. package/dist/index.d.ts +3 -79
  7. package/dist/index.js +524 -3595
  8. package/dist/index.mjs +3 -765
  9. package/dist/suite.d.mts +38 -12
  10. package/dist/suite.d.ts +38 -12
  11. package/dist/suite.js +84 -15
  12. package/dist/suite.mjs +53 -13
  13. package/dist/ui.d.mts +608 -2
  14. package/dist/ui.d.ts +608 -2
  15. package/dist/ui.js +202 -87
  16. package/dist/ui.mjs +2 -2
  17. package/package.json +2 -6
  18. package/scripts/install-theme-dev.sh +60 -0
  19. package/scripts/sync-posthog-icons.mjs +75 -0
  20. package/src/components/ui/Chip.tsx +36 -18
  21. package/src/components/ui/CommandPalette.test.tsx +41 -0
  22. package/src/components/ui/CommandPalette.tsx +58 -9
  23. package/src/components/ui/DropdownMenu.tsx +50 -11
  24. package/src/components/ui/SegmentedControl.tsx +2 -1
  25. package/src/components/ui/SettingsLayout.tsx +19 -5
  26. package/src/components/ui/interaction-primitives.test.tsx +52 -0
  27. package/src/styles/suite-skin.css +17 -35
  28. package/src/suite/components/app-switcher.tsx +32 -25
  29. package/src/suite/components/command-palette-host.tsx +20 -8
  30. package/src/suite/components/suite-app-layout.tsx +1 -1
  31. package/src/suite/components/suite-bottom-nav.tsx +23 -18
  32. package/src/suite/components/suite-layout.test.tsx +44 -0
  33. package/src/suite/components/suite-layout.tsx +3 -3
  34. package/src/suite/components/suite-mobile-drawer.tsx +12 -0
  35. package/src/suite/components/suite-mobile-header.tsx +15 -9
  36. package/src/suite/components/suite-notification-bell.tsx +23 -11
  37. package/src/suite/components/suite-settings-mobile-nav.tsx +2 -0
  38. package/src/suite/components/suite-sidebar.tsx +6 -3
  39. package/src/suite/components/suite-user-menu.tsx +6 -0
  40. package/src/suite/lib/injected.ts +12 -11
  41. package/src/components/charts/index.ts +0 -9
  42. package/src/components/charts/quill/BarChart.tsx +0 -85
  43. package/src/components/charts/quill/FunnelChart.tsx +0 -49
  44. package/src/components/charts/quill/InsightShell.tsx +0 -27
  45. package/src/components/charts/quill/MetricCard.tsx +0 -44
  46. package/src/components/charts/quill/PieChart.tsx +0 -81
  47. package/src/components/charts/quill/Sparkline.tsx +0 -57
  48. package/src/components/charts/quill/TimeSeriesLineChart.tsx +0 -62
  49. package/src/components/charts/quill/index.ts +0 -9
package/dist/suite.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  DropdownItem,
3
3
  DropdownMenu,
4
4
  Tooltip
5
- } from "./chunk-G53YLHVE.mjs";
5
+ } from "./chunk-E5ZBQYEX.mjs";
6
6
  import {
7
7
  SuiteThemeProvider,
8
8
  useSuiteTheme
@@ -979,13 +979,17 @@ function AppSwitcher({
979
979
  title,
980
980
  collapsed = false,
981
981
  dropdownMenu: DropdownMenu2,
982
- dropdownItem: DropdownItem2
982
+ dropdownItem: DropdownItem2,
983
+ triggerId,
984
+ triggerDataTest
983
985
  }) {
984
986
  const [open, setOpen] = useState(false);
985
987
  return /* @__PURE__ */ jsx6(
986
988
  DropdownMenu2,
987
989
  {
988
990
  "aria-label": "Switch application",
991
+ triggerId: triggerId != null ? triggerId : "app-switcher-trigger",
992
+ triggerDataTest: triggerDataTest != null ? triggerDataTest : "app-switcher-trigger",
989
993
  className: collapsed ? "w-11 shrink-0" : "min-w-0 flex-1",
990
994
  panelClassName: "w-64",
991
995
  align: "start",
@@ -1007,11 +1011,12 @@ function AppSwitcher({
1007
1011
  ]
1008
1012
  }
1009
1013
  ),
1010
- children: /* @__PURE__ */ jsxs6("div", { className: "p-1", "data-test": "app-switcher-menu", children: [
1014
+ children: /* @__PURE__ */ jsxs6("div", { id: "app-switcher-menu", className: "p-1", "data-test": "app-switcher-menu", children: [
1011
1015
  /* @__PURE__ */ jsx6("p", { className: "px-3 py-2 text-[10px] font-semibold uppercase tracking-[0.14em] text-ph-mutedtext", children: "Switch application" }),
1012
1016
  apps.map((app) => /* @__PURE__ */ jsx6(
1013
1017
  DropdownItem2,
1014
1018
  {
1019
+ id: `switch-app-${app.slug}`,
1015
1020
  "data-test": `switch-app-${app.slug}`,
1016
1021
  onMouseDown: (e) => e.preventDefault(),
1017
1022
  onClick: () => {
@@ -1146,7 +1151,10 @@ function SuiteNotificationBell({
1146
1151
  markRead,
1147
1152
  markAllRead,
1148
1153
  dropdownMenu: DropdownMenu2,
1149
- cacheKey = "suite-notifications-cache"
1154
+ cacheKey = "suite-notifications-cache",
1155
+ dataTest = "suite-notifications",
1156
+ triggerId,
1157
+ triggerDataTest
1150
1158
  }) {
1151
1159
  const router = useRouter();
1152
1160
  const [open, setOpen] = useState2(false);
@@ -1247,11 +1255,13 @@ function SuiteNotificationBell({
1247
1255
  DropdownMenu2,
1248
1256
  {
1249
1257
  "aria-label": "Notifications",
1258
+ triggerId: triggerId != null ? triggerId : `${dataTest}-trigger`,
1259
+ triggerDataTest: triggerDataTest != null ? triggerDataTest : `${dataTest}-trigger`,
1250
1260
  align: "end",
1251
1261
  panelClassName: "w-80 overflow-hidden p-0",
1252
1262
  open,
1253
1263
  onOpenChange,
1254
- trigger: /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex h-9 w-9 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: [
1264
+ trigger: /* @__PURE__ */ jsxs7("span", { className: "relative inline-flex h-11 w-11 items-center justify-center rounded-full text-ph-mutedtext transition hover:bg-ph-muted hover:text-ph-ink", children: [
1255
1265
  /* @__PURE__ */ jsx7(Bell, { className: "h-5 w-5", strokeWidth: 1.75, "aria-hidden": true }),
1256
1266
  unread > 0 ? /* @__PURE__ */ jsx7("span", { className: "absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-ph-brand px-1 text-[10px] font-semibold leading-none text-white ring-2 ring-ph-surface", children: unread > 9 ? "9+" : unread }) : null
1257
1267
  ] }),
@@ -1262,6 +1272,8 @@ function SuiteNotificationBell({
1262
1272
  "button",
1263
1273
  {
1264
1274
  type: "button",
1275
+ id: `${dataTest}-mark-all`,
1276
+ "data-test": `${dataTest}-mark-all`,
1265
1277
  onClick: markAll,
1266
1278
  className: "text-xs font-medium text-ph-brand hover:underline",
1267
1279
  children: "Mark all read"
@@ -1272,6 +1284,8 @@ function SuiteNotificationBell({
1272
1284
  "button",
1273
1285
  {
1274
1286
  type: "button",
1287
+ id: `${dataTest}-item-${n.id}`,
1288
+ "data-test": `${dataTest}-item-${n.id}`,
1275
1289
  onClick: () => void openItem(n),
1276
1290
  className: "flex w-full flex-col gap-0.5 px-3 py-2 text-left transition hover:bg-ph-muted",
1277
1291
  children: [
@@ -1316,6 +1330,10 @@ function CommandPaletteHost({
1316
1330
  items,
1317
1331
  isAuthenticated = true,
1318
1332
  placeholder = "Type a command or search\u2026",
1333
+ id,
1334
+ dataTest,
1335
+ inputId,
1336
+ inputDataTest,
1319
1337
  commandPalette: CommandPalette
1320
1338
  }) {
1321
1339
  const [open, setOpen] = useState3(false);
@@ -1336,7 +1354,11 @@ function CommandPaletteHost({
1336
1354
  items,
1337
1355
  isOpen: open,
1338
1356
  onClose: () => setOpen(false),
1339
- placeholder
1357
+ placeholder,
1358
+ id,
1359
+ dataTest,
1360
+ inputId,
1361
+ inputDataTest
1340
1362
  }
1341
1363
  );
1342
1364
  }
@@ -1384,6 +1406,10 @@ function SuiteMobileDrawer({
1384
1406
  durationMs = 200,
1385
1407
  dataTest,
1386
1408
  panelDataTest,
1409
+ backdropId,
1410
+ backdropDataTest,
1411
+ closeButtonId,
1412
+ closeButtonDataTest,
1387
1413
  panelClassName
1388
1414
  }) {
1389
1415
  const [rendered, setRendered] = useState5(open);
@@ -1435,6 +1461,8 @@ function SuiteMobileDrawer({
1435
1461
  "button",
1436
1462
  {
1437
1463
  type: "button",
1464
+ id: backdropId,
1465
+ "data-test": backdropDataTest,
1438
1466
  tabIndex: -1,
1439
1467
  className: cn(
1440
1468
  "absolute inset-0 bg-black/25 backdrop-blur-sm motion-safe:transition-opacity motion-safe:ease-spring-subtle",
@@ -1475,6 +1503,8 @@ function SuiteMobileDrawer({
1475
1503
  "button",
1476
1504
  {
1477
1505
  type: "button",
1506
+ id: closeButtonId,
1507
+ "data-test": closeButtonDataTest,
1478
1508
  onClick: onClose,
1479
1509
  className: "-mr-1.5 inline-flex h-11 w-11 items-center justify-center rounded-lg text-ph-mutedtext transition-colors hover:bg-ph-muted hover:text-ph-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-brand",
1480
1510
  "aria-label": closeLabel,
@@ -1500,6 +1530,7 @@ function SuiteMobileHeader({
1500
1530
  title,
1501
1531
  actions,
1502
1532
  menuLabel = "Open navigation",
1533
+ menuId,
1503
1534
  menuDataTest,
1504
1535
  dataTest,
1505
1536
  className
@@ -1517,6 +1548,7 @@ function SuiteMobileHeader({
1517
1548
  "button",
1518
1549
  {
1519
1550
  type: "button",
1551
+ id: menuId,
1520
1552
  "data-test": menuDataTest,
1521
1553
  className: "suite-press inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-xl text-ph-ink transition-colors hover:bg-ph-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ph-brand",
1522
1554
  onClick: onMenuClick,
@@ -1660,7 +1692,7 @@ function SuitePageHeader({
1660
1692
  "data-test": dataTest,
1661
1693
  "data-stuck": sticky ? stuck ? "true" : "false" : void 0,
1662
1694
  className: cn(
1663
- "flex items-start justify-between gap-4 pb-2 sm:pb-3",
1695
+ "flex min-w-0 flex-col items-start gap-3 pb-2 sm:flex-row sm:justify-between sm:gap-4 sm:pb-3",
1664
1696
  // No extra pt here — page inset sets the shared title baseline.
1665
1697
  // Stuck state adds pad via .suite-page-header-sticky[data-stuck].
1666
1698
  sticky && "suite-page-header-sticky",
@@ -1684,7 +1716,7 @@ function SuitePageHeader({
1684
1716
  "h1",
1685
1717
  {
1686
1718
  className: cn(
1687
- "font-display text-[1.625rem] font-bold leading-none tracking-tight text-ph-ink sm:text-[2.25rem]",
1719
+ "min-w-0 break-words font-display text-[1.625rem] font-bold leading-none tracking-tight text-ph-ink text-balance sm:text-[2.25rem]",
1688
1720
  titleClassName
1689
1721
  ),
1690
1722
  children: title
@@ -1704,7 +1736,7 @@ function SuitePageHeader({
1704
1736
  }
1705
1737
  ) : null
1706
1738
  ] }),
1707
- actions ? /* @__PURE__ */ jsx12("div", { className: "flex shrink-0 items-center gap-2 self-center", children: actions }) : null
1739
+ actions ? /* @__PURE__ */ jsx12("div", { className: "flex max-w-full items-center gap-2 self-stretch overflow-x-auto pb-1 sm:shrink-0 sm:self-center sm:overflow-visible sm:pb-0", children: actions }) : null
1708
1740
  ]
1709
1741
  }
1710
1742
  );
@@ -1845,6 +1877,8 @@ function SuiteUserMenu({
1845
1877
  fallbackInitials,
1846
1878
  showSignOutAction = false,
1847
1879
  dataTest = "suite-user-menu",
1880
+ triggerId,
1881
+ triggerDataTest,
1848
1882
  className
1849
1883
  }) {
1850
1884
  const router = useRouter2();
@@ -1864,6 +1898,8 @@ function SuiteUserMenu({
1864
1898
  DropdownMenu,
1865
1899
  {
1866
1900
  trigger: avatar,
1901
+ triggerId: triggerId != null ? triggerId : `${dataTest}-trigger`,
1902
+ triggerDataTest: triggerDataTest != null ? triggerDataTest : `${dataTest}-trigger`,
1867
1903
  "aria-label": "Account menu",
1868
1904
  align: "end",
1869
1905
  side: "bottom",
@@ -1964,6 +2000,7 @@ function SuiteBottomNav({
1964
2000
  Link,
1965
2001
  {
1966
2002
  href: item.href,
2003
+ id: item.id,
1967
2004
  "data-test": (_a = item.dataTest) != null ? _a : `suite-nav-${item.label.toLowerCase().replace(/\s+/g, "-")}`,
1968
2005
  "aria-current": active ? "page" : void 0,
1969
2006
  className: cn(
@@ -2869,6 +2906,7 @@ function SuiteSettingsMobileNav({
2869
2906
  "button",
2870
2907
  {
2871
2908
  type: "button",
2909
+ id: item.id,
2872
2910
  "data-test": item.testId,
2873
2911
  onClick: () => onSelect(item.href),
2874
2912
  "aria-current": active ? "page" : void 0,
@@ -2944,19 +2982,21 @@ function SuiteSidebar({
2944
2982
  /* @__PURE__ */ jsxs18("nav", { "aria-label": "Pages", className: "shrink-0 space-y-0.5", children: [
2945
2983
  /* @__PURE__ */ jsx21("div", { className: cn("mb-3", collapsed && "flex justify-center"), children: renderNode(contextSwitcher, collapsed) }),
2946
2984
  /* @__PURE__ */ jsx21("div", { className: "space-y-0.5", children: navItems.map((item) => {
2985
+ var _a;
2947
2986
  const Icon = item.icon;
2948
2987
  const active = Boolean(item.active);
2949
2988
  const link = /* @__PURE__ */ jsxs18(
2950
2989
  Link2,
2951
2990
  {
2952
2991
  href: item.href,
2953
- "data-test": "nav-link",
2992
+ id: item.id,
2993
+ "data-test": (_a = item.dataTest) != null ? _a : "nav-link",
2954
2994
  "aria-current": active ? "page" : void 0,
2955
2995
  onClick: item.onClick,
2956
2996
  className: cn(
2957
- "group relative flex items-center gap-2.5 rounded-[var(--ph-radius-app)] text-sm font-medium transition-colors",
2997
+ "group relative flex min-h-11 touch-manipulation items-center gap-2.5 rounded-[var(--ph-radius-app)] text-sm font-medium transition-colors",
2958
2998
  active ? "bg-ph-muted" : "text-ph-subtle hover:bg-ph-muted hover:text-ph-ink",
2959
- collapsed ? "mx-auto size-10 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
2999
+ collapsed ? "mx-auto size-11 shrink-0 justify-center gap-0 px-0 py-0" : "w-full px-2.5 py-2"
2960
3000
  ),
2961
3001
  children: [
2962
3002
  /* @__PURE__ */ jsx21(
@@ -3054,7 +3094,7 @@ function SuiteAppLayout({
3054
3094
  {
3055
3095
  "data-test": "app-shell",
3056
3096
  className: cn(
3057
- "suite-app-layout flex min-h-dvh lg:h-screen lg:overflow-hidden",
3097
+ "suite-app-layout flex h-dvh overflow-hidden",
3058
3098
  className
3059
3099
  ),
3060
3100
  children: [