@aquera/nile-elements 0.1.32-beta-1.3 → 0.1.32-beta-1.4

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 (105) hide show
  1. package/README.md +3 -0
  2. package/demo/index.html +262 -27
  3. package/dist/{fixture-161dee0b.cjs.js → fixture-d5b55278.cjs.js} +3 -3
  4. package/dist/fixture-d5b55278.cjs.js.map +1 -0
  5. package/dist/{fixture-372df3b0.esm.js → fixture-df8b52d7.esm.js} +1 -1
  6. package/dist/index.cjs.js +1 -1
  7. package/dist/index.esm.js +1 -1
  8. package/dist/internal/animate.cjs.js +1 -1
  9. package/dist/internal/animate.cjs.js.map +1 -1
  10. package/dist/internal/animate.esm.js +1 -1
  11. package/dist/nile-accordion/nile-accordian.test.cjs.js +1 -1
  12. package/dist/nile-accordion/nile-accordian.test.esm.js +1 -1
  13. package/dist/nile-auto-complete/nile-auto-complete.test.cjs.js +1 -1
  14. package/dist/nile-auto-complete/nile-auto-complete.test.esm.js +1 -1
  15. package/dist/nile-avatar/nile-avatar.test.cjs.js +1 -1
  16. package/dist/nile-avatar/nile-avatar.test.esm.js +1 -1
  17. package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
  18. package/dist/nile-badge/nile-badge.test.esm.js +1 -1
  19. package/dist/nile-button/nile-button.test.cjs.js +1 -1
  20. package/dist/nile-button/nile-button.test.esm.js +1 -1
  21. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +1 -1
  22. package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +1 -1
  23. package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
  24. package/dist/nile-calendar/nile-calendar.test.esm.js +1 -1
  25. package/dist/nile-card/nile-card.test.cjs.js +1 -1
  26. package/dist/nile-card/nile-card.test.esm.js +1 -1
  27. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -1
  28. package/dist/nile-checkbox/nile-checkbox.test.esm.js +1 -1
  29. package/dist/nile-chip/nile-chip.test.cjs.js +1 -1
  30. package/dist/nile-chip/nile-chip.test.esm.js +1 -1
  31. package/dist/nile-dialog/nile-dialog.test.cjs.js +1 -1
  32. package/dist/nile-dialog/nile-dialog.test.esm.js +1 -1
  33. package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
  34. package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
  35. package/dist/nile-dropdown/nile-dropdown.test.cjs.js +1 -1
  36. package/dist/nile-dropdown/nile-dropdown.test.esm.js +1 -1
  37. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +1 -1
  38. package/dist/nile-empty-state/nile-empty-state.test.esm.js +1 -1
  39. package/dist/nile-error-message/nile-error-message.test.cjs.js +1 -1
  40. package/dist/nile-error-message/nile-error-message.test.esm.js +1 -1
  41. package/dist/nile-form-group/nile-form-group.test.cjs.js +1 -1
  42. package/dist/nile-form-group/nile-form-group.test.esm.js +1 -1
  43. package/dist/nile-form-help-text/nile-form-help-text.test.cjs.js +1 -1
  44. package/dist/nile-form-help-text/nile-form-help-text.test.esm.js +1 -1
  45. package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
  46. package/dist/nile-hero/nile-hero.test.esm.js +1 -1
  47. package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
  48. package/dist/nile-icon/nile-icon.test.esm.js +1 -1
  49. package/dist/nile-input/nile-input.test.cjs.js +1 -1
  50. package/dist/nile-input/nile-input.test.esm.js +1 -1
  51. package/dist/nile-link/nile-link.test.cjs.js +1 -1
  52. package/dist/nile-link/nile-link.test.esm.js +1 -1
  53. package/dist/nile-loader/nile-loader.test.cjs.js +1 -1
  54. package/dist/nile-loader/nile-loader.test.esm.js +1 -1
  55. package/dist/nile-popover/nile-popover.test.cjs.js +1 -1
  56. package/dist/nile-popover/nile-popover.test.esm.js +1 -1
  57. package/dist/nile-popup/nile-popup.test.cjs.js +1 -1
  58. package/dist/nile-popup/nile-popup.test.esm.js +1 -1
  59. package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +1 -1
  60. package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -1
  61. package/dist/nile-radio/nile-radio.test.cjs.js +1 -1
  62. package/dist/nile-radio/nile-radio.test.esm.js +1 -1
  63. package/dist/nile-radio-group/nile-radio-group.test.cjs.js +1 -1
  64. package/dist/nile-radio-group/nile-radio-group.test.esm.js +1 -1
  65. package/dist/nile-select/nile-select.test.cjs.js +1 -1
  66. package/dist/nile-select/nile-select.test.esm.js +1 -1
  67. package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +1 -1
  68. package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -1
  69. package/dist/nile-tab-group/nile-tab-group.test.cjs.js +1 -1
  70. package/dist/nile-tab-group/nile-tab-group.test.esm.js +1 -1
  71. package/dist/nile-textarea/nile-textarea.test.cjs.js +1 -1
  72. package/dist/nile-textarea/nile-textarea.test.esm.js +1 -1
  73. package/dist/nile-tooltip/index.cjs.js +1 -1
  74. package/dist/nile-tooltip/index.esm.js +1 -1
  75. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js +2 -0
  76. package/dist/nile-tooltip/nile-tooltip-utils.cjs.js.map +1 -0
  77. package/dist/nile-tooltip/nile-tooltip-utils.esm.js +1 -0
  78. package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
  79. package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
  80. package/dist/nile-tooltip/nile-tooltip.css.cjs.js +1 -1
  81. package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
  82. package/dist/nile-tooltip/nile-tooltip.css.esm.js +59 -56
  83. package/dist/nile-tooltip/nile-tooltip.esm.js +23 -28
  84. package/dist/nile-tooltip/nile-tooltip.test.cjs.js +2 -0
  85. package/dist/nile-tooltip/nile-tooltip.test.cjs.js.map +1 -0
  86. package/dist/nile-tooltip/nile-tooltip.test.esm.js +51 -0
  87. package/dist/src/nile-tooltip/nile-tooltip-utils.d.ts +18 -0
  88. package/dist/src/nile-tooltip/nile-tooltip-utils.js +151 -0
  89. package/dist/src/nile-tooltip/nile-tooltip-utils.js.map +1 -0
  90. package/dist/src/nile-tooltip/nile-tooltip.css.js +48 -45
  91. package/dist/src/nile-tooltip/nile-tooltip.css.js.map +1 -1
  92. package/dist/src/nile-tooltip/nile-tooltip.d.ts +23 -44
  93. package/dist/src/nile-tooltip/nile-tooltip.js +157 -227
  94. package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
  95. package/dist/src/nile-tooltip/nile-tooltip.test.d.ts +1 -0
  96. package/dist/src/nile-tooltip/nile-tooltip.test.js +158 -0
  97. package/dist/src/nile-tooltip/nile-tooltip.test.js.map +1 -0
  98. package/dist/tsconfig.tsbuildinfo +1 -1
  99. package/package.json +1 -1
  100. package/src/nile-tooltip/nile-tooltip-utils.ts +190 -0
  101. package/src/nile-tooltip/nile-tooltip.css.ts +49 -46
  102. package/src/nile-tooltip/nile-tooltip.test.ts +178 -0
  103. package/src/nile-tooltip/nile-tooltip.ts +155 -237
  104. package/vscode-html-custom-data.json +81 -81
  105. package/dist/fixture-161dee0b.cjs.js.map +0 -1
