@jobber/components 8.3.0 → 8.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/ActivityIndicator.d.ts +1 -0
  2. package/ActivityIndicator.js +17 -0
  3. package/dist/ActivityIndicator/ActivityIndicator.d.ts +38 -0
  4. package/dist/ActivityIndicator/index.cjs +9 -0
  5. package/dist/ActivityIndicator/index.d.ts +2 -0
  6. package/dist/ActivityIndicator/index.mjs +3 -0
  7. package/dist/ActivityIndicator-cjs.js +27 -0
  8. package/dist/ActivityIndicator-es.js +25 -0
  9. package/dist/Autocomplete/Autocomplete.d.ts +6 -4
  10. package/dist/Autocomplete/Autocomplete.types.d.ts +3 -137
  11. package/dist/Autocomplete/components/FloatingMenu.d.ts +6 -6
  12. package/dist/Autocomplete/components/MenuList.d.ts +4 -4
  13. package/dist/Autocomplete/components/PersistentRegion.d.ts +3 -3
  14. package/dist/Autocomplete/index.cjs +25 -1658
  15. package/dist/Autocomplete/index.d.ts +3 -30
  16. package/dist/Autocomplete/index.mjs +25 -1647
  17. package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +15 -15
  18. package/dist/Autocomplete/useAutocomplete.d.ts +2 -2
  19. package/dist/Autocomplete-cjs.js +1306 -0
  20. package/dist/Autocomplete-es.js +1304 -0
  21. package/dist/Menu-es.js +1 -1
  22. package/dist/MenuSubmenuTrigger-es.js +1 -1
  23. package/dist/Spinner/Spinner.d.ts +6 -0
  24. package/dist/Spinner-cjs.js +3 -0
  25. package/dist/Spinner-es.js +3 -0
  26. package/dist/docs/ActivityIndicator/ActivityIndicator.md +67 -0
  27. package/dist/docs/Autocomplete/{AutocompleteV2.md → Autocomplete.md} +13 -107
  28. package/dist/docs/Banner/Banner.md +3 -3
  29. package/dist/docs/Box/Box.md +2 -2
  30. package/dist/docs/Chips/Chips.md +1 -1
  31. package/dist/docs/DataList/DataList.md +1 -1
  32. package/dist/docs/Icon/Icon.md +1 -1
  33. package/dist/docs/InputGroup/InputGroup.md +1 -1
  34. package/dist/docs/Menu/Menu.md +1 -1
  35. package/dist/docs/Modal/Modal.md +3 -3
  36. package/dist/docs/MultiSelect/MultiSelect.md +1 -1
  37. package/dist/docs/Spinner/Spinner.md +9 -1
  38. package/dist/docs/index.md +2 -2
  39. package/dist/docs/usage-guidelines/usage-guidelines.md +8 -10
  40. package/dist/floating-ui.react-dom-es.js +1 -1
  41. package/dist/floating-ui.react-es.js +1 -1
  42. package/dist/index.cjs +5 -3
  43. package/dist/index.d.mts +1 -0
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.esm-es.js +1 -1
  46. package/dist/index.mjs +3 -2
  47. package/dist/styles.css +308 -153
  48. package/dist/utils/meta/meta.json +1 -0
  49. package/package.json +8 -3
  50. package/dist/Autocomplete/Autocomplete.rebuilt.d.ts +0 -8
  51. package/dist/Autocomplete/Autocomplete.utils.d.ts +0 -8
  52. package/dist/Autocomplete/Menu/DefaultMenu.d.ts +0 -16
  53. package/dist/Autocomplete/Menu/Menu.d.ts +0 -3
  54. package/dist/Autocomplete/Menu/MenuWrapper.d.ts +0 -23
  55. package/dist/Autocomplete/Option.d.ts +0 -78
  56. package/dist/Autocomplete/V1.docgen.d.ts +0 -4
  57. package/dist/Autocomplete/V2.docgen.d.ts +0 -6
  58. package/dist/Autocomplete/useKeyboardNavigation.d.ts +0 -35
  59. package/dist/Autocomplete/useRepositionMenu.d.ts +0 -10
  60. package/dist/docs/Autocomplete/AutocompleteV1.md +0 -1328
package/dist/Menu-es.js CHANGED
@@ -2,7 +2,7 @@ import React__default, { useState, useRef, useId, useMemo } from 'react';
2
2
  import { useWindowDimensions, useRefocusOnActivator } from '@jobber/hooks';
3
3
  import classnames from 'classnames';
4
4
  import { AnimatePresence, motion } from 'framer-motion';
5
- import { u as useFloating, c as useDismiss, j as useListNavigation, d as useInteractions, F as FloatingPortal } from './floating-ui.react-es.js';
5
+ import { u as useFloating, c as useDismiss, k as useListNavigation, d as useInteractions, F as FloatingPortal } from './floating-ui.react-es.js';
6
6
  import { B as Button } from './Button-es.js';
