@nordhealth/components 1.14.0 → 1.14.3

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.
@@ -503,75 +503,6 @@
503
503
  ],
504
504
  "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"
505
505
  },
506
- {
507
- "kind": "javascript-module",
508
- "path": "src/banner/Banner.ts",
509
- "declarations": [
510
- {
511
- "kind": "class",
512
- "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.",
513
- "name": "Banner",
514
- "slots": [
515
- {
516
- "description": "default slot",
517
- "name": ""
518
- }
519
- ],
520
- "members": [
521
- {
522
- "kind": "field",
523
- "name": "variant",
524
- "type": {
525
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
526
- },
527
- "default": "\"info\"",
528
- "description": "The style variant of the banner.",
529
- "attribute": "variant",
530
- "reflects": true
531
- }
532
- ],
533
- "attributes": [
534
- {
535
- "name": "variant",
536
- "type": {
537
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
538
- },
539
- "default": "\"info\"",
540
- "description": "The style variant of the banner.",
541
- "fieldName": "variant"
542
- }
543
- ],
544
- "superclass": {
545
- "name": "LitElement",
546
- "package": "lit"
547
- },
548
- "status": "ready",
549
- "category": "feedback",
550
- "displayName": null,
551
- "tagName": "nord-banner",
552
- "customElement": true
553
- }
554
- ],
555
- "exports": [
556
- {
557
- "kind": "js",
558
- "name": "default",
559
- "declaration": {
560
- "name": "Banner",
561
- "module": "src/banner/Banner.ts"
562
- }
563
- },
564
- {
565
- "kind": "custom-element-definition",
566
- "name": "nord-banner",
567
- "declaration": {
568
- "name": "Banner",
569
- "module": "src/banner/Banner.ts"
570
- }
571
- }
572
- ],
573
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use 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"
574
- },
575
506
  {
576
507
  "kind": "javascript-module",
577
508
  "path": "src/button/Button.ts",
@@ -770,6 +701,14 @@
770
701
  "kind": "method",
771
702
  "name": "handleProxyChange",
772
703
  "privacy": "private",
704
+ "parameters": [
705
+ {
706
+ "name": "e",
707
+ "type": {
708
+ "text": "Event"
709
+ }
710
+ }
711
+ ],
773
712
  "description": "React/Vue etc may remove our proxy button when updating button text, since they are unaware of its existence.\nSo we listen for a slotchange event, and if the element is no longer connected to the DOM we add it back in."
774
713
  },
775
714
  {
@@ -1036,6 +975,144 @@
1036
975
  ],
1037
976
  "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"
1038
977
  },