@@ -0,0 +1,151 @@
1
+ export function isInViewport(element) {
2
+ const rect = element.getBoundingClientRect();
3
+ return (rect.top >= 0 &&
4
+ rect.left >= 0 &&
5
+ rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
6
+ rect.right <= (window.innerWidth || document.documentElement.clientWidth));
7
+ }
8
+ export function getValidTooltipPosition(triggerRect, tooltipRect, originalPlacement, distance, skidding, caretSize, viewportWidth, viewportHeight) {
9
+ const triggerCenterX = triggerRect.left + triggerRect.width / 2;
10
+ const getCandidatePosition = (placement) => {
11
+ let top = 0;
12
+ let left = 0;
13
+ switch (placement) {
14
+ case 'top':
15
+ top = triggerRect.top - tooltipRect.height - distance;
16
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
17
+ break;
18
+ case 'top-start':
19
+ top = triggerRect.top - tooltipRect.height - distance;
20
+ left = triggerCenterX - caretSize + skidding;
21
+ break;
22
+ case 'top-end':
23
+ top = triggerRect.top - tooltipRect.height - distance;
24
+ left = triggerCenterX - tooltipRect.width + caretSize + 10 + skidding;
25
+ break;
26
+ case 'bottom':
27
+ top = triggerRect.bottom + distance;
28
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
29
+ break;
30
+ case 'bottom-start':
31
+ top = triggerRect.bottom + distance;
32
+ left = triggerCenterX - caretSize - 10 + skidding;
33
+ break;
34
+ case 'bottom-end':
35
+ top = triggerRect.bottom + distance;
36
+ left = triggerCenterX - (tooltipRect.width - caretSize) + 10 + skidding;
37
+ break;
38
+ case 'left':
39
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;
40
+ left = triggerRect.left - tooltipRect.width - distance;
41
+ break;
42
+ case 'left-start':
43
+ top = triggerRect.top + skidding;
44
+ left = triggerRect.left - tooltipRect.width - distance;
45
+ break;
46
+ case 'left-end':
47
+ top = triggerRect.bottom - tooltipRect.height + skidding;
48
+ left = triggerRect.left - tooltipRect.width - distance;
49
+ break;
50
+ case 'right':
51
+ top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;
52
+ left = triggerRect.right + distance;
53
+ break;
54
+ case 'right-start':
55
+ top = triggerRect.top + skidding;
56
+ left = triggerRect.right + distance;
57
+ break;
58
+ case 'right-end':
59
+ top = triggerRect.bottom - tooltipRect.height + skidding;
60
+ left = triggerRect.right + distance;
61
+ break;
62
+ default:
63
+ top = triggerRect.top - tooltipRect.height - distance;
64
+ left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;
65
+ }
66
+ return { top, left };
67
+ };
68
+ const candidateFits = (top, left) => top >= 0 &&
69
+ left >= 0 &&
70
+ top + tooltipRect.height <= viewportHeight &&
71
+ left + tooltipRect.width <= viewportWidth;
72
+ let placement = originalPlacement;
73
+ let candidate = getCandidatePosition(placement);
74
+ if (!candidateFits(candidate.top, candidate.left)) {
75
+ if (!placement.startsWith('bottom')) {
76
+ placement = 'bottom';
77
+ candidate = getCandidatePosition(placement);
78
+ }
79
+ }
80
+ if (candidate.left < 0) {
81
+ candidate.left = 5;
82
+ }
83
+ else if (candidate.left + tooltipRect.width > viewportWidth) {
84
+ candidate.left = viewportWidth - tooltipRect.width - 5;
85
+ }
86
+ if (candidate.top < 0) {
87
+ candidate.top = 5;
88
+ }
89
+ else if (candidate.top + tooltipRect.height > viewportHeight) {
90
+ candidate.top = viewportHeight - tooltipRect.height - 5;
91
+ }
92
+ return { ...candidate, placement };
93
+ }
94
+ export function getCaretPosition({ placement, tooltipRect, triggerRect, caretSize, left, top }) {
95
+ const triggerCenterX = triggerRect.left + triggerRect.width / 2;
96
+ const triggerCenterY = triggerRect.top + triggerRect.height / 2;
97
+ const [primaryPlacement, secondaryPlacement] = placement.split('-');
98
+ let caretLeft = 0;
99
+ let caretTop = 0;
100
+ switch (primaryPlacement) {
101
+ case 'top':
102
+ caretTop = tooltipRect.height - caretSize;
103
+ caretLeft = triggerCenterX - left - caretSize;
104
+ if (placement === 'top-end') {
105
+ caretLeft = triggerCenterX - left - caretSize;
106
+ }
107
+ else if (secondaryPlacement === 'start') {
108
+ caretLeft = triggerCenterX - left - caretSize;
109
+ }
110
+ else if (secondaryPlacement === 'end') {
111
+ caretLeft = tooltipRect.width - 2 * caretSize + 8;
112
+ }
113
+ caretLeft = Math.max(caretSize, Math.min(caretLeft, tooltipRect.width - 2 * caretSize));
114
+ break;
115
+ case 'bottom':
116
+ caretTop = -caretSize;
117
+ caretLeft = triggerCenterX - left - caretSize;
118
+ break;
119
+ case 'left':
120
+ caretLeft = tooltipRect.width - caretSize;
121
+ if (secondaryPlacement === 'start') {
122
+ caretTop = triggerRect.height / 2 - caretSize;
123
+ }
124
+ else if (secondaryPlacement === 'end') {
125
+ caretTop = tooltipRect.height - triggerRect.height / 2 - caretSize;
126
+ }
127
+ else {
128
+ caretTop = triggerCenterY - top - caretSize;
129
+ }
130
+ caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));
131
+ break;
132
+ case 'right':
133
+ caretLeft = -caretSize;
134
+ if (secondaryPlacement === 'start') {
135
+ caretTop = triggerRect.height / 2 - caretSize;
136
+ }
137
+ else if (secondaryPlacement === 'end') {
138
+ caretTop = tooltipRect.height - triggerRect.height / 2 - caretSize;
139
+ }
140
+ else {
141
+ caretTop = triggerCenterY - top - caretSize;
142
+ }
143
+ caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));
144
+ break;
145
+ default:
146
+ caretLeft = tooltipRect.width / 2 - caretSize;
147
+ caretTop = tooltipRect.height / 2 - caretSize;
148
+ }
149
+ return { caretLeft, caretTop };
150
+ }
151
+ //# sourceMappingURL=nile-tooltip-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-tooltip-utils.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip-utils.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY,CAAC,OAAoB;IAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAC7C,OAAO,CACL,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,IAAI,IAAI,CAAC;QACd,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;QAC5E,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,CAC1E,CAAC;AACJ,CAAC;AAGD,MAAM,UAAU,uBAAuB,CACrC,WAAoB,EACpB,WAAoB,EACpB,iBAAyB,EACzB,QAAgB,EAChB,QAAgB,EAChB,SAAiB,EACjB,aAAqB,EACrB,cAAsB;IAEtB,MAAM,cAAc,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,CAAC;IAEh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AAC;YAC9C,CAAC;YACD,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;YACvF,MAAM;QAER;YACE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,CAAC,GAAG,SAAS,CAAC;YAC9C,QAAQ,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAClD,CAAC;IAED,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC","sourcesContent":["export function isInViewport(element: HTMLElement): boolean {\n const rect = element.getBoundingClientRect();\n return (\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n}\n\n\nexport function getValidTooltipPosition(\n triggerRect: DOMRect,\n tooltipRect: DOMRect,\n originalPlacement: string,\n distance: number,\n skidding: number,\n caretSize: number,\n viewportWidth: number,\n viewportHeight: number\n): { top: number; left: number; placement: string } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n\n const getCandidatePosition = (placement: string) => {\n let top = 0;\n let left = 0;\n\n switch (placement) {\n case 'top':\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'top-start':\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerCenterX - caretSize + skidding;\n break;\n case 'top-end':\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerCenterX - tooltipRect.width + caretSize + 10 + skidding;\n break;\n case 'bottom':\n top = triggerRect.bottom + distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n break;\n case 'bottom-start':\n top = triggerRect.bottom + distance;\n left = triggerCenterX - caretSize - 10 + skidding;\n break;\n case 'bottom-end':\n top = triggerRect.bottom + distance;\n left = triggerCenterX - (tooltipRect.width - caretSize) + 10 + skidding;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.left - tooltipRect.width - distance;\n break;\n case 'left-start':\n top = triggerRect.top + skidding;\n left = triggerRect.left - tooltipRect.width - distance;\n break;\n case 'left-end':\n top = triggerRect.bottom - tooltipRect.height + skidding;\n left = triggerRect.left - tooltipRect.width - distance;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2 + skidding;\n left = triggerRect.right + distance;\n break;\n case 'right-start':\n top = triggerRect.top + skidding;\n left = triggerRect.right + distance;\n break;\n case 'right-end':\n top = triggerRect.bottom - tooltipRect.height + skidding;\n left = triggerRect.right + distance;\n break;\n default:\n top = triggerRect.top - tooltipRect.height - distance;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2 + skidding;\n }\n\n return { top, left };\n };\n\n const candidateFits = (top: number, left: number) =>\n top >= 0 &&\n left >= 0 &&\n top + tooltipRect.height <= viewportHeight &&\n left + tooltipRect.width <= viewportWidth;\n\n let placement = originalPlacement;\n let candidate = getCandidatePosition(placement);\n\n if (!candidateFits(candidate.top, candidate.left)) {\n if (!placement.startsWith('bottom')) {\n placement = 'bottom';\n candidate = getCandidatePosition(placement);\n }\n }\n\n if (candidate.left < 0) {\n candidate.left = 5;\n } else if (candidate.left + tooltipRect.width > viewportWidth) {\n candidate.left = viewportWidth - tooltipRect.width - 5;\n }\n\n if (candidate.top < 0) {\n candidate.top = 5;\n } else if (candidate.top + tooltipRect.height > viewportHeight) {\n candidate.top = viewportHeight - tooltipRect.height - 5;\n }\n\n return { ...candidate, placement };\n}\n\nexport interface CaretPositionInput {\n placement: string;\n tooltipRect: DOMRect;\n triggerRect: DOMRect;\n caretSize: number;\n left: number;\n top: number;\n}\n\nexport function getCaretPosition({\n placement,\n tooltipRect,\n triggerRect,\n caretSize,\n left,\n top\n}: CaretPositionInput): { caretLeft: number; caretTop: number } {\n const triggerCenterX = triggerRect.left + triggerRect.width / 2;\n const triggerCenterY = triggerRect.top + triggerRect.height / 2;\n\n const [primaryPlacement, secondaryPlacement] = placement.split('-');\n\n let caretLeft = 0;\n let caretTop = 0;\n\n switch (primaryPlacement) {\n case 'top':\n caretTop = tooltipRect.height - caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n if (placement === 'top-end') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'start') {\n caretLeft = triggerCenterX - left - caretSize;\n } else if (secondaryPlacement === 'end') {\n caretLeft = tooltipRect.width - 2 * caretSize + 8;\n }\n caretLeft = Math.max(caretSize, Math.min(caretLeft, tooltipRect.width - 2 * caretSize));\n break;\n\n case 'bottom':\n caretTop = -caretSize;\n caretLeft = triggerCenterX - left - caretSize;\n break;\n\n case 'left':\n caretLeft = tooltipRect.width - caretSize;\n if (secondaryPlacement === 'start') {\n caretTop = triggerRect.height / 2 - caretSize;\n } else if (secondaryPlacement === 'end') {\n caretTop = tooltipRect.height - triggerRect.height / 2 - caretSize;\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n case 'right':\n caretLeft = -caretSize;\n if (secondaryPlacement === 'start') {\n caretTop = triggerRect.height / 2 - caretSize;\n } else if (secondaryPlacement === 'end') {\n caretTop = tooltipRect.height - triggerRect.height / 2 - caretSize;\n } else {\n caretTop = triggerCenterY - top - caretSize;\n }\n caretTop = Math.max(caretSize, Math.min(caretTop, tooltipRect.height - 2 * caretSize));\n break;\n\n default:\n caretLeft = tooltipRect.width / 2 - caretSize;\n caretTop = tooltipRect.height / 2 - caretSize;\n }\n\n return { caretLeft, caretTop };\n}"]}
@@ -9,60 +9,63 @@ import { css } from 'lit';
9
9
  * Tooltip CSS
