@dynatrace/strato-components 0.84.42 → 0.84.51

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 (224) hide show
  1. package/content/index.d.ts +7 -0
  2. package/content/index.js +25 -0
  3. package/content/progress/ProgressBar.css +52 -0
  4. package/content/progress/ProgressBar.d.ts +56 -0
  5. package/content/progress/ProgressBar.js +191 -0
  6. package/content/progress/ProgressBar.sty.d.ts +42 -0
  7. package/content/progress/ProgressBar.sty.js +28 -0
  8. package/content/progress/ProgressBarIcon.css +5 -0
  9. package/content/progress/ProgressBarIcon.d.ts +15 -0
  10. package/content/progress/ProgressBarIcon.js +68 -0
  11. package/content/progress/ProgressBarIcon.sty.d.ts +1 -0
  12. package/content/progress/ProgressBarIcon.sty.js +25 -0
  13. package/content/progress/ProgressBarLabel.css +9 -0
  14. package/content/progress/ProgressBarLabel.d.ts +15 -0
  15. package/content/progress/ProgressBarLabel.js +75 -0
  16. package/content/progress/ProgressBarLabel.sty.d.ts +13 -0
  17. package/content/progress/ProgressBarLabel.sty.js +26 -0
  18. package/content/progress/ProgressBarValue.css +28 -0
  19. package/content/progress/ProgressBarValue.d.ts +15 -0
  20. package/content/progress/ProgressBarValue.js +72 -0
  21. package/content/progress/ProgressBarValue.sty.d.ts +34 -0
  22. package/content/progress/ProgressBarValue.sty.js +26 -0
  23. package/content/progress/ProgressCircle.css +52 -0
  24. package/content/progress/ProgressCircle.d.ts +51 -0
  25. package/content/progress/ProgressCircle.js +174 -0
  26. package/content/progress/ProgressCircle.sty.d.ts +41 -0
  27. package/content/progress/ProgressCircle.sty.js +37 -0
  28. package/content/progress/contexts/SharedProgressBarPropsContext.d.ts +9 -0
  29. package/content/progress/contexts/SharedProgressBarPropsContext.js +38 -0
  30. package/content/progress/hooks/useProgressAriaProps.d.ts +38 -0
  31. package/content/progress/hooks/useProgressAriaProps.js +63 -0
  32. package/content/progress/hooks/useProgressBarPropsContext.d.ts +2 -0
  33. package/content/progress/hooks/useProgressBarPropsContext.js +32 -0
  34. package/content/progress/utils.d.ts +2 -0
  35. package/content/progress/utils.js +50 -0
  36. package/core/components/app-root/AppRoot.d.ts +2 -2
  37. package/core/hooks/useAriaLabelingProps.d.ts +6 -0
  38. package/core/hooks/useAriaLabelingProps.js +30 -0
  39. package/core/hooks/useCurrentTheme.d.ts +1 -1
  40. package/core/hooks/useId.d.ts +12 -0
  41. package/core/hooks/useId.js +32 -0
  42. package/core/hooks/useSafeForwardProps.d.ts +10 -0
  43. package/core/hooks/useSafeForwardProps.js +34 -0
  44. package/core/index.d.ts +11 -3
  45. package/core/index.js +12 -0
  46. package/core/types/a11y-props.d.ts +8 -1
  47. package/core/types/data-props.d.ts +1 -1
  48. package/core/types/dom.d.ts +2 -13
  49. package/core/types/masking-props.d.ts +2 -1
  50. package/core/types/polymorph.d.ts +10 -7
  51. package/core/types/role-variant.d.ts +10 -0
  52. package/core/types/{focusable-element.js → role-variant.js} +17 -2
  53. package/core/types/styling-props.d.ts +1 -1
  54. package/core/types/with-children.d.ts +1 -1
  55. package/core/utils/_is-string-children.d.ts +6 -0
  56. package/core/utils/_is-string-children.js +44 -0
  57. package/core/utils/isBrowser.d.ts +1 -1
  58. package/core/utils/merge-props.d.ts +4 -5
  59. package/core/utils/seed-random.d.ts +5 -0
  60. package/core/utils/seed-random.js +34 -0
  61. package/core/utils/uuidv4.d.ts +5 -0
  62. package/core/utils/uuidv4.js +31 -0
  63. package/esm/content/index.js +7 -0
  64. package/esm/content/index.js.map +7 -0
  65. package/esm/content/progress/ProgressBar.css +52 -0
  66. package/esm/content/progress/ProgressBar.js +163 -0
  67. package/esm/content/progress/ProgressBar.js.map +7 -0
  68. package/esm/content/progress/ProgressBar.sty.js +10 -0
  69. package/esm/content/progress/ProgressBar.sty.js.map +7 -0
  70. package/esm/content/progress/ProgressBarIcon.css +5 -0
  71. package/esm/content/progress/ProgressBarIcon.js +40 -0
  72. package/esm/content/progress/ProgressBarIcon.js.map +7 -0
  73. package/esm/content/progress/ProgressBarIcon.sty.js +7 -0
  74. package/esm/content/progress/ProgressBarIcon.sty.js.map +7 -0
  75. package/esm/content/progress/ProgressBarLabel.css +9 -0
  76. package/esm/content/progress/ProgressBarLabel.js +47 -0
  77. package/esm/content/progress/ProgressBarLabel.js.map +7 -0
  78. package/esm/content/progress/ProgressBarLabel.sty.js +8 -0
  79. package/esm/content/progress/ProgressBarLabel.sty.js.map +7 -0
  80. package/esm/content/progress/ProgressBarValue.css +28 -0
  81. package/esm/content/progress/ProgressBarValue.js +44 -0
  82. package/esm/content/progress/ProgressBarValue.js.map +7 -0
  83. package/esm/content/progress/ProgressBarValue.sty.js +8 -0
  84. package/esm/content/progress/ProgressBarValue.sty.js.map +7 -0
  85. package/esm/content/progress/ProgressCircle.css +52 -0
  86. package/esm/content/progress/ProgressCircle.js +153 -0
  87. package/esm/content/progress/ProgressCircle.js.map +7 -0
  88. package/esm/content/progress/ProgressCircle.sty.js +19 -0
  89. package/esm/content/progress/ProgressCircle.sty.js.map +7 -0
  90. package/esm/content/progress/contexts/SharedProgressBarPropsContext.js +10 -0
  91. package/esm/content/progress/contexts/SharedProgressBarPropsContext.js.map +7 -0
  92. package/esm/content/progress/hooks/useProgressAriaProps.js +45 -0
  93. package/esm/content/progress/hooks/useProgressAriaProps.js.map +7 -0
  94. package/esm/content/progress/hooks/useProgressBarPropsContext.js +16 -0
  95. package/esm/content/progress/hooks/useProgressBarPropsContext.js.map +7 -0
  96. package/esm/content/progress/utils.js +22 -0
  97. package/esm/content/progress/utils.js.map +7 -0
  98. package/esm/core/components/app-root/AppRoot.js.map +1 -1
  99. package/esm/core/hooks/useAriaLabelingProps.js +12 -0
  100. package/esm/core/hooks/useAriaLabelingProps.js.map +7 -0
  101. package/esm/core/hooks/useCurrentTheme.js.map +1 -1
  102. package/esm/core/hooks/useId.js +14 -0
  103. package/esm/core/hooks/useId.js.map +7 -0
  104. package/esm/core/hooks/useSafeForwardProps.js +16 -0
  105. package/esm/core/hooks/useSafeForwardProps.js.map +7 -0
  106. package/esm/core/index.js +12 -0
  107. package/esm/core/index.js.map +2 -2
  108. package/esm/core/types/role-variant.js +12 -0
  109. package/esm/core/types/role-variant.js.map +7 -0
  110. package/esm/core/utils/_is-string-children.js +16 -0
  111. package/esm/core/utils/_is-string-children.js.map +7 -0
  112. package/esm/core/utils/isBrowser.js.map +1 -1
  113. package/esm/core/utils/merge-props.js.map +2 -2
  114. package/esm/core/utils/seed-random.js +16 -0
  115. package/esm/core/utils/seed-random.js.map +7 -0
  116. package/esm/core/utils/uuidv4.js +13 -0
  117. package/esm/core/utils/uuidv4.js.map +7 -0
  118. package/esm/index.js +2 -0
  119. package/esm/index.js.map +2 -2
  120. package/esm/layouts/container/Container.css +8 -0
  121. package/esm/layouts/container/Container.js +55 -0
  122. package/esm/layouts/container/Container.js.map +7 -0
  123. package/esm/layouts/container/Container.sty.js +7 -0
  124. package/esm/layouts/container/Container.sty.js.map +7 -0
  125. package/esm/layouts/flex/Flex.js +46 -0
  126. package/esm/layouts/flex/Flex.js.map +7 -0
  127. package/esm/layouts/grid/Grid.js +46 -0
  128. package/esm/layouts/grid/Grid.js.map +7 -0
  129. package/esm/layouts/index.js +7 -1
  130. package/esm/layouts/index.js.map +2 -2
  131. package/esm/styles/colorUtils.css +80 -0
  132. package/esm/styles/colorUtils.sty.js +9 -0
  133. package/esm/styles/colorUtils.sty.js.map +7 -0
  134. package/esm/styles/container.css +64 -0
  135. package/esm/styles/container.sty.js +9 -0
  136. package/esm/styles/container.sty.js.map +7 -0
  137. package/esm/styles/ellipsis.css +5 -0
  138. package/esm/styles/ellipsis.sty.js +6 -0
  139. package/esm/styles/ellipsis.sty.js.map +7 -0
  140. package/esm/styles/extract-util.js +15 -0
  141. package/esm/styles/extract-util.js.map +7 -0
  142. package/esm/styles/getFlexStyles.js +69 -0
  143. package/esm/styles/getFlexStyles.js.map +7 -0
  144. package/esm/styles/getGapSprinkles.js +18 -0
  145. package/esm/styles/getGapSprinkles.js.map +7 -0
  146. package/esm/styles/getGridFlexPositionSprinkles.js +25 -0
  147. package/esm/styles/getGridFlexPositionSprinkles.js.map +7 -0
  148. package/esm/styles/getGridStyles.js +78 -0
  149. package/esm/styles/getGridStyles.js.map +7 -0
  150. package/esm/styles/getLayoutSizeStyles.js +21 -0
  151. package/esm/styles/getLayoutSizeStyles.js.map +7 -0
  152. package/esm/styles/getSpacingSprinkles.js +50 -0
  153. package/esm/styles/getSpacingSprinkles.js.map +7 -0
  154. package/esm/styles/index.js +49 -0
  155. package/esm/styles/index.js.map +7 -0
  156. package/esm/styles/safe-sprinkles.js +17 -0
  157. package/esm/styles/safe-sprinkles.js.map +7 -0
  158. package/esm/styles/sprinkle-properties.js +137 -0
  159. package/esm/styles/sprinkle-properties.js.map +7 -0
  160. package/esm/styles/sprinkles.css +786 -0
  161. package/esm/styles/sprinkles.sty.js +9 -0
  162. package/esm/styles/sprinkles.sty.js.map +7 -0
  163. package/esm/typography/Link/Link.js.map +2 -2
  164. package/esm/typography/List/List.js.map +1 -1
  165. package/esm/typography/Text/Text.js.map +1 -1
  166. package/esm/typography/TextEllipsis/TextEllipsis.js.map +1 -1
  167. package/index.d.ts +2 -0
  168. package/index.js +2 -0
  169. package/lang/en.json +6 -0
  170. package/lang/uncompiled/en.json +4 -0
  171. package/layouts/container/Container.css +8 -0
  172. package/layouts/container/Container.d.ts +34 -0
  173. package/layouts/container/Container.js +80 -0
  174. package/layouts/container/Container.sty.d.ts +1 -0
  175. package/layouts/container/Container.sty.js +25 -0
  176. package/layouts/flex/Flex.d.ts +23 -0
  177. package/layouts/flex/Flex.js +72 -0
  178. package/layouts/grid/Grid.d.ts +23 -0
  179. package/layouts/grid/Grid.js +72 -0
  180. package/layouts/index.d.ts +4 -0
  181. package/layouts/index.js +7 -1
  182. package/package.json +25 -10
  183. package/styles/colorUtils.css +80 -0
  184. package/styles/colorUtils.sty.d.ts +56 -0
  185. package/styles/colorUtils.sty.js +27 -0
  186. package/styles/container.css +64 -0
  187. package/styles/container.sty.d.ts +54 -0
  188. package/styles/container.sty.js +27 -0
  189. package/styles/ellipsis.css +5 -0
  190. package/styles/ellipsis.sty.d.ts +5 -0
  191. package/styles/ellipsis.sty.js +24 -0
  192. package/styles/extract-util.d.ts +9 -0
  193. package/styles/extract-util.js +33 -0
  194. package/styles/getFlexStyles.d.ts +64 -0
  195. package/styles/getFlexStyles.js +95 -0
  196. package/styles/getGapSprinkles.d.ts +19 -0
  197. package/styles/getGapSprinkles.js +36 -0
  198. package/styles/getGridFlexPositionSprinkles.d.ts +35 -0
  199. package/styles/getGridFlexPositionSprinkles.js +43 -0
  200. package/styles/getGridStyles.d.ts +74 -0
  201. package/styles/getGridStyles.js +100 -0
  202. package/styles/getLayoutSizeStyles.d.ts +29 -0
  203. package/styles/getLayoutSizeStyles.js +39 -0
  204. package/styles/getSpacingSprinkles.d.ts +74 -0
  205. package/styles/getSpacingSprinkles.js +68 -0
  206. package/styles/index.d.ts +11 -0
  207. package/styles/index.js +47 -0
  208. package/styles/safe-sprinkles.d.ts +6 -0
  209. package/styles/safe-sprinkles.js +35 -0
  210. package/styles/sprinkle-properties.d.ts +257 -0
  211. package/styles/sprinkle-properties.js +165 -0
  212. package/styles/sprinkles.css +786 -0
  213. package/styles/sprinkles.sty.d.ts +913 -0
  214. package/styles/sprinkles.sty.js +27 -0
  215. package/styles/textStyle.sty.d.ts +1 -0
  216. package/testing/mocks/canvas-mock.js +6 -1
  217. package/typography/Link/Link.d.ts +1 -2
  218. package/typography/List/List.d.ts +4 -4
  219. package/typography/Text/Text.d.ts +3 -3
  220. package/typography/TextEllipsis/TextEllipsis.d.ts +3 -3
  221. package/typography/TextEllipsis/TextEllipsis.js +2 -2
  222. package/core/types/focusable-element.d.ts +0 -5
  223. package/esm/core/types/focusable-element.js +0 -1
  224. package/esm/core/types/focusable-element.js.map +0 -7
