@nordhealth/components 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +914 -235
- package/lib/Toggle.js +2 -0
- package/lib/Toggle.js.map +1 -0
- package/lib/bundle.js +1 -1
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/toggle/Toggle.d.ts +38 -0
- package/lib/src/toggle/Toggle.test.d.ts +3 -0
- package/package.json +3 -3
package/custom-elements.json
CHANGED
|
@@ -286,6 +286,14 @@
|
|
|
286
286
|
"name": "Translation",
|
|
287
287
|
"module": "\"./localization/translation.js\""
|
|
288
288
|
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"kind": "js",
|
|
292
|
+
"name": "Toggle",
|
|
293
|
+
"declaration": {
|
|
294
|
+
"name": "default",
|
|
295
|
+
"module": "\"./toggle/Toggle.js\""
|
|
296
|
+
}
|
|
289
297
|
}
|
|
290
298
|
]
|
|
291
299
|
},
|
|
@@ -357,6 +365,74 @@
|
|
|
357
365
|
],
|
|
358
366
|
"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"
|
|
359
367
|
},
|
|
368
|
+
{
|
|
369
|
+
"kind": "javascript-module",
|
|
370
|
+
"path": "src/banner/Banner.ts",
|
|
371
|
+
"declarations": [
|
|
372
|
+
{
|
|
373
|
+
"kind": "class",
|
|
374
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
375
|
+
"name": "Banner",
|
|
376
|
+
"slots": [
|
|
377
|
+
{
|
|
378
|
+
"description": "default slot",
|
|
379
|
+
"name": ""
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"members": [
|
|
383
|
+
{
|
|
384
|
+
"kind": "field",
|
|
385
|
+
"name": "variant",
|
|
386
|
+
"type": {
|
|
387
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
388
|
+
},
|
|
389
|
+
"default": "\"info\"",
|
|
390
|
+
"description": "The style variant of the banner.",
|
|
391
|
+
"attribute": "variant",
|
|
392
|
+
"reflects": true
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"attributes": [
|
|
396
|
+
{
|
|
397
|
+
"name": "variant",
|
|
398
|
+
"type": {
|
|
399
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
400
|
+
},
|
|
401
|
+
"default": "\"info\"",
|
|
402
|
+
"description": "The style variant of the banner.",
|
|
403
|
+
"fieldName": "variant"
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"superclass": {
|
|
407
|
+
"name": "LitElement",
|
|
408
|
+
"package": "lit"
|
|
409
|
+
},
|
|
410
|
+
"status": "ready",
|
|
411
|
+
"category": "feedback",
|
|
412
|
+
"tagName": "nord-banner",
|
|
413
|
+
"customElement": true
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"exports": [
|
|
417
|
+
{
|
|
418
|
+
"kind": "js",
|
|
419
|
+
"name": "default",
|
|
420
|
+
"declaration": {
|
|
421
|
+
"name": "Banner",
|
|
422
|
+
"module": "src/banner/Banner.ts"
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"kind": "custom-element-definition",
|
|
427
|
+
"name": "nord-banner",
|
|
428
|
+
"declaration": {
|
|
429
|
+
"name": "Banner",
|
|
430
|
+
"module": "src/banner/Banner.ts"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
435
|
+
},
|
|
360
436
|
{
|
|
361
437
|
"kind": "javascript-module",
|
|
362
438
|
"path": "src/button/Button.ts",
|
|
@@ -795,74 +871,6 @@
|
|
|
795
871
|
],
|
|
796
872
|
"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| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
|
|
797
873
|
},
|
|
798
|
-
{
|
|
799
|
-
"kind": "javascript-module",
|
|
800
|
-
"path": "src/banner/Banner.ts",
|
|
801
|
-
"declarations": [
|
|
802
|
-
{
|
|
803
|
-
"kind": "class",
|
|
804
|
-
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
805
|
-
"name": "Banner",
|
|
806
|
-
"slots": [
|
|
807
|
-
{
|
|
808
|
-
"description": "default slot",
|
|
809
|
-
"name": ""
|
|
810
|
-
}
|
|
811
|
-
],
|
|
812
|
-
"members": [
|
|
813
|
-
{
|
|
814
|
-
"kind": "field",
|
|
815
|
-
"name": "variant",
|
|
816
|
-
"type": {
|
|
817
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
818
|
-
},
|
|
819
|
-
"default": "\"info\"",
|
|
820
|
-
"description": "The style variant of the banner.",
|
|
821
|
-
"attribute": "variant",
|
|
822
|
-
"reflects": true
|
|
823
|
-
}
|
|
824
|
-
],
|
|
825
|
-
"attributes": [
|
|
826
|
-
{
|
|
827
|
-
"name": "variant",
|
|
828
|
-
"type": {
|
|
829
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
830
|
-
},
|
|
831
|
-
"default": "\"info\"",
|
|
832
|
-
"description": "The style variant of the banner.",
|
|
833
|
-
"fieldName": "variant"
|
|
834
|
-
}
|
|
835
|
-
],
|
|
836
|
-
"superclass": {
|
|
837
|
-
"name": "LitElement",
|
|
838
|
-
"package": "lit"
|
|
839
|
-
},
|
|
840
|
-
"status": "ready",
|
|
841
|
-
"category": "feedback",
|
|
842
|
-
"tagName": "nord-banner",
|
|
843
|
-
"customElement": true
|
|
844
|
-
}
|
|
845
|
-
],
|
|
846
|
-
"exports": [
|
|
847
|
-
{
|
|
848
|
-
"kind": "js",
|
|
849
|
-
"name": "default",
|
|
850
|
-
"declaration": {
|
|
851
|
-
"name": "Banner",
|
|
852
|
-
"module": "src/banner/Banner.ts"
|
|
853
|
-
}
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
"kind": "custom-element-definition",
|
|
857
|
-
"name": "nord-banner",
|
|
858
|
-
"declaration": {
|
|
859
|
-
"name": "Banner",
|
|
860
|
-
"module": "src/banner/Banner.ts"
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
],
|
|
864
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n"
|
|
865
|
-
},
|
|
866
874
|
{
|
|
867
875
|
"kind": "javascript-module",
|
|
868
876
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -1383,105 +1391,60 @@
|
|
|
1383
1391
|
},
|
|
1384
1392
|
{
|
|
1385
1393
|
"kind": "javascript-module",
|
|
1386
|
-
"path": "src/
|
|
1394
|
+
"path": "src/card/Card.ts",
|
|
1387
1395
|
"declarations": [
|
|
1388
1396
|
{
|
|
1389
1397
|
"kind": "class",
|
|
1390
|
-
"description": "
|
|
1391
|
-
"name": "
|
|
1398
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1399
|
+
"name": "Card",
|
|
1400
|
+
"slots": [
|
|
1401
|
+
{
|
|
1402
|
+
"description": "The card content.",
|
|
1403
|
+
"name": ""
|
|
1404
|
+
},
|
|
1405
|
+
{
|
|
1406
|
+
"description": "Optional slot that holds a header for the card.",
|
|
1407
|
+
"name": "header"
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
1411
|
+
"name": "footer"
|
|
1412
|
+
}
|
|
1413
|
+
],
|
|
1392
1414
|
"members": [
|
|
1393
1415
|
{
|
|
1394
1416
|
"kind": "field",
|
|
1395
|
-
"name": "
|
|
1396
|
-
"type": {
|
|
1397
|
-
"text": "States<typeof transition>"
|
|
1398
|
-
},
|
|
1417
|
+
"name": "headerSlot",
|
|
1399
1418
|
"privacy": "private",
|
|
1400
|
-
"default": "\"
|
|
1419
|
+
"default": "new SlotController(this, \"header\")"
|
|
1401
1420
|
},
|
|
1402
1421
|
{
|
|
1403
1422
|
"kind": "field",
|
|
1404
|
-
"name": "
|
|
1405
|
-
"
|
|
1406
|
-
|
|
1407
|
-
},
|
|
1408
|
-
"default": "\"m\"",
|
|
1409
|
-
"description": "The size of the avatar.",
|
|
1410
|
-
"attribute": "size",
|
|
1411
|
-
"reflects": true
|
|
1423
|
+
"name": "footerSlot",
|
|
1424
|
+
"privacy": "private",
|
|
1425
|
+
"default": "new SlotController(this, \"footer\")"
|
|
1412
1426
|
},
|
|
1413
1427
|
{
|
|
1414
1428
|
"kind": "field",
|
|
1415
|
-
"name": "
|
|
1429
|
+
"name": "padding",
|
|
1416
1430
|
"type": {
|
|
1417
|
-
"text": "
|
|
1431
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1418
1432
|
},
|
|
1419
|
-
"
|
|
1420
|
-
"
|
|
1433
|
+
"default": "\"m\"",
|
|
1434
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1435
|
+
"attribute": "padding",
|
|
1421
1436
|
"reflects": true
|
|
1422
|
-
},
|
|
1423
|
-
{
|
|
1424
|
-
"kind": "field",
|
|
1425
|
-
"name": "name",
|
|
1426
|
-
"type": {
|
|
1427
|
-
"text": "string"
|
|
1428
|
-
},
|
|
1429
|
-
"default": "\"\"",
|
|
1430
|
-
"description": "The name of the person.",
|
|
1431
|
-
"attribute": "name"
|
|
1432
|
-
},
|
|
1433
|
-
{
|
|
1434
|
-
"kind": "method",
|
|
1435
|
-
"name": "handleSrcChange",
|
|
1436
|
-
"privacy": "protected"
|
|
1437
|
-
},
|
|
1438
|
-
{
|
|
1439
|
-
"kind": "method",
|
|
1440
|
-
"name": "renderImage",
|
|
1441
|
-
"privacy": "protected"
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
"kind": "method",
|
|
1445
|
-
"name": "renderFallback",
|
|
1446
|
-
"privacy": "protected"
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
"kind": "method",
|
|
1450
|
-
"name": "handleLoad",
|
|
1451
|
-
"privacy": "private"
|
|
1452
|
-
},
|
|
1453
|
-
{
|
|
1454
|
-
"kind": "method",
|
|
1455
|
-
"name": "handleError",
|
|
1456
|
-
"privacy": "private"
|
|
1457
1437
|
}
|
|
1458
1438
|
],
|
|
1459
1439
|
"attributes": [
|
|
1460
1440
|
{
|
|
1461
|
-
"name": "
|
|
1441
|
+
"name": "padding",
|
|
1462
1442
|
"type": {
|
|
1463
|
-
"text": "\"m\" | \"l\" | \"
|
|
1443
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
1464
1444
|
},
|
|
1465
1445
|
"default": "\"m\"",
|
|
1466
|
-
"description": "
|
|
1467
|
-
"fieldName": "
|
|
1468
|
-
},
|
|
1469
|
-
{
|
|
1470
|
-
"name": "src",
|
|
1471
|
-
"type": {
|
|
1472
|
-
"text": "string | undefined"
|
|
1473
|
-
},
|
|
1474
|
-
"description": "The URL of the avatar image uploaded by the user.",
|
|
1475
|
-
"fieldName": "src"
|
|
1476
|
-
},
|
|
1477
|
-
{
|
|
1478
|
-
"name": "name",
|
|
1479
|
-
"type": {
|
|
1480
|
-
"text": "string"
|
|
1481
|
-
},
|
|
1482
|
-
"default": "\"\"",
|
|
1483
|
-
"description": "The name of the person.",
|
|
1484
|
-
"fieldName": "name"
|
|
1446
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1447
|
+
"fieldName": "padding"
|
|
1485
1448
|
}
|
|
1486
1449
|
],
|
|
1487
1450
|
"superclass": {
|
|
@@ -1489,96 +1452,8 @@
|
|
|
1489
1452
|
"package": "lit"
|
|
1490
1453
|
},
|
|
1491
1454
|
"status": "ready",
|
|
1492
|
-
"category": "
|
|
1493
|
-
"tagName": "nord-
|
|
1494
|
-
"customElement": true
|
|
1495
|
-
}
|
|
1496
|
-
],
|
|
1497
|
-
"exports": [
|
|
1498
|
-
{
|
|
1499
|
-
"kind": "js",
|
|
1500
|
-
"name": "default",
|
|
1501
|
-
"declaration": {
|
|
1502
|
-
"name": "Avatar",
|
|
1503
|
-
"module": "src/avatar/Avatar.ts"
|
|
1504
|
-
}
|
|
1505
|
-
},
|
|
1506
|
-
{
|
|
1507
|
-
"kind": "custom-element-definition",
|
|
1508
|
-
"name": "nord-avatar",
|
|
1509
|
-
"declaration": {
|
|
1510
|
-
"name": "Avatar",
|
|
1511
|
-
"module": "src/avatar/Avatar.ts"
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
],
|
|
1515
|
-
"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- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n\n</div>\n"
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
"kind": "javascript-module",
|
|
1519
|
-
"path": "src/card/Card.ts",
|
|
1520
|
-
"declarations": [
|
|
1521
|
-
{
|
|
1522
|
-
"kind": "class",
|
|
1523
|
-
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
1524
|
-
"name": "Card",
|
|
1525
|
-
"slots": [
|
|
1526
|
-
{
|
|
1527
|
-
"description": "The card content.",
|
|
1528
|
-
"name": ""
|
|
1529
|
-
},
|
|
1530
|
-
{
|
|
1531
|
-
"description": "Optional slot that holds a header for the card.",
|
|
1532
|
-
"name": "header"
|
|
1533
|
-
},
|
|
1534
|
-
{
|
|
1535
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
1536
|
-
"name": "footer"
|
|
1537
|
-
}
|
|
1538
|
-
],
|
|
1539
|
-
"members": [
|
|
1540
|
-
{
|
|
1541
|
-
"kind": "field",
|
|
1542
|
-
"name": "headerSlot",
|
|
1543
|
-
"privacy": "private",
|
|
1544
|
-
"default": "new SlotController(this, \"header\")"
|
|
1545
|
-
},
|
|
1546
|
-
{
|
|
1547
|
-
"kind": "field",
|
|
1548
|
-
"name": "footerSlot",
|
|
1549
|
-
"privacy": "private",
|
|
1550
|
-
"default": "new SlotController(this, \"footer\")"
|
|
1551
|
-
},
|
|
1552
|
-
{
|
|
1553
|
-
"kind": "field",
|
|
1554
|
-
"name": "padding",
|
|
1555
|
-
"type": {
|
|
1556
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
1557
|
-
},
|
|
1558
|
-
"default": "\"m\"",
|
|
1559
|
-
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1560
|
-
"attribute": "padding",
|
|
1561
|
-
"reflects": true
|
|
1562
|
-
}
|
|
1563
|
-
],
|
|
1564
|
-
"attributes": [
|
|
1565
|
-
{
|
|
1566
|
-
"name": "padding",
|
|
1567
|
-
"type": {
|
|
1568
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
1569
|
-
},
|
|
1570
|
-
"default": "\"m\"",
|
|
1571
|
-
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
1572
|
-
"fieldName": "padding"
|
|
1573
|
-
}
|
|
1574
|
-
],
|
|
1575
|
-
"superclass": {
|
|
1576
|
-
"name": "LitElement",
|
|
1577
|
-
"package": "lit"
|
|
1578
|
-
},
|
|
1579
|
-
"status": "ready",
|
|
1580
|
-
"category": "structure",
|
|
1581
|
-
"tagName": "nord-card",
|
|
1455
|
+
"category": "structure",
|
|
1456
|
+
"tagName": "nord-card",
|
|
1582
1457
|
"customElement": true
|
|
1583
1458
|
}
|
|
1584
1459
|
],
|
|
@@ -2214,7 +2089,7 @@
|
|
|
2214
2089
|
}
|
|
2215
2090
|
}
|
|
2216
2091
|
],
|
|
2217
|
-
"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-
|
|
2092
|
+
"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- Avoid using 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"
|
|
2218
2093
|
},
|
|
2219
2094
|
{
|
|
2220
2095
|
"kind": "javascript-module",
|
|
@@ -2805,6 +2680,139 @@
|
|
|
2805
2680
|
],
|
|
2806
2681
|
"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"
|
|
2807
2682
|
},
|
|
2683
|
+
{
|
|
2684
|
+
"kind": "javascript-module",
|
|
2685
|
+
"path": "src/avatar/Avatar.ts",
|
|
2686
|
+
"declarations": [
|
|
2687
|
+
{
|
|
2688
|
+
"kind": "class",
|
|
2689
|
+
"description": "Avatar is used for showing a thumbnail representation of a user or entity.\nDefault avatar illustration is displayed when no src is specified.",
|
|
2690
|
+
"name": "Avatar",
|
|
2691
|
+
"members": [
|
|
2692
|
+
{
|
|
2693
|
+
"kind": "field",
|
|
2694
|
+
"name": "state",
|
|
2695
|
+
"type": {
|
|
2696
|
+
"text": "States<typeof transition>"
|
|
2697
|
+
},
|
|
2698
|
+
"privacy": "private",
|
|
2699
|
+
"default": "\"initial\""
|
|
2700
|
+
},
|
|
2701
|
+
{
|
|
2702
|
+
"kind": "field",
|
|
2703
|
+
"name": "size",
|
|
2704
|
+
"type": {
|
|
2705
|
+
"text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
2706
|
+
},
|
|
2707
|
+
"default": "\"m\"",
|
|
2708
|
+
"description": "The size of the avatar.",
|
|
2709
|
+
"attribute": "size",
|
|
2710
|
+
"reflects": true
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"kind": "field",
|
|
2714
|
+
"name": "src",
|
|
2715
|
+
"type": {
|
|
2716
|
+
"text": "string | undefined"
|
|
2717
|
+
},
|
|
2718
|
+
"description": "The URL of the avatar image uploaded by the user.",
|
|
2719
|
+
"attribute": "src",
|
|
2720
|
+
"reflects": true
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
"kind": "field",
|
|
2724
|
+
"name": "name",
|
|
2725
|
+
"type": {
|
|
2726
|
+
"text": "string"
|
|
2727
|
+
},
|
|
2728
|
+
"default": "\"\"",
|
|
2729
|
+
"description": "The name of the person.",
|
|
2730
|
+
"attribute": "name"
|
|
2731
|
+
},
|
|
2732
|
+
{
|
|
2733
|
+
"kind": "method",
|
|
2734
|
+
"name": "handleSrcChange",
|
|
2735
|
+
"privacy": "protected"
|
|
2736
|
+
},
|
|
2737
|
+
{
|
|
2738
|
+
"kind": "method",
|
|
2739
|
+
"name": "renderImage",
|
|
2740
|
+
"privacy": "protected"
|
|
2741
|
+
},
|
|
2742
|
+
{
|
|
2743
|
+
"kind": "method",
|
|
2744
|
+
"name": "renderFallback",
|
|
2745
|
+
"privacy": "protected"
|
|
2746
|
+
},
|
|
2747
|
+
{
|
|
2748
|
+
"kind": "method",
|
|
2749
|
+
"name": "handleLoad",
|
|
2750
|
+
"privacy": "private"
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
"kind": "method",
|
|
2754
|
+
"name": "handleError",
|
|
2755
|
+
"privacy": "private"
|
|
2756
|
+
}
|
|
2757
|
+
],
|
|
2758
|
+
"attributes": [
|
|
2759
|
+
{
|
|
2760
|
+
"name": "size",
|
|
2761
|
+
"type": {
|
|
2762
|
+
"text": "\"m\" | \"l\" | \"xl\" | \"xxl\""
|
|
2763
|
+
},
|
|
2764
|
+
"default": "\"m\"",
|
|
2765
|
+
"description": "The size of the avatar.",
|
|
2766
|
+
"fieldName": "size"
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
"name": "src",
|
|
2770
|
+
"type": {
|
|
2771
|
+
"text": "string | undefined"
|
|
2772
|
+
},
|
|
2773
|
+
"description": "The URL of the avatar image uploaded by the user.",
|
|
2774
|
+
"fieldName": "src"
|
|
2775
|
+
},
|
|
2776
|
+
{
|
|
2777
|
+
"name": "name",
|
|
2778
|
+
"type": {
|
|
2779
|
+
"text": "string"
|
|
2780
|
+
},
|
|
2781
|
+
"default": "\"\"",
|
|
2782
|
+
"description": "The name of the person.",
|
|
2783
|
+
"fieldName": "name"
|
|
2784
|
+
}
|
|
2785
|
+
],
|
|
2786
|
+
"superclass": {
|
|
2787
|
+
"name": "LitElement",
|
|
2788
|
+
"package": "lit"
|
|
2789
|
+
},
|
|
2790
|
+
"status": "ready",
|
|
2791
|
+
"category": "image",
|
|
2792
|
+
"tagName": "nord-avatar",
|
|
2793
|
+
"customElement": true
|
|
2794
|
+
}
|
|
2795
|
+
],
|
|
2796
|
+
"exports": [
|
|
2797
|
+
{
|
|
2798
|
+
"kind": "js",
|
|
2799
|
+
"name": "default",
|
|
2800
|
+
"declaration": {
|
|
2801
|
+
"name": "Avatar",
|
|
2802
|
+
"module": "src/avatar/Avatar.ts"
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
{
|
|
2806
|
+
"kind": "custom-element-definition",
|
|
2807
|
+
"name": "nord-avatar",
|
|
2808
|
+
"declaration": {
|
|
2809
|
+
"name": "Avatar",
|
|
2810
|
+
"module": "src/avatar/Avatar.ts"
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
],
|
|
2814
|
+
"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- Always add the name of the person using the `name` property.\n- For the best results, use square images or images cropped into a square.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Try to avoid using landscape or portrait images as avatars. Let users crop their images before or after uploading if possible.\n\n</div>\n"
|
|
2815
|
+
},
|
|
2808
2816
|
{
|
|
2809
2817
|
"kind": "javascript-module",
|
|
2810
2818
|
"path": "src/common/attribute.ts",
|
|
@@ -9936,6 +9944,677 @@
|
|
|
9936
9944
|
],
|
|
9937
9945
|
"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"
|
|
9938
9946
|
},
|
|
9947
|
+
{
|
|
9948
|
+
"kind": "javascript-module",
|
|
9949
|
+
"path": "src/toggle/Toggle.ts",
|
|
9950
|
+
"declarations": [
|
|
9951
|
+
{
|
|
9952
|
+
"kind": "class",
|
|
9953
|
+
"description": "Toggle switch gives control over a feature or option that can be\nturned on or off. If a physical switch would work for the action, a\ntoggle is probably the best component to use.",
|
|
9954
|
+
"name": "Toggle",
|
|
9955
|
+
"slots": [
|
|
9956
|
+
{
|
|
9957
|
+
"description": "Use when a label requires more than plain text.",
|
|
9958
|
+
"name": "label"
|
|
9959
|
+
},
|
|
9960
|
+
{
|
|
9961
|
+
"description": "Optional slot that holds hint text for the input.",
|
|
9962
|
+
"name": "hint"
|
|
9963
|
+
},
|
|
9964
|
+
{
|
|
9965
|
+
"description": "Optional slot that holds error text for the input.",
|
|
9966
|
+
"name": "error"
|
|
9967
|
+
}
|
|
9968
|
+
],
|
|
9969
|
+
"members": [
|
|
9970
|
+
{
|
|
9971
|
+
"kind": "field",
|
|
9972
|
+
"name": "formValue",
|
|
9973
|
+
"privacy": "protected",
|
|
9974
|
+
"inheritedFrom": {
|
|
9975
|
+
"name": "FormAssociatedMixin",
|
|
9976
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
9977
|
+
}
|
|
9978
|
+
},
|
|
9979
|
+
{
|
|
9980
|
+
"kind": "field",
|
|
9981
|
+
"name": "checked",
|
|
9982
|
+
"type": {
|
|
9983
|
+
"text": "boolean"
|
|
9984
|
+
},
|
|
9985
|
+
"default": "false",
|
|
9986
|
+
"description": "Controls whether the toggle is checked or not.",
|
|
9987
|
+
"attribute": "checked"
|
|
9988
|
+
},
|
|
9989
|
+
{
|
|
9990
|
+
"kind": "field",
|
|
9991
|
+
"name": "reverse",
|
|
9992
|
+
"type": {
|
|
9993
|
+
"text": "boolean"
|
|
9994
|
+
},
|
|
9995
|
+
"default": "false",
|
|
9996
|
+
"description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
|
|
9997
|
+
"attribute": "reverse"
|
|
9998
|
+
},
|
|
9999
|
+
{
|
|
10000
|
+
"kind": "field",
|
|
10001
|
+
"name": "size",
|
|
10002
|
+
"type": {
|
|
10003
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
10004
|
+
},
|
|
10005
|
+
"default": "\"m\"",
|
|
10006
|
+
"description": "The size of the toggle switch.",
|
|
10007
|
+
"attribute": "size",
|
|
10008
|
+
"reflects": true
|
|
10009
|
+
},
|
|
10010
|
+
{
|
|
10011
|
+
"kind": "method",
|
|
10012
|
+
"name": "handleChange",
|
|
10013
|
+
"privacy": "protected",
|
|
10014
|
+
"parameters": [
|
|
10015
|
+
{
|
|
10016
|
+
"name": "e",
|
|
10017
|
+
"type": {
|
|
10018
|
+
"text": "Event"
|
|
10019
|
+
}
|
|
10020
|
+
}
|
|
10021
|
+
],
|
|
10022
|
+
"return": {
|
|
10023
|
+
"type": {
|
|
10024
|
+
"text": "void"
|
|
10025
|
+
}
|
|
10026
|
+
},
|
|
10027
|
+
"inheritedFrom": {
|
|
10028
|
+
"name": "FormAssociatedMixin",
|
|
10029
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10030
|
+
}
|
|
10031
|
+
},
|
|
10032
|
+
{
|
|
10033
|
+
"kind": "field",
|
|
10034
|
+
"name": "_warningLogged",
|
|
10035
|
+
"type": {
|
|
10036
|
+
"text": "boolean"
|
|
10037
|
+
},
|
|
10038
|
+
"privacy": "private",
|
|
10039
|
+
"static": true,
|
|
10040
|
+
"default": "false",
|
|
10041
|
+
"inheritedFrom": {
|
|
10042
|
+
"name": "DraftComponentMixin",
|
|
10043
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
10044
|
+
}
|
|
10045
|
+
},
|
|
10046
|
+
{
|
|
10047
|
+
"kind": "field",
|
|
10048
|
+
"name": "labelSlot",
|
|
10049
|
+
"privacy": "protected",
|
|
10050
|
+
"default": "new SlotController(this, \"label\")",
|
|
10051
|
+
"inheritedFrom": {
|
|
10052
|
+
"name": "FormAssociatedMixin",
|
|
10053
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10054
|
+
}
|
|
10055
|
+
},
|
|
10056
|
+
{
|
|
10057
|
+
"kind": "field",
|
|
10058
|
+
"name": "errorSlot",
|
|
10059
|
+
"privacy": "protected",
|
|
10060
|
+
"default": "new SlotController(this, \"error\")",
|
|
10061
|
+
"inheritedFrom": {
|
|
10062
|
+
"name": "FormAssociatedMixin",
|
|
10063
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10064
|
+
}
|
|
10065
|
+
},
|
|
10066
|
+
{
|
|
10067
|
+
"kind": "field",
|
|
10068
|
+
"name": "hintSlot",
|
|
10069
|
+
"privacy": "protected",
|
|
10070
|
+
"default": "new SlotController(this, \"hint\")",
|
|
10071
|
+
"inheritedFrom": {
|
|
10072
|
+
"name": "FormAssociatedMixin",
|
|
10073
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10074
|
+
}
|
|
10075
|
+
},
|
|
10076
|
+
{
|
|
10077
|
+
"kind": "field",
|
|
10078
|
+
"name": "formData",
|
|
10079
|
+
"privacy": "protected",
|
|
10080
|
+
"default": "new FormDataController(this, { value: () => this.formValue })",
|
|
10081
|
+
"inheritedFrom": {
|
|
10082
|
+
"name": "FormAssociatedMixin",
|
|
10083
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10084
|
+
}
|
|
10085
|
+
},
|
|
10086
|
+
{
|
|
10087
|
+
"kind": "field",
|
|
10088
|
+
"name": "inputId",
|
|
10089
|
+
"type": {
|
|
10090
|
+
"text": "string"
|
|
10091
|
+
},
|
|
10092
|
+
"privacy": "protected",
|
|
10093
|
+
"default": "\"input\"",
|
|
10094
|
+
"inheritedFrom": {
|
|
10095
|
+
"name": "FormAssociatedMixin",
|
|
10096
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10097
|
+
}
|
|
10098
|
+
},
|
|
10099
|
+
{
|
|
10100
|
+
"kind": "field",
|
|
10101
|
+
"name": "errorId",
|
|
10102
|
+
"type": {
|
|
10103
|
+
"text": "string"
|
|
10104
|
+
},
|
|
10105
|
+
"privacy": "protected",
|
|
10106
|
+
"default": "\"error\"",
|
|
10107
|
+
"inheritedFrom": {
|
|
10108
|
+
"name": "FormAssociatedMixin",
|
|
10109
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10110
|
+
}
|
|
10111
|
+
},
|
|
10112
|
+
{
|
|
10113
|
+
"kind": "field",
|
|
10114
|
+
"name": "hintId",
|
|
10115
|
+
"type": {
|
|
10116
|
+
"text": "string"
|
|
10117
|
+
},
|
|
10118
|
+
"privacy": "protected",
|
|
10119
|
+
"default": "\"hint\"",
|
|
10120
|
+
"inheritedFrom": {
|
|
10121
|
+
"name": "FormAssociatedMixin",
|
|
10122
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10123
|
+
}
|
|
10124
|
+
},
|
|
10125
|
+
{
|
|
10126
|
+
"kind": "field",
|
|
10127
|
+
"name": "label",
|
|
10128
|
+
"type": {
|
|
10129
|
+
"text": "string"
|
|
10130
|
+
},
|
|
10131
|
+
"default": "\"\"",
|
|
10132
|
+
"description": "Label for the input.",
|
|
10133
|
+
"attribute": "label",
|
|
10134
|
+
"inheritedFrom": {
|
|
10135
|
+
"name": "FormAssociatedMixin",
|
|
10136
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10137
|
+
}
|
|
10138
|
+
},
|
|
10139
|
+
{
|
|
10140
|
+
"kind": "field",
|
|
10141
|
+
"name": "hint",
|
|
10142
|
+
"type": {
|
|
10143
|
+
"text": "string | undefined"
|
|
10144
|
+
},
|
|
10145
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
10146
|
+
"attribute": "hint",
|
|
10147
|
+
"inheritedFrom": {
|
|
10148
|
+
"name": "FormAssociatedMixin",
|
|
10149
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10150
|
+
}
|
|
10151
|
+
},
|
|
10152
|
+
{
|
|
10153
|
+
"kind": "field",
|
|
10154
|
+
"name": "hideLabel",
|
|
10155
|
+
"type": {
|
|
10156
|
+
"text": "boolean"
|
|
10157
|
+
},
|
|
10158
|
+
"default": "false",
|
|
10159
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
10160
|
+
"attribute": "hide-label",
|
|
10161
|
+
"inheritedFrom": {
|
|
10162
|
+
"name": "FormAssociatedMixin",
|
|
10163
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10164
|
+
}
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
"kind": "field",
|
|
10168
|
+
"name": "placeholder",
|
|
10169
|
+
"type": {
|
|
10170
|
+
"text": "string | undefined"
|
|
10171
|
+
},
|
|
10172
|
+
"description": "Placeholder text to display within the input.",
|
|
10173
|
+
"attribute": "placeholder",
|
|
10174
|
+
"inheritedFrom": {
|
|
10175
|
+
"name": "FormAssociatedMixin",
|
|
10176
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10177
|
+
}
|
|
10178
|
+
},
|
|
10179
|
+
{
|
|
10180
|
+
"kind": "field",
|
|
10181
|
+
"name": "error",
|
|
10182
|
+
"type": {
|
|
10183
|
+
"text": "string | undefined"
|
|
10184
|
+
},
|
|
10185
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
10186
|
+
"attribute": "error",
|
|
10187
|
+
"inheritedFrom": {
|
|
10188
|
+
"name": "FormAssociatedMixin",
|
|
10189
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10190
|
+
}
|
|
10191
|
+
},
|
|
10192
|
+
{
|
|
10193
|
+
"kind": "field",
|
|
10194
|
+
"name": "required",
|
|
10195
|
+
"type": {
|
|
10196
|
+
"text": "boolean"
|
|
10197
|
+
},
|
|
10198
|
+
"default": "false",
|
|
10199
|
+
"description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
10200
|
+
"attribute": "required",
|
|
10201
|
+
"inheritedFrom": {
|
|
10202
|
+
"name": "FormAssociatedMixin",
|
|
10203
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10204
|
+
}
|
|
10205
|
+
},
|
|
10206
|
+
{
|
|
10207
|
+
"kind": "field",
|
|
10208
|
+
"name": "expand",
|
|
10209
|
+
"type": {
|
|
10210
|
+
"text": "boolean"
|
|
10211
|
+
},
|
|
10212
|
+
"default": "false",
|
|
10213
|
+
"description": "Controls whether the input expands to fill the width of its container.",
|
|
10214
|
+
"attribute": "expand",
|
|
10215
|
+
"reflects": true,
|
|
10216
|
+
"inheritedFrom": {
|
|
10217
|
+
"name": "FormAssociatedMixin",
|
|
10218
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10219
|
+
}
|
|
10220
|
+
},
|
|
10221
|
+
{
|
|
10222
|
+
"kind": "method",
|
|
10223
|
+
"name": "handleInput",
|
|
10224
|
+
"privacy": "protected",
|
|
10225
|
+
"parameters": [
|
|
10226
|
+
{
|
|
10227
|
+
"name": "e",
|
|
10228
|
+
"type": {
|
|
10229
|
+
"text": "Event"
|
|
10230
|
+
}
|
|
10231
|
+
}
|
|
10232
|
+
],
|
|
10233
|
+
"inheritedFrom": {
|
|
10234
|
+
"name": "FormAssociatedMixin",
|
|
10235
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10236
|
+
}
|
|
10237
|
+
},
|
|
10238
|
+
{
|
|
10239
|
+
"kind": "method",
|
|
10240
|
+
"name": "renderLabel",
|
|
10241
|
+
"privacy": "protected",
|
|
10242
|
+
"inheritedFrom": {
|
|
10243
|
+
"name": "FormAssociatedMixin",
|
|
10244
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10245
|
+
}
|
|
10246
|
+
},
|
|
10247
|
+
{
|
|
10248
|
+
"kind": "method",
|
|
10249
|
+
"name": "renderError",
|
|
10250
|
+
"privacy": "protected",
|
|
10251
|
+
"inheritedFrom": {
|
|
10252
|
+
"name": "FormAssociatedMixin",
|
|
10253
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10254
|
+
}
|
|
10255
|
+
},
|
|
10256
|
+
{
|
|
10257
|
+
"kind": "method",
|
|
10258
|
+
"name": "getDescribedBy",
|
|
10259
|
+
"privacy": "protected",
|
|
10260
|
+
"inheritedFrom": {
|
|
10261
|
+
"name": "FormAssociatedMixin",
|
|
10262
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10263
|
+
}
|
|
10264
|
+
},
|
|
10265
|
+
{
|
|
10266
|
+
"kind": "method",
|
|
10267
|
+
"name": "getInvalid",
|
|
10268
|
+
"privacy": "protected",
|
|
10269
|
+
"inheritedFrom": {
|
|
10270
|
+
"name": "FormAssociatedMixin",
|
|
10271
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10272
|
+
}
|
|
10273
|
+
},
|
|
10274
|
+
{
|
|
10275
|
+
"kind": "field",
|
|
10276
|
+
"name": "hasHint",
|
|
10277
|
+
"privacy": "protected",
|
|
10278
|
+
"inheritedFrom": {
|
|
10279
|
+
"name": "FormAssociatedMixin",
|
|
10280
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10281
|
+
}
|
|
10282
|
+
},
|
|
10283
|
+
{
|
|
10284
|
+
"kind": "field",
|
|
10285
|
+
"name": "hasError",
|
|
10286
|
+
"privacy": "protected",
|
|
10287
|
+
"inheritedFrom": {
|
|
10288
|
+
"name": "FormAssociatedMixin",
|
|
10289
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10290
|
+
}
|
|
10291
|
+
},
|
|
10292
|
+
{
|
|
10293
|
+
"kind": "field",
|
|
10294
|
+
"name": "disabled",
|
|
10295
|
+
"type": {
|
|
10296
|
+
"text": "boolean"
|
|
10297
|
+
},
|
|
10298
|
+
"default": "false",
|
|
10299
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
10300
|
+
"attribute": "disabled",
|
|
10301
|
+
"reflects": true,
|
|
10302
|
+
"inheritedFrom": {
|
|
10303
|
+
"name": "InputMixin",
|
|
10304
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10305
|
+
}
|
|
10306
|
+
},
|
|
10307
|
+
{
|
|
10308
|
+
"kind": "field",
|
|
10309
|
+
"name": "name",
|
|
10310
|
+
"type": {
|
|
10311
|
+
"text": "string | undefined"
|
|
10312
|
+
},
|
|
10313
|
+
"description": "The name of the form component.",
|
|
10314
|
+
"attribute": "name",
|
|
10315
|
+
"inheritedFrom": {
|
|
10316
|
+
"name": "InputMixin",
|
|
10317
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10318
|
+
}
|
|
10319
|
+
},
|
|
10320
|
+
{
|
|
10321
|
+
"kind": "field",
|
|
10322
|
+
"name": "value",
|
|
10323
|
+
"type": {
|
|
10324
|
+
"text": "string"
|
|
10325
|
+
},
|
|
10326
|
+
"default": "\"\"",
|
|
10327
|
+
"description": "The value of the form component.",
|
|
10328
|
+
"attribute": "value",
|
|
10329
|
+
"inheritedFrom": {
|
|
10330
|
+
"name": "InputMixin",
|
|
10331
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10332
|
+
}
|
|
10333
|
+
},
|
|
10334
|
+
{
|
|
10335
|
+
"kind": "field",
|
|
10336
|
+
"name": "form",
|
|
10337
|
+
"privacy": "protected",
|
|
10338
|
+
"description": "Gets the form, if any, associated with the form element.",
|
|
10339
|
+
"inheritedFrom": {
|
|
10340
|
+
"name": "InputMixin",
|
|
10341
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10342
|
+
}
|
|
10343
|
+
},
|
|
10344
|
+
{
|
|
10345
|
+
"kind": "field",
|
|
10346
|
+
"name": "focusableRef",
|
|
10347
|
+
"privacy": "protected",
|
|
10348
|
+
"inheritedFrom": {
|
|
10349
|
+
"name": "FocusableMixin",
|
|
10350
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
10351
|
+
}
|
|
10352
|
+
},
|
|
10353
|
+
{
|
|
10354
|
+
"kind": "method",
|
|
10355
|
+
"name": "focus",
|
|
10356
|
+
"parameters": [
|
|
10357
|
+
{
|
|
10358
|
+
"name": "options",
|
|
10359
|
+
"optional": true,
|
|
10360
|
+
"type": {
|
|
10361
|
+
"text": "FocusOptions"
|
|
10362
|
+
},
|
|
10363
|
+
"description": "An object which controls aspects of the focusing process."
|
|
10364
|
+
}
|
|
10365
|
+
],
|
|
10366
|
+
"description": "Programmatically move focus to the component.",
|
|
10367
|
+
"inheritedFrom": {
|
|
10368
|
+
"name": "FocusableMixin",
|
|
10369
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
10370
|
+
}
|
|
10371
|
+
},
|
|
10372
|
+
{
|
|
10373
|
+
"kind": "method",
|
|
10374
|
+
"name": "blur",
|
|
10375
|
+
"description": "Programmatically remove focus from the component.",
|
|
10376
|
+
"inheritedFrom": {
|
|
10377
|
+
"name": "FocusableMixin",
|
|
10378
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
10379
|
+
}
|
|
10380
|
+
},
|
|
10381
|
+
{
|
|
10382
|
+
"kind": "method",
|
|
10383
|
+
"name": "click",
|
|
10384
|
+
"description": "Programmatically simulates a click on the component.",
|
|
10385
|
+
"inheritedFrom": {
|
|
10386
|
+
"name": "FocusableMixin",
|
|
10387
|
+
"module": "src/common/mixins/FocusableMixin.ts"
|
|
10388
|
+
}
|
|
10389
|
+
}
|
|
10390
|
+
],
|
|
10391
|
+
"attributes": [
|
|
10392
|
+
{
|
|
10393
|
+
"name": "checked",
|
|
10394
|
+
"type": {
|
|
10395
|
+
"text": "boolean"
|
|
10396
|
+
},
|
|
10397
|
+
"default": "false",
|
|
10398
|
+
"description": "Controls whether the toggle is checked or not.",
|
|
10399
|
+
"fieldName": "checked"
|
|
10400
|
+
},
|
|
10401
|
+
{
|
|
10402
|
+
"name": "reverse",
|
|
10403
|
+
"type": {
|
|
10404
|
+
"text": "boolean"
|
|
10405
|
+
},
|
|
10406
|
+
"default": "false",
|
|
10407
|
+
"description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
|
|
10408
|
+
"fieldName": "reverse"
|
|
10409
|
+
},
|
|
10410
|
+
{
|
|
10411
|
+
"name": "size",
|
|
10412
|
+
"type": {
|
|
10413
|
+
"text": "\"s\" | \"m\" | \"l\""
|
|
10414
|
+
},
|
|
10415
|
+
"default": "\"m\"",
|
|
10416
|
+
"description": "The size of the toggle switch.",
|
|
10417
|
+
"fieldName": "size"
|
|
10418
|
+
},
|
|
10419
|
+
{
|
|
10420
|
+
"name": "label",
|
|
10421
|
+
"type": {
|
|
10422
|
+
"text": "string"
|
|
10423
|
+
},
|
|
10424
|
+
"default": "\"\"",
|
|
10425
|
+
"description": "Label for the input.",
|
|
10426
|
+
"fieldName": "label",
|
|
10427
|
+
"inheritedFrom": {
|
|
10428
|
+
"name": "FormAssociatedMixin",
|
|
10429
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10430
|
+
}
|
|
10431
|
+
},
|
|
10432
|
+
{
|
|
10433
|
+
"name": "hint",
|
|
10434
|
+
"type": {
|
|
10435
|
+
"text": "string | undefined"
|
|
10436
|
+
},
|
|
10437
|
+
"description": "Optional hint text to be displayed with the input. Alternatively use the hint slot.",
|
|
10438
|
+
"fieldName": "hint",
|
|
10439
|
+
"inheritedFrom": {
|
|
10440
|
+
"name": "FormAssociatedMixin",
|
|
10441
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10442
|
+
}
|
|
10443
|
+
},
|
|
10444
|
+
{
|
|
10445
|
+
"name": "hide-label",
|
|
10446
|
+
"type": {
|
|
10447
|
+
"text": "boolean"
|
|
10448
|
+
},
|
|
10449
|
+
"default": "false",
|
|
10450
|
+
"description": "Visually hide the label, but still show it to assistive technologies like screen readers.",
|
|
10451
|
+
"fieldName": "hideLabel",
|
|
10452
|
+
"inheritedFrom": {
|
|
10453
|
+
"name": "FormAssociatedMixin",
|
|
10454
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10455
|
+
}
|
|
10456
|
+
},
|
|
10457
|
+
{
|
|
10458
|
+
"name": "placeholder",
|
|
10459
|
+
"type": {
|
|
10460
|
+
"text": "string | undefined"
|
|
10461
|
+
},
|
|
10462
|
+
"description": "Placeholder text to display within the input.",
|
|
10463
|
+
"fieldName": "placeholder",
|
|
10464
|
+
"inheritedFrom": {
|
|
10465
|
+
"name": "FormAssociatedMixin",
|
|
10466
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10467
|
+
}
|
|
10468
|
+
},
|
|
10469
|
+
{
|
|
10470
|
+
"name": "error",
|
|
10471
|
+
"type": {
|
|
10472
|
+
"text": "string | undefined"
|
|
10473
|
+
},
|
|
10474
|
+
"description": "Optional error to be shown with the input. Alternatively use the error slot.",
|
|
10475
|
+
"fieldName": "error",
|
|
10476
|
+
"inheritedFrom": {
|
|
10477
|
+
"name": "FormAssociatedMixin",
|
|
10478
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10479
|
+
}
|
|
10480
|
+
},
|
|
10481
|
+
{
|
|
10482
|
+
"name": "required",
|
|
10483
|
+
"type": {
|
|
10484
|
+
"text": "boolean"
|
|
10485
|
+
},
|
|
10486
|
+
"default": "false",
|
|
10487
|
+
"description": "Determines whether the input is required or not.\nAn input marked as required will be announced as such to users of assistive technology.\nWhen using this property you need to also set “novalidate” attribute on a form element to prevent browser from displaying its own validation errors.",
|
|
10488
|
+
"fieldName": "required",
|
|
10489
|
+
"inheritedFrom": {
|
|
10490
|
+
"name": "FormAssociatedMixin",
|
|
10491
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10492
|
+
}
|
|
10493
|
+
},
|
|
10494
|
+
{
|
|
10495
|
+
"name": "expand",
|
|
10496
|
+
"type": {
|
|
10497
|
+
"text": "boolean"
|
|
10498
|
+
},
|
|
10499
|
+
"default": "false",
|
|
10500
|
+
"description": "Controls whether the input expands to fill the width of its container.",
|
|
10501
|
+
"fieldName": "expand",
|
|
10502
|
+
"inheritedFrom": {
|
|
10503
|
+
"name": "FormAssociatedMixin",
|
|
10504
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10505
|
+
}
|
|
10506
|
+
},
|
|
10507
|
+
{
|
|
10508
|
+
"name": "disabled",
|
|
10509
|
+
"type": {
|
|
10510
|
+
"text": "boolean"
|
|
10511
|
+
},
|
|
10512
|
+
"default": "false",
|
|
10513
|
+
"description": "Makes the component disabled. This prevents users from\nbeing able to interact with the component, and conveys\nits inactive state to assistive technologies.",
|
|
10514
|
+
"fieldName": "disabled",
|
|
10515
|
+
"inheritedFrom": {
|
|
10516
|
+
"name": "InputMixin",
|
|
10517
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10518
|
+
}
|
|
10519
|
+
},
|
|
10520
|
+
{
|
|
10521
|
+
"name": "name",
|
|
10522
|
+
"type": {
|
|
10523
|
+
"text": "string | undefined"
|
|
10524
|
+
},
|
|
10525
|
+
"description": "The name of the form component.",
|
|
10526
|
+
"fieldName": "name",
|
|
10527
|
+
"inheritedFrom": {
|
|
10528
|
+
"name": "InputMixin",
|
|
10529
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10530
|
+
}
|
|
10531
|
+
},
|
|
10532
|
+
{
|
|
10533
|
+
"name": "value",
|
|
10534
|
+
"type": {
|
|
10535
|
+
"text": "string"
|
|
10536
|
+
},
|
|
10537
|
+
"default": "\"\"",
|
|
10538
|
+
"description": "The value of the form component.",
|
|
10539
|
+
"fieldName": "value",
|
|
10540
|
+
"inheritedFrom": {
|
|
10541
|
+
"name": "InputMixin",
|
|
10542
|
+
"module": "src/common/mixins/InputMixin.ts"
|
|
10543
|
+
}
|
|
10544
|
+
}
|
|
10545
|
+
],
|
|
10546
|
+
"mixins": [
|
|
10547
|
+
{
|
|
10548
|
+
"name": "DraftComponentMixin",
|
|
10549
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
10550
|
+
},
|
|
10551
|
+
{
|
|
10552
|
+
"name": "FormAssociatedMixin",
|
|
10553
|
+
"module": "/src/common/mixins/FormAssociatedMixin.js"
|
|
10554
|
+
},
|
|
10555
|
+
{
|
|
10556
|
+
"name": "InputMixin",
|
|
10557
|
+
"module": "/src/common/mixins/InputMixin.js"
|
|
10558
|
+
},
|
|
10559
|
+
{
|
|
10560
|
+
"name": "FocusableMixin",
|
|
10561
|
+
"module": "/src/common/mixins/FocusableMixin.js"
|
|
10562
|
+
}
|
|
10563
|
+
],
|
|
10564
|
+
"superclass": {
|
|
10565
|
+
"name": "LitElement",
|
|
10566
|
+
"package": "lit"
|
|
10567
|
+
},
|
|
10568
|
+
"status": "draft",
|
|
10569
|
+
"category": "form",
|
|
10570
|
+
"tagName": "nord-toggle",
|
|
10571
|
+
"customElement": true,
|
|
10572
|
+
"events": [
|
|
10573
|
+
{
|
|
10574
|
+
"name": "input",
|
|
10575
|
+
"type": {
|
|
10576
|
+
"text": "NordEvent"
|
|
10577
|
+
},
|
|
10578
|
+
"description": "Fired as the user types into the input.",
|
|
10579
|
+
"inheritedFrom": {
|
|
10580
|
+
"name": "FormAssociatedMixin",
|
|
10581
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10582
|
+
}
|
|
10583
|
+
},
|
|
10584
|
+
{
|
|
10585
|
+
"name": "change",
|
|
10586
|
+
"type": {
|
|
10587
|
+
"text": "NordEvent"
|
|
10588
|
+
},
|
|
10589
|
+
"description": "Fired whenever the input's value is changed via user interaction.",
|
|
10590
|
+
"inheritedFrom": {
|
|
10591
|
+
"name": "FormAssociatedMixin",
|
|
10592
|
+
"module": "src/common/mixins/FormAssociatedMixin.ts"
|
|
10593
|
+
}
|
|
10594
|
+
}
|
|
10595
|
+
]
|
|
10596
|
+
}
|
|
10597
|
+
],
|
|
10598
|
+
"exports": [
|
|
10599
|
+
{
|
|
10600
|
+
"kind": "js",
|
|
10601
|
+
"name": "default",
|
|
10602
|
+
"declaration": {
|
|
10603
|
+
"name": "Toggle",
|
|
10604
|
+
"module": "src/toggle/Toggle.ts"
|
|
10605
|
+
}
|
|
10606
|
+
},
|
|
10607
|
+
{
|
|
10608
|
+
"kind": "custom-element-definition",
|
|
10609
|
+
"name": "nord-toggle",
|
|
10610
|
+
"declaration": {
|
|
10611
|
+
"name": "Toggle",
|
|
10612
|
+
"module": "src/toggle/Toggle.ts"
|
|
10613
|
+
}
|
|
10614
|
+
}
|
|
10615
|
+
],
|
|
10616
|
+
"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 any feature or option that can be turned on or off.\n- If a physical switch would work for the action, the toggle is probably the best component to use.\n- Use for making it possible to choose one or more options from a limited number of options.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using when you have more than 10 options to choose from.\n- Don’t change the selection of another toggle when another one is clicked. Only exception is when a toggle is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nToggle labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing toggle labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
|
|
10617
|
+
},
|
|
9939
10618
|
{
|
|
9940
10619
|
"kind": "javascript-module",
|
|
9941
10620
|
"path": "src/tooltip/Tooltip.ts",
|