@aceshooting/lyra-ui 2.13.0 → 3.0.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 +83 -26
- package/custom-elements.json +526 -13
- package/dist/components/attachment-chip/attachment-chip.styles.js +2 -2
- package/dist/components/button/button.class.d.ts +7 -9
- package/dist/components/button/button.class.d.ts.map +1 -1
- package/dist/components/button/button.class.js +12 -14
- package/dist/components/button/button.class.js.map +1 -1
- package/dist/components/button/button.styles.d.ts.map +1 -1
- package/dist/components/button/button.styles.js +30 -10
- package/dist/components/button/button.styles.js.map +1 -1
- package/dist/components/callout/callout.class.d.ts +4 -0
- package/dist/components/callout/callout.class.d.ts.map +1 -1
- package/dist/components/callout/callout.class.js +7 -0
- package/dist/components/callout/callout.class.js.map +1 -1
- package/dist/components/callout/callout.styles.d.ts.map +1 -1
- package/dist/components/callout/callout.styles.js +13 -0
- package/dist/components/callout/callout.styles.js.map +1 -1
- package/dist/components/chat-message/chat-message.styles.js +1 -1
- package/dist/components/code-block/code-block.styles.js +1 -1
- package/dist/components/date-picker/date-input.class.d.ts +4 -0
- package/dist/components/date-picker/date-input.class.d.ts.map +1 -1
- package/dist/components/date-picker/date-input.class.js +16 -0
- package/dist/components/date-picker/date-input.class.js.map +1 -1
- package/dist/components/details/details.class.d.ts +7 -2
- package/dist/components/details/details.class.d.ts.map +1 -1
- package/dist/components/details/details.class.js +23 -3
- package/dist/components/details/details.class.js.map +1 -1
- package/dist/components/dialog/dialog.styles.js +1 -1
- package/dist/components/heatmap/heatmap.class.d.ts +27 -0
- package/dist/components/heatmap/heatmap.class.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.class.js +125 -1
- package/dist/components/heatmap/heatmap.class.js.map +1 -1
- package/dist/components/heatmap/heatmap.styles.d.ts.map +1 -1
- package/dist/components/heatmap/heatmap.styles.js +27 -0
- package/dist/components/heatmap/heatmap.styles.js.map +1 -1
- package/dist/components/json-viewer/json-viewer.styles.js +1 -1
- package/dist/components/markdown/markdown.styles.js +1 -1
- package/dist/components/model-select/model-select.class.d.ts +4 -0
- package/dist/components/model-select/model-select.class.d.ts.map +1 -1
- package/dist/components/model-select/model-select.class.js +16 -1
- package/dist/components/model-select/model-select.class.js.map +1 -1
- package/dist/components/overlay/overlay.styles.d.ts.map +1 -1
- package/dist/components/overlay/overlay.styles.js +11 -1
- package/dist/components/overlay/overlay.styles.js.map +1 -1
- package/dist/components/responsive-panel/responsive-panel.styles.js +1 -1
- package/dist/components/segmented/segmented.class.d.ts +6 -4
- package/dist/components/segmented/segmented.class.d.ts.map +1 -1
- package/dist/components/segmented/segmented.class.js +3 -2
- package/dist/components/segmented/segmented.class.js.map +1 -1
- package/dist/components/segmented/segmented.styles.js +1 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.d.ts +13 -6
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.d.ts.map +1 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js +48 -10
- package/dist/components/tool-approval-dialog/tool-approval-dialog.class.js.map +1 -1
- package/dist/components/tool-approval-dialog/tool-approval-dialog.styles.js +1 -1
- package/dist/components/tool-result-dialog/tool-result-dialog.styles.js +1 -1
- package/dist/components/tool-select-dialog/tool-select-dialog.class.d.ts +7 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.class.d.ts.map +1 -1
- package/dist/components/tool-select-dialog/tool-select-dialog.class.js +31 -0
- package/dist/components/tool-select-dialog/tool-select-dialog.class.js.map +1 -1
- package/dist/components/tool-select-dialog/tool-select-dialog.styles.js +1 -1
- package/dist/components/widget/widget.styles.js +1 -1
- package/dist/components/word-cloud/word-cloud.styles.js +4 -4
- package/dist/internal/lyra-element.d.ts +2 -2
- package/dist/internal/lyra-element.js +2 -2
- package/dist/internal/tokens.styles.d.ts.map +1 -1
- package/dist/internal/tokens.styles.js +202 -198
- package/dist/internal/tokens.styles.js.map +1 -1
- package/dist/testing/happy-dom-shims.d.ts +4 -2
- package/dist/testing/happy-dom-shims.d.ts.map +1 -1
- package/dist/testing/happy-dom-shims.js +6 -2
- package/dist/testing/happy-dom-shims.js.map +1 -1
- package/dist/theme.css +58 -0
- package/llms-full.txt +117 -33
- package/llms.txt +9 -8
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -2,24 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/aceshooting/lyra-ui/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
>
|
|
16
|
-
>
|
|
17
|
-
> normally charges — the public API (attributes, slots, events, CSS parts) mirrors Web Awesome's
|
|
18
|
-
> own documented surface under the `lyra-` prefix. Read the migration notes and component entry
|
|
19
|
-
> before treating a migration as a drop-in swap — but every implementation in this package is original
|
|
20
|
-
> (clean-room; no Web Awesome Pro source was ever available to or copied by this project). Most of
|
|
21
|
-
> the library, and all of the Conversation & Agent UI family, has no Web Awesome counterpart to
|
|
22
|
-
> mirror in the first place — see the "Mirrors" column in the tables below.
|
|
5
|
+
**Lyra UI — the free, independent web-component alternative.** A MIT-licensed [Lit](https://lit.dev)
|
|
6
|
+
library for accessible forms, dashboards, charts, data visualization, and Conversation & Agent UI.
|
|
7
|
+
It is a practical open-source alternative to [Shoelace](https://shoelace.style/) and
|
|
8
|
+
[Web Awesome](https://webawesome.com/), with 133 custom elements, native custom-element APIs,
|
|
9
|
+
tree-shakeable imports, its own `--lyra-*` design tokens, built-in localization and RTL support,
|
|
10
|
+
and no runtime dependency on either project.
|
|
11
|
+
|
|
12
|
+
> **Independent implementation.** Lyra is not affiliated with, endorsed by, or a fork or rebrand of
|
|
13
|
+
> Shoelace or Web Awesome. Selected Web Awesome-compatible components retain documented public names
|
|
14
|
+
> under the `lyra-` prefix to make migration easier; component notes identify differences. Shoelace
|
|
15
|
+
> users get a separate `sl-*` migration map because the APIs are not identical. No competitor runtime,
|
|
16
|
+
> theme, token namespace, or source code is required by Lyra.
|
|
23
17
|
|
|
24
18
|
## Install
|
|
25
19
|
|
|
@@ -105,11 +99,12 @@ toast({ message: 'Saved', variant: 'success' });
|
|
|
105
99
|
- **Contributing to this repo itself?** See [`../../AGENTS.md`](../../AGENTS.md) instead — that's a
|
|
106
100
|
contributor guide for agents working *on* lyra-ui, not the same document as the two above.
|
|
107
101
|
|
|
108
|
-
## Migrating from Web Awesome
|
|
102
|
+
## Migrating from Web Awesome or Shoelace
|
|
109
103
|
|
|
110
|
-
For
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
For a component marked with a `wa-*` counterpart in the "Mirrors" column, Lyra keeps the documented
|
|
105
|
+
public vocabulary where practical: attributes, slots, events, CSS parts, and custom properties use
|
|
106
|
+
the same names under the `lyra-` prefix. This makes many migrations a predictable import and tag-name
|
|
107
|
+
change, while the component notes remain authoritative for intentional differences. For example,
|
|
113
108
|
Lyra's combobox uses `with-clear`, while Web Awesome's equivalent uses `clearable`.
|
|
114
109
|
|
|
115
110
|
```
|
|
@@ -117,6 +112,25 @@ Lyra's combobox uses `with-clear`, while Web Awesome's equivalent uses `clearabl
|
|
|
117
112
|
<wa-date-input value="2026-07-15"> → <lyra-date-input value="2026-07-15">
|
|
118
113
|
```
|
|
119
114
|
|
|
115
|
+
Shoelace is now a historical predecessor to Web Awesome, but its component vocabulary remains
|
|
116
|
+
familiar to many teams. Lyra provides a conceptual migration path rather than claiming a drop-in
|
|
117
|
+
`sl-*` replacement:
|
|
118
|
+
|
|
119
|
+
| Shoelace | Lyra | Migration note |
|
|
120
|
+
|---|---|---|
|
|
121
|
+
| `<sl-button>` | `<lyra-button>` | Check `variant`, `appearance`, and loading behavior. |
|
|
122
|
+
| `<sl-input>` / `<sl-textarea>` | `<lyra-input>` / `<lyra-textarea>` | Preserve the native editing and form contract; review label/error markup. |
|
|
123
|
+
| `<sl-select>` / `<sl-option>` | `<lyra-select>` / `<lyra-option>` | Review option and value events. |
|
|
124
|
+
| `<sl-dialog>` / `<sl-drawer>` | `<lyra-dialog>` / `<lyra-drawer>` | Review close reasons, focus behavior, and slots. |
|
|
125
|
+
| `<sl-card>` / `<sl-badge>` / `<sl-callout>` | `<lyra-card>` / `<lyra-badge>` / `<lyra-callout>` | Review appearance tokens and dismiss events. |
|
|
126
|
+
| `<sl-spinner>` / `<sl-progress-bar>` | `<lyra-spinner>` / `<lyra-progress-bar>` | Built-in status copy is localized through Lyra's runtime. |
|
|
127
|
+
|
|
128
|
+
For either migration, update the package import, replace the custom-element prefix, run the
|
|
129
|
+
component's accessibility story, and check its API notes for behavior that cannot be inferred from
|
|
130
|
+
the tag name alone. Lyra's own `--lyra-theme-*` variables are the only theme inputs it reads. For a
|
|
131
|
+
staged Web Awesome migration, map existing values explicitly in application CSS; Lyra does not read
|
|
132
|
+
competitor token variables itself.
|
|
133
|
+
|
|
120
134
|
Everything else in the tables below — marked `— (extra)` — has no Web Awesome equivalent to
|
|
121
135
|
migrate *from* in the first place, so there's nothing to rename: install the package and import
|
|
122
136
|
what you need (see Usage above). That's most of this library, including every dashboard atom
|
|
@@ -130,9 +144,43 @@ Awesome has no chat/agent UI component family at all.
|
|
|
130
144
|
Every component is built on the same three guarantees, verified across the whole library rather
|
|
131
145
|
than opt-in per component:
|
|
132
146
|
|
|
133
|
-
**Theming.** Components read
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
**Theming.** Components read independent `--lyra-theme-*` variables and standalone defaults. Lyra
|
|
148
|
+
does not depend on another library's theme or token namespace. For a ready-made light/dark base
|
|
149
|
+
theme, import `@aceshooting/lyra-ui/theme.css` once and toggle `.lyra-light`/`.lyra-dark` (or the
|
|
150
|
+
matching `data-lyra-theme` attribute) on an ancestor:
|
|
151
|
+
|
|
152
|
+
```css
|
|
153
|
+
@import '@aceshooting/lyra-ui/theme.css';
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
```html
|
|
157
|
+
<body class="lyra-dark">
|
|
158
|
+
<lyra-button variant="brand">Save</lyra-button>
|
|
159
|
+
</body>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Applications can override any `--lyra-theme-*` input directly:
|
|
163
|
+
|
|
164
|
+
```css
|
|
165
|
+
:root {
|
|
166
|
+
--lyra-theme-color-surface-default: #101827;
|
|
167
|
+
--lyra-theme-color-text-normal: #f8fafc;
|
|
168
|
+
--lyra-theme-color-brand-fill-loud: #60a5fa;
|
|
169
|
+
--lyra-theme-font-size-m: 1rem;
|
|
170
|
+
--lyra-theme-border-radius-m: 0.5rem;
|
|
171
|
+
}
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
See `internal/tokens.styles.ts` for the complete shared token list. Component-specific `--lyra-*`
|
|
175
|
+
custom properties remain available for local overrides.
|
|
176
|
+
|
|
177
|
+
**Frontend quality guarantees.** Every component is designed as a native custom element and tested
|
|
178
|
+
for the contract that applies to its shape: semantic roles and accessible names inside shadow DOM,
|
|
179
|
+
keyboard navigation, bubbling/composed public events, native form association and validity, logical
|
|
180
|
+
CSS for RTL, narrow-container layouts, reduced motion, and forced-colors behavior. Form controls
|
|
181
|
+
expose label, hint, error, focus, editing, reset, and validity behavior instead of hiding the useful
|
|
182
|
+
native contract behind a private input. Heavy integrations such as Chart.js, MapLibre, D3, Shiki,
|
|
183
|
+
Markdown, phone-number metadata, and flag artwork remain optional peer dependencies.
|
|
136
184
|
|
|
137
185
|
**Internationalization.** Every built-in string (button labels, status announcements,
|
|
138
186
|
`aria-label`s) resolves through a small runtime, in two ways you can combine:
|
|
@@ -154,10 +202,19 @@ No rebuild, no per-locale bundle, no per-component API to learn — register the
|
|
|
154
202
|
every component that uses that key picks it up reactively, including ones added after your app's
|
|
155
203
|
first render.
|
|
156
204
|
|
|
205
|
+
Lyra's default messages are English fallbacks, while applications own the translated catalog. Date,
|
|
206
|
+
number, byte, relative-time, and calendar formatting use the browser's `Intl` APIs and the resolved
|
|
207
|
+
locale. Consumer-provided labels, values, file names, and message content are never altered by the
|
|
208
|
+
localization layer. The same runtime also covers accessible names, descriptions, validation messages,
|
|
209
|
+
live-region announcements, empty states, status labels, and action buttons; use `.strings` for a
|
|
210
|
+
component-specific override when needed.
|
|
211
|
+
|
|
157
212
|
**RTL.** Set `dir="rtl"` on `<html>` or any ancestor (or just a `lang` whose default direction is
|
|
158
213
|
RTL, e.g. `ar`/`he`/`fa`) — every component mirrors its layout automatically via CSS logical
|
|
159
214
|
properties and swaps directional keyboard navigation (e.g. the arrow keys in a date grid or a
|
|
160
|
-
roving-tabindex list) to match.
|
|
215
|
+
roving-tabindex list) to match. This covers Arabic, Hebrew, Persian, Urdu, and other RTL locales
|
|
216
|
+
through inherited direction; no per-component RTL flag or opt-in is needed. Components do not force
|
|
217
|
+
their own `dir`, so they remain composable inside mixed-direction layouts.
|
|
161
218
|
|
|
162
219
|
## Components
|
|
163
220
|
|