@@ -0,0 +1,7 @@
1
+ export { ProgressBar } from './progress/ProgressBar.js';
2
+ export type { ProgressBarProps } from './progress/ProgressBar.js';
3
+ export type { ProgressBarIconProps } from './progress/ProgressBarIcon.js';
4
+ export type { ProgressBarLabelProps } from './progress/ProgressBarLabel.js';
5
+ export type { ProgressBarValueProps } from './progress/ProgressBarValue.js';
6
+ export { ProgressCircle } from './progress/ProgressCircle.js';
7
+ export type { ProgressCircleProps } from './progress/ProgressCircle.js';
@@ -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 content_exports = {};
19
+ __export(content_exports, {
20
+ ProgressBar: () => import_ProgressBar.ProgressBar,
21
+ ProgressCircle: () => import_ProgressCircle.ProgressCircle
22
+ });
23
+ module.exports = __toCommonJS(content_exports);
24
+ var import_ProgressBar = require("./progress/ProgressBar.js");
25
+ var import_ProgressCircle = require("./progress/ProgressCircle.js");
@@ -0,0 +1,52 @@
1
+ @keyframes ProgressBar_indeterminateAnimationKeyframes__13n9uwh0 {
2
+ 0% {
3
+ transform: translateX(-100%) scaleX(0);
4
+ }
5
+ 100% {
6
+ transform: translateX(100%) scaleX(1.5);
7
+ }
8
+ }
9
+ .ProgressBar_progressCSS__13n9uwh1 {
10
+ width: 100%;
11
+ border-radius: var(--dt-borders-radius-container-subdued, 8px);
12
+ overflow: hidden;
13
+ position: relative;
14
+ }
15
+ .ProgressBar_progressCSS_size_condensed__13n9uwh2 {
16
+ height: 6px;
17
+ }
18
+ .ProgressBar_progressCSS_size_default__13n9uwh3 {
19
+ height: 8px;
20
+ }
21
+ .ProgressBar_progressCSS_variant_onAccent__13n9uwh4 {
22
+ background-color: var(--dt-colors-border-neutral-on-accent-disabled, #f3f3f633);
23
+ }
24
+ .ProgressBar_progressCSS_variant_primary__13n9uwh5 {
25
+ background-color: var(--dt-colors-border-neutral-default, #d2d3e1);
26
+ }
27
+ .ProgressBar_progressCSS_variant_success__13n9uwh6 {
28
+ background-color: var(--dt-colors-border-neutral-default, #d2d3e1);
29
+ }
30
+ .ProgressBar_progressCSS_variant_warning__13n9uwh7 {
31
+ background-color: var(--dt-colors-border-neutral-default, #d2d3e1);
32
+ }
33
+ .ProgressBar_progressCSS_variant_critical__13n9uwh8 {
34
+ background-color: var(--dt-colors-border-neutral-default, #d2d3e1);
35
+ }
36
+ .ProgressBar_progressCSS_variant_neutral__13n9uwh9 {
37
+ background-color: var(--dt-colors-border-neutral-default, #d2d3e1);
38
+ }
39
+ .ProgressBar_progressBarFillCSS__13n9uwha {
40
+ height: 100%;
41
+ transition-duration: var(--dt-timings-fast-default, 170ms);
42
+ transition-timing-function: var(--dt-easings-fast-in-slow-out, cubic-bezier(0.4, 0, 0.2, 1));
43
+ background-color: var(--vars_borderColor__17bwkb02);
44
+ }
45
+ .ProgressBar_progressBarFillCSS_indeterminate_true__13n9uwhb {
46
+ width: 100%;
47
+ animation-name: ProgressBar_indeterminateAnimationKeyframes__13n9uwh0;
48
+ animation-duration: var(--dt-timings-slow-gentle, 800ms);
49
+ animation-timing-function: var(--dt-easings-fast-in-slow-out, cubic-bezier(0.4, 0, 0.2, 1));
50
+ animation-iteration-count: infinite;
51
+ transform-origin: left center;
52
+ }
@@ -0,0 +1,56 @@
1
+ import React from 'react';
2
+ import { type AriaLabelingProps } from '../../core/types/a11y-props.js';
3
+ import { type DataTestId } from '../../core/types/data-props.js';
4
+ import { type DOMProps } from '../../core/types/dom.js';
5
+ import { type MaskingProps } from '../../core/types/masking-props.js';
6
+ import { type RoleVariantType } from '../../core/types/role-variant.js';
7
+ import { type StylingProps } from '../../core/types/styling-props.js';
8
+ import { type WithChildren } from '../../core/types/with-children.js';
9
+ /**
10
+ * Accepted properties for ProgressBar.
11
+ * @public
12
+ */
13
+ export interface ProgressBarProps extends WithChildren, DOMProps, AriaLabelingProps, StylingProps, DataTestId, MaskingProps {
14
+ /**
15
+ * The current value.
16
+ * @defaultValue 'indeterminate'
17
+ */
18
+ value?: number | 'indeterminate';
19
+ /**
20
+ * The minimum allowed value.
21
+ * @defaultValue 0
22
+ */
23
+ min?: number;
24
+ /**
25
+ * The maximum allowed value.
26
+ * @defaultValue 100
27
+ */
28
+ max?: number;
29
+ /**
30
+ * Controls the density of the rendering.
31
+ * @defaultValue 'default'
32
+ */
33
+ density?: 'default' | 'condensed';
34
+ /**
35
+ * Controls the appearance of the progress.
36
+ * @defaultValue 'primary'
37
+ */
38
+ variant?: RoleVariantType;
39
+ /**
40
+ * The aria-valuetext attribute defines the human-readable text alternative of aria-valuenow for a range widget.
41
+ * By default, the value will be given as a percentage. If the value is not a percentage, you should provide aria-valuetext.
42
+ * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-valuetext
43
+ * @defaultValue the value of the progress as percentage.
44
+ */
45
+ 'aria-valuetext'?: string;
46
+ }
47
+ /**
48
+ * Use the `ProgressBar` component to show your users that a system operation such as downloading, uploading, or processing is progressing.
49
+ * The `ProgressBar` can be used to visualize determinate or indeterminate progress.
50
+ * @public
51
+ */
52
+ export declare const ProgressBar: ((props: ProgressBarProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null) & {
53
+ Value: (props: import("./ProgressBarValue.js").ProgressBarValueProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
54
+ Label: (props: import("./ProgressBarLabel.js").ProgressBarLabelProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
55
+ Icon: (props: import("./ProgressBarIcon.js").ProgressBarIconProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
56
+ };
@@ -0,0 +1,191 @@
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 ProgressBar_exports = {};
29
+ __export(ProgressBar_exports, {
30
+ ProgressBar: () => ProgressBar
31
+ });
32
+ module.exports = __toCommonJS(ProgressBar_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_react_is = require("react-is");
36
+ var import_spacings = __toESM(require("@dynatrace/strato-design-tokens/spacings"));
37
+ var import_SharedProgressBarPropsContext = require("./contexts/SharedProgressBarPropsContext.js");
38
+ var import_useProgressAriaProps = require("./hooks/useProgressAriaProps.js");
39
+ var import_ProgressBar_css = require("./ProgressBar.sty.js");
40
+ var import_ProgressBarIcon = require("./ProgressBarIcon.js");
41
+ var import_ProgressBarLabel = require("./ProgressBarLabel.js");
42
+ var import_ProgressBarValue = require("./ProgressBarValue.js");
43
+ var import_useAriaLabelingProps = require("../../core/hooks/useAriaLabelingProps.js");
44
+ var import_useId = require("../../core/hooks/useId.js");
45
+ var import_useSafeForwardProps = require("../../core/hooks/useSafeForwardProps.js");
46
+ var import_colorUtils_css = require("../../styles/colorUtils.sty.js");
47
+ function getProgressBarSlots(children) {
48
+ const slots = {
49
+ value: null,
50
+ label: null,
51
+ icon: null
52
+ };
53
+ import_react.default.Children.forEach(children, (child) => {
54
+ if ((0, import_react_is.isElement)(child)) {
55
+ switch (child.type) {
56
+ case import_ProgressBarLabel.ProgressBarLabel:
57
+ slots.label = child;
58
+ break;
59
+ case import_ProgressBarIcon.ProgressBarIcon:
60
+ slots.icon = child;
61
+ break;
62
+ case import_ProgressBarValue.ProgressBarValue:
63
+ default:
64
+ slots.value = child;
65
+ break;
66
+ }
67
+ } else {
68
+ if (!slots.value) {
69
+ slots.value = child;
70
+ }
71
+ }
72
+ });
73
+ return slots;
74
+ }
75
+ const _ProgressBar = (0, import_react.forwardRef)(
76
+ (props, forwardedRef) => {
77
+ const {
78
+ value: originalValue,
79
+ max = 100,
80
+ min = 0,
81
+ density = "default",
82
+ variant = "primary",
83
+ children,
84
+ id: propId,
85
+ "aria-valuetext": ariaValuetext,
86
+ className: consumerClassName,
87
+ style: consumerStyle,
88
+ "data-testid": dataTestId,
89
+ "data-dtrum-mask": dataDtrumMask,
90
+ "data-dtrum-allow": dataDtrumAllow,
91
+ ...remainingProps
92
+ } = props;
93
+ const slots = getProgressBarSlots(children);
94
+ const { value, isIndeterminate, progressAriaProps } = (0, import_useProgressAriaProps.useProgressAriaProps)(
95
+ originalValue,
96
+ min,
97
+ max,
98
+ ariaValuetext
99
+ );
100
+ const ariaLabelingProps = (0, import_useAriaLabelingProps.useAriaLabelingProps)(remainingProps);
101
+ const forwardProps = (0, import_useSafeForwardProps.useSafeForwardProps)(remainingProps, ariaLabelingProps);
102
+ const generatedId = (0, import_useId.useId)({ prefix: "progress-bar" });
103
+ const id = propId ?? generatedId;
104
+ if (!slots.label && !ariaLabelingProps["aria-label"] && !ariaLabelingProps["aria-labelledby"]) {
105
+ // eslint-disable-next-line no-console
106
+ console.warn(
107
+ "If no label is provided please make sure to provide an aria label on your progressCircle element."
108
+ );
109
+ }
110
+ const progressStyles = {};
111
+ if (!isIndeterminate && value !== void 0) {
112
+ const percentage = (value - min) / (max - min);
113
+ progressStyles["width"] = `${Math.round(percentage * 100)}%`;
114
+ }
115
+ return /* @__PURE__ */ import_react.default.createElement(import_SharedProgressBarPropsContext.SharedProgressBarPropsContext.Provider, { value: { id, variant, density } }, /* @__PURE__ */ import_react.default.createElement(
116
+ "div",
117
+ {
118
+ className: consumerClassName,
119
+ style: {
120
+ display: "flex",
121
+ flexDirection: "column",
122
+ gap: import_spacings.default.Size6,
123
+ width: "100%",
124
+ ...consumerStyle
125
+ },
126
+ "data-testid": dataTestId,
127
+ "data-dtrum-mask": dataDtrumMask,
128
+ "data-dtrum-allow": dataDtrumAllow,
129
+ ref: forwardedRef,
130
+ ...forwardProps
131
+ },
132
+ /* @__PURE__ */ import_react.default.createElement(
133
+ "div",
134
+ {
135
+ style: {
136
+ display: "flex",
137
+ justifyContent: "space-between",
138
+ gap: import_spacings.default.Size8
139
+ }
140
+ },
141
+ density === "condensed" ? /* @__PURE__ */ import_react.default.createElement(
142
+ "div",
143
+ {
144
+ style: {
145
+ display: "flex",
146
+ justifyContent: "space-between",
147
+ alignItems: "flex-end",
148
+ flex: 1,
149
+ gap: import_spacings.default.Size16,
150
+ minWidth: 0
151
+ }
152
+ },
153
+ slots.label,
154
+ density === "condensed" && slots.value
155
+ ) : slots.label,
156
+ slots.icon
157
+ ),
158
+ /* @__PURE__ */ import_react.default.createElement(
159
+ "div",
160
+ {
161
+ className: (0, import_ProgressBar_css.progressCSS)({ size: density, variant }),
162
+ id,
163
+ ...progressAriaProps,
164
+ ...ariaLabelingProps
165
+ },
166
+ /* @__PURE__ */ import_react.default.createElement(
167
+ "div",
168
+ {
169
+ className: (0, import_clsx.default)(
170
+ (0, import_colorUtils_css.colorUtilsCSS)({
171
+ color: variant,
172
+ variant: variant === "onAccent" ? "default" : "accent"
173
+ }),
174
+ (0, import_ProgressBar_css.progressBarFillCSS)({
175
+ indeterminate: isIndeterminate
176
+ })
177
+ ),
178
+ style: progressStyles
179
+ }
180
+ )
181
+ ),
182
+ density === "default" && slots.value
183
+ ));
184
+ }
185
+ );
186
+ _ProgressBar.displayName = "ProgressBar";
187
+ const ProgressBar = Object.assign(_ProgressBar, {
188
+ Value: import_ProgressBarValue.ProgressBarValue,
189
+ Label: import_ProgressBarLabel.ProgressBarLabel,
190
+ Icon: import_ProgressBarIcon.ProgressBarIcon
191
+ });
@@ -0,0 +1,42 @@
1
+ export declare const progressCSS: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ size: {
3
+ condensed: {
4
+ height: "6px";
5
+ };
6
+ default: {
7
+ height: "8px";
8
+ };
9
+ };
10
+ variant: {
11
+ onAccent: {
12
+ backgroundColor: string;
13
+ };
14
+ primary: {
15
+ backgroundColor: string;
16
+ };
17
+ success: {
18
+ backgroundColor: string;
19
+ };
20
+ warning: {
21
+ backgroundColor: string;
22
+ };
23
+ critical: {
24
+ backgroundColor: string;
25
+ };
26
+ neutral: {
27
+ backgroundColor: string;
28
+ };
29
+ };
30
+ }>;
31
+ export declare const progressBarFillCSS: import("@vanilla-extract/recipes").RuntimeFn<{
32
+ indeterminate: {
33
+ true: {
34
+ width: "100%";
35
+ animationName: string;
36
+ animationDuration: string;
37
+ animationTimingFunction: string;
38
+ animationIterationCount: "infinite";
39
+ transformOrigin: "left center";
40
+ };
41
+ };
42
+ }>;
@@ -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 ProgressBar_css_exports = {};
19
+ __export(ProgressBar_css_exports, {
20
+ progressBarFillCSS: () => progressBarFillCSS,
21
+ progressCSS: () => progressCSS
22
+ });
23
+ module.exports = __toCommonJS(ProgressBar_css_exports);
24
+ var import_colorUtils_css_ts_vanilla = require("../../styles/colorUtils.css");
25
+ var import_ProgressBar_css_ts_vanilla = require("./ProgressBar.css");
26
+ var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
27
+ var progressBarFillCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "ProgressBar_progressBarFillCSS__13n9uwha", variantClassNames: { indeterminate: { true: "ProgressBar_progressBarFillCSS_indeterminate_true__13n9uwhb" } }, defaultVariants: {}, compoundVariants: [] });
28
+ var progressCSS = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "ProgressBar_progressCSS__13n9uwh1", variantClassNames: { size: { condensed: "ProgressBar_progressCSS_size_condensed__13n9uwh2", "default": "ProgressBar_progressCSS_size_default__13n9uwh3" }, variant: { onAccent: "ProgressBar_progressCSS_variant_onAccent__13n9uwh4", primary: "ProgressBar_progressCSS_variant_primary__13n9uwh5", success: "ProgressBar_progressCSS_variant_success__13n9uwh6", warning: "ProgressBar_progressCSS_variant_warning__13n9uwh7", critical: "ProgressBar_progressCSS_variant_critical__13n9uwh8", neutral: "ProgressBar_progressCSS_variant_neutral__13n9uwh9" } }, defaultVariants: {}, compoundVariants: [] });
@@ -0,0 +1,5 @@
1
+ .ProgressBarIcon_progressBarIconContainerCSS__szm9t40 {
2
+ display: flex;
3
+ margin-left: auto;
4
+ color: var(--vars_borderColor__17bwkb02);
5
+ }
@@ -0,0 +1,15 @@
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
+ import { type WithChildren } from '../../core/types/with-children.js';
5
+ /**
6
+ * Accepted properties for ProgressBarIcon.
7
+ * @public
8
+ */
9
+ export interface ProgressBarIconProps extends WithChildren, StylingProps, DataTestId {
10
+ }
11
+ /**
12
+ * The ProgressBarIcon subcomponent is rendered inside the ProgressBar component.
13
+ * @public
14
+ */
15
+ export declare const ProgressBarIcon: (props: ProgressBarIconProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,68 @@
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 ProgressBarIcon_exports = {};
29
+ __export(ProgressBarIcon_exports, {
30
+ ProgressBarIcon: () => ProgressBarIcon
31
+ });
32
+ module.exports = __toCommonJS(ProgressBarIcon_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_useProgressBarPropsContext = require("./hooks/useProgressBarPropsContext.js");
36
+ var import_ProgressBarIcon_css = require("./ProgressBarIcon.sty.js");
37
+ var import_colorUtils_css = require("../../styles/colorUtils.sty.js");
38
+ const ProgressBarIcon = (0, import_react.forwardRef)(
39
+ (props, forwardedRef) => {
40
+ const {
41
+ children,
42
+ className: consumerClassName,
43
+ style: consumerStyle,
44
+ "data-testid": dataTestId,
45
+ ...remainingProps
46
+ } = props;
47
+ const { variant } = (0, import_useProgressBarPropsContext._useSharedProgressBarPropsContext)();
48
+ return /* @__PURE__ */ import_react.default.createElement(
49
+ "div",
50
+ {
51
+ "data-testid": dataTestId,
52
+ ref: forwardedRef,
53
+ className: (0, import_clsx.default)(
54
+ consumerClassName,
55
+ (0, import_colorUtils_css.colorUtilsCSS)({
56
+ color: variant,
57
+ variant: variant === "onAccent" ? "default" : "accent"
58
+ }),
59
+ import_ProgressBarIcon_css.progressBarIconContainerCSS
60
+ ),
61
+ style: consumerStyle,
62
+ ...remainingProps
63
+ },
64
+ children
65
+ );
66
+ }
67
+ );
68
+ ProgressBarIcon.displayName = "ProgressBar.Icon";
@@ -0,0 +1 @@
1
+ export declare const progressBarIconContainerCSS: string;
@@ -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 ProgressBarIcon_css_exports = {};
19
+ __export(ProgressBarIcon_css_exports, {
20
+ progressBarIconContainerCSS: () => progressBarIconContainerCSS
21
+ });
22
+ module.exports = __toCommonJS(ProgressBarIcon_css_exports);
23
+ var import_colorUtils_css_ts_vanilla = require("../../styles/colorUtils.css");
24
+ var import_ProgressBarIcon_css_ts_vanilla = require("./ProgressBarIcon.css");
25
+ var progressBarIconContainerCSS = "ProgressBarIcon_progressBarIconContainerCSS__szm9t40";
@@ -0,0 +1,9 @@
1
+ .ProgressBarLabel_progressBarLabelCSS__1ceb8vp0 {
2
+ color: var(--vars_text__6levse0);
3
+ }
4
+ .ProgressBarLabel_progressBarLabelCSS_size_default__1ceb8vp2 {
5
+ word-break: break-word;
6
+ }
7
+ .ProgressBarLabel_progressBarLabelCSS_childIsText_false__1ceb8vp3 {
8
+ word-break: break-word;
9
+ }
@@ -0,0 +1,15 @@
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
+ import { type WithChildren } from '../../core/types/with-children.js';
5
+ /**
6
+ * Accepted properties for ProgressBarLabel.
7
+ * @public
8
+ */
9
+ export interface ProgressBarLabelProps extends WithChildren, StylingProps, DataTestId {
10
+ }
11
+ /**
12
+ * ProgressBarLabel sub-component is rendered inside ProgressBar component.
13
+ * @public
14
+ */
15
+ export declare const ProgressBarLabel: (props: ProgressBarLabelProps & React.RefAttributes<HTMLLabelElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
@@ -0,0 +1,75 @@
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 ProgressBarLabel_exports = {};
29
+ __export(ProgressBarLabel_exports, {
30
+ ProgressBarLabel: () => ProgressBarLabel
31
+ });
32
+ module.exports = __toCommonJS(ProgressBarLabel_exports);
33
+ var import_clsx = __toESM(require("clsx"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_useProgressBarPropsContext = require("./hooks/useProgressBarPropsContext.js");
36
+ var import_ProgressBarLabel_css = require("./ProgressBarLabel.sty.js");
37
+ var import_is_string_children = require("../../core/utils/_is-string-children.js");
38
+ var import_container_css = require("../../styles/container.sty.js");
39
+ var import_ellipsis_css = require("../../styles/ellipsis.sty.js");
40
+ var import_textStyle_css = require("../../styles/textStyle.sty.js");
41
+ const ProgressBarLabel = (0, import_react.forwardRef)((props, forwardedRef) => {
42
+ const {
43
+ children,
44
+ className: consumerClassName,
45
+ style: consumerStyle,
46
+ "data-testid": dataTestId,
47
+ ...remainingProps
48
+ } = props;
49
+ const { id, variant, density } = (0, import_useProgressBarPropsContext._useSharedProgressBarPropsContext)();
50
+ const childIsText = (0, import_is_string_children.isStringChildren)(children);
51
+ return /* @__PURE__ */ import_react.default.createElement(
52
+ "label",
53
+ {
54
+ "data-testid": dataTestId,
55
+ ref: forwardedRef,
56
+ htmlFor: id,
57
+ className: (0, import_clsx.default)(
58
+ {
59
+ [import_ellipsis_css.ellipsisCSS]: density === "condensed" && childIsText
60
+ },
61
+ consumerClassName,
62
+ (0, import_container_css.containerColorsCSS)({
63
+ color: "neutral",
64
+ variant: variant === "onAccent" ? "accent" : "default"
65
+ }),
66
+ (0, import_ProgressBarLabel_css.progressBarLabelCSS)({ size: density, childIsText }),
67
+ (0, import_textStyle_css.textStyleCSS)({ textStyle: "base" })
68
+ ),
69
+ style: consumerStyle,
70
+ ...remainingProps
71
+ },
72
+ children
73
+ );
74
+ });
75
+ ProgressBarLabel.displayName = "ProgressBar.Label";
@@ -0,0 +1,13 @@
1
+ export declare const progressBarLabelCSS: import("@vanilla-extract/recipes").RuntimeFn<{
2
+ size: {
3
+ condensed: {};
4
+ default: {
5
+ wordBreak: "break-word";
6
+ };
7
+ };
8
+ childIsText: {
9
+ false: {
10
+ wordBreak: "break-word";
11
+ };
12
+ };
13
+ }>;