@jobber/components 8.24.0 → 8.25.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.
@@ -0,0 +1 @@
1
+ export * from "./dist/ProgressIndicator";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true,
5
+ });
6
+
7
+ var ProgressIndicator = require("./dist/ProgressIndicator");
8
+
9
+ Object.keys(ProgressIndicator).forEach(function(key) {
10
+ if (key === "default" || key === "__esModule") return;
11
+ Object.defineProperty(exports, key, {
12
+ enumerable: true,
13
+ get: function get() {
14
+ return ProgressIndicator[key];
15
+ },
16
+ });
17
+ });
@@ -41,6 +41,7 @@ function deconstructCssCustomProperty(color) {
41
41
  .trim();
42
42
  }
43
43
 
44
+ const MAX_VISIBLE_INITIALS = 3;
44
45
  function Avatar({ imageUrl, name, initials, size = "base", color, UNSAFE_className = {}, UNSAFE_style = {}, }) {
45
46
  const style = Object.assign({ backgroundColor: color, borderColor: color }, UNSAFE_style.container);
46
47
  if (imageUrl) {
@@ -72,9 +73,9 @@ function Initials({ initials, iconColor = "textReverse", iconSize = "base", UNSA
72
73
  return (React.createElement(Icon.Icon, { name: "person", color: iconColor, size: iconSize, UNSAFE_className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.fallbackIcon, UNSAFE_style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.fallbackIcon }));
73
74
  }
74
75
  const className = classnames(styles.initials, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.initials, {
75
- [styles.smallInitials]: initials.length > 2,
76
+ [styles.smallInitials]: initials.length >= MAX_VISIBLE_INITIALS,
76
77
  });
77
- return (React.createElement("span", { className: className, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.initials }, initials.substr(0, 3)));
78
+ return (React.createElement("span", { className: className, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.initials }, initials.slice(0, MAX_VISIBLE_INITIALS)));
78
79
  }
79
80
 
80
81
  exports.Avatar = Avatar;
package/dist/Avatar-es.js CHANGED
@@ -39,6 +39,7 @@ function deconstructCssCustomProperty(color) {
39
39
  .trim();
40
40
  }
41
41
 
42
+ const MAX_VISIBLE_INITIALS = 3;
42
43
  function Avatar({ imageUrl, name, initials, size = "base", color, UNSAFE_className = {}, UNSAFE_style = {}, }) {
43
44
  const style = Object.assign({ backgroundColor: color, borderColor: color }, UNSAFE_style.container);
44
45
  if (imageUrl) {
@@ -70,9 +71,9 @@ function Initials({ initials, iconColor = "textReverse", iconSize = "base", UNSA
70
71
  return (React__default.createElement(Icon, { name: "person", color: iconColor, size: iconSize, UNSAFE_className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.fallbackIcon, UNSAFE_style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.fallbackIcon }));
71
72
  }
72
73
  const className = classnames(styles.initials, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.initials, {
73
- [styles.smallInitials]: initials.length > 2,
74
+ [styles.smallInitials]: initials.length >= MAX_VISIBLE_INITIALS,
74
75
  });
75
- return (React__default.createElement("span", { className: className, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.initials }, initials.substr(0, 3)));
76
+ return (React__default.createElement("span", { className: className, style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.initials }, initials.slice(0, MAX_VISIBLE_INITIALS)));
76
77
  }
77
78
 
78
79
  export { Avatar as A };
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
2
  import sizes from "./ProgressBarSizes.module.css";
3
+ /**
4
+ * @deprecated Use `ProgressIndicator` instead.
5
+ */
3
6
  interface ProgressBarProps {
4
7
  /**
5
8
  * The current step that the progress bar is on.
@@ -30,5 +33,9 @@ interface ProgressBarProps {
30
33
  */
31
34
  readonly UNSAFE_style?: React.CSSProperties;
32
35
  }
36
+ /**
37
+ * @deprecated Use `ProgressIndicator` from
38
+ * `@jobber/components/ProgressIndicator` instead.
39
+ */
33
40
  export declare function ProgressBar({ currentStep, totalSteps, size, variation, UNSAFE_className, UNSAFE_style, }: ProgressBarProps): React.JSX.Element;
34
41
  export {};
@@ -19,6 +19,10 @@ function ProgressBarStepped({ currentStep, totalSteps, percentage, size = "base"
19
19
  })));
20
20
  }
21
21
 
22
+ /**
23
+ * @deprecated Use `ProgressIndicator` from
24
+ * `@jobber/components/ProgressIndicator` instead.
25
+ */
22
26
  function ProgressBar({ currentStep, totalSteps, size = "base", variation = "progress", UNSAFE_className, UNSAFE_style, }) {
23
27
  const percentage = (currentStep / totalSteps) * 100;
24
28
  const progressBarClassName = classnames(styles.ProgressBar, sizes[size]);
@@ -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 };
@@ -1,5 +1,14 @@
1
1
  # Progress Bar
2
2
 
3
+ > **Deprecated.** Use [ProgressIndicator](../ProgressIndicator/ProgressIndicator.md) for new
4
+ > work. `ProgressIndicator` is the supported determinate progress indicator
5
+ > going forward — it offers the same semantic with a cleaner prop surface
6
+ > (`value` / `max` instead of `currentStep` / `totalSteps`,
7
+ > `variation="continuous"` instead of `"progress"`, plain `className` / `style`
8
+ > instead of `UNSAFE_*`), theme-adaptive tokens, and a unified
9
+ > `<div role="progressbar">` structure across continuous and stepped variations.
10
+ > `ProgressBar` continues to work unchanged for existing call sites.
11
+
3
12
  A ProgressBar is a visual indicator of how close something is to completion.
4
13
 
5
14
  ## Design & usage guidelines
@@ -0,0 +1,105 @@
1
+ # Progress Indicator
2
+
3
+ `ProgressIndicator` communicates **determinate** progress — a known fraction of
4
+ a task that has been completed. Use it when you can express progress as
5
+ `value / max`, such as a multi-step setup wizard or a file upload with a known
6
+ total size.
7
+
8
+ For indeterminate activity (loading time or fraction unknown), use
9
+ [ActivityIndicator](../ActivityIndicator/ActivityIndicator.md) instead.
10
+
11
+ Some great use cases for a `ProgressIndicator` include:
12
+
13
+ * Setup wizards, where we know how many steps the user has completed and how
14
+ many steps remain (use `variation="stepped"`).
15
+ * File uploads, where we know the total file size and how much data has already
16
+ been sent (use the default `variation="continuous"`).
17
+
18
+ ## Design & usage guidelines
19
+
20
+ The default `ProgressIndicator` size is `base` (16px tall) and can be used in
21
+ most cases. The `small` (8px) and `smaller` (4px) sizes should be used when the
22
+ indicator sits inline with text or in tight surface layouts.
23
+
24
+ `ProgressIndicator` always fills the width of its parent. Layout — including
25
+ inline-vs-block placement — is the consumer's responsibility. Wrap the indicator
26
+ with your own flex / `<Stack>` / `<Box>` container, or pass a `className` /
27
+ `style`, to control the surrounding layout.
28
+
29
+ ### Continuous vs. stepped
30
+
31
+ Use `variation="continuous"` (the default) when progress is a smooth value
32
+ between `0` and `max` — for example, a file upload where any percentage is
33
+ meaningful.
34
+
35
+ Use `variation="stepped"` when progress is naturally segmented — for example, a
36
+ multi-step wizard where the user is on step 2 of 5. Stepped renders `max`
37
+ discrete segments and fills the first `value` of them.
38
+
39
+ ## Accessibility
40
+
41
+ `ProgressIndicator` announces itself politely to assistive technology:
42
+
43
+ * `role="progressbar"` marks the root element as a progress bar.
44
+ * `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` reflect the current
45
+ progress so screen readers can announce the value as a percentage or ratio
46
+ appropriately.
47
+ * `aria-label` defaults to a localized-as-English template: `"{value}%"` when
48
+ `max === 100` (or `max` is omitted), and `"{value} / {max}"` otherwise. Pass a
49
+ custom `ariaLabel` to localize or to describe the specific activity (e.g.
50
+ `ariaLabel="Uploading file"`).
51
+
52
+ In the stepped variation, the individual segments are presentational `<div>`s
53
+ with no `role` or `aria-*` attributes. The whole indicator announces once as a
54
+ single progressbar — the outer `aria-valuenow` / `aria-valuemax` already carry
55
+ the progress information.
56
+
57
+ The indicator does not participate in the keyboard tab order.
58
+
59
+ ### Reduced motion
60
+
61
+ The width transition between `value` updates is intentionally **preserved**
62
+ under
63
+ [`prefers-reduced-motion: reduce`](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-reduced-motion).
64
+ The slide between progress values conveys functional information about progress,
65
+ direction, and magnitude — it is exempt under
66
+ [WCAG 2.3.3 ("Animation from Interactions")](https://www.w3.org/WAI/WCAG21/Understanding/animation-from-interactions.html).
67
+ Removing the transition would make progress harder to perceive, not easier.
68
+
69
+ ## Relationship to ProgressBar
70
+
71
+ The legacy [ProgressBar](../ProgressBar/ProgressBar.md) component remains available
72
+ and unchanged. New code should prefer `ProgressIndicator`. A follow-up change is
73
+ expected to consolidate `ProgressBar` onto `ProgressIndicator`.
74
+
75
+ `ProgressIndicator` renames `ProgressBar`'s props to align with HTML5
76
+ `<progress>` semantics and mobile naming:
77
+
78
+ | `ProgressBar` (legacy) | `ProgressIndicator` (new) |
79
+ | ---------------------- | ------------------------- |
80
+ | `currentStep` | `value` |
81
+ | `totalSteps` | `max` |
82
+ | `variation="progress"` | `variation="continuous"` |
83
+ | `UNSAFE_className` | `className` |
84
+ | `UNSAFE_style` | `style` |
85
+
86
+ ## Mobile
87
+
88
+ Mobile (`@jobber/components-native`) has its own `ProgressBar` with a richer
89
+ API. The mobile `ProgressIndicator` counterpart is forthcoming as a separate
90
+ deliverable.
91
+
92
+
93
+ ## Props
94
+
95
+ ### Web
96
+
97
+ | Prop | Type | Required | Default | Description |
98
+ |------|------|----------|---------|-------------|
99
+ | `value` | `number` | Yes | — | Current progress. Expected to be in the range `0..max` inclusive. |
100
+ | `ariaLabel` | `string` | No | — | Accessible label exposed via `aria-label` on the root element. When omitted, defaults to `"{value}%"` when `max === 1... |
101
+ | `className` | `string` | No | — | Custom class name merged onto the root element alongside the component's own classes. |
102
+ | `max` | `number` | No | `100` | Maximum value. Pass `max={4}` with `value={2}` for "2 of 4 steps"; pass `value={75}` for "75%". |
103
+ | `size` | `"base" | "small" | "smaller"` | No | `base` | Visual size. `smaller` renders at 4px tall, `small` at 8px, `base` at 16px. |
104
+ | `style` | `CSSProperties` | No | — | Custom inline styles applied to the root element. |
105
+ | `variation` | `"continuous" | "stepped"` | No | `continuous` | Visual variation: - `continuous` renders a single fill bar driven by `value / max`. - `stepped` renders `max` segment... |
@@ -73,6 +73,7 @@
73
73
  [Popover](./Popover/Popover.md)
74
74
  [product-vocabulary](./product-vocabulary/product-vocabulary.md)
75
75
  [ProgressBar](./ProgressBar/ProgressBar.md)
76
+ [ProgressIndicator](./ProgressIndicator/ProgressIndicator.md)
76
77
  [Radii](./Radii/Radii.md)
77
78
  [RadioGroup](./RadioGroup/RadioGroup.md)
78
79
  [ResponsiveBreakpoint](./ResponsiveBreakpoint/ResponsiveBreakpoint.md)
package/dist/index.cjs CHANGED
@@ -70,6 +70,7 @@ var MultiSelect = require('./MultiSelect-cjs.js');
70
70
  var Page = require('./Page-cjs.js');
71
71
  var Popover = require('./Popover-cjs.js');
72
72
  var ProgressBar = require('./ProgressBar-cjs.js');
73
+ var ProgressIndicator = require('./ProgressIndicator-cjs.js');
73
74
  var RadioGroup = require('./RadioGroup-cjs.js');
74
75
  var ResponsiveSwitcher = require('./ResponsiveSwitcher-cjs.js');
75
76
  var LegacySelect = require('./LegacySelect-cjs.js');
@@ -316,6 +317,7 @@ exports.Popover = Popover.Popover;
316
317
  exports.usePopoverContext = Popover.usePopoverContext;
317
318
  exports.usePopoverStyles = Popover.usePopoverStyles;
318
319
  exports.ProgressBar = ProgressBar.ProgressBar;
320
+ exports.ProgressIndicator = ProgressIndicator.ProgressIndicator;
319
321
  exports.RadioGroup = RadioGroup.RadioGroup;
320
322
  exports.RadioOption = RadioGroup.RadioOption;
321
323
  exports.ResponsiveSwitcher = ResponsiveSwitcher.ResponsiveSwitcher;
package/dist/index.d.mts CHANGED
@@ -60,6 +60,7 @@ export * from "./MultiSelect";
60
60
  export * from "./Page";
61
61
  export * from "./Popover";
62
62
  export * from "./ProgressBar";
63
+ export * from "./ProgressIndicator";
63
64
  export * from "./RadioGroup";
64
65
  export * from "./ResponsiveSwitcher";
65
66
  export * from "./LegacySelect";
package/dist/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export * from "./MultiSelect";
60
60
  export * from "./Page";
61
61
  export * from "./Popover";
62
62
  export * from "./ProgressBar";
63
+ export * from "./ProgressIndicator";
63
64
  export * from "./RadioGroup";
64
65
  export * from "./ResponsiveSwitcher";
65
66
  export * from "./LegacySelect";
package/dist/index.mjs CHANGED
@@ -68,6 +68,7 @@ export { M as MultiSelect } from './MultiSelect-es.js';
68
68
  export { P as Page } from './Page-es.js';
69
69
  export { P as Popover, u as usePopoverContext, a as usePopoverStyles } from './Popover-es.js';
70
70
  export { P as ProgressBar } from './ProgressBar-es.js';
71
+ export { P as ProgressIndicator } from './ProgressIndicator-es.js';
71
72
  export { R as RadioGroup, a as RadioOption } from './RadioGroup-es.js';
72
73
  export { R as ResponsiveSwitcher } from './ResponsiveSwitcher-es.js';
73
74
  export { L as LegacySelect, S as Option } from './LegacySelect-es.js';
package/dist/styles.css CHANGED
@@ -13104,6 +13104,107 @@ input.oOrjwubmsVA- {
13104
13104
  transform: rotate(-45deg);
13105
13105
  }
13106
13106
 
13107
+ /*
13108
+ * ProgressIndicator
13109
+ *
13110
+ * Determinate progress, rendered as a horizontal bar. The component supports
13111
+ * two variations:
13112
+ *
13113
+ * - `continuous` — a single fill element whose width is driven by the
13114
+ * CSS-registered custom property `--progress-indicator--fill-amount` (a <number> from
13115
+ * 0 to 100). The browser interpolates the number during a
13116
+ * `transition: width var(--timing-base) ease-out`.
13117
+ * - `stepped` — N presentational segment children, the first `value` of
13118
+ * which are filled. The outer shell is the flex container.
13119
+ *
13120
+ * Colour tokens mirror ActivityIndicator: fill / filled segments use
13121
+ * --color-interactive--subtle; track / empty segments use
13122
+ * --color-surface--active.
13123
+ *
13124
+ * The width transition is intentionally preserved under
13125
+ * prefers-reduced-motion: reduce because the slide between progress values
13126
+ * conveys functional information about progress (WCAG 2.3.3, "Animation from
13127
+ * Interactions"). Removing it would make progress harder to perceive, not
13128
+ * easier.
13129
+ */
13130
+
13131
+ /*
13132
+ * Register --progress-indicator--fill-amount so the browser knows it is a real <number>
13133
+ * and can interpolate between values during the width transition. Without
13134
+ * this @property declaration the custom property is treated as an opaque
13135
+ * string and the transition would snap rather than animate smoothly.
13136
+ */
13137
+
13138
+ @property --progress-indicator--fill-amount {
13139
+ syntax: "<number>";
13140
+ inherits: false;
13141
+ initial-value: 0;
13142
+ }
13143
+
13144
+ .-TBRV1VUsfc- {
13145
+ --progress-indicator--height: 16px;
13146
+
13147
+ width: 100%;
13148
+ height: 16px;
13149
+ height: var(--progress-indicator--height);
13150
+ }
13151
+
13152
+ .MStgN8AhV3s- {
13153
+ --progress-indicator--height: 4px;
13154
+ }
13155
+
13156
+ .iAlYWHjs6JQ- {
13157
+ --progress-indicator--height: 8px;
13158
+ }
13159
+
13160
+ .WWEzA1-OjSM- {
13161
+ --progress-indicator--height: 16px;
13162
+ }
13163
+
13164
+ /* Continuous: the indicator IS the track; the .fill child sits on top. */
13165
+
13166
+ .r9ShSj58V6w- {
13167
+ border-radius: calc(var(--progress-indicator--height) / 2);
13168
+ overflow: hidden;
13169
+ background-color: hsl(40, 9%, 85%);
13170
+ background-color: var(--color-surface--active);
13171
+ }
13172
+
13173
+ .Hsuq8zT-KzY- {
13174
+ width: calc(var(--progress-indicator--fill-amount) * 1%);
13175
+ height: 100%;
13176
+ border-radius: inherit;
13177
+ background-color: hsl(198, 35%, 21%);
13178
+ background-color: var(--color-interactive--subtle);
13179
+ transition: width 200ms ease-out;
13180
+ transition: width var(--timing-base) ease-out;
13181
+ }
13182
+
13183
+ /* Stepped: the indicator IS the flex container; segments are direct children. */
13184
+
13185
+ .FB1e9bL90tI- {
13186
+ display: -ms-flexbox;
13187
+ display: flex;
13188
+ -ms-flex-direction: row;
13189
+ flex-direction: row;
13190
+ gap: 8px;
13191
+ gap: var(--space-small);
13192
+ }
13193
+
13194
+ .bpLIiDGlsCs- {
13195
+ height: 100%;
13196
+ border-radius: calc(var(--progress-indicator--height) / 2);
13197
+ background-color: hsl(40, 9%, 85%);
13198
+ background-color: var(--color-surface--active);
13199
+ -ms-flex: 1 1 0px;
13200
+ flex: 1 1 0;
13201
+ }
13202
+
13203
+ .bpLIiDGlsCs-._0FxmImvY-04- {
13204
+ background-color: hsl(198, 35%, 21%);
13205
+ background-color: var(--color-interactive--subtle);
13206
+ }
13207
+
13107
13208
  .KZfSK2vhTyI- {
13108
13209
  --radio--checked-thickness: 6px;
13109
13210
  --radio-diameter: 20px;
@@ -203,6 +203,7 @@
203
203
  "Popover.DismissButton",
204
204
  "Popover.Provider",
205
205
  "ProgressBar",
206
+ "ProgressIndicator",
206
207
  "RadioGroup",
207
208
  "RadioOption",
208
209
  "ResponsiveSwitcher",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "8.24.0",
3
+ "version": "8.25.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -540,5 +540,5 @@
540
540
  "> 1%",
541
541
  "IE 10"
542
542
  ],
543
- "gitHead": "a0a4e20fd87528ebfff6970e6566a1b94b927578"
543
+ "gitHead": "e3d3191e8f89a2d1d1ebde4fb8d93706ecfdd511"
544
544
  }