10
10
  */
11
11
  export const styles = css `
12
- :host {
13
- --max-width: 20rem;
14
- --hide-delay: 0ms;
15
- --show-delay: 150ms;
16
12
 
17
- display: contents;
18
- }
19
13
 
20
- .tooltip {
21
- --arrow-size: 6px;
22
- --arrow-color: var(--nile-tooltip-color-background);
23
- }
14
+ :host {
15
+ position: relative;
16
+ display: inline-block;
17
+ }
18
+ .tooltip {
19
+ position: fixed;
20
+ z-index: 1000;
21
+ background-color: var(--nile-tooltip-color-background, #333);
22
+ color: var(--nile-colors-white-base, #fff);
23
+ padding: 6px 10px;
24
+ border-radius: 4px;
25
+ font-size: var(--nile-tooltip-font-size-sm, 14px);
26
+ line-height: var(--nile-tooltip-line-height-sm, 1.5);
27
+ opacity: 0;
28
+ transition: opacity 0.2s, transform 0.2s;
29
+ pointer-events: none;
30
+ white-space: normal;
31
+ visibility: hidden;
32
+ overflow: visible;
33
+
34
+ }
35
+ :host([open]) .tooltip {
36
+ opacity: 1;
37
+ visibility: visible;
38
+ pointer-events: auto;
39
+ }
40
+ .tooltip__body--large {
41
+ font-size: var(--nile-tooltip-font-size-lg, 16px);
42
+ line-height: var(--nile-tooltip-line-height-lg, 1.75);
43
+ }
44
+ .tooltip-content {
45
+ overflow: auto;
46
+ max-width: 252px;
47
+ max-height: 116px;
48
+ }
49
+ .tooltip-caret {
50
+ position: absolute;
51
+ width: calc(2 * var(--caret-size, 6px));
52
+ height: calc(2 * var(--caret-size, 6px));
53
+ background-color: inherit;
54
+ transform: rotate(45deg);
55
+ z-index: -1;
56
+ }
57
+ .trigger-container {
58
+ display: inline-block;
59
+ }
60
+
24
61
 
25
- .tooltip::part(popup) {
26
- pointer-events: none;
27
- z-index: 1000;
28
- }
29
62
 
30
- .tooltip[placement^='top']::part(popup) {
31
- transform-origin: bottom;
32
- }
33
63
 
34
- .tooltip[placement^='bottom']::part(popup) {
35
- transform-origin: top;
36
- }
37
64
 
38
- .tooltip[placement^='left']::part(popup) {
39
- transform-origin: right;
40
- }
41
65
 
42
- .tooltip[placement^='right']::part(popup) {
43
- transform-origin: left;
44
- }
45
66
 
46
- .tooltip__body {
47
- display: block;
48
- width: max-content;
49
- max-width: var(--max-width);
50
- border-radius: 4px;
51
- background-color: var(--nile-tooltip-color-background);
52
- font-size: var(--nile-tooltip-font-size-sm);
53
- font-weight: var(--nile-tooltip-font-weight-sm);
54
- line-height: var(--nile-tooltip-line-height-sm);
55
- padding: var(--nile-tooltip-padding-y) var(--nile-tooltip-padding-x);
56
- color: var(--nile-colors-white-base);
57
- pointer-events: none;
58
- word-break: break-word;
59
- }
60
67
 
61
- .tooltip__body--large {
62
- font-size: var(--nile-tooltip-font-size-lg);
63
- line-height: var(--nile-tooltip-line-height-lg);
64
- font-weight: var(--nile-tooltip-font-weight-lg);
65
- }
68
+
66
69
  `;
