@vonage/vivid 4.18.0 → 4.19.0-preview.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.
@@ -288,6 +288,182 @@
288
288
  }
289
289
  ]
290
290
  },
291
+ {
292
+ "kind": "javascript-module",
293
+ "path": "libs/components/src/lib/action-group/action-group.ts",
294
+ "declarations": [
295
+ {
296
+ "kind": "class",
297
+ "description": "",
298
+ "name": "ActionGroup",
299
+ "cssProperties": [
300
+ {
301
+ "name": "--vvd-action-group-accent-primary",
302
+ "default": "var(--vvd-color-canvas-text)"
303
+ },
304
+ {
305
+ "name": "--vvd-action-group-accent-intermediate",
306
+ "default": "var(--vvd-color-neutral-500)"
307
+ },
308
+ {
309
+ "name": "--vvd-action-group-accent-faint",
310
+ "default": "var(--vvd-color-neutral-50)"
311
+ }
312
+ ],
313
+ "slots": [
314
+ {
315
+ "description": "Default slot.",
316
+ "name": ""
317
+ }
318
+ ],
319
+ "members": [
320
+ {
321
+ "kind": "field",
322
+ "name": "shape",
323
+ "type": {
324
+ "text": "ActionGroupShape | undefined"
325
+ },
326
+ "description": "The shape the ActionGroup should have.",
327
+ "privacy": "public"
328
+ },
329
+ {
330
+ "kind": "field",
331
+ "name": "appearance",
332
+ "type": {
333
+ "text": "ActionGroupAppearance | undefined"
334
+ },
335
+ "description": "The appearance the ActionGroup should have.",
336
+ "privacy": "public"
337
+ },
338
+ {
339
+ "kind": "field",
340
+ "name": "tight",
341
+ "type": {
342
+ "text": "boolean"
343
+ },
344
+ "default": "false",
345
+ "description": "Indicates whether action group should have padding.",
346
+ "privacy": "public"
347
+ },
348
+ {
349
+ "kind": "field",
350
+ "name": "VIVID_VERSION",
351
+ "static": true,
352
+ "default": "__PACKAGE_VERSION__",
353
+ "description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.",
354
+ "type": {
355
+ "text": "string"
356
+ },
357
+ "inheritedFrom": {
358
+ "name": "VividElement",
359
+ "module": "libs/components/src/shared/foundation/vivid-element/vivid-element.ts"
360
+ }
361
+ }
362
+ ],
363
+ "attributes": [
364
+ {
365
+ "name": "shape",
366
+ "type": {
367
+ "text": "ActionGroupShape | undefined"
368
+ },
369
+ "description": "The shape the ActionGroup should have.",
370
+ "fieldName": "shape"
371
+ },
372
+ {
373
+ "name": "appearance",
374
+ "type": {
375
+ "text": "ActionGroupAppearance | undefined"
376
+ },
377
+ "description": "The appearance the ActionGroup should have.",
378
+ "fieldName": "appearance"
379
+ },
380
+ {
381
+ "type": {
382
+ "text": "boolean"
383
+ },
384
+ "default": "false",
385
+ "description": "Indicates whether action group should have padding.",
386
+ "fieldName": "tight"
387
+ }
388
+ ],
389
+ "mixins": [
390
+ {
391
+ "name": "DelegatesAria",
392
+ "module": "/libs/components/src/shared/aria/delegates-aria"
393
+ }
394
+ ],
395
+ "superclass": {
396
+ "name": "VividElement",
397
+ "module": "/libs/components/src/shared/foundation/vivid-element/vivid-element"
398
+ },
399
+ "vividComponent": {
400
+ "public": true,
401
+ "name": "action-group"
402
+ }
403
+ }
404
+ ],
405
+ "exports": [
406
+ {
407
+ "kind": "js",
408
+ "name": "ActionGroup",
409
+ "declaration": {
410
+ "name": "ActionGroup",
411
+ "module": "libs/components/src/lib/action-group/action-group.ts"
412
+ }
413
+ }
414
+ ]
415
+ },
416
+ {
417
+ "kind": "javascript-module",
418
+ "path": "libs/components/src/lib/action-group/definition.ts",
419
+ "declarations": [
420
+ {
421
+ "kind": "variable",
422
+ "name": "registerActionGroup",
423
+ "description": "Registers the action-group elements with the design system.",
424
+ "parameters": [
425
+ {
426
+ "description": "the prefix to use for the component name",
427
+ "name": "prefix"
428
+ }
429
+ ]
430
+ }
431
+ ],
432
+ "exports": [
433
+ {
434
+ "kind": "js",
435
+ "name": "ActionGroupShape",
436
+ "declaration": {
437
+ "name": "ActionGroupShape",
438
+ "module": "./action-group"
439
+ }
440
+ },
441
+ {
442
+ "kind": "js",
443
+ "name": "ActionGroupAppearance",
444
+ "declaration": {
445
+ "name": "ActionGroupAppearance",
446
+ "module": "./action-group"
447
+ }
448
+ },
449
+ {
450
+ "kind": "js",
451
+ "name": "registerActionGroup",
452
+ "declaration": {
453
+ "name": "registerActionGroup",
454
+ "module": "libs/components/src/lib/action-group/definition.ts"
455
+ }
456
+ },
457
+ {
458
+ "kind": "js",
459
+ "name": "VwcActionGroupElement",
460
+ "declaration": {
461
+ "name": "ActionGroup",
462
+ "module": "libs/components/src/lib/action-group/definition.ts"
463
+ }
464
+ }
465
+ ]
466
+ },
291
467
  {
292
468
  "kind": "javascript-module",
293
469
  "path": "libs/components/src/lib/accordion-item/accordion-item.ts",
@@ -530,182 +706,6 @@
530
706
  }
