kanto-ds 1.6.0 → 1.7.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 (73) hide show
  1. package/README.md +56 -6
  2. package/dist/cdn/kanto.min.js +6619 -0
  3. package/dist/chunks/defaults-Cpeg13O5.js +68 -0
  4. package/dist/chunks/defaults-Cpeg13O5.js.map +1 -0
  5. package/dist/chunks/{floating-B33g-M_1.js → floating-C9RLa6cZ.js} +2 -2
  6. package/dist/chunks/floating-C9RLa6cZ.js.map +1 -0
  7. package/dist/components/core/kt-icon/kt-icon.js +1 -1
  8. package/dist/components/forms/kt-date-input/kt-date-input.js +1 -1
  9. package/dist/components/forms/kt-date-picker/kt-date-picker.js +1 -1
  10. package/dist/components/forms/kt-input/kt-input.js +1 -1
  11. package/dist/components/forms/kt-input-menu/kt-input-menu.js +1 -1
  12. package/dist/components/forms/kt-multi-select/kt-multi-select.js +1 -1
  13. package/dist/components/forms/kt-select/kt-select.js +1 -1
  14. package/dist/components/overlays/kt-dropdown/kt-dropdown.js +1 -1
  15. package/dist/docs/kt-alert.md +52 -0
  16. package/dist/docs/kt-avatar.md +46 -0
  17. package/dist/docs/kt-badge.md +104 -0
  18. package/dist/docs/kt-breadcrumb.md +53 -0
  19. package/dist/docs/kt-button.md +72 -0
  20. package/dist/docs/kt-calendar.md +98 -0
  21. package/dist/docs/kt-card.md +93 -0
  22. package/dist/docs/kt-chart.md +230 -0
  23. package/dist/docs/kt-checkbox.md +65 -0
  24. package/dist/docs/kt-code.md +88 -0
  25. package/dist/docs/kt-collapsible.md +50 -0
  26. package/dist/docs/kt-confirm-dialog.md +52 -0
  27. package/dist/docs/kt-date-input.md +97 -0
  28. package/dist/docs/kt-date-picker.md +116 -0
  29. package/dist/docs/kt-drag-drop.md +85 -0
  30. package/dist/docs/kt-dropdown.md +65 -0
  31. package/dist/docs/kt-empty-state.md +36 -0
  32. package/dist/docs/kt-form.md +93 -0
  33. package/dist/docs/kt-header.md +100 -0
  34. package/dist/docs/kt-icon.md +68 -0
  35. package/dist/docs/kt-input-menu.md +90 -0
  36. package/dist/docs/kt-input.md +137 -0
  37. package/dist/docs/kt-kbd.md +44 -0
  38. package/dist/docs/kt-label-input.md +54 -0
  39. package/dist/docs/kt-meter.md +79 -0
  40. package/dist/docs/kt-modal.md +62 -0
  41. package/dist/docs/kt-multi-select.md +115 -0
  42. package/dist/docs/kt-page-header.md +53 -0
  43. package/dist/docs/kt-pagination.md +36 -0
  44. package/dist/docs/kt-progress-bar.md +66 -0
  45. package/dist/docs/kt-radio-group.md +73 -0
  46. package/dist/docs/kt-segmented-control.md +70 -0
  47. package/dist/docs/kt-select.md +80 -0
  48. package/dist/docs/kt-side-panel.md +59 -0
  49. package/dist/docs/kt-skeleton.md +46 -0
  50. package/dist/docs/kt-split-button.md +105 -0
  51. package/dist/docs/kt-stat.md +57 -0
  52. package/dist/docs/kt-sub-menu-navigation.md +118 -0
  53. package/dist/docs/kt-table.md +179 -0
  54. package/dist/docs/kt-tabs.md +87 -0
  55. package/dist/docs/kt-textarea.md +59 -0
  56. package/dist/docs/kt-time-input.md +88 -0
  57. package/dist/docs/kt-timeline.md +63 -0
  58. package/dist/docs/kt-toast-container.md +69 -0
  59. package/dist/docs/kt-toast.md +41 -0
  60. package/dist/docs/kt-toggle-button-group.md +67 -0
  61. package/dist/docs/kt-toggle-button.md +52 -0
  62. package/dist/docs/kt-toggle.md +47 -0
  63. package/dist/docs/kt-tooltip.md +68 -0
  64. package/dist/icons/defaults.d.ts +9 -0
  65. package/dist/icons/index.js +1 -1
  66. package/dist/index.js +1 -1
  67. package/dist/internal/floating.d.ts +4 -0
  68. package/dist/tokens/colors.css +5 -2
  69. package/dist/web-types.json +1 -1
  70. package/package.json +29 -6
  71. package/dist/chunks/defaults-CFrjqae2.js +0 -59
  72. package/dist/chunks/defaults-CFrjqae2.js.map +0 -1
  73. package/dist/chunks/floating-B33g-M_1.js.map +0 -1
