@nordhealth/components 1.3.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  },
@@ -422,6 +430,74 @@
422
430
  ],
423
431
  "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"
424
432
  },
433
+ {
434
+ "kind": "javascript-module",
435
+ "path": "src/banner/Banner.ts",
436
+ "declarations": [
437
+ {
438
+ "kind": "class",
439
+ "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.",
440
+ "name": "Banner",
441
+ "slots": [
442
+ {
443
+ "description": "default slot",
444
+ "name": ""
445
+ }
446
+ ],
447
+ "members": [
448
+ {
449
+ "kind": "field",
450
+ "name": "variant",
451
+ "type": {
452
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
453
+ },
454
+ "default": "\"info\"",
455
+ "description": "The style variant of the banner.",
456
+ "attribute": "variant",
457
+ "reflects": true
458
+ }
459
+ ],
460
+ "attributes": [
461
+ {
462
+ "name": "variant",
463
+ "type": {
464
+ "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
465
+ },
466
+ "default": "\"info\"",
467
+ "description": "The style variant of the banner.",
468
+ "fieldName": "variant"
469
+ }
470
+ ],
471
+ "superclass": {
472
+ "name": "LitElement",
473
+ "package": "lit"
474
+ },
475
+ "status": "ready",
476
+ "category": "feedback",
477
+ "tagName": "nord-banner",
478
+ "customElement": true
479
+ }
480
+ ],
481
+ "exports": [
482
+ {
483
+ "kind": "js",
484
+ "name": "default",
485
+ "declaration": {
486
+ "name": "Banner",
487
+ "module": "src/banner/Banner.ts"
488
+ }
489
+ },
490
+ {
491
+ "kind": "custom-element-definition",
492
+ "name": "nord-banner",
493
+ "declaration": {
494
+ "name": "Banner",
495
+ "module": "src/banner/Banner.ts"
496
+ }
497
+ }
498
+ ],
499
+ "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"
500
+ },
425
501
  {
426
502
  "kind": "javascript-module",
427
503
  "path": "src/button/Button.ts",
@@ -466,7 +542,7 @@
466
542
  "kind": "field",
467
543
  "name": "variant",
468
544
  "type": {
469
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
545
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
470
546
  },
471
547
  "default": "\"default\"",
472
548
  "description": "The style variant of the button.",
@@ -708,7 +784,7 @@
708
784
  {
709
785
  "name": "variant",
710
786
  "type": {
711
- "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\""
787
+ "text": "\"default\" | \"primary\" | \"dashed\" | \"plain\" | \"danger\" | \"switch\""
712
788
  },
713
789
  "default": "\"default\"",
714
790
  "description": "The style variant of the button.",
@@ -858,7 +934,7 @@
858
934
  }
859
935
  }
860
936
  ],
861
- "readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use clear and accurate labels.\n- Use established button colors appropriately. For example, only use a danger button style for an action that’s difficult or impossible to undo.\n- Prioritize the most important actions. Too many buttons will cause confusion.\n- Be consistent with positioning of buttons in the user interface.\n- Use strong, actionable verbs in labels such as “Add”, “Close”, “Cancel”, or “Save”.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use buttons to link to other pages. Use regular link or a plain style instead where necessary.\n- Don’t use buttons for navigation where the link appears within or following a sentence.\n- Don’t use labels such as “Read more”, “Click here” or “More”.\n\n</div>\n\n---\n\n## Content guidelines\n\nButton labels should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they click a button:\n\n<div class=\"n-usage n-usage-do\">View user settings</div>\n<div class=\"n-usage n-usage-dont\">Click here</div>\n\nWhen writing button labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">My tasks</div>\n<div class=\"n-usage n-usage-dont\">My Tasks</div>\n\nAvoid unnecessary words and articles in button labels, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Add item</div>\n<div class=\"n-usage n-usage-dont\">Add an item</div>\n\n---\n\n## Variants\n\nThis section describes the different component variants, their purpose, and when to use each variant.\n\n| Name | Purpose |\n| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `default` | Default style is the most common button variant. Only switch to another variant if you need to adjust the visual weight of the element. |\n| `primary` | Primary style is reserved for main call-to-actions. Should be used only once per content area or panel, e.g. for a “Save” action. |\n| `dashed` | Dashed style should be used for actions that trigger filtering. |\n| `danger` | Danger style should be used for actions that delete data or otherwise make it hard to undo the action. |\n| `plain` | Used for less important or less common actions. Can be also used for linking to other pages. |\n| `disabled` | Used for actions that aren’t currently available or not available anymore. Also prevents users from being able to interact with the component, and conveys its inactive state to assistive technologies. |\n\n---\n\n## Additional considerations\n\n- Users of assistive technology expect a button to submit data or do an action. If you need the button to navigate into another view, use the `href` property which will output `<a>` tag instead of a `<button>`.\n- When you need to disable a button, use `disabled` property as it conveys this information correctly to assistive technologies like screen readers.\n- Button component provides 3 size variants; small, medium and large. The large size should only be used for marketing purposes or on areas such as an empty space/content notice.\n"
937
+ "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"
862
938
  },
