@dynatrace/strato-components 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/buttons/button/Button.css +16 -16
  2. package/buttons/button/Button.js +16 -10
  3. package/buttons/button/Button.sty.js +4 -4
  4. package/buttons/intent-button/IntentButton.d.ts +2 -0
  5. package/buttons/intent-button/IntentButton.js +4 -1
  6. package/content/progress/ProgressBar.css +71 -71
  7. package/content/progress/ProgressBar.js +3 -1
  8. package/content/progress/ProgressBar.sty.js +5 -5
  9. package/content/progress/ProgressBarIcon.css +2 -2
  10. package/content/progress/ProgressBarIcon.sty.js +1 -1
  11. package/content/progress/ProgressBarLabel.css +3 -3
  12. package/content/progress/ProgressBarLabel.sty.js +1 -1
  13. package/content/progress/ProgressBarValue.css +5 -5
  14. package/content/progress/ProgressBarValue.sty.js +1 -1
  15. package/content/progress/ProgressCircle.css +40 -40
  16. package/content/progress/ProgressCircle.js +3 -1
  17. package/content/progress/ProgressCircle.sty.js +5 -5
  18. package/content/skeleton/Skeleton.css +7 -7
  19. package/content/skeleton/Skeleton.js +3 -0
  20. package/content/skeleton/Skeleton.sty.js +5 -5
  21. package/content/skeleton/SkeletonText.js +3 -0
  22. package/core/components/app-root/AppRoot.js +3 -1
  23. package/core/hooks/useBehavioralTrackingProps.d.ts +2 -0
  24. package/core/hooks/useBehavioralTrackingProps.js +46 -0
  25. package/core/index.d.ts +2 -0
  26. package/core/index.js +2 -0
  27. package/core/styles/focusRing.css +66 -66
  28. package/core/styles/focusRing.sty.d.ts +10 -6
  29. package/core/styles/focusRing.sty.js +2 -2
  30. package/core/styles/focusRingStatic.css +44 -0
  31. package/core/styles/focusRingStatic.sty.d.ts +77 -0
  32. package/core/styles/focusRingStatic.sty.js +26 -0
  33. package/core/styles/useFocusRing.d.ts +7 -6
  34. package/core/styles/useFocusRing.js +13 -13
  35. package/core/types/behavior-tracking-props.d.ts +33 -0
  36. package/core/types/behavior-tracking-props.js +16 -0
  37. package/core/utils/colorUtils.css +60 -60
  38. package/core/utils/colorUtils.sty.js +2 -2
  39. package/esm/buttons/button/Button.css +16 -16
  40. package/esm/buttons/button/Button.js +16 -10
  41. package/esm/buttons/button/Button.js.map +2 -2
  42. package/esm/buttons/button/Button.sty.js +4 -4
  43. package/esm/buttons/button/Button.sty.js.map +1 -1
  44. package/esm/buttons/index.js.map +1 -1
  45. package/esm/buttons/intent-button/IntentButton.js +4 -1
  46. package/esm/buttons/intent-button/IntentButton.js.map +2 -2
  47. package/esm/content/progress/ProgressBar.css +71 -71
  48. package/esm/content/progress/ProgressBar.js +3 -1
  49. package/esm/content/progress/ProgressBar.js.map +2 -2
  50. package/esm/content/progress/ProgressBar.sty.js +5 -5
  51. package/esm/content/progress/ProgressBar.sty.js.map +1 -1
  52. package/esm/content/progress/ProgressBarIcon.css +2 -2
  53. package/esm/content/progress/ProgressBarIcon.sty.js +1 -1
  54. package/esm/content/progress/ProgressBarIcon.sty.js.map +1 -1
  55. package/esm/content/progress/ProgressBarLabel.css +3 -3
  56. package/esm/content/progress/ProgressBarLabel.sty.js +1 -1
  57. package/esm/content/progress/ProgressBarLabel.sty.js.map +1 -1
  58. package/esm/content/progress/ProgressBarValue.css +5 -5
  59. package/esm/content/progress/ProgressBarValue.sty.js +1 -1
  60. package/esm/content/progress/ProgressBarValue.sty.js.map +1 -1
  61. package/esm/content/progress/ProgressCircle.css +40 -40
  62. package/esm/content/progress/ProgressCircle.js +3 -1
  63. package/esm/content/progress/ProgressCircle.js.map +2 -2
  64. package/esm/content/progress/ProgressCircle.sty.js +5 -5
  65. package/esm/content/progress/ProgressCircle.sty.js.map +1 -1
  66. package/esm/content/skeleton/Skeleton.css +7 -7
  67. package/esm/content/skeleton/Skeleton.js +3 -0
  68. package/esm/content/skeleton/Skeleton.js.map +2 -2
  69. package/esm/content/skeleton/Skeleton.sty.js +5 -5
  70. package/esm/content/skeleton/Skeleton.sty.js.map +1 -1
  71. package/esm/content/skeleton/SkeletonText.js +3 -0
  72. package/esm/content/skeleton/SkeletonText.js.map +2 -2
  73. package/esm/core/components/app-root/AppRoot.js +3 -1
  74. package/esm/core/components/app-root/AppRoot.js.map +2 -2
  75. package/esm/core/hooks/useBehavioralTrackingProps.js +27 -0
  76. package/esm/core/hooks/useBehavioralTrackingProps.js.map +7 -0
  77. package/esm/core/index.js +4 -0
  78. package/esm/core/index.js.map +2 -2
  79. package/esm/core/styles/focusRing.css +66 -66
  80. package/esm/core/styles/focusRing.sty.js +2 -2
  81. package/esm/core/styles/focusRing.sty.js.map +1 -1
  82. package/esm/core/styles/focusRingStatic.css +44 -0
  83. package/esm/core/styles/focusRingStatic.sty.js +7 -0
  84. package/esm/core/styles/focusRingStatic.sty.js.map +7 -0
  85. package/esm/core/styles/useFocusRing.js +15 -15
  86. package/esm/core/styles/useFocusRing.js.map +2 -2
  87. package/esm/core/types/behavior-tracking-props.js +1 -0
  88. package/esm/core/types/behavior-tracking-props.js.map +7 -0
  89. package/esm/core/utils/colorUtils.css +60 -60
  90. package/esm/core/utils/colorUtils.sty.js +2 -2
  91. package/esm/core/utils/colorUtils.sty.js.map +1 -1
  92. package/esm/layouts/container/Container.css +4 -4
  93. package/esm/layouts/container/Container.sty.js +1 -1
  94. package/esm/layouts/container/Container.sty.js.map +1 -1
  95. package/esm/layouts/divider/Divider.css +6 -6
  96. package/esm/layouts/divider/Divider.sty.js +1 -1
  97. package/esm/layouts/divider/Divider.sty.js.map +1 -1
  98. package/esm/layouts/surface/Surface.css +39 -39
  99. package/esm/layouts/surface/Surface.js +2 -6
  100. package/esm/layouts/surface/Surface.js.map +2 -2
  101. package/esm/layouts/surface/Surface.sty.js +2 -2
  102. package/esm/layouts/surface/Surface.sty.js.map +1 -1
  103. package/esm/layouts/surface/variables.sty.js +1 -1
  104. package/esm/layouts/surface/variables.sty.js.map +1 -1
  105. package/esm/styles/colorUtils.css +60 -60
  106. package/esm/styles/colorUtils.sty.js +2 -2
  107. package/esm/styles/colorUtils.sty.js.map +1 -1
  108. package/esm/styles/container.css +47 -47
  109. package/esm/styles/container.sty.js +2 -2
  110. package/esm/styles/container.sty.js.map +1 -1
  111. package/esm/styles/ellipsis.css +1 -1
  112. package/esm/styles/ellipsis.sty.js +1 -1
  113. package/esm/styles/ellipsis.sty.js.map +1 -1
  114. package/esm/styles/field.css +153 -153
  115. package/esm/styles/field.sty.js +2 -2
  116. package/esm/styles/field.sty.js.map +1 -1
  117. package/esm/styles/sprinkles.css +262 -262
  118. package/esm/styles/sprinkles.sty.js +1 -1
  119. package/esm/styles/sprinkles.sty.js.map +1 -1
  120. package/esm/styles/textStyle.css +8 -8
  121. package/esm/styles/textStyle.sty.js +1 -1
  122. package/esm/styles/textStyle.sty.js.map +1 -1
  123. package/esm/typography/block-quote/Blockquote.css +2 -2
  124. package/esm/typography/block-quote/Blockquote.js +3 -1
  125. package/esm/typography/block-quote/Blockquote.js.map +2 -2
  126. package/esm/typography/block-quote/Blockquote.sty.js +1 -1
  127. package/esm/typography/block-quote/Blockquote.sty.js.map +1 -1
  128. package/esm/typography/code/Code.css +1 -1
  129. package/esm/typography/code/Code.js +3 -1
  130. package/esm/typography/code/Code.js.map +2 -2
  131. package/esm/typography/code/Code.sty.js +1 -1
  132. package/esm/typography/code/Code.sty.js.map +1 -1
  133. package/esm/typography/emphasis/Emphasis.css +1 -1
  134. package/esm/typography/emphasis/Emphasis.js +3 -1
  135. package/esm/typography/emphasis/Emphasis.js.map +2 -2
  136. package/esm/typography/emphasis/Emphasis.sty.js +1 -1
  137. package/esm/typography/emphasis/Emphasis.sty.js.map +1 -1
  138. package/esm/typography/external-link/ExternalLink.css +8 -5
  139. package/esm/typography/external-link/ExternalLink.js +6 -13
  140. package/esm/typography/external-link/ExternalLink.js.map +2 -2
  141. package/esm/typography/external-link/ExternalLink.sty.js +2 -1
  142. package/esm/typography/external-link/ExternalLink.sty.js.map +2 -2
  143. package/esm/typography/heading/Heading.css +7 -7
  144. package/esm/typography/heading/Heading.js +3 -1
  145. package/esm/typography/heading/Heading.js.map +2 -2
  146. package/esm/typography/heading/Heading.sty.js +1 -1
  147. package/esm/typography/heading/Heading.sty.js.map +1 -1
  148. package/esm/typography/highlight/Highlight.css +2 -2
  149. package/esm/typography/highlight/Highlight.js +3 -1
  150. package/esm/typography/highlight/Highlight.js.map +2 -2
  151. package/esm/typography/highlight/Highlight.sty.js +1 -1
  152. package/esm/typography/highlight/Highlight.sty.js.map +1 -1
  153. package/esm/typography/link/Link.css +6 -3
  154. package/esm/typography/link/Link.js +6 -19
  155. package/esm/typography/link/Link.js.map +2 -2
  156. package/esm/typography/link/Link.sty.js +2 -1
  157. package/esm/typography/link/Link.sty.js.map +2 -2
  158. package/esm/typography/list/List.css +4 -4
  159. package/esm/typography/list/List.js +3 -1
  160. package/esm/typography/list/List.js.map +2 -2
  161. package/esm/typography/list/List.sty.js +2 -2
  162. package/esm/typography/list/List.sty.js.map +1 -1
  163. package/esm/typography/paragraph/Paragraph.css +3 -3
  164. package/esm/typography/paragraph/Paragraph.js +3 -1
  165. package/esm/typography/paragraph/Paragraph.js.map +2 -2
  166. package/esm/typography/paragraph/Paragraph.sty.js +1 -1
  167. package/esm/typography/paragraph/Paragraph.sty.js.map +1 -1
  168. package/esm/typography/strikethrough/Strikethrough.css +1 -1
  169. package/esm/typography/strikethrough/Strikethrough.js +3 -1
  170. package/esm/typography/strikethrough/Strikethrough.js.map +2 -2
  171. package/esm/typography/strikethrough/Strikethrough.sty.js +1 -1
  172. package/esm/typography/strikethrough/Strikethrough.sty.js.map +1 -1
  173. package/esm/typography/strong/Strong.css +1 -1
  174. package/esm/typography/strong/Strong.js +3 -1
  175. package/esm/typography/strong/Strong.js.map +2 -2
  176. package/esm/typography/strong/Strong.sty.js +1 -1
  177. package/esm/typography/strong/Strong.sty.js.map +1 -1
  178. package/esm/typography/text/Text.css +3 -3
  179. package/esm/typography/text/Text.js +4 -1
  180. package/esm/typography/text/Text.js.map +2 -2
  181. package/esm/typography/text/Text.sty.js +1 -1
  182. package/esm/typography/text/Text.sty.js.map +1 -1
  183. package/esm/typography/text-ellipsis/TextEllipsis.css +6 -6
  184. package/esm/typography/text-ellipsis/TextEllipsis.js +8 -1
  185. package/esm/typography/text-ellipsis/TextEllipsis.js.map +2 -2
  186. package/esm/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
  187. package/esm/typography/text-ellipsis/TextEllipsis.sty.js.map +1 -1
  188. package/layouts/container/Container.css +4 -4
  189. package/layouts/container/Container.sty.js +1 -1
  190. package/layouts/divider/Divider.css +6 -6
  191. package/layouts/divider/Divider.sty.js +1 -1
  192. package/layouts/surface/Surface.css +39 -39
  193. package/layouts/surface/Surface.js +2 -6
  194. package/layouts/surface/Surface.sty.js +2 -2
  195. package/layouts/surface/variables.sty.js +1 -1
  196. package/package.json +6 -6
  197. package/styles/colorUtils.css +60 -60
  198. package/styles/colorUtils.sty.js +2 -2
  199. package/styles/container.css +47 -47
  200. package/styles/container.sty.js +2 -2
  201. package/styles/ellipsis.css +1 -1
  202. package/styles/ellipsis.sty.js +1 -1
  203. package/styles/field.css +153 -153
  204. package/styles/field.sty.js +2 -2
  205. package/styles/sprinkles.css +262 -262
  206. package/styles/sprinkles.sty.d.ts +12 -12
  207. package/styles/sprinkles.sty.js +1 -1
  208. package/styles/textStyle.css +8 -8
  209. package/styles/textStyle.sty.js +1 -1
  210. package/typography/block-quote/Blockquote.css +2 -2
  211. package/typography/block-quote/Blockquote.js +3 -1
  212. package/typography/block-quote/Blockquote.sty.js +1 -1
  213. package/typography/code/Code.css +1 -1
  214. package/typography/code/Code.js +3 -1
  215. package/typography/code/Code.sty.js +1 -1
  216. package/typography/emphasis/Emphasis.css +1 -1
  217. package/typography/emphasis/Emphasis.js +3 -1
  218. package/typography/emphasis/Emphasis.sty.js +1 -1
  219. package/typography/external-link/ExternalLink.css +8 -5
  220. package/typography/external-link/ExternalLink.js +6 -13
  221. package/typography/external-link/ExternalLink.sty.js +2 -1
  222. package/typography/heading/Heading.css +7 -7
  223. package/typography/heading/Heading.js +3 -1
  224. package/typography/heading/Heading.sty.js +1 -1
  225. package/typography/highlight/Highlight.css +2 -2
  226. package/typography/highlight/Highlight.js +3 -1
  227. package/typography/highlight/Highlight.sty.js +1 -1
  228. package/typography/link/Link.css +6 -3
  229. package/typography/link/Link.js +6 -19
  230. package/typography/link/Link.sty.js +2 -1
  231. package/typography/list/List.css +4 -4
  232. package/typography/list/List.js +3 -1
  233. package/typography/list/List.sty.js +2 -2
  234. package/typography/paragraph/Paragraph.css +3 -3
  235. package/typography/paragraph/Paragraph.js +3 -1
  236. package/typography/paragraph/Paragraph.sty.js +1 -1
  237. package/typography/strikethrough/Strikethrough.css +1 -1
  238. package/typography/strikethrough/Strikethrough.js +3 -1
  239. package/typography/strikethrough/Strikethrough.sty.js +1 -1
  240. package/typography/strong/Strong.css +1 -1
  241. package/typography/strong/Strong.js +3 -1
  242. package/typography/strong/Strong.sty.js +1 -1
  243. package/typography/text/Text.css +3 -3
  244. package/typography/text/Text.js +4 -1
  245. package/typography/text/Text.sty.js +1 -1
  246. package/typography/text-ellipsis/TextEllipsis.css +6 -6
  247. package/typography/text-ellipsis/TextEllipsis.js +8 -1
  248. package/typography/text-ellipsis/TextEllipsis.sty.js +2 -2
