noecosystem-design 0.2.0 → 0.2.1

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.
@@ -38,3 +38,16 @@ export const Default: Story = {
38
38
  </Card>
39
39
  ),
40
40
  };
41
+
42
+ export const Outlined: Story = {
43
+ render: () => (
44
+ <Card appearance="outlined" style={{ maxWidth: '24rem' }}>
45
+ <CardHeader>
46
+ <CardTitle>Selection boundary</CardTitle>
47
+ <CardDescription>
48
+ Use this only when a visible boundary conveys interaction or data-entry state.
49
+ </CardDescription>
50
+ </CardHeader>
51
+ </Card>
52
+ ),
53
+ };
@@ -42,6 +42,11 @@ matching the direction contract in `rtl.md`. Products consume the highest
42
42
  layer that fits; screens should not reassemble primitives into ad-hoc page
43
43
  scaffolds when a registered block exists.
44
44
 
45
+ For application pages, compose `app-frame`, `page-header`, `sidebar-navigation`,
46
+ `bottom-navigation`, `drawer`, and `Card` before creating a page-local shell.
47
+ Use the [flat surface and navigation policy](surface-policy.md) to decide surface
48
+ tone, CTA hierarchy, adaptive navigation, icon coloring, and review evidence.
49
+
45
50
  Mapping to the Untitled UI reference taxonomy (honest as of 2026-08-27 — foundation stabilization):
46
51
 
47
52
  | Untitled UI category | NOE coverage |
@@ -35,6 +35,15 @@ Typography is a language-aware semantic contract, not a per-component choice.
35
35
 
36
36
  Radii are compact and semantic. Controls use shared heights. Cards are not nested merely to create hierarchy. Dense professional surfaces may use tighter spacing than consumer surfaces but share the same token scale.
37
37
 
38
+ ## Surface hierarchy
39
+
40
+ NOE uses a flat surface hierarchy: page canvas and raised regions are separated by
41
+ semantic background tone, spacing, and radius—not decorative borders or shadows.
42
+ `Card` therefore defaults to a raised, borderless appearance. Its outlined
43
+ appearance is only for controls or data boundaries with a meaningful selection
44
+ state. See [Flat surface and navigation policy](surface-policy.md) for the
45
+ product-level contract.
46
+
38
47
  ## Responsive behavior
39
48
 
40
49
  The reference app validates 390, 768, 1024, 1280 and 1440 pixel widths. Sidebars collapse by capability; data remains in logical DOM order; tables scroll rather than reverse data; agent artifacts progressively disclose on smaller layouts.
