@firstprateek/vastu 0.0.0-stage → 1.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/LICENSE +15 -0
- package/README.md +51 -2
- package/custom-elements.json +3046 -0
- package/dist/dev/all.d.ts +9 -0
- package/dist/dev/all.d.ts.map +1 -0
- package/dist/dev/all.js +10 -0
- package/dist/dev/all.js.map +1 -0
- package/dist/dev/button/button.d.ts +98 -0
- package/dist/dev/button/button.d.ts.map +1 -0
- package/dist/dev/button/button.js +292 -0
- package/dist/dev/button/button.js.map +1 -0
- package/dist/dev/button/index.d.ts +4 -0
- package/dist/dev/button/index.d.ts.map +1 -0
- package/dist/dev/button/index.js +5 -0
- package/dist/dev/button/index.js.map +1 -0
- package/dist/dev/checkbox/checkbox.d.ts +71 -0
- package/dist/dev/checkbox/checkbox.d.ts.map +1 -0
- package/dist/dev/checkbox/checkbox.js +232 -0
- package/dist/dev/checkbox/checkbox.js.map +1 -0
- package/dist/dev/checkbox/index.d.ts +3 -0
- package/dist/dev/checkbox/index.d.ts.map +1 -0
- package/dist/dev/checkbox/index.js +5 -0
- package/dist/dev/checkbox/index.js.map +1 -0
- package/dist/dev/core/define.d.ts +3 -0
- package/dist/dev/core/define.d.ts.map +1 -0
- package/dist/dev/core/define.js +6 -0
- package/dist/dev/core/define.js.map +1 -0
- package/dist/dev/core/dev-mode.d.ts +6 -0
- package/dist/dev/core/dev-mode.d.ts.map +1 -0
- package/dist/dev/core/dev-mode.js +6 -0
- package/dist/dev/core/dev-mode.js.map +1 -0
- package/dist/dev/core/focus-ring.d.ts +3 -0
- package/dist/dev/core/focus-ring.d.ts.map +1 -0
- package/dist/dev/core/focus-ring.js +14 -0
- package/dist/dev/core/focus-ring.js.map +1 -0
- package/dist/dev/core/form-control.d.ts +47 -0
- package/dist/dev/core/form-control.d.ts.map +1 -0
- package/dist/dev/core/form-control.js +75 -0
- package/dist/dev/core/form-control.js.map +1 -0
- package/dist/dev/core/warn.d.ts +12 -0
- package/dist/dev/core/warn.d.ts.map +1 -0
- package/dist/dev/core/warn.js +35 -0
- package/dist/dev/core/warn.js.map +1 -0
- package/dist/dev/dialog/dialog.d.ts +77 -0
- package/dist/dev/dialog/dialog.d.ts.map +1 -0
- package/dist/dev/dialog/dialog.js +253 -0
- package/dist/dev/dialog/dialog.js.map +1 -0
- package/dist/dev/dialog/index.d.ts +4 -0
- package/dist/dev/dialog/index.d.ts.map +1 -0
- package/dist/dev/dialog/index.js +5 -0
- package/dist/dev/dialog/index.js.map +1 -0
- package/dist/dev/menu/index.d.ts +3 -0
- package/dist/dev/menu/index.d.ts.map +1 -0
- package/dist/dev/menu/index.js +5 -0
- package/dist/dev/menu/index.js.map +1 -0
- package/dist/dev/menu/menu.d.ts +71 -0
- package/dist/dev/menu/menu.d.ts.map +1 -0
- package/dist/dev/menu/menu.js +330 -0
- package/dist/dev/menu/menu.js.map +1 -0
- package/dist/dev/switch/index.d.ts +3 -0
- package/dist/dev/switch/index.d.ts.map +1 -0
- package/dist/dev/switch/index.js +5 -0
- package/dist/dev/switch/index.js.map +1 -0
- package/dist/dev/switch/switch.d.ts +69 -0
- package/dist/dev/switch/switch.d.ts.map +1 -0
- package/dist/dev/switch/switch.js +213 -0
- package/dist/dev/switch/switch.js.map +1 -0
- package/dist/dev/tabs/index.d.ts +3 -0
- package/dist/dev/tabs/index.d.ts.map +1 -0
- package/dist/dev/tabs/index.js +5 -0
- package/dist/dev/tabs/index.js.map +1 -0
- package/dist/dev/tabs/tabs.d.ts +64 -0
- package/dist/dev/tabs/tabs.d.ts.map +1 -0
- package/dist/dev/tabs/tabs.js +212 -0
- package/dist/dev/tabs/tabs.js.map +1 -0
- package/dist/dev/text-field/index.d.ts +3 -0
- package/dist/dev/text-field/index.d.ts.map +1 -0
- package/dist/dev/text-field/index.js +5 -0
- package/dist/dev/text-field/index.js.map +1 -0
- package/dist/dev/text-field/text-field.d.ts +91 -0
- package/dist/dev/text-field/text-field.d.ts.map +1 -0
- package/dist/dev/text-field/text-field.js +267 -0
- package/dist/dev/text-field/text-field.js.map +1 -0
- package/dist/dev/toast/index.d.ts +4 -0
- package/dist/dev/toast/index.d.ts.map +1 -0
- package/dist/dev/toast/index.js +5 -0
- package/dist/dev/toast/index.js.map +1 -0
- package/dist/dev/toast/toast.d.ts +71 -0
- package/dist/dev/toast/toast.d.ts.map +1 -0
- package/dist/dev/toast/toast.js +258 -0
- package/dist/dev/toast/toast.js.map +1 -0
- package/dist/prod/all.js +10 -0
- package/dist/prod/button/button.js +292 -0
- package/dist/prod/button/index.js +5 -0
- package/dist/prod/checkbox/checkbox.js +232 -0
- package/dist/prod/checkbox/index.js +5 -0
- package/dist/prod/core/define.js +6 -0
- package/dist/prod/core/dev-mode.js +1 -0
- package/dist/prod/core/focus-ring.js +14 -0
- package/dist/prod/core/form-control.js +75 -0
- package/dist/prod/core/warn.js +2 -0
- package/dist/prod/dialog/dialog.js +253 -0
- package/dist/prod/dialog/index.js +5 -0
- package/dist/prod/menu/index.js +5 -0
- package/dist/prod/menu/menu.js +330 -0
- package/dist/prod/switch/index.js +5 -0
- package/dist/prod/switch/switch.js +213 -0
- package/dist/prod/tabs/index.js +5 -0
- package/dist/prod/tabs/tabs.js +212 -0
- package/dist/prod/text-field/index.js +5 -0
- package/dist/prod/text-field/text-field.js +267 -0
- package/dist/prod/toast/index.js +5 -0
- package/dist/prod/toast/toast.js +258 -0
- package/package.json +95 -3
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { LitElement, css, html, nothing } from 'lit';
|
|
2
|
+
import { repeat } from 'lit/directives/repeat.js';
|
|
3
|
+
import { focusRing } from '../core/focus-ring.js';
|
|
4
|
+
import { checkTokensLoaded, devWarn } from '../core/warn.js';
|
|
5
|
+
const VARIANTS = ['info', 'success', 'error'];
|
|
6
|
+
let nextId = 1;
|
|
7
|
+
/**
|
|
8
|
+
* A region for short, non-blocking status messages ("toasts"). Place one per page and call `show()`,
|
|
9
|
+
* or point a `va-button` at it with `command="--show"`; the button's `value` is the message.
|
|
10
|
+
*
|
|
11
|
+
* @tag va-toast
|
|
12
|
+
* @summary Shows short status messages, such as "Changes saved", without interrupting the user.
|
|
13
|
+
*
|
|
14
|
+
* @csspart region - The fixed area the toasts appear in.
|
|
15
|
+
* @csspart toast - Each message.
|
|
16
|
+
* @csspart close-button - Each message's close button.
|
|
17
|
+
*
|
|
18
|
+
* @cssprop {<color>} --va-toast-bg - Background colour of a message.
|
|
19
|
+
* @cssprop {<color>} --va-toast-fg - Text colour of a message.
|
|
20
|
+
* @cssprop {<length>} --va-toast-radius - Corner radius of a message.
|
|
21
|
+
*
|
|
22
|
+
* @cssprop-applies --va-toast-bg toast:open background-color
|
|
23
|
+
* @cssprop-applies --va-toast-fg toast:open color
|
|
24
|
+
* @cssprop-applies --va-toast-radius toast:open border-top-left-radius
|
|
25
|
+
*
|
|
26
|
+
* @keyboard-items [part~="close-button"]
|
|
27
|
+
* @keyboard open: Escape | closes | Dismisses the message that has focus.
|
|
28
|
+
*
|
|
29
|
+
* @a11y-role status
|
|
30
|
+
* @a11y-name The `accessible-label` attribute, "Notifications" by default (not shown).
|
|
31
|
+
* @a11y-note Info and success messages are announced politely; errors use `role="alert"` and are announced at once.
|
|
32
|
+
* @a11y-note Messages pause their timer while hovered or focused, and errors stay until dismissed (WCAG 2.2.1).
|
|
33
|
+
* @a11y-note While a modal dialog is open, the element moves itself into that dialog (a light-DOM move, so its messages stay clickable and announced) and back to its place when the dialog closes. Don't render it from a framework that would fight the move; place it once, outside framework-managed DOM.
|
|
34
|
+
*
|
|
35
|
+
* @guidance-use To confirm that something happened, such as "Changes saved" or "Link copied", or to report a background failure.
|
|
36
|
+
* @guidance-avoid For anything the user must act on or read in full, or for form validation errors.
|
|
37
|
+
* @guidance-instead `va-dialog` for decisions; `va-text-field`'s `error` for field errors.
|
|
38
|
+
*
|
|
39
|
+
* @command --show | Shows the sending button's `value` as a message. Its `data-toast-variant` sets the look: `info` (default), `success` or `error`.
|
|
40
|
+
* @command-data --show | toast-variant | info success error
|
|
41
|
+
* @fires {CustomEvent<{ id: number, reason: 'timeout' | 'close-button' | 'escape' | 'method' }>} va-dismiss - After a message has closed. `event.detail.id` is the id `show()` returned.
|
|
42
|
+
* @event-trigger va-dismiss | press Escape | open
|
|
43
|
+
*/
|
|
44
|
+
export class VaToast extends LitElement {
|
|
45
|
+
static { this.properties = {
|
|
46
|
+
duration: { type: Number },
|
|
47
|
+
accessibleLabel: { attribute: 'accessible-label' },
|
|
48
|
+
_toasts: { state: true },
|
|
49
|
+
}; }
|
|
50
|
+
constructor() {
|
|
51
|
+
super();
|
|
52
|
+
this.duration = 5000;
|
|
53
|
+
this.accessibleLabel = 'Notifications';
|
|
54
|
+
this._toasts = [];
|
|
55
|
+
this.addEventListener('command', this.#onCommand);
|
|
56
|
+
}
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
super.connectedCallback();
|
|
59
|
+
checkTokensLoaded(this);
|
|
60
|
+
}
|
|
61
|
+
disconnectedCallback() {
|
|
62
|
+
super.disconnectedCallback();
|
|
63
|
+
for (const t of this._toasts)
|
|
64
|
+
clearTimeout(t.timer);
|
|
65
|
+
}
|
|
66
|
+
/** True while at least one message is showing. */
|
|
67
|
+
get hasMessages() {
|
|
68
|
+
return this._toasts.length > 0;
|
|
69
|
+
}
|
|
70
|
+
#home = null;
|
|
71
|
+
#dialogWatch = null;
|
|
72
|
+
/**
|
|
73
|
+
* A modal dialog makes the rest of the page inert, so a toast outside it could be seen but not
|
|
74
|
+
* clicked or read by screen readers. While a modal is open, move into it; move back when it closes.
|
|
75
|
+
*/
|
|
76
|
+
#followModal() {
|
|
77
|
+
const modal = document.querySelector('va-dialog[open], dialog:modal');
|
|
78
|
+
if (!modal || modal.contains(this))
|
|
79
|
+
return;
|
|
80
|
+
if (!this.#home)
|
|
81
|
+
this.#home = { parent: this.parentNode, next: this.nextSibling };
|
|
82
|
+
modal.append(this);
|
|
83
|
+
this.#dialogWatch?.disconnect();
|
|
84
|
+
this.#dialogWatch = new MutationObserver(() => {
|
|
85
|
+
if (modal.hasAttribute('open'))
|
|
86
|
+
return;
|
|
87
|
+
this.#dialogWatch?.disconnect();
|
|
88
|
+
this.#dialogWatch = null;
|
|
89
|
+
const home = this.#home;
|
|
90
|
+
this.#home = null;
|
|
91
|
+
if (home?.parent.isConnected)
|
|
92
|
+
home.parent.insertBefore(this, home.next?.parentNode === home.parent ? home.next : null);
|
|
93
|
+
});
|
|
94
|
+
this.#dialogWatch.observe(modal, { attributes: true, attributeFilter: ['open'] });
|
|
95
|
+
}
|
|
96
|
+
/** Shows a message and returns its id. `variant` defaults to `info`; errors stay until dismissed. */
|
|
97
|
+
show(message, options = {}) {
|
|
98
|
+
this.#followModal();
|
|
99
|
+
const variant = options.variant ?? 'info';
|
|
100
|
+
const duration = variant === 'error' ? 0 : (options.duration ?? this.duration);
|
|
101
|
+
const toast = { id: nextId++, message, variant, duration, remaining: duration, started: 0 };
|
|
102
|
+
this._toasts = [...this._toasts, toast];
|
|
103
|
+
this.#start(toast);
|
|
104
|
+
return toast.id;
|
|
105
|
+
}
|
|
106
|
+
/** Closes one message by id, or every message when no id is given. */
|
|
107
|
+
dismiss(id) {
|
|
108
|
+
for (const t of [...this._toasts])
|
|
109
|
+
if (id === undefined || t.id === id)
|
|
110
|
+
this.#close(t, 'method');
|
|
111
|
+
}
|
|
112
|
+
#onCommand = (event) => {
|
|
113
|
+
if (event.command !== '--show')
|
|
114
|
+
return;
|
|
115
|
+
const source = event.source;
|
|
116
|
+
const message = source?.value || source?.textContent?.trim() || '';
|
|
117
|
+
const asked = source?.getAttribute('data-toast-variant');
|
|
118
|
+
let variant;
|
|
119
|
+
if (asked && VARIANTS.includes(asked))
|
|
120
|
+
variant = asked;
|
|
121
|
+
else if (asked) {
|
|
122
|
+
devWarn('va-toast', `data-toast-variant="${asked}" is not a toast variant, so the message shows as info.`, `Use one of: ${VARIANTS.join(', ')}${asked === 'danger' ? ' (error is the toast for failures)' : ''}.`);
|
|
123
|
+
}
|
|
124
|
+
if (message)
|
|
125
|
+
this.show(message, { variant });
|
|
126
|
+
};
|
|
127
|
+
#start(toast) {
|
|
128
|
+
if (!toast.remaining)
|
|
129
|
+
return;
|
|
130
|
+
toast.started = Date.now();
|
|
131
|
+
toast.timer = setTimeout(() => this.#close(toast, 'timeout'), toast.remaining);
|
|
132
|
+
}
|
|
133
|
+
#pause(toast) {
|
|
134
|
+
if (!toast.timer)
|
|
135
|
+
return;
|
|
136
|
+
clearTimeout(toast.timer);
|
|
137
|
+
toast.timer = undefined;
|
|
138
|
+
toast.remaining = Math.max(1000, toast.remaining - (Date.now() - toast.started));
|
|
139
|
+
}
|
|
140
|
+
#resume(toast, item) {
|
|
141
|
+
// Stay paused while the pointer or focus is still on the message.
|
|
142
|
+
if (item.matches(':hover') || item.matches(':focus-within'))
|
|
143
|
+
return;
|
|
144
|
+
if (!toast.timer)
|
|
145
|
+
this.#start(toast);
|
|
146
|
+
}
|
|
147
|
+
#close(toast, reason) {
|
|
148
|
+
if (!this._toasts.includes(toast))
|
|
149
|
+
return;
|
|
150
|
+
clearTimeout(toast.timer);
|
|
151
|
+
const hadFocus = !!this.shadowRoot?.activeElement;
|
|
152
|
+
this._toasts = this._toasts.filter((t) => t !== toast);
|
|
153
|
+
this.dispatchEvent(new CustomEvent('va-dismiss', { detail: { id: toast.id, reason }, bubbles: true, composed: true }));
|
|
154
|
+
if (hadFocus) {
|
|
155
|
+
// Don't strand focus: move it to the next message, or let it go back to the page.
|
|
156
|
+
this.updateComplete.then(() => this.shadowRoot?.querySelector('.dismiss')?.focus());
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
render() {
|
|
160
|
+
return html `
|
|
161
|
+
<section part="region" class="region" aria-label=${this.accessibleLabel}>
|
|
162
|
+
<ol class="list" role="status" aria-live="polite">
|
|
163
|
+
${repeat(this._toasts, (t) => t.id, (t) => html `
|
|
164
|
+
<li
|
|
165
|
+
part="toast"
|
|
166
|
+
class="toast ${t.variant}"
|
|
167
|
+
role=${t.variant === 'error' ? 'alert' : nothing}
|
|
168
|
+
@mouseenter=${() => this.#pause(t)}
|
|
169
|
+
@mouseleave=${(e) => this.#resume(t, e.currentTarget)}
|
|
170
|
+
@focusin=${() => this.#pause(t)}
|
|
171
|
+
@focusout=${(e) => this.#resume(t, e.currentTarget)}
|
|
172
|
+
@keydown=${(e) => e.key === 'Escape' && this.#close(t, 'escape')}
|
|
173
|
+
>
|
|
174
|
+
<span class="message">${t.message}</span>
|
|
175
|
+
<button part="close-button" class="dismiss" type="button" aria-label="Dismiss" @click=${() => this.#close(t, 'close-button')}>
|
|
176
|
+
<svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 6l12 12M18 6L6 18" /></svg>
|
|
177
|
+
</button>
|
|
178
|
+
</li>
|
|
179
|
+
`)}
|
|
180
|
+
</ol>
|
|
181
|
+
</section>
|
|
182
|
+
`;
|
|
183
|
+
}
|
|
184
|
+
static { this.styles = [
|
|
185
|
+
focusRing,
|
|
186
|
+
css `
|
|
187
|
+
:host {
|
|
188
|
+
position: fixed;
|
|
189
|
+
inset: auto 16px 16px auto;
|
|
190
|
+
z-index: 1000;
|
|
191
|
+
font-family: var(--va-font-family-ui);
|
|
192
|
+
}
|
|
193
|
+
.list {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-direction: column;
|
|
196
|
+
gap: var(--va-space-gap-md);
|
|
197
|
+
margin: 0;
|
|
198
|
+
padding: 0;
|
|
199
|
+
list-style: none;
|
|
200
|
+
}
|
|
201
|
+
.toast {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
gap: var(--va-space-inline-sm);
|
|
205
|
+
min-width: 16rem;
|
|
206
|
+
max-width: min(24rem, calc(100vw - 32px));
|
|
207
|
+
padding: var(--va-space-inline-sm) var(--va-space-inline-sm) var(--va-space-inline-sm) var(--va-space-inline-md);
|
|
208
|
+
border-radius: var(--va-toast-radius, var(--va-radius-surface));
|
|
209
|
+
background-color: var(--va-toast-bg, var(--va-color-text-default));
|
|
210
|
+
color: var(--va-toast-fg, var(--va-color-surface-default));
|
|
211
|
+
box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
|
|
212
|
+
font-size: var(--va-font-size-md);
|
|
213
|
+
}
|
|
214
|
+
.toast.success {
|
|
215
|
+
border-left: 4px solid var(--va-color-accent-default);
|
|
216
|
+
}
|
|
217
|
+
.toast.error {
|
|
218
|
+
background-color: var(--va-toast-bg, var(--va-color-danger-default));
|
|
219
|
+
color: var(--va-toast-fg, var(--va-color-text-on-danger));
|
|
220
|
+
}
|
|
221
|
+
.message {
|
|
222
|
+
flex: 1;
|
|
223
|
+
}
|
|
224
|
+
.dismiss {
|
|
225
|
+
flex: none;
|
|
226
|
+
display: grid;
|
|
227
|
+
place-items: center;
|
|
228
|
+
width: 2rem;
|
|
229
|
+
height: 2rem;
|
|
230
|
+
padding: 0;
|
|
231
|
+
border: none;
|
|
232
|
+
border-radius: var(--va-radius-control);
|
|
233
|
+
background: transparent;
|
|
234
|
+
color: inherit;
|
|
235
|
+
cursor: pointer;
|
|
236
|
+
}
|
|
237
|
+
.dismiss svg {
|
|
238
|
+
width: 1.125rem;
|
|
239
|
+
height: 1.125rem;
|
|
240
|
+
}
|
|
241
|
+
@media (max-width: 480px) {
|
|
242
|
+
:host {
|
|
243
|
+
inset: auto 16px 16px 16px;
|
|
244
|
+
}
|
|
245
|
+
.toast {
|
|
246
|
+
min-width: 0;
|
|
247
|
+
max-width: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
@media (forced-colors: active) {
|
|
251
|
+
.toast {
|
|
252
|
+
border: 2px solid CanvasText;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
`,
|
|
256
|
+
]; }
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=toast.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,98 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firstprateek/vastu",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vastu web components, built with Lit: accessible, themeable through tokens, and described in a manifest that agents can read",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
"./button": {
|
|
8
|
+
"types": "./dist/dev/button/index.d.ts",
|
|
9
|
+
"development": "./dist/dev/button/index.js",
|
|
10
|
+
"default": "./dist/prod/button/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./checkbox": {
|
|
13
|
+
"types": "./dist/dev/checkbox/index.d.ts",
|
|
14
|
+
"development": "./dist/dev/checkbox/index.js",
|
|
15
|
+
"default": "./dist/prod/checkbox/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./dialog": {
|
|
18
|
+
"types": "./dist/dev/dialog/index.d.ts",
|
|
19
|
+
"development": "./dist/dev/dialog/index.js",
|
|
20
|
+
"default": "./dist/prod/dialog/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./menu": {
|
|
23
|
+
"types": "./dist/dev/menu/index.d.ts",
|
|
24
|
+
"development": "./dist/dev/menu/index.js",
|
|
25
|
+
"default": "./dist/prod/menu/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./switch": {
|
|
28
|
+
"types": "./dist/dev/switch/index.d.ts",
|
|
29
|
+
"development": "./dist/dev/switch/index.js",
|
|
30
|
+
"default": "./dist/prod/switch/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./tabs": {
|
|
33
|
+
"types": "./dist/dev/tabs/index.d.ts",
|
|
34
|
+
"development": "./dist/dev/tabs/index.js",
|
|
35
|
+
"default": "./dist/prod/tabs/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./text-field": {
|
|
38
|
+
"types": "./dist/dev/text-field/index.d.ts",
|
|
39
|
+
"development": "./dist/dev/text-field/index.js",
|
|
40
|
+
"default": "./dist/prod/text-field/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./toast": {
|
|
43
|
+
"types": "./dist/dev/toast/index.d.ts",
|
|
44
|
+
"development": "./dist/dev/toast/index.js",
|
|
45
|
+
"default": "./dist/prod/toast/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./all": {
|
|
48
|
+
"types": "./dist/dev/all.d.ts",
|
|
49
|
+
"development": "./dist/dev/all.js",
|
|
50
|
+
"default": "./dist/prod/all.js"
|
|
51
|
+
},
|
|
52
|
+
"./custom-elements.json": "./custom-elements.json"
|
|
53
|
+
},
|
|
54
|
+
"customElements": "custom-elements.json",
|
|
55
|
+
"files": [
|
|
56
|
+
"dist",
|
|
57
|
+
"custom-elements.json",
|
|
58
|
+
"README.md",
|
|
59
|
+
"LICENSE"
|
|
60
|
+
],
|
|
61
|
+
"sideEffects": [
|
|
62
|
+
"./dist/*/*/index.js",
|
|
63
|
+
"./dist/*/all.js"
|
|
64
|
+
],
|
|
65
|
+
"repository": {
|
|
66
|
+
"type": "git",
|
|
67
|
+
"url": "git+https://github.com/firstprateek/vastu.git",
|
|
68
|
+
"directory": "packages/vastu"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://firstprateek.github.io/vastu/",
|
|
71
|
+
"keywords": [
|
|
72
|
+
"web components",
|
|
73
|
+
"lit",
|
|
74
|
+
"design system",
|
|
75
|
+
"accessibility",
|
|
76
|
+
"custom elements"
|
|
77
|
+
],
|
|
78
|
+
"license": "ISC",
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"lit": "^3.3.3"
|
|
81
|
+
},
|
|
82
|
+
"peerDependencies": {
|
|
83
|
+
"@firstprateek/vastu-tokens": "^1.0.0"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
87
|
+
"@firstprateek/vastu-tokens": "^1.0.0",
|
|
88
|
+
"typescript": "~5.9.3"
|
|
89
|
+
},
|
|
90
|
+
"bugs": {
|
|
91
|
+
"url": "https://github.com/firstprateek/vastu/issues"
|
|
92
|
+
},
|
|
93
|
+
"author": "firstprateek",
|
|
94
|
+
"scripts": {
|
|
95
|
+
"build": "node build.js",
|
|
96
|
+
"analyze": "cem analyze --config cem.config.js"
|
|
97
|
+
}
|
|
6
98
|
}
|