@thednp/shorty 2.0.7 → 2.0.8

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 (258) hide show
  1. package/README.md +54 -26
  2. package/dist/shorty.cjs +1 -1
  3. package/dist/shorty.cjs.map +1 -1
  4. package/dist/shorty.d.ts +235 -138
  5. package/dist/shorty.js +1 -1
  6. package/dist/shorty.js.map +1 -1
  7. package/dist/shorty.mjs +536 -600
  8. package/dist/shorty.mjs.map +1 -1
  9. package/package.json +9 -8
  10. package/.eslintrc.cjs +0 -224
  11. package/.lgtm.yml +0 -8
  12. package/.prettierrc.json +0 -15
  13. package/src/attr/getAttribute.ts +0 -11
  14. package/src/attr/getAttributeNS.ts +0 -12
  15. package/src/attr/hasAttribute.ts +0 -11
  16. package/src/attr/hasAttributeNS.ts +0 -15
  17. package/src/attr/removeAttribute.ts +0 -10
  18. package/src/attr/removeAttributeNS.ts +0 -14
  19. package/src/attr/setAttribute.ts +0 -11
  20. package/src/attr/setAttributeNS.ts +0 -16
  21. package/src/blocks/documentBody.ts +0 -5
  22. package/src/blocks/documentElement.ts +0 -5
  23. package/src/blocks/documentHead.ts +0 -5
  24. package/src/boolean/isApple.ts +0 -15
  25. package/src/boolean/isFirefox.ts +0 -9
  26. package/src/boolean/isMobile.ts +0 -14
  27. package/src/boolean/support3DTransform.ts +0 -7
  28. package/src/boolean/supportAnimation.ts +0 -7
  29. package/src/boolean/supportPassive.ts +0 -29
  30. package/src/boolean/supportTouch.ts +0 -9
  31. package/src/boolean/supportTransform.ts +0 -7
  32. package/src/boolean/supportTransition.ts +0 -7
  33. package/src/class/addClass.ts +0 -11
  34. package/src/class/hasClass.ts +0 -11
  35. package/src/class/removeClass.ts +0 -11
  36. package/src/event/off.ts +0 -18
  37. package/src/event/on.ts +0 -18
  38. package/src/event/one.ts +0 -26
  39. package/src/get/getBoundingClientRect.ts +0 -44
  40. package/src/get/getDocument.ts +0 -24
  41. package/src/get/getDocumentBody.ts +0 -13
  42. package/src/get/getDocumentElement.ts +0 -13
  43. package/src/get/getDocumentHead.ts +0 -14
  44. package/src/get/getElementAnimationDelay.ts +0 -25
  45. package/src/get/getElementAnimationDuration.ts +0 -25
  46. package/src/get/getElementStyle.ts +0 -25
  47. package/src/get/getElementTransitionDelay.ts +0 -25
  48. package/src/get/getElementTransitionDuration.ts +0 -25
  49. package/src/get/getNodeScroll.ts +0 -22
  50. package/src/get/getParentNode.ts +0 -28
  51. package/src/get/getRectRelativeToOffsetParent.ts +0 -43
  52. package/src/get/getUID.ts +0 -42
  53. package/src/get/getWindow.ts +0 -23
  54. package/src/index.ts +0 -571
  55. package/src/interface/boundingClientRect.d.ts +0 -10
  56. package/src/interface/css4Declaration.d.ts +0 -4
  57. package/src/interface/customElement.d.ts +0 -8
  58. package/src/interface/event.d.ts +0 -255
  59. package/src/interface/fn.ts +0 -1
  60. package/src/interface/navigatorUA.d.ts +0 -15
  61. package/src/interface/offsetRect.d.ts +0 -6
  62. package/src/interface/originalEvent.d.ts +0 -4
  63. package/src/is/isArray.ts +0 -10
  64. package/src/is/isCanvas.ts +0 -13
  65. package/src/is/isCustomElement.ts +0 -15
  66. package/src/is/isDocument.ts +0 -14
  67. package/src/is/isElement.ts +0 -28
  68. package/src/is/isElementInScrollRange.ts +0 -20
  69. package/src/is/isElementInViewport.ts +0 -21
  70. package/src/is/isElementsArray.ts +0 -13
  71. package/src/is/isFunction.ts +0 -12
  72. package/src/is/isHTMLCollection.ts +0 -12
  73. package/src/is/isHTMLElement.ts +0 -13
  74. package/src/is/isHTMLImageElement.ts +0 -12
  75. package/src/is/isJSON.ts +0 -20
  76. package/src/is/isMap.ts +0 -11
  77. package/src/is/isMedia.ts +0 -26
  78. package/src/is/isNode.ts +0 -19
  79. package/src/is/isNodeList.ts +0 -13
  80. package/src/is/isNumber.ts +0 -10
  81. package/src/is/isObject.ts +0 -10
  82. package/src/is/isRTL.ts +0 -11
  83. package/src/is/isSVGElement.ts +0 -13
  84. package/src/is/isScaledElement.ts +0 -20
  85. package/src/is/isShadowRoot.ts +0 -12
  86. package/src/is/isString.ts +0 -10
  87. package/src/is/isTableElement.ts +0 -17
  88. package/src/is/isWeakMap.ts +0 -11
  89. package/src/is/isWindow.ts +0 -13
  90. package/src/misc/ArrayFrom.ts +0 -11
  91. package/src/misc/Float32ArrayFrom.ts +0 -11
  92. package/src/misc/Float64ArrayFrom.ts +0 -11
  93. package/src/misc/ObjectAssign.ts +0 -54
  94. package/src/misc/ObjectEntries.ts +0 -11
  95. package/src/misc/ObjectFromEntries.ts +0 -11
  96. package/src/misc/ObjectHasOwn.ts +0 -18
  97. package/src/misc/ObjectKeys.ts +0 -11
  98. package/src/misc/ObjectValues.ts +0 -12
  99. package/src/misc/createCustomEvent.ts +0 -31
  100. package/src/misc/createElement.ts +0 -36
  101. package/src/misc/createElementNS.ts +0 -40
  102. package/src/misc/data.ts +0 -80
  103. package/src/misc/dispatchEvent.ts +0 -10
  104. package/src/misc/distinct.ts +0 -19
  105. package/src/misc/emulateAnimationEnd.ts +0 -43
  106. package/src/misc/emulateTransitionEnd.ts +0 -42
  107. package/src/misc/focus.ts +0 -10
  108. package/src/misc/focusTrap.ts +0 -67
  109. package/src/misc/getInstance.ts +0 -9
  110. package/src/misc/noop.ts +0 -6
  111. package/src/misc/normalizeOptions.ts +0 -58
  112. package/src/misc/normalizeValue.ts +0 -32
  113. package/src/misc/passiveHandler.ts +0 -6
  114. package/src/misc/reflow.ts +0 -9
  115. package/src/misc/setElementStyle.ts +0 -26
  116. package/src/misc/timer.ts +0 -91
  117. package/src/misc/toLowerCase.ts +0 -9
  118. package/src/misc/toUpperCase.ts +0 -9
  119. package/src/selectors/closest.ts +0 -23
  120. package/src/selectors/getCustomElements.ts +0 -19
  121. package/src/selectors/getElementById.ts +0 -16
  122. package/src/selectors/getElementsByClassName.ts +0 -22
  123. package/src/selectors/getElementsByTagName.ts +0 -22
  124. package/src/selectors/matches.ts +0 -11
  125. package/src/selectors/querySelector.ts +0 -25
  126. package/src/selectors/querySelectorAll.ts +0 -19
  127. package/src/strings/DOMContentLoadedEvent.ts +0 -5
  128. package/src/strings/DOMMouseScrollEvent.ts +0 -5
  129. package/src/strings/abortEvent.ts +0 -5
  130. package/src/strings/addEventListener.ts +0 -5
  131. package/src/strings/animationDelay.ts +0 -5
  132. package/src/strings/animationDuration.ts +0 -5
  133. package/src/strings/animationEndEvent.ts +0 -5
  134. package/src/strings/animationName.ts +0 -5
  135. package/src/strings/ariaChecked.ts +0 -5
  136. package/src/strings/ariaDescribedBy.ts +0 -5
  137. package/src/strings/ariaDescription.ts +0 -5
  138. package/src/strings/ariaExpanded.ts +0 -5
  139. package/src/strings/ariaHasPopup.ts +0 -5
  140. package/src/strings/ariaHidden.ts +0 -5
  141. package/src/strings/ariaLabel.ts +0 -5
  142. package/src/strings/ariaLabelledBy.ts +0 -5
  143. package/src/strings/ariaModal.ts +0 -5
  144. package/src/strings/ariaPressed.ts +0 -5
  145. package/src/strings/ariaSelected.ts +0 -5
  146. package/src/strings/ariaValueMax.ts +0 -5
  147. package/src/strings/ariaValueMin.ts +0 -5
  148. package/src/strings/ariaValueNow.ts +0 -5
  149. package/src/strings/ariaValueText.ts +0 -5
  150. package/src/strings/beforeunloadEvent.ts +0 -5
  151. package/src/strings/bezierEasings.ts +0 -32
  152. package/src/strings/blurEvent.ts +0 -5
  153. package/src/strings/changeEvent.ts +0 -5
  154. package/src/strings/contextmenuEvent.ts +0 -5
  155. package/src/strings/dragEvent.ts +0 -5
  156. package/src/strings/dragendEvent.ts +0 -5
  157. package/src/strings/dragenterEvent.ts +0 -5
  158. package/src/strings/dragleaveEvent.ts +0 -5
  159. package/src/strings/dragoverEvent.ts +0 -5
  160. package/src/strings/dragstartEvent.ts +0 -5
  161. package/src/strings/errorEvent.ts +0 -5
  162. package/src/strings/focusEvent.ts +0 -5
  163. package/src/strings/focusEvents.ts +0 -5
  164. package/src/strings/focusableSelector.ts +0 -4
  165. package/src/strings/focusinEvent.ts +0 -5
  166. package/src/strings/focusoutEvent.ts +0 -5
  167. package/src/strings/gesturechangeEvent.ts +0 -5
  168. package/src/strings/gestureendEvent.ts +0 -5
  169. package/src/strings/gesturestartEvent.ts +0 -5
  170. package/src/strings/keyAlt.ts +0 -7
  171. package/src/strings/keyArrowDown.ts +0 -7
  172. package/src/strings/keyArrowLeft.ts +0 -7
  173. package/src/strings/keyArrowRight.ts +0 -7
  174. package/src/strings/keyArrowUp.ts +0 -7
  175. package/src/strings/keyBackspace.ts +0 -7
  176. package/src/strings/keyCapsLock.ts +0 -7
  177. package/src/strings/keyControl.ts +0 -7
  178. package/src/strings/keyDelete.ts +0 -7
  179. package/src/strings/keyEnter.ts +0 -7
  180. package/src/strings/keyEscape.ts +0 -7
  181. package/src/strings/keyInsert.ts +0 -7
  182. package/src/strings/keyMeta.ts +0 -7
  183. package/src/strings/keyNumpadEnter.ts +0 -7
  184. package/src/strings/keyPause.ts +0 -7
  185. package/src/strings/keyScrollLock.ts +0 -7
  186. package/src/strings/keyShift.ts +0 -7
  187. package/src/strings/keySpace.ts +0 -7
  188. package/src/strings/keyTab.ts +0 -7
  189. package/src/strings/keyboardEventKeys.ts +0 -26
  190. package/src/strings/keydownEvent.ts +0 -5
  191. package/src/strings/keypressEvent.ts +0 -5
  192. package/src/strings/keyupEvent.ts +0 -5
  193. package/src/strings/loadEvent.ts +0 -5
  194. package/src/strings/loadstartEvent.ts +0 -5
  195. package/src/strings/mouseClickEvents.ts +0 -5
  196. package/src/strings/mouseHoverEvents.ts +0 -7
  197. package/src/strings/mouseSwipeEvents.ts +0 -10
  198. package/src/strings/mouseclickEvent.ts +0 -5
  199. package/src/strings/mousedblclickEvent.ts +0 -5
  200. package/src/strings/mousedownEvent.ts +0 -5
  201. package/src/strings/mouseenterEvent.ts +0 -5
  202. package/src/strings/mousehoverEvent.ts +0 -5
  203. package/src/strings/mouseinEvent.ts +0 -5
  204. package/src/strings/mouseleaveEvent.ts +0 -5
  205. package/src/strings/mousemoveEvent.ts +0 -5
  206. package/src/strings/mouseoutEvent.ts +0 -5
  207. package/src/strings/mouseoverEvent.ts +0 -5
  208. package/src/strings/mouseupEvent.ts +0 -5
  209. package/src/strings/mousewheelEvent.ts +0 -5
  210. package/src/strings/moveEvent.ts +0 -5
  211. package/src/strings/nativeEvents.ts +0 -108
  212. package/src/strings/offsetHeight.ts +0 -5
  213. package/src/strings/offsetWidth.ts +0 -5
  214. package/src/strings/orientationchangeEvent.ts +0 -5
  215. package/src/strings/pointercancelEvent.ts +0 -5
  216. package/src/strings/pointerdownEvent.ts +0 -5
  217. package/src/strings/pointerleaveEvent.ts +0 -5
  218. package/src/strings/pointermoveEvent.ts +0 -5
  219. package/src/strings/pointerupEvent.ts +0 -5
  220. package/src/strings/readystatechangeEvent.ts +0 -5
  221. package/src/strings/removeEventListener.ts +0 -5
  222. package/src/strings/resetEvent.ts +0 -5
  223. package/src/strings/resizeEvent.ts +0 -5
  224. package/src/strings/scrollEvent.ts +0 -5
  225. package/src/strings/scrollHeight.ts +0 -5
  226. package/src/strings/scrollWidth.ts +0 -5
  227. package/src/strings/selectEvent.ts +0 -5
  228. package/src/strings/selectendEvent.ts +0 -5
  229. package/src/strings/selectstartEvent.ts +0 -5
  230. package/src/strings/submitEvent.ts +0 -5
  231. package/src/strings/tabindex.ts +0 -5
  232. package/src/strings/touchEvents.ts +0 -10
  233. package/src/strings/touchcancelEvent.ts +0 -5
  234. package/src/strings/touchendEvent.ts +0 -5
  235. package/src/strings/touchmoveEvent.ts +0 -5
  236. package/src/strings/touchstartEvent.ts +0 -5
  237. package/src/strings/transitionDelay.ts +0 -5
  238. package/src/strings/transitionDuration.ts +0 -5
  239. package/src/strings/transitionEndEvent.ts +0 -5
  240. package/src/strings/transitionProperty.ts +0 -5
  241. package/src/strings/unloadEvent.ts +0 -5
  242. package/src/strings/userAgent.ts +0 -7
  243. package/src/strings/userAgentData.ts +0 -8
  244. package/test/att.test.ts +0 -43
  245. package/test/boolean.test.ts +0 -30
  246. package/test/class.test.ts +0 -26
  247. package/test/event.test.ts +0 -39
  248. package/test/fixtures/custom-elem.js +0 -18
  249. package/test/fixtures/getExampleDom.ts +0 -52
  250. package/test/fixtures/style.css +0 -18
  251. package/test/get.test.ts +0 -150
  252. package/test/is.test.ts +0 -240
  253. package/test/misc.test.ts +0 -400
  254. package/test/selectors.test.ts +0 -90
  255. package/tsconfig.json +0 -36
  256. package/vite.config.mts +0 -45
  257. package/vitest.config-ui.mts +0 -26
  258. package/vitest.config.mts +0 -25
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `touchcancel` event.
3
- */
4
- const touchcancelEvent = "touchcancel";
5
- export default touchcancelEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `touchend` event.
3
- */
4
- const touchendEvent = "touchend";
5
- export default touchendEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `touchmove` event.
3
- */
4
- const touchmoveEvent = "touchmove";
5
- export default touchmoveEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `touchstart` event.
3
- */
4
- const touchstartEvent = "touchstart";
5
- export default touchstartEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for 'transitionDelay' string.
3
- */
4
- const transitionDelay = "transitionDelay";
5
- export default transitionDelay;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for 'transitionDuration' string.
3
- */
4
- const transitionDuration = "transitionDuration";
5
- export default transitionDuration;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for 'transitionend' string.
3
- */
4
- const transitionEndEvent = "transitionend";
5
- export default transitionEndEvent;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `transitionProperty` string for modern browsers.
3
- */
4
- const transitionProperty = "transitionProperty";
5
- export default transitionProperty;
@@ -1,5 +0,0 @@
1
- /**
2
- * A global namespace for `unload` event.
3
- */
4
- const unloadEvent = "unload";
5
- export default unloadEvent;
@@ -1,7 +0,0 @@
1
- const { userAgent: userAgentString } = navigator;
2
-
3
- /**
4
- * A global namespace for `navigator.userAgent` string.
5
- */
6
- const userAgent = userAgentString;
7
- export default userAgent;
@@ -1,8 +0,0 @@
1
- import type { NavigatorUA } from "../interface/navigatorUA";
2
-
3
- /**
4
- * A global namespace for `userAgentData` object.
5
- */
6
- const userAgentData: NavigatorUA["userAgentData"] =
7
- (navigator as NavigatorUA).userAgentData;
8
- export default userAgentData;
package/test/att.test.ts DELETED
@@ -1,43 +0,0 @@
1
- import { expect, it, describe, afterEach } from 'vitest';
2
- import { getExampleDOM } from './fixtures/getExampleDom';
3
- import * as SHORTY from '../src/index';
4
- import "./fixtures/style.css";
5
-
6
- describe('Shorty Library Tests - ATT', () => {
7
- const wrapper = document.createElement('div');
8
- afterEach(async () => {
9
- wrapper.innerHTML = '';
10
- });
11
-
12
- it('Test attr folder', () => {
13
- const container = getExampleDOM();
14
- wrapper.append(container);
15
-
16
- const {
17
- getAttribute,
18
- setAttribute,
19
- hasAttribute,
20
- removeAttribute,
21
- getAttributeNS,
22
- setAttributeNS,
23
- hasAttributeNS,
24
- removeAttributeNS,
25
- querySelector,
26
- } = SHORTY;
27
-
28
- const el = querySelector('.alert', container)!;
29
- expect(getAttribute(el, 'class')).to.have.length.above(0);
30
- setAttribute(el, 'data-att', 'momo');
31
- expect(hasAttribute(el, 'data-att')).to.be.true;
32
- removeAttribute(el, 'data-att');
33
- expect(hasAttribute(el, 'data-att')).to.be.false;
34
-
35
- const svg = querySelector('svg', container)!;
36
- const ns = 'http://www.w3.org/2000/svg';
37
- expect(hasAttributeNS(ns, svg, 'transform')).to.be.false;
38
- setAttributeNS(ns, svg, 'transform', 'scale(0.99)');
39
- expect(getAttributeNS(ns, svg, 'transform')).to.eq('scale(0.99)');
40
- removeAttributeNS(ns, svg, 'transform');
41
- expect(getAttributeNS(ns, svg, 'transform')).to.be.null;
42
- });
43
- });
@@ -1,30 +0,0 @@
1
- import { expect, it, describe } from 'vitest';
2
- import * as SHORTY from '../src/index';
3
-
4
- describe('Shorty Library Tests - BOOL', () => {
5
- it('Test boolean folder', () => {
6
- const {
7
- // these are impossible to test 100% of the branches
8
- isApple,
9
- isMobile,
10
- isFirefox,
11
- support3DTransform,
12
- supportAnimation,
13
- supportPassive,
14
- supportTouch,
15
- supportTransform,
16
- supportTransition,
17
- // querySelectorAll, getWindow
18
- } = SHORTY;
19
-
20
- expect(isApple(), 'isApple').to.be.false;
21
- expect(isMobile(), 'isMobile').to.be.false;
22
- expect(isFirefox(), 'isFirefox').to.be.false;
23
- expect(support3DTransform(), 'support3DTransform').to.be.true;
24
- expect(supportAnimation(), 'supportAnimation').to.be.true;
25
- expect(supportPassive(), 'supportPassive').to.be.true;
26
- expect(supportTouch(), 'supportTouch').to.be.false;
27
- expect(supportTransform(), 'supportTransform').to.be.true;
28
- expect(supportTransition(), 'supportTransition').to.be.true;
29
- });
30
- });
@@ -1,26 +0,0 @@
1
- import { expect, it, describe, beforeEach, vi, afterEach } from 'vitest';
2
- import { getExampleDOM } from './fixtures/getExampleDom';
3
- import * as SHORTY from '../src/index';
4
- import "./fixtures/style.css";
5
-
6
- describe('Shorty Library Tests - CLASS', () => {
7
- const wrapper = document.createElement('div');
8
- document.body.append(wrapper);
9
- afterEach(async () => {
10
- wrapper.innerHTML = '';
11
- });
12
-
13
- it('Test class folder', () => {
14
- const { addClass, hasClass, removeClass, querySelector } = SHORTY;
15
- const container = getExampleDOM();
16
- wrapper.append(container);
17
-
18
- const alert = querySelector('.alert', container);
19
- if (!alert) return;
20
-
21
- addClass(alert, 'to-be-removed');
22
- expect(hasClass(alert, 'to-be-removed')).to.be.true;
23
- removeClass(alert, 'show');
24
- expect(hasClass(alert, 'show')).to.be.false;
25
- });
26
- });
@@ -1,39 +0,0 @@
1
- import { expect, it, describe, afterEach, beforeEach, vi } from 'vitest';
2
- import { getExampleDOM } from './fixtures/getExampleDom';
3
- import * as SHORTY from '../src/index';
4
- import "./fixtures/style.css";
5
-
6
- describe('Shorty Library Tests - EVENT', () => {
7
- const wrapper = document.createElement('div');
8
- document.body.append(wrapper);
9
- afterEach(async () => {
10
- wrapper.innerHTML = '';
11
- });
12
-
13
- it('Test event folder', () => {
14
- const {
15
- // on, off are called by one
16
- one,
17
- querySelector,
18
- } = SHORTY;
19
- const container = getExampleDOM();
20
- wrapper.append(container);
21
-
22
- const el = querySelector('.alert', container);
23
- const btn = querySelector('button', container);
24
-
25
- if (!el || !btn) return;
26
-
27
- one(el, 'click', function handle(e) {
28
- el.innerText += 'click fired for ' + (e.currentTarget as HTMLElement).tagName;
29
- expect(el.innerText).toContain('click fired for DIV')
30
-
31
- });
32
-
33
- one(btn, 'click', function handle(e) {
34
- el.innerText += 'click fired for ' + (e.target as HTMLElement).tagName;
35
- expect(el.innerText).toContain('click fired for BUTTON')
36
- });
37
- btn.click();
38
- });
39
- });
@@ -1,18 +0,0 @@
1
- const CEP = document.createElement('p');
2
- CEP.innerText = 'Sample Custom Element';
3
-
4
- export default class CustomElem extends HTMLElement {
5
- constructor() {
6
- super();
7
-
8
- this.attachShadow({ mode: 'open' });
9
- }
10
- connectedCallback() {
11
- this.shadowRoot.append(CEP);
12
- }
13
- disconnectedCallback() {
14
- this.shadowRoot.innerHTML = '';
15
- }
16
- }
17
-
18
- customElements.define('custom-elem', CustomElem);
@@ -1,52 +0,0 @@
1
- const markup = `<div class="p-5">
2
- <div id="alertDemo" class="alert alert-warning alert-dismissible fade show" data-bs-op1="false" data-bs-op2="true" data-bs-op3="10" data-bs-title="" role="alert">
3
- <button role="button" type="button" class="btn-close bg-none" data-bs-target="alertDemo" data-bs-dismiss="alert" aria-label="Close">
4
- <svg viewBox="0 0 16 16" class="align-top">
5
- <title>Delete</title>
6
- <path name="x" d="M4.646 4.646a0.5 0.5 0 0 1 0.708 0L8 7.293l2.646 -2.647a0.5 0.5 0 0 1 0.708 0.708L8.707 8l2.647 2.646a0.5 0.5 0 0 1 -0.708 0.708L8 8.707l-2.646 2.647A0.5 0.5 0 0 1 4.646 10.646L7.293 8L4.646 5.354a0.5 0.5 0 0 1 0 -0.708z"></path>
7
- </svg>
8
- </button>
9
- <p><b>Holy guacamole!</b> Best check yo self, you're not looking too good.</p>
10
- <button class="btn btn-outline-secondary">
11
- ReadMore
12
- </button>
13
-
14
- <img src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgODAgNDMiIHdpZHRoPSI4MCIgaGVpZ2h0PSI0MyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4NCiAgICAgICAgICAgICAgICAgIDxyZWN0IGZpbGw9IndoaXRlIiBzdHJva2U9IiNjY2MiIHN0cm9rZS13aWR0aD0iMSIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgcng9IjUiPjwvcmVjdD4NCiAgICAgICAgICAgICAgICAgIDx0ZXh0IGRpcmVjdGlvbj0ibHRyIiBmaWxsPSIjMzMzIiB4PSIyNSIgeT0iMjUiIGZvbnQtc2l6ZT0iMTQiPklNRzwvdGV4dD4NCiAgICAgICAgICAgICAgICA8L3N2Zz4=" alt="Image">
15
- </div>
16
- <table class="table">
17
- <thead>
18
- <tr>
19
- <th>Event Type</th>
20
- <th>Description</th>
21
- </tr>
22
- </thead>
23
- <tbody>
24
- <tr>
25
- <td><code>show.bs.tooltip</code></td>
26
- <td>This event fires immediately when the <code>show</code> instance method is called.<br>
27
- <b>This event can be default prevented.</b></td>
28
- </tr>
29
- <tr>
30
- <td><code>shown.bs.tooltip</code></td>
31
- <td>This event is fired when the tooltip has been made visible to the user.</td>
32
- </tr>
33
- <tr>
34
- <td><code>hide.bs.tooltip</code></td>
35
- <td>This event is fired immediately when the <code>hide</code> instance method has been called.<br>
36
- <b>This event can be default prevented.</b></td>
37
- </tr>
38
- <tr>
39
- <td><code>hidden.bs.tooltip</code></td>
40
- <td>This event is fired when the tooltip has finished being hidden from the user.</td>
41
- </tr>
42
- </tbody>
43
- </table>
44
- </div>
45
- `;
46
-
47
- export const getExampleDOM = () => {
48
- const tempDocument = new DOMParser().parseFromString(markup, 'text/html');
49
- const container = tempDocument.body.querySelector('div')!;
50
-
51
- return container;
52
- };