@@ -42,6 +42,7 @@ var import_useSafeForwardProps = require("../../core/hooks/useSafeForwardProps.j
42
42
  var import_Container = require("../../layouts/container/Container.js");
43
43
  var import_container_css = require("../../styles/container.sty.js");
44
44
  var import_textStyle_css = require("../../styles/textStyle.sty.js");
45
+ const COMPONENT_NAME = "ProgressCircle";
45
46
  const progressCircleSizes = {
46
47
  small: 20,
47
48
  large: 40
@@ -116,6 +117,7 @@ const ProgressCircle = (0, import_react.forwardRef)(
116
117
  ),
117
118
  style: consumerStyle,
118
119
  ...forwardProps,
120
+ "data-dt-component": COMPONENT_NAME,
119
121
  children: [
120
122
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
121
123
  "span",
@@ -181,4 +183,4 @@ const ProgressCircle = (0, import_react.forwardRef)(
181
183
  );
182
184
  }
183
185
  );
184
- ProgressCircle.displayName = "ProgressCircle";
186
+ ProgressCircle.displayName = COMPONENT_NAME;
@@ -27,8 +27,8 @@ __export(ProgressCircle_css_exports, {
27
27
  module.exports = __toCommonJS(ProgressCircle_css_exports);
28
28
  var import_ProgressCircle_css_ts_vanilla = require("./ProgressCircle.css");
29
29
  var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
30
- var progressCircleBackgroundCSS = "_kvldjh9-1-16-0";
31
- var progressCircleCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_kvldjh6-1-16-0", variantClassNames: { indeterminate: { true: "_kvldjh7-1-16-0", false: "_kvldjh8-1-16-0" } }, defaultVariants: {}, compoundVariants: [] });
32
- var progressCircleContainerCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_kvldjha-1-16-0", variantClassNames: { size: { small: "_kvldjhb-1-16-0", large: "_kvldjhc-1-16-0" }, color: { critical: "_kvldjhd-1-16-0", neutral: "_kvldjhe-1-16-0", primary: "_kvldjhf-1-16-0", success: "_kvldjhg-1-16-0", warning: "_kvldjhh-1-16-0" }, variant: { "default": "_kvldjhi-1-16-0", accent: "_kvldjhj-1-16-0" } }, defaultVariants: {}, compoundVariants: [[{ color: "primary", variant: "accent" }, "_kvldjhk-1-16-0"], [{ color: "success", variant: "accent" }, "_kvldjhl-1-16-0"], [{ color: "warning", variant: "accent" }, "_kvldjhm-1-16-0"], [{ color: "critical", variant: "accent" }, "_kvldjhn-1-16-0"], [{ color: "neutral", variant: "accent" }, "_kvldjho-1-16-0"]] });
33
- var progressCircleRootCSS = "_kvldjh4-1-16-0";
34
- var progressCircleSvgCss = "_kvldjh5-1-16-0";
30
+ var progressCircleBackgroundCSS = "_kvldjh9-1-17-0";
31
+ var progressCircleCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_kvldjh6-1-17-0", variantClassNames: { indeterminate: { true: "_kvldjh7-1-17-0", false: "_kvldjh8-1-17-0" } }, defaultVariants: {}, compoundVariants: [] });
32
+ var progressCircleContainerCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_kvldjha-1-17-0", variantClassNames: { size: { small: "_kvldjhb-1-17-0", large: "_kvldjhc-1-17-0" }, color: { critical: "_kvldjhd-1-17-0", neutral: "_kvldjhe-1-17-0", primary: "_kvldjhf-1-17-0", success: "_kvldjhg-1-17-0", warning: "_kvldjhh-1-17-0" }, variant: { "default": "_kvldjhi-1-17-0", accent: "_kvldjhj-1-17-0" } }, defaultVariants: {}, compoundVariants: [[{ color: "primary", variant: "accent" }, "_kvldjhk-1-17-0"], [{ color: "success", variant: "accent" }, "_kvldjhl-1-17-0"], [{ color: "warning", variant: "accent" }, "_kvldjhm-1-17-0"], [{ color: "critical", variant: "accent" }, "_kvldjhn-1-17-0"], [{ color: "neutral", variant: "accent" }, "_kvldjho-1-17-0"]] });
33
+ var progressCircleRootCSS = "_kvldjh4-1-17-0";
34
+ var progressCircleSvgCss = "_kvldjh5-1-17-0";
@@ -1,27 +1,27 @@
1
- ._1a1ozfd0-1-16-0 {
1
+ ._1a1ozfd0-1-17-0 {
2
2
  position: relative;
3
3
  overflow: hidden;
4
4
  }
5
- ._1a1ozfd1-1-16-0 {
5
+ ._1a1ozfd1-1-17-0 {
6
6
  border-radius: var(--dt-borders-radius-container-subdued, 6px);
7
7
  }
8
- ._1a1ozfd2-1-16-0 {
8
+ ._1a1ozfd2-1-17-0 {
9
9
  border-radius: 9999px;
10
10
  }
11
- ._1a1ozfd3-1-16-0 {
11
+ ._1a1ozfd3-1-17-0 {
12
12
  width: 100%;
13
13
  height: 100%;
14
14
  }
15
- ._1a1ozfd4-1-16-0 stop {
15
+ ._1a1ozfd4-1-17-0 stop {
16
16
  stop-color: var(--dt-colors-background-field-neutral-disabled, #e4e5eb80);
17
17
  }
18
- ._1a1ozfd5-1-16-0 {
18
+ ._1a1ozfd5-1-17-0 {
19
19
  width: 100%;
20
20
  height: 100%;
21
21
  fill: var(--dt-colors-background-field-neutral-disabled, #e4e5eb80);
22
22
  }
23
23
  @media (prefers-reduced-motion) {
24
- ._1a1ozfd6-1-16-0 {
24
+ ._1a1ozfd6-1-17-0 {
25
25
  display: contents;
26
26
  }
27
27
  }
@@ -37,6 +37,7 @@ var import_react = require("react");
37
37
  var import_Skeleton_css = require("./Skeleton.sty.js");
38
38
  var import_utils = require("./utils.js");
39
39
  var import_useId = require("../../core/hooks/useId.js");
40
+ const COMPONENT_NAME = "Skeleton";
40
41
  const Skeleton = (0, import_react.forwardRef)(
41
42
  (props, forwardedRef) => {
42
43
  const {
@@ -58,6 +59,7 @@ const Skeleton = (0, import_react.forwardRef)(
58
59
  className: (0, import_clsx.default)((0, import_Skeleton_css.skeletonPlaceholderCSS)({ variant }), consumerClassName),
59
60
  style: { width, height, ...consumerStyle },
60
61
  ...remainingProps,
62
+ "data-dt-component": COMPONENT_NAME,
61
63
  children: [
62
64
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { className: import_Skeleton_css.skeletonSvgCSS, children: [
63
65
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.SkeletonGradient, { id: gradientId }) }),
@@ -69,3 +71,4 @@ const Skeleton = (0, import_react.forwardRef)(
69
71
  );
70
72
  }
71
73
  );
74
+ Skeleton.displayName = COMPONENT_NAME;
@@ -27,8 +27,8 @@ __export(Skeleton_css_exports, {
27
27
  module.exports = __toCommonJS(Skeleton_css_exports);
28
28
  var import_Skeleton_css_ts_vanilla = require("./Skeleton.css");
29
29
  var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
30
- var skeletonPlaceholderCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_1a1ozfd0-1-16-0", variantClassNames: { variant: { "default": "_1a1ozfd1-1-16-0", rounded: "_1a1ozfd2-1-16-0" } }, defaultVariants: {}, compoundVariants: [] });
31
- var skeletonSvgBackgroundFillCSS = "_1a1ozfd5-1-16-0";
32
- var skeletonSvgCSS = "_1a1ozfd3-1-16-0";
33
- var skeletonSvgGradientCSS = "_1a1ozfd4-1-16-0";
34
- var skeletonSvgGradientRectCSS = "_1a1ozfd6-1-16-0";
30
+ var skeletonPlaceholderCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_1a1ozfd0-1-17-0", variantClassNames: { variant: { "default": "_1a1ozfd1-1-17-0", rounded: "_1a1ozfd2-1-17-0" } }, defaultVariants: {}, compoundVariants: [] });
31
+ var skeletonSvgBackgroundFillCSS = "_1a1ozfd5-1-17-0";
32
+ var skeletonSvgCSS = "_1a1ozfd3-1-17-0";
33
+ var skeletonSvgGradientCSS = "_1a1ozfd4-1-17-0";
34
+ var skeletonSvgGradientRectCSS = "_1a1ozfd6-1-17-0";
@@ -26,6 +26,7 @@ var import_react = require("react");
26
26
  var import_Skeleton_css = require("./Skeleton.sty.js");
27
27
  var import_utils = require("./utils.js");
28
28
  var import_useId = require("../../core/hooks/useId.js");
29
+ const COMPONENT_NAME = "SkeletonText";
29
30
  const lineHeight = 12;
30
31
  const linePadding = 8;
31
32
  const baseYOffset = linePadding * 0.5;
@@ -61,6 +62,7 @@ const SkeletonText = (0, import_react.forwardRef)(
61
62
  ...consumerStyle
62
63
  },
63
64
  ...remainingProps,
65
+ "data-dt-component": COMPONENT_NAME,
64
66
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { className: import_Skeleton_css.skeletonSvgCSS, children: [
65
67
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_utils.SkeletonGradient, { id: gradientId }) }),
66
68
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("mask", { id: maskId, children: new Array(lines).fill(null).map((_, lineIndex) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -86,3 +88,4 @@ const SkeletonText = (0, import_react.forwardRef)(
86
88
  );
87
89
  }
88
90
  );
91
+ SkeletonText.displayName = COMPONENT_NAME;
@@ -30,6 +30,7 @@ var import_user_preferences = require("@dynatrace-sdk/user-preferences");
30
30
  var import_AppRoot_css = require("./AppRoot.sty.js");
31
31
  var import_useCurrentTheme = require("../../hooks/useCurrentTheme.js");
32
32
  var import_FocusProvider = require("../../providers/FocusProvider.js");
33
+ const COMPONENT_NAME = "AppRoot";
33
34
  function getBaseHref() {
34
35
  const baseElement = document.querySelector("base");
35
36
  const href = baseElement?.href ?? "/";
@@ -83,6 +84,7 @@ const AppRoot = /* @__PURE__ */ (0, import_react.forwardRef)(
83
84
  "data-theme": theme,
84
85
  "data-dtrum-mask": dataDtrumMask,
85
86
  "data-dtrum-allow": dataDtrumAllow,
87
+ "data-dt-component": COMPONENT_NAME,
86
88
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
87
89
  import_react_intl.IntlProvider,
88
90
  {
@@ -97,4 +99,4 @@ const AppRoot = /* @__PURE__ */ (0, import_react.forwardRef)(
97
99
  );
98
100
  }
99
101
  );
100
- AppRoot.displayName = "AppRoot";
102
+ AppRoot.displayName = COMPONENT_NAME;
@@ -0,0 +1,2 @@
1
+ import type { BehaviorTrackingProps } from '../types/behavior-tracking-props.js';
2
+ export declare const useBehavioralTrackingProps: <TProps extends object>(props: TProps) => [BehaviorTrackingProps, Omit<TProps, keyof BehaviorTrackingProps>];
@@ -0,0 +1,46 @@
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 useBehavioralTrackingProps_exports = {};
20
+ __export(useBehavioralTrackingProps_exports, {
21
+ useBehavioralTrackingProps: () => useBehavioralTrackingProps
22
+ });
23
+ module.exports = __toCommonJS(useBehavioralTrackingProps_exports);
24
+ var import_react = require("react");
25
+ const behaviorTrackingPropKeys = [
26
+ "data-dt-content",
27
+ "data-dt-name",
28
+ "data-dt-children-name",
29
+ "data-dt-features",
30
+ "data-dt-properties",
31
+ "data-dt-mouse-over",
32
+ "data-dt-value-content",
33
+ "data-dt-children-value-content",
34
+ "data-dt-ancestor"
35
+ ];
36
+ const useBehavioralTrackingProps = (props) => (0, import_react.useMemo)(() => {
37
+ const behavioralTrackingProps = {};
38
+ const restProps = { ...props };
39
+ for (const [key, value] of Object.entries(props)) {
40
+ if (behaviorTrackingPropKeys.includes(key) && typeof value === "string") {
41
+ behavioralTrackingProps[key] = value;
42
+ delete restProps[key];
43
+ }
44
+ }
45
+ return [behavioralTrackingProps, restProps];
46
+ }, [props]);
package/core/index.d.ts CHANGED
@@ -3,6 +3,7 @@ export { FocusScope, type FocusScopeProps, } from './components/focus-scope/Focu
3
3
  export { type FocusContextProps as _FocusContextProps } from './contexts/FocusContext.js';
4
4
  export { useCurrentTheme } from './hooks/useCurrentTheme.js';
5
5
  export { useFocusContext as _useFocusContext } from './hooks/useFocusContext.js';
6
+ export { type VariantType, type UseFocusRingProps, type FocusRingProps, useFocusRing, } from './styles/useFocusRing.js';
6
7
  export { FocusProvider as _FocusProvider, type Modality as _Modality, } from './providers/FocusProvider.js';
7
8
  export type { MaskingProps } from './types/masking-props.js';
8
9
  export type { DataTestId } from './types/data-props.js';
@@ -25,3 +26,4 @@ export type { AriaDisabledProps, AriaLabelingProps, } from './types/a11y-props.j
25
26
  export type { DOMProps } from './types/dom.js';
26
27
  export { canReceiveDefaultTextFormat as _canReceiveDefaultTextFormat } from './utils/can-receive-default-text-format.js';
27
28
  export { parseBoolean as _parseBoolean } from './utils/parse-boolean.js';
29
+ export type { BehaviorTrackingProps } from './types/behavior-tracking-props.js';
package/core/index.js CHANGED
@@ -34,6 +34,7 @@ __export(core_exports, {
34
34
  _useFocusContext: () => import_useFocusContext.useFocusContext,
35
35
  _useSafeForwardProps: () => import_useSafeForwardProps.useSafeForwardProps,
36
36
  useCurrentTheme: () => import_useCurrentTheme.useCurrentTheme,
37
+ useFocusRing: () => import_useFocusRing.useFocusRing,
37
38
  useId: () => import_useId.useId
38
39
  });
39
40
  module.exports = __toCommonJS(core_exports);
@@ -41,6 +42,7 @@ var import_AppRoot = require("./components/app-root/AppRoot.js");
41
42
  var import_FocusScope = require("./components/focus-scope/FocusScope.js");
42
43
  var import_useCurrentTheme = require("./hooks/useCurrentTheme.js");
43
44
  var import_useFocusContext = require("./hooks/useFocusContext.js");
45
+ var import_useFocusRing = require("./styles/useFocusRing.js");
44
46
  var import_FocusProvider = require("./providers/FocusProvider.js");
45
47
  var import_attempt_focus = require("./utils/focus-management/attempt-focus.js");
46
48
  var import_focus_first_descendant = require("./utils/focus-management/focus-first-descendant.js");
@@ -1,75 +1,75 @@
1
- ._z2r50s3-1-16-0 {
1
+ ._z2r50s3-1-17-0 {
2
2
  outline: none;
3
3
  }
4
- ._z2r50s3-1-16-0:focus-visible {
4
+ ._z2r50s3-1-17-0:focus-visible {
5
5
  outline: none;
6
6
  }
7
- ._z2r50s4-1-16-0 {
7
+ ._z2r50s4-1-17-0 {
8
8
  border-radius: var(--dt-borders-radius-field-subdued, 3px);
9
- box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-16-0);
10
- background-color: var(--_z2r50s2-1-16-0);
11
- }
12
- ._z2r50s5-1-16-0._z2r50s5-1-16-0 {
13
- box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-16-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-16-0);
14
- }
15
- ._z2r50s6-1-16-0 {
16
- --_z2r50s0-1-16-0: var(--dt-colors-border-neutral-accent, #595a7d);
17
- --_z2r50s1-1-16-0: var(--dt-colors-border-neutral-default, #dadbe4);
18
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
19
- }
20
- ._z2r50s7-1-16-0 {
21
- --_z2r50s0-1-16-0: var(--dt-colors-border-primary-accent, #464cce);
22
- --_z2r50s1-1-16-0: var(--dt-colors-border-primary-default, #d5dbf6);
23
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
24
- }
25
- ._z2r50s8-1-16-0 {
26
- --_z2r50s0-1-16-0: var(--dt-colors-border-success-accent, #2d6761);
27
- --_z2r50s1-1-16-0: var(--dt-colors-border-success-default, #d3dedd);
28
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
29
- }
30
- ._z2r50s9-1-16-0 {
31
- --_z2r50s0-1-16-0: var(--dt-colors-border-warning-accent, #855400);
32
- --_z2r50s1-1-16-0: var(--dt-colors-border-warning-default, #f9ebdb);
33
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
34
- }
35
- ._z2r50sa-1-16-0 {
36
- --_z2r50s0-1-16-0: var(--dt-colors-border-critical-accent, #bb0731);
37
- --_z2r50s1-1-16-0: var(--dt-colors-border-critical-default, #f6d6d5);
38
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
39
- }
40
- ._z2r50sb-1-16-0:focus-within {
9
+ box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-17-0);
10
+ background-color: var(--_z2r50s2-1-17-0);
11
+ }
12
+ ._z2r50s5-1-17-0._z2r50s5-1-17-0 {
13
+ box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-17-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-17-0);
14
+ }
15
+ ._z2r50s6-1-17-0 {
16
+ --_z2r50s0-1-17-0: var(--dt-colors-border-neutral-accent, #595a7d);
17
+ --_z2r50s1-1-17-0: var(--dt-colors-border-neutral-default, #dadbe4);
18
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
19
+ }
20
+ ._z2r50s7-1-17-0 {
21
+ --_z2r50s0-1-17-0: var(--dt-colors-border-primary-accent, #464cce);
22
+ --_z2r50s1-1-17-0: var(--dt-colors-border-primary-default, #d5dbf6);
23
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
24
+ }
25
+ ._z2r50s8-1-17-0 {
26
+ --_z2r50s0-1-17-0: var(--dt-colors-border-success-accent, #2d6761);
27
+ --_z2r50s1-1-17-0: var(--dt-colors-border-success-default, #d3dedd);
28
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
29
+ }
30
+ ._z2r50s9-1-17-0 {
31
+ --_z2r50s0-1-17-0: var(--dt-colors-border-warning-accent, #855400);
32
+ --_z2r50s1-1-17-0: var(--dt-colors-border-warning-default, #f9ebdb);
33
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
34
+ }
35
+ ._z2r50sa-1-17-0 {
36
+ --_z2r50s0-1-17-0: var(--dt-colors-border-critical-accent, #bb0731);
37
+ --_z2r50s1-1-17-0: var(--dt-colors-border-critical-default, #f6d6d5);
38
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
39
+ }
40
+ ._z2r50sb-1-17-0:focus-within {
41
41
  outline: none;
42
42
  }
43
- ._z2r50sc-1-16-0:focus-within {
43
+ ._z2r50sc-1-17-0._z2r50sc-1-17-0:focus-within {
44
44
  border-radius: var(--dt-borders-radius-field-subdued, 3px);
45
- box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-16-0);
46
- background-color: var(--_z2r50s2-1-16-0);
47
- }
48
- ._z2r50sd-1-16-0:focus-within {
49
- box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-16-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-16-0);
50
- }
51
- ._z2r50se-1-16-0 {
52
- --_z2r50s0-1-16-0: var(--dt-colors-border-neutral-accent, #595a7d);
53
- --_z2r50s1-1-16-0: var(--dt-colors-border-neutral-default, #dadbe4);
54
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
55
- }
56
- ._z2r50sf-1-16-0 {
57
- --_z2r50s0-1-16-0: var(--dt-colors-border-primary-accent, #464cce);
58
- --_z2r50s1-1-16-0: var(--dt-colors-border-primary-default, #d5dbf6);
59
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
60
- }
61
- ._z2r50sg-1-16-0 {
62
- --_z2r50s0-1-16-0: var(--dt-colors-border-success-accent, #2d6761);
63
- --_z2r50s1-1-16-0: var(--dt-colors-border-success-default, #d3dedd);
64
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
65
- }
66
- ._z2r50sh-1-16-0 {
67
- --_z2r50s0-1-16-0: var(--dt-colors-border-warning-accent, #855400);
68
- --_z2r50s1-1-16-0: var(--dt-colors-border-warning-default, #f9ebdb);
69
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
70
- }
71
- ._z2r50si-1-16-0 {
72
- --_z2r50s0-1-16-0: var(--dt-colors-border-critical-accent, #bb0731);
73
- --_z2r50s1-1-16-0: var(--dt-colors-border-critical-default, #f6d6d5);
74
- --_z2r50s2-1-16-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
45
+ box-shadow: inset 0 0 0 var(--dt-borders-width-default, 1px) var(--_z2r50s0-1-17-0);
46
+ background-color: var(--_z2r50s2-1-17-0);
47
+ }
48
+ ._z2r50sd-1-17-0._z2r50sd-1-17-0:focus-within {
49
+ box-shadow: inset 0 0 0 var(--dt-borders-width-emphasized, 2px) var(--_z2r50s0-1-17-0), inset 0 0 0 calc(var(--dt-borders-width-emphasized, 2px) + 1px) var(--_z2r50s1-1-17-0);
50
+ }
51
+ ._z2r50se-1-17-0 {
52
+ --_z2r50s0-1-17-0: var(--dt-colors-border-neutral-accent, #595a7d);
53
+ --_z2r50s1-1-17-0: var(--dt-colors-border-neutral-default, #dadbe4);
54
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-neutral-emphasized, #e4e5eb);
55
+ }
56
+ ._z2r50sf-1-17-0 {
57
+ --_z2r50s0-1-17-0: var(--dt-colors-border-primary-accent, #464cce);
58
+ --_z2r50s1-1-17-0: var(--dt-colors-border-primary-default, #d5dbf6);
59
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-primary-emphasized, #e1e5f7);
60
+ }
61
+ ._z2r50sg-1-17-0 {
62
+ --_z2r50s0-1-17-0: var(--dt-colors-border-success-accent, #2d6761);
63
+ --_z2r50s1-1-17-0: var(--dt-colors-border-success-default, #d3dedd);
64
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-success-emphasized, #e0e7e6);
65
+ }
66
+ ._z2r50sh-1-17-0 {
67
+ --_z2r50s0-1-17-0: var(--dt-colors-border-warning-accent, #855400);
68
+ --_z2r50s1-1-17-0: var(--dt-colors-border-warning-default, #f9ebdb);
69
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-warning-emphasized, #f9f0e5);
70
+ }
71
+ ._z2r50si-1-17-0 {
72
+ --_z2r50s0-1-17-0: var(--dt-colors-border-critical-accent, #bb0731);
73
+ --_z2r50s1-1-17-0: var(--dt-colors-border-critical-default, #f6d6d5);
74
+ --_z2r50s2-1-17-0: var(--dt-colors-background-field-critical-emphasized, #f8e1e1);
75
75
  }
@@ -57,15 +57,19 @@ export declare const focusRingCSS: import("@vanilla-extract/recipes").RuntimeFn<
57
57
  export declare const focusRingFocusWithinCSS: import("@vanilla-extract/recipes").RuntimeFn<{
58
58
  minimal: {
59
59
  true: {
60
- ':focus-within': {
61
- borderRadius: string;
62
- boxShadow: string;
63
- backgroundColor: `var(--${string})`;
60
+ selectors: {
61
+ '&&:focus-within': {
62
+ borderRadius: string;
63
+ boxShadow: string;
64
+ backgroundColor: `var(--${string})`;
65
+ };
64
66
  };
65
67
  };
66
68
  false: {
67
- ':focus-within': {
68
- boxShadow: string;
69
+ selectors: {
70
+ '&&:focus-within': {
71
+ boxShadow: string;
72
+ };
69
73
  };
70
74
  };
71
75
  };
@@ -24,5 +24,5 @@ __export(focusRing_css_exports, {
24
24
  module.exports = __toCommonJS(focusRing_css_exports);
25
25
  var import_focusRing_css_ts_vanilla = require("./focusRing.css");
26
26
  var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
27
- var focusRingCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_z2r50s3-1-16-0", variantClassNames: { minimal: { true: "_z2r50s4-1-16-0", false: "_z2r50s5-1-16-0" }, variant: { neutral: "_z2r50s6-1-16-0", primary: "_z2r50s7-1-16-0", success: "_z2r50s8-1-16-0", warning: "_z2r50s9-1-16-0", critical: "_z2r50sa-1-16-0" } }, defaultVariants: {}, compoundVariants: [] });
28
- var focusRingFocusWithinCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_z2r50sb-1-16-0", variantClassNames: { minimal: { true: "_z2r50sc-1-16-0", false: "_z2r50sd-1-16-0" }, variant: { neutral: "_z2r50se-1-16-0", primary: "_z2r50sf-1-16-0", success: "_z2r50sg-1-16-0", warning: "_z2r50sh-1-16-0", critical: "_z2r50si-1-16-0" } }, defaultVariants: {}, compoundVariants: [] });
27
+ var focusRingCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_z2r50s3-1-17-0", variantClassNames: { minimal: { true: "_z2r50s4-1-17-0", false: "_z2r50s5-1-17-0" }, variant: { neutral: "_z2r50s6-1-17-0", primary: "_z2r50s7-1-17-0", success: "_z2r50s8-1-17-0", warning: "_z2r50s9-1-17-0", critical: "_z2r50sa-1-17-0" } }, defaultVariants: {}, compoundVariants: [] });
28
+ var focusRingFocusWithinCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_z2r50sb-1-17-0", variantClassNames: { minimal: { true: "_z2r50sc-1-17-0", false: "_z2r50sd-1-17-0" }, variant: { neutral: "_z2r50se-1-17-0", primary: "_z2r50sf-1-17-0", success: "_z2r50sg-1-17-0", warning: "_z2r50sh-1-17-0", critical: "_z2r50si-1-17-0" } }, defaultVariants: {}, compoundVariants: [] });
@@ -0,0 +1,44 @@
1
+ ._z0fq9b4-1-17-0 {
2
+ outline: none;
3
+ box-shadow: none;
4
+ }
5
+ ._z0fq9b5-1-17-0 {
6
+ --_z0fq9b3-1-17-0: var(--dt-borders-width-default, 1px);
7
+ --_z0fq9b2-1-17-0: 0 0 0 var(--_z0fq9b3-1-17-0) var(--_z0fq9b0-1-17-0) inset;
8
+ }
9
+ ._z0fq9b6-1-17-0 {
10
+ --_z0fq9b3-1-17-0: var(--dt-borders-width-emphasized, 2px);
11
+ --_z0fq9b2-1-17-0: 0 0 0 var(--_z0fq9b3-1-17-0) var(--_z0fq9b0-1-17-0) inset, 0 0 0 calc(var(--_z0fq9b3-1-17-0) + 1px) var(--_z0fq9b1-1-17-0) inset;
12
+ }
13
+ ._z0fq9b7-1-17-0 {
14
+ --_z0fq9b2-1-17-0: none;
15
+ }
16
+ ._z0fq9b8-1-17-0:focus-visible {
17
+ box-shadow: var(--_z0fq9b2-1-17-0);
18
+ }
19
+ ._z0fq9b9-1-17-0:focus-within {
20
+ box-shadow: var(--_z0fq9b2-1-17-0);
21
+ }
22
+ ._z0fq9ba-1-17-0:focus {
23
+ box-shadow: var(--_z0fq9b2-1-17-0);
24
+ }
25
+ ._z0fq9bb-1-17-0 {
26
+ --_z0fq9b0-1-17-0: var(--dt-colors-border-neutral-accent, #595a7d);
27
+ --_z0fq9b1-1-17-0: var(--dt-colors-border-neutral-default, #dadbe4);
28
+ }
29
+ ._z0fq9bc-1-17-0 {
30
+ --_z0fq9b0-1-17-0: var(--dt-colors-border-primary-accent, #464cce);
31
+ --_z0fq9b1-1-17-0: var(--dt-colors-border-primary-default, #d5dbf6);
32
+ }
33
+ ._z0fq9bd-1-17-0 {
34
+ --_z0fq9b0-1-17-0: var(--dt-colors-border-success-accent, #2d6761);
35
+ --_z0fq9b1-1-17-0: var(--dt-colors-border-success-default, #d3dedd);
36
+ }
37
+ ._z0fq9be-1-17-0 {
38
+ --_z0fq9b0-1-17-0: var(--dt-colors-border-warning-accent, #855400);
39
+ --_z0fq9b1-1-17-0: var(--dt-colors-border-warning-default, #f9ebdb);
40
+ }
41
+ ._z0fq9bf-1-17-0 {
42
+ --_z0fq9b0-1-17-0: var(--dt-colors-border-critical-accent, #bb0731);
43
+ --_z0fq9b1-1-17-0: var(--dt-colors-border-critical-default, #f6d6d5);
44
+ }
@@ -0,0 +1,77 @@
1
+ declare const outerColor: `var(--${string})`;
2
+ declare const innerColor: `var(--${string})`;
3
+ declare const boxShadow: `var(--${string})`;
4
+ declare const width: `var(--${string})`;
5
+ export declare const focusRingStatic: import("@vanilla-extract/recipes").RuntimeFn<{
6
+ minimal: {
7
+ true: {
8
+ vars: {
9
+ [width]: string;
10
+ [boxShadow]: string;
11
+ };
12
+ };
13
+ false: {
14
+ vars: {
15
+ [width]: string;
16
+ [boxShadow]: string;
17
+ };
18
+ };
19
+ };
20
+ disabled: {
21
+ true: {
22
+ vars: {
23
+ [boxShadow]: string;
24
+ };
25
+ };
26
+ };
27
+ when: {
28
+ 'focus-visible': {
29
+ ':focus-visible': {
30
+ boxShadow: `var(--${string})`;
31
+ };
32
+ };
33
+ 'focus-within': {
34
+ ':focus-within': {
35
+ boxShadow: `var(--${string})`;
36
+ };
37
+ };
38
+ focus: {
39
+ ':focus': {
40
+ boxShadow: `var(--${string})`;
41
+ };
42
+ };
43
+ };
44
+ color: {
45
+ neutral: {
46
+ vars: {
47
+ [outerColor]: string;
48
+ [innerColor]: string;
49
+ };
50
+ };
51
+ primary: {
52
+ vars: {
53
+ [outerColor]: string;
54
+ [innerColor]: string;
55
+ };
56
+ };
57
+ success: {
58
+ vars: {
59
+ [outerColor]: string;
60
+ [innerColor]: string;
61
+ };
62
+ };
63
+ warning: {
64
+ vars: {
65
+ [outerColor]: string;
66
+ [innerColor]: string;
67
+ };
68
+ };
69
+ critical: {
70
+ vars: {
71
+ [outerColor]: string;
72
+ [innerColor]: string;
73
+ };
74
+ };
75
+ };
76
+ }>;
77
+ export {};
@@ -0,0 +1,26 @@
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 focusRingStatic_css_exports = {};
20
+ __export(focusRingStatic_css_exports, {
21
+ focusRingStatic: () => focusRingStatic
22
+ });
23
+ module.exports = __toCommonJS(focusRingStatic_css_exports);
24
+ var import_focusRingStatic_css_ts_vanilla = require("./focusRingStatic.css");
25
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
26
+ var focusRingStatic = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "_z0fq9b4-1-17-0", variantClassNames: { minimal: { true: "_z0fq9b5-1-17-0", false: "_z0fq9b6-1-17-0" }, disabled: { true: "_z0fq9b7-1-17-0" }, when: { "focus-visible": "_z0fq9b8-1-17-0", "focus-within": "_z0fq9b9-1-17-0", focus: "_z0fq9ba-1-17-0" }, color: { neutral: "_z0fq9bb-1-17-0", primary: "_z0fq9bc-1-17-0", success: "_z0fq9bd-1-17-0", warning: "_z0fq9be-1-17-0", critical: "_z0fq9bf-1-17-0" } }, defaultVariants: { color: "neutral", minimal: false, when: "focus", disabled: false }, compoundVariants: [] });
@@ -1,7 +1,7 @@
1
1
  import { type FocusEvent as ReactFocusEvent } from 'react';
2
- /** @internal */
2
+ /** @public */
3
3
  export type VariantType = 'neutral' | 'primary' | 'success' | 'warning' | 'critical';
4
- /** @internal */
4
+ /** @public */
5
5
  export type UseFocusRingProps = {
6
6
  /**
7
7
  * A minimal focus outline is available for smaller content elements like links. This variant is applied when set to true.
@@ -27,20 +27,21 @@ export type UseFocusRingProps = {
27
27
  */
28
28
  disabled?: boolean;
29
29
  };
30
+ /** @public */
30
31
  export type FocusRingProps = {
31
32
  /** The focus styles that depend on modality. */
32
33
  focusClassName: string;
33
34
  /** Focus handlers used to manage the focus state. Must be applied to the element that receives the focus.*/
34
35
  focusProps: {
35
- onFocus: (e: ReactFocusEvent) => void;
36
- onBlur: (e: ReactFocusEvent) => void;
36
+ onFocus?: (e: ReactFocusEvent) => void;
37
+ onBlur?: (e: ReactFocusEvent) => void;
37
38
  };
38
39
  /** Whether or not the element got focus via keyboard. */
39
40
  isFocusVisible: boolean;
40
41
  };
41
42
  /**
42
43
  * Custom hook used to determine focus styling depending on modality.
43
- * Returns the css classes (vanilla) that can be applied to the component in order to show the correct focus outline.
44
- * @internal
44
+ * Returns the css classNames that can be applied to the component in order to show the correct focus outline.
45
+ * @public
45
46
  */
46
47
  export declare function useFocusRing(props?: UseFocusRingProps): FocusRingProps;
@@ -39,20 +39,20 @@ function useFocusRing(props = {}) {
39
39
  setIsFocused(false);
40
40
  }
41
41
  }, [disabled]);
42
- const onBlur = (0, import_react.useCallback)((e) => {
43
- if (e.currentTarget === e.target) {
44
- setIsFocused(false);
45
- }
46
- }, []);
47
- const onFocus = (0, import_react.useCallback)((e) => {
48
- if (e.currentTarget === e.target) {
49
- setIsFocused(true);
50
- }
42
+ const focusProps = (0, import_react.useMemo)(() => {
43
+ return {
44
+ onBlur: (event) => {
45
+ if (event.currentTarget === event.target) {
46
+ setIsFocused(false);
47
+ }
48
+ },
49
+ onFocus: (event) => {
50
+ if (event.currentTarget === event.target) {
51
+ setIsFocused(true);
52
+ }
53
+ }
54
+ };
51
55
  }, []);
52
- const focusProps = {
53
- onFocus,
54
- onBlur
55
- };
56
56
  if ((ignoreModality || modality === "keyboard") && isFocused || focusWithin) {
57
57
  if (isMinimal) {
58
58
  return {