package/README.md CHANGED
@@ -1,10 +1,22 @@
1
1
  # Kanto
2
2
 
3
- **A design system for data-dense product interfaces** — dashboards, admin
4
- tools, forms.
3
+ **Forty-nine web components for dashboards, admin tools and forms — in your
4
+ colours, in any framework.**
5
5
 
6
- The components are standard custom elements, so they run in React, Vue,
7
- Angular, Svelte or plain HTML without a per-framework rewrite.
6
+ [![npm](https://img.shields.io/npm/v/kanto-ds?color=5f5dea&label=npm)](https://www.npmjs.com/package/kanto-ds)
7
+ [![CI](https://github.com/MrArnaudMichel/kanto/actions/workflows/ci.yml/badge.svg)](https://github.com/MrArnaudMichel/kanto/actions/workflows/ci.yml)
8
+ [![Accessibility: axe, both themes](https://img.shields.io/badge/accessibility-axe%20tested%2C%20both%20themes-5f5dea)](#accessibility)
9
+ [![License: MIT](https://img.shields.io/badge/license-MIT-5f5dea)](LICENSE)
10
+
11
+ **[Open the live docs and playground](https://kanto.arnaudmichel.fr).** Pick a
12
+ colour, a font and a density, watch a real screen change, and copy the one
13
+ line that does it in your project — or open it on StackBlitz.
14
+
15
+ They are standard custom elements, so the same `<kt-button>` runs in React,
16
+ Vue, Angular, Svelte and plain HTML. Two complete themes, every element audited by axe in both and driven
17
+ by the keyboard in its tests, and no framework to adopt.
18
+
19
+ ## Start
8
20
 
9
21
  ```bash
10
22
  npm install kanto-ds
@@ -23,6 +35,37 @@ import 'kanto-ds/styles.css';
23
35
  </kt-card>
24
36
  ```
25
37
 
38
+ No bundler? One stylesheet and one script tag:
39
+
40
+ ```html
41
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kanto-ds@1/dist/styles.css" />
42
+ <script type="module" src="https://cdn.jsdelivr.net/npm/kanto-ds@1"></script>
43
+ ```
44
+
45
+ Per-framework setup — React 18 and 19, Vue, Angular, Svelte — is in
46
+ **[docs/frameworks.md](docs/frameworks.md)**.
47
+
48
+ ## Make it yours
49
+
50
+ Colour, font, corners, density and text size are each one attribute, on the
51
+ page or on any container:
52
+
53
+ ```html
54
+ <html data-accent="teal" data-radius="round" data-density="compact"></html>
55
+ ```
56
+
57
+ Or any colour at all — Kanto solves the shades for it and keeps every text at
58
+ 4.5:1 in both themes:
59
+
60
+ ```js
61
+ import { setAppearance } from 'kanto-ds';
62
+
63
+ setAppearance({ accent: '#e11d48', radius: 'round', textSize: 'large' });
64
+ ```
65
+
66
+ Fonts other than Kanto's own (`data-font="inter"`, `"plex"`, `"geist"`) need
67
+ the face loaded by your page, from Google Fonts or your own files.
68
+
26
69
  ---
27
70
 
28
71
  ## Showcase
@@ -121,8 +164,10 @@ import 'kanto-ds/components/core/kt-button'; // just this one
121
164
  ## Icons
122
165
 
123
166
  `<kt-icon>` resolves [Lucide](https://lucide.dev) icons by name at render time,
124
- which means the set cannot be tree-shaken. So Kanto ships only the 24 its own
125
- elements draw. Register what your application uses:
167
+ which means the set cannot be tree-shaken. So Kanto ships the 24 its own
168
+ elements draw and nine a first screen reaches for (`plus`, `pencil`,
169
+ `settings`, `download`, `upload`, `external-link`, `filter`, `ellipsis`,
170
+ `refresh-cw`). Register what else your application uses:
126
171
 
127
172
  ```js
128
173
  import { Rocket, Wallet } from 'lucide';
@@ -164,6 +209,11 @@ editor data generated from it, so plain HTML gets completion and hover docs:
164
209
 
165
210
  - **Storybook** and API-docs generators take `kanto-ds/custom-elements.json`.
166
211
 
212
+ **AI assistants** read [`llms.txt`](https://kanto.arnaudmichel.fr/llms.txt): the
213
+ rules that make code right the first time and a link to every component's
214
+ page. In a project, each page also ships at
215
+ `node_modules/kanto-ds/dist/docs/<tag>.md`.
216
+
167
217
  ## Accessibility
168
218
 
169
219
  Not a phase at the end; it is why several of these components exist in this