978
+ {
979
+ "kind": "javascript-module",
980
+ "path": "src/banner/Banner.ts",
981
+ "declarations": [
982
+ {
983
+ "kind": "class",
984
+ "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.",
985
+ "name": "Banner",
986
+ "slots": [
987
+ {
988
+ "description": "default slot",
989
+ "name": ""
990
+ }
991
+ ],
992
+ "members": [
993
+ {
994
+ "kind": "field",
995
+ "name": "variant",
996
+ "type": {
997
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
998
+ },
999
+ "default": "\"info\"",
1000
+ "description": "The style variant of the banner.",
1001
+ "attribute": "variant",
1002
+ "reflects": true
1003
+ }
1004
+ ],
1005
+ "attributes": [
1006
+ {
1007
+ "name": "variant",
1008
+ "type": {
1009
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
1010
+ },
1011
+ "default": "\"info\"",
1012
+ "description": "The style variant of the banner.",
1013
+ "fieldName": "variant"
1014
+ }
1015
+ ],
1016
+ "superclass": {
1017
+ "name": "LitElement",
1018
+ "package": "lit"
1019
+ },
1020
+ "status": "ready",
1021
+ "category": "feedback",
1022
+ "displayName": null,
1023
+ "tagName": "nord-banner",
1024
+ "customElement": true
1025
+ }
1026
+ ],
1027
+ "exports": [
1028
+ {
1029
+ "kind": "js",
1030
+ "name": "default",
1031
+ "declaration": {
1032
+ "name": "Banner",
1033
+ "module": "src/banner/Banner.ts"
1034
+ }
1035
+ },
1036
+ {
1037
+ "kind": "custom-element-definition",
1038
+ "name": "nord-banner",
1039
+ "declaration": {
1040
+ "name": "Banner",
1041
+ "module": "src/banner/Banner.ts"
1042
+ }
1043
+ }
1044
+ ],
1045
+ "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"
1046
+ },
1047
+ {
1048
+ "kind": "javascript-module",
1049
+ "path": "src/badge/Badge.ts",
1050
+ "declarations": [
1051
+ {
1052
+ "kind": "class",
1053
+ "description": "Badges are used to inform users of the status of an object or of an action that’s been taken. Commonly used in tabular data to indicate status.",
1054
+ "name": "Badge",
1055
+ "slots": [
1056
+ {
1057
+ "description": "The badge content.",
1058
+ "name": ""
1059
+ }
1060
+ ],
1061
+ "members": [
1062
+ {
1063
+ "kind": "field",
1064
+ "name": "type",
1065
+ "type": {
1066
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
1067
+ },
1068
+ "default": "\"info\"",
1069
+ "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
1070
+ "attribute": "type",
1071
+ "reflects": true
1072
+ }
1073
+ ],
1074
+ "attributes": [
1075
+ {
1076
+ "name": "type",
1077
+ "type": {
1078
+ "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
1079
+ },
1080
+ "default": "\"info\"",
1081
+ "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
1082
+ "fieldName": "type"
1083
+ }
1084
+ ],
1085
+ "superclass": {
1086
+ "name": "LitElement",
1087
+ "package": "lit"
1088
+ },
1089
+ "status": "ready",
1090
+ "category": "text",
1091
+ "displayName": null,
1092
+ "tagName": "nord-badge",
1093
+ "customElement": true
1094
+ }
1095
+ ],
1096
+ "exports": [
1097
+ {
1098
+ "kind": "js",
1099
+ "name": "default",
1100
+ "declaration": {
1101
+ "name": "Badge",
1102
+ "module": "src/badge/Badge.ts"
1103
+ }
1104
+ },
1105
+ {
1106
+ "kind": "custom-element-definition",
1107
+ "name": "nord-badge",
1108
+ "declaration": {
1109
+ "name": "Badge",
1110
+ "module": "src/badge/Badge.ts"
1111
+ }
1112
+ }
1113
+ ],
1114
+ "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"
1115
+ },
1039
1116
  {
1040
1117
  "kind": "javascript-module",
1041
1118
  "path": "src/calendar/Calendar.ts",
@@ -2850,75 +2927,6 @@
2850
2927
  ],
2851
2928
  "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&nbsp;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"
2852
2929
  },
2853
- {
2854
- "kind": "javascript-module",
2855
- "path": "src/badge/Badge.ts",
2856
- "declarations": [
2857
- {
2858
- "kind": "class",
2859
- "description": "Badges are used to inform users of the status of an object or of an action that’s been taken. Commonly used in tabular data to indicate status.",
2860
- "name": "Badge",
2861
- "slots": [
2862
- {
2863
- "description": "The badge content.",
2864
- "name": ""
2865
- }
2866
- ],
2867
- "members": [
2868
- {
2869
- "kind": "field",
2870
- "name": "type",
2871
- "type": {
2872
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
2873
- },
2874
- "default": "\"info\"",
2875
- "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
2876
- "attribute": "type",
2877
- "reflects": true
2878
- }
2879
- ],
2880
- "attributes": [
2881
- {
2882
- "name": "type",
2883
- "type": {
2884
- "text": "\"warning\" | \"success\" | \"danger\" | \"highlight\" | \"info\" | undefined"
2885
- },
2886
- "default": "\"info\"",
2887
- "description": "The type of badge.\nDetermines the color of the chip shown on the badge.",
2888
- "fieldName": "type"
2889
- }
2890
- ],
2891
- "superclass": {
2892
- "name": "LitElement",
2893
- "package": "lit"
2894
- },
2895
- "status": "ready",
2896
- "category": "text",
2897
- "displayName": null,
2898
- "tagName": "nord-badge",
2899
- "customElement": true
2900
- }
2901
- ],
2902
- "exports": [
2903
- {
2904
- "kind": "js",
2905
- "name": "default",
2906
- "declaration": {
2907
- "name": "Badge",
2908
- "module": "src/badge/Badge.ts"
2909
- }
2910
- },
2911
- {
2912
- "kind": "custom-element-definition",
2913
- "name": "nord-badge",
2914
- "declaration": {
2915
- "name": "Badge",
2916
- "module": "src/badge/Badge.ts"
2917
- }
2918
- }
2919
- ],
2920
- "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"
2921
- },
2922
2930
  {
2923
2931
  "kind": "javascript-module",
2924
2932
  "path": "src/common/attribute.ts",
@@ -5322,7 +5330,7 @@
5322
5330
  }
