@jobber/components 8.24.0 → 8.24.2-visual-reg-5479aeb.18

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 (75) hide show
  1. package/ProgressIndicator.d.ts +1 -0
  2. package/{DescriptionList.js → ProgressIndicator.js} +3 -3
  3. package/dist/AtlantisThemeContext/AtlantisThemeContext.d.ts +1 -1
  4. package/dist/AtlantisThemeContext/index.cjs +1 -2
  5. package/dist/AtlantisThemeContext/index.mjs +1 -2
  6. package/dist/AtlantisThemeContext/themeStore.d.ts +11 -0
  7. package/dist/AtlantisThemeContext/types.d.ts +14 -0
  8. package/dist/AtlantisThemeContext/updateTheme.d.ts +1 -1
  9. package/dist/AtlantisThemeContext-cjs.js +58 -17
  10. package/dist/AtlantisThemeContext-es.js +60 -20
  11. package/dist/Avatar-cjs.js +3 -2
  12. package/dist/Avatar-es.js +3 -2
  13. package/dist/BottomSheet-cjs.js +8 -7
  14. package/dist/BottomSheet-es.js +9 -8
  15. package/dist/ComboboxChipRemove-es.js +2 -2
  16. package/dist/DatePicker-es.js +1 -1
  17. package/dist/Dialog/Dialog.d.ts +47 -3
  18. package/dist/Dialog/Dialog.types.d.ts +1 -15
  19. package/dist/Dialog/DialogBottomSheet.d.ts +12 -13
  20. package/dist/Dialog/DialogModal.d.ts +11 -11
  21. package/dist/Dialog/dialogComposableShared.d.ts +13 -3
  22. package/dist/DrawerDescription-cjs.js +4 -97
  23. package/dist/DrawerDescription-es.js +6 -98
  24. package/dist/InputNumberExperimental-cjs.js +21 -25
  25. package/dist/InputNumberExperimental-es.js +22 -26
  26. package/dist/MenuSubmenuTrigger-es.js +3 -3
  27. package/dist/Modal/index.cjs +12 -2
  28. package/dist/Modal/index.mjs +13 -3
  29. package/dist/ProgressBar/ProgressBar.d.ts +7 -0
  30. package/dist/ProgressBar-cjs.js +4 -0
  31. package/dist/ProgressBar-es.js +4 -0
  32. package/dist/ProgressIndicator/ProgressIndicator.d.ts +60 -0
  33. package/dist/ProgressIndicator/index.cjs +9 -0
  34. package/dist/ProgressIndicator/index.d.ts +1 -0
  35. package/dist/ProgressIndicator/index.mjs +3 -0
  36. package/dist/ProgressIndicator-cjs.js +43 -0
  37. package/dist/ProgressIndicator-es.js +41 -0
  38. package/dist/ScrollAreaViewport-cjs.js +2122 -12
  39. package/dist/ScrollAreaViewport-es.js +2118 -13
  40. package/dist/dialogReturnFocus-cjs.js +61 -34
  41. package/dist/dialogReturnFocus-es.js +63 -36
  42. package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.md +41 -0
  43. package/dist/docs/DataTable/DataTable.md +0 -4
  44. package/dist/docs/Dialog/Dialog.md +1006 -0
  45. package/dist/docs/Icon/Icon.md +60 -53
  46. package/dist/docs/InputNumberExperimental/InputNumberExperimental.md +578 -0
  47. package/dist/docs/ProgressBar/ProgressBar.md +9 -0
  48. package/dist/docs/ProgressIndicator/ProgressIndicator.md +105 -0
  49. package/dist/docs/Table/Table.md +1 -3
  50. package/dist/docs/index.md +3 -1
  51. package/dist/index.cjs +3 -4
  52. package/dist/index.d.mts +1 -1
  53. package/dist/index.d.ts +1 -1
  54. package/dist/index.mjs +2 -3
  55. package/dist/isTypedArray-es.js +1 -1
  56. package/dist/primitives/InputNumberExperimental/InputNumberExperimental.d.ts +31 -15
  57. package/dist/primitives/InputNumberExperimental/types.d.ts +0 -1
  58. package/dist/styles.css +172 -51
  59. package/dist/unstyledPrimitives/index.cjs +218 -2230
  60. package/dist/unstyledPrimitives/index.mjs +224 -2236
  61. package/dist/useButton-es.js +1 -1
  62. package/dist/useScrollLock-es.js +2 -2
  63. package/dist/useScrollToActive-es.js +1 -1
  64. package/dist/utils/meta/meta.json +1 -1
  65. package/package.json +7 -7
  66. package/DescriptionList.d.ts +0 -1
  67. package/dist/DescriptionList/DescriptionList.d.ts +0 -11
  68. package/dist/DescriptionList/index.cjs +0 -10
  69. package/dist/DescriptionList/index.d.ts +0 -1
  70. package/dist/DescriptionList/index.mjs +0 -4
  71. package/dist/DescriptionList-cjs.js +0 -14
  72. package/dist/DescriptionList-es.js +0 -12
  73. package/dist/docs/DescriptionList/DescriptionList.md +0 -25
  74. package/dist/updateTheme-cjs.js +0 -20
  75. package/dist/updateTheme-es.js +0 -18
