@dynatrace/strato-components 0.84.51 → 0.85.10
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/README.md +1 -1
- package/buttons/button/Button.css +92 -0
- package/buttons/button/Button.d.ts +94 -0
- package/buttons/button/Button.js +258 -0
- package/buttons/button/Button.sty.d.ts +51 -0
- package/buttons/button/Button.sty.js +33 -0
- package/buttons/button/Label.d.ts +16 -0
- package/buttons/button/Label.js +60 -0
- package/buttons/button/Prefix.d.ts +16 -0
- package/buttons/button/Prefix.js +54 -0
- package/buttons/button/Suffix.d.ts +16 -0
- package/buttons/button/Suffix.js +56 -0
- package/buttons/button/types/button-aria.d.ts +37 -0
- package/buttons/button/types/button-aria.js +15 -0
- package/buttons/button/utils/focus-without-scrolling.d.ts +5 -0
- package/buttons/button/utils/focus-without-scrolling.js +77 -0
- package/buttons/button/utils/is-virtual-event.d.ts +10 -0
- package/buttons/button/utils/is-virtual-event.js +32 -0
- package/buttons/index.d.ts +8 -0
- package/buttons/index.js +28 -0
- package/content/progress/ProgressBar.js +1 -2
- package/content/progress/ProgressCircle.js +1 -2
- package/esm/buttons/button/Button.css +92 -0
- package/esm/buttons/button/Button.js +233 -0
- package/esm/buttons/button/Button.js.map +7 -0
- package/esm/buttons/button/Button.sty.js +15 -0
- package/esm/buttons/button/Button.sty.js.map +7 -0
- package/esm/buttons/button/Label.js +32 -0
- package/esm/buttons/button/Label.js.map +7 -0
- package/esm/buttons/button/Prefix.js +26 -0
- package/esm/buttons/button/Prefix.js.map +7 -0
- package/esm/buttons/button/Suffix.js +28 -0
- package/esm/buttons/button/Suffix.js.map +7 -0
- package/esm/buttons/button/types/button-aria.js +1 -0
- package/esm/buttons/button/types/button-aria.js.map +7 -0
- package/esm/buttons/button/utils/focus-without-scrolling.js +59 -0
- package/esm/buttons/button/utils/focus-without-scrolling.js.map +7 -0
- package/esm/buttons/button/utils/is-virtual-event.js +14 -0
- package/esm/buttons/button/utils/is-virtual-event.js.map +7 -0
- package/esm/buttons/index.js +13 -0
- package/esm/buttons/index.js.map +7 -0
- package/esm/content/progress/ProgressBar.js +2 -3
- package/esm/content/progress/ProgressBar.js.map +2 -2
- package/esm/content/progress/ProgressCircle.js +2 -3
- package/esm/content/progress/ProgressCircle.js.map +2 -2
- package/esm/index.js +1 -0
- package/esm/index.js.map +2 -2
- package/esm/styles/field.css +208 -0
- package/esm/styles/field.sty.js +9 -0
- package/esm/styles/field.sty.js.map +7 -0
- package/esm/typography/Code/Code.js.map +1 -1
- package/esm/typography/ExternalLink/ExternalLink.js.map +1 -1
- package/esm/typography/Link/Link.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lang/en.json +6 -0
- package/lang/uncompiled/en.json +4 -0
- package/package.json +21 -14
- package/styles/field.css +208 -0
- package/styles/field.sty.d.ts +102 -0
- package/styles/field.sty.js +27 -0
- package/styles/sprinkles.sty.d.ts +107 -107
- package/typography/Code/Code.d.ts +1 -1
- package/typography/ExternalLink/ExternalLink.d.ts +1 -1
- package/typography/Link/Link.d.ts +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var Prefix_exports = {};
|
|
29
|
+
__export(Prefix_exports, {
|
|
30
|
+
Prefix: () => Prefix
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Prefix_exports);
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_Flex = require("../../layouts/flex/Flex.js");
|
|
35
|
+
const Prefix = /* @__PURE__ */ (0, import_react.forwardRef)((props, forwardedRef) => {
|
|
36
|
+
const {
|
|
37
|
+
children,
|
|
38
|
+
className: consumerClassName,
|
|
39
|
+
style: consumerStyle,
|
|
40
|
+
"data-testid": dataTestId
|
|
41
|
+
} = props;
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
import_Flex.Flex,
|
|
44
|
+
{
|
|
45
|
+
"data-testid": dataTestId,
|
|
46
|
+
ref: forwardedRef,
|
|
47
|
+
gap: 0,
|
|
48
|
+
className: consumerClassName,
|
|
49
|
+
style: consumerStyle
|
|
50
|
+
},
|
|
51
|
+
children
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
Prefix.displayName = "Button.Prefix";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type DataTestId } from '../../core/types/data-props.js';
|
|
3
|
+
import { type StylingProps } from '../../core/types/styling-props.js';
|
|
4
|
+
/**
|
|
5
|
+
* Accepted properties for the Button Suffix.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface ButtonSuffixProps extends StylingProps, DataTestId {
|
|
9
|
+
/** Elements to be displayed in the Button Suffix slot. */
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Button Suffix component.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare const Suffix: (props: ButtonSuffixProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var Suffix_exports = {};
|
|
29
|
+
__export(Suffix_exports, {
|
|
30
|
+
Suffix: () => Suffix
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Suffix_exports);
|
|
33
|
+
var import_react = __toESM(require("react"));
|
|
34
|
+
var import_Flex = require("../../layouts/flex/Flex.js");
|
|
35
|
+
const Suffix = (0, import_react.forwardRef)(
|
|
36
|
+
(props, forwardedRef) => {
|
|
37
|
+
const {
|
|
38
|
+
children,
|
|
39
|
+
className: consumerClassName,
|
|
40
|
+
style: consumerStyle,
|
|
41
|
+
"data-testid": dataTestId
|
|
42
|
+
} = props;
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
import_Flex.Flex,
|
|
45
|
+
{
|
|
46
|
+
"data-testid": dataTestId,
|
|
47
|
+
gap: 0,
|
|
48
|
+
ref: forwardedRef,
|
|
49
|
+
className: consumerClassName,
|
|
50
|
+
style: consumerStyle
|
|
51
|
+
},
|
|
52
|
+
children
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
Suffix.displayName = "Button.Suffix";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type AriaLabelingProps } from '../../../core/types/a11y-props.js';
|
|
3
|
+
import { type ButtonProps } from '../Button.js';
|
|
4
|
+
/**
|
|
5
|
+
* Defines the available Button Aria Props.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface ButtonAria<T> {
|
|
9
|
+
/** Props for the button element. */
|
|
10
|
+
buttonProps: T;
|
|
11
|
+
/** Whether the button is currently pressed. */
|
|
12
|
+
isPressed: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Defines the Aria Base Button Props.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export interface AriaBaseButtonProps extends AriaLabelingProps {
|
|
19
|
+
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
|
20
|
+
'aria-expanded'?: boolean | 'true' | 'false';
|
|
21
|
+
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
|
22
|
+
'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog' | 'true' | 'false';
|
|
23
|
+
/** Identifies the element (or elements) whose contents or presence are controlled by the current element. */
|
|
24
|
+
'aria-controls'?: string;
|
|
25
|
+
/** Indicates the current "pressed" state of toggle buttons. */
|
|
26
|
+
'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';
|
|
27
|
+
/**
|
|
28
|
+
* The behavior of the button when used in an HTML form.
|
|
29
|
+
* @defaultValue 'button'
|
|
30
|
+
*/
|
|
31
|
+
type?: 'button' | 'submit' | 'reset';
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Combines the ButtonProps with the AriaBaseButtonProps.
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export type AriaButtonProps = ButtonProps<ElementType> & AriaBaseButtonProps;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var button_aria_exports = {};
|
|
15
|
+
module.exports = __toCommonJS(button_aria_exports);
|
|
@@ -0,0 +1,77 @@
|
|
|
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 focus_without_scrolling_exports = {};
|
|
19
|
+
__export(focus_without_scrolling_exports, {
|
|
20
|
+
focusWithoutScrolling: () => focusWithoutScrolling
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(focus_without_scrolling_exports);
|
|
23
|
+
let supportsPreventScrollCached = null;
|
|
24
|
+
function supportsPreventScroll() {
|
|
25
|
+
if (supportsPreventScrollCached === null) {
|
|
26
|
+
supportsPreventScrollCached = false;
|
|
27
|
+
try {
|
|
28
|
+
const focusElem = document.createElement("div");
|
|
29
|
+
focusElem.focus({
|
|
30
|
+
get preventScroll() {
|
|
31
|
+
supportsPreventScrollCached = true;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
} catch (e) {
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return supportsPreventScrollCached;
|
|
39
|
+
}
|
|
40
|
+
function getScrollableElements(element) {
|
|
41
|
+
let parent = element.parentNode;
|
|
42
|
+
const scrollableElements = [];
|
|
43
|
+
const rootScrollingElement = document.scrollingElement || document.documentElement;
|
|
44
|
+
while (parent instanceof HTMLElement && parent !== rootScrollingElement) {
|
|
45
|
+
if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) {
|
|
46
|
+
scrollableElements.push({
|
|
47
|
+
element: parent,
|
|
48
|
+
scrollTop: parent.scrollTop,
|
|
49
|
+
scrollLeft: parent.scrollLeft
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
parent = parent.parentNode;
|
|
53
|
+
}
|
|
54
|
+
if (rootScrollingElement instanceof HTMLElement) {
|
|
55
|
+
scrollableElements.push({
|
|
56
|
+
element: rootScrollingElement,
|
|
57
|
+
scrollTop: rootScrollingElement.scrollTop,
|
|
58
|
+
scrollLeft: rootScrollingElement.scrollLeft
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return scrollableElements;
|
|
62
|
+
}
|
|
63
|
+
function restoreScrollPosition(scrollableElements) {
|
|
64
|
+
for (const { element, scrollTop, scrollLeft } of scrollableElements) {
|
|
65
|
+
element.scrollTop = scrollTop;
|
|
66
|
+
element.scrollLeft = scrollLeft;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function focusWithoutScrolling(element) {
|
|
70
|
+
if (supportsPreventScroll()) {
|
|
71
|
+
element.focus({ preventScroll: true });
|
|
72
|
+
} else {
|
|
73
|
+
const scrollableElements = getScrollableElements(element);
|
|
74
|
+
element.focus();
|
|
75
|
+
restoreScrollPosition(scrollableElements);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether the given event represents a virtual click.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare function isVirtualClick(event: MouseEvent | PointerEvent): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Determines whether the given event represents a virtual pointer event.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function isVirtualPointerEvent(event: PointerEvent): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
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 is_virtual_event_exports = {};
|
|
19
|
+
__export(is_virtual_event_exports, {
|
|
20
|
+
isVirtualClick: () => isVirtualClick,
|
|
21
|
+
isVirtualPointerEvent: () => isVirtualPointerEvent
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(is_virtual_event_exports);
|
|
24
|
+
function isVirtualClick(event) {
|
|
25
|
+
if (event.mozInputSource === 0 && event.isTrusted) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
return event.detail === 0 && !event.pointerType;
|
|
29
|
+
}
|
|
30
|
+
function isVirtualPointerEvent(event) {
|
|
31
|
+
return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse";
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Button } from './button/Button.js';
|
|
2
|
+
export type { ButtonOwnProps, ButtonProps } from './button/Button.js';
|
|
3
|
+
export type { ButtonLabelProps } from './button/Label.js';
|
|
4
|
+
export type { ButtonPrefixProps } from './button/Prefix.js';
|
|
5
|
+
export type { ButtonSuffixProps } from './button/Suffix.js';
|
|
6
|
+
export type { AriaButtonProps as _AriaButtonProps, ButtonAria as _ButtonAria, AriaBaseButtonProps as _AriaBaseButtonProps, } from './button/types/button-aria.js';
|
|
7
|
+
export { focusWithoutScrolling as _focusWithoutScrolling } from './button/utils/focus-without-scrolling.js';
|
|
8
|
+
export { isVirtualPointerEvent as _isVirtualPointerEvent, isVirtualClick as _isVirtualClick, } from './button/utils/is-virtual-event.js';
|
package/buttons/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
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 buttons_exports = {};
|
|
19
|
+
__export(buttons_exports, {
|
|
20
|
+
Button: () => import_Button.Button,
|
|
21
|
+
_focusWithoutScrolling: () => import_focus_without_scrolling.focusWithoutScrolling,
|
|
22
|
+
_isVirtualClick: () => import_is_virtual_event.isVirtualClick,
|
|
23
|
+
_isVirtualPointerEvent: () => import_is_virtual_event.isVirtualPointerEvent
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(buttons_exports);
|
|
26
|
+
var import_Button = require("./button/Button.js");
|
|
27
|
+
var import_focus_without_scrolling = require("./button/utils/focus-without-scrolling.js");
|
|
28
|
+
var import_is_virtual_event = require("./button/utils/is-virtual-event.js");
|
|
@@ -41,7 +41,6 @@ var import_ProgressBarIcon = require("./ProgressBarIcon.js");
|
|
|
41
41
|
var import_ProgressBarLabel = require("./ProgressBarLabel.js");
|
|
42
42
|
var import_ProgressBarValue = require("./ProgressBarValue.js");
|
|
43
43
|
var import_useAriaLabelingProps = require("../../core/hooks/useAriaLabelingProps.js");
|
|
44
|
-
var import_useId = require("../../core/hooks/useId.js");
|
|
45
44
|
var import_useSafeForwardProps = require("../../core/hooks/useSafeForwardProps.js");
|
|
46
45
|
var import_colorUtils_css = require("../../styles/colorUtils.sty.js");
|
|
47
46
|
function getProgressBarSlots(children) {
|
|
@@ -99,7 +98,7 @@ const _ProgressBar = (0, import_react.forwardRef)(
|
|
|
99
98
|
);
|
|
100
99
|
const ariaLabelingProps = (0, import_useAriaLabelingProps.useAriaLabelingProps)(remainingProps);
|
|
101
100
|
const forwardProps = (0, import_useSafeForwardProps.useSafeForwardProps)(remainingProps, ariaLabelingProps);
|
|
102
|
-
const generatedId = (0,
|
|
101
|
+
const generatedId = (0, import_react.useId)();
|
|
103
102
|
const id = propId ?? generatedId;
|
|
104
103
|
if (!slots.label && !ariaLabelingProps["aria-label"] && !ariaLabelingProps["aria-labelledby"]) {
|
|
105
104
|
// eslint-disable-next-line no-console
|
|
@@ -35,7 +35,6 @@ var import_react = __toESM(require("react"));
|
|
|
35
35
|
var import_useProgressAriaProps = require("./hooks/useProgressAriaProps.js");
|
|
36
36
|
var import_ProgressCircle_css = require("./ProgressCircle.sty.js");
|
|
37
37
|
var import_useAriaLabelingProps = require("../../core/hooks/useAriaLabelingProps.js");
|
|
38
|
-
var import_useId = require("../../core/hooks/useId.js");
|
|
39
38
|
var import_useSafeForwardProps = require("../../core/hooks/useSafeForwardProps.js");
|
|
40
39
|
var import_colorUtils_css = require("../../styles/colorUtils.sty.js");
|
|
41
40
|
var import_container_css = require("../../styles/container.sty.js");
|
|
@@ -71,7 +70,7 @@ const ProgressCircle = (0, import_react.forwardRef)(
|
|
|
71
70
|
);
|
|
72
71
|
const ariaLabelingProps = (0, import_useAriaLabelingProps.useAriaLabelingProps)(remainingProps);
|
|
73
72
|
const forwardProps = (0, import_useSafeForwardProps.useSafeForwardProps)(remainingProps, ariaLabelingProps);
|
|
74
|
-
const generatedId = (0,
|
|
73
|
+
const generatedId = (0, import_react.useId)();
|
|
75
74
|
const id = propId ?? generatedId;
|
|
76
75
|
const circleStyles = {};
|
|
77
76
|
const rootProps = {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.Button_buttonCSS__10kgnsa0 {
|
|
2
|
+
font-family: var(--dt-typography-text-base-default-family, DynatraceFlow,Roboto,Helvetica,sans-serif);
|
|
3
|
+
font-weight: var(--dt-typography-text-base-emphasized-weight, 500);
|
|
4
|
+
font-size: var(--dt-typography-text-base-default-size, 14px);
|
|
5
|
+
line-height: var(--dt-typography-text-base-default-line-height, 1.4285714286);
|
|
6
|
+
text-decoration: var(--dt-typography-text-base-default-text-decoration, none);
|
|
7
|
+
text-transform: none;
|
|
8
|
+
background: var(--vars_background__bx32h3);
|
|
9
|
+
color: var(--vars_text__bx32h0);
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
align-items: center;
|
|
13
|
+
flex-direction: row;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
height: max-content;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
border-color: transparent;
|
|
18
|
+
border-style: solid;
|
|
19
|
+
border-width: 0;
|
|
20
|
+
border-radius: var(--dt-borders-radius-field-default, 8px);
|
|
21
|
+
transition-timing-function: var(--dt-animations-fade-out-easing, cubic-bezier(0, 0, 0.2, 1));
|
|
22
|
+
transition-duration: var(--dt-animations-fade-out-duration-base, 250ms);
|
|
23
|
+
transition-property: color, background-color, transform;
|
|
24
|
+
}
|
|
25
|
+
.Button_buttonCSS__10kgnsa0:hover {
|
|
26
|
+
transition-timing-function: var(--dt-animations-fade-in-easing, cubic-bezier(0.5, 0, 1, 1));
|
|
27
|
+
transition-duration: var(--dt-animations-fade-in-duration-base, 250ms);
|
|
28
|
+
}
|
|
29
|
+
.Button_buttonCSS_textAlign_start__10kgnsa1 {
|
|
30
|
+
text-align: start;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
}
|
|
33
|
+
.Button_buttonCSS_textAlign_center__10kgnsa2 {
|
|
34
|
+
text-align: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
}
|
|
37
|
+
.Button_buttonCSS_size_condensed__10kgnsa3 {
|
|
38
|
+
padding-top: var(--dt-spacings-size-2, 2px);
|
|
39
|
+
padding-bottom: var(--dt-spacings-size-2, 2px);
|
|
40
|
+
padding-left: var(--dt-spacings-size-4, 4px);
|
|
41
|
+
padding-right: var(--dt-spacings-size-4, 4px);
|
|
42
|
+
gap: var(--dt-spacings-size-2, 2px);
|
|
43
|
+
}
|
|
44
|
+
.Button_buttonCSS_size_default__10kgnsa4 {
|
|
45
|
+
padding-top: var(--dt-spacings-size-6, 6px);
|
|
46
|
+
padding-bottom: var(--dt-spacings-size-6, 6px);
|
|
47
|
+
padding-left: var(--dt-spacings-size-8, 8px);
|
|
48
|
+
padding-right: var(--dt-spacings-size-8, 8px);
|
|
49
|
+
gap: var(--dt-spacings-size-4, 4px);
|
|
50
|
+
}
|
|
51
|
+
.Button_buttonCSS_disabled_true__10kgnsa5 {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
}
|
|
54
|
+
.Button_buttonCSS_readOnly_true__10kgnsa6 {
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
background: var(--vars_backgroundStatic__bx32h2);
|
|
57
|
+
}
|
|
58
|
+
.Button_buttonWidthsCSS_full__10kgnsa7 {
|
|
59
|
+
width: 100%;
|
|
60
|
+
}
|
|
61
|
+
.Button_buttonWidthsCSS_content__10kgnsa8 {
|
|
62
|
+
width: fit-content;
|
|
63
|
+
}
|
|
64
|
+
.Button_buttonLoadingCSS__10kgnsa9 {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
border-radius: var(--dt-borders-radius-field-default, 8px);
|
|
71
|
+
display: flex;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
z-index: 1;
|
|
75
|
+
}
|
|
76
|
+
.Button_buttonCSS_size_condensed__10kgnsa3 .Button_buttonLabelCSS__10kgnsaa:not(:has(svg:only-child)) {
|
|
77
|
+
padding-top: 0;
|
|
78
|
+
padding-bottom: 0;
|
|
79
|
+
padding-left: 2px;
|
|
80
|
+
padding-right: 2px;
|
|
81
|
+
}
|
|
82
|
+
.Button_buttonCSS_size_default__10kgnsa4 .Button_buttonLabelCSS__10kgnsaa:not(:has(svg:only-child)) {
|
|
83
|
+
padding-top: 0;
|
|
84
|
+
padding-bottom: 0;
|
|
85
|
+
padding-left: 4px;
|
|
86
|
+
padding-right: 4px;
|
|
87
|
+
}
|
|
88
|
+
.Button_buttonLabelCSS_textual_false__10kgnsac {
|
|
89
|
+
display: inline-flex;
|
|
90
|
+
min-width: 0;
|
|
91
|
+
max-width: 100%;
|
|
92
|
+
}
|