863
939
  {
864
940
  "kind": "javascript-module",
@@ -928,74 +1004,6 @@
928
1004
  ],
929
1005
  "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"
930
1006
  },
931
- {
932
- "kind": "javascript-module",
933
- "path": "src/banner/Banner.ts",
934
- "declarations": [
935
- {
936
- "kind": "class",
937
- "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.",
938
- "name": "Banner",
939
- "slots": [
940
- {
941
- "description": "default slot",
942
- "name": ""
943
- }
944
- ],
945
- "members": [
946
- {
947
- "kind": "field",
948
- "name": "variant",
949
- "type": {
950
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
951
- },
952
- "default": "\"info\"",
953
- "description": "The style variant of the banner.",
954
- "attribute": "variant",
955
- "reflects": true
956
- }
957
- ],
958
- "attributes": [
959
- {
960
- "name": "variant",
961
- "type": {
962
- "text": "\"info\" | \"danger\" | \"success\" | \"warning\""
963
- },
964
- "default": "\"info\"",
965
- "description": "The style variant of the banner.",
966
- "fieldName": "variant"
967
- }
968
- ],
969
- "superclass": {
970
- "name": "LitElement",
971
- "package": "lit"
972
- },
973
- "status": "ready",
974
- "category": "feedback",
975
- "tagName": "nord-banner",
976
- "customElement": true
977
- }
978
- ],
979
- "exports": [
980
- {
981
- "kind": "js",
982
- "name": "default",
983
- "declaration": {
984
- "name": "Banner",
985
- "module": "src/banner/Banner.ts"
986
- }
987
- },
988
- {
989
- "kind": "custom-element-definition",
990
- "name": "nord-banner",
991
- "declaration": {
992
- "name": "Banner",
993
- "module": "src/banner/Banner.ts"
994
- }
995
- }
996
- ],
997
- "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"
998
- },
999
1007
  {
1000
1008
  "kind": "javascript-module",
1001
1009
  "path": "src/calendar/Calendar.ts",
@@ -2214,7 +2222,7 @@
2214
2222
  }
2215
2223
  }
2216
2224
  ],
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- Don’t use when you have more than 10 options to choose from.\n- Don’t change the selection of another checkbox when another one is clicked. Only exception is when a checkbox is used to make a bulk selection of multiple items.\n\n</div>\n\n---\n\n## Content guidelines\n\nCheckbox labels should be clear, accurate and predictable. It should be possible for the user to understand what they are selecting:\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">Option 1</div>\n\nWhen writing checkbox labels, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">User settings</div>\n<div class=\"n-usage n-usage-dont\">User Settings</div>\n\nAvoid ending in punctuation if it’s a single sentence, word, or a fragment:\n\n<div class=\"n-usage n-usage-do\">Show dashboard</div>\n<div class=\"n-usage n-usage-dont\">Show dashboard.</div>\n\nDo not use commas or semicolons at the end of each line\n\n<div class=\"n-usage n-usage-do\">Patients</div>\n<div class=\"n-usage n-usage-dont\">Patients;</div>\n"
2225
+ "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
2226
  },
2219
2227
  {
2220
2228
  "kind": "javascript-module",
@@ -9938,101 +9946,772 @@
9938
9946
  },
