@jobber/components 9.0.0 → 9.1.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 (70) hide show
  1. package/dist/Autocomplete/Autocomplete.messages.d.ts +10 -0
  2. package/dist/Autocomplete/index.cjs +2 -0
  3. package/dist/Autocomplete/index.mjs +2 -0
  4. package/dist/Autocomplete-cjs.js +16 -3
  5. package/dist/Autocomplete-es.js +17 -4
  6. package/dist/Card/index.cjs +2 -0
  7. package/dist/Card/index.mjs +2 -0
  8. package/dist/Chip/index.cjs +2 -0
  9. package/dist/Chip/index.mjs +2 -0
  10. package/dist/Chip-cjs.js +19 -1
  11. package/dist/Chip-es.js +19 -2
  12. package/dist/Chips/Chips.messages.d.ts +14 -0
  13. package/dist/Chips/InternalChipDismissible/index.cjs +2 -0
  14. package/dist/Chips/InternalChipDismissible/index.mjs +2 -0
  15. package/dist/Chips/index.cjs +2 -0
  16. package/dist/Chips/index.mjs +2 -0
  17. package/dist/DataDump/index.cjs +2 -0
  18. package/dist/DataDump/index.mjs +2 -0
  19. package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +2 -0
  20. package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +2 -0
  21. package/dist/DataList/components/DataListFilters/index.cjs +2 -0
  22. package/dist/DataList/components/DataListFilters/index.mjs +2 -0
  23. package/dist/DataList/components/DataListSearch/index.cjs +2 -0
  24. package/dist/DataList/components/DataListSearch/index.mjs +2 -0
  25. package/dist/DataList/index.cjs +2 -0
  26. package/dist/DataList/index.mjs +2 -0
  27. package/dist/DataTable/index.cjs +2 -0
  28. package/dist/DataTable/index.mjs +2 -0
  29. package/dist/FilterPicker/components/FilterPickerActivator/index.cjs +2 -0
  30. package/dist/FilterPicker/components/FilterPickerActivator/index.mjs +2 -0
  31. package/dist/FilterPicker/components/FilterPickerTrigger/index.cjs +2 -0
  32. package/dist/FilterPicker/components/FilterPickerTrigger/index.mjs +2 -0
  33. package/dist/FilterPicker/index.cjs +2 -0
  34. package/dist/FilterPicker/index.mjs +2 -0
  35. package/dist/FormField/components/FormField.messages.d.ts +6 -0
  36. package/dist/FormField/index.cjs +2 -0
  37. package/dist/FormField/index.mjs +2 -0
  38. package/dist/FormFieldWrapper-cjs.js +10 -1
  39. package/dist/FormFieldWrapper-es.js +10 -1
  40. package/dist/InputAvatar/InputAvatar.messages.d.ts +10 -0
  41. package/dist/InputAvatar/index.cjs +2 -0
  42. package/dist/InputAvatar/index.mjs +2 -0
  43. package/dist/InputAvatar-cjs.js +15 -2
  44. package/dist/InputAvatar-es.js +15 -2
  45. package/dist/InputDate/index.cjs +1 -0
  46. package/dist/InputDate/index.mjs +1 -0
  47. package/dist/InputEmail/index.cjs +2 -0
  48. package/dist/InputEmail/index.mjs +2 -0
  49. package/dist/InputPhoneNumber/index.cjs +2 -0
  50. package/dist/InputPhoneNumber/index.mjs +2 -0
  51. package/dist/InputText/index.cjs +2 -0
  52. package/dist/InputText/index.mjs +2 -0
  53. package/dist/InputTime/index.cjs +2 -0
  54. package/dist/InputTime/index.mjs +2 -0
  55. package/dist/InternalChipDismissible-cjs.js +9 -5
  56. package/dist/InternalChipDismissible-es.js +10 -6
  57. package/dist/LegacySelect/index.cjs +2 -0
  58. package/dist/LegacySelect/index.mjs +2 -0
  59. package/dist/Menu/Menu.messages.d.ts +14 -0
  60. package/dist/Menu/index.cjs +2 -0
  61. package/dist/Menu/index.mjs +2 -0
  62. package/dist/Menu-cjs.js +20 -2
  63. package/dist/Menu-es.js +21 -3
  64. package/dist/Modal/index.mjs +1 -1
  65. package/dist/Page/index.cjs +2 -0
  66. package/dist/Page/index.mjs +2 -0
  67. package/dist/floating-ui.react-es.js +1 -1
  68. package/dist/index.cjs +1 -1
  69. package/dist/index.mjs +1 -1
  70. package/package.json +2 -2
@@ -2,6 +2,7 @@
2
2
 
3
3
  var tslib_es6 = require('./tslib.es6-cjs.js');
4
4
  var React = require('react');
5
+ var useAtlantisI18n = require('./useAtlantisI18n-cjs.js');
5
6
  var Avatar = require('./Avatar-cjs.js');