531
707
  ]
532
708
  },
533
- {
534
- "kind": "javascript-module",
535
- "path": "libs/components/src/lib/action-group/action-group.ts",
536
- "declarations": [
537
- {
538
- "kind": "class",
539
- "description": "",
540
- "name": "ActionGroup",
541
- "cssProperties": [
542
- {
543
- "name": "--vvd-action-group-accent-primary",
544
- "default": "var(--vvd-color-canvas-text)"
545
- },
546
- {
547
- "name": "--vvd-action-group-accent-intermediate",
548
- "default": "var(--vvd-color-neutral-500)"
549
- },
550
- {
551
- "name": "--vvd-action-group-accent-faint",
552
- "default": "var(--vvd-color-neutral-50)"
553
- }
554
- ],
555
- "slots": [
556
- {
557
- "description": "Default slot.",
558
- "name": ""
559
- }
560
- ],
561
- "members": [
562
- {
563
- "kind": "field",
564
- "name": "shape",
565
- "type": {
566
- "text": "ActionGroupShape | undefined"
567
- },
568
- "description": "The shape the ActionGroup should have.",
569
- "privacy": "public"
570
- },
571
- {
572
- "kind": "field",
573
- "name": "appearance",
574
- "type": {
575
- "text": "ActionGroupAppearance | undefined"
576
- },
577
- "description": "The appearance the ActionGroup should have.",
578
- "privacy": "public"
579
- },
580
- {
581
- "kind": "field",
582
- "name": "tight",
583
- "type": {
584
- "text": "boolean"
585
- },
586
- "default": "false",
587
- "description": "Indicates whether action group should have padding.",
588
- "privacy": "public"
589
- },
590
- {
591
- "kind": "field",
592
- "name": "VIVID_VERSION",
593
- "static": true,
594
- "default": "__PACKAGE_VERSION__",
595
- "description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.",
596
- "type": {
597
- "text": "string"
598
- },
599
- "inheritedFrom": {
600
- "name": "VividElement",
601
- "module": "libs/components/src/shared/foundation/vivid-element/vivid-element.ts"
602
- }
603
- }
604
- ],
605
- "attributes": [
606
- {
607
- "name": "shape",
608
- "type": {
609
- "text": "ActionGroupShape | undefined"
610
- },
611
- "description": "The shape the ActionGroup should have.",
612
- "fieldName": "shape"
613
- },
614
- {
615
- "name": "appearance",
616
- "type": {
617
- "text": "ActionGroupAppearance | undefined"
618
- },
619
- "description": "The appearance the ActionGroup should have.",
620
- "fieldName": "appearance"
621
- },
622
- {
623
- "type": {
624
- "text": "boolean"
625
- },
626
- "default": "false",
627
- "description": "Indicates whether action group should have padding.",
628
- "fieldName": "tight"
629
- }
630
- ],
631
- "mixins": [
632
- {
633
- "name": "DelegatesAria",
634
- "module": "/libs/components/src/shared/aria/delegates-aria"
635
- }
636
- ],
637
- "superclass": {
638
- "name": "VividElement",
639
- "module": "/libs/components/src/shared/foundation/vivid-element/vivid-element"
640
- },
641
- "vividComponent": {
642
- "public": true,
643
- "name": "action-group"
644
- }
645
- }
646
- ],
647
- "exports": [
648
- {
649
- "kind": "js",
650
- "name": "ActionGroup",
651
- "declaration": {
652
- "name": "ActionGroup",
653
- "module": "libs/components/src/lib/action-group/action-group.ts"
654
- }
655
- }
656
- ]
657
- },
658
- {
659
- "kind": "javascript-module",
660
- "path": "libs/components/src/lib/action-group/definition.ts",
661
- "declarations": [
662
- {
663
- "kind": "variable",
664
- "name": "registerActionGroup",
665
- "description": "Registers the action-group elements with the design system.",
666
- "parameters": [
667
- {
668
- "description": "the prefix to use for the component name",
669
- "name": "prefix"
670
- }
671
- ]
672
- }
673
- ],
674
- "exports": [
675
- {
676
- "kind": "js",
677
- "name": "ActionGroupShape",
678
- "declaration": {
679
- "name": "ActionGroupShape",
680
- "module": "./action-group"
681
- }
682
- },
683
- {
684
- "kind": "js",
685
- "name": "ActionGroupAppearance",
686
- "declaration": {
687
- "name": "ActionGroupAppearance",
688
- "module": "./action-group"
689
- }
690
- },
691
- {
692
- "kind": "js",
693
- "name": "registerActionGroup",
694
- "declaration": {
695
- "name": "registerActionGroup",
696
- "module": "libs/components/src/lib/action-group/definition.ts"
697
- }
698
- },
699
- {
700
- "kind": "js",
701
- "name": "VwcActionGroupElement",
702
- "declaration": {
703
- "name": "ActionGroup",
704
- "module": "libs/components/src/lib/action-group/definition.ts"
705
- }
706
- }
707
- ]
708
- },
709
709
  {
710
710
  "kind": "javascript-module",
711
711
  "path": "libs/components/src/lib/alert/alert.ts",
@@ -13884,6 +13884,26 @@
13884
13884
  },
