@voidable/ui 0.4.0 → 0.5.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +216 -0
  2. package/dist/ui.js +1161 -281
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2,6 +2,11 @@ import { LitElement } from 'lit';
2
2
  import { nothing } from 'lit';
3
3
  import { TemplateResult } from 'lit';
4
4
 
5
+ declare type TagValue = string | {
6
+ text: string;
7
+ color?: string;
8
+ };
9
+
5
10
  /** Collapsible section container for FAQs, settings panels, and long-form content organized into expandable items. */
6
11
  export declare class VoidAccordion extends VoidElement {
7
12
  multiple: boolean;
@@ -21,6 +26,28 @@ export declare class VoidAccordionItem extends VoidElement {
21
26
  render(): TemplateResult<1>;
22
27
  }
23
28
 
29
+ /** Input field with an attached icon button — used for copy-to-clipboard inputs, search boxes, and similar patterns. */
30
+ export declare class VoidActionInput extends VoidElement {
31
+ value: string;
32
+ placeholder: string;
33
+ disabled: boolean;
34
+ readonly: boolean;
35
+ name: string;
36
+ autocomplete: string;
37
+ size: 'sm' | 'md' | 'lg';
38
+ color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
39
+ type: 'text' | 'password';
40
+ icon: string;
41
+ actionLabel: string;
42
+ position: 'left' | 'right';
43
+ tooltipPosition: 'top' | 'bottom' | 'left' | 'right';
44
+ private _renderIcon;
45
+ private _onInput;
46
+ private _onChange;
47
+ private _onAction;
48
+ render(): TemplateResult<1>;
49
+ }
50
+
24
51
  /** Inline contextual message for form validation feedback, permission warnings, and system status notices. */
25
52
  export declare class VoidAlert extends VoidElement {
26
53
  color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
@@ -217,6 +244,62 @@ export declare class VoidCheckboxGroup extends VoidElement {
217
244
  private _handleChildChange;
218
245
  }
219
246
 
247
+ /** Simple expand/collapse panel for FAQ sections, spoiler text, and progressive disclosure of secondary content. */
248
+ export declare class VoidCollapsible extends VoidElement {
249
+ heading: string;
250
+ open: boolean;
251
+ disabled: boolean;
252
+ private _id;
253
+ private _userContent;
254
+ private _didSetup;
255
+ connectedCallback(): void;
256
+ protected updated(changed: Map<string, unknown>): void;
257
+ private _handleClick;
258
+ private _handleKeydown;
259
+ render(): TemplateResult<1>;
260
+ }
261
+
262
+ /** Color selection control with spectrum area, hue slider, hex input, and preset swatches for theme customization and design tools. */
263
+ export declare class VoidColorPicker extends VoidElement {
264
+ value: string;
265
+ disabled: boolean;
266
+ size: 'sm' | 'md' | 'lg';
267
+ swatches: string[];
268
+ showInput: boolean;
269
+ variant: 'default' | 'compact';
270
+ open: boolean;
271
+ private _hue;
272
+ private _saturation;
273
+ private _brightness;
274
+ private _dragging;
275
+ connectedCallback(): void;
276
+ disconnectedCallback(): void;
277
+ private _boundPointerMove;
278
+ private _boundPointerUp;
279
+ private _applyCustomProperties;
280
+ private _hsvToRgb;
281
+ private _hsvToHex;
282
+ private _hexToRgb;
283
+ private _rgbToHsv;
284
+ private _syncFromHex;
285
+ static isValidHex(hex: string): boolean;
286
+ private _updateValue;
287
+ private _onAreaPointerDown;
288
+ private _onHuePointerDown;
289
+ private _onPointerMove;
290
+ private _onPointerUp;
291
+ private _updateAreaFromPointer;
292
+ private _updateHueFromPointer;
293
+ private _onHexInput;
294
+ private _onSwatchClick;
295
+ private _onCompactTriggerClick;
296
+ private _onCompactHexInput;
297
+ private _onDocumentClick;
298
+ protected updated(changed: Map<string, unknown>): void;
299
+ private _renderPicker;
300
+ render(): TemplateResult<1>;
301
+ }
302
+
220
303
  /** Filterable dropdown for long option lists like country selectors, user assignment fields, and tag pickers. */
221
304
  export declare class VoidCombobox extends VoidElement {
222
305
  value: string;
@@ -348,6 +431,27 @@ export declare class VoidDropdownMenuItem extends VoidElement {
348
431
  private _handleKeydown;
349
432
  }
350
433
 
434
+ /** Inline editable text for renaming items, editing headings, and click-to-edit table cells. */
435
+ export declare class VoidEditable extends VoidElement {
436
+ value: string;
437
+ editing: boolean;
438
+ disabled: boolean;
439
+ placeholder: string;
440
+ submitMode: 'blur' | 'enter' | 'both';
441
+ size: 'sm' | 'md' | 'lg';
442
+ private _previousValue;
443
+ connectedCallback(): void;
444
+ disconnectedCallback(): void;
445
+ render(): TemplateResult<1>;
446
+ private _handleClick;
447
+ private _handlePreviewKeydown;
448
+ private _enterEditMode;
449
+ private _handleInputKeydown;
450
+ private _handleBlur;
451
+ private _confirm;
452
+ private _cancel;
453
+ }
454
+
351
455
  export declare class VoidElement extends LitElement {
352
456
  createRenderRoot(): this;
353
457
  }
@@ -409,6 +513,31 @@ export declare class VoidHamburger extends VoidElement {
409
513
  render(): TemplateResult<1>;
410
514
  }
411
515
 
516
+ /** Rich content preview card that appears on hover for user profiles, link previews, and contextual information panels. */
517
+ export declare class VoidHoverCard extends VoidElement {
518
+ open: boolean;
519
+ position: 'top' | 'bottom' | 'left' | 'right';
520
+ openDelay: number;
521
+ closeDelay: number;
522
+ private _triggerEl;
523
+ private _contentNodes;
524
+ private _didSetup;
525
+ private _openTimerId;
526
+ private _closeTimerId;
527
+ connectedCallback(): void;
528
+ disconnectedCallback(): void;
529
+ protected updated(changed: Map<string, unknown>): void;
530
+ private _onTriggerEnter;
531
+ private _onTriggerLeave;
532
+ private _onBodyEnter;
533
+ private _onBodyLeave;
534
+ private _onFocusIn;
535
+ private _onFocusOut;
536
+ private _handleKeydown;
537
+ private _openCard;
538
+ private _closeCard;
539
+ }
540
+
412
541
  /** Badge overlay for notification counts on icons and online presence signals on avatars. */
413
542
  export declare class VoidIndicator extends VoidElement {
414
543
  color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
@@ -534,6 +663,42 @@ export declare class VoidNavBar extends VoidElement {
534
663
  render(): TemplateResult<1>;
535
664
  }
536
665
 
666
+ /** Horizontal navigation bar with dropdown sub-menus for site headers, application nav bars, and mega-menu layouts. */
667
+ export declare class VoidNavMenu extends VoidElement {
668
+ orientation: 'horizontal' | 'vertical';
669
+ width: string;
670
+ connectedCallback(): void;
671
+ disconnectedCallback(): void;
672
+ protected updated(changed: Map<string, unknown>): void;
673
+ private _handleItemOpen;
674
+ private _handleKeydown;
675
+ private _getItems;
676
+ }
677
+
678
+ /** Individual navigation item with optional dropdown content panel for sub-menus and mega-menu layouts. */
679
+ export declare class VoidNavMenuItem extends VoidElement {
680
+ open: boolean;
681
+ disabled: boolean;
682
+ href: string;
683
+ active: boolean;
684
+ private _triggerEl;
685
+ private _contentEl;
686
+ private _contentNodes;
687
+ private _didSetup;
688
+ private _openTimerId;
689
+ private _closeTimerId;
690
+ connectedCallback(): void;
691
+ disconnectedCallback(): void;
692
+ protected updated(changed: Map<string, unknown>): void;
693
+ private _onMouseEnter;
694
+ private _onMouseLeave;
695
+ private _onContentEnter;
696
+ private _onContentLeave;
697
+ private _onOutsideClick;
698
+ private _openDropdown;
699
+ private _closeDropdown;
700
+ }
701
+
537
702
  /** Precise numeric entry for quantity selectors, price fields, and settings with increment/decrement controls. */
538
703
  export declare class VoidNumberInput extends VoidElement {
539
704
  value: number;
@@ -597,6 +762,33 @@ export declare class VoidPanel extends VoidElement {
597
762
  render(): typeof nothing | TemplateResult<1>;
598
763
  }
599
764
 
765
+ /** Single-character input cells for OTP verification codes, PIN entry, and multi-digit confirmation fields. */
766
+ export declare class VoidPinInput extends VoidElement {
767
+ length: number;
768
+ groups: string;
769
+ value: string;
770
+ disabled: boolean;
771
+ mask: boolean;
772
+ type: 'numeric' | 'alphanumeric';
773
+ size: 'sm' | 'md' | 'lg';
774
+ color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
775
+ placeholder: string;
776
+ private get _effectiveLength();
777
+ private get _parsedGroups();
778
+ private _separatorIndices;
779
+ connectedCallback(): void;
780
+ private _getCells;
781
+ private _focusCell;
782
+ private _collectValue;
783
+ private _syncValue;
784
+ private _isValidChar;
785
+ private _onInput;
786
+ private _onKeydown;
787
+ private _onPaste;
788
+ private _onFocus;
789
+ render(): TemplateResult<1>;
790
+ }
791
+
600
792
  /** Anchored overlay for contextual detail and mini-forms that need more room than a tooltip. */
601
793
  export declare class VoidPopover extends VoidElement {
602
794
  open: boolean;
@@ -842,6 +1034,30 @@ export declare class VoidTag extends VoidElement {
842
1034
  private _remove;
843
1035
  }
844
1036
 
1037
+ /** Multi-tag input field for email recipients, category labels, keyword tagging, and comma-separated value entry. */
1038
+ export declare class VoidTagsInput extends VoidElement {
1039
+ value: TagValue[];
1040
+ disabled: boolean;
1041
+ readonly: boolean;
1042
+ max: number;
1043
+ placeholder: string;
1044
+ size: 'sm' | 'md' | 'lg';
1045
+ color: 'default' | 'error' | 'warning' | 'success' | 'info' | 'notice';
1046
+ variant: 'filled' | 'outline';
1047
+ allowDuplicates: boolean;
1048
+ private _tagText;
1049
+ private _tagColor;
1050
+ connectedCallback(): void;
1051
+ render(): TemplateResult<1>;
1052
+ private _focusInput;
1053
+ private _onContainerKeydown;
1054
+ private _addTag;
1055
+ private _removeTag;
1056
+ private _onKeydown;
1057
+ private _onPaste;
1058
+ private _dispatchChange;
1059
+ }
1060
+
845
1061
  /** Multi-line text entry for comment fields, description inputs, and freeform text that needs more than one line. */
846
1062
  export declare class VoidTextarea extends VoidElement {
847
1063
  value: string;