@dynatrace/strato-components 0.85.10 → 0.85.21

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 (230) hide show
  1. package/buttons/button/Button.css +1 -0
  2. package/buttons/index.d.ts +2 -0
  3. package/buttons/index.js +2 -0
  4. package/buttons/intent-button/IntentButton.d.ts +44 -0
  5. package/buttons/intent-button/IntentButton.js +102 -0
  6. package/buttons/intent-button/useIntentButton.d.ts +12 -0
  7. package/buttons/intent-button/useIntentButton.js +72 -0
  8. package/content/index.d.ts +4 -0
  9. package/content/index.js +5 -1
  10. package/content/skeleton/Skeleton.css +33 -0
  11. package/content/skeleton/Skeleton.d.ts +30 -0
  12. package/content/skeleton/Skeleton.js +60 -0
  13. package/content/skeleton/Skeleton.sty.d.ts +10 -0
  14. package/content/skeleton/Skeleton.sty.js +25 -0
  15. package/content/skeleton/SkeletonText.d.ts +24 -0
  16. package/content/skeleton/SkeletonText.js +84 -0
  17. package/esm/buttons/button/Button.css +1 -0
  18. package/esm/buttons/index.js +2 -0
  19. package/esm/buttons/index.js.map +2 -2
  20. package/esm/buttons/intent-button/IntentButton.js +74 -0
  21. package/esm/buttons/intent-button/IntentButton.js.map +7 -0
  22. package/esm/buttons/intent-button/useIntentButton.js +57 -0
  23. package/esm/buttons/intent-button/useIntentButton.js.map +7 -0
  24. package/esm/content/index.js +5 -1
  25. package/esm/content/index.js.map +2 -2
  26. package/esm/content/skeleton/Skeleton.css +33 -0
  27. package/esm/content/skeleton/Skeleton.js +32 -0
  28. package/esm/content/skeleton/Skeleton.js.map +7 -0
  29. package/esm/content/skeleton/Skeleton.sty.js +7 -0
  30. package/esm/content/skeleton/Skeleton.sty.js.map +7 -0
  31. package/esm/content/skeleton/SkeletonText.js +56 -0
  32. package/esm/content/skeleton/SkeletonText.js.map +7 -0
  33. package/esm/layouts/{Divider → divider}/Divider.css +5 -5
  34. package/esm/layouts/{Divider → divider}/Divider.js.map +1 -1
  35. package/esm/layouts/{Divider → divider}/Divider.sty.js +1 -1
  36. package/esm/layouts/{Divider → divider}/Divider.sty.js.map +2 -2
  37. package/esm/layouts/helpers/spacingToCss.js +13 -0
  38. package/esm/layouts/helpers/spacingToCss.js.map +7 -0
  39. package/esm/layouts/hooks/useLayoutSizeProps.js +15 -0
  40. package/esm/layouts/hooks/useLayoutSizeProps.js.map +7 -0
  41. package/esm/layouts/hooks/useLayoutStyles.js +105 -0
  42. package/esm/layouts/hooks/useLayoutStyles.js.map +7 -0
  43. package/esm/layouts/hooks/useMarginProps.js +55 -0
  44. package/esm/layouts/hooks/useMarginProps.js.map +7 -0
  45. package/esm/layouts/hooks/usePaddingProps.js +59 -0
  46. package/esm/layouts/hooks/usePaddingProps.js.map +7 -0
  47. package/esm/layouts/index.js +6 -2
  48. package/esm/layouts/index.js.map +2 -2
  49. package/esm/layouts/surface/Surface.css +95 -0
  50. package/esm/layouts/surface/Surface.js +84 -0
  51. package/esm/layouts/surface/Surface.js.map +7 -0
  52. package/esm/layouts/surface/Surface.sty.js +10 -0
  53. package/esm/layouts/surface/Surface.sty.js.map +7 -0
  54. package/esm/layouts/surface/variables.sty.js +5 -0
  55. package/esm/layouts/surface/variables.sty.js.map +7 -0
  56. package/esm/layouts/types/layout.types.js +1 -0
  57. package/esm/layouts/types/layout.types.js.map +7 -0
  58. package/esm/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
  59. package/esm/typography/{BlockQuote → block-quote}/Blockquote.js.map +2 -2
  60. package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
  61. package/esm/typography/{BlockQuote → block-quote}/Blockquote.sty.js.map +2 -2
  62. package/{typography/Code → esm/typography/code}/Code.css +1 -1
  63. package/esm/typography/{Code → code}/Code.js.map +2 -2
  64. package/esm/typography/{Code → code}/Code.sty.js +1 -1
  65. package/esm/typography/{Code → code}/Code.sty.js.map +2 -2
  66. package/esm/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
  67. package/esm/typography/{Emphasis → emphasis}/Emphasis.js.map +2 -2
  68. package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
  69. package/esm/typography/{Emphasis → emphasis}/Emphasis.sty.js.map +2 -2
  70. package/{typography/ExternalLink → esm/typography/external-link}/ExternalLink.css +6 -6
  71. package/esm/typography/{ExternalLink → external-link}/ExternalLink.js.map +2 -2
  72. package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
  73. package/esm/typography/{ExternalLink → external-link}/ExternalLink.sty.js.map +2 -2
  74. package/esm/typography/{Heading → heading}/Heading.css +7 -7
  75. package/esm/typography/heading/Heading.js.map +7 -0
  76. package/esm/typography/heading/Heading.sty.js +7 -0
  77. package/esm/typography/{Heading → heading}/Heading.sty.js.map +2 -2
  78. package/esm/typography/{Highlight → highlight}/Highlight.css +1 -1
  79. package/esm/typography/{Highlight → highlight}/Highlight.js.map +2 -2
  80. package/esm/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
  81. package/esm/typography/{Highlight → highlight}/Highlight.sty.js.map +2 -2
  82. package/esm/typography/index.js +13 -13
  83. package/esm/typography/index.js.map +1 -1
  84. package/{typography/Link → esm/typography/link}/Link.css +4 -4
  85. package/esm/typography/{Link → link}/Link.js +1 -1
  86. package/esm/typography/link/Link.js.map +7 -0
  87. package/esm/typography/{Link → link}/Link.sty.js +1 -1
  88. package/esm/typography/{Link → link}/Link.sty.js.map +2 -2
  89. package/esm/typography/{List → list}/List.css +4 -4
  90. package/esm/typography/{List → list}/List.js +1 -1
  91. package/esm/typography/{List → list}/List.js.map +2 -2
  92. package/esm/typography/{List → list}/List.sty.js +2 -2
  93. package/esm/typography/{List → list}/List.sty.js.map +2 -2
  94. package/esm/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
  95. package/esm/typography/{Paragraph → paragraph}/Paragraph.js.map +2 -2
  96. package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
  97. package/esm/typography/{Paragraph → paragraph}/Paragraph.sty.js.map +2 -2
  98. package/{typography/Strikethrough → esm/typography/strikethrough}/Strikethrough.css +1 -1
  99. package/esm/typography/strikethrough/Strikethrough.js.map +7 -0
  100. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
  101. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js.map +2 -2
  102. package/{typography/Strong → esm/typography/strong}/Strong.css +1 -1
  103. package/esm/typography/{Strong → strong}/Strong.js.map +2 -2
  104. package/esm/typography/{Strong → strong}/Strong.sty.js +1 -1
  105. package/esm/typography/{Strong → strong}/Strong.sty.js.map +2 -2
  106. package/{typography/Text → esm/typography/text}/Text.css +3 -3
  107. package/esm/typography/text/Text.js.map +7 -0
  108. package/esm/typography/{Text → text}/Text.sty.js +1 -1
  109. package/esm/typography/{Text → text}/Text.sty.js.map +2 -2
  110. package/{typography/TextEllipsis → esm/typography/text-ellipsis}/TextEllipsis.css +4 -4
  111. package/esm/typography/text-ellipsis/TextEllipsis.js.map +7 -0
  112. package/esm/typography/text-ellipsis/TextEllipsis.sty.js +7 -0
  113. package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js.map +2 -2
  114. package/lang/en.json +6 -0
  115. package/lang/ja.json +24 -0
  116. package/lang/uncompiled/en.json +4 -0
  117. package/lang/uncompiled/ja.json +14 -1
  118. package/layouts/{Divider → divider}/Divider.css +5 -5
  119. package/layouts/{Divider → divider}/Divider.sty.js +1 -1
  120. package/layouts/helpers/spacingToCss.d.ts +6 -0
  121. package/layouts/helpers/spacingToCss.js +29 -0
  122. package/layouts/hooks/useLayoutSizeProps.d.ts +6 -0
  123. package/layouts/hooks/useLayoutSizeProps.js +33 -0
  124. package/layouts/hooks/useLayoutStyles.d.ts +7 -0
  125. package/layouts/hooks/useLayoutStyles.js +123 -0
  126. package/layouts/hooks/useMarginProps.d.ts +7 -0
  127. package/layouts/hooks/useMarginProps.js +73 -0
  128. package/layouts/hooks/usePaddingProps.d.ts +7 -0
  129. package/layouts/hooks/usePaddingProps.js +77 -0
  130. package/layouts/index.d.ts +6 -2
  131. package/layouts/index.js +6 -2
  132. package/layouts/surface/Surface.css +95 -0
  133. package/layouts/surface/Surface.d.ts +46 -0
  134. package/layouts/surface/Surface.js +110 -0
  135. package/layouts/surface/Surface.sty.d.ts +43 -0
  136. package/layouts/surface/Surface.sty.js +28 -0
  137. package/layouts/surface/variables.sty.d.ts +1 -0
  138. package/layouts/surface/variables.sty.js +23 -0
  139. package/layouts/types/layout.types.d.ts +64 -0
  140. package/layouts/types/layout.types.js +15 -0
  141. package/package.json +2 -2
  142. package/typography/{BlockQuote → block-quote}/Blockquote.css +2 -2
  143. package/typography/{BlockQuote → block-quote}/Blockquote.sty.js +1 -1
  144. package/{esm/typography/Code → typography/code}/Code.css +1 -1
  145. package/typography/{Code → code}/Code.sty.js +1 -1
  146. package/typography/{Emphasis → emphasis}/Emphasis.css +1 -1
  147. package/typography/{Emphasis → emphasis}/Emphasis.sty.js +1 -1
  148. package/{esm/typography/ExternalLink → typography/external-link}/ExternalLink.css +6 -6
  149. package/typography/{ExternalLink → external-link}/ExternalLink.sty.js +1 -1
  150. package/typography/{Heading → heading}/Heading.css +7 -7
  151. package/typography/{Heading → heading}/Heading.d.ts +3 -2
  152. package/typography/{Heading → heading}/Heading.sty.js +1 -1
  153. package/typography/{Highlight → highlight}/Highlight.css +1 -1
  154. package/typography/{Highlight → highlight}/Highlight.sty.js +1 -1
  155. package/typography/index.d.ts +26 -26
  156. package/typography/index.js +13 -13
  157. package/{esm/typography/Link → typography/link}/Link.css +4 -4
  158. package/typography/{Link → link}/Link.js +1 -1
  159. package/typography/{Link → link}/Link.sty.js +1 -1
  160. package/typography/{List → list}/List.css +4 -4
  161. package/typography/{List → list}/List.js +1 -1
  162. package/typography/{List → list}/List.sty.js +2 -2
  163. package/typography/{Paragraph → paragraph}/Paragraph.css +3 -3
  164. package/typography/{Paragraph → paragraph}/Paragraph.sty.js +1 -1
  165. package/{esm/typography/Strikethrough → typography/strikethrough}/Strikethrough.css +1 -1
  166. package/typography/{Strikethrough → strikethrough}/Strikethrough.d.ts +2 -2
  167. package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.js +1 -1
  168. package/{esm/typography/Strong → typography/strong}/Strong.css +1 -1
  169. package/typography/{Strong → strong}/Strong.sty.js +1 -1
  170. package/{esm/typography/Text → typography/text}/Text.css +3 -3
  171. package/typography/{Text → text}/Text.d.ts +3 -2
  172. package/typography/{Text → text}/Text.sty.js +1 -1
  173. package/{esm/typography/TextEllipsis → typography/text-ellipsis}/TextEllipsis.css +4 -4
  174. package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.d.ts +3 -3
  175. package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.js +1 -1
  176. package/esm/typography/Heading/Heading.js.map +0 -7
  177. package/esm/typography/Heading/Heading.sty.js +0 -7
  178. package/esm/typography/Link/Link.js.map +0 -7
  179. package/esm/typography/Strikethrough/Strikethrough.js.map +0 -7
  180. package/esm/typography/Text/Text.js.map +0 -7
  181. package/esm/typography/TextEllipsis/TextEllipsis.js.map +0 -7
  182. package/esm/typography/TextEllipsis/TextEllipsis.sty.js +0 -7
  183. package/esm/layouts/{Divider → divider}/Divider.js +0 -0
  184. package/esm/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
  185. package/esm/typography/{Code → code}/Code.js +0 -0
  186. package/esm/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
  187. package/esm/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
  188. package/esm/typography/{Heading → heading}/Heading.js +0 -0
  189. package/esm/typography/{Highlight → highlight}/Highlight.js +0 -0
  190. package/esm/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
  191. package/esm/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
  192. package/esm/typography/{Strong → strong}/Strong.js +0 -0
  193. package/esm/typography/{Text → text}/Text.js +0 -0
  194. package/esm/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
  195. package/layouts/{Divider → divider}/Divider.d.ts +0 -0
  196. package/layouts/{Divider → divider}/Divider.js +0 -0
  197. package/layouts/{Divider → divider}/Divider.sty.d.ts +0 -0
  198. package/typography/{BlockQuote → block-quote}/Blockquote.d.ts +1 -1
  199. package/typography/{BlockQuote → block-quote}/Blockquote.js +0 -0
  200. package/typography/{BlockQuote → block-quote}/Blockquote.sty.d.ts +0 -0
  201. package/typography/{Code → code}/Code.d.ts +1 -1
  202. package/typography/{Code → code}/Code.js +0 -0
  203. package/typography/{Code → code}/Code.sty.d.ts +0 -0
  204. package/typography/{Emphasis → emphasis}/Emphasis.d.ts +1 -1
  205. package/typography/{Emphasis → emphasis}/Emphasis.js +0 -0
  206. package/typography/{Emphasis → emphasis}/Emphasis.sty.d.ts +0 -0
  207. package/typography/{ExternalLink → external-link}/ExternalLink.d.ts +1 -1
  208. package/typography/{ExternalLink → external-link}/ExternalLink.js +0 -0
  209. package/typography/{ExternalLink → external-link}/ExternalLink.sty.d.ts +0 -0
  210. package/typography/{Heading → heading}/Heading.js +0 -0
  211. package/typography/{Heading → heading}/Heading.sty.d.ts +0 -0
  212. package/typography/{Highlight → highlight}/Highlight.d.ts +1 -1
  213. package/typography/{Highlight → highlight}/Highlight.js +0 -0
  214. package/typography/{Highlight → highlight}/Highlight.sty.d.ts +0 -0
  215. package/typography/{Link → link}/Link.d.ts +1 -1
  216. package/typography/{Link → link}/Link.sty.d.ts +0 -0
  217. package/typography/{List → list}/List.d.ts +1 -1
  218. package/typography/{List → list}/List.sty.d.ts +0 -0
  219. package/typography/{Paragraph → paragraph}/Paragraph.d.ts +1 -1
  220. package/typography/{Paragraph → paragraph}/Paragraph.js +0 -0
  221. package/typography/{Paragraph → paragraph}/Paragraph.sty.d.ts +0 -0
  222. package/typography/{Strikethrough → strikethrough}/Strikethrough.js +0 -0
  223. package/typography/{Strikethrough → strikethrough}/Strikethrough.sty.d.ts +0 -0
  224. package/typography/{Strong → strong}/Strong.d.ts +1 -1
  225. /package/typography/{Strong → strong}/Strong.js +0 -0
  226. /package/typography/{Strong → strong}/Strong.sty.d.ts +0 -0
  227. /package/typography/{Text → text}/Text.js +0 -0
  228. /package/typography/{Text → text}/Text.sty.d.ts +0 -0
  229. /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.js +0 -0
  230. /package/typography/{TextEllipsis → text-ellipsis}/TextEllipsis.sty.d.ts +0 -0
