@nordhealth/components 1.0.0-alpha.55 → 1.0.0-alpha.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +184 -184
- package/lib/Icon.js +1 -1
- package/lib/Tooltip.js +1 -1
- package/lib/Tooltip.js.map +1 -1
- package/package.json +3 -3
package/custom-elements.json
CHANGED
|
@@ -686,6 +686,114 @@
|
|
|
686
686
|
],
|
|
687
687
|
"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"
|
|
688
688
|
},
|
|
689
|
+
{
|
|
690
|
+
"kind": "javascript-module",
|
|
691
|
+
"path": "src/card/Card.ts",
|
|
692
|
+
"declarations": [
|
|
693
|
+
{
|
|
694
|
+
"kind": "class",
|
|
695
|
+
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
696
|
+
"name": "Card",
|
|
697
|
+
"slots": [
|
|
698
|
+
{
|
|
699
|
+
"description": "The card content.",
|
|
700
|
+
"name": ""
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"description": "Optional slot that holds a header for the card.",
|
|
704
|
+
"name": "header"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"description": "Optional slot that holds footer content for the card.",
|
|
708
|
+
"name": "footer"
|
|
709
|
+
}
|
|
710
|
+
],
|
|
711
|
+
"members": [
|
|
712
|
+
{
|
|
713
|
+
"kind": "field",
|
|
714
|
+
"name": "headerSlot",
|
|
715
|
+
"privacy": "private",
|
|
716
|
+
"default": "new SlotController(this, \"header\")"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"kind": "field",
|
|
720
|
+
"name": "footerSlot",
|
|
721
|
+
"privacy": "private",
|
|
722
|
+
"default": "new SlotController(this, \"footer\")"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
"kind": "field",
|
|
726
|
+
"name": "padding",
|
|
727
|
+
"type": {
|
|
728
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
729
|
+
},
|
|
730
|
+
"default": "\"m\"",
|
|
731
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
732
|
+
"attribute": "padding",
|
|
733
|
+
"reflects": true
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
"kind": "field",
|
|
737
|
+
"name": "_warningLogged",
|
|
738
|
+
"type": {
|
|
739
|
+
"text": "boolean"
|
|
740
|
+
},
|
|
741
|
+
"privacy": "private",
|
|
742
|
+
"static": true,
|
|
743
|
+
"default": "false",
|
|
744
|
+
"inheritedFrom": {
|
|
745
|
+
"name": "DraftComponentMixin",
|
|
746
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
],
|
|
750
|
+
"attributes": [
|
|
751
|
+
{
|
|
752
|
+
"name": "padding",
|
|
753
|
+
"type": {
|
|
754
|
+
"text": "\"m\" | \"l\" | \"none\""
|
|
755
|
+
},
|
|
756
|
+
"default": "\"m\"",
|
|
757
|
+
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
758
|
+
"fieldName": "padding"
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
"mixins": [
|
|
762
|
+
{
|
|
763
|
+
"name": "DraftComponentMixin",
|
|
764
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
765
|
+
}
|
|
766
|
+
],
|
|
767
|
+
"superclass": {
|
|
768
|
+
"name": "LitElement",
|
|
769
|
+
"package": "lit"
|
|
770
|
+
},
|
|
771
|
+
"status": "draft",
|
|
772
|
+
"category": "structure",
|
|
773
|
+
"tagName": "nord-card",
|
|
774
|
+
"customElement": true
|
|
775
|
+
}
|
|
776
|
+
],
|
|
777
|
+
"exports": [
|
|
778
|
+
{
|
|
779
|
+
"kind": "js",
|
|
780
|
+
"name": "default",
|
|
781
|
+
"declaration": {
|
|
782
|
+
"name": "Card",
|
|
783
|
+
"module": "src/card/Card.ts"
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"kind": "custom-element-definition",
|
|
788
|
+
"name": "nord-card",
|
|
789
|
+
"declaration": {
|
|
790
|
+
"name": "Card",
|
|
791
|
+
"module": "src/card/Card.ts"
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
],
|
|
795
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
796
|
+
},
|
|
689
797
|
{
|
|
690
798
|
"kind": "javascript-module",
|
|
691
799
|
"path": "src/calendar/Calendar.ts",
|
|
@@ -2366,114 +2474,6 @@
|
|
|
2366
2474
|
],
|
|
2367
2475
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to provide global and contextual keyboard shortcuts for users.\n- Make command menu available everywhere. Users must be able to bring up the command menu easily.\n- Make command menu central. Users should be able to find global shortcuts from one location.\n- Make command menu omnipotent. Give users access to every possible action.\n- Group related commands logically under sections with the section setting.\n- Use `Alt` key as the modifier, since this is less likely to clash with existing shortcuts.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t make command menu available only in certain views of the application.\n- Don’t define shortcuts such as `Ctrl+C`, since this will clash with the native \"Copy\" shortcut.\n- Don't create complex shortcuts, as users will struggle to remember them.\n- Avoid using `KeyboardEvent.key` for defining the shortcut keys.\n- Don’t use as a search field only.\n\n</div>\n\n---\n\n## Content guidelines\n\nCommand titles should be clear, accurate and predictable. It should be possible for the user to understand what will happen when they execute a command:\n\n<div class=\"n-usage n-usage-do\">Start consultation</div>\n<div class=\"n-usage n-usage-dont\">Consultation</div>\n\nAlways lead with a strong verb that encourages action. To provide enough context to user, use the {verb} + {noun} content formula:\n\n<div class=\"n-usage n-usage-do\">Open dashboard</div>\n<div class=\"n-usage n-usage-dont\">Dashboard</div>\n\nWhen writing command titles, always write them in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">New appointment</div>\n<div class=\"n-usage n-usage-dont\">New Appointment</div>\n\nAvoid unnecessary words and articles in command titles, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Change theme</div>\n<div class=\"n-usage n-usage-dont\">Change the theme</div>\n\nAvoid ending in punctuation:\n\n<div class=\"n-usage n-usage-do\">Switch user</div>\n<div class=\"n-usage n-usage-dont\">Switch user.</div>\n\nUse ellipsis in the title when describing sections that have commands grouped inside of them:\n\n<div class=\"n-usage n-usage-do\">Change theme…</div>\n<div class=\"n-usage n-usage-dont\">Change theme</div>\n\n---\n\n## Commands data\n\nEach command in the `commands` data array must include at least an `id` and `title`. A command may also include properties for `section`, `icon`, `handler`, `shortcut` , `parent`, and `keywords`:\n\n| Name | Purpose |\n| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `id` | An identifier for each command, must be unique. Example: `id: \"user\"`. |\n| `title` | The title shown to users. This is used when searching for a command. Example: `title: \"Change theme...\"`. |\n| `keywords` | Not visible in the user interface, but can make it easier to discover commands through search. Example: `keywords: \"command change log sign out in\"`. |\n| `shortcut` | The keyboard shortcut. Example: `shortcut: \"Alt+KeyU\"`. See the sections [Defining Shortcuts](#defining-shortcuts) and [Choosing shortcuts](#choosing-shortcuts) below for more information. |\n| `section` | Used for grouping many commands under a common header. Example: `section: \"Commands\"`. |\n| `icon` | A name of an icon form Nordicons to show beside the title. If not specified, default command icon will be used instead. Example: `icon: \"file-picture\"`. |\n| `parent` | The `id` of a parent command. This is used for nesting commands. Example: `parent: \"theme\"`. |\n| `handler` | A function to execute when an user triggers a command. Example: `handler: () => { alert(\"Change to light theme\") }`. In cases where a command is only used as a parent command e.g. \"Change theme\", this is not required. |\n\n---\n\n## Defining shortcuts\n\nShortcuts in the Command Menu have the following form: `[modifier]+[key]`. Shortcuts are made up of a sequence of presses. A press can be as simple as a single key which matches against [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values):\n\n```js\n// Matches: event.code:\n\"KeyD\"\n```\n\nPresses can optionally be prefixed with **_modifiers_** which match against any valid value to [`KeyboardEvent.getModifierState()`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/getModifierState).\n\n```js\n\"Control+KeyD\"\n\"Meta+KeyD\"\n\"Shift+KeyD\"\n\"Alt+KeyD\"\n\"Meta+Shift+KeyD\"\n```\n\nThere is also a special `$mod` modifier that makes it easy to support cross platform keybindings:\n\n- Mac: `$mod` = `Meta` (⌘)\n- Windows/Linux: `$mod` = `Control`\n\n```js\n\"$mod+KeyD\" // ⌘/Ctrl + D\n\"$mod+Shift+KeyD\" // ⌘/Ctrl + Shift + D\n```\n\nThe Command Menu itself can be opened using `⌘+k` (or `Ctrl+k` on Windows) and closed by hitting `Esc`. These are both non-configurable shortcuts in order to unify the experience across our platforms.\n\n---\n\n## Choosing shortcuts\n\nWhen choosing shortcuts, it is very important that they do not clash with native operating system or browser shortcuts.\n\nFor example, you _should not_ define a shortcut like `$mod+KeyC`, since this will clash with the native “Copy” shortcut, and will be triggered every time a user copies text in the app. Nor should you use shortcuts like `Shift+KeyA` since this will get triggered whenever a user types an uppercase “A” character. Therefore, special care and attention must be given to _each and every_ shortcut choice.\n\nIn general, we recommend using the `Alt` modifier, since this is less likely to clash with existing shortcuts. However, be aware, the `Alt` key is also used for accented characters e.g. `Alt+KeyA` produces the letter “å”. Again, it is crucial that you choose shortcuts carefully.\n\nYou should strive to choose shortcuts that are intuitive and easy to remember. The more complex a shortcut, the less likely a user is to remember it. Of course, a user can still find a command by searching the command menu, and for some users this may be their preferred way of triggering commands.\n\n---\n\n## Common keybindings\n\nKeybindings will be matched against [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) and [`KeyboardEvent.code`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code/code_values) which may have some names you don’t expect. Please note that we recommend always using `KeyboardEvent.code` for defining the keys and only using `KeyboardEvent.key` for defining modifiers.\n\n| Windows | macOS | key | code |\n| ------------- | --------------- | ------------- | ------------------------------ |\n| N/A | `Command` / `⌘` | `Meta` | `MetaLeft` / `MetaRight` |\n| `Alt` | `Option` / `⌥` | `Alt` | `AltLeft` / `AltRight` |\n| `Control` | `Control` / `^` | `Control` | `ControlLeft` / `ControlRight` |\n| `Shift` | `Shift` | `Shift` | `ShiftLeft` / `ShiftRight` |\n| `Space` | `Space` | N/A | `Space` |\n| `Enter` | `Return` | `Enter` | `Enter` |\n| `Esc` | `Esc` | `Escape` | `Escape` |\n| `1`, `2`, etc | `1`, `2`, etc | `1`, `2`, etc | `Digit1`, `Digit2`, etc |\n| `a`, `b`, etc | `a`, `b`, etc | `a`, `b`, etc | `KeyA`, `KeyB`, etc |\n| `-` | `-` | `-` | `Minus` |\n| `=` | `=` | `=` | `Equal` |\n| `+` | `+` | `+` | `Equal`\\* |\n\nIn addition to the above table, you can use [https://keycode.info/](https://keycode.info/) for checking the specific values needed. Note that some keys will have the same code as others because they appear on the same key on the keyboard. Keep in mind how this is affected by international keyboards which may have different layouts.\n\n---\n\n## Navigating with the command menu\n\n1. Use `Ctrl+K` (Windows/Linux) or `Cmd+K` (Mac) to open the command menu.\n2. Start typing the command you want to execute. The suggestions in the command menu change to match your text.\n3. Finish entering the name, or use the arrow keys to highlight the command you want from the list of suggestions.\n4. Use `Enter` to execute the chosen command.\n5. If you chose a command that has nested commands, you can use `Backspace` to return to the previous menu.\n6. When the command menu is active, you can use one of the following keyboard shortcuts to close it: `Esc`, `Ctrl+K` (Windows and Linux) or `Cmd+K` (Mac).\n"
|
|
2368
2476
|
},
|
|
2369
|
-
{
|
|
2370
|
-
"kind": "javascript-module",
|
|
2371
|
-
"path": "src/card/Card.ts",
|
|
2372
|
-
"declarations": [
|
|
2373
|
-
{
|
|
2374
|
-
"kind": "class",
|
|
2375
|
-
"description": "Cards are shadowed surfaces that display content and actions on a\nsingle topic. They should be easy to scan for relevant and\nactionable information.",
|
|
2376
|
-
"name": "Card",
|
|
2377
|
-
"slots": [
|
|
2378
|
-
{
|
|
2379
|
-
"description": "The card content.",
|
|
2380
|
-
"name": ""
|
|
2381
|
-
},
|
|
2382
|
-
{
|
|
2383
|
-
"description": "Optional slot that holds a header for the card.",
|
|
2384
|
-
"name": "header"
|
|
2385
|
-
},
|
|
2386
|
-
{
|
|
2387
|
-
"description": "Optional slot that holds footer content for the card.",
|
|
2388
|
-
"name": "footer"
|
|
2389
|
-
}
|
|
2390
|
-
],
|
|
2391
|
-
"members": [
|
|
2392
|
-
{
|
|
2393
|
-
"kind": "field",
|
|
2394
|
-
"name": "headerSlot",
|
|
2395
|
-
"privacy": "private",
|
|
2396
|
-
"default": "new SlotController(this, \"header\")"
|
|
2397
|
-
},
|
|
2398
|
-
{
|
|
2399
|
-
"kind": "field",
|
|
2400
|
-
"name": "footerSlot",
|
|
2401
|
-
"privacy": "private",
|
|
2402
|
-
"default": "new SlotController(this, \"footer\")"
|
|
2403
|
-
},
|
|
2404
|
-
{
|
|
2405
|
-
"kind": "field",
|
|
2406
|
-
"name": "padding",
|
|
2407
|
-
"type": {
|
|
2408
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2409
|
-
},
|
|
2410
|
-
"default": "\"m\"",
|
|
2411
|
-
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2412
|
-
"attribute": "padding",
|
|
2413
|
-
"reflects": true
|
|
2414
|
-
},
|
|
2415
|
-
{
|
|
2416
|
-
"kind": "field",
|
|
2417
|
-
"name": "_warningLogged",
|
|
2418
|
-
"type": {
|
|
2419
|
-
"text": "boolean"
|
|
2420
|
-
},
|
|
2421
|
-
"privacy": "private",
|
|
2422
|
-
"static": true,
|
|
2423
|
-
"default": "false",
|
|
2424
|
-
"inheritedFrom": {
|
|
2425
|
-
"name": "DraftComponentMixin",
|
|
2426
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
2427
|
-
}
|
|
2428
|
-
}
|
|
2429
|
-
],
|
|
2430
|
-
"attributes": [
|
|
2431
|
-
{
|
|
2432
|
-
"name": "padding",
|
|
2433
|
-
"type": {
|
|
2434
|
-
"text": "\"m\" | \"l\" | \"none\""
|
|
2435
|
-
},
|
|
2436
|
-
"default": "\"m\"",
|
|
2437
|
-
"description": "Controls the padding of card component. When set to “none”,\nthe header and footer slots will still have padding.",
|
|
2438
|
-
"fieldName": "padding"
|
|
2439
|
-
}
|
|
2440
|
-
],
|
|
2441
|
-
"mixins": [
|
|
2442
|
-
{
|
|
2443
|
-
"name": "DraftComponentMixin",
|
|
2444
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
2445
|
-
}
|
|
2446
|
-
],
|
|
2447
|
-
"superclass": {
|
|
2448
|
-
"name": "LitElement",
|
|
2449
|
-
"package": "lit"
|
|
2450
|
-
},
|
|
2451
|
-
"status": "draft",
|
|
2452
|
-
"category": "structure",
|
|
2453
|
-
"tagName": "nord-card",
|
|
2454
|
-
"customElement": true
|
|
2455
|
-
}
|
|
2456
|
-
],
|
|
2457
|
-
"exports": [
|
|
2458
|
-
{
|
|
2459
|
-
"kind": "js",
|
|
2460
|
-
"name": "default",
|
|
2461
|
-
"declaration": {
|
|
2462
|
-
"name": "Card",
|
|
2463
|
-
"module": "src/card/Card.ts"
|
|
2464
|
-
}
|
|
2465
|
-
},
|
|
2466
|
-
{
|
|
2467
|
-
"kind": "custom-element-definition",
|
|
2468
|
-
"name": "nord-card",
|
|
2469
|
-
"declaration": {
|
|
2470
|
-
"name": "Card",
|
|
2471
|
-
"module": "src/card/Card.ts"
|
|
2472
|
-
}
|
|
2473
|
-
}
|
|
2474
|
-
],
|
|
2475
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to display content and actions on a single topic inside a container.\n- Use to visually separate specific parts of content in an application view.\n- Use to wrap a form into a container, for example a login form.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use when you need to capture user’s attention in a prominent way.\n- Don’t use to inform user about important changes or conditions in the interface.\n- Don’t use multiple primary buttons inside a card. A card should only contain a single primary action.\n\n</div>\n"
|
|
2476
|
-
},
|
|
2477
2477
|
{
|
|
2478
2478
|
"kind": "javascript-module",
|
|
2479
2479
|
"path": "src/common/attribute.ts",
|
|
@@ -4342,82 +4342,6 @@
|
|
|
4342
4342
|
],
|
|
4343
4343
|
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use when the user needs to choose a single date or a date range.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for entering date of birth. Use input component instead.\n- Don’t use to choose a date that is over 10 years in the future or the past.\n\n</div>\n\n---\n\n## Keyboard accessibility\n\nDate picker is built to closely follow [W3C Date Picker Dialog example](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/datepicker-dialog.html) with some small exceptions to e.g. better support iOS VoiceOver and Android TalkBack.\n\n### Choose date button\n\n- `Space, Enter`: Opens the date picker dialog and moves focus to the first select menu in the dialog.\n\n### Date picker dialog\n\n- `Esc`: Closes the date picker dialog and moves focus back to the “choose date” button.\n- `Tab`: Moves focus to the next element in the dialog. Please note since the calendar uses `role=\"grid\"`, only one button in the calendar grid is in the tab sequence. Additionally, if focus is on the last focusable element, focus is next moved back to the first focusable element inside the date picker dialog.\n- `Shift + Tab`: Same as above, but in reverse order.\n\n### Date picker dialog: Month/year buttons\n\n- `Space, Enter`: Changes the month and/or year displayed.\n\n### Date picker dialog: Date grid\n\n- `Space, Enter`: Selects a date, closes the dialog, and moves focus back to the “Choose Date” button. Additionally updates the value of the date picker input with the selected date, and adds selected date to “Choose Date” button label.\n- `Arrow up`: Moves focus to the same day of the previous week.\n- `Arrow down`: Moves focus to the same day of the next week.\n- `Arrow right`: Moves focus to the next day. In right-to-left languages, moves focus to the previous day.\n- `Arrow left`: Moves focus to the previous day. In right-to-left languages, moves focus to the next day.\n- `Home`: Moves focus to the first day (e.g Monday) of the current week.\n- `End`: Moves focus to the last day (e.g. Sunday) of the current week.\n- `Page Up`: Changes the grid of dates to the previous month and sets focus on the same day of the same week.\n- `Shift + Page Up`: Changes the grid of dates to the previous year and sets focus on the same day of the same week.\n- `Page Down`: Changes the grid of dates to the next month and sets focus on the same day of the same week.\n- `Shift + Page Down`: Changes the grid of dates to the next year and sets focus on the same day of the same week.\n\n#### Date picker dialog: Close button\n\n- `Space, Enter`: Closes the dialog, moves focus to “choose date” button, but does not update the date in input.\n"
|
|
4344
4344
|
},
|
|
4345
|
-
{
|
|
4346
|
-
"kind": "javascript-module",
|
|
4347
|
-
"path": "src/header/Header.ts",
|
|
4348
|
-
"declarations": [
|
|
4349
|
-
{
|
|
4350
|
-
"kind": "class",
|
|
4351
|
-
"description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
|
|
4352
|
-
"name": "Header",
|
|
4353
|
-
"slots": [
|
|
4354
|
-
{
|
|
4355
|
-
"description": "The header content.",
|
|
4356
|
-
"name": ""
|
|
4357
|
-
},
|
|
4358
|
-
{
|
|
4359
|
-
"description": "Optional slot for buttons, toggles, etc.",
|
|
4360
|
-
"name": "action"
|
|
4361
|
-
}
|
|
4362
|
-
],
|
|
4363
|
-
"members": [
|
|
4364
|
-
{
|
|
4365
|
-
"kind": "field",
|
|
4366
|
-
"name": "actionSlot",
|
|
4367
|
-
"privacy": "private",
|
|
4368
|
-
"default": "new SlotController(this, \"action\")"
|
|
4369
|
-
},
|
|
4370
|
-
{
|
|
4371
|
-
"kind": "field",
|
|
4372
|
-
"name": "_warningLogged",
|
|
4373
|
-
"type": {
|
|
4374
|
-
"text": "boolean"
|
|
4375
|
-
},
|
|
4376
|
-
"privacy": "private",
|
|
4377
|
-
"static": true,
|
|
4378
|
-
"default": "false",
|
|
4379
|
-
"inheritedFrom": {
|
|
4380
|
-
"name": "DraftComponentMixin",
|
|
4381
|
-
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
4382
|
-
}
|
|
4383
|
-
}
|
|
4384
|
-
],
|
|
4385
|
-
"mixins": [
|
|
4386
|
-
{
|
|
4387
|
-
"name": "DraftComponentMixin",
|
|
4388
|
-
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
4389
|
-
}
|
|
4390
|
-
],
|
|
4391
|
-
"superclass": {
|
|
4392
|
-
"name": "LitElement",
|
|
4393
|
-
"package": "lit"
|
|
4394
|
-
},
|
|
4395
|
-
"status": "draft",
|
|
4396
|
-
"category": "structure",
|
|
4397
|
-
"tagName": "nord-header",
|
|
4398
|
-
"customElement": true
|
|
4399
|
-
}
|
|
4400
|
-
],
|
|
4401
|
-
"exports": [
|
|
4402
|
-
{
|
|
4403
|
-
"kind": "js",
|
|
4404
|
-
"name": "default",
|
|
4405
|
-
"declaration": {
|
|
4406
|
-
"name": "Header",
|
|
4407
|
-
"module": "src/header/Header.ts"
|
|
4408
|
-
}
|
|
4409
|
-
},
|
|
4410
|
-
{
|
|
4411
|
-
"kind": "custom-element-definition",
|
|
4412
|
-
"name": "nord-header",
|
|
4413
|
-
"declaration": {
|
|
4414
|
-
"name": "Header",
|
|
4415
|
-
"module": "src/header/Header.ts"
|
|
4416
|
-
}
|
|
4417
|
-
}
|
|
4418
|
-
],
|
|
4419
|
-
"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 the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
|
|
4420
|
-
},
|
|
4421
4345
|
{
|
|
4422
4346
|
"kind": "javascript-module",
|
|
4423
4347
|
"path": "src/fieldset/Fieldset.ts",
|
|
@@ -4569,6 +4493,82 @@
|
|
|
4569
4493
|
],
|
|
4570
4494
|
"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 the fieldset component when you need to create a relationship between multiple form inputs.\n- It is especially important to use with a group of radio components.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t place interactive content (buttons, links etc) inside the label.\n- Don’t use with a checkbox component when there is **only one** checkbox. For example, when accepting terms and conditions.\n\n</div>\n\n-------\n\n## Content guidelines\n\nFieldset label should be clear, accurate and predictable. It should help the user to understand how the items in the fieldset are grouped together, or what kind of choice the user is making:\n\n<div class=\"n-usage n-usage-do\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Choose</div>\n\nWhen writing fieldset 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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick A Color</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\">Pick a color</div>\n<div class=\"n-usage n-usage-dont\">Pick a color.</div>\n\nDo not use colons in fieldset label:\n\n<div class=\"n-usage n-usage-do\">Payment details</div>\n<div class=\"n-usage n-usage-dont\">Payment details:</div>\n\n-------\n\n## Additional considerations\n\n- A label (which becomes to `<legend>` inside the fieldset) is always required.\n- Hint text can be used to offer further information or explanation for an option.\n"
|
|
4571
4495
|
},
|
|
4496
|
+
{
|
|
4497
|
+
"kind": "javascript-module",
|
|
4498
|
+
"path": "src/header/Header.ts",
|
|
4499
|
+
"declarations": [
|
|
4500
|
+
{
|
|
4501
|
+
"kind": "class",
|
|
4502
|
+
"description": "The header is a block of designated space for labelling the currently\nviewed context as well as providing primary actions.",
|
|
4503
|
+
"name": "Header",
|
|
4504
|
+
"slots": [
|
|
4505
|
+
{
|
|
4506
|
+
"description": "The header content.",
|
|
4507
|
+
"name": ""
|
|
4508
|
+
},
|
|
4509
|
+
{
|
|
4510
|
+
"description": "Optional slot for buttons, toggles, etc.",
|
|
4511
|
+
"name": "action"
|
|
4512
|
+
}
|
|
4513
|
+
],
|
|
4514
|
+
"members": [
|
|
4515
|
+
{
|
|
4516
|
+
"kind": "field",
|
|
4517
|
+
"name": "actionSlot",
|
|
4518
|
+
"privacy": "private",
|
|
4519
|
+
"default": "new SlotController(this, \"action\")"
|
|
4520
|
+
},
|
|
4521
|
+
{
|
|
4522
|
+
"kind": "field",
|
|
4523
|
+
"name": "_warningLogged",
|
|
4524
|
+
"type": {
|
|
4525
|
+
"text": "boolean"
|
|
4526
|
+
},
|
|
4527
|
+
"privacy": "private",
|
|
4528
|
+
"static": true,
|
|
4529
|
+
"default": "false",
|
|
4530
|
+
"inheritedFrom": {
|
|
4531
|
+
"name": "DraftComponentMixin",
|
|
4532
|
+
"module": "src/common/mixins/DraftComponentMixin.ts"
|
|
4533
|
+
}
|
|
4534
|
+
}
|
|
4535
|
+
],
|
|
4536
|
+
"mixins": [
|
|
4537
|
+
{
|
|
4538
|
+
"name": "DraftComponentMixin",
|
|
4539
|
+
"module": "/src/common/mixins/DraftComponentMixin.js"
|
|
4540
|
+
}
|
|
4541
|
+
],
|
|
4542
|
+
"superclass": {
|
|
4543
|
+
"name": "LitElement",
|
|
4544
|
+
"package": "lit"
|
|
4545
|
+
},
|
|
4546
|
+
"status": "draft",
|
|
4547
|
+
"category": "structure",
|
|
4548
|
+
"tagName": "nord-header",
|
|
4549
|
+
"customElement": true
|
|
4550
|
+
}
|
|
4551
|
+
],
|
|
4552
|
+
"exports": [
|
|
4553
|
+
{
|
|
4554
|
+
"kind": "js",
|
|
4555
|
+
"name": "default",
|
|
4556
|
+
"declaration": {
|
|
4557
|
+
"name": "Header",
|
|
4558
|
+
"module": "src/header/Header.ts"
|
|
4559
|
+
}
|
|
4560
|
+
},
|
|
4561
|
+
{
|
|
4562
|
+
"kind": "custom-element-definition",
|
|
4563
|
+
"name": "nord-header",
|
|
4564
|
+
"declaration": {
|
|
4565
|
+
"name": "Header",
|
|
4566
|
+
"module": "src/header/Header.ts"
|
|
4567
|
+
}
|
|
4568
|
+
}
|
|
4569
|
+
],
|
|
4570
|
+
"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 the header component to show a heading to describe the current view.\n- Use the header component to hold primary actions.\n- Use the header component at a visual high position at full width.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t overcrowd the header component with too many actions or information.\n- Don’t nest the header component too deeply and restrict its available space.\n\n</div>\n\n-------\n\n## Content guidelines\n\nThe header component should be a containing element placed high on the page to present high level controls and to describe the page itself. It shouldn’t be overcrowded with controls or information.\n\n<div class=\"n-usage n-usage-do\">[Menu] Dashboard [Account] [Log out]</div>\n<div class=\"n-usage n-usage-dont\">[Menu] Use the cards below to view various information [Export] [Save] [Edit Profile] [Log out] [Preferences]</div>\n"
|
|
4571
|
+
},
|
|
4572
4572
|
{
|
|
4573
4573
|
"kind": "javascript-module",
|
|
4574
4574
|
"path": "src/icon/Icon.ts",
|
package/lib/Icon.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,_ as s,n as i}from"./DraftComponentMixin-30345acf.js";import{r as t,$ as o,s as r}from"./lit-element-9646ab7e.js";import{e as n}from"./property-03f59dce.js";import{t as a}from"./state-70f38ceb.js";import{l as c}from"./if-defined-2a4c6dbc.js";import{o as l}from"./unsafe-html-4da54dd2.js";import{s as d}from"./Component-a19be7c9.js";import"./directive-de55b00a.js";const h=t`:host{--n-icon-size:var(--n-size-icon-m);display:inline-block;block-size:var(--n-icon-size);inline-size:var(--n-icon-size)}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-icon{display:block}svg{display:block}`;var v;let p=v=class extends(e(r)){constructor(){super(...arguments),this.name="",this.size="m",this.svg=""}static registerResolver(e){v.resolver=e}static registerIcon(e,s){let i,t;if("string"==typeof e?(i=e,t=s):(i=e.title,t=e.default),!i)throw new Error("name is required when registering an icon");if(!t)throw new Error("icon must not be empty");v.registeredIcons.has(i)||v.registeredIcons.set(i,t)}willUpdate(e){if(!e.has("name"))return;const s=this.resolve();"string"==typeof s?this.svg=s:s.then((e=>{this.svg=e})).catch((()=>{this.svg=""}))}render(){return o`<div role="${c(this.label?"img":void 0)}" aria-label="${c(this.label)}"><slot style="${c(this.color?`color:${this.color}`:void 0)}" aria-hidden="true">${l(this.svg)}</slot></div>`}resolve(){return this.name?v.registeredIcons.has(this.name)?v.registeredIcons.get(this.name):v.resolver(this.name):""}};p.styles=[d,h],p.resolver=e=>fetch(`https://nordcdn.net/ds/icons/1.3.
|
|
1
|
+
import{D as e,_ as s,n as i}from"./DraftComponentMixin-30345acf.js";import{r as t,$ as o,s as r}from"./lit-element-9646ab7e.js";import{e as n}from"./property-03f59dce.js";import{t as a}from"./state-70f38ceb.js";import{l as c}from"./if-defined-2a4c6dbc.js";import{o as l}from"./unsafe-html-4da54dd2.js";import{s as d}from"./Component-a19be7c9.js";import"./directive-de55b00a.js";const h=t`:host{--n-icon-size:var(--n-size-icon-m);display:inline-block;block-size:var(--n-icon-size);inline-size:var(--n-icon-size)}:host([size=xs]){--n-icon-size:var(--n-size-icon-xs)}:host([size="s"]){--n-icon-size:var(--n-size-icon-s)}:host([size="l"]){--n-icon-size:var(--n-size-icon-l)}:host([size=xl]){--n-icon-size:var(--n-size-icon-xl)}:host([size=xxl]){--n-icon-size:var(--n-size-icon-xxl)}.n-icon{display:block}svg{display:block}`;var v;let p=v=class extends(e(r)){constructor(){super(...arguments),this.name="",this.size="m",this.svg=""}static registerResolver(e){v.resolver=e}static registerIcon(e,s){let i,t;if("string"==typeof e?(i=e,t=s):(i=e.title,t=e.default),!i)throw new Error("name is required when registering an icon");if(!t)throw new Error("icon must not be empty");v.registeredIcons.has(i)||v.registeredIcons.set(i,t)}willUpdate(e){if(!e.has("name"))return;const s=this.resolve();"string"==typeof s?this.svg=s:s.then((e=>{this.svg=e})).catch((()=>{this.svg=""}))}render(){return o`<div role="${c(this.label?"img":void 0)}" aria-label="${c(this.label)}"><slot style="${c(this.color?`color:${this.color}`:void 0)}" aria-hidden="true">${l(this.svg)}</slot></div>`}resolve(){return this.name?v.registeredIcons.has(this.name)?v.registeredIcons.get(this.name):v.resolver(this.name):""}};p.styles=[d,h],p.resolver=e=>fetch(`https://nordcdn.net/ds/icons/1.3.2/assets/${e}.svg`).then((e=>e.text())),p.registeredIcons=new Map,s([n({reflect:!0})],p.prototype,"name",void 0),s([n({reflect:!0})],p.prototype,"size",void 0),s([n({reflect:!0})],p.prototype,"color",void 0),s([n({reflect:!0})],p.prototype,"label",void 0),s([a()],p.prototype,"svg",void 0),p=v=s([i("nord-icon")],p);var m=p;export{m as default};
|
|
2
2
|
//# sourceMappingURL=Icon.js.map
|
package/lib/Tooltip.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as t,_ as e,n}from"./DraftComponentMixin-30345acf.js";import{r as o,$ as i,s as r}from"./lit-element-9646ab7e.js";import{e as s}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{S as c}from"./SlotController-5bfc47d1.js";import{s as a}from"./Component-a19be7c9.js";function d(t){return t.split("-")[0]}function f(t){return t.split("-")[1]}function h(t){return["top","bottom"].includes(d(t))?"x":"y"}function u(t){return"y"===t?"height":"width"}function p(t){let{reference:e,floating:n,placement:o}=t;const i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;let s;switch(d(o)){case"top":s={x:i,y:e.y-n.height};break;case"bottom":s={x:i,y:e.y+e.height};break;case"right":s={x:e.x+e.width,y:r};break;case"left":s={x:e.x-n.width,y:r};break;default:s={x:e.x,y:e.y}}const l=h(o),c=u(l);switch(f(o)){case"start":s[l]=s[l]-(e[c]/2-n[c]/2);break;case"end":s[l]=s[l]+(e[c]/2-n[c]/2)}return s}function m(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function y(t,e){void 0===e&&(e={});const{x:n,y:o,platform:i,rects:r,elements:s,strategy:l}=t,{boundary:c="clippingParents",rootBoundary:a="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=e,u=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),p=s[f?"floating"===d?"reference":"floating":d],y=await i.getClippingClientRect({element:await i.isElement(p)?p:p.contextElement||await i.getDocumentElement({element:s.floating}),boundary:c,rootBoundary:a}),g=m(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...r.floating,x:n,y:o}:r.reference,offsetParent:await i.getOffsetParent({element:s.floating}),strategy:l}));return{top:y.top-g.top+u.top,bottom:g.bottom-y.bottom+u.bottom,left:y.left-g.left+u.left,right:g.right-y.right+u.right}}const g=Math.min,v=Math.max;function b(t,e,n){return v(t,g(e,n))}const x={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,(t=>x[t]))}const E={start:"end",end:"start"};function k(t){return t.replace(/start|end/g,(t=>E[t]))}const L=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l}=e;if(null!=(n=r.flip)&&n.skip)return{};const{mainAxis:c=!0,crossAxis:a=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:g=!0,...v}=t,b=d(i),x=p||(b===l||!g?[w(l)]:function(t){const e=w(t);return[k(t),e,k(e)]}(l)),E=[l,...x],L=await y(e,v),T=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(c&&T.push(L[b]),a){const{main:t,cross:e}=function(t,e){const n="start"===f(t),o=h(t),i=u(o);let r="x"===o?n?"right":"left":n?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=w(r)),{main:r,cross:w(r)}}(i,s);T.push(L[t],L[e])}if(C=[...C,{placement:i,overflows:T}],!T.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=r.flip)?void 0:D.index)?R:0)+1,e=E[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let n="bottom";switch(m){case"bestFit":{var S;const t=null==(S=C.slice().sort(((t,e)=>t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)-e.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)))[0])?void 0:S.placement;t&&(n=t);break}case"initialPlacement":n=l}return{data:{skip:!0},reset:{placement:n}}}return{}}}};const T=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn(e){const{x:n,y:o,placement:i,rects:r}=e,s=function(t){let{placement:e,rects:n,value:o}=t;const i=d(e),r=["left","top"].includes(i)?-1:1,s="function"==typeof o?o({...n,placement:e}):o,{mainAxis:l,crossAxis:c}="number"==typeof s?{mainAxis:s,crossAxis:0}:{mainAxis:0,crossAxis:0,...s};return"x"===h(i)?{x:c,y:l*r}:{x:l*r,y:c}}({placement:i,rects:r,value:t});return{x:n+s.x,y:o+s.y,data:s}}}};function C(t){return"[object Window]"===(null==t?void 0:t.toString())}function R(t){if(null==t)return window;if(!C(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function D(t){return R(t).getComputedStyle(t)}function S(t){return C(t)?"":t?(t.nodeName||"").toLowerCase():""}function P(t){return t instanceof R(t).HTMLElement}function A(t){return t instanceof R(t).Element}function W(t){return t instanceof R(t).ShadowRoot||t instanceof ShadowRoot}function O(t){const{overflow:e,overflowX:n,overflowY:o}=D(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function z(t){return["table","td","th"].includes(S(t))}function H(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=D(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}const N=Math.min,j=Math.max,B=Math.round;function M(t,e){void 0===e&&(e=!1);const n=t.getBoundingClientRect();let o=1,i=1;return e&&P(t)&&(o=t.offsetWidth>0&&B(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&B(n.height)/t.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function V(t){return(e=t,(e instanceof R(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function $(t){return C(t)?{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}:{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function q(t){return M(V(t)).left+$(t).scrollLeft}function F(t,e,n){const o=P(e),i=V(e),r=M(t,o&&function(t){const e=M(t);return B(e.width)!==t.offsetWidth||B(e.height)!==t.offsetHeight}(e));let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==S(e)||O(i))&&(s=$(e)),P(e)){const t=M(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=q(i));return{x:r.left+s.scrollLeft-l.x,y:r.top+s.scrollTop-l.y,width:r.width,height:r.height}}function X(t){return"html"===S(t)?t:t.assignedSlot||t.parentNode||(W(t)?t.host:null)||V(t)}function Y(t){return P(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function I(t){const e=R(t);let n=Y(t);for(;n&&z(n)&&"static"===getComputedStyle(n).position;)n=Y(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===getComputedStyle(n).position&&!H(n))?e:n||function(t){let e=X(t);for(;P(e)&&!["html","body"].includes(S(e));){if(H(e))return e;e=e.parentNode}return null}(t)||e}function U(t){return{width:t.offsetWidth,height:t.offsetHeight}}function _(t){return["html","body","#document"].includes(S(t))?t.ownerDocument.body:P(t)&&O(t)?t:_(X(t))}function G(t,e){var n;void 0===e&&(e=[]);const o=_(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=R(o),s=i?[r].concat(r.visualViewport||[],O(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(G(X(s)))}function J(t,e){return"viewport"===e?m(function(t){const e=R(t),n=V(t),o=e.visualViewport;let i=n.clientWidth,r=n.clientHeight,s=0,l=0;return o&&(i=o.width,r=o.height,Math.abs(e.innerWidth/o.scale-o.width)<.01&&(s=o.offsetLeft,l=o.offsetTop)),{width:i,height:r,x:s,y:l}}(t)):A(e)?function(t){const e=M(t),n=e.top+t.clientTop,o=e.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e):m(function(t){var e;const n=V(t),o=$(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=j(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=j(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let l=-o.scrollLeft+q(t);const c=-o.scrollTop;return"rtl"===D(i||n).direction&&(l+=j(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:c}}(V(t)))}function K(t){const e=G(X(t)),n=["absolute","fixed"].includes(D(t).position)&&P(t)?I(t):t;return A(n)?e.filter((t=>A(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&W(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==S(t))):[]}const Q={getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:F(e,I(n),o),floating:{...U(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:t=>function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=P(n),r=V(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==S(n)||O(r))&&(s=$(n)),P(n))){const t=M(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+l.x,y:e.y-s.scrollTop+l.y}}(t),getOffsetParent:t=>{let{element:e}=t;return I(e)},isElement:t=>A(t),getDocumentElement:t=>{let{element:e}=t;return V(e)},getClippingClientRect:t=>function(t){let{element:e,boundary:n,rootBoundary:o}=t;const i=[..."clippingParents"===n?K(e):[].concat(n),o],r=i[0],s=i.reduce(((t,n)=>{const o=J(e,n);return t.top=j(o.top,t.top),t.right=N(o.right,t.right),t.bottom=N(o.bottom,t.bottom),t.left=j(o.left,t.left),t}),J(e,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(t),getDimensions:t=>{let{element:e}=t;return U(e)},getClientRects:t=>{let{element:e}=t;return e.getClientRects()}},Z=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n;let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:a}=p({...l,placement:o}),d=o,f={};for(let n=0;n<r.length;n++){const{name:h,fn:u}=r[n],{x:m,y,data:g,reset:v}=await u({x:c,y:a,initialPlacement:o,placement:d,strategy:i,middlewareData:f,rects:l,platform:s,elements:{reference:t,floating:e}});c=null!=m?m:c,a=null!=y?y:a,f={...f,[h]:null!=g?g:{}},v&&("object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(l=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:c,y:a}=p({...l,placement:d}))),n=-1)}return{x:c,y:a,placement:d,strategy:i,middlewareData:f}})(t,e,{platform:Q,...n});function tt(t,e){const n=t.getAttribute(e);return n?n.split(/\s+/):[]}function et(t,e,n){t.setAttribute(e,n.join(" "))}const nt=o`:host{--n-tooltip-background:rgba(20, 20, 20, 0.95);--n-tooltip-key-border:rgba(255, 255, 255, 0.03);--n-tooltip-key-background:rgba(255, 255, 255, 0.1);position:absolute;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .4s ease,visibility .4s ease;z-index:var(--n-index-popout)}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--n-color-text-inverse);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--n-tooltip-background);border-radius:var(--n-border-radius-s)}.n-tooltip,.n-tooltip-shortcut{display:flex;align-items:center}.n-tooltip-shortcut{gap:2px}::slotted([slot=shortcut]){box-sizing:border-box;margin:0;inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--n-tooltip-key-border);padding:1px;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;background-color:var(--n-tooltip-key-background)}`;var ot;let it=ot=class extends(t(r)){constructor(){super(...arguments),this.shortcutSlot=new c(this,"shortcut"),this.proxy=document.createElement("span"),this.visible=!1,this.position="top",this.role="tooltip",this.id="",this.delay=300,this.updatePosition=()=>{return Z(this.targetElement,this,{placement:this.position,middleware:[(t={padding:8},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=t,a={x:n,y:o},f=await y(e,c),u=h(d(i)),p="x"===u?"y":"x";let m=a[u],g=a[p];if(r){const t="y"===u?"bottom":"right";m=b(m+f["y"===u?"top":"left"],m,m-f[t])}if(s){const t="y"===p?"bottom":"right";g=b(g+f["y"===p?"top":"left"],g,g-f[t])}const v=l.fn({...e,[u]:m,[p]:g});return{...v,data:{x:v.x-n,y:v.y-o}}}}),T(8),L()]}).then((({x:t,y:e})=>{this.style.insetInlineStart=`${t}px`,this.style.insetBlockStart=`${e}px`}));var t},this.handleScroll=()=>{this.visible&&this.updatePosition()},this.showTooltip=()=>{var t;this.visible||(null===(t=ot.lastOpened)||void 0===t||t.hideTooltip(),ot.lastOpened=this,this.updatePosition().then((()=>{this.visible=!0})))},this.hideTooltip=()=>{this.visible=!1},this.hideOnEscape=t=>{this.visible&&"Escape"===t.key&&this.hideTooltip()},this.addDescribedBy=()=>{var t,e;const n=null===(e=null===(t=this.targetElement)||void 0===t?void 0:t.focusableRef)||void 0===e?void 0:e.value;n&&(this.proxy.hidden=!0,this.proxy.id=this.id,this.proxy.textContent=this.textContent,n.insertAdjacentElement("afterend",this.proxy),function(t,e,n){const o=tt(t,e);o.includes(n)||et(t,e,o.concat(n))}(n,"aria-describedby",this.id))},this.removeDescribedBy=()=>{var t,e;const n=null===(e=null===(t=this.targetElement)||void 0===t?void 0:t.focusableRef)||void 0===e?void 0:e.value;n&&(this.proxy.remove(),function(t,e,n){const o=tt(t,e);o.includes(n)&&et(t,e,o.filter((t=>t!==n)))}(n,"aria-describedby",this.id))}}connectedCallback(){super.connectedCallback();const t=this.getRootNode(),e=`[aria-describedby='${this.id}']`,n=t.querySelector(e);n?(this.targetElement=n,n.addEventListener("keydown",this.hideOnEscape),n.addEventListener("mouseenter",this.showTooltip),n.addEventListener("mouseleave",this.hideTooltip),n.addEventListener("focus",this.showTooltip),n.addEventListener("blur",this.hideTooltip),window.addEventListener("resize",this.updatePosition,{passive:!0}),window.addEventListener("scroll",this.handleScroll,{passive:!0})):console.warn("NORD: tooltip found no element matching selector:",e)}disconnectedCallback(){super.disconnectedCallback(),this.targetElement&&(this.targetElement.removeEventListener("keydown",this.hideOnEscape),this.targetElement.removeEventListener("mouseenter",this.showTooltip),this.targetElement.removeEventListener("mouseleave",this.hideTooltip),this.targetElement.removeEventListener("focus",this.showTooltip),this.targetElement.removeEventListener("blur",this.hideTooltip),window.removeEventListener("resize",this.updatePosition),window.removeEventListener("scroll",this.handleScroll))}willUpdate(t){t.has("id")&&!this.id&&console.warn("NORD: The tooltip requires an id attribute and value"),t.has("visible")&&(this.visible?(this.addDescribedBy(),this.style.transitionDelay=`${this.delay}ms`,this.style.visibility="visible",this.style.opacity="1"):(this.removeDescribedBy(),this.style.transitionDelay="0ms",this.style.visibility="hidden",this.style.opacity="0"))}render(){return i`<div class="n-tooltip"><slot></slot><div class="n-tooltip-shortcut" ?hidden="${this.shortcutSlot.isEmpty}"><slot class="n-tooltip-key" name="shortcut"></slot></div></div>`}};it.styles=[a,nt],e([l()],it.prototype,"visible",void 0),e([s({reflect:!0})],it.prototype,"position",void 0),e([s({reflect:!0})],it.prototype,"role",void 0),e([s({reflect:!0})],it.prototype,"id",void 0),e([s({reflect:!0,type:Number})],it.prototype,"delay",void 0),it=ot=e([n("nord-tooltip")],it);var rt=it;export{rt as default};
|
|
1
|
+
import{D as t,_ as e,n}from"./DraftComponentMixin-30345acf.js";import{r as o,$ as i,s as r}from"./lit-element-9646ab7e.js";import{e as s}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{S as a}from"./SlotController-5bfc47d1.js";import{s as c}from"./Component-a19be7c9.js";function d(t){return t.split("-")[0]}function f(t){return t.split("-")[1]}function h(t){return["top","bottom"].includes(d(t))?"x":"y"}function u(t){return"y"===t?"height":"width"}function p(t){let{reference:e,floating:n,placement:o}=t;const i=e.x+e.width/2-n.width/2,r=e.y+e.height/2-n.height/2;let s;switch(d(o)){case"top":s={x:i,y:e.y-n.height};break;case"bottom":s={x:i,y:e.y+e.height};break;case"right":s={x:e.x+e.width,y:r};break;case"left":s={x:e.x-n.width,y:r};break;default:s={x:e.x,y:e.y}}const l=h(o),a=u(l);switch(f(o)){case"start":s[l]=s[l]-(e[a]/2-n[a]/2);break;case"end":s[l]=s[l]+(e[a]/2-n[a]/2)}return s}function m(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function g(t,e){void 0===e&&(e={});const{x:n,y:o,platform:i,rects:r,elements:s,strategy:l}=t,{boundary:a="clippingParents",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=e,u=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(h),p=s[f?"floating"===d?"reference":"floating":d],g=await i.getClippingClientRect({element:await i.isElement(p)?p:p.contextElement||await i.getDocumentElement({element:s.floating}),boundary:a,rootBoundary:c}),y=m(await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...r.floating,x:n,y:o}:r.reference,offsetParent:await i.getOffsetParent({element:s.floating}),strategy:l}));return{top:g.top-y.top+u.top,bottom:y.bottom-g.bottom+u.bottom,left:g.left-y.left+u.left,right:y.right-g.right+u.right}}const y=Math.min,v=Math.max;function b(t,e,n){return v(t,y(e,n))}const x={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t){return t.replace(/left|right|bottom|top/g,(t=>x[t]))}const E={start:"end",end:"start"};function k(t){return t.replace(/start|end/g,(t=>E[t]))}const L=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:l}=e;if(null!=(n=r.flip)&&n.skip)return{};const{mainAxis:a=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...v}=t,b=d(i),x=p||(b===l||!y?[w(l)]:function(t){const e=w(t);return[k(t),e,k(e)]}(l)),E=[l,...x],L=await g(e,v),T=[];let C=(null==(o=r.flip)?void 0:o.overflows)||[];if(a&&T.push(L[b]),c){const{main:t,cross:e}=function(t,e){const n="start"===f(t),o=h(t),i=u(o);let r="x"===o?n?"right":"left":n?"bottom":"top";return e.reference[i]>e.floating[i]&&(r=w(r)),{main:r,cross:w(r)}}(i,s);T.push(L[t],L[e])}if(C=[...C,{placement:i,overflows:T}],!T.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=r.flip)?void 0:D.index)?R:0)+1,e=E[t];if(e)return{data:{index:t,overflows:C},reset:{placement:e}};let n="bottom";switch(m){case"bestFit":{var S;const t=null==(S=C.slice().sort(((t,e)=>t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)-e.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)))[0])?void 0:S.placement;t&&(n=t);break}case"initialPlacement":n=l}return{data:{skip:!0},reset:{placement:n}}}return{}}}};const T=function(t){return void 0===t&&(t=0),{name:"offset",options:t,fn(e){const{x:n,y:o,placement:i,rects:r}=e,s=function(t){let{placement:e,rects:n,value:o}=t;const i=d(e),r=["left","top"].includes(i)?-1:1,s="function"==typeof o?o({...n,placement:e}):o,{mainAxis:l,crossAxis:a}="number"==typeof s?{mainAxis:s,crossAxis:0}:{mainAxis:0,crossAxis:0,...s};return"x"===h(i)?{x:a,y:l*r}:{x:l*r,y:a}}({placement:i,rects:r,value:t});return{x:n+s.x,y:o+s.y,data:s}}}};function C(t){return"[object Window]"===(null==t?void 0:t.toString())}function R(t){if(null==t)return window;if(!C(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function D(t){return R(t).getComputedStyle(t)}function S(t){return C(t)?"":t?(t.nodeName||"").toLowerCase():""}function P(t){return t instanceof R(t).HTMLElement}function A(t){return t instanceof R(t).Element}function W(t){return t instanceof R(t).ShadowRoot||t instanceof ShadowRoot}function O(t){const{overflow:e,overflowX:n,overflowY:o}=D(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function z(t){return["table","td","th"].includes(S(t))}function H(t){const e=navigator.userAgent.toLowerCase().includes("firefox"),n=D(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}const N=Math.min,j=Math.max,B=Math.round;function M(t,e){void 0===e&&(e=!1);const n=t.getBoundingClientRect();let o=1,i=1;return e&&P(t)&&(o=t.offsetWidth>0&&B(n.width)/t.offsetWidth||1,i=t.offsetHeight>0&&B(n.height)/t.offsetHeight||1),{width:n.width/o,height:n.height/i,top:n.top/i,right:n.right/o,bottom:n.bottom/i,left:n.left/o,x:n.left/o,y:n.top/i}}function V(t){return(e=t,(e instanceof R(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function $(t){return C(t)?{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}:{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function q(t){return M(V(t)).left+$(t).scrollLeft}function F(t,e,n){const o=P(e),i=V(e),r=M(t,o&&function(t){const e=M(t);return B(e.width)!==t.offsetWidth||B(e.height)!==t.offsetHeight}(e));let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==S(e)||O(i))&&(s=$(e)),P(e)){const t=M(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else i&&(l.x=q(i));return{x:r.left+s.scrollLeft-l.x,y:r.top+s.scrollTop-l.y,width:r.width,height:r.height}}function X(t){return"html"===S(t)?t:t.assignedSlot||t.parentNode||(W(t)?t.host:null)||V(t)}function Y(t){return P(t)&&"fixed"!==getComputedStyle(t).position?t.offsetParent:null}function I(t){const e=R(t);let n=Y(t);for(;n&&z(n)&&"static"===getComputedStyle(n).position;)n=Y(n);return n&&("html"===S(n)||"body"===S(n)&&"static"===getComputedStyle(n).position&&!H(n))?e:n||function(t){let e=X(t);for(;P(e)&&!["html","body"].includes(S(e));){if(H(e))return e;e=e.parentNode}return null}(t)||e}function U(t){return{width:t.offsetWidth,height:t.offsetHeight}}function _(t){return["html","body","#document"].includes(S(t))?t.ownerDocument.body:P(t)&&O(t)?t:_(X(t))}function G(t,e){var n;void 0===e&&(e=[]);const o=_(t),i=o===(null==(n=t.ownerDocument)?void 0:n.body),r=R(o),s=i?[r].concat(r.visualViewport||[],O(o)?o:[]):o,l=e.concat(s);return i?l:l.concat(G(X(s)))}function J(t,e){return"viewport"===e?m(function(t){const e=R(t),n=V(t),o=e.visualViewport;let i=n.clientWidth,r=n.clientHeight,s=0,l=0;return o&&(i=o.width,r=o.height,Math.abs(e.innerWidth/o.scale-o.width)<.01&&(s=o.offsetLeft,l=o.offsetTop)),{width:i,height:r,x:s,y:l}}(t)):A(e)?function(t){const e=M(t),n=e.top+t.clientTop,o=e.left+t.clientLeft;return{top:n,left:o,x:o,y:n,right:o+t.clientWidth,bottom:n+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e):m(function(t){var e;const n=V(t),o=$(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=j(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=j(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let l=-o.scrollLeft+q(t);const a=-o.scrollTop;return"rtl"===D(i||n).direction&&(l+=j(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:s,x:l,y:a}}(V(t)))}function K(t){const e=G(X(t)),n=["absolute","fixed"].includes(D(t).position)&&P(t)?I(t):t;return A(n)?e.filter((t=>A(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&W(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==S(t))):[]}const Q={getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:F(e,I(n),o),floating:{...U(n),x:0,y:0}}},convertOffsetParentRelativeRectToViewportRelativeRect:t=>function(t){let{rect:e,offsetParent:n,strategy:o}=t;const i=P(n),r=V(n);if(n===r)return e;let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((i||!i&&"fixed"!==o)&&(("body"!==S(n)||O(r))&&(s=$(n)),P(n))){const t=M(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}return{...e,x:e.x-s.scrollLeft+l.x,y:e.y-s.scrollTop+l.y}}(t),getOffsetParent:t=>{let{element:e}=t;return I(e)},isElement:t=>A(t),getDocumentElement:t=>{let{element:e}=t;return V(e)},getClippingClientRect:t=>function(t){let{element:e,boundary:n,rootBoundary:o}=t;const i=[..."clippingParents"===n?K(e):[].concat(n),o],r=i[0],s=i.reduce(((t,n)=>{const o=J(e,n);return t.top=j(o.top,t.top),t.right=N(o.right,t.right),t.bottom=N(o.bottom,t.bottom),t.left=j(o.left,t.left),t}),J(e,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(t),getDimensions:t=>{let{element:e}=t;return U(e)},getClientRects:t=>{let{element:e}=t;return e.getClientRects()}},Z=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n;let l=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:a,y:c}=p({...l,placement:o}),d=o,f={};for(let n=0;n<r.length;n++){const{name:h,fn:u}=r[n],{x:m,y:g,data:y,reset:v}=await u({x:a,y:c,initialPlacement:o,placement:d,strategy:i,middlewareData:f,rects:l,platform:s,elements:{reference:t,floating:e}});a=null!=m?m:a,c=null!=g?g:c,f={...f,[h]:null!=y?y:{}},v&&("object"==typeof v&&(v.placement&&(d=v.placement),v.rects&&(l=!0===v.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),({x:a,y:c}=p({...l,placement:d}))),n=-1)}return{x:a,y:c,placement:d,strategy:i,middlewareData:f}})(t,e,{platform:Q,...n});function tt(t,e){const n=t.getAttribute(e);return n?n.split(/\s+/):[]}function et(t,e,n){t.setAttribute(e,n.join(" "))}const nt=o`:host{--n-tooltip-background:rgba(20, 20, 20, 0.95);--n-tooltip-key-border:rgba(255, 255, 255, 0.03);--n-tooltip-key-background:rgba(255, 255, 255, 0.1);position:absolute;pointer-events:none;visibility:hidden;opacity:0;transition:opacity .4s ease,visibility .4s ease;z-index:var(--n-index-popout)}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--n-color-text-inverse);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--n-tooltip-background);border-radius:var(--n-border-radius-s)}.n-tooltip,.n-tooltip-shortcut{display:flex;align-items:center}.n-tooltip-shortcut{gap:2px}::slotted([slot=shortcut]){box-sizing:border-box;margin:0;inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--n-tooltip-key-border)!important;padding:1px!important;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;vertical-align:middle!important;background-color:var(--n-tooltip-key-background)}`;var ot;let it=ot=class extends(t(r)){constructor(){super(...arguments),this.shortcutSlot=new a(this,"shortcut"),this.proxy=document.createElement("span"),this.visible=!1,this.position="top",this.role="tooltip",this.id="",this.delay=300,this.updatePosition=()=>{return Z(this.targetElement,this,{placement:this.position,middleware:[(t={padding:8},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...a}=t,c={x:n,y:o},f=await g(e,a),u=h(d(i)),p="x"===u?"y":"x";let m=c[u],y=c[p];if(r){const t="y"===u?"bottom":"right";m=b(m+f["y"===u?"top":"left"],m,m-f[t])}if(s){const t="y"===p?"bottom":"right";y=b(y+f["y"===p?"top":"left"],y,y-f[t])}const v=l.fn({...e,[u]:m,[p]:y});return{...v,data:{x:v.x-n,y:v.y-o}}}}),T(8),L()]}).then((({x:t,y:e})=>{this.style.insetInlineStart=`${t}px`,this.style.insetBlockStart=`${e}px`}));var t},this.handleScroll=()=>{this.visible&&this.updatePosition()},this.showTooltip=()=>{var t;this.visible||(null===(t=ot.lastOpened)||void 0===t||t.hideTooltip(),ot.lastOpened=this,this.updatePosition().then((()=>{this.visible=!0})))},this.hideTooltip=()=>{this.visible=!1},this.hideOnEscape=t=>{this.visible&&"Escape"===t.key&&this.hideTooltip()},this.addDescribedBy=()=>{var t,e;const n=null===(e=null===(t=this.targetElement)||void 0===t?void 0:t.focusableRef)||void 0===e?void 0:e.value;n&&(this.proxy.hidden=!0,this.proxy.id=this.id,this.proxy.textContent=this.textContent,n.insertAdjacentElement("afterend",this.proxy),function(t,e,n){const o=tt(t,e);o.includes(n)||et(t,e,o.concat(n))}(n,"aria-describedby",this.id))},this.removeDescribedBy=()=>{var t,e;const n=null===(e=null===(t=this.targetElement)||void 0===t?void 0:t.focusableRef)||void 0===e?void 0:e.value;n&&(this.proxy.remove(),function(t,e,n){const o=tt(t,e);o.includes(n)&&et(t,e,o.filter((t=>t!==n)))}(n,"aria-describedby",this.id))}}connectedCallback(){super.connectedCallback();const t=this.getRootNode(),e=`[aria-describedby='${this.id}']`,n=t.querySelector(e);n?(this.targetElement=n,n.addEventListener("keydown",this.hideOnEscape),n.addEventListener("mouseenter",this.showTooltip),n.addEventListener("mouseleave",this.hideTooltip),n.addEventListener("focus",this.showTooltip),n.addEventListener("blur",this.hideTooltip),window.addEventListener("resize",this.updatePosition,{passive:!0}),window.addEventListener("scroll",this.handleScroll,{passive:!0})):console.warn("NORD: tooltip found no element matching selector:",e)}disconnectedCallback(){super.disconnectedCallback(),this.targetElement&&(this.targetElement.removeEventListener("keydown",this.hideOnEscape),this.targetElement.removeEventListener("mouseenter",this.showTooltip),this.targetElement.removeEventListener("mouseleave",this.hideTooltip),this.targetElement.removeEventListener("focus",this.showTooltip),this.targetElement.removeEventListener("blur",this.hideTooltip),window.removeEventListener("resize",this.updatePosition),window.removeEventListener("scroll",this.handleScroll))}willUpdate(t){t.has("id")&&!this.id&&console.warn("NORD: The tooltip requires an id attribute and value"),t.has("visible")&&(this.visible?(this.addDescribedBy(),this.style.transitionDelay=`${this.delay}ms`,this.style.visibility="visible",this.style.opacity="1"):(this.removeDescribedBy(),this.style.transitionDelay="0ms",this.style.visibility="hidden",this.style.opacity="0"))}render(){return i`<div class="n-tooltip"><slot></slot><div class="n-tooltip-shortcut" ?hidden="${this.shortcutSlot.isEmpty}"><slot class="n-tooltip-key" name="shortcut"></slot></div></div>`}};it.styles=[c,nt],e([l()],it.prototype,"visible",void 0),e([s({reflect:!0})],it.prototype,"position",void 0),e([s({reflect:!0})],it.prototype,"role",void 0),e([s({reflect:!0})],it.prototype,"id",void 0),e([s({reflect:!0,type:Number})],it.prototype,"delay",void 0),it=ot=e([n("nord-tooltip")],it);var rt=it;export{rt as default};
|
|
2
2
|
//# sourceMappingURL=Tooltip.js.map
|
package/lib/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","../src/common/attribute.ts","../src/tooltip/Tooltip.ts"],"sourcesContent":["function getBasePlacement(placement) {\n return placement.split('-')[0];\n}\n\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\n\nfunction getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].includes(getBasePlacement(placement)) ? 'x' : 'y';\n}\n\nfunction getLengthFromAxis(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\n\nfunction computeCoordsFromPlacement(_ref) {\n let {\n reference,\n floating,\n placement\n } = _ref;\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n let coords;\n\n switch (getBasePlacement(placement)) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n\n const mainAxis = getMainAxisFromPlacement(placement);\n const length = getLengthFromAxis(mainAxis);\n\n switch (getAlignment(placement)) {\n case 'start':\n coords[mainAxis] = coords[mainAxis] - (reference[length] / 2 - floating[length] / 2);\n break;\n\n case 'end':\n coords[mainAxis] = coords[mainAxis] + (reference[length] / 2 - floating[length] / 2);\n break;\n }\n\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain positioning strategy.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\n\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n\n if (process.env.NODE_ENV !== \"production\") {\n if (platform == null) {\n console.error(['Floating UI: `platform` property was not passed to config. If you', 'want to use Floating UI on the web, install @floating-ui/dom', 'instead of the /core package. Otherwise, you can create your own', '`platform`: https://floating-ui.com/docs/platform'].join(' '));\n }\n\n if (middleware.filter(_ref => {\n let {\n name\n } = _ref;\n return name === 'autoPlacement' || name === 'flip';\n }).length > 1) {\n throw new Error(['Floating UI: duplicate `flip` and/or `autoPlacement`', 'middleware detected. This will lead to an infinite loop. Ensure only', 'one of either has been passed to the `middleware` array.'].join(' '));\n }\n }\n\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement({ ...rects,\n placement\n });\n let statefulPlacement = placement;\n let middlewareData = {};\n let _debug_loop_count_ = 0;\n\n for (let i = 0; i < middleware.length; i++) {\n if (process.env.NODE_ENV !== \"production\") {\n _debug_loop_count_++;\n\n if (_debug_loop_count_ > 100) {\n throw new Error(['Floating UI: The middleware lifecycle appears to be', 'running in an infinite loop. This is usually caused by a `reset`', 'continually being returned without a break condition.'].join(' '));\n }\n }\n\n const {\n name,\n fn\n } = middleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = { ...middlewareData,\n [name]: data != null ? data : {}\n };\n\n if (reset) {\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n\n ({\n x,\n y\n } = computeCoordsFromPlacement({ ...rects,\n placement: statefulPlacement\n }));\n }\n\n i = -1;\n continue;\n }\n }\n\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\n\nfunction getSideObjectFromPadding(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\n\nfunction rectToClientRect(rect) {\n return { ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n */\nasync function detectOverflow(middlewareArguments, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = middlewareArguments;\n const {\n boundary = 'clippingParents',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = options;\n const paddingObject = getSideObjectFromPadding(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = await platform.getClippingClientRect({\n element: (await platform.isElement(element)) ? element : element.contextElement || (await platform.getDocumentElement({\n element: elements.floating\n })),\n boundary,\n rootBoundary\n });\n const elementClientRect = rectToClientRect(await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect: elementContext === 'floating' ? { ...rects.floating,\n x,\n y\n } : rects.reference,\n offsetParent: await platform.getOffsetParent({\n element: elements.floating\n }),\n strategy\n })); // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n return {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n}\n\nconst min = Math.min;\nconst max = Math.max;\n\nfunction within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered\n * to the reference element.\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n\n async fn(middlewareArguments) {\n // Since `element` is required, we don't Partial<> the type\n const {\n element,\n padding = 0\n } = options != null ? options : {};\n const {\n x,\n y,\n placement,\n rects,\n platform\n } = middlewareArguments;\n\n if (element == null) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn('Floating UI: No `element` was passed to the `arrow` middleware.');\n }\n\n return {};\n }\n\n const paddingObject = getSideObjectFromPadding(padding);\n const coords = {\n x,\n y\n };\n const basePlacement = getBasePlacement(placement);\n const axis = getMainAxisFromPlacement(basePlacement);\n const length = getLengthFromAxis(axis);\n const arrowDimensions = await platform.getDimensions({\n element\n });\n const minProp = axis === 'y' ? 'top' : 'left';\n const maxProp = axis === 'y' ? 'bottom' : 'right';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await platform.getOffsetParent({\n element\n });\n const clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside of the floating element's bounds\n\n const min = paddingObject[minProp];\n const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = within(min, center, max);\n return {\n data: {\n [axis]: offset,\n centerOffset: center - offset\n }\n };\n }\n\n});\n\nconst hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);\n}\n\nfunction getAlignmentSides(placement, rects) {\n const isStart = getAlignment(placement) === 'start';\n const mainAxis = getMainAxisFromPlacement(placement);\n const length = getLengthFromAxis(mainAxis);\n let mainAlignmentSide = mainAxis === 'x' ? isStart ? 'right' : 'left' : isStart ? 'bottom' : 'top';\n\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n\n return {\n main: mainAlignmentSide,\n cross: getOppositePlacement(mainAlignmentSide)\n };\n}\n\nconst hash = {\n start: 'end',\n end: 'start'\n};\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, matched => hash[matched]);\n}\n\nconst basePlacements = ['top', 'right', 'bottom', 'left'];\nconst allPlacements = /*#__PURE__*/basePlacements.reduce((acc, basePlacement) => acc.concat(basePlacement, basePlacement + \"-start\", basePlacement + \"-end\"), []);\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getBasePlacement(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n\n return true;\n });\n}\n\n/**\n * Automatically chooses the `placement` which has the most space available.\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'autoPlacement',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$autoP, _middlewareData$autoP2, _middlewareData$autoP3, _middlewareData$autoP4, _middlewareData$autoP5, _placementsSortedByLe;\n\n const {\n x,\n y,\n rects,\n middlewareData,\n placement\n } = middlewareArguments;\n const {\n alignment = null,\n allowedPlacements = allPlacements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = options;\n\n if ((_middlewareData$autoP = middlewareData.autoPlacement) != null && _middlewareData$autoP.skip) {\n return {};\n }\n\n const placements = getPlacementList(alignment, autoAlignment, allowedPlacements);\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const currentIndex = (_middlewareData$autoP2 = (_middlewareData$autoP3 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP3.index) != null ? _middlewareData$autoP2 : 0;\n const currentPlacement = placements[currentIndex];\n const {\n main,\n cross\n } = getAlignmentSides(currentPlacement, rects); // Make `computeCoords` start from the right place\n\n if (placement !== currentPlacement) {\n return {\n x,\n y,\n reset: {\n placement: placements[0]\n }\n };\n }\n\n const currentOverflows = [overflow[getBasePlacement(currentPlacement)], overflow[main], overflow[cross]];\n const allOverflows = [...((_middlewareData$autoP4 = (_middlewareData$autoP5 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP5.overflows) != null ? _middlewareData$autoP4 : []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements[currentIndex + 1]; // There are more placements to check\n\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);\n const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find(_ref => {\n let {\n overflows\n } = _ref;\n return overflows.every(overflow => overflow <= 0);\n })) == null ? void 0 : _placementsSortedByLe.placement;\n return {\n data: {\n skip: true\n },\n reset: {\n placement: placementThatFitsOnAllSides != null ? placementThatFitsOnAllSides : placementsSortedByLeastOverflow[0].placement\n }\n };\n }\n\n };\n};\n\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\n\n/**\n * Changes the placement of the floating element to one that will fit if the\n * initially specified `placement` does not.\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'flip',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$flip, _middlewareData$flip2;\n\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement\n } = middlewareArguments;\n\n if ((_middlewareData$flip = middlewareData.flip) != null && _middlewareData$flip.skip) {\n return {};\n }\n\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n flipAlignment = true,\n ...detectOverflowOptions\n } = options;\n const basePlacement = getBasePlacement(placement);\n const isBasePlacement = basePlacement === initialPlacement;\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.overflows) || [];\n\n if (checkMainAxis) {\n overflows.push(overflow[basePlacement]);\n }\n\n if (checkCrossAxis) {\n const {\n main,\n cross\n } = getAlignmentSides(placement, rects);\n overflows.push(overflow[main], overflow[cross]);\n }\n\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }]; // One or more sides is overflowing\n\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip$, _middlewareData$flip3;\n\n const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip3 = middlewareData.flip) == null ? void 0 : _middlewareData$flip3.index) != null ? _middlewareData$flip$ : 0) + 1;\n const nextPlacement = placements[nextIndex];\n\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n let resetPlacement = 'bottom';\n\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$slice$;\n\n const placement = (_overflowsData$slice$ = overflowsData.slice().sort((a, b) => a.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0) - b.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0))[0]) == null ? void 0 : _overflowsData$slice$.placement;\n\n if (placement) {\n resetPlacement = placement;\n }\n\n break;\n }\n\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n\n return {\n data: {\n skip: true\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n\n return {};\n }\n\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return basePlacements.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n */\n\n\nconst hide = () => ({\n name: 'hide',\n\n async fn(modifierArguments) {\n const referenceOverflow = await detectOverflow(modifierArguments, {\n elementContext: 'reference'\n });\n const floatingAltOverflow = await detectOverflow(modifierArguments, {\n altBoundary: true\n });\n const referenceHiddenOffsets = getSideOffsets(referenceOverflow, modifierArguments.rects.reference);\n const escapedOffsets = getSideOffsets(floatingAltOverflow, modifierArguments.rects.floating);\n const referenceHidden = isAnySideFullyClipped(referenceHiddenOffsets);\n const escaped = isAnySideFullyClipped(escapedOffsets);\n return {\n data: {\n referenceHidden,\n referenceHiddenOffsets,\n escaped,\n escapedOffsets\n }\n };\n }\n\n});\n\nfunction convertValueToCoords(_ref) {\n let {\n placement,\n rects,\n value\n } = _ref;\n const basePlacement = getBasePlacement(placement);\n const multiplier = ['left', 'top'].includes(basePlacement) ? -1 : 1;\n const rawValue = typeof value === 'function' ? value({ ...rects,\n placement\n }) : value;\n const {\n mainAxis,\n crossAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawValue\n };\n return getMainAxisFromPlacement(basePlacement) === 'x' ? {\n x: crossAxis,\n y: mainAxis * multiplier\n } : {\n x: mainAxis * multiplier,\n y: crossAxis\n };\n}\n/**\n * Displaces the floating element from its reference element.\n */\n\nconst offset = function (value) {\n if (value === void 0) {\n value = 0;\n }\n\n return {\n name: 'offset',\n options: value,\n\n fn(middlewareArguments) {\n const {\n x,\n y,\n placement,\n rects\n } = middlewareArguments;\n const diffCoords = convertValueToCoords({\n placement,\n rects,\n value\n });\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: diffCoords\n };\n }\n\n };\n};\n\nfunction getCrossAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\n\n/**\n * Shifts the floating element in order to keep it in view when it will overflow\n * a clipping boundary.\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'shift',\n options,\n\n async fn(middlewareArguments) {\n const {\n x,\n y,\n placement\n } = middlewareArguments;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = options;\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const mainAxis = getMainAxisFromPlacement(getBasePlacement(placement));\n const crossAxis = getCrossAxis(mainAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = within(min, mainAxisCoord, max);\n }\n\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = within(min, crossAxisCoord, max);\n }\n\n const limitedCoords = limiter.fn({ ...middlewareArguments,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return { ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n options,\n\n fn(middlewareArguments) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = middlewareArguments;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = options;\n const coords = {\n x,\n y\n };\n const mainAxis = getMainAxisFromPlacement(placement);\n const crossAxis = getCrossAxis(mainAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = typeof offset === 'function' ? offset({ ...rects,\n placement\n }) : offset;\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2, _middlewareData$offse3, _middlewareData$offse4;\n\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getBasePlacement(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse = (_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) != null ? _middlewareData$offse : 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (_middlewareData$offse3 = (_middlewareData$offse4 = middlewareData.offset) == null ? void 0 : _middlewareData$offse4[crossAxis]) != null ? _middlewareData$offse3 : 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n\n };\n};\n\n/**\n * Provides data to change the size of the floating element. For instance,\n * prevent it from overflowing its clipping boundary or match the width of the\n * reference element.\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'size',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$size;\n\n const {\n placement,\n rects,\n middlewareData\n } = middlewareArguments;\n const {\n apply,\n ...detectOverflowOptions\n } = options;\n\n if ((_middlewareData$size = middlewareData.size) != null && _middlewareData$size.skip) {\n return {};\n }\n\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const basePlacement = getBasePlacement(placement);\n const isEnd = getAlignment(placement) === 'end';\n let heightSide;\n let widthSide;\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n heightSide = basePlacement;\n widthSide = isEnd ? 'left' : 'right';\n } else {\n widthSide = basePlacement;\n heightSide = isEnd ? 'top' : 'bottom';\n }\n\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n const dimensions = {\n height: rects.floating.height - (['left', 'right'].includes(placement) ? 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom)) : overflow[heightSide]),\n width: rects.floating.width - (['top', 'bottom'].includes(placement) ? 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)) : overflow[widthSide])\n };\n apply == null ? void 0 : apply({ ...dimensions,\n ...rects\n });\n return {\n data: {\n skip: true\n },\n reset: {\n rects: true\n }\n };\n }\n\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'inline',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$inlin, _await$platform$getCl;\n\n const {\n placement,\n elements,\n rects,\n platform,\n strategy,\n middlewareData\n } = middlewareArguments; // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n\n const {\n padding = 2,\n x,\n y\n } = options;\n\n if ((_middlewareData$inlin = middlewareData.inline) != null && _middlewareData$inlin.skip) {\n return {};\n }\n\n const fallback = rectToClientRect(await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect: rects.reference,\n offsetParent: await platform.getOffsetParent({\n element: elements.floating\n }),\n strategy\n }));\n const clientRects = Array.from((_await$platform$getCl = await (platform.getClientRects == null ? void 0 : platform.getClientRects({\n element: elements.reference\n }))) != null ? _await$platform$getCl : []);\n const paddingObject = getSideObjectFromPadding(padding);\n\n function getBoundingClientRect() {\n // There are two rects and they are disjoined\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n var _clientRects$find;\n\n // Find the first rect in which the point is fully inside\n return (_clientRects$find = clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom)) != null ? _clientRects$find : fallback;\n } // There are 2 or more connected rects\n\n\n if (clientRects.length >= 2) {\n if (getMainAxisFromPlacement(placement) === 'x') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getBasePlacement(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n\n const isLeftPlacement = getBasePlacement(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftPlacement ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n\n return fallback;\n }\n\n return {\n data: {\n skip: true\n },\n reset: {\n rects: await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n })\n }\n };\n }\n\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, rectToClientRect, shift, size };\n","import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, offset, shift, size } from '@floating-ui/core';\n\nfunction isWindow(value) {\n return (value == null ? void 0 : value.toString()) === '[object Window]';\n}\nfunction getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (!isWindow(node)) {\n const ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}\n\nfunction getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n}\n\nfunction getNodeName(node) {\n return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';\n}\n\nfunction isHTMLElement(value) {\n return value instanceof getWindow(value).HTMLElement;\n}\nfunction isElement(value) {\n return value instanceof getWindow(value).Element;\n}\nfunction isNode(value) {\n return value instanceof getWindow(value).Node;\n}\nfunction isShadowRoot(node) {\n const OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\nfunction isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n const {\n overflow,\n overflowX,\n overflowY\n } = getComputedStyle$1(element);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n // TODO: Try and use feature detection here instead\n const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');\n const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n return css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);\n}\n\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\n\nfunction getBoundingClientRect(element, includeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n const clientRect = element.getBoundingClientRect();\n let scaleX = 1;\n let scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n return {\n width: clientRect.width / scaleX,\n height: clientRect.height / scaleY,\n top: clientRect.top / scaleY,\n right: clientRect.right / scaleX,\n bottom: clientRect.bottom / scaleY,\n left: clientRect.left / scaleX,\n x: clientRect.left / scaleX,\n y: clientRect.top / scaleY\n };\n}\n\nfunction getDocumentElement(node) {\n return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;\n}\n\nfunction getNodeScroll(element) {\n if (isWindow(element)) {\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n }\n\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\nfunction isScaled(element) {\n const rect = getBoundingClientRect(element);\n return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const rect = getBoundingClientRect(element, isOffsetParentAnElement && isScaled(offsetParent));\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent, true);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // @ts-ignore\n node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n node.parentNode || ( // DOM Element detected\n isShadowRoot(node) ? node.host : null) || // ShadowRoot detected\n getDocumentElement(node) // fallback\n\n );\n}\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n}\n\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nfunction getOffsetParent(element) {\n const window = getWindow(element);\n let offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}\n\nfunction getDimensions(element) {\n return {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n\n if (offsetParent === documentElement) {\n return rect;\n }\n\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent, true);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } // This doesn't appear to be need to be negated.\n // else if (documentElement) {\n // offsets.x = getWindowScrollBarX(documentElement);\n // }\n\n }\n\n return { ...rect,\n x: rect.x - scroll.scrollLeft + offsets.x,\n y: rect.y - scroll.scrollTop + offsets.y\n };\n}\n\nfunction getViewportRect(element) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n\n if (Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < 0.01) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nfunction getDocumentRect(element) {\n var _element$ownerDocumen;\n\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getScrollParent(node) {\n if (['html', 'body', '#document'].includes(getNodeName(node))) {\n // @ts-ignore assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}\n\nfunction getScrollParents(node, list) {\n var _node$ownerDocument;\n\n if (list === void 0) {\n list = [];\n }\n\n const scrollParent = getScrollParent(node);\n const isBody = scrollParent === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);\n const win = getWindow(scrollParent);\n const target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n const updatedList = list.concat(target);\n return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here\n updatedList.concat(getScrollParents(getParentNode(target)));\n}\n\nfunction contains(parent, child) {\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n\n do {\n // use `===` replace node.isSameNode()\n if (next && parent === next) {\n return true;\n } // @ts-ignore: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n }\n\n return false;\n}\n\nfunction getInnerBoundingClientRect(element) {\n const clientRect = getBoundingClientRect(element);\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n return {\n top,\n left,\n x: left,\n y: top,\n right: left + element.clientWidth,\n bottom: top + element.clientHeight,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getClientRectFromClippingParent(element, clippingParent) {\n if (clippingParent === 'viewport') {\n return rectToClientRect(getViewportRect(element));\n }\n\n if (isElement(clippingParent)) {\n return getInnerBoundingClientRect(clippingParent);\n }\n\n return rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n const clippingParents = getScrollParents(getParentNode(element));\n const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);\n const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // @ts-ignore isElement check ensures we return Array<Element>\n\n\n return clippingParents.filter(clippingParent => isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body');\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nfunction getClippingClientRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary\n } = _ref;\n const mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n const clippingParents = [...mainClippingParents, rootBoundary];\n const firstClippingParent = clippingParents[0];\n const clippingRect = clippingParents.reduce((accRect, clippingParent) => {\n const rect = getClientRectFromClippingParent(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingParent(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}\n\nconst platform = {\n getElementRects: _ref => {\n let {\n reference,\n floating,\n strategy\n } = _ref;\n return {\n reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),\n floating: { ...getDimensions(floating),\n x: 0,\n y: 0\n }\n };\n },\n convertOffsetParentRelativeRectToViewportRelativeRect: args => convertOffsetParentRelativeRectToViewportRelativeRect(args),\n getOffsetParent: _ref2 => {\n let {\n element\n } = _ref2;\n return getOffsetParent(element);\n },\n isElement: value => isElement(value),\n getDocumentElement: _ref3 => {\n let {\n element\n } = _ref3;\n return getDocumentElement(element);\n },\n getClippingClientRect: args => getClippingClientRect(args),\n getDimensions: _ref4 => {\n let {\n element\n } = _ref4;\n return getDimensions(element);\n },\n getClientRects: _ref5 => {\n let {\n element\n } = _ref5;\n return element.getClientRects();\n }\n};\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain CSS positioning\n * strategy.\n */\n\nconst computePosition = (reference, floating, options) => computePosition$1(reference, floating, {\n platform,\n ...options\n});\n\nexport { computePosition, getScrollParents };\n","function getTokens(element: Element, attr: string) {\n const value = element.getAttribute(attr)\n return value ? value.split(/\\s+/) : []\n}\n\nfunction setTokens(element: Element, attr: string, tokens: string[]) {\n element.setAttribute(attr, tokens.join(\" \"))\n}\n\n/**\n * Carefully adds a token to a space-separated attribute\n * Similar to classList, but for any attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/add\n */\nexport function add(element: Element, attr: string, token: string) {\n const tokens = getTokens(element, attr)\n\n if (!tokens.includes(token)) {\n setTokens(element, attr, tokens.concat(token))\n }\n}\n\n/**\n * Carefully removes a token from a space-separated attribute.\n * Similar to classList, but for any attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/remove\n */\nexport function remove(element: Element, attr: string, token: string) {\n const tokens = getTokens(element, attr)\n\n if (tokens.includes(token)) {\n setTokens(\n element,\n attr,\n tokens.filter(t => t !== token)\n )\n }\n}\n","import { LitElement, html, PropertyValues } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\nimport { computePosition, flip, shift, offset } from \"@floating-ui/dom\"\nimport type { Ref } from \"lit/directives/ref.js\"\n\nimport * as attr from \"../common/attribute.js\"\nimport { DraftComponentMixin } from \"../common/mixins/DraftComponentMixin.js\"\nimport { SlotController } from \"../common/controllers/SlotController.js\"\nimport componentStyle from \"../common/styles/Component.css\"\nimport style from \"./Tooltip.css\"\n\ntype FocusableElement = HTMLElement & { focusableRef?: Ref<Element> }\n\n/**\n * Tooltips are floating containers for displaying additional information\n * for the currently focused element. A tooltip can be useful when you want\n * to e.g. give a hint about an existing Command Menu shortcut.\n *\n * @status draft\n * @category overlay\n * @slot - The tooltip content\n * @slot shortcut - Optional slot that holds shortcut keys to access the subject\n */\n@customElement(\"nord-tooltip\")\nexport default class Tooltip extends DraftComponentMixin(LitElement) {\n static styles = [componentStyle, style]\n\n // tracks the last tooltip opened, so we can enforce only one is ever open at a time\n static lastOpened?: Tooltip\n\n private shortcutSlot = new SlotController(this, \"shortcut\")\n private targetElement!: FocusableElement\n\n /**\n * the proxy element is for cases where the targetElement is a web component,\n * and the WC has a focusable child in its shadow root e.g. a button component.\n * in this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\n * and wire up aria-describedby from the focusable element to the proxy.\n * when the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship.\n */\n private proxy = document.createElement(\"span\")\n\n /**\n * Determines whether the tooltip is visible or not.\n */\n @state() visible: boolean = false\n\n /**\n * Control the position of the tooltip component.\n * When set to \"none\", the tooltip will be shown above\n * but accommodate for browser boundaries.\n */\n @property({ reflect: true }) position?: \"bottom\" | \"top\" | \"left\" | \"right\" = \"top\"\n\n /**\n * The tooltip role, set on the component by default.\n */\n @property({ reflect: true }) role = \"tooltip\"\n\n /**\n * The id for the active element to reference via aria-describedby.\n */\n @property({ reflect: true }) id: string = \"\"\n\n /**\n * The delay in milliseconds before the tooltip is opened.\n */\n @property({ reflect: true, type: Number }) delay: number = 300\n\n /**\n * Setting and updating the position of the tooltip\n */\n private updatePosition = () =>\n computePosition(this.targetElement, this, {\n placement: this.position,\n middleware: [\n shift({\n padding: 8,\n }),\n offset(8),\n flip(),\n ],\n }).then(({ x, y }) => {\n this.style.insetInlineStart = `${x}px`\n this.style.insetBlockStart = `${y}px`\n })\n\n private handleScroll = () => {\n if (this.visible) this.updatePosition()\n }\n\n /**\n * Show and hide the tooltip using inline styles\n */\n private showTooltip = () => {\n if (this.visible) {\n return\n }\n\n Tooltip.lastOpened?.hideTooltip()\n Tooltip.lastOpened = this\n\n this.updatePosition().then(() => {\n this.visible = true\n })\n }\n\n private hideTooltip = () => {\n this.visible = false\n }\n\n /**\n * Apply all event listeners\n */\n connectedCallback() {\n super.connectedCallback()\n\n const rootNode = this.getRootNode() as Document | ShadowRoot\n const selector = `[aria-describedby='${this.id}']`\n const target = rootNode.querySelector<FocusableElement>(selector)\n\n if (!target) {\n // eslint-disable-next-line no-console\n console.warn(\"NORD: tooltip found no element matching selector:\", selector)\n return\n }\n\n this.targetElement = target\n\n target.addEventListener(\"keydown\", this.hideOnEscape)\n target.addEventListener(\"mouseenter\", this.showTooltip)\n target.addEventListener(\"mouseleave\", this.hideTooltip)\n target.addEventListener(\"focus\", this.showTooltip)\n target.addEventListener(\"blur\", this.hideTooltip)\n\n window.addEventListener(\"resize\", this.updatePosition, { passive: true })\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true })\n }\n\n /**\n * Remove all the event listeners\n */\n disconnectedCallback() {\n super.disconnectedCallback()\n\n if (!this.targetElement) {\n return\n }\n\n this.targetElement.removeEventListener(\"keydown\", this.hideOnEscape)\n this.targetElement.removeEventListener(\"mouseenter\", this.showTooltip)\n this.targetElement.removeEventListener(\"mouseleave\", this.hideTooltip)\n this.targetElement.removeEventListener(\"focus\", this.showTooltip)\n this.targetElement.removeEventListener(\"blur\", this.hideTooltip)\n window.removeEventListener(\"resize\", this.updatePosition)\n window.removeEventListener(\"scroll\", this.handleScroll)\n }\n\n /**\n * Check if the tooltip has an id, warn them if not\n */\n willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"id\") && !this.id) {\n // eslint-disable-next-line no-console\n console.warn(\"NORD: The tooltip requires an id attribute and value\")\n }\n\n if (changedProperties.has(\"visible\")) {\n if (this.visible) {\n this.addDescribedBy()\n\n this.style.transitionDelay = `${this.delay}ms`\n this.style.visibility = \"visible\"\n this.style.opacity = \"1\"\n } else {\n this.removeDescribedBy()\n\n this.style.transitionDelay = `0ms`\n this.style.visibility = \"hidden\"\n this.style.opacity = \"0\"\n }\n }\n }\n\n render() {\n return html`\n <div class=\"n-tooltip\">\n <slot></slot>\n <div class=\"n-tooltip-shortcut\" ?hidden=${this.shortcutSlot.isEmpty}>\n <slot class=\"n-tooltip-key\" name=\"shortcut\"></slot>\n </div>\n </div>\n `\n }\n\n private hideOnEscape = (e: KeyboardEvent) => {\n if (this.visible && e.key === \"Escape\") {\n this.hideTooltip()\n }\n }\n\n private addDescribedBy = () => {\n const focusable = this.targetElement?.focusableRef?.value\n\n if (focusable) {\n this.proxy.hidden = true\n this.proxy.id = this.id\n this.proxy.textContent = this.textContent\n\n focusable.insertAdjacentElement(\"afterend\", this.proxy)\n attr.add(focusable, \"aria-describedby\", this.id)\n }\n }\n\n private removeDescribedBy = () => {\n const focusable = this.targetElement?.focusableRef?.value\n\n if (focusable) {\n this.proxy.remove()\n attr.remove(focusable, \"aria-describedby\", this.id)\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"nord-tooltip\": Tooltip\n }\n}\n"],"names":["getBasePlacement","placement","split","getAlignment","getMainAxisFromPlacement","includes","getLengthFromAxis","axis","computeCoordsFromPlacement","_ref","reference","floating","commonX","x","width","commonY","y","height","coords","mainAxis","length","rectToClientRect","rect","top","left","right","bottom","async","detectOverflow","middlewareArguments","options","platform","rects","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","padding","paddingObject","expandPaddingObject","getSideObjectFromPadding","element","clippingClientRect","getClippingClientRect","isElement","contextElement","getDocumentElement","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","offsetParent","getOffsetParent","min","Math","max","within","min$1","value","max$1","hash$1","getOppositePlacement","replace","matched","hash","start","end","getOppositeAlignmentPlacement","flip","name","_middlewareData$flip","_middlewareData$flip2","middlewareData","initialPlacement","skip","checkMainAxis","crossAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","flipAlignment","detectOverflowOptions","basePlacement","oppositePlacement","getExpandedPlacements","placements","overflow","overflows","overflowsData","push","main","cross","isStart","mainAlignmentSide","getAlignmentSides","every","side","_middlewareData$flip$","_middlewareData$flip3","nextIndex","index","nextPlacement","data","reset","resetPlacement","_overflowsData$slice$","slice","sort","a","b","filter","reduce","acc","offset","fn","diffCoords","multiplier","rawValue","convertValueToCoords","isWindow","toString","getWindow","node","window","ownerDocument","defaultView","getComputedStyle$1","getComputedStyle","getNodeName","nodeName","toLowerCase","isHTMLElement","HTMLElement","Element","isShadowRoot","ShadowRoot","isScrollParent","overflowX","overflowY","test","isTableElement","isContainingBlock","isFirefox","navigator","userAgent","css","transform","perspective","contain","willChange","round","getBoundingClientRect","includeScale","clientRect","scaleX","scaleY","offsetWidth","offsetHeight","Node","document","documentElement","getNodeScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getRectRelativeToOffsetParent","isOffsetParentAnElement","isScaled","scroll","offsets","offsetRect","clientLeft","clientTop","getParentNode","assignedSlot","parentNode","host","getTrueOffsetParent","position","currentNode","getContainingBlock","getDimensions","getScrollParent","body","getScrollParents","list","_node$ownerDocument","scrollParent","isBody","win","target","concat","visualViewport","updatedList","getClientRectFromClippingParent","clippingParent","html","clientWidth","clientHeight","abs","innerWidth","scale","offsetLeft","offsetTop","getViewportRect","getInnerBoundingClientRect","_element$ownerDocumen","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingParents","clippingParents","clipperElement","parent","child","rootNode","getRootNode","contains","next","getElementRects","args","_ref2","_ref3","firstClippingParent","clippingRect","accRect","_ref4","getClientRects","_ref5","computePosition","config","middleware","statefulPlacement","i","nextX","nextY","computePosition$1","getTokens","attr","getAttribute","setTokens","tokens","setAttribute","join","Tooltip","DraftComponentMixin","LitElement","constructor","this","SlotController","createElement","targetElement","limiter","mainAxisCoord","crossAxisCoord","maxSide","limitedCoords","then","style","insetInlineStart","insetBlockStart","visible","updatePosition","Tooltip_1","lastOpened","hideTooltip","e","key","focusable","focusableRef","proxy","hidden","id","textContent","insertAdjacentElement","token","attr.add","remove","t","attr.remove","connectedCallback","super","selector","querySelector","addEventListener","hideOnEscape","showTooltip","passive","handleScroll","console","warn","disconnectedCallback","removeEventListener","willUpdate","changedProperties","has","addDescribedBy","transitionDelay","delay","visibility","opacity","removeDescribedBy","render","shortcutSlot","isEmpty","componentStyle","__decorate","state","property","reflect","type","Number","customElement"],"mappings":"2SAAA,SAASA,EAAiBC,GACxB,OAAOA,EAAUC,MAAM,KAAK,GAG9B,SAASC,EAAaF,GACpB,OAAOA,EAAUC,MAAM,KAAK,GAG9B,SAASE,EAAyBH,GAChC,MAAO,CAAC,MAAO,UAAUI,SAASL,EAAiBC,IAAc,IAAM,IAGzE,SAASK,EAAkBC,GACzB,MAAgB,MAATA,EAAe,SAAW,QAGnC,SAASC,EAA2BC,GAClC,IAAIC,UACFA,EAASC,SACTA,EAAQV,UACRA,GACEQ,EACJ,MAAMG,EAAUF,EAAUG,EAAIH,EAAUI,MAAQ,EAAIH,EAASG,MAAQ,EAC/DC,EAAUL,EAAUM,EAAIN,EAAUO,OAAS,EAAIN,EAASM,OAAS,EACvE,IAAIC,EAEJ,OAAQlB,EAAiBC,IACvB,IAAK,MACHiB,EAAS,CACPL,EAAGD,EACHI,EAAGN,EAAUM,EAAIL,EAASM,QAE5B,MAEF,IAAK,SACHC,EAAS,CACPL,EAAGD,EACHI,EAAGN,EAAUM,EAAIN,EAAUO,QAE7B,MAEF,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AAKwB,IAEvCiB,QAAQC,KAAK,wDAGXI,EAAkBC,IAAI,aACpB/C,KAAKa,SACPb,KAAKgD,iBAELhD,KAAKU,MAAMuC,gBAAkB,GAAGjD,KAAKkD,UACrClD,KAAKU,MAAMyC,WAAa,UACxBnD,KAAKU,MAAM0C,QAAU,MAErBpD,KAAKqD,oBAELrD,KAAKU,MAAMuC,gBAAkB,MAC7BjD,KAAKU,MAAMyC,WAAa,SACxBnD,KAAKU,MAAM0C,QAAU,MAK3BE,SACE,OAAO3G,CAAI,gFAGmCqD,KAAKuD,aAAaC,6EAnK3D5D,UAAS,CAAC6D,EAAgB/C,IAoBxBgD,GAARC,oCAO4BD,GAA5BE,EAAS,CAAEC,SAAS,qCAKQH,GAA5BE,EAAS,CAAEC,SAAS,iCAKQH,GAA5BE,EAAS,CAAEC,SAAS,+BAKsBH,GAA1CE,EAAS,CAAEC,SAAS,EAAMC,KAAMC,uCA3CdnE,SADpBoE,EAAc,iBACMpE,WAAAA"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","../src/common/attribute.ts","../src/tooltip/Tooltip.ts"],"sourcesContent":["function getBasePlacement(placement) {\n return placement.split('-')[0];\n}\n\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\n\nfunction getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].includes(getBasePlacement(placement)) ? 'x' : 'y';\n}\n\nfunction getLengthFromAxis(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\n\nfunction computeCoordsFromPlacement(_ref) {\n let {\n reference,\n floating,\n placement\n } = _ref;\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n let coords;\n\n switch (getBasePlacement(placement)) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n\n const mainAxis = getMainAxisFromPlacement(placement);\n const length = getLengthFromAxis(mainAxis);\n\n switch (getAlignment(placement)) {\n case 'start':\n coords[mainAxis] = coords[mainAxis] - (reference[length] / 2 - floating[length] / 2);\n break;\n\n case 'end':\n coords[mainAxis] = coords[mainAxis] + (reference[length] / 2 - floating[length] / 2);\n break;\n }\n\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain positioning strategy.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\n\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n\n if (process.env.NODE_ENV !== \"production\") {\n if (platform == null) {\n console.error(['Floating UI: `platform` property was not passed to config. If you', 'want to use Floating UI on the web, install @floating-ui/dom', 'instead of the /core package. Otherwise, you can create your own', '`platform`: https://floating-ui.com/docs/platform'].join(' '));\n }\n\n if (middleware.filter(_ref => {\n let {\n name\n } = _ref;\n return name === 'autoPlacement' || name === 'flip';\n }).length > 1) {\n throw new Error(['Floating UI: duplicate `flip` and/or `autoPlacement`', 'middleware detected. This will lead to an infinite loop. Ensure only', 'one of either has been passed to the `middleware` array.'].join(' '));\n }\n }\n\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement({ ...rects,\n placement\n });\n let statefulPlacement = placement;\n let middlewareData = {};\n let _debug_loop_count_ = 0;\n\n for (let i = 0; i < middleware.length; i++) {\n if (process.env.NODE_ENV !== \"production\") {\n _debug_loop_count_++;\n\n if (_debug_loop_count_ > 100) {\n throw new Error(['Floating UI: The middleware lifecycle appears to be', 'running in an infinite loop. This is usually caused by a `reset`', 'continually being returned without a break condition.'].join(' '));\n }\n }\n\n const {\n name,\n fn\n } = middleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = { ...middlewareData,\n [name]: data != null ? data : {}\n };\n\n if (reset) {\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n\n ({\n x,\n y\n } = computeCoordsFromPlacement({ ...rects,\n placement: statefulPlacement\n }));\n }\n\n i = -1;\n continue;\n }\n }\n\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\n\nfunction getSideObjectFromPadding(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\n\nfunction rectToClientRect(rect) {\n return { ...rect,\n top: rect.y,\n left: rect.x,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n */\nasync function detectOverflow(middlewareArguments, options) {\n if (options === void 0) {\n options = {};\n }\n\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = middlewareArguments;\n const {\n boundary = 'clippingParents',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = options;\n const paddingObject = getSideObjectFromPadding(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = await platform.getClippingClientRect({\n element: (await platform.isElement(element)) ? element : element.contextElement || (await platform.getDocumentElement({\n element: elements.floating\n })),\n boundary,\n rootBoundary\n });\n const elementClientRect = rectToClientRect(await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect: elementContext === 'floating' ? { ...rects.floating,\n x,\n y\n } : rects.reference,\n offsetParent: await platform.getOffsetParent({\n element: elements.floating\n }),\n strategy\n })); // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n return {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n}\n\nconst min = Math.min;\nconst max = Math.max;\n\nfunction within(min$1, value, max$1) {\n return max(min$1, min(value, max$1));\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered\n * to the reference element.\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n\n async fn(middlewareArguments) {\n // Since `element` is required, we don't Partial<> the type\n const {\n element,\n padding = 0\n } = options != null ? options : {};\n const {\n x,\n y,\n placement,\n rects,\n platform\n } = middlewareArguments;\n\n if (element == null) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn('Floating UI: No `element` was passed to the `arrow` middleware.');\n }\n\n return {};\n }\n\n const paddingObject = getSideObjectFromPadding(padding);\n const coords = {\n x,\n y\n };\n const basePlacement = getBasePlacement(placement);\n const axis = getMainAxisFromPlacement(basePlacement);\n const length = getLengthFromAxis(axis);\n const arrowDimensions = await platform.getDimensions({\n element\n });\n const minProp = axis === 'y' ? 'top' : 'left';\n const maxProp = axis === 'y' ? 'bottom' : 'right';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await platform.getOffsetParent({\n element\n });\n const clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n const centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside of the floating element's bounds\n\n const min = paddingObject[minProp];\n const max = clientSize - arrowDimensions[length] - paddingObject[maxProp];\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = within(min, center, max);\n return {\n data: {\n [axis]: offset,\n centerOffset: center - offset\n }\n };\n }\n\n});\n\nconst hash$1 = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, matched => hash$1[matched]);\n}\n\nfunction getAlignmentSides(placement, rects) {\n const isStart = getAlignment(placement) === 'start';\n const mainAxis = getMainAxisFromPlacement(placement);\n const length = getLengthFromAxis(mainAxis);\n let mainAlignmentSide = mainAxis === 'x' ? isStart ? 'right' : 'left' : isStart ? 'bottom' : 'top';\n\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n\n return {\n main: mainAlignmentSide,\n cross: getOppositePlacement(mainAlignmentSide)\n };\n}\n\nconst hash = {\n start: 'end',\n end: 'start'\n};\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, matched => hash[matched]);\n}\n\nconst basePlacements = ['top', 'right', 'bottom', 'left'];\nconst allPlacements = /*#__PURE__*/basePlacements.reduce((acc, basePlacement) => acc.concat(basePlacement, basePlacement + \"-start\", basePlacement + \"-end\"), []);\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getBasePlacement(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n\n return true;\n });\n}\n\n/**\n * Automatically chooses the `placement` which has the most space available.\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'autoPlacement',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$autoP, _middlewareData$autoP2, _middlewareData$autoP3, _middlewareData$autoP4, _middlewareData$autoP5, _placementsSortedByLe;\n\n const {\n x,\n y,\n rects,\n middlewareData,\n placement\n } = middlewareArguments;\n const {\n alignment = null,\n allowedPlacements = allPlacements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = options;\n\n if ((_middlewareData$autoP = middlewareData.autoPlacement) != null && _middlewareData$autoP.skip) {\n return {};\n }\n\n const placements = getPlacementList(alignment, autoAlignment, allowedPlacements);\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const currentIndex = (_middlewareData$autoP2 = (_middlewareData$autoP3 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP3.index) != null ? _middlewareData$autoP2 : 0;\n const currentPlacement = placements[currentIndex];\n const {\n main,\n cross\n } = getAlignmentSides(currentPlacement, rects); // Make `computeCoords` start from the right place\n\n if (placement !== currentPlacement) {\n return {\n x,\n y,\n reset: {\n placement: placements[0]\n }\n };\n }\n\n const currentOverflows = [overflow[getBasePlacement(currentPlacement)], overflow[main], overflow[cross]];\n const allOverflows = [...((_middlewareData$autoP4 = (_middlewareData$autoP5 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP5.overflows) != null ? _middlewareData$autoP4 : []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements[currentIndex + 1]; // There are more placements to check\n\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n const placementsSortedByLeastOverflow = allOverflows.slice().sort((a, b) => a.overflows[0] - b.overflows[0]);\n const placementThatFitsOnAllSides = (_placementsSortedByLe = placementsSortedByLeastOverflow.find(_ref => {\n let {\n overflows\n } = _ref;\n return overflows.every(overflow => overflow <= 0);\n })) == null ? void 0 : _placementsSortedByLe.placement;\n return {\n data: {\n skip: true\n },\n reset: {\n placement: placementThatFitsOnAllSides != null ? placementThatFitsOnAllSides : placementsSortedByLeastOverflow[0].placement\n }\n };\n }\n\n };\n};\n\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\n\n/**\n * Changes the placement of the floating element to one that will fit if the\n * initially specified `placement` does not.\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'flip',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$flip, _middlewareData$flip2;\n\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement\n } = middlewareArguments;\n\n if ((_middlewareData$flip = middlewareData.flip) != null && _middlewareData$flip.skip) {\n return {};\n }\n\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n flipAlignment = true,\n ...detectOverflowOptions\n } = options;\n const basePlacement = getBasePlacement(placement);\n const isBasePlacement = basePlacement === initialPlacement;\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.overflows) || [];\n\n if (checkMainAxis) {\n overflows.push(overflow[basePlacement]);\n }\n\n if (checkCrossAxis) {\n const {\n main,\n cross\n } = getAlignmentSides(placement, rects);\n overflows.push(overflow[main], overflow[cross]);\n }\n\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }]; // One or more sides is overflowing\n\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip$, _middlewareData$flip3;\n\n const nextIndex = ((_middlewareData$flip$ = (_middlewareData$flip3 = middlewareData.flip) == null ? void 0 : _middlewareData$flip3.index) != null ? _middlewareData$flip$ : 0) + 1;\n const nextPlacement = placements[nextIndex];\n\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n let resetPlacement = 'bottom';\n\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$slice$;\n\n const placement = (_overflowsData$slice$ = overflowsData.slice().sort((a, b) => a.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0) - b.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0))[0]) == null ? void 0 : _overflowsData$slice$.placement;\n\n if (placement) {\n resetPlacement = placement;\n }\n\n break;\n }\n\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n\n return {\n data: {\n skip: true\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n\n return {};\n }\n\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return basePlacements.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n */\n\n\nconst hide = () => ({\n name: 'hide',\n\n async fn(modifierArguments) {\n const referenceOverflow = await detectOverflow(modifierArguments, {\n elementContext: 'reference'\n });\n const floatingAltOverflow = await detectOverflow(modifierArguments, {\n altBoundary: true\n });\n const referenceHiddenOffsets = getSideOffsets(referenceOverflow, modifierArguments.rects.reference);\n const escapedOffsets = getSideOffsets(floatingAltOverflow, modifierArguments.rects.floating);\n const referenceHidden = isAnySideFullyClipped(referenceHiddenOffsets);\n const escaped = isAnySideFullyClipped(escapedOffsets);\n return {\n data: {\n referenceHidden,\n referenceHiddenOffsets,\n escaped,\n escapedOffsets\n }\n };\n }\n\n});\n\nfunction convertValueToCoords(_ref) {\n let {\n placement,\n rects,\n value\n } = _ref;\n const basePlacement = getBasePlacement(placement);\n const multiplier = ['left', 'top'].includes(basePlacement) ? -1 : 1;\n const rawValue = typeof value === 'function' ? value({ ...rects,\n placement\n }) : value;\n const {\n mainAxis,\n crossAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawValue\n };\n return getMainAxisFromPlacement(basePlacement) === 'x' ? {\n x: crossAxis,\n y: mainAxis * multiplier\n } : {\n x: mainAxis * multiplier,\n y: crossAxis\n };\n}\n/**\n * Displaces the floating element from its reference element.\n */\n\nconst offset = function (value) {\n if (value === void 0) {\n value = 0;\n }\n\n return {\n name: 'offset',\n options: value,\n\n fn(middlewareArguments) {\n const {\n x,\n y,\n placement,\n rects\n } = middlewareArguments;\n const diffCoords = convertValueToCoords({\n placement,\n rects,\n value\n });\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: diffCoords\n };\n }\n\n };\n};\n\nfunction getCrossAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\n\n/**\n * Shifts the floating element in order to keep it in view when it will overflow\n * a clipping boundary.\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'shift',\n options,\n\n async fn(middlewareArguments) {\n const {\n x,\n y,\n placement\n } = middlewareArguments;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = options;\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const mainAxis = getMainAxisFromPlacement(getBasePlacement(placement));\n const crossAxis = getCrossAxis(mainAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = within(min, mainAxisCoord, max);\n }\n\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = within(min, crossAxisCoord, max);\n }\n\n const limitedCoords = limiter.fn({ ...middlewareArguments,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return { ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n options,\n\n fn(middlewareArguments) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = middlewareArguments;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = options;\n const coords = {\n x,\n y\n };\n const mainAxis = getMainAxisFromPlacement(placement);\n const crossAxis = getCrossAxis(mainAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = typeof offset === 'function' ? offset({ ...rects,\n placement\n }) : offset;\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2, _middlewareData$offse3, _middlewareData$offse4;\n\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getBasePlacement(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse = (_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) != null ? _middlewareData$offse : 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (_middlewareData$offse3 = (_middlewareData$offse4 = middlewareData.offset) == null ? void 0 : _middlewareData$offse4[crossAxis]) != null ? _middlewareData$offse3 : 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n\n };\n};\n\n/**\n * Provides data to change the size of the floating element. For instance,\n * prevent it from overflowing its clipping boundary or match the width of the\n * reference element.\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'size',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$size;\n\n const {\n placement,\n rects,\n middlewareData\n } = middlewareArguments;\n const {\n apply,\n ...detectOverflowOptions\n } = options;\n\n if ((_middlewareData$size = middlewareData.size) != null && _middlewareData$size.skip) {\n return {};\n }\n\n const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);\n const basePlacement = getBasePlacement(placement);\n const isEnd = getAlignment(placement) === 'end';\n let heightSide;\n let widthSide;\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n heightSide = basePlacement;\n widthSide = isEnd ? 'left' : 'right';\n } else {\n widthSide = basePlacement;\n heightSide = isEnd ? 'top' : 'bottom';\n }\n\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n const dimensions = {\n height: rects.floating.height - (['left', 'right'].includes(placement) ? 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom)) : overflow[heightSide]),\n width: rects.floating.width - (['top', 'bottom'].includes(placement) ? 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right)) : overflow[widthSide])\n };\n apply == null ? void 0 : apply({ ...dimensions,\n ...rects\n });\n return {\n data: {\n skip: true\n },\n reset: {\n rects: true\n }\n };\n }\n\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n\n return {\n name: 'inline',\n options,\n\n async fn(middlewareArguments) {\n var _middlewareData$inlin, _await$platform$getCl;\n\n const {\n placement,\n elements,\n rects,\n platform,\n strategy,\n middlewareData\n } = middlewareArguments; // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n\n const {\n padding = 2,\n x,\n y\n } = options;\n\n if ((_middlewareData$inlin = middlewareData.inline) != null && _middlewareData$inlin.skip) {\n return {};\n }\n\n const fallback = rectToClientRect(await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n rect: rects.reference,\n offsetParent: await platform.getOffsetParent({\n element: elements.floating\n }),\n strategy\n }));\n const clientRects = Array.from((_await$platform$getCl = await (platform.getClientRects == null ? void 0 : platform.getClientRects({\n element: elements.reference\n }))) != null ? _await$platform$getCl : []);\n const paddingObject = getSideObjectFromPadding(padding);\n\n function getBoundingClientRect() {\n // There are two rects and they are disjoined\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n var _clientRects$find;\n\n // Find the first rect in which the point is fully inside\n return (_clientRects$find = clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom)) != null ? _clientRects$find : fallback;\n } // There are 2 or more connected rects\n\n\n if (clientRects.length >= 2) {\n if (getMainAxisFromPlacement(placement) === 'x') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getBasePlacement(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n\n const isLeftPlacement = getBasePlacement(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftPlacement ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n\n return fallback;\n }\n\n return {\n data: {\n skip: true\n },\n reset: {\n rects: await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n })\n }\n };\n }\n\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, rectToClientRect, shift, size };\n","import { rectToClientRect, computePosition as computePosition$1 } from '@floating-ui/core';\nexport { arrow, autoPlacement, detectOverflow, flip, hide, inline, limitShift, offset, shift, size } from '@floating-ui/core';\n\nfunction isWindow(value) {\n return (value == null ? void 0 : value.toString()) === '[object Window]';\n}\nfunction getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (!isWindow(node)) {\n const ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}\n\nfunction getComputedStyle$1(element) {\n return getWindow(element).getComputedStyle(element);\n}\n\nfunction getNodeName(node) {\n return isWindow(node) ? '' : node ? (node.nodeName || '').toLowerCase() : '';\n}\n\nfunction isHTMLElement(value) {\n return value instanceof getWindow(value).HTMLElement;\n}\nfunction isElement(value) {\n return value instanceof getWindow(value).Element;\n}\nfunction isNode(value) {\n return value instanceof getWindow(value).Node;\n}\nfunction isShadowRoot(node) {\n const OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\nfunction isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n const {\n overflow,\n overflowX,\n overflowY\n } = getComputedStyle$1(element);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isContainingBlock(element) {\n // TODO: Try and use feature detection here instead\n const isFirefox = navigator.userAgent.toLowerCase().includes('firefox');\n const css = getComputedStyle$1(element); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n return css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].includes(css.willChange) || isFirefox && css.willChange === 'filter' || isFirefox && (css.filter ? css.filter !== 'none' : false);\n}\n\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\n\nfunction getBoundingClientRect(element, includeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n const clientRect = element.getBoundingClientRect();\n let scaleX = 1;\n let scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n return {\n width: clientRect.width / scaleX,\n height: clientRect.height / scaleY,\n top: clientRect.top / scaleY,\n right: clientRect.right / scaleX,\n bottom: clientRect.bottom / scaleY,\n left: clientRect.left / scaleX,\n x: clientRect.left / scaleX,\n y: clientRect.top / scaleY\n };\n}\n\nfunction getDocumentElement(node) {\n return ((isNode(node) ? node.ownerDocument : node.document) || window.document).documentElement;\n}\n\nfunction getNodeScroll(element) {\n if (isWindow(element)) {\n return {\n scrollLeft: element.pageXOffset,\n scrollTop: element.pageYOffset\n };\n }\n\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}\n\nfunction getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\nfunction isScaled(element) {\n const rect = getBoundingClientRect(element);\n return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const rect = getBoundingClientRect(element, isOffsetParentAnElement && isScaled(offsetParent));\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent, true);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // @ts-ignore\n node.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n node.parentNode || ( // DOM Element detected\n isShadowRoot(node) ? node.host : null) || // ShadowRoot detected\n getDocumentElement(node) // fallback\n\n );\n}\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n}\n\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && !['html', 'body'].includes(getNodeName(currentNode))) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nfunction getOffsetParent(element) {\n const window = getWindow(element);\n let offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}\n\nfunction getDimensions(element) {\n return {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n\n if (offsetParent === documentElement) {\n return rect;\n }\n\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {\n if (getNodeName(offsetParent) !== 'body' || isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent, true);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } // This doesn't appear to be need to be negated.\n // else if (documentElement) {\n // offsets.x = getWindowScrollBarX(documentElement);\n // }\n\n }\n\n return { ...rect,\n x: rect.x - scroll.scrollLeft + offsets.x,\n y: rect.y - scroll.scrollTop + offsets.y\n };\n}\n\nfunction getViewportRect(element) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n\n if (Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) < 0.01) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nfunction getDocumentRect(element) {\n var _element$ownerDocumen;\n\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n const width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n\n if (getComputedStyle$1(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getScrollParent(node) {\n if (['html', 'body', '#document'].includes(getNodeName(node))) {\n // @ts-ignore assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}\n\nfunction getScrollParents(node, list) {\n var _node$ownerDocument;\n\n if (list === void 0) {\n list = [];\n }\n\n const scrollParent = getScrollParent(node);\n const isBody = scrollParent === ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.body);\n const win = getWindow(scrollParent);\n const target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n const updatedList = list.concat(target);\n return isBody ? updatedList : // @ts-ignore: isBody tells us target will be an HTMLElement here\n updatedList.concat(getScrollParents(getParentNode(target)));\n}\n\nfunction contains(parent, child) {\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n\n do {\n // use `===` replace node.isSameNode()\n if (next && parent === next) {\n return true;\n } // @ts-ignore: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n }\n\n return false;\n}\n\nfunction getInnerBoundingClientRect(element) {\n const clientRect = getBoundingClientRect(element);\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n return {\n top,\n left,\n x: left,\n y: top,\n right: left + element.clientWidth,\n bottom: top + element.clientHeight,\n width: element.clientWidth,\n height: element.clientHeight\n };\n}\n\nfunction getClientRectFromClippingParent(element, clippingParent) {\n if (clippingParent === 'viewport') {\n return rectToClientRect(getViewportRect(element));\n }\n\n if (isElement(clippingParent)) {\n return getInnerBoundingClientRect(clippingParent);\n }\n\n return rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n const clippingParents = getScrollParents(getParentNode(element));\n const canEscapeClipping = ['absolute', 'fixed'].includes(getComputedStyle$1(element).position);\n const clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // @ts-ignore isElement check ensures we return Array<Element>\n\n\n return clippingParents.filter(clippingParent => isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body');\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nfunction getClippingClientRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary\n } = _ref;\n const mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n const clippingParents = [...mainClippingParents, rootBoundary];\n const firstClippingParent = clippingParents[0];\n const clippingRect = clippingParents.reduce((accRect, clippingParent) => {\n const rect = getClientRectFromClippingParent(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingParent(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}\n\nconst platform = {\n getElementRects: _ref => {\n let {\n reference,\n floating,\n strategy\n } = _ref;\n return {\n reference: getRectRelativeToOffsetParent(reference, getOffsetParent(floating), strategy),\n floating: { ...getDimensions(floating),\n x: 0,\n y: 0\n }\n };\n },\n convertOffsetParentRelativeRectToViewportRelativeRect: args => convertOffsetParentRelativeRectToViewportRelativeRect(args),\n getOffsetParent: _ref2 => {\n let {\n element\n } = _ref2;\n return getOffsetParent(element);\n },\n isElement: value => isElement(value),\n getDocumentElement: _ref3 => {\n let {\n element\n } = _ref3;\n return getDocumentElement(element);\n },\n getClippingClientRect: args => getClippingClientRect(args),\n getDimensions: _ref4 => {\n let {\n element\n } = _ref4;\n return getDimensions(element);\n },\n getClientRects: _ref5 => {\n let {\n element\n } = _ref5;\n return element.getClientRects();\n }\n};\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a reference element when it is given a certain CSS positioning\n * strategy.\n */\n\nconst computePosition = (reference, floating, options) => computePosition$1(reference, floating, {\n platform,\n ...options\n});\n\nexport { computePosition, getScrollParents };\n","function getTokens(element: Element, attr: string) {\n const value = element.getAttribute(attr)\n return value ? value.split(/\\s+/) : []\n}\n\nfunction setTokens(element: Element, attr: string, tokens: string[]) {\n element.setAttribute(attr, tokens.join(\" \"))\n}\n\n/**\n * Carefully adds a token to a space-separated attribute\n * Similar to classList, but for any attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/add\n */\nexport function add(element: Element, attr: string, token: string) {\n const tokens = getTokens(element, attr)\n\n if (!tokens.includes(token)) {\n setTokens(element, attr, tokens.concat(token))\n }\n}\n\n/**\n * Carefully removes a token from a space-separated attribute.\n * Similar to classList, but for any attribute.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList/remove\n */\nexport function remove(element: Element, attr: string, token: string) {\n const tokens = getTokens(element, attr)\n\n if (tokens.includes(token)) {\n setTokens(\n element,\n attr,\n tokens.filter(t => t !== token)\n )\n }\n}\n","import { LitElement, html, PropertyValues } from \"lit\"\nimport { customElement, property, state } from \"lit/decorators.js\"\nimport { computePosition, flip, shift, offset } from \"@floating-ui/dom\"\nimport type { Ref } from \"lit/directives/ref.js\"\n\nimport * as attr from \"../common/attribute.js\"\nimport { DraftComponentMixin } from \"../common/mixins/DraftComponentMixin.js\"\nimport { SlotController } from \"../common/controllers/SlotController.js\"\nimport componentStyle from \"../common/styles/Component.css\"\nimport style from \"./Tooltip.css\"\n\ntype FocusableElement = HTMLElement & { focusableRef?: Ref<Element> }\n\n/**\n * Tooltips are floating containers for displaying additional information\n * for the currently focused element. A tooltip can be useful when you want\n * to e.g. give a hint about an existing Command Menu shortcut.\n *\n * @status draft\n * @category overlay\n * @slot - The tooltip content\n * @slot shortcut - Optional slot that holds shortcut keys to access the subject\n */\n@customElement(\"nord-tooltip\")\nexport default class Tooltip extends DraftComponentMixin(LitElement) {\n static styles = [componentStyle, style]\n\n // tracks the last tooltip opened, so we can enforce only one is ever open at a time\n static lastOpened?: Tooltip\n\n private shortcutSlot = new SlotController(this, \"shortcut\")\n private targetElement!: FocusableElement\n\n /**\n * the proxy element is for cases where the targetElement is a web component,\n * and the WC has a focusable child in its shadow root e.g. a button component.\n * in this case, when the tooltip is shown, we inject the proxy into targetElement's shadow root\n * and wire up aria-describedby from the focusable element to the proxy.\n * when the tooltip is hidden, we remove the proxy and remove the aria-describedby relationship.\n */\n private proxy = document.createElement(\"span\")\n\n /**\n * Determines whether the tooltip is visible or not.\n */\n @state() visible: boolean = false\n\n /**\n * Control the position of the tooltip component.\n * When set to \"none\", the tooltip will be shown above\n * but accommodate for browser boundaries.\n */\n @property({ reflect: true }) position?: \"bottom\" | \"top\" | \"left\" | \"right\" = \"top\"\n\n /**\n * The tooltip role, set on the component by default.\n */\n @property({ reflect: true }) role = \"tooltip\"\n\n /**\n * The id for the active element to reference via aria-describedby.\n */\n @property({ reflect: true }) id: string = \"\"\n\n /**\n * The delay in milliseconds before the tooltip is opened.\n */\n @property({ reflect: true, type: Number }) delay: number = 300\n\n /**\n * Setting and updating the position of the tooltip\n */\n private updatePosition = () =>\n computePosition(this.targetElement, this, {\n placement: this.position,\n middleware: [\n shift({\n padding: 8,\n }),\n offset(8),\n flip(),\n ],\n }).then(({ x, y }) => {\n this.style.insetInlineStart = `${x}px`\n this.style.insetBlockStart = `${y}px`\n })\n\n private handleScroll = () => {\n if (this.visible) this.updatePosition()\n }\n\n /**\n * Show and hide the tooltip using inline styles\n */\n private showTooltip = () => {\n if (this.visible) {\n return\n }\n\n Tooltip.lastOpened?.hideTooltip()\n Tooltip.lastOpened = this\n\n this.updatePosition().then(() => {\n this.visible = true\n })\n }\n\n private hideTooltip = () => {\n this.visible = false\n }\n\n /**\n * Apply all event listeners\n */\n connectedCallback() {\n super.connectedCallback()\n\n const rootNode = this.getRootNode() as Document | ShadowRoot\n const selector = `[aria-describedby='${this.id}']`\n const target = rootNode.querySelector<FocusableElement>(selector)\n\n if (!target) {\n // eslint-disable-next-line no-console\n console.warn(\"NORD: tooltip found no element matching selector:\", selector)\n return\n }\n\n this.targetElement = target\n\n target.addEventListener(\"keydown\", this.hideOnEscape)\n target.addEventListener(\"mouseenter\", this.showTooltip)\n target.addEventListener(\"mouseleave\", this.hideTooltip)\n target.addEventListener(\"focus\", this.showTooltip)\n target.addEventListener(\"blur\", this.hideTooltip)\n\n window.addEventListener(\"resize\", this.updatePosition, { passive: true })\n window.addEventListener(\"scroll\", this.handleScroll, { passive: true })\n }\n\n /**\n * Remove all the event listeners\n */\n disconnectedCallback() {\n super.disconnectedCallback()\n\n if (!this.targetElement) {\n return\n }\n\n this.targetElement.removeEventListener(\"keydown\", this.hideOnEscape)\n this.targetElement.removeEventListener(\"mouseenter\", this.showTooltip)\n this.targetElement.removeEventListener(\"mouseleave\", this.hideTooltip)\n this.targetElement.removeEventListener(\"focus\", this.showTooltip)\n this.targetElement.removeEventListener(\"blur\", this.hideTooltip)\n window.removeEventListener(\"resize\", this.updatePosition)\n window.removeEventListener(\"scroll\", this.handleScroll)\n }\n\n /**\n * Check if the tooltip has an id, warn them if not\n */\n willUpdate(changedProperties: PropertyValues<this>) {\n if (changedProperties.has(\"id\") && !this.id) {\n // eslint-disable-next-line no-console\n console.warn(\"NORD: The tooltip requires an id attribute and value\")\n }\n\n if (changedProperties.has(\"visible\")) {\n if (this.visible) {\n this.addDescribedBy()\n\n this.style.transitionDelay = `${this.delay}ms`\n this.style.visibility = \"visible\"\n this.style.opacity = \"1\"\n } else {\n this.removeDescribedBy()\n\n this.style.transitionDelay = `0ms`\n this.style.visibility = \"hidden\"\n this.style.opacity = \"0\"\n }\n }\n }\n\n render() {\n return html`\n <div class=\"n-tooltip\">\n <slot></slot>\n <div class=\"n-tooltip-shortcut\" ?hidden=${this.shortcutSlot.isEmpty}>\n <slot class=\"n-tooltip-key\" name=\"shortcut\"></slot>\n </div>\n </div>\n `\n }\n\n private hideOnEscape = (e: KeyboardEvent) => {\n if (this.visible && e.key === \"Escape\") {\n this.hideTooltip()\n }\n }\n\n private addDescribedBy = () => {\n const focusable = this.targetElement?.focusableRef?.value\n\n if (focusable) {\n this.proxy.hidden = true\n this.proxy.id = this.id\n this.proxy.textContent = this.textContent\n\n focusable.insertAdjacentElement(\"afterend\", this.proxy)\n attr.add(focusable, \"aria-describedby\", this.id)\n }\n }\n\n private removeDescribedBy = () => {\n const focusable = this.targetElement?.focusableRef?.value\n\n if (focusable) {\n this.proxy.remove()\n attr.remove(focusable, \"aria-describedby\", this.id)\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"nord-tooltip\": Tooltip\n }\n}\n"],"names":["getBasePlacement","placement","split","getAlignment","getMainAxisFromPlacement","includes","getLengthFromAxis","axis","computeCoordsFromPlacement","_ref","reference","floating","commonX","x","width","commonY","y","height","coords","mainAxis","length","rectToClientRect","rect","top","left","right","bottom","async","detectOverflow","middlewareArguments","options","platform","rects","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","padding","paddingObject","expandPaddingObject","getSideObjectFromPadding","element","clippingClientRect","getClippingClientRect","isElement","contextElement","getDocumentElement","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","offsetParent","getOffsetParent","min","Math","max","within","min$1","value","max$1","hash$1","getOppositePlacement","replace","matched","hash","start","end","getOppositeAlignmentPlacement","flip","name","_middlewareData$flip","_middlewareData$flip2","middlewareData","initialPlacement","skip","checkMainAxis","crossAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","flipAlignment","detectOverflowOptions","basePlacement","oppositePlacement","getExpandedPlacements","placements","overflow","overflows","overflowsData","push","main","cross","isStart","mainAlignmentSide","getAlignmentSides","every","side","_middlewareData$flip$","_middlewareData$flip3","nextIndex","index","nextPlacement","data","reset","resetPlacement","_overflowsData$slice$","slice","sort","a","b","filter","reduce","acc","offset","fn","diffCoords","multiplier","rawValue","convertValueToCoords","isWindow","toString","getWindow","node","window","ownerDocument","defaultView","getComputedStyle$1","getComputedStyle","getNodeName","nodeName","toLowerCase","isHTMLElement","HTMLElement","Element","isShadowRoot","ShadowRoot","isScrollParent","overflowX","overflowY","test","isTableElement","isContainingBlock","isFirefox","navigator","userAgent","css","transform","perspective","contain","willChange","round","getBoundingClientRect","includeScale","clientRect","scaleX","scaleY","offsetWidth","offsetHeight","Node","document","documentElement","getNodeScroll","scrollLeft","pageXOffset","scrollTop","pageYOffset","getWindowScrollBarX","getRectRelativeToOffsetParent","isOffsetParentAnElement","isScaled","scroll","offsets","offsetRect","clientLeft","clientTop","getParentNode","assignedSlot","parentNode","host","getTrueOffsetParent","position","currentNode","getContainingBlock","getDimensions","getScrollParent","body","getScrollParents","list","_node$ownerDocument","scrollParent","isBody","win","target","concat","visualViewport","updatedList","getClientRectFromClippingParent","clippingParent","html","clientWidth","clientHeight","abs","innerWidth","scale","offsetLeft","offsetTop","getViewportRect","getInnerBoundingClientRect","_element$ownerDocumen","scrollWidth","scrollHeight","direction","getDocumentRect","getClippingParents","clippingParents","clipperElement","parent","child","rootNode","getRootNode","contains","next","getElementRects","args","_ref2","_ref3","firstClippingParent","clippingRect","accRect","_ref4","getClientRects","_ref5","computePosition","config","middleware","statefulPlacement","i","nextX","nextY","computePosition$1","getTokens","attr","getAttribute","setTokens","tokens","setAttribute","join","Tooltip","DraftComponentMixin","LitElement","constructor","this","SlotController","createElement","targetElement","limiter","mainAxisCoord","crossAxisCoord","maxSide","limitedCoords","then","style","insetInlineStart","insetBlockStart","visible","updatePosition","Tooltip_1","lastOpened","hideTooltip","e","key","focusable","focusableRef","proxy","hidden","id","textContent","insertAdjacentElement","token","attr.add","remove","t","attr.remove","connectedCallback","super","selector","querySelector","addEventListener","hideOnEscape","showTooltip","passive","handleScroll","console","warn","disconnectedCallback","removeEventListener","willUpdate","changedProperties","has","addDescribedBy","transitionDelay","delay","visibility","opacity","removeDescribedBy","render","shortcutSlot","isEmpty","componentStyle","__decorate","state","property","reflect","type","Number","customElement"],"mappings":"2SAAA,SAASA,EAAiBC,GACxB,OAAOA,EAAUC,MAAM,KAAK,GAG9B,SAASC,EAAaF,GACpB,OAAOA,EAAUC,MAAM,KAAK,GAG9B,SAASE,EAAyBH,GAChC,MAAO,CAAC,MAAO,UAAUI,SAASL,EAAiBC,IAAc,IAAM,IAGzE,SAASK,EAAkBC,GACzB,MAAgB,MAATA,EAAe,SAAW,QAGnC,SAASC,EAA2BC,GAClC,IAAIC,UACFA,EAASC,SACTA,EAAQV,UACRA,GACEQ,EACJ,MAAMG,EAAUF,EAAUG,EAAIH,EAAUI,MAAQ,EAAIH,EAASG,MAAQ,EAC/DC,EAAUL,EAAUM,EAAIN,EAAUO,OAAS,EAAIN,EAASM,OAAS,EACvE,IAAIC,EAEJ,OAAQlB,EAAiBC,IACvB,IAAK,MACHiB,EAAS,CACPL,EAAGD,EACHI,EAAGN,EAAUM,EAAIL,EAASM,QAE5B,MAEF,IAAK,SACHC,EAAS,CACPL,EAAGD,EACHI,EAAGN,EAAUM,EAAIN,EAAUO,QAE7B,MAEF,IAAK,QACHC,EAAS,CACPL,EAAGH,EAAUG,EAAIH,EAAUI,MAC3BE,EAAGD,GAEL,MAEF,IAAK,OACHG,EAAS,CACPL,EAAGH,EAAUG,EAAIF,EAASG,MAC1BE,EAAGD,GAEL,MAEF,QACEG,EAAS,CACPL,EAAGH,EAAUG,EACbG,EAAGN,EAAUM,GAInB,MAAMG,EAAWf,EAAyBH,GACpCmB,EAASd,EAAkBa,GAEjC,OAAQhB,EAAaF,IACnB,IAAK,QACHiB,EAAOC,GAAYD,E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,OAAO3G,CAAI,gFAGmCqD,KAAKuD,aAAaC,6EAnK3D5D,UAAS,CAAC6D,EAAgB/C,IAoBxBgD,GAARC,oCAO4BD,GAA5BE,EAAS,CAAEC,SAAS,qCAKQH,GAA5BE,EAAS,CAAEC,SAAS,iCAKQH,GAA5BE,EAAS,CAAEC,SAAS,+BAKsBH,GAA1CE,EAAS,CAAEC,SAAS,EAAMC,KAAMC,uCA3CdnE,SADpBoE,EAAc,iBACMpE,WAAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordhealth/components",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.56",
|
|
4
4
|
"description": "This package includes Nord Design System web components",
|
|
5
5
|
"author": "Nordhealth <support@nordhealth.design>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@custom-elements-manifest/analyzer": "^0.5.5",
|
|
39
|
-
"@nordhealth/css": "^1.0.0-alpha.
|
|
39
|
+
"@nordhealth/css": "^1.0.0-alpha.19",
|
|
40
40
|
"@nordhealth/fonts": "^2.0.13",
|
|
41
41
|
"@nordhealth/themes": "^3.0.7",
|
|
42
42
|
"@nordhealth/tokens": "^2.0.5",
|
|
@@ -159,5 +159,5 @@
|
|
|
159
159
|
}
|
|
160
160
|
]
|
|
161
161
|
},
|
|
162
|
-
"gitHead": "
|
|
162
|
+
"gitHead": "cb270a4b86ccf3f427b80de33e8be51a46ac3f9f"
|
|
163
163
|
}
|