@@ -17,6 +17,10 @@ function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base"
17
17
  })));
18
18
  }
19
19
 
20
+ /**
21
+ * @deprecated Use `ProgressIndicator` from
22
+ * `@jobber/components/ProgressIndicator` instead.
23
+ */
20
24
  function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", UNSAFE_className, UNSAFE_style, }) {
21
25
  const percentage = (currentStep / totalSteps) * 100;
22
26
  const progressBarClassName = classnames(styles.ProgressBar, sizes[size]);
@@ -0,0 +1,60 @@
1
+ import React from "react";
2
+ import type { CSSProperties } from "react";
3
+ export interface ProgressIndicatorProps {
4
+ /**
5
+ * Current progress. Expected to be in the range `0..max` inclusive.
6
+ */
7
+ readonly value: number;
8
+ /**
9
+ * Maximum value. Pass `max={4}` with `value={2}` for "2 of 4 steps"; pass
10
+ * `value={75}` for "75%".
11
+ *
12
+ * @default 100
13
+ */
14
+ readonly max?: number;
15
+ /**
16
+ * Visual variation:
17
+ * - `continuous` renders a single fill bar driven by `value / max`.
18
+ * - `stepped` renders `max` segments, the first `value` of which are filled.
19
+ *
20
+ * @default "continuous"
21
+ */
22
+ readonly variation?: "continuous" | "stepped";
23
+ /**
24
+ * Visual size. `smaller` renders at 4px tall, `small` at 8px, `base` at 16px.
25
+ *
26
+ * @default "base"
27
+ */
28
+ readonly size?: "smaller" | "small" | "base";
29
+ /**
30
+ * Accessible label exposed via `aria-label` on the root element. When
31
+ * omitted, defaults to `"{value}%"` when `max === 100` (or `max` is
32
+ * omitted), and `"{value} / {max}"` otherwise.
33
+ *
34
+ * Override to localize or to describe the specific activity (e.g.
35
+ * `"Uploading file"`).
36
+ */
37
+ readonly ariaLabel?: string;
38
+ /**
39
+ * Custom class name merged onto the root element alongside the component's
40
+ * own classes.
41
+ */
42
+ readonly className?: string;
43
+ /**
44
+ * Custom inline styles applied to the root element.
45
+ */
46
+ readonly style?: CSSProperties;
47
+ }
48
+ /**
49
+ * `ProgressIndicator` communicates **determinate** progress — a known fraction
50
+ * of a task that has been completed. Use it when you can express progress as
51
+ * `value / max`, such as a multi-step setup wizard or a file upload with a
52
+ * known total size.
53
+ *
54
+ * For indeterminate activity (loading time or fraction unknown), use
55
+ * `ActivityIndicator` instead.
56
+ *
57
+ * For now, the legacy `ProgressBar` component also remains available; new code
58
+ * should prefer `ProgressIndicator`.
59
+ */
60
+ export declare function ProgressIndicator({ value, max, variation, size, ariaLabel, className, style, }: ProgressIndicatorProps): React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var ProgressIndicator = require('../ProgressIndicator-cjs.js');
4
+ require('react');
5
+ require('classnames');
6
+
7
+
8
+
9
+ exports.ProgressIndicator = ProgressIndicator.ProgressIndicator;
@@ -0,0 +1 @@
1
+ export { ProgressIndicator } from "./ProgressIndicator";
@@ -0,0 +1,3 @@
1
+ export { P as ProgressIndicator } from '../ProgressIndicator-es.js';
2
+ import 'react';
3
+ import 'classnames';
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var classnames = require('classnames');
5
+
6
+ var styles = {"indicator":"-TBRV1VUsfc-","smaller":"MStgN8AhV3s-","small":"iAlYWHjs6JQ-","base":"WWEzA1-OjSM-","continuous":"r9ShSj58V6w-","fill":"Hsuq8zT-KzY-","stepped":"FB1e9bL90tI-","segment":"bpLIiDGlsCs-","filled":"_0FxmImvY-04-","spinning":"_2aJghEPvl14-"};
7
+
8
+ /**
9
+ * `ProgressIndicator` communicates **determinate** progress — a known fraction
10
+ * of a task that has been completed. Use it when you can express progress as
11
+ * `value / max`, such as a multi-step setup wizard or a file upload with a
12
+ * known total size.
13
+ *
14
+ * For indeterminate activity (loading time or fraction unknown), use
15
+ * `ActivityIndicator` instead.
16
+ *
17
+ * For now, the legacy `ProgressBar` component also remains available; new code
18
+ * should prefer `ProgressIndicator`.
19
+ */
20
+ function ProgressIndicator({ value, max = 100, variation = "continuous", size = "base", ariaLabel, className, style, }) {
21
+ const clampedValue = Math.min(value, max);
22
+ const resolvedAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : defaultAriaLabel(clampedValue, max);
23
+ return (React.createElement("div", { role: "progressbar", "aria-valuenow": clampedValue, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": resolvedAriaLabel, className: classnames(styles.indicator, styles[size], variation === "stepped" ? styles.stepped : styles.continuous, className), style: style }, variation === "stepped"
24
+ ? SteppedSegments({ value: clampedValue, max })
25
+ : ContinuousFill({ value: clampedValue, max })));
26
+ }
27
+ function ContinuousFill({ value, max, }) {
28
+ const percentage = max === 0 ? 0 : (value / max) * 100;
29
+ return (React.createElement("div", { className: styles.fill, style: { "--progress-indicator--fill-amount": percentage } }));
30
+ }
31
+ function SteppedSegments({ value, max, }) {
32
+ return (React.createElement(React.Fragment, null, Array.from({ length: max }).map((_, index) => {
33
+ const step = index + 1;
34
+ return (React.createElement("div", { key: step, className: classnames(styles.segment, step <= value && styles.filled) }));
35
+ })));
36
+ }
37
+ function defaultAriaLabel(value, max) {
38
+ if (max === 100)
39
+ return `${value}%`;
40
+ return `${value} / ${max}`;
41
+ }
42
+
43
+ exports.ProgressIndicator = ProgressIndicator;
@@ -0,0 +1,41 @@
1
+ import React__default from 'react';
2
+ import classnames from 'classnames';
3
+
4
+ var styles = {"indicator":"-TBRV1VUsfc-","smaller":"MStgN8AhV3s-","small":"iAlYWHjs6JQ-","base":"WWEzA1-OjSM-","continuous":"r9ShSj58V6w-","fill":"Hsuq8zT-KzY-","stepped":"FB1e9bL90tI-","segment":"bpLIiDGlsCs-","filled":"_0FxmImvY-04-","spinning":"_2aJghEPvl14-"};
5
+
6
+ /**
7
+ * `ProgressIndicator` communicates **determinate** progress — a known fraction
8
+ * of a task that has been completed. Use it when you can express progress as
9
+ * `value / max`, such as a multi-step setup wizard or a file upload with a
10
+ * known total size.
11
+ *
12
+ * For indeterminate activity (loading time or fraction unknown), use
13
+ * `ActivityIndicator` instead.
14
+ *
15
+ * For now, the legacy `ProgressBar` component also remains available; new code
16
+ * should prefer `ProgressIndicator`.
17
+ */
18
+ function ProgressIndicator({ value, max = 100, variation = "continuous", size = "base", ariaLabel, className, style, }) {
19
+ const clampedValue = Math.min(value, max);
20
+ const resolvedAriaLabel = ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : defaultAriaLabel(clampedValue, max);
21
+ return (React__default.createElement("div", { role: "progressbar", "aria-valuenow": clampedValue, "aria-valuemin": 0, "aria-valuemax": max, "aria-label": resolvedAriaLabel, className: classnames(styles.indicator, styles[size], variation === "stepped" ? styles.stepped : styles.continuous, className), style: style }, variation === "stepped"
22
+ ? SteppedSegments({ value: clampedValue, max })
23
+ : ContinuousFill({ value: clampedValue, max })));
24
+ }
25
+ function ContinuousFill({ value, max, }) {
26
+ const percentage = max === 0 ? 0 : (value / max) * 100;
27
+ return (React__default.createElement("div", { className: styles.fill, style: { "--progress-indicator--fill-amount": percentage } }));
28
+ }
29
+ function SteppedSegments({ value, max, }) {
30
+ return (React__default.createElement(React__default.Fragment, null, Array.from({ length: max }).map((_, index) => {
31
+ const step = index + 1;
32
+ return (React__default.createElement("div", { key: step, className: classnames(styles.segment, step <= value && styles.filled) }));
33
+ })));
34
+ }
35
+ function defaultAriaLabel(value, max) {
36
+ if (max === 100)
37
+ return `${value}%`;
38
+ return `${value} / ${max}`;
39
+ }
40
+
41
+ export { ProgressIndicator as P };