lucent-ui 0.16.0 → 0.17.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.
File without changes
File without changes
File without changes
@@ -8,24 +8,38 @@ export const ButtonManifest = {
8
8
  designIntent: 'Buttons communicate available actions. Variant conveys hierarchy: use "primary" for the ' +
9
9
  'single most important action in a view, "secondary" for supporting actions, "ghost" for ' +
10
10
  'low-emphasis actions in dense UIs, "outline" for bordered buttons with no fill, and "danger" exclusively for destructive or irreversible ' +
11
- 'operations. Size should match surrounding content density prefer "md" as the default, ' +
12
- '"sm" for toolbars or tables, and "xs" for compact UIs like customizer panels.',
11
+ 'operations. Use "danger-ghost" for low-emphasis destructive actions (red text, no fill) and ' +
12
+ '"danger-outline" for bordered destructive buttons. Size should match surrounding content density — prefer "md" as the default, ' +
13
+ '"sm" for toolbars or tables, "xs" for compact UIs like customizer panels, and "2xs" for ' +
14
+ 'ultra-dense inline controls (~22px height) such as table-inline actions or toolbar icon triggers.',
13
15
  props: [
14
16
  {
15
17
  name: 'variant',
16
18
  type: 'enum',
17
19
  required: false,
18
20
  default: 'primary',
19
- description: 'Visual style conveying action hierarchy.',
20
- enumValues: ['primary', 'secondary', 'outline', 'ghost', 'danger'],
21
+ description: 'Visual style conveying action hierarchy. ' +
22
+ '"primary" filled accent for the single most important action. ' +
23
+ '"secondary" — subtle accent-tinted fill for supporting actions. ' +
24
+ '"outline" — bordered with no fill, for neutral secondary actions. ' +
25
+ '"ghost" — transparent with no border, for low-emphasis or inline actions. ' +
26
+ '"danger" — filled red for irreversible destructive actions (e.g. "Delete account"). ' +
27
+ '"danger-outline" — red border + red text for destructive actions that need visual weight without a filled background. ' +
28
+ '"danger-ghost" — red text only, for low-emphasis destructive actions (e.g. "Remove" in a list row).',
29
+ enumValues: ['primary', 'secondary', 'outline', 'ghost', 'danger', 'danger-outline', 'danger-ghost'],
21
30
  },
22
31
  {
23
32
  name: 'size',
24
33
  type: 'enum',
25
34
  required: false,
26
35
  default: 'md',
27
- description: 'Controls height and padding.',
28
- enumValues: ['xs', 'sm', 'md', 'lg'],
36
+ description: 'Controls height and padding. ' +
37
+ '"lg" (48px) — hero sections, onboarding flows. ' +
38
+ '"md" (42px) — default for most forms and dialogs. ' +
39
+ '"sm" (34px) — toolbars, table headers, card actions. ' +
40
+ '"xs" (26px) — compact UIs like customizer panels, inline controls. ' +
41
+ '"2xs" (22px) — ultra-dense inline icon triggers, table-row actions, dashboard toolbar buttons.',
42
+ enumValues: ['2xs', 'xs', 'sm', 'md', 'lg'],
29
43
  },
30
44
  {
31
45
  name: 'children',
@@ -135,6 +149,18 @@ export const ButtonManifest = {
135
149
  title: 'Dropdown trigger',
136
150
  code: `<Button variant="outline" chevron>Options</Button>`,
137
151
  },
152
+ {
153
+ title: 'Bordered destructive action',
154
+ code: `<Button variant="danger-outline" onClick={handleRevoke}>Revoke access</Button>`,
155
+ },
156
+ {
157
+ title: 'Low-emphasis destructive action',
158
+ code: `<Button variant="danger-ghost" onClick={handleRemove}>Remove</Button>`,
159
+ },
160
+ {
161
+ title: 'Dense inline action',
162
+ code: `<Button variant="ghost" size="2xs" leftIcon={<RefreshIcon />}>Retry</Button>`,
163
+ },
138
164
  ],
139
165
  compositionGraph: [],
140
166
  accessibility: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucent-ui",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "An AI-first React component library with machine-readable manifests.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -25,18 +25,6 @@
25
25
  "dist-server",
26
26
  "dist-cli"
27
27
  ],
28
- "scripts": {
29
- "dev": "vite --config vite.dev.config.ts",
30
- "build": "vite build",
31
- "build:server": "tsc -p server/tsconfig.json",
32
- "build:cli": "tsc -p cli/tsconfig.json && cp cli/template.manifest.json dist-cli/cli/template.manifest.json",
33
- "test": "vitest run",
34
- "test:watch": "vitest",
35
- "prepublishOnly": "tsc --noEmit && pnpm build && pnpm build:server && pnpm build:cli",
36
- "changeset": "changeset",
37
- "version-packages": "changeset version",
38
- "release": "pnpm prepublishOnly && changeset publish"
39
- },
40
28
  "keywords": [
41
29
  "react",
42
30
  "component-library",
@@ -47,11 +35,10 @@
47
35
  "homepage": "https://lucentui.dev",
48
36
  "repository": {
49
37
  "type": "git",
50
- "url": "https://github.com/rozinashopify/lucent-ui"
38
+ "url": "https://github.com/rozina-hudson/lucent-ui"
51
39
  },
52
40
  "author": "Rozina Szogyenyi",
53
41
  "license": "MIT",
54
- "packageManager": "pnpm@10.30.3",
55
42
  "peerDependencies": {
56
43
  "react": "^18.0.0 || ^19.0.0",
57
44
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -73,5 +60,16 @@
73
60
  "dependencies": {
74
61
  "@modelcontextprotocol/sdk": "^1.27.1",
75
62
  "zod": "^4.3.6"
63
+ },
64
+ "scripts": {
65
+ "dev": "vite --config vite.dev.config.ts",
66
+ "build": "vite build",
67
+ "build:server": "tsc -p server/tsconfig.json",
68
+ "build:cli": "tsc -p cli/tsconfig.json && cp cli/template.manifest.json dist-cli/cli/template.manifest.json",
69
+ "test": "vitest run",
70
+ "test:watch": "vitest",
71
+ "changeset": "changeset",
72
+ "version-packages": "changeset version",
73
+ "release": "pnpm prepublishOnly && changeset publish"
76
74
  }
77
- }
75
+ }
@@ -1,28 +0,0 @@
1
- import { describe, test, expect } from 'vitest';
2
- import { validateManifest } from './validate.js';
3
- // Auto-discover all component manifests
4
- const manifestModules = import.meta.glob('../components/**/*.manifest.ts', { eager: true });
5
- const manifests = Object.entries(manifestModules).map(([path, mod]) => {
6
- const m = mod;
7
- const manifest = m['COMPONENT_MANIFEST'];
8
- return { path, manifest };
9
- });
10
- describe('Component manifests', () => {
11
- test('at least one manifest was discovered', () => {
12
- expect(manifests.length).toBeGreaterThan(0);
13
- });
14
- for (const { path, manifest } of manifests) {
15
- const label = path.replace('../components/', '').replace('.manifest.ts', '');
16
- test(`${label} — exports COMPONENT_MANIFEST`, () => {
17
- expect(manifest).toBeDefined();
18
- });
19
- test(`${label} — passes schema validation`, () => {
20
- const result = validateManifest(manifest);
21
- if (!result.valid) {
22
- const messages = result.errors.map(e => ` ${e.field}: ${e.message}`).join('\n');
23
- throw new Error(`Invalid manifest:\n${messages}`);
24
- }
25
- expect(result.valid).toBe(true);
26
- });
27
- }
28
- });