@dynatrace/strato-components 0.85.120 → 1.1.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 (237) hide show
  1. package/buttons/button/Button.css +17 -17
  2. package/buttons/button/Button.js +1 -1
  3. package/buttons/button/Button.sty.js +4 -4
  4. package/content/progress/ProgressBar.css +71 -71
  5. package/content/progress/ProgressBar.d.ts +0 -7
  6. package/content/progress/ProgressBar.js +19 -45
  7. package/content/progress/ProgressBar.sty.js +5 -5
  8. package/content/progress/ProgressBarIcon.css +2 -2
  9. package/content/progress/ProgressBarIcon.sty.js +1 -1
  10. package/content/progress/ProgressBarLabel.css +3 -3
  11. package/content/progress/ProgressBarLabel.sty.js +1 -1
  12. package/content/progress/ProgressBarValue.css +5 -5
  13. package/content/progress/ProgressBarValue.sty.js +1 -1
  14. package/content/progress/ProgressCircle.css +40 -40
  15. package/content/progress/ProgressCircle.d.ts +0 -7
  16. package/content/progress/ProgressCircle.js +2 -10
  17. package/content/progress/ProgressCircle.sty.js +5 -5
  18. package/content/skeleton/Skeleton.css +6 -6
  19. package/content/skeleton/Skeleton.sty.js +1 -1
  20. package/core/components/app-root/AppRoot.css +0 -57
  21. package/core/index.d.ts +0 -2
  22. package/core/index.js +0 -2
  23. package/core/styles/focusRing.css +66 -66
  24. package/core/styles/focusRing.sty.js +2 -2
  25. package/core/utils/colorUtils.css +60 -60
  26. package/core/utils/colorUtils.sty.js +2 -2
  27. package/esm/buttons/button/Button.css +17 -17
  28. package/esm/buttons/button/Button.js +1 -1
  29. package/esm/buttons/button/Button.js.map +2 -2
  30. package/esm/buttons/button/Button.sty.js +4 -4
  31. package/esm/buttons/button/Button.sty.js.map +2 -2
  32. package/esm/content/progress/ProgressBar.css +71 -71
  33. package/esm/content/progress/ProgressBar.js +19 -45
  34. package/esm/content/progress/ProgressBar.js.map +2 -2
  35. package/esm/content/progress/ProgressBar.sty.js +5 -5
  36. package/esm/content/progress/ProgressBar.sty.js.map +2 -2
  37. package/esm/content/progress/ProgressBarIcon.css +2 -2
  38. package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
  39. package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
  40. package/esm/content/progress/ProgressBarLabel.css +3 -3
  41. package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
  42. package/esm/content/progress/ProgressBarLabel.sty.js.map +2 -2
  43. package/esm/content/progress/ProgressBarValue.css +5 -5
  44. package/esm/content/progress/ProgressBarValue.sty.js +1 -1
  45. package/esm/content/progress/ProgressBarValue.sty.js.map +2 -2
  46. package/esm/content/progress/ProgressCircle.css +40 -40
  47. package/esm/content/progress/ProgressCircle.js +2 -10
  48. package/esm/content/progress/ProgressCircle.js.map +2 -2
  49. package/esm/content/progress/ProgressCircle.sty.js +5 -5
  50. package/esm/content/progress/ProgressCircle.sty.js.map +2 -2
  51. package/esm/content/skeleton/Skeleton.css +6 -6
  52. package/esm/content/skeleton/Skeleton.sty.js +1 -1
  53. package/esm/content/skeleton/Skeleton.sty.js.map +2 -2
  54. package/esm/core/components/app-root/AppRoot.css +0 -57
  55. package/esm/core/index.js +0 -2
  56. package/esm/core/index.js.map +2 -2
  57. package/esm/core/styles/focusRing.css +66 -66
  58. package/esm/core/styles/focusRing.sty.js +2 -2
  59. package/esm/core/styles/focusRing.sty.js.map +2 -2
  60. package/esm/core/utils/colorUtils.css +60 -60
  61. package/esm/core/utils/colorUtils.sty.js +2 -2
  62. package/esm/core/utils/colorUtils.sty.js.map +2 -2
  63. package/esm/layouts/container/Container.css +4 -4
  64. package/esm/layouts/container/Container.sty.js +1 -1
  65. package/esm/layouts/container/Container.sty.js.map +1 -1
  66. package/esm/layouts/divider/Divider.css +6 -6
  67. package/esm/layouts/divider/Divider.sty.js +1 -1
  68. package/esm/layouts/divider/Divider.sty.js.map +2 -2
  69. package/esm/layouts/input-group/InputGroup.css +4 -4
  70. package/esm/layouts/input-group/InputGroup.sty.js +2 -2
  71. package/esm/layouts/input-group/InputGroup.sty.js.map +1 -1
  72. package/esm/layouts/surface/Surface.css +39 -39
  73. package/esm/layouts/surface/Surface.sty.js +2 -2
  74. package/esm/layouts/surface/Surface.sty.js.map +2 -2
  75. package/esm/layouts/surface/variables.sty.js +1 -1
  76. package/esm/layouts/surface/variables.sty.js.map +1 -1
  77. package/esm/styles/colorUtils.css +60 -60
  78. package/esm/styles/colorUtils.sty.js +2 -2
  79. package/esm/styles/colorUtils.sty.js.map +2 -2
  80. package/esm/styles/container.css +47 -47
  81. package/esm/styles/container.sty.js +2 -2
  82. package/esm/styles/container.sty.js.map +2 -2
  83. package/esm/styles/ellipsis.css +1 -1
  84. package/esm/styles/ellipsis.sty.js +1 -1
  85. package/esm/styles/ellipsis.sty.js.map +1 -1
  86. package/esm/styles/field.css +153 -153
  87. package/esm/styles/field.sty.js +2 -2
  88. package/esm/styles/field.sty.js.map +2 -2
  89. package/esm/styles/sprinkles.css +262 -262
  90. package/esm/styles/sprinkles.sty.js +1 -1
  91. package/esm/styles/sprinkles.sty.js.map +2 -2
  92. package/esm/styles/textStyle.css +8 -8
  93. package/esm/styles/textStyle.sty.js +1 -1
  94. package/esm/styles/textStyle.sty.js.map +2 -2
  95. package/esm/typography/block-quote/Blockquote.css +2 -2
  96. package/esm/typography/block-quote/Blockquote.sty.js +1 -1
  97. package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
  98. package/esm/typography/code/Code.css +1 -1
  99. package/esm/typography/code/Code.sty.js +1 -1
  100. package/esm/typography/code/Code.sty.js.map +1 -1
  101. package/esm/typography/emphasis/Emphasis.css +1 -1
  102. package/esm/typography/emphasis/Emphasis.sty.js +1 -1
  103. package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
  104. package/esm/typography/external-link/ExternalLink.css +6 -6
  105. package/esm/typography/external-link/ExternalLink.sty.js +1 -1
  106. package/esm/typography/external-link/ExternalLink.sty.js.map +1 -1
  107. package/esm/typography/heading/Heading.css +7 -7
  108. package/esm/typography/heading/Heading.sty.js +1 -1
  109. package/esm/typography/heading/Heading.sty.js.map +2 -2
  110. package/esm/typography/highlight/Highlight.css +1 -1
  111. package/esm/typography/highlight/Highlight.sty.js +1 -1
  112. package/esm/typography/highlight/Highlight.sty.js.map +1 -1
  113. package/esm/typography/link/Link.css +4 -4
  114. package/esm/typography/link/Link.sty.js +1 -1
  115. package/esm/typography/link/Link.sty.js.map +1 -1
  116. package/esm/typography/list/List.css +4 -4
  117. package/esm/typography/list/List.sty.js +2 -2
  118. package/esm/typography/list/List.sty.js.map +1 -1
  119. package/esm/typography/paragraph/Paragraph.css +3 -3
  120. package/esm/typography/paragraph/Paragraph.sty.js +1 -1
  121. package/esm/typography/paragraph/Paragraph.sty.js.map +2 -2
  122. package/esm/typography/strikethrough/Strikethrough.css +1 -1
  123. package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
  124. package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
  125. package/esm/typography/strong/Strong.css +1 -1
  126. package/esm/typography/strong/Strong.sty.js +1 -1
  127. package/esm/typography/strong/Strong.sty.js.map +1 -1
  128. package/esm/typography/text/Text.css +3 -3
  129. package/esm/typography/text/Text.sty.js +1 -1
  130. package/esm/typography/text/Text.sty.js.map +2 -2
  131. package/esm/typography/text-ellipsis/TextEllipsis.css +12 -4
  132. package/esm/typography/text-ellipsis/TextEllipsis.js +6 -3
  133. package/esm/typography/text-ellipsis/TextEllipsis.js.map +2 -2
  134. package/esm/typography/text-ellipsis/TextEllipsis.sty.js +4 -2
  135. package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +2 -2
  136. package/layouts/container/Container.css +4 -4
  137. package/layouts/container/Container.sty.js +1 -1
  138. package/layouts/divider/Divider.css +6 -6
  139. package/layouts/divider/Divider.sty.js +1 -1
  140. package/layouts/input-group/InputGroup.css +4 -4
  141. package/layouts/input-group/InputGroup.sty.js +2 -2
  142. package/layouts/surface/Surface.css +39 -39
  143. package/layouts/surface/Surface.sty.js +2 -2
  144. package/layouts/surface/variables.sty.js +1 -1
  145. package/package.json +15 -26
  146. package/styles/colorUtils.css +60 -60
  147. package/styles/colorUtils.sty.js +2 -2
  148. package/styles/container.css +47 -47
  149. package/styles/container.sty.js +2 -2
  150. package/styles/ellipsis.css +1 -1
  151. package/styles/ellipsis.sty.js +1 -1
  152. package/styles/field.css +153 -153
  153. package/styles/field.sty.js +2 -2
  154. package/styles/sprinkles.css +262 -262
  155. package/styles/sprinkles.sty.js +1 -1
  156. package/styles/textStyle.css +8 -8
  157. package/styles/textStyle.sty.js +1 -1
  158. package/typography/block-quote/Blockquote.css +2 -2
  159. package/typography/block-quote/Blockquote.sty.js +1 -1
  160. package/typography/code/Code.css +1 -1
  161. package/typography/code/Code.sty.js +1 -1
  162. package/typography/emphasis/Emphasis.css +1 -1
  163. package/typography/emphasis/Emphasis.sty.js +1 -1
  164. package/typography/external-link/ExternalLink.css +6 -6
  165. package/typography/external-link/ExternalLink.sty.js +1 -1
  166. package/typography/heading/Heading.css +7 -7
  167. package/typography/heading/Heading.sty.js +1 -1
  168. package/typography/highlight/Highlight.css +1 -1
  169. package/typography/highlight/Highlight.sty.js +1 -1
  170. package/typography/link/Link.css +4 -4
  171. package/typography/link/Link.sty.js +1 -1
  172. package/typography/list/List.css +4 -4
  173. package/typography/list/List.sty.js +2 -2
  174. package/typography/paragraph/Paragraph.css +3 -3
  175. package/typography/paragraph/Paragraph.sty.js +1 -1
  176. package/typography/strikethrough/Strikethrough.css +1 -1
  177. package/typography/strikethrough/Strikethrough.sty.js +1 -1
  178. package/typography/strong/Strong.css +1 -1
  179. package/typography/strong/Strong.sty.js +1 -1
  180. package/typography/text/Text.css +3 -3
  181. package/typography/text/Text.sty.js +1 -1
  182. package/typography/text-ellipsis/TextEllipsis.css +12 -4
  183. package/typography/text-ellipsis/TextEllipsis.js +6 -3
  184. package/typography/text-ellipsis/TextEllipsis.sty.d.ts +12 -1
  185. package/typography/text-ellipsis/TextEllipsis.sty.js +4 -2
  186. package/core/types/role-variant.d.ts +0 -12
  187. package/core/types/role-variant.js +0 -30
  188. package/esm/core/types/role-variant.js +0 -12
  189. package/esm/core/types/role-variant.js.map +0 -7
  190. package/testing/custom-render.d.ts +0 -12
  191. package/testing/custom-render.js +0 -62
  192. package/testing/index.d.ts +0 -22
  193. package/testing/index.js +0 -91
  194. package/testing/jest/index.d.ts +0 -1
  195. package/testing/jest/index.js +0 -5
  196. package/testing/jest/jest-preset.d.ts +0 -10
  197. package/testing/jest/jest-preset.js +0 -13
  198. package/testing/jest/resolver.d.ts +0 -0
  199. package/testing/jest/resolver.js +0 -27
  200. package/testing/mocks/bounding-client-rect-mock.d.ts +0 -8
  201. package/testing/mocks/bounding-client-rect-mock.js +0 -36
  202. package/testing/mocks/canvas-mock.d.ts +0 -14
  203. package/testing/mocks/canvas-mock.js +0 -192
  204. package/testing/mocks/create-mock-element.d.ts +0 -14
  205. package/testing/mocks/create-mock-element.js +0 -99
  206. package/testing/mocks/create-range-mock.d.ts +0 -10
  207. package/testing/mocks/create-range-mock.js +0 -47
  208. package/testing/mocks/dom-rect-mock.d.ts +0 -19
  209. package/testing/mocks/dom-rect-mock.js +0 -56
  210. package/testing/mocks/fetch-mock.d.ts +0 -9
  211. package/testing/mocks/fetch-mock.js +0 -38
  212. package/testing/mocks/intersection-observer-mock.d.ts +0 -10
  213. package/testing/mocks/intersection-observer-mock.js +0 -58
  214. package/testing/mocks/match-media-mock.d.ts +0 -10
  215. package/testing/mocks/match-media-mock.js +0 -45
  216. package/testing/mocks/offset-height-mock.d.ts +0 -8
  217. package/testing/mocks/offset-height-mock.js +0 -39
  218. package/testing/mocks/offset-width-mock.d.ts +0 -8
  219. package/testing/mocks/offset-width-mock.js +0 -39
  220. package/testing/mocks/pointer-event-mock.d.ts +0 -8
  221. package/testing/mocks/pointer-event-mock.js +0 -42
  222. package/testing/mocks/resize-observer-mock.d.ts +0 -11
  223. package/testing/mocks/resize-observer-mock.js +0 -42
  224. package/testing/mocks/screen-size-mock.d.ts +0 -8
  225. package/testing/mocks/screen-size-mock.js +0 -34
  226. package/testing/mocks/scroll-into-view-mock.d.ts +0 -10
  227. package/testing/mocks/scroll-into-view-mock.js +0 -34
  228. package/testing/mocks/scroll-width-mock.d.ts +0 -8
  229. package/testing/mocks/scroll-width-mock.js +0 -39
  230. package/testing/mocks/select-mock.d.ts +0 -11
  231. package/testing/mocks/select-mock.js +0 -45
  232. package/testing/mocks/table-virtualization-mock.d.ts +0 -10
  233. package/testing/mocks/table-virtualization-mock.js +0 -50
  234. package/testing/mocks/text-ellipsis-mock.d.ts +0 -8
  235. package/testing/mocks/text-ellipsis-mock.js +0 -43
  236. package/testing/setup.d.ts +0 -8
  237. package/testing/setup.js +0 -57