@@ -0,0 +1,59 @@
1
+ # Flat surface and navigation policy
2
+
3
+ This is the default NOE policy for application pages. It prevents corrective UI
4
+ passes caused by arbitrary shadows, card borders, or ambiguous mobile navigation.
5
+
6
+ ## Surface hierarchy
7
+
8
+ 1. The page canvas uses `color.background` or `color.surface`.
9
+ 2. A top-level section or card uses `color.surfaceRaised`.
10
+ 3. Grouping comes from the difference between those two tones, radius, and the
11
+ spacing scale—not a border or a shadow.
12
+ 4. A nested region uses spacing first. Do not nest cards merely to create depth.
13
+ 5. `Card` defaults to `appearance="raised"`, which has no visible stroke.
14
+ `appearance="outlined"` is reserved for a selection, data-entry, or comparison
15
+ boundary where a stroke conveys real meaning.
16
+
17
+ NOE shadow tokens are intentionally `none`. Do not add local `box-shadow` values
18
+ to product styles. A focus state is an outline/ring, not elevation.
19
+
20
+ ## Actions
21
+
22
+ - One screen has one contained primary CTA.
23
+ - Secondary actions are outline or ghost actions. On a dark or colored surface,
24
+ a white outline action remains transparent with a white label and stroke; never
25
+ give it an opaque white fill that removes its hierarchy.
26
+ - Destructive actions retain an explicit label and confirmation/recovery path;
27
+ color alone is never the signal.
28
+ - Every focusable action keeps a visible `focus-visible` outline.
29
+
30
+ ## Adaptive navigation
31
+
32
+ - Use a sidebar for application navigation at desktop widths and a labelled drawer
33
+ trigger at smaller widths.
34
+ - Mobile bottom navigation is only for top-level destinations and has at most five
35
+ labelled items. The active item has a text and icon state, not color alone.
36
+ - A drawer is secondary navigation, not the only route to a primary action.
37
+ - Every page frame exposes a skip link to its main landmark; a route change places
38
+ the reading start at that main region.
39
+ - Menu triggers include an icon and a visible label when surrounding layout does
40
+ not already make their purpose obvious.
41
+
42
+ ## Icons and direction
43
+
44
+ - Use `@noe/icons` only. Icons inherit `currentColor` from their interactive
45
+ parent, with explicit `color` only for a semantic status.
46
+ - Keep icon size on the NOE token scale and icon-plus-label gaps logical.
47
+ - Use logical CSS properties. Do not solve RTL with global `row-reverse` or
48
+ blanket SVG mirroring.
49
+
50
+ ## Product review checklist
51
+
52
+ - Test every route in Persian/RTL and English/LTR, in light and dark themes.
53
+ - Verify no page-level horizontal overflow at the mobile breakpoint.
54
+ - Verify every section/card/panel has `box-shadow: none` and no visible outer
55
+ stroke unless it is explicitly an outlined control.
56
+ - Verify interactive targets are at least 44 px on touch devices and have
57
+ accessible names.
58
+ - Test desktop sidebar and mobile drawer independently, including keyboard focus
59
+ and Escape dismissal.
package/llms.txt CHANGED
@@ -32,6 +32,7 @@
32
32
  - Agent workflow and retrieval: `docs/design-system/agent-guide.md`
33
33
  - Components and catalog terms: `docs/design-system/components.md`
34
34
  - Tokens and foundations: `docs/design-system/foundations.md`, `docs/design-system/tokens.md`
35
+ - Flat cards, action hierarchy and adaptive application navigation: `docs/design-system/surface-policy.md`
35
36
  - Locale, RTL, and bidi: `docs/design-system/i18n.md`, `docs/design-system/rtl.md`
36
37
  - Accessibility: `docs/design-system/accessibility.md`
37
38
  - Agent and tool-state UI: `docs/design-system/agentic-ui.md`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noecosystem-design",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "description": "Agent-readable NOE design-system source, registry metadata, and verification contracts.",
6
6
  "keywords": [
@@ -159,8 +159,8 @@
159
159
  --noe-color-info-foreground: var(--noe-primitive-color-paper-0);
160
160
  --noe-color-focus-ring: var(--noe-primitive-color-alpha-focus-light);
161
161
  --noe-color-overlay: var(--noe-primitive-color-alpha-overlay-light);
162
- --noe-shadow-raised: 0 1px 2px rgba(23, 25, 24, 0.05), 0 14px 34px rgba(23, 25, 24, 0.07);
163
- --noe-shadow-overlay: 0 24px 64px rgba(23, 25, 24, 0.16);
162
+ --noe-shadow-raised: none;
163
+ --noe-shadow-overlay: none;
164
164
  }
165
165
 
166
166
  /* Semantic tokens: explicit dark theme. */
@@ -189,8 +189,8 @@
189
189
  --noe-color-info-foreground: var(--noe-primitive-color-ink-950);
190
190
  --noe-color-focus-ring: var(--noe-primitive-color-alpha-focus-dark);
191
191
  --noe-color-overlay: var(--noe-primitive-color-alpha-overlay-dark);
192
- --noe-shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 48px rgba(0, 0, 0, 0.26);
193
- --noe-shadow-overlay: 0 30px 80px rgba(0, 0, 0, 0.46);
192
+ --noe-shadow-raised: none;
193
+ --noe-shadow-overlay: none;
194
194
  }
195
195
 
