@dynatrace/strato-components 1.6.2 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/buttons/button/Button.css +16 -16
- package/buttons/button/Button.js +1 -1
- package/buttons/button/Button.sty.js +4 -4
- package/buttons/intent-button/IntentButton.js +1 -1
- package/content/progress/ProgressBar.css +71 -71
- package/content/progress/ProgressBar.sty.js +5 -5
- package/content/progress/ProgressBarIcon.css +2 -2
- package/content/progress/ProgressBarIcon.sty.js +1 -1
- package/content/progress/ProgressBarLabel.css +3 -3
- package/content/progress/ProgressBarLabel.sty.js +1 -1
- package/content/progress/ProgressBarValue.css +5 -5
- package/content/progress/ProgressBarValue.sty.js +1 -1
- package/content/progress/ProgressCircle.css +40 -40
- package/content/progress/ProgressCircle.sty.js +5 -5
- package/content/skeleton/Skeleton.css +6 -6
- package/content/skeleton/Skeleton.sty.js +1 -1
- package/core/index.d.ts +0 -4
- package/core/index.js +0 -8
- package/core/styles/focusRing.css +66 -66
- package/core/styles/focusRing.sty.js +2 -2
- package/core/utils/colorUtils.css +60 -60
- package/core/utils/colorUtils.sty.js +2 -2
- package/core/utils/isBrowser.js +1 -1
- package/esm/buttons/button/Button.css +16 -16
- package/esm/buttons/button/Button.js +1 -1
- package/esm/buttons/button/Button.js.map +2 -2
- package/esm/buttons/button/Button.sty.js +4 -4
- package/esm/buttons/button/Button.sty.js.map +1 -1
- package/esm/buttons/intent-button/IntentButton.js +1 -1
- package/esm/buttons/intent-button/IntentButton.js.map +1 -1
- package/esm/content/progress/ProgressBar.css +71 -71
- package/esm/content/progress/ProgressBar.js.map +2 -2
- package/esm/content/progress/ProgressBar.sty.js +5 -5
- package/esm/content/progress/ProgressBar.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarIcon.css +2 -2
- package/esm/content/progress/ProgressBarIcon.js.map +2 -2
- package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
- package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarLabel.css +3 -3
- package/esm/content/progress/ProgressBarLabel.js.map +2 -2
- package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
- package/esm/content/progress/ProgressBarLabel.sty.js.map +1 -1
- package/esm/content/progress/ProgressBarValue.css +5 -5
- package/esm/content/progress/ProgressBarValue.js.map +2 -2
- package/esm/content/progress/ProgressBarValue.sty.js +1 -1
- package/esm/content/progress/ProgressBarValue.sty.js.map +1 -1
- package/esm/content/progress/ProgressCircle.css +40 -40
- package/esm/content/progress/ProgressCircle.js.map +2 -2
- package/esm/content/progress/ProgressCircle.sty.js +5 -5
- package/esm/content/progress/ProgressCircle.sty.js.map +1 -1
- package/esm/content/progress/contexts/SharedProgressBarPropsContext.js.map +2 -2
- package/esm/content/skeleton/Skeleton.css +6 -6
- package/esm/content/skeleton/Skeleton.sty.js +1 -1
- package/esm/content/skeleton/Skeleton.sty.js.map +1 -1
- package/esm/core/index.js +0 -8
- package/esm/core/index.js.map +2 -2
- package/esm/core/styles/focusRing.css +66 -66
- package/esm/core/styles/focusRing.sty.js +2 -2
- package/esm/core/styles/focusRing.sty.js.map +1 -1
- package/esm/core/utils/colorUtils.css +60 -60
- package/esm/core/utils/colorUtils.sty.js +2 -2
- package/esm/core/utils/colorUtils.sty.js.map +1 -1
- package/esm/core/utils/isBrowser.js +1 -1
- package/esm/core/utils/isBrowser.js.map +1 -1
- package/esm/core/utils/merge-props.js.map +2 -2
- package/esm/layouts/container/Container.css +4 -4
- package/esm/layouts/container/Container.sty.js +1 -1
- package/esm/layouts/container/Container.sty.js.map +1 -1
- package/esm/layouts/divider/Divider.css +6 -6
- package/esm/layouts/divider/Divider.sty.js +1 -1
- package/esm/layouts/divider/Divider.sty.js.map +1 -1
- package/esm/layouts/surface/Surface.css +39 -39
- package/esm/layouts/surface/Surface.sty.js +2 -2
- package/esm/layouts/surface/Surface.sty.js.map +1 -1
- package/esm/layouts/surface/variables.sty.js +1 -1
- package/esm/layouts/surface/variables.sty.js.map +1 -1
- package/esm/styles/colorUtils.css +60 -60
- package/esm/styles/colorUtils.sty.js +2 -2
- package/esm/styles/colorUtils.sty.js.map +1 -1
- package/esm/styles/container.css +47 -47
- package/esm/styles/container.sty.js +2 -2
- package/esm/styles/container.sty.js.map +1 -1
- package/esm/styles/ellipsis.css +1 -1
- package/esm/styles/ellipsis.sty.js +1 -1
- package/esm/styles/ellipsis.sty.js.map +1 -1
- package/esm/styles/field.css +153 -153
- package/esm/styles/field.sty.js +2 -2
- package/esm/styles/field.sty.js.map +1 -1
- package/esm/styles/sprinkles.css +262 -262
- package/esm/styles/sprinkles.sty.js +1 -1
- package/esm/styles/sprinkles.sty.js.map +1 -1
- package/esm/styles/textStyle.css +8 -8
- package/esm/styles/textStyle.sty.js +1 -1
- package/esm/styles/textStyle.sty.js.map +1 -1
- package/esm/typography/block-quote/Blockquote.css +2 -2
- package/esm/typography/block-quote/Blockquote.sty.js +1 -1
- package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
- package/esm/typography/code/Code.css +1 -1
- package/esm/typography/code/Code.sty.js +1 -1
- package/esm/typography/code/Code.sty.js.map +1 -1
- package/esm/typography/emphasis/Emphasis.css +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js +1 -1
- package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
- package/esm/typography/external-link/ExternalLink.css +6 -6
- package/esm/typography/external-link/ExternalLink.sty.js +1 -1
- package/esm/typography/external-link/ExternalLink.sty.js.map +1 -1
- package/esm/typography/heading/Heading.css +7 -7
- package/esm/typography/heading/Heading.sty.js +1 -1
- package/esm/typography/heading/Heading.sty.js.map +1 -1
- package/esm/typography/highlight/Highlight.css +1 -1
- package/esm/typography/highlight/Highlight.js +1 -1
- package/esm/typography/highlight/Highlight.js.map +2 -2
- package/esm/typography/highlight/Highlight.sty.js +1 -1
- package/esm/typography/highlight/Highlight.sty.js.map +1 -1
- package/esm/typography/index.js.map +1 -1
- package/esm/typography/link/Link.css +4 -4
- package/esm/typography/link/Link.sty.js +1 -1
- package/esm/typography/link/Link.sty.js.map +1 -1
- package/esm/typography/list/List.css +4 -4
- package/esm/typography/list/List.sty.js +2 -2
- package/esm/typography/list/List.sty.js.map +1 -1
- package/esm/typography/paragraph/Paragraph.css +3 -3
- package/esm/typography/paragraph/Paragraph.sty.js +1 -1
- package/esm/typography/paragraph/Paragraph.sty.js.map +1 -1
- package/esm/typography/strikethrough/Strikethrough.css +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
- package/esm/typography/strong/Strong.css +1 -1
- package/esm/typography/strong/Strong.sty.js +1 -1
- package/esm/typography/strong/Strong.sty.js.map +1 -1
- package/esm/typography/text/Text.css +3 -3
- package/esm/typography/text/Text.sty.js +1 -1
- package/esm/typography/text/Text.sty.js.map +1 -1
- package/esm/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/esm/typography/text-ellipsis/TextEllipsis.js +1 -9
- package/esm/typography/text-ellipsis/TextEllipsis.js.map +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
- package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +1 -1
- package/esm/typography/utils.js +16 -4
- package/esm/typography/utils.js.map +2 -2
- package/layouts/container/Container.css +4 -4
- package/layouts/container/Container.sty.js +1 -1
- package/layouts/divider/Divider.css +6 -6
- package/layouts/divider/Divider.sty.js +1 -1
- package/layouts/surface/Surface.css +39 -39
- package/layouts/surface/Surface.sty.js +2 -2
- package/layouts/surface/variables.sty.js +1 -1
- package/package.json +3 -3
- package/styles/colorUtils.css +60 -60
- package/styles/colorUtils.sty.js +2 -2
- package/styles/container.css +47 -47
- package/styles/container.sty.js +2 -2
- package/styles/ellipsis.css +1 -1
- package/styles/ellipsis.sty.js +1 -1
- package/styles/field.css +153 -153
- package/styles/field.sty.js +2 -2
- package/styles/sprinkles.css +262 -262
- package/styles/sprinkles.sty.js +1 -1
- package/styles/textStyle.css +8 -8
- package/styles/textStyle.sty.js +1 -1
- package/typography/block-quote/Blockquote.css +2 -2
- package/typography/block-quote/Blockquote.sty.js +1 -1
- package/typography/code/Code.css +1 -1
- package/typography/code/Code.sty.js +1 -1
- package/typography/emphasis/Emphasis.css +1 -1
- package/typography/emphasis/Emphasis.sty.js +1 -1
- package/typography/external-link/ExternalLink.css +6 -6
- package/typography/external-link/ExternalLink.sty.js +1 -1
- package/typography/heading/Heading.css +7 -7
- package/typography/heading/Heading.sty.js +1 -1
- package/typography/highlight/Highlight.css +1 -1
- package/typography/highlight/Highlight.js +1 -1
- package/typography/highlight/Highlight.sty.js +1 -1
- package/typography/index.d.ts +1 -1
- package/typography/link/Link.css +4 -4
- package/typography/link/Link.sty.js +1 -1
- package/typography/list/List.css +4 -4
- package/typography/list/List.sty.js +2 -2
- package/typography/paragraph/Paragraph.css +3 -3
- package/typography/paragraph/Paragraph.sty.js +1 -1
- package/typography/strikethrough/Strikethrough.css +1 -1
- package/typography/strikethrough/Strikethrough.sty.js +1 -1
- package/typography/strong/Strong.css +1 -1
- package/typography/strong/Strong.sty.js +1 -1
- package/typography/text/Text.css +3 -3
- package/typography/text/Text.sty.js +1 -1
- package/typography/text-ellipsis/TextEllipsis.css +6 -6
- package/typography/text-ellipsis/TextEllipsis.d.ts +2 -2
- package/typography/text-ellipsis/TextEllipsis.js +1 -9
- package/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
- package/typography/utils.js +16 -4
- package/core/hooks/useId.d.ts +0 -12
- package/core/hooks/useId.js +0 -33
- package/core/utils/_is-string-children.d.ts +0 -6
- package/core/utils/_is-string-children.js +0 -35
- package/core/utils/seed-random.d.ts +0 -5
- package/core/utils/seed-random.js +0 -35
- package/core/utils/uuidv4.d.ts +0 -5
- package/core/utils/uuidv4.js +0 -32
- package/esm/core/hooks/useId.js +0 -14
- package/esm/core/hooks/useId.js.map +0 -7
- package/esm/core/utils/_is-string-children.js +0 -16
- package/esm/core/utils/_is-string-children.js.map +0 -7
- package/esm/core/utils/seed-random.js +0 -16
- package/esm/core/utils/seed-random.js.map +0 -7
- package/esm/core/utils/uuidv4.js +0 -13
- package/esm/core/utils/uuidv4.js.map +0 -7
package/core/hooks/useId.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook used to generate a unique identifier.
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export declare const useId: (props?: {
|
|
6
|
-
/** If a prefix is defined, the hook prepends the prefix with a hyphen to the generated id.
|
|
7
|
-
* @defaultValue 'strato'
|
|
8
|
-
*/
|
|
9
|
-
prefix?: string;
|
|
10
|
-
/** If a seed is defined, the hook uses a seeded random function to generate the id consistently. */
|
|
11
|
-
seed?: number;
|
|
12
|
-
}) => string;
|
package/core/hooks/useId.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var useId_exports = {};
|
|
20
|
-
__export(useId_exports, {
|
|
21
|
-
useId: () => useId
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(useId_exports);
|
|
24
|
-
var import_react = require("react");
|
|
25
|
-
var import_uuidv4 = require("../utils/uuidv4.js");
|
|
26
|
-
const useId = (props = {}) => {
|
|
27
|
-
const { prefix = "strato", seed } = props;
|
|
28
|
-
const generatedId = (0, import_react.useMemo)(
|
|
29
|
-
() => `${prefix}-${(0, import_uuidv4.uuidv4)(seed)}`,
|
|
30
|
-
[prefix, seed]
|
|
31
|
-
);
|
|
32
|
-
return generatedId;
|
|
33
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var is_string_children_exports = {};
|
|
20
|
-
__export(is_string_children_exports, {
|
|
21
|
-
isStringChildren: () => isStringChildren
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(is_string_children_exports);
|
|
24
|
-
var import_react = require("react");
|
|
25
|
-
var import_react_intl = require("react-intl");
|
|
26
|
-
var import_react_is = require("react-is");
|
|
27
|
-
function isStringChildren(children) {
|
|
28
|
-
const childrenArray = import_react.Children.toArray(children);
|
|
29
|
-
if (!childrenArray.some(import_react_is.isElement)) {
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
return childrenArray.every(
|
|
33
|
-
(child) => !(0, import_react_is.isElement)(child) || (0, import_react_is.isElement)(child) && child.type && child.type === import_react_intl.FormattedMessage
|
|
34
|
-
);
|
|
35
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var seed_random_exports = {};
|
|
20
|
-
__export(seed_random_exports, {
|
|
21
|
-
mulberry32: () => mulberry32
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(seed_random_exports);
|
|
24
|
-
const memoizedRandomGenerators = {};
|
|
25
|
-
function mulberry32(seed) {
|
|
26
|
-
if (memoizedRandomGenerators[seed] === void 0) {
|
|
27
|
-
memoizedRandomGenerators[seed] = () => {
|
|
28
|
-
let t = seed += 1831565813;
|
|
29
|
-
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
30
|
-
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
31
|
-
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
return memoizedRandomGenerators[seed];
|
|
35
|
-
}
|
package/core/utils/uuidv4.d.ts
DELETED
package/core/utils/uuidv4.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var uuidv4_exports = {};
|
|
20
|
-
__export(uuidv4_exports, {
|
|
21
|
-
uuidv4: () => uuidv4
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(uuidv4_exports);
|
|
24
|
-
var import_seed_random = require("./seed-random.js");
|
|
25
|
-
function uuidv4(seed) {
|
|
26
|
-
const random = seed !== void 0 ? (0, import_seed_random.mulberry32)(seed) : Math.random;
|
|
27
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (char) => {
|
|
28
|
-
const randomNumber = random() * 16 | 0;
|
|
29
|
-
const value = char === "x" ? randomNumber : randomNumber & 3 | 8;
|
|
30
|
-
return value.toString(16);
|
|
31
|
-
});
|
|
32
|
-
}
|
package/esm/core/hooks/useId.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { useMemo } from "react";
|
|
2
|
-
import { uuidv4 } from "../utils/uuidv4.js";
|
|
3
|
-
const useId = (props = {}) => {
|
|
4
|
-
const { prefix = "strato", seed } = props;
|
|
5
|
-
const generatedId = useMemo(
|
|
6
|
-
() => `${prefix}-${uuidv4(seed)}`,
|
|
7
|
-
[prefix, seed]
|
|
8
|
-
);
|
|
9
|
-
return generatedId;
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
useId
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=useId.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/core/hooks/useId.ts"],
|
|
4
|
-
"sourcesContent": ["import { useMemo } from 'react';\n\nimport { uuidv4 } from '../utils/uuidv4.js';\n\n/**\n * Hook used to generate a unique identifier.\n * @internal\n */\nexport const useId = (\n props: {\n /** If a prefix is defined, the hook prepends the prefix with a hyphen to the generated id.\n * @defaultValue 'strato'\n */\n prefix?: string;\n /** If a seed is defined, the hook uses a seeded random function to generate the id consistently. */\n seed?: number;\n } = {},\n) => {\n const { prefix = 'strato', seed } = props;\n\n const generatedId = useMemo(\n () => `${prefix}-${uuidv4(seed)}`,\n [prefix, seed],\n );\n\n return generatedId;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,cAAc;AAMhB,MAAM,QAAQ,CACnB,QAOI,CAAC,MACF;AACH,QAAM,EAAE,SAAS,UAAU,KAAK,IAAI;AAEpC,QAAM,cAAc;AAAA,IAClB,MAAM,GAAG,MAAM,IAAI,OAAO,IAAI,CAAC;AAAA,IAC/B,CAAC,QAAQ,IAAI;AAAA,EACf;AAEA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Children } from "react";
|
|
2
|
-
import { FormattedMessage } from "react-intl";
|
|
3
|
-
import { isElement } from "react-is";
|
|
4
|
-
function isStringChildren(children) {
|
|
5
|
-
const childrenArray = Children.toArray(children);
|
|
6
|
-
if (!childrenArray.some(isElement)) {
|
|
7
|
-
return true;
|
|
8
|
-
}
|
|
9
|
-
return childrenArray.every(
|
|
10
|
-
(child) => !isElement(child) || isElement(child) && child.type && child.type === FormattedMessage
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
isStringChildren
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=_is-string-children.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/core/utils/_is-string-children.ts"],
|
|
4
|
-
"sourcesContent": ["import { type ReactNode, Children } from 'react';\nimport { FormattedMessage } from 'react-intl';\nimport { isElement } from 'react-is';\n\n/**\n * Returns whether children only consist of text nodes.\n * @internal\n */\nexport function isStringChildren(children: ReactNode): children is string {\n const childrenArray = Children.toArray(children);\n\n if (!childrenArray.some(isElement)) {\n return true; // All children are strings\n }\n\n return childrenArray.every(\n (child) =>\n !isElement(child) ||\n (isElement(child) && child.type && child.type === FormattedMessage),\n );\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAyB,gBAAgB;AACzC,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAMnB,SAAS,iBAAiB,UAAyC;AACxE,QAAM,gBAAgB,SAAS,QAAQ,QAAQ;AAE/C,MAAI,CAAC,cAAc,KAAK,SAAS,GAAG;AAClC,WAAO;AAAA,EACT;AAEA,SAAO,cAAc;AAAA,IACnB,CAAC,UACC,CAAC,UAAU,KAAK,KACf,UAAU,KAAK,KAAK,MAAM,QAAQ,MAAM,SAAS;AAAA,EACtD;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const memoizedRandomGenerators = {};
|
|
2
|
-
function mulberry32(seed) {
|
|
3
|
-
if (memoizedRandomGenerators[seed] === void 0) {
|
|
4
|
-
memoizedRandomGenerators[seed] = () => {
|
|
5
|
-
let t = seed += 1831565813;
|
|
6
|
-
t = Math.imul(t ^ t >>> 15, t | 1);
|
|
7
|
-
t ^= t + Math.imul(t ^ t >>> 7, t | 61);
|
|
8
|
-
return ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
return memoizedRandomGenerators[seed];
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
mulberry32
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=seed-random.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/core/utils/seed-random.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-mixed-operators */\n\n/** Memoize currified mulberry32 generators to ensure that sequences are honored for the same seed */\nconst memoizedRandomGenerators: Record<number, () => number> = {};\n\n/**\n * Generate a random seed function based on the mulberry32 algorithm\n * @internal\n */\nexport function mulberry32(seed: number) {\n if (memoizedRandomGenerators[seed] === void 0) {\n memoizedRandomGenerators[seed] = () => {\n let t = (seed += 0x6d2b79f5);\n t = Math.imul(t ^ (t >>> 15), t | 1);\n t ^= t + Math.imul(t ^ (t >>> 7), t | 61);\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n };\n }\n\n return memoizedRandomGenerators[seed];\n}\n"],
|
|
5
|
-
"mappings": "AAGA,MAAM,2BAAyD,CAAC;AAMzD,SAAS,WAAW,MAAc;AACvC,MAAI,yBAAyB,IAAI,MAAM,QAAQ;AAC7C,6BAAyB,IAAI,IAAI,MAAM;AACrC,UAAI,IAAK,QAAQ;AACjB,UAAI,KAAK,KAAK,IAAK,MAAM,IAAK,IAAI,CAAC;AACnC,WAAK,IAAI,KAAK,KAAK,IAAK,MAAM,GAAI,IAAI,EAAE;AACxC,eAAS,IAAK,MAAM,QAAS,KAAK;AAAA,IACpC;AAAA,EACF;AAEA,SAAO,yBAAyB,IAAI;AACtC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/esm/core/utils/uuidv4.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { mulberry32 } from "./seed-random.js";
|
|
2
|
-
function uuidv4(seed) {
|
|
3
|
-
const random = seed !== void 0 ? mulberry32(seed) : Math.random;
|
|
4
|
-
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (char) => {
|
|
5
|
-
const randomNumber = random() * 16 | 0;
|
|
6
|
-
const value = char === "x" ? randomNumber : randomNumber & 3 | 8;
|
|
7
|
-
return value.toString(16);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
export {
|
|
11
|
-
uuidv4
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=uuidv4.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/core/utils/uuidv4.ts"],
|
|
4
|
-
"sourcesContent": ["import { mulberry32 } from './seed-random.js';\n\n/**\n * Generates a uuidv4\n * @internal\n */\nexport function uuidv4(seed?: number) {\n // If a seed is given, use a seeded random function to generate the uuid.\n const random = seed !== void 0 ? mulberry32(seed) : Math.random;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (char) => {\n // eslint-disable-next-line no-mixed-operators\n const randomNumber = (random() * 16) | 0;\n const value = char === 'x' ? randomNumber : (randomNumber & 0x3) | 0x8;\n return value.toString(16);\n });\n}\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,kBAAkB;AAMpB,SAAS,OAAO,MAAe;AAEpC,QAAM,SAAS,SAAS,SAAS,WAAW,IAAI,IAAI,KAAK;AACzD,SAAO,uCAAuC,QAAQ,SAAS,CAAC,SAAS;AAEvE,UAAM,eAAgB,OAAO,IAAI,KAAM;AACvC,UAAM,QAAQ,SAAS,MAAM,eAAgB,eAAe,IAAO;AACnE,WAAO,MAAM,SAAS,EAAE;AAAA,EAC1B,CAAC;AACH;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|