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.
- package/README.md +56 -6
- package/dist/cdn/kanto.min.js +6619 -0
- package/dist/chunks/defaults-Cpeg13O5.js +68 -0
- package/dist/chunks/defaults-Cpeg13O5.js.map +1 -0
- package/dist/chunks/{floating-B33g-M_1.js → floating-C9RLa6cZ.js} +2 -2
- package/dist/chunks/floating-C9RLa6cZ.js.map +1 -0
- package/dist/components/core/kt-icon/kt-icon.js +1 -1
- package/dist/components/forms/kt-date-input/kt-date-input.js +1 -1
- package/dist/components/forms/kt-date-picker/kt-date-picker.js +1 -1
- package/dist/components/forms/kt-input/kt-input.js +1 -1
- package/dist/components/forms/kt-input-menu/kt-input-menu.js +1 -1
- package/dist/components/forms/kt-multi-select/kt-multi-select.js +1 -1
- package/dist/components/forms/kt-select/kt-select.js +1 -1
- package/dist/components/overlays/kt-dropdown/kt-dropdown.js +1 -1
- package/dist/docs/kt-alert.md +52 -0
- package/dist/docs/kt-avatar.md +46 -0
- package/dist/docs/kt-badge.md +104 -0
- package/dist/docs/kt-breadcrumb.md +53 -0
- package/dist/docs/kt-button.md +72 -0
- package/dist/docs/kt-calendar.md +98 -0
- package/dist/docs/kt-card.md +93 -0
- package/dist/docs/kt-chart.md +230 -0
- package/dist/docs/kt-checkbox.md +65 -0
- package/dist/docs/kt-code.md +88 -0
- package/dist/docs/kt-collapsible.md +50 -0
- package/dist/docs/kt-confirm-dialog.md +52 -0
- package/dist/docs/kt-date-input.md +97 -0
- package/dist/docs/kt-date-picker.md +116 -0
- package/dist/docs/kt-drag-drop.md +85 -0
- package/dist/docs/kt-dropdown.md +65 -0
- package/dist/docs/kt-empty-state.md +36 -0
- package/dist/docs/kt-form.md +93 -0
- package/dist/docs/kt-header.md +100 -0
- package/dist/docs/kt-icon.md +68 -0
- package/dist/docs/kt-input-menu.md +90 -0
- package/dist/docs/kt-input.md +137 -0
- package/dist/docs/kt-kbd.md +44 -0
- package/dist/docs/kt-label-input.md +54 -0
- package/dist/docs/kt-meter.md +79 -0
- package/dist/docs/kt-modal.md +62 -0
- package/dist/docs/kt-multi-select.md +115 -0
- package/dist/docs/kt-page-header.md +53 -0
- package/dist/docs/kt-pagination.md +36 -0
- package/dist/docs/kt-progress-bar.md +66 -0
- package/dist/docs/kt-radio-group.md +73 -0
- package/dist/docs/kt-segmented-control.md +70 -0
- package/dist/docs/kt-select.md +80 -0
- package/dist/docs/kt-side-panel.md +59 -0
- package/dist/docs/kt-skeleton.md +46 -0
- package/dist/docs/kt-split-button.md +105 -0
- package/dist/docs/kt-stat.md +57 -0
- package/dist/docs/kt-sub-menu-navigation.md +118 -0
- package/dist/docs/kt-table.md +179 -0
- package/dist/docs/kt-tabs.md +87 -0
- package/dist/docs/kt-textarea.md +59 -0
- package/dist/docs/kt-time-input.md +88 -0
- package/dist/docs/kt-timeline.md +63 -0
- package/dist/docs/kt-toast-container.md +69 -0
- package/dist/docs/kt-toast.md +41 -0
- package/dist/docs/kt-toggle-button-group.md +67 -0
- package/dist/docs/kt-toggle-button.md +52 -0
- package/dist/docs/kt-toggle.md +47 -0
- package/dist/docs/kt-tooltip.md +68 -0
- package/dist/icons/defaults.d.ts +9 -0
- package/dist/icons/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/floating.d.ts +4 -0
- package/dist/tokens/colors.css +5 -2
- package/dist/web-types.json +1 -1
- package/package.json +29 -6
- package/dist/chunks/defaults-CFrjqae2.js +0 -59
- package/dist/chunks/defaults-CFrjqae2.js.map +0 -1
- 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
|
-
**
|
|
4
|
-
|
|
3
|
+
**Forty-nine web components for dashboards, admin tools and forms — in your
|
|
4
|
+
colours, in any framework.**
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
[](https://www.npmjs.com/package/kanto-ds)
|
|
7
|
+
[](https://github.com/MrArnaudMichel/kanto/actions/workflows/ci.yml)
|
|
8
|
+
[](#accessibility)
|
|
9
|
+
[](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
|
|
125
|
-
elements draw
|
|
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
|