13885
13885
  "readonly": true
13886
13886
  },
13887
+ {
13888
+ "kind": "field",
13889
+ "name": "_internalHighlightText",
13890
+ "type": {
13891
+ "text": "string"
13892
+ },
13893
+ "default": "''"
13894
+ },
13895
+ {
13896
+ "kind": "field",
13897
+ "name": "highlightText",
13898
+ "type": {
13899
+ "text": "string | undefined"
13900
+ }
13901
+ },
13902
+ {
13903
+ "kind": "field",
13904
+ "name": "_highlightTextToUse",
13905
+ "readonly": true
13906
+ },
13887
13907
  {
13888
13908
  "kind": "field",
13889
13909
  "name": "proxy",
@@ -13942,6 +13962,13 @@
13942
13962
  "text": "string | undefined"
13943
13963
  },
13944
13964
  "fieldName": "_text"
13965
+ },
13966
+ {
13967
+ "name": "highlight-text",
13968
+ "type": {
13969
+ "text": "string | undefined"
13970
+ },
13971
+ "fieldName": "highlightText"
13945
13972
  }
13946
13973
  ],
13947
13974
  "superclass": {
@@ -16909,6 +16936,10 @@
16909
16936
  {
16910
16937
  "description": "Message that appears when no options match the search query.",
16911
16938
  "name": "no-matches"
16939
+ },
16940
+ {
16941
+ "description": "Message that appears when no options are loading.",
16942
+ "name": "loading-options"
16912
16943
  }
16913
16944
  ],
16914
16945
  "members": [
@@ -17057,6 +17088,11 @@
17057
17088
  "name": "selectedOptions",
17058
17089
  "readonly": true
17059
17090
  },
17091
+ {
17092
+ "kind": "field",
17093
+ "name": "searchText",
17094
+ "readonly": true
17095
+ },
17060
17096
  {
17061
17097
  "kind": "field",
17062
17098
  "name": "#slottedOptionsChangeHandler",
@@ -17114,8 +17150,14 @@
17114
17150
  },