67
70
  export default [styles];
68
71
  //# sourceMappingURL=nile-tooltip.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-tooltip.css.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Tooltip CSS\n */\nexport const styles = css`\n :host {\n --max-width: 20rem;\n --hide-delay: 0ms;\n --show-delay: 150ms;\n\n display: contents;\n }\n\n .tooltip {\n --arrow-size: 6px;\n --arrow-color: var(--nile-tooltip-color-background);\n }\n\n .tooltip::part(popup) {\n pointer-events: none;\n z-index: 1000;\n }\n\n .tooltip[placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .tooltip[placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .tooltip[placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .tooltip[placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .tooltip__body {\n display: block;\n width: max-content;\n max-width: var(--max-width);\n border-radius: 4px;\n background-color: var(--nile-tooltip-color-background);\n font-size: var(--nile-tooltip-font-size-sm);\n font-weight: var(--nile-tooltip-font-weight-sm);\n line-height: var(--nile-tooltip-line-height-sm);\n padding: var(--nile-tooltip-padding-y) var(--nile-tooltip-padding-x);\n color: var(--nile-colors-white-base);\n pointer-events: none;\n word-break: break-word;\n }\n\n .tooltip__body--large {\n font-size: var(--nile-tooltip-font-size-lg);\n line-height: var(--nile-tooltip-line-height-lg);\n font-weight: var(--nile-tooltip-font-weight-lg);\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-tooltip.css.js","sourceRoot":"","sources":["../../../src/nile-tooltip/nile-tooltip.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Tooltip CSS\n */\nexport const styles = css`\n\n\n:host {\n position: relative;\n display: inline-block;\n }\n .tooltip {\n position: fixed;\n z-index: 1000;\n background-color: var(--nile-tooltip-color-background, #333);\n color: var(--nile-colors-white-base, #fff);\n padding: 6px 10px;\n border-radius: 4px;\n font-size: var(--nile-tooltip-font-size-sm, 14px);\n line-height: var(--nile-tooltip-line-height-sm, 1.5);\n opacity: 0;\n transition: opacity 0.2s, transform 0.2s;\n pointer-events: none;\n white-space: normal;\n visibility: hidden;\n overflow: visible;\n \n }\n :host([open]) .tooltip {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n }\n .tooltip__body--large {\n font-size: var(--nile-tooltip-font-size-lg, 16px);\n line-height: var(--nile-tooltip-line-height-lg, 1.75);\n }\n .tooltip-content {\n overflow: auto;\n max-width: 252px;\n max-height: 116px;\n }\n .tooltip-caret {\n position: absolute;\n width: calc(2 * var(--caret-size, 6px));\n height: calc(2 * var(--caret-size, 6px));\n background-color: inherit;\n transform: rotate(45deg);\n z-index: -1;\n }\n .trigger-container {\n display: inline-block;\n }\n \n\n\n\n\n\n\n\n \n`;\n\nexport default [styles];"]}