196
196
  /* Semantic tokens: follow the OS only when no explicit theme is set. */
@@ -220,8 +220,8 @@
220
220
  --noe-color-info-foreground: var(--noe-primitive-color-ink-950);
221
221
  --noe-color-focus-ring: var(--noe-primitive-color-alpha-focus-dark);
222
222
  --noe-color-overlay: var(--noe-primitive-color-alpha-overlay-dark);
223
- --noe-shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 48px rgba(0, 0, 0, 0.26);
224
- --noe-shadow-overlay: 0 30px 80px rgba(0, 0, 0, 0.46);
223
+ --noe-shadow-raised: none;
224
+ --noe-shadow-overlay: none;
225
225
  }
226
226
  }
227
227
 
@@ -154,12 +154,12 @@
154
154
  },
155
155
  "shadow": {
156
156
  "light": {
157
- "raised": "0 1px 2px rgba(23, 25, 24, 0.05), 0 14px 34px rgba(23, 25, 24, 0.07)",
158
- "overlay": "0 24px 64px rgba(23, 25, 24, 0.16)"
157
+ "raised": "none",
158
+ "overlay": "none"
159
159
  },
160
160
  "dark": {
161
- "raised": "0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 48px rgba(0, 0, 0, 0.26)",
162
- "overlay": "0 30px 80px rgba(0, 0, 0, 0.46)"
161
+ "raised": "none",
162
+ "overlay": "none"
163
163
  }
164
164
  },
