@jobber/components 4.87.4-STfixing-.1 → 4.87.4-TAYLORsty.9

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.
@@ -15,11 +15,11 @@ var useIsMounted = require('@jobber/hooks/useIsMounted');
15
15
  var Text = require('../Text-fbeaaca6.js');
16
16
  var Icon = require('../Icon-405a216c.js');
17
17
  var Heading = require('../Heading-bae3c69e.js');
18
- var InputText = require('../InputText-de22af8c.js');
18
+ var InputText = require('../InputText-130b0440.js');
19
19
  require('../Typography-e2a23b7e.js');
20
20
  require('@jobber/design');
21
21
  require('../useAtlantisConfig-ed0bee66.js');
22
- require('../FormField-3ec1c85d.js');
22
+ require('../FormField-f6fadff2.js');
23
23
  require('react-hook-form');
24
24
  require('@jobber/hooks/useShowClear');
25
25
  require('../Button-6b922fc1.js');
@@ -1 +1,7 @@
1
- export declare function useMediaQuery(CSSMediaQuery: string): boolean;
1
+ type MediaQuery = `(${string}:${string})`;
2
+ export declare const mediaQueryStore: {
3
+ subscribe(onChange: () => void, query: MediaQuery): () => void;
4
+ getSnapshot(query: MediaQuery): () => boolean;
5
+ };
6
+ export declare function useMediaQuery(query: MediaQuery): boolean;
7
+ export {};
@@ -30,7 +30,7 @@ var AnimatedSwitcher = require('../AnimatedSwitcher-3d45ec5d.js');
30
30
  var Combobox = require('../Combobox-6d864202.js');
31
31
  var Chip = require('../Chip-76f18555.js');
32
32
  var debounce = require('lodash/debounce');
33
- var InputText = require('../InputText-de22af8c.js');
33
+ var InputText = require('../InputText-130b0440.js');
34
34
  var Spinner = require('../Spinner-9d8fc7ff.js');
35
35
  var Typography = require('../Typography-e2a23b7e.js');
36
36
  require('../Content-e3f7b6fc.js');
@@ -43,7 +43,7 @@ require('../Flex-d490c4db.js');
43
43
  require('@jobber/hooks/useAssert');
44
44
  require('../Avatar-76a799fa.js');
45
45
  require('color');
46
- require('../FormField-3ec1c85d.js');
46
+ require('../FormField-f6fadff2.js');
47
47
  require('@jobber/hooks/useShowClear');
48
48
  require('../InputValidation-a92bb519.js');
49
49
 
@@ -101,7 +101,19 @@ function useDataListContext() {
101
101
  return React.useContext(DataListContext);
102
102
  }
103
103
 