@@ -4,10 +4,8 @@
4
4
  * This source code is licensed under the BSD-3-Clause license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
- import { CSSResultArray, TemplateResult } from 'lit';
8
- import '../nile-popup/nile-popup';
7
+ import { CSSResultArray } from 'lit';
9
8
  import NileElement from '../internal/nile-element';
10
- import type NilePopup from '../nile-popup/nile-popup';
11
9
  /**
12
10
  * Nile icon component.
13
11
  *
@@ -15,64 +13,45 @@ import type NilePopup from '../nile-popup/nile-popup';
15
13
  *
16
14
  */
17
15
  export declare class NileTooltip extends NileElement {
18
- /**
19
- * The styles for Tooltip
20
- * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
21
- */
22
- static get styles(): CSSResultArray;
23
- private hoverTimeout;
24
- defaultSlot: HTMLSlotElement;
25
- body: HTMLElement;
26
- popup: NilePopup;
27
- /** The tooltip's content. If you need to display HTML, use the `content` slot instead. */
28
16
  content: string;
29
- /** Size Property to decide the tool tip size */
30
17
  size: 'small' | 'large';
31
- /**
32
- * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip
33
- * inside of the viewport.
34
- */
35
18
  placement: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
36
- /** Disables the tooltip so it won't show when triggered. */
37
19
  disabled: boolean;
38
- /** The distance in pixels from which to offset the tooltip away from its target. */
39
- distance: number;
40
- /** Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods. */
41
20
  open: boolean;
42
- /** The distance in pixels from which to offset the tooltip along its target. */
43
- skidding: number;
44
21
  /**
45
22
  * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple
46
23
  * options can be passed by separating them with a space. When manual is used, the tooltip must be activated
47
24
  * programmatically.
48
25
  */
49
26
  trigger: string;
50
- /**
51
- * Enable this option to prevent the tooltip from being clipped when the component is placed inside a container with
52
- * `overflow: auto|hidden|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all,
53
- * scenarios.
54
- */
27
+ distance: number;
28
+ private readonly SHIFT_OFFSET;
29
+ /** The distance in pixels from which to offset the tooltip along its target. */
30
+ skidding: number;
55
31
  hoist: boolean;
32
+ tooltip: HTMLElement;
33
+ triggerContainer: HTMLElement;
34
+ caret: HTMLElement;
35
+ tooltipSlot: HTMLSlotElement;
36
+ private hasTooltipSlot;
37
+ private hoverTimeout;
38
+ private caretSize;
39
+ private originalPlacement;
40
+ static get styles(): CSSResultArray;
56
41
  connectedCallback(): void;
57
- firstUpdated(): void;
42
+ updated(changedProps: Map<string, unknown>): void;
58
43
  disconnectedCallback(): void;
59
- private handleBlur;
60
- private handleClick;
61
- private handleFocus;
62
- private handleKeyDown;
44
+ private handleTooltipSlotChange;
45
+ private updateTooltipPosition;
46
+ private showTooltip;
47
+ private hideTooltip;
63
48
  private handleMouseOver;
64
49
  private handleMouseOut;
65
- private hasTrigger;
66
- handleOpenChange(): Promise<void>;
67
- handleOptionsChange(): Promise<void>;
68
- handleDisabledChange(): void;
69
- /** Shows the tooltip. */
70
- show(): Promise<void>;
71
- /** Hides the tooltip */
72
- hide(): Promise<void>;
73
- render(): TemplateResult<1>;
50
+ private handleClick;
51
+ private handleFocus;
52
+ private handleBlur;
53
+ render(): import("lit-html").TemplateResult<1>;
74
54
  }
75
- export default NileTooltip;
76
55
  declare global {
77
56
  interface HTMLElementTagNameMap {
78
57
  'nile-tooltip': NileTooltip;