165
165
  "font": {
@@ -155,12 +155,12 @@ export const tokens = {
155
155
  },
156
156
  "shadow": {
157
157
  "light": {
158
- "raised": "0 1px 2px rgba(23, 25, 24, 0.05), 0 14px 34px rgba(23, 25, 24, 0.07)",
159
- "overlay": "0 24px 64px rgba(23, 25, 24, 0.16)"
158
+ "raised": "none",
159
+ "overlay": "none"
160
160
  },
161
161
  "dark": {
162
- "raised": "0 1px 2px rgba(0, 0, 0, 0.2), 0 18px 48px rgba(0, 0, 0, 0.26)",
163
- "overlay": "0 30px 80px rgba(0, 0, 0, 0.46)"
162
+ "raised": "none",
163
+ "overlay": "none"
164
164
  }
165
165
  },
166
166
  "font": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-08-29T08:49:53.291Z",
2
+ "generatedAt": "2026-08-29T09:30:43.936Z",
3
3
  "items": [
4
4
  {
5
5
  "id": "bidi-text",
@@ -88,7 +88,7 @@
88
88
  "package": "@noe/ui",
89
89
  "status": "available",
90
90
  "maturity": "beta",
91
- "description": "Card Primitives / Layout component. card provides primitives / layout behavior with RTL, i18n and accessibility built-in.",
91
+ "description": "Flat raised section primitive. It separates content from its page canvas through semantic surface tone, spacing and radius—not decorative borders or shadows. Use outlined only where a boundary conveys selection or data-entry state.",
92
92
  "registryItem": "card"
93
93
  },
94
94
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifestVersion": "1.0.0",
3
- "generatedAt": "2026-08-29T08:49:53.284Z",
3
+ "generatedAt": "2026-08-29T09:30:43.923Z",
4
4
  "generatedNote": "Canonical NOE manifest — single source of truth for catalog, audit, registry, stories, docs and agent search. Generated by pnpm gen:manifest; do not edit by hand for automated fields.",
5
5
  "items": [
6
6
  {
@@ -428,12 +428,25 @@
428
428
  "status": "available",
429
429
  "maturity": "beta",
430
430
  "category": "Primitives / Layout",
431
- "description": "Card Primitives / Layout component. card provides primitives / layout behavior with RTL, i18n and accessibility built-in.",
432
- "capabilityAliases": ["card", "card"],
433
- "searchTerms": ["card", "card", "layout"],
434
- "useWhen": ["using card in Primitives / Layout"],
435
- "doNotUseWhen": ["when card semantics do not match"],
436
- "alternatives": [],
431
+ "description": "Flat raised section primitive. It separates content from its page canvas through semantic surface tone, spacing and radius—not decorative borders or shadows. Use outlined only where a boundary conveys selection or data-entry state.",
432
+ "capabilityAliases": ["flat card", "raised surface", "borderless section", "outlined card"],
433
+ "searchTerms": [
434
+ "card",
435
+ "raised surface",
436
+ "flat section",
437
+ "borderless panel",
438
+ "outlined boundary"
439
+ ],
440
+ "useWhen": [
441
+ "grouping a top-level application region with a semantic raised surface",
442
+ "separating sections by color tone rather than elevation or decorative chrome",
443
+ "using appearance=\"outlined\" only for selection, data-entry or comparison boundaries"
444
+ ],
445
+ "doNotUseWhen": [
446
+ "adding a nested card solely to create visual depth",
447
+ "using an outlined boundary when spacing and surface tone already express grouping"
448
+ ],
449
+ "alternatives": ["SectionHeader", "Field"],
437
450
  "dependencies": [],
438
451
  "registryDependencies": [],
439
452
  "peerDependencies": ["react"],
@@ -441,20 +454,20 @@
441
454
  "label": "string | ReactNode",
442
455
  "children": "ReactNode"
443
456
  },
444
- "variants": ["default"],
457
+ "variants": ["raised", "outlined"],
445
458
  "sizes": [],
446
459
  "slots": [],
447
- "states": ["default", "hover", "focus-visible", "disabled"],
448
- "tokenContracts": ["color.foreground", "color.border"],
460
+ "states": ["default"],
461
+ "tokenContracts": ["color.background", "color.surface", "color.surfaceRaised", "radius.lg"],
449
462
  "accessibility": {
450
- "keyboard": ["Tab to focus", "Enter/Space activate"],
463
+ "keyboard": [],
451
464
  "announcements": [],
452
- "focusBehavior": ["visible ring 2px"]
465
+ "focusBehavior": ["not focusable unless its content contains an interactive control"]
453
466
  },
454
467
  "internationalization": {
455
468
  "messageKeys": [],
456
469
  "rtl": "required",
457
- "bidiNotes": ["logical properties", "no global mirror"]
470
+ "bidiNotes": ["logical spacing; no directional layout override"]
458
471
  },
459
472
  "examples": [
460
473
  {
@@ -463,7 +476,7 @@
463
476
  "files": ["apps/storybook/stories/catalog/card.stories.tsx"]
464
477
  }
465
478
  ],
466
- "relatedPatterns": [],
479
+ "relatedPatterns": ["app-frame", "dashboard-shell", "section-header"],
467
480
  "untitledMapping": null,
468
481
  "storyId": "catalog-primitives-card--default",
469
482
  "registryItem": "card"
@@ -3,7 +3,7 @@
3
3
  "name": "card",
4
4
  "type": "registry:ui",
5
5
  "title": "Card",
6
- "description": "Card Primitives / Layout component. card provides primitives / layout behavior with RTL, i18n and accessibility built-in.",
6
+ "description": "Flat raised section primitive. It separates content through semantic surface tone, spacing and radius—not decorative borders or shadows. Use an outlined boundary only for selection or data-entry state.",
7
7
  "files": [
8
8
  {
9
9
  "path": "packages/ui/src/card.tsx",
@@ -37,8 +37,14 @@
37
37
  "announcements": [],
38
38
  "focusBehavior": ["visible ring 2px"]
39
39
  },
40
- "tokenContracts": ["color.foreground", "color.border"],
41
- "capabilityAliases": ["card", "card"],
42
- "useWhen": ["using card in Primitives / Layout"],
43
- "doNotUseWhen": ["when card semantics do not match"]
40
+ "tokenContracts": ["color.background", "color.surface", "color.surfaceRaised", "radius.lg"],
41
+ "capabilityAliases": ["flat card", "raised surface", "borderless section", "outlined card"],
42
+ "useWhen": [
43
+ "grouping a top-level application region with a semantic raised surface",
44
+ "using an outlined boundary only for selection, data-entry or comparison state"
45
+ ],
46
+ "doNotUseWhen": [
47
+ "adding a nested card solely to create visual depth",
48
+ "using a decorative stroke when spacing and surface tone already express grouping"
49
+ ]
44
50
  }
@@ -1040,8 +1040,14 @@
1040
1040
  "dependencies": ["clsx", "tailwind-merge"],
1041
1041
  "peerDependencies": ["react"],
1042
1042
  "manifestId": "card",
1043
- "capabilityAliases": ["card", "card"],
1044
- "searchTerms": ["card", "card", "layout"]
1043
+ "capabilityAliases": ["flat card", "raised surface", "borderless section", "outlined card"],
1044
+ "searchTerms": [
1045
+ "card",
1046
+ "raised surface",
1047
+ "flat section",
1048
+ "borderless panel",
1049
+ "outlined boundary"
1050
+ ]
1045
1051
  },
1046
1052
  {
1047
1053
  "name": "alert",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-08-29T08:49:53.289Z",
2
+ "generatedAt": "2026-08-29T09:30:43.933Z",
3
3
  "items": [
4
4
  {
5
5
  "id": "bidi-text",
@@ -160,15 +160,28 @@
160
160
  "id": "card",
161
161
  "package": "@noe/ui",
162
162
  "title": "Card",
163
- "description": "Card Primitives / Layout component. card provides primitives / layout behavior with RTL, i18n and accessibility built-in.",
163
+ "description": "Flat raised section primitive. It separates content from its page canvas through semantic surface tone, spacing and radius—not decorative borders or shadows. Use outlined only where a boundary conveys selection or data-entry state.",
164
164
  "category": "Primitives / Layout",
165
165
  "status": "available",
166
- "capabilityAliases": ["card", "card"],
167
- "searchTerms": ["card", "card", "layout"],
168
- "useWhen": ["using card in Primitives / Layout"],
169
- "doNotUseWhen": ["when card semantics do not match"],
170
- "alternatives": [],
171
- "relatedPatterns": [],
166
+ "capabilityAliases": ["flat card", "raised surface", "borderless section", "outlined card"],
167
+ "searchTerms": [
168
+ "card",
169
+ "raised surface",
170
+ "flat section",
171
+ "borderless panel",
172
+ "outlined boundary"
173
+ ],
174
+ "useWhen": [
175
+ "grouping a top-level application region with a semantic raised surface",
176
+ "separating sections by color tone rather than elevation or decorative chrome",
177
+ "using appearance=\"outlined\" only for selection, data-entry or comparison boundaries"
178
+ ],
179
+ "doNotUseWhen": [
180
+ "adding a nested card solely to create visual depth",
181
+ "using an outlined boundary when spacing and surface tone already express grouping"
182
+ ],
183
+ "alternatives": ["SectionHeader", "Field"],
184
+ "relatedPatterns": ["app-frame", "dashboard-shell", "section-header"],
172
185
  "exportName": "Card",
173
186
  "registryItem": "card",
174
187
  "maturity": "beta"
@@ -2,13 +2,25 @@ import type * as React from 'react';
2
2
 
3
3
  import { cn } from './lib/cn';
4
4
 
5
- export function Card({ className, ...props }: React.ComponentProps<'section'>) {
5
+ export type CardAppearance = 'raised' | 'outlined';
6
+
7
+ export interface CardProps extends React.ComponentProps<'section'> {
8
+ /**
9
+ * Raised surfaces are separated from the page by a semantic surface tone only.
10
+ * Use outlined only where a visible boundary conveys data-entry or selection state.
11
+ */
12
+ appearance?: CardAppearance;
13
+ }
14
+
15
+ export function Card({ appearance = 'raised', className, ...props }: CardProps) {
6
16
  return (
7
17
  <section
8
18
  className={cn(
9
- 'flex flex-col overflow-hidden rounded-lg border border-border bg-surface-raised text-foreground',
19
+ 'flex flex-col overflow-hidden rounded-lg bg-surface-raised text-foreground',
20
+ appearance === 'outlined' && 'border border-border',
10
21
  className,
11
22
  )}
23
+ data-appearance={appearance}
12
24
  data-slot="card"
13
25
  {...props}
14
26
  />
@@ -218,6 +218,41 @@ const enrichments = {
218
218
  notes: 'Variants parity full; loading and destructive covered',
219
219
  },
220
220
  },
221
+ card: {
222
+ description:
223
+ 'Flat raised section primitive. It separates content from its page canvas through semantic surface tone, spacing and radius—not decorative borders or shadows. Use outlined only where a boundary conveys selection or data-entry state.',
224
+ capabilityAliases: ['flat card', 'raised surface', 'borderless section', 'outlined card'],
225
+ searchTerms: [
226
+ 'card',
227
+ 'raised surface',
228
+ 'flat section',
229
+ 'borderless panel',
230
+ 'outlined boundary',
231
+ ],
232
+ useWhen: [
233
+ 'grouping a top-level application region with a semantic raised surface',
234
+ 'separating sections by color tone rather than elevation or decorative chrome',
235
+ 'using appearance="outlined" only for selection, data-entry or comparison boundaries',
236
+ ],
237
+ doNotUseWhen: [
238
+ 'adding a nested card solely to create visual depth',
239
+ 'using an outlined boundary when spacing and surface tone already express grouping',
240
+ ],
241
+ alternatives: ['SectionHeader', 'Field'],
242
+ variants: ['raised', 'outlined'],
243
+ states: ['default'],
244
+ tokenContracts: ['color.background', 'color.surface', 'color.surfaceRaised', 'radius.lg'],
245
+ accessibility: {
246
+ keyboard: [],
247
+ announcements: [],
248
+ focusBehavior: ['not focusable unless its content contains an interactive control'],
249
+ },
250
+ internationalization: {
251
+ rtl: 'required',
252
+ bidiNotes: ['logical spacing; no directional layout override'],
253
+ },
254
+ relatedPatterns: ['app-frame', 'dashboard-shell', 'section-header'],
255
+ },
221
256
  dialog: {
222
257
  description:
223
258
  'Direction-preserving modal primitive with native focus semantics and portal propagation. Share foundation with Modal/Slideout.',
@@ -826,7 +861,7 @@ function defaultEnrichment(auditItem) {
826
861
  dependencies: deps,
827
862
  registryDependencies: registryDeps,
828
863
  peerDependencies: peerDeps,
829
- propsSummary: { label: 'string | ReactNode', children: 'ReactNode' },
864
+ propsSummary: base.propsSummary ?? { label: 'string | ReactNode', children: 'ReactNode' },
830
865
  variants,
831
866
  sizes,
832
867
  slots,
@@ -22,3 +22,17 @@ test('token CSS includes theme and reduced-motion contracts', async () => {
22
22
  assert.match(css, /--noe-primitive-color-paper-100:\s*#[0-9a-f]{6}/i);
23
23
  assert.match(css, /--noe-primitive-color-mint-100:\s*#[0-9a-f]{6}/i);
24
24
  });
25
+
26
+ test('surface elevation is intentionally shadow-free in both themes', async () => {
27
+ assert.equal(tokens.shadow.light.raised, 'none');
28
+ assert.equal(tokens.shadow.light.overlay, 'none');
29
+ assert.equal(tokens.shadow.dark.raised, 'none');
30
+ assert.equal(tokens.shadow.dark.overlay, 'none');
31
+
32
+ const css = await readFile(
33
+ new URL('../packages/design-tokens/src/tokens.css', import.meta.url),
34
+ 'utf8',
35
+ );
36
+ assert.match(css, /\[data-theme="light"\][\s\S]*?--noe-shadow-raised:\s*none/);
37
+ assert.match(css, /\[data-theme="dark"\][\s\S]*?--noe-shadow-overlay:\s*none/);
38
+ });