@nordhealth/components 3.2.0 → 3.4.0-alpha.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/custom-elements.json +1425 -1387
- package/lib/{AutocompleteMixin-a98ada34.js → AutocompleteMixin-60503685.js} +2 -2
- package/lib/{AutocompleteMixin-a98ada34.js.map → AutocompleteMixin-60503685.js.map} +1 -1
- package/lib/Avatar.js +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Banner.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/ButtonGroup.js +1 -1
- package/lib/{Calendar-3fd55b5d.js → Calendar-f7e95d9a.js} +2 -2
- package/lib/{Calendar-3fd55b5d.js.map → Calendar-f7e95d9a.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Card.js.map +1 -1
- package/lib/Checkbox.js +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/CommandMenuAction.js +1 -1
- package/lib/CommandMenuAction.js.map +1 -1
- package/lib/{Component-1f694235.js → Component-253ecb24.js} +2 -2
- package/lib/Component-253ecb24.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/Divider.js +1 -1
- package/lib/Drawer.js +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/{DropdownItem-4a02675f.js → DropdownItem-75a2468a.js} +2 -2
- package/lib/DropdownItem-75a2468a.js.map +1 -0
- package/lib/DropdownItem.js +1 -1
- package/lib/EmptyState.js +1 -1
- package/lib/EmptyState.js.map +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/Fieldset.js.map +1 -1
- package/lib/FocusableMixin-003e1094.js +2 -0
- package/lib/{FocusableMixin-186c69a2.js.map → FocusableMixin-003e1094.js.map} +1 -1
- package/lib/{FormAssociatedMixin-5fedde68.js → FormAssociatedMixin-0638b151.js} +2 -2
- package/lib/{FormAssociatedMixin-5fedde68.js.map → FormAssociatedMixin-0638b151.js.map} +1 -1
- package/lib/{FormField-3226fb17.js → FormField-0783cb5a.js} +2 -2
- package/lib/FormField-0783cb5a.js.map +1 -0
- package/lib/Header.js +1 -1
- package/lib/Icon.js +2 -2
- package/lib/Input.js +1 -1
- package/lib/{InputMixin-d50cb41a.js → InputMixin-87012c5a.js} +2 -2
- package/lib/{InputMixin-d50cb41a.js.map → InputMixin-87012c5a.js.map} +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/{LightDomController-8a770234.js → LightDomController-5c53b3f4.js} +2 -2
- package/lib/{LightDomController-8a770234.js.map → LightDomController-5c53b3f4.js.map} +1 -1
- package/lib/Message.js +1 -1
- package/lib/Modal.js +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/NavItem.js +1 -1
- package/lib/{NavToggle-fbd227e5.js → NavToggle-7e1ba314.js} +2 -2
- package/lib/{NavToggle-fbd227e5.js.map → NavToggle-7e1ba314.js.map} +1 -1
- package/lib/NavToggle.js +1 -1
- package/lib/Navigation.js +1 -1
- package/lib/Notification.js +1 -1
- package/lib/NotificationGroup.js +1 -1
- package/lib/{NotificationMixin-5e028561.js → NotificationMixin-cea138a7.js} +2 -2
- package/lib/{NotificationMixin-5e028561.js.map → NotificationMixin-cea138a7.js.map} +1 -1
- package/lib/{Popout-6a85e4b6.js → Popout-1183c22b.js} +2 -2
- package/lib/{Popout-6a85e4b6.js.map → Popout-1183c22b.js.map} +1 -1
- package/lib/Popout.js +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/Qrcode.js +1 -1
- package/lib/Qrcode.js.map +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Range.js +1 -1
- package/lib/Select.js +1 -1
- package/lib/{SizeMixin-f04ac402.js → SizeMixin-bc2098f4.js} +2 -2
- package/lib/{SizeMixin-f04ac402.js.map → SizeMixin-bc2098f4.js.map} +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Stack.js +1 -1
- package/lib/{Sticky-b4e6c315.js → Sticky-220280e0.js} +2 -2
- package/lib/Sticky-220280e0.js.map +1 -0
- package/lib/Tab.js +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabPanel.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/{TextField-3f901ec8.js → TextField-b455a6dd.js} +2 -2
- package/lib/{TextField-3f901ec8.js.map → TextField-b455a6dd.js.map} +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Toast.js +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/TopBar.js +1 -1
- package/lib/VisuallyHidden.js +1 -1
- package/lib/bundle.js +6 -6
- package/lib/bundle.js.map +1 -1
- package/lib/{class-map-c0d8e1e5.js → class-map-4a0dec4a.js} +2 -2
- package/lib/{class-map-c0d8e1e5.js.map → class-map-4a0dec4a.js.map} +1 -1
- package/lib/{collection-498f2b1f.js → collection-bba319d3.js} +3 -3
- package/lib/{collection-498f2b1f.js.map → collection-bba319d3.js.map} +1 -1
- package/lib/cond-77258def.js +2 -0
- package/lib/{cond-09498763.js.map → cond-77258def.js.map} +1 -1
- package/lib/{if-defined-8a007930.js → if-defined-10508457.js} +2 -2
- package/lib/{if-defined-8a007930.js.map → if-defined-10508457.js.map} +1 -1
- package/lib/index.js +1 -1
- package/lib/positioning-a572d126.js +1 -1
- package/lib/positioning-a572d126.js.map +1 -1
- package/lib/{query-assigned-elements-822fe360.js → query-assigned-elements-2f8275b7.js} +2 -2
- package/lib/query-assigned-elements-2f8275b7.js.map +1 -0
- package/lib/{ref-6b46e5ea.js → ref-f75a30b7.js} +3 -3
- package/lib/{ref-6b46e5ea.js.map → ref-f75a30b7.js.map} +1 -1
- package/lib/src/fieldset/Fieldset.d.ts +5 -1
- package/lib/src/layout/Layout.d.ts +6 -0
- package/lib/style-map-75ce20b3.js +7 -0
- package/lib/style-map-75ce20b3.js.map +1 -0
- package/package.json +2 -2
- package/lib/Component-1f694235.js.map +0 -1
- package/lib/DropdownItem-4a02675f.js.map +0 -1
- package/lib/FocusableMixin-186c69a2.js +0 -2
- package/lib/FormField-3226fb17.js.map +0 -1
- package/lib/Sticky-b4e6c315.js.map +0 -1
- package/lib/cond-09498763.js +0 -2
- package/lib/query-assigned-elements-822fe360.js.map +0 -1
- package/lib/style-map-5b757428.js +0 -7
- package/lib/style-map-5b757428.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -828,478 +828,496 @@
|
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
"kind": "javascript-module",
|
|
831
|
-
"path": "src/button/
|
|
831
|
+
"path": "src/button-group/ButtonGroup.ts",
|
|
832
832
|
"declarations": [
|
|
833
833
|
{
|
|
834
834
|
"kind": "class",
|
|
835
|
-
"description": "
|
|
836
|
-
"name": "
|
|
835
|
+
"description": "Button groups are designed to bring together button controls that are of a similar nature. For example text formatting controls.",
|
|
836
|
+
"name": "ButtonGroup",
|
|
837
837
|
"cssProperties": [
|
|
838
838
|
{
|
|
839
839
|
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
840
|
-
"name": "--n-button-border-radius",
|
|
840
|
+
"name": "--n-button-group-border-radius",
|
|
841
841
|
"default": "var(--n-border-radius-s)"
|
|
842
842
|
},
|
|
843
843
|
{
|
|
844
|
-
"description": "Controls the
|
|
845
|
-
"name": "--n-button-
|
|
846
|
-
"default": "var(--n-space-s)"
|
|
847
|
-
},
|
|
848
|
-
{
|
|
849
|
-
"description": "Controls the overlayed gradient background on the button.",
|
|
850
|
-
"name": "--n-button-gradient",
|
|
851
|
-
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
852
|
-
},
|
|
853
|
-
{
|
|
854
|
-
"description": "Controls the background color of the button, using our [color tokens](/tokens/#color).",
|
|
855
|
-
"name": "--n-button-background-color",
|
|
856
|
-
"default": "var(--n-color-button)"
|
|
857
|
-
},
|
|
858
|
-
{
|
|
859
|
-
"description": "Controls the border color of the button, using our [color tokens](/tokens/#color).",
|
|
860
|
-
"name": "--n-button-border-color",
|
|
861
|
-
"default": "var(--n-color-border-strong)"
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
"description": "Controls the text alignment for the text in the button.",
|
|
865
|
-
"name": "--n-button-text-align",
|
|
866
|
-
"default": "center"
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
"description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
|
|
870
|
-
"name": "--n-button-box-shadow",
|
|
844
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
845
|
+
"name": "--n-button-group-box-shadow",
|
|
871
846
|
"default": "var(--n-box-shadow)"
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
"name": "--n-button-color",
|
|
876
|
-
"default": "var(--n-color-text)"
|
|
877
|
-
},
|
|
847
|
+
}
|
|
848
|
+
],
|
|
849
|
+
"slots": [
|
|
878
850
|
{
|
|
879
|
-
"description": "
|
|
880
|
-
"name": "
|
|
881
|
-
|
|
882
|
-
|
|
851
|
+
"description": "The button group content",
|
|
852
|
+
"name": ""
|
|
853
|
+
}
|
|
854
|
+
],
|
|
855
|
+
"members": [
|
|
883
856
|
{
|
|
884
|
-
"
|
|
885
|
-
"name": "
|
|
886
|
-
"
|
|
857
|
+
"kind": "field",
|
|
858
|
+
"name": "direction",
|
|
859
|
+
"type": {
|
|
860
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
861
|
+
},
|
|
862
|
+
"default": "\"horizontal\"",
|
|
863
|
+
"description": "The direction of the button group.",
|
|
864
|
+
"attribute": "direction",
|
|
865
|
+
"reflects": true
|
|
887
866
|
},
|
|
888
867
|
{
|
|
889
|
-
"
|
|
890
|
-
"name": "
|
|
891
|
-
"
|
|
892
|
-
|
|
868
|
+
"kind": "field",
|
|
869
|
+
"name": "role",
|
|
870
|
+
"type": {
|
|
871
|
+
"text": "string"
|
|
872
|
+
},
|
|
873
|
+
"default": "\"group\"",
|
|
874
|
+
"description": "The appropriate role for the containing element.",
|
|
875
|
+
"attribute": "role",
|
|
876
|
+
"reflects": true
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
"attributes": [
|
|
893
880
|
{
|
|
894
|
-
"
|
|
895
|
-
"
|
|
896
|
-
|
|
881
|
+
"name": "direction",
|
|
882
|
+
"type": {
|
|
883
|
+
"text": "\"vertical\" | \"horizontal\""
|
|
884
|
+
},
|
|
885
|
+
"default": "\"horizontal\"",
|
|
886
|
+
"description": "The direction of the button group.",
|
|
887
|
+
"fieldName": "direction"
|
|
897
888
|
},
|
|
898
889
|
{
|
|
899
|
-
"
|
|
900
|
-
"
|
|
901
|
-
|
|
890
|
+
"name": "role",
|
|
891
|
+
"type": {
|
|
892
|
+
"text": "string"
|
|
893
|
+
},
|
|
894
|
+
"default": "\"group\"",
|
|
895
|
+
"description": "The appropriate role for the containing element.",
|
|
896
|
+
"fieldName": "role"
|
|
902
897
|
}
|
|
903
898
|
],
|
|
904
|
-
"
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
899
|
+
"superclass": {
|
|
900
|
+
"name": "LitElement",
|
|
901
|
+
"package": "lit"
|
|
902
|
+
},
|
|
903
|
+
"localization": [],
|
|
904
|
+
"status": "new",
|
|
905
|
+
"category": "structure",
|
|
906
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
|
|
907
|
+
"examples": [],
|
|
908
|
+
"dependencies": [],
|
|
909
|
+
"tagName": "nord-button-group",
|
|
910
|
+
"customElement": true
|
|
911
|
+
}
|
|
912
|
+
],
|
|
913
|
+
"exports": [
|
|
914
|
+
{
|
|
915
|
+
"kind": "js",
|
|
916
|
+
"name": "default",
|
|
917
|
+
"declaration": {
|
|
918
|
+
"name": "ButtonGroup",
|
|
919
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"kind": "custom-element-definition",
|
|
924
|
+
"name": "nord-button-group",
|
|
925
|
+
"declaration": {
|
|
926
|
+
"name": "ButtonGroup",
|
|
927
|
+
"module": "src/button-group/ButtonGroup.ts"
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"kind": "javascript-module",
|
|
934
|
+
"path": "src/calendar/Calendar.ts",
|
|
935
|
+
"declarations": [
|
|
936
|
+
{
|
|
937
|
+
"kind": "class",
|
|
938
|
+
"description": "Calendar allows user to pick a date. It comes with built-in\nfunctionality that allows you to set a minimum and a maximum allowed date.\nPlease note that the date must be passed in ISO-8601 format.",
|
|
939
|
+
"name": "Calendar",
|
|
940
|
+
"cssProperties": [
|
|
909
941
|
{
|
|
910
|
-
"description": "
|
|
911
|
-
"name": "
|
|
942
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
943
|
+
"name": "--n-calendar-border-radius",
|
|
944
|
+
"default": "var(--n-border-radius)"
|
|
912
945
|
},
|
|
913
946
|
{
|
|
914
|
-
"description": "
|
|
915
|
-
"name": "
|
|
947
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
948
|
+
"name": "--n-calendar-box-shadow",
|
|
949
|
+
"default": "var(--n-box-shadow-popout)"
|
|
916
950
|
}
|
|
917
951
|
],
|
|
918
952
|
"members": [
|
|
919
953
|
{
|
|
920
954
|
"kind": "field",
|
|
921
|
-
"name": "
|
|
922
|
-
"
|
|
923
|
-
|
|
955
|
+
"name": "monthSelectNode",
|
|
956
|
+
"type": {
|
|
957
|
+
"text": "HTMLElement"
|
|
958
|
+
},
|
|
959
|
+
"privacy": "private"
|
|
924
960
|
},
|
|
925
961
|
{
|
|
926
962
|
"kind": "field",
|
|
927
|
-
"name": "
|
|
963
|
+
"name": "focusedDayNode",
|
|
964
|
+
"type": {
|
|
965
|
+
"text": "HTMLButtonElement"
|
|
966
|
+
},
|
|
928
967
|
"privacy": "private"
|
|
929
968
|
},
|
|
930
969
|
{
|
|
931
970
|
"kind": "field",
|
|
932
|
-
"name": "
|
|
971
|
+
"name": "direction",
|
|
933
972
|
"privacy": "private",
|
|
934
|
-
"default": "new
|
|
973
|
+
"default": "new DirectionController(this)"
|
|
935
974
|
},
|
|
936
975
|
{
|
|
937
976
|
"kind": "field",
|
|
938
|
-
"name": "
|
|
977
|
+
"name": "swipe",
|
|
939
978
|
"privacy": "private",
|
|
940
|
-
"default": "new
|
|
979
|
+
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
941
980
|
},
|
|
942
981
|
{
|
|
943
982
|
"kind": "field",
|
|
944
|
-
"name": "
|
|
945
|
-
"
|
|
946
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
947
|
-
},
|
|
948
|
-
"default": "\"default\"",
|
|
949
|
-
"description": "The style variant of the button.",
|
|
950
|
-
"attribute": "variant",
|
|
951
|
-
"reflects": true
|
|
983
|
+
"name": "shortcuts",
|
|
984
|
+
"privacy": "private"
|
|
952
985
|
},
|
|
953
986
|
{
|
|
954
987
|
"kind": "field",
|
|
955
|
-
"name": "
|
|
956
|
-
"
|
|
957
|
-
|
|
958
|
-
},
|
|
959
|
-
"default": "\"submit\"",
|
|
960
|
-
"description": "The type of the button.",
|
|
961
|
-
"attribute": "type",
|
|
962
|
-
"reflects": true
|
|
988
|
+
"name": "localize",
|
|
989
|
+
"privacy": "private",
|
|
990
|
+
"default": "new LocalizeController<\"nord-calendar\">(this, {\n onLangChange: () => this.handleLangChange(),\n })"
|
|
963
991
|
},
|
|
964
992
|
{
|
|
965
993
|
"kind": "field",
|
|
966
|
-
"name": "
|
|
994
|
+
"name": "dateFormatShort",
|
|
967
995
|
"type": {
|
|
968
|
-
"text": "
|
|
996
|
+
"text": "Intl.DateTimeFormat"
|
|
969
997
|
},
|
|
970
|
-
"
|
|
971
|
-
"description": "
|
|
972
|
-
"attribute": "size",
|
|
973
|
-
"reflects": true
|
|
998
|
+
"privacy": "private",
|
|
999
|
+
"description": "Whilst dateAdapter is used for handling the formatting/parsing dates in the input,\nthese are used to format dates exclusively for the benefit of screen readers.\n\nWe prefer DateTimeFormat over date.toLocaleDateString, as the former has\nbetter performance when formatting large number of dates. See:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString#Performance"
|
|
974
1000
|
},
|
|
975
1001
|
{
|
|
976
1002
|
"kind": "field",
|
|
977
|
-
"name": "
|
|
1003
|
+
"name": "monthNames",
|
|
978
1004
|
"type": {
|
|
979
|
-
"text": "
|
|
1005
|
+
"text": "string[]"
|
|
980
1006
|
},
|
|
981
|
-
"privacy": "private"
|
|
982
|
-
"attribute": "aria-expanded"
|
|
1007
|
+
"privacy": "private"
|
|
983
1008
|
},
|
|
984
1009
|
{
|
|
985
1010
|
"kind": "field",
|
|
986
|
-
"name": "
|
|
1011
|
+
"name": "monthNamesShort",
|
|
987
1012
|
"type": {
|
|
988
|
-
"text": "
|
|
1013
|
+
"text": "string[]"
|
|
989
1014
|
},
|
|
990
|
-
"privacy": "private"
|
|
991
|
-
"attribute": "aria-haspopup"
|
|
1015
|
+
"privacy": "private"
|
|
992
1016
|
},
|
|
993
1017
|
{
|
|
994
1018
|
"kind": "field",
|
|
995
|
-
"name": "
|
|
1019
|
+
"name": "dayNames",
|
|
996
1020
|
"type": {
|
|
997
|
-
"text": "string
|
|
1021
|
+
"text": "string[]"
|
|
998
1022
|
},
|
|
999
|
-
"
|
|
1000
|
-
"attribute": "href",
|
|
1001
|
-
"reflects": true
|
|
1023
|
+
"privacy": "private"
|
|
1002
1024
|
},
|
|
1003
1025
|
{
|
|
1004
1026
|
"kind": "field",
|
|
1005
|
-
"name": "
|
|
1027
|
+
"name": "dayNamesShort",
|
|
1006
1028
|
"type": {
|
|
1007
|
-
"text": "
|
|
1029
|
+
"text": "string[]"
|
|
1008
1030
|
},
|
|
1009
|
-
"
|
|
1010
|
-
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1011
|
-
"attribute": "download"
|
|
1031
|
+
"privacy": "private"
|
|
1012
1032
|
},
|
|
1013
1033
|
{
|
|
1014
1034
|
"kind": "field",
|
|
1015
|
-
"name": "
|
|
1035
|
+
"name": "value",
|
|
1016
1036
|
"type": {
|
|
1017
|
-
"text": "
|
|
1037
|
+
"text": "string"
|
|
1018
1038
|
},
|
|
1019
|
-
"default": "\"
|
|
1020
|
-
"description": "
|
|
1021
|
-
"attribute": "
|
|
1039
|
+
"default": "\"\"",
|
|
1040
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1041
|
+
"attribute": "value"
|
|
1022
1042
|
},
|
|
1023
1043
|
{
|
|
1024
1044
|
"kind": "field",
|
|
1025
|
-
"name": "
|
|
1045
|
+
"name": "firstDayOfWeek",
|
|
1026
1046
|
"type": {
|
|
1027
|
-
"text": "
|
|
1047
|
+
"text": "DaysOfWeek"
|
|
1048
|
+
},
|
|
1049
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1050
|
+
"attribute": "firstDayOfWeek"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"kind": "field",
|
|
1054
|
+
"name": "min",
|
|
1055
|
+
"type": {
|
|
1056
|
+
"text": "string"
|
|
1057
|
+
},
|
|
1058
|
+
"default": "\"\"",
|
|
1059
|
+
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
1060
|
+
"attribute": "min"
|
|
1061
|
+
},
|
|
1062
|
+
{
|
|
1063
|
+
"kind": "field",
|
|
1064
|
+
"name": "max",
|
|
1065
|
+
"type": {
|
|
1066
|
+
"text": "string"
|
|
1067
|
+
},
|
|
1068
|
+
"default": "\"\"",
|
|
1069
|
+
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
1070
|
+
"attribute": "max"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"kind": "field",
|
|
1074
|
+
"name": "expand",
|
|
1075
|
+
"type": {
|
|
1076
|
+
"text": "boolean"
|
|
1028
1077
|
},
|
|
1029
1078
|
"default": "false",
|
|
1030
|
-
"description": "Controls whether the
|
|
1079
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1031
1080
|
"attribute": "expand",
|
|
1032
1081
|
"reflects": true
|
|
1033
1082
|
},
|
|
1034
1083
|
{
|
|
1035
1084
|
"kind": "field",
|
|
1036
|
-
"name": "
|
|
1085
|
+
"name": "isDateDisabled",
|
|
1086
|
+
"type": {
|
|
1087
|
+
"text": "DatePredicate"
|
|
1088
|
+
},
|
|
1089
|
+
"default": "isDateDisabled",
|
|
1090
|
+
"description": "Controls which days are disabled and therefore disallowed.\nFor example, this can be used to disallow selection of weekends."
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"kind": "field",
|
|
1094
|
+
"name": "isDateHighlighted",
|
|
1095
|
+
"type": {
|
|
1096
|
+
"text": "(date: Date) => string | boolean"
|
|
1097
|
+
},
|
|
1098
|
+
"default": "isDateHighlighted",
|
|
1099
|
+
"description": "Controls which days are highlighted with a small indicator.\nReturning a \"falsy\" value will not show an indicator.\nReturning \"truthy\" value will show the indicator, but without an accessible label.\nReturning a string will show the indicator, and use the string as accessible label.\nIt is recommended to return a string rather than a truthy value whenever possible."
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"kind": "field",
|
|
1103
|
+
"name": "activeFocus",
|
|
1037
1104
|
"type": {
|
|
1038
1105
|
"text": "boolean"
|
|
1039
1106
|
},
|
|
1040
|
-
"
|
|
1041
|
-
"
|
|
1042
|
-
|
|
1043
|
-
|
|
1107
|
+
"privacy": "private",
|
|
1108
|
+
"default": "false"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
"kind": "field",
|
|
1112
|
+
"name": "focusedDay",
|
|
1113
|
+
"privacy": "private",
|
|
1114
|
+
"default": "new Date()"
|
|
1044
1115
|
},
|
|
1045
1116
|
{
|
|
1046
1117
|
"kind": "method",
|
|
1047
|
-
"name": "
|
|
1118
|
+
"name": "focus",
|
|
1119
|
+
"parameters": [
|
|
1120
|
+
{
|
|
1121
|
+
"name": "options",
|
|
1122
|
+
"optional": true,
|
|
1123
|
+
"type": {
|
|
1124
|
+
"text": "FocusOptions & { target: \"day\" | \"month\" }"
|
|
1125
|
+
},
|
|
1126
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1127
|
+
}
|
|
1128
|
+
],
|
|
1129
|
+
"description": "Programmatically move focus to the calendar."
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"kind": "method",
|
|
1133
|
+
"name": "handleValueChange",
|
|
1134
|
+
"privacy": "protected"
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
"kind": "method",
|
|
1138
|
+
"name": "handleFocusedDayChange",
|
|
1139
|
+
"privacy": "protected"
|
|
1140
|
+
},
|
|
1141
|
+
{
|
|
1142
|
+
"kind": "method",
|
|
1143
|
+
"name": "handleLangChange",
|
|
1144
|
+
"privacy": "private"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"kind": "field",
|
|
1148
|
+
"name": "handleDaySelect",
|
|
1149
|
+
"privacy": "private"
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"kind": "method",
|
|
1153
|
+
"name": "addDays",
|
|
1048
1154
|
"privacy": "private",
|
|
1049
1155
|
"parameters": [
|
|
1050
1156
|
{
|
|
1051
|
-
"name": "
|
|
1157
|
+
"name": "days",
|
|
1052
1158
|
"type": {
|
|
1053
|
-
"text": "
|
|
1159
|
+
"text": "number"
|
|
1054
1160
|
}
|
|
1055
1161
|
}
|
|
1056
|
-
]
|
|
1057
|
-
"description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
|
|
1162
|
+
]
|
|
1058
1163
|
},
|
|
1059
1164
|
{
|
|
1060
1165
|
"kind": "method",
|
|
1061
|
-
"name": "
|
|
1166
|
+
"name": "addMonths",
|
|
1062
1167
|
"privacy": "private",
|
|
1063
1168
|
"parameters": [
|
|
1064
1169
|
{
|
|
1065
|
-
"name": "
|
|
1170
|
+
"name": "months",
|
|
1066
1171
|
"type": {
|
|
1067
|
-
"text": "
|
|
1172
|
+
"text": "number"
|
|
1068
1173
|
}
|
|
1069
1174
|
}
|
|
1070
1175
|
]
|
|
1071
1176
|
},
|
|
1072
1177
|
{
|
|
1073
1178
|
"kind": "method",
|
|
1074
|
-
"name": "
|
|
1179
|
+
"name": "addYears",
|
|
1180
|
+
"privacy": "private",
|
|
1181
|
+
"parameters": [
|
|
1182
|
+
{
|
|
1183
|
+
"name": "years",
|
|
1184
|
+
"type": {
|
|
1185
|
+
"text": "number"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
]
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
"kind": "method",
|
|
1192
|
+
"name": "startOfWeek",
|
|
1075
1193
|
"privacy": "private"
|
|
1076
1194
|
},
|
|
1077
1195
|
{
|
|
1078
|
-
"kind": "
|
|
1079
|
-
"name": "
|
|
1196
|
+
"kind": "method",
|
|
1197
|
+
"name": "endOfWeek",
|
|
1080
1198
|
"privacy": "private"
|
|
1081
1199
|
},
|
|
1082
1200
|
{
|
|
1083
1201
|
"kind": "method",
|
|
1084
|
-
"name": "
|
|
1202
|
+
"name": "setMonth",
|
|
1085
1203
|
"privacy": "private",
|
|
1086
1204
|
"parameters": [
|
|
1087
1205
|
{
|
|
1088
|
-
"name": "
|
|
1206
|
+
"name": "month",
|
|
1089
1207
|
"type": {
|
|
1090
|
-
"text": "
|
|
1208
|
+
"text": "number"
|
|
1091
1209
|
}
|
|
1092
1210
|
}
|
|
1093
1211
|
]
|
|
1094
1212
|
},
|
|
1095
1213
|
{
|
|
1096
1214
|
"kind": "method",
|
|
1097
|
-
"name": "
|
|
1215
|
+
"name": "setYear",
|
|
1098
1216
|
"privacy": "private",
|
|
1099
1217
|
"parameters": [
|
|
1100
1218
|
{
|
|
1101
|
-
"name": "
|
|
1219
|
+
"name": "year",
|
|
1102
1220
|
"type": {
|
|
1103
|
-
"text": "
|
|
1221
|
+
"text": "number"
|
|
1104
1222
|
}
|
|
1105
1223
|
}
|
|
1106
|
-
]
|
|
1107
|
-
|
|
1224
|
+
]
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"kind": "method",
|
|
1228
|
+
"name": "setFocusedDay",
|
|
1229
|
+
"privacy": "private",
|
|
1230
|
+
"parameters": [
|
|
1231
|
+
{
|
|
1232
|
+
"name": "day",
|
|
1233
|
+
"type": {
|
|
1234
|
+
"text": "Date"
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
]
|
|
1108
1238
|
},
|
|
1109
1239
|
{
|
|
1110
1240
|
"kind": "field",
|
|
1111
|
-
"name": "
|
|
1112
|
-
"
|
|
1113
|
-
"text": "boolean"
|
|
1114
|
-
},
|
|
1115
|
-
"default": "false",
|
|
1116
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1117
|
-
"attribute": "disabled",
|
|
1118
|
-
"reflects": true,
|
|
1119
|
-
"inheritedFrom": {
|
|
1120
|
-
"name": "InputMixin",
|
|
1121
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1122
|
-
}
|
|
1241
|
+
"name": "handleMonthSelect",
|
|
1242
|
+
"privacy": "private"
|
|
1123
1243
|
},
|
|
1124
1244
|
{
|
|
1125
1245
|
"kind": "field",
|
|
1126
|
-
"name": "
|
|
1246
|
+
"name": "handleYearSelect",
|
|
1247
|
+
"privacy": "private"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
"kind": "field",
|
|
1251
|
+
"name": "handleNextMonthClick",
|
|
1252
|
+
"privacy": "private"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"kind": "field",
|
|
1256
|
+
"name": "handlePreviousMonthClick",
|
|
1257
|
+
"privacy": "private"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"kind": "field",
|
|
1261
|
+
"name": "enableActiveFocus",
|
|
1262
|
+
"privacy": "private"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"kind": "field",
|
|
1266
|
+
"name": "disableActiveFocus",
|
|
1267
|
+
"privacy": "private"
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
"events": [
|
|
1271
|
+
{
|
|
1272
|
+
"name": "nord-focus-date",
|
|
1127
1273
|
"type": {
|
|
1128
|
-
"text": "
|
|
1274
|
+
"text": "DateSelectEvent"
|
|
1129
1275
|
},
|
|
1130
|
-
"description": "
|
|
1131
|
-
"attribute": "name",
|
|
1132
|
-
"inheritedFrom": {
|
|
1133
|
-
"name": "InputMixin",
|
|
1134
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1135
|
-
}
|
|
1276
|
+
"description": "Dispatched when the calendar's focused date changes."
|
|
1136
1277
|
},
|
|
1137
1278
|
{
|
|
1138
|
-
"
|
|
1279
|
+
"type": {
|
|
1280
|
+
"text": "DateSelectEvent"
|
|
1281
|
+
},
|
|
1282
|
+
"description": "Dispatched when a date is selected and the value changes.",
|
|
1283
|
+
"name": "change"
|
|
1284
|
+
}
|
|
1285
|
+
],
|
|
1286
|
+
"attributes": [
|
|
1287
|
+
{
|
|
1139
1288
|
"name": "value",
|
|
1140
1289
|
"type": {
|
|
1141
1290
|
"text": "string"
|
|
1142
1291
|
},
|
|
1143
1292
|
"default": "\"\"",
|
|
1144
|
-
"description": "The
|
|
1145
|
-
"
|
|
1146
|
-
"inheritedFrom": {
|
|
1147
|
-
"name": "InputMixin",
|
|
1148
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1149
|
-
}
|
|
1293
|
+
"description": "The selected date on the calendar. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
1294
|
+
"fieldName": "value"
|
|
1150
1295
|
},
|
|
1151
1296
|
{
|
|
1152
|
-
"
|
|
1153
|
-
"name": "formAncestor",
|
|
1297
|
+
"name": "firstDayOfWeek",
|
|
1154
1298
|
"type": {
|
|
1155
|
-
"text": "
|
|
1299
|
+
"text": "DaysOfWeek"
|
|
1156
1300
|
},
|
|
1157
|
-
"
|
|
1158
|
-
"
|
|
1159
|
-
"inheritedFrom": {
|
|
1160
|
-
"name": "InputMixin",
|
|
1161
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1162
|
-
}
|
|
1301
|
+
"description": "Which day is considered first day of the week? `0` for Sunday, `1` for Monday, etc.\nDefault is Monday.",
|
|
1302
|
+
"fieldName": "firstDayOfWeek"
|
|
1163
1303
|
},
|
|
1164
1304
|
{
|
|
1165
|
-
"
|
|
1166
|
-
"name": "_formId",
|
|
1305
|
+
"name": "min",
|
|
1167
1306
|
"type": {
|
|
1168
|
-
"text": "string
|
|
1307
|
+
"text": "string"
|
|
1169
1308
|
},
|
|
1170
|
-
"
|
|
1171
|
-
"
|
|
1172
|
-
|
|
1173
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1174
|
-
}
|
|
1309
|
+
"default": "\"\"",
|
|
1310
|
+
"description": "Minimum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the max property.",
|
|
1311
|
+
"fieldName": "min"
|
|
1175
1312
|
},
|
|
1176
1313
|
{
|
|
1177
|
-
"
|
|
1178
|
-
"name": "form",
|
|
1179
|
-
"type": {
|
|
1180
|
-
"text": "HTMLFormElement | null"
|
|
1181
|
-
},
|
|
1182
|
-
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1183
|
-
"attribute": "form",
|
|
1184
|
-
"inheritedFrom": {
|
|
1185
|
-
"name": "InputMixin",
|
|
1186
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1187
|
-
}
|
|
1188
|
-
},
|
|
1189
|
-
{
|
|
1190
|
-
"kind": "field",
|
|
1191
|
-
"name": "focusableRef",
|
|
1192
|
-
"privacy": "protected",
|
|
1193
|
-
"inheritedFrom": {
|
|
1194
|
-
"name": "FocusableMixin",
|
|
1195
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1196
|
-
}
|
|
1197
|
-
},
|
|
1198
|
-
{
|
|
1199
|
-
"kind": "method",
|
|
1200
|
-
"name": "focus",
|
|
1201
|
-
"parameters": [
|
|
1202
|
-
{
|
|
1203
|
-
"name": "options",
|
|
1204
|
-
"optional": true,
|
|
1205
|
-
"type": {
|
|
1206
|
-
"text": "FocusOptions"
|
|
1207
|
-
},
|
|
1208
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1209
|
-
}
|
|
1210
|
-
],
|
|
1211
|
-
"description": "Programmatically move focus to the component.",
|
|
1212
|
-
"inheritedFrom": {
|
|
1213
|
-
"name": "FocusableMixin",
|
|
1214
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1215
|
-
}
|
|
1216
|
-
},
|
|
1217
|
-
{
|
|
1218
|
-
"kind": "method",
|
|
1219
|
-
"name": "blur",
|
|
1220
|
-
"description": "Programmatically remove focus from the component.",
|
|
1221
|
-
"inheritedFrom": {
|
|
1222
|
-
"name": "FocusableMixin",
|
|
1223
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1224
|
-
}
|
|
1225
|
-
},
|
|
1226
|
-
{
|
|
1227
|
-
"kind": "method",
|
|
1228
|
-
"name": "click",
|
|
1229
|
-
"description": "Programmatically simulates a click on the component.",
|
|
1230
|
-
"inheritedFrom": {
|
|
1231
|
-
"name": "FocusableMixin",
|
|
1232
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
],
|
|
1236
|
-
"attributes": [
|
|
1237
|
-
{
|
|
1238
|
-
"name": "variant",
|
|
1239
|
-
"type": {
|
|
1240
|
-
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
1241
|
-
},
|
|
1242
|
-
"default": "\"default\"",
|
|
1243
|
-
"description": "The style variant of the button.",
|
|
1244
|
-
"fieldName": "variant"
|
|
1245
|
-
},
|
|
1246
|
-
{
|
|
1247
|
-
"name": "type",
|
|
1248
|
-
"type": {
|
|
1249
|
-
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1250
|
-
},
|
|
1251
|
-
"default": "\"submit\"",
|
|
1252
|
-
"description": "The type of the button.",
|
|
1253
|
-
"fieldName": "type"
|
|
1254
|
-
},
|
|
1255
|
-
{
|
|
1256
|
-
"name": "size",
|
|
1257
|
-
"type": {
|
|
1258
|
-
"text": "\"s\" | \"m\" | \"l\""
|
|
1259
|
-
},
|
|
1260
|
-
"default": "\"m\"",
|
|
1261
|
-
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1262
|
-
"fieldName": "size"
|
|
1263
|
-
},
|
|
1264
|
-
{
|
|
1265
|
-
"name": "aria-expanded",
|
|
1266
|
-
"type": {
|
|
1267
|
-
"text": "\"true\" | \"false\" | undefined"
|
|
1268
|
-
},
|
|
1269
|
-
"fieldName": "accessibleExpanded"
|
|
1270
|
-
},
|
|
1271
|
-
{
|
|
1272
|
-
"name": "aria-haspopup",
|
|
1273
|
-
"type": {
|
|
1274
|
-
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
1275
|
-
},
|
|
1276
|
-
"fieldName": "accessibleHasPopup"
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
"name": "href",
|
|
1280
|
-
"type": {
|
|
1281
|
-
"text": "string | undefined"
|
|
1282
|
-
},
|
|
1283
|
-
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1284
|
-
"fieldName": "href"
|
|
1285
|
-
},
|
|
1286
|
-
{
|
|
1287
|
-
"name": "download",
|
|
1288
|
-
"type": {
|
|
1289
|
-
"text": "boolean"
|
|
1290
|
-
},
|
|
1291
|
-
"default": "false",
|
|
1292
|
-
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1293
|
-
"fieldName": "download"
|
|
1294
|
-
},
|
|
1295
|
-
{
|
|
1296
|
-
"name": "target",
|
|
1314
|
+
"name": "max",
|
|
1297
1315
|
"type": {
|
|
1298
|
-
"text": "
|
|
1316
|
+
"text": "string"
|
|
1299
1317
|
},
|
|
1300
|
-
"default": "\"
|
|
1301
|
-
"description": "
|
|
1302
|
-
"fieldName": "
|
|
1318
|
+
"default": "\"\"",
|
|
1319
|
+
"description": "Maximum date allowed to be picked. Must be in IS0-8601 format: YYYY-MM-DD.\nThis setting can be used alone or together with the min property.",
|
|
1320
|
+
"fieldName": "max"
|
|
1303
1321
|
},
|
|
1304
1322
|
{
|
|
1305
1323
|
"name": "expand",
|
|
@@ -1307,92 +1325,42 @@
|
|
|
1307
1325
|
"text": "boolean"
|
|
1308
1326
|
},
|
|
1309
1327
|
"default": "false",
|
|
1310
|
-
"description": "Controls whether the
|
|
1328
|
+
"description": "Controls whether the calendar expands to fill the width of its container.",
|
|
1311
1329
|
"fieldName": "expand"
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
"description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
|
|
1320
|
-
"fieldName": "loading"
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
"name": "disabled",
|
|
1324
|
-
"type": {
|
|
1325
|
-
"text": "boolean"
|
|
1326
|
-
},
|
|
1327
|
-
"default": "false",
|
|
1328
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1329
|
-
"fieldName": "disabled",
|
|
1330
|
-
"inheritedFrom": {
|
|
1331
|
-
"name": "InputMixin",
|
|
1332
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1333
|
-
}
|
|
1334
|
-
},
|
|
1330
|
+
}
|
|
1331
|
+
],
|
|
1332
|
+
"superclass": {
|
|
1333
|
+
"name": "LitElement",
|
|
1334
|
+
"package": "lit"
|
|
1335
|
+
},
|
|
1336
|
+
"localization": [
|
|
1335
1337
|
{
|
|
1336
|
-
"name": "
|
|
1337
|
-
"
|
|
1338
|
-
"text": "string | undefined"
|
|
1339
|
-
},
|
|
1340
|
-
"description": "The name of the form component.",
|
|
1341
|
-
"fieldName": "name",
|
|
1342
|
-
"inheritedFrom": {
|
|
1343
|
-
"name": "InputMixin",
|
|
1344
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1345
|
-
}
|
|
1338
|
+
"name": "prevMonthLabel",
|
|
1339
|
+
"description": "Accessible label for the previous month button."
|
|
1346
1340
|
},
|
|
1347
1341
|
{
|
|
1348
|
-
"name": "
|
|
1349
|
-
"
|
|
1350
|
-
"text": "string"
|
|
1351
|
-
},
|
|
1352
|
-
"default": "\"\"",
|
|
1353
|
-
"description": "The value of the form component.",
|
|
1354
|
-
"fieldName": "value",
|
|
1355
|
-
"inheritedFrom": {
|
|
1356
|
-
"name": "InputMixin",
|
|
1357
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1358
|
-
}
|
|
1342
|
+
"name": "nextMonthLabel",
|
|
1343
|
+
"description": "Accessible label for the next month button."
|
|
1359
1344
|
},
|
|
1360
1345
|
{
|
|
1361
|
-
"name": "
|
|
1362
|
-
"
|
|
1363
|
-
"text": "HTMLFormElement | null"
|
|
1364
|
-
},
|
|
1365
|
-
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1366
|
-
"fieldName": "form",
|
|
1367
|
-
"inheritedFrom": {
|
|
1368
|
-
"name": "InputMixin",
|
|
1369
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
],
|
|
1373
|
-
"mixins": [
|
|
1374
|
-
{
|
|
1375
|
-
"name": "InputMixin",
|
|
1376
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
1346
|
+
"name": "monthSelectLabel",
|
|
1347
|
+
"description": "Accessible label for the month select."
|
|
1377
1348
|
},
|
|
1378
1349
|
{
|
|
1379
|
-
"name": "
|
|
1380
|
-
"
|
|
1350
|
+
"name": "yearSelectLabel",
|
|
1351
|
+
"description": "Accessible label for the year select."
|
|
1381
1352
|
}
|
|
1382
1353
|
],
|
|
1383
|
-
"superclass": {
|
|
1384
|
-
"name": "LitElement",
|
|
1385
|
-
"package": "lit"
|
|
1386
|
-
},
|
|
1387
|
-
"localization": [],
|
|
1388
1354
|
"status": "ready",
|
|
1389
|
-
"category": "
|
|
1390
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n-
|
|
1355
|
+
"category": "list",
|
|
1356
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n",
|
|
1391
1357
|
"examples": [],
|
|
1392
1358
|
"dependencies": [
|
|
1393
|
-
"
|
|
1359
|
+
"button",
|
|
1360
|
+
"visually-hidden",
|
|
1361
|
+
"icon"
|
|
1394
1362
|
],
|
|
1395
|
-
"tagName": "nord-
|
|
1363
|
+
"tagName": "nord-calendar",
|
|
1396
1364
|
"customElement": true
|
|
1397
1365
|
}
|
|
1398
1366
|
],
|
|
@@ -1401,613 +1369,637 @@
|
|
|
1401
1369
|
"kind": "js",
|
|
1402
1370
|
"name": "default",
|
|
1403
1371
|
"declaration": {
|
|
1404
|
-
"name": "
|
|
1405
|
-
"module": "src/
|
|
1372
|
+
"name": "Calendar",
|
|
1373
|
+
"module": "src/calendar/Calendar.ts"
|
|
1406
1374
|
}
|
|
1407
1375
|
},
|
|
1408
1376
|
{
|
|
1409
1377
|
"kind": "custom-element-definition",
|
|
1410
|
-
"name": "nord-
|
|
1378
|
+
"name": "nord-calendar",
|
|
1411
1379
|
"declaration": {
|
|
1412
|
-
"name": "
|
|
1413
|
-
"module": "src/
|
|
1380
|
+
"name": "Calendar",
|
|
1381
|
+
"module": "src/calendar/Calendar.ts"
|
|
1414
1382
|
}
|
|
1415
1383
|
}
|
|
1416
1384
|
]
|
|
1417
1385
|
},
|
|
1418
1386
|
{
|
|
1419
1387
|
"kind": "javascript-module",
|
|
1420
|
-
"path": "src/
|
|
1388
|
+
"path": "src/calendar/DateSelectEvent.ts",
|
|
1421
1389
|
"declarations": [
|
|
1422
1390
|
{
|
|
1423
1391
|
"kind": "class",
|
|
1424
|
-
"description": "
|
|
1425
|
-
"name": "
|
|
1426
|
-
"cssProperties": [
|
|
1427
|
-
{
|
|
1428
|
-
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
1429
|
-
"name": "--n-button-group-border-radius",
|
|
1430
|
-
"default": "var(--n-border-radius-s)"
|
|
1431
|
-
},
|
|
1432
|
-
{
|
|
1433
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1434
|
-
"name": "--n-button-group-box-shadow",
|
|
1435
|
-
"default": "var(--n-box-shadow)"
|
|
1436
|
-
}
|
|
1437
|
-
],
|
|
1438
|
-
"slots": [
|
|
1439
|
-
{
|
|
1440
|
-
"description": "The button group content",
|
|
1441
|
-
"name": ""
|
|
1442
|
-
}
|
|
1443
|
-
],
|
|
1444
|
-
"members": [
|
|
1445
|
-
{
|
|
1446
|
-
"kind": "field",
|
|
1447
|
-
"name": "direction",
|
|
1448
|
-
"type": {
|
|
1449
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
1450
|
-
},
|
|
1451
|
-
"default": "\"horizontal\"",
|
|
1452
|
-
"description": "The direction of the button group.",
|
|
1453
|
-
"attribute": "direction",
|
|
1454
|
-
"reflects": true
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
"kind": "field",
|
|
1458
|
-
"name": "role",
|
|
1459
|
-
"type": {
|
|
1460
|
-
"text": "string"
|
|
1461
|
-
},
|
|
1462
|
-
"default": "\"group\"",
|
|
1463
|
-
"description": "The appropriate role for the containing element.",
|
|
1464
|
-
"attribute": "role",
|
|
1465
|
-
"reflects": true
|
|
1466
|
-
}
|
|
1467
|
-
],
|
|
1468
|
-
"attributes": [
|
|
1469
|
-
{
|
|
1470
|
-
"name": "direction",
|
|
1471
|
-
"type": {
|
|
1472
|
-
"text": "\"vertical\" | \"horizontal\""
|
|
1473
|
-
},
|
|
1474
|
-
"default": "\"horizontal\"",
|
|
1475
|
-
"description": "The direction of the button group.",
|
|
1476
|
-
"fieldName": "direction"
|
|
1477
|
-
},
|
|
1478
|
-
{
|
|
1479
|
-
"name": "role",
|
|
1480
|
-
"type": {
|
|
1481
|
-
"text": "string"
|
|
1482
|
-
},
|
|
1483
|
-
"default": "\"group\"",
|
|
1484
|
-
"description": "The appropriate role for the containing element.",
|
|
1485
|
-
"fieldName": "role"
|
|
1486
|
-
}
|
|
1487
|
-
],
|
|
1392
|
+
"description": "",
|
|
1393
|
+
"name": "DateSelectEvent",
|
|
1488
1394
|
"superclass": {
|
|
1489
|
-
"name": "
|
|
1490
|
-
"
|
|
1491
|
-
}
|
|
1492
|
-
"localization": [],
|
|
1493
|
-
"status": "new",
|
|
1494
|
-
"category": "structure",
|
|
1495
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to group together buttons, or dropdowns, of a similar nature or purpose.\n- Use the appropriate `role` attribute on the button group to provide additional semantics.\n- Use an `aria-labelledby` attribute referencing another element to best explain the contents of the button group.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t add components other than buttons, dropdowns and in some instances visually hidden components to the button group.\n- Don’t skip the addition of an appropriate label if the added `role` attribute value calls for it.\n- Don’t use for building grid based layouts.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n",
|
|
1496
|
-
"examples": [],
|
|
1497
|
-
"dependencies": [],
|
|
1498
|
-
"tagName": "nord-button-group",
|
|
1499
|
-
"customElement": true
|
|
1395
|
+
"name": "NordEvent",
|
|
1396
|
+
"module": "/src/common/events.js"
|
|
1397
|
+
}
|
|
1500
1398
|
}
|
|
1501
1399
|
],
|
|
1502
1400
|
"exports": [
|
|
1503
1401
|
{
|
|
1504
1402
|
"kind": "js",
|
|
1505
|
-
"name": "
|
|
1403
|
+
"name": "DateSelectEvent",
|
|
1506
1404
|
"declaration": {
|
|
1507
|
-
"name": "
|
|
1508
|
-
"module": "src/
|
|
1405
|
+
"name": "DateSelectEvent",
|
|
1406
|
+
"module": "src/calendar/DateSelectEvent.ts"
|
|
1509
1407
|
}
|
|
1510
|
-
}
|
|
1408
|
+
}
|
|
1409
|
+
]
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"kind": "javascript-module",
|
|
1413
|
+
"path": "src/calendar/localization.ts",
|
|
1414
|
+
"declarations": [
|
|
1511
1415
|
{
|
|
1512
|
-
"kind": "
|
|
1513
|
-
"name": "
|
|
1416
|
+
"kind": "variable",
|
|
1417
|
+
"name": "calendarLocalization",
|
|
1418
|
+
"type": {
|
|
1419
|
+
"text": "object"
|
|
1420
|
+
},
|
|
1421
|
+
"default": "{\n prevMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n monthSelectLabel: \"Month\",\n yearSelectLabel: \"Year\",\n}"
|
|
1422
|
+
}
|
|
1423
|
+
],
|
|
1424
|
+
"exports": [
|
|
1425
|
+
{
|
|
1426
|
+
"kind": "js",
|
|
1427
|
+
"name": "default",
|
|
1514
1428
|
"declaration": {
|
|
1515
|
-
"name": "
|
|
1516
|
-
"module": "src/
|
|
1429
|
+
"name": "calendarLocalization",
|
|
1430
|
+
"module": "src/calendar/localization.ts"
|
|
1517
1431
|
}
|
|
1518
1432
|
}
|
|
1519
1433
|
]
|
|
1520
1434
|
},
|
|
1521
1435
|
{
|
|
1522
1436
|
"kind": "javascript-module",
|
|
1523
|
-
"path": "src/
|
|
1437
|
+
"path": "src/button/Button.ts",
|
|
1524
1438
|
"declarations": [
|
|
1525
1439
|
{
|
|
1526
1440
|
"kind": "class",
|
|
1527
|
-
"description": "
|
|
1528
|
-
"name": "
|
|
1441
|
+
"description": "Buttons are used for interface actions. Primary style should be\nused only once per section for main call-to-action, while other\nstyles can appear more frequently.",
|
|
1442
|
+
"name": "Button",
|
|
1529
1443
|
"cssProperties": [
|
|
1530
1444
|
{
|
|
1531
|
-
"description": "Controls
|
|
1532
|
-
"name": "--n-
|
|
1533
|
-
"default": "var(--n-border-radius)"
|
|
1445
|
+
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
1446
|
+
"name": "--n-button-border-radius",
|
|
1447
|
+
"default": "var(--n-border-radius-s)"
|
|
1534
1448
|
},
|
|
1535
1449
|
{
|
|
1536
|
-
"description": "Controls the
|
|
1537
|
-
"name": "--n-
|
|
1538
|
-
"default": "var(--n-
|
|
1539
|
-
}
|
|
1540
|
-
],
|
|
1541
|
-
"members": [
|
|
1450
|
+
"description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
|
|
1451
|
+
"name": "--n-button-gap",
|
|
1452
|
+
"default": "var(--n-space-s)"
|
|
1453
|
+
},
|
|
1542
1454
|
{
|
|
1543
|
-
"
|
|
1544
|
-
"name": "
|
|
1545
|
-
"
|
|
1546
|
-
"text": "HTMLElement"
|
|
1547
|
-
},
|
|
1548
|
-
"privacy": "private"
|
|
1455
|
+
"description": "Controls the overlayed gradient background on the button.",
|
|
1456
|
+
"name": "--n-button-gradient",
|
|
1457
|
+
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
1549
1458
|
},
|
|
1550
1459
|
{
|
|
1551
|
-
"
|
|
1552
|
-
"name": "
|
|
1553
|
-
"
|
|
1554
|
-
"text": "HTMLButtonElement"
|
|
1555
|
-
},
|
|
1556
|
-
"privacy": "private"
|
|
1460
|
+
"description": "Controls the background color of the button, using our [color tokens](/tokens/#color).",
|
|
1461
|
+
"name": "--n-button-background-color",
|
|
1462
|
+
"default": "var(--n-color-button)"
|
|
1557
1463
|
},
|
|
1558
1464
|
{
|
|
1559
|
-
"
|
|
1560
|
-
"name": "
|
|
1561
|
-
"
|
|
1562
|
-
"default": "new DirectionController(this)"
|
|
1465
|
+
"description": "Controls the border color of the button, using our [color tokens](/tokens/#color).",
|
|
1466
|
+
"name": "--n-button-border-color",
|
|
1467
|
+
"default": "var(--n-color-border-strong)"
|
|
1563
1468
|
},
|
|
1564
1469
|
{
|
|
1565
|
-
"
|
|
1566
|
-
"name": "
|
|
1567
|
-
"
|
|
1568
|
-
"default": "new SwipeController(this, {\n matchesGesture: isHorizontalSwipe,\n onSwipeEnd: ({ distX }) => this.addMonths(distX < 0 ? 1 : -1),\n })"
|
|
1470
|
+
"description": "Controls the text alignment for the text in the button.",
|
|
1471
|
+
"name": "--n-button-text-align",
|
|
1472
|
+
"default": "center"
|
|
1569
1473
|
},
|
|
1570
1474
|
{
|
|
1571
|
-
"
|
|
1572
|
-
"name": "
|
|
1573
|
-
"
|
|
1475
|
+
"description": "Controls the surrounding shadow, using our [box shadow tokens](/tokens/#box-shadow).",
|
|
1476
|
+
"name": "--n-button-box-shadow",
|
|
1477
|
+
"default": "var(--n-box-shadow)"
|
|
1574
1478
|
},
|
|
1575
1479
|
{
|
|
1576
|
-
"
|
|
1577
|
-
"name": "
|
|
1578
|
-
"
|
|
1579
|
-
|
|
1480
|
+
"description": "Controls the color of the text within the button, using our [color tokens](/tokens/#color).",
|
|
1481
|
+
"name": "--n-button-color",
|
|
1482
|
+
"default": "var(--n-color-text)"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"description": "Controls the inline, or left and right, padding of the button.",
|
|
1486
|
+
"name": "--n-button-padding-inline",
|
|
1487
|
+
"default": "calc(var(--n-space-m) / 1.2)"
|
|
1488
|
+
},
|
|
1489
|
+
{
|
|
1490
|
+
"description": "Controls the size of the text within the button, using our [font tokens](/tokens/#font).",
|
|
1491
|
+
"name": "--n-button-font-size",
|
|
1492
|
+
"default": "var(--n-font-size-m)"
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"description": "Controls the weight of the text within the button, using our [font tokens](/tokens/#font).",
|
|
1496
|
+
"name": "--n-button-font-weight",
|
|
1497
|
+
"default": "var(--n-font-weight)"
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"description": "Controls the minimum block size, or height, of the button using our [spacing tokens](/tokens/#space).",
|
|
1501
|
+
"name": "--n-button-min-block-size",
|
|
1502
|
+
"default": "var(--n-space-xl)"
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
"description": "Controls the color of toggle icon that gets rendered when the button is used as a [Dropdown](/components/dropdown/) toggle.",
|
|
1506
|
+
"name": "--n-button-toggle-icon-color",
|
|
1507
|
+
"default": "var(--n-color-icon)"
|
|
1508
|
+
}
|
|
1509
|
+
],
|
|
1510
|
+
"slots": [
|
|
1511
|
+
{
|
|
1512
|
+
"description": "The button content",
|
|
1513
|
+
"name": ""
|
|
1580
1514
|
},
|
|
1515
|
+
{
|
|
1516
|
+
"description": "Used to place content at the start of button text. Typically used for icons.",
|
|
1517
|
+
"name": "start"
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"description": "Used to place content at the end of button text. Typically used for icons.",
|
|
1521
|
+
"name": "end"
|
|
1522
|
+
}
|
|
1523
|
+
],
|
|
1524
|
+
"members": [
|
|
1581
1525
|
{
|
|
1582
1526
|
"kind": "field",
|
|
1583
|
-
"name": "
|
|
1584
|
-
"type": {
|
|
1585
|
-
"text": "Intl.DateTimeFormat"
|
|
1586
|
-
},
|
|
1527
|
+
"name": "defaultSlot",
|
|
1587
1528
|
"privacy": "private",
|
|
1588
|
-
"
|
|
1529
|
+
"default": "new SlotController(this)"
|
|
1589
1530
|
},
|
|
1590
1531
|
{
|
|
1591
1532
|
"kind": "field",
|
|
1592
|
-
"name": "
|
|
1593
|
-
"type": {
|
|
1594
|
-
"text": "string[]"
|
|
1595
|
-
},
|
|
1533
|
+
"name": "buttonRef",
|
|
1596
1534
|
"privacy": "private"
|
|
1597
1535
|
},
|
|
1598
1536
|
{
|
|
1599
1537
|
"kind": "field",
|
|
1600
|
-
"name": "
|
|
1601
|
-
"
|
|
1602
|
-
|
|
1603
|
-
},
|
|
1604
|
-
"privacy": "private"
|
|
1538
|
+
"name": "events",
|
|
1539
|
+
"privacy": "private",
|
|
1540
|
+
"default": "new EventController(this)"
|
|
1605
1541
|
},
|
|
1606
1542
|
{
|
|
1607
1543
|
"kind": "field",
|
|
1608
|
-
"name": "
|
|
1544
|
+
"name": "lightDom",
|
|
1545
|
+
"privacy": "private",
|
|
1546
|
+
"default": "new LightDomController(this, {\n render: () => this.renderLightDom(),\n })"
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
"kind": "field",
|
|
1550
|
+
"name": "variant",
|
|
1609
1551
|
"type": {
|
|
1610
|
-
"text": "
|
|
1552
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
1611
1553
|
},
|
|
1612
|
-
"
|
|
1554
|
+
"default": "\"default\"",
|
|
1555
|
+
"description": "The style variant of the button.",
|
|
1556
|
+
"attribute": "variant",
|
|
1557
|
+
"reflects": true
|
|
1613
1558
|
},
|
|
1614
1559
|
{
|
|
1615
1560
|
"kind": "field",
|
|
1616
|
-
"name": "
|
|
1561
|
+
"name": "type",
|
|
1617
1562
|
"type": {
|
|
1618
|
-
"text": "
|
|
1563
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1619
1564
|
},
|
|
1620
|
-
"
|
|
1565
|
+
"default": "\"submit\"",
|
|
1566
|
+
"description": "The type of the button.",
|
|
1567
|
+
"attribute": "type",
|
|
1568
|
+
"reflects": true
|
|
1621
1569
|
},
|
|
1622
1570
|
{
|
|
1623
1571
|
"kind": "field",
|
|
1624
|
-
"name": "
|
|
1572
|
+
"name": "size",
|
|
1625
1573
|
"type": {
|
|
1626
|
-
"text": "
|
|
1574
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
1627
1575
|
},
|
|
1628
|
-
"default": "\"\"",
|
|
1629
|
-
"description": "The
|
|
1630
|
-
"attribute": "
|
|
1576
|
+
"default": "\"m\"",
|
|
1577
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1578
|
+
"attribute": "size",
|
|
1579
|
+
"reflects": true
|
|
1631
1580
|
},
|
|
1632
1581
|
{
|
|
1633
1582
|
"kind": "field",
|
|
1634
|
-
"name": "
|
|
1583
|
+
"name": "accessibleExpanded",
|
|
1635
1584
|
"type": {
|
|
1636
|
-
"text": "
|
|
1585
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
1637
1586
|
},
|
|
1638
|
-
"
|
|
1639
|
-
"attribute": "
|
|
1587
|
+
"privacy": "private",
|
|
1588
|
+
"attribute": "aria-expanded"
|
|
1640
1589
|
},
|
|
1641
1590
|
{
|
|
1642
1591
|
"kind": "field",
|
|
1643
|
-
"name": "
|
|
1592
|
+
"name": "accessibleHasPopup",
|
|
1644
1593
|
"type": {
|
|
1645
|
-
"text": "
|
|
1594
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
1646
1595
|
},
|
|
1647
|
-
"
|
|
1648
|
-
"
|
|
1649
|
-
"attribute": "min"
|
|
1596
|
+
"privacy": "private",
|
|
1597
|
+
"attribute": "aria-haspopup"
|
|
1650
1598
|
},
|
|
1651
1599
|
{
|
|
1652
1600
|
"kind": "field",
|
|
1653
|
-
"name": "
|
|
1601
|
+
"name": "href",
|
|
1654
1602
|
"type": {
|
|
1655
|
-
"text": "string"
|
|
1603
|
+
"text": "string | undefined"
|
|
1656
1604
|
},
|
|
1657
|
-
"
|
|
1658
|
-
"
|
|
1659
|
-
"
|
|
1605
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1606
|
+
"attribute": "href",
|
|
1607
|
+
"reflects": true
|
|
1660
1608
|
},
|
|
1661
1609
|
{
|
|
1662
1610
|
"kind": "field",
|
|
1663
|
-
"name": "
|
|
1611
|
+
"name": "download",
|
|
1664
1612
|
"type": {
|
|
1665
1613
|
"text": "boolean"
|
|
1666
1614
|
},
|
|
1667
1615
|
"default": "false",
|
|
1668
|
-
"description": "
|
|
1669
|
-
"attribute": "
|
|
1670
|
-
"reflects": true
|
|
1616
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1617
|
+
"attribute": "download"
|
|
1671
1618
|
},
|
|
1672
1619
|
{
|
|
1673
1620
|
"kind": "field",
|
|
1674
|
-
"name": "
|
|
1621
|
+
"name": "target",
|
|
1675
1622
|
"type": {
|
|
1676
|
-
"text": "
|
|
1623
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1677
1624
|
},
|
|
1678
|
-
"default": "
|
|
1679
|
-
"description": "
|
|
1625
|
+
"default": "\"_self\"",
|
|
1626
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
1627
|
+
"attribute": "target"
|
|
1680
1628
|
},
|
|
1681
1629
|
{
|
|
1682
1630
|
"kind": "field",
|
|
1683
|
-
"name": "
|
|
1631
|
+
"name": "expand",
|
|
1684
1632
|
"type": {
|
|
1685
|
-
"text": "
|
|
1633
|
+
"text": "boolean"
|
|
1686
1634
|
},
|
|
1687
|
-
"default": "
|
|
1688
|
-
"description": "Controls
|
|
1635
|
+
"default": "false",
|
|
1636
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1637
|
+
"attribute": "expand",
|
|
1638
|
+
"reflects": true
|
|
1689
1639
|
},
|
|
1690
1640
|
{
|
|
1691
1641
|
"kind": "field",
|
|
1692
|
-
"name": "
|
|
1642
|
+
"name": "loading",
|
|
1693
1643
|
"type": {
|
|
1694
1644
|
"text": "boolean"
|
|
1695
1645
|
},
|
|
1696
|
-
"
|
|
1697
|
-
"
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
"kind": "field",
|
|
1701
|
-
"name": "focusedDay",
|
|
1702
|
-
"privacy": "private",
|
|
1703
|
-
"default": "new Date()"
|
|
1646
|
+
"default": "false",
|
|
1647
|
+
"description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
|
|
1648
|
+
"attribute": "loading",
|
|
1649
|
+
"reflects": true
|
|
1704
1650
|
},
|
|
1705
1651
|
{
|
|
1706
1652
|
"kind": "method",
|
|
1707
|
-
"name": "
|
|
1653
|
+
"name": "renderLink",
|
|
1654
|
+
"privacy": "private",
|
|
1708
1655
|
"parameters": [
|
|
1709
1656
|
{
|
|
1710
|
-
"name": "
|
|
1711
|
-
"optional": true,
|
|
1657
|
+
"name": "innards",
|
|
1712
1658
|
"type": {
|
|
1713
|
-
"text": "
|
|
1714
|
-
}
|
|
1715
|
-
"description": "An object which controls aspects of the focusing process."
|
|
1659
|
+
"text": "TemplateResult"
|
|
1660
|
+
}
|
|
1716
1661
|
}
|
|
1717
1662
|
],
|
|
1718
|
-
"description": "
|
|
1719
|
-
},
|
|
1720
|
-
{
|
|
1721
|
-
"kind": "method",
|
|
1722
|
-
"name": "handleValueChange",
|
|
1723
|
-
"privacy": "protected"
|
|
1663
|
+
"description": "We jump through some hoops here to ensure the link is treated correctly when \"disabled\".\nLinks cannot be disabled natively, so we need to rely on some aria magic to get the correct semantics.\nAlong with the advice in the article below, we also set tabindex to \"-1\", so it is taken out of tab order."
|
|
1724
1664
|
},
|
|
1725
1665
|
{
|
|
1726
1666
|
"kind": "method",
|
|
1727
|
-
"name": "
|
|
1728
|
-
"privacy": "
|
|
1667
|
+
"name": "renderButton",
|
|
1668
|
+
"privacy": "private",
|
|
1669
|
+
"parameters": [
|
|
1670
|
+
{
|
|
1671
|
+
"name": "innards",
|
|
1672
|
+
"type": {
|
|
1673
|
+
"text": "TemplateResult"
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
]
|
|
1729
1677
|
},
|
|
1730
1678
|
{
|
|
1731
1679
|
"kind": "method",
|
|
1732
|
-
"name": "
|
|
1680
|
+
"name": "renderLightDom",
|
|
1733
1681
|
"privacy": "private"
|
|
1734
1682
|
},
|
|
1735
1683
|
{
|
|
1736
1684
|
"kind": "field",
|
|
1737
|
-
"name": "
|
|
1685
|
+
"name": "handleOuterClick",
|
|
1738
1686
|
"privacy": "private"
|
|
1739
1687
|
},
|
|
1740
1688
|
{
|
|
1741
1689
|
"kind": "method",
|
|
1742
|
-
"name": "
|
|
1690
|
+
"name": "handleClick",
|
|
1743
1691
|
"privacy": "private",
|
|
1744
1692
|
"parameters": [
|
|
1745
1693
|
{
|
|
1746
|
-
"name": "
|
|
1694
|
+
"name": "e",
|
|
1747
1695
|
"type": {
|
|
1748
|
-
"text": "
|
|
1696
|
+
"text": "Event"
|
|
1749
1697
|
}
|
|
1750
1698
|
}
|
|
1751
1699
|
]
|
|
1752
1700
|
},
|
|
1753
1701
|
{
|
|
1754
1702
|
"kind": "method",
|
|
1755
|
-
"name": "
|
|
1703
|
+
"name": "handleProxyChange",
|
|
1756
1704
|
"privacy": "private",
|
|
1757
1705
|
"parameters": [
|
|
1758
1706
|
{
|
|
1759
|
-
"name": "
|
|
1707
|
+
"name": "e",
|
|
1760
1708
|
"type": {
|
|
1761
|
-
"text": "
|
|
1709
|
+
"text": "Event"
|
|
1762
1710
|
}
|
|
1763
1711
|
}
|
|
1764
|
-
]
|
|
1712
|
+
],
|
|
1713
|
+
"description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
|
|
1765
1714
|
},
|
|
1766
1715
|
{
|
|
1767
|
-
"kind": "
|
|
1768
|
-
"name": "
|
|
1716
|
+
"kind": "field",
|
|
1717
|
+
"name": "disabled",
|
|
1718
|
+
"type": {
|
|
1719
|
+
"text": "boolean"
|
|
1720
|
+
},
|
|
1721
|
+
"default": "false",
|
|
1722
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1723
|
+
"attribute": "disabled",
|
|
1724
|
+
"reflects": true,
|
|
1725
|
+
"inheritedFrom": {
|
|
1726
|
+
"name": "InputMixin",
|
|
1727
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"kind": "field",
|
|
1732
|
+
"name": "name",
|
|
1733
|
+
"type": {
|
|
1734
|
+
"text": "string | undefined"
|
|
1735
|
+
},
|
|
1736
|
+
"description": "The name of the form component.",
|
|
1737
|
+
"attribute": "name",
|
|
1738
|
+
"inheritedFrom": {
|
|
1739
|
+
"name": "InputMixin",
|
|
1740
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1741
|
+
}
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
"kind": "field",
|
|
1745
|
+
"name": "value",
|
|
1746
|
+
"type": {
|
|
1747
|
+
"text": "string"
|
|
1748
|
+
},
|
|
1749
|
+
"default": "\"\"",
|
|
1750
|
+
"description": "The value of the form component.",
|
|
1751
|
+
"attribute": "value",
|
|
1752
|
+
"inheritedFrom": {
|
|
1753
|
+
"name": "InputMixin",
|
|
1754
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1755
|
+
}
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
"kind": "field",
|
|
1759
|
+
"name": "formAncestor",
|
|
1760
|
+
"type": {
|
|
1761
|
+
"text": "HTMLFormElement | null"
|
|
1762
|
+
},
|
|
1769
1763
|
"privacy": "private",
|
|
1770
|
-
"
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}
|
|
1776
|
-
}
|
|
1777
|
-
]
|
|
1764
|
+
"default": "null",
|
|
1765
|
+
"inheritedFrom": {
|
|
1766
|
+
"name": "InputMixin",
|
|
1767
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1768
|
+
}
|
|
1778
1769
|
},
|
|
1779
1770
|
{
|
|
1780
|
-
"kind": "
|
|
1781
|
-
"name": "
|
|
1782
|
-
"
|
|
1771
|
+
"kind": "field",
|
|
1772
|
+
"name": "_formId",
|
|
1773
|
+
"type": {
|
|
1774
|
+
"text": "string | undefined"
|
|
1775
|
+
},
|
|
1776
|
+
"privacy": "protected",
|
|
1777
|
+
"inheritedFrom": {
|
|
1778
|
+
"name": "InputMixin",
|
|
1779
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1780
|
+
}
|
|
1783
1781
|
},
|
|
1784
1782
|
{
|
|
1785
|
-
"kind": "
|
|
1786
|
-
"name": "
|
|
1787
|
-
"
|
|
1783
|
+
"kind": "field",
|
|
1784
|
+
"name": "form",
|
|
1785
|
+
"type": {
|
|
1786
|
+
"text": "HTMLFormElement | null"
|
|
1787
|
+
},
|
|
1788
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1789
|
+
"attribute": "form",
|
|
1790
|
+
"inheritedFrom": {
|
|
1791
|
+
"name": "InputMixin",
|
|
1792
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1793
|
+
}
|
|
1794
|
+
},
|
|
1795
|
+
{
|
|
1796
|
+
"kind": "field",
|
|
1797
|
+
"name": "focusableRef",
|
|
1798
|
+
"privacy": "protected",
|
|
1799
|
+
"inheritedFrom": {
|
|
1800
|
+
"name": "FocusableMixin",
|
|
1801
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1802
|
+
}
|
|
1788
1803
|
},
|
|
1789
1804
|
{
|
|
1790
1805
|
"kind": "method",
|
|
1791
|
-
"name": "
|
|
1792
|
-
"privacy": "private",
|
|
1806
|
+
"name": "focus",
|
|
1793
1807
|
"parameters": [
|
|
1794
1808
|
{
|
|
1795
|
-
"name": "
|
|
1809
|
+
"name": "options",
|
|
1810
|
+
"optional": true,
|
|
1796
1811
|
"type": {
|
|
1797
|
-
"text": "
|
|
1798
|
-
}
|
|
1812
|
+
"text": "FocusOptions"
|
|
1813
|
+
},
|
|
1814
|
+
"description": "An object which controls aspects of the focusing process."
|
|
1799
1815
|
}
|
|
1800
|
-
]
|
|
1816
|
+
],
|
|
1817
|
+
"description": "Programmatically move focus to the component.",
|
|
1818
|
+
"inheritedFrom": {
|
|
1819
|
+
"name": "FocusableMixin",
|
|
1820
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1821
|
+
}
|
|
1801
1822
|
},
|
|
1802
1823
|
{
|
|
1803
1824
|
"kind": "method",
|
|
1804
|
-
"name": "
|
|
1805
|
-
"
|
|
1806
|
-
"
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
"text": "number"
|
|
1811
|
-
}
|
|
1812
|
-
}
|
|
1813
|
-
]
|
|
1825
|
+
"name": "blur",
|
|
1826
|
+
"description": "Programmatically remove focus from the component.",
|
|
1827
|
+
"inheritedFrom": {
|
|
1828
|
+
"name": "FocusableMixin",
|
|
1829
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1830
|
+
}
|
|
1814
1831
|
},
|
|
1815
1832
|
{
|
|
1816
1833
|
"kind": "method",
|
|
1817
|
-
"name": "
|
|
1818
|
-
"
|
|
1819
|
-
"
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1834
|
+
"name": "click",
|
|
1835
|
+
"description": "Programmatically simulates a click on the component.",
|
|
1836
|
+
"inheritedFrom": {
|
|
1837
|
+
"name": "FocusableMixin",
|
|
1838
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
],
|
|
1842
|
+
"attributes": [
|
|
1843
|
+
{
|
|
1844
|
+
"name": "variant",
|
|
1845
|
+
"type": {
|
|
1846
|
+
"text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
|
|
1847
|
+
},
|
|
1848
|
+
"default": "\"default\"",
|
|
1849
|
+
"description": "The style variant of the button.",
|
|
1850
|
+
"fieldName": "variant"
|
|
1827
1851
|
},
|
|
1828
1852
|
{
|
|
1829
|
-
"
|
|
1830
|
-
"
|
|
1831
|
-
|
|
1853
|
+
"name": "type",
|
|
1854
|
+
"type": {
|
|
1855
|
+
"text": "\"button\" | \"submit\" | \"reset\""
|
|
1856
|
+
},
|
|
1857
|
+
"default": "\"submit\"",
|
|
1858
|
+
"description": "The type of the button.",
|
|
1859
|
+
"fieldName": "type"
|
|
1832
1860
|
},
|
|
1833
1861
|
{
|
|
1834
|
-
"
|
|
1835
|
-
"
|
|
1836
|
-
|
|
1862
|
+
"name": "size",
|
|
1863
|
+
"type": {
|
|
1864
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
1865
|
+
},
|
|
1866
|
+
"default": "\"m\"",
|
|
1867
|
+
"description": "The size of the button.\nThis affects font-size and padding.",
|
|
1868
|
+
"fieldName": "size"
|
|
1837
1869
|
},
|
|
1838
1870
|
{
|
|
1839
|
-
"
|
|
1840
|
-
"
|
|
1841
|
-
|
|
1871
|
+
"name": "aria-expanded",
|
|
1872
|
+
"type": {
|
|
1873
|
+
"text": "\"true\" | \"false\" | undefined"
|
|
1874
|
+
},
|
|
1875
|
+
"fieldName": "accessibleExpanded"
|
|
1842
1876
|
},
|
|
1843
1877
|
{
|
|
1844
|
-
"
|
|
1845
|
-
"
|
|
1846
|
-
|
|
1878
|
+
"name": "aria-haspopup",
|
|
1879
|
+
"type": {
|
|
1880
|
+
"text": "| \"false\"\n | \"true\"\n | \"menu\"\n | \"listbox\"\n | \"tree\"\n | \"grid\"\n | \"dialog\" | undefined"
|
|
1881
|
+
},
|
|
1882
|
+
"fieldName": "accessibleHasPopup"
|
|
1847
1883
|
},
|
|
1848
1884
|
{
|
|
1849
|
-
"
|
|
1850
|
-
"
|
|
1851
|
-
|
|
1885
|
+
"name": "href",
|
|
1886
|
+
"type": {
|
|
1887
|
+
"text": "string | undefined"
|
|
1888
|
+
},
|
|
1889
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
1890
|
+
"fieldName": "href"
|
|
1852
1891
|
},
|
|
1853
1892
|
{
|
|
1854
|
-
"
|
|
1855
|
-
"
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1893
|
+
"name": "download",
|
|
1894
|
+
"type": {
|
|
1895
|
+
"text": "boolean"
|
|
1896
|
+
},
|
|
1897
|
+
"default": "false",
|
|
1898
|
+
"description": "When provided together with a href property, the button will\ntrigger a file download instead of a page visit.",
|
|
1899
|
+
"fieldName": "download"
|
|
1900
|
+
},
|
|
1860
1901
|
{
|
|
1861
|
-
"name": "
|
|
1902
|
+
"name": "target",
|
|
1862
1903
|
"type": {
|
|
1863
|
-
"text": "
|
|
1904
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
1864
1905
|
},
|
|
1865
|
-
"
|
|
1906
|
+
"default": "\"_self\"",
|
|
1907
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
1908
|
+
"fieldName": "target"
|
|
1866
1909
|
},
|
|
1867
1910
|
{
|
|
1911
|
+
"name": "expand",
|
|
1868
1912
|
"type": {
|
|
1869
|
-
"text": "
|
|
1913
|
+
"text": "boolean"
|
|
1870
1914
|
},
|
|
1871
|
-
"
|
|
1872
|
-
"
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
"attributes": [
|
|
1915
|
+
"default": "false",
|
|
1916
|
+
"description": "Controls whether the button expands to fill the width of its container.",
|
|
1917
|
+
"fieldName": "expand"
|
|
1918
|
+
},
|
|
1876
1919
|
{
|
|
1877
|
-
"name": "
|
|
1920
|
+
"name": "loading",
|
|
1878
1921
|
"type": {
|
|
1879
|
-
"text": "
|
|
1922
|
+
"text": "boolean"
|
|
1880
1923
|
},
|
|
1881
|
-
"default": "
|
|
1882
|
-
"description": "
|
|
1883
|
-
"fieldName": "
|
|
1924
|
+
"default": "false",
|
|
1925
|
+
"description": "Controls whether the button is in loading state. Please note that the spinner\nis hidden from assistive technologies, so you need to make sure to announce\nthe loading state to e.g. screen reader users. We also recommend disabling\nall user interactions on the button itself while in loading state.",
|
|
1926
|
+
"fieldName": "loading"
|
|
1884
1927
|
},
|
|
1885
1928
|
{
|
|
1886
|
-
"name": "
|
|
1929
|
+
"name": "disabled",
|
|
1887
1930
|
"type": {
|
|
1888
|
-
"text": "
|
|
1931
|
+
"text": "boolean"
|
|
1889
1932
|
},
|
|
1890
|
-
"
|
|
1891
|
-
"
|
|
1933
|
+
"default": "false",
|
|
1934
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1935
|
+
"fieldName": "disabled",
|
|
1936
|
+
"inheritedFrom": {
|
|
1937
|
+
"name": "InputMixin",
|
|
1938
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1939
|
+
}
|
|
1892
1940
|
},
|
|
1893
1941
|
{
|
|
1894
|
-
"name": "
|
|
1942
|
+
"name": "name",
|
|
1895
1943
|
"type": {
|
|
1896
|
-
"text": "string"
|
|
1944
|
+
"text": "string | undefined"
|
|
1897
1945
|
},
|
|
1898
|
-
"
|
|
1899
|
-
"
|
|
1900
|
-
"
|
|
1946
|
+
"description": "The name of the form component.",
|
|
1947
|
+
"fieldName": "name",
|
|
1948
|
+
"inheritedFrom": {
|
|
1949
|
+
"name": "InputMixin",
|
|
1950
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1951
|
+
}
|
|
1901
1952
|
},
|
|
1902
1953
|
{
|
|
1903
|
-
"name": "
|
|
1954
|
+
"name": "value",
|
|
1904
1955
|
"type": {
|
|
1905
1956
|
"text": "string"
|
|
1906
1957
|
},
|
|
1907
1958
|
"default": "\"\"",
|
|
1908
|
-
"description": "
|
|
1909
|
-
"fieldName": "
|
|
1959
|
+
"description": "The value of the form component.",
|
|
1960
|
+
"fieldName": "value",
|
|
1961
|
+
"inheritedFrom": {
|
|
1962
|
+
"name": "InputMixin",
|
|
1963
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1964
|
+
}
|
|
1910
1965
|
},
|
|
1911
1966
|
{
|
|
1912
|
-
"name": "
|
|
1967
|
+
"name": "form",
|
|
1913
1968
|
"type": {
|
|
1914
|
-
"text": "
|
|
1969
|
+
"text": "HTMLFormElement | null"
|
|
1915
1970
|
},
|
|
1916
|
-
"
|
|
1917
|
-
"
|
|
1918
|
-
"
|
|
1971
|
+
"description": "Gets the form, if any, associated with the form element.\nThe setter accepts a string, which is the id of the form.",
|
|
1972
|
+
"fieldName": "form",
|
|
1973
|
+
"inheritedFrom": {
|
|
1974
|
+
"name": "InputMixin",
|
|
1975
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
1976
|
+
}
|
|
1919
1977
|
}
|
|
1920
1978
|
],
|
|
1921
|
-
"
|
|
1922
|
-
"name": "LitElement",
|
|
1923
|
-
"package": "lit"
|
|
1924
|
-
},
|
|
1925
|
-
"localization": [
|
|
1926
|
-
{
|
|
1927
|
-
"name": "prevMonthLabel",
|
|
1928
|
-
"description": "Accessible label for the previous month button."
|
|
1929
|
-
},
|
|
1930
|
-
{
|
|
1931
|
-
"name": "nextMonthLabel",
|
|
1932
|
-
"description": "Accessible label for the next month button."
|
|
1933
|
-
},
|
|
1979
|
+
"mixins": [
|
|
1934
1980
|
{
|
|
1935
|
-
"name": "
|
|
1936
|
-
"
|
|
1981
|
+
"name": "InputMixin",
|
|
1982
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
1937
1983
|
},
|
|
1938
1984
|
{
|
|
1939
|
-
"name": "
|
|
1940
|
-
"
|
|
1941
|
-
}
|
|
1942
|
-
],
|
|
1943
|
-
"
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
"examples": [],
|
|
1947
|
-
"dependencies": [
|
|
1948
|
-
"button",
|
|
1949
|
-
"visually-hidden",
|
|
1950
|
-
"icon"
|
|
1951
|
-
],
|
|
1952
|
-
"tagName": "nord-calendar",
|
|
1953
|
-
"customElement": true
|
|
1954
|
-
}
|
|
1955
|
-
],
|
|
1956
|
-
"exports": [
|
|
1957
|
-
{
|
|
1958
|
-
"kind": "js",
|
|
1959
|
-
"name": "default",
|
|
1960
|
-
"declaration": {
|
|
1961
|
-
"name": "Calendar",
|
|
1962
|
-
"module": "src/calendar/Calendar.ts"
|
|
1963
|
-
}
|
|
1964
|
-
},
|
|
1965
|
-
{
|
|
1966
|
-
"kind": "custom-element-definition",
|
|
1967
|
-
"name": "nord-calendar",
|
|
1968
|
-
"declaration": {
|
|
1969
|
-
"name": "Calendar",
|
|
1970
|
-
"module": "src/calendar/Calendar.ts"
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
]
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
"kind": "javascript-module",
|
|
1977
|
-
"path": "src/calendar/DateSelectEvent.ts",
|
|
1978
|
-
"declarations": [
|
|
1979
|
-
{
|
|
1980
|
-
"kind": "class",
|
|
1981
|
-
"description": "",
|
|
1982
|
-
"name": "DateSelectEvent",
|
|
1983
|
-
"superclass": {
|
|
1984
|
-
"name": "NordEvent",
|
|
1985
|
-
"module": "/src/common/events.js"
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
1988
|
-
],
|
|
1989
|
-
"exports": [
|
|
1990
|
-
{
|
|
1991
|
-
"kind": "js",
|
|
1992
|
-
"name": "DateSelectEvent",
|
|
1993
|
-
"declaration": {
|
|
1994
|
-
"name": "DateSelectEvent",
|
|
1995
|
-
"module": "src/calendar/DateSelectEvent.ts"
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
]
|
|
1999
|
-
},
|
|
2000
|
-
{
|
|
2001
|
-
"kind": "javascript-module",
|
|
2002
|
-
"path": "src/calendar/localization.ts",
|
|
2003
|
-
"declarations": [
|
|
2004
|
-
{
|
|
2005
|
-
"kind": "variable",
|
|
2006
|
-
"name": "calendarLocalization",
|
|
2007
|
-
"type": {
|
|
2008
|
-
"text": "object"
|
|
1985
|
+
"name": "FocusableMixin",
|
|
1986
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
1987
|
+
}
|
|
1988
|
+
],
|
|
1989
|
+
"superclass": {
|
|
1990
|
+
"name": "LitElement",
|
|
1991
|
+
"package": "lit"
|
|
2009
1992
|
},
|
|
2010
|
-
"
|
|
1993
|
+
"localization": [],
|
|
1994
|
+
"status": "ready",
|
|
1995
|
+
"category": "action",
|
|
1996
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Icon usage in button\n\nIllustrative icons should be always positioned in the `start` slot:\n\n<img src=\"/img/components/button/start-slot.png\" class=\"n-border n-border-radius\" style=\"max-width:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button with icon in start slot\" />\n\nWhen a button is used as a dropdown toggle, the `interface-dropdown-small` icon from [Nordicons](/nordicons/) is automatically placed in the `end` slot:\n\n<img src=\"/img/components/button/dropdown.png\" class=\"n-border n-border-radius\" style=\"max-width:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Dropdown button\" />\n\nEach button size has a recommended icon size. The medium button uses the `s` icon size, the [small button](/components/button/?example=small+buttons) uses the `xs` icon size, and the [large button](/components/button/?example=large+buttons) uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n\n<img src=\"/img/components/button/icon-sizes.png\" class=\"n-border n-border-radius\" style=\"max-width:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Button icon sizes\" />\n\nUse `interface-add-small` icon in the `start` slot for create/add type primary actions in the [header](/components/header/):\n\n<img src=\"/img/components/button/create.png\" class=\"n-border n-border-radius\" style=\"max-width:700px;\" loading=\"lazy\" height=\"475\" width=\"800\" alt=\"Create/add type primary action with icon\" />\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n",
|
|
1997
|
+
"examples": [],
|
|
1998
|
+
"dependencies": [
|
|
1999
|
+
"spinner"
|
|
2000
|
+
],
|
|
2001
|
+
"tagName": "nord-button",
|
|
2002
|
+
"customElement": true
|
|
2011
2003
|
}
|
|
2012
2004
|
],
|
|
2013
2005
|
"exports": [
|
|
@@ -2015,8 +2007,16 @@
|
|
|
2015
2007
|
"kind": "js",
|
|
2016
2008
|
"name": "default",
|
|
2017
2009
|
"declaration": {
|
|
2018
|
-
"name": "
|
|
2019
|
-
"module": "src/
|
|
2010
|
+
"name": "Button",
|
|
2011
|
+
"module": "src/button/Button.ts"
|
|
2012
|
+
}
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
"kind": "custom-element-definition",
|
|
2016
|
+
"name": "nord-button",
|
|
2017
|
+
"declaration": {
|
|
2018
|
+
"name": "Button",
|
|
2019
|
+
"module": "src/button/Button.ts"
|
|
2020
2020
|
}
|
|
2021
2021
|
}
|
|
2022
2022
|
]
|
|
@@ -6427,90 +6427,331 @@
|
|
|
6427
6427
|
"type": {
|
|
6428
6428
|
"text": "string | undefined"
|
|
6429
6429
|
},
|
|
6430
|
-
"description": "The url the dropdown item should link to.",
|
|
6431
|
-
"attribute": "href",
|
|
6432
|
-
"reflects": true
|
|
6430
|
+
"description": "The url the dropdown item should link to.",
|
|
6431
|
+
"attribute": "href",
|
|
6432
|
+
"reflects": true
|
|
6433
|
+
},
|
|
6434
|
+
{
|
|
6435
|
+
"kind": "field",
|
|
6436
|
+
"name": "target",
|
|
6437
|
+
"type": {
|
|
6438
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
6439
|
+
},
|
|
6440
|
+
"default": "\"_self\"",
|
|
6441
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
6442
|
+
"attribute": "target"
|
|
6443
|
+
},
|
|
6444
|
+
{
|
|
6445
|
+
"kind": "field",
|
|
6446
|
+
"name": "focusableRef",
|
|
6447
|
+
"privacy": "protected",
|
|
6448
|
+
"inheritedFrom": {
|
|
6449
|
+
"name": "FocusableMixin",
|
|
6450
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6451
|
+
}
|
|
6452
|
+
},
|
|
6453
|
+
{
|
|
6454
|
+
"kind": "method",
|
|
6455
|
+
"name": "focus",
|
|
6456
|
+
"parameters": [
|
|
6457
|
+
{
|
|
6458
|
+
"name": "options",
|
|
6459
|
+
"optional": true,
|
|
6460
|
+
"type": {
|
|
6461
|
+
"text": "FocusOptions"
|
|
6462
|
+
},
|
|
6463
|
+
"description": "An object which controls aspects of the focusing process."
|
|
6464
|
+
}
|
|
6465
|
+
],
|
|
6466
|
+
"description": "Programmatically move focus to the component.",
|
|
6467
|
+
"inheritedFrom": {
|
|
6468
|
+
"name": "FocusableMixin",
|
|
6469
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6470
|
+
}
|
|
6471
|
+
},
|
|
6472
|
+
{
|
|
6473
|
+
"kind": "method",
|
|
6474
|
+
"name": "blur",
|
|
6475
|
+
"description": "Programmatically remove focus from the component.",
|
|
6476
|
+
"inheritedFrom": {
|
|
6477
|
+
"name": "FocusableMixin",
|
|
6478
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6479
|
+
}
|
|
6480
|
+
},
|
|
6481
|
+
{
|
|
6482
|
+
"kind": "method",
|
|
6483
|
+
"name": "click",
|
|
6484
|
+
"description": "Programmatically simulates a click on the component.",
|
|
6485
|
+
"inheritedFrom": {
|
|
6486
|
+
"name": "FocusableMixin",
|
|
6487
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6488
|
+
}
|
|
6489
|
+
}
|
|
6490
|
+
],
|
|
6491
|
+
"attributes": [
|
|
6492
|
+
{
|
|
6493
|
+
"name": "href",
|
|
6494
|
+
"type": {
|
|
6495
|
+
"text": "string | undefined"
|
|
6496
|
+
},
|
|
6497
|
+
"description": "The url the dropdown item should link to.",
|
|
6498
|
+
"fieldName": "href"
|
|
6499
|
+
},
|
|
6500
|
+
{
|
|
6501
|
+
"name": "target",
|
|
6502
|
+
"type": {
|
|
6503
|
+
"text": "\"_self\" | \"_blank\" | \"_parent\" | \"_top\""
|
|
6504
|
+
},
|
|
6505
|
+
"default": "\"_self\"",
|
|
6506
|
+
"description": "When provided together with a href property, determines where\nto open the linked URL. The keywords have special meanings for\nwhere to load the URL: “_self” means the current browsing context,\n“_blank” usually a new tab but users can configure browsers this to\nopen a new window instead, “_parent” means the parent browsing\ncontext of the current one, but if no parent exists, behaves as\n_self, and finally “top” means the topmost browsing context.",
|
|
6507
|
+
"fieldName": "target"
|
|
6508
|
+
}
|
|
6509
|
+
],
|
|
6510
|
+
"mixins": [
|
|
6511
|
+
{
|
|
6512
|
+
"name": "FocusableMixin",
|
|
6513
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
6514
|
+
}
|
|
6515
|
+
],
|
|
6516
|
+
"superclass": {
|
|
6517
|
+
"name": "LitElement",
|
|
6518
|
+
"package": "lit"
|
|
6519
|
+
},
|
|
6520
|
+
"localization": [],
|
|
6521
|
+
"status": "ready",
|
|
6522
|
+
"category": "action",
|
|
6523
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Group dropdown items into dropdown groups based on related categories.\n- Use group headings to clarify the category of a section.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use dropdown item outside of dropdown group and dropdown components.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending dropdown items in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nAvoid all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n",
|
|
6524
|
+
"examples": [],
|
|
6525
|
+
"dependencies": [],
|
|
6526
|
+
"tagName": "nord-dropdown-item",
|
|
6527
|
+
"customElement": true
|
|
6528
|
+
}
|
|
6529
|
+
],
|
|
6530
|
+
"exports": [
|
|
6531
|
+
{
|
|
6532
|
+
"kind": "js",
|
|
6533
|
+
"name": "default",
|
|
6534
|
+
"declaration": {
|
|
6535
|
+
"name": "DropdownItem",
|
|
6536
|
+
"module": "src/dropdown-item/DropdownItem.ts"
|
|
6537
|
+
}
|
|
6538
|
+
},
|
|
6539
|
+
{
|
|
6540
|
+
"kind": "custom-element-definition",
|
|
6541
|
+
"name": "nord-dropdown-item",
|
|
6542
|
+
"declaration": {
|
|
6543
|
+
"name": "DropdownItem",
|
|
6544
|
+
"module": "src/dropdown-item/DropdownItem.ts"
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
]
|
|
6548
|
+
},
|
|
6549
|
+
{
|
|
6550
|
+
"kind": "javascript-module",
|
|
6551
|
+
"path": "src/empty-state/EmptyState.ts",
|
|
6552
|
+
"declarations": [
|
|
6553
|
+
{
|
|
6554
|
+
"kind": "class",
|
|
6555
|
+
"description": "Empty state can be used when there is no data to display to\ndescribe what the user can do next. Empty state provides\nexplanation and guidance to help user progress.",
|
|
6556
|
+
"name": "EmptyState",
|
|
6557
|
+
"slots": [
|
|
6558
|
+
{
|
|
6559
|
+
"description": "default slot",
|
|
6560
|
+
"name": ""
|
|
6561
|
+
}
|
|
6562
|
+
],
|
|
6563
|
+
"members": [],
|
|
6564
|
+
"superclass": {
|
|
6565
|
+
"name": "LitElement",
|
|
6566
|
+
"package": "lit"
|
|
6567
|
+
},
|
|
6568
|
+
"localization": [],
|
|
6569
|
+
"status": "ready",
|
|
6570
|
+
"category": "feedback",
|
|
6571
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when another component or part of UI has no items or data to show.\n- Help users by clearly explaining the benefit and utility of a product or feature.\n- Be encouraging and never make users feel unsuccessful or guilty.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use as a generic banner to highlight specific content.\n\n</div>\n\n---\n\n## Content guidelines\n\nEmpty state headings should state to the user what’s wrong or why there’s no content:\n\n<div class=\"n-usage n-usage-do\">No results found</div>\n<div class=\"n-usage n-usage-dont\">Error</div>\n\nWhen writing empty state headings, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">You don’t have access to this content</div>\n<div class=\"n-usage n-usage-dont\">You Don’t Have Access To This Content</div>\n\nDescriptions in empty states should add useful and relevant additional information:\n\n<div class=\"n-usage n-usage-do\">We were unable to connect to the service. Click Retry to try again or View log to learn what happened.</div>\n<div class=\"n-usage n-usage-dont\">No connection.</div>\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">Clear filters</div>\n<div class=\"n-usage n-usage-dont\">Clear</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">View log</div>\n<div class=\"n-usage n-usage-dont\">View Log</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Request access</div>\n<div class=\"n-usage n-usage-dont\">Request an access</div>\n",
|
|
6572
|
+
"examples": [],
|
|
6573
|
+
"dependencies": [],
|
|
6574
|
+
"tagName": "nord-empty-state",
|
|
6575
|
+
"customElement": true
|
|
6576
|
+
}
|
|
6577
|
+
],
|
|
6578
|
+
"exports": [
|
|
6579
|
+
{
|
|
6580
|
+
"kind": "js",
|
|
6581
|
+
"name": "default",
|
|
6582
|
+
"declaration": {
|
|
6583
|
+
"name": "EmptyState",
|
|
6584
|
+
"module": "src/empty-state/EmptyState.ts"
|
|
6585
|
+
}
|
|
6586
|
+
},
|
|
6587
|
+
{
|
|
6588
|
+
"kind": "custom-element-definition",
|
|
6589
|
+
"name": "nord-empty-state",
|
|
6590
|
+
"declaration": {
|
|
6591
|
+
"name": "EmptyState",
|
|
6592
|
+
"module": "src/empty-state/EmptyState.ts"
|
|
6593
|
+
}
|
|
6594
|
+
}
|
|
6595
|
+
]
|
|
6596
|
+
},
|
|
6597
|
+
{
|
|
6598
|
+
"kind": "javascript-module",
|
|
6599
|
+
"path": "src/fieldset/Fieldset.ts",
|
|
6600
|
+
"declarations": [
|
|
6601
|
+
{
|
|
6602
|
+
"kind": "class",
|
|
6603
|
+
"description": "Fieldset is used for grouping sets of input components.\nIt is necessary to use a fieldset with radio and checkbox components.\nIt can also be useful for logically grouping other types of inputs.",
|
|
6604
|
+
"name": "Fieldset",
|
|
6605
|
+
"slots": [
|
|
6606
|
+
{
|
|
6607
|
+
"description": "Use when a label requires more than plain text.",
|
|
6608
|
+
"name": "label"
|
|
6609
|
+
},
|
|
6610
|
+
{
|
|
6611
|
+
"description": "Optional slot that holds hint text for the fieldset.",
|
|
6612
|
+
"name": "hint"
|
|
6613
|
+
},
|
|
6614
|
+
{
|
|
6615
|
+
"description": "Optional slot that holds error text for the fieldset.",
|
|
6616
|
+
"name": "error"
|
|
6617
|
+
}
|
|
6618
|
+
],
|
|
6619
|
+
"members": [
|
|
6620
|
+
{
|
|
6621
|
+
"kind": "field",
|
|
6622
|
+
"name": "errorSlot",
|
|
6623
|
+
"privacy": "private",
|
|
6624
|
+
"default": "new SlotController(this, \"error\")"
|
|
6625
|
+
},
|
|
6626
|
+
{
|
|
6627
|
+
"kind": "field",
|
|
6628
|
+
"name": "hintSlot",
|
|
6629
|
+
"privacy": "private",
|
|
6630
|
+
"default": "new SlotController(this, \"hint\")"
|
|
6631
|
+
},
|
|
6632
|
+
{
|
|
6633
|
+
"kind": "field",
|
|
6634
|
+
"name": "label",
|
|
6635
|
+
"type": {
|
|
6636
|
+
"text": "string"
|
|
6637
|
+
},
|
|
6638
|
+
"default": "\"\"",
|
|
6639
|
+
"description": "Label for the fieldset. Rendered as a `<legend>` element.",
|
|
6640
|
+
"attribute": "label"
|
|
6641
|
+
},
|
|
6642
|
+
{
|
|
6643
|
+
"kind": "field",
|
|
6644
|
+
"name": "hint",
|
|
6645
|
+
"type": {
|
|
6646
|
+
"text": "string | undefined"
|
|
6647
|
+
},
|
|
6648
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
6649
|
+
"attribute": "hint"
|
|
6650
|
+
},
|
|
6651
|
+
{
|
|
6652
|
+
"kind": "field",
|
|
6653
|
+
"name": "error",
|
|
6654
|
+
"type": {
|
|
6655
|
+
"text": "string | undefined"
|
|
6656
|
+
},
|
|
6657
|
+
"description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
|
|
6658
|
+
"attribute": "error"
|
|
6433
6659
|
},
|
|
6434
6660
|
{
|
|
6435
6661
|
"kind": "field",
|
|
6436
|
-
"name": "
|
|
6662
|
+
"name": "required",
|
|
6437
6663
|
"type": {
|
|
6438
|
-
"text": "
|
|
6664
|
+
"text": "boolean"
|
|
6439
6665
|
},
|
|
6440
|
-
"default": "
|
|
6441
|
-
"description": "
|
|
6442
|
-
"attribute": "
|
|
6666
|
+
"default": "false",
|
|
6667
|
+
"description": "Determines whether the fieldset is required or not.\nA fieldset marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
6668
|
+
"attribute": "required"
|
|
6443
6669
|
},
|
|
6444
6670
|
{
|
|
6445
6671
|
"kind": "field",
|
|
6446
|
-
"name": "
|
|
6447
|
-
"
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6672
|
+
"name": "hideRequired",
|
|
6673
|
+
"type": {
|
|
6674
|
+
"text": "boolean"
|
|
6675
|
+
},
|
|
6676
|
+
"default": "false",
|
|
6677
|
+
"description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
|
|
6678
|
+
"attribute": "hide-required"
|
|
6452
6679
|
},
|
|
6453
6680
|
{
|
|
6454
|
-
"kind": "
|
|
6455
|
-
"name": "
|
|
6456
|
-
"
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
},
|
|
6463
|
-
"description": "An object which controls aspects of the focusing process."
|
|
6464
|
-
}
|
|
6465
|
-
],
|
|
6466
|
-
"description": "Programmatically move focus to the component.",
|
|
6467
|
-
"inheritedFrom": {
|
|
6468
|
-
"name": "FocusableMixin",
|
|
6469
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6470
|
-
}
|
|
6681
|
+
"kind": "field",
|
|
6682
|
+
"name": "hideLabel",
|
|
6683
|
+
"type": {
|
|
6684
|
+
"text": "boolean"
|
|
6685
|
+
},
|
|
6686
|
+
"default": "false",
|
|
6687
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
6688
|
+
"attribute": "hide-label"
|
|
6471
6689
|
},
|
|
6472
6690
|
{
|
|
6473
|
-
"kind": "
|
|
6474
|
-
"name": "
|
|
6475
|
-
"
|
|
6476
|
-
"
|
|
6477
|
-
"name": "FocusableMixin",
|
|
6478
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6479
|
-
}
|
|
6691
|
+
"kind": "field",
|
|
6692
|
+
"name": "hasHint",
|
|
6693
|
+
"privacy": "protected",
|
|
6694
|
+
"readonly": true
|
|
6480
6695
|
},
|
|
6481
6696
|
{
|
|
6482
|
-
"kind": "
|
|
6483
|
-
"name": "
|
|
6484
|
-
"
|
|
6485
|
-
"
|
|
6486
|
-
"name": "FocusableMixin",
|
|
6487
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
6488
|
-
}
|
|
6697
|
+
"kind": "field",
|
|
6698
|
+
"name": "hasError",
|
|
6699
|
+
"privacy": "protected",
|
|
6700
|
+
"readonly": true
|
|
6489
6701
|
}
|
|
6490
6702
|
],
|
|
6491
6703
|
"attributes": [
|
|
6492
6704
|
{
|
|
6493
|
-
"name": "
|
|
6705
|
+
"name": "label",
|
|
6706
|
+
"type": {
|
|
6707
|
+
"text": "string"
|
|
6708
|
+
},
|
|
6709
|
+
"default": "\"\"",
|
|
6710
|
+
"description": "Label for the fieldset. Rendered as a `<legend>` element.",
|
|
6711
|
+
"fieldName": "label"
|
|
6712
|
+
},
|
|
6713
|
+
{
|
|
6714
|
+
"name": "hint",
|
|
6494
6715
|
"type": {
|
|
6495
6716
|
"text": "string | undefined"
|
|
6496
6717
|
},
|
|
6497
|
-
"description": "
|
|
6498
|
-
"fieldName": "
|
|
6718
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
6719
|
+
"fieldName": "hint"
|
|
6499
6720
|
},
|
|
6500
6721
|
{
|
|
6501
|
-
"name": "
|
|
6722
|
+
"name": "error",
|
|
6502
6723
|
"type": {
|
|
6503
|
-
"text": "
|
|
6724
|
+
"text": "string | undefined"
|
|
6504
6725
|
},
|
|
6505
|
-
"
|
|
6506
|
-
"
|
|
6507
|
-
|
|
6508
|
-
}
|
|
6509
|
-
],
|
|
6510
|
-
"mixins": [
|
|
6726
|
+
"description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
|
|
6727
|
+
"fieldName": "error"
|
|
6728
|
+
},
|
|
6511
6729
|
{
|
|
6512
|
-
"name": "
|
|
6513
|
-
"
|
|
6730
|
+
"name": "required",
|
|
6731
|
+
"type": {
|
|
6732
|
+
"text": "boolean"
|
|
6733
|
+
},
|
|
6734
|
+
"default": "false",
|
|
6735
|
+
"description": "Determines whether the fieldset is required or not.\nA fieldset marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
6736
|
+
"fieldName": "required"
|
|
6737
|
+
},
|
|
6738
|
+
{
|
|
6739
|
+
"name": "hide-required",
|
|
6740
|
+
"type": {
|
|
6741
|
+
"text": "boolean"
|
|
6742
|
+
},
|
|
6743
|
+
"default": "false",
|
|
6744
|
+
"description": "Visually hide the required indicator, but still show\nrequired attribute to assistive technologies like screen readers.",
|
|
6745
|
+
"fieldName": "hideRequired"
|
|
6746
|
+
},
|
|
6747
|
+
{
|
|
6748
|
+
"name": "hide-label",
|
|
6749
|
+
"type": {
|
|
6750
|
+
"text": "boolean"
|
|
6751
|
+
},
|
|
6752
|
+
"default": "false",
|
|
6753
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
6754
|
+
"fieldName": "hideLabel"
|
|
6514
6755
|
}
|
|
6515
6756
|
],
|
|
6516
6757
|
"superclass": {
|
|
@@ -6519,11 +6760,11 @@
|
|
|
6519
6760
|
},
|
|
6520
6761
|
"localization": [],
|
|
6521
6762
|
"status": "ready",
|
|
6522
|
-
"category": "
|
|
6523
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n-
|
|
6763
|
+
"category": "form",
|
|
6764
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n",
|
|
6524
6765
|
"examples": [],
|
|
6525
6766
|
"dependencies": [],
|
|
6526
|
-
"tagName": "nord-
|
|
6767
|
+
"tagName": "nord-fieldset",
|
|
6527
6768
|
"customElement": true
|
|
6528
6769
|
}
|
|
6529
6770
|
],
|
|
@@ -6532,46 +6773,79 @@
|
|
|
6532
6773
|
"kind": "js",
|
|
6533
6774
|
"name": "default",
|
|
6534
6775
|
"declaration": {
|
|
6535
|
-
"name": "
|
|
6536
|
-
"module": "src/
|
|
6776
|
+
"name": "Fieldset",
|
|
6777
|
+
"module": "src/fieldset/Fieldset.ts"
|
|
6537
6778
|
}
|
|
6538
6779
|
},
|
|
6539
6780
|
{
|
|
6540
6781
|
"kind": "custom-element-definition",
|
|
6541
|
-
"name": "nord-
|
|
6782
|
+
"name": "nord-fieldset",
|
|
6542
6783
|
"declaration": {
|
|
6543
|
-
"name": "
|
|
6544
|
-
"module": "src/
|
|
6784
|
+
"name": "Fieldset",
|
|
6785
|
+
"module": "src/fieldset/Fieldset.ts"
|
|
6545
6786
|
}
|
|
6546
6787
|
}
|
|
6547
6788
|
]
|
|
6548
6789
|
},
|
|
6549
6790
|
{
|
|
6550
6791
|
"kind": "javascript-module",
|
|
6551
|
-
"path": "src/
|
|
6792
|
+
"path": "src/header/Header.ts",
|
|
6552
6793
|
"declarations": [
|
|
6553
6794
|
{
|
|
6554
6795
|
"kind": "class",
|
|
6555
|
-
"description": "
|
|
6556
|
-
"name": "
|
|
6796
|
+
"description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
|
|
6797
|
+
"name": "Header",
|
|
6557
6798
|
"slots": [
|
|
6558
6799
|
{
|
|
6559
|
-
"description": "
|
|
6800
|
+
"description": "The header content.",
|
|
6560
6801
|
"name": ""
|
|
6802
|
+
},
|
|
6803
|
+
{
|
|
6804
|
+
"description": "Optional slot for buttons, toggles, etc.",
|
|
6805
|
+
"name": "end"
|
|
6806
|
+
}
|
|
6807
|
+
],
|
|
6808
|
+
"members": [
|
|
6809
|
+
{
|
|
6810
|
+
"kind": "field",
|
|
6811
|
+
"name": "endSlot",
|
|
6812
|
+
"privacy": "private",
|
|
6813
|
+
"default": "new SlotController(this, \"end\")"
|
|
6814
|
+
},
|
|
6815
|
+
{
|
|
6816
|
+
"kind": "field",
|
|
6817
|
+
"name": "size",
|
|
6818
|
+
"type": {
|
|
6819
|
+
"text": "\"m\" | \"s\""
|
|
6820
|
+
},
|
|
6821
|
+
"default": "\"m\"",
|
|
6822
|
+
"description": "Controls the size of the header component.",
|
|
6823
|
+
"attribute": "size",
|
|
6824
|
+
"reflects": true
|
|
6825
|
+
}
|
|
6826
|
+
],
|
|
6827
|
+
"attributes": [
|
|
6828
|
+
{
|
|
6829
|
+
"name": "size",
|
|
6830
|
+
"type": {
|
|
6831
|
+
"text": "\"m\" | \"s\""
|
|
6832
|
+
},
|
|
6833
|
+
"default": "\"m\"",
|
|
6834
|
+
"description": "Controls the size of the header component.",
|
|
6835
|
+
"fieldName": "size"
|
|
6561
6836
|
}
|
|
6562
6837
|
],
|
|
6563
|
-
"members": [],
|
|
6564
6838
|
"superclass": {
|
|
6565
6839
|
"name": "LitElement",
|
|
6566
6840
|
"package": "lit"
|
|
6567
6841
|
},
|
|
6568
6842
|
"localization": [],
|
|
6569
6843
|
"status": "ready",
|
|
6570
|
-
"category": "
|
|
6571
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use
|
|
6844
|
+
"category": "structure",
|
|
6845
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n- Utilise the [`n-truncate`](/css/#miscellaneous-utilities) CSS helper to prevent long headings from wrapping.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n- Don’t add large amounts of content or long headings. Aim for headings that are short and concise.\n\n</div>\n\n---\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n",
|
|
6572
6846
|
"examples": [],
|
|
6573
6847
|
"dependencies": [],
|
|
6574
|
-
"tagName": "nord-
|
|
6848
|
+
"tagName": "nord-header",
|
|
6575
6849
|
"customElement": true
|
|
6576
6850
|
}
|
|
6577
6851
|
],
|
|
@@ -6580,159 +6854,216 @@
|
|
|
6580
6854
|
"kind": "js",
|
|
6581
6855
|
"name": "default",
|
|
6582
6856
|
"declaration": {
|
|
6583
|
-
"name": "
|
|
6584
|
-
"module": "src/
|
|
6857
|
+
"name": "Header",
|
|
6858
|
+
"module": "src/header/Header.ts"
|
|
6585
6859
|
}
|
|
6586
6860
|
},
|
|
6587
6861
|
{
|
|
6588
6862
|
"kind": "custom-element-definition",
|
|
6589
|
-
"name": "nord-
|
|
6863
|
+
"name": "nord-header",
|
|
6590
6864
|
"declaration": {
|
|
6591
|
-
"name": "
|
|
6592
|
-
"module": "src/
|
|
6865
|
+
"name": "Header",
|
|
6866
|
+
"module": "src/header/Header.ts"
|
|
6593
6867
|
}
|
|
6594
6868
|
}
|
|
6595
6869
|
]
|
|
6596
6870
|
},
|
|
6597
6871
|
{
|
|
6598
6872
|
"kind": "javascript-module",
|
|
6599
|
-
"path": "src/
|
|
6873
|
+
"path": "src/icon/Icon.ts",
|
|
6600
6874
|
"declarations": [
|
|
6601
6875
|
{
|
|
6602
6876
|
"kind": "class",
|
|
6603
|
-
"description": "
|
|
6604
|
-
"name": "
|
|
6877
|
+
"description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
|
|
6878
|
+
"name": "Icon",
|
|
6605
6879
|
"slots": [
|
|
6606
6880
|
{
|
|
6607
|
-
"description": "
|
|
6608
|
-
"name": "
|
|
6881
|
+
"description": "The default slot used for placing a custom SVG icon.",
|
|
6882
|
+
"name": ""
|
|
6883
|
+
}
|
|
6884
|
+
],
|
|
6885
|
+
"members": [
|
|
6886
|
+
{
|
|
6887
|
+
"kind": "field",
|
|
6888
|
+
"name": "manager",
|
|
6889
|
+
"privacy": "private",
|
|
6890
|
+
"static": true,
|
|
6891
|
+
"default": "new IconManager()"
|
|
6609
6892
|
},
|
|
6610
6893
|
{
|
|
6611
|
-
"
|
|
6612
|
-
"name": "
|
|
6894
|
+
"kind": "method",
|
|
6895
|
+
"name": "registerResolver",
|
|
6896
|
+
"static": true,
|
|
6897
|
+
"parameters": [
|
|
6898
|
+
{
|
|
6899
|
+
"name": "resolver",
|
|
6900
|
+
"type": {
|
|
6901
|
+
"text": "IconResolver"
|
|
6902
|
+
},
|
|
6903
|
+
"description": "The resolver function to register."
|
|
6904
|
+
}
|
|
6905
|
+
],
|
|
6906
|
+
"description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
|
|
6907
|
+
},
|
|
6908
|
+
{
|
|
6909
|
+
"kind": "method",
|
|
6910
|
+
"name": "registerIcon",
|
|
6911
|
+
"static": true,
|
|
6912
|
+
"return": {
|
|
6913
|
+
"type": {
|
|
6914
|
+
"text": "void"
|
|
6915
|
+
}
|
|
6916
|
+
},
|
|
6917
|
+
"parameters": [
|
|
6918
|
+
{
|
|
6919
|
+
"name": "icon",
|
|
6920
|
+
"type": {
|
|
6921
|
+
"text": "{ title: string; default: string }"
|
|
6922
|
+
},
|
|
6923
|
+
"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."
|
|
6924
|
+
}
|
|
6925
|
+
],
|
|
6926
|
+
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
6613
6927
|
},
|
|
6614
6928
|
{
|
|
6615
|
-
"
|
|
6616
|
-
"name": "
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
"
|
|
6624
|
-
|
|
6929
|
+
"kind": "method",
|
|
6930
|
+
"name": "registerIcon",
|
|
6931
|
+
"static": true,
|
|
6932
|
+
"return": {
|
|
6933
|
+
"type": {
|
|
6934
|
+
"text": "void"
|
|
6935
|
+
}
|
|
6936
|
+
},
|
|
6937
|
+
"parameters": [
|
|
6938
|
+
{
|
|
6939
|
+
"name": "name",
|
|
6940
|
+
"type": {
|
|
6941
|
+
"text": "string"
|
|
6942
|
+
},
|
|
6943
|
+
"description": "The name of the icon to be registered."
|
|
6944
|
+
},
|
|
6945
|
+
{
|
|
6946
|
+
"name": "icon",
|
|
6947
|
+
"type": {
|
|
6948
|
+
"text": "string"
|
|
6949
|
+
},
|
|
6950
|
+
"description": "The SVG string for the icon."
|
|
6951
|
+
}
|
|
6952
|
+
],
|
|
6953
|
+
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
6625
6954
|
},
|
|
6626
6955
|
{
|
|
6627
|
-
"kind": "
|
|
6628
|
-
"name": "
|
|
6629
|
-
"
|
|
6630
|
-
"
|
|
6956
|
+
"kind": "method",
|
|
6957
|
+
"name": "registerIcon",
|
|
6958
|
+
"static": true,
|
|
6959
|
+
"parameters": [
|
|
6960
|
+
{
|
|
6961
|
+
"name": "iconOrName",
|
|
6962
|
+
"type": {
|
|
6963
|
+
"text": "string | { title: string; default: string }"
|
|
6964
|
+
},
|
|
6965
|
+
"description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
|
|
6966
|
+
},
|
|
6967
|
+
{
|
|
6968
|
+
"name": "icon",
|
|
6969
|
+
"optional": true,
|
|
6970
|
+
"type": {
|
|
6971
|
+
"text": "string"
|
|
6972
|
+
},
|
|
6973
|
+
"description": "The SVG string for the icon."
|
|
6974
|
+
}
|
|
6975
|
+
],
|
|
6976
|
+
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
6631
6977
|
},
|
|
6632
6978
|
{
|
|
6633
6979
|
"kind": "field",
|
|
6634
|
-
"name": "
|
|
6980
|
+
"name": "name",
|
|
6635
6981
|
"type": {
|
|
6636
6982
|
"text": "string"
|
|
6637
6983
|
},
|
|
6638
6984
|
"default": "\"\"",
|
|
6639
|
-
"description": "
|
|
6640
|
-
"attribute": "
|
|
6985
|
+
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
6986
|
+
"attribute": "name",
|
|
6987
|
+
"reflects": true
|
|
6641
6988
|
},
|
|
6642
6989
|
{
|
|
6643
6990
|
"kind": "field",
|
|
6644
|
-
"name": "
|
|
6991
|
+
"name": "size",
|
|
6645
6992
|
"type": {
|
|
6646
|
-
"text": "
|
|
6993
|
+
"text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
|
|
6647
6994
|
},
|
|
6648
|
-
"description": "
|
|
6649
|
-
"attribute": "
|
|
6995
|
+
"description": "The size of the icon.",
|
|
6996
|
+
"attribute": "size",
|
|
6997
|
+
"reflects": true
|
|
6650
6998
|
},
|
|
6651
6999
|
{
|
|
6652
7000
|
"kind": "field",
|
|
6653
|
-
"name": "
|
|
7001
|
+
"name": "color",
|
|
6654
7002
|
"type": {
|
|
6655
7003
|
"text": "string | undefined"
|
|
6656
7004
|
},
|
|
6657
|
-
"description": "
|
|
6658
|
-
"attribute": "
|
|
7005
|
+
"description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
|
|
7006
|
+
"attribute": "color",
|
|
7007
|
+
"reflects": true
|
|
6659
7008
|
},
|
|
6660
7009
|
{
|
|
6661
7010
|
"kind": "field",
|
|
6662
|
-
"name": "
|
|
7011
|
+
"name": "label",
|
|
6663
7012
|
"type": {
|
|
6664
|
-
"text": "
|
|
7013
|
+
"text": "string | undefined"
|
|
6665
7014
|
},
|
|
6666
|
-
"
|
|
6667
|
-
"
|
|
6668
|
-
"
|
|
7015
|
+
"description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
|
|
7016
|
+
"attribute": "label",
|
|
7017
|
+
"reflects": true
|
|
6669
7018
|
},
|
|
6670
7019
|
{
|
|
6671
7020
|
"kind": "field",
|
|
6672
|
-
"name": "
|
|
7021
|
+
"name": "svg",
|
|
6673
7022
|
"type": {
|
|
6674
|
-
"text": "
|
|
7023
|
+
"text": "string"
|
|
6675
7024
|
},
|
|
6676
|
-
"
|
|
6677
|
-
"
|
|
6678
|
-
"attribute": "hide-required"
|
|
6679
|
-
},
|
|
6680
|
-
{
|
|
6681
|
-
"kind": "field",
|
|
6682
|
-
"name": "hasHint",
|
|
6683
|
-
"privacy": "protected",
|
|
6684
|
-
"readonly": true
|
|
7025
|
+
"privacy": "private",
|
|
7026
|
+
"default": "\"\""
|
|
6685
7027
|
},
|
|
6686
7028
|
{
|
|
6687
|
-
"kind": "
|
|
6688
|
-
"name": "
|
|
6689
|
-
"privacy": "protected"
|
|
6690
|
-
"readonly": true
|
|
7029
|
+
"kind": "method",
|
|
7030
|
+
"name": "handleNameChange",
|
|
7031
|
+
"privacy": "protected"
|
|
6691
7032
|
}
|
|
6692
7033
|
],
|
|
6693
7034
|
"attributes": [
|
|
6694
7035
|
{
|
|
6695
|
-
"name": "
|
|
7036
|
+
"name": "name",
|
|
6696
7037
|
"type": {
|
|
6697
7038
|
"text": "string"
|
|
6698
7039
|
},
|
|
6699
7040
|
"default": "\"\"",
|
|
6700
|
-
"description": "
|
|
6701
|
-
"fieldName": "
|
|
7041
|
+
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
7042
|
+
"fieldName": "name"
|
|
6702
7043
|
},
|
|
6703
7044
|
{
|
|
6704
|
-
"name": "
|
|
7045
|
+
"name": "size",
|
|
6705
7046
|
"type": {
|
|
6706
|
-
"text": "
|
|
7047
|
+
"text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
|
|
6707
7048
|
},
|
|
6708
|
-
"description": "
|
|
6709
|
-
"fieldName": "
|
|
7049
|
+
"description": "The size of the icon.",
|
|
7050
|
+
"fieldName": "size"
|
|
6710
7051
|
},
|
|
6711
7052
|
{
|
|
6712
|
-
"name": "
|
|
7053
|
+
"name": "color",
|
|
6713
7054
|
"type": {
|
|
6714
7055
|
"text": "string | undefined"
|
|
6715
7056
|
},
|
|
6716
|
-
"description": "
|
|
6717
|
-
"fieldName": "
|
|
6718
|
-
},
|
|
6719
|
-
{
|
|
6720
|
-
"name": "required",
|
|
6721
|
-
"type": {
|
|
6722
|
-
"text": "boolean"
|
|
6723
|
-
},
|
|
6724
|
-
"default": "false",
|
|
6725
|
-
"description": "Determines whether the fieldset is required or not.\nA fieldset marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
6726
|
-
"fieldName": "required"
|
|
7057
|
+
"description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
|
|
7058
|
+
"fieldName": "color"
|
|
6727
7059
|
},
|
|
6728
7060
|
{
|
|
6729
|
-
"name": "
|
|
7061
|
+
"name": "label",
|
|
6730
7062
|
"type": {
|
|
6731
|
-
"text": "
|
|
7063
|
+
"text": "string | undefined"
|
|
6732
7064
|
},
|
|
6733
|
-
"
|
|
6734
|
-
"
|
|
6735
|
-
"fieldName": "hideRequired"
|
|
7065
|
+
"description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
|
|
7066
|
+
"fieldName": "label"
|
|
6736
7067
|
}
|
|
6737
7068
|
],
|
|
6738
7069
|
"superclass": {
|
|
@@ -6741,11 +7072,11 @@
|
|
|
6741
7072
|
},
|
|
6742
7073
|
"localization": [],
|
|
6743
7074
|
"status": "ready",
|
|
6744
|
-
"category": "
|
|
6745
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use
|
|
7075
|
+
"category": "image",
|
|
7076
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<nord-button href=\"/nordicons/\" variant=\"primary\">View Nordicons</nord-button>\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n",
|
|
6746
7077
|
"examples": [],
|
|
6747
7078
|
"dependencies": [],
|
|
6748
|
-
"tagName": "nord-
|
|
7079
|
+
"tagName": "nord-icon",
|
|
6749
7080
|
"customElement": true
|
|
6750
7081
|
}
|
|
6751
7082
|
],
|
|
@@ -6754,97 +7085,93 @@
|
|
|
6754
7085
|
"kind": "js",
|
|
6755
7086
|
"name": "default",
|
|
6756
7087
|
"declaration": {
|
|
6757
|
-
"name": "
|
|
6758
|
-
"module": "src/
|
|
7088
|
+
"name": "Icon",
|
|
7089
|
+
"module": "src/icon/Icon.ts"
|
|
6759
7090
|
}
|
|
6760
7091
|
},
|
|
6761
7092
|
{
|
|
6762
7093
|
"kind": "custom-element-definition",
|
|
6763
|
-
"name": "nord-
|
|
7094
|
+
"name": "nord-icon",
|
|
6764
7095
|
"declaration": {
|
|
6765
|
-
"name": "
|
|
6766
|
-
"module": "src/
|
|
7096
|
+
"name": "Icon",
|
|
7097
|
+
"module": "src/icon/Icon.ts"
|
|
6767
7098
|
}
|
|
6768
7099
|
}
|
|
6769
7100
|
]
|
|
6770
7101
|
},
|
|
6771
7102
|
{
|
|
6772
7103
|
"kind": "javascript-module",
|
|
6773
|
-
"path": "src/
|
|
7104
|
+
"path": "src/icon/IconManager.ts",
|
|
6774
7105
|
"declarations": [
|
|
6775
7106
|
{
|
|
6776
7107
|
"kind": "class",
|
|
6777
|
-
"description": "
|
|
6778
|
-
"name": "
|
|
6779
|
-
"slots": [
|
|
6780
|
-
{
|
|
6781
|
-
"description": "The header content.",
|
|
6782
|
-
"name": ""
|
|
6783
|
-
},
|
|
6784
|
-
{
|
|
6785
|
-
"description": "Optional slot for buttons, toggles, etc.",
|
|
6786
|
-
"name": "end"
|
|
6787
|
-
}
|
|
6788
|
-
],
|
|
7108
|
+
"description": "",
|
|
7109
|
+
"name": "IconManager",
|
|
6789
7110
|
"members": [
|
|
6790
7111
|
{
|
|
6791
7112
|
"kind": "field",
|
|
6792
|
-
"name": "
|
|
7113
|
+
"name": "cache",
|
|
6793
7114
|
"privacy": "private",
|
|
6794
|
-
"default": "new
|
|
7115
|
+
"default": "new Map<string, string | Promise<string>>()"
|
|
6795
7116
|
},
|
|
6796
7117
|
{
|
|
6797
7118
|
"kind": "field",
|
|
6798
|
-
"name": "
|
|
7119
|
+
"name": "resolver",
|
|
6799
7120
|
"type": {
|
|
6800
|
-
"text": "
|
|
6801
|
-
}
|
|
6802
|
-
|
|
6803
|
-
"description": "Controls the size of the header component.",
|
|
6804
|
-
"attribute": "size",
|
|
6805
|
-
"reflects": true
|
|
6806
|
-
}
|
|
6807
|
-
],
|
|
6808
|
-
"attributes": [
|
|
7121
|
+
"text": "IconResolver"
|
|
7122
|
+
}
|
|
7123
|
+
},
|
|
6809
7124
|
{
|
|
6810
|
-
"
|
|
6811
|
-
"
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
7125
|
+
"kind": "method",
|
|
7126
|
+
"name": "resolve",
|
|
7127
|
+
"parameters": [
|
|
7128
|
+
{
|
|
7129
|
+
"name": "name",
|
|
7130
|
+
"type": {
|
|
7131
|
+
"text": "string"
|
|
7132
|
+
}
|
|
7133
|
+
},
|
|
7134
|
+
{
|
|
7135
|
+
"name": "onResolved",
|
|
7136
|
+
"type": {
|
|
7137
|
+
"text": "(svg: string) => void"
|
|
7138
|
+
}
|
|
7139
|
+
}
|
|
7140
|
+
]
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
"kind": "method",
|
|
7144
|
+
"name": "registerIcon",
|
|
7145
|
+
"parameters": [
|
|
7146
|
+
{
|
|
7147
|
+
"name": "iconOrName",
|
|
7148
|
+
"type": {
|
|
7149
|
+
"text": "string | { title: string; default: string }"
|
|
7150
|
+
}
|
|
7151
|
+
},
|
|
7152
|
+
{
|
|
7153
|
+
"name": "icon",
|
|
7154
|
+
"optional": true,
|
|
7155
|
+
"type": {
|
|
7156
|
+
"text": "string"
|
|
7157
|
+
}
|
|
7158
|
+
}
|
|
7159
|
+
]
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
"kind": "method",
|
|
7163
|
+
"name": "clear"
|
|
7164
|
+
}
|
|
7165
|
+
]
|
|
6831
7166
|
}
|
|
6832
7167
|
],
|
|
6833
7168
|
"exports": [
|
|
6834
7169
|
{
|
|
6835
7170
|
"kind": "js",
|
|
6836
|
-
"name": "
|
|
6837
|
-
"declaration": {
|
|
6838
|
-
"name": "Header",
|
|
6839
|
-
"module": "src/header/Header.ts"
|
|
6840
|
-
}
|
|
6841
|
-
},
|
|
6842
|
-
{
|
|
6843
|
-
"kind": "custom-element-definition",
|
|
6844
|
-
"name": "nord-header",
|
|
7171
|
+
"name": "IconManager",
|
|
6845
7172
|
"declaration": {
|
|
6846
|
-
"name": "
|
|
6847
|
-
"module": "src/
|
|
7173
|
+
"name": "IconManager",
|
|
7174
|
+
"module": "src/icon/IconManager.ts"
|
|
6848
7175
|
}
|
|
6849
7176
|
}
|
|
6850
7177
|
]
|
|
@@ -7660,287 +7987,30 @@
|
|
|
7660
7987
|
}
|
|
7661
7988
|
}
|
|
7662
7989
|
],
|
|
7663
|
-
"mixins": [
|
|
7664
|
-
{
|
|
7665
|
-
"name": "SizeMixin",
|
|
7666
|
-
"module": "/src/common/mixins/SizeMixin.js"
|
|
7667
|
-
},
|
|
7668
|
-
{
|
|
7669
|
-
"name": "FormAssociatedMixin",
|
|
7670
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
7671
|
-
},
|
|
7672
|
-
{
|
|
7673
|
-
"name": "AutocompleteMixin",
|
|
7674
|
-
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
7675
|
-
},
|
|
7676
|
-
{
|
|
7677
|
-
"name": "ReadonlyMixin",
|
|
7678
|
-
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
7679
|
-
},
|
|
7680
|
-
{
|
|
7681
|
-
"name": "InputMixin",
|
|
7682
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
7683
|
-
},
|
|
7684
|
-
{
|
|
7685
|
-
"name": "FocusableMixin",
|
|
7686
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
7687
|
-
}
|
|
7688
|
-
],
|
|
7689
|
-
"superclass": {
|
|
7690
|
-
"name": "LitElement",
|
|
7691
|
-
"package": "lit"
|
|
7692
|
-
},
|
|
7693
|
-
"localization": [],
|
|
7694
|
-
"status": "ready",
|
|
7695
|
-
"category": "form",
|
|
7696
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n\n## Icon usage in input\n\nEach [input size](/components/input/?example=size) has a recommended icon size. The medium input uses the `s` icon size, the small input uses the `xs` icon size, and the large input uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n",
|
|
7697
|
-
"examples": [],
|
|
7698
|
-
"dependencies": [
|
|
7699
|
-
"icon"
|
|
7700
|
-
],
|
|
7701
|
-
"tagName": "nord-input",
|
|
7702
|
-
"customElement": true,
|
|
7703
|
-
"events": [
|
|
7704
|
-
{
|
|
7705
|
-
"name": "input",
|
|
7706
|
-
"type": {
|
|
7707
|
-
"text": "NordEvent"
|
|
7708
|
-
},
|
|
7709
|
-
"description": "Fired as the user types into the input.",
|
|
7710
|
-
"inheritedFrom": {
|
|
7711
|
-
"name": "FormAssociatedMixin",
|
|
7712
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
7713
|
-
}
|
|
7714
|
-
},
|
|
7715
|
-
{
|
|
7716
|
-
"name": "change",
|
|
7717
|
-
"type": {
|
|
7718
|
-
"text": "NordEvent"
|
|
7719
|
-
},
|
|
7720
|
-
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
7721
|
-
"inheritedFrom": {
|
|
7722
|
-
"name": "FormAssociatedMixin",
|
|
7723
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
7724
|
-
}
|
|
7725
|
-
}
|
|
7726
|
-
]
|
|
7727
|
-
}
|
|
7728
|
-
],
|
|
7729
|
-
"exports": [
|
|
7730
|
-
{
|
|
7731
|
-
"kind": "js",
|
|
7732
|
-
"name": "default",
|
|
7733
|
-
"declaration": {
|
|
7734
|
-
"name": "Input",
|
|
7735
|
-
"module": "src/input/Input.ts"
|
|
7736
|
-
}
|
|
7737
|
-
},
|
|
7738
|
-
{
|
|
7739
|
-
"kind": "custom-element-definition",
|
|
7740
|
-
"name": "nord-input",
|
|
7741
|
-
"declaration": {
|
|
7742
|
-
"name": "Input",
|
|
7743
|
-
"module": "src/input/Input.ts"
|
|
7744
|
-
}
|
|
7745
|
-
}
|
|
7746
|
-
]
|
|
7747
|
-
},
|
|
7748
|
-
{
|
|
7749
|
-
"kind": "javascript-module",
|
|
7750
|
-
"path": "src/icon/Icon.ts",
|
|
7751
|
-
"declarations": [
|
|
7752
|
-
{
|
|
7753
|
-
"kind": "class",
|
|
7754
|
-
"description": "Icons are used to provide additional meaning or in places where text label doesn’t fit.\nIcon component allows you to display an icon from the Nordicons library.",
|
|
7755
|
-
"name": "Icon",
|
|
7756
|
-
"slots": [
|
|
7757
|
-
{
|
|
7758
|
-
"description": "The default slot used for placing a custom SVG icon.",
|
|
7759
|
-
"name": ""
|
|
7760
|
-
}
|
|
7761
|
-
],
|
|
7762
|
-
"members": [
|
|
7763
|
-
{
|
|
7764
|
-
"kind": "field",
|
|
7765
|
-
"name": "manager",
|
|
7766
|
-
"privacy": "private",
|
|
7767
|
-
"static": true,
|
|
7768
|
-
"default": "new IconManager()"
|
|
7769
|
-
},
|
|
7770
|
-
{
|
|
7771
|
-
"kind": "method",
|
|
7772
|
-
"name": "registerResolver",
|
|
7773
|
-
"static": true,
|
|
7774
|
-
"parameters": [
|
|
7775
|
-
{
|
|
7776
|
-
"name": "resolver",
|
|
7777
|
-
"type": {
|
|
7778
|
-
"text": "IconResolver"
|
|
7779
|
-
},
|
|
7780
|
-
"description": "The resolver function to register."
|
|
7781
|
-
}
|
|
7782
|
-
],
|
|
7783
|
-
"description": "Register a custom icon resolver, which accepts the icon name as an parameter, and returns an SVG string.\nCan return a string synchronously, or a promise of a string.\nBy default, will load icons from the Nord CDN."
|
|
7784
|
-
},
|
|
7785
|
-
{
|
|
7786
|
-
"kind": "method",
|
|
7787
|
-
"name": "registerIcon",
|
|
7788
|
-
"static": true,
|
|
7789
|
-
"return": {
|
|
7790
|
-
"type": {
|
|
7791
|
-
"text": "void"
|
|
7792
|
-
}
|
|
7793
|
-
},
|
|
7794
|
-
"parameters": [
|
|
7795
|
-
{
|
|
7796
|
-
"name": "icon",
|
|
7797
|
-
"type": {
|
|
7798
|
-
"text": "{ title: string; default: string }"
|
|
7799
|
-
},
|
|
7800
|
-
"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."
|
|
7801
|
-
}
|
|
7802
|
-
],
|
|
7803
|
-
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
7804
|
-
},
|
|
7805
|
-
{
|
|
7806
|
-
"kind": "method",
|
|
7807
|
-
"name": "registerIcon",
|
|
7808
|
-
"static": true,
|
|
7809
|
-
"return": {
|
|
7810
|
-
"type": {
|
|
7811
|
-
"text": "void"
|
|
7812
|
-
}
|
|
7813
|
-
},
|
|
7814
|
-
"parameters": [
|
|
7815
|
-
{
|
|
7816
|
-
"name": "name",
|
|
7817
|
-
"type": {
|
|
7818
|
-
"text": "string"
|
|
7819
|
-
},
|
|
7820
|
-
"description": "The name of the icon to be registered."
|
|
7821
|
-
},
|
|
7822
|
-
{
|
|
7823
|
-
"name": "icon",
|
|
7824
|
-
"type": {
|
|
7825
|
-
"text": "string"
|
|
7826
|
-
},
|
|
7827
|
-
"description": "The SVG string for the icon."
|
|
7828
|
-
}
|
|
7829
|
-
],
|
|
7830
|
-
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
7831
|
-
},
|
|
7832
|
-
{
|
|
7833
|
-
"kind": "method",
|
|
7834
|
-
"name": "registerIcon",
|
|
7835
|
-
"static": true,
|
|
7836
|
-
"parameters": [
|
|
7837
|
-
{
|
|
7838
|
-
"name": "iconOrName",
|
|
7839
|
-
"type": {
|
|
7840
|
-
"text": "string | { title: string; default: string }"
|
|
7841
|
-
},
|
|
7842
|
-
"description": "The name of the icon to be registered or an object representing the icon to be registered, where \"title\" is the icon's name, and \"default\" is the SVG string."
|
|
7843
|
-
},
|
|
7844
|
-
{
|
|
7845
|
-
"name": "icon",
|
|
7846
|
-
"optional": true,
|
|
7847
|
-
"type": {
|
|
7848
|
-
"text": "string"
|
|
7849
|
-
},
|
|
7850
|
-
"description": "The SVG string for the icon."
|
|
7851
|
-
}
|
|
7852
|
-
],
|
|
7853
|
-
"description": "Register an individual icon so it can be rendered synchronously, to avoid loading over the network."
|
|
7854
|
-
},
|
|
7855
|
-
{
|
|
7856
|
-
"kind": "field",
|
|
7857
|
-
"name": "name",
|
|
7858
|
-
"type": {
|
|
7859
|
-
"text": "string"
|
|
7860
|
-
},
|
|
7861
|
-
"default": "\"\"",
|
|
7862
|
-
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
7863
|
-
"attribute": "name",
|
|
7864
|
-
"reflects": true
|
|
7865
|
-
},
|
|
7866
|
-
{
|
|
7867
|
-
"kind": "field",
|
|
7868
|
-
"name": "size",
|
|
7869
|
-
"type": {
|
|
7870
|
-
"text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
|
|
7871
|
-
},
|
|
7872
|
-
"description": "The size of the icon.",
|
|
7873
|
-
"attribute": "size",
|
|
7874
|
-
"reflects": true
|
|
7875
|
-
},
|
|
7876
|
-
{
|
|
7877
|
-
"kind": "field",
|
|
7878
|
-
"name": "color",
|
|
7879
|
-
"type": {
|
|
7880
|
-
"text": "string | undefined"
|
|
7881
|
-
},
|
|
7882
|
-
"description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
|
|
7883
|
-
"attribute": "color",
|
|
7884
|
-
"reflects": true
|
|
7885
|
-
},
|
|
7886
|
-
{
|
|
7887
|
-
"kind": "field",
|
|
7888
|
-
"name": "label",
|
|
7889
|
-
"type": {
|
|
7890
|
-
"text": "string | undefined"
|
|
7891
|
-
},
|
|
7892
|
-
"description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
|
|
7893
|
-
"attribute": "label",
|
|
7894
|
-
"reflects": true
|
|
7895
|
-
},
|
|
7990
|
+
"mixins": [
|
|
7896
7991
|
{
|
|
7897
|
-
"
|
|
7898
|
-
"
|
|
7899
|
-
"type": {
|
|
7900
|
-
"text": "string"
|
|
7901
|
-
},
|
|
7902
|
-
"privacy": "private",
|
|
7903
|
-
"default": "\"\""
|
|
7992
|
+
"name": "SizeMixin",
|
|
7993
|
+
"module": "/src/common/mixins/SizeMixin.js"
|
|
7904
7994
|
},
|
|
7905
7995
|
{
|
|
7906
|
-
"
|
|
7907
|
-
"
|
|
7908
|
-
|
|
7909
|
-
}
|
|
7910
|
-
],
|
|
7911
|
-
"attributes": [
|
|
7996
|
+
"name": "FormAssociatedMixin",
|
|
7997
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
7998
|
+
},
|
|
7912
7999
|
{
|
|
7913
|
-
"name": "
|
|
7914
|
-
"
|
|
7915
|
-
"text": "string"
|
|
7916
|
-
},
|
|
7917
|
-
"default": "\"\"",
|
|
7918
|
-
"description": "The name of the icon to display, as defined by [nordicons](/nordicons/).",
|
|
7919
|
-
"fieldName": "name"
|
|
8000
|
+
"name": "AutocompleteMixin",
|
|
8001
|
+
"module": "/src/common/mixins/AutocompleteMixin.js"
|
|
7920
8002
|
},
|
|
7921
8003
|
{
|
|
7922
|
-
"name": "
|
|
7923
|
-
"
|
|
7924
|
-
"text": "\"xxs\" | \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\" | undefined"
|
|
7925
|
-
},
|
|
7926
|
-
"description": "The size of the icon.",
|
|
7927
|
-
"fieldName": "size"
|
|
8004
|
+
"name": "ReadonlyMixin",
|
|
8005
|
+
"module": "/src/common/mixins/ReadonlyMixin.js"
|
|
7928
8006
|
},
|
|
7929
8007
|
{
|
|
7930
|
-
"name": "
|
|
7931
|
-
"
|
|
7932
|
-
"text": "string | undefined"
|
|
7933
|
-
},
|
|
7934
|
-
"description": "The color of the icon.\nCan accept any valid CSS color value, including custom properties.",
|
|
7935
|
-
"fieldName": "color"
|
|
8008
|
+
"name": "InputMixin",
|
|
8009
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
7936
8010
|
},
|
|
7937
8011
|
{
|
|
7938
|
-
"name": "
|
|
7939
|
-
"
|
|
7940
|
-
"text": "string | undefined"
|
|
7941
|
-
},
|
|
7942
|
-
"description": "An accessible label for the icon.\nIf no label is supplied, the icon is hidden from assistive technology.",
|
|
7943
|
-
"fieldName": "label"
|
|
8012
|
+
"name": "FocusableMixin",
|
|
8013
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
7944
8014
|
}
|
|
7945
8015
|
],
|
|
7946
8016
|
"superclass": {
|
|
@@ -7949,95 +8019,36 @@
|
|
|
7949
8019
|
},
|
|
7950
8020
|
"localization": [],
|
|
7951
8021
|
"status": "ready",
|
|
7952
|
-
"category": "
|
|
7953
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<
|
|
8022
|
+
"category": "form",
|
|
8023
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n\n## Icon usage in input\n\nEach [input size](/components/input/?example=size) has a recommended icon size. The medium input uses the `s` icon size, the small input uses the `xs` icon size, and the large input uses the `m` icon size. The icon will adjust size automatically based on the button size, so you will get the correct behavior by default. However, this can be overridden by explicitly setting a size on the icon.\n",
|
|
7954
8024
|
"examples": [],
|
|
7955
|
-
"dependencies": [
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7959
|
-
|
|
7960
|
-
|
|
7961
|
-
{
|
|
7962
|
-
"kind": "js",
|
|
7963
|
-
"name": "default",
|
|
7964
|
-
"declaration": {
|
|
7965
|
-
"name": "Icon",
|
|
7966
|
-
"module": "src/icon/Icon.ts"
|
|
7967
|
-
}
|
|
7968
|
-
},
|
|
7969
|
-
{
|
|
7970
|
-
"kind": "custom-element-definition",
|
|
7971
|
-
"name": "nord-icon",
|
|
7972
|
-
"declaration": {
|
|
7973
|
-
"name": "Icon",
|
|
7974
|
-
"module": "src/icon/Icon.ts"
|
|
7975
|
-
}
|
|
7976
|
-
}
|
|
7977
|
-
]
|
|
7978
|
-
},
|
|
7979
|
-
{
|
|
7980
|
-
"kind": "javascript-module",
|
|
7981
|
-
"path": "src/icon/IconManager.ts",
|
|
7982
|
-
"declarations": [
|
|
7983
|
-
{
|
|
7984
|
-
"kind": "class",
|
|
7985
|
-
"description": "",
|
|
7986
|
-
"name": "IconManager",
|
|
7987
|
-
"members": [
|
|
7988
|
-
{
|
|
7989
|
-
"kind": "field",
|
|
7990
|
-
"name": "cache",
|
|
7991
|
-
"privacy": "private",
|
|
7992
|
-
"default": "new Map<string, string | Promise<string>>()"
|
|
7993
|
-
},
|
|
8025
|
+
"dependencies": [
|
|
8026
|
+
"icon"
|
|
8027
|
+
],
|
|
8028
|
+
"tagName": "nord-input",
|
|
8029
|
+
"customElement": true,
|
|
8030
|
+
"events": [
|
|
7994
8031
|
{
|
|
7995
|
-
"
|
|
7996
|
-
"name": "resolver",
|
|
8032
|
+
"name": "input",
|
|
7997
8033
|
"type": {
|
|
7998
|
-
"text": "
|
|
8034
|
+
"text": "NordEvent"
|
|
8035
|
+
},
|
|
8036
|
+
"description": "Fired as the user types into the input.",
|
|
8037
|
+
"inheritedFrom": {
|
|
8038
|
+
"name": "FormAssociatedMixin",
|
|
8039
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
7999
8040
|
}
|
|
8000
8041
|
},
|
|
8001
8042
|
{
|
|
8002
|
-
"
|
|
8003
|
-
"
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
|
|
8008
|
-
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
{
|
|
8012
|
-
"name": "onResolved",
|
|
8013
|
-
"type": {
|
|
8014
|
-
"text": "(svg: string) => void"
|
|
8015
|
-
}
|
|
8016
|
-
}
|
|
8017
|
-
]
|
|
8018
|
-
},
|
|
8019
|
-
{
|
|
8020
|
-
"kind": "method",
|
|
8021
|
-
"name": "registerIcon",
|
|
8022
|
-
"parameters": [
|
|
8023
|
-
{
|
|
8024
|
-
"name": "iconOrName",
|
|
8025
|
-
"type": {
|
|
8026
|
-
"text": "string | { title: string; default: string }"
|
|
8027
|
-
}
|
|
8028
|
-
},
|
|
8029
|
-
{
|
|
8030
|
-
"name": "icon",
|
|
8031
|
-
"optional": true,
|
|
8032
|
-
"type": {
|
|
8033
|
-
"text": "string"
|
|
8034
|
-
}
|
|
8035
|
-
}
|
|
8036
|
-
]
|
|
8037
|
-
},
|
|
8038
|
-
{
|
|
8039
|
-
"kind": "method",
|
|
8040
|
-
"name": "clear"
|
|
8043
|
+
"name": "change",
|
|
8044
|
+
"type": {
|
|
8045
|
+
"text": "NordEvent"
|
|
8046
|
+
},
|
|
8047
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
8048
|
+
"inheritedFrom": {
|
|
8049
|
+
"name": "FormAssociatedMixin",
|
|
8050
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8051
|
+
}
|
|
8041
8052
|
}
|
|
8042
8053
|
]
|
|
8043
8054
|
}
|
|
@@ -8045,10 +8056,18 @@
|
|
|
8045
8056
|
"exports": [
|
|
8046
8057
|
{
|
|
8047
8058
|
"kind": "js",
|
|
8048
|
-
"name": "
|
|
8059
|
+
"name": "default",
|
|
8049
8060
|
"declaration": {
|
|
8050
|
-
"name": "
|
|
8051
|
-
"module": "src/
|
|
8061
|
+
"name": "Input",
|
|
8062
|
+
"module": "src/input/Input.ts"
|
|
8063
|
+
}
|
|
8064
|
+
},
|
|
8065
|
+
{
|
|
8066
|
+
"kind": "custom-element-definition",
|
|
8067
|
+
"name": "nord-input",
|
|
8068
|
+
"declaration": {
|
|
8069
|
+
"name": "Input",
|
|
8070
|
+
"module": "src/input/Input.ts"
|
|
8052
8071
|
}
|
|
8053
8072
|
}
|
|
8054
8073
|
]
|
|
@@ -8200,6 +8219,16 @@
|
|
|
8200
8219
|
"attribute": "nav-open",
|
|
8201
8220
|
"reflects": true
|
|
8202
8221
|
},
|
|
8222
|
+
{
|
|
8223
|
+
"kind": "field",
|
|
8224
|
+
"name": "persistNavState",
|
|
8225
|
+
"type": {
|
|
8226
|
+
"text": "boolean"
|
|
8227
|
+
},
|
|
8228
|
+
"default": "false",
|
|
8229
|
+
"description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
|
|
8230
|
+
"attribute": "persist-nav-state"
|
|
8231
|
+
},
|
|
8203
8232
|
{
|
|
8204
8233
|
"kind": "field",
|
|
8205
8234
|
"name": "padding",
|
|
@@ -8423,6 +8452,15 @@
|
|
|
8423
8452
|
"description": "Controls whether the navigation is hidden off-screen or not.\nDefaults to `true` for wide viewports, and `false` otherwise.",
|
|
8424
8453
|
"fieldName": "navOpen"
|
|
8425
8454
|
},
|
|
8455
|
+
{
|
|
8456
|
+
"name": "persist-nav-state",
|
|
8457
|
+
"type": {
|
|
8458
|
+
"text": "boolean"
|
|
8459
|
+
},
|
|
8460
|
+
"default": "false",
|
|
8461
|
+
"description": "Controls whether the navigation's open/closed state is persisted across page loads.\nThis is useful for multi-page apps, where clicks on links trigger a full page load.",
|
|
8462
|
+
"fieldName": "persistNavState"
|
|
8463
|
+
},
|
|
8426
8464
|
{
|
|
8427
8465
|
"name": "padding",
|
|
8428
8466
|
"type": {
|
|
@@ -17476,6 +17514,41 @@
|
|
|
17476
17514
|
}
|
|
17477
17515
|
]
|
|
17478
17516
|
},
|
|
17517
|
+
{
|
|
17518
|
+
"kind": "javascript-module",
|
|
17519
|
+
"path": "src/common/decorators/observe.ts",
|
|
17520
|
+
"declarations": [
|
|
17521
|
+
{
|
|
17522
|
+
"kind": "function",
|
|
17523
|
+
"name": "observe",
|
|
17524
|
+
"parameters": [
|
|
17525
|
+
{
|
|
17526
|
+
"name": "propertyName",
|
|
17527
|
+
"type": {
|
|
17528
|
+
"text": "string"
|
|
17529
|
+
}
|
|
17530
|
+
},
|
|
17531
|
+
{
|
|
17532
|
+
"name": "lifecycle",
|
|
17533
|
+
"default": "\"update\"",
|
|
17534
|
+
"type": {
|
|
17535
|
+
"text": "ObserveLifecycle"
|
|
17536
|
+
}
|
|
17537
|
+
}
|
|
17538
|
+
]
|
|
17539
|
+
}
|
|
17540
|
+
],
|
|
17541
|
+
"exports": [
|
|
17542
|
+
{
|
|
17543
|
+
"kind": "js",
|
|
17544
|
+
"name": "observe",
|
|
17545
|
+
"declaration": {
|
|
17546
|
+
"name": "observe",
|
|
17547
|
+
"module": "src/common/decorators/observe.ts"
|
|
17548
|
+
}
|
|
17549
|
+
}
|
|
17550
|
+
]
|
|
17551
|
+
},
|
|
17479
17552
|
{
|
|
17480
17553
|
"kind": "javascript-module",
|
|
17481
17554
|
"path": "src/common/directives/cond.ts",
|
|
@@ -17910,41 +17983,6 @@
|
|
|
17910
17983
|
}
|
|
17911
17984
|
]
|
|
17912
17985
|
},
|
|
17913
|
-
{
|
|
17914
|
-
"kind": "javascript-module",
|
|
17915
|
-
"path": "src/common/decorators/observe.ts",
|
|
17916
|
-
"declarations": [
|
|
17917
|
-
{
|
|
17918
|
-
"kind": "function",
|
|
17919
|
-
"name": "observe",
|
|
17920
|
-
"parameters": [
|
|
17921
|
-
{
|
|
17922
|
-
"name": "propertyName",
|
|
17923
|
-
"type": {
|
|
17924
|
-
"text": "string"
|
|
17925
|
-
}
|
|
17926
|
-
},
|
|
17927
|
-
{
|
|
17928
|
-
"name": "lifecycle",
|
|
17929
|
-
"default": "\"update\"",
|
|
17930
|
-
"type": {
|
|
17931
|
-
"text": "ObserveLifecycle"
|
|
17932
|
-
}
|
|
17933
|
-
}
|
|
17934
|
-
]
|
|
17935
|
-
}
|
|
17936
|
-
],
|
|
17937
|
-
"exports": [
|
|
17938
|
-
{
|
|
17939
|
-
"kind": "js",
|
|
17940
|
-
"name": "observe",
|
|
17941
|
-
"declaration": {
|
|
17942
|
-
"name": "observe",
|
|
17943
|
-
"module": "src/common/decorators/observe.ts"
|
|
17944
|
-
}
|
|
17945
|
-
}
|
|
17946
|
-
]
|
|
17947
|
-
},
|
|
17948
17986
|
{
|
|
17949
17987
|
"kind": "javascript-module",
|
|
17950
17988
|
"path": "src/common/mixins/AutocompleteMixin.ts",
|