@nordhealth/components 2.4.0 → 2.6.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 +372 -172
- package/lib/AutocompleteMixin-370de2be.js.map +1 -1
- package/lib/Button.js +1 -1
- package/lib/Button.js.map +1 -1
- package/lib/{Calendar-8b36a7e5.js → Calendar-49dc5248.js} +1 -1
- package/lib/{Calendar-8b36a7e5.js.map → Calendar-49dc5248.js.map} +1 -1
- package/lib/Calendar.js +1 -1
- package/lib/Card.js +1 -1
- package/lib/Card.js.map +1 -1
- package/lib/DatePicker.js +1 -1
- package/lib/Drawer.js +2 -0
- package/lib/Drawer.js.map +1 -0
- package/lib/Dropdown.js +1 -1
- package/lib/Dropdown.js.map +1 -1
- package/lib/Header.js +1 -1
- package/lib/Header.js.map +1 -1
- package/lib/InputMixin-158f63fb.js.map +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Modal.js +1 -1
- package/lib/Modal.js.map +1 -1
- package/lib/Popout.js +1 -1
- package/lib/Popout.js.map +1 -1
- package/lib/ScrollbarController-680392c9.js +2 -0
- package/lib/ScrollbarController-680392c9.js.map +1 -0
- package/lib/TextField-94b0839b.js.map +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/lib/bundle.js +3 -3
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/button/Button.d.ts +1 -0
- package/lib/src/common/mixins/InputMixin.d.ts +1 -1
- package/lib/src/drawer/Drawer.d.ts +29 -0
- package/lib/src/drawer/Drawer.test.d.ts +6 -0
- package/lib/src/dropdown/Dropdown.d.ts +5 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/layout/Layout.d.ts +4 -0
- package/lib/src/layout/Layout.test.d.ts +1 -0
- package/lib/src/popout/Popout.d.ts +7 -1
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -366,6 +366,14 @@
|
|
|
366
366
|
"name": "default",
|
|
367
367
|
"module": "\"./qrcode/Qrcode.js\""
|
|
368
368
|
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"kind": "js",
|
|
372
|
+
"name": "Drawer",
|
|
373
|
+
"declaration": {
|
|
374
|
+
"name": "default",
|
|
375
|
+
"module": "\"./drawer/Drawer.js\""
|
|
376
|
+
}
|
|
369
377
|
}
|
|
370
378
|
]
|
|
371
379
|
},
|
|
@@ -511,88 +519,6 @@
|
|
|
511
519
|
],
|
|
512
520
|
"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"
|
|
513
521
|
},
|
|
514
|
-
{
|
|
515
|
-
"kind": "javascript-module",
|
|
516
|
-
"path": "src/banner/Banner.ts",
|
|
517
|
-
"declarations": [
|
|
518
|
-
{
|
|
519
|
-
"kind": "class",
|
|
520
|
-
"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.",
|
|
521
|
-
"name": "Banner",
|
|
522
|
-
"cssProperties": [
|
|
523
|
-
{
|
|
524
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
525
|
-
"name": "--n-banner-border-radius",
|
|
526
|
-
"default": "var(--n-border-radius)"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
530
|
-
"name": "--n-banner-box-shadow",
|
|
531
|
-
"default": "var(--n-box-shadow-card)"
|
|
532
|
-
}
|
|
533
|
-
],
|
|
534
|
-
"slots": [
|
|
535
|
-
{
|
|
536
|
-
"description": "default slot",
|
|
537
|
-
"name": ""
|
|
538
|
-
}
|
|
539
|
-
],
|
|
540
|
-
"members": [
|
|
541
|
-
{
|
|
542
|
-
"kind": "field",
|
|
543
|
-
"name": "variant",
|
|
544
|
-
"type": {
|
|
545
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
546
|
-
},
|
|
547
|
-
"default": "\"info\"",
|
|
548
|
-
"description": "The style variant of the banner.",
|
|
549
|
-
"attribute": "variant",
|
|
550
|
-
"reflects": true
|
|
551
|
-
}
|
|
552
|
-
],
|
|
553
|
-
"attributes": [
|
|
554
|
-
{
|
|
555
|
-
"name": "variant",
|
|
556
|
-
"type": {
|
|
557
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
558
|
-
},
|
|
559
|
-
"default": "\"info\"",
|
|
560
|
-
"description": "The style variant of the banner.",
|
|
561
|
-
"fieldName": "variant"
|
|
562
|
-
}
|
|
563
|
-
],
|
|
564
|
-
"superclass": {
|
|
565
|
-
"name": "LitElement",
|
|
566
|
-
"package": "lit"
|
|
567
|
-
},
|
|
568
|
-
"status": "ready",
|
|
569
|
-
"category": "feedback",
|
|
570
|
-
"displayName": null,
|
|
571
|
-
"examples": [],
|
|
572
|
-
"tagName": "nord-banner",
|
|
573
|
-
"customElement": true
|
|
574
|
-
}
|
|
575
|
-
],
|
|
576
|
-
"exports": [
|
|
577
|
-
{
|
|
578
|
-
"kind": "js",
|
|
579
|
-
"name": "default",
|
|
580
|
-
"declaration": {
|
|
581
|
-
"name": "Banner",
|
|
582
|
-
"module": "src/banner/Banner.ts"
|
|
583
|
-
}
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
"kind": "custom-element-definition",
|
|
587
|
-
"name": "nord-banner",
|
|
588
|
-
"declaration": {
|
|
589
|
-
"name": "Banner",
|
|
590
|
-
"module": "src/banner/Banner.ts"
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
],
|
|
594
|
-
"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"
|
|
595
|
-
},
|
|
596
522
|
{
|
|
597
523
|
"kind": "javascript-module",
|
|
598
524
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -1150,6 +1076,11 @@
|
|
|
1150
1076
|
"name": "--n-button-gradient",
|
|
1151
1077
|
"default": "linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.013) 100%))"
|
|
1152
1078
|
},
|
|
1079
|
+
{
|
|
1080
|
+
"description": "Controls the background color of the button, using [color tokens](/tokens/#color).",
|
|
1081
|
+
"name": "--n-button-background-color",
|
|
1082
|
+
"default": "var(--n-color-button)"
|
|
1083
|
+
},
|
|
1153
1084
|
{
|
|
1154
1085
|
"description": "Controls the border color of the button, using [color tokens](/tokens/#color).",
|
|
1155
1086
|
"name": "--n-button-border-color",
|
|
@@ -1626,6 +1557,88 @@
|
|
|
1626
1557
|
],
|
|
1627
1558
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Only use one primary button per section, as a main call-to-action.\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don't use a primary button in every row of a table.\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n| `switch` | Switch style is reserved for the clinic switcher in the top left corner of an application. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
|
|
1628
1559
|
},
|
|
1560
|
+
{
|
|
1561
|
+
"kind": "javascript-module",
|
|
1562
|
+
"path": "src/banner/Banner.ts",
|
|
1563
|
+
"declarations": [
|
|
1564
|
+
{
|
|
1565
|
+
"kind": "class",
|
|
1566
|
+
"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.",
|
|
1567
|
+
"name": "Banner",
|
|
1568
|
+
"cssProperties": [
|
|
1569
|
+
{
|
|
1570
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
1571
|
+
"name": "--n-banner-border-radius",
|
|
1572
|
+
"default": "var(--n-border-radius)"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
1576
|
+
"name": "--n-banner-box-shadow",
|
|
1577
|
+
"default": "var(--n-box-shadow-card)"
|
|
1578
|
+
}
|
|
1579
|
+
],
|
|
1580
|
+
"slots": [
|
|
1581
|
+
{
|
|
1582
|
+
"description": "default slot",
|
|
1583
|
+
"name": ""
|
|
1584
|
+
}
|
|
1585
|
+
],
|
|
1586
|
+
"members": [
|
|
1587
|
+
{
|
|
1588
|
+
"kind": "field",
|
|
1589
|
+
"name": "variant",
|
|
1590
|
+
"type": {
|
|
1591
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1592
|
+
},
|
|
1593
|
+
"default": "\"info\"",
|
|
1594
|
+
"description": "The style variant of the banner.",
|
|
1595
|
+
"attribute": "variant",
|
|
1596
|
+
"reflects": true
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"attributes": [
|
|
1600
|
+
{
|
|
1601
|
+
"name": "variant",
|
|
1602
|
+
"type": {
|
|
1603
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
1604
|
+
},
|
|
1605
|
+
"default": "\"info\"",
|
|
1606
|
+
"description": "The style variant of the banner.",
|
|
1607
|
+
"fieldName": "variant"
|
|
1608
|
+
}
|
|
1609
|
+
],
|
|
1610
|
+
"superclass": {
|
|
1611
|
+
"name": "LitElement",
|
|
1612
|
+
"package": "lit"
|
|
1613
|
+
},
|
|
1614
|
+
"status": "ready",
|
|
1615
|
+
"category": "feedback",
|
|
1616
|
+
"displayName": null,
|
|
1617
|
+
"examples": [],
|
|
1618
|
+
"tagName": "nord-banner",
|
|
1619
|
+
"customElement": true
|
|
1620
|
+
}
|
|
1621
|
+
],
|
|
1622
|
+
"exports": [
|
|
1623
|
+
{
|
|
1624
|
+
"kind": "js",
|
|
1625
|
+
"name": "default",
|
|
1626
|
+
"declaration": {
|
|
1627
|
+
"name": "Banner",
|
|
1628
|
+
"module": "src/banner/Banner.ts"
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
{
|
|
1632
|
+
"kind": "custom-element-definition",
|
|
1633
|
+
"name": "nord-banner",
|
|
1634
|
+
"declaration": {
|
|
1635
|
+
"name": "Banner",
|
|
1636
|
+
"module": "src/banner/Banner.ts"
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
],
|
|
1640
|
+
"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"
|
|
1641
|
+
},
|
|
1629
1642
|
{
|
|
1630
1643
|
"kind": "javascript-module",
|
|
1631
1644
|
"path": "src/badge/Badge.ts",
|
|
@@ -5365,6 +5378,117 @@
|
|
|
5365
5378
|
],
|
|
5366
5379
|
"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 represent thematic breaks between elements.\n- Use when you need to divide sections of content from each other.\n- Use to separate content into clear groups.\n- Use dividers sparingly, to create groupings or to separate items.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Avoid using for presentational purposes only.\n- Don’t use strong colors in dividers.\n- Don’t use dividers for replacing card components.\n\n</div>\n\n---\n\n## Additional considerations\n\n- Divider uses a role called `separator` which indicates that the element is a divider that separates and distinguishes sections of content or groups of menu items. The implicit ARIA role of the native thematic break (`<hr>` element) is a separator.\n- Dividers have an implicit aria-orientation value of `horizontal` which can be changed using the `direction` property.\n- For more details, please see [ARIA: separator role on MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role).\n"
|
|
5367
5380
|
},
|
|
5381
|
+
{
|
|
5382
|
+
"kind": "javascript-module",
|
|
5383
|
+
"path": "src/drawer/Drawer.ts",
|
|
5384
|
+
"declarations": [
|
|
5385
|
+
{
|
|
5386
|
+
"kind": "class",
|
|
5387
|
+
"description": "Drawer is used to display context-sensitive actions and information.\nDrawer doesn’t block users from completing their task, like a modal would.",
|
|
5388
|
+
"name": "Drawer",
|
|
5389
|
+
"cssProperties": [
|
|
5390
|
+
{
|
|
5391
|
+
"description": "Controls the padding around the main area (the default slot), using our [spacing tokens](/tokens/#space).",
|
|
5392
|
+
"name": "--n-drawer-padding",
|
|
5393
|
+
"default": "var(--n-space-l)"
|
|
5394
|
+
}
|
|
5395
|
+
],
|
|
5396
|
+
"slots": [
|
|
5397
|
+
{
|
|
5398
|
+
"description": "Optional slot that holds a header for the drawer.",
|
|
5399
|
+
"name": "header"
|
|
5400
|
+
},
|
|
5401
|
+
{
|
|
5402
|
+
"description": "Default slot.",
|
|
5403
|
+
"name": ""
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
"description": "Optional slot that holds footer content for the drawer.",
|
|
5407
|
+
"name": "footer"
|
|
5408
|
+
}
|
|
5409
|
+
],
|
|
5410
|
+
"members": [
|
|
5411
|
+
{
|
|
5412
|
+
"kind": "field",
|
|
5413
|
+
"name": "footerSlot",
|
|
5414
|
+
"privacy": "private",
|
|
5415
|
+
"default": "new SlotController(this, \"footer\")"
|
|
5416
|
+
},
|
|
5417
|
+
{
|
|
5418
|
+
"kind": "field",
|
|
5419
|
+
"name": "padding",
|
|
5420
|
+
"type": {
|
|
5421
|
+
"text": "\"m\" | \"none\""
|
|
5422
|
+
},
|
|
5423
|
+
"default": "\"m\"",
|
|
5424
|
+
"description": "Controls the padding of the drawer component.",
|
|
5425
|
+
"attribute": "padding",
|
|
5426
|
+
"reflects": true
|
|
5427
|
+
},
|
|
5428
|
+
{
|
|
5429
|
+
"kind": "field",
|
|
5430
|
+
"name": "_warningLogged",
|
|
5431
|
+
"type": {
|
|
5432
|
+
"text": "boolean"
|
|
5433
|
+
},
|
|
5434
|
+
"privacy": "private",
|
|
5435
|
+
"static": true,
|
|
5436
|
+
"default": "false",
|
|
5437
|
+
"inheritedFrom": {
|
|
5438
|
+
"name": "DraftComponentMixin",
|
|
5439
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
5440
|
+
}
|
|
5441
|
+
}
|
|
5442
|
+
],
|
|
5443
|
+
"attributes": [
|
|
5444
|
+
{
|
|
5445
|
+
"name": "padding",
|
|
5446
|
+
"type": {
|
|
5447
|
+
"text": "\"m\" | \"none\""
|
|
5448
|
+
},
|
|
5449
|
+
"default": "\"m\"",
|
|
5450
|
+
"description": "Controls the padding of the drawer component.",
|
|
5451
|
+
"fieldName": "padding"
|
|
5452
|
+
}
|
|
5453
|
+
],
|
|
5454
|
+
"mixins": [
|
|
5455
|
+
{
|
|
5456
|
+
"name": "DraftComponentMixin",
|
|
5457
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
5458
|
+
}
|
|
5459
|
+
],
|
|
5460
|
+
"superclass": {
|
|
5461
|
+
"name": "LitElement",
|
|
5462
|
+
"package": "lit"
|
|
5463
|
+
},
|
|
5464
|
+
"status": "draft",
|
|
5465
|
+
"category": "structure",
|
|
5466
|
+
"displayName": null,
|
|
5467
|
+
"examples": [],
|
|
5468
|
+
"tagName": "nord-drawer",
|
|
5469
|
+
"customElement": true
|
|
5470
|
+
}
|
|
5471
|
+
],
|
|
5472
|
+
"exports": [
|
|
5473
|
+
{
|
|
5474
|
+
"kind": "js",
|
|
5475
|
+
"name": "default",
|
|
5476
|
+
"declaration": {
|
|
5477
|
+
"name": "Drawer",
|
|
5478
|
+
"module": "src/drawer/Drawer.ts"
|
|
5479
|
+
}
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
"kind": "custom-element-definition",
|
|
5483
|
+
"name": "nord-drawer",
|
|
5484
|
+
"declaration": {
|
|
5485
|
+
"name": "Drawer",
|
|
5486
|
+
"module": "src/drawer/Drawer.ts"
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
],
|
|
5490
|
+
"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 displaying contextual actions or information. For example, when clicking on a table row.\n- Use when you don’t want to block users from completing their task in the main view of an application.\n- Always include a header that summarizes the actions and information in the drawer.\n- Should be closeable through actions like “Done” and “Close”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t reset the drawer’s state when closed if used for settings or filters. Settings should persist.\n- Don’t open from within another drawer. Only one drawer can be open at a time.\n- Don’t use for presenting a small amount of content or an actions menu, use the [popout](/components/popout/) or [dropdown](/components/dropdown/) component instead.\n\n</div>\n"
|
|
5491
|
+
},
|
|
5368
5492
|
{
|
|
5369
5493
|
"kind": "javascript-module",
|
|
5370
5494
|
"path": "src/dropdown/Dropdown.ts",
|
|
@@ -5399,6 +5523,17 @@
|
|
|
5399
5523
|
},
|
|
5400
5524
|
"privacy": "private"
|
|
5401
5525
|
},
|
|
5526
|
+
{
|
|
5527
|
+
"kind": "field",
|
|
5528
|
+
"name": "open",
|
|
5529
|
+
"type": {
|
|
5530
|
+
"text": "boolean"
|
|
5531
|
+
},
|
|
5532
|
+
"default": "false",
|
|
5533
|
+
"description": "Controls whether the dropdown is open or not.",
|
|
5534
|
+
"attribute": "open",
|
|
5535
|
+
"reflects": true
|
|
5536
|
+
},
|
|
5402
5537
|
{
|
|
5403
5538
|
"kind": "field",
|
|
5404
5539
|
"name": "align",
|
|
@@ -5475,9 +5610,23 @@
|
|
|
5475
5610
|
"kind": "method",
|
|
5476
5611
|
"name": "handleOpen",
|
|
5477
5612
|
"privacy": "private"
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
"kind": "method",
|
|
5616
|
+
"name": "handleClose",
|
|
5617
|
+
"privacy": "private"
|
|
5478
5618
|
}
|
|
5479
5619
|
],
|
|
5480
5620
|
"attributes": [
|
|
5621
|
+
{
|
|
5622
|
+
"name": "open",
|
|
5623
|
+
"type": {
|
|
5624
|
+
"text": "boolean"
|
|
5625
|
+
},
|
|
5626
|
+
"default": "false",
|
|
5627
|
+
"description": "Controls whether the dropdown is open or not.",
|
|
5628
|
+
"fieldName": "open"
|
|
5629
|
+
},
|
|
5481
5630
|
{
|
|
5482
5631
|
"name": "align",
|
|
5483
5632
|
"type": {
|
|
@@ -6989,6 +7138,11 @@
|
|
|
6989
7138
|
"description": "Controls the padding around the main layout area (the main slot), using our [spacing tokens](/tokens/#space).",
|
|
6990
7139
|
"name": "--n-layout-padding",
|
|
6991
7140
|
"default": "var(--n-space-l)"
|
|
7141
|
+
},
|
|
7142
|
+
{
|
|
7143
|
+
"description": "Controls the width of the drawer area, when used.",
|
|
7144
|
+
"name": "--n-layout-drawer-inline-size",
|
|
7145
|
+
"default": "320px"
|
|
6992
7146
|
}
|
|
6993
7147
|
],
|
|
6994
7148
|
"slots": [
|
|
@@ -7003,6 +7157,10 @@
|
|
|
7003
7157
|
{
|
|
7004
7158
|
"description": "Used to place content inside the header section.",
|
|
7005
7159
|
"name": "header"
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
"description": "Used to place additional content/details relating to a selected item.",
|
|
7163
|
+
"name": "drawer"
|
|
7006
7164
|
}
|
|
7007
7165
|
],
|
|
7008
7166
|
"members": [
|
|
@@ -7014,6 +7172,18 @@
|
|
|
7014
7172
|
},
|
|
7015
7173
|
"privacy": "private"
|
|
7016
7174
|
},
|
|
7175
|
+
{
|
|
7176
|
+
"kind": "field",
|
|
7177
|
+
"name": "navSlot",
|
|
7178
|
+
"privacy": "private",
|
|
7179
|
+
"default": "new SlotController(this, \"nav\")"
|
|
7180
|
+
},
|
|
7181
|
+
{
|
|
7182
|
+
"kind": "field",
|
|
7183
|
+
"name": "drawerSlot",
|
|
7184
|
+
"privacy": "private",
|
|
7185
|
+
"default": "new SlotController(this, \"drawer\")"
|
|
7186
|
+
},
|
|
7017
7187
|
{
|
|
7018
7188
|
"kind": "field",
|
|
7019
7189
|
"name": "direction",
|
|
@@ -8320,11 +8490,25 @@
|
|
|
8320
8490
|
},
|
|
8321
8491
|
"privacy": "private"
|
|
8322
8492
|
},
|
|
8493
|
+
{
|
|
8494
|
+
"kind": "field",
|
|
8495
|
+
"name": "popout",
|
|
8496
|
+
"type": {
|
|
8497
|
+
"text": "HTMLDivElement"
|
|
8498
|
+
},
|
|
8499
|
+
"privacy": "private"
|
|
8500
|
+
},
|
|
8501
|
+
{
|
|
8502
|
+
"kind": "field",
|
|
8503
|
+
"name": "scrollBar",
|
|
8504
|
+
"privacy": "private",
|
|
8505
|
+
"default": "new ScrollbarController(this)"
|
|
8506
|
+
},
|
|
8323
8507
|
{
|
|
8324
8508
|
"kind": "field",
|
|
8325
8509
|
"name": "dismiss",
|
|
8326
8510
|
"privacy": "private",
|
|
8327
|
-
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this && node !== this.targetElement,\n })",
|
|
8511
|
+
"default": "new LightDismissController(this, {\n isOpen: () => this.open,\n onDismiss: e => this.hide(e.type !== \"click\"),\n isDismissible: node => node !== this.popout && node !== this.targetElement,\n })",
|
|
8328
8512
|
"description": "Handle dismissal of the popout, clicking outside the target button and popout."
|
|
8329
8513
|
},
|
|
8330
8514
|
{
|
|
@@ -8339,15 +8523,6 @@
|
|
|
8339
8523
|
"privacy": "private",
|
|
8340
8524
|
"default": "new DirectionController(this)"
|
|
8341
8525
|
},
|
|
8342
|
-
{
|
|
8343
|
-
"kind": "field",
|
|
8344
|
-
"name": "open",
|
|
8345
|
-
"type": {
|
|
8346
|
-
"text": "boolean"
|
|
8347
|
-
},
|
|
8348
|
-
"privacy": "private",
|
|
8349
|
-
"default": "false"
|
|
8350
|
-
},
|
|
8351
8526
|
{
|
|
8352
8527
|
"kind": "field",
|
|
8353
8528
|
"name": "computedPosition",
|
|
@@ -8361,6 +8536,17 @@
|
|
|
8361
8536
|
"name": "smallViewport",
|
|
8362
8537
|
"privacy": "private"
|
|
8363
8538
|
},
|
|
8539
|
+
{
|
|
8540
|
+
"kind": "field",
|
|
8541
|
+
"name": "open",
|
|
8542
|
+
"type": {
|
|
8543
|
+
"text": "boolean"
|
|
8544
|
+
},
|
|
8545
|
+
"default": "false",
|
|
8546
|
+
"description": "Controls whether the popout is open or not.",
|
|
8547
|
+
"attribute": "open",
|
|
8548
|
+
"reflects": true
|
|
8549
|
+
},
|
|
8364
8550
|
{
|
|
8365
8551
|
"kind": "field",
|
|
8366
8552
|
"name": "align",
|
|
@@ -8424,6 +8610,11 @@
|
|
|
8424
8610
|
"name": "handleOpenChange",
|
|
8425
8611
|
"privacy": "protected"
|
|
8426
8612
|
},
|
|
8613
|
+
{
|
|
8614
|
+
"kind": "field",
|
|
8615
|
+
"name": "enableScroll",
|
|
8616
|
+
"privacy": "private"
|
|
8617
|
+
},
|
|
8427
8618
|
{
|
|
8428
8619
|
"kind": "field",
|
|
8429
8620
|
"name": "updatePosition",
|
|
@@ -8465,6 +8656,15 @@
|
|
|
8465
8656
|
}
|
|
8466
8657
|
],
|
|
8467
8658
|
"attributes": [
|
|
8659
|
+
{
|
|
8660
|
+
"name": "open",
|
|
8661
|
+
"type": {
|
|
8662
|
+
"text": "boolean"
|
|
8663
|
+
},
|
|
8664
|
+
"default": "false",
|
|
8665
|
+
"description": "Controls whether the popout is open or not.",
|
|
8666
|
+
"fieldName": "open"
|
|
8667
|
+
},
|
|
8468
8668
|
{
|
|
8469
8669
|
"name": "align",
|
|
8470
8670
|
"type": {
|
|
@@ -9504,86 +9704,6 @@
|
|
|
9504
9704
|
],
|
|
9505
9705
|
"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"
|
|
9506
9706
|
},
|
|
9507
|
-
{
|
|
9508
|
-
"kind": "javascript-module",
|
|
9509
|
-
"path": "src/skeleton/Skeleton.ts",
|
|
9510
|
-
"declarations": [
|
|
9511
|
-
{
|
|
9512
|
-
"kind": "class",
|
|
9513
|
-
"description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
|
|
9514
|
-
"name": "Skeleton",
|
|
9515
|
-
"cssProperties": [
|
|
9516
|
-
{
|
|
9517
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
9518
|
-
"name": "--n-skeleton-border-radius",
|
|
9519
|
-
"default": "var(--n-border-radius)"
|
|
9520
|
-
},
|
|
9521
|
-
{
|
|
9522
|
-
"description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
9523
|
-
"name": "--n-skeleton-color",
|
|
9524
|
-
"default": "var(--n-color-border)"
|
|
9525
|
-
},
|
|
9526
|
-
{
|
|
9527
|
-
"description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
9528
|
-
"name": "--n-skeleton-sheen-color",
|
|
9529
|
-
"default": "var(--n-color-border-strong)"
|
|
9530
|
-
}
|
|
9531
|
-
],
|
|
9532
|
-
"members": [
|
|
9533
|
-
{
|
|
9534
|
-
"kind": "field",
|
|
9535
|
-
"name": "effect",
|
|
9536
|
-
"type": {
|
|
9537
|
-
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
9538
|
-
},
|
|
9539
|
-
"default": "\"none\"",
|
|
9540
|
-
"description": "Determines which animation effect the skeleton will use.",
|
|
9541
|
-
"attribute": "effect"
|
|
9542
|
-
}
|
|
9543
|
-
],
|
|
9544
|
-
"attributes": [
|
|
9545
|
-
{
|
|
9546
|
-
"name": "effect",
|
|
9547
|
-
"type": {
|
|
9548
|
-
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
9549
|
-
},
|
|
9550
|
-
"default": "\"none\"",
|
|
9551
|
-
"description": "Determines which animation effect the skeleton will use.",
|
|
9552
|
-
"fieldName": "effect"
|
|
9553
|
-
}
|
|
9554
|
-
],
|
|
9555
|
-
"superclass": {
|
|
9556
|
-
"name": "LitElement",
|
|
9557
|
-
"package": "lit"
|
|
9558
|
-
},
|
|
9559
|
-
"status": "new",
|
|
9560
|
-
"category": "feedback",
|
|
9561
|
-
"displayName": null,
|
|
9562
|
-
"examples": [],
|
|
9563
|
-
"tagName": "nord-skeleton",
|
|
9564
|
-
"customElement": true
|
|
9565
|
-
}
|
|
9566
|
-
],
|
|
9567
|
-
"exports": [
|
|
9568
|
-
{
|
|
9569
|
-
"kind": "js",
|
|
9570
|
-
"name": "default",
|
|
9571
|
-
"declaration": {
|
|
9572
|
-
"name": "Skeleton",
|
|
9573
|
-
"module": "src/skeleton/Skeleton.ts"
|
|
9574
|
-
}
|
|
9575
|
-
},
|
|
9576
|
-
{
|
|
9577
|
-
"kind": "custom-element-definition",
|
|
9578
|
-
"name": "nord-skeleton",
|
|
9579
|
-
"declaration": {
|
|
9580
|
-
"name": "Skeleton",
|
|
9581
|
-
"module": "src/skeleton/Skeleton.ts"
|
|
9582
|
-
}
|
|
9583
|
-
}
|
|
9584
|
-
],
|
|
9585
|
-
"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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
|
|
9586
|
-
},
|
|
9587
9707
|
{
|
|
9588
9708
|
"kind": "javascript-module",
|
|
9589
9709
|
"path": "src/select/Select.ts",
|
|
@@ -10276,6 +10396,86 @@
|
|
|
10276
10396
|
],
|
|
10277
10397
|
"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"
|
|
10278
10398
|
},
|
|
10399
|
+
{
|
|
10400
|
+
"kind": "javascript-module",
|
|
10401
|
+
"path": "src/skeleton/Skeleton.ts",
|
|
10402
|
+
"declarations": [
|
|
10403
|
+
{
|
|
10404
|
+
"kind": "class",
|
|
10405
|
+
"description": "Skeletons are used to provide a low fidelity representation of content\nbefore it appears in a view. This improves the perceived loading time\nfor our users.",
|
|
10406
|
+
"name": "Skeleton",
|
|
10407
|
+
"cssProperties": [
|
|
10408
|
+
{
|
|
10409
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
10410
|
+
"name": "--n-skeleton-border-radius",
|
|
10411
|
+
"default": "var(--n-border-radius)"
|
|
10412
|
+
},
|
|
10413
|
+
{
|
|
10414
|
+
"description": "Controls the main color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10415
|
+
"name": "--n-skeleton-color",
|
|
10416
|
+
"default": "var(--n-color-border)"
|
|
10417
|
+
},
|
|
10418
|
+
{
|
|
10419
|
+
"description": "Controls the sheen color of the skeleton, using our [color tokens](/tokens/#color).",
|
|
10420
|
+
"name": "--n-skeleton-sheen-color",
|
|
10421
|
+
"default": "var(--n-color-border-strong)"
|
|
10422
|
+
}
|
|
10423
|
+
],
|
|
10424
|
+
"members": [
|
|
10425
|
+
{
|
|
10426
|
+
"kind": "field",
|
|
10427
|
+
"name": "effect",
|
|
10428
|
+
"type": {
|
|
10429
|
+
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
10430
|
+
},
|
|
10431
|
+
"default": "\"none\"",
|
|
10432
|
+
"description": "Determines which animation effect the skeleton will use.",
|
|
10433
|
+
"attribute": "effect"
|
|
10434
|
+
}
|
|
10435
|
+
],
|
|
10436
|
+
"attributes": [
|
|
10437
|
+
{
|
|
10438
|
+
"name": "effect",
|
|
10439
|
+
"type": {
|
|
10440
|
+
"text": "\"pulse\" | \"sheen\" | \"none\""
|
|
10441
|
+
},
|
|
10442
|
+
"default": "\"none\"",
|
|
10443
|
+
"description": "Determines which animation effect the skeleton will use.",
|
|
10444
|
+
"fieldName": "effect"
|
|
10445
|
+
}
|
|
10446
|
+
],
|
|
10447
|
+
"superclass": {
|
|
10448
|
+
"name": "LitElement",
|
|
10449
|
+
"package": "lit"
|
|
10450
|
+
},
|
|
10451
|
+
"status": "new",
|
|
10452
|
+
"category": "feedback",
|
|
10453
|
+
"displayName": null,
|
|
10454
|
+
"examples": [],
|
|
10455
|
+
"tagName": "nord-skeleton",
|
|
10456
|
+
"customElement": true
|
|
10457
|
+
}
|
|
10458
|
+
],
|
|
10459
|
+
"exports": [
|
|
10460
|
+
{
|
|
10461
|
+
"kind": "js",
|
|
10462
|
+
"name": "default",
|
|
10463
|
+
"declaration": {
|
|
10464
|
+
"name": "Skeleton",
|
|
10465
|
+
"module": "src/skeleton/Skeleton.ts"
|
|
10466
|
+
}
|
|
10467
|
+
},
|
|
10468
|
+
{
|
|
10469
|
+
"kind": "custom-element-definition",
|
|
10470
|
+
"name": "nord-skeleton",
|
|
10471
|
+
"declaration": {
|
|
10472
|
+
"name": "Skeleton",
|
|
10473
|
+
"module": "src/skeleton/Skeleton.ts"
|
|
10474
|
+
}
|
|
10475
|
+
}
|
|
10476
|
+
],
|
|
10477
|
+
"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 skeleton component for dynamic content only.\n- Use to give the user an indication of what the page layout will be like once loaded.\n- Mimick the actual layout using multiple Skeleton components.\n- Use `aria-busy=\"true\"` to indicate which area on the screen is currently loading and remove it or set it to `false` once loaded.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use Skeleton component for static content.\n- Don’t show placeholder content after Skeleton disappears that will change when the page fully loads.\n\n</div>\n"
|
|
10478
|
+
},
|
|
10279
10479
|
{
|
|
10280
10480
|
"kind": "javascript-module",
|
|
10281
10481
|
"path": "src/spinner/Spinner.ts",
|