@xenide-io/the-old-ui-theme 0.5.2 → 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.
- package/README.md +47 -34
- package/dist/{index-Od4pIP4F.d.mts → Chip-C5hRFAhe.d.mts} +10 -606
- package/dist/{index-Od4pIP4F.d.ts → Chip-C5hRFAhe.d.ts} +10 -606
- package/dist/{chunk-G53YLHVE.mjs → chunk-E5ZBQYEX.mjs} +59 -9
- package/dist/{chunk-RZXHZWUB.mjs → chunk-SBBKXV35.mjs} +174 -222
- package/dist/index.d.mts +4 -80
- package/dist/index.d.ts +4 -80
- package/dist/index.js +562 -3746
- package/dist/index.mjs +3 -765
- package/dist/suite.d.mts +56 -25
- package/dist/suite.d.ts +56 -25
- package/dist/suite.js +248 -107
- package/dist/suite.mjs +217 -105
- package/dist/ui.d.mts +608 -2
- package/dist/ui.d.ts +608 -2
- package/dist/ui.js +232 -230
- package/dist/ui.mjs +2 -2
- package/package.json +2 -6
- package/scripts/install-theme-dev.sh +60 -0
- package/scripts/sync-posthog-icons.mjs +75 -0
- package/src/app/globals.css +1 -0
- package/src/components/ui/Chip.tsx +36 -18
- package/src/components/ui/CommandPalette.test.tsx +41 -0
- package/src/components/ui/CommandPalette.tsx +58 -9
- package/src/components/ui/DropdownMenu.tsx +50 -11
- package/src/components/ui/SegmentedControl.tsx +2 -1
- package/src/components/ui/SettingsLayout.tsx +19 -5
- package/src/components/ui/ThemeSwitcher.tsx +12 -3
- package/src/components/ui/interaction-primitives.test.tsx +52 -0
- package/src/styles/suite-skin.css +53 -1
- package/src/styles/themes.css +445 -1656
- package/src/suite/components/app-switcher.tsx +32 -25
- package/src/suite/components/command-palette-host.tsx +20 -8
- package/src/suite/components/suite-app-layout.tsx +31 -10
- package/src/suite/components/suite-bottom-nav.tsx +23 -18
- package/src/suite/components/suite-layout.test.tsx +44 -0
- package/src/suite/components/suite-layout.tsx +3 -3
- package/src/suite/components/suite-mobile-drawer.tsx +12 -0
- package/src/suite/components/suite-mobile-header.tsx +15 -9
- package/src/suite/components/suite-notification-bell.tsx +23 -11
- package/src/suite/components/suite-settings-mobile-nav.tsx +2 -0
- package/src/suite/components/suite-sidebar.tsx +54 -43
- package/src/suite/components/suite-user-menu.tsx +54 -26
- package/src/suite/components/today-page-frame.tsx +1 -1
- package/src/suite/icons/app-accents.ts +38 -43
- package/src/suite/icons/glyph-parts.tsx +16 -9
- package/src/suite/icons/glyphs.ts +130 -99
- package/src/suite/lib/apps.ts +1 -1
- package/src/suite/lib/injected.ts +12 -11
- package/src/suite/lib/use-sidebar-width.ts +23 -8
- package/src/components/charts/index.ts +0 -9
- package/src/components/charts/quill/BarChart.tsx +0 -85
- package/src/components/charts/quill/FunnelChart.tsx +0 -49
- package/src/components/charts/quill/InsightShell.tsx +0 -27
- package/src/components/charts/quill/MetricCard.tsx +0 -44
- package/src/components/charts/quill/PieChart.tsx +0 -81
- package/src/components/charts/quill/Sparkline.tsx +0 -57
- package/src/components/charts/quill/TimeSeriesLineChart.tsx +0 -62
- package/src/components/charts/quill/index.ts +0 -9
|
@@ -5,6 +5,8 @@ import { describe, expect, it, vi } from "vitest";
|
|
|
5
5
|
import { DropdownButton, DropdownItem } from "@/components/ui/DropdownMenu";
|
|
6
6
|
import { FilterMenu } from "@/components/ui/FilterBar";
|
|
7
7
|
import { FilterChips } from "@/components/ui/FilterChips";
|
|
8
|
+
import { SegmentedControl } from "@/components/ui/SegmentedControl";
|
|
9
|
+
import { Chip } from "@/components/ui/Chip";
|
|
8
10
|
|
|
9
11
|
describe("adaptive dropdown", () => {
|
|
10
12
|
it("supports keyboard navigation, selection, closing, and focus restoration", async () => {
|
|
@@ -75,3 +77,53 @@ describe("filter chips", () => {
|
|
|
75
77
|
expect(onToggle).not.toHaveBeenCalled();
|
|
76
78
|
});
|
|
77
79
|
});
|
|
80
|
+
|
|
81
|
+
describe("chip", () => {
|
|
82
|
+
it("keeps selection and removal as separate keyboard controls", async () => {
|
|
83
|
+
const user = userEvent.setup();
|
|
84
|
+
const onClick = vi.fn();
|
|
85
|
+
const onRemove = vi.fn();
|
|
86
|
+
|
|
87
|
+
render(
|
|
88
|
+
<Chip onClick={onClick} onRemove={onRemove}>
|
|
89
|
+
React
|
|
90
|
+
</Chip>,
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
await user.click(screen.getByRole("button", { name: "Remove React" }));
|
|
94
|
+
expect(onRemove).toHaveBeenCalledTimes(1);
|
|
95
|
+
expect(onClick).not.toHaveBeenCalled();
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
describe("segmented control", () => {
|
|
100
|
+
it("exposes and updates the selected option as a pressed button", async () => {
|
|
101
|
+
const user = userEvent.setup();
|
|
102
|
+
|
|
103
|
+
function Fixture() {
|
|
104
|
+
const [value, setValue] = useState("board");
|
|
105
|
+
return (
|
|
106
|
+
<SegmentedControl
|
|
107
|
+
value={value}
|
|
108
|
+
onChange={setValue}
|
|
109
|
+
options={[
|
|
110
|
+
{ value: "board", label: "Board" },
|
|
111
|
+
{ value: "list", label: "List" },
|
|
112
|
+
]}
|
|
113
|
+
/>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
render(<Fixture />);
|
|
118
|
+
expect(screen.getByRole("button", { name: "Board" })).toHaveAttribute(
|
|
119
|
+
"aria-pressed",
|
|
120
|
+
"true",
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
await user.click(screen.getByRole("button", { name: "List" }));
|
|
124
|
+
expect(screen.getByRole("button", { name: "List" })).toHaveAttribute(
|
|
125
|
+
"aria-pressed",
|
|
126
|
+
"true",
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -51,6 +51,42 @@ body {
|
|
|
51
51
|
-webkit-font-smoothing: antialiased;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/* Shared app canvas. Dense workspaces do not paint a decorative background. */
|
|
55
|
+
.suite-app-layout {
|
|
56
|
+
background: var(--ph-canvas);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.suite-app-layout > aside {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media (min-width: 64rem) {
|
|
64
|
+
.suite-app-layout > aside {
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.suite-app-layout > aside {
|
|
70
|
+
position: relative;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.suite-app-layout > div {
|
|
75
|
+
position: relative;
|
|
76
|
+
z-index: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.suite-app-layout__main {
|
|
80
|
+
background: color-mix(in oklab, var(--ph-canvas) 94%, transparent);
|
|
81
|
+
scrollbar-gutter: stable;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@supports not (background: color-mix(in oklab, white, transparent)) {
|
|
85
|
+
.suite-app-layout__main {
|
|
86
|
+
background: var(--ph-canvas);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
54
90
|
/* Shared page inset — SuitePage + TodayPageFrame (one source of truth). */
|
|
55
91
|
.suite-page-inset {
|
|
56
92
|
padding-left: var(--suite-page-pad-x);
|
|
@@ -95,7 +131,7 @@ body {
|
|
|
95
131
|
}
|
|
96
132
|
}
|
|
97
133
|
|
|
98
|
-
/* Today
|
|
134
|
+
/* Today visual treatment — shared geometry, colours supplied by each app theme. */
|
|
99
135
|
.today-page-frame {
|
|
100
136
|
background-color: var(--ph-canvas);
|
|
101
137
|
}
|
|
@@ -461,6 +497,7 @@ button:hover > .ph-card {
|
|
|
461
497
|
background: color-mix(in oklab, var(--ph-canvas) 86%, transparent);
|
|
462
498
|
-webkit-backdrop-filter: blur(12px) saturate(1.4);
|
|
463
499
|
backdrop-filter: blur(12px) saturate(1.4);
|
|
500
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
464
501
|
box-shadow: 0 -1px 0 var(--ph-border-subtle);
|
|
465
502
|
}
|
|
466
503
|
@supports not (backdrop-filter: blur(1px)) {
|
|
@@ -475,6 +512,21 @@ button:hover > .ph-card {
|
|
|
475
512
|
-webkit-overflow-scrolling: touch;
|
|
476
513
|
}
|
|
477
514
|
|
|
515
|
+
/* Compact desktop controls keep their density; coarse pointers get a reliable
|
|
516
|
+
44px hit area without app-specific overrides. */
|
|
517
|
+
@media (pointer: coarse) {
|
|
518
|
+
.ph-btn.ph-btn-raised:not(.ph-btn-lg) {
|
|
519
|
+
--ph-btn-control-size: 2.75rem;
|
|
520
|
+
}
|
|
521
|
+
.ph-btn:not(.ph-btn-raised) {
|
|
522
|
+
min-height: 2.75rem;
|
|
523
|
+
}
|
|
524
|
+
.ph-btn-circle,
|
|
525
|
+
.ph-btn-square {
|
|
526
|
+
min-width: 2.75rem;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
|
|
478
530
|
/* ── Ask AI answer content ───────────────────────────────────────────── */
|
|
479
531
|
.suite-ai-blocknote .bn-editor {
|
|
480
532
|
min-height: 0;
|