6
7
  var InputFile = require('./InputFile-cjs.js');
7
8
  var ProgressBar = require('./ProgressBar-cjs.js');
@@ -10,17 +11,29 @@ require('classnames');
10
11
 
11
12
  var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-","spinning":"aeMMyPDHQho-"};
12
13
 
14
+ const inputAvatarMessages = useAtlantisI18n.defineMessages({
15
+ changeImage: {
16
+ en: "Change Image",
17
+ es: "Cambiar imagen",
18
+ },
19
+ remove: {
20
+ en: "Remove",
21
+ es: "Eliminar",
22
+ },
23
+ });
24
+
13
25
  function InputAvatar(_a) {
14
26
  var { getUploadParams, onUploadComplete, onChange } = _a, avatarProps = tslib_es6.__rest(_a, ["getUploadParams", "onUploadComplete", "onChange"]);
15
27
  const [progress, setProgress] = React.useState(1);
28
+ const { t } = useAtlantisI18n.useAtlantisI18n(inputAvatarMessages);
16
29
  return (React.createElement("div", { className: styles.inputAvatar },
17
30
  React.createElement("div", { className: styles.preview },
18
31
  React.createElement(Avatar.Avatar, Object.assign({ size: "large" }, avatarProps)),
19
32
  progress < 1 && (React.createElement(Overlay, null,
20
33
  React.createElement(Centered, null,
21
34
  React.createElement(ProgressBar.ProgressBar, { size: "small", currentStep: progress * 100, totalSteps: 100 }))))),
22
- React.createElement(InputFile.InputFile, { variation: "button", buttonLabel: avatarProps.imageUrl ? "Change Image" : undefined, size: "small", allowedTypes: "images", getUploadParams: getUploadParams, onUploadStart: handleChange, onUploadProgress: handleUpload, onUploadComplete: handleUploadComplete }),
23
- avatarProps.imageUrl != undefined && progress === 1 && (React.createElement(Button.Button, { label: "Remove", size: "small", type: "secondary", variation: "destructive", onClick: clearAvatar }))));
35
+ React.createElement(InputFile.InputFile, { variation: "button", buttonLabel: avatarProps.imageUrl ? t("changeImage") : undefined, size: "small", allowedTypes: "images", getUploadParams: getUploadParams, onUploadStart: handleChange, onUploadProgress: handleUpload, onUploadComplete: handleUploadComplete }),
36
+ avatarProps.imageUrl != undefined && progress === 1 && (React.createElement(Button.Button, { label: t("remove"), size: "small", type: "secondary", variation: "destructive", onClick: clearAvatar }))));
24
37
  function handleChange(newFile) {
25
38
  onChange && onChange(newFile);
26
39
  handleUpload(newFile);
@@ -1,5 +1,6 @@
1
1
  import { _ as __rest, a as __awaiter } from './tslib.es6-es.js';
2
2
  import React__default, { useState } from 'react';
3
+ import { d as defineMessages, u as useAtlantisI18n } from './useAtlantisI18n-es.js';
3
4
  import { A as Avatar } from './Avatar-es.js';
4
5
  import { I as InputFile } from './InputFile-es.js';
5
6
  import { P as ProgressBar } from './ProgressBar-es.js';
@@ -8,17 +9,29 @@ import 'classnames';
8
9
 
9
10
  var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-","spinning":"aeMMyPDHQho-"};
10
11
 
12
+ const inputAvatarMessages = defineMessages({
13
+ changeImage: {
14
+ en: "Change Image",
15
+ es: "Cambiar imagen",
16
+ },
17
+ remove: {
18
+ en: "Remove",
19
+ es: "Eliminar",
20
+ },
21
+ });
22
+
11
23
  function InputAvatar(_a) {
12
24
  var { getUploadParams, onUploadComplete, onChange } = _a, avatarProps = __rest(_a, ["getUploadParams", "onUploadComplete", "onChange"]);
13
25
  const [progress, setProgress] = useState(1);
26
+ const { t } = useAtlantisI18n(inputAvatarMessages);
14
27
  return (React__default.createElement("div", { className: styles.inputAvatar },
15
28
  React__default.createElement("div", { className: styles.preview },
16
29
  React__default.createElement(Avatar, Object.assign({ size: "large" }, avatarProps)),
17
30
  progress < 1 && (React__default.createElement(Overlay, null,
18
31
  React__default.createElement(Centered, null,
19
32
  React__default.createElement(ProgressBar, { size: "small", currentStep: progress * 100, totalSteps: 100 }))))),
20
- React__default.createElement(InputFile, { variation: "button", buttonLabel: avatarProps.imageUrl ? "Change Image" : undefined, size: "small", allowedTypes: "images", getUploadParams: getUploadParams, onUploadStart: handleChange, onUploadProgress: handleUpload, onUploadComplete: handleUploadComplete }),
21
- avatarProps.imageUrl != undefined && progress === 1 && (React__default.createElement(Button, { label: "Remove", size: "small", type: "secondary", variation: "destructive", onClick: clearAvatar }))));
33
+ React__default.createElement(InputFile, { variation: "button", buttonLabel: avatarProps.imageUrl ? t("changeImage") : undefined, size: "small", allowedTypes: "images", getUploadParams: getUploadParams, onUploadStart: handleChange, onUploadProgress: handleUpload, onUploadComplete: handleUploadComplete }),
34
+ avatarProps.imageUrl != undefined && progress === 1 && (React__default.createElement(Button, { label: t("remove"), size: "small", type: "secondary", variation: "destructive", onClick: clearAvatar }))));
22
35
  function handleChange(newFile) {
23
36
  onChange && onChange(newFile);
24
37
  handleUpload(newFile);
@@ -35,6 +35,7 @@ require('../useAtlantisFormFieldName-cjs.js');
35
35
  require('../FormFieldWrapper-cjs.js');
36
36
  require('framer-motion');
37
37
  require('../Text-cjs.js');
38
+ require('../useAtlantisI18n-cjs.js');
38
39
  require('../useFormFieldFocus-cjs.js');
39
40
  require('../InputValidation-cjs.js');
40
41
  require('../FormFieldPostFix-cjs.js');
@@ -33,6 +33,7 @@ import '../useAtlantisFormFieldName-es.js';
33
33
  import '../FormFieldWrapper-es.js';
34
34
  import 'framer-motion';
35
35
  import '../Text-es.js';
36
+ import '../useAtlantisI18n-es.js';
36
37
  import '../useFormFieldFocus-es.js';
37
38
  import '../InputValidation-es.js';
38
39
  import '../FormFieldPostFix-es.js';
@@ -14,6 +14,8 @@ require('react-router-dom');
14
14
  require('../Icon-cjs.js');
15
15
  require('../Typography-cjs.js');
16
16
  require('../Text-cjs.js');
17
+ require('../useAtlantisI18n-cjs.js');
18
+ require('../AtlantisContext-cjs.js');
17
19
  require('../useFormFieldFocus-cjs.js');
18
20
  require('../InputValidation-cjs.js');
19
21
  require('../FormFieldPostFix-cjs.js');
@@ -12,6 +12,8 @@ import 'react-router-dom';
12
12
  import '../Icon-es.js';
13
13
  import '../Typography-es.js';
14
14
  import '../Text-es.js';
15
+ import '../useAtlantisI18n-es.js';
16
+ import '../AtlantisContext-es.js';
15
17
  import '../useFormFieldFocus-es.js';
16
18
  import '../InputValidation-es.js';
17
19
  import '../FormFieldPostFix-es.js';
@@ -14,6 +14,8 @@ require('react-router-dom');
14
14
  require('../Icon-cjs.js');
15
15
  require('../Typography-cjs.js');
16
16
  require('../Text-cjs.js');
17
+ require('../useAtlantisI18n-cjs.js');
18
+ require('../AtlantisContext-cjs.js');
17
19
  require('../useFormFieldFocus-cjs.js');
18
20
  require('../InputValidation-cjs.js');
19
21
  require('../FormFieldPostFix-cjs.js');
@@ -12,6 +12,8 @@ import 'react-router-dom';
12
12
  import '../Icon-es.js';
13
13
  import '../Typography-es.js';
14
14
  import '../Text-es.js';
15
+ import '../useAtlantisI18n-es.js';
16
+ import '../AtlantisContext-es.js';
15
17
  import '../useFormFieldFocus-es.js';
16
18
  import '../InputValidation-es.js';
17
19
  import '../FormFieldPostFix-es.js';
@@ -14,6 +14,8 @@ require('react-router-dom');
14
14
  require('../Icon-cjs.js');
15
15
  require('../Typography-cjs.js');
16
16
  require('../Text-cjs.js');
17
+ require('../useAtlantisI18n-cjs.js');
18
+ require('../AtlantisContext-cjs.js');
17
19
  require('../useFormFieldFocus-cjs.js');
18
20
  require('../InputValidation-cjs.js');
19
21
  require('../FormFieldPostFix-cjs.js');
@@ -12,6 +12,8 @@ import 'react-router-dom';
12
12
  import '../Icon-es.js';
13
13
  import '../Typography-es.js';
14
14
  import '../Text-es.js';
15
+ import '../useAtlantisI18n-es.js';
16
+ import '../AtlantisContext-es.js';
15
17
  import '../useFormFieldFocus-es.js';
16
18
  import '../InputValidation-es.js';
17
19
  import '../FormFieldPostFix-es.js';
@@ -17,6 +17,8 @@ require('react-router-dom');
17
17
  require('../Icon-cjs.js');
18
18
  require('../Typography-cjs.js');
19
19
  require('../Text-cjs.js');
20
+ require('../useAtlantisI18n-cjs.js');
21
+ require('../AtlantisContext-cjs.js');
20
22
  require('../useFormFieldFocus-cjs.js');
21
23
  require('../InputValidation-cjs.js');
22
24
  require('../mergeRefs-cjs.js');
@@ -15,6 +15,8 @@ import 'react-router-dom';
15
15
  import '../Icon-es.js';
16
16
  import '../Typography-es.js';
17
17
  import '../Text-es.js';
18
+ import '../useAtlantisI18n-es.js';
19
+ import '../AtlantisContext-es.js';
18
20
  import '../useFormFieldFocus-es.js';
19
21
  import '../InputValidation-es.js';
20
22
  import '../mergeRefs-es.js';
@@ -10,6 +10,7 @@ var floatingUi_react = require('./floating-ui.react-cjs.js');
10
10
  var Text = require('./Text-cjs.js');
11
11
  var Button = require('./Button-cjs.js');
12
12
  var Spinner = require('./Spinner-cjs.js');
13
+ var useAtlantisI18n = require('./useAtlantisI18n-cjs.js');
13
14
  var Chip = require('./Chip-cjs.js');
14
15
  require('./tslib.es6-cjs.js');
15
16
 
@@ -21,8 +22,12 @@ function InternalChip({ label, active = false, disabled = false, invalid = false
21
22
 
22
23
  var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
23
24
 
25
+ function DefaultAddActivator({ ariaLabel, onClick, }) {
26
+ return (React.createElement(Button.Button, { icon: "add", type: "secondary", ariaLabel: ariaLabel, onClick: onClick }));
27
+ }
24
28
  function InternalChipDismissibleInput(props) {
25
- const { activator = React.createElement(Button.Button, { icon: "add", type: "secondary", ariaLabel: "Add" }), attachTo, isLoadingMore = false, onLoadMore, options, } = props;
29
+ const { t } = useAtlantisI18n.useAtlantisI18n(Chip.chipsMessages);
30
+ const { activator, attachTo, isLoadingMore = false, onLoadMore, options, } = props;
26
31
  const { activeIndex, allOptions, hasAvailableOptions, inputRef, menuId, menuOpen, searchValue, showInput, generateDescendantId, handleBlur, handleFocus, handleSearchChange, handleCancelBlur, handleEnableBlur, handleSetActiveOnMouseOver, handleKeyDown, handleSelectOption, handleShowInput, handleDebouncedSearch, } = useScrollToActive.useInternalChipDismissibleInput(props);
27
32
  const scrollableRef = useScrollToActive.useScrollToActive(activeIndex);
28
33
  const { ref: visibleChildRef, isInView } = useScrollToActive.useInView();
@@ -35,9 +40,8 @@ function InternalChipDismissibleInput(props) {
35
40
  isInView && onLoadMore && onLoadMore(searchValue);
36
41
  }, [isInView]);
37
42
  if (!showInput) {
38
- return React.cloneElement(activator, { onClick: handleShowInput });
43
+ return React.cloneElement(activator !== null && activator !== void 0 ? activator : React.createElement(DefaultAddActivator, { ariaLabel: t("add") }), { onClick: handleShowInput });
39
44
  }
40
- const shouldShowMenu = menuOpen && (hasAvailableOptions || isLoadingMore);
41
45
  const menuContent = (React.createElement("div", { ref: node => {
42
46
  setFloatingRef(node);
43
47
  scrollableRef.current = node;
@@ -51,8 +55,8 @@ function InternalChipDismissibleInput(props) {
51
55
  isLoadingMore && (React.createElement("div", { className: styles.loadingIndicator },
52
56
  React.createElement(Spinner.Spinner, { size: "small", inline: true })))));
53
57
  return (React.createElement(React.Fragment, null,
54
- React.createElement("input", { ref: inputRef, className: styles.input, type: "text", role: "combobox", "aria-label": "Press up and down arrow to cycle through the options or type to narrow down the results", "aria-autocomplete": "list", "aria-owns": menuId, "aria-expanded": shouldShowMenu, "aria-activedescendant": generateDescendantId(activeIndex), value: searchValue, onChange: handleSearchChange, onKeyDown: handleKeyDown, onBlur: () => setTimeout(handleBlur, 200), onFocus: handleFocus, autoFocus: true }),
55
- shouldShowMenu && React.createElement(floatingUi_react.FloatingPortal, null, menuContent)));
58
+ React.createElement("input", { ref: inputRef, className: styles.input, type: "text", role: "combobox", "aria-label": t("cycleOptions"), "aria-autocomplete": "list", "aria-owns": menuId, "aria-expanded": menuOpen && (hasAvailableOptions || isLoadingMore), "aria-activedescendant": generateDescendantId(activeIndex), value: searchValue, onChange: handleSearchChange, onKeyDown: handleKeyDown, onBlur: () => setTimeout(handleBlur, 200), onFocus: handleFocus, autoFocus: true }),
59
+ menuOpen && (hasAvailableOptions || isLoadingMore) && (React.createElement(floatingUi_react.FloatingPortal, null, menuContent))));
56
60
  }
57
61
 
58
62
  function InternalChipDismissible(props) {
@@ -8,7 +8,8 @@ import { F as FloatingPortal } from './floating-ui.react-es.js';
8
8
  import { T as Text } from './Text-es.js';
9
9
  import { B as Button } from './Button-es.js';
10
10
  import { S as Spinner } from './Spinner-es.js';
11
- import { C as Chip, I as InternalChipButton } from './Chip-es.js';
11
+ import { u as useAtlantisI18n } from './useAtlantisI18n-es.js';
12
+ import { C as Chip, c as chipsMessages, I as InternalChipButton } from './Chip-es.js';
12
13
  import './tslib.es6-es.js';
13
14
 
14
15
  function InternalChip({ label, active = false, disabled = false, invalid = false, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }) {
@@ -19,8 +20,12 @@ function InternalChip({ label, active = false, disabled = false, invalid = false
19
20
 
20
21
  var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
21
22
 
23
+ function DefaultAddActivator({ ariaLabel, onClick, }) {
24
+ return (React__default.createElement(Button, { icon: "add", type: "secondary", ariaLabel: ariaLabel, onClick: onClick }));
25
+ }
22
26
  function InternalChipDismissibleInput(props) {
23
- const { activator = React__default.createElement(Button, { icon: "add", type: "secondary", ariaLabel: "Add" }), attachTo, isLoadingMore = false, onLoadMore, options, } = props;
27
+ const { t } = useAtlantisI18n(chipsMessages);
28
+ const { activator, attachTo, isLoadingMore = false, onLoadMore, options, } = props;
24
29
  const { activeIndex, allOptions, hasAvailableOptions, inputRef, menuId, menuOpen, searchValue, showInput, generateDescendantId, handleBlur, handleFocus, handleSearchChange, handleCancelBlur, handleEnableBlur, handleSetActiveOnMouseOver, handleKeyDown, handleSelectOption, handleShowInput, handleDebouncedSearch, } = useInternalChipDismissibleInput(props);
25
30
  const scrollableRef = useScrollToActive(activeIndex);
26
31
  const { ref: visibleChildRef, isInView } = useInView();
@@ -33,9 +38,8 @@ function InternalChipDismissibleInput(props) {
33
38
  isInView && onLoadMore && onLoadMore(searchValue);
34
39
  }, [isInView]);
35
40
  if (!showInput) {
36
- return React__default.cloneElement(activator, { onClick: handleShowInput });
41
+ return React__default.cloneElement(activator !== null && activator !== void 0 ? activator : React__default.createElement(DefaultAddActivator, { ariaLabel: t("add") }), { onClick: handleShowInput });
37
42
  }
38
- const shouldShowMenu = menuOpen && (hasAvailableOptions || isLoadingMore);
39
43
  const menuContent = (React__default.createElement("div", { ref: node => {
40
44
  setFloatingRef(node);
41
45
  scrollableRef.current = node;
@@ -49,8 +53,8 @@ function InternalChipDismissibleInput(props) {
49
53
  isLoadingMore && (React__default.createElement("div", { className: styles.loadingIndicator },
50
54
  React__default.createElement(Spinner, { size: "small", inline: true })))));
51
55
  return (React__default.createElement(React__default.Fragment, null,
52
- React__default.createElement("input", { ref: inputRef, className: styles.input, type: "text", role: "combobox", "aria-label": "Press up and down arrow to cycle through the options or type to narrow down the results", "aria-autocomplete": "list", "aria-owns": menuId, "aria-expanded": shouldShowMenu, "aria-activedescendant": generateDescendantId(activeIndex), value: searchValue, onChange: handleSearchChange, onKeyDown: handleKeyDown, onBlur: () => setTimeout(handleBlur, 200), onFocus: handleFocus, autoFocus: true }),
53
- shouldShowMenu && React__default.createElement(FloatingPortal, null, menuContent)));
56
+ React__default.createElement("input", { ref: inputRef, className: styles.input, type: "text", role: "combobox", "aria-label": t("cycleOptions"), "aria-autocomplete": "list", "aria-owns": menuId, "aria-expanded": menuOpen && (hasAvailableOptions || isLoadingMore), "aria-activedescendant": generateDescendantId(activeIndex), value: searchValue, onChange: handleSearchChange, onKeyDown: handleKeyDown, onBlur: () => setTimeout(handleBlur, 200), onFocus: handleFocus, autoFocus: true }),
57
+ menuOpen && (hasAvailableOptions || isLoadingMore) && (React__default.createElement(FloatingPortal, null, menuContent))));
54
58
  }
55
59
 
56
60
  function InternalChipDismissible(props) {
@@ -14,6 +14,8 @@ require('react-router-dom');
14
14
  require('../Icon-cjs.js');
15
15
  require('../Typography-cjs.js');
16
16
  require('../Text-cjs.js');
17
+ require('../useAtlantisI18n-cjs.js');
18
+ require('../AtlantisContext-cjs.js');
17
19
  require('../useFormFieldFocus-cjs.js');
18
20
  require('../InputValidation-cjs.js');
19
21
  require('../FormFieldPostFix-cjs.js');
@@ -12,6 +12,8 @@ import 'react-router-dom';
12
12
  import '../Icon-es.js';
13
13
  import '../Typography-es.js';
14
14
  import '../Text-es.js';
15
+ import '../useAtlantisI18n-es.js';
16
+ import '../AtlantisContext-es.js';
15
17
  import '../useFormFieldFocus-es.js';
16
18
  import '../InputValidation-es.js';
17
19
  import '../FormFieldPostFix-es.js';
@@ -0,0 +1,14 @@
1
+ export declare const menuMessages: {
2
+ moreActions: {
3
+ en: string;
4
+ es: string;
5
+ };
6
+ back: {
7
+ en: string;
8
+ es: string;
9
+ };
10
+ "Back to {title}": {
11
+ en: string;
12
+ es: string;
13
+ };
14
+ };
@@ -11,6 +11,8 @@ require('../floating-ui.utils-cjs.js');
11
11
  require('react/jsx-runtime');
12
12
  require('react-dom');
13
13
  require('../floating-ui.react-dom-cjs.js');
14
+ require('../useAtlantisI18n-cjs.js');
15
+ require('../AtlantisContext-cjs.js');
14
16
  require('../Button-cjs.js');
15
17
  require('../tslib.es6-cjs.js');
16
18
  require('react-router-dom');
@@ -9,6 +9,8 @@ import '../floating-ui.utils-es.js';
9
9
  import 'react/jsx-runtime';
10
10
  import 'react-dom';
11
11
  import '../floating-ui.react-dom-es.js';
12
+ import '../useAtlantisI18n-es.js';
13
+ import '../AtlantisContext-es.js';
12
14
  import '../Button-es.js';
13
15
  import '../tslib.es6-es.js';
14
16
  import 'react-router-dom';
package/dist/Menu-cjs.js CHANGED
@@ -5,6 +5,7 @@ var jobberHooks = require('@jobber/hooks');
5
5
  var classnames = require('classnames');
6
6
  var framerMotion = require('framer-motion');
7
7
  var floatingUi_react = require('./floating-ui.react-cjs.js');
8
+ var useAtlantisI18n = require('./useAtlantisI18n-cjs.js');
8
9
  var Button = require('./Button-cjs.js');
9
10
  var Typography = require('./Typography-cjs.js');
10
11
  var Icon = require('./Icon-cjs.js');
@@ -37,6 +38,21 @@ const OVERLAY_ANIMATION_CONFIG = {
37
38
  type: "tween",
38
39
  };
39
40
 
41
+ const menuMessages = useAtlantisI18n.defineMessages({
42
+ moreActions: {
43
+ en: "More Actions",
44
+ es: "Más acciones",
45
+ },
46
+ back: {
47
+ en: "Back",
48
+ es: "Atrás",
49
+ },
50
+ "Back to {title}": {
51
+ en: "Back to {title}",
52
+ es: "Volver a {title}",
53
+ },
54
+ });
55
+
40
56
  function isMobileDevice() {
41
57
  if (typeof window === "undefined") {
42
58
  return false;
@@ -58,6 +74,7 @@ const animationVariation = {
58
74
  // eslint-disable-next-line max-statements
59
75
  function MenuLegacy({ activator, items, UNSAFE_className, UNSAFE_style, }) {
60
76
  var _a;
77
+ const { t } = useAtlantisI18n.useAtlantisI18n(menuMessages);
61
78
  const [visible, setVisible] = React.useState(false);
62
79
  const [referenceElement, setReferenceElement] = React.useState(null);
63
80
  const [activeIndex, setActiveIndex] = React.useState(null);
@@ -122,7 +139,7 @@ function MenuLegacy({ activator, items, UNSAFE_className, UNSAFE_style, }) {
122
139
  }
123
140
  : {};
124
141
  if (!activator) {
125
- activator = (React.createElement(Button.Button, { fullWidth: true, label: "More Actions", icon: "more", type: "secondary" }));
142
+ activator = (React.createElement(Button.Button, { fullWidth: true, label: t("moreActions"), icon: "more", type: "secondary" }));
126
143
  }
127
144
  let itemIndexCounter = 0;
128
145
  const renderedSections = items === null || items === void 0 ? void 0 : items.map((item, key) => (React.createElement("div", { key: key, className: styles$2.legacySection },
@@ -640,6 +657,7 @@ const BottomSheetSubmenuTrigger = React.forwardRef(function BottomSheetSubmenuTr
640
657
  React.createElement(Icon.Icon, { color: "icon", name: "arrowRight" }))) : null));
641
658
  });
642
659
  function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, UNSAFE_className, }) {
660
+ const { t } = useAtlantisI18n.useAtlantisI18n(menuMessages);
643
661
  const { titleRef } = useBottomSheetSubmenuContext();
644
662
  const title = titleRef.current;
645
663
  const { focusModalityRef } = useBottomSheetContext();
@@ -655,7 +673,7 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
655
673
  React.createElement(BottomSheet.BottomSheet.Content, { style: bottomSheetStyle },
656
674
  title ? (React.createElement(DrawerTitle.DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
657
675
  React.createElement("div", { className: styles$1.submenuHeader },
658
- React.createElement(DrawerTitle.DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React.createElement(Button.Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
676
+ React.createElement(DrawerTitle.DrawerClose, { "aria-label": title ? t("Back to {title}", { title }) : t("back"), render: React.createElement(Button.Button, { ariaLabel: title ? t("Back to {title}", { title }) : t("back"), icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
659
677
  title ? (React.createElement("div", { className: styles$1.submenuTitle },
660
678
  React.createElement(Typography.Typography, { element: "span", size: "base", fontWeight: "semiBold", textColor: "text" }, title))) : null),
661
679
  React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetSubmenuBody, styles.composableSection, resolvedBaseProps.className) }, children))));
package/dist/Menu-es.js CHANGED
@@ -2,7 +2,8 @@ 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, g as useListNavigation, d as useInteractions, F as FloatingPortal } from './floating-ui.react-es.js';
5
+ import { u as useFloating, c as useDismiss, j as useListNavigation, d as useInteractions, F as FloatingPortal } from './floating-ui.react-es.js';
6
+ import { d as defineMessages, u as useAtlantisI18n } from './useAtlantisI18n-es.js';
6
7
  import { B as Button } from './Button-es.js';
7
8
  import { T as Typography } from './Typography-es.js';
8
9
  import { I as Icon } from './Icon-es.js';
@@ -35,6 +36,21 @@ const OVERLAY_ANIMATION_CONFIG = {
35
36
  type: "tween",
36
37
  };
37
38
 
39
+ const menuMessages = defineMessages({
40
+ moreActions: {
41
+ en: "More Actions",
42
+ es: "Más acciones",
43
+ },
44
+ back: {
45
+ en: "Back",
46
+ es: "Atrás",
47
+ },
48
+ "Back to {title}": {
49
+ en: "Back to {title}",
50
+ es: "Volver a {title}",
51
+ },
52
+ });
53
+
38
54
  function isMobileDevice() {
39
55
  if (typeof window === "undefined") {
40
56
  return false;
@@ -56,6 +72,7 @@ const animationVariation = {
56
72
  // eslint-disable-next-line max-statements
57
73
  function MenuLegacy({ activator, items, UNSAFE_className, UNSAFE_style, }) {
58
74
  var _a;
75
+ const { t } = useAtlantisI18n(menuMessages);
59
76
  const [visible, setVisible] = useState(false);
60
77
  const [referenceElement, setReferenceElement] = useState(null);
61
78
  const [activeIndex, setActiveIndex] = useState(null);
@@ -120,7 +137,7 @@ function MenuLegacy({ activator, items, UNSAFE_className, UNSAFE_style, }) {
120
137
  }
121
138
  : {};
122
139
  if (!activator) {
123
- activator = (React__default.createElement(Button, { fullWidth: true, label: "More Actions", icon: "more", type: "secondary" }));
140
+ activator = (React__default.createElement(Button, { fullWidth: true, label: t("moreActions"), icon: "more", type: "secondary" }));
124
141
  }
125
142
  let itemIndexCounter = 0;
126
143
  const renderedSections = items === null || items === void 0 ? void 0 : items.map((item, key) => (React__default.createElement("div", { key: key, className: styles$2.legacySection },
@@ -638,6 +655,7 @@ const BottomSheetSubmenuTrigger = React__default.forwardRef(function BottomSheet
638
655
  React__default.createElement(Icon, { color: "icon", name: "arrowRight" }))) : null));
639
656
  });
640
657
  function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, UNSAFE_className, }) {
658
+ const { t } = useAtlantisI18n(menuMessages);
641
659
  const { titleRef } = useBottomSheetSubmenuContext();
642
660
  const title = titleRef.current;
643
661
  const { focusModalityRef } = useBottomSheetContext();
@@ -653,7 +671,7 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
653
671
  React__default.createElement(BottomSheet.Content, { style: bottomSheetStyle },
654
672
  title ? (React__default.createElement(DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
655
673
  React__default.createElement("div", { className: styles$1.submenuHeader },
656
- React__default.createElement(DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React__default.createElement(Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
674
+ React__default.createElement(DrawerClose, { "aria-label": title ? t("Back to {title}", { title }) : t("back"), render: React__default.createElement(Button, { ariaLabel: title ? t("Back to {title}", { title }) : t("back"), icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
657
675
  title ? (React__default.createElement("div", { className: styles$1.submenuTitle },
658
676
  React__default.createElement(Typography, { element: "span", size: "base", fontWeight: "semiBold", textColor: "text" }, title))) : null),
659
677
  React__default.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetSubmenuBody, styles.composableSection, resolvedBaseProps.className) }, children))));
@@ -8,7 +8,7 @@ import { H as Heading } from '../Heading-es.js';
8
8
  import { B as Button } from '../Button-es.js';
9
9
  import { B as ButtonDismiss } from '../ButtonDismiss-es.js';
10
10
  import { n as noop } from '../noop-es.js';
11
- import { b as useFloatingNodeId, u as useFloating, c as useDismiss, h as useRole, d as useInteractions, a as useFloatingParentNodeId, e as FloatingTree, f as FloatingNode, F as FloatingPortal, i as FloatingFocusManager, j as FloatingOverlay } from '../floating-ui.react-es.js';
11
+ import { b as useFloatingNodeId, u as useFloating, c as useDismiss, g as useRole, d as useInteractions, a as useFloatingParentNodeId, e as FloatingTree, f as FloatingNode, F as FloatingPortal, h as FloatingFocusManager, i as FloatingOverlay } from '../floating-ui.react-es.js';
12
12
  import { b as identity } from '../identity-es.js';
13
13
  import { A as AtlantisPortalContent } from '../AtlantisPortalContent-es.js';
14
14
  import '../Typography-es.js';
@@ -24,6 +24,8 @@ require('../floating-ui.utils.dom-cjs.js');
24
24
  require('../floating-ui.utils-cjs.js');
25
25
  require('react-dom');
26
26
  require('../floating-ui.react-dom-cjs.js');
27
+ require('../useAtlantisI18n-cjs.js');
28
+ require('../AtlantisContext-cjs.js');
27
29
  require('../useFormFieldFocus-cjs.js');
28
30
  require('../maxHeight-cjs.js');
29
31
  require('../useRenderElement-cjs.js');
@@ -22,6 +22,8 @@ import '../floating-ui.utils.dom-es.js';
22
22
  import '../floating-ui.utils-es.js';
23
23
  import 'react-dom';
24
24
  import '../floating-ui.react-dom-es.js';
25
+ import '../useAtlantisI18n-es.js';
26
+ import '../AtlantisContext-es.js';
25
27
  import '../useFormFieldFocus-es.js';
26
28
  import '../maxHeight-es.js';
27
29
  import '../useRenderElement-es.js';
@@ -3809,4 +3809,4 @@ function useTransitionStyles(context, props) {
3809
3809
  };
3810
3810
  }
3811
3811
 
3812
- export { FloatingPortal as F, useFloatingParentNodeId as a, useFloatingNodeId as b, useDismiss as c, useInteractions as d, FloatingTree as e, FloatingNode as f, useListNavigation as g, useRole as h, FloatingFocusManager as i, FloatingOverlay as j, useClick as k, useTransitionStyles as l, FloatingArrow as m, useFloating as u };
3812
+ 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 };
package/dist/index.cjs CHANGED
@@ -107,11 +107,11 @@ require('react/jsx-runtime');
107
107
  require('react-dom');
108
108
  require('./floating-ui.react-dom-cjs.js');
109
109
  require('./maxHeight-cjs.js');
110
+ require('./useAtlantisI18n-cjs.js');
110
111
  require('./mergeRefs-cjs.js');
111
112
  require('./filterDataAttributes-cjs.js');
112
113
  require('color');
113
114
  require('./tslib.es6-cjs.js');
114
- require('./useAtlantisI18n-cjs.js');
115
115
  require('react-router-dom');
116
116
  require('./getMappedAtlantisSpaceToken-cjs.js');
117
117
  require('./useChildComponent-cjs.js');
package/dist/index.mjs CHANGED
@@ -105,11 +105,11 @@ import 'react/jsx-runtime';
105
105
  import 'react-dom';
106
106
  import './floating-ui.react-dom-es.js';
107
107
  import './maxHeight-es.js';
108
+ import './useAtlantisI18n-es.js';
108
109
  import './mergeRefs-es.js';
109
110
  import './filterDataAttributes-es.js';
110
111
  import 'color';
111
112
  import './tslib.es6-es.js';
112
- import './useAtlantisI18n-es.js';
113
113
  import 'react-router-dom';
114
114
  import './getMappedAtlantisSpaceToken-es.js';
115
115
  import './useChildComponent-es.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "9.0.0",
3
+ "version": "9.1.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -545,5 +545,5 @@
545
545
  "> 1%",
546
546
  "IE 10"
547
547
  ],
548
- "gitHead": "71ed27026cd539889c5ce6c627bd74a8d283112e"
548
+ "gitHead": "e887305a950c2e207016a1b039df2e8e992acc45"
549
549
  }