@cosxai/ui 1.0.0-alpha.0 → 1.0.0-alpha.10
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/CHANGELOG.md +109 -0
- package/package.json +36 -6
- package/src/brand.css +13 -0
- package/src/components/ActionBar.tsx +607 -0
- package/src/components/ActivityTimeline.tsx +77 -0
- package/src/components/AsyncSelect.tsx +205 -0
- package/src/components/AuthLayout.tsx +127 -0
- package/src/components/Badge.tsx +68 -0
- package/src/components/BrandLoader.tsx +122 -0
- package/src/components/Breadcrumb.tsx +129 -0
- package/src/components/Button.tsx +186 -0
- package/src/components/Card.tsx +42 -0
- package/src/components/Checkbox.tsx +67 -0
- package/src/components/ChoiceCards.tsx +68 -0
- package/src/components/CodeInput.tsx +150 -0
- package/src/components/CommandPalette.tsx +228 -0
- package/src/components/ConfirmDialog.tsx +294 -0
- package/src/components/CopyField.tsx +104 -0
- package/src/components/DateInput.tsx +366 -0
- package/src/components/Dialog.tsx +135 -0
- package/src/components/Dropzone.tsx +187 -0
- package/src/components/Field.tsx +66 -0
- package/src/components/Figure.tsx +30 -0
- package/src/components/FileCard.tsx +233 -0
- package/src/components/FileRow.tsx +159 -0
- package/src/components/FolderTree.tsx +377 -0
- package/src/components/Icon.tsx +32 -0
- package/src/components/IconButton.tsx +55 -0
- package/src/components/Input.tsx +74 -0
- package/src/components/ListToolbar.tsx +177 -0
- package/src/components/Logo.tsx +62 -0
- package/src/components/Marker.tsx +26 -0
- package/src/components/MentionInput.tsx +233 -0
- package/src/components/Menu.tsx +109 -0
- package/src/components/MetaLabel.tsx +38 -0
- package/src/components/PageHeader.tsx +62 -0
- package/src/components/PageState.tsx +84 -0
- package/src/components/Progress.tsx +97 -0
- package/src/components/PulseDot.tsx +31 -0
- package/src/components/Radio.tsx +72 -0
- package/src/components/RecipientsInput.tsx +252 -0
- package/src/components/SearchField.tsx +137 -0
- package/src/components/SegmentedControl.tsx +95 -0
- package/src/components/Select.tsx +351 -0
- package/src/components/SidePanel.tsx +130 -0
- package/src/components/Skeleton.tsx +73 -0
- package/src/components/Spinner.tsx +20 -0
- package/src/components/StageProgress.tsx +51 -0
- package/src/components/Steps.tsx +58 -0
- package/src/components/Switch.tsx +67 -0
- package/src/components/SyncStatus.tsx +56 -0
- package/src/components/Table.tsx +196 -0
- package/src/components/Tabs.tsx +124 -0
- package/src/components/Tag.tsx +35 -0
- package/src/components/Textarea.tsx +46 -0
- package/src/components/ThemeProvider.tsx +80 -0
- package/src/components/ThemeSwitch.tsx +99 -0
- package/src/components/Toast.tsx +196 -0
- package/src/components/Tooltip.tsx +57 -0
- package/src/components/UploadCheck.tsx +118 -0
- package/src/components/UploadList.tsx +176 -0
- package/src/components/VirtualList.tsx +90 -0
- package/src/components/WindowDrop.tsx +131 -0
- package/src/components/WorkspaceRow.tsx +80 -0
- package/src/components/forms-control.ts +36 -0
- package/src/components/inputs-aria.ts +5 -0
- package/src/components/inputs-date.ts +92 -0
- package/src/components/inputs-listbox.tsx +154 -0
- package/src/components/inputs-search.ts +60 -0
- package/src/components/logo-art.ts +4 -0
- package/src/components/status-files.ts +124 -0
- package/src/components/status-motion.ts +30 -0
- package/src/components/useButtonAction.ts +57 -0
- package/src/components/useSelection.ts +142 -0
- package/src/index.ts +73 -2
- package/src/modes.css +10 -0
- package/src/styles.css +2 -0
- package/src/theme-base.css +123 -0
- package/src/theme-reset.css +14 -0
- package/src/theme.css +2 -114
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,112 @@
|
|
|
1
|
+
## 1.0.0-alpha.10 (2026-09-30)
|
|
2
|
+
|
|
3
|
+
- BrandLoader: the COSX loop as a loading indicator (Claude Design, COSX
|
|
4
|
+
Loader). A short stroke runs the loop, blooms into the full mark, holds,
|
|
5
|
+
gathers back — 3.4 s a round, the head's speed continuous; at rest it
|
|
6
|
+
is the logo itself. Tones ink / linen / accent / current, an optional
|
|
7
|
+
faint track, `speed`; the full mark, still, under reduced motion. For
|
|
8
|
+
whole-page and start-up waits; buttons, rows and inputs keep Spinner.
|
|
9
|
+
|
|
10
|
+
## 1.0.0-alpha.9 (2026-09-30)
|
|
11
|
+
|
|
12
|
+
- WorkspaceRow: `badge` — what the workspace still needs, as an attention
|
|
13
|
+
badge beside the chevron ("Needs setup"; Metaroom Sign In, Set up your
|
|
14
|
+
workspace).
|
|
15
|
+
|
|
16
|
+
## 1.0.0-alpha.8 (2026-09-30)
|
|
17
|
+
|
|
18
|
+
- ThemeSwitch: `defaultOpen` starts it opened (documentation specimens).
|
|
19
|
+
- WorkspaceMark: a logo that failed before React hydrated (a server-rendered
|
|
20
|
+
page) now falls back to the initial too — onError had already fired.
|
|
21
|
+
- design.cosx.co: Patterns · Sign-in, every specimen the real component.
|
|
22
|
+
|
|
23
|
+
## 1.0.0-alpha.7 (2026-09-30)
|
|
24
|
+
|
|
25
|
+
Sign-in patterns checked against design.cosx.co Patterns · Sign-in:
|
|
26
|
+
|
|
27
|
+
- AuthPanel: the highlight band runs 40–94% with a hair of overhang each
|
|
28
|
+
side; Chinese sets at 1.35, untracked, band from 50% (typography-cjk's
|
|
29
|
+
:lang(zh) line-height is unlayered, so this one is important).
|
|
30
|
+
- WorkspaceRow: 14px name at 1.35, the outline an inset rule on the page
|
|
31
|
+
colour (no border box).
|
|
32
|
+
|
|
33
|
+
## 1.0.0-alpha.6 (2026-09-29)
|
|
34
|
+
|
|
35
|
+
Sign-in patterns (Metaroom sign-in, design.cosx.co), moved here from the
|
|
36
|
+
COSX app so every product signs in with the same pages:
|
|
37
|
+
|
|
38
|
+
- AuthLayout: the step under the product lockup, header end (theme switch),
|
|
39
|
+
help line, footer, and the yellow panel — dropped under 900px (container
|
|
40
|
+
query, so a narrow window or pane works too). AuthPanel for the panel's
|
|
41
|
+
text, AuthStepHead and AuthIconTile for a step.
|
|
42
|
+
- ThemeSwitch: match system · light · dark, folded to the current choice;
|
|
43
|
+
hover or focus opens it, a quick click steps, a settled click picks.
|
|
44
|
+
Follows the ThemeProvider unless given value / onChange.
|
|
45
|
+
- WorkspaceRow and WorkspaceMark: a workspace in a chooser (logo or
|
|
46
|
+
initial, name, detail, busy).
|
|
47
|
+
- Every string is a prop with an English default.
|
|
48
|
+
|
|
49
|
+
## 1.0.0-alpha.5 (2026-09-29)
|
|
50
|
+
|
|
51
|
+
- Builds under the consuming app's TypeScript settings without
|
|
52
|
+
DOM.Iterable (ActionBar no longer spreads a NodeList); `typecheck` checks it.
|
|
53
|
+
|
|
54
|
+
## 1.0.0-alpha.4 (2026-09-29)
|
|
55
|
+
|
|
56
|
+
- ToastCard: one toast drawn in place (documentation specimens, previews).
|
|
57
|
+
- theme.css is now theme-reset.css + theme-base.css. An app moving to the
|
|
58
|
+
kit screen by screen imports `@cosxai/ui/theme-base.css`: the kit's
|
|
59
|
+
utilities are added and Tailwind's own palette and sizes keep working.
|
|
60
|
+
New apps keep importing theme.css (unchanged result).
|
|
61
|
+
|
|
62
|
+
## 1.0.0-alpha.3 (2026-09-29)
|
|
63
|
+
|
|
64
|
+
- Button: busy and done draw over the idle content, kept in place and
|
|
65
|
+
hidden, so the width never changes — also when the button first
|
|
66
|
+
renders busy (it used to shrink to the spinner). No width measuring.
|
|
67
|
+
|
|
68
|
+
## 1.0.0-alpha.2 (2026-09-29)
|
|
69
|
+
|
|
70
|
+
Metaroom product patterns (spec P0), checked light / ink × en / zh.
|
|
71
|
+
|
|
72
|
+
- Surfaces: ActionBar (pages register actions; idle / selection / mode,
|
|
73
|
+
Esc steps back; folds by group and past six; responsive, fold handle
|
|
74
|
+
with status dot, drag + remembered position), Menu, CommandPalette
|
|
75
|
+
(async sources, no "No results" until all return), SidePanel (one
|
|
76
|
+
right-hand slot), Dialog sizes 800 / 1120, ConfirmDialog (type to
|
|
77
|
+
confirm), PromptDialog, StepUpDialog.
|
|
78
|
+
- Data display: useSelection, FileCard, FileList/FileRow, ListToolbar,
|
|
79
|
+
VirtualList + InfiniteLoader, FolderTree (WAI-ARIA tree, lazy,
|
|
80
|
+
reveal, partial ticks), Breadcrumb, PageHeader, Steps, ActivityTimeline.
|
|
81
|
+
- Inputs: SearchField, CopyField, SegmentedControl, ChoiceCards,
|
|
82
|
+
DateInput, FuzzyDateInput, CodeInput, AsyncSelect, RecipientsInput,
|
|
83
|
+
MentionInput.
|
|
84
|
+
- Upload and status: Progress, StageProgress, Dropzone, WindowDrop,
|
|
85
|
+
UploadCheck, UploadList, SyncStatus, PulseDot, Skeleton, PageState.
|
|
86
|
+
- Button: disabled sinks into the well with grey text (was opacity);
|
|
87
|
+
busy keeps its look. Dialog returns focus to whatever opened it.
|
|
88
|
+
- 144 tests (behaviour + axe). Test files no longer ship in the package.
|
|
89
|
+
|
|
90
|
+
## 1.0.0-alpha.1 (2026-09-29)
|
|
91
|
+
|
|
92
|
+
All 22 COSX Design System 3.0 primitives, checked against their
|
|
93
|
+
design.cosx.co pages in light / ink × English / Chinese.
|
|
94
|
+
|
|
95
|
+
- Core: Button (six types, grounds, 32/38/44, shortcut and count,
|
|
96
|
+
disabled-with-reason, busy/done in place + `useButtonAction`),
|
|
97
|
+
IconButton, Badge (shape carries urgency; compact dot keeps the
|
|
98
|
+
wording), Tag, Card, Figure, Marker, MetaLabel, Logo, Icon (Lucide),
|
|
99
|
+
Spinner, ThemeProvider (system / light / ink).
|
|
100
|
+
- Forms: Field (label, hint, error, prefix/suffix, read-only), Input,
|
|
101
|
+
Textarea, Select (portal, auto placement, keyboard, groups, disabled
|
|
102
|
+
rows, meta, filter above 8), Checkbox (indeterminate), RadioGroup, Switch.
|
|
103
|
+
- Tabs (underline, pills), Dialog, Toast (`toast()` + `<Toaster>`),
|
|
104
|
+
Tooltip, Table (sortable, washes for attention/overdue, cards on phones).
|
|
105
|
+
- `--brand-field` / `--brand-mark` for workspace brands; the 3.0 ink
|
|
106
|
+
marker rule for `data-mode="ink"`; an `ink:` Tailwind variant.
|
|
107
|
+
- 65 tests (behaviour + axe). Spec/source differences and what was
|
|
108
|
+
built: docs/workdocs/2026-09-29_feature-ui-1.0.
|
|
109
|
+
|
|
1
110
|
## 1.0.0-alpha.0 (2026-09-29)
|
|
2
111
|
|
|
3
112
|
**A new system — breaking for every 0.x consumer.** 0.x continues on the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosxai/ui",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
4
|
-
"description": "COSX Design System 3.0
|
|
3
|
+
"version": "1.0.0-alpha.10",
|
|
4
|
+
"description": "COSX Design System 3.0 \u2014 tokens, Tailwind v4 theme and React components",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./src/index.ts",
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
".": "./src/index.ts",
|
|
11
11
|
"./styles.css": "./src/styles.css",
|
|
12
12
|
"./theme.css": "./src/theme.css",
|
|
13
|
-
"./tokens/*": "./src/tokens/*"
|
|
13
|
+
"./tokens/*": "./src/tokens/*",
|
|
14
|
+
"./theme-base.css": "./src/theme-base.css"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
17
|
"src",
|
|
17
18
|
"!src/**/*.test.ts",
|
|
19
|
+
"!src/**/*.test.tsx",
|
|
18
20
|
"README.md",
|
|
19
21
|
"CHANGELOG.md",
|
|
20
22
|
"NOTICE"
|
|
@@ -29,9 +31,10 @@
|
|
|
29
31
|
"registry": "https://registry.npmjs.org/"
|
|
30
32
|
},
|
|
31
33
|
"scripts": {
|
|
32
|
-
"typecheck": "tsc --noEmit",
|
|
34
|
+
"typecheck": "tsc --noEmit && tsc -p tsconfig.consumer.json",
|
|
33
35
|
"test": "vitest run",
|
|
34
|
-
"check:css": "tailwindcss -i test/fixture.css -o test/out.css"
|
|
36
|
+
"check:css": "tailwindcss -i test/fixture.css -o test/out.css",
|
|
37
|
+
"playground": "vite --config playground/vite.config.ts"
|
|
35
38
|
},
|
|
36
39
|
"peerDependencies": {
|
|
37
40
|
"react": "^19.0.0",
|
|
@@ -40,12 +43,23 @@
|
|
|
40
43
|
},
|
|
41
44
|
"devDependencies": {
|
|
42
45
|
"@tailwindcss/cli": "^4",
|
|
46
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
47
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
48
|
+
"@testing-library/react": "^16.3.3",
|
|
49
|
+
"@testing-library/user-event": "^14.6.7",
|
|
43
50
|
"@types/node": "^26.6.3",
|
|
44
51
|
"@types/react": "^19.0.0",
|
|
45
52
|
"@types/react-dom": "^19.0.0",
|
|
53
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
54
|
+
"axe-core": "^4.13.0",
|
|
55
|
+
"jsdom": "^30.1.1",
|
|
56
|
+
"react": "^19.0.0",
|
|
57
|
+
"react-dom": "^19.0.0",
|
|
46
58
|
"tailwindcss": "^4",
|
|
47
59
|
"typescript": "^5.6.0",
|
|
48
|
-
"
|
|
60
|
+
"vite": "^6.0.0",
|
|
61
|
+
"vitest": "^3.2.0",
|
|
62
|
+
"vitest-axe": "^0.1.0"
|
|
49
63
|
},
|
|
50
64
|
"sideEffects": [
|
|
51
65
|
"**/*.css"
|
|
@@ -53,7 +67,23 @@
|
|
|
53
67
|
"dependencies": {
|
|
54
68
|
"@fontsource-variable/geist": "^5.3.0",
|
|
55
69
|
"@fontsource-variable/noto-sans-sc": "^5.3.0",
|
|
70
|
+
"@radix-ui/react-checkbox": "^1.3.11",
|
|
71
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
72
|
+
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
73
|
+
"@radix-ui/react-label": "^2.1.15",
|
|
74
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
75
|
+
"@radix-ui/react-radio-group": "^1.4.7",
|
|
76
|
+
"@radix-ui/react-slot": "^1.3.3",
|
|
77
|
+
"@radix-ui/react-switch": "^1.3.7",
|
|
78
|
+
"@radix-ui/react-tabs": "^1.1.21",
|
|
79
|
+
"@radix-ui/react-toast": "^1.2.23",
|
|
80
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
81
|
+
"@tanstack/react-virtual": "^3.14.13",
|
|
82
|
+
"class-variance-authority": "^0.7.1",
|
|
56
83
|
"clsx": "^2.1.1",
|
|
84
|
+
"cmdk": "^1.1.1",
|
|
85
|
+
"lucide-react": "^1.48.0",
|
|
86
|
+
"react-day-picker": "^10.0.1",
|
|
57
87
|
"tailwind-merge": "^3.3.1"
|
|
58
88
|
},
|
|
59
89
|
"peerDependenciesMeta": {
|
package/src/brand.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* @cosxai/ui — workspace brand injection (Metaroom spec §01).
|
|
2
|
+
*
|
|
3
|
+
* A customer's colour replaces the COSX yellow through two variables;
|
|
4
|
+
* everything else stays ink, so any colour keeps text readable:
|
|
5
|
+
* --brand-field large areas: selected nav and tabs, section grounds
|
|
6
|
+
* --brand-mark small marks: dots, progress, highlights, attention fills
|
|
7
|
+
* Ink (text, primary button, icons) and --status-error are not injectable.
|
|
8
|
+
* Default: the COSX yellow. A workspace sets both on <html>.
|
|
9
|
+
*/
|
|
10
|
+
:root {
|
|
11
|
+
--brand-field: var(--yellow);
|
|
12
|
+
--brand-mark: var(--yellow-accent);
|
|
13
|
+
}
|