@vanilla-bean/components 1.1.0 → 2.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/Component/Component.js +226 -40
- package/Component/Component.scenarios.js +2 -2
- package/Component/Component.test.js +427 -40
- package/Component/README.md +480 -0
- package/Component/observeElementConnection.js +1 -1
- package/Elem/README.md +373 -0
- package/README.md +2 -2
- package/components/BottomSheet/BottomSheet.js +8 -16
- package/components/BottomSheet/README.md +1 -1
- package/components/Button/Button.js +12 -18
- package/components/Button/Button.lld.md +1 -1
- package/components/Calendar/Calendar.js +139 -59
- package/components/Calendar/CalendarEvent.js +9 -4
- package/components/Calendar/Toolbar.js +28 -20
- package/components/Calendar/index.js +1 -0
- package/components/Code/Code.js +26 -30
- package/components/Code/Code.lld.md +1 -1
- package/components/ColorPicker/ColorPicker.js +58 -58
- package/components/Dialog/Dialog.js +79 -73
- package/components/Dialog/Dialog.lld.md +1 -1
- package/components/Dialog/README.md +10 -10
- package/components/Form/Form.js +21 -17
- package/components/Form/Form.lld.md +2 -2
- package/components/Form/README.md +3 -3
- package/components/Icon/Icon.js +19 -11
- package/components/Input/Input.js +85 -67
- package/components/Input/README.md +7 -9
- package/components/Keyboard/Key.js +7 -10
- package/components/Keyboard/Keyboard.js +38 -46
- package/components/Keyboard/Keyboard.lld.md +1 -1
- package/components/Label/Label.js +52 -50
- package/components/Link/Link.js +14 -20
- package/components/List/List.js +28 -30
- package/components/Menu/Menu.js +19 -10
- package/components/Menu/Menu.lld.md +2 -2
- package/components/Notify/Notify.js +29 -19
- package/components/Notify/Notify.lld.md +2 -2
- package/components/Page/Page.lld.md +1 -1
- package/components/Popover/Popover.js +49 -44
- package/components/RadioButton/RadioButton.js +33 -29
- package/components/RadioButton/RadioButton.lld.md +1 -1
- package/components/Router/README.md +12 -12
- package/components/Router/Router.js +19 -21
- package/components/Select/README.md +5 -5
- package/components/Select/Select.js +25 -31
- package/components/Table/README.md +4 -4
- package/components/Table/Table.js +55 -36
- package/components/Table/Table.lld.md +1 -1
- package/components/TagList/Tag.js +16 -14
- package/components/TagList/TagList.js +15 -8
- package/components/TagList/TagList.lld.md +1 -1
- package/components/Tooltip/Tooltip.js +12 -25
- package/components/TooltipWrapper/TooltipWrapper.js +55 -49
- package/components/TooltipWrapper/TooltipWrapper.lld.md +2 -2
- package/components/Whiteboard/Whiteboard.js +45 -43
- package/components/Whiteboard/Whiteboard.lld.md +1 -1
- package/devTools/build.js +43 -0
- package/devTools/buildTypes.js +322 -0
- package/devTools/createComponent.js +155 -0
- package/devTools/extractJSDoc.js +395 -0
- package/devTools/processTemplate.js +500 -0
- package/devTools/updateComponentIndex.js +16 -0
- package/devTools/updateDemoViewIndex.js +90 -0
- package/eslint.config.cjs +5 -2
- package/index.d.ts +120 -62
- package/package.json +23 -22
- package/spellcheck.config.cjs +3 -0
- package/styled/README.md +329 -0
- package/theme/.test.js +2 -2
- package/theme/README.md +8 -8
- package/theme/colors.js +16 -13
- package/theme/colors.test.js +28 -0
- package/utils/browser.js +1 -1
- package/utils/element.js +2 -2
- package/FontWithASyntaxHighlighter-Regular.woff2 +0 -0
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Minimal type declarations for IDE option-name recognition.
|
|
2
|
-
// These are a projection of the source
|
|
2
|
+
// These are a projection of the source - not a TypeScript implementation.
|
|
3
3
|
// VBC is plain JavaScript. These declarations exist so your IDE can suggest
|
|
4
4
|
// option names while you write. They do not constrain what the library can do.
|
|
5
5
|
|
|
@@ -55,13 +55,14 @@ export declare const theme: Theme;
|
|
|
55
55
|
|
|
56
56
|
// ── Oxject ───────────────────────────────────────────────────────────────────
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
import type {
|
|
59
59
|
OxjectInstance,
|
|
60
60
|
DeriveInstance,
|
|
61
61
|
DeriveOptions,
|
|
62
62
|
Subscription,
|
|
63
63
|
SubscriberSubscription,
|
|
64
64
|
} from '@vanilla-bean/oxject';
|
|
65
|
+
export type { OxjectInstance, DeriveInstance, DeriveOptions, Subscription, SubscriberSubscription };
|
|
65
66
|
export { Oxject, derive } from '@vanilla-bean/oxject';
|
|
66
67
|
|
|
67
68
|
// ── Elem ───────────────────────────────────────────────────────────────────────
|
|
@@ -189,9 +190,33 @@ export declare function styled<T extends typeof Elem>(
|
|
|
189
190
|
|
|
190
191
|
export declare function configured<T extends typeof Elem>(Base: T, options: Partial<ComponentOptions>): T;
|
|
191
192
|
|
|
193
|
+
// ── Calendar support ───────────────────────────────────────────────────────────
|
|
194
|
+
|
|
195
|
+
export declare class CalendarEvent {
|
|
196
|
+
constructor(data: Record<string, any>);
|
|
197
|
+
options: Record<string, any>;
|
|
198
|
+
at: Date;
|
|
199
|
+
label?: string;
|
|
200
|
+
notes?: string;
|
|
201
|
+
color?: string;
|
|
202
|
+
duration?: number;
|
|
203
|
+
recurring?: boolean;
|
|
204
|
+
daily?: boolean;
|
|
205
|
+
whitelist?: Array<string | number | Date>;
|
|
206
|
+
blacklist?: Array<string | number | Date>;
|
|
207
|
+
weekdays?: Record<string, boolean>;
|
|
208
|
+
year: number;
|
|
209
|
+
month: number;
|
|
210
|
+
day: number;
|
|
211
|
+
hour: number;
|
|
212
|
+
minute: number;
|
|
213
|
+
fullDate: string;
|
|
214
|
+
render(type: string, container: HTMLElement, calendar: Component): HTMLElement;
|
|
215
|
+
}
|
|
216
|
+
|
|
192
217
|
// ── GENERATED: Built-in components ────────────────────────────────────────────
|
|
193
|
-
// This section is generated by devTools/buildTypes.js
|
|
194
|
-
// Run `bun run build:types` to regenerate from JSDoc annotations.
|
|
218
|
+
// This section is generated by devTools/buildTypes.js - do not edit manually.
|
|
219
|
+
// Run `bun run build:types` to regenerate from static schema declarations and JSDoc annotations.
|
|
195
220
|
|
|
196
221
|
export interface BottomSheetOptions extends ComponentOptions {
|
|
197
222
|
/** Called when the sheet is dismissed */
|
|
@@ -208,21 +233,21 @@ export declare class BottomSheet extends Component {
|
|
|
208
233
|
hide(): void;
|
|
209
234
|
}
|
|
210
235
|
|
|
211
|
-
export interface ButtonOptions extends
|
|
236
|
+
export interface ButtonOptions extends TooltipWrapperOptions {
|
|
212
237
|
/** FontAwesome icon name (without 'fa-' prefix) */
|
|
213
238
|
icon?: string;
|
|
214
239
|
/** Tooltip text shown on hover */
|
|
215
240
|
tooltip?: string;
|
|
216
241
|
}
|
|
217
242
|
|
|
218
|
-
export declare class Button extends
|
|
243
|
+
export declare class Button extends TooltipWrapper {
|
|
219
244
|
constructor(options?: ButtonOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
220
245
|
}
|
|
221
246
|
|
|
222
247
|
export interface CalendarOptions extends ComponentOptions {
|
|
223
|
-
/** Initial calendar view mode */
|
|
248
|
+
/** Initial calendar view mode (default: "month") */
|
|
224
249
|
view?: 'month' | 'week' | 'day';
|
|
225
|
-
/** Calendar component height */
|
|
250
|
+
/** Calendar component height (default: "420px") */
|
|
226
251
|
height?: string;
|
|
227
252
|
/** Initial year to display, defaults to current year */
|
|
228
253
|
year?: number;
|
|
@@ -232,8 +257,10 @@ export interface CalendarOptions extends ComponentOptions {
|
|
|
232
257
|
day?: number;
|
|
233
258
|
/** Available view modes for toolbar */
|
|
234
259
|
views?: Array<string>;
|
|
235
|
-
/** Whether to display time in 24-hour format in day view */
|
|
260
|
+
/** Whether to display time in 24-hour format in day view (default: false) */
|
|
236
261
|
display24h?: boolean;
|
|
262
|
+
events?: Array<any>;
|
|
263
|
+
weekday?: any;
|
|
237
264
|
}
|
|
238
265
|
|
|
239
266
|
export declare class Calendar extends Component {
|
|
@@ -250,6 +277,8 @@ export declare class Calendar extends Component {
|
|
|
250
277
|
goToDay(): void;
|
|
251
278
|
/** Changes the calendar view mode and updates the display. */
|
|
252
279
|
setView(view: string): Calendar;
|
|
280
|
+
/** Clears the wrapper and renders the current view. */
|
|
281
|
+
renderView(): void;
|
|
253
282
|
/** Retrieves all events occurring on a specific date. */
|
|
254
283
|
eventsAt(date: string | Date): Array<CalendarEvent>;
|
|
255
284
|
/** Adds a new event to the calendar and re-renders. */
|
|
@@ -257,13 +286,13 @@ export declare class Calendar extends Component {
|
|
|
257
286
|
}
|
|
258
287
|
|
|
259
288
|
export interface CodeOptions extends ComponentOptions {
|
|
260
|
-
/** Programming language for syntax highlighting class */
|
|
289
|
+
/** Programming language for syntax highlighting class (default: "javascript") */
|
|
261
290
|
language?: string;
|
|
262
|
-
/** Whether to render as multiline block ('auto' detects newlines) */
|
|
291
|
+
/** Whether to render as multiline block ('auto' detects newlines) (default: "auto") */
|
|
263
292
|
multiline?: string | boolean;
|
|
264
293
|
/** Code content to display */
|
|
265
294
|
code?: string;
|
|
266
|
-
/** Whether to show copy-to-clipboard button */
|
|
295
|
+
/** Whether to show copy-to-clipboard button (default: false) */
|
|
267
296
|
copyButton?: boolean;
|
|
268
297
|
}
|
|
269
298
|
|
|
@@ -271,14 +300,14 @@ export declare class Code extends Component {
|
|
|
271
300
|
constructor(options?: CodeOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
272
301
|
}
|
|
273
302
|
|
|
274
|
-
export interface ColorPickerOptions extends
|
|
275
|
-
/** Initial color value (CSS color, 'random' for random color) */
|
|
303
|
+
export interface ColorPickerOptions extends InputOptions {
|
|
304
|
+
/** Initial color value (CSS color, 'random' for random color) (default: "#666") */
|
|
276
305
|
value?: string;
|
|
277
306
|
/** Array of predefined color values for swatch buttons */
|
|
278
307
|
swatches?: Array<string>;
|
|
279
308
|
}
|
|
280
309
|
|
|
281
|
-
export declare class ColorPicker extends
|
|
310
|
+
export declare class ColorPicker extends Input {
|
|
282
311
|
constructor(options?: ColorPickerOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
283
312
|
/** Changes the color value and triggers change event. */
|
|
284
313
|
change(): void;
|
|
@@ -287,13 +316,13 @@ export declare class ColorPicker extends Component {
|
|
|
287
316
|
}
|
|
288
317
|
|
|
289
318
|
export interface DialogOptions extends ComponentOptions {
|
|
290
|
-
/** Dialog size */
|
|
319
|
+
/** Dialog size (default: "small") */
|
|
291
320
|
size?: 'small' | 'standard' | 'large';
|
|
292
321
|
/** Color variant */
|
|
293
322
|
variant?: 'info' | 'success' | 'warning' | 'error';
|
|
294
|
-
/** Auto-open delay in ms, or false to disable */
|
|
323
|
+
/** Auto-open delay in ms, or false to disable (default: 16) */
|
|
295
324
|
openOnRender?: number | boolean;
|
|
296
|
-
/** Whether to open as modal dialog */
|
|
325
|
+
/** Whether to open as modal dialog (default: true) */
|
|
297
326
|
modal?: boolean;
|
|
298
327
|
/** Header text content */
|
|
299
328
|
header?: string;
|
|
@@ -311,7 +340,7 @@ export interface DialogOptions extends ComponentOptions {
|
|
|
311
340
|
|
|
312
341
|
export declare class Dialog extends Component {
|
|
313
342
|
constructor(options?: DialogOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
314
|
-
/** Content container
|
|
343
|
+
/** Content container - primary injection point for subclass and consumer content. */
|
|
315
344
|
readonly body: Component;
|
|
316
345
|
/** Opens the dialog, either as modal or non-modal */
|
|
317
346
|
open(): void;
|
|
@@ -345,8 +374,30 @@ export declare class Icon extends Component {
|
|
|
345
374
|
|
|
346
375
|
export interface InputOptions extends ComponentOptions {
|
|
347
376
|
/** Input type, auto-detected from value type if not specified */
|
|
348
|
-
type?:
|
|
349
|
-
|
|
377
|
+
type?:
|
|
378
|
+
| 'button'
|
|
379
|
+
| 'checkbox'
|
|
380
|
+
| 'color'
|
|
381
|
+
| 'date'
|
|
382
|
+
| 'datetime-local'
|
|
383
|
+
| 'email'
|
|
384
|
+
| 'file'
|
|
385
|
+
| 'hidden'
|
|
386
|
+
| 'image'
|
|
387
|
+
| 'month'
|
|
388
|
+
| 'number'
|
|
389
|
+
| 'password'
|
|
390
|
+
| 'radio'
|
|
391
|
+
| 'range'
|
|
392
|
+
| 'reset'
|
|
393
|
+
| 'search'
|
|
394
|
+
| 'submit'
|
|
395
|
+
| 'tel'
|
|
396
|
+
| 'text'
|
|
397
|
+
| 'time'
|
|
398
|
+
| 'url'
|
|
399
|
+
| 'week';
|
|
400
|
+
/** Initial input value (default: "") */
|
|
350
401
|
value?: any;
|
|
351
402
|
/** Placeholder text */
|
|
352
403
|
placeholder?: string;
|
|
@@ -356,7 +407,7 @@ export interface InputOptions extends ComponentOptions {
|
|
|
356
407
|
autocapitalize?: string;
|
|
357
408
|
/** Auto-correction behavior */
|
|
358
409
|
autocorrect?: string;
|
|
359
|
-
/** Height for textarea ('auto' for dynamic sizing) */
|
|
410
|
+
/** Height for textarea ('auto' for dynamic sizing) (default: "auto") */
|
|
360
411
|
height?: string | number;
|
|
361
412
|
/** Enable syntax highlighting for textarea */
|
|
362
413
|
syntaxHighlighting?: boolean;
|
|
@@ -375,9 +426,9 @@ export declare class Input extends Component {
|
|
|
375
426
|
}
|
|
376
427
|
|
|
377
428
|
export interface KeyboardOptions extends ComponentOptions {
|
|
378
|
-
/** Initial keyboard layout name */
|
|
429
|
+
/** Initial keyboard layout name (default: "simple") */
|
|
379
430
|
layout?: string;
|
|
380
|
-
/** Whether to provide haptic feedback on key press */
|
|
431
|
+
/** Whether to provide haptic feedback on key press (default: true) */
|
|
381
432
|
tactileResponse?: boolean;
|
|
382
433
|
/** Key configuration object mapping key names to definitions */
|
|
383
434
|
keyDefinitions?: Record<string, any>;
|
|
@@ -397,8 +448,8 @@ export declare class Keyboard extends Component {
|
|
|
397
448
|
onKeyPress(callback: (...args: any[]) => any): (...args: any[]) => any;
|
|
398
449
|
}
|
|
399
450
|
|
|
400
|
-
export interface LabelOptions extends
|
|
401
|
-
/** Label display variant */
|
|
451
|
+
export interface LabelOptions extends TooltipWrapperOptions {
|
|
452
|
+
/** Label display variant (default: "simple") */
|
|
402
453
|
variant?: 'overlay' | 'collapsible' | 'inline' | 'inline-after' | 'simple';
|
|
403
454
|
/** Label text content or label component options */
|
|
404
455
|
label?: string | Record<string, any>;
|
|
@@ -410,13 +461,13 @@ export interface LabelOptions extends ComponentOptions {
|
|
|
410
461
|
tooltip?: string;
|
|
411
462
|
}
|
|
412
463
|
|
|
413
|
-
export declare class Label extends
|
|
464
|
+
export declare class Label extends TooltipWrapper {
|
|
414
465
|
constructor(options?: LabelOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
415
466
|
}
|
|
416
467
|
|
|
417
|
-
export interface LinkOptions extends
|
|
418
|
-
/** Link display variant ('link', 'button') */
|
|
419
|
-
variant?:
|
|
468
|
+
export interface LinkOptions extends TooltipWrapperOptions {
|
|
469
|
+
/** Link display variant ('link', 'button') (default: "link") */
|
|
470
|
+
variant?: 'link' | 'button';
|
|
420
471
|
/** URL to link to */
|
|
421
472
|
href?: string;
|
|
422
473
|
/** Link target attribute */
|
|
@@ -425,7 +476,7 @@ export interface LinkOptions extends ComponentOptions {
|
|
|
425
476
|
tooltip?: Record<string, any> | string;
|
|
426
477
|
}
|
|
427
478
|
|
|
428
|
-
export declare class Link extends
|
|
479
|
+
export declare class Link extends TooltipWrapper {
|
|
429
480
|
constructor(options?: LinkOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
430
481
|
}
|
|
431
482
|
|
|
@@ -442,22 +493,24 @@ export declare class List extends Component {
|
|
|
442
493
|
constructor(options?: ListOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
443
494
|
}
|
|
444
495
|
|
|
445
|
-
export interface MenuOptions extends
|
|
496
|
+
export interface MenuOptions extends ListOptions {
|
|
446
497
|
/** Array of menu items to render */
|
|
447
498
|
items?: Array<any>;
|
|
448
|
-
/** Handler
|
|
499
|
+
/** Handler for the "select" CustomEvent fired when a menu item is activated; the activation event is in event.detail */
|
|
449
500
|
onSelect?: (...args: any[]) => any;
|
|
450
501
|
/** Custom component class for rendering menu items */
|
|
451
502
|
ListItemComponent?: Component;
|
|
503
|
+
/** default: "menu" */
|
|
504
|
+
role?: string;
|
|
452
505
|
}
|
|
453
506
|
|
|
454
|
-
export declare class Menu extends
|
|
507
|
+
export declare class Menu extends List {
|
|
455
508
|
constructor(options?: MenuOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
456
509
|
}
|
|
457
510
|
|
|
458
|
-
export interface NotifyOptions extends
|
|
459
|
-
/** Notification type ('info', 'success', 'warning', 'error') */
|
|
460
|
-
type?:
|
|
511
|
+
export interface NotifyOptions extends PopoverOptions {
|
|
512
|
+
/** Notification type ('info', 'success', 'warning', 'error') (default: "success") */
|
|
513
|
+
type?: 'info' | 'success' | 'warning' | 'error';
|
|
461
514
|
/** Auto-dismiss timeout in milliseconds */
|
|
462
515
|
timeout?: number;
|
|
463
516
|
/** Custom icon name, defaults to type-appropriate icon */
|
|
@@ -468,7 +521,7 @@ export interface NotifyOptions extends ComponentOptions {
|
|
|
468
521
|
y?: number;
|
|
469
522
|
}
|
|
470
523
|
|
|
471
|
-
export declare class Notify extends
|
|
524
|
+
export declare class Notify extends Popover {
|
|
472
525
|
constructor(options?: NotifyOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
473
526
|
}
|
|
474
527
|
|
|
@@ -476,26 +529,28 @@ export declare class Page extends Component {
|
|
|
476
529
|
constructor(options?: ComponentOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
477
530
|
}
|
|
478
531
|
|
|
479
|
-
export interface PopoverOptions extends
|
|
480
|
-
/** Popover state ('auto', 'manual') */
|
|
481
|
-
state?:
|
|
482
|
-
/** Whether to automatically open on render */
|
|
532
|
+
export interface PopoverOptions extends IconOptions {
|
|
533
|
+
/** Popover state ('auto', 'manual') (default: "manual") */
|
|
534
|
+
state?: 'auto' | 'manual';
|
|
535
|
+
/** Whether to automatically open on render (default: true) */
|
|
483
536
|
autoOpen?: boolean;
|
|
484
537
|
/** X position for the popover */
|
|
485
538
|
x?: number;
|
|
486
539
|
/** Y position for the popover */
|
|
487
540
|
y?: number;
|
|
488
|
-
/** Maximum width in pixels */
|
|
541
|
+
/** Maximum width in pixels (default: 264) */
|
|
489
542
|
maxWidth?: number;
|
|
490
|
-
/** Maximum height in pixels */
|
|
543
|
+
/** Maximum height in pixels (default: 132) */
|
|
491
544
|
maxHeight?: number;
|
|
492
545
|
/** Viewport element for edge detection */
|
|
493
546
|
viewport?: HTMLElement;
|
|
494
547
|
/** Icon to display in the popover */
|
|
495
548
|
icon?: string;
|
|
549
|
+
/** default: false */
|
|
550
|
+
outsideClose?: boolean;
|
|
496
551
|
}
|
|
497
552
|
|
|
498
|
-
export declare class Popover extends
|
|
553
|
+
export declare class Popover extends Icon {
|
|
499
554
|
constructor(options?: PopoverOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
500
555
|
/** Checks if the popover is currently open. */
|
|
501
556
|
readonly isOpen: boolean;
|
|
@@ -525,7 +580,7 @@ export interface RouterOptions extends ComponentOptions {
|
|
|
525
580
|
notFound?: Component;
|
|
526
581
|
/** Callback fired when rendering a new view */
|
|
527
582
|
onRenderView?: (...args: any[]) => any;
|
|
528
|
-
/** Routing mode: 'hash' uses URL fragments, 'history' uses pushState */
|
|
583
|
+
/** Routing mode: 'hash' uses URL fragments, 'history' uses pushState (default: "hash") */
|
|
529
584
|
mode?: 'hash' | 'history';
|
|
530
585
|
}
|
|
531
586
|
|
|
@@ -539,14 +594,16 @@ export declare class Router extends Component {
|
|
|
539
594
|
parseRouteParameters(path?: string): Record<string, any>;
|
|
540
595
|
}
|
|
541
596
|
|
|
542
|
-
export interface SelectOptions extends
|
|
597
|
+
export interface SelectOptions extends InputOptions {
|
|
543
598
|
/** Array of select options */
|
|
544
599
|
options?: Array<string | Record<string, any>>;
|
|
545
600
|
/** Currently selected value */
|
|
546
601
|
value?: any;
|
|
602
|
+
/** default: "off" */
|
|
603
|
+
autocomplete?: string;
|
|
547
604
|
}
|
|
548
605
|
|
|
549
|
-
export declare class Select extends
|
|
606
|
+
export declare class Select extends Input {
|
|
550
607
|
constructor(options?: SelectOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
551
608
|
/** Gets the currently selected value with enhanced option handling. */
|
|
552
609
|
readonly value: any;
|
|
@@ -564,7 +621,8 @@ export interface TableOptions extends ComponentOptions {
|
|
|
564
621
|
/** Currently sorted column key */
|
|
565
622
|
sortProperty?: string;
|
|
566
623
|
/** Sort direction ('asc' or 'desc') */
|
|
567
|
-
sortDirection?:
|
|
624
|
+
sortDirection?: 'asc' | 'desc';
|
|
625
|
+
selection?: any;
|
|
568
626
|
}
|
|
569
627
|
|
|
570
628
|
export declare class Table extends Component {
|
|
@@ -572,7 +630,7 @@ export declare class Table extends Component {
|
|
|
572
630
|
}
|
|
573
631
|
|
|
574
632
|
export interface TagListOptions extends ComponentOptions {
|
|
575
|
-
/** Whether tags can be added/removed */
|
|
633
|
+
/** Whether tags can be added/removed (default: false) */
|
|
576
634
|
readOnly?: boolean;
|
|
577
635
|
/** Initial array of tag text values */
|
|
578
636
|
tags?: Array<string>;
|
|
@@ -582,42 +640,42 @@ export declare class TagList extends Component {
|
|
|
582
640
|
constructor(options?: TagListOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
583
641
|
}
|
|
584
642
|
|
|
585
|
-
export interface TooltipOptions extends
|
|
586
|
-
/** Tooltip position relative to parent */
|
|
643
|
+
export interface TooltipOptions extends PopoverOptions {
|
|
644
|
+
/** Tooltip position relative to parent (default: "topRight") */
|
|
587
645
|
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
588
|
-
/** Whether tooltip opens automatically */
|
|
646
|
+
/** Whether tooltip opens automatically (default: false) */
|
|
589
647
|
autoOpen?: boolean;
|
|
590
648
|
/** Icon to display in tooltip */
|
|
591
649
|
icon?: string;
|
|
592
650
|
}
|
|
593
651
|
|
|
594
|
-
export declare class Tooltip extends
|
|
652
|
+
export declare class Tooltip extends Popover {
|
|
595
653
|
constructor(options?: TooltipOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
596
654
|
}
|
|
597
655
|
|
|
598
|
-
export interface TooltipWrapperOptions extends
|
|
656
|
+
export interface TooltipWrapperOptions extends IconOptions {
|
|
599
657
|
/** Tooltip text or configuration object */
|
|
600
658
|
tooltip?: string | Record<string, any>;
|
|
601
659
|
/** Icon to display in the component */
|
|
602
660
|
icon?: string;
|
|
603
661
|
}
|
|
604
662
|
|
|
605
|
-
export declare class TooltipWrapper extends
|
|
663
|
+
export declare class TooltipWrapper extends Icon {
|
|
606
664
|
constructor(options?: TooltipWrapperOptions, ...children: Array<Elem | HTMLElement | string>);
|
|
607
665
|
}
|
|
608
666
|
|
|
609
667
|
export interface WhiteboardOptions extends ComponentOptions {
|
|
610
|
-
/** Canvas background color */
|
|
668
|
+
/** Canvas background color (default: "#FFF") */
|
|
611
669
|
background?: string;
|
|
612
|
-
/** Default drawing color */
|
|
670
|
+
/** Default drawing color (default: "#000") */
|
|
613
671
|
color?: string;
|
|
614
|
-
/** Default line width for drawing */
|
|
672
|
+
/** Default line width for drawing (default: 3) */
|
|
615
673
|
lineWidth?: number;
|
|
616
|
-
/** Canvas width */
|
|
674
|
+
/** Canvas width (default: "200px") */
|
|
617
675
|
width?: string;
|
|
618
|
-
/** Canvas height */
|
|
676
|
+
/** Canvas height (default: "200px") */
|
|
619
677
|
height?: string;
|
|
620
|
-
/** Whether drawing is disabled */
|
|
678
|
+
/** Whether drawing is disabled (default: false) */
|
|
621
679
|
readOnly?: boolean;
|
|
622
680
|
/** Predefined lines to render on the canvas */
|
|
623
681
|
lines?: Array<Record<string, any>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanilla-bean/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"/Component/*.js",
|
|
27
27
|
"/styled/*.js",
|
|
28
28
|
"/plugins/*.js",
|
|
29
|
+
"/devTools/*.js",
|
|
29
30
|
"/components/**/*",
|
|
30
31
|
"/theme/**/*",
|
|
31
32
|
"/utils/**/*",
|
|
@@ -86,36 +87,36 @@
|
|
|
86
87
|
},
|
|
87
88
|
"homepage": "https://github.com/fatlard1993/vanilla-bean-components#readme",
|
|
88
89
|
"dependencies": {
|
|
89
|
-
"@ctrl/tinycolor": "^4.
|
|
90
|
-
"@fontsource-variable/kode-mono": "^5.2.
|
|
91
|
-
"@fortawesome/fontawesome-free": "^7.
|
|
90
|
+
"@ctrl/tinycolor": "^4.2.0",
|
|
91
|
+
"@fontsource-variable/kode-mono": "^5.2.8",
|
|
92
|
+
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
92
93
|
"@vanilla-bean/oxject": "^1.0.0",
|
|
93
|
-
"nanoid": "
|
|
94
|
+
"nanoid": "6"
|
|
94
95
|
},
|
|
95
96
|
"devDependencies": {
|
|
96
|
-
"@
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"@eslint/compat": "^1.3.2",
|
|
100
|
-
"@eslint/js": "^9.33.0",
|
|
101
|
-
"@happy-dom/global-registrator": "^18.0.1",
|
|
97
|
+
"@eslint/compat": "^1.4.1",
|
|
98
|
+
"@eslint/js": "^9.39.5",
|
|
99
|
+
"@happy-dom/global-registrator": "20",
|
|
102
100
|
"@testing-library/dom": "^10.4.1",
|
|
103
|
-
"@testing-library/jest-dom": "^6.
|
|
101
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
104
102
|
"@testing-library/user-event": "^14.6.1",
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
103
|
+
"@vanilla-bean/hypertether": "^1.0.1",
|
|
104
|
+
"baseline-browser-mapping": "^2.10.43",
|
|
105
|
+
"bun-types": "^1.3.14",
|
|
106
|
+
"caniuse-lite": "^1.0.30001805",
|
|
107
|
+
"emoji-js": "^3.9.0",
|
|
108
|
+
"eslint": "^9.39.5",
|
|
109
|
+
"eslint-plugin-compat": "^6.2.1",
|
|
108
110
|
"eslint-plugin-import": "^2.32.0",
|
|
109
|
-
"eslint-plugin-jsdoc": "^54.
|
|
111
|
+
"eslint-plugin-jsdoc": "^54.7.0",
|
|
110
112
|
"eslint-plugin-spellcheck": "0.0.20",
|
|
111
|
-
"eslint-plugin-testing-library": "^7.
|
|
112
|
-
"eslint-plugin-unicorn": "^60.0.0",
|
|
113
|
+
"eslint-plugin-testing-library": "^7.16.2",
|
|
113
114
|
"eslint-plugin-write-good-comments": "^0.2.0",
|
|
114
|
-
"globals": "
|
|
115
|
-
"
|
|
116
|
-
"marked": "
|
|
115
|
+
"globals": "17",
|
|
116
|
+
"happy-dom": "20",
|
|
117
|
+
"marked": "18",
|
|
117
118
|
"moresketchy": "wbern/MoreSketchy.js",
|
|
118
|
-
"prettier": "^3.
|
|
119
|
+
"prettier": "^3.9.5"
|
|
119
120
|
},
|
|
120
121
|
"engines": {
|
|
121
122
|
"node": ">=18"
|