5323
5331
  }
5324
5332
  ],
5325
- "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- Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or commands, where an action is initiated based on the selection.\n- When organizing dropdown menu items, sort the list in a logical order by putting the most selected option at the top.\n- Use for a “more” menu, where the control contains an icon.\n- Use for user profiles, where the control is an avatar.\n- Use in conjunction with the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding primary actions since they should be visible by default.\n- Don’t use for selecting an option from a list of options, use the [select component](/components/select/) instead.\n- Don’t nest elements or components other than the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components. Consider using the [popout component](/components/popout/) when creating custom UI.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending dropdown items in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nAvoid all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n"
5333
+ "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- Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or commands, where an action is initiated based on the selection.\n- When organizing dropdown menu items, sort the list in a logical order by putting the most selected option at the top.\n- Use for a “more” menu, where the control contains an icon.\n- Use for user profiles, where the control is an avatar.\n- Use in conjunction with the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for form inputs or selects, use the [select component](/components/select/) or [input component](/components/input/) instead.\n- Don’t use for hiding primary actions since they should be visible by default.\n- Don’t nest elements or components other than the [dropdown item](/components/dropdown-item/) and [dropdown group](/components/dropdown-group/) components. Consider using the [popout component](/components/popout/) when creating custom UI.\n\n</div>\n\n---\n\n## Content guidelines\n\nDropdown items should be always written in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Create user</div>\n<div class=\"n-usage n-usage-dont\">Create User</div>\n\nDropdown items should always lead with a strong verb that encourages action. Use the `{verb}+{noun}` format except in the case of common actions like Save, Close or Cancel:\n\n<div class=\"n-usage n-usage-do\">Edit row</div>\n<div class=\"n-usage n-usage-dont\">Editing options</div>\n\nAvoid unnecessary words and articles in dropdown items, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending dropdown items in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nAvoid all caps for dropdown items:\n\n<div class=\"n-usage n-usage-do\">Rename</div>\n<div class=\"n-usage n-usage-dont\">RENAME</div>\n\nKeep dropdown items to a single line of text:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme<br/>of the veterinary application.</div>\n"
5326
5334
  },
5327
5335
  {
5328
5336
  "kind": "javascript-module",
@@ -6722,11 +6730,21 @@
6722
6730
  },
6723
6731
  {
6724
6732
  "kind": "field",
6725
- "name": "navToggleEl",
6726
- "type": {
6727
- "text": "Element | undefined"
6728
- },
6729
- "privacy": "private"
6733
+ "name": "direction",
6734
+ "privacy": "private",
6735
+ "default": "new DirectionController(this)"
6736
+ },
6737
+ {
6738
+ "kind": "field",
6739
+ "name": "events",
6740
+ "privacy": "private",
6741
+ "default": "new EventController(this)"
6742
+ },
6743
+ {
6744
+ "kind": "field",
6745
+ "name": "lightDismiss",
6746
+ "privacy": "private",
6747
+ "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !mediaQuery.matches,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl && !this.isNavToggle(node),\n })"
6730
6748
  },
