@cosxai/ui 1.0.0-alpha.0 → 1.0.0-alpha.2
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 +42 -0
- package/package.json +32 -3
- 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/Badge.tsx +68 -0
- package/src/components/Breadcrumb.tsx +129 -0
- package/src/components/Button.tsx +193 -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/Toast.tsx +159 -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/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 +67 -2
- package/src/modes.css +10 -0
- package/src/styles.css +2 -0
- package/src/theme.css +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,45 @@
|
|
|
1
|
+
## 1.0.0-alpha.2 (2026-09-29)
|
|
2
|
+
|
|
3
|
+
MetaRoom product patterns (spec P0), checked light / ink × en / zh.
|
|
4
|
+
|
|
5
|
+
- Surfaces: ActionBar (pages register actions; idle / selection / mode,
|
|
6
|
+
Esc steps back; folds by group and past six; responsive, fold handle
|
|
7
|
+
with status dot, drag + remembered position), Menu, CommandPalette
|
|
8
|
+
(async sources, no "No results" until all return), SidePanel (one
|
|
9
|
+
right-hand slot), Dialog sizes 800 / 1120, ConfirmDialog (type to
|
|
10
|
+
confirm), PromptDialog, StepUpDialog.
|
|
11
|
+
- Data display: useSelection, FileCard, FileList/FileRow, ListToolbar,
|
|
12
|
+
VirtualList + InfiniteLoader, FolderTree (WAI-ARIA tree, lazy,
|
|
13
|
+
reveal, partial ticks), Breadcrumb, PageHeader, Steps, ActivityTimeline.
|
|
14
|
+
- Inputs: SearchField, CopyField, SegmentedControl, ChoiceCards,
|
|
15
|
+
DateInput, FuzzyDateInput, CodeInput, AsyncSelect, RecipientsInput,
|
|
16
|
+
MentionInput.
|
|
17
|
+
- Upload and status: Progress, StageProgress, Dropzone, WindowDrop,
|
|
18
|
+
UploadCheck, UploadList, SyncStatus, PulseDot, Skeleton, PageState.
|
|
19
|
+
- Button: disabled sinks into the well with grey text (was opacity);
|
|
20
|
+
busy keeps its look. Dialog returns focus to whatever opened it.
|
|
21
|
+
- 144 tests (behaviour + axe). Test files no longer ship in the package.
|
|
22
|
+
|
|
23
|
+
## 1.0.0-alpha.1 (2026-09-29)
|
|
24
|
+
|
|
25
|
+
All 22 COSX Design System 3.0 primitives, checked against their
|
|
26
|
+
design.cosx.co pages in light / ink × English / Chinese.
|
|
27
|
+
|
|
28
|
+
- Core: Button (six types, grounds, 32/38/44, shortcut and count,
|
|
29
|
+
disabled-with-reason, busy/done in place + `useButtonAction`),
|
|
30
|
+
IconButton, Badge (shape carries urgency; compact dot keeps the
|
|
31
|
+
wording), Tag, Card, Figure, Marker, MetaLabel, Logo, Icon (Lucide),
|
|
32
|
+
Spinner, ThemeProvider (system / light / ink).
|
|
33
|
+
- Forms: Field (label, hint, error, prefix/suffix, read-only), Input,
|
|
34
|
+
Textarea, Select (portal, auto placement, keyboard, groups, disabled
|
|
35
|
+
rows, meta, filter above 8), Checkbox (indeterminate), RadioGroup, Switch.
|
|
36
|
+
- Tabs (underline, pills), Dialog, Toast (`toast()` + `<Toaster>`),
|
|
37
|
+
Tooltip, Table (sortable, washes for attention/overdue, cards on phones).
|
|
38
|
+
- `--brand-field` / `--brand-mark` for workspace brands; the 3.0 ink
|
|
39
|
+
marker rule for `data-mode="ink"`; an `ink:` Tailwind variant.
|
|
40
|
+
- 65 tests (behaviour + axe). Spec/source differences and what was
|
|
41
|
+
built: docs/workdocs/2026-09-29_feature-ui-1.0.
|
|
42
|
+
|
|
1
43
|
## 1.0.0-alpha.0 (2026-09-29)
|
|
2
44
|
|
|
3
45
|
**A new system — breaking for every 0.x consumer.** 0.x continues on the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosxai/ui",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.2",
|
|
4
4
|
"description": "COSX Design System 3.0 — tokens, Tailwind v4 theme and React components",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"files": [
|
|
16
16
|
"src",
|
|
17
17
|
"!src/**/*.test.ts",
|
|
18
|
+
"!src/**/*.test.tsx",
|
|
18
19
|
"README.md",
|
|
19
20
|
"CHANGELOG.md",
|
|
20
21
|
"NOTICE"
|
|
@@ -31,7 +32,8 @@
|
|
|
31
32
|
"scripts": {
|
|
32
33
|
"typecheck": "tsc --noEmit",
|
|
33
34
|
"test": "vitest run",
|
|
34
|
-
"check:css": "tailwindcss -i test/fixture.css -o test/out.css"
|
|
35
|
+
"check:css": "tailwindcss -i test/fixture.css -o test/out.css",
|
|
36
|
+
"playground": "vite --config playground/vite.config.ts"
|
|
35
37
|
},
|
|
36
38
|
"peerDependencies": {
|
|
37
39
|
"react": "^19.0.0",
|
|
@@ -40,12 +42,23 @@
|
|
|
40
42
|
},
|
|
41
43
|
"devDependencies": {
|
|
42
44
|
"@tailwindcss/cli": "^4",
|
|
45
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
46
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
47
|
+
"@testing-library/react": "^16.3.3",
|
|
48
|
+
"@testing-library/user-event": "^14.6.7",
|
|
43
49
|
"@types/node": "^26.6.3",
|
|
44
50
|
"@types/react": "^19.0.0",
|
|
45
51
|
"@types/react-dom": "^19.0.0",
|
|
52
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
53
|
+
"axe-core": "^4.13.0",
|
|
54
|
+
"jsdom": "^30.1.1",
|
|
55
|
+
"react": "^19.0.0",
|
|
56
|
+
"react-dom": "^19.0.0",
|
|
46
57
|
"tailwindcss": "^4",
|
|
47
58
|
"typescript": "^5.6.0",
|
|
48
|
-
"
|
|
59
|
+
"vite": "^6.0.0",
|
|
60
|
+
"vitest": "^3.2.0",
|
|
61
|
+
"vitest-axe": "^0.1.0"
|
|
49
62
|
},
|
|
50
63
|
"sideEffects": [
|
|
51
64
|
"**/*.css"
|
|
@@ -53,7 +66,23 @@
|
|
|
53
66
|
"dependencies": {
|
|
54
67
|
"@fontsource-variable/geist": "^5.3.0",
|
|
55
68
|
"@fontsource-variable/noto-sans-sc": "^5.3.0",
|
|
69
|
+
"@radix-ui/react-checkbox": "^1.3.11",
|
|
70
|
+
"@radix-ui/react-dialog": "^1.1.23",
|
|
71
|
+
"@radix-ui/react-dropdown-menu": "^2.1.24",
|
|
72
|
+
"@radix-ui/react-label": "^2.1.15",
|
|
73
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
74
|
+
"@radix-ui/react-radio-group": "^1.4.7",
|
|
75
|
+
"@radix-ui/react-slot": "^1.3.3",
|
|
76
|
+
"@radix-ui/react-switch": "^1.3.7",
|
|
77
|
+
"@radix-ui/react-tabs": "^1.1.21",
|
|
78
|
+
"@radix-ui/react-toast": "^1.2.23",
|
|
79
|
+
"@radix-ui/react-tooltip": "^1.2.16",
|
|
80
|
+
"@tanstack/react-virtual": "^3.14.13",
|
|
81
|
+
"class-variance-authority": "^0.7.1",
|
|
56
82
|
"clsx": "^2.1.1",
|
|
83
|
+
"cmdk": "^1.1.1",
|
|
84
|
+
"lucide-react": "^1.48.0",
|
|
85
|
+
"react-day-picker": "^10.0.1",
|
|
57
86
|
"tailwind-merge": "^3.3.1"
|
|
58
87
|
},
|
|
59
88
|
"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
|
+
}
|