7k-design-system 1.1.1 → 1.3.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.
Files changed (64) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/CONSUMER_GUIDE.md +56 -16
  3. package/DESIGN.md +111 -132
  4. package/README.md +20 -20
  5. package/SKILL.md +23 -25
  6. package/build/icons/icon-7kgroup-light.svg +10 -0
  7. package/build/icons/icon-7kgroup.svg +10 -0
  8. package/build/icons/icon-7kminato-light.svg +10 -0
  9. package/build/icons/icon-7kminato.svg +10 -0
  10. package/build/icons/icon-base.svg +10 -0
  11. package/build/icons/icon-inari-light.svg +10 -0
  12. package/build/icons/icon-inari.svg +10 -0
  13. package/dist/7k-design-system.css +1 -1
  14. package/dist/animations.css +1 -1
  15. package/dist/build/icons/icon-7kgroup-light.svg +10 -0
  16. package/dist/build/icons/icon-7kgroup.svg +10 -0
  17. package/dist/build/icons/icon-7kminato-light.svg +10 -0
  18. package/dist/build/icons/icon-7kminato.svg +10 -0
  19. package/dist/build/icons/icon-base.svg +10 -0
  20. package/dist/build/icons/icon-inari-light.svg +10 -0
  21. package/dist/build/icons/icon-inari.svg +10 -0
  22. package/dist/components.css +1 -1
  23. package/dist/projects.css +1 -1
  24. package/dist/react/components/Alert.d.ts +0 -1
  25. package/dist/react/components/Avatar.d.ts +2 -0
  26. package/dist/react/components/Badge.d.ts +0 -1
  27. package/dist/react/components/Button.d.ts +0 -1
  28. package/dist/react/components/Card.d.ts +0 -1
  29. package/dist/react/components/Checkbox.d.ts +0 -1
  30. package/dist/react/components/DataTable.d.ts +2 -0
  31. package/dist/react/components/Drawer.d.ts +0 -1
  32. package/dist/react/components/EmptyState.d.ts +2 -0
  33. package/dist/react/components/Icon.d.ts +0 -1
  34. package/dist/react/components/Input.d.ts +0 -1
  35. package/dist/react/components/IsometricBackground.d.ts +0 -1
  36. package/dist/react/components/Listbox.d.ts +2 -0
  37. package/dist/react/components/Modal.d.ts +0 -1
  38. package/dist/react/components/Nav.d.ts +0 -1
  39. package/dist/react/components/Progress.d.ts +2 -0
  40. package/dist/react/components/ProjectIcon.d.ts +6 -0
  41. package/dist/react/components/Radio.d.ts +0 -1
  42. package/dist/react/components/Select.d.ts +0 -1
  43. package/dist/react/components/Skeleton.d.ts +2 -0
  44. package/dist/react/components/Spinner.d.ts +2 -0
  45. package/dist/react/components/Stat.d.ts +2 -0
  46. package/dist/react/components/Tabs.d.ts +0 -1
  47. package/dist/react/components/TextureOverlay.d.ts +1 -2
  48. package/dist/react/components/Toast.d.ts +0 -1
  49. package/dist/react/components/Toggle.d.ts +0 -1
  50. package/dist/react/components/Tooltip.d.ts +0 -1
  51. package/dist/react/index.cjs +1 -1
  52. package/dist/react/index.d.ts +9 -1
  53. package/dist/react/index.js +1263 -876
  54. package/dist/react/theme/ProjectProvider.d.ts +0 -1
  55. package/dist/react/theme/ThemeContext.d.ts +0 -1
  56. package/dist/react/theme/ThemeProvider.d.ts +0 -1
  57. package/dist/react/theme/projects.d.ts +1 -1
  58. package/dist/react/theme/useProject.d.ts +0 -1
  59. package/dist/react/theme/useTheme.d.ts +0 -1
  60. package/dist/react/types.d.ts +68 -8
  61. package/dist/textures.css +1 -1
  62. package/dist/tokens.css +1 -1
  63. package/package.json +18 -20
  64. package/dist/react/components/MangaPanel.d.ts +0 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # [1.3.0](https://github.com/7K-Group/7k-design-system/compare/v1.2.0...v1.3.0) (2026-10-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * data-display components, u-* utilities, legacy class conformance, edge releases ([441ec7b](https://github.com/7K-Group/7k-design-system/commit/441ec7b72993d75899127ed803d273965434fb16))
