@nordhealth/components 1.0.0-alpha.33 → 1.0.0-alpha.37
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/custom-elements.json +232 -211
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/CommandMenu.js +2 -2
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction-879382c7.js +7 -0
- package/lib/CommandMenuAction-879382c7.js.map +1 -0
- package/lib/CommandMenuAction.js +1 -1
- package/lib/Icon-f6f1c764.js +7 -0
- package/lib/Icon-f6f1c764.js.map +1 -0
- package/lib/Icon.js +1 -1
- package/lib/Icon.js.map +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/{InputMixin-6c108de4.js → InputMixin-3e737480.js} +2 -2
- package/lib/{InputMixin-6c108de4.js.map → InputMixin-3e737480.js.map} +1 -1
- package/lib/{KeyboardController-9a1b558b.js → KeyboardController-28c7135b.js} +2 -2
- package/lib/KeyboardController-28c7135b.js.map +1 -0
- package/lib/KeyboardController.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/directive-40a31ee2.js +12 -0
- package/lib/directive-40a31ee2.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/{ref-65ef7607.js → ref-857246ae.js} +3 -3
- package/lib/{ref-65ef7607.js.map → ref-857246ae.js.map} +1 -1
- package/lib/src/button/Button.d.ts +2 -2
- package/lib/src/button/Button.test.d.ts +1 -0
- package/lib/src/command-menu/CommandMenu.d.ts +10 -3
- package/lib/src/common/controllers/LightDismissController.d.ts +9 -3
- package/lib/src/icon/Icon.d.ts +5 -4
- package/lib/src/input/Input.test.d.ts +1 -0
- package/lib/src/table/Table.test.d.ts +2 -0
- package/lib/{unsafe-html-21f62902.js → unsafe-html-7028f0a1.js} +2 -2
- package/lib/{unsafe-html-21f62902.js.map → unsafe-html-7028f0a1.js.map} +1 -1
- package/package.json +4 -4
- package/lib/CommandMenuAction-97598b47.js +0 -7
- package/lib/CommandMenuAction-97598b47.js.map +0 -1
- package/lib/KeyboardController-9a1b558b.js.map +0 -1
- package/lib/directive-e9ce14b4.js +0 -7
- package/lib/directive-e9ce14b4.js.map +0 -1
- package/lib/if-defined-617ae549.js +0 -7
- package/lib/if-defined-617ae549.js.map +0 -1
- package/lib/state-70f38ceb.js +0 -7
- package/lib/state-70f38ceb.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
"kind": "field",
|
|
217
217
|
"name": "variant",
|
|
218
218
|
"type": {
|
|
219
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\""
|
|
219
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
220
220
|
},
|
|
221
221
|
"default": "\"default\"",
|
|
222
222
|
"description": "The style variant of the button.",
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"kind": "field",
|
|
239
239
|
"name": "size",
|
|
240
240
|
"type": {
|
|
241
|
-
"text": "\"s\" | \"m\""
|
|
241
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
242
242
|
},
|
|
243
243
|
"default": "\"m\"",
|
|
244
244
|
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
@@ -350,6 +350,7 @@
|
|
|
350
350
|
{
|
|
351
351
|
"kind": "field",
|
|
352
352
|
"name": "form",
|
|
353
|
+
"privacy": "protected",
|
|
353
354
|
"description": "Gets the form, if any, associated with the input element.",
|
|
354
355
|
"inheritedFrom": {
|
|
355
356
|
"name": "InputMixin",
|
|
@@ -421,7 +422,7 @@
|
|
|
421
422
|
{
|
|
422
423
|
"name": "variant",
|
|
423
424
|
"type": {
|
|
424
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\""
|
|
425
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
425
426
|
},
|
|
426
427
|
"default": "\"default\"",
|
|
427
428
|
"description": "The style variant of the button.",
|
|
@@ -439,7 +440,7 @@
|
|
|
439
440
|
{
|
|
440
441
|
"name": "size",
|
|
441
442
|
"type": {
|
|
442
|
-
"text": "\"s\" | \"m\""
|
|
443
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
443
444
|
},
|
|
444
445
|
"default": "\"m\"",
|
|
445
446
|
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
@@ -674,184 +675,6 @@
|
|
|
674
675
|
}
|
|
675
676
|
]
|
|
676
677
|
},
|
|
677
|
-
{
|
|
678
|
-
"kind": "javascript-module",
|
|
679
|
-
"path": "src/common/collection.ts",
|
|
680
|
-
"declarations": [
|
|
681
|
-
{
|
|
682
|
-
"kind": "function",
|
|
683
|
-
"name": "groupBy",
|
|
684
|
-
"parameters": [
|
|
685
|
-
{
|
|
686
|
-
"name": "array",
|
|
687
|
-
"type": {
|
|
688
|
-
"text": "Array<TObject>"
|
|
689
|
-
},
|
|
690
|
-
"description": "the collection of objects to group"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
"name": "key",
|
|
694
|
-
"type": {
|
|
695
|
-
"text": "TKey"
|
|
696
|
-
},
|
|
697
|
-
"description": "the property to group by"
|
|
698
|
-
}
|
|
699
|
-
],
|
|
700
|
-
"description": "Groups an array objects by property value",
|
|
701
|
-
"return": {
|
|
702
|
-
"type": {
|
|
703
|
-
"text": ""
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
],
|
|
708
|
-
"exports": [
|
|
709
|
-
{
|
|
710
|
-
"kind": "js",
|
|
711
|
-
"name": "groupBy",
|
|
712
|
-
"declaration": {
|
|
713
|
-
"name": "groupBy",
|
|
714
|
-
"module": "src/common/collection.ts"
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
]
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
"kind": "javascript-module",
|
|
721
|
-
"path": "src/common/events.ts",
|
|
722
|
-
"declarations": [
|
|
723
|
-
{
|
|
724
|
-
"kind": "class",
|
|
725
|
-
"description": "A base class for events which defaults to bubbling and composed",
|
|
726
|
-
"name": "NordEvent",
|
|
727
|
-
"superclass": {
|
|
728
|
-
"name": "Event",
|
|
729
|
-
"module": "src/common/events.ts"
|
|
730
|
-
},
|
|
731
|
-
"status": null,
|
|
732
|
-
"category": null
|
|
733
|
-
}
|
|
734
|
-
],
|
|
735
|
-
"exports": [
|
|
736
|
-
{
|
|
737
|
-
"kind": "js",
|
|
738
|
-
"name": "NordEvent",
|
|
739
|
-
"declaration": {
|
|
740
|
-
"name": "NordEvent",
|
|
741
|
-
"module": "src/common/events.ts"
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
]
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
"kind": "javascript-module",
|
|
748
|
-
"path": "src/common/focus.ts",
|
|
749
|
-
"declarations": [
|
|
750
|
-
{
|
|
751
|
-
"kind": "function",
|
|
752
|
-
"name": "getFocusedElement",
|
|
753
|
-
"return": {
|
|
754
|
-
"type": {
|
|
755
|
-
"text": "Element | undefined"
|
|
756
|
-
}
|
|
757
|
-
},
|
|
758
|
-
"parameters": [
|
|
759
|
-
{
|
|
760
|
-
"name": "root",
|
|
761
|
-
"type": {
|
|
762
|
-
"text": "Document | ShadowRoot"
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
],
|
|
766
|
-
"description": "Gets the currently focused element, taking shadow roots into account."
|
|
767
|
-
}
|
|
768
|
-
],
|
|
769
|
-
"exports": [
|
|
770
|
-
{
|
|
771
|
-
"kind": "js",
|
|
772
|
-
"name": "getFocusedElement",
|
|
773
|
-
"declaration": {
|
|
774
|
-
"name": "getFocusedElement",
|
|
775
|
-
"module": "src/common/focus.ts"
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
]
|
|
779
|
-
},
|
|
780
|
-
{
|
|
781
|
-
"kind": "javascript-module",
|
|
782
|
-
"path": "src/common/number.ts",
|
|
783
|
-
"declarations": [
|
|
784
|
-
{
|
|
785
|
-
"kind": "function",
|
|
786
|
-
"name": "wrap",
|
|
787
|
-
"parameters": [
|
|
788
|
-
{
|
|
789
|
-
"name": "val",
|
|
790
|
-
"type": {
|
|
791
|
-
"text": "number"
|
|
792
|
-
}
|
|
793
|
-
},
|
|
794
|
-
{
|
|
795
|
-
"name": "min",
|
|
796
|
-
"type": {
|
|
797
|
-
"text": "number"
|
|
798
|
-
}
|
|
799
|
-
},
|
|
800
|
-
{
|
|
801
|
-
"name": "max",
|
|
802
|
-
"type": {
|
|
803
|
-
"text": "number"
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
],
|
|
807
|
-
"description": "Wraps a value so that it always falls within min/max,\nwhere a value greater than max gets set to min, and vice versa"
|
|
808
|
-
}
|
|
809
|
-
],
|
|
810
|
-
"exports": [
|
|
811
|
-
{
|
|
812
|
-
"kind": "js",
|
|
813
|
-
"name": "wrap",
|
|
814
|
-
"declaration": {
|
|
815
|
-
"name": "wrap",
|
|
816
|
-
"module": "src/common/number.ts"
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
]
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
"kind": "javascript-module",
|
|
823
|
-
"path": "src/common/ref.ts",
|
|
824
|
-
"declarations": [
|
|
825
|
-
{
|
|
826
|
-
"kind": "function",
|
|
827
|
-
"name": "mergeRefs",
|
|
828
|
-
"return": {
|
|
829
|
-
"type": {
|
|
830
|
-
"text": "RefCallback"
|
|
831
|
-
}
|
|
832
|
-
},
|
|
833
|
-
"parameters": [
|
|
834
|
-
{
|
|
835
|
-
"name": "refs",
|
|
836
|
-
"type": {
|
|
837
|
-
"text": "Ref[]"
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
],
|
|
841
|
-
"description": "Creates a ref callback which will assign the element to every given ref"
|
|
842
|
-
}
|
|
843
|
-
],
|
|
844
|
-
"exports": [
|
|
845
|
-
{
|
|
846
|
-
"kind": "js",
|
|
847
|
-
"name": "mergeRefs",
|
|
848
|
-
"declaration": {
|
|
849
|
-
"name": "mergeRefs",
|
|
850
|
-
"module": "src/common/ref.ts"
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
]
|
|
854
|
-
},
|
|
855
678
|
{
|
|
856
679
|
"kind": "javascript-module",
|
|
857
680
|
"path": "src/command-menu/CommandMenu.ts",
|
|
@@ -872,6 +695,11 @@
|
|
|
872
695
|
"name": "inputRef",
|
|
873
696
|
"privacy": "private"
|
|
874
697
|
},
|
|
698
|
+
{
|
|
699
|
+
"kind": "field",
|
|
700
|
+
"name": "listRef",
|
|
701
|
+
"privacy": "private"
|
|
702
|
+
},
|
|
875
703
|
{
|
|
876
704
|
"kind": "field",
|
|
877
705
|
"name": "previousFocus",
|
|
@@ -884,7 +712,7 @@
|
|
|
884
712
|
"kind": "field",
|
|
885
713
|
"name": "dismissController",
|
|
886
714
|
"privacy": "private",
|
|
887
|
-
"default": "new LightDismissController(this, () => this.close())"
|
|
715
|
+
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: () => this.close(),\n })"
|
|
888
716
|
},
|
|
889
717
|
{
|
|
890
718
|
"kind": "field",
|
|
@@ -899,7 +727,7 @@
|
|
|
899
727
|
"text": "boolean"
|
|
900
728
|
},
|
|
901
729
|
"default": "false",
|
|
902
|
-
"description": "Show or hide
|
|
730
|
+
"description": "Show or hide the command menu.",
|
|
903
731
|
"attribute": "open"
|
|
904
732
|
},
|
|
905
733
|
{
|
|
@@ -919,15 +747,15 @@
|
|
|
919
747
|
"text": "Array<ICommandMenuAction>"
|
|
920
748
|
},
|
|
921
749
|
"default": "[]",
|
|
922
|
-
"description": "Array of commands to be included in the menu."
|
|
923
|
-
"attribute": "commands"
|
|
750
|
+
"description": "Array of commands to be included in the menu."
|
|
924
751
|
},
|
|
925
752
|
{
|
|
926
753
|
"kind": "field",
|
|
927
754
|
"name": "parent",
|
|
928
755
|
"type": {
|
|
929
756
|
"text": "string | undefined"
|
|
930
|
-
}
|
|
757
|
+
},
|
|
758
|
+
"privacy": "private"
|
|
931
759
|
},
|
|
932
760
|
{
|
|
933
761
|
"kind": "field",
|
|
@@ -935,6 +763,7 @@
|
|
|
935
763
|
"type": {
|
|
936
764
|
"text": "string"
|
|
937
765
|
},
|
|
766
|
+
"privacy": "private",
|
|
938
767
|
"default": "\"\""
|
|
939
768
|
},
|
|
940
769
|
{
|
|
@@ -981,7 +810,8 @@
|
|
|
981
810
|
"default": "{}",
|
|
982
811
|
"type": {
|
|
983
812
|
"text": "{ parent?: string }"
|
|
984
|
-
}
|
|
813
|
+
},
|
|
814
|
+
"description": "allows you to open the menu filtered to a specific parent command."
|
|
985
815
|
}
|
|
986
816
|
],
|
|
987
817
|
"description": "Show the command menu programmatically."
|
|
@@ -1001,6 +831,11 @@
|
|
|
1001
831
|
"name": "focus",
|
|
1002
832
|
"description": "Focus the command menu's input."
|
|
1003
833
|
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "method",
|
|
836
|
+
"name": "renderNoResults",
|
|
837
|
+
"privacy": "private"
|
|
838
|
+
},
|
|
1004
839
|
{
|
|
1005
840
|
"kind": "method",
|
|
1006
841
|
"name": "renderSection",
|
|
@@ -1025,6 +860,11 @@
|
|
|
1025
860
|
"name": "handleAnimationEnd",
|
|
1026
861
|
"privacy": "private"
|
|
1027
862
|
},
|
|
863
|
+
{
|
|
864
|
+
"kind": "method",
|
|
865
|
+
"name": "handleBlur",
|
|
866
|
+
"privacy": "private"
|
|
867
|
+
},
|
|
1028
868
|
{
|
|
1029
869
|
"kind": "method",
|
|
1030
870
|
"name": "handleInput",
|
|
@@ -1130,21 +970,21 @@
|
|
|
1130
970
|
"type": {
|
|
1131
971
|
"text": "NordEvent"
|
|
1132
972
|
},
|
|
1133
|
-
"description": "The command menu was opened."
|
|
973
|
+
"description": "The command menu was opened foo."
|
|
1134
974
|
},
|
|
1135
975
|
{
|
|
1136
976
|
"name": "close",
|
|
1137
977
|
"type": {
|
|
1138
978
|
"text": "NordEvent"
|
|
1139
979
|
},
|
|
1140
|
-
"description": "The command menu was closed."
|
|
980
|
+
"description": "The command menu was closed bar."
|
|
1141
981
|
},
|
|
1142
982
|
{
|
|
1143
|
-
"name": "command",
|
|
1144
983
|
"type": {
|
|
1145
984
|
"text": "SelectEvent"
|
|
1146
985
|
},
|
|
1147
|
-
"description": "User selected a command from the menu."
|
|
986
|
+
"description": "User selected a command from the menu.",
|
|
987
|
+
"name": "n-select"
|
|
1148
988
|
}
|
|
1149
989
|
],
|
|
1150
990
|
"attributes": [
|
|
@@ -1154,7 +994,7 @@
|
|
|
1154
994
|
"text": "boolean"
|
|
1155
995
|
},
|
|
1156
996
|
"default": "false",
|
|
1157
|
-
"description": "Show or hide
|
|
997
|
+
"description": "Show or hide the command menu.",
|
|
1158
998
|
"fieldName": "open"
|
|
1159
999
|
},
|
|
1160
1000
|
{
|
|
@@ -1165,15 +1005,6 @@
|
|
|
1165
1005
|
"default": "\"Type a command or search...\"",
|
|
1166
1006
|
"description": "Hint text to display in the search field.",
|
|
1167
1007
|
"fieldName": "placeholder"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
"name": "commands",
|
|
1171
|
-
"type": {
|
|
1172
|
-
"text": "Array<ICommandMenuAction>"
|
|
1173
|
-
},
|
|
1174
|
-
"default": "[]",
|
|
1175
|
-
"description": "Array of commands to be included in the menu.",
|
|
1176
|
-
"fieldName": "commands"
|
|
1177
1008
|
}
|
|
1178
1009
|
],
|
|
1179
1010
|
"mixins": [
|
|
@@ -1326,7 +1157,7 @@
|
|
|
1326
1157
|
"text": "ShortcutController"
|
|
1327
1158
|
},
|
|
1328
1159
|
"privacy": "private",
|
|
1329
|
-
"default": "new ShortcutController(host, { \"$mod+k\": actions.toggleOpen })"
|
|
1160
|
+
"default": "new ShortcutController(host, { \"$mod+k\": preventDefault(actions.toggleOpen) })"
|
|
1330
1161
|
},
|
|
1331
1162
|
{
|
|
1332
1163
|
"kind": "field",
|
|
@@ -1453,7 +1284,8 @@
|
|
|
1453
1284
|
"name": "icon",
|
|
1454
1285
|
"type": {
|
|
1455
1286
|
"text": "{ title: string; default: string }"
|
|
1456
|
-
}
|
|
1287
|
+
},
|
|
1288
|
+
"description": "An object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string.\nThis is intended to be used in cases where you import an icon's entire ES module and register it directly."
|
|
1457
1289
|
}
|
|
1458
1290
|
],
|
|
1459
1291
|
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
@@ -1472,13 +1304,15 @@
|
|
|
1472
1304
|
"name": "name",
|
|
1473
1305
|
"type": {
|
|
1474
1306
|
"text": "string"
|
|
1475
|
-
}
|
|
1307
|
+
},
|
|
1308
|
+
"description": "The name of the icon to be registered."
|
|
1476
1309
|
},
|
|
1477
1310
|
{
|
|
1478
1311
|
"name": "icon",
|
|
1479
1312
|
"type": {
|
|
1480
1313
|
"text": "string"
|
|
1481
|
-
}
|
|
1314
|
+
},
|
|
1315
|
+
"description": "The SVG string for the icon."
|
|
1482
1316
|
}
|
|
1483
1317
|
],
|
|
1484
1318
|
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
@@ -1551,6 +1385,7 @@
|
|
|
1551
1385
|
"type": {
|
|
1552
1386
|
"text": "string"
|
|
1553
1387
|
},
|
|
1388
|
+
"privacy": "private",
|
|
1554
1389
|
"default": "\"\""
|
|
1555
1390
|
},
|
|
1556
1391
|
{
|
|
@@ -1649,6 +1484,184 @@
|
|
|
1649
1484
|
}
|
|
1650
1485
|
]
|
|
1651
1486
|
},
|
|
1487
|
+
{
|
|
1488
|
+
"kind": "javascript-module",
|
|
1489
|
+
"path": "src/common/collection.ts",
|
|
1490
|
+
"declarations": [
|
|
1491
|
+
{
|
|
1492
|
+
"kind": "function",
|
|
1493
|
+
"name": "groupBy",
|
|
1494
|
+
"parameters": [
|
|
1495
|
+
{
|
|
1496
|
+
"name": "array",
|
|
1497
|
+
"type": {
|
|
1498
|
+
"text": "Array<TObject>"
|
|
1499
|
+
},
|
|
1500
|
+
"description": "the collection of objects to group"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"name": "key",
|
|
1504
|
+
"type": {
|
|
1505
|
+
"text": "TKey"
|
|
1506
|
+
},
|
|
1507
|
+
"description": "the property to group by"
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
"description": "Groups an array objects by property value",
|
|
1511
|
+
"return": {
|
|
1512
|
+
"type": {
|
|
1513
|
+
"text": ""
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
],
|
|
1518
|
+
"exports": [
|
|
1519
|
+
{
|
|
1520
|
+
"kind": "js",
|
|
1521
|
+
"name": "groupBy",
|
|
1522
|
+
"declaration": {
|
|
1523
|
+
"name": "groupBy",
|
|
1524
|
+
"module": "src/common/collection.ts"
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
]
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
"kind": "javascript-module",
|
|
1531
|
+
"path": "src/common/events.ts",
|
|
1532
|
+
"declarations": [
|
|
1533
|
+
{
|
|
1534
|
+
"kind": "class",
|
|
1535
|
+
"description": "A base class for events which defaults to bubbling and composed",
|
|
1536
|
+
"name": "NordEvent",
|
|
1537
|
+
"superclass": {
|
|
1538
|
+
"name": "Event",
|
|
1539
|
+
"module": "src/common/events.ts"
|
|
1540
|
+
},
|
|
1541
|
+
"status": null,
|
|
1542
|
+
"category": null
|
|
1543
|
+
}
|
|
1544
|
+
],
|
|
1545
|
+
"exports": [
|
|
1546
|
+
{
|
|
1547
|
+
"kind": "js",
|
|
1548
|
+
"name": "NordEvent",
|
|
1549
|
+
"declaration": {
|
|
1550
|
+
"name": "NordEvent",
|
|
1551
|
+
"module": "src/common/events.ts"
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"kind": "javascript-module",
|
|
1558
|
+
"path": "src/common/focus.ts",
|
|
1559
|
+
"declarations": [
|
|
1560
|
+
{
|
|
1561
|
+
"kind": "function",
|
|
1562
|
+
"name": "getFocusedElement",
|
|
1563
|
+
"return": {
|
|
1564
|
+
"type": {
|
|
1565
|
+
"text": "Element | undefined"
|
|
1566
|
+
}
|
|
1567
|
+
},
|
|
1568
|
+
"parameters": [
|
|
1569
|
+
{
|
|
1570
|
+
"name": "root",
|
|
1571
|
+
"type": {
|
|
1572
|
+
"text": "Document | ShadowRoot"
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
],
|
|
1576
|
+
"description": "Gets the currently focused element, taking shadow roots into account."
|
|
1577
|
+
}
|
|
1578
|
+
],
|
|
1579
|
+
"exports": [
|
|
1580
|
+
{
|
|
1581
|
+
"kind": "js",
|
|
1582
|
+
"name": "getFocusedElement",
|
|
1583
|
+
"declaration": {
|
|
1584
|
+
"name": "getFocusedElement",
|
|
1585
|
+
"module": "src/common/focus.ts"
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
]
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"kind": "javascript-module",
|
|
1592
|
+
"path": "src/common/number.ts",
|
|
1593
|
+
"declarations": [
|
|
1594
|
+
{
|
|
1595
|
+
"kind": "function",
|
|
1596
|
+
"name": "wrap",
|
|
1597
|
+
"parameters": [
|
|
1598
|
+
{
|
|
1599
|
+
"name": "val",
|
|
1600
|
+
"type": {
|
|
1601
|
+
"text": "number"
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
"name": "min",
|
|
1606
|
+
"type": {
|
|
1607
|
+
"text": "number"
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"name": "max",
|
|
1612
|
+
"type": {
|
|
1613
|
+
"text": "number"
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
],
|
|
1617
|
+
"description": "Wraps a value so that it always falls within min/max,\nwhere a value greater than max gets set to min, and vice versa"
|
|
1618
|
+
}
|
|
1619
|
+
],
|
|
1620
|
+
"exports": [
|
|
1621
|
+
{
|
|
1622
|
+
"kind": "js",
|
|
1623
|
+
"name": "wrap",
|
|
1624
|
+
"declaration": {
|
|
1625
|
+
"name": "wrap",
|
|
1626
|
+
"module": "src/common/number.ts"
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
]
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"kind": "javascript-module",
|
|
1633
|
+
"path": "src/common/ref.ts",
|
|
1634
|
+
"declarations": [
|
|
1635
|
+
{
|
|
1636
|
+
"kind": "function",
|
|
1637
|
+
"name": "mergeRefs",
|
|
1638
|
+
"return": {
|
|
1639
|
+
"type": {
|
|
1640
|
+
"text": "RefCallback"
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
"parameters": [
|
|
1644
|
+
{
|
|
1645
|
+
"name": "refs",
|
|
1646
|
+
"type": {
|
|
1647
|
+
"text": "Ref[]"
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
],
|
|
1651
|
+
"description": "Creates a ref callback which will assign the element to every given ref"
|
|
1652
|
+
}
|
|
1653
|
+
],
|
|
1654
|
+
"exports": [
|
|
1655
|
+
{
|
|
1656
|
+
"kind": "js",
|
|
1657
|
+
"name": "mergeRefs",
|
|
1658
|
+
"declaration": {
|
|
1659
|
+
"name": "mergeRefs",
|
|
1660
|
+
"module": "src/common/ref.ts"
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
]
|
|
1664
|
+
},
|
|
1652
1665
|
{
|
|
1653
1666
|
"kind": "javascript-module",
|
|
1654
1667
|
"path": "src/input/Input.ts",
|
|
@@ -1872,6 +1885,7 @@
|
|
|
1872
1885
|
{
|
|
1873
1886
|
"kind": "field",
|
|
1874
1887
|
"name": "form",
|
|
1888
|
+
"privacy": "protected",
|
|
1875
1889
|
"description": "Gets the form, if any, associated with the input element.",
|
|
1876
1890
|
"inheritedFrom": {
|
|
1877
1891
|
"name": "InputMixin",
|
|
@@ -2364,6 +2378,7 @@
|
|
|
2364
2378
|
{
|
|
2365
2379
|
"kind": "field",
|
|
2366
2380
|
"name": "form",
|
|
2381
|
+
"privacy": "protected",
|
|
2367
2382
|
"description": "Gets the form, if any, associated with the input element.",
|
|
2368
2383
|
"inheritedFrom": {
|
|
2369
2384
|
"name": "InputMixin",
|
|
@@ -2912,15 +2927,15 @@
|
|
|
2912
2927
|
"text": "ShortcutController"
|
|
2913
2928
|
},
|
|
2914
2929
|
"privacy": "private",
|
|
2915
|
-
"default": "new ShortcutController(this.host, { Escape:
|
|
2930
|
+
"default": "new ShortcutController(this.host, { Escape: this.handleEsc })"
|
|
2916
2931
|
},
|
|
2917
2932
|
{
|
|
2918
2933
|
"kind": "field",
|
|
2919
|
-
"name": "
|
|
2934
|
+
"name": "options",
|
|
2920
2935
|
"type": {
|
|
2921
|
-
"text": "
|
|
2936
|
+
"text": "LightDismissOptions"
|
|
2922
2937
|
},
|
|
2923
|
-
"default": "
|
|
2938
|
+
"default": "options"
|
|
2924
2939
|
},
|
|
2925
2940
|
{
|
|
2926
2941
|
"kind": "method",
|
|
@@ -2932,7 +2947,12 @@
|
|
|
2932
2947
|
},
|
|
2933
2948
|
{
|
|
2934
2949
|
"kind": "field",
|
|
2935
|
-
"name": "
|
|
2950
|
+
"name": "handleEsc",
|
|
2951
|
+
"privacy": "private"
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
"kind": "field",
|
|
2955
|
+
"name": "handleClickOut",
|
|
2936
2956
|
"privacy": "private"
|
|
2937
2957
|
}
|
|
2938
2958
|
]
|
|
@@ -3431,6 +3451,7 @@
|
|
|
3431
3451
|
{
|
|
3432
3452
|
"kind": "field",
|
|
3433
3453
|
"name": "form",
|
|
3454
|
+
"privacy": "protected",
|
|
3434
3455
|
"description": "Gets the form, if any, associated with the input element."
|
|
3435
3456
|
}
|
|
3436
3457
|
],
|
package/lib/Button.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,D as o,p as n,_ as
|
|
1
|
+
import{r as t,D as o,p as n,_ as r,n as e,s as a}from"./DraftComponentMixin-4bb26f5d.js";import{e as s}from"./property-03f59dce.js";import{l as i}from"./directive-40a31ee2.js";import{n as l}from"./ref-857246ae.js";import{I as c,F as d}from"./InputMixin-3e737480.js";const b=t`:host{all:initial;display:inline-block}*,::after,::before{box-sizing:border-box;margin:0;padding:0}.n-button{-webkit-appearance:none;align-items:center;appearance:none;background:var(--n-button-background-color,var(--n-color-button));border-radius:var(--n-button-border-radius,var(--n-border-radius-s));border:1px var(--n-button-border-style,solid) var(--n-button-border-color,var(--n-color-border-strong));box-shadow:var(--n-button-box-shadow,var(--n-box-shadow));color:var(--n-button-color,var(--n-color-text));cursor:pointer;display:flex;gap:var(--n-button-gap,var(--n-space-s));font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);font-size:var(--n-button-font-size,var(--n-font-size-m));font-weight:var(--n-button-font-weight,var(--n-font-weight));line-height:var(--n-line-height-form);margin:0;min-block-size:var(--n-button-min-height,var(--n-space-xl));padding:var(--n-button-padding-y,calc(var(--n-space-s)/ 1.6)) var(--n-button-padding-x,calc(var(--n-space-m)/ 1.2));text-align:var(--n-button-text-align,center);text-decoration:none;transition:all .1s ease;-webkit-user-select:none;user-select:none;inline-size:var(--n-button-width,fit-content)}:host([expand]){--n-button-width:100%;display:block}.n-content{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host(:hover){--n-button-background-color:var(--n-color-button-hover);--n-button-border-color:var(--n-color-border-hover)}:host([disabled]){--n-button-background-color:var(--n-color-border);--n-button-box-shadow:none;--n-button-border-color:var(--n-button-background-color);--n-button-color:var(--n-color-text-weaker);opacity:.5;pointer-events:none}.n-button:focus{--n-button-border-color:var(--n-color-primary);--n-button-border-style:solid;--n-button-box-shadow:0 0 0 1px var(--n-button-border-color);outline:0}.n-button:active{opacity:.8;transform:translateY(1px);transition:none}:host([variant=primary]){--n-button-background-color:var(--n-color-primary);--n-button-border-color:transparent;--n-button-box-shadow:none;--n-button-color:var(--n-color-text-inverse);--n-button-font-weight:var(--n-font-weight-active)}:host([variant=primary]:hover){--n-button-background-color:var(--n-color-primary-strong)}:host([variant=dashed]){--n-button-color:var(--n-color-text-weaker);--n-button-border-color:var(--n-color-border-hover);--n-button-border-style:dashed;--n-button-box-shadow:none}:host([variant=dashed]:hover){--n-button-color:var(--n-color-text)}:host([variant=plain]){--n-button-border-color:transparent;--n-button-box-shadow:none}:host([variant=danger]){--n-button-border-color:var(--n-color-status-danger);--n-button-color:var(--n-color-text-error);--n-button-font-weight:var(--n-font-weight-active)}:host([size="s"]){--n-button-font-size:var(--n-font-size-s);--n-button-min-height:var(--n-space-l);--n-button-padding-y:calc(var(--n-space-s) / 1.5);--n-button-padding-x:var(--n-space-s);--n-button-gap:calc(var(--n-space-s) / 2)}:host([size="s"]) .n-button{line-height:var(--n-line-height-tight)}:host([size="l"]){--n-button-border-radius:var(--n-border-radius);--n-button-font-size:var(--n-font-size-l);--n-button-min-height:calc(var(--n-space-xxl) - var(--n-space-l));--n-button-padding-x:calc(var(--n-space-l) / 1.3);--n-button-font-weight:var(--n-font-weight-active)}::slotted(*){color:inherit;pointer-events:none}::slotted(svg){color:var(--n-color-icon)}::slotted(button[slot=proxy]){display:none}:host(:hover) ::slotted(*){color:var(--n-color-icon-hover)}`;let u=class extends(c(d(o(a)))){constructor(){super(...arguments),this._proxyButton=document.createElement("button"),this.variant="default",this.type="submit",this.size="m",this.download=!1,this.target="_self",this.expand=!1}connectedCallback(){super.connectedCallback(),this.syncProxyButton()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupProxyButton()}updated(){this.syncProxyButton()}render(){const t=n`<slot name="before"></slot><div class="n-content"><slot></slot></div><slot name="after"></slot>`;return this.href?n`<a ${l(this.focusableRef)} class="n-button" target="${this.target}" ?download="${this.download}" href="${this.href}">${t}</a>`:n`<slot name="proxy"></slot><button ${l(this.focusableRef)} class="n-button" ?disabled="${this.disabled}" name="${i(this.name)}" value="${i(this.value)}" @click="${this.handleClick}">${t}</button>`}handleClick(){this._proxyButton.click()}get isFormAssociated(){return!this.href&&this.form}syncProxyButton(){const t=this._proxyButton;t.slot="proxy",t.className="n-button-proxy",t.disabled=this.disabled,t.type=this.type,this.name?t.name=this.name:t.removeAttribute("name"),this.value?t.value=this.value:t.removeAttribute("value"),this.isFormAssociated?this.appendChild(t):this.cleanupProxyButton()}cleanupProxyButton(){this._proxyButton.remove()}};u.styles=b,r([s({reflect:!0})],u.prototype,"variant",void 0),r([s({reflect:!0})],u.prototype,"type",void 0),r([s({reflect:!0})],u.prototype,"size",void 0),r([s({reflect:!0})],u.prototype,"href",void 0),r([s({type:Boolean})],u.prototype,"download",void 0),r([s({reflect:!0})],u.prototype,"target",void 0),r([s({reflect:!0,type:Boolean})],u.prototype,"expand",void 0),u=r([e("nord-button")],u);var v=u;export{v as default};
|
|
2
2
|
//# sourceMappingURL=Button.js.map
|