@riverty/web-components 5.5.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +3 -3
  3. package/custom-elements.json +19 -15
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/r-accordion.cjs.entry.js +1 -1
  6. package/dist/cjs/r-button.cjs.entry.js +1 -1
  7. package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
  8. package/dist/cjs/r-hint_3.cjs.entry.js +135 -37
  9. package/dist/cjs/r-icon-button.cjs.entry.js +3 -3
  10. package/dist/cjs/r-icon.cjs.entry.js +2 -2
  11. package/dist/cjs/r-input-date.cjs.entry.js +6 -6
  12. package/dist/cjs/r-input-password.cjs.entry.js +2 -2
  13. package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
  14. package/dist/cjs/r-input.cjs.entry.js +3 -1
  15. package/dist/cjs/r-radio-group.cjs.entry.js +6 -6
  16. package/dist/cjs/r-select.cjs.entry.js +2 -2
  17. package/dist/cjs/r-toast.cjs.entry.js +8 -9
  18. package/dist/cjs/web-components.cjs.js +1 -1
  19. package/dist/collection/components/accordion/accordion.js +1 -2
  20. package/dist/collection/components/button/button.js +1 -2
  21. package/dist/collection/components/checkbox/checkbox.js +4 -5
  22. package/dist/collection/components/icon/bundled-icons/riverty-kit.json +1 -1
  23. package/dist/collection/components/icon/icon.js +2 -2
  24. package/dist/collection/components/icon/riverty-kit.js +1 -1
  25. package/dist/collection/components/icon-button/icon-button.js +3 -4
  26. package/dist/collection/components/input/input.js +22 -1
  27. package/dist/collection/components/input-date/input-date.js +7 -7
  28. package/dist/collection/components/input-password/input-password.js +3 -3
  29. package/dist/collection/components/input-phone-number/input-phone-number.js +5 -5
  30. package/dist/collection/components/label/label.js +4 -4
  31. package/dist/collection/components/radio-group/radio-group.js +7 -7
  32. package/dist/collection/components/select/select.js +3 -4
  33. package/dist/collection/components/textarea/textarea.js +1 -1
  34. package/dist/collection/components/toast/toast.js +10 -11
  35. package/dist/collection/components/tooltip/tooltip.css +6 -71
  36. package/dist/collection/components/tooltip/tooltip.js +135 -33
  37. package/dist/esm/loader.js +1 -1
  38. package/dist/esm/r-accordion.entry.js +1 -1
  39. package/dist/esm/r-button.entry.js +1 -1
  40. package/dist/esm/r-checkbox.entry.js +4 -4
  41. package/dist/esm/r-hint_3.entry.js +135 -37
  42. package/dist/esm/r-icon-button.entry.js +3 -3
  43. package/dist/esm/r-icon.entry.js +2 -2
  44. package/dist/esm/r-input-date.entry.js +6 -6
  45. package/dist/esm/r-input-password.entry.js +2 -2
  46. package/dist/esm/r-input-phone-number.entry.js +4 -4
  47. package/dist/esm/r-input.entry.js +3 -1
  48. package/dist/esm/r-radio-group.entry.js +6 -6
  49. package/dist/esm/r-select.entry.js +2 -2
  50. package/dist/esm/r-toast.entry.js +8 -9
  51. package/dist/esm/web-components.js +1 -1
  52. package/dist/types/components/accordion/accordion.d.ts +0 -1
  53. package/dist/types/components/button/button.d.ts +0 -1
  54. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  55. package/dist/types/components/icon/exports.d.ts +1 -0
  56. package/dist/types/components/icon/icon-data.d.ts +1 -0
  57. package/dist/types/components/icon/icon.d.ts +1 -1
  58. package/dist/types/components/icon/riverty-kit.d.ts +1 -0
  59. package/dist/types/components/icon-button/icon-button.d.ts +0 -1
  60. package/dist/types/components/input/input.d.ts +5 -0
  61. package/dist/types/components/input-date/input-date.d.ts +1 -1
  62. package/dist/types/components/input-password/input-password.d.ts +1 -1
  63. package/dist/types/components/input-phone-number/input-phone-number.d.ts +1 -1
  64. package/dist/types/components/label/label.d.ts +1 -1
  65. package/dist/types/components/radio-group/radio-group.d.ts +1 -1
  66. package/dist/types/components/select/select.d.ts +1 -2
  67. package/dist/types/components/textarea/textarea.d.ts +3 -3
  68. package/dist/types/components/toast/toast.d.ts +1 -3
  69. package/dist/types/components/tooltip/tooltip.d.ts +12 -4
  70. package/dist/types/components.d.ts +28 -40
  71. package/dist/web-components/bundled-icons/riverty-kit.json +1 -1
  72. package/dist/web-components/{p-7fccc301.entry.js → p-1ae69897.entry.js} +1 -1
  73. package/dist/web-components/p-29a1e75f.entry.js +1 -0
  74. package/dist/web-components/{p-43eff76a.entry.js → p-44be9992.entry.js} +1 -1
  75. package/dist/web-components/{p-0735fd75.entry.js → p-72c0c0d8.entry.js} +1 -1
  76. package/dist/web-components/{p-28718c50.entry.js → p-8028c2a9.entry.js} +1 -1
  77. package/dist/web-components/{p-00eb6986.entry.js → p-828cb164.entry.js} +1 -1
  78. package/dist/web-components/{p-a683612d.entry.js → p-96ddeb7f.entry.js} +1 -1
  79. package/dist/web-components/{p-24bbf3b6.entry.js → p-9b08e9ee.entry.js} +1 -1
  80. package/dist/web-components/{p-99ba15d9.entry.js → p-9e50120b.entry.js} +1 -1
  81. package/dist/web-components/{p-2265dae1.entry.js → p-a5be3395.entry.js} +1 -1
  82. package/dist/web-components/p-b2cec978.entry.js +1 -0
  83. package/dist/web-components/{p-ad4292d8.entry.js → p-d3ff65b0.entry.js} +1 -1
  84. package/dist/web-components/p-f770e22b.entry.js +1 -0
  85. package/dist/web-components/web-components.esm.js +1 -1
  86. package/package.json +2 -1
  87. package/dist/web-components/p-0f4eea22.entry.js +0 -1
  88. package/dist/web-components/p-c09a863b.entry.js +0 -1
  89. package/dist/web-components/p-f22696e0.entry.js +0 -1