@@ -14,6 +14,7 @@
14
14
  max-width: 100%;
15
15
  height: max-content;
16
16
  cursor: pointer;
17
+ box-sizing: border-box;
17
18
  border-color: transparent;
18
19
  border-style: solid;
19
20
  border-width: 0;
@@ -6,3 +6,5 @@ export type { ButtonSuffixProps } from './button/Suffix.js';
6
6
  export type { AriaButtonProps as _AriaButtonProps, ButtonAria as _ButtonAria, AriaBaseButtonProps as _AriaBaseButtonProps, } from './button/types/button-aria.js';
7
7
  export { focusWithoutScrolling as _focusWithoutScrolling } from './button/utils/focus-without-scrolling.js';
8
8
  export { isVirtualPointerEvent as _isVirtualPointerEvent, isVirtualClick as _isVirtualClick, } from './button/utils/is-virtual-event.js';
9
+ export { IntentButton } from './intent-button/IntentButton.js';
10
+ export type { IntentButtonProps, IntentButtonPropsBase, } from './intent-button/IntentButton.js';
package/buttons/index.js CHANGED
@@ -18,6 +18,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
18
18
  var buttons_exports = {};
19
19
  __export(buttons_exports, {
20
20
  Button: () => import_Button.Button,
21
+ IntentButton: () => import_IntentButton.IntentButton,
21
22
  _focusWithoutScrolling: () => import_focus_without_scrolling.focusWithoutScrolling,
22
23
  _isVirtualClick: () => import_is_virtual_event.isVirtualClick,
23
24
  _isVirtualPointerEvent: () => import_is_virtual_event.isVirtualPointerEvent
@@ -26,3 +27,4 @@ module.exports = __toCommonJS(buttons_exports);
26
27
  var import_Button = require("./button/Button.js");
27
28
  var import_focus_without_scrolling = require("./button/utils/focus-without-scrolling.js");
28
29
  var import_is_virtual_event = require("./button/utils/is-virtual-event.js");
30
+ var import_IntentButton = require("./intent-button/IntentButton.js");
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import { type IntentPayload } from '@dynatrace-sdk/navigation';
3
+ import { type AriaLabelingProps } from '../../core/types/a11y-props.js';
4
+ import { type DataTestId } from '../../core/types/data-props.js';
5
+ import { type DOMProps } from '../../core/types/dom.js';
6
+ import { type MaskingProps } from '../../core/types/masking-props.js';
7
+ import { type StylingProps } from '../../core/types/styling-props.js';
8
+ import { type ButtonOwnProps } from '../button/Button.js';
9
+ /**
10
+ * Accepted properties for the Button.
11
+ * @public
12
+ */
13
+ export interface IntentButtonPropsBase extends Omit<ButtonOwnProps, 'loading' | 'type'>, AriaLabelingProps, DOMProps, StylingProps, DataTestId, MaskingProps {
14
+ /** Intent payload passed between apps.*/
15
+ payload: IntentPayload;
16
+ /** Intended for setting a custom button label. When nothing is set, no label is shown. */
17
+ children?: string;
18
+ }
19
+ /**
20
+ * Merge own props with ID props.
21
+ * Props for recommending an app to receive the intent. Either both properties or none of them needs to be specified.
22
+ * @public
23
+ */
24
+ export type IntentButtonProps = IntentButtonPropsBase & ({
25
+ appId?: never;
26
+ intentId?: never;
27
+ } | {
28
+ /**
29
+ * ID of the app that will be launched to handle the intent.
30
+ */
31
+ appId: string;
32
+ /**
33
+ * ID of the action that will be passed to the app.
34
+ */
35
+ intentId: string;
36
+ });
37
+ /**
38
+ * The `IntentButton` is a dedicated button component for sending
39
+ * {@link https://developer.dynatrace.com/develop/intents/ | intents}.
40
+ * It takes care of opening the intent dialog. An `IntentButton` only works
41
+ * in the AppShell context.
42
+ * @public
43
+ */
44
+ export declare const IntentButton: (props: IntentButtonProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,102 @@
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 IntentButton_exports = {};
29
+ __export(IntentButton_exports, {
30
+ IntentButton: () => IntentButton
31
+ });
32
+ module.exports = __toCommonJS(IntentButton_exports);
33
+ var import_react = __toESM(require("react"));
34
+ var import_react_intl = require("react-intl");
35
+ var import_strato_icons = require("@dynatrace/strato-icons");
36
+ var import_useIntentButton = require("./useIntentButton.js");
37
+ var import_Button = require("../button/Button.js");
38
+ const IntentButton = /* @__PURE__ */ (0, import_react.forwardRef)((props, forwardedRef) => {
39
+ const intl = (0, import_react_intl.useIntl)();
40
+ const {
41
+ children,
42
+ payload,
43
+ appId,
44
+ intentId,
45
+ disabled,
46
+ onClick: onClickProp,
47
+ "aria-label": ariaLabelProp,
48
+ className: consumerClassName,
49
+ style: consumerStyle,
50
+ "data-testid": dataTestId,
51
+ "data-dtrum-mask": dataDtrumMask,
52
+ "data-dtrum-allow": dataDtrumAllow,
53
+ ...remainingProps
54
+ } = props;
55
+ const label = children?.trim();
56
+ const ariaLabel = ariaLabelProp || label || intl.formatMessage({
57
+ description: "Intent button open label",
58
+ defaultMessage: "Open with",
59
+ id: "JQOGuaGgqJObmSY1"
60
+ });
61
+ const intentButtonProps = (0, import_useIntentButton.useIntentButton)(
62
+ payload,
63
+ appId,
64
+ intentId,
65
+ onClickProp
66
+ );
67
+ if (disabled) {
68
+ return /* @__PURE__ */ import_react.default.createElement(
69
+ import_Button.Button,
70
+ {
71
+ disabled: true,
72
+ "data-testid": dataTestId,
73
+ "data-dtrum-mask": dataDtrumMask,
74
+ "data-dtrum-allow": dataDtrumAllow,
75
+ "aria-label": ariaLabel,
76
+ className: consumerClassName,
77
+ style: consumerStyle,
78
+ ...remainingProps
79
+ },
80
+ label,
81
+ /* @__PURE__ */ import_react.default.createElement(import_Button.Button.Suffix, null, /* @__PURE__ */ import_react.default.createElement(import_strato_icons.OpenWithIcon, null))
82
+ );
83
+ }
84
+ return /* @__PURE__ */ import_react.default.createElement(
85
+ import_Button.Button,
86
+ {
87
+ as: "a",
88
+ ref: forwardedRef,
89
+ "data-testid": dataTestId,
90
+ "data-dtrum-mask": dataDtrumMask,
91
+ "data-dtrum-allow": dataDtrumAllow,
92
+ "aria-label": ariaLabel ?? label,
93
+ className: consumerClassName,
94
+ style: consumerStyle,
95
+ ...remainingProps,
96
+ ...intentButtonProps
97
+ },
98
+ label,
99
+ /* @__PURE__ */ import_react.default.createElement(import_Button.Button.Suffix, null, /* @__PURE__ */ import_react.default.createElement(import_strato_icons.OpenWithIcon, null))
100
+ );
101
+ });
102
+ IntentButton.displayName = "IntentButton";
@@ -0,0 +1,12 @@
1
+ import { type IntentPayload } from '@dynatrace-sdk/navigation';
2
+ /**
3
+ * return shared intent button logic
4
+ * @param payload - an intent payload
5
+ * @returns intentLink and triggerIntent
6
+ * @internal
7
+ */
8
+ export declare function useIntentButton(payload: IntentPayload, appId?: string, intentId?: string, onClickProp?: React.MouseEventHandler): {
9
+ href: string;
10
+ onClick: (event: React.MouseEvent) => void;
11
+ onKeyDown: (event: React.KeyboardEvent) => void;
12
+ };
@@ -0,0 +1,72 @@
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 useIntentButton_exports = {};
19
+ __export(useIntentButton_exports, {
20
+ useIntentButton: () => useIntentButton
21
+ });
22
+ module.exports = __toCommonJS(useIntentButton_exports);
23
+ var import_react = require("react");
24
+ var import_navigation = require("@dynatrace-sdk/navigation");
25
+ function useIntentButton(payload, appId, intentId, onClickProp) {
26
+ const href = (0, import_react.useMemo)(
27
+ () => (
28
+ // SDK documentation is invalid. appId & intentId are in fact mandatory.
29
+ // This is why the ternary is necessary to ensure to call the correct signature.
30
+ appId && intentId ? (0, import_navigation.getIntentLink)(payload, appId, intentId) : (0, import_navigation.getIntentLink)(payload)
31
+ ),
32
+ [appId, intentId, payload]
33
+ );
34
+ const triggerIntent = (0, import_react.useCallback)(() => {
35
+ appId && intentId ? (0, import_navigation.sendIntent)(payload, appId, intentId) : (0, import_navigation.sendIntent)(payload);
36
+ }, [appId, intentId, payload]);
37
+ const onClick = (0, import_react.useCallback)(
38
+ (event) => {
39
+ onClickProp?.(event);
40
+ if (event.isDefaultPrevented()) {
41
+ return;
42
+ }
43
+ const nativeEvent = event.nativeEvent;
44
+ if (nativeEvent.button !== 0 || nativeEvent.metaKey || nativeEvent.ctrlKey || nativeEvent.shiftKey) {
45
+ return;
46
+ }
47
+ event.preventDefault();
48
+ triggerIntent();
49
+ },
50
+ [onClickProp, triggerIntent]
51
+ );
52
+ const onKeyDown = (0, import_react.useCallback)(
53
+ (event) => {
54
+ const nativeEvent = event.nativeEvent;
55
+ if (nativeEvent.code !== "Space" && nativeEvent.code !== "Enter") {
56
+ return;
57
+ }
58
+ event.preventDefault();
59
+ if (nativeEvent.metaKey || nativeEvent.ctrlKey) {
60
+ window.open(href);
61
+ return;
62
+ }
63
+ if (nativeEvent.shiftKey) {
64
+ window.open(href, "_blank", "menubar");
65
+ return;
66
+ }
67
+ triggerIntent();
68
+ },
69
+ [href, triggerIntent]
70
+ );
71
+ return { href, onClick, onKeyDown };
72
+ }
@@ -5,3 +5,7 @@ export type { ProgressBarLabelProps } from './progress/ProgressBarLabel.js';
5
5
  export type { ProgressBarValueProps } from './progress/ProgressBarValue.js';
6
6
  export { ProgressCircle } from './progress/ProgressCircle.js';
7
7
  export type { ProgressCircleProps } from './progress/ProgressCircle.js';
8
+ export { Skeleton } from './skeleton/Skeleton.js';
9
+ export type { SkeletonProps } from './skeleton/Skeleton.js';
10
+ export { SkeletonText } from './skeleton/SkeletonText.js';
11
+ export type { SkeletonTextProps } from './skeleton/SkeletonText.js';
package/content/index.js CHANGED
@@ -18,8 +18,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
18
18
  var content_exports = {};
19
19
  __export(content_exports, {
20
20
  ProgressBar: () => import_ProgressBar.ProgressBar,
21
- ProgressCircle: () => import_ProgressCircle.ProgressCircle
21
+ ProgressCircle: () => import_ProgressCircle.ProgressCircle,
22
+ Skeleton: () => import_Skeleton.Skeleton,
23
+ SkeletonText: () => import_SkeletonText.SkeletonText
22
24
  });
23
25
  module.exports = __toCommonJS(content_exports);
24
26
  var import_ProgressBar = require("./progress/ProgressBar.js");
25
27
  var import_ProgressCircle = require("./progress/ProgressCircle.js");
28
+ var import_Skeleton = require("./skeleton/Skeleton.js");
29
+ var import_SkeletonText = require("./skeleton/SkeletonText.js");
@@ -0,0 +1,33 @@
1
+ @keyframes Skeleton_skeletonAnimationKeyframes__1a1ozfd0 {
2
+ 0% {
3
+ transform: translateX(-100%) scaleX(0);
4
+ }
5
+ 100% {
6
+ transform: translateX(100%) scaleX(1.5);
7
+ }
8
+ }
9
+ .Skeleton_skeletonPlaceholderCSS__1a1ozfd1 {
10
+ position: relative;
11
+ overflow: hidden;
12
+ background-color: var(--dt-colors-background-field-neutral-disabled, #dadbe780);
13
+ }
14
+ .Skeleton_skeletonPlaceholderCSS__1a1ozfd1:after {
15
+ content: "";
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ background-color: var(--dt-colors-background-field-neutral-disabled, #dadbe780);
22
+ animation-iteration-count: infinite;
23
+ transform-origin: left center;
24
+ animation-name: Skeleton_skeletonAnimationKeyframes__1a1ozfd0;
25
+ animation-duration: var(--dt-timings-slow-gentle, 800ms);
26
+ animation-timing-function: var(--dt-easings-fast-in-slow-out, cubic-bezier(0.4, 0, 0.2, 1));
27
+ }
28
+ .Skeleton_skeletonPlaceholderCSS_variant_default__1a1ozfd2 {
29
+ border-radius: var(--dt-borders-radius-container-subdued, 8px);
30
+ }
31
+ .Skeleton_skeletonPlaceholderCSS_variant_rounded__1a1ozfd3 {
32
+ border-radius: 9999px;
33
+ }
@@ -0,0 +1,30 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { type DataTestId } from '../../core/types/data-props.js';
3
+ import { type StylingProps } from '../../core/types/styling-props.js';
4
+ import { type WithChildren } from '../../core/types/with-children.js';
5
+ /**
6
+ * Accepted properties for Skeleton
7
+ * @public
8
+ */
9
+ export interface SkeletonProps extends WithChildren, StylingProps, DataTestId {
10
+ /**
11
+ * Defines the shape of the Skeleton.
12
+ * @defaultValue 'default'
13
+ */
14
+ variant?: 'default' | 'rounded';
15
+ /**
16
+ * Width of the Skeleton placeholder.
17
+ * @defaultValue 100%
18
+ */
19
+ width?: CSSProperties['width'];
20
+ /**
21
+ * Height of the Skeleton placeholder.
22
+ * @defaultValue 100%
23
+ */
24
+ height?: CSSProperties['height'];
25
+ }
26
+ /**
27
+ * The `Skeleton` component renders a colored block with an animated background, indicating that something is loading.
28
+ * @public
29
+ */
30
+ export declare const Skeleton: (props: SkeletonProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,60 @@
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 Skeleton_exports = {};
29
+ __export(Skeleton_exports, {
30
+ Skeleton: () => Skeleton
31
+ });
32
+ module.exports = __toCommonJS(Skeleton_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_Skeleton_css = require("./Skeleton.sty.js");
36
+ const Skeleton = (0, import_react.forwardRef)(
37
+ (props, forwardedRef) => {
38
+ const {
39
+ children,
40
+ variant = "default",
41
+ width = "100%",
42
+ height = "100%",
43
+ className: consumerClassName,
44
+ style: consumerStyle,
45
+ "data-testid": dataTestId,
46
+ ...remainingProps
47
+ } = props;
48
+ return /* @__PURE__ */ import_react.default.createElement(
49
+ "div",
50
+ {
51
+ "data-testid": dataTestId,
52
+ ref: forwardedRef,
53
+ className: (0, import_clsx.default)((0, import_Skeleton_css.skeletonPlaceholderCSS)({ variant }), consumerClassName),
54
+ style: { width, height, ...consumerStyle },
55
+ ...remainingProps
56
+ },
57
+ children
58
+ );
59
+ }
60
+ );
@@ -0,0 +1,10 @@
1
+ export declare const skeletonPlaceholderCSS: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ variant: {
3
+ default: {
4
+ borderRadius: string;
5
+ };
6
+ rounded: {
7
+ borderRadius: "9999px";
8
+ };
9
+ };
10
+ }>;
@@ -0,0 +1,25 @@
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 Skeleton_css_exports = {};
19
+ __export(Skeleton_css_exports, {
20
+ skeletonPlaceholderCSS: () => skeletonPlaceholderCSS
21
+ });
22
+ module.exports = __toCommonJS(Skeleton_css_exports);
23
+ var import_Skeleton_css_ts_vanilla = require("./Skeleton.css");
24
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
25
+ var skeletonPlaceholderCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "Skeleton_skeletonPlaceholderCSS__1a1ozfd1", variantClassNames: { variant: { "default": "Skeleton_skeletonPlaceholderCSS_variant_default__1a1ozfd2", rounded: "Skeleton_skeletonPlaceholderCSS_variant_rounded__1a1ozfd3" } }, defaultVariants: {}, compoundVariants: [] });
@@ -0,0 +1,24 @@
1
+ import React, { type CSSProperties } 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 SkeletonText
6
+ * @public
7
+ */
8
+ export interface SkeletonTextProps extends StylingProps, DataTestId {
9
+ /**
10
+ * Width of the SkeletonText placeholder.
11
+ * @defaultValue 100%
12
+ */
13
+ width?: CSSProperties['width'];
14
+ /**
15
+ * Number of Lines of the SkeletonText placeholder.
16
+ * @defaultValue 3
17
+ */
18
+ lines?: number;
19
+ }
20
+ /**
21
+ * The `SkeletonText` component renders a specified number of placeholder boxes for lines of text with an animated background.
22
+ * @public
23
+ */
24
+ export declare const SkeletonText: (props: SkeletonTextProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,84 @@
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 SkeletonText_exports = {};
29
+ __export(SkeletonText_exports, {
30
+ SkeletonText: () => SkeletonText
31
+ });
32
+ module.exports = __toCommonJS(SkeletonText_exports);
33
+ var import_react = __toESM(require("react"));
34
+ var import_Skeleton = require("./Skeleton.js");
35
+ var import_Flex = require("../../layouts/flex/Flex.js");
36
+ const SkeletonText = (0, import_react.forwardRef)(
37
+ (props, forwardedRef) => {
38
+ const {
39
+ width = "100%",
40
+ lines = 3,
41
+ className: consumerClassName,
42
+ style: consumerStyle,
43
+ "data-testid": dataTestId,
44
+ ...remainingProps
45
+ } = props;
46
+ const getSkeletonLinesMargin = (line, lines2) => {
47
+ if (lines2 === 1) {
48
+ return 0;
49
+ }
50
+ return (line + 2) % 3 * 12;
51
+ };
52
+ const getSkeletonLines = (lines2) => {
53
+ const render = [];
54
+ for (let line = 0; line < lines2; line++) {
55
+ const width2 = `calc(100% - ${getSkeletonLinesMargin(line, lines2)}px)`;
56
+ render.push(
57
+ /* @__PURE__ */ import_react.default.createElement(
58
+ import_Skeleton.Skeleton,
59
+ {
60
+ key: `${lines2}-${line}`,
61
+ width: width2,
62
+ height: "12px"
63
+ }
64
+ )
65
+ );
66
+ }
67
+ return render;
68
+ };
69
+ return /* @__PURE__ */ import_react.default.createElement(
70
+ import_Flex.Flex,
71
+ {
72
+ "data-testid": dataTestId,
73
+ ref: forwardedRef,
74
+ flexDirection: "column",
75
+ gap: 8,
76
+ paddingY: 4,
77
+ className: consumerClassName,
78
+ style: { width, ...consumerStyle },
79
+ ...remainingProps
80
+ },
81
+ getSkeletonLines(lines)
82
+ );
83
+ }
84
+ );
@@ -14,6 +14,7 @@
14
14
  max-width: 100%;
15
15
  height: max-content;
16
16
  cursor: pointer;
17
+ box-sizing: border-box;
17
18
  border-color: transparent;
18
19
  border-style: solid;
19
20
  border-width: 0;
@@ -4,8 +4,10 @@ import {
4
4
  isVirtualPointerEvent,
5
5
  isVirtualClick
6
6
  } from "./button/utils/is-virtual-event.js";
7
+ import { IntentButton } from "./intent-button/IntentButton.js";
7
8
  export {
8
9
  Button,
10
+ IntentButton,
9
11
  focusWithoutScrolling as _focusWithoutScrolling,
10
12
  isVirtualClick as _isVirtualClick,
11
13
  isVirtualPointerEvent as _isVirtualPointerEvent
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/buttons/index.ts"],
4
- "sourcesContent": ["export { Button } from './button/Button.js';\nexport type { ButtonOwnProps, ButtonProps } from './button/Button.js';\nexport type { ButtonLabelProps } from './button/Label.js';\nexport type { ButtonPrefixProps } from './button/Prefix.js';\nexport type { ButtonSuffixProps } from './button/Suffix.js';\nexport type {\n AriaButtonProps as _AriaButtonProps,\n ButtonAria as _ButtonAria,\n AriaBaseButtonProps as _AriaBaseButtonProps,\n} from './button/types/button-aria.js';\nexport { focusWithoutScrolling as _focusWithoutScrolling } from './button/utils/focus-without-scrolling.js';\nexport {\n isVirtualPointerEvent as _isVirtualPointerEvent,\n isVirtualClick as _isVirtualClick,\n} from './button/utils/is-virtual-event.js';\n"],
5
- "mappings": "AAAA,SAAS,cAAc;AAUvB,SAAkC,6BAA8B;AAChE;AAAA,EAC2B;AAAA,EACP;AAAA,OACb;",
4
+ "sourcesContent": ["export { Button } from './button/Button.js';\nexport type { ButtonOwnProps, ButtonProps } from './button/Button.js';\nexport type { ButtonLabelProps } from './button/Label.js';\nexport type { ButtonPrefixProps } from './button/Prefix.js';\nexport type { ButtonSuffixProps } from './button/Suffix.js';\nexport type {\n AriaButtonProps as _AriaButtonProps,\n ButtonAria as _ButtonAria,\n AriaBaseButtonProps as _AriaBaseButtonProps,\n} from './button/types/button-aria.js';\nexport { focusWithoutScrolling as _focusWithoutScrolling } from './button/utils/focus-without-scrolling.js';\nexport {\n isVirtualPointerEvent as _isVirtualPointerEvent,\n isVirtualClick as _isVirtualClick,\n} from './button/utils/is-virtual-event.js';\nexport { IntentButton } from './intent-button/IntentButton.js';\nexport type {\n IntentButtonProps,\n IntentButtonPropsBase,\n} from './intent-button/IntentButton.js';\n"],
5
+ "mappings": "AAAA,SAAS,cAAc;AAUvB,SAAkC,6BAA8B;AAChE;AAAA,EAC2B;AAAA,EACP;AAAA,OACb;AACP,SAAS,oBAAoB;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,74 @@
1
+ import React, { forwardRef } from "react";
2
+ import { useIntl } from "react-intl";
3
+ import { OpenWithIcon } from "@dynatrace/strato-icons";
4
+ import { useIntentButton } from "./useIntentButton.js";
5
+ import { Button } from "../button/Button.js";
6
+ const IntentButton = /* @__PURE__ */ forwardRef((props, forwardedRef) => {
7
+ const intl = useIntl();
8
+ const {
9
+ children,
10
+ payload,
11
+ appId,
12
+ intentId,
13
+ disabled,
14
+ onClick: onClickProp,
15
+ "aria-label": ariaLabelProp,
16
+ className: consumerClassName,
17
+ style: consumerStyle,
18
+ "data-testid": dataTestId,
19
+ "data-dtrum-mask": dataDtrumMask,
20
+ "data-dtrum-allow": dataDtrumAllow,
21
+ ...remainingProps
22
+ } = props;
23
+ const label = children?.trim();
24
+ const ariaLabel = ariaLabelProp || label || intl.formatMessage({
25
+ description: "Intent button open label",
26
+ defaultMessage: "Open with",
27
+ id: "JQOGuaGgqJObmSY1"
28
+ });
29
+ const intentButtonProps = useIntentButton(
30
+ payload,
31
+ appId,
32
+ intentId,
33
+ onClickProp
34
+ );
35
+ if (disabled) {
36
+ return /* @__PURE__ */ React.createElement(
37
+ Button,
38
+ {
39
+ disabled: true,
40
+ "data-testid": dataTestId,
41
+ "data-dtrum-mask": dataDtrumMask,
42
+ "data-dtrum-allow": dataDtrumAllow,
43
+ "aria-label": ariaLabel,
44
+ className: consumerClassName,
45
+ style: consumerStyle,
46
+ ...remainingProps
47
+ },
48
+ label,
49
+ /* @__PURE__ */ React.createElement(Button.Suffix, null, /* @__PURE__ */ React.createElement(OpenWithIcon, null))
50
+ );
51
+ }
52
+ return /* @__PURE__ */ React.createElement(
53
+ Button,
54
+ {
55
+ as: "a",
56
+ ref: forwardedRef,
57
+ "data-testid": dataTestId,
58
+ "data-dtrum-mask": dataDtrumMask,
59
+ "data-dtrum-allow": dataDtrumAllow,
60
+ "aria-label": ariaLabel ?? label,
61
+ className: consumerClassName,
62
+ style: consumerStyle,
63
+ ...remainingProps,
64
+ ...intentButtonProps
65
+ },
66
+ label,
67
+ /* @__PURE__ */ React.createElement(Button.Suffix, null, /* @__PURE__ */ React.createElement(OpenWithIcon, null))
68
+ );
69
+ });
70
+ IntentButton.displayName = "IntentButton";
71
+ export {
72
+ IntentButton
73
+ };
74
+ //# sourceMappingURL=IntentButton.js.map