@nordhealth/components 1.14.2 → 2.0.1
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 +1153 -935
- package/lib/Avatar.js +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Banner.js +1 -1
- package/lib/Banner.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/Calendar-8aa523a7.js +2 -0
- package/lib/Calendar-8aa523a7.js.map +1 -0
- 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/Checkbox.js.map +1 -1
- package/lib/CommandMenu.js +1 -1
- package/lib/CommandMenu.js.map +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/Divider.js +1 -1
- package/lib/Divider.js.map +1 -1
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/DropdownGroup.js +1 -1
- package/lib/DropdownGroup.js.map +1 -1
- package/lib/DropdownItem.js +1 -1
- package/lib/DropdownItem.js.map +1 -1
- package/lib/EventController-d99ebeef.js.map +1 -1
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/Icon.js +1 -1
- package/lib/Icon.js.map +1 -1
- package/lib/Input.js +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/NavGroup.js +1 -1
- package/lib/NavGroup.js.map +1 -1
- package/lib/NavItem.js +1 -1
- package/lib/NavItem.js.map +1 -1
- package/lib/Popout.js +1 -1
- package/lib/Popout.js.map +1 -1
- package/lib/ProgressBar.js +1 -1
- package/lib/ProgressBar.js.map +1 -1
- package/lib/Radio.js +1 -1
- package/lib/Radio.js.map +1 -1
- package/lib/Select.js +1 -1
- package/lib/Select.js.map +1 -1
- package/lib/Skeleton.js +1 -1
- package/lib/Skeleton.js.map +1 -1
- package/lib/Spinner.js +1 -1
- package/lib/Spinner.js.map +1 -1
- package/lib/Stack.js +1 -1
- package/lib/Stack.js.map +1 -1
- package/lib/Tab.js +1 -1
- package/lib/Tab.js.map +1 -1
- package/lib/TabGroup.js +1 -1
- package/lib/TabGroup.js.map +1 -1
- package/lib/Table.js +1 -1
- package/lib/Table.js.map +1 -1
- package/lib/TextField-2df7c697.js +2 -0
- package/lib/{TextField-c34519d4.js.map → TextField-2df7c697.js.map} +1 -1
- package/lib/Textarea.js +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/Toast.js +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/ToastGroup.js +1 -1
- package/lib/ToastGroup.js.map +1 -1
- package/lib/Toggle.js +1 -1
- package/lib/Toggle.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/bundle.js +23 -23
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/avatar/Avatar.d.ts +3 -1
- package/lib/src/badge/Badge.d.ts +10 -3
- package/lib/src/badge/Badge.test.d.ts +4 -0
- package/lib/src/banner/Banner.d.ts +3 -0
- package/lib/src/button/Button.d.ts +6 -0
- package/lib/src/calendar/Calendar.d.ts +3 -0
- package/lib/src/card/Card.d.ts +5 -0
- package/lib/src/card/Card.test.d.ts +1 -0
- package/lib/src/command-menu/CommandMenu.d.ts +4 -0
- package/lib/src/common/controllers/EventController.d.ts +1 -0
- package/lib/src/divider/Divider.d.ts +3 -0
- package/lib/src/dropdown/Dropdown.d.ts +2 -0
- package/lib/src/input/Input.d.ts +6 -0
- package/lib/src/layout/Layout.d.ts +8 -8
- package/lib/src/modal/Modal.d.ts +4 -0
- package/lib/src/popout/Popout.d.ts +1 -0
- package/lib/src/progress-bar/ProgressBar.d.ts +4 -0
- package/lib/src/skeleton/Skeleton.d.ts +6 -4
- package/lib/src/stack/Stack.d.ts +2 -0
- package/lib/src/tab/Tab.d.ts +3 -0
- package/lib/src/tab/Tab.test.d.ts +1 -1
- package/lib/src/tab-group/TabGroup.d.ts +2 -0
- package/lib/src/table/Table.d.ts +3 -0
- package/lib/src/textarea/Textarea.d.ts +8 -0
- package/lib/src/toast/Toast.d.ts +2 -4
- package/lib/src/toast-group/ToastGroup.d.ts +2 -3
- package/package.json +6 -6
- package/lib/Calendar-7905498d.js +0 -2
- package/lib/Calendar-7905498d.js.map +0 -1
- package/lib/DraftComponentMixin-9e4b7b34.js +0 -2
- package/lib/DraftComponentMixin-9e4b7b34.js.map +0 -1
- package/lib/TextField-c34519d4.js +0 -2
- package/lib/src/common/controllers/MediaQueryController.d.ts +0 -14
package/custom-elements.json
CHANGED
|
@@ -377,6 +377,13 @@
|
|
|
377
377
|
"kind": "class",
|
|
378
378
|
"description": "Avatar is used for showing a thumbnail representation of a user or entity.\nDefault avatar illustration is displayed when no src is specified.",
|
|
379
379
|
"name": "Avatar",
|
|
380
|
+
"cssProperties": [
|
|
381
|
+
{
|
|
382
|
+
"description": "Controls the size of the avatar, using [icon sizing tokens](/tokens/#size).",
|
|
383
|
+
"name": "--n-avatar-size",
|
|
384
|
+
"default": "var(--n-size-icon-l)"
|
|
385
|
+
}
|
|
386
|
+
],
|
|
380
387
|
"members": [
|
|
381
388
|
{
|
|
382
389
|
"kind": "field",
|
|
@@ -505,40 +512,57 @@
|
|
|
505
512
|
},
|
|
506
513
|
{
|
|
507
514
|
"kind": "javascript-module",
|
|
508
|
-
"path": "src/
|
|
515
|
+
"path": "src/badge/Badge.ts",
|
|
509
516
|
"declarations": [
|
|
510
517
|
{
|
|
511
518
|
"kind": "class",
|
|
512
|
-
"description": "
|
|
513
|
-
"name": "
|
|
519
|
+
"description": "Badges are used to inform users of the status of an object\nor of an action that’s been taken. Commonly used in tabular\ndata to indicate status.",
|
|
520
|
+
"name": "Badge",
|
|
514
521
|
"slots": [
|
|
515
522
|
{
|
|
516
|
-
"description": "
|
|
523
|
+
"description": "The badge content.",
|
|
517
524
|
"name": ""
|
|
518
525
|
}
|
|
519
526
|
],
|
|
520
527
|
"members": [
|
|
521
528
|
{
|
|
522
529
|
"kind": "field",
|
|
523
|
-
"name": "
|
|
530
|
+
"name": "type",
|
|
524
531
|
"type": {
|
|
525
|
-
"text": "\"
|
|
532
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
526
533
|
},
|
|
527
|
-
"default": "\"
|
|
528
|
-
"description": "The
|
|
529
|
-
"attribute": "
|
|
534
|
+
"default": "\"neutral\"",
|
|
535
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
536
|
+
"attribute": "type",
|
|
530
537
|
"reflects": true
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"kind": "field",
|
|
541
|
+
"name": "progress",
|
|
542
|
+
"type": {
|
|
543
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
544
|
+
},
|
|
545
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
546
|
+
"attribute": "progress"
|
|
531
547
|
}
|
|
532
548
|
],
|
|
533
549
|
"attributes": [
|
|
534
550
|
{
|
|
535
|
-
"name": "
|
|
551
|
+
"name": "type",
|
|
536
552
|
"type": {
|
|
537
|
-
"text": "\"
|
|
553
|
+
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | \"neutral\" | \"progress\" | undefined"
|
|
538
554
|
},
|
|
539
|
-
"default": "\"
|
|
540
|
-
"description": "The
|
|
541
|
-
"fieldName": "
|
|
555
|
+
"default": "\"neutral\"",
|
|
556
|
+
"description": "The type of badge.\nDetermines the background color of the badge.",
|
|
557
|
+
"fieldName": "type"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"name": "progress",
|
|
561
|
+
"type": {
|
|
562
|
+
"text": "\"cancelled\" | \"complete\" | \"incomplete\" | \"partially-complete\" | undefined"
|
|
563
|
+
},
|
|
564
|
+
"description": "The progress of the badge. Displays a progress\nindicator next to the label.",
|
|
565
|
+
"fieldName": "progress"
|
|
542
566
|
}
|
|
543
567
|
],
|
|
544
568
|
"superclass": {
|
|
@@ -546,9 +570,9 @@
|
|
|
546
570
|
"package": "lit"
|
|
547
571
|
},
|
|
548
572
|
"status": "ready",
|
|
549
|
-
"category": "
|
|
573
|
+
"category": "text",
|
|
550
574
|
"displayName": null,
|
|
551
|
-
"tagName": "nord-
|
|
575
|
+
"tagName": "nord-badge",
|
|
552
576
|
"customElement": true
|
|
553
577
|
}
|
|
554
578
|
],
|
|
@@ -557,20 +581,20 @@
|
|
|
557
581
|
"kind": "js",
|
|
558
582
|
"name": "default",
|
|
559
583
|
"declaration": {
|
|
560
|
-
"name": "
|
|
561
|
-
"module": "src/
|
|
584
|
+
"name": "Badge",
|
|
585
|
+
"module": "src/badge/Badge.ts"
|
|
562
586
|
}
|
|
563
587
|
},
|
|
564
588
|
{
|
|
565
589
|
"kind": "custom-element-definition",
|
|
566
|
-
"name": "nord-
|
|
590
|
+
"name": "nord-badge",
|
|
567
591
|
"declaration": {
|
|
568
|
-
"name": "
|
|
569
|
-
"module": "src/
|
|
592
|
+
"name": "Badge",
|
|
593
|
+
"module": "src/badge/Badge.ts"
|
|
570
594
|
}
|
|
571
595
|
}
|
|
572
596
|
],
|
|
573
|
-
"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
|
|
597
|
+
"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 established variants and color patterns so that users can clearly identify the importance level.\n- Use to show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</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| `neutral` | The default style variant. |\n| `info` | Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n| `progress` | Used to convey something that’s in progress. |\n"
|
|
574
598
|
},
|
|
575
599
|
{
|
|
576
600
|
"kind": "javascript-module",
|
|
@@ -580,6 +604,18 @@
|
|
|
580
604
|
"kind": "class",
|
|
581
605
|
"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.",
|
|
582
606
|
"name": "Calendar",
|
|
607
|
+
"cssProperties": [
|
|
608
|
+
{
|
|
609
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
610
|
+
"name": "--n-calendar-border-radius",
|
|
611
|
+
"default": "var(--n-border-radius)"
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
615
|
+
"name": "--n-calendar-box-shadow",
|
|
616
|
+
"default": "var(--n-box-shadow-popout)"
|
|
617
|
+
}
|
|
618
|
+
],
|
|
583
619
|
"members": [
|
|
584
620
|
{
|
|
585
621
|
"kind": "field",
|
|
@@ -1093,81 +1129,39 @@
|
|
|
1093
1129
|
},
|
|
1094
1130
|
{
|
|
1095
1131
|
"kind": "javascript-module",
|
|
1096
|
-
"path": "src/
|
|
1132
|
+
"path": "src/button/Button.ts",
|
|
1097
1133
|
"declarations": [
|
|
1098
1134
|
{
|
|
1099
1135
|
"kind": "class",
|
|
1100
|
-
"description": "
|
|
1101
|
-
"name": "
|
|
1102
|
-
"
|
|
1136
|
+
"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.",
|
|
1137
|
+
"name": "Button",
|
|
1138
|
+
"cssProperties": [
|
|
1103
1139
|
{
|
|
1104
|
-
"description": "
|
|
1105
|
-
"name": ""
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
"members": [
|
|
1140
|
+
"description": "Controls the rounded corners of the button, using [border radius tokens](/tokens/#border-radius).",
|
|
1141
|
+
"name": "--n-button-border-radius",
|
|
1142
|
+
"default": "var(--n-border-radius-s)"
|
|
1143
|
+
},
|
|
1109
1144
|
{
|
|
1110
|
-
"
|
|
1111
|
-
"name": "
|
|
1112
|
-
"
|
|
1113
|
-
|
|
1114
|
-
},
|
|
1115
|
-
"default": "\"info\"",
|
|
1116
|
-
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
1117
|
-
"attribute": "type",
|
|
1118
|
-
"reflects": true
|
|
1119
|
-
}
|
|
1120
|
-
],
|
|
1121
|
-
"attributes": [
|
|
1145
|
+
"description": "Controls the spacing between items within the button, using our [spacing tokens](/tokens/#space).",
|
|
1146
|
+
"name": "--n-button-gap",
|
|
1147
|
+
"default": "var(--n-space-s)"
|
|
1148
|
+
},
|
|
1122
1149
|
{
|
|
1123
|
-
"
|
|
1124
|
-
"
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
"description": "
|
|
1129
|
-
"
|
|
1150
|
+
"description": "Controls the overlayed gradient background on the button.",
|
|
1151
|
+
"name": "--n-button-gradient",
|
|
1152
|
+
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
|
|
1156
|
+
"name": "--n-button-border-color",
|
|
1157
|
+
"default": "var(--n-color-border-strong)"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"description": "Controls the text alignment for the text in the button.",
|
|
1161
|
+
"name": "--n-button-text-align",
|
|
1162
|
+
"default": "center"
|
|
1130
1163
|
}
|
|
1131
1164
|
],
|
|
1132
|
-
"superclass": {
|
|
1133
|
-
"name": "LitElement",
|
|
1134
|
-
"package": "lit"
|
|
1135
|
-
},
|
|
1136
|
-
"status": "ready",
|
|
1137
|
-
"category": "text",
|
|
1138
|
-
"displayName": null,
|
|
1139
|
-
"tagName": "nord-badge",
|
|
1140
|
-
"customElement": true
|
|
1141
|
-
}
|
|
1142
|
-
],
|
|
1143
|
-
"exports": [
|
|
1144
|
-
{
|
|
1145
|
-
"kind": "js",
|
|
1146
|
-
"name": "default",
|
|
1147
|
-
"declaration": {
|
|
1148
|
-
"name": "Badge",
|
|
1149
|
-
"module": "src/badge/Badge.ts"
|
|
1150
|
-
}
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
"kind": "custom-element-definition",
|
|
1154
|
-
"name": "nord-badge",
|
|
1155
|
-
"declaration": {
|
|
1156
|
-
"name": "Badge",
|
|
1157
|
-
"module": "src/badge/Badge.ts"
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
],
|
|
1161
|
-
"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 show a status update on a piece of information or action.\n- Use to mark something as a “draft” or “new”.\n- Use when you want to highlight something that has been added recently.\n- Use established color patterns so that users can clearly identify the importance level.\n- Always position badge so that it’s clear to understand what object it’s related to.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make badges clickable. Instead use button component’s small variant.\n- Don’t use alternatives to existing badge variants.\n\n</div>\n\n---\n\n## Content guidelines\n\nBadge labels should use a single word to describe the status of an object. Only use two words if you need to describe a complex state:\n\n<div class=\"n-usage n-usage-do\">Complete</div>\n<div class=\"n-usage n-usage-dont\">Action completed</div>\n\nWhen writing badge 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\">Partially refunded</div>\n<div class=\"n-usage n-usage-dont\">Partially Refunded</div>\n\nAvoid unnecessary words and articles in badge labels, such as “is”, “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Pending</div>\n<div class=\"n-usage n-usage-dont\">Item is pending</div>\n\nAlways describe the status in the past tense:\n\n<div class=\"n-usage n-usage-do\">Refunded</div>\n<div class=\"n-usage n-usage-dont\">Refund</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| `info` | The default variant. Used to convey general information that isn’t critical. |\n| `success` | Used to convey success states. For example, you might want to show a badge that tells the user a payment was successful. |\n| `highlight` | Used to highlight specific items in the interface, like notifications. |\n| `danger` | Used to communicate problems that have to be resolved so that user can continue forward. Should always be used for highlighting errors. |\n| `warning` | Used to display information that needs a user’s attention attention and may require further steps. |\n"
|
|
1162
|
-
},
|
|
1163
|
-
{
|
|
1164
|
-
"kind": "javascript-module",
|
|
1165
|
-
"path": "src/button/Button.ts",
|
|
1166
|
-
"declarations": [
|
|
1167
|
-
{
|
|
1168
|
-
"kind": "class",
|
|
1169
|
-
"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.",
|
|
1170
|
-
"name": "Button",
|
|
1171
1165
|
"slots": [
|
|
1172
1166
|
{
|
|
1173
1167
|
"description": "The button content",
|
|
@@ -1632,6 +1626,127 @@
|
|
|
1632
1626
|
],
|
|
1633
1627
|
"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| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\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"
|
|
1634
1628
|
},
|
|
1629
|
+
{
|
|
1630
|
+
"kind": "javascript-module",
|
|
1631
|
+
"path": "src/card/Card.ts",
|
|
1632
|
+
"declarations": [
|
|
1633
|
+
{
|
|
1634
|
+
"kind": "class",
|
|
1635
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1636
|
+
"name": "Card",
|
|
1637
|
+
"cssProperties": [
|
|
1638
|
+
{
|
|
1639
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1640
|
+
"name": "--n-card-border-radius",
|
|
1641
|
+
"default": "var(--n-border-radius)"
|
|
1642
|
+
},
|
|
1643
|
+
{
|
|
1644
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1645
|
+
"name": "--n-card-box-shadow",
|
|
1646
|
+
"default": "var(--n-box-shadow-popout)"
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
"description": "Controls the padding on all sides of the card.",
|
|
1650
|
+
"name": "--n-card-padding",
|
|
1651
|
+
"default": "var(--n-space-m)"
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"description": "Controls the padding of items slotted within the card. This does not affect the block padding of items slotted into the header.",
|
|
1655
|
+
"name": "--n-card-slot-padding",
|
|
1656
|
+
"default": "var(--n-space-m)"
|
|
1657
|
+
}
|
|
1658
|
+
],
|
|
1659
|
+
"slots": [
|
|
1660
|
+
{
|
|
1661
|
+
"description": "The card content.",
|
|
1662
|
+
"name": ""
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1666
|
+
"name": "header"
|
|
1667
|
+
},
|
|
1668
|
+
{
|
|
1669
|
+
"description": "Optional slot that positions content at the end of the header. Useful for actions or additional info.",
|
|
1670
|
+
"name": "header-end"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1674
|
+
"name": "footer"
|
|
1675
|
+
}
|
|
1676
|
+
],
|
|
1677
|
+
"members": [
|
|
1678
|
+
{
|
|
1679
|
+
"kind": "field",
|
|
1680
|
+
"name": "headerSlot",
|
|
1681
|
+
"privacy": "private",
|
|
1682
|
+
"default": "new SlotController(this, \"header\")"
|
|
1683
|
+
},
|
|
1684
|
+
{
|
|
1685
|
+
"kind": "field",
|
|
1686
|
+
"name": "headerEndSlot",
|
|
1687
|
+
"privacy": "private",
|
|
1688
|
+
"default": "new SlotController(this, \"header-end\")"
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"kind": "field",
|
|
1692
|
+
"name": "footerSlot",
|
|
1693
|
+
"privacy": "private",
|
|
1694
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
"kind": "field",
|
|
1698
|
+
"name": "padding",
|
|
1699
|
+
"type": {
|
|
1700
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1701
|
+
},
|
|
1702
|
+
"default": "\"m\"",
|
|
1703
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1704
|
+
"attribute": "padding",
|
|
1705
|
+
"reflects": true
|
|
1706
|
+
}
|
|
1707
|
+
],
|
|
1708
|
+
"attributes": [
|
|
1709
|
+
{
|
|
1710
|
+
"name": "padding",
|
|
1711
|
+
"type": {
|
|
1712
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1713
|
+
},
|
|
1714
|
+
"default": "\"m\"",
|
|
1715
|
+
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1716
|
+
"fieldName": "padding"
|
|
1717
|
+
}
|
|
1718
|
+
],
|
|
1719
|
+
"superclass": {
|
|
1720
|
+
"name": "LitElement",
|
|
1721
|
+
"package": "lit"
|
|
1722
|
+
},
|
|
1723
|
+
"status": "ready",
|
|
1724
|
+
"category": "structure",
|
|
1725
|
+
"displayName": null,
|
|
1726
|
+
"tagName": "nord-card",
|
|
1727
|
+
"customElement": true
|
|
1728
|
+
}
|
|
1729
|
+
],
|
|
1730
|
+
"exports": [
|
|
1731
|
+
{
|
|
1732
|
+
"kind": "js",
|
|
1733
|
+
"name": "default",
|
|
1734
|
+
"declaration": {
|
|
1735
|
+
"name": "Card",
|
|
1736
|
+
"module": "src/card/Card.ts"
|
|
1737
|
+
}
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
"kind": "custom-element-definition",
|
|
1741
|
+
"name": "nord-card",
|
|
1742
|
+
"declaration": {
|
|
1743
|
+
"name": "Card",
|
|
1744
|
+
"module": "src/card/Card.ts"
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
],
|
|
1748
|
+
"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 display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
1749
|
+
},
|
|
1635
1750
|
{
|
|
1636
1751
|
"kind": "javascript-module",
|
|
1637
1752
|
"path": "src/checkbox/Checkbox.ts",
|
|
@@ -2239,122 +2354,40 @@
|
|
|
2239
2354
|
},
|
|
2240
2355
|
{
|
|
2241
2356
|
"kind": "javascript-module",
|
|
2242
|
-
"path": "src/
|
|
2357
|
+
"path": "src/command-menu/CommandMenu.ts",
|
|
2243
2358
|
"declarations": [
|
|
2244
2359
|
{
|
|
2245
2360
|
"kind": "class",
|
|
2246
|
-
"description": "
|
|
2247
|
-
"name": "
|
|
2248
|
-
"
|
|
2361
|
+
"description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
|
|
2362
|
+
"name": "CommandMenu",
|
|
2363
|
+
"cssProperties": [
|
|
2249
2364
|
{
|
|
2250
|
-
"description": "
|
|
2251
|
-
"name": ""
|
|
2365
|
+
"description": "Controls the max inline size, or width, of the command menu.",
|
|
2366
|
+
"name": "--n-command-menu-inline-size",
|
|
2367
|
+
"default": "640px"
|
|
2252
2368
|
},
|
|
2253
2369
|
{
|
|
2254
|
-
"description": "
|
|
2255
|
-
"name": "
|
|
2370
|
+
"description": "Controls the max block size, or height, of the command menu.",
|
|
2371
|
+
"name": "--n-command-menu-block-size",
|
|
2372
|
+
"default": "290px"
|
|
2256
2373
|
},
|
|
2257
2374
|
{
|
|
2258
|
-
"description": "
|
|
2259
|
-
"name": "
|
|
2260
|
-
|
|
2375
|
+
"description": "Controls the command menu offset from the block start, or top, of the screen.",
|
|
2376
|
+
"name": "--n-command-menu-block-start",
|
|
2377
|
+
"default": "16%"
|
|
2378
|
+
}
|
|
2379
|
+
],
|
|
2380
|
+
"slots": [
|
|
2261
2381
|
{
|
|
2262
|
-
"description": "
|
|
2382
|
+
"description": "Used to replace the default footer contents.",
|
|
2263
2383
|
"name": "footer"
|
|
2264
2384
|
}
|
|
2265
2385
|
],
|
|
2266
2386
|
"members": [
|
|
2267
2387
|
{
|
|
2268
2388
|
"kind": "field",
|
|
2269
|
-
"name": "
|
|
2270
|
-
"privacy": "private"
|
|
2271
|
-
"default": "new SlotController(this, \"header\")"
|
|
2272
|
-
},
|
|
2273
|
-
{
|
|
2274
|
-
"kind": "field",
|
|
2275
|
-
"name": "headerEndSlot",
|
|
2276
|
-
"privacy": "private",
|
|
2277
|
-
"default": "new SlotController(this, \"header-end\")"
|
|
2278
|
-
},
|
|
2279
|
-
{
|
|
2280
|
-
"kind": "field",
|
|
2281
|
-
"name": "footerSlot",
|
|
2282
|
-
"privacy": "private",
|
|
2283
|
-
"default": "new SlotController(this, \"footer\")"
|
|
2284
|
-
},
|
|
2285
|
-
{
|
|
2286
|
-
"kind": "field",
|
|
2287
|
-
"name": "padding",
|
|
2288
|
-
"type": {
|
|
2289
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2290
|
-
},
|
|
2291
|
-
"default": "\"m\"",
|
|
2292
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2293
|
-
"attribute": "padding",
|
|
2294
|
-
"reflects": true
|
|
2295
|
-
}
|
|
2296
|
-
],
|
|
2297
|
-
"attributes": [
|
|
2298
|
-
{
|
|
2299
|
-
"name": "padding",
|
|
2300
|
-
"type": {
|
|
2301
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2302
|
-
},
|
|
2303
|
-
"default": "\"m\"",
|
|
2304
|
-
"description": "Controls the padding of the card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2305
|
-
"fieldName": "padding"
|
|
2306
|
-
}
|
|
2307
|
-
],
|
|
2308
|
-
"superclass": {
|
|
2309
|
-
"name": "LitElement",
|
|
2310
|
-
"package": "lit"
|
|
2311
|
-
},
|
|
2312
|
-
"status": "ready",
|
|
2313
|
-
"category": "structure",
|
|
2314
|
-
"displayName": null,
|
|
2315
|
-
"tagName": "nord-card",
|
|
2316
|
-
"customElement": true
|
|
2317
|
-
}
|
|
2318
|
-
],
|
|
2319
|
-
"exports": [
|
|
2320
|
-
{
|
|
2321
|
-
"kind": "js",
|
|
2322
|
-
"name": "default",
|
|
2323
|
-
"declaration": {
|
|
2324
|
-
"name": "Card",
|
|
2325
|
-
"module": "src/card/Card.ts"
|
|
2326
|
-
}
|
|
2327
|
-
},
|
|
2328
|
-
{
|
|
2329
|
-
"kind": "custom-element-definition",
|
|
2330
|
-
"name": "nord-card",
|
|
2331
|
-
"declaration": {
|
|
2332
|
-
"name": "Card",
|
|
2333
|
-
"module": "src/card/Card.ts"
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
],
|
|
2337
|
-
"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 display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
2338
|
-
},
|
|
2339
|
-
{
|
|
2340
|
-
"kind": "javascript-module",
|
|
2341
|
-
"path": "src/command-menu/CommandMenu.ts",
|
|
2342
|
-
"declarations": [
|
|
2343
|
-
{
|
|
2344
|
-
"kind": "class",
|
|
2345
|
-
"description": "Command Menu allows users to navigate and use an app without\ntouching the mouse and helps them transform into “power users”\nwho can harness more advanced features far faster.",
|
|
2346
|
-
"name": "CommandMenu",
|
|
2347
|
-
"slots": [
|
|
2348
|
-
{
|
|
2349
|
-
"description": "Used to replace the default footer contents.",
|
|
2350
|
-
"name": "footer"
|
|
2351
|
-
}
|
|
2352
|
-
],
|
|
2353
|
-
"members": [
|
|
2354
|
-
{
|
|
2355
|
-
"kind": "field",
|
|
2356
|
-
"name": "inputRef",
|
|
2357
|
-
"privacy": "private"
|
|
2389
|
+
"name": "inputRef",
|
|
2390
|
+
"privacy": "private"
|
|
2358
2391
|
},
|
|
2359
2392
|
{
|
|
2360
2393
|
"kind": "field",
|
|
@@ -2927,6 +2960,87 @@
|
|
|
2927
2960
|
],
|
|
2928
2961
|
"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 global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, 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\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, 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 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\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
|
|
2929
2962
|
},
|
|
2963
|
+
{
|
|
2964
|
+
"kind": "javascript-module",
|
|
2965
|
+
"path": "src/banner/Banner.ts",
|
|
2966
|
+
"declarations": [
|
|
2967
|
+
{
|
|
2968
|
+
"kind": "class",
|
|
2969
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
2970
|
+
"name": "Banner",
|
|
2971
|
+
"cssProperties": [
|
|
2972
|
+
{
|
|
2973
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
2974
|
+
"name": "--n-banner-border-radius",
|
|
2975
|
+
"default": "var(--n-border-radius)"
|
|
2976
|
+
},
|
|
2977
|
+
{
|
|
2978
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
2979
|
+
"name": "--n-banner-box-shadow",
|
|
2980
|
+
"default": "var(--n-box-shadow-card)"
|
|
2981
|
+
}
|
|
2982
|
+
],
|
|
2983
|
+
"slots": [
|
|
2984
|
+
{
|
|
2985
|
+
"description": "default slot",
|
|
2986
|
+
"name": ""
|
|
2987
|
+
}
|
|
2988
|
+
],
|
|
2989
|
+
"members": [
|
|
2990
|
+
{
|
|
2991
|
+
"kind": "field",
|
|
2992
|
+
"name": "variant",
|
|
2993
|
+
"type": {
|
|
2994
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
2995
|
+
},
|
|
2996
|
+
"default": "\"info\"",
|
|
2997
|
+
"description": "The style variant of the banner.",
|
|
2998
|
+
"attribute": "variant",
|
|
2999
|
+
"reflects": true
|
|
3000
|
+
}
|
|
3001
|
+
],
|
|
3002
|
+
"attributes": [
|
|
3003
|
+
{
|
|
3004
|
+
"name": "variant",
|
|
3005
|
+
"type": {
|
|
3006
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
3007
|
+
},
|
|
3008
|
+
"default": "\"info\"",
|
|
3009
|
+
"description": "The style variant of the banner.",
|
|
3010
|
+
"fieldName": "variant"
|
|
3011
|
+
}
|
|
3012
|
+
],
|
|
3013
|
+
"superclass": {
|
|
3014
|
+
"name": "LitElement",
|
|
3015
|
+
"package": "lit"
|
|
3016
|
+
},
|
|
3017
|
+
"status": "ready",
|
|
3018
|
+
"category": "feedback",
|
|
3019
|
+
"displayName": null,
|
|
3020
|
+
"tagName": "nord-banner",
|
|
3021
|
+
"customElement": true
|
|
3022
|
+
}
|
|
3023
|
+
],
|
|
3024
|
+
"exports": [
|
|
3025
|
+
{
|
|
3026
|
+
"kind": "js",
|
|
3027
|
+
"name": "default",
|
|
3028
|
+
"declaration": {
|
|
3029
|
+
"name": "Banner",
|
|
3030
|
+
"module": "src/banner/Banner.ts"
|
|
3031
|
+
}
|
|
3032
|
+
},
|
|
3033
|
+
{
|
|
3034
|
+
"kind": "custom-element-definition",
|
|
3035
|
+
"name": "nord-banner",
|
|
3036
|
+
"declaration": {
|
|
3037
|
+
"name": "Banner",
|
|
3038
|
+
"module": "src/banner/Banner.ts"
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
],
|
|
3042
|
+
"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 this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it 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\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
3043
|
+
},
|
|
2930
3044
|
{
|
|
2931
3045
|
"kind": "javascript-module",
|
|
2932
3046
|
"path": "src/common/attribute.ts",
|
|
@@ -5100,6 +5214,18 @@
|
|
|
5100
5214
|
"kind": "class",
|
|
5101
5215
|
"description": "Divider components are used to separate and distinguish sections of\ncontent or groups of menu items. Visually, they look like\nhorizontal or vertical lines.",
|
|
5102
5216
|
"name": "Divider",
|
|
5217
|
+
"cssProperties": [
|
|
5218
|
+
{
|
|
5219
|
+
"description": "Controls the color of the divider, using our [color tokens](/tokens/#color).",
|
|
5220
|
+
"name": "--n-divider-color",
|
|
5221
|
+
"default": "var(--n-color-border)"
|
|
5222
|
+
},
|
|
5223
|
+
{
|
|
5224
|
+
"description": "Controls the size, or thickness, of the divider.",
|
|
5225
|
+
"name": "--n-divider-size",
|
|
5226
|
+
"default": "1px"
|
|
5227
|
+
}
|
|
5228
|
+
],
|
|
5103
5229
|
"members": [
|
|
5104
5230
|
{
|
|
5105
5231
|
"kind": "field",
|
|
@@ -5168,6 +5294,13 @@
|
|
|
5168
5294
|
"kind": "class",
|
|
5169
5295
|
"description": "Dropdown menu displays a list of actions or selectable options for\na user. Dropdown uses popout component internally to create\nthe overlay functionality.",
|
|
5170
5296
|
"name": "Dropdown",
|
|
5297
|
+
"cssProperties": [
|
|
5298
|
+
{
|
|
5299
|
+
"description": "Controls the inline size, or width, of the dropdown. Will resize up to 1.5 times to account for larger content.",
|
|
5300
|
+
"name": "--n-dropdown-size",
|
|
5301
|
+
"default": "250px"
|
|
5302
|
+
}
|
|
5303
|
+
],
|
|
5171
5304
|
"slots": [
|
|
5172
5305
|
{
|
|
5173
5306
|
"description": "The dropdown content.",
|
|
@@ -6008,6 +6141,33 @@
|
|
|
6008
6141
|
"kind": "class",
|
|
6009
6142
|
"description": "Inputs are used to allow users to provide text input when the expected input is short.\nAs well as plain text, Input supports various types of text, including passwords and numbers.",
|
|
6010
6143
|
"name": "Input",
|
|
6144
|
+
"cssProperties": [
|
|
6145
|
+
{
|
|
6146
|
+
"description": "Controls the inline size, or width, of the input.",
|
|
6147
|
+
"name": "--n-input-inline-size",
|
|
6148
|
+
"default": "240px"
|
|
6149
|
+
},
|
|
6150
|
+
{
|
|
6151
|
+
"description": "Controls the background of the input, using our [color tokens](/tokens/#color).",
|
|
6152
|
+
"name": "--n-input-background",
|
|
6153
|
+
"default": "var(--n-color-active)"
|
|
6154
|
+
},
|
|
6155
|
+
{
|
|
6156
|
+
"description": "Controls the text color of the input, using our [color tokens](/tokens/#color).",
|
|
6157
|
+
"name": "--n-input-color",
|
|
6158
|
+
"default": "var(--n-color-text)"
|
|
6159
|
+
},
|
|
6160
|
+
{
|
|
6161
|
+
"description": "Controls the border color of the input, using our [color tokens](/tokens/#color).",
|
|
6162
|
+
"name": "--n-input-border-color",
|
|
6163
|
+
"default": "var(--n-color-border-strong)"
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
6167
|
+
"name": "--n-input-border-radius",
|
|
6168
|
+
"default": "var(--n-border-radius-s)"
|
|
6169
|
+
}
|
|
6170
|
+
],
|
|
6011
6171
|
"slots": [
|
|
6012
6172
|
{
|
|
6013
6173
|
"description": "Use when a label requires more than plain text.",
|
|
@@ -6705,6 +6865,13 @@
|
|
|
6705
6865
|
"kind": "class",
|
|
6706
6866
|
"description": "Layout component is used to create the main layout of an app. Layout\ncurrently comes with one main configuration: two-column.",
|
|
6707
6867
|
"name": "Layout",
|
|
6868
|
+
"cssProperties": [
|
|
6869
|
+
{
|
|
6870
|
+
"description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
|
|
6871
|
+
"name": "--n-layout-padding",
|
|
6872
|
+
"default": "var(--n-space-l)"
|
|
6873
|
+
}
|
|
6874
|
+
],
|
|
6708
6875
|
"slots": [
|
|
6709
6876
|
{
|
|
6710
6877
|
"description": "The default main section content.",
|
|
@@ -6730,11 +6897,21 @@
|
|
|
6730
6897
|
},
|
|
6731
6898
|
{
|
|
6732
6899
|
"kind": "field",
|
|
6733
|
-
"name": "
|
|
6734
|
-
"
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6900
|
+
"name": "direction",
|
|
6901
|
+
"privacy": "private",
|
|
6902
|
+
"default": "new DirectionController(this)"
|
|
6903
|
+
},
|
|
6904
|
+
{
|
|
6905
|
+
"kind": "field",
|
|
6906
|
+
"name": "events",
|
|
6907
|
+
"privacy": "private",
|
|
6908
|
+
"default": "new EventController(this)"
|
|
6909
|
+
},
|
|
6910
|
+
{
|
|
6911
|
+
"kind": "field",
|
|
6912
|
+
"name": "lightDismiss",
|
|
6913
|
+
"privacy": "private",
|
|
6914
|
+
"default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !mediaQuery.matches,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl && !this.isNavToggle(node),\n })"
|
|
6738
6915
|
},
|
|
6739
6916
|
{
|
|
6740
6917
|
"kind": "field",
|
|
@@ -6796,34 +6973,6 @@
|
|
|
6796
6973
|
"attribute": "padding",
|
|
6797
6974
|
"reflects": true
|
|
6798
6975
|
},
|
|
6799
|
-
{
|
|
6800
|
-
"kind": "field",
|
|
6801
|
-
"name": "lightDismiss",
|
|
6802
|
-
"privacy": "private",
|
|
6803
|
-
"default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !this.mq.matches,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl && node !== this.navToggleEl,\n })"
|
|
6804
|
-
},
|
|
6805
|
-
{
|
|
6806
|
-
"kind": "field",
|
|
6807
|
-
"name": "mq",
|
|
6808
|
-
"privacy": "private",
|
|
6809
|
-
"default": "new MediaQueryController(this, mediaQuery, () => this.handleMediaQueryChange())"
|
|
6810
|
-
},
|
|
6811
|
-
{
|
|
6812
|
-
"kind": "field",
|
|
6813
|
-
"name": "direction",
|
|
6814
|
-
"privacy": "private",
|
|
6815
|
-
"default": "new DirectionController(this)"
|
|
6816
|
-
},
|
|
6817
|
-
{
|
|
6818
|
-
"kind": "method",
|
|
6819
|
-
"name": "getToggleElement",
|
|
6820
|
-
"privacy": "protected"
|
|
6821
|
-
},
|
|
6822
|
-
{
|
|
6823
|
-
"kind": "method",
|
|
6824
|
-
"name": "cleanup",
|
|
6825
|
-
"privacy": "private"
|
|
6826
|
-
},
|
|
6827
6976
|
{
|
|
6828
6977
|
"kind": "method",
|
|
6829
6978
|
"name": "handleNavWidthChange",
|
|
@@ -6926,6 +7075,19 @@
|
|
|
6926
7075
|
"name": "handleTransitionEnd",
|
|
6927
7076
|
"privacy": "private"
|
|
6928
7077
|
},
|
|
7078
|
+
{
|
|
7079
|
+
"kind": "method",
|
|
7080
|
+
"name": "isNavToggle",
|
|
7081
|
+
"privacy": "private",
|
|
7082
|
+
"parameters": [
|
|
7083
|
+
{
|
|
7084
|
+
"name": "node",
|
|
7085
|
+
"type": {
|
|
7086
|
+
"text": "EventTarget | null"
|
|
7087
|
+
}
|
|
7088
|
+
}
|
|
7089
|
+
]
|
|
7090
|
+
},
|
|
6929
7091
|
{
|
|
6930
7092
|
"kind": "method",
|
|
6931
7093
|
"name": "handleKeyboardResize",
|
|
@@ -7300,6 +7462,23 @@
|
|
|
7300
7462
|
"kind": "class",
|
|
7301
7463
|
"description": "Modal component is used to display content that temporarily blocks interactions\nwith the main view of an application. Modal should be used sparingly and\nonly when necessary.",
|
|
7302
7464
|
"name": "Modal",
|
|
7465
|
+
"cssProperties": [
|
|
7466
|
+
{
|
|
7467
|
+
"description": "Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).",
|
|
7468
|
+
"name": "--n-modal-padding-inline",
|
|
7469
|
+
"default": "var(--n-space-m)"
|
|
7470
|
+
},
|
|
7471
|
+
{
|
|
7472
|
+
"description": "Controls the padding above and below the modal, using our [spacing tokens](/tokens/#space).",
|
|
7473
|
+
"name": "--n-modal-padding-block",
|
|
7474
|
+
"default": "var(--n-space-m)"
|
|
7475
|
+
},
|
|
7476
|
+
{
|
|
7477
|
+
"description": "Controls the width of the modal.",
|
|
7478
|
+
"name": "--n-modal-max-inline-size",
|
|
7479
|
+
"default": "620px"
|
|
7480
|
+
}
|
|
7481
|
+
],
|
|
7303
7482
|
"slots": [
|
|
7304
7483
|
{
|
|
7305
7484
|
"description": "Default slot",
|
|
@@ -8023,6 +8202,12 @@
|
|
|
8023
8202
|
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this && node !== this.targetElement,\n })",
|
|
8024
8203
|
"description": "Handle dismissal of the popout, clicking outside the target button and popout."
|
|
8025
8204
|
},
|
|
8205
|
+
{
|
|
8206
|
+
"kind": "field",
|
|
8207
|
+
"name": "events",
|
|
8208
|
+
"privacy": "private",
|
|
8209
|
+
"default": "new EventController(this)"
|
|
8210
|
+
},
|
|
8026
8211
|
{
|
|
8027
8212
|
"kind": "field",
|
|
8028
8213
|
"name": "direction",
|
|
@@ -8216,19 +8401,189 @@
|
|
|
8216
8401
|
},
|
|
8217
8402
|
{
|
|
8218
8403
|
"kind": "javascript-module",
|
|
8219
|
-
"path": "src/
|
|
8404
|
+
"path": "src/progress-bar/ProgressBar.ts",
|
|
8220
8405
|
"declarations": [
|
|
8221
8406
|
{
|
|
8222
8407
|
"kind": "class",
|
|
8223
|
-
"description": "
|
|
8224
|
-
"name": "
|
|
8225
|
-
"
|
|
8408
|
+
"description": "Progress Bar is used to visually represent the completion\nof a task or process. It shows how much of the task has\nbeen completed and how much is still left.",
|
|
8409
|
+
"name": "ProgressBar",
|
|
8410
|
+
"cssProperties": [
|
|
8226
8411
|
{
|
|
8227
|
-
"
|
|
8228
|
-
"name": "
|
|
8229
|
-
"
|
|
8230
|
-
|
|
8231
|
-
|
|
8412
|
+
"description": "Controls the thickness of the progress bar, using our [spacing tokens](/tokens/#space).",
|
|
8413
|
+
"name": "--n-progress-size",
|
|
8414
|
+
"default": "var(--n-space-s)"
|
|
8415
|
+
},
|
|
8416
|
+
{
|
|
8417
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
8418
|
+
"name": "--n-progress-border-radius",
|
|
8419
|
+
"default": "var(--n-border-radius-s)"
|
|
8420
|
+
},
|
|
8421
|
+
{
|
|
8422
|
+
"description": "Controls the color of the progress bar, using [color tokens](/tokens/#color).",
|
|
8423
|
+
"name": "--n-progress-color",
|
|
8424
|
+
"default": "var(--n-color-accent)"
|
|
8425
|
+
}
|
|
8426
|
+
],
|
|
8427
|
+
"members": [
|
|
8428
|
+
{
|
|
8429
|
+
"kind": "field",
|
|
8430
|
+
"name": "value",
|
|
8431
|
+
"type": {
|
|
8432
|
+
"text": "number | undefined"
|
|
8433
|
+
},
|
|
8434
|
+
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
8435
|
+
"attribute": "value",
|
|
8436
|
+
"reflects": true
|
|
8437
|
+
},
|
|
8438
|
+
{
|
|
8439
|
+
"kind": "field",
|
|
8440
|
+
"name": "max",
|
|
8441
|
+
"type": {
|
|
8442
|
+
"text": "number"
|
|
8443
|
+
},
|
|
8444
|
+
"default": "100",
|
|
8445
|
+
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
8446
|
+
"attribute": "max",
|
|
8447
|
+
"reflects": true
|
|
8448
|
+
},
|
|
8449
|
+
{
|
|
8450
|
+
"kind": "field",
|
|
8451
|
+
"name": "label",
|
|
8452
|
+
"type": {
|
|
8453
|
+
"text": "string"
|
|
8454
|
+
},
|
|
8455
|
+
"default": "\"Current progress\"",
|
|
8456
|
+
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
8457
|
+
"attribute": "label",
|
|
8458
|
+
"reflects": true
|
|
8459
|
+
},
|
|
8460
|
+
{
|
|
8461
|
+
"kind": "field",
|
|
8462
|
+
"name": "focusableRef",
|
|
8463
|
+
"privacy": "protected",
|
|
8464
|
+
"inheritedFrom": {
|
|
8465
|
+
"name": "FocusableMixin",
|
|
8466
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8467
|
+
}
|
|
8468
|
+
},
|
|
8469
|
+
{
|
|
8470
|
+
"kind": "method",
|
|
8471
|
+
"name": "focus",
|
|
8472
|
+
"parameters": [
|
|
8473
|
+
{
|
|
8474
|
+
"name": "options",
|
|
8475
|
+
"optional": true,
|
|
8476
|
+
"type": {
|
|
8477
|
+
"text": "FocusOptions"
|
|
8478
|
+
},
|
|
8479
|
+
"description": "An object which controls aspects of the focusing process."
|
|
8480
|
+
}
|
|
8481
|
+
],
|
|
8482
|
+
"description": "Programmatically move focus to the component.",
|
|
8483
|
+
"inheritedFrom": {
|
|
8484
|
+
"name": "FocusableMixin",
|
|
8485
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8486
|
+
}
|
|
8487
|
+
},
|
|
8488
|
+
{
|
|
8489
|
+
"kind": "method",
|
|
8490
|
+
"name": "blur",
|
|
8491
|
+
"description": "Programmatically remove focus from the component.",
|
|
8492
|
+
"inheritedFrom": {
|
|
8493
|
+
"name": "FocusableMixin",
|
|
8494
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8495
|
+
}
|
|
8496
|
+
},
|
|
8497
|
+
{
|
|
8498
|
+
"kind": "method",
|
|
8499
|
+
"name": "click",
|
|
8500
|
+
"description": "Programmatically simulates a click on the component.",
|
|
8501
|
+
"inheritedFrom": {
|
|
8502
|
+
"name": "FocusableMixin",
|
|
8503
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8504
|
+
}
|
|
8505
|
+
}
|
|
8506
|
+
],
|
|
8507
|
+
"attributes": [
|
|
8508
|
+
{
|
|
8509
|
+
"name": "value",
|
|
8510
|
+
"type": {
|
|
8511
|
+
"text": "number | undefined"
|
|
8512
|
+
},
|
|
8513
|
+
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
8514
|
+
"fieldName": "value"
|
|
8515
|
+
},
|
|
8516
|
+
{
|
|
8517
|
+
"name": "max",
|
|
8518
|
+
"type": {
|
|
8519
|
+
"text": "number"
|
|
8520
|
+
},
|
|
8521
|
+
"default": "100",
|
|
8522
|
+
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
8523
|
+
"fieldName": "max"
|
|
8524
|
+
},
|
|
8525
|
+
{
|
|
8526
|
+
"name": "label",
|
|
8527
|
+
"type": {
|
|
8528
|
+
"text": "string"
|
|
8529
|
+
},
|
|
8530
|
+
"default": "\"Current progress\"",
|
|
8531
|
+
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
8532
|
+
"fieldName": "label"
|
|
8533
|
+
}
|
|
8534
|
+
],
|
|
8535
|
+
"mixins": [
|
|
8536
|
+
{
|
|
8537
|
+
"name": "FocusableMixin",
|
|
8538
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
8539
|
+
}
|
|
8540
|
+
],
|
|
8541
|
+
"superclass": {
|
|
8542
|
+
"name": "LitElement",
|
|
8543
|
+
"package": "lit"
|
|
8544
|
+
},
|
|
8545
|
+
"status": "ready",
|
|
8546
|
+
"category": "feedback",
|
|
8547
|
+
"displayName": null,
|
|
8548
|
+
"tagName": "nord-progress-bar",
|
|
8549
|
+
"customElement": true
|
|
8550
|
+
}
|
|
8551
|
+
],
|
|
8552
|
+
"exports": [
|
|
8553
|
+
{
|
|
8554
|
+
"kind": "js",
|
|
8555
|
+
"name": "default",
|
|
8556
|
+
"declaration": {
|
|
8557
|
+
"name": "ProgressBar",
|
|
8558
|
+
"module": "src/progress-bar/ProgressBar.ts"
|
|
8559
|
+
}
|
|
8560
|
+
},
|
|
8561
|
+
{
|
|
8562
|
+
"kind": "custom-element-definition",
|
|
8563
|
+
"name": "nord-progress-bar",
|
|
8564
|
+
"declaration": {
|
|
8565
|
+
"name": "ProgressBar",
|
|
8566
|
+
"module": "src/progress-bar/ProgressBar.ts"
|
|
8567
|
+
}
|
|
8568
|
+
}
|
|
8569
|
+
],
|
|
8570
|
+
"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 show the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n"
|
|
8571
|
+
},
|
|
8572
|
+
{
|
|
8573
|
+
"kind": "javascript-module",
|
|
8574
|
+
"path": "src/qrcode/Qrcode.ts",
|
|
8575
|
+
"declarations": [
|
|
8576
|
+
{
|
|
8577
|
+
"kind": "class",
|
|
8578
|
+
"description": "QR Code component is used for providing information or links\nto users which they can quickly scan with their smartphone.",
|
|
8579
|
+
"name": "Qrcode",
|
|
8580
|
+
"members": [
|
|
8581
|
+
{
|
|
8582
|
+
"kind": "field",
|
|
8583
|
+
"name": "canvas",
|
|
8584
|
+
"type": {
|
|
8585
|
+
"text": "HTMLElement"
|
|
8586
|
+
},
|
|
8232
8587
|
"privacy": "private"
|
|
8233
8588
|
},
|
|
8234
8589
|
{
|
|
@@ -8400,238 +8755,85 @@
|
|
|
8400
8755
|
},
|
|
8401
8756
|
{
|
|
8402
8757
|
"kind": "javascript-module",
|
|
8403
|
-
"path": "src/
|
|
8758
|
+
"path": "src/radio/Radio.ts",
|
|
8404
8759
|
"declarations": [
|
|
8405
8760
|
{
|
|
8406
8761
|
"kind": "class",
|
|
8407
|
-
"description": "
|
|
8408
|
-
"name": "
|
|
8762
|
+
"description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
|
|
8763
|
+
"name": "Radio",
|
|
8764
|
+
"slots": [
|
|
8765
|
+
{
|
|
8766
|
+
"description": "Use when a label requires more than plain text.",
|
|
8767
|
+
"name": "label"
|
|
8768
|
+
},
|
|
8769
|
+
{
|
|
8770
|
+
"description": "Optional slot that holds hint text for the input.",
|
|
8771
|
+
"name": "hint"
|
|
8772
|
+
},
|
|
8773
|
+
{
|
|
8774
|
+
"description": "Optional slot that holds error text for the input.",
|
|
8775
|
+
"name": "error"
|
|
8776
|
+
}
|
|
8777
|
+
],
|
|
8409
8778
|
"members": [
|
|
8410
8779
|
{
|
|
8411
8780
|
"kind": "field",
|
|
8412
|
-
"name": "
|
|
8781
|
+
"name": "inputId",
|
|
8413
8782
|
"type": {
|
|
8414
|
-
"text": "
|
|
8783
|
+
"text": "string"
|
|
8415
8784
|
},
|
|
8416
|
-
"
|
|
8417
|
-
"
|
|
8418
|
-
"
|
|
8785
|
+
"privacy": "protected",
|
|
8786
|
+
"default": "\"input\"",
|
|
8787
|
+
"inheritedFrom": {
|
|
8788
|
+
"name": "FormAssociatedMixin",
|
|
8789
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8790
|
+
}
|
|
8419
8791
|
},
|
|
8420
8792
|
{
|
|
8421
8793
|
"kind": "field",
|
|
8422
|
-
"name": "
|
|
8794
|
+
"name": "hintId",
|
|
8423
8795
|
"type": {
|
|
8424
|
-
"text": "
|
|
8796
|
+
"text": "string"
|
|
8425
8797
|
},
|
|
8426
|
-
"
|
|
8427
|
-
"
|
|
8428
|
-
"
|
|
8429
|
-
|
|
8798
|
+
"privacy": "protected",
|
|
8799
|
+
"default": "\"hint\"",
|
|
8800
|
+
"inheritedFrom": {
|
|
8801
|
+
"name": "FormAssociatedMixin",
|
|
8802
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8803
|
+
}
|
|
8430
8804
|
},
|
|
8431
8805
|
{
|
|
8432
8806
|
"kind": "field",
|
|
8433
|
-
"name": "
|
|
8807
|
+
"name": "errorId",
|
|
8434
8808
|
"type": {
|
|
8435
8809
|
"text": "string"
|
|
8436
8810
|
},
|
|
8437
|
-
"
|
|
8438
|
-
"
|
|
8439
|
-
"
|
|
8440
|
-
|
|
8811
|
+
"privacy": "protected",
|
|
8812
|
+
"default": "\"error\"",
|
|
8813
|
+
"inheritedFrom": {
|
|
8814
|
+
"name": "FormAssociatedMixin",
|
|
8815
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8816
|
+
}
|
|
8441
8817
|
},
|
|
8442
8818
|
{
|
|
8443
8819
|
"kind": "field",
|
|
8444
|
-
"name": "
|
|
8820
|
+
"name": "hintSlot",
|
|
8445
8821
|
"privacy": "protected",
|
|
8822
|
+
"default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
|
|
8823
|
+
"description": "For accessibility reasons, we render some parts of the component to the light DOM.",
|
|
8446
8824
|
"inheritedFrom": {
|
|
8447
|
-
"name": "
|
|
8448
|
-
"module": "src/common/mixins/
|
|
8825
|
+
"name": "FormAssociatedMixin",
|
|
8826
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8449
8827
|
}
|
|
8450
8828
|
},
|
|
8451
8829
|
{
|
|
8452
|
-
"kind": "
|
|
8453
|
-
"name": "
|
|
8454
|
-
"
|
|
8455
|
-
|
|
8456
|
-
"name": "options",
|
|
8457
|
-
"optional": true,
|
|
8458
|
-
"type": {
|
|
8459
|
-
"text": "FocusOptions"
|
|
8460
|
-
},
|
|
8461
|
-
"description": "An object which controls aspects of the focusing process."
|
|
8462
|
-
}
|
|
8463
|
-
],
|
|
8464
|
-
"description": "Programmatically move focus to the component.",
|
|
8830
|
+
"kind": "field",
|
|
8831
|
+
"name": "labelSlot",
|
|
8832
|
+
"privacy": "protected",
|
|
8833
|
+
"default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
|
|
8465
8834
|
"inheritedFrom": {
|
|
8466
|
-
"name": "
|
|
8467
|
-
"module": "src/common/mixins/
|
|
8468
|
-
}
|
|
8469
|
-
},
|
|
8470
|
-
{
|
|
8471
|
-
"kind": "method",
|
|
8472
|
-
"name": "blur",
|
|
8473
|
-
"description": "Programmatically remove focus from the component.",
|
|
8474
|
-
"inheritedFrom": {
|
|
8475
|
-
"name": "FocusableMixin",
|
|
8476
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8477
|
-
}
|
|
8478
|
-
},
|
|
8479
|
-
{
|
|
8480
|
-
"kind": "method",
|
|
8481
|
-
"name": "click",
|
|
8482
|
-
"description": "Programmatically simulates a click on the component.",
|
|
8483
|
-
"inheritedFrom": {
|
|
8484
|
-
"name": "FocusableMixin",
|
|
8485
|
-
"module": "src/common/mixins/FocusableMixin.ts"
|
|
8486
|
-
}
|
|
8487
|
-
}
|
|
8488
|
-
],
|
|
8489
|
-
"attributes": [
|
|
8490
|
-
{
|
|
8491
|
-
"name": "value",
|
|
8492
|
-
"type": {
|
|
8493
|
-
"text": "number | undefined"
|
|
8494
|
-
},
|
|
8495
|
-
"description": "Specifies how much of the task has been completed. Must be a valid floating\npoint number between 0 and max, or between 0 and 100 if max is omitted. If\nthere is no value, the progress bar is indeterminate; this indicates that\nan activity is ongoing with no indication of how long it’s expected to take.",
|
|
8496
|
-
"fieldName": "value"
|
|
8497
|
-
},
|
|
8498
|
-
{
|
|
8499
|
-
"name": "max",
|
|
8500
|
-
"type": {
|
|
8501
|
-
"text": "number"
|
|
8502
|
-
},
|
|
8503
|
-
"default": "100",
|
|
8504
|
-
"description": "Describes how much work the task indicated by the progress element requires.\nThe max attribute, if present, must have a value greater than 0 and be a\nvalid floating point number.",
|
|
8505
|
-
"fieldName": "max"
|
|
8506
|
-
},
|
|
8507
|
-
{
|
|
8508
|
-
"name": "label",
|
|
8509
|
-
"type": {
|
|
8510
|
-
"text": "string"
|
|
8511
|
-
},
|
|
8512
|
-
"default": "\"Current progress\"",
|
|
8513
|
-
"description": "Accessible label for the progress indicator. Visually hidden, but shown\nfor assistive technology.",
|
|
8514
|
-
"fieldName": "label"
|
|
8515
|
-
}
|
|
8516
|
-
],
|
|
8517
|
-
"mixins": [
|
|
8518
|
-
{
|
|
8519
|
-
"name": "FocusableMixin",
|
|
8520
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
8521
|
-
}
|
|
8522
|
-
],
|
|
8523
|
-
"superclass": {
|
|
8524
|
-
"name": "LitElement",
|
|
8525
|
-
"package": "lit"
|
|
8526
|
-
},
|
|
8527
|
-
"status": "ready",
|
|
8528
|
-
"category": "feedback",
|
|
8529
|
-
"displayName": null,
|
|
8530
|
-
"tagName": "nord-progress-bar",
|
|
8531
|
-
"customElement": true
|
|
8532
|
-
}
|
|
8533
|
-
],
|
|
8534
|
-
"exports": [
|
|
8535
|
-
{
|
|
8536
|
-
"kind": "js",
|
|
8537
|
-
"name": "default",
|
|
8538
|
-
"declaration": {
|
|
8539
|
-
"name": "ProgressBar",
|
|
8540
|
-
"module": "src/progress-bar/ProgressBar.ts"
|
|
8541
|
-
}
|
|
8542
|
-
},
|
|
8543
|
-
{
|
|
8544
|
-
"kind": "custom-element-definition",
|
|
8545
|
-
"name": "nord-progress-bar",
|
|
8546
|
-
"declaration": {
|
|
8547
|
-
"name": "ProgressBar",
|
|
8548
|
-
"module": "src/progress-bar/ProgressBar.ts"
|
|
8549
|
-
}
|
|
8550
|
-
}
|
|
8551
|
-
],
|
|
8552
|
-
"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 show the completion status of an ongoing task.\n- Use progress bar when you can determine the percentage of the completed task at any time.\n- Always provide an accessible label when using Progress Bar.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use in constrained spaces indicating indeterminate loading state, see [Spinner](/components/spinner/) instead.\n\n</div>\n"
|
|
8553
|
-
},
|
|
8554
|
-
{
|
|
8555
|
-
"kind": "javascript-module",
|
|
8556
|
-
"path": "src/radio/Radio.ts",
|
|
8557
|
-
"declarations": [
|
|
8558
|
-
{
|
|
8559
|
-
"kind": "class",
|
|
8560
|
-
"description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
|
|
8561
|
-
"name": "Radio",
|
|
8562
|
-
"slots": [
|
|
8563
|
-
{
|
|
8564
|
-
"description": "Use when a label requires more than plain text.",
|
|
8565
|
-
"name": "label"
|
|
8566
|
-
},
|
|
8567
|
-
{
|
|
8568
|
-
"description": "Optional slot that holds hint text for the input.",
|
|
8569
|
-
"name": "hint"
|
|
8570
|
-
},
|
|
8571
|
-
{
|
|
8572
|
-
"description": "Optional slot that holds error text for the input.",
|
|
8573
|
-
"name": "error"
|
|
8574
|
-
}
|
|
8575
|
-
],
|
|
8576
|
-
"members": [
|
|
8577
|
-
{
|
|
8578
|
-
"kind": "field",
|
|
8579
|
-
"name": "inputId",
|
|
8580
|
-
"type": {
|
|
8581
|
-
"text": "string"
|
|
8582
|
-
},
|
|
8583
|
-
"privacy": "protected",
|
|
8584
|
-
"default": "\"input\"",
|
|
8585
|
-
"inheritedFrom": {
|
|
8586
|
-
"name": "FormAssociatedMixin",
|
|
8587
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8588
|
-
}
|
|
8589
|
-
},
|
|
8590
|
-
{
|
|
8591
|
-
"kind": "field",
|
|
8592
|
-
"name": "hintId",
|
|
8593
|
-
"type": {
|
|
8594
|
-
"text": "string"
|
|
8595
|
-
},
|
|
8596
|
-
"privacy": "protected",
|
|
8597
|
-
"default": "\"hint\"",
|
|
8598
|
-
"inheritedFrom": {
|
|
8599
|
-
"name": "FormAssociatedMixin",
|
|
8600
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8601
|
-
}
|
|
8602
|
-
},
|
|
8603
|
-
{
|
|
8604
|
-
"kind": "field",
|
|
8605
|
-
"name": "errorId",
|
|
8606
|
-
"type": {
|
|
8607
|
-
"text": "string"
|
|
8608
|
-
},
|
|
8609
|
-
"privacy": "protected",
|
|
8610
|
-
"default": "\"error\"",
|
|
8611
|
-
"inheritedFrom": {
|
|
8612
|
-
"name": "FormAssociatedMixin",
|
|
8613
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8614
|
-
}
|
|
8615
|
-
},
|
|
8616
|
-
{
|
|
8617
|
-
"kind": "field",
|
|
8618
|
-
"name": "hintSlot",
|
|
8619
|
-
"privacy": "protected",
|
|
8620
|
-
"default": "new LightSlotController(this, {\n slotName: \"hint\",\n render: () => (this.hint ? html`<div slot=\"hint-internal\" id=${this.hintId}>${this.hint}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
|
|
8621
|
-
"description": "For accessibility reasons, we render some parts of the component to the light DOM.",
|
|
8622
|
-
"inheritedFrom": {
|
|
8623
|
-
"name": "FormAssociatedMixin",
|
|
8624
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8625
|
-
}
|
|
8626
|
-
},
|
|
8627
|
-
{
|
|
8628
|
-
"kind": "field",
|
|
8629
|
-
"name": "labelSlot",
|
|
8630
|
-
"privacy": "protected",
|
|
8631
|
-
"default": "new LightSlotController(this, {\n slotName: \"label\",\n render: () => (this.label ? html`<label slot=\"label-internal\" for=${this.inputId}>${this.label}</label>` : nothing),\n syncLightDom: element => {\n if (!isLabel(element)) {\n // eslint-disable-next-line no-console\n console.warn(`NORD: Only <label> elements should be placed in radio's \"label\" slot`)\n } else {\n element.htmlFor = this.inputId\n }\n },\n })",
|
|
8632
|
-
"inheritedFrom": {
|
|
8633
|
-
"name": "FormAssociatedMixin",
|
|
8634
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8835
|
+
"name": "FormAssociatedMixin",
|
|
8836
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
8635
8837
|
}
|
|
8636
8838
|
},
|
|
8637
8839
|
{
|
|
@@ -9840,6 +10042,23 @@
|
|
|
9840
10042
|
"kind": "class",
|
|
9841
10043
|
"description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
|
|
9842
10044
|
"name": "Skeleton",
|
|
10045
|
+
"cssProperties": [
|
|
10046
|
+
{
|
|
10047
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10048
|
+
"name": "--n-skeleton-border-radius",
|
|
10049
|
+
"default": "var(--n-border-radius)"
|
|
10050
|
+
},
|
|
10051
|
+
{
|
|
10052
|
+
"description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10053
|
+
"name": "--n-skeleton-color",
|
|
10054
|
+
"default": "var(--n-color-border)"
|
|
10055
|
+
},
|
|
10056
|
+
{
|
|
10057
|
+
"description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10058
|
+
"name": "--n-skeleton-sheen-color",
|
|
10059
|
+
"default": "var(--n-color-border-strong)"
|
|
10060
|
+
}
|
|
10061
|
+
],
|
|
9843
10062
|
"members": [
|
|
9844
10063
|
{
|
|
9845
10064
|
"kind": "field",
|
|
@@ -9850,20 +10069,6 @@
|
|
|
9850
10069
|
"default": "\"none\"",
|
|
9851
10070
|
"description": "Determines which animation effect the skeleton will use.",
|
|
9852
10071
|
"attribute": "effect"
|
|
9853
|
-
},
|
|
9854
|
-
{
|
|
9855
|
-
"kind": "field",
|
|
9856
|
-
"name": "_warningLogged",
|
|
9857
|
-
"type": {
|
|
9858
|
-
"text": "boolean"
|
|
9859
|
-
},
|
|
9860
|
-
"privacy": "private",
|
|
9861
|
-
"static": true,
|
|
9862
|
-
"default": "false",
|
|
9863
|
-
"inheritedFrom": {
|
|
9864
|
-
"name": "DraftComponentMixin",
|
|
9865
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
9866
|
-
}
|
|
9867
10072
|
}
|
|
9868
10073
|
],
|
|
9869
10074
|
"attributes": [
|
|
@@ -9877,17 +10082,11 @@
|
|
|
9877
10082
|
"fieldName": "effect"
|
|
9878
10083
|
}
|
|
9879
10084
|
],
|
|
9880
|
-
"mixins": [
|
|
9881
|
-
{
|
|
9882
|
-
"name": "DraftComponentMixin",
|
|
9883
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
9884
|
-
}
|
|
9885
|
-
],
|
|
9886
10085
|
"superclass": {
|
|
9887
10086
|
"name": "LitElement",
|
|
9888
10087
|
"package": "lit"
|
|
9889
10088
|
},
|
|
9890
|
-
"status": "
|
|
10089
|
+
"status": "new",
|
|
9891
10090
|
"category": "feedback",
|
|
9892
10091
|
"displayName": null,
|
|
9893
10092
|
"tagName": "nord-skeleton",
|
|
@@ -10021,6 +10220,13 @@
|
|
|
10021
10220
|
"kind": "class",
|
|
10022
10221
|
"description": "Stack component manages layout of immediate children along the\nvertical or horizontal axis with optional spacing between each child.",
|
|
10023
10222
|
"name": "Stack",
|
|
10223
|
+
"cssProperties": [
|
|
10224
|
+
{
|
|
10225
|
+
"description": "Controls the spacing between items, using our [spacing tokens](/tokens/#space).",
|
|
10226
|
+
"name": "--n-stack-gap",
|
|
10227
|
+
"default": "var(--n-space-m)"
|
|
10228
|
+
}
|
|
10229
|
+
],
|
|
10024
10230
|
"slots": [
|
|
10025
10231
|
{
|
|
10026
10232
|
"description": "The stack content.",
|
|
@@ -10190,6 +10396,18 @@
|
|
|
10190
10396
|
"kind": "class",
|
|
10191
10397
|
"description": "The interactive tab button for use within the tab group component.",
|
|
10192
10398
|
"name": "Tab",
|
|
10399
|
+
"cssProperties": [
|
|
10400
|
+
{
|
|
10401
|
+
"description": "Controls the text color of the tab, using our [color tokens](/tokens/#color).",
|
|
10402
|
+
"name": "--n-tab-color",
|
|
10403
|
+
"default": "var(--n-color-text-weak)"
|
|
10404
|
+
},
|
|
10405
|
+
{
|
|
10406
|
+
"description": "Controls the font weight of the tab, using our [font tokens](/tokens/#font).",
|
|
10407
|
+
"name": "--n-tab-font-weight",
|
|
10408
|
+
"default": "var(--n-font-weight)"
|
|
10409
|
+
}
|
|
10410
|
+
],
|
|
10193
10411
|
"slots": [
|
|
10194
10412
|
{
|
|
10195
10413
|
"description": "The tab button content.",
|
|
@@ -10271,6 +10489,13 @@
|
|
|
10271
10489
|
"kind": "class",
|
|
10272
10490
|
"description": "Tab Group allows multiple panels to be contained within a single window,\nusing tabs as a navigational element.",
|
|
10273
10491
|
"name": "TabGroup",
|
|
10492
|
+
"cssProperties": [
|
|
10493
|
+
{
|
|
10494
|
+
"description": "Controls the padding around the tab group (including the tab list), using our [spacing tokens](/tokens/#space).",
|
|
10495
|
+
"name": "--n-tab-group-padding",
|
|
10496
|
+
"default": "0"
|
|
10497
|
+
}
|
|
10498
|
+
],
|
|
10274
10499
|
"slots": [
|
|
10275
10500
|
{
|
|
10276
10501
|
"description": "The element which contains the content to be revealed.",
|
|
@@ -10551,6 +10776,18 @@
|
|
|
10551
10776
|
"kind": "class",
|
|
10552
10777
|
"description": "Table is used to organize and display information from a data set.\nProvides table styles in addition to features like sticky\nheaders and support for narrow viewports.",
|
|
10553
10778
|
"name": "Table",
|
|
10779
|
+
"cssProperties": [
|
|
10780
|
+
{
|
|
10781
|
+
"description": "Controls the padding around the table cells.",
|
|
10782
|
+
"name": "--n-table-td-padding",
|
|
10783
|
+
"default": "calc(var(--n-space-m) * 0.95)"
|
|
10784
|
+
},
|
|
10785
|
+
{
|
|
10786
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10787
|
+
"name": "--n-table-border-radius",
|
|
10788
|
+
"default": "var(--n-border-radius-s)"
|
|
10789
|
+
}
|
|
10790
|
+
],
|
|
10554
10791
|
"slots": [
|
|
10555
10792
|
{
|
|
10556
10793
|
"description": "Default slot which holds the HTML `<table>` element.",
|
|
@@ -10672,6 +10909,38 @@
|
|
|
10672
10909
|
"kind": "class",
|
|
10673
10910
|
"description": "Textarea is a component that allows user to write text over\nmultiple rows. Used when the expected user input is long.\nFor shorter input, use the Input component.",
|
|
10674
10911
|
"name": "Textarea",
|
|
10912
|
+
"cssProperties": [
|
|
10913
|
+
{
|
|
10914
|
+
"description": "Controls the inline size, or width, of the textarea.",
|
|
10915
|
+
"name": "--n-textarea-inline-size",
|
|
10916
|
+
"default": "240px"
|
|
10917
|
+
},
|
|
10918
|
+
{
|
|
10919
|
+
"description": "Controls the block size, or height, or the textarea.",
|
|
10920
|
+
"name": "--n-textarea-block-size",
|
|
10921
|
+
"default": "76px"
|
|
10922
|
+
},
|
|
10923
|
+
{
|
|
10924
|
+
"description": "Controls the background of the textarea, using our [color tokens](/tokens/#color).",
|
|
10925
|
+
"name": "--n-textarea-background",
|
|
10926
|
+
"default": "var(--n-color-active)"
|
|
10927
|
+
},
|
|
10928
|
+
{
|
|
10929
|
+
"description": "Controls the text color of the textarea, using our [color tokens](/tokens/#color).",
|
|
10930
|
+
"name": "--n-textarea-color",
|
|
10931
|
+
"default": "var(--n-color-text)"
|
|
10932
|
+
},
|
|
10933
|
+
{
|
|
10934
|
+
"description": "Controls the border color of the textarea, using our [color tokens](/tokens/#color).",
|
|
10935
|
+
"name": "--n-textarea-border-color",
|
|
10936
|
+
"default": "var(--n-color-border-strong)"
|
|
10937
|
+
},
|
|
10938
|
+
{
|
|
10939
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10940
|
+
"name": "--n-textarea-border-radius",
|
|
10941
|
+
"default": "var(--n-border-radius-s)"
|
|
10942
|
+
}
|
|
10943
|
+
],
|
|
10675
10944
|
"slots": [
|
|
10676
10945
|
{
|
|
10677
10946
|
"description": "Use when a label requires more than plain text.",
|
|
@@ -11410,20 +11679,6 @@
|
|
|
11410
11679
|
"kind": "method",
|
|
11411
11680
|
"name": "handleAutoDismissChange",
|
|
11412
11681
|
"privacy": "protected"
|
|
11413
|
-
},
|
|
11414
|
-
{
|
|
11415
|
-
"kind": "field",
|
|
11416
|
-
"name": "_warningLogged",
|
|
11417
|
-
"type": {
|
|
11418
|
-
"text": "boolean"
|
|
11419
|
-
},
|
|
11420
|
-
"privacy": "private",
|
|
11421
|
-
"static": true,
|
|
11422
|
-
"default": "false",
|
|
11423
|
-
"inheritedFrom": {
|
|
11424
|
-
"name": "DraftComponentMixin",
|
|
11425
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
11426
|
-
}
|
|
11427
11682
|
}
|
|
11428
11683
|
],
|
|
11429
11684
|
"events": [
|
|
@@ -11455,17 +11710,11 @@
|
|
|
11455
11710
|
"fieldName": "autoDismiss"
|
|
11456
11711
|
}
|
|
11457
11712
|
],
|
|
11458
|
-
"mixins": [
|
|
11459
|
-
{
|
|
11460
|
-
"name": "DraftComponentMixin",
|
|
11461
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
11462
|
-
}
|
|
11463
|
-
],
|
|
11464
11713
|
"superclass": {
|
|
11465
11714
|
"name": "LitElement",
|
|
11466
11715
|
"package": "lit"
|
|
11467
11716
|
},
|
|
11468
|
-
"status": "
|
|
11717
|
+
"status": "new",
|
|
11469
11718
|
"category": "feedback",
|
|
11470
11719
|
"displayName": null,
|
|
11471
11720
|
"tagName": "nord-toast",
|
|
@@ -11533,33 +11782,13 @@
|
|
|
11533
11782
|
"text": ""
|
|
11534
11783
|
}
|
|
11535
11784
|
}
|
|
11536
|
-
},
|
|
11537
|
-
{
|
|
11538
|
-
"kind": "field",
|
|
11539
|
-
"name": "_warningLogged",
|
|
11540
|
-
"type": {
|
|
11541
|
-
"text": "boolean"
|
|
11542
|
-
},
|
|
11543
|
-
"privacy": "private",
|
|
11544
|
-
"static": true,
|
|
11545
|
-
"default": "false",
|
|
11546
|
-
"inheritedFrom": {
|
|
11547
|
-
"name": "DraftComponentMixin",
|
|
11548
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
11549
|
-
}
|
|
11550
|
-
}
|
|
11551
|
-
],
|
|
11552
|
-
"mixins": [
|
|
11553
|
-
{
|
|
11554
|
-
"name": "DraftComponentMixin",
|
|
11555
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
11556
11785
|
}
|
|
11557
11786
|
],
|
|
11558
11787
|
"superclass": {
|
|
11559
11788
|
"name": "LitElement",
|
|
11560
11789
|
"package": "lit"
|
|
11561
11790
|
},
|
|
11562
|
-
"status": "
|
|
11791
|
+
"status": "new",
|
|
11563
11792
|
"category": "feedback",
|
|
11564
11793
|
"displayName": null,
|
|
11565
11794
|
"tagName": "nord-toast-group",
|
|
@@ -11588,11 +11817,265 @@
|
|
|
11588
11817
|
},
|
|
11589
11818
|
{
|
|
11590
11819
|
"kind": "javascript-module",
|
|
11591
|
-
"path": "src/
|
|
11820
|
+
"path": "src/tooltip/Tooltip.ts",
|
|
11592
11821
|
"declarations": [
|
|
11593
11822
|
{
|
|
11594
11823
|
"kind": "class",
|
|
11595
|
-
"description": "
|
|
11824
|
+
"description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
|
|
11825
|
+
"name": "Tooltip",
|
|
11826
|
+
"slots": [
|
|
11827
|
+
{
|
|
11828
|
+
"description": "The tooltip content",
|
|
11829
|
+
"name": ""
|
|
11830
|
+
},
|
|
11831
|
+
{
|
|
11832
|
+
"description": "Optional slot that holds shortcut keys to access the subject",
|
|
11833
|
+
"name": "shortcut"
|
|
11834
|
+
}
|
|
11835
|
+
],
|
|
11836
|
+
"members": [
|
|
11837
|
+
{
|
|
11838
|
+
"kind": "field",
|
|
11839
|
+
"name": "lastOpened",
|
|
11840
|
+
"type": {
|
|
11841
|
+
"text": "Tooltip | undefined"
|
|
11842
|
+
},
|
|
11843
|
+
"privacy": "private",
|
|
11844
|
+
"static": true
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
"kind": "field",
|
|
11848
|
+
"name": "shortcutSlot",
|
|
11849
|
+
"privacy": "private",
|
|
11850
|
+
"default": "new SlotController(this, \"shortcut\")"
|
|
11851
|
+
},
|
|
11852
|
+
{
|
|
11853
|
+
"kind": "field",
|
|
11854
|
+
"name": "events",
|
|
11855
|
+
"privacy": "private",
|
|
11856
|
+
"default": "new EventController(this)"
|
|
11857
|
+
},
|
|
11858
|
+
{
|
|
11859
|
+
"kind": "field",
|
|
11860
|
+
"name": "currentElement",
|
|
11861
|
+
"type": {
|
|
11862
|
+
"text": "FocusableElement | undefined"
|
|
11863
|
+
},
|
|
11864
|
+
"privacy": "private"
|
|
11865
|
+
},
|
|
11866
|
+
{
|
|
11867
|
+
"kind": "field",
|
|
11868
|
+
"name": "timeoutId",
|
|
11869
|
+
"type": {
|
|
11870
|
+
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
11871
|
+
},
|
|
11872
|
+
"privacy": "private"
|
|
11873
|
+
},
|
|
11874
|
+
{
|
|
11875
|
+
"kind": "field",
|
|
11876
|
+
"name": "proxy",
|
|
11877
|
+
"privacy": "private",
|
|
11878
|
+
"description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
|
|
11879
|
+
},
|
|
11880
|
+
{
|
|
11881
|
+
"kind": "field",
|
|
11882
|
+
"name": "state",
|
|
11883
|
+
"type": {
|
|
11884
|
+
"text": "TooltipStates"
|
|
11885
|
+
},
|
|
11886
|
+
"privacy": "private",
|
|
11887
|
+
"default": "\"hidden\"",
|
|
11888
|
+
"description": "The current state of the tooltip, dependent on the state machine"
|
|
11889
|
+
},
|
|
11890
|
+
{
|
|
11891
|
+
"kind": "field",
|
|
11892
|
+
"name": "coords",
|
|
11893
|
+
"type": {
|
|
11894
|
+
"text": "[number, number]"
|
|
11895
|
+
},
|
|
11896
|
+
"privacy": "private",
|
|
11897
|
+
"default": "[0, 0]"
|
|
11898
|
+
},
|
|
11899
|
+
{
|
|
11900
|
+
"kind": "field",
|
|
11901
|
+
"name": "position",
|
|
11902
|
+
"type": {
|
|
11903
|
+
"text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
|
|
11904
|
+
},
|
|
11905
|
+
"default": "\"block-start\"",
|
|
11906
|
+
"description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
|
|
11907
|
+
"attribute": "position",
|
|
11908
|
+
"reflects": true
|
|
11909
|
+
},
|
|
11910
|
+
{
|
|
11911
|
+
"kind": "field",
|
|
11912
|
+
"name": "role",
|
|
11913
|
+
"type": {
|
|
11914
|
+
"text": "string"
|
|
11915
|
+
},
|
|
11916
|
+
"default": "\"tooltip\"",
|
|
11917
|
+
"description": "The tooltip role, set on the component by default.",
|
|
11918
|
+
"attribute": "role",
|
|
11919
|
+
"reflects": true
|
|
11920
|
+
},
|
|
11921
|
+
{
|
|
11922
|
+
"kind": "field",
|
|
11923
|
+
"name": "id",
|
|
11924
|
+
"type": {
|
|
11925
|
+
"text": "string"
|
|
11926
|
+
},
|
|
11927
|
+
"default": "\"\"",
|
|
11928
|
+
"description": "The id for the active element to reference via aria-describedby.",
|
|
11929
|
+
"attribute": "id",
|
|
11930
|
+
"reflects": true
|
|
11931
|
+
},
|
|
11932
|
+
{
|
|
11933
|
+
"kind": "field",
|
|
11934
|
+
"name": "delay",
|
|
11935
|
+
"type": {
|
|
11936
|
+
"text": "number"
|
|
11937
|
+
},
|
|
11938
|
+
"default": "500",
|
|
11939
|
+
"description": "The delay in milliseconds before the tooltip is opened.",
|
|
11940
|
+
"attribute": "delay",
|
|
11941
|
+
"reflects": true
|
|
11942
|
+
},
|
|
11943
|
+
{
|
|
11944
|
+
"kind": "method",
|
|
11945
|
+
"name": "handleIdChange",
|
|
11946
|
+
"privacy": "protected"
|
|
11947
|
+
},
|
|
11948
|
+
{
|
|
11949
|
+
"kind": "method",
|
|
11950
|
+
"name": "handleStateChange",
|
|
11951
|
+
"privacy": "private",
|
|
11952
|
+
"parameters": [
|
|
11953
|
+
{
|
|
11954
|
+
"name": "prevState",
|
|
11955
|
+
"type": {
|
|
11956
|
+
"text": "TooltipStates"
|
|
11957
|
+
}
|
|
11958
|
+
}
|
|
11959
|
+
]
|
|
11960
|
+
},
|
|
11961
|
+
{
|
|
11962
|
+
"kind": "field",
|
|
11963
|
+
"name": "updatePosition",
|
|
11964
|
+
"privacy": "private",
|
|
11965
|
+
"description": "Setting and updating the position of the tooltip"
|
|
11966
|
+
},
|
|
11967
|
+
{
|
|
11968
|
+
"kind": "field",
|
|
11969
|
+
"name": "hideTooltip",
|
|
11970
|
+
"privacy": "private"
|
|
11971
|
+
},
|
|
11972
|
+
{
|
|
11973
|
+
"kind": "field",
|
|
11974
|
+
"name": "reposition",
|
|
11975
|
+
"privacy": "private"
|
|
11976
|
+
},
|
|
11977
|
+
{
|
|
11978
|
+
"kind": "field",
|
|
11979
|
+
"name": "handleShow",
|
|
11980
|
+
"privacy": "private"
|
|
11981
|
+
},
|
|
11982
|
+
{
|
|
11983
|
+
"kind": "field",
|
|
11984
|
+
"name": "handleHide",
|
|
11985
|
+
"privacy": "private"
|
|
11986
|
+
},
|
|
11987
|
+
{
|
|
11988
|
+
"kind": "field",
|
|
11989
|
+
"name": "hideOnEscape",
|
|
11990
|
+
"privacy": "private"
|
|
11991
|
+
},
|
|
11992
|
+
{
|
|
11993
|
+
"kind": "field",
|
|
11994
|
+
"name": "addDescribedBy",
|
|
11995
|
+
"privacy": "private"
|
|
11996
|
+
},
|
|
11997
|
+
{
|
|
11998
|
+
"kind": "field",
|
|
11999
|
+
"name": "removeDescribedBy",
|
|
12000
|
+
"privacy": "private"
|
|
12001
|
+
}
|
|
12002
|
+
],
|
|
12003
|
+
"attributes": [
|
|
12004
|
+
{
|
|
12005
|
+
"name": "position",
|
|
12006
|
+
"type": {
|
|
12007
|
+
"text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
|
|
12008
|
+
},
|
|
12009
|
+
"default": "\"block-start\"",
|
|
12010
|
+
"description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
|
|
12011
|
+
"fieldName": "position"
|
|
12012
|
+
},
|
|
12013
|
+
{
|
|
12014
|
+
"name": "role",
|
|
12015
|
+
"type": {
|
|
12016
|
+
"text": "string"
|
|
12017
|
+
},
|
|
12018
|
+
"default": "\"tooltip\"",
|
|
12019
|
+
"description": "The tooltip role, set on the component by default.",
|
|
12020
|
+
"fieldName": "role"
|
|
12021
|
+
},
|
|
12022
|
+
{
|
|
12023
|
+
"name": "id",
|
|
12024
|
+
"type": {
|
|
12025
|
+
"text": "string"
|
|
12026
|
+
},
|
|
12027
|
+
"default": "\"\"",
|
|
12028
|
+
"description": "The id for the active element to reference via aria-describedby.",
|
|
12029
|
+
"fieldName": "id"
|
|
12030
|
+
},
|
|
12031
|
+
{
|
|
12032
|
+
"name": "delay",
|
|
12033
|
+
"type": {
|
|
12034
|
+
"text": "number"
|
|
12035
|
+
},
|
|
12036
|
+
"default": "500",
|
|
12037
|
+
"description": "The delay in milliseconds before the tooltip is opened.",
|
|
12038
|
+
"fieldName": "delay"
|
|
12039
|
+
}
|
|
12040
|
+
],
|
|
12041
|
+
"superclass": {
|
|
12042
|
+
"name": "LitElement",
|
|
12043
|
+
"package": "lit"
|
|
12044
|
+
},
|
|
12045
|
+
"status": "ready",
|
|
12046
|
+
"category": "overlay",
|
|
12047
|
+
"displayName": null,
|
|
12048
|
+
"tagName": "nord-tooltip",
|
|
12049
|
+
"customElement": true
|
|
12050
|
+
}
|
|
12051
|
+
],
|
|
12052
|
+
"exports": [
|
|
12053
|
+
{
|
|
12054
|
+
"kind": "js",
|
|
12055
|
+
"name": "default",
|
|
12056
|
+
"declaration": {
|
|
12057
|
+
"name": "Tooltip",
|
|
12058
|
+
"module": "src/tooltip/Tooltip.ts"
|
|
12059
|
+
}
|
|
12060
|
+
},
|
|
12061
|
+
{
|
|
12062
|
+
"kind": "custom-element-definition",
|
|
12063
|
+
"name": "nord-tooltip",
|
|
12064
|
+
"declaration": {
|
|
12065
|
+
"name": "Tooltip",
|
|
12066
|
+
"module": "src/tooltip/Tooltip.ts"
|
|
12067
|
+
}
|
|
12068
|
+
}
|
|
12069
|
+
],
|
|
12070
|
+
"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 a tooltip if an interactive element requires more explanation.\n- Use a tooltip to provide additional information, such as UI shortcuts.\n- Use the `label` attribute on icons used for shortcuts for accessibility.\n- Use clear and accurate phrasing.\n- Be consistent with positioning of tooltips in the user interface.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use interactive elements such as links or buttons inside a tooltip.\n- Don’t rely on tooltips when you have room to provide more explanation.\n- Don’t depend on tooltips for vital information.\n\n</div>\n\n---\n\n## Content guidelines\n\nTooltips should be clear and informative, but not imperative to using the interface they refer to. They should not contain interactive elements such as buttons or links.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data as a CSV, <u>more information on CSVs</u></div>\n\nTooltips should provide useful information and not repeat information that is already present.\n\n<div class=\"n-usage n-usage-do\">Export – Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export – Export data</div>\n\nWhen writing tooltips, 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\">Export data as a spreadsheet</div>\n<div class=\"n-usage n-usage-dont\">Export Data As a Spreadsheet</div>\n\nUse tooltips sparingly. If your UI is requiring a lot of tooltips, consider revising the interface to provide better explanations and better labelling.\n\n---\n\n## Additional considerations\n\n- Always provide a tooltip for icon-only buttons or a button with an associated keyboard shortcut.\n- Don’t use tooltip to communicate critical information, including errors.\n- Use sparingly. If you’re building something that requires a lot of tooltips, take a step back and work on clarifying the design and the language used instead.\n"
|
|
12071
|
+
},
|
|
12072
|
+
{
|
|
12073
|
+
"kind": "javascript-module",
|
|
12074
|
+
"path": "src/toggle/Toggle.ts",
|
|
12075
|
+
"declarations": [
|
|
12076
|
+
{
|
|
12077
|
+
"kind": "class",
|
|
12078
|
+
"description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
|
|
11596
12079
|
"name": "Toggle",
|
|
11597
12080
|
"slots": [
|
|
11598
12081
|
{
|
|
@@ -12030,419 +12513,165 @@
|
|
|
12030
12513
|
},
|
|
12031
12514
|
{
|
|
12032
12515
|
"name": "label",
|
|
12033
|
-
"type": {
|
|
12034
|
-
"text": "string"
|
|
12035
|
-
},
|
|
12036
|
-
"default": "\"\"",
|
|
12037
|
-
"description": "Label for the input.",
|
|
12038
|
-
"fieldName": "label",
|
|
12039
|
-
"inheritedFrom": {
|
|
12040
|
-
"name": "FormAssociatedMixin",
|
|
12041
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12042
|
-
}
|
|
12043
|
-
},
|
|
12044
|
-
{
|
|
12045
|
-
"name": "hint",
|
|
12046
|
-
"type": {
|
|
12047
|
-
"text": "string | undefined"
|
|
12048
|
-
},
|
|
12049
|
-
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
12050
|
-
"fieldName": "hint",
|
|
12051
|
-
"inheritedFrom": {
|
|
12052
|
-
"name": "FormAssociatedMixin",
|
|
12053
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12054
|
-
}
|
|
12055
|
-
},
|
|
12056
|
-
{
|
|
12057
|
-
"name": "hide-label",
|
|
12058
|
-
"type": {
|
|
12059
|
-
"text": "boolean"
|
|
12060
|
-
},
|
|
12061
|
-
"default": "false",
|
|
12062
|
-
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
12063
|
-
"fieldName": "hideLabel",
|
|
12064
|
-
"inheritedFrom": {
|
|
12065
|
-
"name": "FormAssociatedMixin",
|
|
12066
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12067
|
-
}
|
|
12068
|
-
},
|
|
12069
|
-
{
|
|
12070
|
-
"name": "placeholder",
|
|
12071
|
-
"type": {
|
|
12072
|
-
"text": "string | undefined"
|
|
12073
|
-
},
|
|
12074
|
-
"description": "Placeholder text to display within the input.",
|
|
12075
|
-
"fieldName": "placeholder",
|
|
12076
|
-
"inheritedFrom": {
|
|
12077
|
-
"name": "FormAssociatedMixin",
|
|
12078
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12079
|
-
}
|
|
12080
|
-
},
|
|
12081
|
-
{
|
|
12082
|
-
"name": "error",
|
|
12083
|
-
"type": {
|
|
12084
|
-
"text": "string | undefined"
|
|
12085
|
-
},
|
|
12086
|
-
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
12087
|
-
"fieldName": "error",
|
|
12088
|
-
"inheritedFrom": {
|
|
12089
|
-
"name": "FormAssociatedMixin",
|
|
12090
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12091
|
-
}
|
|
12092
|
-
},
|
|
12093
|
-
{
|
|
12094
|
-
"name": "required",
|
|
12095
|
-
"type": {
|
|
12096
|
-
"text": "boolean"
|
|
12097
|
-
},
|
|
12098
|
-
"default": "false",
|
|
12099
|
-
"description": "Determines whether the input is required or not.\nAn input 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.",
|
|
12100
|
-
"fieldName": "required",
|
|
12101
|
-
"inheritedFrom": {
|
|
12102
|
-
"name": "FormAssociatedMixin",
|
|
12103
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12104
|
-
}
|
|
12105
|
-
},
|
|
12106
|
-
{
|
|
12107
|
-
"name": "disabled",
|
|
12108
|
-
"type": {
|
|
12109
|
-
"text": "boolean"
|
|
12110
|
-
},
|
|
12111
|
-
"default": "false",
|
|
12112
|
-
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
12113
|
-
"fieldName": "disabled",
|
|
12114
|
-
"inheritedFrom": {
|
|
12115
|
-
"name": "InputMixin",
|
|
12116
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12117
|
-
}
|
|
12118
|
-
},
|
|
12119
|
-
{
|
|
12120
|
-
"name": "name",
|
|
12121
|
-
"type": {
|
|
12122
|
-
"text": "string | undefined"
|
|
12123
|
-
},
|
|
12124
|
-
"description": "The name of the form component.",
|
|
12125
|
-
"fieldName": "name",
|
|
12126
|
-
"inheritedFrom": {
|
|
12127
|
-
"name": "InputMixin",
|
|
12128
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12129
|
-
}
|
|
12130
|
-
},
|
|
12131
|
-
{
|
|
12132
|
-
"name": "value",
|
|
12133
|
-
"type": {
|
|
12134
|
-
"text": "string"
|
|
12135
|
-
},
|
|
12136
|
-
"default": "\"\"",
|
|
12137
|
-
"description": "The value of the form component.",
|
|
12138
|
-
"fieldName": "value",
|
|
12139
|
-
"inheritedFrom": {
|
|
12140
|
-
"name": "InputMixin",
|
|
12141
|
-
"module": "src/common/mixins/InputMixin.ts"
|
|
12142
|
-
}
|
|
12143
|
-
}
|
|
12144
|
-
],
|
|
12145
|
-
"mixins": [
|
|
12146
|
-
{
|
|
12147
|
-
"name": "FormAssociatedMixin",
|
|
12148
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
12149
|
-
},
|
|
12150
|
-
{
|
|
12151
|
-
"name": "InputMixin",
|
|
12152
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
12153
|
-
},
|
|
12154
|
-
{
|
|
12155
|
-
"name": "FocusableMixin",
|
|
12156
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
12157
|
-
}
|
|
12158
|
-
],
|
|
12159
|
-
"superclass": {
|
|
12160
|
-
"name": "LitElement",
|
|
12161
|
-
"package": "lit"
|
|
12162
|
-
},
|
|
12163
|
-
"status": "new",
|
|
12164
|
-
"category": "form",
|
|
12165
|
-
"displayName": null,
|
|
12166
|
-
"tagName": "nord-toggle",
|
|
12167
|
-
"customElement": true,
|
|
12168
|
-
"events": [
|
|
12169
|
-
{
|
|
12170
|
-
"name": "input",
|
|
12171
|
-
"type": {
|
|
12172
|
-
"text": "NordEvent"
|
|
12173
|
-
},
|
|
12174
|
-
"description": "Fired as the user types into the input.",
|
|
12175
|
-
"inheritedFrom": {
|
|
12176
|
-
"name": "FormAssociatedMixin",
|
|
12177
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12178
|
-
}
|
|
12179
|
-
},
|
|
12180
|
-
{
|
|
12181
|
-
"name": "change",
|
|
12182
|
-
"type": {
|
|
12183
|
-
"text": "NordEvent"
|
|
12184
|
-
},
|
|
12185
|
-
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
12186
|
-
"inheritedFrom": {
|
|
12187
|
-
"name": "FormAssociatedMixin",
|
|
12188
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12189
|
-
}
|
|
12190
|
-
}
|
|
12191
|
-
]
|
|
12192
|
-
}
|
|
12193
|
-
],
|
|
12194
|
-
"exports": [
|
|
12195
|
-
{
|
|
12196
|
-
"kind": "js",
|
|
12197
|
-
"name": "default",
|
|
12198
|
-
"declaration": {
|
|
12199
|
-
"name": "Toggle",
|
|
12200
|
-
"module": "src/toggle/Toggle.ts"
|
|
12201
|
-
}
|
|
12202
|
-
},
|
|
12203
|
-
{
|
|
12204
|
-
"kind": "custom-element-definition",
|
|
12205
|
-
"name": "nord-toggle",
|
|
12206
|
-
"declaration": {
|
|
12207
|
-
"name": "Toggle",
|
|
12208
|
-
"module": "src/toggle/Toggle.ts"
|
|
12209
|
-
}
|
|
12210
|
-
}
|
|
12211
|
-
],
|
|
12212
|
-
"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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle 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\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</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\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
|
|
12213
|
-
},
|
|
12214
|
-
{
|
|
12215
|
-
"kind": "javascript-module",
|
|
12216
|
-
"path": "src/tooltip/Tooltip.ts",
|
|
12217
|
-
"declarations": [
|
|
12218
|
-
{
|
|
12219
|
-
"kind": "class",
|
|
12220
|
-
"description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
|
|
12221
|
-
"name": "Tooltip",
|
|
12222
|
-
"slots": [
|
|
12223
|
-
{
|
|
12224
|
-
"description": "The tooltip content",
|
|
12225
|
-
"name": ""
|
|
12226
|
-
},
|
|
12227
|
-
{
|
|
12228
|
-
"description": "Optional slot that holds shortcut keys to access the subject",
|
|
12229
|
-
"name": "shortcut"
|
|
12230
|
-
}
|
|
12231
|
-
],
|
|
12232
|
-
"members": [
|
|
12233
|
-
{
|
|
12234
|
-
"kind": "field",
|
|
12235
|
-
"name": "lastOpened",
|
|
12236
|
-
"type": {
|
|
12237
|
-
"text": "Tooltip | undefined"
|
|
12238
|
-
},
|
|
12239
|
-
"privacy": "private",
|
|
12240
|
-
"static": true
|
|
12241
|
-
},
|
|
12242
|
-
{
|
|
12243
|
-
"kind": "field",
|
|
12244
|
-
"name": "shortcutSlot",
|
|
12245
|
-
"privacy": "private",
|
|
12246
|
-
"default": "new SlotController(this, \"shortcut\")"
|
|
12247
|
-
},
|
|
12248
|
-
{
|
|
12249
|
-
"kind": "field",
|
|
12250
|
-
"name": "events",
|
|
12251
|
-
"privacy": "private",
|
|
12252
|
-
"default": "new EventController(this)"
|
|
12253
|
-
},
|
|
12254
|
-
{
|
|
12255
|
-
"kind": "field",
|
|
12256
|
-
"name": "currentElement",
|
|
12257
|
-
"type": {
|
|
12258
|
-
"text": "FocusableElement | undefined"
|
|
12259
|
-
},
|
|
12260
|
-
"privacy": "private"
|
|
12261
|
-
},
|
|
12262
|
-
{
|
|
12263
|
-
"kind": "field",
|
|
12264
|
-
"name": "timeoutId",
|
|
12265
|
-
"type": {
|
|
12266
|
-
"text": "ReturnType<typeof setTimeout> | undefined"
|
|
12267
|
-
},
|
|
12268
|
-
"privacy": "private"
|
|
12269
|
-
},
|
|
12270
|
-
{
|
|
12271
|
-
"kind": "field",
|
|
12272
|
-
"name": "proxy",
|
|
12273
|
-
"privacy": "private",
|
|
12274
|
-
"description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
|
|
12275
|
-
},
|
|
12276
|
-
{
|
|
12277
|
-
"kind": "field",
|
|
12278
|
-
"name": "state",
|
|
12279
|
-
"type": {
|
|
12280
|
-
"text": "TooltipStates"
|
|
12281
|
-
},
|
|
12282
|
-
"privacy": "private",
|
|
12283
|
-
"default": "\"hidden\"",
|
|
12284
|
-
"description": "The current state of the tooltip, dependent on the state machine"
|
|
12285
|
-
},
|
|
12286
|
-
{
|
|
12287
|
-
"kind": "field",
|
|
12288
|
-
"name": "coords",
|
|
12289
|
-
"type": {
|
|
12290
|
-
"text": "[number, number]"
|
|
12291
|
-
},
|
|
12292
|
-
"privacy": "private",
|
|
12293
|
-
"default": "[0, 0]"
|
|
12294
|
-
},
|
|
12295
|
-
{
|
|
12296
|
-
"kind": "field",
|
|
12297
|
-
"name": "position",
|
|
12298
|
-
"type": {
|
|
12299
|
-
"text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
|
|
12300
|
-
},
|
|
12301
|
-
"default": "\"block-start\"",
|
|
12302
|
-
"description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
|
|
12303
|
-
"attribute": "position",
|
|
12304
|
-
"reflects": true
|
|
12305
|
-
},
|
|
12306
|
-
{
|
|
12307
|
-
"kind": "field",
|
|
12308
|
-
"name": "role",
|
|
12309
|
-
"type": {
|
|
12310
|
-
"text": "string"
|
|
12311
|
-
},
|
|
12312
|
-
"default": "\"tooltip\"",
|
|
12313
|
-
"description": "The tooltip role, set on the component by default.",
|
|
12314
|
-
"attribute": "role",
|
|
12315
|
-
"reflects": true
|
|
12316
|
-
},
|
|
12317
|
-
{
|
|
12318
|
-
"kind": "field",
|
|
12319
|
-
"name": "id",
|
|
12320
|
-
"type": {
|
|
12321
|
-
"text": "string"
|
|
12322
|
-
},
|
|
12323
|
-
"default": "\"\"",
|
|
12324
|
-
"description": "The id for the active element to reference via aria-describedby.",
|
|
12325
|
-
"attribute": "id",
|
|
12326
|
-
"reflects": true
|
|
12327
|
-
},
|
|
12328
|
-
{
|
|
12329
|
-
"kind": "field",
|
|
12330
|
-
"name": "delay",
|
|
12331
|
-
"type": {
|
|
12332
|
-
"text": "number"
|
|
12333
|
-
},
|
|
12334
|
-
"default": "500",
|
|
12335
|
-
"description": "The delay in milliseconds before the tooltip is opened.",
|
|
12336
|
-
"attribute": "delay",
|
|
12337
|
-
"reflects": true
|
|
12338
|
-
},
|
|
12339
|
-
{
|
|
12340
|
-
"kind": "method",
|
|
12341
|
-
"name": "handleIdChange",
|
|
12342
|
-
"privacy": "protected"
|
|
12343
|
-
},
|
|
12344
|
-
{
|
|
12345
|
-
"kind": "method",
|
|
12346
|
-
"name": "handleStateChange",
|
|
12347
|
-
"privacy": "private",
|
|
12348
|
-
"parameters": [
|
|
12349
|
-
{
|
|
12350
|
-
"name": "prevState",
|
|
12351
|
-
"type": {
|
|
12352
|
-
"text": "TooltipStates"
|
|
12353
|
-
}
|
|
12354
|
-
}
|
|
12355
|
-
]
|
|
12356
|
-
},
|
|
12357
|
-
{
|
|
12358
|
-
"kind": "field",
|
|
12359
|
-
"name": "updatePosition",
|
|
12360
|
-
"privacy": "private",
|
|
12361
|
-
"description": "Setting and updating the position of the tooltip"
|
|
12362
|
-
},
|
|
12363
|
-
{
|
|
12364
|
-
"kind": "field",
|
|
12365
|
-
"name": "hideTooltip",
|
|
12366
|
-
"privacy": "private"
|
|
12516
|
+
"type": {
|
|
12517
|
+
"text": "string"
|
|
12518
|
+
},
|
|
12519
|
+
"default": "\"\"",
|
|
12520
|
+
"description": "Label for the input.",
|
|
12521
|
+
"fieldName": "label",
|
|
12522
|
+
"inheritedFrom": {
|
|
12523
|
+
"name": "FormAssociatedMixin",
|
|
12524
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12525
|
+
}
|
|
12367
12526
|
},
|
|
12368
12527
|
{
|
|
12369
|
-
"
|
|
12370
|
-
"
|
|
12371
|
-
|
|
12528
|
+
"name": "hint",
|
|
12529
|
+
"type": {
|
|
12530
|
+
"text": "string | undefined"
|
|
12531
|
+
},
|
|
12532
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
12533
|
+
"fieldName": "hint",
|
|
12534
|
+
"inheritedFrom": {
|
|
12535
|
+
"name": "FormAssociatedMixin",
|
|
12536
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12537
|
+
}
|
|
12372
12538
|
},
|
|
12373
12539
|
{
|
|
12374
|
-
"
|
|
12375
|
-
"
|
|
12376
|
-
|
|
12540
|
+
"name": "hide-label",
|
|
12541
|
+
"type": {
|
|
12542
|
+
"text": "boolean"
|
|
12543
|
+
},
|
|
12544
|
+
"default": "false",
|
|
12545
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
12546
|
+
"fieldName": "hideLabel",
|
|
12547
|
+
"inheritedFrom": {
|
|
12548
|
+
"name": "FormAssociatedMixin",
|
|
12549
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12550
|
+
}
|
|
12377
12551
|
},
|
|
12378
12552
|
{
|
|
12379
|
-
"
|
|
12380
|
-
"
|
|
12381
|
-
|
|
12553
|
+
"name": "placeholder",
|
|
12554
|
+
"type": {
|
|
12555
|
+
"text": "string | undefined"
|
|
12556
|
+
},
|
|
12557
|
+
"description": "Placeholder text to display within the input.",
|
|
12558
|
+
"fieldName": "placeholder",
|
|
12559
|
+
"inheritedFrom": {
|
|
12560
|
+
"name": "FormAssociatedMixin",
|
|
12561
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12562
|
+
}
|
|
12382
12563
|
},
|
|
12383
12564
|
{
|
|
12384
|
-
"
|
|
12385
|
-
"
|
|
12386
|
-
|
|
12565
|
+
"name": "error",
|
|
12566
|
+
"type": {
|
|
12567
|
+
"text": "string | undefined"
|
|
12568
|
+
},
|
|
12569
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
12570
|
+
"fieldName": "error",
|
|
12571
|
+
"inheritedFrom": {
|
|
12572
|
+
"name": "FormAssociatedMixin",
|
|
12573
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12574
|
+
}
|
|
12387
12575
|
},
|
|
12388
12576
|
{
|
|
12389
|
-
"
|
|
12390
|
-
"
|
|
12391
|
-
|
|
12577
|
+
"name": "required",
|
|
12578
|
+
"type": {
|
|
12579
|
+
"text": "boolean"
|
|
12580
|
+
},
|
|
12581
|
+
"default": "false",
|
|
12582
|
+
"description": "Determines whether the input is required or not.\nAn input 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.",
|
|
12583
|
+
"fieldName": "required",
|
|
12584
|
+
"inheritedFrom": {
|
|
12585
|
+
"name": "FormAssociatedMixin",
|
|
12586
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12587
|
+
}
|
|
12392
12588
|
},
|
|
12393
12589
|
{
|
|
12394
|
-
"
|
|
12395
|
-
"name": "removeDescribedBy",
|
|
12396
|
-
"privacy": "private"
|
|
12397
|
-
}
|
|
12398
|
-
],
|
|
12399
|
-
"attributes": [
|
|
12400
|
-
{
|
|
12401
|
-
"name": "position",
|
|
12590
|
+
"name": "disabled",
|
|
12402
12591
|
"type": {
|
|
12403
|
-
"text": "
|
|
12592
|
+
"text": "boolean"
|
|
12404
12593
|
},
|
|
12405
|
-
"default": "
|
|
12406
|
-
"description": "
|
|
12407
|
-
"fieldName": "
|
|
12594
|
+
"default": "false",
|
|
12595
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
12596
|
+
"fieldName": "disabled",
|
|
12597
|
+
"inheritedFrom": {
|
|
12598
|
+
"name": "InputMixin",
|
|
12599
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
12600
|
+
}
|
|
12408
12601
|
},
|
|
12409
12602
|
{
|
|
12410
|
-
"name": "
|
|
12603
|
+
"name": "name",
|
|
12411
12604
|
"type": {
|
|
12412
|
-
"text": "string"
|
|
12605
|
+
"text": "string | undefined"
|
|
12413
12606
|
},
|
|
12414
|
-
"
|
|
12415
|
-
"
|
|
12416
|
-
"
|
|
12607
|
+
"description": "The name of the form component.",
|
|
12608
|
+
"fieldName": "name",
|
|
12609
|
+
"inheritedFrom": {
|
|
12610
|
+
"name": "InputMixin",
|
|
12611
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
12612
|
+
}
|
|
12417
12613
|
},
|
|
12418
12614
|
{
|
|
12419
|
-
"name": "
|
|
12615
|
+
"name": "value",
|
|
12420
12616
|
"type": {
|
|
12421
12617
|
"text": "string"
|
|
12422
12618
|
},
|
|
12423
12619
|
"default": "\"\"",
|
|
12424
|
-
"description": "The
|
|
12425
|
-
"fieldName": "
|
|
12620
|
+
"description": "The value of the form component.",
|
|
12621
|
+
"fieldName": "value",
|
|
12622
|
+
"inheritedFrom": {
|
|
12623
|
+
"name": "InputMixin",
|
|
12624
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
12625
|
+
}
|
|
12626
|
+
}
|
|
12627
|
+
],
|
|
12628
|
+
"mixins": [
|
|
12629
|
+
{
|
|
12630
|
+
"name": "FormAssociatedMixin",
|
|
12631
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
12426
12632
|
},
|
|
12427
12633
|
{
|
|
12428
|
-
"name": "
|
|
12429
|
-
"
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
"
|
|
12433
|
-
"
|
|
12434
|
-
"fieldName": "delay"
|
|
12634
|
+
"name": "InputMixin",
|
|
12635
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
12636
|
+
},
|
|
12637
|
+
{
|
|
12638
|
+
"name": "FocusableMixin",
|
|
12639
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
12435
12640
|
}
|
|
12436
12641
|
],
|
|
12437
12642
|
"superclass": {
|
|
12438
12643
|
"name": "LitElement",
|
|
12439
12644
|
"package": "lit"
|
|
12440
12645
|
},
|
|
12441
|
-
"status": "
|
|
12442
|
-
"category": "
|
|
12646
|
+
"status": "new",
|
|
12647
|
+
"category": "form",
|
|
12443
12648
|
"displayName": null,
|
|
12444
|
-
"tagName": "nord-
|
|
12445
|
-
"customElement": true
|
|
12649
|
+
"tagName": "nord-toggle",
|
|
12650
|
+
"customElement": true,
|
|
12651
|
+
"events": [
|
|
12652
|
+
{
|
|
12653
|
+
"name": "input",
|
|
12654
|
+
"type": {
|
|
12655
|
+
"text": "NordEvent"
|
|
12656
|
+
},
|
|
12657
|
+
"description": "Fired as the user types into the input.",
|
|
12658
|
+
"inheritedFrom": {
|
|
12659
|
+
"name": "FormAssociatedMixin",
|
|
12660
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12661
|
+
}
|
|
12662
|
+
},
|
|
12663
|
+
{
|
|
12664
|
+
"name": "change",
|
|
12665
|
+
"type": {
|
|
12666
|
+
"text": "NordEvent"
|
|
12667
|
+
},
|
|
12668
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
12669
|
+
"inheritedFrom": {
|
|
12670
|
+
"name": "FormAssociatedMixin",
|
|
12671
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
12672
|
+
}
|
|
12673
|
+
}
|
|
12674
|
+
]
|
|
12446
12675
|
}
|
|
12447
12676
|
],
|
|
12448
12677
|
"exports": [
|
|
@@ -12450,20 +12679,20 @@
|
|
|
12450
12679
|
"kind": "js",
|
|
12451
12680
|
"name": "default",
|
|
12452
12681
|
"declaration": {
|
|
12453
|
-
"name": "
|
|
12454
|
-
"module": "src/
|
|
12682
|
+
"name": "Toggle",
|
|
12683
|
+
"module": "src/toggle/Toggle.ts"
|
|
12455
12684
|
}
|
|
12456
12685
|
},
|
|
12457
12686
|
{
|
|
12458
12687
|
"kind": "custom-element-definition",
|
|
12459
|
-
"name": "nord-
|
|
12688
|
+
"name": "nord-toggle",
|
|
12460
12689
|
"declaration": {
|
|
12461
|
-
"name": "
|
|
12462
|
-
"module": "src/
|
|
12690
|
+
"name": "Toggle",
|
|
12691
|
+
"module": "src/toggle/Toggle.ts"
|
|
12463
12692
|
}
|
|
12464
12693
|
}
|
|
12465
12694
|
],
|
|
12466
|
-
"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
|
|
12695
|
+
"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 toggles when your intent is to turn something on or off instantly.\n- Use for any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Toggles should never require users to click a button to apply or save the setting.\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle 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\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</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\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
|
|
12467
12696
|
},
|
|
12468
12697
|
{
|
|
12469
12698
|
"kind": "javascript-module",
|
|
@@ -12780,6 +13009,42 @@
|
|
|
12780
13009
|
}
|
|
12781
13010
|
]
|
|
12782
13011
|
},
|
|
13012
|
+
{
|
|
13013
|
+
"kind": "method",
|
|
13014
|
+
"name": "listen",
|
|
13015
|
+
"return": {
|
|
13016
|
+
"type": {
|
|
13017
|
+
"text": "void"
|
|
13018
|
+
}
|
|
13019
|
+
},
|
|
13020
|
+
"parameters": [
|
|
13021
|
+
{
|
|
13022
|
+
"name": "element",
|
|
13023
|
+
"type": {
|
|
13024
|
+
"text": "MediaQueryList"
|
|
13025
|
+
}
|
|
13026
|
+
},
|
|
13027
|
+
{
|
|
13028
|
+
"name": "type",
|
|
13029
|
+
"type": {
|
|
13030
|
+
"text": "K"
|
|
13031
|
+
}
|
|
13032
|
+
},
|
|
13033
|
+
{
|
|
13034
|
+
"name": "listener",
|
|
13035
|
+
"type": {
|
|
13036
|
+
"text": "(this: ShadowRoot, ev: MediaQueryListEventMap[K]) => any"
|
|
13037
|
+
}
|
|
13038
|
+
},
|
|
13039
|
+
{
|
|
13040
|
+
"name": "options",
|
|
13041
|
+
"optional": true,
|
|
13042
|
+
"type": {
|
|
13043
|
+
"text": "boolean | AddEventListenerOptions"
|
|
13044
|
+
}
|
|
13045
|
+
}
|
|
13046
|
+
]
|
|
13047
|
+
},
|
|
12783
13048
|
{
|
|
12784
13049
|
"kind": "method",
|
|
12785
13050
|
"name": "listen",
|
|
@@ -12787,7 +13052,7 @@
|
|
|
12787
13052
|
{
|
|
12788
13053
|
"name": "element",
|
|
12789
13054
|
"type": {
|
|
12790
|
-
"text": "Window | Document | HTMLElement | ShadowRoot"
|
|
13055
|
+
"text": "Window | Document | HTMLElement | ShadowRoot | MediaQueryList"
|
|
12791
13056
|
}
|
|
12792
13057
|
},
|
|
12793
13058
|
{
|
|
@@ -13159,53 +13424,6 @@
|
|
|
13159
13424
|
}
|
|
13160
13425
|
]
|
|
13161
13426
|
},
|
|
13162
|
-
{
|
|
13163
|
-
"kind": "javascript-module",
|
|
13164
|
-
"path": "src/common/controllers/MediaQueryController.ts",
|
|
13165
|
-
"declarations": [
|
|
13166
|
-
{
|
|
13167
|
-
"kind": "class",
|
|
13168
|
-
"description": "",
|
|
13169
|
-
"name": "MediaQueryController",
|
|
13170
|
-
"members": [
|
|
13171
|
-
{
|
|
13172
|
-
"kind": "field",
|
|
13173
|
-
"name": "mq",
|
|
13174
|
-
"type": {
|
|
13175
|
-
"text": "MediaQueryList"
|
|
13176
|
-
},
|
|
13177
|
-
"privacy": "private"
|
|
13178
|
-
},
|
|
13179
|
-
{
|
|
13180
|
-
"kind": "field",
|
|
13181
|
-
"name": "matches"
|
|
13182
|
-
},
|
|
13183
|
-
{
|
|
13184
|
-
"kind": "method",
|
|
13185
|
-
"name": "hostConnected"
|
|
13186
|
-
},
|
|
13187
|
-
{
|
|
13188
|
-
"kind": "method",
|
|
13189
|
-
"name": "hostDisconnected"
|
|
13190
|
-
},
|
|
13191
|
-
{
|
|
13192
|
-
"kind": "field",
|
|
13193
|
-
"name": "handleChange"
|
|
13194
|
-
}
|
|
13195
|
-
]
|
|
13196
|
-
}
|
|
13197
|
-
],
|
|
13198
|
-
"exports": [
|
|
13199
|
-
{
|
|
13200
|
-
"kind": "js",
|
|
13201
|
-
"name": "MediaQueryController",
|
|
13202
|
-
"declaration": {
|
|
13203
|
-
"name": "MediaQueryController",
|
|
13204
|
-
"module": "src/common/controllers/MediaQueryController.ts"
|
|
13205
|
-
}
|
|
13206
|
-
}
|
|
13207
|
-
]
|
|
13208
|
-
},
|
|
13209
13427
|
{
|
|
13210
13428
|
"kind": "javascript-module",
|
|
13211
13429
|
"path": "src/common/controllers/PortalController.ts",
|