prime-ui-kit 0.9.2 → 0.9.3

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 (96) hide show
  1. package/README.md +9 -5
  2. package/dist/chunks/{chunk-ZEFCDEEQ.js → chunk-6JTZOA5I.js} +878 -331
  3. package/dist/chunks/{chunk-LXGRKN34.js → chunk-OAE4IQX2.js} +769 -479
  4. package/dist/chunks/{chunk-IQELQNMR.js → chunk-U5SR2LZR.js} +17 -4
  5. package/dist/color-picker.js +2 -2
  6. package/dist/components/button/Button.d.ts +19 -2
  7. package/dist/components/card/Card.d.ts +1 -1
  8. package/dist/components/code-block/CodeBlock.d.ts +1 -1
  9. package/dist/components/color-picker/ColorPicker.d.ts +1 -1
  10. package/dist/components/data-table/Row.d.ts +3 -1
  11. package/dist/components/data-table/rows.d.ts +4 -0
  12. package/dist/components/digit-input/DigitInput.d.ts +6 -1
  13. package/dist/components/index.d.ts +4 -1
  14. package/dist/components/input/Input.d.ts +16 -1
  15. package/dist/components/input/passwordStrength.d.ts +9 -0
  16. package/dist/components/progress-bar/ProgressBar.d.ts +16 -1
  17. package/dist/components/sparkline/Sparkline.d.ts +26 -0
  18. package/dist/hooks/useEdgeOverflow.d.ts +4 -0
  19. package/dist/icons/registry.d.ts +2 -0
  20. package/dist/index.css +830 -267
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +9 -3
  23. package/dist/internal/CheckMark.d.ts +12 -0
  24. package/dist/internal/MorphText.d.ts +12 -0
  25. package/dist/internal/RollingNumber.d.ts +14 -0
  26. package/dist/internal/surfaceDepth.d.ts +25 -0
  27. package/dist/internal/swatch.d.ts +4 -1
  28. package/dist/layout/app-shell/AppShell.d.ts +2 -2
  29. package/dist/motion/celebrate.d.ts +18 -0
  30. package/dist/tokens/layers.d.ts +37 -0
  31. package/dist/tokens/naming.d.ts +1 -1
  32. package/dist/tokens/semantic.d.ts +66 -56
  33. package/dist/tokens/themes/dark.d.ts +6 -14
  34. package/package.json +1 -1
  35. package/src/components/accordion/COMPONENT.md +4 -4
  36. package/src/components/avatar/COMPONENT.md +1 -1
  37. package/src/components/button/COMPONENT.md +26 -5
  38. package/src/components/button/examples/download.tsx +45 -0
  39. package/src/components/button/examples/hold-to-confirm.tsx +23 -0
  40. package/src/components/button/examples/label-morph.tsx +33 -0
  41. package/src/components/card/COMPONENT.md +4 -2
  42. package/src/components/card/examples/narrow.tsx +2 -2
  43. package/src/components/card/examples/panel-chart.tsx +1 -1
  44. package/src/components/card/examples/variants.tsx +1 -1
  45. package/src/components/checkbox/examples/examples.module.css +1 -1
  46. package/src/components/code-block/COMPONENT.md +6 -6
  47. package/src/components/code-block/examples/overview.tsx +1 -1
  48. package/src/components/code-block/examples/variants.tsx +1 -1
  49. package/src/components/color-picker/COMPONENT.md +1 -1
  50. package/src/components/color-swatches/COMPONENT.md +5 -5
  51. package/src/components/command-menu/COMPONENT.md +1 -1
  52. package/src/components/crossfade/examples/overview.tsx +3 -3
  53. package/src/components/data-table/COMPONENT.md +5 -4
  54. package/src/components/digit-input/COMPONENT.md +5 -3
  55. package/src/components/digit-input/examples/on-complete.tsx +7 -6
  56. package/src/components/dnd/COMPONENT.md +1 -1
  57. package/src/components/dnd/examples/examples.module.css +4 -4
  58. package/src/components/dropdown/COMPONENT.md +1 -1
  59. package/src/components/dropdown/examples/examples.module.css +1 -1
  60. package/src/components/empty-page/examples/examples.module.css +1 -1
  61. package/src/components/example-frame/COMPONENT.md +1 -1
  62. package/src/components/input/COMPONENT.md +10 -1
  63. package/src/components/input/examples/password-strength.tsx +12 -0
  64. package/src/components/kanban/COMPONENT.md +4 -4
  65. package/src/components/login-form/COMPONENT.md +4 -4
  66. package/src/components/login-form/examples/register.tsx +2 -2
  67. package/src/components/login-form/examples/reset-password.tsx +2 -2
  68. package/src/components/modal/COMPONENT.md +2 -2
  69. package/src/components/modal/examples/examples.module.css +2 -2
  70. package/src/components/page-content/examples/examples.module.css +1 -1
  71. package/src/components/popover/COMPONENT.md +1 -1
  72. package/src/components/progress-bar/COMPONENT.md +5 -1
  73. package/src/components/progress-bar/examples/examples.module.css +7 -0
  74. package/src/components/progress-bar/examples/milestone.tsx +43 -0
  75. package/src/components/progress-bar/examples/steps.tsx +35 -0
  76. package/src/components/skeleton/examples/with-crossfade.tsx +3 -3
  77. package/src/components/sparkline/COMPONENT.md +98 -0
  78. package/src/components/sparkline/examples/examples.module.css +13 -0
  79. package/src/components/sparkline/examples/overview.tsx +27 -0
  80. package/src/components/sparkline/examples/period.tsx +46 -0
  81. package/src/components/tabs/COMPONENT.md +15 -16
  82. package/src/components/tabs/examples/examples.module.css +14 -0
  83. package/src/components/tabs/examples/orientation.tsx +87 -33
  84. package/src/components/tooltip/COMPONENT.md +8 -6
  85. package/src/components/tooltip/examples/examples.module.css +2 -2
  86. package/src/layout/app-header/COMPONENT.md +1 -1
  87. package/src/layout/app-header/examples/examples.module.css +4 -4
  88. package/src/layout/app-shell/COMPONENT.md +8 -8
  89. package/src/layout/app-shell/examples/examples.module.css +3 -3
  90. package/src/layout/bottom-nav/COMPONENT.md +1 -1
  91. package/src/layout/bottom-nav/examples/examples.module.css +1 -1
  92. package/src/layout/sidebar/COMPONENT.md +4 -4
  93. package/src/layout/sidebar/examples/examples.module.css +5 -5
  94. package/src/styles/globals.css +125 -2
  95. package/src/styles/theme-dark.css +36 -13
  96. package/src/styles/theme-light.css +60 -16