104
- function useMediaQuery(CSSMediaQuery) {
104
+ const mediaQueryStore = {
105
+ subscribe(onChange, query) {
106
+ const matchMedia = window.matchMedia(query);
107
+ matchMedia.addEventListener("change", onChange);
108
+ return () => {
109
+ matchMedia.removeEventListener("change", onChange);
110
+ };
111
+ },
112
+ getSnapshot(query) {
113
+ return () => window.matchMedia(query).matches;
114
+ },
115
+ };
116
+ function useMediaQuery(query) {
105
117
  /**
106
118
  * matchMedia have had full support for browsers since 2012 but jest, being a
107
119
  * lite version of a DOM, doesn't support it.
@@ -113,18 +125,12 @@ function useMediaQuery(CSSMediaQuery) {
113
125
  * screen sizes, they can use the `mockViewportWidth` function from
114
126
  * `@jobber/components/useBreakpoints`.
115
127
  */
116
- if (window.matchMedia === undefined)
128
+ if (typeof window === "undefined" ||
129
+ typeof window.matchMedia === "undefined") {
117
130
  return true;
118
- const [matches, setMatches] = React.useState(window.matchMedia(CSSMediaQuery).matches);
119
- React.useEffect(() => {
120
- const media = window.matchMedia(CSSMediaQuery);
121
- if (media.matches !== matches) {
122
- setMatches(media.matches);
123
- }
124
- const listener = () => setMatches(media.matches);
125
- media.addEventListener("change", listener);
126
- return () => media.removeEventListener("change", listener);
127
- }, [CSSMediaQuery]);
131
+ }
132
+ const subscribeMediaQuery = React.useCallback((onChange) => mediaQueryStore.subscribe(onChange, query), [query]);
133
+ const matches = React.useSyncExternalStore(subscribeMediaQuery, mediaQueryStore.getSnapshot(query), () => true);
128
134
  return matches;
129
135
  }
130
136
 
@@ -9,11 +9,11 @@ var jobberHooks = require('@jobber/hooks/useResizeObserver');
9
9
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
10
10
  var Glimmer = require('../Glimmer-84dee1ed.js');
11
11
  var tslib_es6 = require('../tslib.es6-754e2961.js');
12
- var Option = require('../Option-c4b05656.js');
12
+ var Option = require('../Option-a1dbc08a.js');
13
13
  var Button = require('../Button-6b922fc1.js');
14
14
  var Text = require('../Text-fbeaaca6.js');
15
15
  require('../Content-e3f7b6fc.js');
16
- require('../FormField-3ec1c85d.js');
16
+ require('../FormField-f6fadff2.js');
17
17
  require('react-hook-form');
18
18
  require('@jobber/hooks/useShowClear');
19
19
  require('../Icon-405a216c.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var FormField = require('../FormField-3ec1c85d.js');
5
+ var FormField = require('../FormField-f6fadff2.js');
6
6
  require('../tslib.es6-754e2961.js');
7
7
  require('react');
8
8
  require('react-hook-form');
@@ -17,7 +17,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
17
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
18
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
19
19
 
20
- var css_248z$1 = ":root {\n /**\n * These `--public-field` properties are used in other components such\n * as InputGroup, therefore they must stay on :root\n **/\n --public-field--top-left-radius: var(--radius-base);\n --public-field--top-right-radius: var(--radius-base);\n --public-field--bottom-left-radius: var(--radius-base);\n --public-field--bottom-right-radius: var(--radius-base);\n\n --field--placeholder-color: var(--color-greyBlue--light);\n --field--value-color: var(--color-heading);\n --field--border-color: var(--color-border);\n}\n\n.geR7qBhrMfk- {\n width: 100%;\n}\n\n/**\n * Wrapper\n **/\n\n.nPGhTEEzsoU- {\n --field--placeholder-offset: 50%;\n --field--placeholder-transform: -50%;\n\n --field--textAlign: left;\n\n --field--height: var(--space-largest);\n\n --field--padding-top: calc(var(--space-base) - var(--space-smallest));\n --field--padding-bottom: calc(var(--space-base) - var(--space-smallest));\n --field--padding-left: var(--space-base);\n --field--padding-right: var(--space-base);\n\n --field--value-lineHeight: calc(var(--base-unit) * 1.25);\n\n --field--background-color: var(--color-surface);\n\n --field--base-elevation: var(--elevation-base);\n --field--label-elevation: calc(var(--field--base-elevation) + 1);\n --field--postfix-elevation: calc(var(--field--base-elevation) - 1);\n --field--postfix-action-elevation: calc(var(--field--base-elevation) + 2);\n\n display: -ms-flexbox;\n\n display: flex;\n width: 100%;\n height: calc(16px * 3);\n height: var(--field--height);\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--border-base) solid var(--field--border-color);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n border-top-right-radius: calc(16px / 8);\n border-top-right-radius: var(--public-field--top-right-radius);\n border-bottom-right-radius: calc(16px / 8);\n border-bottom-right-radius: var(--public-field--bottom-right-radius);\n border-bottom-left-radius: calc(16px / 8);\n border-bottom-left-radius: var(--public-field--bottom-left-radius);\n border-top-left-radius: calc(16px / 8);\n border-top-left-radius: var(--public-field--top-left-radius);\n color: rgb(1, 41, 57);\n color: var(--field--value-color);\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--field--background-color);\n}\n\n.nPGhTEEzsoU- * {\n box-sizing: border-box;\n}\n\n.nPGhTEEzsoU-:focus-within {\n position: relative;\n z-index: var(--field--base-elevation);\n box-shadow: 0px 0px 0px calc(16px / 8) rgba(255, 255, 255, 1),\n 0px 0px 0px calc(16px / 4) rgb(147, 161, 169);\n box-shadow: var(--shadow-focus);\n}\n\n.YhserUiOeFE-:not(:focus-within) input {\n color: var(--field--background-color);\n -webkit-text-fill-color: var(--field--background-color);\n}\n\n.YhserUiOeFE-:focus-within,\n.UIZq8hTmJVU- {\n --field--placeholder-color: var(--color-text--secondary);\n --field--placeholder-offset: var(--space-smallest);\n --field--placeholder-transform: 0;\n --field--padding-top: calc(var(--space-base) + var(--space-smaller));\n --field--padding-bottom: var(--space-small);\n}\n\n.YhserUiOeFE-.Ku8sWS0mLew-:focus-within,\n.UIZq8hTmJVU-.Ku8sWS0mLew- {\n --field--padding-top: calc(var(--space-large) + var(--space-smaller));\n}\n\n.nPGhTEEzsoU-.mgPacJ6Z71Y- {\n --field--placeholder-offset: 0;\n --field--placeholder-transform: 0;\n height: auto;\n min-height: auto;\n}\n\n.gJ-15M615eY-,\n.gJ-15M615eY-:focus-within {\n --field--border-color: var(--color-critical);\n position: relative;\n}\n\n._1rsTLm5GwcM- {\n --field--placeholder-color: var(--color-disabled);\n --field--value-color: var(--color-disabled);\n --field--background-color: var(--color-surface--background);\n --field--border-color: var(--color-disabled--secondary);\n}\n\n/* override iOS default styling for disabled input */\n\n._1rsTLm5GwcM- :disabled {\n -webkit-text-fill-color: rgb(1, 41, 57);\n -webkit-text-fill-color: var(--field--value-color);\n opacity: 1;\n}\n\n.o8D-H-lKfDk- {\n --field--padding-left: calc(var(--space-base) - var(--space-smaller));\n --field--padding-right: calc(var(--space-base) - var(--space-smaller));\n --field--padding-top: var(--space-small);\n --field--padding-bottom: var(--space-small);\n --field--height: calc(var(--space-larger) + var(--space-smaller));\n}\n\n.Ku8sWS0mLew- {\n --field--padding-left: var(--space-large);\n --field--padding-right: var(--space-large);\n --field--height: calc(var(--space-extravagant));\n}\n\n._5Hu2F3cBvng- {\n display: inline-block;\n width: auto;\n}\n\n.s1WLQs6ffD8- {\n --field--textAlign: center;\n}\n\n.a2r4QheWYIA- {\n --field--textAlign: right;\n}\n\n/**\n * The custom property --formField-maxLength is getting defined inside the\n * component.\n */\n\n.KdAnXK1gClo- {\n width: calc(\n (16px * var(--formField-maxLength)) + var(--field--padding-left) +\n var(--field--padding-right)\n );\n width: calc(\n (var(--base-unit) * var(--formField-maxLength)) + var(--field--padding-left) +\n var(--field--padding-right)\n );\n}\n\n/**\n * Input Wrapper\n **/\n\n.iQFhpFYnz-8- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 1;\n flex: 1;\n position: relative;\n /* Ensure input stays with the rest of the element stack */\n z-index: 0;\n z-index: var(--elevation-default);\n}\n\n.Yo2Wi9dpa-Y- {\n position: relative;\n -ms-flex: 1;\n flex: 1;\n}\n\n/**\n * Input\n **/\n\n.LSHPV7PwOTg- {\n position: relative;\n z-index: var(--field--base-elevation);\n width: 100%;\n height: 100%;\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n border: none;\n border-radius: 0;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n background: transparent;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.LSHPV7PwOTg-:focus {\n outline: none;\n}\n\n.mgPacJ6Z71Y- .LSHPV7PwOTg- {\n resize: vertical;\n}\n\n.i31GQXcMz54- .LSHPV7PwOTg- {\n z-index: var(--field--label-elevation);\n}\n\n.LSHPV7PwOTg-:-webkit-autofill,\n.LSHPV7PwOTg-:-webkit-autofill:hover,\n.LSHPV7PwOTg-:-webkit-autofill:focus,\n.LSHPV7PwOTg-:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 1) inset !important;\n -webkit-box-shadow: 0 0 0 30px var(--color-surface) inset !important;\n}\n\n/**\n * Label\n **/\n\n._3xREbTN5pPg- {\n position: absolute;\n top: var(--field--placeholder-offset);\n z-index: var(--field--label-elevation);\n width: 100%;\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n overflow: hidden;\n color: rgb(147, 161, 169);\n color: var(--field--placeholder-color);\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n -webkit-transform: translateY(var(--field--placeholder-transform));\n transform: translateY(var(--field--placeholder-transform));\n transition: all 100ms;\n transition: all var(--timing-quick);\n}\n\n.mgPacJ6Z71Y- ._3xREbTN5pPg- {\n /* Changes the width so that the scrollbar on the textarea doesn't get cut off */\n width: calc(100% - var(--field--padding-right));\n padding-top: var(--field--padding-top);\n /* Remove padding on right to make use of the entire width */\n padding-right: 0;\n -webkit-transform: translateY(--field--placeholder-transform);\n transform: translateY(--field--placeholder-transform);\n}\n\n.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-:focus-within ._3xREbTN5pPg- {\n font-size: calc((16px * 1) * 0.75);\n font-size: calc(calc(16px * 1) * 0.75);\n font-size: var(--typography--fontSize-small);\n}\n\n.mgPacJ6Z71Y-.UIZq8hTmJVU- ._3xREbTN5pPg- {\n padding-top: calc(16px / 8);\n padding-top: var(--space-smallest);\n background-color: var(--field--background-color);\n}\n\n.o8D-H-lKfDk-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.o8D-H-lKfDk-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n display: none;\n}\n\n/**This is valid cascading order **/\n\n/* stylelint-disable-next-line no-descending-specificity */\n\n.Ku8sWS0mLew-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.Ku8sWS0mLew-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n/**\n * Postfix\n **/\n\n.VtnAk1HYMMk- {\n position: absolute;\n top: 50%;\n right: calc(16px * 1);\n right: var(--space-base);\n z-index: var(--field--postfix-elevation);\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n/**\n * Affix\n **/\n\n.uPLklxvtfJw- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0 calc(var(--field--padding-left) * -1) 0 0;\n padding: 0 var(--field--padding-right) 0 var(--field--padding-left);\n}\n\n@supports (aspect-ratio: 1/1) {\n .uPLklxvtfJw- {\n /*\n * disabling property-no-unknown here as this is a real property\n * that stylelint just doesn't know about. We may be able to remove\n * this when we update our stylelint to not care about IE11.\n */\n /* stylelint-disable-next-line property-no-unknown */\n aspect-ratio: 1/1;\n padding: 0;\n }\n}\n\n.uPLklxvtfJw-.pYqqDvv57JE- {\n margin: 0 0 0 calc(var(--field--padding-right) * -1);\n}\n\n.uPLklxvtfJw-.eI44oQpuVlk- {\n position: relative;\n z-index: var(--field--postfix-action-elevation);\n}\n\n.jO8P2iSHilM- {\n display: -ms-flexbox;\n display: flex;\n margin: 0 calc((var(--field--padding-left) - calc(16px / 8)) * -1) 0 0;\n margin: 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1) 0 0;\n padding: 0 0 0 var(--field--padding-left);\n line-height: var(--field--value-lineHeight);\n -ms-flex-align: center;\n align-items: center;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n\n.jO8P2iSHilM-.pYqqDvv57JE- {\n margin: 0 0 0 calc((var(--field--padding-left) - calc(16px / 8)) * -1);\n margin: 0 0 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1);\n padding: 0 var(--field--padding-left) 0 0;\n}\n\n.UIZq8hTmJVU-:not(.o8D-H-lKfDk-) .jO8P2iSHilM- {\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n}\n\n._2GfgzNnLOSI- {\n margin-top: calc(16px / 4);\n margin-top: var(--space-smaller);\n}\n";
20
+ var css_248z$1 = ":root {\n /**\n * These `--public-field` properties are used in other components such\n * as InputGroup, therefore they must stay on :root\n **/\n --public-field--top-left-radius: var(--radius-base);\n --public-field--top-right-radius: var(--radius-base);\n --public-field--bottom-left-radius: var(--radius-base);\n --public-field--bottom-right-radius: var(--radius-base);\n\n --field--placeholder-color: var(--color-greyBlue--light);\n --field--value-color: var(--color-heading);\n --field--border-color: var(--color-border);\n}\n\n.geR7qBhrMfk- {\n width: 100%;\n}\n\n/**\n * Wrapper\n **/\n\n.nPGhTEEzsoU- {\n --field--placeholder-offset: 50%;\n --field--placeholder-transform: -50%;\n\n --field--textAlign: left;\n\n --field--height: var(--space-largest);\n\n --field--padding-top: calc(var(--space-base) - var(--space-smallest));\n --field--padding-bottom: calc(var(--space-base) - var(--space-smallest));\n --field--padding-left: var(--space-base);\n --field--padding-right: var(--space-base);\n\n --field--value-lineHeight: calc(var(--base-unit) * 1.25);\n\n --field--background-color: var(--color-surface);\n\n --field--base-elevation: var(--elevation-base);\n --field--label-elevation: calc(var(--field--base-elevation) + 1);\n --field--postfix-elevation: calc(var(--field--base-elevation) - 1);\n --field--postfix-action-elevation: calc(var(--field--base-elevation) + 2);\n\n display: -ms-flexbox;\n\n display: flex;\n width: 100%;\n height: calc(16px * 3);\n height: var(--field--height);\n border: calc(16px / 16) solid rgb(217, 223, 225);\n border: var(--border-base) solid var(--field--border-color);\n border-radius: calc(16px / 8);\n border-radius: var(--radius-base);\n border-top-right-radius: calc(16px / 8);\n border-top-right-radius: var(--public-field--top-right-radius);\n border-bottom-right-radius: calc(16px / 8);\n border-bottom-right-radius: var(--public-field--bottom-right-radius);\n border-bottom-left-radius: calc(16px / 8);\n border-bottom-left-radius: var(--public-field--bottom-left-radius);\n border-top-left-radius: calc(16px / 8);\n border-top-left-radius: var(--public-field--top-left-radius);\n color: rgb(1, 41, 57);\n color: var(--field--value-color);\n font-size: calc((16px * 1) * 0.875);\n font-size: calc(calc(16px * 1) * 0.875);\n font-size: var(--typography--fontSize-base);\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--field--background-color);\n}\n\n.nPGhTEEzsoU- * {\n box-sizing: border-box;\n}\n\n.nPGhTEEzsoU-:focus-within {\n position: relative;\n z-index: var(--field--base-elevation);\n box-shadow: 0px 0px 0px calc(16px / 8) rgba(255, 255, 255, 1),\n 0px 0px 0px calc(16px / 4) rgb(147, 161, 169);\n box-shadow: var(--shadow-focus);\n}\n\n.YhserUiOeFE-:not(:focus-within) input {\n color: var(--field--background-color);\n -webkit-text-fill-color: var(--field--background-color);\n}\n\n.YhserUiOeFE-:focus-within,\n.UIZq8hTmJVU- {\n --field--placeholder-color: var(--color-text--secondary);\n --field--placeholder-offset: var(--space-smallest);\n --field--placeholder-transform: 0;\n --field--padding-top: calc(var(--space-base) + var(--space-smaller));\n --field--padding-bottom: var(--space-small);\n}\n\n.YhserUiOeFE-.Ku8sWS0mLew-:focus-within,\n.UIZq8hTmJVU-.Ku8sWS0mLew- {\n --field--padding-top: calc(var(--space-large) + var(--space-smaller));\n}\n\n.nPGhTEEzsoU-.mgPacJ6Z71Y- {\n --field--placeholder-offset: 0;\n --field--placeholder-transform: 0;\n height: auto;\n min-height: auto;\n}\n\n.gJ-15M615eY-,\n.gJ-15M615eY-:focus-within {\n --field--border-color: var(--color-critical);\n position: relative;\n}\n\n._1rsTLm5GwcM- {\n --field--placeholder-color: var(--color-disabled);\n --field--value-color: var(--color-disabled);\n --field--background-color: var(--color-surface--background);\n --field--border-color: var(--color-disabled--secondary);\n}\n\n/* override iOS default styling for disabled input */\n\n._1rsTLm5GwcM- :disabled {\n -webkit-text-fill-color: rgb(1, 41, 57);\n -webkit-text-fill-color: var(--field--value-color);\n opacity: 1;\n}\n\n.o8D-H-lKfDk- {\n --field--padding-left: calc(var(--space-base) - var(--space-smaller));\n --field--padding-right: calc(var(--space-base) - var(--space-smaller));\n --field--padding-top: var(--space-small);\n --field--padding-bottom: var(--space-small);\n --field--height: calc(var(--space-larger) + var(--space-smaller));\n}\n\n.Ku8sWS0mLew- {\n --field--padding-left: var(--space-large);\n --field--padding-right: var(--space-large);\n --field--height: calc(var(--space-extravagant));\n}\n\n._5Hu2F3cBvng- {\n display: inline-block;\n width: auto;\n}\n\n.s1WLQs6ffD8- {\n --field--textAlign: center;\n}\n\n.a2r4QheWYIA- {\n --field--textAlign: right;\n}\n\n/**\n * The custom property --formField-maxLength is getting defined inside the\n * component.\n */\n\n.KdAnXK1gClo- {\n width: calc(\n (16px * var(--formField-maxLength)) + var(--field--padding-left) +\n var(--field--padding-right)\n );\n width: calc(\n (var(--base-unit) * var(--formField-maxLength)) + var(--field--padding-left) +\n var(--field--padding-right)\n );\n}\n\n/**\n * Input Wrapper\n **/\n\n.iQFhpFYnz-8- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex: 1;\n flex: 1;\n position: relative;\n /* Ensure input stays with the rest of the element stack */\n z-index: 0;\n z-index: var(--elevation-default);\n}\n\n.Yo2Wi9dpa-Y- {\n position: relative;\n -ms-flex: 1;\n flex: 1;\n}\n\n/**\n * Input\n **/\n\n.LSHPV7PwOTg- {\n position: relative;\n z-index: var(--field--base-elevation);\n width: 100%;\n height: 100%;\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n border: none;\n border-radius: 0;\n color: inherit;\n font-family: inherit;\n font-size: inherit;\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n background: transparent;\n -webkit-appearance: none;\n appearance: none;\n}\n\n.LSHPV7PwOTg-:focus {\n outline: none;\n}\n\n.mgPacJ6Z71Y- .LSHPV7PwOTg- {\n resize: vertical;\n}\n\n.i31GQXcMz54- .LSHPV7PwOTg- {\n z-index: var(--field--label-elevation);\n}\n\n.LSHPV7PwOTg-:-webkit-autofill,\n.LSHPV7PwOTg-:-webkit-autofill:hover,\n.LSHPV7PwOTg-:-webkit-autofill:focus,\n.LSHPV7PwOTg-:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 1) inset !important;\n -webkit-box-shadow: 0 0 0 30px var(--color-surface) inset !important;\n}\n\n/**\n * Label\n **/\n\n._3xREbTN5pPg- {\n position: absolute;\n top: var(--field--placeholder-offset);\n z-index: var(--field--label-elevation);\n width: 100%;\n padding-left: var(--field--padding-left);\n padding-right: var(--field--padding-right);\n overflow: hidden;\n color: rgb(147, 161, 169);\n color: var(--field--placeholder-color);\n line-height: var(--field--value-lineHeight);\n text-align: var(--field--textAlign);\n text-overflow: ellipsis;\n white-space: nowrap;\n pointer-events: none;\n -webkit-transform: translateY(var(--field--placeholder-transform));\n transform: translateY(var(--field--placeholder-transform));\n transition: all 100ms;\n transition: all var(--timing-quick);\n}\n\n.mgPacJ6Z71Y- ._3xREbTN5pPg- {\n /* Changes the width so that the scrollbar on the textarea doesn't get cut off */\n width: calc(100% - var(--field--padding-right));\n padding-top: var(--field--padding-top);\n /* Remove padding on right to make use of the entire width */\n padding-right: 0;\n -webkit-transform: translateY(var(--field--placeholder-transform));\n transform: translateY(var(--field--placeholder-transform));\n}\n\n.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-:focus-within ._3xREbTN5pPg- {\n font-size: calc((16px * 1) * 0.75);\n font-size: calc(calc(16px * 1) * 0.75);\n font-size: var(--typography--fontSize-small);\n}\n\n.mgPacJ6Z71Y-.UIZq8hTmJVU- ._3xREbTN5pPg- {\n padding-top: calc(16px / 8);\n padding-top: var(--space-smallest);\n background-color: var(--field--background-color);\n}\n\n.o8D-H-lKfDk-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.o8D-H-lKfDk-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n display: none;\n}\n\n/**This is valid cascading order **/\n\n/* stylelint-disable-next-line no-descending-specificity */\n\n.Ku8sWS0mLew-.UIZq8hTmJVU- ._3xREbTN5pPg-,\n.YhserUiOeFE-.Ku8sWS0mLew-.UIZq8hTmJVU-:focus-within ._3xREbTN5pPg- {\n padding-top: calc(16px / 2);\n padding-top: var(--space-small);\n}\n\n/**\n * Postfix\n **/\n\n.VtnAk1HYMMk- {\n position: absolute;\n top: 50%;\n right: calc(16px * 1);\n right: var(--space-base);\n z-index: var(--field--postfix-elevation);\n -webkit-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n\n/**\n * Affix\n **/\n\n.uPLklxvtfJw- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0 calc(var(--field--padding-left) * -1) 0 0;\n padding: 0 var(--field--padding-right) 0 var(--field--padding-left);\n}\n\n@supports (aspect-ratio: 1/1) {\n .uPLklxvtfJw- {\n /*\n * disabling property-no-unknown here as this is a real property\n * that stylelint just doesn't know about. We may be able to remove\n * this when we update our stylelint to not care about IE11.\n */\n /* stylelint-disable-next-line property-no-unknown */\n aspect-ratio: 1/1;\n padding: 0;\n }\n}\n\n.uPLklxvtfJw-.pYqqDvv57JE- {\n margin: 0 0 0 calc(var(--field--padding-right) * -1);\n}\n\n.uPLklxvtfJw-.eI44oQpuVlk- {\n position: relative;\n z-index: var(--field--postfix-action-elevation);\n}\n\n.jO8P2iSHilM- {\n display: -ms-flexbox;\n display: flex;\n margin: 0 calc((var(--field--padding-left) - calc(16px / 8)) * -1) 0 0;\n margin: 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1) 0 0;\n padding: 0 0 0 var(--field--padding-left);\n line-height: var(--field--value-lineHeight);\n -ms-flex-align: center;\n align-items: center;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n}\n\n.jO8P2iSHilM-.pYqqDvv57JE- {\n margin: 0 0 0 calc((var(--field--padding-left) - calc(16px / 8)) * -1);\n margin: 0 0 0 calc((var(--field--padding-left) - var(--space-smallest)) * -1);\n padding: 0 var(--field--padding-left) 0 0;\n}\n\n.UIZq8hTmJVU-:not(.o8D-H-lKfDk-) .jO8P2iSHilM- {\n padding-top: var(--field--padding-top);\n padding-bottom: var(--field--padding-bottom);\n}\n\n._2GfgzNnLOSI- {\n margin-top: calc(16px / 4);\n margin-top: var(--space-smaller);\n}\n";
21
21
  var styles$1 = {"container":"geR7qBhrMfk-","wrapper":"nPGhTEEzsoU-","timeInputLabel":"YhserUiOeFE-","miniLabel":"UIZq8hTmJVU-","large":"Ku8sWS0mLew-","textarea":"mgPacJ6Z71Y-","invalid":"gJ-15M615eY-","disabled":"_1rsTLm5GwcM-","small":"o8D-H-lKfDk-","inline":"_5Hu2F3cBvng-","center":"s1WLQs6ffD8-","right":"a2r4QheWYIA-","maxLength":"KdAnXK1gClo-","inputWrapper":"iQFhpFYnz-8-","childrenWrapper":"Yo2Wi9dpa-Y-","input":"LSHPV7PwOTg-","select":"i31GQXcMz54-","label":"_3xREbTN5pPg-","postfix":"VtnAk1HYMMk-","affixIcon":"uPLklxvtfJw-","suffix":"pYqqDvv57JE-","hasAction":"eI44oQpuVlk-","affixLabel":"jO8P2iSHilM-","description":"_2GfgzNnLOSI-"};
22
22
  styleInject_es.styleInject(css_248z$1);
23
23
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var FormatFile = require('../FormatFile-6030027c.js');
5
+ var FormatFile = require('../FormatFile-5ba4cf69.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('filesize');
@@ -42,9 +42,9 @@ function InternalThumbnailImage({ file }) {
42
42
  const { name, src } = file;
43
43
  const [imageSource, setImageSource] = React.useState();
44
44
  const [imageLoaded, setImageLoaded] = React.useState(false);
45
- if (!imageSource) {
45
+ React.useEffect(() => {
46
46
  src().then(url => setImageSource(url));
47
- }
47
+ }, []);
48
48
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
49
49
  !imageLoaded && React__default["default"].createElement(Glimmer.Glimmer, { size: "auto" }),
50
50
  React__default["default"].createElement("img", { src: imageSource, onLoad: handleImageLoad, alt: name, "data-testid": "internalThumbnailImage", className: classnames__default["default"](styles.image, { [styles.hidden]: !imageLoaded }) })));
@@ -6,7 +6,7 @@ var React = require('react');
6
6
  var classnames = require('classnames');
7
7
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
8
8
  var LightBox = require('../LightBox-7efe8932.js');
9
- var FormatFile = require('../FormatFile-6030027c.js');
9
+ var FormatFile = require('../FormatFile-5ba4cf69.js');
10
10
  var Button = require('../Button-6b922fc1.js');
11
11
  require('framer-motion');
12
12
  require('react-dom');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var omit = require('lodash/omit');
6
6
  var React = require('react');
7
- var FormField = require('../FormField-3ec1c85d.js');
7
+ var FormField = require('../FormField-f6fadff2.js');
8
8
  var DatePicker = require('../DatePicker-dd9173c7.js');
9
9
  require('../tslib.es6-754e2961.js');
10
10
  require('react-hook-form');
@@ -31,6 +31,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
31
31
  function InputDate(inputProps) {
32
32
  const formFieldActionsRef = React.useRef(null);
33
33
  return (React__default["default"].createElement(DatePicker.DatePicker, { selected: inputProps.value, onChange: inputProps.onChange, disabled: inputProps.disabled, readonly: inputProps.readonly, fullWidth: !inputProps.inline, minDate: inputProps.minDate, maxDate: inputProps.maxDate, smartAutofocus: false, activator: activatorProps => {
34
+ var _a;
34
35
  const { onChange, onClick, value } = activatorProps;
35
36
  const newActivatorProps = omit__default["default"](activatorProps, ["activator"]);
36
37
  const suffix = Object.assign({ icon: "calendar" }, (onClick && {
@@ -39,10 +40,7 @@ function InputDate(inputProps) {
39
40
  }));
40
41
  // Set form field to formatted date string immediately, to avoid validations
41
42
  // triggering incorrectly when it blurs (to handle the datepicker UI click)
42
- React.useEffect(() => {
43
- var _a;
44
- value && ((_a = formFieldActionsRef.current) === null || _a === void 0 ? void 0 : _a.setValue(value));
45
- }, [value]);
43
+ value && ((_a = formFieldActionsRef.current) === null || _a === void 0 ? void 0 : _a.setValue(value));
46
44
  return (
47
45
  // We prevent the picker from opening on focus for keyboard navigation, so to maintain a good UX for mouse users we want to open the picker on click
48
46
  React__default["default"].createElement("div", { onClick: onClick },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var FormField = require('../FormField-3ec1c85d.js');
6
+ var FormField = require('../FormField-f6fadff2.js');
7
7
  require('../tslib.es6-754e2961.js');
8
8
  require('react-hook-form');
9
9
  require('../style-inject.es-9d2f5f4e.js');
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputNumber = require('../InputNumber-75ae72b9.js');
5
+ var InputNumber = require('../InputNumber-e15cc1a3.js');
6
6
  require('react');
7
- require('../FormField-3ec1c85d.js');
7
+ require('../FormField-f6fadff2.js');
8
8
  require('../tslib.es6-754e2961.js');
9
9
  require('react-hook-form');
10
10
  require('../style-inject.es-9d2f5f4e.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var FormField = require('./FormField-3ec1c85d.js');
4
+ var FormField = require('./FormField-f6fadff2.js');
5
5
 
6
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
7
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
- var FormField = require('../FormField-3ec1c85d.js');
6
+ var FormField = require('../FormField-f6fadff2.js');
7
7
  require('../tslib.es6-754e2961.js');
8
8
  require('react-hook-form');
9
9
  require('../style-inject.es-9d2f5f4e.js');
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-754e2961.js');
6
6
  var React = require('react');
7
7
  var reactHookForm = require('react-hook-form');
8
8
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
9
- var FormField = require('../FormField-3ec1c85d.js');
9
+ var FormField = require('../FormField-f6fadff2.js');
10
10
  require('classnames');
11
11
  require('@jobber/hooks/useShowClear');
12
12
  require('../Button-6b922fc1.js');
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputText = require('../InputText-de22af8c.js');
5
+ var InputText = require('../InputText-130b0440.js');
6
6
  require('react');
7
7
  require('@jobber/hooks/useSafeLayoutEffect');
8
- require('../FormField-3ec1c85d.js');
8
+ require('../FormField-f6fadff2.js');
9
9
  require('../tslib.es6-754e2961.js');
10
10
  require('react-hook-form');
11
11
  require('../style-inject.es-9d2f5f4e.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var React = require('react');
4
4
  var useSafeLayoutEffect = require('@jobber/hooks/useSafeLayoutEffect');
5
- var FormField = require('./FormField-3ec1c85d.js');
5
+ var FormField = require('./FormField-f6fadff2.js');
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-754e2961.js');
6
6
  var React = require('react');
7
7
  var temporal = require('@std-proposal/temporal');
8
8
  var debounce = require('lodash/debounce');
9
- var FormField = require('../FormField-3ec1c85d.js');
9
+ var FormField = require('../FormField-f6fadff2.js');
10
10
  require('react-hook-form');
11
11
  require('../style-inject.es-9d2f5f4e.js');
12
12
  require('classnames');
@@ -44,15 +44,18 @@ function htmlTimeToCivilTime(timeString) {
44
44
 
45
45
  const DEBOUNCE_TIME = 300;
46
46
  function useTimePredict({ value, handleChange }) {
47
- const IS_12_HOUR_FORMAT = React.useRef(Intl.DateTimeFormat(navigator.language, {
48
- hour: "numeric",
49
- }).resolvedOptions().hour12);
47
+ const [IS_12_HOUR_FORMAT, set12HourFormat] = React.useState(false);
50
48
  const [typedTime, setTypedTime] = React.useState("");
51
49
  const predictTime = React.useCallback(debounce__default["default"](() => {
52
50
  if (value)
53
51
  return;
54
- handleChange(predictHours(typedTime, IS_12_HOUR_FORMAT.current));
55
- }, DEBOUNCE_TIME), [typedTime, value, handleChange]);
52
+ handleChange(predictHours(typedTime, IS_12_HOUR_FORMAT));
53
+ }, DEBOUNCE_TIME), [typedTime, value, handleChange, IS_12_HOUR_FORMAT]);
54
+ React.useEffect(() => {
55
+ set12HourFormat(Boolean(Intl.DateTimeFormat(navigator.language, {
56
+ hour: "numeric",
57
+ }).resolvedOptions().hour12));
58
+ }, []);
56
59
  /**
57
60
  * Predict the hour when user types a number
58
61
  */
@@ -1,2 +1,2 @@
1
1
  export { List } from "./List";
2
- export { ListItem } from "./ListItem";
2
+ export { ListItem, ListItemProps } from "./ListItem";
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var FormField = require('./FormField-3ec1c85d.js');
4
+ var FormField = require('./FormField-f6fadff2.js');
5
5
 
6
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
7
 
@@ -8,11 +8,11 @@ var RadioGroup = require('../RadioGroup-678f4932.js');
8
8
  var Text = require('../Text-fbeaaca6.js');
9
9
  require('classnames');
10
10
  require('../Typography-e2a23b7e.js');
11
- var Option = require('../Option-c4b05656.js');
12
- var InputNumber = require('../InputNumber-75ae72b9.js');
11
+ var Option = require('../Option-a1dbc08a.js');
12
+ var InputNumber = require('../InputNumber-e15cc1a3.js');
13
13
  var InputGroup = require('../InputGroup-8d4fd4eb.js');
14
14
  var Content = require('../Content-e3f7b6fc.js');
15
- require('../FormField-3ec1c85d.js');
15
+ require('../FormField-f6fadff2.js');
16
16
  require('../tslib.es6-754e2961.js');
17
17
  require('react-hook-form');
18
18
  require('@jobber/hooks/useShowClear');
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Option = require('../Option-c4b05656.js');
5
+ var Option = require('../Option-a1dbc08a.js');
6
6
  require('react');
7
- require('../FormField-3ec1c85d.js');
7
+ require('../FormField-f6fadff2.js');
8
8
  require('../tslib.es6-754e2961.js');
9
9
  require('react-hook-form');
10
10
  require('../style-inject.es-9d2f5f4e.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.87.4-STfixing-.1+9f4777b2",
3
+ "version": "4.87.4-TAYLORsty.9+b15e92ba",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@jobber/design": "^0.56.0",
23
23
  "@jobber/formatters": "^0.2.2",
24
- "@jobber/hooks": "^2.9.3",
24
+ "@jobber/hooks": "^2.9.4-TAYLORsty.9+b15e92ba",
25
25
  "@popperjs/core": "^2.0.6",
26
26
  "@std-proposal/temporal": "0.0.1",
27
27
  "@tanstack/react-table": "8.5.13",
@@ -80,5 +80,5 @@
80
80
  "> 1%",
81
81
  "IE 10"
82
82
  ],
83
- "gitHead": "9f4777b2ce8f07176eed60e9d4848b60b970af51"
83
+ "gitHead": "b15e92ba2af2416b4a9c3c52c195e21f8069a068"
84
84
  }