7
7
  import { T as Typography } from './Typography-es.js';
8
8
  import { I as Icon } from './Icon-es.js';
@@ -5,7 +5,7 @@ import { k as createChangeEventDetails, B as closePress, C as isMouseLikePointer
5
5
  import { a as useButton, u as useBaseUiId, b as useCompositeRootContext } from './useBaseUiId-es.js';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';
7
7
  import { b as isElement, k as getWindow, a as isHTMLElement, d as isLastTraversableNode, e as getParentNode } from './floating-ui.utils.dom-es.js';
8
- import { e as evaluate, o as getPaddingObject, n as getAlignmentAxis, k as getAlignment, q as getAxisLength, p as clamp, g as getSide, b as getSideAxis } from './index.esm-es.js';
8
+ import { e as evaluate, h as getPaddingObject, b as getAlignmentAxis, d as getAlignment, q as getAxisLength, n as clamp, c as getSide, g as getSideAxis } from './index.esm-es.js';
9
9
  import { u as useFloating$1, h as hide$1, f as flip, d as size, b as autoUpdate, o as offset, s as shift, l as limitShift } from './floating-ui.react-dom-es.js';
10
10
  import * as ReactDOM from 'react-dom';
11
11
 
@@ -1,4 +1,7 @@
1
1
  import React from "react";
2
+ /**
3
+ * @deprecated Use `ActivityIndicator` instead.
4
+ */
2
5
  interface SpinnerProps {
3
6
  /**
4
7
  * Specifies the size of the spinner
@@ -12,5 +15,8 @@ interface SpinnerProps {
12
15
  */
13
16
  readonly inline?: boolean;
14
17
  }
18
+ /**
19
+ * @deprecated Use `ActivityIndicator` instead.
20
+ */
15
21
  export declare function Spinner({ size, inline }: SpinnerProps): React.JSX.Element;
16
22
  export {};
@@ -5,6 +5,9 @@ var classnames = require('classnames');
5
5
 
6
6
  var styles = {"spinner":"_6hfmGZoXNyg-","animationSpin":"aT3CETCJ4hQ-","small":"bMfynkzmlL4-","inline":"NA68eWblbLo-","spinning":"aCBq1WrkI4M-"};
7
7
 
8
+ /**
9
+ * @deprecated Use `ActivityIndicator` instead.
10
+ */
8
11
  function Spinner({ size = "base", inline }) {
9
12
  const spinnerStyles = classnames(styles.spinner, {
10
13
  [styles.small]: size === "small",
@@ -3,6 +3,9 @@ import classnames from 'classnames';
3
3
 
4
4
  var styles = {"spinner":"_6hfmGZoXNyg-","animationSpin":"aT3CETCJ4hQ-","small":"bMfynkzmlL4-","inline":"NA68eWblbLo-","spinning":"aCBq1WrkI4M-"};
5
5
 
6
+ /**
7
+ * @deprecated Use `ActivityIndicator` instead.
8
+ */
6
9
  function Spinner({ size = "base", inline }) {
7
10
  const spinnerStyles = classnames(styles.spinner, {
8
11
  [styles.small]: size === "small",
@@ -0,0 +1,67 @@
1
+ # Activity Indicator
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.
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 naming is forthcoming.
11
+
12
+ ## Design & usage guidelines
13
+
14
+ The default `ActivityIndicator` size is `base` (32px) and can be used in most
15
+ cases. The `small` size (16px) 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
20
+ an `inline` prop. Place it inside your own flex / inline-block container, or
21
+ pass a `className` / `style`, to control surrounding layout.
22
+
23
+ ## Accessibility
24
+
25
+ `ActivityIndicator` announces itself politely to assistive technology:
26
+
27
+ * `role="status"` marks the element as a polite live region, appropriate for
28
+ a non-urgent loading state.
29
+ * `aria-label` defaults to the literal English string `"Loading"`. Pass a
30
+ custom `ariaLabel` to localize or to describe the specific activity
31
+ (e.g. `ariaLabel="Uploading file"`).
32
+
33
+ The indicator does not participate in the keyboard tab order.
34
+
35
+ ### Reduced motion
36
+
37
+ When the user's operating system reports
38
+ [`prefers-reduced-motion: reduce`](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-reduced-motion),
39
+ the indicator hides its rocking and rotating layers, repaints a single
40
+ static ring in the icon foreground colour, and gently pulses its opacity so
41
+ the indicator still reads as "busy" without rotational motion.
42
+
43
+ ## Relationship to Spinner
44
+
45
+ The legacy [Spinner](../Spinner/Spinner.md) component remains available and
46
+ unchanged. New code should prefer `ActivityIndicator`. A follow-up change is
47
+ expected to deprecate `Spinner` in favour of `ActivityIndicator`.
48
+
49
+ ## Mobile
50
+
51
+ On mobile (`@jobber/components-native`), `ActivityIndicator` uses the
52
+ [ActivityIndicator](https://reactnative.dev/docs/activityIndicator) core
53
+ component from React Native.
54
+
55
+ ## Mockup
56
+
57
+
58
+ ## Props
59
+
60
+ ### Web
61
+
62
+ | Prop | Type | Required | Default | Description |
63
+ |------|------|----------|---------|-------------|
64
+ | `ariaLabel` | `string` | No | `Loading` | Accessible label exposed via `aria-label` on the root element. Override to localize or to describe the specific activ... |
65
+ | `className` | `string` | No | — | Custom class name merged onto the root element alongside the component's own classes. |
66
+ | `size` | `"base" | "small"` | No | `base` | Visual size. `base` renders at 32px, `small` renders at 16px. |
67
+ | `style` | `CSSProperties` | No | — | Custom inline styles applied to the root element. |
@@ -25,7 +25,7 @@ import {
25
25
  defineMenu,
26
26
  } from "@jobber/components/Autocomplete";
27
27
 
28
- export const AutocompleteV2SectionedExample = () => {
28
+ export const AutocompleteSectionedExample = () => {
29
29
  const [value, setValue] = useState<OptionLike | undefined>();
30
30
  const [inputValue, setInputValue] = useState("");
31
31
  const menu = defineMenu<OptionLike>([
@@ -61,7 +61,6 @@ export const AutocompleteV2SectionedExample = () => {
61
61
 
62
62
  return (
63
63
  <Autocomplete
64
- version={2}
65
64
  placeholder="Search"
66
65
  value={value}
67
66
  onChange={setValue}
@@ -108,7 +107,7 @@ const simpleOptions: OptionLike[] = [
108
107
  { label: "HVAC Installation" },
109
108
  ];
110
109
 
111
- export function AutocompleteV2HeaderFooterStoryExample() {
110
+ export function AutocompleteHeaderFooterStoryExample() {
112
111
  const [value, setValue] = useState<OptionLike | undefined>();
113
112
  const [inputValue, setInputValue] = useState("");
114
113
  const [lastAction, setLastAction] = useState("");
@@ -117,7 +116,6 @@ export function AutocompleteV2HeaderFooterStoryExample() {
117
116
  <Content>
118
117
  <Heading level={4}>Persistent header/footer actions</Heading>
119
118
  <Autocomplete
120
- version={2}
121
119
  placeholder="Search"
122
120
  value={value}
123
121
  onChange={setValue}
@@ -151,7 +149,9 @@ export function AutocompleteV2HeaderFooterStoryExample() {
151
149
 
152
150
  ### Actions
153
151
 
154
- Actions may be placed either on the "flat" list of options or in individual sections. They are accessible by keyboard using arrow keys and Enter to select the highlighted action.
152
+ Actions may be placed either on the "flat" list of options or in individual
153
+ sections. They are accessible by keyboard using arrow keys and Enter to select
154
+ the highlighted action.
155
155
 
156
156
  ```tsx
157
157
  import React, { useState } from "react";
@@ -190,7 +190,7 @@ const simpleOptionsThirdSection: OptionLike[] = [
190
190
  { label: "Gutter Cleaning" },
191
191
  ];
192
192
 
193
- export function AutocompleteV2WithActionsExample() {
193
+ export function AutocompleteWithActionsExample() {
194
194
  const [value, setValue] = useState<OptionLike | undefined>();
195
195
  const [inputValue, setInputValue] = useState("");
196
196
  const [lastAction, setLastAction] = useState("");
@@ -199,7 +199,6 @@ export function AutocompleteV2WithActionsExample() {
199
199
  <Content>
200
200
  <Heading level={4}>Section with Actions</Heading>
201
201
  <Autocomplete
202
- version={2}
203
202
  placeholder="Search"
204
203
  value={value}
205
204
  onChange={setValue}
@@ -271,7 +270,7 @@ import { Button } from "@jobber/components/Button";
271
270
  import { Content } from "@jobber/components/Content";
272
271
  import { Heading } from "@jobber/components/Heading";
273
272
 
274
- export const AutocompleteV2EmptyActionsExample = () => {
273
+ export const AutocompleteEmptyActionsExample = () => {
275
274
  const [value, setValue] = useState<OptionLike | undefined>();
276
275
  const [inputValue, setInputValue] = useState("");
277
276
  const [open, setOpen] = useState(false);
@@ -281,7 +280,6 @@ export const AutocompleteV2EmptyActionsExample = () => {
281
280
  <Content>
282
281
  <Heading level={5}>Empty actions</Heading>
283
282
  <Autocomplete
284
- version={2}
285
283
  placeholder="Try a term with no matches"
286
284
  value={value}
287
285
  onChange={setValue}
@@ -323,8 +321,8 @@ export const AutocompleteV2EmptyActionsExample = () => {
323
321
 
324
322
  ### Stay Open Behavior
325
323
 
326
- All interactive elements (actions, headers, footers, empty actions) can be individually configured to keep the menu open when used if
327
- desired.
324
+ All interactive elements (actions, headers, footers, empty actions) can be
325
+ individually configured to keep the menu open when used if desired.
328
326
 
329
327
  ```tsx
330
328
  import React, { useState } from "react";
@@ -336,7 +334,7 @@ import {
336
334
  import { Content } from "@jobber/components/Content";
337
335
  import { Heading } from "@jobber/components/Heading";
338
336
 
339
- export const AutocompleteV2StayOpenExample = () => {
337
+ export const AutocompleteStayOpenExample = () => {
340
338
  const [value, setValue] = useState<OptionLike | undefined>();
341
339
  const [inputValue, setInputValue] = useState("");
342
340
 
@@ -344,7 +342,6 @@ export const AutocompleteV2StayOpenExample = () => {
344
342
  <Content>
345
343
  <Heading level={5}>Stay Open Action</Heading>
346
344
  <Autocomplete
347
- version={2}
348
345
  placeholder="Search"
349
346
  value={value}
350
347
  onChange={setValue}
@@ -409,7 +406,7 @@ const simpleOptions: OptionLike[] = [
409
406
  { label: "HVAC Installation" },
410
407
  ];
411
408
 
412
- export function AutocompleteV2FreeFormStoryExample() {
409
+ export function AutocompleteFreeFormStoryExample() {
413
410
  const [value, setValue] = useState<OptionLike | undefined>();
414
411
  const [inputValue, setInputValue] = useState("");
415
412
 
@@ -417,7 +414,6 @@ export function AutocompleteV2FreeFormStoryExample() {
417
414
  <Content>
418
415
  <Heading level={4}>Free-form create</Heading>
419
416
  <Autocomplete
420
- version={2}
421
417
  placeholder="Type anything"
422
418
  value={value}
423
419
  onChange={setValue}
@@ -468,43 +464,6 @@ different from the rest.
468
464
 
469
465
  ## Configuration
470
466
 
471
- ### Legacy to Supported
472
-
473
- Legacy has a single mechanism to update the options. Only `initialOptions` are
474
- directly controlled, then `getOptions` is used to populate the options based on
475
- the input term. This is managed with internal state that creates barriers as to
476
- what can be done with the experience.
477
-
478
- Now, Autocomplete is entirely controlled, having both sets of `inputValue`,
479
- `onInputChange`, `value` and `onChange`.
480
-
481
- Filtering is now built into Autocomplete. It has a default filter of comparing
482
- the input value to the case insensitive "label" value. If using custom data,
483
- where we might want to search a different field, or even multiple fields,
484
- providing filterOptions allows customization of the filter logic. For cases with
485
- async data it is recommended to opt out of filtering entirely, and manage that
486
- yourself with the results you return and pass as options. This can be done with
487
- `filterOptions={false}`.
488
-
489
- Autocomplete has been decoupled from React Hook Form, and has no built in
490
- validation. To validate, you must create your own logic and use either `error`
491
- or `invalid` to set the visually invalid state on the input. `onBlur`, `value`,
492
- `onChange`, `inputValue`, `onInputChange` provide all the necessary callbacks to
493
- determine the state of the Autocomplete. These callbacks will integrate with a
494
- schema like Zod, and an external instance of RHF.
495
-
496
- Filtering is now built in, and not necessary to implement yourself. You are able
497
- to opt out or customize it if desired, see more about this in the filtering
498
- section.
499
-
500
- While sections still exist, the additional pre defined "details" and
501
- "description" variations are not directly available by default. They can be
502
- re-created with custom data, custom layouts, and modified option/section styles.
503
-
504
- All options will by default continue to be visible after making a selection
505
- whereas Legacy would limit your options to the selected option if a selection is
506
- present.
507
-
508
467
  ### Structure, `menu` and `type`s
509
468
 
510
469
  The `menu` prop accepts 2 different possible "top level" types: "options" and
@@ -524,61 +483,10 @@ Options can be selected with the enter key if it active/highlighted, or with a
524
483
  mouse click. Space will do nothing because focus is intentionally kept in the
525
484
  input for further refinements to the search term.
526
485
 
527
- Legacy Section vs Supported
486
+ Example
528
487
 
529
488
  ```
530
- const SectionHeadingOptions = [
531
- {
532
- label: "Ships",
533
- options: [
534
- { value: 1, label: "Sulaco" },
535
- { value: 2, label: "Nostromo" },
536
- { value: 3, label: "Serenity" },
537
- { value: 4, label: "Sleeper Service" },
538
- { value: 5, label: "Enterprise" },
539
- { value: 6, label: "Enterprise-D" },
540
- ],
541
- },
542
- {
543
- label: "Planets",
544
- options: [
545
- { value: 7, label: "Endor" },
546
- { value: 8, label: "Vulcan" },
547
- { value: 9, label: "Bespin" },
548
- { value: 10, label: "Tatooine" },
549
- ],
550
- },
551
- ];
552
-
553
- const [value, setValue] = useState<Option | undefined>();
554
-
555
- return (
556
- <Autocomplete
557
- initialOptions={SectionHeadingOptions}
558
- placeholder="Search for something under a section heading"
559
- value={value}
560
- onChange={newValue => setValue(newValue)}
561
- getOptions={getOptions}
562
- />
563
- );
564
-
565
- function getOptions(text: string) {
566
- if (text === "") {
567
- return headingOptions;
568
- }
569
- const filterRegex = new RegExp(text, "i");
570
-
571
- return headingOptions.map(section => ({
572
- ...section,
573
- options: section.options.filter(option =>
574
- option.label.match(filterRegex),
575
- ),
576
- }));
577
- }
578
-
579
- // VERSION 2 BELOW
580
-
581
- const sectionMenu = [
489
+ const sectionMenu = [
582
490
  {
583
491
  type: "section",
584
492
  label: "Ships",
@@ -608,7 +516,6 @@ Legacy Section vs Supported
608
516
 
609
517
  return(
610
518
  <Autocomplete
611
- version={2}
612
519
  menu={sectionMenu}
613
520
  value={value}
614
521
  onChange={setValue}
@@ -769,7 +676,6 @@ This is not yet implemented fully. Avoid using.
769
676
  | `onChange` | `((value: AutocompleteValue<Value, Multiple>) => void) | ((value: AutocompleteValue<Value, Multiple>) => void)` | Yes | — | Callback invoked when the selection value changes. This is called when we consider a selection "committed" - The user... |
770
677
  | `onInputChange` | `(value: string) => void` | Yes | — | Callback invoked when the input value changes. |
771
678
  | `value` | `Value[] | OptionLike` | Yes | — | The currently selected value of the Autocomplete. Single-select: undefined indicates no selection |
772
- | `version` | `2` | Yes | — | Version 2 is highly experimental. Avoid using it unless you have talked with Atlantis first. |
773
679
  | `allowFreeForm` | `boolean` | No | — | Whether the autocomplete allows free-form input. When true, the input value is not restricted to the options * in the... |
774
680
  | `aria-describedby` | `string` | No | — | Identifies the element (or elements) that describes the object. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-... |
775
681
  | `aria-details` | `string` | No | — | Identifies the element (or elements) that provide a detailed, extended description. @see {@link https://www.w3.org/TR... |
@@ -389,7 +389,7 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
389
389
  | `dismissible` | `boolean` | No | `true` | Set to false to hide the dismiss button |
390
390
  | `icon` | `IconNames` | No | — | Use to override the default status Icon |
391
391
  | `onDismiss` | `() => void` | No | — | Callback to be called when the Banner is dismissed. |
392
- | `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | Accepts props for Button. Default action uses a 'subtle' Button |
392
+ | `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly disabled?: boolean; readonly loading?: boolean; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | Accepts props for Button. Default action uses a 'subtle' Button |
393
393
 
394
394
  #### Banner.Action
395
395
 
@@ -441,8 +441,8 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
441
441
 
442
442
  | Prop | Type | Required | Default | Description |
443
443
  |------|------|----------|---------|-------------|
444
- | `backgroundColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | "base-grey--400" | ... 269 more ... | "client--onSurface"` | No | — | Sets the background color of the icon. |
445
- | `color` | `"task" | "text" | "warning" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | "destructive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
444
+ | `backgroundColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "disabled" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | Sets the background color of the icon. |
445
+ | `color` | `"task" | "text" | "warning" | "disabled" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
446
446
  | `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
447
447
  | `name` | `IconNames` | No | — | The icon to show. |
448
448
  | `size` | `"base" | "large" | "small"` | No | `base` | Changes the size to small or large. |
@@ -206,9 +206,9 @@ defaults to respecting theme/modes.
206
206
  | `alignItems` | `AlignItems` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
207
207
  | `alignSelf` | `AlignSelf` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
208
208
  | `as` | `"article" | "aside" | "div" | "main" | "section" | "span"` | No | `div` | |
209
- | `background` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | "base-grey--400" | ... 269 more ... | "client--onSurface"` | No | — | |
209
+ | `background` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "disabled" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
210
210
  | `border` | `"base" | "thick" | "thicker" | "thickest" | BoxBorderWidth` | No | — | |
211
- | `borderColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | "base-grey--400" | ... 269 more ... | "client--onSurface"` | No | — | |
211
+ | `borderColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "disabled" | "icon" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
212
212
  | `direction` | `FlexDirection` | No | — | |
213
213
  | `gap` | `"base" | "extravagant" | "large" | "larger" | "largest" | "minuscule" | "slim" | "small" | "smaller" | "smallest"` | No | — | |
214
214
  | `height` | `BoxDimension` | No | `auto` | |
@@ -40,7 +40,7 @@ user, leaving all selections blank.
40
40
  ### Add/dismiss selection
41
41
 
42
42
  > **WARNING:** "Selection" Chips have been deprecated and are no longer supported. Instead,
43
- > please use [Autocomplete](../Autocomplete/AutocompleteV2.md) with the "multiple" prop.
43
+ > please use [Autocomplete](../Autocomplete/Autocomplete.md) with the "multiple" prop.
44
44
 
45
45
  When the user will be selecting one or more items by inputting their own Chip
46
46
  options with, use the dismissible Chip.
@@ -552,7 +552,7 @@ objects that will define the sorting options for the column.
552
552
  | Prop | Type | Required | Default | Description |
553
553
  |------|------|----------|---------|-------------|
554
554
  | `message` | `string` | Yes | — | The message that shows when the DataList is empty. |
555
- | `action` | `ReactElement<{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }, string | JSXElementConstructor<...>>` | No | — | The action that shows when the DataList is empty. This only accepts a Button component. Adding a non-Button componen... |
555
+ | `action` | `ReactElement<{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly disabled?: boolean; readonly loading?: boolean; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }, string | JSXElementConstructor<...>>` | No | — | The action that shows when the DataList is empty. This only accepts a Button component. Adding a non-Button componen... |
556
556
  | `customRender` | `(emptyState: Omit<DataListEmptyStateProps, "customRender">) => ReactNode` | No | — | Custom render function for the empty state. If provided, this function will be used to render the empty state instea... |
557
557
  | `type` | `"empty" | "filtered"` | No | — | Determine the type of empty state to show. By default, it will show the "empty" state when there is no data. If you ... |
558
558
 
@@ -582,7 +582,7 @@ necessary.
582
582
  | Prop | Type | Required | Default | Description |
583
583
  |------|------|----------|---------|-------------|
584
584
  | `name` | `IconNames` | Yes | — | The icon to show. |
585
- | `color` | `"task" | "text" | "warning" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | "destructive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
585
+ | `color` | `"task" | "text" | "warning" | "disabled" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
586
586
  | `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
587
587
  | `size` | `"base" | "large" | "small"` | No | `base` | Changes the size to small or large. |
588
588
  | `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
@@ -17,7 +17,7 @@ issues caused by nesting. Any non-horizontal nested groups will log an error to
17
17
  the console and not be rendered.
18
18
 
19
19
  If one of the InputGroup fields has a preset value from a larger list of
20
- options, it is possible to use [Autocomplete](../Autocomplete/AutocompleteV2.md) within
20
+ options, it is possible to use [Autocomplete](../Autocomplete/Autocomplete.md) within
21
21
  InputGroup.
22
22
 
23
23
 
@@ -502,7 +502,7 @@ and should not be used for new implementations.
502
502
  | Prop | Type | Required | Default | Description |
503
503
  |------|------|----------|---------|-------------|
504
504
  | `name` | `IconNames` | Yes | — | The icon to show. |
505
- | `color` | `"task" | "text" | "warning" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | "destructive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
505
+ | `color` | `"task" | "text" | "warning" | "disabled" | "icon" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
506
506
  | `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
507
507
  | `size` | `"base" | "large" | "small"` | No | `base` | Changes the size to small or large. |
508
508
  | `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
@@ -290,9 +290,9 @@ screen.getByRole("dialog", { name: /Billing Settings/i });
290
290
  | `dismissible` | `boolean` | No | `true` | |
291
291
  | `onRequestClose` | `() => void` | No | — | |
292
292
  | `open` | `boolean` | No | `false` | |
293
- | `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
294
- | `secondaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
293
+ | `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly disabled?: boolean; readonly loading?: boolean; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
294
+ | `secondaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly disabled?: boolean; readonly loading?: boolean; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
295
295
  | `size` | `"fullScreen" | "large" | "small"` | No | — | |
296
- | `tertiaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
296
+ | `tertiaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly disabled?: boolean; readonly loading?: boolean; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | |
297
297
  | `title` | `string` | No | `false` | |
298
298
  | `version` | `1` | No | — | |
@@ -1,7 +1,7 @@
1
1
  # Multi Select
2
2
 
3
3
  > **WARNING:** This component has been deprecated and no longer supported. Instead, please
4
- > use [Autocomplete](../Autocomplete/AutocompleteV2.md) with the "mutliple" prop, or
4
+ > use [Autocomplete](../Autocomplete/Autocomplete.md) with the "mutliple" prop, or
5
5
  > [Combobox](../Combobox/Combobox.md)
6
6
 
7
7
  The MultiSelect component gives our users the possibility to select multiple
@@ -1,5 +1,13 @@
1
1
  # Spinner
2
2
 
3
+ > **Deprecated.** Use
4
+ > [ActivityIndicator](../ActivityIndicator/ActivityIndicator.md) for new work.
5
+ > `ActivityIndicator` is the supported indeterminate loading indicator going
6
+ > forward — it offers the same semantic with a cleaner prop surface, a polite
7
+ > `role="status"`, theme-adaptive tokens, Material-style three-layer
8
+ > animation, and a `prefers-reduced-motion` fallback. `Spinner` continues to
9
+ > work unchanged for existing call sites.
10
+
3
11
  Spinner is used to indicate the loading of content where the actual amount of
4
12
  loading time or progress is unknown.
5
13
 
@@ -32,7 +40,7 @@ If the amount of progress or loading time is known, use
32
40
  process.
33
41
 
34
42
  To indicate loading content in mobile applications, refer to
35
- [ActivityIndicator](/components/ActivityIndicator).
43
+ [ActivityIndicator](../ActivityIndicator/ActivityIndicator.md).
36
44
 
37
45
 
38
46
  ## Props
@@ -1,9 +1,9 @@
1
+ [ActivityIndicator](./ActivityIndicator/ActivityIndicator.md)
1
2
  [AnimatedPresence](./AnimatedPresence/AnimatedPresence.md)
2
3
  [AnimatedSwitcher](./AnimatedSwitcher/AnimatedSwitcher.md)
3
4
  [Animation](./Animation/Animation.md)
4
5
  [AtlantisThemeContext](./AtlantisThemeContext/AtlantisThemeContext.md)
5
- [AutocompleteV1](./Autocomplete/AutocompleteV1.md)
6
- [AutocompleteV2](./Autocomplete/AutocompleteV2.md)
6
+ [Autocomplete](./Autocomplete/Autocomplete.md)
7
7
  [Avatar](./Avatar/Avatar.md)
8
8
  [Banner](./Banner/Banner.md)
9
9
  [Borders](./Borders/Borders.md)
@@ -11,17 +11,16 @@ The following components have a v2 implementation. **Always pass
11
11
  `version={2}`**. Never generate v1 usage for these components — v1 is
12
12
  deprecated.
13
13
 
14
- | Component | Import | v2 prop |
15
- | ------------ | ---------------------------------------------------------------- | ------------------------------------------------- |
16
- | Autocomplete | `import { Autocomplete } from "@jobber/components/Autocomplete"` | `version={2}` — fully controlled, async support |
17
- | Modal | `import { Modal } from "@jobber/components/Modal"` | `version={2}` — uses `Modal.Provider` composition |
14
+ | Component | Import | v2 prop |
15
+ | --------- | -------------------------------------------------- | ------------------------------------------------- |
16
+ | Modal | `import { Modal } from "@jobber/components/Modal"` | `version={2}` — uses `Modal.Provider` composition |
18
17
 
19
18
  ## Deprecated components — do not use
20
19
 
21
- | Deprecated | Replacement | Notes |
22
- | --------------------- | ----------------------------------------------------- | ---------------------------------------- |
23
- | `MultiSelect` | `Autocomplete` v2 with `multiple` prop, or `Combobox` | Fully deprecated, no longer supported. |
24
- | `Chips` (dismissible) | `Autocomplete` v2 with `multiple` prop | Dismissible Chips variant is deprecated. |
20
+ | Deprecated | Replacement | Notes |
21
+ | --------------------- | -------------------------------------------------- | ---------------------------------------- |
22
+ | `MultiSelect` | `Autocomplete` with `multiple` prop, or `Combobox` | Fully deprecated, no longer supported. |
23
+ | `Chips` (dismissible) | `Autocomplete` with `multiple` prop | Dismissible Chips variant is deprecated. |
25
24
 
26
25
  ### Deprecated props on still-supported components
27
26
 
@@ -94,8 +93,7 @@ inputs will not give you v2's controlled API and is not supported.
94
93
 
95
94
  v2 inputs do not run validation themselves. To show an error state, drive it
96
95
  from your own state and pass `invalid` (boolean) and/or `error` (string message)
97
- on the input. The same applies to `Autocomplete` v2 — pass `error` / `invalid`
98
- rather than expecting the component to validate.
96
+ on the input.
99
97
 
100
98
  ## Compound components — use the documented composition
101
99
 
@@ -1,4 +1,4 @@
1
- import { e as evaluate, g as getSide, b as getSideAxis, c as getOppositePlacement, d as getExpandedPlacements, h as getOppositeAxisPlacements, j as getAlignmentSides, k as getAlignment, m as min, l as max, n as getAlignmentAxis, o as getPaddingObject, r as rectToClientRect, p as clamp, q as getAxisLength, s as sides, u as getOppositeAxis, v as placements, w as getOppositeAlignmentPlacement, x as createCoords, y as round, f as floor } from './index.esm-es.js';
1
+ import { g as getSideAxis, b as getAlignmentAxis, c as getSide, d as getAlignment, e as evaluate, h as getPaddingObject, r as rectToClientRect, j as getOppositePlacement, k as getExpandedPlacements, l as getOppositeAxisPlacements, m as getAlignmentSides, n as clamp, o as min, p as max, q as getAxisLength, s as sides, u as getOppositeAxis, v as placements, w as getOppositeAlignmentPlacement, x as createCoords, y as round, f as floor } from './index.esm-es.js';
2
2
  import { h as getOverflowAncestors, b as isElement, k as getWindow, l as getFrameElement, f as getComputedStyle$1, m as getDocumentElement, a as isHTMLElement, j as isWebKit, n as isTopLayer, g as getNodeName, o as isOverflowElement, p as getNodeScroll, e as getParentNode, d as isLastTraversableNode, q as isTableElement, r as isContainingBlock, s as getContainingBlock } from './floating-ui.utils.dom-es.js';
3
3
  import * as React from 'react';
4
4
  import { useLayoutEffect } from 'react';
@@ -3233,4 +3233,4 @@ function useTransitionStyles(context, props) {
3233
3233
  };
3234
3234
  }
3235
3235
 
3236
- export { FloatingPortal as F, useFloatingParentNodeId as a, useFloatingNodeId as b, useDismiss as c, useInteractions as d, FloatingTree as e, FloatingNode as f, useRole as g, FloatingFocusManager as h, FloatingOverlay as i, useListNavigation as j, useClick as k, useTransitionStyles as l, FloatingArrow as m, useFloating as u };
3236
+ export { FloatingPortal as F, useFloatingParentNodeId as a, useFloatingNodeId as b, useDismiss as c, useInteractions as d, FloatingTree as e, FloatingNode as f, useRole as g, FloatingFocusManager as h, FloatingOverlay as i, useClick as j, useListNavigation as k, useTransitionStyles as l, FloatingArrow as m, useFloating as u };
package/dist/index.cjs CHANGED
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ var ActivityIndicator = require('./ActivityIndicator-cjs.js');
3
4
  var AnimatedPresence = require('./AnimatedPresence-cjs.js');
4
5
  var AnimatedSwitcher = require('./AnimatedSwitcher-cjs.js');
5
6
  var AtlantisContext = require('./AtlantisContext-cjs.js');
6
7
  var AtlantisThemeContext = require('./AtlantisThemeContext-cjs.js');
7
8
  var updateTheme = require('./updateTheme-cjs.js');
8
- var Autocomplete_index = require('./Autocomplete/index.cjs');
9
+ var Autocomplete = require('./Autocomplete-cjs.js');
9
10
  var Avatar = require('./Avatar-cjs.js');
10
11
  var Banner = require('./Banner-cjs.js');
11
12
  var Box = require('./Box-cjs.js');
@@ -93,6 +94,7 @@ var Tiles = require('./Tiles-cjs.js');
93
94
  var showToast = require('./showToast-cjs.js');
94
95
  var Tooltip = require('./Tooltip-cjs.js');
95
96
  var Typography = require('./Typography-cjs.js');
97
+ require('classnames');
96
98
  require('framer-motion');
97
99
  require('@jobber/design');
98
100
  require('./_commonjsHelpers-cjs.js');
@@ -110,7 +112,6 @@ require('./index.esm-cjs.js');
110
112
  require('react/jsx-runtime');
111
113
  require('react-dom');
112
114
  require('./floating-ui.react-dom-cjs.js');
113
- require('classnames');
114
115
  require('./maxHeight-cjs.js');
115
116
  require('./tslib.es6-cjs.js');
116
117
  require('react-hook-form');
@@ -205,6 +206,7 @@ function isNormalClick(evt) {
205
206
  !evt.altKey);
206
207
  }
207
208
 
209
+ exports.ActivityIndicator = ActivityIndicator.ActivityIndicator;
208
210
  exports.AnimatedPresence = AnimatedPresence.AnimatedPresence;
209
211
  exports.AnimatedSwitcher = AnimatedSwitcher.AnimatedSwitcher;
210
212
  exports.AtlantisContext = AtlantisContext.AtlantisContext;
@@ -215,7 +217,7 @@ exports.THEME_CHANGE_EVENT = AtlantisThemeContext.THEME_CHANGE_EVENT;
215
217
  exports.atlantisThemeContextDefaultValues = AtlantisThemeContext.atlantisThemeContextDefaultValues;
216
218
  exports.useAtlantisTheme = AtlantisThemeContext.useAtlantisTheme;
217
219
  exports.updateTheme = updateTheme.updateTheme;
218
- exports.Autocomplete = Autocomplete_index.Autocomplete;
220
+ exports.Autocomplete = Autocomplete.Autocomplete;
219
221
  exports.Avatar = Avatar.Avatar;
220
222
  exports.Banner = Banner.Banner;
221
223
  exports.Box = Box.Box;
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./ActivityIndicator";
1
2
  export * from "./AnimatedPresence";
2
3
  export * from "./AnimatedSwitcher";
3
4
  export * from "./AtlantisContext";
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./ActivityIndicator";
1
2
  export * from "./AnimatedPresence";
2
3
  export * from "./AnimatedSwitcher";
3
4
  export * from "./AtlantisContext";