package/README.md CHANGED
@@ -6,10 +6,11 @@
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-5-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
7
7
 
8
8
  **A calm, precise React 19 UI kit for product interfaces** — admin panels, dashboards, settings, forms
9
- and data tables. 61 components on one design contract, one API vocabulary and one set of tokens, so
9
+ and data tables. 62 components on one design contract, one API vocabulary and one set of tokens, so
10
10
  every screen you build looks like it was drawn by the same hand.
11
11
 
12
- - **Graphite design language.** Depth from fill, not lines; a strict 4px grid; one size axis
12
+ - **Graphite design language.** Depth from fill, not lines — a surface ladder where every nested
13
+ layer and every control is one lightness step off its host; a strict 4px grid; one size axis
13
14
  `xs · s · m · l · xl` where a Button, an Input and a Select of the same size line up to the pixel;
14
15
  air as hierarchy.
15
16
  - **Light and dark as equals.** Full themes, WCAG AA text contrast, a focus ring that is never clipped.
@@ -144,7 +145,7 @@ Short rules that keep code correct — for people and for AI coding assistants:
144
145
  | Rule | In practice |
145
146
  |---|---|
146
147
  | Tokens only | Components read semantic variables `--prime-*` (`--prime-space-4`, `--prime-color-text-secondary`, `--prime-control-m-height`). Your own CSS uses the same tokens. |
147
- | Fill, not lines | Canvas → card → field are three fills; controls have no visible outline. |
148
+ | Fill, not lines | Surfaces stand on one ladder: the page and four nested layers, one OKLab lightness step apart, computed at build time. Light: gray page, white card, deeper layers alternate. Dark: a near-black page, every layer a step lighter. A field, chip or neutral button is one step off the layer it sits on, so nothing merges; controls have no visible outline. |
148
149
  | Proximity | label → field 4–8 · field → field 20 · group → group 32 · section → section 40–48. |
149
150
  | One size axis | `size` is `xs · s · m · l · xl` (28 · 32 · 36 · 40 · 48), default `m`. |
150
151
  | Semantic vs decorative color | `tone` carries meaning (`danger` for destructive), `color` is a palette hue for badges, tags and avatars. |
