@nordhealth/components 1.0.0-alpha.48 → 1.0.0-alpha.51
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 +477 -511
- package/lib/Badge.js +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/Calendar-6f8b8450.js +13 -0
- package/lib/Calendar-6f8b8450.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/CommandMenuAction.js +1 -1
- package/lib/CommandMenuAction.js.map +1 -1
- package/lib/Component-1dcd22f4.js +2 -0
- package/lib/Component-1dcd22f4.js.map +1 -0
- package/lib/DatePicker.js +1 -1
- package/lib/DatePicker.js.map +1 -1
- package/lib/Fieldset.js +1 -1
- package/lib/Fieldset.js.map +1 -1
- package/lib/FormAssociatedMixin-f7acf8b3.js +2 -0
- package/lib/FormAssociatedMixin-f7acf8b3.js.map +1 -0
- package/lib/FormField-8b024c79.js +2 -0
- package/lib/FormField-8b024c79.js.map +1 -0
- 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/{InputMixin-367f0927.js → InputMixin-f2da5fa8.js} +1 -1
- package/lib/InputMixin-f2da5fa8.js.map +1 -0
- package/lib/KeyboardController.js +1 -1
- package/lib/KeyboardController.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/{SlotController-a18e9d36.js → SlotController-5bfc47d1.js} +2 -2
- package/lib/SlotController-5bfc47d1.js.map +1 -0
- 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/Textarea.js +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/badge/Badge.d.ts +2 -2
- package/lib/src/button/Button.d.ts +2 -2
- package/lib/src/calendar/Calendar.d.ts +1 -1
- package/lib/src/card/Card.d.ts +3 -3
- package/lib/src/checkbox/Checkbox.test.d.ts +1 -0
- package/lib/src/command-menu/CommandMenu.d.ts +8 -5
- package/lib/src/command-menu/ICommandMenuAction.d.ts +1 -1
- package/lib/src/common/controllers/SlotController.d.ts +1 -0
- package/lib/src/date-picker/DatePicker.d.ts +1 -1
- package/lib/src/fieldset/Fieldset.d.ts +0 -2
- package/lib/src/header/Header.d.ts +1 -1
- package/lib/src/icon/Icon.d.ts +1 -1
- package/lib/src/spinner/Spinner.d.ts +1 -1
- package/lib/src/stack/Stack.d.ts +1 -1
- package/lib/src/tooltip/Tooltip.d.ts +2 -2
- package/package.json +3 -3
- package/lib/Calendar-6776543a.js +0 -13
- package/lib/Calendar-6776543a.js.map +0 -1
- package/lib/FormAssociatedMixin-b460125c.js +0 -2
- package/lib/FormAssociatedMixin-b460125c.js.map +0 -1
- package/lib/FormField-21cad3fa.js +0 -2
- package/lib/FormField-21cad3fa.js.map +0 -1
- package/lib/InputMixin-367f0927.js.map +0 -1
- package/lib/SlotController-a18e9d36.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
|
|
192
192
|
},
|
|
193
193
|
"default": "\"info\"",
|
|
194
|
-
"description": "The type of badge.\nDetermines the
|
|
194
|
+
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
195
195
|
"attribute": "type",
|
|
196
196
|
"reflects": true
|
|
197
197
|
},
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
|
|
218
218
|
},
|
|
219
219
|
"default": "\"info\"",
|
|
220
|
-
"description": "The type of badge.\nDetermines the
|
|
220
|
+
"description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
|
|
221
221
|
"fieldName": "type"
|
|
222
222
|
}
|
|
223
223
|
],
|
|
@@ -254,7 +254,8 @@
|
|
|
254
254
|
"module": "src/badge/Badge.ts"
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
]
|
|
257
|
+
],
|
|
258
|
+
"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"
|
|
258
259
|
},
|
|
259
260
|
{
|
|
260
261
|
"kind": "javascript-module",
|
|
@@ -329,7 +330,7 @@
|
|
|
329
330
|
"type": {
|
|
330
331
|
"text": "string | undefined"
|
|
331
332
|
},
|
|
332
|
-
"description": "When provided, renders the button as a link,\nwith
|
|
333
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
333
334
|
"attribute": "href",
|
|
334
335
|
"reflects": true
|
|
335
336
|
},
|
|
@@ -382,7 +383,7 @@
|
|
|
382
383
|
"text": "boolean"
|
|
383
384
|
},
|
|
384
385
|
"default": "false",
|
|
385
|
-
"description": "Makes the
|
|
386
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
386
387
|
"attribute": "disabled",
|
|
387
388
|
"reflects": true,
|
|
388
389
|
"inheritedFrom": {
|
|
@@ -396,7 +397,7 @@
|
|
|
396
397
|
"type": {
|
|
397
398
|
"text": "string | undefined"
|
|
398
399
|
},
|
|
399
|
-
"description": "The name of the
|
|
400
|
+
"description": "The name of the form component.",
|
|
400
401
|
"attribute": "name",
|
|
401
402
|
"inheritedFrom": {
|
|
402
403
|
"name": "InputMixin",
|
|
@@ -410,7 +411,7 @@
|
|
|
410
411
|
"text": "string"
|
|
411
412
|
},
|
|
412
413
|
"default": "\"\"",
|
|
413
|
-
"description": "The value of the
|
|
414
|
+
"description": "The value of the form component.",
|
|
414
415
|
"attribute": "value",
|
|
415
416
|
"inheritedFrom": {
|
|
416
417
|
"name": "InputMixin",
|
|
@@ -421,7 +422,7 @@
|
|
|
421
422
|
"kind": "field",
|
|
422
423
|
"name": "form",
|
|
423
424
|
"privacy": "protected",
|
|
424
|
-
"description": "Gets the form, if any, associated with the
|
|
425
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
425
426
|
"inheritedFrom": {
|
|
426
427
|
"name": "InputMixin",
|
|
427
428
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -449,7 +450,7 @@
|
|
|
449
450
|
"description": "An object which controls aspects of the focusing process."
|
|
450
451
|
}
|
|
451
452
|
],
|
|
452
|
-
"description": "Programmatically move focus to the component",
|
|
453
|
+
"description": "Programmatically move focus to the component.",
|
|
453
454
|
"inheritedFrom": {
|
|
454
455
|
"name": "FocusableMixin",
|
|
455
456
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -521,7 +522,7 @@
|
|
|
521
522
|
"type": {
|
|
522
523
|
"text": "string | undefined"
|
|
523
524
|
},
|
|
524
|
-
"description": "When provided, renders the button as a link,\nwith
|
|
525
|
+
"description": "When provided, renders the button as a link,\nwith its href attribute set to the given value.",
|
|
525
526
|
"fieldName": "href"
|
|
526
527
|
},
|
|
527
528
|
{
|
|
@@ -557,7 +558,7 @@
|
|
|
557
558
|
"text": "boolean"
|
|
558
559
|
},
|
|
559
560
|
"default": "false",
|
|
560
|
-
"description": "Makes the
|
|
561
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
561
562
|
"fieldName": "disabled",
|
|
562
563
|
"inheritedFrom": {
|
|
563
564
|
"name": "InputMixin",
|
|
@@ -569,7 +570,7 @@
|
|
|
569
570
|
"type": {
|
|
570
571
|
"text": "string | undefined"
|
|
571
572
|
},
|
|
572
|
-
"description": "The name of the
|
|
573
|
+
"description": "The name of the form component.",
|
|
573
574
|
"fieldName": "name",
|
|
574
575
|
"inheritedFrom": {
|
|
575
576
|
"name": "InputMixin",
|
|
@@ -582,7 +583,7 @@
|
|
|
582
583
|
"text": "string"
|
|
583
584
|
},
|
|
584
585
|
"default": "\"\"",
|
|
585
|
-
"description": "The value of the
|
|
586
|
+
"description": "The value of the form component.",
|
|
586
587
|
"fieldName": "value",
|
|
587
588
|
"inheritedFrom": {
|
|
588
589
|
"name": "InputMixin",
|
|
@@ -632,7 +633,7 @@
|
|
|
632
633
|
}
|
|
633
634
|
}
|
|
634
635
|
],
|
|
635
|
-
"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 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 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
|
|
636
|
+
"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 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 buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## 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"
|
|
636
637
|
},
|
|
637
638
|
{
|
|
638
639
|
"kind": "javascript-module",
|
|
@@ -991,7 +992,8 @@
|
|
|
991
992
|
"module": "src/calendar/Calendar.ts"
|
|
992
993
|
}
|
|
993
994
|
}
|
|
994
|
-
]
|
|
995
|
+
],
|
|
996
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
995
997
|
},
|
|
996
998
|
{
|
|
997
999
|
"kind": "javascript-module",
|
|
@@ -1035,7 +1037,8 @@
|
|
|
1035
1037
|
"module": "src/calendar/DateSelectEvent.ts"
|
|
1036
1038
|
}
|
|
1037
1039
|
}
|
|
1038
|
-
]
|
|
1040
|
+
],
|
|
1041
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
1039
1042
|
},
|
|
1040
1043
|
{
|
|
1041
1044
|
"kind": "javascript-module",
|
|
@@ -1059,7 +1062,8 @@
|
|
|
1059
1062
|
"module": "src/calendar/calendar-localization.ts"
|
|
1060
1063
|
}
|
|
1061
1064
|
}
|
|
1062
|
-
]
|
|
1065
|
+
],
|
|
1066
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
1063
1067
|
},
|
|
1064
1068
|
{
|
|
1065
1069
|
"kind": "javascript-module",
|
|
@@ -1107,7 +1111,8 @@
|
|
|
1107
1111
|
"module": "src/calendar/month-view.ts"
|
|
1108
1112
|
}
|
|
1109
1113
|
}
|
|
1110
|
-
]
|
|
1114
|
+
],
|
|
1115
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n- Close calendar after a single date is selected, unless a range with a start and end date is required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use for choosing a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nCalendar component is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Calendar grid\n\n- `Space, Enter`: Selects a date.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n"
|
|
1111
1116
|
},
|
|
1112
1117
|
{
|
|
1113
1118
|
"kind": "javascript-module",
|
|
@@ -1151,7 +1156,7 @@
|
|
|
1151
1156
|
"text": "\"m\" | \"l\" | \"none\""
|
|
1152
1157
|
},
|
|
1153
1158
|
"default": "\"m\"",
|
|
1154
|
-
"description": "
|
|
1159
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1155
1160
|
"attribute": "padding",
|
|
1156
1161
|
"reflects": true
|
|
1157
1162
|
},
|
|
@@ -1177,7 +1182,7 @@
|
|
|
1177
1182
|
"text": "\"m\" | \"l\" | \"none\""
|
|
1178
1183
|
},
|
|
1179
1184
|
"default": "\"m\"",
|
|
1180
|
-
"description": "
|
|
1185
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1181
1186
|
"fieldName": "padding"
|
|
1182
1187
|
}
|
|
1183
1188
|
],
|
|
@@ -1214,7 +1219,8 @@
|
|
|
1214
1219
|
"module": "src/card/Card.ts"
|
|
1215
1220
|
}
|
|
1216
1221
|
}
|
|
1217
|
-
]
|
|
1222
|
+
],
|
|
1223
|
+
"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"
|
|
1218
1224
|
},
|
|
1219
1225
|
{
|
|
1220
1226
|
"kind": "javascript-module",
|
|
@@ -1481,15 +1487,6 @@
|
|
|
1481
1487
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1482
1488
|
}
|
|
1483
1489
|
},
|
|
1484
|
-
{
|
|
1485
|
-
"kind": "method",
|
|
1486
|
-
"name": "renderHint",
|
|
1487
|
-
"privacy": "private",
|
|
1488
|
-
"inheritedFrom": {
|
|
1489
|
-
"name": "FormAssociatedMixin",
|
|
1490
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
1491
|
-
}
|
|
1492
|
-
},
|
|
1493
1490
|
{
|
|
1494
1491
|
"kind": "method",
|
|
1495
1492
|
"name": "renderError",
|
|
@@ -1542,7 +1539,7 @@
|
|
|
1542
1539
|
"text": "boolean"
|
|
1543
1540
|
},
|
|
1544
1541
|
"default": "false",
|
|
1545
|
-
"description": "Makes the
|
|
1542
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1546
1543
|
"attribute": "disabled",
|
|
1547
1544
|
"reflects": true,
|
|
1548
1545
|
"inheritedFrom": {
|
|
@@ -1556,7 +1553,7 @@
|
|
|
1556
1553
|
"type": {
|
|
1557
1554
|
"text": "string | undefined"
|
|
1558
1555
|
},
|
|
1559
|
-
"description": "The name of the
|
|
1556
|
+
"description": "The name of the form component.",
|
|
1560
1557
|
"attribute": "name",
|
|
1561
1558
|
"inheritedFrom": {
|
|
1562
1559
|
"name": "InputMixin",
|
|
@@ -1570,7 +1567,7 @@
|
|
|
1570
1567
|
"text": "string"
|
|
1571
1568
|
},
|
|
1572
1569
|
"default": "\"\"",
|
|
1573
|
-
"description": "The value of the
|
|
1570
|
+
"description": "The value of the form component.",
|
|
1574
1571
|
"attribute": "value",
|
|
1575
1572
|
"inheritedFrom": {
|
|
1576
1573
|
"name": "InputMixin",
|
|
@@ -1581,7 +1578,7 @@
|
|
|
1581
1578
|
"kind": "field",
|
|
1582
1579
|
"name": "form",
|
|
1583
1580
|
"privacy": "protected",
|
|
1584
|
-
"description": "Gets the form, if any, associated with the
|
|
1581
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
1585
1582
|
"inheritedFrom": {
|
|
1586
1583
|
"name": "InputMixin",
|
|
1587
1584
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -1609,7 +1606,7 @@
|
|
|
1609
1606
|
"description": "An object which controls aspects of the focusing process."
|
|
1610
1607
|
}
|
|
1611
1608
|
],
|
|
1612
|
-
"description": "Programmatically move focus to the component",
|
|
1609
|
+
"description": "Programmatically move focus to the component.",
|
|
1613
1610
|
"inheritedFrom": {
|
|
1614
1611
|
"name": "FocusableMixin",
|
|
1615
1612
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -1752,7 +1749,7 @@
|
|
|
1752
1749
|
"text": "boolean"
|
|
1753
1750
|
},
|
|
1754
1751
|
"default": "false",
|
|
1755
|
-
"description": "Makes the
|
|
1752
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
1756
1753
|
"fieldName": "disabled",
|
|
1757
1754
|
"inheritedFrom": {
|
|
1758
1755
|
"name": "InputMixin",
|
|
@@ -1764,7 +1761,7 @@
|
|
|
1764
1761
|
"type": {
|
|
1765
1762
|
"text": "string | undefined"
|
|
1766
1763
|
},
|
|
1767
|
-
"description": "The name of the
|
|
1764
|
+
"description": "The name of the form component.",
|
|
1768
1765
|
"fieldName": "name",
|
|
1769
1766
|
"inheritedFrom": {
|
|
1770
1767
|
"name": "InputMixin",
|
|
@@ -1777,7 +1774,7 @@
|
|
|
1777
1774
|
"text": "string"
|
|
1778
1775
|
},
|
|
1779
1776
|
"default": "\"\"",
|
|
1780
|
-
"description": "The value of the
|
|
1777
|
+
"description": "The value of the form component.",
|
|
1781
1778
|
"fieldName": "value",
|
|
1782
1779
|
"inheritedFrom": {
|
|
1783
1780
|
"name": "InputMixin",
|
|
@@ -1854,7 +1851,8 @@
|
|
|
1854
1851
|
"module": "src/checkbox/Checkbox.ts"
|
|
1855
1852
|
}
|
|
1856
1853
|
}
|
|
1857
|
-
]
|
|
1854
|
+
],
|
|
1855
|
+
"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 for making it possible to choose one or more options from a limited number of options.\n- Use for “accepting terms of service” and similar functionality.\n- Use in forms to toggle something on or off.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox 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 checkbox 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"
|
|
1858
1856
|
},
|
|
1859
1857
|
{
|
|
1860
1858
|
"kind": "javascript-module",
|
|
@@ -1862,7 +1860,7 @@
|
|
|
1862
1860
|
"declarations": [
|
|
1863
1861
|
{
|
|
1864
1862
|
"kind": "class",
|
|
1865
|
-
"description": "Command Menu allows users to navigate and use an app without
|
|
1863
|
+
"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.",
|
|
1866
1864
|
"name": "CommandMenu",
|
|
1867
1865
|
"slots": [
|
|
1868
1866
|
{
|
|
@@ -1918,7 +1916,7 @@
|
|
|
1918
1916
|
"text": "string"
|
|
1919
1917
|
},
|
|
1920
1918
|
"default": "\"Type a command or search...\"",
|
|
1921
|
-
"description": "Hint text to display in the search field.",
|
|
1919
|
+
"description": "Hint text to display in the Command Menu search field.",
|
|
1922
1920
|
"attribute": "placeholder"
|
|
1923
1921
|
},
|
|
1924
1922
|
{
|
|
@@ -1928,7 +1926,7 @@
|
|
|
1928
1926
|
"text": "Array<ICommandMenuAction>"
|
|
1929
1927
|
},
|
|
1930
1928
|
"default": "[]",
|
|
1931
|
-
"description": "Array of commands to be included in the menu."
|
|
1929
|
+
"description": "Array of commands to be included in the menu.\nPlease see “Commands data” section for more documentation."
|
|
1932
1930
|
},
|
|
1933
1931
|
{
|
|
1934
1932
|
"kind": "field",
|
|
@@ -2151,14 +2149,14 @@
|
|
|
2151
2149
|
"type": {
|
|
2152
2150
|
"text": "NordEvent"
|
|
2153
2151
|
},
|
|
2154
|
-
"description": "The command menu was opened
|
|
2152
|
+
"description": "The command menu was opened."
|
|
2155
2153
|
},
|
|
2156
2154
|
{
|
|
2157
2155
|
"name": "close",
|
|
2158
2156
|
"type": {
|
|
2159
2157
|
"text": "NordEvent"
|
|
2160
2158
|
},
|
|
2161
|
-
"description": "The command menu was closed
|
|
2159
|
+
"description": "The command menu was closed."
|
|
2162
2160
|
},
|
|
2163
2161
|
{
|
|
2164
2162
|
"type": {
|
|
@@ -2184,7 +2182,7 @@
|
|
|
2184
2182
|
"text": "string"
|
|
2185
2183
|
},
|
|
2186
2184
|
"default": "\"Type a command or search...\"",
|
|
2187
|
-
"description": "Hint text to display in the search field.",
|
|
2185
|
+
"description": "Hint text to display in the Command Menu search field.",
|
|
2188
2186
|
"fieldName": "placeholder"
|
|
2189
2187
|
}
|
|
2190
2188
|
],
|
|
@@ -2221,7 +2219,8 @@
|
|
|
2221
2219
|
"module": "src/command-menu/CommandMenu.ts"
|
|
2222
2220
|
}
|
|
2223
2221
|
}
|
|
2224
|
-
]
|
|
2222
|
+
],
|
|
2223
|
+
"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"
|
|
2225
2224
|
},
|
|
2226
2225
|
{
|
|
2227
2226
|
"kind": "javascript-module",
|
|
@@ -2305,13 +2304,15 @@
|
|
|
2305
2304
|
"module": "src/command-menu/CommandMenuAction.ts"
|
|
2306
2305
|
}
|
|
2307
2306
|
}
|
|
2308
|
-
]
|
|
2307
|
+
],
|
|
2308
|
+
"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"
|
|
2309
2309
|
},
|
|
2310
2310
|
{
|
|
2311
2311
|
"kind": "javascript-module",
|
|
2312
2312
|
"path": "src/command-menu/ICommandMenuAction.ts",
|
|
2313
2313
|
"declarations": [],
|
|
2314
|
-
"exports": []
|
|
2314
|
+
"exports": [],
|
|
2315
|
+
"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"
|
|
2315
2316
|
},
|
|
2316
2317
|
{
|
|
2317
2318
|
"kind": "javascript-module",
|
|
@@ -2374,7 +2375,8 @@
|
|
|
2374
2375
|
"module": "src/command-menu/KeyboardController.ts"
|
|
2375
2376
|
}
|
|
2376
2377
|
}
|
|
2377
|
-
]
|
|
2378
|
+
],
|
|
2379
|
+
"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"
|
|
2378
2380
|
},
|
|
2379
2381
|
{
|
|
2380
2382
|
"kind": "javascript-module",
|
|
@@ -2409,7 +2411,8 @@
|
|
|
2409
2411
|
"module": "src/command-menu/events.ts"
|
|
2410
2412
|
}
|
|
2411
2413
|
}
|
|
2412
|
-
]
|
|
2414
|
+
],
|
|
2415
|
+
"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"
|
|
2413
2416
|
},
|
|
2414
2417
|
{
|
|
2415
2418
|
"kind": "javascript-module",
|
|
@@ -3349,7 +3352,7 @@
|
|
|
3349
3352
|
"text": "string"
|
|
3350
3353
|
},
|
|
3351
3354
|
"default": "\"\"",
|
|
3352
|
-
"description": "Date value. Must be in IS0-8601 format: YYYY-MM-DD",
|
|
3355
|
+
"description": "Date value. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
3353
3356
|
"attribute": "value",
|
|
3354
3357
|
"inheritedFrom": {
|
|
3355
3358
|
"name": "InputMixin",
|
|
@@ -3727,15 +3730,6 @@
|
|
|
3727
3730
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
3728
3731
|
}
|
|
3729
3732
|
},
|
|
3730
|
-
{
|
|
3731
|
-
"kind": "method",
|
|
3732
|
-
"name": "renderHint",
|
|
3733
|
-
"privacy": "private",
|
|
3734
|
-
"inheritedFrom": {
|
|
3735
|
-
"name": "FormAssociatedMixin",
|
|
3736
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
3737
|
-
}
|
|
3738
|
-
},
|
|
3739
3733
|
{
|
|
3740
3734
|
"kind": "method",
|
|
3741
3735
|
"name": "renderError",
|
|
@@ -3788,7 +3782,7 @@
|
|
|
3788
3782
|
"text": "boolean"
|
|
3789
3783
|
},
|
|
3790
3784
|
"default": "false",
|
|
3791
|
-
"description": "Makes the
|
|
3785
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
3792
3786
|
"attribute": "disabled",
|
|
3793
3787
|
"reflects": true,
|
|
3794
3788
|
"inheritedFrom": {
|
|
@@ -3802,7 +3796,7 @@
|
|
|
3802
3796
|
"type": {
|
|
3803
3797
|
"text": "string | undefined"
|
|
3804
3798
|
},
|
|
3805
|
-
"description": "The name of the
|
|
3799
|
+
"description": "The name of the form component.",
|
|
3806
3800
|
"attribute": "name",
|
|
3807
3801
|
"inheritedFrom": {
|
|
3808
3802
|
"name": "InputMixin",
|
|
@@ -3813,7 +3807,7 @@
|
|
|
3813
3807
|
"kind": "field",
|
|
3814
3808
|
"name": "form",
|
|
3815
3809
|
"privacy": "protected",
|
|
3816
|
-
"description": "Gets the form, if any, associated with the
|
|
3810
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
3817
3811
|
"inheritedFrom": {
|
|
3818
3812
|
"name": "InputMixin",
|
|
3819
3813
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -3841,7 +3835,7 @@
|
|
|
3841
3835
|
"description": "An object which controls aspects of the focusing process."
|
|
3842
3836
|
}
|
|
3843
3837
|
],
|
|
3844
|
-
"description": "Programmatically move focus to the component",
|
|
3838
|
+
"description": "Programmatically move focus to the component.",
|
|
3845
3839
|
"inheritedFrom": {
|
|
3846
3840
|
"name": "FocusableMixin",
|
|
3847
3841
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -3925,7 +3919,7 @@
|
|
|
3925
3919
|
"text": "string"
|
|
3926
3920
|
},
|
|
3927
3921
|
"default": "\"\"",
|
|
3928
|
-
"description": "Date value. Must be in IS0-8601 format: YYYY-MM-DD",
|
|
3922
|
+
"description": "Date value. Must be in IS0-8601 format: YYYY-MM-DD.",
|
|
3929
3923
|
"fieldName": "value",
|
|
3930
3924
|
"inheritedFrom": {
|
|
3931
3925
|
"name": "InputMixin",
|
|
@@ -4061,7 +4055,7 @@
|
|
|
4061
4055
|
"text": "boolean"
|
|
4062
4056
|
},
|
|
4063
4057
|
"default": "false",
|
|
4064
|
-
"description": "Makes the
|
|
4058
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
4065
4059
|
"fieldName": "disabled",
|
|
4066
4060
|
"inheritedFrom": {
|
|
4067
4061
|
"name": "InputMixin",
|
|
@@ -4073,7 +4067,7 @@
|
|
|
4073
4067
|
"type": {
|
|
4074
4068
|
"text": "string | undefined"
|
|
4075
4069
|
},
|
|
4076
|
-
"description": "The name of the
|
|
4070
|
+
"description": "The name of the form component.",
|
|
4077
4071
|
"fieldName": "name",
|
|
4078
4072
|
"inheritedFrom": {
|
|
4079
4073
|
"name": "InputMixin",
|
|
@@ -4126,7 +4120,8 @@
|
|
|
4126
4120
|
"module": "src/date-picker/DatePicker.ts"
|
|
4127
4121
|
}
|
|
4128
4122
|
}
|
|
4129
|
-
]
|
|
4123
|
+
],
|
|
4124
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
|
|
4130
4125
|
},
|
|
4131
4126
|
{
|
|
4132
4127
|
"kind": "javascript-module",
|
|
@@ -4150,7 +4145,8 @@
|
|
|
4150
4145
|
"module": "src/date-picker/date-adapter.ts"
|
|
4151
4146
|
}
|
|
4152
4147
|
}
|
|
4153
|
-
]
|
|
4148
|
+
],
|
|
4149
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
|
|
4154
4150
|
},
|
|
4155
4151
|
{
|
|
4156
4152
|
"kind": "javascript-module",
|
|
@@ -4174,7 +4170,8 @@
|
|
|
4174
4170
|
"module": "src/date-picker/date-localization.ts"
|
|
4175
4171
|
}
|
|
4176
4172
|
}
|
|
4177
|
-
]
|
|
4173
|
+
],
|
|
4174
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
|
|
4178
4175
|
},
|
|
4179
4176
|
{
|
|
4180
4177
|
"kind": "javascript-module",
|
|
@@ -4239,16 +4236,6 @@
|
|
|
4239
4236
|
"description": "Optional error to be shown with the fieldset. Alternatively use the error slot.",
|
|
4240
4237
|
"attribute": "error"
|
|
4241
4238
|
},
|
|
4242
|
-
{
|
|
4243
|
-
"kind": "method",
|
|
4244
|
-
"name": "renderHint",
|
|
4245
|
-
"privacy": "private"
|
|
4246
|
-
},
|
|
4247
|
-
{
|
|
4248
|
-
"kind": "method",
|
|
4249
|
-
"name": "renderError",
|
|
4250
|
-
"privacy": "private"
|
|
4251
|
-
},
|
|
4252
4239
|
{
|
|
4253
4240
|
"kind": "field",
|
|
4254
4241
|
"name": "hasHint",
|
|
@@ -4665,7 +4652,8 @@
|
|
|
4665
4652
|
"module": "src/icon/Icon.ts"
|
|
4666
4653
|
}
|
|
4667
4654
|
}
|
|
4668
|
-
]
|
|
4655
|
+
],
|
|
4656
|
+
"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 additional meaning in addition to a text label.\n- Use to help users who have difficulties with reading and attention.\n- Use in places where text label doesn’t fit (remember to add an accessible label for the icon).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for decorative purposes alone.\n- Don’t use when a button’s action is already clear based on the text label.\n- Don’t use the same icon for differing purposes, as users will come to associate icons with specific types of actions.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Icon components are hidden from assistive technologies by default.\n- Use `label` property to give an accessible label for the icon and to make it visible to assistive technologies.\n"
|
|
4669
4657
|
},
|
|
4670
4658
|
{
|
|
4671
4659
|
"kind": "javascript-module",
|
|
@@ -4942,15 +4930,6 @@
|
|
|
4942
4930
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
4943
4931
|
}
|
|
4944
4932
|
},
|
|
4945
|
-
{
|
|
4946
|
-
"kind": "method",
|
|
4947
|
-
"name": "renderHint",
|
|
4948
|
-
"privacy": "private",
|
|
4949
|
-
"inheritedFrom": {
|
|
4950
|
-
"name": "FormAssociatedMixin",
|
|
4951
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
4952
|
-
}
|
|
4953
|
-
},
|
|
4954
4933
|
{
|
|
4955
4934
|
"kind": "method",
|
|
4956
4935
|
"name": "renderError",
|
|
@@ -5003,7 +4982,7 @@
|
|
|
5003
4982
|
"text": "boolean"
|
|
5004
4983
|
},
|
|
5005
4984
|
"default": "false",
|
|
5006
|
-
"description": "Makes the
|
|
4985
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
5007
4986
|
"attribute": "disabled",
|
|
5008
4987
|
"reflects": true,
|
|
5009
4988
|
"inheritedFrom": {
|
|
@@ -5017,7 +4996,7 @@
|
|
|
5017
4996
|
"type": {
|
|
5018
4997
|
"text": "string | undefined"
|
|
5019
4998
|
},
|
|
5020
|
-
"description": "The name of the
|
|
4999
|
+
"description": "The name of the form component.",
|
|
5021
5000
|
"attribute": "name",
|
|
5022
5001
|
"inheritedFrom": {
|
|
5023
5002
|
"name": "InputMixin",
|
|
@@ -5031,7 +5010,7 @@
|
|
|
5031
5010
|
"text": "string"
|
|
5032
5011
|
},
|
|
5033
5012
|
"default": "\"\"",
|
|
5034
|
-
"description": "The value of the
|
|
5013
|
+
"description": "The value of the form component.",
|
|
5035
5014
|
"attribute": "value",
|
|
5036
5015
|
"inheritedFrom": {
|
|
5037
5016
|
"name": "InputMixin",
|
|
@@ -5042,7 +5021,7 @@
|
|
|
5042
5021
|
"kind": "field",
|
|
5043
5022
|
"name": "form",
|
|
5044
5023
|
"privacy": "protected",
|
|
5045
|
-
"description": "Gets the form, if any, associated with the
|
|
5024
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
5046
5025
|
"inheritedFrom": {
|
|
5047
5026
|
"name": "InputMixin",
|
|
5048
5027
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -5070,7 +5049,7 @@
|
|
|
5070
5049
|
"description": "An object which controls aspects of the focusing process."
|
|
5071
5050
|
}
|
|
5072
5051
|
],
|
|
5073
|
-
"description": "Programmatically move focus to the component",
|
|
5052
|
+
"description": "Programmatically move focus to the component.",
|
|
5074
5053
|
"inheritedFrom": {
|
|
5075
5054
|
"name": "FocusableMixin",
|
|
5076
5055
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -5213,7 +5192,7 @@
|
|
|
5213
5192
|
"text": "boolean"
|
|
5214
5193
|
},
|
|
5215
5194
|
"default": "false",
|
|
5216
|
-
"description": "Makes the
|
|
5195
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
5217
5196
|
"fieldName": "disabled",
|
|
5218
5197
|
"inheritedFrom": {
|
|
5219
5198
|
"name": "InputMixin",
|
|
@@ -5225,7 +5204,7 @@
|
|
|
5225
5204
|
"type": {
|
|
5226
5205
|
"text": "string | undefined"
|
|
5227
5206
|
},
|
|
5228
|
-
"description": "The name of the
|
|
5207
|
+
"description": "The name of the form component.",
|
|
5229
5208
|
"fieldName": "name",
|
|
5230
5209
|
"inheritedFrom": {
|
|
5231
5210
|
"name": "InputMixin",
|
|
@@ -5238,7 +5217,7 @@
|
|
|
5238
5217
|
"text": "string"
|
|
5239
5218
|
},
|
|
5240
5219
|
"default": "\"\"",
|
|
5241
|
-
"description": "The value of the
|
|
5220
|
+
"description": "The value of the form component.",
|
|
5242
5221
|
"fieldName": "value",
|
|
5243
5222
|
"inheritedFrom": {
|
|
5244
5223
|
"name": "InputMixin",
|
|
@@ -5315,27 +5294,24 @@
|
|
|
5315
5294
|
"module": "src/input/Input.ts"
|
|
5316
5295
|
}
|
|
5317
5296
|
}
|
|
5318
|
-
]
|
|
5297
|
+
],
|
|
5298
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide a text input where the expected input is short.\n- Use to only ask for information that’s really needed. Hide optional fields by default if possible or have them shown with a lower priority.\n- Use help text and placeholder to provide additional, non-critical instructions.\n- Validate input as soon as users have finished interacting with them (but not before).\n- Where necessary, label the input as “Optional” when you need to request input that’s not required.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is long. Use textarea component instead.\n- Don’t use the placeholder to provide information that’s required to use the input. Hint text should be used for this purpose instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nInput labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing input labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nWhen an input isn’t part of a form and is placed individually on a page, you could provide the input label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in input label:\n\n<div class=\"n-usage n-usage-do\">First name</div>\n<div class=\"n-usage n-usage-dont\">First name:</div>\n\n---\n\n## Types\n\nThis section describes the different input types, their purpose, and when to use each type.\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `text` | The default and most common variant. Displayed as a single-line text field. Line-breaks are automatically removed from the input value. |\n| `email` | A field for editing an email address. Looks similar to a text input, but has validation parameters and relevant keyboard for devices with dynamic keyboards. |\n| `password` | A single-line text field where the value is obscured. This type will alert user if a site is not secure. |\n| `tel` | A field for entering a telephone number. Displays a number keypad on mobile devices. |\n| `url` | A field variant that is used to let the user enter and edit an URL. |\n| `search` | A single-line text field for entering search strings. |\n| `number` | Used to let the user enter a number. |\n"
|
|
5319
5299
|
},
|
|
5320
5300
|
{
|
|
5321
5301
|
"kind": "javascript-module",
|
|
5322
|
-
"path": "src/
|
|
5302
|
+
"path": "src/radio/Radio.ts",
|
|
5323
5303
|
"declarations": [
|
|
5324
5304
|
{
|
|
5325
5305
|
"kind": "class",
|
|
5326
|
-
"description": "
|
|
5327
|
-
"name": "
|
|
5306
|
+
"description": "Radio buttons are graphical user interface elements that allow user to choose only one option from\na predefined set of mutually exclusive options.",
|
|
5307
|
+
"name": "Radio",
|
|
5328
5308
|
"slots": [
|
|
5329
|
-
{
|
|
5330
|
-
"description": "Default slot for holding <option> elements.",
|
|
5331
|
-
"name": ""
|
|
5332
|
-
},
|
|
5333
5309
|
{
|
|
5334
5310
|
"description": "Use when a label requires more than plain text.",
|
|
5335
5311
|
"name": "label"
|
|
5336
5312
|
},
|
|
5337
5313
|
{
|
|
5338
|
-
"description": "
|
|
5314
|
+
"description": "Optional slot that holds hint text for the input.",
|
|
5339
5315
|
"name": "hint"
|
|
5340
5316
|
},
|
|
5341
5317
|
{
|
|
@@ -5346,8 +5322,12 @@
|
|
|
5346
5322
|
"members": [
|
|
5347
5323
|
{
|
|
5348
5324
|
"kind": "field",
|
|
5349
|
-
"name": "
|
|
5325
|
+
"name": "inputId",
|
|
5326
|
+
"type": {
|
|
5327
|
+
"text": "string"
|
|
5328
|
+
},
|
|
5350
5329
|
"privacy": "protected",
|
|
5330
|
+
"default": "\"input\"",
|
|
5351
5331
|
"inheritedFrom": {
|
|
5352
5332
|
"name": "FormAssociatedMixin",
|
|
5353
5333
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5355,18 +5335,12 @@
|
|
|
5355
5335
|
},
|
|
5356
5336
|
{
|
|
5357
5337
|
"kind": "field",
|
|
5358
|
-
"name": "
|
|
5359
|
-
"privacy": "private",
|
|
5360
|
-
"default": "new SlotController(this)"
|
|
5361
|
-
},
|
|
5362
|
-
{
|
|
5363
|
-
"kind": "field",
|
|
5364
|
-
"name": "inputId",
|
|
5338
|
+
"name": "hintId",
|
|
5365
5339
|
"type": {
|
|
5366
5340
|
"text": "string"
|
|
5367
5341
|
},
|
|
5368
5342
|
"privacy": "protected",
|
|
5369
|
-
"default": "\"
|
|
5343
|
+
"default": "\"hint\"",
|
|
5370
5344
|
"inheritedFrom": {
|
|
5371
5345
|
"name": "FormAssociatedMixin",
|
|
5372
5346
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5374,45 +5348,23 @@
|
|
|
5374
5348
|
},
|
|
5375
5349
|
{
|
|
5376
5350
|
"kind": "field",
|
|
5377
|
-
"name": "
|
|
5378
|
-
"
|
|
5379
|
-
|
|
5380
|
-
{
|
|
5381
|
-
"kind": "method",
|
|
5382
|
-
"name": "getButtonText",
|
|
5383
|
-
"privacy": "private",
|
|
5384
|
-
"return": {
|
|
5385
|
-
"type": {
|
|
5386
|
-
"text": "string"
|
|
5387
|
-
}
|
|
5351
|
+
"name": "errorId",
|
|
5352
|
+
"type": {
|
|
5353
|
+
"text": "string"
|
|
5388
5354
|
},
|
|
5389
|
-
"
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
}
|
|
5396
|
-
]
|
|
5397
|
-
},
|
|
5398
|
-
{
|
|
5399
|
-
"kind": "method",
|
|
5400
|
-
"name": "renderOption",
|
|
5401
|
-
"privacy": "private",
|
|
5402
|
-
"parameters": [
|
|
5403
|
-
{
|
|
5404
|
-
"name": "option",
|
|
5405
|
-
"type": {
|
|
5406
|
-
"text": "HTMLOptionElement"
|
|
5407
|
-
}
|
|
5408
|
-
}
|
|
5409
|
-
]
|
|
5355
|
+
"privacy": "protected",
|
|
5356
|
+
"default": "\"error\"",
|
|
5357
|
+
"inheritedFrom": {
|
|
5358
|
+
"name": "FormAssociatedMixin",
|
|
5359
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
5360
|
+
}
|
|
5410
5361
|
},
|
|
5411
5362
|
{
|
|
5412
5363
|
"kind": "field",
|
|
5413
|
-
"name": "
|
|
5364
|
+
"name": "hintSlot",
|
|
5414
5365
|
"privacy": "protected",
|
|
5415
|
-
"default": "new
|
|
5366
|
+
"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 })",
|
|
5367
|
+
"description": "For accessibility reasons, we render some parts of the component to the light DOM.",
|
|
5416
5368
|
"inheritedFrom": {
|
|
5417
5369
|
"name": "FormAssociatedMixin",
|
|
5418
5370
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5420,9 +5372,9 @@
|
|
|
5420
5372
|
},
|
|
5421
5373
|
{
|
|
5422
5374
|
"kind": "field",
|
|
5423
|
-
"name": "
|
|
5375
|
+
"name": "labelSlot",
|
|
5424
5376
|
"privacy": "protected",
|
|
5425
|
-
"default": "new
|
|
5377
|
+
"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 })",
|
|
5426
5378
|
"inheritedFrom": {
|
|
5427
5379
|
"name": "FormAssociatedMixin",
|
|
5428
5380
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5430,9 +5382,9 @@
|
|
|
5430
5382
|
},
|
|
5431
5383
|
{
|
|
5432
5384
|
"kind": "field",
|
|
5433
|
-
"name": "
|
|
5385
|
+
"name": "errorSlot",
|
|
5434
5386
|
"privacy": "protected",
|
|
5435
|
-
"default": "new
|
|
5387
|
+
"default": "new LightSlotController(this, {\n slotName: \"error\",\n render: () => (this.error ? html`<div slot=\"error-internal\" id=${this.errorId}>${this.error}</div>` : nothing),\n syncLightDom: element => {\n element.id = this.hintId\n },\n })",
|
|
5436
5388
|
"inheritedFrom": {
|
|
5437
5389
|
"name": "FormAssociatedMixin",
|
|
5438
5390
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5440,9 +5392,14 @@
|
|
|
5440
5392
|
},
|
|
5441
5393
|
{
|
|
5442
5394
|
"kind": "field",
|
|
5443
|
-
"name": "
|
|
5395
|
+
"name": "inputSlot",
|
|
5396
|
+
"privacy": "protected",
|
|
5397
|
+
"default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n .value=${this.value}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${ifDefined(this.getDescribedBy())}\n aria-invalid=${ifDefined(this.getInvalid())}\n />\n `,\n })"
|
|
5398
|
+
},
|
|
5399
|
+
{
|
|
5400
|
+
"kind": "field",
|
|
5401
|
+
"name": "formValue",
|
|
5444
5402
|
"privacy": "protected",
|
|
5445
|
-
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
5446
5403
|
"inheritedFrom": {
|
|
5447
5404
|
"name": "FormAssociatedMixin",
|
|
5448
5405
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5450,12 +5407,37 @@
|
|
|
5450
5407
|
},
|
|
5451
5408
|
{
|
|
5452
5409
|
"kind": "field",
|
|
5453
|
-
"name": "
|
|
5410
|
+
"name": "checked",
|
|
5454
5411
|
"type": {
|
|
5455
|
-
"text": "
|
|
5412
|
+
"text": "boolean"
|
|
5456
5413
|
},
|
|
5414
|
+
"default": "false",
|
|
5415
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
5416
|
+
"attribute": "checked",
|
|
5417
|
+
"reflects": true
|
|
5418
|
+
},
|
|
5419
|
+
{
|
|
5420
|
+
"kind": "method",
|
|
5421
|
+
"name": "uncheckSiblings",
|
|
5422
|
+
"privacy": "private"
|
|
5423
|
+
},
|
|
5424
|
+
{
|
|
5425
|
+
"kind": "method",
|
|
5426
|
+
"name": "handleChange",
|
|
5457
5427
|
"privacy": "protected",
|
|
5458
|
-
"
|
|
5428
|
+
"return": {
|
|
5429
|
+
"type": {
|
|
5430
|
+
"text": "void"
|
|
5431
|
+
}
|
|
5432
|
+
},
|
|
5433
|
+
"parameters": [
|
|
5434
|
+
{
|
|
5435
|
+
"name": "e",
|
|
5436
|
+
"type": {
|
|
5437
|
+
"text": "Event"
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
],
|
|
5459
5441
|
"inheritedFrom": {
|
|
5460
5442
|
"name": "FormAssociatedMixin",
|
|
5461
5443
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5463,12 +5445,19 @@
|
|
|
5463
5445
|
},
|
|
5464
5446
|
{
|
|
5465
5447
|
"kind": "field",
|
|
5466
|
-
"name": "
|
|
5467
|
-
"
|
|
5468
|
-
|
|
5469
|
-
|
|
5448
|
+
"name": "handleBlur",
|
|
5449
|
+
"privacy": "private"
|
|
5450
|
+
},
|
|
5451
|
+
{
|
|
5452
|
+
"kind": "field",
|
|
5453
|
+
"name": "handleFocus",
|
|
5454
|
+
"privacy": "private"
|
|
5455
|
+
},
|
|
5456
|
+
{
|
|
5457
|
+
"kind": "field",
|
|
5458
|
+
"name": "formData",
|
|
5470
5459
|
"privacy": "protected",
|
|
5471
|
-
"default": "
|
|
5460
|
+
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
5472
5461
|
"inheritedFrom": {
|
|
5473
5462
|
"name": "FormAssociatedMixin",
|
|
5474
5463
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -5587,15 +5576,6 @@
|
|
|
5587
5576
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
5588
5577
|
}
|
|
5589
5578
|
},
|
|
5590
|
-
{
|
|
5591
|
-
"kind": "method",
|
|
5592
|
-
"name": "handleChange",
|
|
5593
|
-
"privacy": "protected",
|
|
5594
|
-
"inheritedFrom": {
|
|
5595
|
-
"name": "FormAssociatedMixin",
|
|
5596
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
5597
|
-
}
|
|
5598
|
-
},
|
|
5599
5579
|
{
|
|
5600
5580
|
"kind": "method",
|
|
5601
5581
|
"name": "renderLabel",
|
|
@@ -5605,15 +5585,6 @@
|
|
|
5605
5585
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
5606
5586
|
}
|
|
5607
5587
|
},
|
|
5608
|
-
{
|
|
5609
|
-
"kind": "method",
|
|
5610
|
-
"name": "renderHint",
|
|
5611
|
-
"privacy": "private",
|
|
5612
|
-
"inheritedFrom": {
|
|
5613
|
-
"name": "FormAssociatedMixin",
|
|
5614
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
5615
|
-
}
|
|
5616
|
-
},
|
|
5617
5588
|
{
|
|
5618
5589
|
"kind": "method",
|
|
5619
5590
|
"name": "renderError",
|
|
@@ -5666,7 +5637,7 @@
|
|
|
5666
5637
|
"text": "boolean"
|
|
5667
5638
|
},
|
|
5668
5639
|
"default": "false",
|
|
5669
|
-
"description": "Makes the
|
|
5640
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
5670
5641
|
"attribute": "disabled",
|
|
5671
5642
|
"reflects": true,
|
|
5672
5643
|
"inheritedFrom": {
|
|
@@ -5680,7 +5651,7 @@
|
|
|
5680
5651
|
"type": {
|
|
5681
5652
|
"text": "string | undefined"
|
|
5682
5653
|
},
|
|
5683
|
-
"description": "The name of the
|
|
5654
|
+
"description": "The name of the form component.",
|
|
5684
5655
|
"attribute": "name",
|
|
5685
5656
|
"inheritedFrom": {
|
|
5686
5657
|
"name": "InputMixin",
|
|
@@ -5694,7 +5665,7 @@
|
|
|
5694
5665
|
"text": "string"
|
|
5695
5666
|
},
|
|
5696
5667
|
"default": "\"\"",
|
|
5697
|
-
"description": "The value of the
|
|
5668
|
+
"description": "The value of the form component.",
|
|
5698
5669
|
"attribute": "value",
|
|
5699
5670
|
"inheritedFrom": {
|
|
5700
5671
|
"name": "InputMixin",
|
|
@@ -5705,7 +5676,7 @@
|
|
|
5705
5676
|
"kind": "field",
|
|
5706
5677
|
"name": "form",
|
|
5707
5678
|
"privacy": "protected",
|
|
5708
|
-
"description": "Gets the form, if any, associated with the
|
|
5679
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
5709
5680
|
"inheritedFrom": {
|
|
5710
5681
|
"name": "InputMixin",
|
|
5711
5682
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -5733,7 +5704,7 @@
|
|
|
5733
5704
|
"description": "An object which controls aspects of the focusing process."
|
|
5734
5705
|
}
|
|
5735
5706
|
],
|
|
5736
|
-
"description": "Programmatically move focus to the component",
|
|
5707
|
+
"description": "Programmatically move focus to the component.",
|
|
5737
5708
|
"inheritedFrom": {
|
|
5738
5709
|
"name": "FocusableMixin",
|
|
5739
5710
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -5772,33 +5743,16 @@
|
|
|
5772
5743
|
}
|
|
5773
5744
|
}
|
|
5774
5745
|
],
|
|
5775
|
-
"
|
|
5776
|
-
{
|
|
5777
|
-
"name": "FormAssociatedMixin",
|
|
5778
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
5779
|
-
},
|
|
5780
|
-
{
|
|
5781
|
-
"name": "InputMixin",
|
|
5782
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
5783
|
-
},
|
|
5746
|
+
"attributes": [
|
|
5784
5747
|
{
|
|
5785
|
-
"name": "
|
|
5786
|
-
"
|
|
5748
|
+
"name": "checked",
|
|
5749
|
+
"type": {
|
|
5750
|
+
"text": "boolean"
|
|
5751
|
+
},
|
|
5752
|
+
"default": "false",
|
|
5753
|
+
"description": "Controls whether the checkbox is checked or not.",
|
|
5754
|
+
"fieldName": "checked"
|
|
5787
5755
|
},
|
|
5788
|
-
{
|
|
5789
|
-
"name": "DraftComponentMixin",
|
|
5790
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5791
|
-
}
|
|
5792
|
-
],
|
|
5793
|
-
"superclass": {
|
|
5794
|
-
"name": "LitElement",
|
|
5795
|
-
"package": "lit"
|
|
5796
|
-
},
|
|
5797
|
-
"status": "draft",
|
|
5798
|
-
"category": "form",
|
|
5799
|
-
"tagName": "nord-select",
|
|
5800
|
-
"customElement": true,
|
|
5801
|
-
"attributes": [
|
|
5802
5756
|
{
|
|
5803
5757
|
"name": "label",
|
|
5804
5758
|
"type": {
|
|
@@ -5893,7 +5847,7 @@
|
|
|
5893
5847
|
"text": "boolean"
|
|
5894
5848
|
},
|
|
5895
5849
|
"default": "false",
|
|
5896
|
-
"description": "Makes the
|
|
5850
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
5897
5851
|
"fieldName": "disabled",
|
|
5898
5852
|
"inheritedFrom": {
|
|
5899
5853
|
"name": "InputMixin",
|
|
@@ -5905,7 +5859,7 @@
|
|
|
5905
5859
|
"type": {
|
|
5906
5860
|
"text": "string | undefined"
|
|
5907
5861
|
},
|
|
5908
|
-
"description": "The name of the
|
|
5862
|
+
"description": "The name of the form component.",
|
|
5909
5863
|
"fieldName": "name",
|
|
5910
5864
|
"inheritedFrom": {
|
|
5911
5865
|
"name": "InputMixin",
|
|
@@ -5918,7 +5872,7 @@
|
|
|
5918
5872
|
"text": "string"
|
|
5919
5873
|
},
|
|
5920
5874
|
"default": "\"\"",
|
|
5921
|
-
"description": "The value of the
|
|
5875
|
+
"description": "The value of the form component.",
|
|
5922
5876
|
"fieldName": "value",
|
|
5923
5877
|
"inheritedFrom": {
|
|
5924
5878
|
"name": "InputMixin",
|
|
@@ -5926,7 +5880,33 @@
|
|
|
5926
5880
|
}
|
|
5927
5881
|
}
|
|
5928
5882
|
],
|
|
5929
|
-
"
|
|
5883
|
+
"mixins": [
|
|
5884
|
+
{
|
|
5885
|
+
"name": "FormAssociatedMixin",
|
|
5886
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
5887
|
+
},
|
|
5888
|
+
{
|
|
5889
|
+
"name": "InputMixin",
|
|
5890
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
"name": "FocusableMixin",
|
|
5894
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
5895
|
+
},
|
|
5896
|
+
{
|
|
5897
|
+
"name": "DraftComponentMixin",
|
|
5898
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5899
|
+
}
|
|
5900
|
+
],
|
|
5901
|
+
"superclass": {
|
|
5902
|
+
"name": "LitElement",
|
|
5903
|
+
"package": "lit"
|
|
5904
|
+
},
|
|
5905
|
+
"status": "draft",
|
|
5906
|
+
"category": "form",
|
|
5907
|
+
"tagName": "nord-radio",
|
|
5908
|
+
"customElement": true,
|
|
5909
|
+
"events": [
|
|
5930
5910
|
{
|
|
5931
5911
|
"name": "input",
|
|
5932
5912
|
"type": {
|
|
@@ -5957,152 +5937,40 @@
|
|
|
5957
5937
|
"kind": "js",
|
|
5958
5938
|
"name": "default",
|
|
5959
5939
|
"declaration": {
|
|
5960
|
-
"name": "
|
|
5961
|
-
"module": "src/
|
|
5940
|
+
"name": "Radio",
|
|
5941
|
+
"module": "src/radio/Radio.ts"
|
|
5962
5942
|
}
|
|
5963
5943
|
},
|
|
5964
5944
|
{
|
|
5965
5945
|
"kind": "custom-element-definition",
|
|
5966
|
-
"name": "nord-
|
|
5946
|
+
"name": "nord-radio",
|
|
5967
5947
|
"declaration": {
|
|
5968
|
-
"name": "
|
|
5969
|
-
"module": "src/
|
|
5948
|
+
"name": "Radio",
|
|
5949
|
+
"module": "src/radio/Radio.ts"
|
|
5970
5950
|
}
|
|
5971
5951
|
}
|
|
5972
|
-
]
|
|
5973
|
-
},
|
|
5974
|
-
{
|
|
5975
|
-
"kind": "javascript-module",
|
|
5976
|
-
"path": "src/spinner/Spinner.ts",
|
|
5977
|
-
"declarations": [
|
|
5978
|
-
{
|
|
5979
|
-
"kind": "class",
|
|
5980
|
-
"description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
|
|
5981
|
-
"name": "Spinner",
|
|
5982
|
-
"members": [
|
|
5983
|
-
{
|
|
5984
|
-
"kind": "field",
|
|
5985
|
-
"name": "size",
|
|
5986
|
-
"type": {
|
|
5987
|
-
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
5988
|
-
},
|
|
5989
|
-
"default": "\"m\"",
|
|
5990
|
-
"description": "The size of the spinner.",
|
|
5991
|
-
"attribute": "size",
|
|
5992
|
-
"reflects": true
|
|
5993
|
-
},
|
|
5994
|
-
{
|
|
5995
|
-
"kind": "field",
|
|
5996
|
-
"name": "color",
|
|
5997
|
-
"type": {
|
|
5998
|
-
"text": "string | undefined"
|
|
5999
|
-
},
|
|
6000
|
-
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
6001
|
-
"attribute": "color",
|
|
6002
|
-
"reflects": true
|
|
6003
|
-
},
|
|
6004
|
-
{
|
|
6005
|
-
"kind": "field",
|
|
6006
|
-
"name": "label",
|
|
6007
|
-
"type": {
|
|
6008
|
-
"text": "string | undefined"
|
|
6009
|
-
},
|
|
6010
|
-
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
6011
|
-
"attribute": "label",
|
|
6012
|
-
"reflects": true
|
|
6013
|
-
},
|
|
6014
|
-
{
|
|
6015
|
-
"kind": "field",
|
|
6016
|
-
"name": "_warningLogged",
|
|
6017
|
-
"type": {
|
|
6018
|
-
"text": "boolean"
|
|
6019
|
-
},
|
|
6020
|
-
"privacy": "private",
|
|
6021
|
-
"static": true,
|
|
6022
|
-
"default": "false",
|
|
6023
|
-
"inheritedFrom": {
|
|
6024
|
-
"name": "DraftComponentMixin",
|
|
6025
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
6026
|
-
}
|
|
6027
|
-
}
|
|
6028
|
-
],
|
|
6029
|
-
"attributes": [
|
|
6030
|
-
{
|
|
6031
|
-
"name": "size",
|
|
6032
|
-
"type": {
|
|
6033
|
-
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
6034
|
-
},
|
|
6035
|
-
"default": "\"m\"",
|
|
6036
|
-
"description": "The size of the spinner.",
|
|
6037
|
-
"fieldName": "size"
|
|
6038
|
-
},
|
|
6039
|
-
{
|
|
6040
|
-
"name": "color",
|
|
6041
|
-
"type": {
|
|
6042
|
-
"text": "string | undefined"
|
|
6043
|
-
},
|
|
6044
|
-
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
6045
|
-
"fieldName": "color"
|
|
6046
|
-
},
|
|
6047
|
-
{
|
|
6048
|
-
"name": "label",
|
|
6049
|
-
"type": {
|
|
6050
|
-
"text": "string | undefined"
|
|
6051
|
-
},
|
|
6052
|
-
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
6053
|
-
"fieldName": "label"
|
|
6054
|
-
}
|
|
6055
|
-
],
|
|
6056
|
-
"mixins": [
|
|
6057
|
-
{
|
|
6058
|
-
"name": "DraftComponentMixin",
|
|
6059
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
6060
|
-
}
|
|
6061
|
-
],
|
|
6062
|
-
"superclass": {
|
|
6063
|
-
"name": "LitElement",
|
|
6064
|
-
"package": "lit"
|
|
6065
|
-
},
|
|
6066
|
-
"status": "draft",
|
|
6067
|
-
"category": "feedback",
|
|
6068
|
-
"tagName": "nord-spinner",
|
|
6069
|
-
"customElement": true
|
|
6070
|
-
}
|
|
6071
5952
|
],
|
|
6072
|
-
"
|
|
6073
|
-
{
|
|
6074
|
-
"kind": "js",
|
|
6075
|
-
"name": "default",
|
|
6076
|
-
"declaration": {
|
|
6077
|
-
"name": "Spinner",
|
|
6078
|
-
"module": "src/spinner/Spinner.ts"
|
|
6079
|
-
}
|
|
6080
|
-
},
|
|
6081
|
-
{
|
|
6082
|
-
"kind": "custom-element-definition",
|
|
6083
|
-
"name": "nord-spinner",
|
|
6084
|
-
"declaration": {
|
|
6085
|
-
"name": "Spinner",
|
|
6086
|
-
"module": "src/spinner/Spinner.ts"
|
|
6087
|
-
}
|
|
6088
|
-
}
|
|
6089
|
-
]
|
|
5953
|
+
"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 radio component when users can only select one option from a list.\n- Favour radios over a select component when there are a small number of options. This reduces the number of clicks a user has to make, increasing efficiency.\n- Radio buttons are grouped by their `name` attribute. Therefore, it is crucial that the same `name` is used for a group of radios.\n- Give each radio within a group a unique `value`.\n- Radios **must** be used in combination with a fieldset component.\n- In most cases, a stack component should be used to layout a group of radio buttons.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use when a user can select more than one option. In this case, use a checkbox instead.\n- Don’t use for “accepting terms of service” and similar functionality. Use a checkbox instead.\n- When you have more than 10 options to choose from. Consider using a select instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nRadio button labels should be clear, accurate and predictable. It should be possible for the user to understand what they are enabling or disabling:\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 radio 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 ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Blue</div>\n<div class=\"n-usage n-usage-dont\">Blue.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patient</div>\n<div class=\"n-usage n-usage-dont\">Patient;</div>\n\n---\n\n## Additional considerations\n\n- Hint text can be used to offer further information or explanation for an option.\n- Once a radio has been selected, users cannot return to having no radios selected without refreshing their browser window. Therefore, you should include \"None of the above\" or \"I do not know\" if they are valid options.\n- In most cases, radio buttons should be stacked vertically. However, radio buttons can be stacked horizontally when there are only two options with short labels. An example might be a yes/no question.\n"
|
|
6090
5954
|
},
|
|
6091
5955
|
{
|
|
6092
5956
|
"kind": "javascript-module",
|
|
6093
|
-
"path": "src/
|
|
5957
|
+
"path": "src/select/Select.ts",
|
|
6094
5958
|
"declarations": [
|
|
6095
5959
|
{
|
|
6096
5960
|
"kind": "class",
|
|
6097
|
-
"description": "
|
|
6098
|
-
"name": "
|
|
5961
|
+
"description": "Select lets users choose one option from an options menu.\nConsider using select when you have 5 or more options to choose from.",
|
|
5962
|
+
"name": "Select",
|
|
6099
5963
|
"slots": [
|
|
5964
|
+
{
|
|
5965
|
+
"description": "Default slot for holding <option> elements.",
|
|
5966
|
+
"name": ""
|
|
5967
|
+
},
|
|
6100
5968
|
{
|
|
6101
5969
|
"description": "Use when a label requires more than plain text.",
|
|
6102
5970
|
"name": "label"
|
|
6103
5971
|
},
|
|
6104
5972
|
{
|
|
6105
|
-
"description": "
|
|
5973
|
+
"description": "Use when a hint requires more than plain text.",
|
|
6106
5974
|
"name": "hint"
|
|
6107
5975
|
},
|
|
6108
5976
|
{
|
|
@@ -6113,12 +5981,8 @@
|
|
|
6113
5981
|
"members": [
|
|
6114
5982
|
{
|
|
6115
5983
|
"kind": "field",
|
|
6116
|
-
"name": "
|
|
6117
|
-
"type": {
|
|
6118
|
-
"text": "string"
|
|
6119
|
-
},
|
|
5984
|
+
"name": "formValue",
|
|
6120
5985
|
"privacy": "protected",
|
|
6121
|
-
"default": "\"input\"",
|
|
6122
5986
|
"inheritedFrom": {
|
|
6123
5987
|
"name": "FormAssociatedMixin",
|
|
6124
5988
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6126,25 +5990,18 @@
|
|
|
6126
5990
|
},
|
|
6127
5991
|
{
|
|
6128
5992
|
"kind": "field",
|
|
6129
|
-
"name": "
|
|
6130
|
-
"
|
|
6131
|
-
|
|
6132
|
-
},
|
|
6133
|
-
"privacy": "protected",
|
|
6134
|
-
"default": "\"hint\"",
|
|
6135
|
-
"inheritedFrom": {
|
|
6136
|
-
"name": "FormAssociatedMixin",
|
|
6137
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
6138
|
-
}
|
|
5993
|
+
"name": "defaultSlot",
|
|
5994
|
+
"privacy": "private",
|
|
5995
|
+
"default": "new SlotController(this)"
|
|
6139
5996
|
},
|
|
6140
5997
|
{
|
|
6141
5998
|
"kind": "field",
|
|
6142
|
-
"name": "
|
|
5999
|
+
"name": "inputId",
|
|
6143
6000
|
"type": {
|
|
6144
6001
|
"text": "string"
|
|
6145
6002
|
},
|
|
6146
6003
|
"privacy": "protected",
|
|
6147
|
-
"default": "\"
|
|
6004
|
+
"default": "\"select\"",
|
|
6148
6005
|
"inheritedFrom": {
|
|
6149
6006
|
"name": "FormAssociatedMixin",
|
|
6150
6007
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6152,30 +6009,45 @@
|
|
|
6152
6009
|
},
|
|
6153
6010
|
{
|
|
6154
6011
|
"kind": "field",
|
|
6155
|
-
"name": "
|
|
6156
|
-
"privacy": "
|
|
6157
|
-
"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 })",
|
|
6158
|
-
"description": "For accessibility reasons, we render some parts of the component to the light DOM.",
|
|
6159
|
-
"inheritedFrom": {
|
|
6160
|
-
"name": "FormAssociatedMixin",
|
|
6161
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
6162
|
-
}
|
|
6012
|
+
"name": "options",
|
|
6013
|
+
"privacy": "private"
|
|
6163
6014
|
},
|
|
6164
6015
|
{
|
|
6165
|
-
"kind": "
|
|
6166
|
-
"name": "
|
|
6167
|
-
"privacy": "
|
|
6168
|
-
"
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
}
|
|
6016
|
+
"kind": "method",
|
|
6017
|
+
"name": "getButtonText",
|
|
6018
|
+
"privacy": "private",
|
|
6019
|
+
"return": {
|
|
6020
|
+
"type": {
|
|
6021
|
+
"text": "string"
|
|
6022
|
+
}
|
|
6023
|
+
},
|
|
6024
|
+
"parameters": [
|
|
6025
|
+
{
|
|
6026
|
+
"name": "options",
|
|
6027
|
+
"type": {
|
|
6028
|
+
"text": "HTMLOptionElement[]"
|
|
6029
|
+
}
|
|
6030
|
+
}
|
|
6031
|
+
]
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
"kind": "method",
|
|
6035
|
+
"name": "renderOption",
|
|
6036
|
+
"privacy": "private",
|
|
6037
|
+
"parameters": [
|
|
6038
|
+
{
|
|
6039
|
+
"name": "option",
|
|
6040
|
+
"type": {
|
|
6041
|
+
"text": "HTMLOptionElement"
|
|
6042
|
+
}
|
|
6043
|
+
}
|
|
6044
|
+
]
|
|
6173
6045
|
},
|
|
6174
6046
|
{
|
|
6175
6047
|
"kind": "field",
|
|
6176
|
-
"name": "
|
|
6048
|
+
"name": "labelSlot",
|
|
6177
6049
|
"privacy": "protected",
|
|
6178
|
-
"default": "new
|
|
6050
|
+
"default": "new SlotController(this, \"label\")",
|
|
6179
6051
|
"inheritedFrom": {
|
|
6180
6052
|
"name": "FormAssociatedMixin",
|
|
6181
6053
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6183,52 +6055,19 @@
|
|
|
6183
6055
|
},
|
|
6184
6056
|
{
|
|
6185
6057
|
"kind": "field",
|
|
6186
|
-
"name": "
|
|
6187
|
-
"privacy": "protected",
|
|
6188
|
-
"default": "new LightDomController(this, {\n render: () =>\n html`\n <input\n slot=\"input\"\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n ${ref(this.focusableRef)}\n class=\"n-input\"\n id=${this.inputId}\n type=\"radio\"\n name=${ifDefined(this.name)}\n .value=${this.value}\n .checked=${this.checked}\n ?disabled=${this.disabled}\n ?required=${this.required}\n aria-describedby=${ifDefined(this.getDescribedBy())}\n aria-invalid=${ifDefined(this.getInvalid())}\n />\n `,\n })"
|
|
6189
|
-
},
|
|
6190
|
-
{
|
|
6191
|
-
"kind": "field",
|
|
6192
|
-
"name": "formValue",
|
|
6058
|
+
"name": "errorSlot",
|
|
6193
6059
|
"privacy": "protected",
|
|
6060
|
+
"default": "new SlotController(this, \"error\")",
|
|
6194
6061
|
"inheritedFrom": {
|
|
6195
6062
|
"name": "FormAssociatedMixin",
|
|
6196
6063
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
6197
|
-
}
|
|
6198
|
-
},
|
|
6199
|
-
{
|
|
6200
|
-
"kind": "field",
|
|
6201
|
-
"name": "
|
|
6202
|
-
"
|
|
6203
|
-
|
|
6204
|
-
},
|
|
6205
|
-
"default": "false",
|
|
6206
|
-
"description": "Controls whether the checkbox is checked or not.",
|
|
6207
|
-
"attribute": "checked",
|
|
6208
|
-
"reflects": true
|
|
6209
|
-
},
|
|
6210
|
-
{
|
|
6211
|
-
"kind": "method",
|
|
6212
|
-
"name": "uncheckSiblings",
|
|
6213
|
-
"privacy": "private"
|
|
6214
|
-
},
|
|
6215
|
-
{
|
|
6216
|
-
"kind": "method",
|
|
6217
|
-
"name": "handleChange",
|
|
6218
|
-
"privacy": "protected",
|
|
6219
|
-
"return": {
|
|
6220
|
-
"type": {
|
|
6221
|
-
"text": "void"
|
|
6222
|
-
}
|
|
6223
|
-
},
|
|
6224
|
-
"parameters": [
|
|
6225
|
-
{
|
|
6226
|
-
"name": "e",
|
|
6227
|
-
"type": {
|
|
6228
|
-
"text": "Event"
|
|
6229
|
-
}
|
|
6230
|
-
}
|
|
6231
|
-
],
|
|
6064
|
+
}
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
"kind": "field",
|
|
6068
|
+
"name": "hintSlot",
|
|
6069
|
+
"privacy": "protected",
|
|
6070
|
+
"default": "new SlotController(this, \"hint\")",
|
|
6232
6071
|
"inheritedFrom": {
|
|
6233
6072
|
"name": "FormAssociatedMixin",
|
|
6234
6073
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6236,19 +6075,35 @@
|
|
|
6236
6075
|
},
|
|
6237
6076
|
{
|
|
6238
6077
|
"kind": "field",
|
|
6239
|
-
"name": "
|
|
6240
|
-
"privacy": "
|
|
6078
|
+
"name": "formData",
|
|
6079
|
+
"privacy": "protected",
|
|
6080
|
+
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
6081
|
+
"inheritedFrom": {
|
|
6082
|
+
"name": "FormAssociatedMixin",
|
|
6083
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
6084
|
+
}
|
|
6241
6085
|
},
|
|
6242
6086
|
{
|
|
6243
6087
|
"kind": "field",
|
|
6244
|
-
"name": "
|
|
6245
|
-
"
|
|
6088
|
+
"name": "errorId",
|
|
6089
|
+
"type": {
|
|
6090
|
+
"text": "string"
|
|
6091
|
+
},
|
|
6092
|
+
"privacy": "protected",
|
|
6093
|
+
"default": "\"error\"",
|
|
6094
|
+
"inheritedFrom": {
|
|
6095
|
+
"name": "FormAssociatedMixin",
|
|
6096
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
6097
|
+
}
|
|
6246
6098
|
},
|
|
6247
6099
|
{
|
|
6248
6100
|
"kind": "field",
|
|
6249
|
-
"name": "
|
|
6101
|
+
"name": "hintId",
|
|
6102
|
+
"type": {
|
|
6103
|
+
"text": "string"
|
|
6104
|
+
},
|
|
6250
6105
|
"privacy": "protected",
|
|
6251
|
-
"default": "
|
|
6106
|
+
"default": "\"hint\"",
|
|
6252
6107
|
"inheritedFrom": {
|
|
6253
6108
|
"name": "FormAssociatedMixin",
|
|
6254
6109
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6369,7 +6224,7 @@
|
|
|
6369
6224
|
},
|
|
6370
6225
|
{
|
|
6371
6226
|
"kind": "method",
|
|
6372
|
-
"name": "
|
|
6227
|
+
"name": "handleChange",
|
|
6373
6228
|
"privacy": "protected",
|
|
6374
6229
|
"inheritedFrom": {
|
|
6375
6230
|
"name": "FormAssociatedMixin",
|
|
@@ -6378,8 +6233,8 @@
|
|
|
6378
6233
|
},
|
|
6379
6234
|
{
|
|
6380
6235
|
"kind": "method",
|
|
6381
|
-
"name": "
|
|
6382
|
-
"privacy": "
|
|
6236
|
+
"name": "renderLabel",
|
|
6237
|
+
"privacy": "protected",
|
|
6383
6238
|
"inheritedFrom": {
|
|
6384
6239
|
"name": "FormAssociatedMixin",
|
|
6385
6240
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
@@ -6437,7 +6292,7 @@
|
|
|
6437
6292
|
"text": "boolean"
|
|
6438
6293
|
},
|
|
6439
6294
|
"default": "false",
|
|
6440
|
-
"description": "Makes the
|
|
6295
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
6441
6296
|
"attribute": "disabled",
|
|
6442
6297
|
"reflects": true,
|
|
6443
6298
|
"inheritedFrom": {
|
|
@@ -6451,7 +6306,7 @@
|
|
|
6451
6306
|
"type": {
|
|
6452
6307
|
"text": "string | undefined"
|
|
6453
6308
|
},
|
|
6454
|
-
"description": "The name of the
|
|
6309
|
+
"description": "The name of the form component.",
|
|
6455
6310
|
"attribute": "name",
|
|
6456
6311
|
"inheritedFrom": {
|
|
6457
6312
|
"name": "InputMixin",
|
|
@@ -6465,7 +6320,7 @@
|
|
|
6465
6320
|
"text": "string"
|
|
6466
6321
|
},
|
|
6467
6322
|
"default": "\"\"",
|
|
6468
|
-
"description": "The value of the
|
|
6323
|
+
"description": "The value of the form component.",
|
|
6469
6324
|
"attribute": "value",
|
|
6470
6325
|
"inheritedFrom": {
|
|
6471
6326
|
"name": "InputMixin",
|
|
@@ -6476,7 +6331,7 @@
|
|
|
6476
6331
|
"kind": "field",
|
|
6477
6332
|
"name": "form",
|
|
6478
6333
|
"privacy": "protected",
|
|
6479
|
-
"description": "Gets the form, if any, associated with the
|
|
6334
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
6480
6335
|
"inheritedFrom": {
|
|
6481
6336
|
"name": "InputMixin",
|
|
6482
6337
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -6504,7 +6359,7 @@
|
|
|
6504
6359
|
"description": "An object which controls aspects of the focusing process."
|
|
6505
6360
|
}
|
|
6506
6361
|
],
|
|
6507
|
-
"description": "Programmatically move focus to the component",
|
|
6362
|
+
"description": "Programmatically move focus to the component.",
|
|
6508
6363
|
"inheritedFrom": {
|
|
6509
6364
|
"name": "FocusableMixin",
|
|
6510
6365
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -6543,16 +6398,33 @@
|
|
|
6543
6398
|
}
|
|
6544
6399
|
}
|
|
6545
6400
|
],
|
|
6546
|
-
"
|
|
6401
|
+
"mixins": [
|
|
6547
6402
|
{
|
|
6548
|
-
"name": "
|
|
6549
|
-
"
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
"
|
|
6553
|
-
"
|
|
6554
|
-
|
|
6403
|
+
"name": "FormAssociatedMixin",
|
|
6404
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
6405
|
+
},
|
|
6406
|
+
{
|
|
6407
|
+
"name": "InputMixin",
|
|
6408
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
6409
|
+
},
|
|
6410
|
+
{
|
|
6411
|
+
"name": "FocusableMixin",
|
|
6412
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
6555
6413
|
},
|
|
6414
|
+
{
|
|
6415
|
+
"name": "DraftComponentMixin",
|
|
6416
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
6417
|
+
}
|
|
6418
|
+
],
|
|
6419
|
+
"superclass": {
|
|
6420
|
+
"name": "LitElement",
|
|
6421
|
+
"package": "lit"
|
|
6422
|
+
},
|
|
6423
|
+
"status": "draft",
|
|
6424
|
+
"category": "form",
|
|
6425
|
+
"tagName": "nord-select",
|
|
6426
|
+
"customElement": true,
|
|
6427
|
+
"attributes": [
|
|
6556
6428
|
{
|
|
6557
6429
|
"name": "label",
|
|
6558
6430
|
"type": {
|
|
@@ -6647,7 +6519,7 @@
|
|
|
6647
6519
|
"text": "boolean"
|
|
6648
6520
|
},
|
|
6649
6521
|
"default": "false",
|
|
6650
|
-
"description": "Makes the
|
|
6522
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
6651
6523
|
"fieldName": "disabled",
|
|
6652
6524
|
"inheritedFrom": {
|
|
6653
6525
|
"name": "InputMixin",
|
|
@@ -6659,7 +6531,7 @@
|
|
|
6659
6531
|
"type": {
|
|
6660
6532
|
"text": "string | undefined"
|
|
6661
6533
|
},
|
|
6662
|
-
"description": "The name of the
|
|
6534
|
+
"description": "The name of the form component.",
|
|
6663
6535
|
"fieldName": "name",
|
|
6664
6536
|
"inheritedFrom": {
|
|
6665
6537
|
"name": "InputMixin",
|
|
@@ -6672,7 +6544,7 @@
|
|
|
6672
6544
|
"text": "string"
|
|
6673
6545
|
},
|
|
6674
6546
|
"default": "\"\"",
|
|
6675
|
-
"description": "The value of the
|
|
6547
|
+
"description": "The value of the form component.",
|
|
6676
6548
|
"fieldName": "value",
|
|
6677
6549
|
"inheritedFrom": {
|
|
6678
6550
|
"name": "InputMixin",
|
|
@@ -6680,32 +6552,6 @@
|
|
|
6680
6552
|
}
|
|
6681
6553
|
}
|
|
6682
6554
|
],
|
|
6683
|
-
"mixins": [
|
|
6684
|
-
{
|
|
6685
|
-
"name": "FormAssociatedMixin",
|
|
6686
|
-
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
6687
|
-
},
|
|
6688
|
-
{
|
|
6689
|
-
"name": "InputMixin",
|
|
6690
|
-
"module": "/src/common/mixins/InputMixin.js"
|
|
6691
|
-
},
|
|
6692
|
-
{
|
|
6693
|
-
"name": "FocusableMixin",
|
|
6694
|
-
"module": "/src/common/mixins/FocusableMixin.js"
|
|
6695
|
-
},
|
|
6696
|
-
{
|
|
6697
|
-
"name": "DraftComponentMixin",
|
|
6698
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
6699
|
-
}
|
|
6700
|
-
],
|
|
6701
|
-
"superclass": {
|
|
6702
|
-
"name": "LitElement",
|
|
6703
|
-
"package": "lit"
|
|
6704
|
-
},
|
|
6705
|
-
"status": "draft",
|
|
6706
|
-
"category": "form",
|
|
6707
|
-
"tagName": "nord-radio",
|
|
6708
|
-
"customElement": true,
|
|
6709
6555
|
"events": [
|
|
6710
6556
|
{
|
|
6711
6557
|
"name": "input",
|
|
@@ -6737,20 +6583,138 @@
|
|
|
6737
6583
|
"kind": "js",
|
|
6738
6584
|
"name": "default",
|
|
6739
6585
|
"declaration": {
|
|
6740
|
-
"name": "
|
|
6741
|
-
"module": "src/
|
|
6586
|
+
"name": "Select",
|
|
6587
|
+
"module": "src/select/Select.ts"
|
|
6742
6588
|
}
|
|
6743
6589
|
},
|
|
6744
6590
|
{
|
|
6745
6591
|
"kind": "custom-element-definition",
|
|
6746
|
-
"name": "nord-
|
|
6592
|
+
"name": "nord-select",
|
|
6747
6593
|
"declaration": {
|
|
6748
|
-
"name": "
|
|
6749
|
-
"module": "src/
|
|
6594
|
+
"name": "Select",
|
|
6595
|
+
"module": "src/select/Select.ts"
|
|
6596
|
+
}
|
|
6597
|
+
}
|
|
6598
|
+
],
|
|
6599
|
+
"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 let a user choose one option from an options menu.\n- Use when you have more than 6 options to choose from.\n- Use when you don’t know how many options there will be.\n- Use hint text and placeholder to provide additional, non-critical instructions.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a select if you have less than 6 options to choose from. Consider using radio components instead, if you have enough space to allow it. \n\n</div>\n\n---\n\n## Content guidelines\n\nSelect labels act as a title for the select field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing select labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">Company Name</div>\n\nDo not use colons in select labels:\n\n<div class=\"n-usage n-usage-do\">Choose organization</div>\n<div class=\"n-usage n-usage-dont\">Choose organization:</div>\n"
|
|
6600
|
+
},
|
|
6601
|
+
{
|
|
6602
|
+
"kind": "javascript-module",
|
|
6603
|
+
"path": "src/spinner/Spinner.ts",
|
|
6604
|
+
"declarations": [
|
|
6605
|
+
{
|
|
6606
|
+
"kind": "class",
|
|
6607
|
+
"description": "Spinner component is used to indicate users that their action is being\nprocessed. You can customize the size and color of the spinner with the\nprovided properties.",
|
|
6608
|
+
"name": "Spinner",
|
|
6609
|
+
"members": [
|
|
6610
|
+
{
|
|
6611
|
+
"kind": "field",
|
|
6612
|
+
"name": "size",
|
|
6613
|
+
"type": {
|
|
6614
|
+
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
6615
|
+
},
|
|
6616
|
+
"default": "\"m\"",
|
|
6617
|
+
"description": "The size of the spinner.",
|
|
6618
|
+
"attribute": "size",
|
|
6619
|
+
"reflects": true
|
|
6620
|
+
},
|
|
6621
|
+
{
|
|
6622
|
+
"kind": "field",
|
|
6623
|
+
"name": "color",
|
|
6624
|
+
"type": {
|
|
6625
|
+
"text": "string | undefined"
|
|
6626
|
+
},
|
|
6627
|
+
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
6628
|
+
"attribute": "color",
|
|
6629
|
+
"reflects": true
|
|
6630
|
+
},
|
|
6631
|
+
{
|
|
6632
|
+
"kind": "field",
|
|
6633
|
+
"name": "label",
|
|
6634
|
+
"type": {
|
|
6635
|
+
"text": "string | undefined"
|
|
6636
|
+
},
|
|
6637
|
+
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
6638
|
+
"attribute": "label",
|
|
6639
|
+
"reflects": true
|
|
6640
|
+
},
|
|
6641
|
+
{
|
|
6642
|
+
"kind": "field",
|
|
6643
|
+
"name": "_warningLogged",
|
|
6644
|
+
"type": {
|
|
6645
|
+
"text": "boolean"
|
|
6646
|
+
},
|
|
6647
|
+
"privacy": "private",
|
|
6648
|
+
"static": true,
|
|
6649
|
+
"default": "false",
|
|
6650
|
+
"inheritedFrom": {
|
|
6651
|
+
"name": "DraftComponentMixin",
|
|
6652
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
6653
|
+
}
|
|
6654
|
+
}
|
|
6655
|
+
],
|
|
6656
|
+
"attributes": [
|
|
6657
|
+
{
|
|
6658
|
+
"name": "size",
|
|
6659
|
+
"type": {
|
|
6660
|
+
"text": "\"xs\" | \"s\" | \"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
6661
|
+
},
|
|
6662
|
+
"default": "\"m\"",
|
|
6663
|
+
"description": "The size of the spinner.",
|
|
6664
|
+
"fieldName": "size"
|
|
6665
|
+
},
|
|
6666
|
+
{
|
|
6667
|
+
"name": "color",
|
|
6668
|
+
"type": {
|
|
6669
|
+
"text": "string | undefined"
|
|
6670
|
+
},
|
|
6671
|
+
"description": "The color of the spinner.\nCan accept any valid CSS color value, including custom properties.",
|
|
6672
|
+
"fieldName": "color"
|
|
6673
|
+
},
|
|
6674
|
+
{
|
|
6675
|
+
"name": "label",
|
|
6676
|
+
"type": {
|
|
6677
|
+
"text": "string | undefined"
|
|
6678
|
+
},
|
|
6679
|
+
"description": "An accessible label for the spinner.\nIf no label is supplied, the spinner is hidden from assistive technology.",
|
|
6680
|
+
"fieldName": "label"
|
|
6681
|
+
}
|
|
6682
|
+
],
|
|
6683
|
+
"mixins": [
|
|
6684
|
+
{
|
|
6685
|
+
"name": "DraftComponentMixin",
|
|
6686
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
6687
|
+
}
|
|
6688
|
+
],
|
|
6689
|
+
"superclass": {
|
|
6690
|
+
"name": "LitElement",
|
|
6691
|
+
"package": "lit"
|
|
6692
|
+
},
|
|
6693
|
+
"status": "draft",
|
|
6694
|
+
"category": "feedback",
|
|
6695
|
+
"tagName": "nord-spinner",
|
|
6696
|
+
"customElement": true
|
|
6697
|
+
}
|
|
6698
|
+
],
|
|
6699
|
+
"exports": [
|
|
6700
|
+
{
|
|
6701
|
+
"kind": "js",
|
|
6702
|
+
"name": "default",
|
|
6703
|
+
"declaration": {
|
|
6704
|
+
"name": "Spinner",
|
|
6705
|
+
"module": "src/spinner/Spinner.ts"
|
|
6706
|
+
}
|
|
6707
|
+
},
|
|
6708
|
+
{
|
|
6709
|
+
"kind": "custom-element-definition",
|
|
6710
|
+
"name": "nord-spinner",
|
|
6711
|
+
"declaration": {
|
|
6712
|
+
"name": "Spinner",
|
|
6713
|
+
"module": "src/spinner/Spinner.ts"
|
|
6750
6714
|
}
|
|
6751
6715
|
}
|
|
6752
6716
|
],
|
|
6753
|
-
"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
|
|
6717
|
+
"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 for indicating users that their action is being processed.\n- Use the label property to provide an accessible label for the spinner. If no label is supplied, the spinner is hidden from assistive technology.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to show progress. Favor a progress bar instead.\n\n</div>\n"
|
|
6754
6718
|
},
|
|
6755
6719
|
{
|
|
6756
6720
|
"kind": "javascript-module",
|
|
@@ -6875,7 +6839,8 @@
|
|
|
6875
6839
|
"module": "src/stack/Stack.ts"
|
|
6876
6840
|
}
|
|
6877
6841
|
}
|
|
6878
|
-
]
|
|
6842
|
+
],
|
|
6843
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to stack multiple components vertically or horizontally.\n- Use when you want to adjust the white space between two or more components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for building grid based layouts.\n\n</div>\n"
|
|
6879
6844
|
},
|
|
6880
6845
|
{
|
|
6881
6846
|
"kind": "javascript-module",
|
|
@@ -6974,7 +6939,8 @@
|
|
|
6974
6939
|
"module": "src/table/Table.ts"
|
|
6975
6940
|
}
|
|
6976
6941
|
}
|
|
6977
|
-
]
|
|
6942
|
+
],
|
|
6943
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when you need to display tabular data in a view.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use to display list data.\n- Don’t use tables for layout.\n\n</div>\n\n---\n\n## Content guidelines\n\nHeaders in a table should be clear, accurate and predictable. When writing headers, 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 account</div>\n<div class=\"n-usage n-usage-dont\">User Account</div>\n\nInclude units of measurement symbols in the table header so they aren’t repeated throughout every single column:\n\n<div class=\"n-usage n-usage-do\">Temperature °C</div>\n<div class=\"n-usage n-usage-dont\">Temperature</div>\n\nAvoid unnecessary words and articles in table headers, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Description</div>\n<div class=\"n-usage n-usage-dont\">A description</div>\n\nKeep decimals consistent. For example, don’t use 3 decimals in one row and 2 in others:\n\n<div class=\"n-usage n-usage-do\">30.00<br/>25.00</div>\n<div class=\"n-usage n-usage-dont\">30.000<br/>25.0</div>\n\n---\n\n## Additional considerations\n\n- Nord’s table component acts as a lightweight and un-opinionated component for enhancing tabular data. It is up to the user of this component to make sure that the table markup they use is accessible.\n- It’s important to pay close attention to semantics when authoring tables. The markup in the examples can be used as a starting point. However, be aware that HTML tables have a large feature set which cannot be fully covered in this documentation.\n"
|
|
6978
6944
|
},
|
|
6979
6945
|
{
|
|
6980
6946
|
"kind": "javascript-module",
|
|
@@ -7234,15 +7200,6 @@
|
|
|
7234
7200
|
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
7235
7201
|
}
|
|
7236
7202
|
},
|
|
7237
|
-
{
|
|
7238
|
-
"kind": "method",
|
|
7239
|
-
"name": "renderHint",
|
|
7240
|
-
"privacy": "private",
|
|
7241
|
-
"inheritedFrom": {
|
|
7242
|
-
"name": "FormAssociatedMixin",
|
|
7243
|
-
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
7244
|
-
}
|
|
7245
|
-
},
|
|
7246
7203
|
{
|
|
7247
7204
|
"kind": "method",
|
|
7248
7205
|
"name": "renderError",
|
|
@@ -7295,7 +7252,7 @@
|
|
|
7295
7252
|
"text": "boolean"
|
|
7296
7253
|
},
|
|
7297
7254
|
"default": "false",
|
|
7298
|
-
"description": "Makes the
|
|
7255
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
7299
7256
|
"attribute": "disabled",
|
|
7300
7257
|
"reflects": true,
|
|
7301
7258
|
"inheritedFrom": {
|
|
@@ -7309,7 +7266,7 @@
|
|
|
7309
7266
|
"type": {
|
|
7310
7267
|
"text": "string | undefined"
|
|
7311
7268
|
},
|
|
7312
|
-
"description": "The name of the
|
|
7269
|
+
"description": "The name of the form component.",
|
|
7313
7270
|
"attribute": "name",
|
|
7314
7271
|
"inheritedFrom": {
|
|
7315
7272
|
"name": "InputMixin",
|
|
@@ -7323,7 +7280,7 @@
|
|
|
7323
7280
|
"text": "string"
|
|
7324
7281
|
},
|
|
7325
7282
|
"default": "\"\"",
|
|
7326
|
-
"description": "The value of the
|
|
7283
|
+
"description": "The value of the form component.",
|
|
7327
7284
|
"attribute": "value",
|
|
7328
7285
|
"inheritedFrom": {
|
|
7329
7286
|
"name": "InputMixin",
|
|
@@ -7334,7 +7291,7 @@
|
|
|
7334
7291
|
"kind": "field",
|
|
7335
7292
|
"name": "form",
|
|
7336
7293
|
"privacy": "protected",
|
|
7337
|
-
"description": "Gets the form, if any, associated with the
|
|
7294
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
7338
7295
|
"inheritedFrom": {
|
|
7339
7296
|
"name": "InputMixin",
|
|
7340
7297
|
"module": "src/common/mixins/InputMixin.ts"
|
|
@@ -7362,7 +7319,7 @@
|
|
|
7362
7319
|
"description": "An object which controls aspects of the focusing process."
|
|
7363
7320
|
}
|
|
7364
7321
|
],
|
|
7365
|
-
"description": "Programmatically move focus to the component",
|
|
7322
|
+
"description": "Programmatically move focus to the component.",
|
|
7366
7323
|
"inheritedFrom": {
|
|
7367
7324
|
"name": "FocusableMixin",
|
|
7368
7325
|
"module": "src/common/mixins/FocusableMixin.ts"
|
|
@@ -7505,7 +7462,7 @@
|
|
|
7505
7462
|
"text": "boolean"
|
|
7506
7463
|
},
|
|
7507
7464
|
"default": "false",
|
|
7508
|
-
"description": "Makes the
|
|
7465
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
7509
7466
|
"fieldName": "disabled",
|
|
7510
7467
|
"inheritedFrom": {
|
|
7511
7468
|
"name": "InputMixin",
|
|
@@ -7517,7 +7474,7 @@
|
|
|
7517
7474
|
"type": {
|
|
7518
7475
|
"text": "string | undefined"
|
|
7519
7476
|
},
|
|
7520
|
-
"description": "The name of the
|
|
7477
|
+
"description": "The name of the form component.",
|
|
7521
7478
|
"fieldName": "name",
|
|
7522
7479
|
"inheritedFrom": {
|
|
7523
7480
|
"name": "InputMixin",
|
|
@@ -7530,7 +7487,7 @@
|
|
|
7530
7487
|
"text": "string"
|
|
7531
7488
|
},
|
|
7532
7489
|
"default": "\"\"",
|
|
7533
|
-
"description": "The value of the
|
|
7490
|
+
"description": "The value of the form component.",
|
|
7534
7491
|
"fieldName": "value",
|
|
7535
7492
|
"inheritedFrom": {
|
|
7536
7493
|
"name": "InputMixin",
|
|
@@ -7607,7 +7564,8 @@
|
|
|
7607
7564
|
"module": "src/textarea/Textarea.ts"
|
|
7608
7565
|
}
|
|
7609
7566
|
}
|
|
7610
|
-
]
|
|
7567
|
+
],
|
|
7568
|
+
"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 allow text input where the expected input is long.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when the expected text input is short. Use input component instead.\n\n</div>\n\n---\n\n## Content guidelines\n\nTextarea labels act as a title for the text field. Labels should typically be short and in noun form:\n\n<div class=\"n-usage n-usage-do\">Company name</div>\n<div class=\"n-usage n-usage-dont\">What is your company name?</div>\n\nWhen writing textarea 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\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide Description</div>\n\nWhen a textarea isn’t part of a form and is placed individually on a page, you could provide the textarea label as a call to action:\n\n<div class=\"n-usage n-usage-do\">Leave a comment</div>\n<div class=\"n-usage n-usage-dont\">Comment</div>\n\nDo not use colons in textarea labels:\n\n<div class=\"n-usage n-usage-do\">Provide description</div>\n<div class=\"n-usage n-usage-dont\">Provide description:</div>\n"
|
|
7611
7569
|
},
|
|
7612
7570
|
{
|
|
7613
7571
|
"kind": "javascript-module",
|
|
@@ -7615,7 +7573,7 @@
|
|
|
7615
7573
|
"declarations": [
|
|
7616
7574
|
{
|
|
7617
7575
|
"kind": "class",
|
|
7618
|
-
"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
|
|
7576
|
+
"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.",
|
|
7619
7577
|
"name": "Tooltip",
|
|
7620
7578
|
"slots": [
|
|
7621
7579
|
{
|
|
@@ -7869,7 +7827,8 @@
|
|
|
7869
7827
|
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
7870
7828
|
}
|
|
7871
7829
|
}
|
|
7872
|
-
]
|
|
7830
|
+
],
|
|
7831
|
+
"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 hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
|
|
7873
7832
|
},
|
|
7874
7833
|
{
|
|
7875
7834
|
"kind": "javascript-module",
|
|
@@ -8168,6 +8127,14 @@
|
|
|
8168
8127
|
"module": "src/common/controllers/SlotController.ts"
|
|
8169
8128
|
}
|
|
8170
8129
|
},
|
|
8130
|
+
{
|
|
8131
|
+
"kind": "field",
|
|
8132
|
+
"name": "isEmpty",
|
|
8133
|
+
"inheritedFrom": {
|
|
8134
|
+
"name": "SlotController",
|
|
8135
|
+
"module": "src/common/controllers/SlotController.ts"
|
|
8136
|
+
}
|
|
8137
|
+
},
|
|
8171
8138
|
{
|
|
8172
8139
|
"kind": "field",
|
|
8173
8140
|
"name": "content",
|
|
@@ -8317,6 +8284,10 @@
|
|
|
8317
8284
|
"kind": "field",
|
|
8318
8285
|
"name": "hasContent"
|
|
8319
8286
|
},
|
|
8287
|
+
{
|
|
8288
|
+
"kind": "field",
|
|
8289
|
+
"name": "isEmpty"
|
|
8290
|
+
},
|
|
8320
8291
|
{
|
|
8321
8292
|
"kind": "field",
|
|
8322
8293
|
"name": "content"
|
|
@@ -8798,7 +8769,7 @@
|
|
|
8798
8769
|
"description": "An object which controls aspects of the focusing process."
|
|
8799
8770
|
}
|
|
8800
8771
|
],
|
|
8801
|
-
"description": "Programmatically move focus to the component"
|
|
8772
|
+
"description": "Programmatically move focus to the component."
|
|
8802
8773
|
},
|
|
8803
8774
|
{
|
|
8804
8775
|
"kind": "method",
|
|
@@ -9208,11 +9179,6 @@
|
|
|
9208
9179
|
"name": "renderLabel",
|
|
9209
9180
|
"privacy": "protected"
|
|
9210
9181
|
},
|
|
9211
|
-
{
|
|
9212
|
-
"kind": "method",
|
|
9213
|
-
"name": "renderHint",
|
|
9214
|
-
"privacy": "private"
|
|
9215
|
-
},
|
|
9216
9182
|
{
|
|
9217
9183
|
"kind": "method",
|
|
9218
9184
|
"name": "renderError",
|
|
@@ -9397,7 +9363,7 @@
|
|
|
9397
9363
|
"text": "boolean"
|
|
9398
9364
|
},
|
|
9399
9365
|
"default": "false",
|
|
9400
|
-
"description": "Makes the
|
|
9366
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
9401
9367
|
"attribute": "disabled",
|
|
9402
9368
|
"reflects": true
|
|
9403
9369
|
},
|
|
@@ -9407,7 +9373,7 @@
|
|
|
9407
9373
|
"type": {
|
|
9408
9374
|
"text": "string | undefined"
|
|
9409
9375
|
},
|
|
9410
|
-
"description": "The name of the
|
|
9376
|
+
"description": "The name of the form component.",
|
|
9411
9377
|
"attribute": "name"
|
|
9412
9378
|
},
|
|
9413
9379
|
{
|
|
@@ -9417,14 +9383,14 @@
|
|
|
9417
9383
|
"text": "string"
|
|
9418
9384
|
},
|
|
9419
9385
|
"default": "\"\"",
|
|
9420
|
-
"description": "The value of the
|
|
9386
|
+
"description": "The value of the form component.",
|
|
9421
9387
|
"attribute": "value"
|
|
9422
9388
|
},
|
|
9423
9389
|
{
|
|
9424
9390
|
"kind": "field",
|
|
9425
9391
|
"name": "form",
|
|
9426
9392
|
"privacy": "protected",
|
|
9427
|
-
"description": "Gets the form, if any, associated with the
|
|
9393
|
+
"description": "Gets the form, if any, associated with the form element."
|
|
9428
9394
|
}
|
|
9429
9395
|
],
|
|
9430
9396
|
"attributes": [
|
|
@@ -9434,7 +9400,7 @@
|
|
|
9434
9400
|
"text": "boolean"
|
|
9435
9401
|
},
|
|
9436
9402
|
"default": "false",
|
|
9437
|
-
"description": "Makes the
|
|
9403
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
9438
9404
|
"fieldName": "disabled"
|
|
9439
9405
|
},
|
|
9440
9406
|
{
|
|
@@ -9442,7 +9408,7 @@
|
|
|
9442
9408
|
"type": {
|
|
9443
9409
|
"text": "string | undefined"
|
|
9444
9410
|
},
|
|
9445
|
-
"description": "The name of the
|
|
9411
|
+
"description": "The name of the form component.",
|
|
9446
9412
|
"fieldName": "name"
|
|
9447
9413
|
},
|
|
9448
9414
|
{
|
|
@@ -9451,7 +9417,7 @@
|
|
|
9451
9417
|
"text": "string"
|
|
9452
9418
|
},
|
|
9453
9419
|
"default": "\"\"",
|
|
9454
|
-
"description": "The value of the
|
|
9420
|
+
"description": "The value of the form component.",
|
|
9455
9421
|
"fieldName": "value"
|
|
9456
9422
|
}
|
|
9457
9423
|
],
|