17115
17151
  {
17116
17152
  "kind": "field",
17117
- "name": "#suppressFilter",
17118
- "privacy": "private",
17153
+ "name": "filterOption",
17154
+ "type": {
17155
+ "text": "(\n\t\toption: ListboxOption,\n\t\tsearchText: string\n\t) => boolean | undefined"
17156
+ }
17157
+ },
17158
+ {
17159
+ "kind": "field",
17160
+ "name": "loading",
17119
17161
  "type": {
17120
17162
  "text": "boolean"
17121
17163
  },
@@ -17288,6 +17330,13 @@
17288
17330
  "description": "Fired when the selected options change",
17289
17331
  "name": "input"
17290
17332
  },
17333
+ {
17334
+ "type": {
17335
+ "text": "CustomEvent<undefined>"
17336
+ },
17337
+ "description": "Fired when the search text changes",
17338
+ "name": "input:search-text"
17339
+ },
17291
17340
  {
17292
17341
  "type": {
17293
17342
  "text": "CustomEvent<undefined>"
@@ -17356,6 +17405,13 @@
17356
17405
  "default": "null",
17357
17406
  "fieldName": "maxLines"
17358
17407
  },
17408
+ {
17409
+ "type": {
17410
+ "text": "boolean"
17411
+ },
17412
+ "default": "false",
17413
+ "fieldName": "loading"
17414
+ },
17359
17415
  {
17360
17416
  "type": {
17361
17417
  "text": "boolean"
@@ -23,6 +23,9 @@ export declare class ListboxOption extends VividElement {
23
23
  set value(next: string);
24
24
  get value(): string;
25
25
  get form(): HTMLFormElement | null;
26
+ _internalHighlightText: string;
27
+ highlightText?: string;
28
+ get _highlightTextToUse(): string;
26
29
  constructor(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean);
27
30
  }
28
31
  export interface ListboxOption extends AffixIconWithTrailing {
@@ -20,6 +20,9 @@ export declare class SearchableSelect extends FormAssociatedSearchableSelect {
20
20
  set selectedIndex(index: number);
21
21
  get options(): ListboxOption[];
22
22
  get selectedOptions(): ListboxOption[];
23
+ get searchText(): string;
24
+ filterOption?: (option: ListboxOption, searchText: string) => boolean;
25
+ loading: boolean;
23
26
  clearable: boolean;
24
27
  setFormValue: (value: File | string | FormData | null, state?: File | string | FormData | null) => void;
25
28
  connectedCallback(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonage/vivid",
3
- "version": "4.18.0",
3
+ "version": "4.19.0-preview.0",
4
4
  "type": "module",
5
5
  "module": "./index.js",
6
6
  "main": "./index.cjs",
@@ -24,6 +24,7 @@ const ListboxOptionTemplate = (context) => {
24
24
  aria-checked="${(x) => x.checked}"
25
25
  aria-selected="${(x) => x.selected}"
26
26
  aria-disabled="${(x) => x.disabled}"
27
+ style="${(x) => x._hidden ? "display: none" : ""}"
27
28
  >
28
29
  <div class="${getClasses}">
29
30
  ${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
@@ -31,7 +32,7 @@ const ListboxOptionTemplate = (context) => {
31
32
  (x) => x.text,
32
33
  vividElement.html`<div class="text">
33
34
  ${when.when(
34
- (x) => x._matchedRange,
35
+ (x) => x._highlightTextToUse,
35
36
  vividElement.html`${(x) => x.text.slice(0, x._matchedRangeSafe.from)}<span class="match"
36
37
  >${(x) => x.text.slice(
37
38
  x._matchedRangeSafe.from,
@@ -22,6 +22,7 @@ const ListboxOptionTemplate = (context) => {
22
22
  aria-checked="${(x) => x.checked}"
23
23
  aria-selected="${(x) => x.selected}"
24
24
  aria-disabled="${(x) => x.disabled}"
25
+ style="${(x) => x._hidden ? "display: none" : ""}"
25
26
  >
26
27
  <div class="${getClasses}">
27
28
  ${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
@@ -29,7 +30,7 @@ const ListboxOptionTemplate = (context) => {
29
30
  (x) => x.text,
30
31
  html`<div class="text">
31
32
  ${when(
32
- (x) => x._matchedRange,
33
+ (x) => x._highlightTextToUse,
33
34
  html`${(x) => x.text.slice(0, x._matchedRangeSafe.from)}<span class="match"
34
35
  >${(x) => x.text.slice(
35
36
  x._matchedRangeSafe.from,