@@ -1,30 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var role_variant_exports = {};
19
- __export(role_variant_exports, {
20
- roleVariants: () => roleVariants
21
- });
22
- module.exports = __toCommonJS(role_variant_exports);
23
- const roleVariants = [
24
- "neutral",
25
- "primary",
26
- "success",
27
- "warning",
28
- "critical",
29
- "onAccent"
30
- ];
@@ -1,12 +0,0 @@
1
- const roleVariants = [
2
- "neutral",
3
- "primary",
4
- "success",
5
- "warning",
6
- "critical",
7
- "onAccent"
8
- ];
9
- export {
10
- roleVariants
11
- };
12
- //# sourceMappingURL=role-variant.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/core/types/role-variant.tsx"],
4
- "sourcesContent": ["/* eslint-disable deprecation/deprecation */\n\n/**\n * Defines role / color variants\n * @public\n * @deprecated Will be removed.\n */\nexport const roleVariants = [\n 'neutral',\n 'primary',\n 'success',\n 'warning',\n 'critical',\n 'onAccent',\n] as const;\n\n/**\n * Defines the types of role variants\n * @public\n * @deprecated Will be removed. You can use 'neutral' | 'primary' | 'success' | 'warning' | 'critical' instead.\n */\nexport type RoleVariantType = (typeof roleVariants)[number];\n"],
5
- "mappings": "AAOO,MAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
- "names": []
7
- }
@@ -1,12 +0,0 @@
1
- import { type RenderOptions, type RenderResult } from '@testing-library/react';
2
- import React from 'react';
3
- type RenderWithIntlOptions = {
4
- locale?: string;
5
- timeZone?: string;
6
- } & Omit<RenderOptions, 'queries'>;
7
- /** Wrapper to render components with all required providers
8
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
9
- */
10
- export declare const customRender: (ui: React.ReactElement, { locale, timeZone, wrapper: CustomWrapper, ...renderOptions }?: RenderWithIntlOptions) => RenderResult;
11
- export * from '@testing-library/react';
12
- export { customRender as render };
@@ -1,62 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var custom_render_exports = {};
30
- __export(custom_render_exports, {
31
- customRender: () => customRender,
32
- render: () => customRender
33
- });
34
- module.exports = __toCommonJS(custom_render_exports);
35
- var import_react = require("@testing-library/react");
36
- var import_react2 = __toESM(require("react"));
37
- var import_react_intl = require("react-intl");
38
- __reExport(custom_render_exports, require("@testing-library/react"), module.exports);
39
- const AllProviders = ({
40
- children,
41
- locale = "en",
42
- timeZone = "UTC"
43
- }) => {
44
- return /* @__PURE__ */ import_react2.default.createElement(import_react_intl.IntlProvider, { locale, timeZone }, children);
45
- };
46
- const DefaultWrapper = (props) => (
47
- // eslint-disable-next-line react/jsx-no-useless-fragment
48
- /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, props.children)
49
- );
50
- const customRender = (ui, {
51
- locale = "en",
52
- timeZone = "UTC",
53
- wrapper: CustomWrapper = DefaultWrapper,
54
- ...renderOptions
55
- } = {}) => {
56
- return (0, import_react.render)(ui, {
57
- wrapper: ({ children }) => {
58
- return /* @__PURE__ */ import_react2.default.createElement(AllProviders, { locale, timeZone }, /* @__PURE__ */ import_react2.default.createElement(CustomWrapper, null, children));
59
- },
60
- ...renderOptions
61
- });
62
- };
@@ -1,22 +0,0 @@
1
- import userEvent, { PointerEventsCheckLevel } from '@testing-library/user-event';
2
- export * from './custom-render.js';
3
- export { setupGetBoundingClientRectMock, clearGetBoundingClientRectMock, } from './mocks/bounding-client-rect-mock.js';
4
- export { createMockElement } from './mocks/create-mock-element.js';
5
- export { setupCanvasMeasureTextMock, clearCanvasMeasureTextMock, } from './mocks/canvas-mock.js';
6
- export { setupResizeObserverMock, clearResizeObserverMock, } from './mocks/resize-observer-mock.js';
7
- export { _setupSelectMocks } from './mocks/select-mock.js';
8
- export { setupOffsetWidthMock, clearOffsetWidthMock, } from './mocks/offset-width-mock.js';
9
- export { setupOffsetHeightMock, clearOffsetHeightMock, } from './mocks/offset-height-mock.js';
10
- export { setupDomRectMock, clearDomRectMock } from './mocks/dom-rect-mock.js';
11
- export { setupMatchMediaMock, clearMatchMediaMock, } from './mocks/match-media-mock.js';
12
- export { setupPointerEventMock, clearPointerEventMock, } from './mocks/pointer-event-mock.js';
13
- export { setupIntersectionObserverMock, clearIntersectionObserverMock, } from './mocks/intersection-observer-mock.js';
14
- export { setupCreateRangeMock, clearCreateRangeMock, } from './mocks/create-range-mock.js';
15
- export { setupScreenSizeMock, clearScreenSizeMock, } from './mocks/screen-size-mock.js';
16
- export { setupScrollIntoViewMock, clearScrollIntoViewMock, } from './mocks/scroll-into-view-mock.js';
17
- export { setupScrollWidthMock, clearScrollWidthMock, } from './mocks/scroll-width-mock.js';
18
- export { setupFetchMock, clearFetchMock } from './mocks/fetch-mock.js';
19
- export { setupTableVirtualizationMock, clearTableVirtualizationMock, } from './mocks/table-virtualization-mock.js';
20
- export { setupTextEllipsisMock, clearTextEllipsisMock, } from './mocks/text-ellipsis-mock.js';
21
- export { setup, clear } from './setup.js';
22
- export { userEvent, PointerEventsCheckLevel };
package/testing/index.js DELETED
@@ -1,91 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var testing_exports = {};
30
- __export(testing_exports, {
31
- PointerEventsCheckLevel: () => import_user_event.PointerEventsCheckLevel,
32
- _setupSelectMocks: () => import_select_mock._setupSelectMocks,
33
- clear: () => import_setup.clear,
34
- clearCanvasMeasureTextMock: () => import_canvas_mock.clearCanvasMeasureTextMock,
35
- clearCreateRangeMock: () => import_create_range_mock.clearCreateRangeMock,
36
- clearDomRectMock: () => import_dom_rect_mock.clearDomRectMock,
37
- clearFetchMock: () => import_fetch_mock.clearFetchMock,
38
- clearGetBoundingClientRectMock: () => import_bounding_client_rect_mock.clearGetBoundingClientRectMock,
39
- clearIntersectionObserverMock: () => import_intersection_observer_mock.clearIntersectionObserverMock,
40
- clearMatchMediaMock: () => import_match_media_mock.clearMatchMediaMock,
41
- clearOffsetHeightMock: () => import_offset_height_mock.clearOffsetHeightMock,
42
- clearOffsetWidthMock: () => import_offset_width_mock.clearOffsetWidthMock,
43
- clearPointerEventMock: () => import_pointer_event_mock.clearPointerEventMock,
44
- clearResizeObserverMock: () => import_resize_observer_mock.clearResizeObserverMock,
45
- clearScreenSizeMock: () => import_screen_size_mock.clearScreenSizeMock,
46
- clearScrollIntoViewMock: () => import_scroll_into_view_mock.clearScrollIntoViewMock,
47
- clearScrollWidthMock: () => import_scroll_width_mock.clearScrollWidthMock,
48
- clearTableVirtualizationMock: () => import_table_virtualization_mock.clearTableVirtualizationMock,
49
- clearTextEllipsisMock: () => import_text_ellipsis_mock.clearTextEllipsisMock,
50
- createMockElement: () => import_create_mock_element.createMockElement,
51
- setup: () => import_setup.setup,
52
- setupCanvasMeasureTextMock: () => import_canvas_mock.setupCanvasMeasureTextMock,
53
- setupCreateRangeMock: () => import_create_range_mock.setupCreateRangeMock,
54
- setupDomRectMock: () => import_dom_rect_mock.setupDomRectMock,
55
- setupFetchMock: () => import_fetch_mock.setupFetchMock,
56
- setupGetBoundingClientRectMock: () => import_bounding_client_rect_mock.setupGetBoundingClientRectMock,
57
- setupIntersectionObserverMock: () => import_intersection_observer_mock.setupIntersectionObserverMock,
58
- setupMatchMediaMock: () => import_match_media_mock.setupMatchMediaMock,
59
- setupOffsetHeightMock: () => import_offset_height_mock.setupOffsetHeightMock,
60
- setupOffsetWidthMock: () => import_offset_width_mock.setupOffsetWidthMock,
61
- setupPointerEventMock: () => import_pointer_event_mock.setupPointerEventMock,
62
- setupResizeObserverMock: () => import_resize_observer_mock.setupResizeObserverMock,
63
- setupScreenSizeMock: () => import_screen_size_mock.setupScreenSizeMock,
64
- setupScrollIntoViewMock: () => import_scroll_into_view_mock.setupScrollIntoViewMock,
65
- setupScrollWidthMock: () => import_scroll_width_mock.setupScrollWidthMock,
66
- setupTableVirtualizationMock: () => import_table_virtualization_mock.setupTableVirtualizationMock,
67
- setupTextEllipsisMock: () => import_text_ellipsis_mock.setupTextEllipsisMock,
68
- userEvent: () => import_user_event.default
69
- });
70
- module.exports = __toCommonJS(testing_exports);
71
- var import_user_event = __toESM(require("@testing-library/user-event"));
72
- __reExport(testing_exports, require("./custom-render.js"), module.exports);
73
- var import_bounding_client_rect_mock = require("./mocks/bounding-client-rect-mock.js");
74
- var import_create_mock_element = require("./mocks/create-mock-element.js");
75
- var import_canvas_mock = require("./mocks/canvas-mock.js");
76
- var import_resize_observer_mock = require("./mocks/resize-observer-mock.js");
77
- var import_select_mock = require("./mocks/select-mock.js");
78
- var import_offset_width_mock = require("./mocks/offset-width-mock.js");
79
- var import_offset_height_mock = require("./mocks/offset-height-mock.js");
80
- var import_dom_rect_mock = require("./mocks/dom-rect-mock.js");
81
- var import_match_media_mock = require("./mocks/match-media-mock.js");
82
- var import_pointer_event_mock = require("./mocks/pointer-event-mock.js");
83
- var import_intersection_observer_mock = require("./mocks/intersection-observer-mock.js");
84
- var import_create_range_mock = require("./mocks/create-range-mock.js");
85
- var import_screen_size_mock = require("./mocks/screen-size-mock.js");
86
- var import_scroll_into_view_mock = require("./mocks/scroll-into-view-mock.js");
87
- var import_scroll_width_mock = require("./mocks/scroll-width-mock.js");
88
- var import_fetch_mock = require("./mocks/fetch-mock.js");
89
- var import_table_virtualization_mock = require("./mocks/table-virtualization-mock.js");
90
- var import_text_ellipsis_mock = require("./mocks/text-ellipsis-mock.js");
91
- var import_setup = require("./setup.js");
@@ -1 +0,0 @@
1
- export { stratoPreset } from './jest-preset.js';
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stratoPreset = void 0;
4
- var jest_preset_js_1 = require("./jest-preset.js");
5
- Object.defineProperty(exports, "stratoPreset", { enumerable: true, get: function () { return jest_preset_js_1.stratoPreset; } });
@@ -1,10 +0,0 @@
1
- /**
2
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
3
- */
4
- export declare const stratoPreset: {
5
- moduleNameMapper: {
6
- nanoid: string;
7
- '\\.(css|less|scss|sass)$': string;
8
- };
9
- resolver: string;
10
- };
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stratoPreset = void 0;
4
- /**
5
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
6
- */
7
- exports.stratoPreset = {
8
- moduleNameMapper: {
9
- nanoid: '<rootDir>/node_modules/nanoid/index.cjs',
10
- '\\.(css|less|scss|sass)$': 'identity-obj-proxy',
11
- },
12
- resolver: '<rootDir>/node_modules/@dynatrace/strato-components/testing/jest/resolver.js',
13
- };
File without changes
@@ -1,27 +0,0 @@
1
- module.exports = (path, options) => {
2
- // Call the defaultResolver, so we leverage its cache, error handling, etc.
3
- return options.defaultResolver(path, {
4
- ...options,
5
- // Use packageFilter to process parsed `package.json` before the resolution (see https://www.npmjs.com/package/resolve#resolveid-opts-cb)
6
- packageFilter: (pkg) => {
7
- // This is a workaround for https://github.com/uuidjs/uuid/pull/616
8
- //
9
- // jest-environment-jsdom 28+ tries to use browser exports instead of default exports,
10
- // but uuid only offers an ESM browser export and not a CommonJS one. Jest does not yet
11
- // support ESM modules natively, so this causes a Jest error related to trying to parse
12
- // "export" syntax.
13
- //
14
- // This workaround prevents Jest from considering uuid's module-based exports at all;
15
- // it falls back to uuid's CommonJS+node "main" property.
16
- //
17
- // Once we're able to migrate our Jest config to ESM and a browser crypto
18
- // implementation is available for the browser+ESM version of uuid to use (eg, via
19
- // https://github.com/jsdom/jsdom/pull/3352 or a similar polyfill), this can go away.
20
- if (pkg.name === 'uuid') {
21
- delete pkg['exports'];
22
- delete pkg['module'];
23
- }
24
- return pkg;
25
- },
26
- });
27
- };
@@ -1,8 +0,0 @@
1
- /** Mocks the `getBoundingClientRect()` function on all HTMLElements.
2
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
3
- */
4
- export declare function setupGetBoundingClientRectMock(widthOrMockFn: number | (() => DOMRect | null), height?: number, x?: number, y?: number, top?: number, right?: number, bottom?: number, left?: number): void;
5
- /** Clears mocked `getBoundingClientRect()` function on HTMLElements.
6
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
7
- */
8
- export declare function clearGetBoundingClientRectMock(): void;
@@ -1,36 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var bounding_client_rect_mock_exports = {};
19
- __export(bounding_client_rect_mock_exports, {
20
- clearGetBoundingClientRectMock: () => clearGetBoundingClientRectMock,
21
- setupGetBoundingClientRectMock: () => setupGetBoundingClientRectMock
22
- });
23
- module.exports = __toCommonJS(bounding_client_rect_mock_exports);
24
- var import_dom_rect_mock = require("./dom-rect-mock.js");
25
- const pristineGetBoundingClientRect = Element.prototype.getBoundingClientRect;
26
- function setupGetBoundingClientRectMock(widthOrMockFn, height, x, y, top, right, bottom, left) {
27
- Object.defineProperty(Element.prototype, "getBoundingClientRect", {
28
- writable: true,
29
- value: typeof widthOrMockFn === "number" ? () => (0, import_dom_rect_mock.createDOMRect)(widthOrMockFn, height, x, y, top, right, bottom, left) : function getBoundingClientRectMock() {
30
- return widthOrMockFn.call(this) ?? import_dom_rect_mock.FALLBACK_DOM_RECT;
31
- }
32
- });
33
- }
34
- function clearGetBoundingClientRectMock() {
35
- Element.prototype.getBoundingClientRect = pristineGetBoundingClientRect;
36
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Mocks the `getContext()` function of HTMLCanvasElements so it returns an
3
- * object with an implementation of `measureText()`. If no `mockTextWidth` is
4
- * set, it will fall back to a default implementation that attempts to calculate
5
- * a reasonable value for each given string.
6
- *
7
- * @param mockTextWidth - The value returned by the `measureText()` mock for all strings
8
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
9
- */
10
- export declare function setupCanvasMeasureTextMock(mockTextWidth?: number): void;
11
- /** Clears mocked `getContext()` function on HTMLCanvasElements.
12
- * @deprecated The testing subpackage is deprecated. Please switch to the `@dynatrace/strato-components-testing` package.
13
- */
14
- export declare function clearCanvasMeasureTextMock(): void;
@@ -1,192 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var canvas_mock_exports = {};
19
- __export(canvas_mock_exports, {
20
- clearCanvasMeasureTextMock: () => clearCanvasMeasureTextMock,
21
- setupCanvasMeasureTextMock: () => setupCanvasMeasureTextMock
22
- });
23
- module.exports = __toCommonJS(canvas_mock_exports);
24
- const AVG_CHARACTER_WIDTH = 8;
25
- const TEXT_WIDTH_MAPPINGS = {
26
- "\u2026": 11,
27
- "0": 9,
28
- "1": 7,
29
- "2": 9,
30
- "3": 8,
31
- "4": 9,
32
- "5": 10,
33
- "6": 10,
34
- "7": 9,
35
- "8": 9,
36
- "9": 8,
37
- " ": 0,
38
- "!": 4,
39
- '"': 6,
40
- "#": 10,
41
- $: 9,
42
- "%": 12,
43
- "&": 10,
44
- "'": 2,
45
- "(": 7,
46
- ")": 5,
47
- "*": 7,
48
- "+": 9,
49
- ",": 3,
50
- "-": 5,
51
- ".": 4,
52
- "/": 7,
53
- ":": 4,
54
- ";": 3,
55
- "<": 7,
56
- "=": 9,
57
- ">": 9,
58
- "?": 7,
59
- "@": 14,
60
- A: 11,
61
- B: 11,
62
- C: 10,
63
- D: 11,
64
- E: 10,
65
- F: 10,
66
- G: 10,
67
- H: 12,
68
- I: 4,
69
- J: 8,
70
- K: 12,
71
- L: 10,
72
- M: 14,
73
- N: 12,
74
- O: 11,
75
- P: 11,
76
- Q: 11,
77
- R: 11,
78
- S: 9,
79
- T: 10,
80
- U: 11,
81
- V: 10,
82
- W: 14,
83
- X: 10,
84
- Y: 10,
85
- Z: 9,
86
- "[": 6,
87
- "\\": 7,
88
- "]": 4,
89
- "^": 7,
90
- _: 8,
91
- "`": 4,
92
- a: 8,
93
- b: 10,
94
- c: 8,
95
- d: 8,
96
- e: 8,
97
- f: 6,
98
- g: 8,
99
- h: 9,
100
- i: 4,
101
- j: 4,
102
- k: 10,
103
- l: 4,
104
- m: 14,
105
- n: 9,
106
- o: 9,
107
- p: 10,
108
- q: 8,
109
- r: 7,
110
- s: 8,
111
- t: 5,
112
- u: 9,
113
- v: 8,
114
- w: 12,
115
- x: 8,
116
- y: 8,
117
- z: 8,
118
- "{": 6,
119
- "|": 4,
120
- "}": 5,
121
- "~": 11
122
- };
123
- function getCharWidth(character) {
124
- return TEXT_WIDTH_MAPPINGS[character] ?? AVG_CHARACTER_WIDTH;
125
- }
126
- const pristineGetContext = HTMLCanvasElement.prototype.getContext;
127
- function setupCanvasMeasureTextMock(mockTextWidth) {
128
- Object.defineProperty(HTMLCanvasElement.prototype, "getContext", {
129
- writable: true,
130
- value: () => ({
131
- measureText: (text) => {
132
- const charWidth = mockTextWidth !== void 0 ? mockTextWidth : [...text].reduce((prev, curr) => prev + getCharWidth(curr), 0);
133
- return {
134
- width: charWidth,
135
- actualBoundingBoxLeft: 0,
136
- actualBoundingBoxRight: charWidth,
137
- fontBoundingBoxAscent: 0,
138
- fontBoundingBoxDescent: 0,
139
- actualBoundingBoxAscent: 0,
140
- actualBoundingBoxDescent: 0,
141
- alphabeticBaseline: 0,
142
- emHeightAscent: 0,
143
- emHeightDescent: 0,
144
- hangingBaseline: 0,
145
- ideographicBaseline: 0
146
- };
147
- },
148
- scale: () => {
149
- return null;
150
- },
151
- clearRect: () => {
152
- return null;
153
- },
154
- draw: () => {
155
- return null;
156
- },
157
- beginPath: () => {
158
- return null;
159
- },
160
- stroke: () => {
161
- return null;
162
- },
163
- closePath: () => {
164
- return null;
165
- },
166
- moveTo: () => {
167
- return null;
168
- },
169
- lineTo: () => {
170
- return null;
171
- },
172
- arc: () => {
173
- return null;
174
- },
175
- fill: () => {
176
- return null;
177
- },
178
- rect: () => {
179
- return null;
180
- },
181
- save: () => {
182
- return null;
183
- },
184
- restore: () => {
185
- return null;
186
- }
187
- })
188
- });
189
- }
190
- function clearCanvasMeasureTextMock() {
191
- HTMLCanvasElement.prototype.getContext = pristineGetContext;
192
- }
@@ -1,14 +0,0 @@
1
- /** Creates a mock element: https://github.com/jsdom/jsdom/issues/653
2
- * @deprecated The testing subpackage is deprecated.
3
- */
4
- export declare function createMockElement(
5
- /** Element tag name */
6
- elementOrTag: HTMLElement | string,
7
- /** Horizontal offset */
8
- left: number,
9
- /** Vertical offset */
10
- top: number,
11
- /** Element width */
12
- width: number,
13
- /** Element height */
14
- height: number): HTMLElement;