@primitiv-ui/web 0.1.56 → 0.1.57
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 +38 -4
- package/dist/cdn/chunks/chunk-P2K4DPA4.js +1 -0
- package/dist/cdn/dropdown.js +1 -0
- package/dist/cdn/popover.js +1 -1
- package/dist/cdn/tooltip.js +1 -1
- package/dist/custom-elements.json +909 -0
- package/dist/define/dropdown.d.ts +1 -0
- package/dist/define/dropdown.js +12 -0
- package/dist/define/index.d.ts +1 -0
- package/dist/define/index.js +1 -0
- package/dist/dropdown/DropdownController.d.ts +63 -0
- package/dist/dropdown/DropdownController.js +130 -0
- package/dist/dropdown/DropdownSubController.d.ts +34 -0
- package/dist/dropdown/DropdownSubController.js +78 -0
- package/dist/dropdown/elements.d.ts +174 -0
- package/dist/dropdown/elements.js +501 -0
- package/dist/dropdown/index.d.ts +3 -0
- package/dist/dropdown/index.js +3 -0
- package/dist/frameworks/events.d.ts +18 -0
- package/dist/frameworks/react.d.ts +46 -2
- package/dist/frameworks/svelte.d.ts +45 -1
- package/dist/frameworks/vue.d.ts +50 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/popover/PopoverController.d.ts +6 -0
- package/dist/popover/PopoverController.js +41 -1
- package/dist/primitiv-web.js +1 -1
- package/dist/tags.d.ts +15 -0
- package/dist/tooltip/TooltipController.d.ts +9 -1
- package/dist/tooltip/TooltipController.js +36 -2
- package/dist/tooltip/elements.js +1 -0
- package/package.json +10 -2
|
@@ -516,6 +516,915 @@
|
|
|
516
516
|
}
|
|
517
517
|
]
|
|
518
518
|
},
|
|
519
|
+
{
|
|
520
|
+
"kind": "javascript-module",
|
|
521
|
+
"path": "src/dropdown/elements.ts",
|
|
522
|
+
"declarations": [
|
|
523
|
+
{
|
|
524
|
+
"kind": "class",
|
|
525
|
+
"description": "`<primitiv-dropdown>` — the state owner of a dropdown menu (WAI-ARIA APG\nMenu Button): a trigger that opens a menu of items. The menu is a\n`popover=\"auto\"` in the top layer, shown with the trigger as its source,\nwhich makes the trigger its implicit anchor for CSS anchor positioning.\nChoosing an item — any item, a submenu's too — closes the menu and hands\nfocus back to the trigger.\n\nThe root finds its own parts and reconciles their ARIA from its reflected\nstate whenever a part arrives, leaves, or changes an attribute the root\nreads (the lifecycle is `PrimitivRootElement`'s).",
|
|
526
|
+
"name": "PrimitivDropdownElement",
|
|
527
|
+
"members": [
|
|
528
|
+
{
|
|
529
|
+
"kind": "field",
|
|
530
|
+
"name": "#content",
|
|
531
|
+
"privacy": "private",
|
|
532
|
+
"type": {
|
|
533
|
+
"text": "HTMLElement | null"
|
|
534
|
+
},
|
|
535
|
+
"default": "null",
|
|
536
|
+
"description": "The menu the root currently decorates, and the controller over it."
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"kind": "field",
|
|
540
|
+
"name": "#menu",
|
|
541
|
+
"privacy": "private",
|
|
542
|
+
"type": {
|
|
543
|
+
"text": "DropdownController | null"
|
|
544
|
+
},
|
|
545
|
+
"default": "null"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"kind": "field",
|
|
549
|
+
"name": "#trigger",
|
|
550
|
+
"privacy": "private",
|
|
551
|
+
"type": {
|
|
552
|
+
"text": "HTMLElement | null"
|
|
553
|
+
},
|
|
554
|
+
"default": "null",
|
|
555
|
+
"description": "The decorated trigger, as of the last reconcile."
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"kind": "field",
|
|
559
|
+
"name": "#listening",
|
|
560
|
+
"privacy": "private",
|
|
561
|
+
"type": {
|
|
562
|
+
"text": "AbortController | null"
|
|
563
|
+
},
|
|
564
|
+
"default": "null",
|
|
565
|
+
"description": "The root's own listeners, while connected."
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"kind": "field",
|
|
569
|
+
"name": "controller",
|
|
570
|
+
"type": {
|
|
571
|
+
"text": "{ connect(): void; disconnect(): void }"
|
|
572
|
+
},
|
|
573
|
+
"privacy": "protected",
|
|
574
|
+
"readonly": true,
|
|
575
|
+
"default": "{ connect: (): void => this.#connect(), disconnect: (): void => this.#disconnect(), }"
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"kind": "field",
|
|
579
|
+
"name": "reconcileOn",
|
|
580
|
+
"type": {
|
|
581
|
+
"text": "readonly string[]"
|
|
582
|
+
},
|
|
583
|
+
"privacy": "protected",
|
|
584
|
+
"readonly": true,
|
|
585
|
+
"default": "[\"open\", \"disabled\", \"checked\", \"value\"]"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"kind": "field",
|
|
589
|
+
"name": "open",
|
|
590
|
+
"type": {
|
|
591
|
+
"text": "boolean"
|
|
592
|
+
},
|
|
593
|
+
"description": "Whether the menu is open, reflected as the boolean `open` attribute."
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
"kind": "method",
|
|
597
|
+
"name": "#host",
|
|
598
|
+
"privacy": "private",
|
|
599
|
+
"return": {
|
|
600
|
+
"type": {
|
|
601
|
+
"text": "DropdownControllerHost"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
"description": "The controller's view of this element: state lives in the reflected attribute."
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"kind": "method",
|
|
608
|
+
"name": "#change",
|
|
609
|
+
"privacy": "private",
|
|
610
|
+
"return": {
|
|
611
|
+
"type": {
|
|
612
|
+
"text": "void"
|
|
613
|
+
}
|
|
614
|
+
},
|
|
615
|
+
"parameters": [
|
|
616
|
+
{
|
|
617
|
+
"name": "open",
|
|
618
|
+
"type": {
|
|
619
|
+
"text": "boolean"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
"description": "A change the user asked for: announced first, so a listener can veto it."
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"kind": "method",
|
|
627
|
+
"name": "#connect",
|
|
628
|
+
"privacy": "private",
|
|
629
|
+
"return": {
|
|
630
|
+
"type": {
|
|
631
|
+
"text": "void"
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"kind": "method",
|
|
637
|
+
"name": "#disconnect",
|
|
638
|
+
"privacy": "private",
|
|
639
|
+
"return": {
|
|
640
|
+
"type": {
|
|
641
|
+
"text": "void"
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"kind": "method",
|
|
647
|
+
"name": "#itemOf",
|
|
648
|
+
"privacy": "private",
|
|
649
|
+
"return": {
|
|
650
|
+
"type": {
|
|
651
|
+
"text": "HTMLElement | null"
|
|
652
|
+
}
|
|
653
|
+
},
|
|
654
|
+
"parameters": [
|
|
655
|
+
{
|
|
656
|
+
"name": "target",
|
|
657
|
+
"type": {
|
|
658
|
+
"text": "EventTarget | null"
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
],
|
|
662
|
+
"description": "The item part (of this root) an event landed in, or `null`."
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
"kind": "method",
|
|
666
|
+
"name": "#highlight",
|
|
667
|
+
"privacy": "private",
|
|
668
|
+
"return": {
|
|
669
|
+
"type": {
|
|
670
|
+
"text": "void"
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"parameters": [
|
|
674
|
+
{
|
|
675
|
+
"name": "event",
|
|
676
|
+
"type": {
|
|
677
|
+
"text": "PointerEvent"
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"name": "over",
|
|
682
|
+
"type": {
|
|
683
|
+
"text": "boolean"
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
],
|
|
687
|
+
"description": "Mark the item the pointer is over, as React's `data-highlighted`."
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"kind": "method",
|
|
691
|
+
"name": "#click",
|
|
692
|
+
"privacy": "private",
|
|
693
|
+
"return": {
|
|
694
|
+
"type": {
|
|
695
|
+
"text": "void"
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
"parameters": [
|
|
699
|
+
{
|
|
700
|
+
"name": "event",
|
|
701
|
+
"type": {
|
|
702
|
+
"text": "MouseEvent"
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
]
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"kind": "method",
|
|
709
|
+
"name": "#use",
|
|
710
|
+
"privacy": "private",
|
|
711
|
+
"return": {
|
|
712
|
+
"type": {
|
|
713
|
+
"text": "void"
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
"parameters": [
|
|
717
|
+
{
|
|
718
|
+
"name": "content",
|
|
719
|
+
"type": {
|
|
720
|
+
"text": "HTMLElement | null"
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
],
|
|
724
|
+
"description": "Decorate `content` from now on: the controller follows it. Only a\nreconcile calls this, and a root reconciles only while connected, so the\nnew controller listens at once."
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"kind": "method",
|
|
728
|
+
"name": "reconcile",
|
|
729
|
+
"privacy": "protected",
|
|
730
|
+
"return": {
|
|
731
|
+
"type": {
|
|
732
|
+
"text": "void"
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"events": [
|
|
738
|
+
{
|
|
739
|
+
"type": {
|
|
740
|
+
"text": "CustomEvent<{ open: boolean }>"
|
|
741
|
+
},
|
|
742
|
+
"description": "Bubbles, cancelable, fired before a user-driven change is applied — the trigger, Escape, a press outside or a chosen item — with the open state afterwards. Call `preventDefault()` to veto it.",
|
|
743
|
+
"name": "primitiv-dropdown-change"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"type": {
|
|
747
|
+
"text": "CustomEvent<null>"
|
|
748
|
+
},
|
|
749
|
+
"description": "Bubbles, cancelable, fired on the item part when an item is chosen, after a checkbox or radio item has changed. Call `preventDefault()` to keep the menu open.",
|
|
750
|
+
"name": "primitiv-dropdown-select"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"type": {
|
|
754
|
+
"text": "CustomEvent<{ checked: boolean }>"
|
|
755
|
+
},
|
|
756
|
+
"description": "Bubbles, cancelable, fired on a checkbox item before it changes, with its state afterwards. Call `preventDefault()` to veto it.",
|
|
757
|
+
"name": "primitiv-dropdown-checked-change"
|
|
758
|
+
},
|
|
759
|
+
{
|
|
760
|
+
"type": {
|
|
761
|
+
"text": "CustomEvent<{ value: string }>"
|
|
762
|
+
},
|
|
763
|
+
"description": "Bubbles, cancelable, fired on a radio group before its value changes, with the value afterwards. Call `preventDefault()` to veto it.",
|
|
764
|
+
"name": "primitiv-dropdown-value-change"
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"attributes": [
|
|
768
|
+
{
|
|
769
|
+
"type": {
|
|
770
|
+
"text": "boolean"
|
|
771
|
+
},
|
|
772
|
+
"description": "Whether the menu is open. Reflected: it changes as the user opens and dismisses it. Set it (or the `open` property) to open or close it from script.",
|
|
773
|
+
"name": "open"
|
|
774
|
+
}
|
|
775
|
+
],
|
|
776
|
+
"superclass": {
|
|
777
|
+
"name": "PrimitivRootElement",
|
|
778
|
+
"module": "/src/internal/RootElement.ts"
|
|
779
|
+
},
|
|
780
|
+
"tagName": "primitiv-dropdown",
|
|
781
|
+
"customElement": true,
|
|
782
|
+
"summary": "The state owner of a dropdown menu."
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
"kind": "class",
|
|
786
|
+
"description": "`<primitiv-dropdown-sub>` — the state owner of a submenu, inside a dropdown's\nmenu: a sub-trigger row that opens a nested menu on a click, a hover, or the\narrow pointing away from its parent (ArrowRight, or ArrowLeft right to\nleft), and closes it on the arrow back, or when the pointer moves to another\nrow of the parent menu.",
|
|
787
|
+
"name": "PrimitivDropdownSubElement",
|
|
788
|
+
"members": [
|
|
789
|
+
{
|
|
790
|
+
"kind": "field",
|
|
791
|
+
"name": "#content",
|
|
792
|
+
"privacy": "private",
|
|
793
|
+
"type": {
|
|
794
|
+
"text": "HTMLElement | null"
|
|
795
|
+
},
|
|
796
|
+
"default": "null"
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
"kind": "field",
|
|
800
|
+
"name": "#menu",
|
|
801
|
+
"privacy": "private",
|
|
802
|
+
"type": {
|
|
803
|
+
"text": "DropdownSubController | null"
|
|
804
|
+
},
|
|
805
|
+
"default": "null"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"kind": "field",
|
|
809
|
+
"name": "#trigger",
|
|
810
|
+
"privacy": "private",
|
|
811
|
+
"type": {
|
|
812
|
+
"text": "HTMLElement | null"
|
|
813
|
+
},
|
|
814
|
+
"default": "null"
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"kind": "field",
|
|
818
|
+
"name": "#triggerPart",
|
|
819
|
+
"privacy": "private",
|
|
820
|
+
"type": {
|
|
821
|
+
"text": "HTMLElement | null"
|
|
822
|
+
},
|
|
823
|
+
"default": "null",
|
|
824
|
+
"description": "The sub-trigger part (whose `disabled` the sub reads), as of the last reconcile."
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"kind": "field",
|
|
828
|
+
"name": "#hovered",
|
|
829
|
+
"privacy": "private",
|
|
830
|
+
"type": {
|
|
831
|
+
"text": "boolean"
|
|
832
|
+
},
|
|
833
|
+
"default": "false",
|
|
834
|
+
"description": "Whether the pointer is over the sub-trigger."
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"kind": "field",
|
|
838
|
+
"name": "#listening",
|
|
839
|
+
"privacy": "private",
|
|
840
|
+
"type": {
|
|
841
|
+
"text": "AbortController | null"
|
|
842
|
+
},
|
|
843
|
+
"default": "null"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"kind": "field",
|
|
847
|
+
"name": "controller",
|
|
848
|
+
"type": {
|
|
849
|
+
"text": "{ connect(): void; disconnect(): void }"
|
|
850
|
+
},
|
|
851
|
+
"privacy": "protected",
|
|
852
|
+
"readonly": true,
|
|
853
|
+
"default": "{ connect: (): void => this.#connect(), disconnect: (): void => this.#disconnect(), }"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"kind": "field",
|
|
857
|
+
"name": "reconcileOn",
|
|
858
|
+
"type": {
|
|
859
|
+
"text": "readonly string[]"
|
|
860
|
+
},
|
|
861
|
+
"privacy": "protected",
|
|
862
|
+
"readonly": true,
|
|
863
|
+
"default": "[\"open\", \"disabled\"]"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
"kind": "field",
|
|
867
|
+
"name": "open",
|
|
868
|
+
"type": {
|
|
869
|
+
"text": "boolean"
|
|
870
|
+
},
|
|
871
|
+
"description": "Whether the submenu is open, reflected as the boolean `open` attribute."
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"kind": "method",
|
|
875
|
+
"name": "#host",
|
|
876
|
+
"privacy": "private",
|
|
877
|
+
"return": {
|
|
878
|
+
"type": {
|
|
879
|
+
"text": "DropdownSubControllerHost"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"kind": "method",
|
|
885
|
+
"name": "#change",
|
|
886
|
+
"privacy": "private",
|
|
887
|
+
"return": {
|
|
888
|
+
"type": {
|
|
889
|
+
"text": "void"
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
"parameters": [
|
|
893
|
+
{
|
|
894
|
+
"name": "open",
|
|
895
|
+
"type": {
|
|
896
|
+
"text": "boolean"
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
"kind": "method",
|
|
903
|
+
"name": "#disabled",
|
|
904
|
+
"privacy": "private",
|
|
905
|
+
"return": {
|
|
906
|
+
"type": {
|
|
907
|
+
"text": "boolean"
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"description": "Whether the sub-trigger is disabled. Only asked once a decorated sub-trigger exists."
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
"kind": "method",
|
|
914
|
+
"name": "#connect",
|
|
915
|
+
"privacy": "private",
|
|
916
|
+
"return": {
|
|
917
|
+
"type": {
|
|
918
|
+
"text": "void"
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"kind": "method",
|
|
924
|
+
"name": "#disconnect",
|
|
925
|
+
"privacy": "private",
|
|
926
|
+
"return": {
|
|
927
|
+
"type": {
|
|
928
|
+
"text": "void"
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"kind": "method",
|
|
934
|
+
"name": "#onTrigger",
|
|
935
|
+
"privacy": "private",
|
|
936
|
+
"return": {
|
|
937
|
+
"type": {
|
|
938
|
+
"text": "boolean"
|
|
939
|
+
}
|
|
940
|
+
},
|
|
941
|
+
"parameters": [
|
|
942
|
+
{
|
|
943
|
+
"name": "event",
|
|
944
|
+
"type": {
|
|
945
|
+
"text": "Event"
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
],
|
|
949
|
+
"description": "Whether an event landed on the decorated sub-trigger."
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
"kind": "method",
|
|
953
|
+
"name": "#openIfEnabled",
|
|
954
|
+
"privacy": "private",
|
|
955
|
+
"return": {
|
|
956
|
+
"type": {
|
|
957
|
+
"text": "void"
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"kind": "method",
|
|
963
|
+
"name": "#keydown",
|
|
964
|
+
"privacy": "private",
|
|
965
|
+
"return": {
|
|
966
|
+
"type": {
|
|
967
|
+
"text": "void"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
"parameters": [
|
|
971
|
+
{
|
|
972
|
+
"name": "event",
|
|
973
|
+
"type": {
|
|
974
|
+
"text": "KeyboardEvent"
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
]
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"kind": "method",
|
|
981
|
+
"name": "#pointer",
|
|
982
|
+
"privacy": "private",
|
|
983
|
+
"return": {
|
|
984
|
+
"type": {
|
|
985
|
+
"text": "void"
|
|
986
|
+
}
|
|
987
|
+
},
|
|
988
|
+
"parameters": [
|
|
989
|
+
{
|
|
990
|
+
"name": "event",
|
|
991
|
+
"type": {
|
|
992
|
+
"text": "PointerEvent"
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"name": "over",
|
|
997
|
+
"type": {
|
|
998
|
+
"text": "boolean"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
]
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
"kind": "method",
|
|
1005
|
+
"name": "#sibling",
|
|
1006
|
+
"privacy": "private",
|
|
1007
|
+
"return": {
|
|
1008
|
+
"type": {
|
|
1009
|
+
"text": "void"
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
"parameters": [
|
|
1013
|
+
{
|
|
1014
|
+
"name": "event",
|
|
1015
|
+
"type": {
|
|
1016
|
+
"text": "PointerEvent"
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
],
|
|
1020
|
+
"description": "The pointer reached another row of the parent menu: close, as moving the keyboard there would."
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"kind": "method",
|
|
1024
|
+
"name": "#use",
|
|
1025
|
+
"privacy": "private",
|
|
1026
|
+
"return": {
|
|
1027
|
+
"type": {
|
|
1028
|
+
"text": "void"
|
|
1029
|
+
}
|
|
1030
|
+
},
|
|
1031
|
+
"parameters": [
|
|
1032
|
+
{
|
|
1033
|
+
"name": "content",
|
|
1034
|
+
"type": {
|
|
1035
|
+
"text": "HTMLElement | null"
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
]
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
"kind": "method",
|
|
1042
|
+
"name": "reconcile",
|
|
1043
|
+
"privacy": "protected",
|
|
1044
|
+
"return": {
|
|
1045
|
+
"type": {
|
|
1046
|
+
"text": "void"
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
],
|
|
1051
|
+
"events": [
|
|
1052
|
+
{
|
|
1053
|
+
"type": {
|
|
1054
|
+
"text": "CustomEvent<{ open: boolean }>"
|
|
1055
|
+
},
|
|
1056
|
+
"description": "Bubbles, cancelable, fired before a user-driven change is applied, with the open state afterwards. Call `preventDefault()` to veto it.",
|
|
1057
|
+
"name": "primitiv-dropdown-sub-change"
|
|
1058
|
+
}
|
|
1059
|
+
],
|
|
1060
|
+
"attributes": [
|
|
1061
|
+
{
|
|
1062
|
+
"type": {
|
|
1063
|
+
"text": "boolean"
|
|
1064
|
+
},
|
|
1065
|
+
"description": "Whether the submenu is open. Reflected.",
|
|
1066
|
+
"name": "open"
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
"superclass": {
|
|
1070
|
+
"name": "PrimitivRootElement",
|
|
1071
|
+
"module": "/src/internal/RootElement.ts"
|
|
1072
|
+
},
|
|
1073
|
+
"tagName": "primitiv-dropdown-sub",
|
|
1074
|
+
"customElement": true,
|
|
1075
|
+
"summary": "The state owner of a submenu."
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
"kind": "class",
|
|
1079
|
+
"description": "`<primitiv-dropdown-trigger>` — an interactive part. It decorates exactly\none child the consumer writes, a `<button>`, which toggles the menu and is\nits menu button (`aria-haspopup`, `aria-expanded`, `aria-controls`).",
|
|
1080
|
+
"name": "PrimitivDropdownTriggerElement",
|
|
1081
|
+
"superclass": {
|
|
1082
|
+
"name": "ElementBase",
|
|
1083
|
+
"module": "/src/internal/element.ts"
|
|
1084
|
+
},
|
|
1085
|
+
"tagName": "primitiv-dropdown-trigger",
|
|
1086
|
+
"customElement": true
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"kind": "class",
|
|
1090
|
+
"description": "`<primitiv-dropdown-content>` — the menu itself. Structural: the root gives\nit an id, `role=\"menu\"` and `popover=\"auto\"` (write it in your markup too, so\nit is hidden before the script loads).",
|
|
1091
|
+
"name": "PrimitivDropdownContentElement",
|
|
1092
|
+
"superclass": {
|
|
1093
|
+
"name": "ElementBase",
|
|
1094
|
+
"module": "/src/internal/element.ts"
|
|
1095
|
+
},
|
|
1096
|
+
"tagName": "primitiv-dropdown-content",
|
|
1097
|
+
"customElement": true
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
"kind": "class",
|
|
1101
|
+
"description": "`<primitiv-dropdown-item>` — an interactive part: one item. It decorates\nexactly one child the consumer writes, an `<li>` (or a link), which gets\n`role=\"menuitem\"`, `tabindex=\"-1\"` and `data-highlighted` while the pointer\nis over it.",
|
|
1102
|
+
"name": "PrimitivDropdownItemElement",
|
|
1103
|
+
"attributes": [
|
|
1104
|
+
{
|
|
1105
|
+
"type": {
|
|
1106
|
+
"text": "boolean"
|
|
1107
|
+
},
|
|
1108
|
+
"description": "Skipped by the keyboard, and does nothing when clicked (`aria-disabled` on the child).",
|
|
1109
|
+
"name": "disabled"
|
|
1110
|
+
}
|
|
1111
|
+
],
|
|
1112
|
+
"superclass": {
|
|
1113
|
+
"name": "ElementBase",
|
|
1114
|
+
"module": "/src/internal/element.ts"
|
|
1115
|
+
},
|
|
1116
|
+
"tagName": "primitiv-dropdown-item",
|
|
1117
|
+
"customElement": true
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
"kind": "class",
|
|
1121
|
+
"description": "`<primitiv-dropdown-checkbox-item>` — an item that toggles. Its child gets\n`role=\"menuitemcheckbox\"` and `aria-checked`.",
|
|
1122
|
+
"name": "PrimitivDropdownCheckboxItemElement",
|
|
1123
|
+
"attributes": [
|
|
1124
|
+
{
|
|
1125
|
+
"type": {
|
|
1126
|
+
"text": "boolean"
|
|
1127
|
+
},
|
|
1128
|
+
"description": "Whether it is checked; `checked=\"indeterminate\"` for mixed. Reflected.",
|
|
1129
|
+
"name": "checked"
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"type": {
|
|
1133
|
+
"text": "boolean"
|
|
1134
|
+
},
|
|
1135
|
+
"description": "As on an item.",
|
|
1136
|
+
"name": "disabled"
|
|
1137
|
+
}
|
|
1138
|
+
],
|
|
1139
|
+
"superclass": {
|
|
1140
|
+
"name": "ElementBase",
|
|
1141
|
+
"module": "/src/internal/element.ts"
|
|
1142
|
+
},
|
|
1143
|
+
"tagName": "primitiv-dropdown-checkbox-item",
|
|
1144
|
+
"customElement": true
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"kind": "class",
|
|
1148
|
+
"description": "`<primitiv-dropdown-radio-group>` — a group of radio items, one of which is\nchecked. Structural: `role=\"group\"`.",
|
|
1149
|
+
"name": "PrimitivDropdownRadioGroupElement",
|
|
1150
|
+
"attributes": [
|
|
1151
|
+
{
|
|
1152
|
+
"type": {
|
|
1153
|
+
"text": "string"
|
|
1154
|
+
},
|
|
1155
|
+
"description": "The checked item's value. Reflected.",
|
|
1156
|
+
"name": "value"
|
|
1157
|
+
}
|
|
1158
|
+
],
|
|
1159
|
+
"superclass": {
|
|
1160
|
+
"name": "ElementBase",
|
|
1161
|
+
"module": "/src/internal/element.ts"
|
|
1162
|
+
},
|
|
1163
|
+
"tagName": "primitiv-dropdown-radio-group",
|
|
1164
|
+
"customElement": true
|
|
1165
|
+
},
|
|
1166
|
+
{
|
|
1167
|
+
"kind": "class",
|
|
1168
|
+
"description": "`<primitiv-dropdown-radio-item>` — an item checked when its value is its\ngroup's. Its child gets `role=\"menuitemradio\"` and `aria-checked`.",
|
|
1169
|
+
"name": "PrimitivDropdownRadioItemElement",
|
|
1170
|
+
"attributes": [
|
|
1171
|
+
{
|
|
1172
|
+
"type": {
|
|
1173
|
+
"text": "string"
|
|
1174
|
+
},
|
|
1175
|
+
"description": "The value it sets on its group.",
|
|
1176
|
+
"name": "value"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"type": {
|
|
1180
|
+
"text": "boolean"
|
|
1181
|
+
},
|
|
1182
|
+
"description": "As on an item.",
|
|
1183
|
+
"name": "disabled"
|
|
1184
|
+
}
|
|
1185
|
+
],
|
|
1186
|
+
"superclass": {
|
|
1187
|
+
"name": "ElementBase",
|
|
1188
|
+
"module": "/src/internal/element.ts"
|
|
1189
|
+
},
|
|
1190
|
+
"tagName": "primitiv-dropdown-radio-item",
|
|
1191
|
+
"customElement": true
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"kind": "class",
|
|
1195
|
+
"description": "`<primitiv-dropdown-item-indicator>` — the check or dot inside a checkbox or\nradio item, `hidden` while unchecked. Structural: it gets `data-state`.",
|
|
1196
|
+
"name": "PrimitivDropdownItemIndicatorElement",
|
|
1197
|
+
"attributes": [
|
|
1198
|
+
{
|
|
1199
|
+
"type": {
|
|
1200
|
+
"text": "boolean"
|
|
1201
|
+
},
|
|
1202
|
+
"description": "Keep it shown while unchecked, to animate it.",
|
|
1203
|
+
"name": "force-mount"
|
|
1204
|
+
}
|
|
1205
|
+
],
|
|
1206
|
+
"superclass": {
|
|
1207
|
+
"name": "ElementBase",
|
|
1208
|
+
"module": "/src/internal/element.ts"
|
|
1209
|
+
},
|
|
1210
|
+
"tagName": "primitiv-dropdown-item-indicator",
|
|
1211
|
+
"customElement": true
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"kind": "class",
|
|
1215
|
+
"description": "`<primitiv-dropdown-group>` — a labelled group of items. Structural:\n`role=\"group\"`, named by the label inside it.",
|
|
1216
|
+
"name": "PrimitivDropdownGroupElement",
|
|
1217
|
+
"superclass": {
|
|
1218
|
+
"name": "ElementBase",
|
|
1219
|
+
"module": "/src/internal/element.ts"
|
|
1220
|
+
},
|
|
1221
|
+
"tagName": "primitiv-dropdown-group",
|
|
1222
|
+
"customElement": true
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
"kind": "class",
|
|
1226
|
+
"description": "`<primitiv-dropdown-label>` — a group's label, not an item. Structural: the\nroot gives it an id.",
|
|
1227
|
+
"name": "PrimitivDropdownLabelElement",
|
|
1228
|
+
"superclass": {
|
|
1229
|
+
"name": "ElementBase",
|
|
1230
|
+
"module": "/src/internal/element.ts"
|
|
1231
|
+
},
|
|
1232
|
+
"tagName": "primitiv-dropdown-label",
|
|
1233
|
+
"customElement": true
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
"kind": "class",
|
|
1237
|
+
"description": "`<primitiv-dropdown-separator>` — a rule between items. Structural:\n`role=\"separator\"`.",
|
|
1238
|
+
"name": "PrimitivDropdownSeparatorElement",
|
|
1239
|
+
"superclass": {
|
|
1240
|
+
"name": "ElementBase",
|
|
1241
|
+
"module": "/src/internal/element.ts"
|
|
1242
|
+
},
|
|
1243
|
+
"tagName": "primitiv-dropdown-separator",
|
|
1244
|
+
"customElement": true
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"kind": "class",
|
|
1248
|
+
"description": "`<primitiv-dropdown-sub-trigger>` — the row that opens a submenu. It\ndecorates exactly one child, an `<li>`, which gets `role=\"menuitem\"` and the\nsubmenu's `aria-haspopup`, `aria-expanded` and `aria-controls`.",
|
|
1249
|
+
"name": "PrimitivDropdownSubTriggerElement",
|
|
1250
|
+
"attributes": [
|
|
1251
|
+
{
|
|
1252
|
+
"type": {
|
|
1253
|
+
"text": "boolean"
|
|
1254
|
+
},
|
|
1255
|
+
"description": "It does not open the submenu.",
|
|
1256
|
+
"name": "disabled"
|
|
1257
|
+
}
|
|
1258
|
+
],
|
|
1259
|
+
"superclass": {
|
|
1260
|
+
"name": "ElementBase",
|
|
1261
|
+
"module": "/src/internal/element.ts"
|
|
1262
|
+
},
|
|
1263
|
+
"tagName": "primitiv-dropdown-sub-trigger",
|
|
1264
|
+
"customElement": true
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"kind": "class",
|
|
1268
|
+
"description": "`<primitiv-dropdown-sub-content>` — the submenu itself, inside the parent\nmenu. Structural, as the content: an id, `role=\"menu\"`, `popover=\"auto\"`.",
|
|
1269
|
+
"name": "PrimitivDropdownSubContentElement",
|
|
1270
|
+
"superclass": {
|
|
1271
|
+
"name": "ElementBase",
|
|
1272
|
+
"module": "/src/internal/element.ts"
|
|
1273
|
+
},
|
|
1274
|
+
"tagName": "primitiv-dropdown-sub-content",
|
|
1275
|
+
"customElement": true
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
"kind": "function",
|
|
1279
|
+
"name": "defineDropdown",
|
|
1280
|
+
"return": {
|
|
1281
|
+
"type": {
|
|
1282
|
+
"text": "void"
|
|
1283
|
+
}
|
|
1284
|
+
},
|
|
1285
|
+
"parameters": [
|
|
1286
|
+
{
|
|
1287
|
+
"name": "registry",
|
|
1288
|
+
"default": "globalThis.customElements",
|
|
1289
|
+
"type": {
|
|
1290
|
+
"text": "ElementRegistry | undefined"
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
],
|
|
1294
|
+
"description": "Define the fourteen Dropdown elements on `registry` (the global\n`customElements` by default). Safe to call more than once, and a no-op where\nthere is no registry (a server render)."
|
|
1295
|
+
}
|
|
1296
|
+
],
|
|
1297
|
+
"exports": [
|
|
1298
|
+
{
|
|
1299
|
+
"kind": "js",
|
|
1300
|
+
"name": "ElementRegistry",
|
|
1301
|
+
"declaration": {
|
|
1302
|
+
"name": "ElementRegistry",
|
|
1303
|
+
"module": "src/dropdown/elements.ts"
|
|
1304
|
+
}
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"kind": "js",
|
|
1308
|
+
"name": "PrimitivDropdownElement",
|
|
1309
|
+
"declaration": {
|
|
1310
|
+
"name": "PrimitivDropdownElement",
|
|
1311
|
+
"module": "src/dropdown/elements.ts"
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"kind": "js",
|
|
1316
|
+
"name": "PrimitivDropdownSubElement",
|
|
1317
|
+
"declaration": {
|
|
1318
|
+
"name": "PrimitivDropdownSubElement",
|
|
1319
|
+
"module": "src/dropdown/elements.ts"
|
|
1320
|
+
}
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"kind": "js",
|
|
1324
|
+
"name": "PrimitivDropdownTriggerElement",
|
|
1325
|
+
"declaration": {
|
|
1326
|
+
"name": "PrimitivDropdownTriggerElement",
|
|
1327
|
+
"module": "src/dropdown/elements.ts"
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"kind": "js",
|
|
1332
|
+
"name": "PrimitivDropdownContentElement",
|
|
1333
|
+
"declaration": {
|
|
1334
|
+
"name": "PrimitivDropdownContentElement",
|
|
1335
|
+
"module": "src/dropdown/elements.ts"
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"kind": "js",
|
|
1340
|
+
"name": "PrimitivDropdownItemElement",
|
|
1341
|
+
"declaration": {
|
|
1342
|
+
"name": "PrimitivDropdownItemElement",
|
|
1343
|
+
"module": "src/dropdown/elements.ts"
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"kind": "js",
|
|
1348
|
+
"name": "PrimitivDropdownCheckboxItemElement",
|
|
1349
|
+
"declaration": {
|
|
1350
|
+
"name": "PrimitivDropdownCheckboxItemElement",
|
|
1351
|
+
"module": "src/dropdown/elements.ts"
|
|
1352
|
+
}
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"kind": "js",
|
|
1356
|
+
"name": "PrimitivDropdownRadioGroupElement",
|
|
1357
|
+
"declaration": {
|
|
1358
|
+
"name": "PrimitivDropdownRadioGroupElement",
|
|
1359
|
+
"module": "src/dropdown/elements.ts"
|
|
1360
|
+
}
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"kind": "js",
|
|
1364
|
+
"name": "PrimitivDropdownRadioItemElement",
|
|
1365
|
+
"declaration": {
|
|
1366
|
+
"name": "PrimitivDropdownRadioItemElement",
|
|
1367
|
+
"module": "src/dropdown/elements.ts"
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"kind": "js",
|
|
1372
|
+
"name": "PrimitivDropdownItemIndicatorElement",
|
|
1373
|
+
"declaration": {
|
|
1374
|
+
"name": "PrimitivDropdownItemIndicatorElement",
|
|
1375
|
+
"module": "src/dropdown/elements.ts"
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"kind": "js",
|
|
1380
|
+
"name": "PrimitivDropdownGroupElement",
|
|
1381
|
+
"declaration": {
|
|
1382
|
+
"name": "PrimitivDropdownGroupElement",
|
|
1383
|
+
"module": "src/dropdown/elements.ts"
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"kind": "js",
|
|
1388
|
+
"name": "PrimitivDropdownLabelElement",
|
|
1389
|
+
"declaration": {
|
|
1390
|
+
"name": "PrimitivDropdownLabelElement",
|
|
1391
|
+
"module": "src/dropdown/elements.ts"
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"kind": "js",
|
|
1396
|
+
"name": "PrimitivDropdownSeparatorElement",
|
|
1397
|
+
"declaration": {
|
|
1398
|
+
"name": "PrimitivDropdownSeparatorElement",
|
|
1399
|
+
"module": "src/dropdown/elements.ts"
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"kind": "js",
|
|
1404
|
+
"name": "PrimitivDropdownSubTriggerElement",
|
|
1405
|
+
"declaration": {
|
|
1406
|
+
"name": "PrimitivDropdownSubTriggerElement",
|
|
1407
|
+
"module": "src/dropdown/elements.ts"
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"kind": "js",
|
|
1412
|
+
"name": "PrimitivDropdownSubContentElement",
|
|
1413
|
+
"declaration": {
|
|
1414
|
+
"name": "PrimitivDropdownSubContentElement",
|
|
1415
|
+
"module": "src/dropdown/elements.ts"
|
|
1416
|
+
}
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"kind": "js",
|
|
1420
|
+
"name": "defineDropdown",
|
|
1421
|
+
"declaration": {
|
|
1422
|
+
"name": "defineDropdown",
|
|
1423
|
+
"module": "src/dropdown/elements.ts"
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
]
|
|
1427
|
+
},
|
|
519
1428
|
{
|
|
520
1429
|
"kind": "javascript-module",
|
|
521
1430
|
"path": "src/modal/elements.ts",
|