6731
6749
  {
6732
6750
  "kind": "field",
@@ -6788,34 +6806,6 @@
6788
6806
  "attribute": "padding",
6789
6807
  "reflects": true
6790
6808
  },
6791
- {
6792
- "kind": "field",
6793
- "name": "lightDismiss",
6794
- "privacy": "private",
6795
- "default": "new LightDismissController(this, {\n isOpen: () => this.navState === \"opened\" && !this.mq.matches,\n onDismiss: () => this.navTransition(\"close\"),\n isDismissible: node => node !== this.navEl && node !== this.navToggleEl,\n })"
6796
- },
6797
- {
6798
- "kind": "field",
6799
- "name": "mq",
6800
- "privacy": "private",
6801
- "default": "new MediaQueryController(this, mediaQuery, () => this.handleMediaQueryChange())"
6802
- },
6803
- {
6804
- "kind": "field",
6805
- "name": "direction",
6806
- "privacy": "private",
6807
- "default": "new DirectionController(this)"
6808
- },
6809
- {
6810
- "kind": "method",
6811
- "name": "getToggleElement",
6812
- "privacy": "protected"
6813
- },
6814
- {
6815
- "kind": "method",
6816
- "name": "cleanup",
6817
- "privacy": "private"
6818
- },
6819
6809
  {
6820
6810
  "kind": "method",
6821
6811
  "name": "handleNavWidthChange",
@@ -6918,6 +6908,19 @@
6918
6908
  "name": "handleTransitionEnd",
6919
6909
  "privacy": "private"
6920
6910
  },
6911
+ {
6912
+ "kind": "method",
6913
+ "name": "isNavToggle",
6914
+ "privacy": "private",
6915
+ "parameters": [
6916
+ {
6917
+ "name": "node",
6918
+ "type": {
6919
+ "text": "EventTarget | null"
6920
+ }
6921
+ }
6922
+ ]
6923
+ },
6921
6924
  {
6922
6925
  "kind": "method",
6923
6926
  "name": "handleKeyboardResize",
@@ -8015,6 +8018,12 @@
8015
8018
  "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 })",
8016
8019
  "description": "Handle dismissal of the popout, clicking outside the target button and popout."
8017
8020
  },
8021
+ {
8022
+ "kind": "field",
8023
+ "name": "events",
8024
+ "privacy": "private",
8025
+ "default": "new EventController(this)"
8026
+ },
8018
8027
  {
8019
8028
  "kind": "field",
8020
8029
  "name": "direction",
@@ -12503,6 +12512,41 @@
12503
12512
  ],
12504
12513
  "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n"
12505
12514
  },
12515
+ {
12516
+ "kind": "javascript-module",
12517
+ "path": "src/common/decorators/observe.ts",
12518
+ "declarations": [
12519
+ {
12520
+ "kind": "function",
12521
+ "name": "observe",
12522
+ "parameters": [
12523
+ {
12524
+ "name": "propertyName",
12525
+ "type": {
12526
+ "text": "string"
12527
+ }
12528
+ },
12529
+ {
12530
+ "name": "lifecycle",
12531
+ "default": "\"update\"",
12532
+ "type": {
12533
+ "text": "ObserveLifecycle"
12534
+ }
12535
+ }
12536
+ ]
12537
+ }
12538
+ ],
12539
+ "exports": [
12540
+ {
12541
+ "kind": "js",
12542
+ "name": "observe",
12543
+ "declaration": {
12544
+ "name": "observe",
12545
+ "module": "src/common/decorators/observe.ts"
12546
+ }
12547
+ }
12548
+ ]
12549
+ },
12506
12550
  {
12507
12551
  "kind": "javascript-module",
12508
12552
  "path": "src/common/controllers/DirectionController.ts",
@@ -12737,6 +12781,42 @@
12737
12781
  }
12738
12782
  ]
12739
12783
  },
