@jobber/components 8.9.1-TAYLORtai-d66f381.7 → 8.10.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.
package/dist/Icon-cjs.js CHANGED
@@ -15,7 +15,8 @@ function Icon({ name, color, customColor, size = "base", testID, UNSAFE_classNam
15
15
  icon = getTruck(pathStyle, customColor);
16
16
  }
17
17
  else {
18
- icon = paths.map((path) => (React.createElement("path", { key: path, style: Object.assign(Object.assign({}, pathStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.path), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.path, d: path, fill: customColor })));
18
+ // getIcon returns undefined paths for an unknown icon name; render nothing rather than crash.
19
+ icon = (paths !== null && paths !== void 0 ? paths : []).map((path) => (React.createElement("path", { key: path, style: Object.assign(Object.assign({}, pathStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.path), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.path, d: path, fill: customColor })));
19
20
  }
20
21
  return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, style: Object.assign(Object.assign({}, svgStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.svg), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.svg, "data-testid": testID || name }, icon));
21
22
  }
package/dist/Icon-es.js CHANGED
@@ -13,7 +13,8 @@ function Icon({ name, color, customColor, size = "base", testID, UNSAFE_classNam
13
13
  icon = getTruck(pathStyle, customColor);
14
14
  }
15
15
  else {
16
- icon = paths.map((path) => (React__default.createElement("path", { key: path, style: Object.assign(Object.assign({}, pathStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.path), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.path, d: path, fill: customColor })));
16
+ // getIcon returns undefined paths for an unknown icon name; render nothing rather than crash.
17
+ icon = (paths !== null && paths !== void 0 ? paths : []).map((path) => (React__default.createElement("path", { key: path, style: Object.assign(Object.assign({}, pathStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.path), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.path, d: path, fill: customColor })));
17
18
  }
18
19
  return (React__default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: viewBox, style: Object.assign(Object.assign({}, svgStyle), UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.svg), className: UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.svg, "data-testid": testID || name }, icon));
19
20
  }
@@ -610,7 +610,8 @@ if (process.env.NODE_ENV !== "production") FieldDescription.displayName = "Field
610
610
  var styles = {"container":"_6HZLFIOZh4s-","inline":"_-6ndFYNKKaM-","wrapper":"c20czk-FSyY-","disabled":"_-2INirAxaU4-","small":"NsFBA5oqRAA-","large":"ExKqck-6xVs-","center":"UWiqNi57G8g-","right":"po25PZwJpe4-","inputWrapper":"k9dAO6d010o-","input":"D-PmE-l-hZU-","stepper":"t42w4ZDiDyI-","label":"Ggk3aaMcIJU-","hideLabel":"C7d6qmoZiKU-","affixLabel":"_4u1JHjUYvkY-","prefix":"rEWH41rUUEE-","suffix":"_4-iNl6jdfmM-","affixIcon":"_5-Iw-2c-wXk-","compoundAffix":"tZjZRRcAShY-","affixLabelText":"mbEcqyBQoEg-","stepperButton":"zzrCzYF-8u0-","belowField":"_0mcAZAtwQ2o-","description":"xxp2uGc-B6o-","fieldError":"q-WsOi6joGo-","spinning":"d0TEiLWObKU-"};
611
611
 
612
612
  /**
613
- * Preserve user-typed decimals on blur. Without `maximumFractionDigits: 20`,
613
+ * Default formatting used only when the consumer does not pass `format`.
614
+ * Preserves user-typed decimals on blur: without `maximumFractionDigits: 20`,
614
615
  * `Intl.NumberFormat` rounds to 3 digits and silently truncates input.
615
616
  */
