@tasteee/zest 0.1.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 +204 -0
- package/custom-elements.json +15982 -0
- package/dist/components/z-accordion.d.ts +13 -0
- package/dist/components/z-alert-dialog.d.ts +19 -0
- package/dist/components/z-alert.d.ts +19 -0
- package/dist/components/z-attachment-chip.d.ts +36 -0
- package/dist/components/z-attachment-tray.d.ts +32 -0
- package/dist/components/z-aura.d.ts +17 -0
- package/dist/components/z-avatar-stack.d.ts +15 -0
- package/dist/components/z-avatar.d.ts +28 -0
- package/dist/components/z-badge.d.ts +50 -0
- package/dist/components/z-bento-grid.d.ts +12 -0
- package/dist/components/z-bento-item.d.ts +13 -0
- package/dist/components/z-box.d.ts +130 -0
- package/dist/components/z-breadcrumbs.d.ts +23 -0
- package/dist/components/z-button-group.d.ts +9 -0
- package/dist/components/z-button.d.ts +35 -0
- package/dist/components/z-callout.d.ts +25 -0
- package/dist/components/z-card.d.ts +26 -0
- package/dist/components/z-carousel.d.ts +23 -0
- package/dist/components/z-center.d.ts +28 -0
- package/dist/components/z-chart.d.ts +29 -0
- package/dist/components/z-chassis.d.ts +33 -0
- package/dist/components/z-chat-header.d.ts +29 -0
- package/dist/components/z-chat-shell.d.ts +25 -0
- package/dist/components/z-checkbox.d.ts +39 -0
- package/dist/components/z-citation.d.ts +25 -0
- package/dist/components/z-cluster.d.ts +19 -0
- package/dist/components/z-code-block.d.ts +25 -0
- package/dist/components/z-collapsible.d.ts +30 -0
- package/dist/components/z-color-picker.d.ts +27 -0
- package/dist/components/z-combobox.d.ts +32 -0
- package/dist/components/z-command.d.ts +19 -0
- package/dist/components/z-composer.d.ts +35 -0
- package/dist/components/z-container.d.ts +15 -0
- package/dist/components/z-context-menu.d.ts +19 -0
- package/dist/components/z-conversation-item.d.ts +56 -0
- package/dist/components/z-conversation-list.d.ts +9 -0
- package/dist/components/z-date-divider.d.ts +13 -0
- package/dist/components/z-delivery-status.d.ts +13 -0
- package/dist/components/z-dialog.d.ts +33 -0
- package/dist/components/z-display.d.ts +22 -0
- package/dist/components/z-dock-item.d.ts +16 -0
- package/dist/components/z-dock.d.ts +17 -0
- package/dist/components/z-drag-drop.d.ts +63 -0
- package/dist/components/z-drawer.d.ts +25 -0
- package/dist/components/z-dropzone.d.ts +32 -0
- package/dist/components/z-editor-canvas.d.ts +90 -0
- package/dist/components/z-emoji-picker.d.ts +11 -0
- package/dist/components/z-empty-state.d.ts +19 -0
- package/dist/components/z-eyebrow.d.ts +22 -0
- package/dist/components/z-file-attachment.d.ts +25 -0
- package/dist/components/z-filter.d.ts +30 -0
- package/dist/components/z-grid.d.ts +19 -0
- package/dist/components/z-hover-card.d.ts +26 -0
- package/dist/components/z-image-message.d.ts +24 -0
- package/dist/components/z-input-otp.d.ts +43 -0
- package/dist/components/z-input.d.ts +56 -0
- package/dist/components/z-kbd.d.ts +14 -0
- package/dist/components/z-line.d.ts +13 -0
- package/dist/components/z-link.d.ts +36 -0
- package/dist/components/z-list-row.d.ts +13 -0
- package/dist/components/z-list.d.ts +14 -0
- package/dist/components/z-markdown.d.ts +34 -0
- package/dist/components/z-marquee.d.ts +27 -0
- package/dist/components/z-menu.d.ts +23 -0
- package/dist/components/z-message-actions.d.ts +31 -0
- package/dist/components/z-message-bubble.d.ts +21 -0
- package/dist/components/z-message-group.d.ts +41 -0
- package/dist/components/z-message-list.d.ts +20 -0
- package/dist/components/z-model-picker.d.ts +31 -0
- package/dist/components/z-nav-menu.d.ts +23 -0
- package/dist/components/z-pagination.d.ts +28 -0
- package/dist/components/z-panel.d.ts +33 -0
- package/dist/components/z-pattern-roll.d.ts +74 -0
- package/dist/components/z-piano-roll.d.ts +82 -0
- package/dist/components/z-pointer-follow.d.ts +18 -0
- package/dist/components/z-popover.d.ts +27 -0
- package/dist/components/z-post-meta.d.ts +14 -0
- package/dist/components/z-progress.d.ts +29 -0
- package/dist/components/z-progressive-blur.d.ts +19 -0
- package/dist/components/z-quoted-message.d.ts +32 -0
- package/dist/components/z-radio-group.d.ts +21 -0
- package/dist/components/z-radio.d.ts +25 -0
- package/dist/components/z-range-handle.d.ts +26 -0
- package/dist/components/z-range.d.ts +39 -0
- package/dist/components/z-reactions.d.ts +21 -0
- package/dist/components/z-read-receipt.d.ts +20 -0
- package/dist/components/z-relative-time.d.ts +25 -0
- package/dist/components/z-resizable-panels.d.ts +36 -0
- package/dist/components/z-scroll-area.d.ts +15 -0
- package/dist/components/z-scroll.d.ts +22 -0
- package/dist/components/z-section.d.ts +10 -0
- package/dist/components/z-select.d.ts +40 -0
- package/dist/components/z-send-button.d.ts +23 -0
- package/dist/components/z-separator.d.ts +14 -0
- package/dist/components/z-sheet.d.ts +33 -0
- package/dist/components/z-sidebar.d.ts +31 -0
- package/dist/components/z-skeleton.d.ts +23 -0
- package/dist/components/z-slider.d.ts +47 -0
- package/dist/components/z-sortable.d.ts +31 -0
- package/dist/components/z-sources.d.ts +24 -0
- package/dist/components/z-spacer.d.ts +10 -0
- package/dist/components/z-stack.d.ts +31 -0
- package/dist/components/z-stat.d.ts +37 -0
- package/dist/components/z-status-dot.d.ts +25 -0
- package/dist/components/z-streaming-text.d.ts +28 -0
- package/dist/components/z-suggestion-chips.d.ts +20 -0
- package/dist/components/z-surface.d.ts +37 -0
- package/dist/components/z-swap.d.ts +33 -0
- package/dist/components/z-switch.d.ts +35 -0
- package/dist/components/z-system-message.d.ts +13 -0
- package/dist/components/z-table.d.ts +32 -0
- package/dist/components/z-tabs.d.ts +27 -0
- package/dist/components/z-terminal.d.ts +48 -0
- package/dist/components/z-text.d.ts +166 -0
- package/dist/components/z-textarea.d.ts +54 -0
- package/dist/components/z-thinking.d.ts +28 -0
- package/dist/components/z-toast.d.ts +12 -0
- package/dist/components/z-toggle-group-item.d.ts +58 -0
- package/dist/components/z-toggle-group.d.ts +56 -0
- package/dist/components/z-toggle.d.ts +36 -0
- package/dist/components/z-tool-call.d.ts +31 -0
- package/dist/components/z-toolbar-group.d.ts +13 -0
- package/dist/components/z-toolbar.d.ts +21 -0
- package/dist/components/z-tooltip.d.ts +28 -0
- package/dist/components/z-tree.d.ts +50 -0
- package/dist/components/z-typing-indicator.d.ts +17 -0
- package/dist/components/z-unread-divider.d.ts +17 -0
- package/dist/components/z-virtual-list.d.ts +38 -0
- package/dist/index.d.ts +129 -0
- package/dist/ink.css +1 -0
- package/dist/shared/box-schema.d.ts +261 -0
- package/dist/shared/box-styles.d.ts +6 -0
- package/dist/shared/highlight.d.ts +6 -0
- package/dist/shared/layout-schema.d.ts +20 -0
- package/dist/shared/overlay-styles.d.ts +2 -0
- package/dist/shared/overlay.d.ts +50 -0
- package/dist/shared/toggle-schema.d.ts +52 -0
- package/dist/shared/toggle-styles.d.ts +12 -0
- package/dist/zest.js +24695 -0
- package/package.json +85 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @tasteee/zest
|
|
2
|
+
|
|
3
|
+
> ⚠️ **Pre-release — do not consume yet.** Zest is under active development
|
|
4
|
+
> and published for early testing only. APIs, tag names, attributes, and
|
|
5
|
+
> design tokens may change without notice between versions. Don't depend on
|
|
6
|
+
> it in production until 1.0.
|
|
7
|
+
|
|
8
|
+
A gorgeous, dark-themed, fully-featured, framework-agnostic web component
|
|
9
|
+
library — 135+ custom elements covering layout, forms, overlays, navigation,
|
|
10
|
+
data display, and more. Use it in plain HTML, React, Vue, Svelte, Solid, or
|
|
11
|
+
anywhere else custom elements work (which is everywhere).
|
|
12
|
+
|
|
13
|
+
Zest is built with [Atomico](https://atomicojs.dev) and ships as a **single
|
|
14
|
+
self-contained ESM bundle with zero runtime dependencies** — Atomico and the
|
|
15
|
+
syntax-highlighting libraries are bundled in at build time. There is no
|
|
16
|
+
peer-dependency dance, no plugin, no framework adapter, and no per-component
|
|
17
|
+
imports to manage.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install @tasteee/zest
|
|
23
|
+
# or: pnpm add @tasteee/zest
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Two imports, that's it
|
|
27
|
+
|
|
28
|
+
```js
|
|
29
|
+
import '@tasteee/zest' // registers every <z-*> element
|
|
30
|
+
import '@tasteee/zest/ink.css' // design tokens: CSS custom properties + fonts
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- **`@tasteee/zest`** is a side-effect import. It calls
|
|
34
|
+
`customElements.define(...)` for every element — after that, `<z-button>`,
|
|
35
|
+
`<z-dialog>`, `<z-stack>`, etc. just work as HTML tags. Each component
|
|
36
|
+
carries its own encapsulated styles in its shadow DOM, so nothing leaks in
|
|
37
|
+
or out.
|
|
38
|
+
|
|
39
|
+
- **`@tasteee/zest/ink.css`** defines the document-level design tokens
|
|
40
|
+
(colors, spacing, typography custom properties) that the components read via
|
|
41
|
+
`var(--token)`, and loads the DM Sans / DM Mono fonts.
|
|
42
|
+
|
|
43
|
+
## A taste
|
|
44
|
+
|
|
45
|
+
Everything is just HTML. Attributes follow one consistent grammar across the
|
|
46
|
+
whole library: `tone` picks the color family, `kind` picks the visual
|
|
47
|
+
treatment, `size` picks the scale, and boolean states are `is-*` flags.
|
|
48
|
+
|
|
49
|
+
```html
|
|
50
|
+
<z-button tone="primary">Save</z-button>
|
|
51
|
+
<z-button tone="danger" kind="outline">Delete</z-button>
|
|
52
|
+
<z-button kind="ghost" size="small">Cancel</z-button>
|
|
53
|
+
<z-button tone="primary" is-loading>Saving…</z-button>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Layout is declarative — no wrapper CSS required. `gap` and the `inset*` props
|
|
57
|
+
take a size token (`2xs` `xs` `sm` `md` `lg` `xl` `2xl`…) or any CSS length:
|
|
58
|
+
|
|
59
|
+
```html
|
|
60
|
+
<z-stack gap="md">
|
|
61
|
+
<z-card>One</z-card>
|
|
62
|
+
<z-card>Two</z-card>
|
|
63
|
+
</z-stack>
|
|
64
|
+
|
|
65
|
+
<z-stack is-row gap="sm" aligns-y="center" aligns-x="between">
|
|
66
|
+
<z-text weight="bold">Left</z-text>
|
|
67
|
+
<z-badge tone="success" label="Right"></z-badge>
|
|
68
|
+
</z-stack>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Overlays build on the platform. `z-dialog` wraps the native `<dialog>`
|
|
72
|
+
element, so focus trapping, Esc-to-close, and top-layer stacking come for
|
|
73
|
+
free — wire it up entirely in markup with slots:
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<z-dialog heading="Edit profile" description="Update your details.">
|
|
77
|
+
<z-button slot="trigger">Edit</z-button>
|
|
78
|
+
|
|
79
|
+
<z-input placeholder="Name"></z-input>
|
|
80
|
+
|
|
81
|
+
<div slot="footer">
|
|
82
|
+
<z-button kind="outline" tone="neutral">Cancel</z-button>
|
|
83
|
+
<z-button tone="primary">Save</z-button>
|
|
84
|
+
</div>
|
|
85
|
+
</z-dialog>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Form controls emit `change` events with the value in `event.detail`. Rich
|
|
89
|
+
data (like option lists) is passed as a property:
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<z-select placeholder="Pick a fruit"></z-select>
|
|
93
|
+
<z-switch is-checked></z-switch>
|
|
94
|
+
<z-input placeholder="Email" type="email" is-required></z-input>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```js
|
|
98
|
+
const select = document.querySelector('z-select')
|
|
99
|
+
select.options = [
|
|
100
|
+
{ value: 'apple', label: 'Apple' },
|
|
101
|
+
{ value: 'pear', label: 'Pear' }
|
|
102
|
+
]
|
|
103
|
+
select.addEventListener('change', (e) => console.log(e.detail.value))
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Features
|
|
107
|
+
|
|
108
|
+
- **Framework-agnostic** — custom elements work natively in every framework
|
|
109
|
+
and in plain HTML. No adapters, no wrappers.
|
|
110
|
+
- **Zero runtime dependencies** — one bundled ESM file; nothing else lands in
|
|
111
|
+
your `node_modules` graph.
|
|
112
|
+
- **One consistent API grammar** — `tone` / `kind` / `size` / `is-*` mean the
|
|
113
|
+
same thing on every component, so learning one component teaches you all of
|
|
114
|
+
them.
|
|
115
|
+
- **A real design system** — a shared token scale (colors, spacing,
|
|
116
|
+
typography) drives every component via CSS custom properties, so overriding
|
|
117
|
+
a token restyles the whole library.
|
|
118
|
+
- **Platform-first** — dialogs use `<dialog>`, popovers and menus follow
|
|
119
|
+
native focus and keyboard conventions (arrow keys, Enter/Space, Esc).
|
|
120
|
+
- **Shadow DOM encapsulation** — component styles can't collide with your
|
|
121
|
+
app's CSS, and vice versa.
|
|
122
|
+
- **TypeScript + editor tooling** — ships `.d.ts` declarations and a
|
|
123
|
+
[Custom Elements Manifest](https://github.com/webcomponents/custom-elements-manifest)
|
|
124
|
+
(`custom-elements.json`), so editors that read the manifest autocomplete
|
|
125
|
+
tag names and attributes.
|
|
126
|
+
|
|
127
|
+
## Using it everywhere
|
|
128
|
+
|
|
129
|
+
### React
|
|
130
|
+
|
|
131
|
+
```jsx
|
|
132
|
+
import '@tasteee/zest'
|
|
133
|
+
import '@tasteee/zest/ink.css'
|
|
134
|
+
|
|
135
|
+
export function App() {
|
|
136
|
+
return (
|
|
137
|
+
<z-button tone="primary" onClick={() => console.log('clicked')}>
|
|
138
|
+
Click me
|
|
139
|
+
</z-button>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Plain HTML
|
|
145
|
+
|
|
146
|
+
The bundle is ESM, so the script tag must be `type="module"`:
|
|
147
|
+
|
|
148
|
+
```html
|
|
149
|
+
<link rel="stylesheet" href="/node_modules/@tasteee/zest/dist/ink.css" />
|
|
150
|
+
<script type="module" src="/node_modules/@tasteee/zest/dist/zest.js"></script>
|
|
151
|
+
|
|
152
|
+
<z-button tone="primary">Click me</z-button>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### From a CDN (no build step at all)
|
|
156
|
+
|
|
157
|
+
```html
|
|
158
|
+
<link rel="stylesheet" href="https://esm.sh/@tasteee/zest/ink.css" />
|
|
159
|
+
<script type="module" src="https://esm.sh/@tasteee/zest"></script>
|
|
160
|
+
|
|
161
|
+
<z-button tone="primary">Click me</z-button>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Components
|
|
165
|
+
|
|
166
|
+
Foundation `z-box` `z-text` `z-card` `z-line` `z-separator` ·
|
|
167
|
+
Layout `z-stack` `z-grid` `z-cluster` `z-center` `z-container` `z-section`
|
|
168
|
+
`z-surface` `z-scroll` `z-spacer` ·
|
|
169
|
+
Actions `z-button` `z-button-group` `z-toggle` `z-toggle-group` `z-link` ·
|
|
170
|
+
Forms `z-input` `z-textarea` `z-checkbox` `z-switch` `z-radio` `z-radio-group`
|
|
171
|
+
`z-slider` `z-select` `z-combobox` `z-color-picker` `z-input-otp` ·
|
|
172
|
+
Data display `z-badge` `z-avatar` `z-progress` `z-skeleton` `z-table`
|
|
173
|
+
`z-pagination` `z-stat` ·
|
|
174
|
+
Navigation `z-breadcrumbs` `z-tabs` `z-collapsible` `z-accordion` `z-menu`
|
|
175
|
+
`z-nav-menu` `z-sidebar` ·
|
|
176
|
+
Overlays `z-tooltip` `z-popover` `z-hover-card` `z-dialog` `z-alert-dialog`
|
|
177
|
+
`z-alert` `z-sheet` `z-drawer` `z-context-menu` `z-toast` `z-command` ·
|
|
178
|
+
Specialized `z-empty-state` `z-scroll-area` `z-code-block` `z-post-meta`
|
|
179
|
+
`z-carousel` `z-chart` `z-terminal` `z-piano-roll` `z-pattern-roll`
|
|
180
|
+
|
|
181
|
+
…and many more. Every component has a doc page in [`docs/`](./docs) with
|
|
182
|
+
examples, attribute tables, and event references.
|
|
183
|
+
|
|
184
|
+
## Local development
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
pnpm install
|
|
188
|
+
pnpm dev # rebuilds dist/ on change (vite build --watch)
|
|
189
|
+
pnpm build # dist/zest.js + dist/ink.css + dist/*.d.ts + custom-elements.json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Publishing
|
|
193
|
+
|
|
194
|
+
Run from this directory (`packages/zest`):
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
npm publish
|
|
198
|
+
# prepublishOnly runs the full build automatically
|
|
199
|
+
# publishConfig.access is "public"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
MIT
|