7
+
8
+ # [1.3.0](https://github.com/7K-Group/7k-design-system/compare/v1.2.0...v1.3.0) (2026-10-08)
9
+
10
+
11
+ ### Features
12
+
13
+ * add `Stat`, `EmptyState`, and `DataTable` React components (`.stat`/`.empty`/`.table` compositions with loading skeletons, sortable headers, and a mobile stacked-card transform) plus `.banner-count`/`.banner-link` banner slots ([3eae951](https://github.com/7K-Group/7k-design-system/commit/3eae951))
14
+ * add token-based `u-*` utility classes (`utilities.css`): text/background/border helpers with explicit opacity and hover variants
15
+
16
+ ### Breaking Changes
17
+
18
+ * rename legacy class families for consistency: `isometric-*` → `iso-*`, bare texture classes → `bg-*` (e.g. `.scanline` → `.bg-scanline`), `.pixel-*` → `.font-pixel-*`, `.pixel-fade-in`/`.pixel-dots` → `.step-fade-in`/`.step-dots`; `TextureOverlay` prop `animate` → `animated`; the conflicting duplicate `.texture-overlay` in isometric.css is now `.overlay-fill`
19
+
20
+ # [1.2.0](https://github.com/7K-Group/7k-design-system/compare/v1.1.1...v1.2.0) (2026-10-08)
21
+
22
+
23
+ ### Features
24
+
25
+ * modernize design system — naming standardization, Inari project, accent-driven UI ([#65](https://github.com/7K-Group/7k-design-system/issues/65)) ([b160a60](https://github.com/7K-Group/7k-design-system/commit/b160a60b4373c6a8fb1d91446397f8cd6b84ef80))
26
+
1
27
  ## [1.1.1](https://github.com/7K-Group/7k-design-system/compare/v1.1.0...v1.1.1) (2026-08-13)
2
28
 
3
29
 
@@ -31,6 +57,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
57
  ## [Unreleased]
32
58
 
33
59
  ### Added
60
+ - `.btn-modern-glow-secondary` variant (cyan/per-project outline + glow) — completes the `glow-secondary` Button variant that React and the consumer guide already referenced
61
+ - `.btn-modern:disabled` / `[aria-disabled='true']` styling (40% opacity, no pointer events, glow removed) for all button variants
62
+ - `.select-native:disabled`, `.checkbox`/`.radio`/`.toggle` disabled styling (`:has(input:disabled)`, 40% opacity)
63
+ - Visible keyboard focus rings for custom `Checkbox`, `Radio`, and `Toggle` controls (`:has(input:focus-visible)`)
64
+ - Missing status variant classes: `.toast-info`, `.alert-info`, `.alert-danger` (the React `Alert` `danger` variant emitted an unstyled class), `.alert-content`, `.alert-close`, `.toast-content`, plus focus-visible styles for dismiss buttons
65
+ - `.card-static:hover` reset so `Card hover={false}` actually disables the hover lift
66
+ - `.spinner-cyan` and `.icon-box-cyan` classes (previously documented but unimplemented)
67
+ - Modal: Escape key closes, Tab focus is trapped inside the dialog while open
68
+ - Drawer: Escape key closes, focus returns to the triggering element
69
+ - Tabs: ARIA APG keyboard support (Arrow/Home/End moves selection, roving tabindex), `TabPanel` is focusable
70
+ - `tests/States.test.tsx` covering the new interaction states
34
71
  - Production-ready build pipeline with Vite, PostCSS, and autoprefixer
35
72
  - TypeScript configuration and type definitions for React UI kit
36
73
  - ESLint, Prettier, and Stylelint configurations for code quality
@@ -44,6 +81,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
44
81
  - Self-hosted Geist font strategy with CDN fallback
45
82
 
46
83
  ### Changed
84
+ - **Contrast (WCAG AA, dark theme):** `--text-tertiary` now maps to `--neutral-400` (was `--neutral-500`, 3.5–3.7:1) and `--text-disabled` to `--neutral-600` (was `--neutral-700`, 1.75:1); `.badge-neutral` uses `--status-neutral`; primary/glow button `:active` text is now white (was magenta on muted fill, 3.0:1). Visual change is subtle but visible — captions and disabled elements read slightly brighter
85
+ - `Input` with an `error` now applies the `.error` class (danger border) in addition to `aria-invalid`
86
+ - Component CSS now consumes semantic tokens instead of raw ramps (`.input:focus` → `--border-focus`; badge/toast/alert status colors → `--status-*`; `.table td`/`.modal-body` → `--text-secondary`)
87
+ - Hard-coded z-index values replaced with `--z-*` tokens in `.tooltip-content`, `.combobox-menu`, and Modal/Drawer/Tooltip inline styles
88
+ - Shimmer animation now uses theme-aware `--texture-*` tokens (works in light theme)
89
+ - Light theme: `--shadow-inset` corrected to a black inner shadow; the `prefers-color-scheme: light` media block now yields to an explicit `data-theme` attribute
90
+ - DESIGN.md, SKILL.md, and CONSUMER_GUIDE.md synced with implemented class names, button variants, modifier names, and token values
47
91
  - Converted React UI kit from plain JS to TypeScript with proper component patterns
48
92
  - Refactored CSS to eliminate hard-coded colors in favor of design tokens
49
93
  - Updated `package.json` with proper `exports`, `engines`, and `types` fields
package/CONSUMER_GUIDE.md CHANGED
@@ -72,9 +72,9 @@ import '7k-design-system/css/animations';
72
72
 
73
73
  ```html
74
74
  <!-- Buttons -->
75
- <button class="btn-modern btn-modern-primary">Primary</button>
76
- <button class="btn-modern btn-modern-secondary">Secondary</button>
77
- <button class="btn-modern btn-modern-ghost">Ghost</button>
75
+ <button class="btn btn-primary">Primary</button>
76
+ <button class="btn btn-secondary">Secondary</button>
77
+ <button class="btn btn-ghost">Ghost</button>
78
78
 
79
79
  <!-- Forms -->
80
80
  <input class="input" placeholder="Enter text" />
@@ -271,12 +271,32 @@ function ThemeAwareComponent() {
271
271
  </Modal>
272
272
  ```
273
273
 
274
+ Accessibility notes: `Modal` closes on **Escape**, traps **Tab** focus inside the dialog while open, and restores focus to the triggering element on close. Always pass `aria-labelledby` (or `aria-label`). `Drawer` supports Escape and focus restoration as well.
275
+
276
+ #### Toast
277
+
278
+ ```tsx
279
+ <Toast
280
+ variant="success" // 'default' | 'success' | 'error' | 'warning' | 'info'
281
+ onDismiss={() => setShow(false)}
282
+ >
283
+ Deployed
284
+ </Toast>
285
+ ```
286
+
287
+ Mount toasts in a fixed container at the top of your app (they use `role="status"`/`role="alert"` and the `slide-up-reveal` animation). Example container:
288
+
289
+ ```tsx
290
+ <div style={{ position: 'fixed', bottom: 24, right: 24, zIndex: 'var(--z-toast)', display: 'grid', gap: 8 }}>
291
+ {toasts.map((t) => <Toast key={t.id} {...t} />)}
292
+ </div>
293
+ ```
294
+
274
295
  #### Layout helpers
275
296
 
276
297
  ```tsx
277
298
  <TextureOverlay texture="halftone" animate>...</TextureOverlay>
278
299
  <IsometricBackground pattern="grid" animated>...</IsometricBackground>
279
- <MangaPanel frame texture="halftone" speedLine="horizontal">...</MangaPanel>
280
300
  ```
281
301
 
282
302
  #### Forms
@@ -286,9 +306,35 @@ function ThemeAwareComponent() {
286
306
  <Radio label="Option" name="group" />
287
307
  <Toggle label="Enable" checked={on} onChange={setOn} />
288
308
  <Select><option>A</option></Select>
309
+ <Listbox options={[{ value: 'a', label: 'A' }]} value={v} onChange={setV} />
289
310
  <Textarea rows={4} />
290
311
  ```
291
312
 
313
+ #### Data display (1.3.0)
314
+
315
+ ```tsx
316
+ <Stat value="24" label="Clusters" accent trend="+2" />
317
+ <EmptyState title="No clusters" body="Register one to get started" action={<Button variant="accent">Register</Button>} />
318
+ <DataTable
319
+ columns={[
320
+ { key: 'name', label: 'Name' },
321
+ { key: 'status', label: 'Status', mono: true, sortable: true },
322
+ ]}
323
+ rows={rows}
324
+ rowKey="id"
325
+ loading={isLoading} // renders skeleton rows
326
+ empty={<EmptyState title="No rows" />}
327
+ onSort={(key) => sort(key)}
328
+ sortKey={sortKey}
329
+ sortDirection="asc"
330
+ pagination={<div className="pagination">…</div>}
331
+ />
332
+ ```
333
+
334
+ `DataTable` composes the `.table` classes: mono uppercase headers, sortable-column buttons, skeleton rows while `loading`, an `empty` slot when there are no rows, and a stacked-card transform on narrow viewports (≤640px, each cell labelled via `data-label`).
335
+
336
+ Form notes: passing `error` to `Input` adds the `.error` class (danger border) and wires `aria-invalid` + an alert-role message automatically (for `Textarea`/`Select`, add the `error` class and `aria-invalid` manually). Custom `Checkbox`/`Radio`/`Toggle` render a visually-hidden native input — keyboard focus shows a magenta focus ring on the custom control via `:focus-visible`. `Tabs` supports full arrow-key / Home / End navigation with roving tabindex per the ARIA tabs pattern.
337
+
292
338
  ---
293
339
 
294
340
  ## Project Customization
@@ -300,20 +346,14 @@ The parent 7K brand uses magenta primary + cyan secondary. Each sub-project can
300
346
  ```css
301
347
  /* project-neon.css */
302
348
  .project-neon {
303
- /* Circle project — cyan secondary accent */
349
+ /* 7KMinato — cyan takes over the full brand chain */
304
350
  --brand-secondary: var(--cyan-500);
305
351
  }
306
352
 
307
- /* project-grid.css */
308
- .project-grid {
309
- /* Grid project — acid green secondary accent */
310
- --brand-secondary: var(--acid-500);
311
- }
312
-
313
- /* project-ember.css */
314
- .project-ember {
315
- /* Line project — orange secondary accent */
316
- --brand-secondary: var(--ember-500);
353
+ /* project-inari.css */
354
+ .project-inari {
355
+ /* Inari — burnt orange takes over the full brand chain */
356
+ --brand-secondary: var(--inari-500);
317
357
  }
318
358
  ```
319
359
 
@@ -373,7 +413,7 @@ function App() {
373
413
 
374
414
  - **Don't hard-code colors** — Avoid hex values; use design tokens
375
415
  - **Don't import CSS in components** — Import once at app level
376
- - **Don't mix textures** — Don't put `.scanline` inside `.halftone`
416
+ - **Don't mix textures** — Don't put `.bg-scanline` inside `.halftone`
377
417
  - **Don't override component internals** — Style via props or wrapper classes
378
418
  - **Don't forget data-theme** — Light mode requires `data-theme="light"` on <html>
379
419