616
617
  const DEFAULT_FORMAT = {
@@ -627,7 +628,7 @@ function useInputNumberExperimentalContext(consumer) {
627
628
  }
628
629
  // eslint-disable-next-line max-statements
629
630
  function InputNumberExperimentalInternal(props, ref) {
630
- const { align, autocomplete, children, description, disabled, error, id: idProp, inline, invalid, keyboard, max, maxLength, min, name, onBlur, onChange, onEnter, onFocus, onKeyDown, onKeyUp, onValueChange, placeholder, prefix, readonly, showMiniLabel = true, size = "default", suffix, value, } = props;
631
+ const { align, autocomplete, children, description, disabled, error, format, id: idProp, inline, invalid, keyboard, max, maxLength, min, name, onBlur, onChange, onEnter, onFocus, onKeyDown, onKeyUp, onValueChange, placeholder, prefix, readonly, showMiniLabel = true, size = "default", suffix, value, } = props;
631
632
  const generatedId = React.useId();
632
633
  const id = idProp !== null && idProp !== void 0 ? idProp : generatedId;
633
634
  const innerInputRef = React.useRef(null);
@@ -702,7 +703,7 @@ function InputNumberExperimentalInternal(props, ref) {
702
703
  const fieldInvalid = invalid || Boolean(error);
703
704
  return (React.createElement(FieldRoot, { className: classnames(styles.container, inline && styles.inline), disabled: disabled, invalid: fieldInvalid, name: name },
704
705
  React.createElement(InputNumberExperimentalContext.Provider, { value: contextValue },
705
- React.createElement(NumberFieldInput.NumberFieldRoot, { allowOutOfRange: true, format: DEFAULT_FORMAT, id: id, max: max, min: min, onValueChange: handleValueChange, onValueCommitted: handleValueCommitted, readOnly: readonly, value: value !== null && value !== void 0 ? value : null },
706
+ React.createElement(NumberFieldInput.NumberFieldRoot, { allowOutOfRange: true, format: format !== null && format !== void 0 ? format : DEFAULT_FORMAT, id: id, max: max, min: min, onValueChange: handleValueChange, onValueCommitted: handleValueCommitted, readOnly: readonly, value: value !== null && value !== void 0 ? value : null },
706
707
  React.createElement(NumberFieldInput.NumberFieldGroup, { className: classnames(styles.wrapper, align && styles[align], disabled && styles.disabled, size !== "default" && styles[size]) }, isUsingCompoundPattern
707
708
  ? children
708
709
  : renderDefaultComposition({ prefix, suffix, size })))),
@@ -590,7 +590,8 @@ if (process.env.NODE_ENV !== "production") FieldDescription.displayName = "Field
590
590
  var styles = {"container":"_6HZLFIOZh4s-","inline":"_-6ndFYNKKaM-","wrapper":"c20czk-FSyY-","disabled":"_-2INirAxaU4-","small":"NsFBA5oqRAA-","large":"ExKqck-6xVs-","center":"UWiqNi57G8g-","right":"po25PZwJpe4-","inputWrapper":"k9dAO6d010o-","input":"D-PmE-l-hZU-","stepper":"t42w4ZDiDyI-","label":"Ggk3aaMcIJU-","hideLabel":"C7d6qmoZiKU-","affixLabel":"_4u1JHjUYvkY-","prefix":"rEWH41rUUEE-","suffix":"_4-iNl6jdfmM-","affixIcon":"_5-Iw-2c-wXk-","compoundAffix":"tZjZRRcAShY-","affixLabelText":"mbEcqyBQoEg-","stepperButton":"zzrCzYF-8u0-","belowField":"_0mcAZAtwQ2o-","description":"xxp2uGc-B6o-","fieldError":"q-WsOi6joGo-","spinning":"d0TEiLWObKU-"};
591
591
 
592
592
  /**
593
- * Preserve user-typed decimals on blur. Without `maximumFractionDigits: 20`,
593
+ * Default formatting used only when the consumer does not pass `format`.
594
+ * Preserves user-typed decimals on blur: without `maximumFractionDigits: 20`,
594
595
  * `Intl.NumberFormat` rounds to 3 digits and silently truncates input.
595
596
  */
596
597
  const DEFAULT_FORMAT = {
@@ -607,7 +608,7 @@ function useInputNumberExperimentalContext(consumer) {
607
608
  }
608
609
  // eslint-disable-next-line max-statements
609
610
  function InputNumberExperimentalInternal(props, ref) {
610
- const { align, autocomplete, children, description, disabled, error, id: idProp, inline, invalid, keyboard, max, maxLength, min, name, onBlur, onChange, onEnter, onFocus, onKeyDown, onKeyUp, onValueChange, placeholder, prefix, readonly, showMiniLabel = true, size = "default", suffix, value, } = props;
611
+ const { align, autocomplete, children, description, disabled, error, format, id: idProp, inline, invalid, keyboard, max, maxLength, min, name, onBlur, onChange, onEnter, onFocus, onKeyDown, onKeyUp, onValueChange, placeholder, prefix, readonly, showMiniLabel = true, size = "default", suffix, value, } = props;
611
612
  const generatedId = useId();
612
613
  const id = idProp !== null && idProp !== void 0 ? idProp : generatedId;
613
614
  const innerInputRef = useRef(null);
@@ -682,7 +683,7 @@ function InputNumberExperimentalInternal(props, ref) {
682
683
  const fieldInvalid = invalid || Boolean(error);
683
684
  return (React__default.createElement(FieldRoot, { className: classnames(styles.container, inline && styles.inline), disabled: disabled, invalid: fieldInvalid, name: name },
684
685
  React__default.createElement(InputNumberExperimentalContext.Provider, { value: contextValue },
685
- React__default.createElement(NumberFieldRoot, { allowOutOfRange: true, format: DEFAULT_FORMAT, id: id, max: max, min: min, onValueChange: handleValueChange, onValueCommitted: handleValueCommitted, readOnly: readonly, value: value !== null && value !== void 0 ? value : null },
686
+ React__default.createElement(NumberFieldRoot, { allowOutOfRange: true, format: format !== null && format !== void 0 ? format : DEFAULT_FORMAT, id: id, max: max, min: min, onValueChange: handleValueChange, onValueCommitted: handleValueCommitted, readOnly: readonly, value: value !== null && value !== void 0 ? value : null },
686
687
  React__default.createElement(NumberFieldGroup, { className: classnames(styles.wrapper, align && styles[align], disabled && styles.disabled, size !== "default" && styles[size]) }, isUsingCompoundPattern
687
688
  ? children
688
689
  : renderDefaultComposition({ prefix, suffix, size })))),
@@ -1,8 +1,57 @@
1
1
  # Activity Indicator
2
2
 
3
- `ActivityIndicator` is used to communicate an **indeterminate** activity the
4
- user cannot directly control or measure — loading, fetching, or waiting on an
5
- external system.
3
+ `ActivityIndicator` communicates an **indeterminate** activity the user cannot
4
+ directly control or measure — loading, fetching, or waiting on an external
5
+ system.
6
+
7
+ Use `ActivityIndicator` when the loading time or fraction of progress is
8
+ unknown. If you know the fraction of progress (for example, "3 of 4 files
9
+ uploaded"), use `ProgressBar` instead. A `ProgressIndicator` counterpart that
10
+ will subsume `ProgressBar` under the new Indicators naming is forthcoming.
11
+
12
+ ## Design & usage guidelines
13
+
14
+ The default `ActivityIndicator` size is `base` (44px) and can be used in most
15
+ cases. The `small` size (28px) should be used on individual elements of an
16
+ interface (e.g. inside a `Button` or `Card`) or when sitting next to short
17
+ inline text.
18
+
19
+ Layout is the consumer's responsibility — `ActivityIndicator` does not expose an
20
+ `inline` prop. Place it inside your own flex / inline-block container, or pass a
21
+ `style`, to control surrounding layout.
22
+
23
+ ## Accessibility
24
+
25
+ `ActivityIndicator` announces itself to assistive technology on every platform:
26
+
27
+ * `accessibilityRole="progressbar"` and `accessibilityState={{ busy: true }}`
28
+ mark the component as an ongoing indeterminate activity.
29
+ * `accessibilityLabel` defaults to a localized `"Loading"` string via
30
+ `useAtlantisI18n("loading")`. Pass a custom `accessibilityLabel` to describe
31
+ the specific activity (e.g. `accessibilityLabel="Uploading file"`).
32
+ * On mount and whenever the label changes, the component calls
33
+ `AccessibilityInfo.announceForAccessibility` so VoiceOver and TalkBack
34
+ announce the label once.
35
+
36
+ The indicator is not focusable and is not in the accessibility navigation order
37
+ beyond the mount-time announcement.
38
+
39
+ ### Reduced motion
40
+
41
+ When the operating system reports the Reduce Motion accessibility setting, the
42
+ indicator hides the rocking and rotating layers, repaints a single static ring
43
+ in the icon foreground colour, and gently pulses its opacity so the indicator
44
+ still reads as "busy" without rotational motion. Detection is reactive — the
45
+ component responds to OS toggles without requiring a remount.
46
+
47
+ ## Cross-platform parity
48
+
49
+ `ActivityIndicator` renders the same Material Design 3 three-layer indeterminate
50
+ ring on iOS, Android, and web (`@jobber/components`). The visual identity,
51
+ sizes, motion durations, and reduced-motion fallback are unified across
52
+ platforms. Public prop names diverge to follow each platform's native
53
+ conventions (`accessibilityLabel` here vs `ariaLabel` on web; `style` here vs
54
+ `className` + `style` on web).
6
55
 
7
56
  Use `ActivityIndicator` when the loading time or fraction of progress is
8
57
  unknown. If you know the fraction of progress (for example, "3 of 4 files
@@ -52,6 +52,13 @@ export interface InputNumberExperimentalProps {
52
52
  readonly disabled?: boolean;
53
53
  /** When set, renders a styled error message below the field. */
54
54
  readonly error?: string;
55
+ /**
56
+ * Number formatting for the displayed value, forwarded verbatim to Base UI
57
+ * `NumberField`'s native `format`. Accepts standard `Intl.NumberFormatOptions`
58
+ * (e.g. `{ style: "currency", currency: "USD" }` or `{ maximumFractionDigits: 2 }`).
59
+ * When omitted, typed decimals are preserved without premature rounding.
60
+ */
61
+ readonly format?: Intl.NumberFormatOptions;
55
62
  readonly id?: string;
56
63
  /** Shrink-wrap the field to its content (auto width). */
57
64
  readonly inline?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "8.9.1-TAYLORtai-d66f381.7+d66f381a",
3
+ "version": "8.10.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -502,7 +502,7 @@
502
502
  "devDependencies": {
503
503
  "@apollo/client": "^3.7.10",
504
504
  "@csstools/postcss-global-data": "^1.0.3",
505
- "@jobber/design": "0.101.2-TAYLORtai-d66f381.36+d66f381a",
505
+ "@jobber/design": "0.102.0",
506
506
  "@jobber/hooks": "2.21.0",
507
507
  "@rollup/plugin-alias": "^5.1.0",
508
508
  "@rollup/plugin-commonjs": "^25.0.7",
@@ -556,5 +556,5 @@
556
556
  "> 1%",
557
557
  "IE 10"
558
558
  ],
559
- "gitHead": "d66f381a234db282667b16457410aad2fee95214"
559
+ "gitHead": "fff8aa8019d89e4a0d517f1eb963c8442935a16d"
560
560
  }