@@ -199,12 +200,13 @@ accessibility, examples and common mistakes.
199
200
  | [**Badge**](https://github.com/esurkov1/prime-ui/blob/main/src/components/badge/COMPONENT.md) | The kit's one chip: a status, category or count label, a removable value or applied filter, and a pressable toggle with a hover action, in a palette color. |
200
201
  | [**Avatar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/avatar/COMPONENT.md) | A round photo of a person or entity with an initials or icon fallback, presence dot and overlapping groups. |
201
202
  | [**Thumbnail**](https://github.com/esurkov1/prime-ui/blob/main/src/components/thumbnail/COMPONENT.md) | A preview of an object — product, vehicle, file, cover — at a fixed aspect ratio, with a colored icon fallback. |
203
+ | [**Sparkline**](https://github.com/esurkov1/prime-ui/blob/main/src/components/sparkline/COMPONENT.md) | A small line chart with its headline — the latest value, its change against the point before and its date — where any point can be scrubbed. |
202
204
  | [**Kbd**](https://github.com/esurkov1/prime-ui/blob/main/src/components/kbd/COMPONENT.md) | A key cap for a keyboard key or a shortcut, rendered as a native `<kbd>`. |
203
205
  | [**Card**](https://github.com/esurkov1/prime-ui/blob/main/src/components/card/COMPONENT.md) | A filled surface block with structural templates for metrics, charts, lists, calls to action and covers. |
204
206
  | [**DataTable**](https://github.com/esurkov1/prime-ui/blob/main/src/components/data-table/COMPONENT.md) | A data table with sorting, pagination or infinite scroll, row selection, nested rows and loading / empty / error states. |
205
207
  | [**Kanban**](https://github.com/esurkov1/prime-ui/blob/main/src/components/kanban/COMPONENT.md) | A board of status columns: cross-column moves by pointer, touch and keyboard, WIP limits, loading and empty states. |
206
208
  | [**Timeline**](https://github.com/esurkov1/prime-ui/blob/main/src/components/timeline/COMPONENT.md) | An event feed: dots on a thin line, event title and date, an optional amount on the right, grouped under labels. |
207
- | [**CodeBlock**](https://github.com/esurkov1/prime-ui/blob/main/src/components/code-block/COMPONENT.md) | A static TypeScript / TSX snippet with syntax highlighting, on a sunken panel or bare inside a host. |
209
+ | [**CodeBlock**](https://github.com/esurkov1/prime-ui/blob/main/src/components/code-block/COMPONENT.md) | A static TypeScript / TSX snippet with syntax highlighting, on a filled panel or bare inside a host. |
208
210
  | [**Accordion**](https://github.com/esurkov1/prime-ui/blob/main/src/components/accordion/COMPONENT.md) | Collapsible sections: FAQ, settings groups, checkout steps. |
209
211
 
210
212
  ### Status and loading (`status`)
@@ -246,7 +248,7 @@ accessibility, examples and common mistakes.
246
248
 
247
249
  | Component | What it is for |
248
250
  |---|---|
249
- | [**AppShell**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-shell/COMPONENT.md) | The app frame: a navigation rail on the canvas and a content panel on the surface. |
251
+ | [**AppShell**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-shell/COMPONENT.md) | The app frame: a content panel that is the page itself and a navigation rail one layer above it. |
250
252
  | [**AppHeader**](https://github.com/esurkov1/prime-ui/blob/main/src/layout/app-header/COMPONENT.md) | The bar at the top of the app: where you are, ⌘K search, a few actions and the phone menu button. |
251
253
  | [**PageContent**](https://github.com/esurkov1/prime-ui/blob/main/src/components/page-content/COMPONENT.md) | Page structure inside the main column: title, description, page actions and content sections. |
252
254
  | [**PageToolbar**](https://github.com/esurkov1/prime-ui/blob/main/src/components/page-toolbar/COMPONENT.md) | The panel at the top of a page — sections, filter and search, view options and the primary action — one row when wide, exactly two rows when narrow. |
@@ -285,6 +287,8 @@ accessibility, examples and common mistakes.
285
287
  | `ControlSizeProvider` | Default `size` for every control in a subtree (dense toolbars, compact forms). |
286
288
  | `Tooltip.Provider` | Shared open delay for a group of tooltips. |
287
289
  | `applyTheme(scheme, element?)` | Switch the theme without transition flashes. |
290
+ | `celebrate({ origin? })` | A short confetti burst for a rare milestone (a quarter closed, the first payment); draws nothing under reduced motion. |
291
+ | `getPasswordStrength(value)` | The kit's 0–4 password estimate behind `Input.Root strength`; replace it with `getStrength`. |
288
292
  | `<Icon name="…" />`, `createIcon(glyph)` | The kit icon set (built on lucide-react); `createIcon` turns a domain glyph into a kit icon. |
289
293
 
290
294
  ## Docs inside the package