12784
+ {
12785
+ "kind": "method",
12786
+ "name": "listen",
12787
+ "return": {
12788
+ "type": {
12789
+ "text": "void"
12790
+ }
12791
+ },
12792
+ "parameters": [
12793
+ {
12794
+ "name": "element",
12795
+ "type": {
12796
+ "text": "MediaQueryList"
12797
+ }
12798
+ },
12799
+ {
12800
+ "name": "type",
12801
+ "type": {
12802
+ "text": "K"
12803
+ }
12804
+ },
12805
+ {
12806
+ "name": "listener",
12807
+ "type": {
12808
+ "text": "(this: ShadowRoot, ev: MediaQueryListEventMap[K]) => any"
12809
+ }
12810
+ },
12811
+ {
12812
+ "name": "options",
12813
+ "optional": true,
12814
+ "type": {
12815
+ "text": "boolean | AddEventListenerOptions"
12816
+ }
12817
+ }
12818
+ ]
12819
+ },
12740
12820
  {
12741
12821
  "kind": "method",
12742
12822
  "name": "listen",
@@ -12744,7 +12824,7 @@
12744
12824
  {
12745
12825
  "name": "element",
12746
12826
  "type": {
12747
- "text": "Window | Document | HTMLElement | ShadowRoot"
12827
+ "text": "Window | Document | HTMLElement | ShadowRoot | MediaQueryList"
12748
12828
  }
12749
12829
  },
12750
12830
  {
@@ -13116,53 +13196,6 @@
13116
13196
  }
13117
13197
  ]
13118
13198
  },
13119
- {
13120
- "kind": "javascript-module",
13121
- "path": "src/common/controllers/MediaQueryController.ts",
13122
- "declarations": [
13123
- {
13124
- "kind": "class",
13125
- "description": "",
13126
- "name": "MediaQueryController",
13127
- "members": [
13128
- {
13129
- "kind": "field",
13130
- "name": "mq",
13131
- "type": {
13132
- "text": "MediaQueryList"
13133
- },
13134
- "privacy": "private"
13135
- },
13136
- {
13137
- "kind": "field",
13138
- "name": "matches"
13139
- },
13140
- {
13141
- "kind": "method",
13142
- "name": "hostConnected"
13143
- },
13144
- {
13145
- "kind": "method",
13146
- "name": "hostDisconnected"
13147
- },
13148
- {
13149
- "kind": "field",
13150
- "name": "handleChange"
13151
- }
13152
- ]
13153
- }
13154
- ],
13155
- "exports": [
13156
- {
13157
- "kind": "js",
13158
- "name": "MediaQueryController",
13159
- "declaration": {
13160
- "name": "MediaQueryController",
13161
- "module": "src/common/controllers/MediaQueryController.ts"
13162
- }
13163
- }
13164
- ]
13165
- },
13166
13199
  {
13167
13200
  "kind": "javascript-module",
13168
13201
  "path": "src/common/controllers/PortalController.ts",
@@ -13534,41 +13567,6 @@
13534
13567
  }
13535
13568
  ]
13536
13569
  },
13537
- {
13538
- "kind": "javascript-module",
13539
- "path": "src/common/decorators/observe.ts",
13540
- "declarations": [
13541
- {
13542
- "kind": "function",
13543
- "name": "observe",
13544
- "parameters": [
13545
- {
13546
- "name": "propertyName",
13547
- "type": {
13548
- "text": "string"
13549
- }
13550
- },
13551
- {
13552
- "name": "lifecycle",
13553
- "default": "\"update\"",
13554
- "type": {
13555
- "text": "ObserveLifecycle"
13556
- }
13557
- }
13558
- ]
13559
- }
13560
- ],
13561
- "exports": [
13562
- {
13563
- "kind": "js",
13564
- "name": "observe",
13565
- "declaration": {
13566
- "name": "observe",
13567
- "module": "src/common/decorators/observe.ts"
13568
- }
13569
- }
13570
- ]
13571
- },
13572
13570
  {
13573
13571
  "kind": "javascript-module",
13574
13572
  "path": "src/common/directives/cond.ts",