9939
9947
  {
9940
9948
  "kind": "javascript-module",
9941
- "path": "src/tooltip/Tooltip.ts",
9949
+ "path": "src/toggle/Toggle.ts",
9942
9950
  "declarations": [
9943
9951
  {
9944
9952
  "kind": "class",
9945
- "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
9946
- "name": "Tooltip",
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",
9947
9955
  "slots": [
9948
9956
  {
9949
- "description": "The tooltip content",
9950
- "name": ""
9957
+ "description": "Use when a label requires more than plain text.",
9958
+ "name": "label"
9951
9959
  },
9952
9960
  {
9953
- "description": "Optional slot that holds shortcut keys to access the subject",
9954
- "name": "shortcut"
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"
9955
9967
  }
9956
9968
  ],
9957
9969
  "members": [
9958
9970
  {
9959
9971
  "kind": "field",
9960
- "name": "lastOpened",
9961
- "type": {
9962
- "text": "Tooltip | undefined"
9963
- },
9964
- "privacy": "private",
9965
- "static": true
9966
- },
9967
- {
9968
- "kind": "field",
9969
- "name": "shortcutSlot",
9970
- "privacy": "private",
9971
- "default": "new SlotController(this, \"shortcut\")"
9972
- },
9973
- {
9974
- "kind": "field",
9975
- "name": "events",
9976
- "privacy": "private",
9977
- "default": "new EventController(this)"
9972
+ "name": "formValue",
9973
+ "privacy": "protected",
9974
+ "inheritedFrom": {
9975
+ "name": "FormAssociatedMixin",
9976
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
9977
+ }
9978
9978
  },
9979
9979
  {
9980
9980
  "kind": "field",
9981
- "name": "currentElement",
9981
+ "name": "checked",
9982
9982
  "type": {
9983
- "text": "FocusableElement | undefined"
9983
+ "text": "boolean"
9984
9984
  },
9985
- "privacy": "private"
9985
+ "default": "false",
9986
+ "description": "Controls whether the toggle is checked or not.",
9987
+ "attribute": "checked"
9986
9988
  },
9987
9989
  {
9988
9990
  "kind": "field",
9989
- "name": "timeoutId",
9991
+ "name": "reverse",
9990
9992
  "type": {
9991
- "text": "ReturnType<typeof setTimeout> | undefined"
9993
+ "text": "boolean"
9992
9994
  },
9993
- "privacy": "private"
9995
+ "default": "false",
9996
+ "description": "Controls whether the contents are displayed in reverse order,\nputting the label before the toggle.",
9997
+ "attribute": "reverse"
9994
9998
  },
9995
9999
  {
9996
10000
  "kind": "field",
9997
- "name": "proxy",
9998
- "privacy": "private",
9999
- "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
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
10000
10009
  },
10001
10010
  {
10002
- "kind": "field",
10003
- "name": "state",
10004
- "type": {
10005
- "text": "TooltipStates"
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
+ }
10006
10026
  },
10007
- "privacy": "private",
10008
- "default": "\"hidden\"",
10009
- "description": "The current state of the tooltip, dependent on the state machine"
10027
+ "inheritedFrom": {
10028
+ "name": "FormAssociatedMixin",
10029
+ "module": "src/common/mixins/FormAssociatedMixin.ts"
10030
+ }
10010
10031
  },
10011
10032
  {
10012
10033
  "kind": "field",
10013
- "name": "coords",
10034
+ "name": "_warningLogged",
10014
10035
  "type": {
10015
- "text": "[number, number]"
10036
+ "text": "boolean"
10016
10037
  },
10017
10038
  "privacy": "private",
10018
- "default": "[0, 0]"
10039
+ "static": true,
10040
+ "default": "false",
10041
+ "inheritedFrom": {
10042
+ "name": "DraftComponentMixin",
10043
+ "module": "src/common/mixins/DraftComponentMixin.ts"
10044
+ }
10019
10045
  },
10020
10046
  {
10021
10047
  "kind": "field",
10022
- "name": "position",
10023
- "type": {
10024
- "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
10025
- },
10026
- "default": "\"block-start\"",
10027
- "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
10028
- "attribute": "position",
10029
- "reflects": true
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
+ }
10030
10055
  },
10031
10056
  {
10032
10057
  "kind": "field",
10033
- "name": "role",
10034
- "type": {
10035
- "text": "string"
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
+ },
10618
+ {
10619
+ "kind": "javascript-module",
10620
+ "path": "src/tooltip/Tooltip.ts",
10621
+ "declarations": [
10622
+ {
10623
+ "kind": "class",
10624
+ "description": "Tooltips are floating containers for displaying additional information\nfor the currently focused element. A tooltip can be useful when you want\nto e.g. give a hint about an existing Command Menu shortcut.",
10625
+ "name": "Tooltip",
10626
+ "slots": [
10627
+ {
10628
+ "description": "The tooltip content",
10629
+ "name": ""
10630
+ },
10631
+ {
10632
+ "description": "Optional slot that holds shortcut keys to access the subject",
10633
+ "name": "shortcut"
10634
+ }
10635
+ ],
10636
+ "members": [
10637
+ {
10638
+ "kind": "field",
10639
+ "name": "lastOpened",
10640
+ "type": {
10641
+ "text": "Tooltip | undefined"
10642
+ },
10643
+ "privacy": "private",
10644
+ "static": true
10645
+ },
10646
+ {
10647
+ "kind": "field",
10648
+ "name": "shortcutSlot",
10649
+ "privacy": "private",
10650
+ "default": "new SlotController(this, \"shortcut\")"
10651
+ },
10652
+ {
10653
+ "kind": "field",
10654
+ "name": "events",
10655
+ "privacy": "private",
10656
+ "default": "new EventController(this)"
10657
+ },
10658
+ {
10659
+ "kind": "field",
10660
+ "name": "currentElement",
10661
+ "type": {
10662
+ "text": "FocusableElement | undefined"
10663
+ },
10664
+ "privacy": "private"
10665
+ },
10666
+ {
10667
+ "kind": "field",
10668
+ "name": "timeoutId",
10669
+ "type": {
10670
+ "text": "ReturnType<typeof setTimeout> | undefined"
10671
+ },
10672
+ "privacy": "private"
10673
+ },
10674
+ {
10675
+ "kind": "field",
10676
+ "name": "proxy",
10677
+ "privacy": "private",
10678
+ "description": "the proxy element is for cases where the targetElement is a web component,\nand the WC has a focusable child in its shadow root e.g. a button component.\nin this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\nand wire up aria-describedby from the focusable element to the proxy.\nwhen the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship."
10679
+ },
10680
+ {
10681
+ "kind": "field",
10682
+ "name": "state",
10683
+ "type": {
10684
+ "text": "TooltipStates"
10685
+ },
10686
+ "privacy": "private",
10687
+ "default": "\"hidden\"",
10688
+ "description": "The current state of the tooltip, dependent on the state machine"
10689
+ },
10690
+ {
10691
+ "kind": "field",
10692
+ "name": "coords",
10693
+ "type": {
10694
+ "text": "[number, number]"
10695
+ },
10696
+ "privacy": "private",
10697
+ "default": "[0, 0]"
10698
+ },
10699
+ {
10700
+ "kind": "field",
10701
+ "name": "position",
10702
+ "type": {
10703
+ "text": "\"block-end\" | \"block-start\" | \"inline-start\" | \"inline-end\""
10704
+ },
10705
+ "default": "\"block-start\"",
10706
+ "description": "Control the position of the tooltip component.\nWhen set to \"none\", the tooltip will be shown above\nbut accommodate for browser boundaries.",
10707
+ "attribute": "position",
10708
+ "reflects": true
10709
+ },
10710
+ {
10711
+ "kind": "field",
10712
+ "name": "role",
10713
+ "type": {
10714
+ "text": "string"
10036
10715
  },
10037
10716
  "default": "\"tooltip\"",
10038
10717
  "description": "The tooltip role, set on the component by default.",
@@ -10234,41 +10913,6 @@
10234
10913
  ],
10235
10914
  "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"
10236
10915
  },
10237
- {
10238
- "kind": "javascript-module",
10239
- "path": "src/common/decorators/observe.ts",
10240
- "declarations": [
10241
- {
10242
- "kind": "function",
10243
- "name": "observe",
10244
- "parameters": [
10245
- {
10246
- "name": "propertyName",
10247
- "type": {
10248
- "text": "string"
10249
- }
10250
- },
10251
- {
10252
- "name": "lifecycle",
10253
- "default": "\"update\"",
10254
- "type": {
10255
- "text": "ObserveLifecycle"
10256
- }
10257
- }
10258
- ]
10259
- }
10260
- ],
10261
- "exports": [
10262
- {
10263
- "kind": "js",
10264
- "name": "observe",
10265
- "declaration": {
10266
- "name": "observe",
10267
- "module": "src/common/decorators/observe.ts"
10268
- }
10269
- }
10270
- ]
10271
- },
10272
10916
  {
10273
10917
  "kind": "javascript-module",
10274
10918
  "path": "src/common/controllers/DirectionController.ts",
@@ -11163,6 +11807,41 @@
11163
11807
  }
11164
11808
  ]
11165
11809
  },
11810
+ {
11811
+ "kind": "javascript-module",
11812
+ "path": "src/common/decorators/observe.ts",
11813
+ "declarations": [
11814
+ {
11815
+ "kind": "function",
11816
+ "name": "observe",
11817
+ "parameters": [
11818
+ {
11819
+ "name": "propertyName",
11820
+ "type": {
11821
+ "text": "string"
11822
+ }
11823
+ },
11824
+ {
11825
+ "name": "lifecycle",
11826
+ "default": "\"update\"",
11827
+ "type": {
11828
+ "text": "ObserveLifecycle"
11829
+ }
11830
+ }
11831
+ ]
11832
+ }
11833
+ ],
11834
+ "exports": [
11835
+ {
11836
+ "kind": "js",
11837
+ "name": "observe",
11838
+ "declaration": {
11839
+ "name": "observe",
11840
+ "module": "src/common/decorators/observe.ts"
11841
+ }
11842
+ }
11843
+ ]
11844
+ },
11166
11845
  {
11167
11846
  "kind": "javascript-module",
11168
11847
  "path": "src/common/directives/cond.ts",