@@ -329,12 +329,12 @@ export class RadioGroup {
329
329
  'tooltip-icon': tooltipIcon,
330
330
  'tooltip-icon-color': tooltipIconColor
331
331
  };
332
- return (h(Host, { key: '899b3d8d509fa3d6f37a81279e6fc58b98e1314c' }, h("div", { key: 'dc1c47c966aac6ebaab2b8ec9061342b6c1e81e3', class: "r-radio-group", onClick: this.onLabelClick }, label &&
333
- h("div", { key: '5b39dcc6952d971f8c03e2dab554b25bb1be3ccf', class: "r-radio-group--label-container" }, h("r-label", Object.assign({ key: '7f13b1571bccb986a0e36903399c8f15536de539', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, labelAttr), label), h("slot", { key: 'bfd151ce64e670722a6a1f3254763b6f514c99ab', name: "popover" })), hint &&
334
- h("r-hint", { key: 'edb8bbe44470579a5638e5dbee0b7b843cc998b4', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: '1727429f1c36de0fd13567af448aed7c84f7c7b1', class: "r-radio-group--content" }, h("slot", { key: 'f7d712be6351c44e5f072f85a407b5e73837b48b' }))), invalid && error &&
335
- h("r-hint", { key: '71feb492e87164e485bb10a0e856d86ef3c57a7d', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
336
- h("r-hint", { key: '0ddc4636948329a97e8140c9efc267a4a054ff3b', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, this.customErrorMessage || this.validityMessage), this.valid && this.validMessage && this.showValid &&
337
- h("r-hint", { key: 'e7cfa4eccf754e90ad30b22b24dd9f2ce1fcadc8', role: "alert", variant: "success" }, this.validMessage)));
332
+ return (h(Host, { key: '0a209644dc2a122c793a38e1f624eccf3ca0b884' }, h("div", { key: 'b4d8dbe5fb3d1e11d87a7902addcc801852e3554', class: "r-radio-group", onClick: this.onLabelClick }, label &&
333
+ h("div", { key: 'c77bc88a07ddad6f45671c869b99b3fa5c4d0e2a', class: "r-radio-group--label-container" }, h("r-label", Object.assign({ key: '1dbfc739da13dbae04481912203a53837941b8e0', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, labelAttr), label), h("slot", { key: '2f1b6a50b2f7d7b1becef2cc95a4d7f6a26d970d', name: "popover" })), hint &&
334
+ h("r-hint", { key: 'c3c4310d3550d17d34ee26fa308cb3957a19dfd3', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: '891beaea14680a2d629fa59f4597a968b8c2b695', class: "r-radio-group--content" }, h("slot", { key: '1d107723f7c363564e488309fdcb586ff43046ff' }))), invalid && error &&
335
+ h("r-hint", { key: 'de64c7c8a42136b7ac3ca93536a7654dc1d274fa', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
336
+ h("r-hint", { key: 'c40eba0d5b6c47276ca91ca1631948d11f950c86', "aria-live": "polite", id: `${uniqueId}-message`, role: "alert", variant: "error" }, this.customErrorMessage || this.validityMessage), this.valid && this.validMessage && this.showValid &&
337
+ h("r-hint", { key: '0b13cc722509fe66231f18bd2783b29b798882ef', role: "alert", variant: "success" }, this.validMessage)));
338
338
  }
339
339
  static get is() { return "r-radio-group"; }
340
340
  static get encapsulation() { return "shadow"; }
@@ -540,7 +540,7 @@ export class RadioGroup {
540
540
  "optional": true,
541
541
  "docs": {
542
542
  "tags": [],
543
- "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nChange color of an icon that triggers tooltip to one of the [Riverty color tokens](https://riverty.design/tokens/#colors)"
543
+ "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nChange color of an icon that triggers tooltip to one of the Riverty color tokens"
544
544
  },
545
545
  "getter": false,
546
546
  "setter": false,
@@ -6,7 +6,6 @@ import StyleObserver from "style-observer";
6
6
  *
7
7
  * Overall behavior is based on native `<select>`
8
8
  *
9
- * [Docs](https://riverty.design/components/select)
10
9
  */
11
10
  export class Select {
12
11
  constructor() {
@@ -1005,8 +1004,8 @@ export class Select {
1005
1004
  disabled,
1006
1005
  required: isRequired
1007
1006
  };
1008
- return (h(Host, { key: 'aca9ddac308a41221f08de7fde92f45fcd89162f', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}` }, h("div", { key: '34c00c70c0b73cdd7afdcd65f175a94e82c900d2', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '5a2b30341687b152eb17c2fc5ca2f65b1fda886f', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: '10021c02cfe8a697ee3a0e452e0052044f2b80a7', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'cc7173f5b427c9fca7e08a12552227d3f20ad64c' }, labelAttr), label)), h("slot", { key: '625e1bd9f1fa11950ff75e1875e03510f55022c0', name: "popover" })), hint &&
1009
- h("r-hint", { key: '6d22db79a4375ddd901f5ea6b25d9c456e8f1ab2', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: 'a243a731bdd150386ea47ad0897831b37eed6621', class: "r-select" }, h("select", Object.assign({ key: 'e1878ed06636fad3768d8b4b1f4a944d30730346', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'b47cd423033129e827a99f8fcff39173f4c74ed9', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '04db58929d97226614d344f7f419c3e8aa7e250d', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'b23380c2c75c33e6a8a99737189c43400e29940b', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '83e215daafbd8909f9788e8918691b08417a5f2d', onSlotchange: this.handleSlotChange })))), h("div", { key: '57acdd7994fa67813e60641493e99f29afafcaf4', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: 'f14bc3026b6bee74b1192f37af64381958c0c87b', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage, this.hasValidationSuccess && this.validMessage))));
1007
+ return (h(Host, { key: '4faff470b9b6b8b7d61e3076e92791ef59337a48', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}` }, h("div", { key: '0e171d25d2210017b79c8e4298e24335087f0528', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: 'd23c28cea13b76464697eadca26ba34a3d1009cd', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: '5eed04830b9339a2c274f79eda156fa48eaa8249', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: '85c9eecfbff6e3d5412c99faafc142bf495aedb4' }, labelAttr), label)), h("slot", { key: '72a93bf0defe9a3f41d7b7be5cf3415e95874141', name: "popover" })), hint &&
1008
+ h("r-hint", { key: 'd0b4a4bd2ca88ba642285dc85920d57f73298bb5', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: 'd859fdbd5f21ab2ec625712e5704f7e594ecff05', class: "r-select" }, h("select", Object.assign({ key: '388cf0c3f3234c2547aec144060f0d700df2fa57', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: 'e2409bf6c794e8360089fc113144dfcd7dffbbe2', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '8b813027f707bf37ccdf022c852838eb4801e03e', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'b6aa6ab7eb6390b05ac6d475546ca9647edb1a02', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: 'e84ce6b5e610147962c25a930967e1554a91f2a1', onSlotchange: this.handleSlotChange })))), h("div", { key: '92a91fc11ac5c98330bd677a97ab76a88af48f3b', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: 'c23f0cc7347fb7ceb61c4696d527534ececec403', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage, this.hasValidationSuccess && this.validMessage))));
1010
1009
  }
1011
1010
  static get is() { return "r-select"; }
1012
1011
  static get encapsulation() { return "shadow"; }
@@ -1193,7 +1192,7 @@ export class Select {
1193
1192
  "optional": true,
1194
1193
  "docs": {
1195
1194
  "tags": [],
1196
- "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nChange color of an icon that triggers tooltip to one of the [Riverty color tokens](https://riverty.design/tokens/#colors)"
1195
+ "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nChange color of an icon that triggers tooltip to one of the Riverty color tokens."
1197
1196
  },
1198
1197
  "getter": false,
1199
1198
  "setter": false,
@@ -885,7 +885,7 @@ export class RTextarea {
885
885
  "optional": true,
886
886
  "docs": {
887
887
  "tags": [],
888
- "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.) * Specifies the color of the tooltip icon\nfrom [Riverty color tokens](https://riverty.design/tokens/#colors) \ndisplayed alongside the label."
888
+ "text": "_DEPRECATED_ (Use popover slot instead. This property will be removed in November 2025 release.)\nSpecifies the color of the tooltip icon from Riverty color tokens.\nDisplayed alongside the label."
889
889
  },
890
890
  "getter": false,
891
891
  "setter": false,
@@ -10,7 +10,6 @@ export class Toast {
10
10
  * @default 'info' */
11
11
  this.status = 'info';
12
12
  /** Specifies an optional icon for the trailing slot of the dialog.
13
- * For options check [Riverty Icons](https://riverty.design/components/icon)
14
13
  * @default 'cross'
15
14
  * */
16
15
  this.trailingIcon = 'cross';
@@ -158,14 +157,14 @@ export class Toast {
158
157
  name: trailingIcon,
159
158
  size: 'm'
160
159
  };
161
- return (h(Host, { key: 'd89f4e9245d32cd1f622beed7c053442c1977e7f', id: this.uniqueId, role: "alert", "aria-live": `${this.isError ? 'assertive' : 'polite'}`, "data-visually-hidden": `${this.isOpen ? 'false' : 'true'}` }, h("div", { key: '5292d419fa8122136b8694a47140418a2c3bbf1c', class: "r-toast" }, this.hasLeading &&
162
- h("div", { key: '39d348a25e1dffb2c0dc6c550d94e0ee5a791089', class: "r-toast--leading" }, this.hasLeadingSlot && h("slot", { key: '92693e79818ea57423bd56364bad96c4e85a8fb7', name: "leading" }), this.hasLeadingIcon && h("r-icon", Object.assign({ key: 'a6c8491b3bf1af387c228ab110775d380dc33afd', class: "r-toast--leading-icon" }, leadingIconAttrs))), h("div", { key: '78e914e294adb359116045937146caaf9f82b4e6', class: "r-toast--main" }, this.hasHeadline &&
163
- h("h2", { key: 'f33e94e74a2f93dc7bfb28f83120d79f07d3b254', class: "r-toast--headline" }, h("slot", { key: '3e61d7eb3b319dd00205bd010074edd1f2f809ba', name: "headline" }, headline)), this.hasContent &&
164
- h("div", { key: '6d098697465a8c84c5dca4abcf5b7eab04ff4a23', class: "r-toast--content r-typography" }, h("slot", { key: '8ad7f7ce97edcbd601a7e08b48a2cd766d32e8bf', onSlotchange: this.handleSlotChange })), this.hasAction &&
165
- h("div", { key: '7b0df2b4f747b7436ddaa34c87b876d5d8023921', class: "r-toast--action" }, h("slot", { key: '9811a95fc1261f7565d31b2a54ca97a9a36ec236', name: "action" }, this.hasActionLink &&
166
- h("a", Object.assign({ key: 'bbbd7f3f63da45f374d40152269fe68b359e298d', class: "r-toast--action-link" }, actionAttrs), action)))), this.hasTrailing &&
167
- h("div", { key: '6a000a3e1e6dfbbbfe83b64ad550b39df030bef3', class: "r-toast--trailing" }, this.hasTrailingSlot && h("slot", { key: '90ab154036ef2206394d1c43ad48a4973eec520f', name: "trailing" }), this.isDismissManual &&
168
- h("r-icon-button", Object.assign({ key: '1433d0151fb3673d98b51f476e8bbe43d8f7ebd6' }, trailingIconAttrs, { class: "r-toast--trailing-button", onClick: this.handleTrailingButtonClick, "aria-label": this.dismissLabel }), h("slot", { key: 'c47c59fbc4097fdaf4f3a4f27beab833dcef4f0e', name: "dismiss" }))))));
160
+ return (h(Host, { key: 'ecccac165e35c1d3479db71c8da83d676592a428', id: this.uniqueId, role: "alert", "aria-live": `${this.isError ? 'assertive' : 'polite'}`, "data-visually-hidden": `${this.isOpen ? 'false' : 'true'}` }, h("div", { key: '18c27be9270236a6a4ca4de0bd10a64e6dd5532f', class: "r-toast" }, this.hasLeading &&
161
+ h("div", { key: '16d69b95a0b843efeec05449d71762abc3bb55be', class: "r-toast--leading" }, this.hasLeadingSlot && h("slot", { key: 'acfa65e5150af0b2e2a06752e9d4b329bebebf1f', name: "leading" }), this.hasLeadingIcon && h("r-icon", Object.assign({ key: 'ecaddd2b51d91276e2eb20a1e992e0eeea541668', class: "r-toast--leading-icon" }, leadingIconAttrs))), h("div", { key: '7cc6d9af5dfc4cf78a10071fb97e4e280ddbe8c4', class: "r-toast--main" }, this.hasHeadline &&
162
+ h("h2", { key: '88f4dae62b41098d730fb05f731ddf6dace827fd', class: "r-toast--headline" }, h("slot", { key: '93beeba62659efa72d5d6254ea63f9da23666936', name: "headline" }, headline)), this.hasContent &&
163
+ h("div", { key: 'b38a7111b06b93eb93141bf470a74e4ccbc701be', class: "r-toast--content r-typography" }, h("slot", { key: '8d734d4d579be0cee0a512a1c8017f7c11f6a4d7', onSlotchange: this.handleSlotChange })), this.hasAction &&
164
+ h("div", { key: '8cd04075e9c01e8478f0cd443d0711f23f9b072a', class: "r-toast--action" }, h("slot", { key: '788ec92aa6dd9141500004fd2f7bf99423cb6a8d', name: "action" }, this.hasActionLink &&
165
+ h("a", Object.assign({ key: 'd1ed349333ac36d5ef64a00f4b86055c6593567a', class: "r-toast--action-link" }, actionAttrs), action)))), this.hasTrailing &&
166
+ h("div", { key: '6fac76c40a13c7ad0ad417f7ea4793df130258db', class: "r-toast--trailing" }, this.hasTrailingSlot && h("slot", { key: '96a11d4d0a2fed9303cbe6cac872504b177e8143', name: "trailing" }), this.isDismissManual &&
167
+ h("r-icon-button", Object.assign({ key: 'e1a913e0cfdebb82cd5b657a8c6847be4fbe9bf4' }, trailingIconAttrs, { class: "r-toast--trailing-button", onClick: this.handleTrailingButtonClick, "aria-label": this.dismissLabel }), h("slot", { key: '1df0a1d761630c7c6b004078b0e9db5d33179a0e', name: "dismiss" }))))));
169
168
  }
170
169
  static get is() { return "r-toast"; }
171
170
  static get encapsulation() { return "shadow"; }
@@ -249,7 +248,7 @@ export class Toast {
249
248
  "optional": true,
250
249
  "docs": {
251
250
  "tags": [],
252
- "text": "Specifies an optional icon for the leading slot of the dialog.\nFor options check [Riverty Icons](https://riverty.design/components/icon)"
251
+ "text": "Specifies an optional icon for the leading slot of the dialog."
253
252
  },
254
253
  "getter": false,
255
254
  "setter": false,
@@ -277,7 +276,7 @@ export class Toast {
277
276
  "name": "default",
278
277
  "text": "'cross'"
279
278
  }],
280
- "text": "Specifies an optional icon for the trailing slot of the dialog.\nFor options check [Riverty Icons](https://riverty.design/components/icon)"
279
+ "text": "Specifies an optional icon for the trailing slot of the dialog."
281
280
  },
282
281
  "getter": false,
283
282
  "setter": false,
@@ -1,13 +1,8 @@
1
1
  :host {
2
2
  display: inline-block;
3
3
  --r-tooltip--position: relative;
4
- --r-tooltip--content--position: absolute;
5
- --r-tooltip--content--top: auto;
6
- --r-tooltip--content--right: auto;
7
- --r-tooltip--content--bottom: auto;
8
- --r-tooltip--content--left: auto;
4
+ --r-tooltip--content--position: fixed;
9
5
  --r-tooltip--content--display: none;
10
- --r-tooltip--content--content: attr(tooltip-data);
11
6
  --r-tooltip--content--color: var(--r-text-inverse);
12
7
  --r-tooltip--content--background-color: var(--r-background-inverse);
13
8
  --r-tooltip--content--font-family: var(--r-font-family-text);
@@ -18,22 +13,17 @@
18
13
  --r-tooltip--content--max-width: 300px;
19
14
  --r-tooltip--content--min-height: 32px;
20
15
  --r-tooltip--content--padding: var(--r-spacing-050) var(--r-spacing-100);
21
- --r-tooltip--content--width: max-content;
16
+ --r-tooltip--content--width: max-width;
22
17
  --r-tooltip--content--word-break: break-word;
23
18
  --r-tooltip--content--box-sizing: border-box;
24
19
  --r-tooltip--content--justify-content: center;
25
20
  --r-tooltip--content--align-items: center;
26
21
  --r-tooltip--content--z-index: 0;
27
- --r-tooltip--content--transform: none;
28
22
  --r-tooltip--arrow--display: none;
29
- --r-tooltip--arrow--position: absolute;
30
- --r-tooltip--arrow--top: auto;
31
- --r-tooltip--arrow--right: auto;
32
- --r-tooltip--arrow--bottom: auto;
33
- --r-tooltip--arrow--left: 50%;
23
+ --r-tooltip--arrow--position: fixed;
34
24
  --r-tooltip--arrow--width: 12px;
35
- --r-tooltip--arrow--height: 6px;
36
- --r-tooltip--arrow--transform: translateX(-50%) rotate(180deg);
25
+ --r-tooltip--arrow--height: 12px;
26
+ --r-tooltip--arrow--transform: rotate(180deg);
37
27
  --r-tooltip--arrow--inner-content: "";
38
28
  --r-tooltip--arrow--inner--width: 12px;
39
29
  --r-tooltip--arrow--inner--height: 6px;
@@ -46,63 +36,18 @@
46
36
  display: contents;
47
37
  }
48
38
 
49
- :host([data-arrow-position=left]) {
50
- --r-tooltip--content--left: - var(--r-spacing-100);
51
- }
52
-
53
- :host([data-arrow-position=right]) {
54
- --r-tooltip--content--right: - var(--r-spacing-100);
55
- }
56
-
57
- :host([data-arrow-position=center]) {
58
- --r-tooltip--content--left: 50%;
59
- --r-tooltip--content--transform: translate(-50%);
60
- }
61
-
62
- :host([data-position=top]) {
63
- --r-tooltip--content--bottom: calc(100% + var(--r-spacing-075));
64
- --r-tooltip--arrow--bottom: 100%;
65
- --r-tooltip--arrow--height: calc(var(--r-tooltip--arrow--inner--height) + 1.5 * var(--r-spacing-025));
66
- }
67
-
68
- :host([data-position=top][data-arrow-position=right]) {
69
- --r-tooltip--content--right: 0;
70
- --r-tooltip--content--left: unset;
71
- }
72
-
73
39
  :host([data-position=bottom]) {
74
- --r-tooltip--content--top: calc(100% + var(--r-spacing-075));
75
- --r-tooltip--arrow--top: 100%;
76
- --r-tooltip--arrow--height: calc(var(--r-tooltip--arrow--inner--height) + 1.6 * var(--r-spacing-025));
77
- --r-tooltip--arrow--transform: translateX(-50%) rotate(0);
78
- }
79
-
80
- :host([data-position=bottom][data-arrow-position=right]) {
81
- --r-tooltip--content--right: 0;
82
- --r-tooltip--content--left: unset;
40
+ --r-tooltip--arrow--transform: rotate(0);
83
41
  }
84
42
 
85
43
  :host([data-position=right]) {
86
- --r-tooltip--content--left: calc(100% + var(--r-tooltip--arrow--height) + 0.1875rem);
87
- --r-tooltip--arrow--left: 100%;
88
44
  --r-tooltip--arrow--transform: rotate(270deg);
89
45
  }
90
46
 
91
47
  :host([data-position=left]) {
92
- --r-tooltip--content--right: calc(100% + var(--r-tooltip--arrow--height) + 0.1875rem);
93
- --r-tooltip--content--left: unset;
94
- --r-tooltip--arrow--right: 100%;
95
- --r-tooltip--arrow--left: unset;
96
48
  --r-tooltip--arrow--transform: rotate(90deg);
97
49
  }
98
50
 
99
- :host([data-position=right]),
100
- :host([data-position=left]) {
101
- --r-tooltip--content--top: 50%;
102
- --r-tooltip--content--transform: translateY(-50%);
103
- --r-tooltip--arrow--top: calc(50% - calc(var(--r-tooltip--arrow--height)/2));
104
- }
105
-
106
51
  .r-tooltip {
107
52
  position: var(--r-tooltip--position);
108
53
  }
@@ -126,12 +71,7 @@
126
71
  }
127
72
  .r-tooltip--content {
128
73
  position: var(--r-tooltip--content--position);
129
- top: var(--r-tooltip--content--top);
130
- right: var(--r-tooltip--content--right);
131
- bottom: var(--r-tooltip--content--bottom);
132
- left: var(--r-tooltip--content--left);
133
74
  display: var(--r-tooltip--content--display);
134
- content: var(--r-tooltip--content--content);
135
75
  color: var(--r-tooltip--content--color);
136
76
  background-color: var(--r-tooltip--content--background-color);
137
77
  font-family: var(--r-tooltip--content--font-family);
@@ -146,17 +86,12 @@
146
86
  word-break: var(--r-tooltip--content--word-break);
147
87
  box-sizing: var(--r-tooltip--content--box-sizing);
148
88
  z-index: var(--r-tooltip--content--z-index);
149
- transform: var(--r-tooltip--content--transform);
150
89
  }
151
90
  .r-tooltip--arrow {
152
91
  display: var(--r-tooltip--arrow--display);
153
92
  position: var(--r-tooltip--arrow--position);
154
93
  width: var(--r-tooltip--arrow--width);
155
94
  height: var(--r-tooltip--arrow--height);
156
- top: var(--r-tooltip--arrow--top);
157
- right: var(--r-tooltip--arrow--right);
158
- bottom: var(--r-tooltip--arrow--bottom);
159
- left: var(--r-tooltip--arrow--left);
160
95
  transform: var(--r-tooltip--arrow--transform);
161
96
  }
162
97
  .r-tooltip--arrow:after {
@@ -9,6 +9,75 @@ export class Tooltip {
9
9
  this.arrowPositionState = 'left';
10
10
  this.isShown = false;
11
11
  this.uniqueId = `r-tooltip-${Date.now().toString(32)}${Math.random().toString(32)}`.replace(/\./g, '');
12
+ this.getOffsetLeft = (arrowPosition) => {
13
+ var _a, _b, _c;
14
+ const offsetLeft = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width));
15
+ switch (arrowPosition) {
16
+ case 'center':
17
+ return offsetLeft / 2;
18
+ case 'right':
19
+ return offsetLeft;
20
+ default:
21
+ return 0;
22
+ }
23
+ };
24
+ this.alignTooltipPosition = () => {
25
+ var _a, _b, _c, _d, _e, _f, _g;
26
+ const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
27
+ const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
28
+ const hostHeight = ((_e = (_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height) + this.arrowHeight || 0;
29
+ const hostWidth = ((_g = (_f = this.element) === null || _f === void 0 ? void 0 : _f.getBoundingClientRect()) === null || _g === void 0 ? void 0 : _g.width) + this.arrowWidth || 0;
30
+ switch (this.positionState) {
31
+ case 'top':
32
+ this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
33
+ break;
34
+ case 'bottom':
35
+ this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
36
+ break;
37
+ case 'left':
38
+ this.alignPosition(this.tooltip, -this.tooltipContainerWidth, -offsetHeight);
39
+ break;
40
+ case 'right':
41
+ this.alignPosition(this.tooltip, hostWidth, -offsetHeight);
42
+ break;
43
+ default:
44
+ break;
45
+ }
46
+ };
47
+ this.alignArrowPosition = () => {
48
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
49
+ const offsetHeight = Math.abs(((_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) - ((_c = (_b = this.arrow) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.height)) / 2;
50
+ const offsetLeft = Math.abs(((_d = this.element) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect().width) - ((_f = (_e = this.arrow) === null || _e === void 0 ? void 0 : _e.getBoundingClientRect()) === null || _f === void 0 ? void 0 : _f.width)) / 2;
51
+ const hostHeight = ((_h = (_g = this.element) === null || _g === void 0 ? void 0 : _g.getBoundingClientRect()) === null || _h === void 0 ? void 0 : _h.height) || 0;
52
+ const hostWidth = ((_k = (_j = this.element) === null || _j === void 0 ? void 0 : _j.getBoundingClientRect()) === null || _k === void 0 ? void 0 : _k.width) || 0;
53
+ switch (this.positionState) {
54
+ case 'top':
55
+ this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
56
+ break;
57
+ case 'bottom':
58
+ this.alignPosition(this.arrow, offsetLeft, hostHeight);
59
+ break;
60
+ case 'left':
61
+ this.alignPosition(this.arrow, -this.arrowWidth, offsetHeight);
62
+ break;
63
+ case 'right':
64
+ this.alignPosition(this.arrow, hostWidth, offsetHeight);
65
+ break;
66
+ default:
67
+ break;
68
+ }
69
+ };
70
+ this.alignPosition = (element, offsetLeft, offsetTop) => {
71
+ var _a;
72
+ if (!element) {
73
+ return;
74
+ }
75
+ let elementOffset = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
76
+ let left = elementOffset.left + offsetLeft;
77
+ let top = elementOffset.top + offsetTop;
78
+ element.style.left = `${left > 0 ? left : 0}px`;
79
+ element.style.top = `${top}px`;
80
+ };
12
81
  /**
13
82
  * Listen on hovering tooltip element and update tooltip position if needed
14
83
  */
@@ -26,11 +95,22 @@ export class Tooltip {
26
95
  };
27
96
  this.showTooltip = () => {
28
97
  this.isShown = true;
29
- this.tooltipValue.classList.add('r-tooltip--content--visible');
98
+ this.tooltip.classList.add('r-tooltip--content--visible');
30
99
  };
31
100
  this.removeTooltip = () => {
32
101
  this.isShown = false;
33
- this.tooltipValue.classList.remove('r-tooltip--content--visible');
102
+ this.tooltip.style.width = 'max-content';
103
+ this.tooltip.classList.remove('r-tooltip--content--visible');
104
+ };
105
+ this.handleScroll = () => {
106
+ if (!this.isShown) {
107
+ return;
108
+ }
109
+ if (!this.isOnScreen) {
110
+ this.removeTooltip();
111
+ return;
112
+ }
113
+ this.setCorrectPosition();
34
114
  };
35
115
  }
36
116
  /**
@@ -59,30 +139,47 @@ export class Tooltip {
59
139
  this.removeTooltip();
60
140
  }
61
141
  }
62
- /**
63
- * Tooltip element value
64
- */
65
- get tooltipValue() {
66
- var _a, _b;
67
- return (_b = (_a = this.element) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.getElementById(this.uniqueId);
68
- }
69
142
  /**
70
143
  * Parent with non visible overflow
71
144
  */
72
145
  get overflowedParent() {
73
146
  return this.findOverflowParent(this.element.parentElement);
74
147
  }
148
+ get arrowWidth() {
149
+ var _a;
150
+ return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width) || 0;
151
+ }
152
+ get arrowHeight() {
153
+ var _a;
154
+ return ((_a = this.arrow) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().height) || 0;
155
+ }
156
+ get tooltipContainerWidth() {
157
+ var _a, _b;
158
+ return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width) + this.arrowWidth || 0;
159
+ }
160
+ get tooltipContainerHeight() {
161
+ var _a, _b;
162
+ return ((_b = (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.height) + this.arrowHeight || 0;
163
+ }
75
164
  /**
76
165
  * Available space at the top
77
166
  */
78
167
  get top() {
79
- return !this.overflowedParent ? this.element.getBoundingClientRect().top : Math.abs(this.overflowedParent.getBoundingClientRect().top - this.element.getBoundingClientRect().top);
168
+ return this.element.getBoundingClientRect().top;
80
169
  }
81
170
  /**
82
171
  * Available space on the left
83
172
  */
84
173
  get left() {
85
- return !this.overflowedParent ? this.element.getBoundingClientRect().left : Math.abs(this.overflowedParent.getBoundingClientRect().left - this.element.getBoundingClientRect().left);
174
+ return this.element.getBoundingClientRect().left;
175
+ }
176
+ get isOnScreen() {
177
+ const parent = this.overflowedParent || document.documentElement;
178
+ const parentRect = parent.getBoundingClientRect();
179
+ const elementRect = this.element.getBoundingClientRect();
180
+ const isVerticallyVisible = elementRect.top >= parentRect.top && elementRect.bottom <= parentRect.bottom;
181
+ const isHorizontallyVisible = elementRect.left >= parentRect.left && elementRect.right <= parentRect.right;
182
+ return isVerticallyVisible && isHorizontallyVisible;
86
183
  }
87
184
  /**
88
185
  * Available space at the bottom
@@ -91,7 +188,7 @@ export class Tooltip {
91
188
  function calculateBottomSpace(element) {
92
189
  return window.innerHeight - element.getBoundingClientRect().top - element.getBoundingClientRect().height;
93
190
  }
94
- return !this.overflowedParent ? calculateBottomSpace(this.element) : Math.abs(calculateBottomSpace(this.overflowedParent) - calculateBottomSpace(this.element));
191
+ return calculateBottomSpace(this.element);
95
192
  }
96
193
  /**
97
194
  * Available space on the right
@@ -100,35 +197,31 @@ export class Tooltip {
100
197
  function calculateRightSpace(element) {
101
198
  return window.innerWidth - element.getBoundingClientRect().left - element.getBoundingClientRect().width;
102
199
  }
103
- return !this.overflowedParent ? calculateRightSpace(this.element) : Math.abs(calculateRightSpace(this.overflowedParent) - calculateRightSpace(this.element));
200
+ return calculateRightSpace(this.element);
104
201
  }
105
202
  /**
106
203
  * Defines which horizontal placement is available
107
204
  */
108
205
  get horizontalPlacement() {
109
- var _a;
110
- return ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetWidth) + OFFSET < this.left ? 'left' : 'right';
206
+ return this.tooltipContainerWidth + OFFSET < this.left ? 'left' : 'right';
111
207
  }
112
208
  /**
113
209
  * Defines which vertical placement is available
114
210
  */
115
211
  get verticalPlacement() {
116
- var _a;
117
- return ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetHeight) + OFFSET < this.top ? 'top' : 'bottom';
212
+ return this.tooltipContainerHeight + OFFSET < this.top ? 'top' : 'bottom';
118
213
  }
119
214
  /**
120
215
  * Checks if there is enough space for placing tooltip vertically
121
216
  */
122
217
  get isEnoughSpaceVertically() {
123
- var _a, _b;
124
- return ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetHeight) + OFFSET < this.top || ((_b = this.tooltipValue) === null || _b === void 0 ? void 0 : _b.offsetHeight) + OFFSET < this.bottom;
218
+ return this.tooltipContainerHeight + OFFSET < this.top || this.tooltipContainerHeight + OFFSET < this.bottom;
125
219
  }
126
220
  /**
127
221
  * Checks if there is enough space for placing tooltip horizontally
128
222
  */
129
223
  get isEnoughSpaceHorizontally() {
130
- var _a, _b;
131
- return ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetWidth) + OFFSET < this.left || ((_b = this.tooltipValue) === null || _b === void 0 ? void 0 : _b.offsetWidth) + OFFSET < this.right;
224
+ return this.tooltipContainerWidth + OFFSET < this.left || this.tooltipContainerWidth + OFFSET < this.right;
132
225
  }
133
226
  get activeElement() {
134
227
  return this.element.querySelector('r-button, r-icon-button, a, button, [tabindex]:not([tabindex="-1"])');
@@ -143,13 +236,16 @@ export class Tooltip {
143
236
  * Listen to active child element
144
237
  */
145
238
  componentDidLoad() {
146
- var _a, _b;
239
+ var _a, _b, _c;
147
240
  (_a = this.activeElement) === null || _a === void 0 ? void 0 : _a.addEventListener('focus', () => {
148
241
  this.handleFocus();
149
242
  });
150
243
  (_b = this.activeElement) === null || _b === void 0 ? void 0 : _b.addEventListener('blur', () => {
151
244
  this.removeTooltip();
152
245
  });
246
+ (_c = this.overflowedParent) === null || _c === void 0 ? void 0 : _c.addEventListener('scroll', () => {
247
+ this.handleScroll();
248
+ });
153
249
  }
154
250
  /**
155
251
  * Finds first element's parent with not visible overflow.
@@ -198,25 +294,32 @@ export class Tooltip {
198
294
  * First it checks the available space for a defined position and then sets the new one based on the available space.
199
295
  */
200
296
  setCorrectPosition() {
201
- var _a, _b, _c, _d;
202
- if (!this.tooltipValue || !this.isShown) {
297
+ if (!this.tooltip || !this.isShown) {
203
298
  return;
204
299
  }
205
300
  switch (this.position) {
206
301
  case 'top':
207
- this.positionState = ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetHeight) + OFFSET < this.top ? this.position : this.getAlternativePosition();
302
+ this.positionState = this.tooltipContainerHeight + OFFSET < this.top ? this.position : this.getAlternativePosition();
208
303
  break;
209
304
  case 'bottom':
210
- this.positionState = ((_b = this.tooltipValue) === null || _b === void 0 ? void 0 : _b.offsetHeight) + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
305
+ this.positionState = this.tooltipContainerHeight + OFFSET < this.bottom ? this.position : this.getAlternativePosition();
211
306
  break;
212
307
  case 'left':
213
- this.positionState = ((_c = this.tooltipValue) === null || _c === void 0 ? void 0 : _c.offsetWidth) + OFFSET < this.left ? this.position : this.getAlternativePosition();
308
+ this.positionState = this.tooltipContainerWidth + OFFSET < this.left ? this.position : this.getAlternativePosition();
214
309
  break;
215
310
  case 'right':
216
- this.positionState = ((_d = this.tooltipValue) === null || _d === void 0 ? void 0 : _d.offsetWidth) + OFFSET < this.right ? this.position : this.getAlternativePosition();
311
+ this.positionState = this.tooltipContainerWidth + OFFSET < this.right ? this.position : this.getAlternativePosition();
217
312
  break;
218
313
  }
219
314
  this.adjustArrowPosition();
315
+ this.alignTooltipPosition();
316
+ this.alignArrowPosition();
317
+ // allow tooltip content wrap and recalculate position
318
+ if (this.tooltip.style.width === 'fit-content') {
319
+ return;
320
+ }
321
+ this.tooltip.style.width = 'fit-content';
322
+ this.alignTooltipPosition();
220
323
  }
221
324
  /**
222
325
  * Adjusts arrow correct position.
@@ -224,10 +327,9 @@ export class Tooltip {
224
327
  * For right & left tooltip positions there is only one position = "center".
225
328
  */
226
329
  adjustArrowPosition() {
227
- var _a, _b;
228
- const isEnoughTooltipSpaceLeft = ((_a = this.tooltipValue) === null || _a === void 0 ? void 0 : _a.offsetWidth) / 2 + OFFSET < this.left;
229
- const isEnoughTooltipSpaceRight = ((_b = this.tooltipValue) === null || _b === void 0 ? void 0 : _b.offsetWidth) / 2 + OFFSET < this.right;
230
- if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
330
+ const isEnoughTooltipSpaceLeft = this.tooltipContainerWidth / 2 + OFFSET < this.left;
331
+ const isEnoughTooltipSpaceRight = this.tooltipContainerWidth / 2 + OFFSET < this.right;
332
+ if (isEnoughTooltipSpaceLeft && isEnoughTooltipSpaceRight || !isEnoughTooltipSpaceLeft && !isEnoughTooltipSpaceRight || this.positionState === 'left' || this.positionState === 'right') {
231
333
  this.arrowPositionState = 'center';
232
334
  }
233
335
  else if (!isEnoughTooltipSpaceLeft) {
@@ -253,7 +355,7 @@ export class Tooltip {
253
355
  role: 'tooltip',
254
356
  'aria-hidden': `${!isShown}`
255
357
  };
256
- return (h(Host, Object.assign({ key: 'e168f9f1212433eb17769c11260f546e441ca274' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: 'b8ea713c2b09b6053af73ac7d26a30f210c90e94', class: "r-tooltip" }, h("div", Object.assign({ key: '19cc679ec640dc98f167077e0bab16423e186258', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: '17266fefef386f3b417d8e7d112e0345aa98e878' })), h("div", Object.assign({ key: 'e53283c02be43833362277fc8fe78e99c4a9adba', class: "r-tooltip--content" }, contentAttrs), text), h("div", { key: '98f1caf44ec7bd286cb8126022692d825f4ab617', class: "r-tooltip--arrow" }))));
358
+ return (h(Host, Object.assign({ key: 'f0b2e0117f0604d325becbcc05686433fbd3d506' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), h("div", { key: '2f5ff7638dedddd04dac78a2131438457211354b', class: "r-tooltip" }, h("div", Object.assign({ key: 'cb562089f6e7ac27b99ba09953c2f28f29e3e649', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), h("slot", { key: '2e09b16563b9aa325ff64f10af1ad5f4728a2417' })), h("div", Object.assign({ key: 'ffe53881e5ec5335073a7adf2ed5479f3a56f00f', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), h("div", { key: '3f85fb76e934b18d5963d125699d00776c6abbac', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
257
359
  }
258
360
  static get is() { return "r-tooltip"; }
259
361
  static get encapsulation() { return "shadow"; }