@uibit/carousel 0.1.0 → 0.2.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 +10 -0
- package/custom-elements.json +488 -4
- package/dist/carousel.d.ts +26 -1
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +26 -1
- package/dist/carousel.js.map +1 -1
- package/dist/frameworks/angular/index.ts +86 -68
- package/dist/frameworks/astro/index.d.ts +14 -1
- package/dist/frameworks/preact/index.d.ts +3 -0
- package/dist/frameworks/react/index.ts +182 -0
- package/dist/frameworks/solid/index.d.ts +2 -1
- package/dist/frameworks/stencil/index.d.ts +3 -0
- package/dist/frameworks/svelte/index.svelte +89 -31
- package/dist/frameworks/vue/index.ts +191 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -7
- package/dist/frameworks/react/index.d.ts +0 -27
package/README.md
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
# Carousel
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@uibit/carousel)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
[Interactive Demonstration](https://rawlings.github.io/uibit/components/carousel)
|
|
4
7
|
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @uibit/carousel
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
|
|
5
15
|
Carousel provides a fluid and responsive content presentation display that invites exploration. With smooth transitions, touch responsiveness, and elegant pagination control, it showcases visual content without cluttering the interface structure.
|
|
6
16
|
|
|
7
17
|
## Value Delivery
|
package/custom-elements.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"declarations": [
|
|
9
9
|
{
|
|
10
10
|
"kind": "class",
|
|
11
|
-
"description": "Accessible, scroll-driven carousel with keyboard navigation, auto-play
|
|
11
|
+
"description": "Accessible, scroll-driven carousel with keyboard navigation, auto-play,",
|
|
12
12
|
"name": "UIBitCarousel",
|
|
13
13
|
"cssProperties": [
|
|
14
14
|
{
|
|
@@ -350,11 +350,13 @@
|
|
|
350
350
|
},
|
|
351
351
|
{
|
|
352
352
|
"kind": "method",
|
|
353
|
-
"name": "prev"
|
|
353
|
+
"name": "prev",
|
|
354
|
+
"description": "\n\nReturns the carousel to the previous slide."
|
|
354
355
|
},
|
|
355
356
|
{
|
|
356
357
|
"kind": "method",
|
|
357
|
-
"name": "next"
|
|
358
|
+
"name": "next",
|
|
359
|
+
"description": "\n\nAdvances the carousel to the next slide."
|
|
358
360
|
},
|
|
359
361
|
{
|
|
360
362
|
"kind": "method",
|
|
@@ -366,7 +368,8 @@
|
|
|
366
368
|
"text": "number"
|
|
367
369
|
}
|
|
368
370
|
}
|
|
369
|
-
]
|
|
371
|
+
],
|
|
372
|
+
"description": "\n\nNavigates the carousel to a specific slide index."
|
|
370
373
|
},
|
|
371
374
|
{
|
|
372
375
|
"kind": "method",
|
|
@@ -390,6 +393,211 @@
|
|
|
390
393
|
"kind": "method",
|
|
391
394
|
"name": "handleSlotChange",
|
|
392
395
|
"privacy": "private"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
"kind": "field",
|
|
399
|
+
"name": "locale",
|
|
400
|
+
"type": {
|
|
401
|
+
"text": "string"
|
|
402
|
+
},
|
|
403
|
+
"default": "''",
|
|
404
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
405
|
+
"attribute": "locale",
|
|
406
|
+
"inheritedFrom": {
|
|
407
|
+
"name": "UIBitElement",
|
|
408
|
+
"module": "../../platform/core/src/element.ts"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"kind": "field",
|
|
413
|
+
"name": "resolvedLocale",
|
|
414
|
+
"type": {
|
|
415
|
+
"text": "string | undefined"
|
|
416
|
+
},
|
|
417
|
+
"description": "Resolves the active locale for formatting and localization.\nChecks the `locale` property first, then traverses up the DOM to find\nthe nearest ancestor with a `lang` attribute, and finally falls back\nto undefined (which defaults to browser locale).",
|
|
418
|
+
"readonly": true,
|
|
419
|
+
"inheritedFrom": {
|
|
420
|
+
"name": "UIBitElement",
|
|
421
|
+
"module": "../../platform/core/src/element.ts"
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"kind": "field",
|
|
426
|
+
"name": "_disposables",
|
|
427
|
+
"type": {
|
|
428
|
+
"text": "Set<() => void>"
|
|
429
|
+
},
|
|
430
|
+
"privacy": "private",
|
|
431
|
+
"default": "new Set()",
|
|
432
|
+
"inheritedFrom": {
|
|
433
|
+
"name": "UIBitElement",
|
|
434
|
+
"module": "../../platform/core/src/element.ts"
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"kind": "method",
|
|
439
|
+
"name": "createProperty",
|
|
440
|
+
"static": true,
|
|
441
|
+
"parameters": [
|
|
442
|
+
{
|
|
443
|
+
"name": "name",
|
|
444
|
+
"type": {
|
|
445
|
+
"text": "PropertyKey"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "options",
|
|
450
|
+
"optional": true,
|
|
451
|
+
"type": {
|
|
452
|
+
"text": "PropertyDeclaration"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default.",
|
|
457
|
+
"inheritedFrom": {
|
|
458
|
+
"name": "UIBitElement",
|
|
459
|
+
"module": "../../platform/core/src/element.ts"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"kind": "method",
|
|
464
|
+
"name": "finalizeStyles",
|
|
465
|
+
"static": true,
|
|
466
|
+
"return": {
|
|
467
|
+
"type": {
|
|
468
|
+
"text": "Array<any>"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"parameters": [
|
|
472
|
+
{
|
|
473
|
+
"name": "styles",
|
|
474
|
+
"optional": true,
|
|
475
|
+
"type": {
|
|
476
|
+
"text": "CSSResultGroup"
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
],
|
|
480
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles.",
|
|
481
|
+
"inheritedFrom": {
|
|
482
|
+
"name": "UIBitElement",
|
|
483
|
+
"module": "../../platform/core/src/element.ts"
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"kind": "method",
|
|
488
|
+
"name": "dispatchCustomEvent",
|
|
489
|
+
"return": {
|
|
490
|
+
"type": {
|
|
491
|
+
"text": "boolean"
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
"parameters": [
|
|
495
|
+
{
|
|
496
|
+
"name": "name",
|
|
497
|
+
"type": {
|
|
498
|
+
"text": "string"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "detail",
|
|
503
|
+
"optional": true,
|
|
504
|
+
"type": {
|
|
505
|
+
"text": "T"
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"name": "options",
|
|
510
|
+
"optional": true,
|
|
511
|
+
"type": {
|
|
512
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options.",
|
|
517
|
+
"inheritedFrom": {
|
|
518
|
+
"name": "UIBitElement",
|
|
519
|
+
"module": "../../platform/core/src/element.ts"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "method",
|
|
524
|
+
"name": "getCssPropertyValue",
|
|
525
|
+
"return": {
|
|
526
|
+
"type": {
|
|
527
|
+
"text": "string"
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"parameters": [
|
|
531
|
+
{
|
|
532
|
+
"name": "propertyName",
|
|
533
|
+
"type": {
|
|
534
|
+
"text": "string"
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
],
|
|
538
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element.",
|
|
539
|
+
"inheritedFrom": {
|
|
540
|
+
"name": "UIBitElement",
|
|
541
|
+
"module": "../../platform/core/src/element.ts"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"kind": "method",
|
|
546
|
+
"name": "registerDisposable",
|
|
547
|
+
"parameters": [
|
|
548
|
+
{
|
|
549
|
+
"name": "cleanup",
|
|
550
|
+
"type": {
|
|
551
|
+
"text": "() => void"
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
],
|
|
555
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM.",
|
|
556
|
+
"inheritedFrom": {
|
|
557
|
+
"name": "UIBitElement",
|
|
558
|
+
"module": "../../platform/core/src/element.ts"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"kind": "method",
|
|
563
|
+
"name": "listen",
|
|
564
|
+
"return": {
|
|
565
|
+
"type": {
|
|
566
|
+
"text": "() => void"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"parameters": [
|
|
570
|
+
{
|
|
571
|
+
"name": "target",
|
|
572
|
+
"type": {
|
|
573
|
+
"text": "EventTarget"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
"name": "type",
|
|
578
|
+
"type": {
|
|
579
|
+
"text": "K"
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "listener",
|
|
584
|
+
"type": {
|
|
585
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "options",
|
|
590
|
+
"optional": true,
|
|
591
|
+
"type": {
|
|
592
|
+
"text": "boolean | AddEventListenerOptions"
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
],
|
|
596
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected.",
|
|
597
|
+
"inheritedFrom": {
|
|
598
|
+
"name": "UIBitElement",
|
|
599
|
+
"module": "../../platform/core/src/element.ts"
|
|
600
|
+
}
|
|
393
601
|
}
|
|
394
602
|
],
|
|
395
603
|
"events": [
|
|
@@ -428,12 +636,36 @@
|
|
|
428
636
|
"default": "true",
|
|
429
637
|
"description": "When `true`, the carousel wraps from the last slide back to the first.",
|
|
430
638
|
"fieldName": "loop"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"name": "locale",
|
|
642
|
+
"type": {
|
|
643
|
+
"text": "string"
|
|
644
|
+
},
|
|
645
|
+
"default": "''",
|
|
646
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
647
|
+
"fieldName": "locale",
|
|
648
|
+
"inheritedFrom": {
|
|
649
|
+
"name": "UIBitElement",
|
|
650
|
+
"module": "../../platform/core/src/element.ts"
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
],
|
|
654
|
+
"cssStates": [
|
|
655
|
+
{
|
|
656
|
+
"name": "playing",
|
|
657
|
+
"description": "Active when auto-play is running."
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"name": "dragging",
|
|
661
|
+
"description": "Active when dragging viewport."
|
|
431
662
|
}
|
|
432
663
|
],
|
|
433
664
|
"superclass": {
|
|
434
665
|
"name": "UIBitElement",
|
|
435
666
|
"package": "@uibit/core"
|
|
436
667
|
},
|
|
668
|
+
"summary": "A premium, scroll-driven carousel component with full accessibility controls.\nand configurable items-per-view via CSS custom properties.",
|
|
437
669
|
"tagName": "uibit-carousel",
|
|
438
670
|
"customElement": true
|
|
439
671
|
}
|
|
@@ -478,6 +710,14 @@
|
|
|
478
710
|
"module": "./carousel"
|
|
479
711
|
}
|
|
480
712
|
},
|
|
713
|
+
{
|
|
714
|
+
"kind": "js",
|
|
715
|
+
"name": "UIBitCarousel",
|
|
716
|
+
"declaration": {
|
|
717
|
+
"name": "UIBitCarousel",
|
|
718
|
+
"module": "./carousel"
|
|
719
|
+
}
|
|
720
|
+
},
|
|
481
721
|
{
|
|
482
722
|
"kind": "js",
|
|
483
723
|
"name": "CarouselConfig",
|
|
@@ -522,6 +762,250 @@
|
|
|
522
762
|
"path": "src/types.ts",
|
|
523
763
|
"declarations": [],
|
|
524
764
|
"exports": []
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
"kind": "javascript-module",
|
|
768
|
+
"path": "../../platform/core/src/element.ts",
|
|
769
|
+
"declarations": [
|
|
770
|
+
{
|
|
771
|
+
"kind": "class",
|
|
772
|
+
"description": "A foundational base class for all UIBit web components.\nProvides custom event helpers, default kebab-case attribute mapping,\nautomatic cleanup/disposable tracking, and auto-injected reset styles.",
|
|
773
|
+
"name": "UIBitElement",
|
|
774
|
+
"members": [
|
|
775
|
+
{
|
|
776
|
+
"kind": "field",
|
|
777
|
+
"name": "locale",
|
|
778
|
+
"type": {
|
|
779
|
+
"text": "string"
|
|
780
|
+
},
|
|
781
|
+
"default": "''",
|
|
782
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
783
|
+
"attribute": "locale"
|
|
784
|
+
},
|
|
785
|
+
{
|
|
786
|
+
"kind": "field",
|
|
787
|
+
"name": "resolvedLocale",
|
|
788
|
+
"type": {
|
|
789
|
+
"text": "string | undefined"
|
|
790
|
+
},
|
|
791
|
+
"description": "Resolves the active locale for formatting and localization.\nChecks the `locale` property first, then traverses up the DOM to find\nthe nearest ancestor with a `lang` attribute, and finally falls back\nto undefined (which defaults to browser locale).",
|
|
792
|
+
"readonly": true
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"kind": "field",
|
|
796
|
+
"name": "_disposables",
|
|
797
|
+
"type": {
|
|
798
|
+
"text": "Set<() => void>"
|
|
799
|
+
},
|
|
800
|
+
"privacy": "private",
|
|
801
|
+
"default": "new Set()"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"kind": "method",
|
|
805
|
+
"name": "createProperty",
|
|
806
|
+
"static": true,
|
|
807
|
+
"parameters": [
|
|
808
|
+
{
|
|
809
|
+
"name": "name",
|
|
810
|
+
"type": {
|
|
811
|
+
"text": "PropertyKey"
|
|
812
|
+
}
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
"name": "options",
|
|
816
|
+
"optional": true,
|
|
817
|
+
"type": {
|
|
818
|
+
"text": "PropertyDeclaration"
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
],
|
|
822
|
+
"description": "Overrides createProperty to automatically map camelCase property names\nto kebab-case attribute names by default."
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
"kind": "method",
|
|
826
|
+
"name": "finalizeStyles",
|
|
827
|
+
"static": true,
|
|
828
|
+
"return": {
|
|
829
|
+
"type": {
|
|
830
|
+
"text": "Array<any>"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"parameters": [
|
|
834
|
+
{
|
|
835
|
+
"name": "styles",
|
|
836
|
+
"optional": true,
|
|
837
|
+
"type": {
|
|
838
|
+
"text": "CSSResultGroup"
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"description": "Automatically prepends basic layout resets (border-box) to the\ncomponent's final styles."
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"kind": "method",
|
|
846
|
+
"name": "dispatchCustomEvent",
|
|
847
|
+
"return": {
|
|
848
|
+
"type": {
|
|
849
|
+
"text": "boolean"
|
|
850
|
+
}
|
|
851
|
+
},
|
|
852
|
+
"parameters": [
|
|
853
|
+
{
|
|
854
|
+
"name": "name",
|
|
855
|
+
"type": {
|
|
856
|
+
"text": "string"
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"name": "detail",
|
|
861
|
+
"optional": true,
|
|
862
|
+
"type": {
|
|
863
|
+
"text": "T"
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "options",
|
|
868
|
+
"optional": true,
|
|
869
|
+
"type": {
|
|
870
|
+
"text": "Omit<CustomEventInit<T>, 'detail'>"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
],
|
|
874
|
+
"description": "Helper to dispatch a custom event with standard bubbles and composed options."
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"kind": "method",
|
|
878
|
+
"name": "getCssPropertyValue",
|
|
879
|
+
"return": {
|
|
880
|
+
"type": {
|
|
881
|
+
"text": "string"
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"parameters": [
|
|
885
|
+
{
|
|
886
|
+
"name": "propertyName",
|
|
887
|
+
"type": {
|
|
888
|
+
"text": "string"
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"description": "Helper to retrieve a computed CSS custom property value from the element."
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"kind": "method",
|
|
896
|
+
"name": "registerDisposable",
|
|
897
|
+
"parameters": [
|
|
898
|
+
{
|
|
899
|
+
"name": "cleanup",
|
|
900
|
+
"type": {
|
|
901
|
+
"text": "() => void"
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
"description": "Register a cleanup function to be executed when the element is disconnected from the DOM."
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"kind": "method",
|
|
909
|
+
"name": "listen",
|
|
910
|
+
"return": {
|
|
911
|
+
"type": {
|
|
912
|
+
"text": "() => void"
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"parameters": [
|
|
916
|
+
{
|
|
917
|
+
"name": "target",
|
|
918
|
+
"type": {
|
|
919
|
+
"text": "EventTarget"
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"name": "type",
|
|
924
|
+
"type": {
|
|
925
|
+
"text": "K"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
"name": "listener",
|
|
930
|
+
"type": {
|
|
931
|
+
"text": "(this: EventTarget, ev: HTMLElementEventMap[K]) => any"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"name": "options",
|
|
936
|
+
"optional": true,
|
|
937
|
+
"type": {
|
|
938
|
+
"text": "boolean | AddEventListenerOptions"
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
],
|
|
942
|
+
"description": "Utility to add an event listener that is automatically cleaned up when the element is disconnected."
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"kind": "method",
|
|
946
|
+
"name": "listen",
|
|
947
|
+
"return": {
|
|
948
|
+
"type": {
|
|
949
|
+
"text": "() => void"
|
|
950
|
+
}
|
|
951
|
+
},
|
|
952
|
+
"parameters": [
|
|
953
|
+
{
|
|
954
|
+
"name": "target",
|
|
955
|
+
"type": {
|
|
956
|
+
"text": "EventTarget"
|
|
957
|
+
}
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"name": "type",
|
|
961
|
+
"type": {
|
|
962
|
+
"text": "string"
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
"name": "listener",
|
|
967
|
+
"type": {
|
|
968
|
+
"text": "EventListenerOrEventListenerObject"
|
|
969
|
+
}
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"name": "options",
|
|
973
|
+
"optional": true,
|
|
974
|
+
"type": {
|
|
975
|
+
"text": "boolean | AddEventListenerOptions"
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
]
|
|
979
|
+
}
|
|
980
|
+
],
|
|
981
|
+
"attributes": [
|
|
982
|
+
{
|
|
983
|
+
"name": "locale",
|
|
984
|
+
"type": {
|
|
985
|
+
"text": "string"
|
|
986
|
+
},
|
|
987
|
+
"default": "''",
|
|
988
|
+
"description": "BCP 47 locale string for formatting and localization. Defaults to inherited document language.",
|
|
989
|
+
"fieldName": "locale"
|
|
990
|
+
}
|
|
991
|
+
],
|
|
992
|
+
"superclass": {
|
|
993
|
+
"name": "LitElement",
|
|
994
|
+
"package": "lit"
|
|
995
|
+
},
|
|
996
|
+
"customElement": true
|
|
997
|
+
}
|
|
998
|
+
],
|
|
999
|
+
"exports": [
|
|
1000
|
+
{
|
|
1001
|
+
"kind": "js",
|
|
1002
|
+
"name": "UIBitElement",
|
|
1003
|
+
"declaration": {
|
|
1004
|
+
"name": "UIBitElement",
|
|
1005
|
+
"module": "../../platform/core/src/element.ts"
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
525
1009
|
}
|
|
526
1010
|
]
|
|
527
1011
|
}
|
package/dist/carousel.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { UIBitElement } from '@uibit/core';
|
|
|
2
2
|
import type { CarouselConfig } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Accessible, scroll-driven carousel with keyboard navigation, auto-play,
|
|
5
|
+
|
|
6
|
+
* @summary A premium, scroll-driven carousel component with full accessibility controls.
|
|
5
7
|
* and configurable items-per-view via CSS custom properties.
|
|
6
8
|
*
|
|
7
9
|
* @fires {{ index: number, totalSlides: number }} slide-change - Fired when the active slide changes
|
|
@@ -31,7 +33,9 @@ import type { CarouselConfig } from './types';
|
|
|
31
33
|
* @csspart indicators - The indicator dot group
|
|
32
34
|
* @csspart indicator - Each indicator dot
|
|
33
35
|
* @csspart indicator-active - Added to the active indicator dot
|
|
34
|
-
|
|
36
|
+
|
|
37
|
+
* @cssstate playing - Active when auto-play is running.
|
|
38
|
+
* @cssstate dragging - Active when dragging viewport.*/
|
|
35
39
|
export declare class UIBitCarousel extends UIBitElement {
|
|
36
40
|
static styles: import("lit").CSSResult;
|
|
37
41
|
/** Automatically advance slides on a timer. */
|
|
@@ -73,8 +77,29 @@ export declare class UIBitCarousel extends UIBitElement {
|
|
|
73
77
|
private stopAutoPlay;
|
|
74
78
|
private getSlides;
|
|
75
79
|
private updateNavigationState;
|
|
80
|
+
/**
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
* Returns the carousel to the previous slide.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
*/
|
|
76
87
|
prev(): void;
|
|
88
|
+
/**
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
* Advances the carousel to the next slide.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
*/
|
|
77
95
|
next(): void;
|
|
96
|
+
/**
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
* Navigates the carousel to a specific slide index.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
*/
|
|
78
103
|
goToSlide(index: number): void;
|
|
79
104
|
private scrollToSlide;
|
|
80
105
|
private emitSlideChange;
|
package/dist/carousel.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AACA,OAAO,EAAgD,YAAY,EAAE,MAAM,aAAa,CAAC;AAGzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../src/carousel.ts"],"names":[],"mappings":"AACA,OAAO,EAAgD,YAAY,EAAE,MAAM,aAAa,CAAC;AAGzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAmCwD;AACxD,qBACa,aAAc,SAAQ,YAAY;IAC7C,MAAM,CAAC,MAAM,0BAAU;IAEvB,+CAA+C;IACM,QAAQ,UAAS;IACtE,+CAA+C;IACc,gBAAgB,SAAQ;IACrF,6EAA6E;IAChD,IAAI,UAAQ;IAEzC,IAAI,YAAY,IAAI,MAAM,CAIzB;IAED,IAAI,GAAG,IAAI,MAAM,CAIhB;IAED,IAAI,QAAQ,IAAI,MAAM,CAOrB;IAE2B,OAAO,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACxB,WAAW,CAAC,EAAE,eAAe,CAAC;IAEjD,YAAY,SAAK;IACjB,WAAW,SAAK;IAChB,OAAO,UAAS;IAChB,OAAO,UAAQ;IAExB,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,cAAc,CAAC,CAAiB;IACxC,OAAO,CAAC,aAAa,CAAC,CAAuB;IAC7C,OAAO,CAAC,uBAAuB,CAA8B;IAC7D,OAAO,CAAC,oBAAoB,CAAS;IACrC,OAAO,CAAC,yBAAyB,CAAC,CAAS;IAC3C,OAAO,CAAC,qBAAqB,CAAS;IAEtC,OAAO,CAAC,kBAAkB,CAGxB;IAEF,OAAO,CAAC,kBAAkB,CAKxB;IAEF,OAAO,CAAC,aAAa,CAGnB;IAEF,OAAO,CAAC,cAAc,CAKpB;IAEF,YAAY,MAAM,CAAC,EAAE,cAAc,EAgBlC;IAED,SAAS,CAAC,YAAY,SASrB;IAED,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,QAW9C;IAED,oBAAoB,SAMnB;IAED,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,kBAAkB;IAuC1B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,uBAAuB;IAY/B,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,SAAS;IAgBjB,OAAO,CAAC,qBAAqB;IAK7B;;;;;;OAMG;IAGH,IAAI,SAMH;IAED;;;;;;OAMG;IAGH,IAAI,SAMH;IAED;;;;;;OAMG;IAGH,SAAS,CAAC,KAAK,EAAE,MAAM,QAItB;IAED,OAAO,CAAC,aAAa;IA6CrB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,gBAAgB;IAIxB,MAAM,oCAoEL;CACF;eAEc,aAAa"}
|
package/dist/carousel.js
CHANGED
|
@@ -11,6 +11,8 @@ import { property, query, state } from 'lit/decorators.js';
|
|
|
11
11
|
import { styles } from './styles';
|
|
12
12
|
/**
|
|
13
13
|
* Accessible, scroll-driven carousel with keyboard navigation, auto-play,
|
|
14
|
+
|
|
15
|
+
* @summary A premium, scroll-driven carousel component with full accessibility controls.
|
|
14
16
|
* and configurable items-per-view via CSS custom properties.
|
|
15
17
|
*
|
|
16
18
|
* @fires {{ index: number, totalSlides: number }} slide-change - Fired when the active slide changes
|
|
@@ -40,7 +42,9 @@ import { styles } from './styles';
|
|
|
40
42
|
* @csspart indicators - The indicator dot group
|
|
41
43
|
* @csspart indicator - Each indicator dot
|
|
42
44
|
* @csspart indicator-active - Added to the active indicator dot
|
|
43
|
-
|
|
45
|
+
|
|
46
|
+
* @cssstate playing - Active when auto-play is running.
|
|
47
|
+
* @cssstate dragging - Active when dragging viewport.*/
|
|
44
48
|
let UIBitCarousel = class UIBitCarousel extends UIBitElement {
|
|
45
49
|
static { this.styles = styles; }
|
|
46
50
|
get itemsPerView() {
|
|
@@ -257,6 +261,13 @@ let UIBitCarousel = class UIBitCarousel extends UIBitElement {
|
|
|
257
261
|
this.canPrev = this.currentIndex > 0 || this.loop;
|
|
258
262
|
this.canNext = this.currentIndex < this.totalSlides - 1 || this.loop;
|
|
259
263
|
}
|
|
264
|
+
/**
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
* Returns the carousel to the previous slide.
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
*/
|
|
260
271
|
prev() {
|
|
261
272
|
if (this.currentIndex > 0) {
|
|
262
273
|
this.scrollToSlide(this.currentIndex - 1);
|
|
@@ -265,6 +276,13 @@ let UIBitCarousel = class UIBitCarousel extends UIBitElement {
|
|
|
265
276
|
this.scrollToSlide(this.totalSlides - 1);
|
|
266
277
|
}
|
|
267
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
* Advances the carousel to the next slide.
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
*/
|
|
268
286
|
next() {
|
|
269
287
|
if (this.currentIndex < this.totalSlides - 1) {
|
|
270
288
|
this.scrollToSlide(this.currentIndex + 1);
|
|
@@ -273,6 +291,13 @@ let UIBitCarousel = class UIBitCarousel extends UIBitElement {
|
|
|
273
291
|
this.scrollToSlide(0);
|
|
274
292
|
}
|
|
275
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
* Navigates the carousel to a specific slide index.
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
*/
|
|
276
301
|
goToSlide(index) {
|
|
277
302
|
if (index >= 0 && index < this.totalSlides) {
|
|
278
303
|
this.scrollToSlide(index);
|