@jobber/components 4.24.1 → 4.24.2-JOB-69677.5

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.
@@ -1,9 +1,15 @@
1
- /// <reference types="react" />
1
+ import React from "react";
2
2
  import { XOR } from "ts-xor";
3
3
  import { GroupOption, Option } from "./Option";
4
+ import { InputTextRef } from "../InputText";
4
5
  import { FormFieldProps } from "../FormField";
5
6
  type OptionCollection = XOR<Option[], GroupOption[]>;
6
- interface AutocompleteProps extends Pick<FormFieldProps, "inputRef" | "invalid" | "name" | "onBlur" | "onFocus" | "prefix" | "size" | "suffix" | "validations"> {
7
+ interface AutocompleteProps extends Pick<FormFieldProps, "invalid" | "name" | "onBlur" | "onFocus" | "prefix" | "size" | "suffix" | "validations"> {
8
+ /**
9
+ * @deprecated
10
+ * Use `ref` instead.
11
+ */
12
+ readonly inputRef?: FormFieldProps["inputRef"];
7
13
  /**
8
14
  * Initial options to show when user first focuses the Autocomplete
9
15
  */
@@ -40,5 +46,5 @@ interface AutocompleteProps extends Pick<FormFieldProps, "inputRef" | "invalid"
40
46
  */
41
47
  readonly placeholder: string;
42
48
  }
43
- export declare function Autocomplete({ initialOptions, value, allowFreeForm, size, debounce: debounceRate, onChange, getOptions, placeholder, onBlur, onFocus, validations, ...inputProps }: AutocompleteProps): JSX.Element;
49
+ export declare const Autocomplete: React.ForwardRefExoticComponent<AutocompleteProps & React.RefAttributes<InputTextRef>>;
44
50
  export {};
@@ -13,10 +13,10 @@ var reactPopper = require('react-popper');
13
13
  var Text = require('../Text-e7ed0974.js');
14
14
  var Icon = require('../Icon-405a216c.js');
15
15
  var Heading = require('../Heading-a1191b15.js');
16
- var InputText = require('../InputText-e9b345ff.js');
16
+ var InputText = require('../InputText-bb03f6d1.js');
17
17
  require('../Typography-fd6f932a.js');
18
18
  require('@jobber/design');
19
- require('../FormField-090113ec.js');
19
+ require('../FormField-0f880b07.js');
20
20
  require('uuid');
21
21
  require('react-hook-form');
22
22
  require('../Button-7698424c.js');
@@ -147,7 +147,7 @@ function useRepositionMenu(attachTo, visible = false) {
147
147
 
148
148
  // Max statements increased to make room for the debounce functions
149
149
  /* eslint max-statements: ["error", 14] */
150
- function Autocomplete(_a) {
150
+ function AutocompleteInternal(_a, ref) {
151
151
  var _b;
152
152
  var { initialOptions = [], value, allowFreeForm = true, size = undefined, debounce: debounceRate = 300, onChange, getOptions, placeholder, onBlur, onFocus, validations } = _a, inputProps = tslib_es6.__rest(_a, ["initialOptions", "value", "allowFreeForm", "size", "debounce", "onChange", "getOptions", "placeholder", "onBlur", "onFocus", "validations"]);
153
153
  const [options, setOptions] = React.useState(initialOptions);
@@ -164,7 +164,7 @@ function Autocomplete(_a) {
164
164
  updateInput((_a = value === null || value === void 0 ? void 0 : value.label) !== null && _a !== void 0 ? _a : "");
165
165
  }, [value]);
166
166
  return (React__default["default"].createElement("div", { className: styles.autocomplete, ref: autocompleteRef },
167
- React__default["default"].createElement(InputText.InputText, Object.assign({ autocomplete: false, size: size, value: inputText, onChange: handleInputChange, placeholder: placeholder, onFocus: handleInputFocus, onBlur: handleInputBlur, validations: validations }, inputProps)),
167
+ React__default["default"].createElement(InputText.InputText, Object.assign({ ref: ref, autocomplete: false, size: size, value: inputText, onChange: handleInputChange, placeholder: placeholder, onFocus: handleInputFocus, onBlur: handleInputBlur, validations: validations }, inputProps)),
168
168
  menuVisible && (React__default["default"].createElement(Menu, { attachTo: autocompleteRef, visible: menuVisible && options.length > 0, options: options, selectedOption: value, onOptionSelect: handleMenuChange }))));
169
169
  function updateInput(newText) {
170
170
  setInputText(newText);
@@ -214,5 +214,6 @@ function mapToOptions(items) {
214
214
  return result;
215
215
  }, []);
216
216
  }
217
+ const Autocomplete = React.forwardRef(AutocompleteInternal);
217
218
 
218
219
  exports.Autocomplete = Autocomplete;
@@ -8,10 +8,10 @@ var React = require('react');
8
8
  var jobberHooks = require('@jobber/hooks/useResizeObserver');
9
9
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
10
10
  var tslib_es6 = require('../tslib.es6-5b8768b7.js');
11
- var Option = require('../Option-8277f540.js');
11
+ var Option = require('../Option-63267b27.js');
12
12
  var Button = require('../Button-7698424c.js');
13
13
  var Text = require('../Text-e7ed0974.js');
14
- require('../FormField-090113ec.js');
14
+ require('../FormField-0f880b07.js');
15
15
  require('uuid');
16
16
  require('react-hook-form');
17
17
  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-090113ec.js');
5
+ var FormField = require('../FormField-0f880b07.js');
6
6
  require('../tslib.es6-5b8768b7.js');
7
7
  require('react');
8
8
  require('uuid');
@@ -17,8 +17,8 @@ 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 = ":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\n/**\n * Wrapper\n **/\n\n.nPGhTEEzsoU- {\n --field--placeholder-color: var(--color-greyBlue--light);\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-color: var(--color-heading);\n --field--value-lineHeight: calc(var(--base-unit) * 1.25);\n\n --field--border-color: var(--color-border);\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(225, 225, 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 calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n\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.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}\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: 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: -ms-inline-flexbox;\n display: inline-flex;\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: 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.UIZq8hTmJVU- ._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- ._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.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 display: none;\n}\n\n.Ku8sWS0mLew-.UIZq8hTmJVU- ._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
- var styles = {"wrapper":"nPGhTEEzsoU-","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-"};
20
+ var css_248z = ":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\n.geR7qBhrMfk- {\n width: 100%;\n}\n\n/**\n * Wrapper\n **/\n\n.nPGhTEEzsoU- {\n --field--placeholder-color: var(--color-greyBlue--light);\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-color: var(--color-heading);\n --field--value-lineHeight: calc(var(--base-unit) * 1.25);\n\n --field--border-color: var(--color-border);\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(225, 225, 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 calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n\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.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: 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: 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.UIZq8hTmJVU- ._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- ._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.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 display: none;\n}\n\n.Ku8sWS0mLew-.UIZq8hTmJVU- ._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
+ var styles = {"container":"geR7qBhrMfk-","wrapper":"nPGhTEEzsoU-","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);
23
23
 
24
24
  function AffixLabel({ label, variation = "prefix", labelRef, }) {
@@ -64,9 +64,11 @@ function FormFieldWrapper({ align, description, descriptionIdentifier, placehold
64
64
  [styles.select]: type === "select",
65
65
  [styles.invalid]: invalid !== null && invalid !== void 0 ? invalid : error,
66
66
  [styles.disabled]: disabled,
67
- [styles.inline]: inline,
68
67
  [styles.maxLength]: maxLength,
69
68
  });
69
+ const containerClasses = classnames__default["default"](styles.container, {
70
+ [styles.inline]: inline,
71
+ });
70
72
  const wrapperInlineStyle = {
71
73
  ["--formField-maxLength"]: maxLength || max,
72
74
  };
@@ -79,11 +81,13 @@ function FormFieldWrapper({ align, description, descriptionIdentifier, placehold
79
81
  React.useEffect(() => {
80
82
  setLabelStyle(getAffixPaddding);
81
83
  }, [value]);
82
- return (React__default["default"].createElement(React__default["default"].Fragment, null,
84
+ return (React__default["default"].createElement("div", { className: containerClasses },
83
85
  React__default["default"].createElement("div", { className: wrapperClasses, style: wrapperInlineStyle },
84
86
  (prefix === null || prefix === void 0 ? void 0 : prefix.icon) && React__default["default"].createElement(AffixIcon, Object.assign({}, prefix, { size: size })),
85
87
  React__default["default"].createElement("div", { className: styles.inputWrapper },
86
- React__default["default"].createElement("label", { className: styles.label, htmlFor: identifier, style: (prefixRef === null || prefixRef === void 0 ? void 0 : prefixRef.current) || (suffixRef === null || suffixRef === void 0 ? void 0 : suffixRef.current) ? labelStyle : undefined }, placeholder),
88
+ placeholder && (React__default["default"].createElement("label", { className: styles.label, htmlFor: identifier, style: (prefixRef === null || prefixRef === void 0 ? void 0 : prefixRef.current) || (suffixRef === null || suffixRef === void 0 ? void 0 : suffixRef.current)
89
+ ? labelStyle
90
+ : undefined }, placeholder)),
87
91
  (prefix === null || prefix === void 0 ? void 0 : prefix.label) && React__default["default"].createElement(AffixLabel, Object.assign({}, prefix, { labelRef: prefixRef })),
88
92
  React__default["default"].createElement("div", { className: styles.childrenWrapper }, children),
89
93
  (suffix === null || suffix === void 0 ? void 0 : suffix.label) && (React__default["default"].createElement(AffixLabel, Object.assign({}, suffix, { labelRef: suffixRef, variation: "suffix" })))),
@@ -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-090113ec.js');
7
+ var FormField = require('../FormField-0f880b07.js');
8
8
  var DatePicker = require('../DatePicker-38b0c40b.js');
9
9
  require('../tslib.es6-5b8768b7.js');
10
10
  require('uuid');
@@ -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-090113ec.js');
6
+ var FormField = require('../FormField-0f880b07.js');
7
7
  require('../tslib.es6-5b8768b7.js');
8
8
  require('uuid');
9
9
  require('react-hook-form');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputGroup = require('../InputGroup-34e64048.js');
5
+ var InputGroup = require('../InputGroup-3fdde16b.js');
6
6
  require('react');
7
7
  require('classnames');
8
8
  require('../style-inject.es-9d2f5f4e.js');
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
9
9
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
10
10
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
11
11
 
12
- var css_248z = "._4bvHwa3-qBA- > *:not(:last-child) {\n margin-bottom: -1px !important;\n}\n\n.bHm4WuX8ToY- {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n\n.bHm4WuX8ToY- > *:not(:last-child) {\n margin-bottom: auto;\n margin-right: -1px;\n}\n\n/* Border corners are rounded on the outside edges of the group */\n\n.nmDPgrXofeE- {\n --public-field--top-left-radius: 0;\n --public-field--top-right-radius: 0;\n --public-field--bottom-left-radius: 0;\n --public-field--bottom-right-radius: 0;\n}\n\n._4bvHwa3-qBA- > :first-child:not(.bHm4WuX8ToY-) {\n --public-field--top-left-radius: var(--radius-base);\n --public-field--top-right-radius: var(--radius-base);\n}\n\n._4bvHwa3-qBA- > :last-child:not(.bHm4WuX8ToY-) {\n --public-field--bottom-left-radius: var(--radius-base);\n --public-field--bottom-right-radius: var(--radius-base);\n}\n\n/* First Horizontal Input Group */\n\n.bHm4WuX8ToY-:first-child > :first-child {\n --public-field--top-left-radius: var(--radius-base);\n}\n\n.bHm4WuX8ToY-:first-child > :last-child {\n --public-field--top-right-radius: var(--radius-base);\n}\n\n/* Last Horizontal Input Group */\n\n.bHm4WuX8ToY-:last-child > :first-child {\n --public-field--bottom-left-radius: var(--radius-base);\n}\n\n.bHm4WuX8ToY-:last-child > :last-child {\n --public-field--bottom-right-radius: var(--radius-base);\n}\n";
12
+ var css_248z = "._4bvHwa3-qBA- > *:not(:last-child) {\n margin-bottom: -1px !important;\n}\n\n.bHm4WuX8ToY- {\n display: -ms-flexbox;\n display: flex;\n}\n\n.bHm4WuX8ToY- > *:not(:last-child) {\n margin-bottom: auto;\n margin-right: -1px;\n}\n\n/* Border corners are rounded on the outside edges of the group */\n\n.nmDPgrXofeE- {\n --public-field--top-left-radius: 0;\n --public-field--top-right-radius: 0;\n --public-field--bottom-left-radius: 0;\n --public-field--bottom-right-radius: 0;\n}\n\n._4bvHwa3-qBA- > :first-child:not(.bHm4WuX8ToY-) {\n --public-field--top-left-radius: var(--radius-base);\n --public-field--top-right-radius: var(--radius-base);\n}\n\n._4bvHwa3-qBA- > :last-child:not(.bHm4WuX8ToY-) {\n --public-field--bottom-left-radius: var(--radius-base);\n --public-field--bottom-right-radius: var(--radius-base);\n}\n\n/* First Horizontal Input Group */\n\n.bHm4WuX8ToY-:first-child > :first-child {\n --public-field--top-left-radius: var(--radius-base);\n}\n\n.bHm4WuX8ToY-:first-child > :last-child {\n --public-field--top-right-radius: var(--radius-base);\n}\n\n/* Last Horizontal Input Group */\n\n.bHm4WuX8ToY-:last-child > :first-child {\n --public-field--bottom-left-radius: var(--radius-base);\n}\n\n.bHm4WuX8ToY-:last-child > :last-child {\n --public-field--bottom-right-radius: var(--radius-base);\n}\n";
13
13
  var styles = {"vertical":"_4bvHwa3-qBA-","horizontal":"bHm4WuX8ToY-","inputGroup":"nmDPgrXofeE-"};
14
14
  styleInject_es.styleInject(css_248z);
15
15
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputNumber = require('../InputNumber-80a381e9.js');
5
+ var InputNumber = require('../InputNumber-49873d31.js');
6
6
  require('react');
7
- require('../FormField-090113ec.js');
7
+ require('../FormField-0f880b07.js');
8
8
  require('../tslib.es6-5b8768b7.js');
9
9
  require('uuid');
10
10
  require('react-hook-form');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var FormField = require('./FormField-090113ec.js');
4
+ var FormField = require('./FormField-0f880b07.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-090113ec.js');
6
+ var FormField = require('../FormField-0f880b07.js');
7
7
  require('../tslib.es6-5b8768b7.js');
8
8
  require('uuid');
9
9
  require('react-hook-form');
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-5b8768b7.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-090113ec.js');
9
+ var FormField = require('../FormField-0f880b07.js');
10
10
  require('uuid');
11
11
  require('classnames');
12
12
  require('../Button-7698424c.js');
@@ -7,6 +7,7 @@ export interface InputTextRef {
7
7
  insert(text: string): void;
8
8
  blur(): void;
9
9
  focus(): void;
10
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
10
11
  }
11
12
  export declare const InputText: React.ForwardRefExoticComponent<({
12
13
  readonly multiline: true;
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var InputText = require('../InputText-e9b345ff.js');
5
+ var InputText = require('../InputText-bb03f6d1.js');
6
6
  require('react');
7
- require('../FormField-090113ec.js');
7
+ require('../FormField-0f880b07.js');
8
8
  require('../tslib.es6-5b8768b7.js');
9
9
  require('uuid');
10
10
  require('react-hook-form');
@@ -1,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var FormField = require('./FormField-090113ec.js');
4
+ var FormField = require('./FormField-0f880b07.js');
5
5
 
6
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
7
 
8
8
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
9
9
 
10
10
  function InputTextInternal(props, ref) {
11
- const inputRef = React.createRef();
12
- const actionsRef = React.createRef();
11
+ const inputRef = React.useRef(null);
12
+ const actionsRef = React.useRef(null);
13
13
  const rowRange = getRowRange();
14
14
  React.useImperativeHandle(ref, () => ({
15
15
  insert: (text) => {
@@ -27,6 +27,12 @@ function InputTextInternal(props, ref) {
27
27
  input.focus();
28
28
  }
29
29
  },
30
+ scrollIntoView: arg => {
31
+ const input = inputRef.current;
32
+ if (input) {
33
+ input.scrollIntoView(arg);
34
+ }
35
+ },
30
36
  }));
31
37
  React.useLayoutEffect(() => {
32
38
  if (inputRef && inputRef.current instanceof HTMLTextAreaElement) {
@@ -6,7 +6,7 @@ var tslib_es6 = require('../tslib.es6-5b8768b7.js');
6
6
  var React = require('react');
7
7
  var debounce = require('lodash/debounce');
8
8
  var temporal = require('@std-proposal/temporal');
9
- var FormField = require('../FormField-090113ec.js');
9
+ var FormField = require('../FormField-0f880b07.js');
10
10
  require('uuid');
11
11
  require('react-hook-form');
12
12
  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-090113ec.js');
4
+ var FormField = require('./FormField-0f880b07.js');
5
5
 
6
6
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
7
7
 
@@ -1,34 +1,47 @@
1
- import { PropsWithChildren } from "react";
1
+ import { ReactNode } from "react";
2
2
  import { XOR } from "ts-xor";
3
- interface BaseRadioOptions {
3
+ interface BaseRadioOptionProps {
4
+ /**
5
+ * The value of the radio button.
6
+ */
4
7
  readonly value: string | number;
8
+ /**
9
+ * Disables the radio button.
10
+ */
5
11
  readonly disabled?: boolean;
6
- }
7
- interface RadioOptionsWithDescription extends BaseRadioOptions {
12
+ /**
13
+ * Further description of the label.
14
+ */
15
+ readonly description?: string;
8
16
  /**
9
17
  * The label to appear beside the radio button.
10
18
  */
11
- label: string;
19
+ readonly label?: string;
12
20
  /**
13
- * Further description of the label.
21
+ * Render a custom label or additional content below the `label`
22
+ * and `description`.
23
+ *
24
+ * Prefer using `label` and `description` over adding child elements if the
25
+ * content of either would be a string.
14
26
  */
15
- description?: string;
27
+ readonly children?: ReactNode;
16
28
  }
17
- type RadioOptionProps = XOR<RadioOptionsWithDescription, PropsWithChildren<BaseRadioOptions>>;
29
+ interface WithRequiredChildren extends BaseRadioOptionProps {
30
+ readonly children: ReactNode;
31
+ }
32
+ interface WithRequiredLabel extends BaseRadioOptionProps {
33
+ readonly label: string;
34
+ }
35
+ type RadioOptionProps = XOR<WithRequiredChildren, WithRequiredLabel>;
18
36
  /**
19
37
  * For rendering props only. To make updates to
20
38
  * the real RadioOption, look at InternalRadioOption
21
39
  */
22
- export declare function RadioOption({ children }: PropsWithChildren<RadioOptionProps>): JSX.Element;
23
- interface BaseInternalRadioOptions extends BaseRadioOptions {
40
+ export declare function RadioOption({ children }: RadioOptionProps): JSX.Element;
41
+ interface InternalRadioOptionProps extends BaseRadioOptionProps {
24
42
  readonly name: string;
25
43
  readonly checked: boolean;
26
44
  onChange(newValue: string | number): void;
27
45
  }
28
- interface InternalRadioOptionsWithDescription extends BaseInternalRadioOptions {
29
- label: string;
30
- description?: string;
31
- }
32
- type InternalRadioOptionProps = XOR<InternalRadioOptionsWithDescription, PropsWithChildren<BaseInternalRadioOptions>>;
33
- export declare function InternalRadioOption({ value, name, label, description, disabled, checked, children, onChange, }: PropsWithChildren<InternalRadioOptionProps>): JSX.Element;
46
+ export declare function InternalRadioOption({ value, name, label, description, disabled, checked, children, onChange, }: InternalRadioOptionProps): JSX.Element;
34
47
  export {};
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var RadioGroup = require('../RadioGroup-67a5f560.js');
5
+ var RadioGroup = require('../RadioGroup-8e76d20b.js');
6
6
  require('react');
7
7
  require('uuid');
8
8
  require('../style-inject.es-9d2f5f4e.js');
@@ -9,8 +9,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
9
9
 
10
10
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
11
11
 
12
- var css_248z = "._5P8wEHDUdKY- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n._08ZPdlE98Ko- {\n /* Hide checkbox on UI but not screen readers and still allow focus state */\n position: absolute;\n left: -999vw;\n}\n\n.-PUoLXltVlQ- {\n display: -ms-inline-flexbox;\n display: inline-flex;\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 cursor: pointer;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n._08ZPdlE98Ko- + .-PUoLXltVlQ-::before {\n content: \"\";\n display: block;\n width: calc(16px * 1);\n width: var(--space-base);\n height: calc(16px * 1);\n height: var(--space-base);\n box-sizing: border-box;\n margin: calc(16px / 8) calc(16px / 2) 0 0;\n margin: var(--space-smallest) var(--space-small) 0 0;\n border: calc(16px / 8) solid rgb(125, 176, 14);\n border: var(--border-thick) solid var(--color-interactive);\n border-radius: 100%;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n transition: all 200ms;\n transition: all var(--timing-base);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n._08ZPdlE98Ko-:focus + .-PUoLXltVlQ-:before {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n\n._08ZPdlE98Ko-:focus:checked + .-PUoLXltVlQ-:before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(81, 114, 9),\n 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-interactive--hover),\n var(--shadow-focus);\n}\n\n._08ZPdlE98Ko-:checked + .-PUoLXltVlQ-::before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(81, 114, 9);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-interactive--hover);\n border-color: rgb(81, 114, 9);\n border-color: var(--color-interactive--hover);\n border-width: calc(16px / 4);\n border-width: var(--border-thicker);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ- {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n cursor: not-allowed;\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ-::before {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n}\n\n._08ZPdlE98Ko-[disabled]:checked + .-PUoLXltVlQ-::before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(181, 181, 181);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-disabled);\n border-color: rgb(181, 181, 181);\n border-color: var(--color-grey);\n background-color: rgb(225, 225, 225);\n background-color: var(--color-disabled--secondary);\n}\n\n._8r6qT-6S9EI- {\n margin-bottom: calc(16px / 2);\n margin-bottom: var(--space-small);\n padding-left: calc(16px * 1.5);\n padding-left: var(--space-large);\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ- + ._8r6qT-6S9EI- > p {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n}\n";
13
- var styles = {"radioGroup":"_5P8wEHDUdKY-","input":"_08ZPdlE98Ko-","label":"-PUoLXltVlQ-","description":"_8r6qT-6S9EI-"};
12
+ var css_248z = "._5P8wEHDUdKY- {\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n\n._08ZPdlE98Ko- {\n /* Hide checkbox on UI but not screen readers and still allow focus state */\n position: absolute;\n left: -999vw;\n}\n\n.-PUoLXltVlQ- {\n display: -ms-inline-flexbox;\n display: inline-flex;\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 cursor: pointer;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n\n._08ZPdlE98Ko- + .-PUoLXltVlQ-::before {\n content: \"\";\n display: block;\n width: calc(16px * 1);\n width: var(--space-base);\n height: calc(16px * 1);\n height: var(--space-base);\n box-sizing: border-box;\n margin: calc(16px / 8) calc(16px / 2) 0 0;\n margin: var(--space-smallest) var(--space-small) 0 0;\n border: calc(16px / 8) solid rgb(125, 176, 14);\n border: var(--border-thick) solid var(--color-interactive);\n border-radius: 100%;\n background-color: rgba(255, 255, 255, 1);\n background-color: var(--color-surface);\n transition: all 200ms;\n transition: all var(--timing-base);\n -ms-flex-negative: 0;\n flex-shrink: 0;\n}\n\n._08ZPdlE98Ko-:focus + .-PUoLXltVlQ-:before {\n box-shadow: 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: var(--shadow-focus);\n}\n\n._08ZPdlE98Ko-:focus:checked + .-PUoLXltVlQ-:before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(81, 114, 9),\n 0px 0px calc(16px / 4) calc(16px / 8)\n rgb(231, 213, 87);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-interactive--hover),\n var(--shadow-focus);\n}\n\n._08ZPdlE98Ko-:checked + .-PUoLXltVlQ-::before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(81, 114, 9);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-interactive--hover);\n border-color: rgb(81, 114, 9);\n border-color: var(--color-interactive--hover);\n border-width: calc(16px / 4);\n border-width: var(--border-thicker);\n background-color: rgb(125, 176, 14);\n background-color: var(--color-interactive);\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ- {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n cursor: not-allowed;\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ-::before {\n border-color: rgb(225, 225, 225);\n border-color: var(--color-disabled--secondary);\n}\n\n._08ZPdlE98Ko-[disabled]:checked + .-PUoLXltVlQ-::before {\n box-shadow: 0px 0px 0px calc(16px / 16) rgb(181, 181, 181);\n box-shadow: 0px 0px 0px var(--space-minuscule) var(--color-disabled);\n border-color: rgb(181, 181, 181);\n border-color: var(--color-grey);\n background-color: rgb(225, 225, 225);\n background-color: var(--color-disabled--secondary);\n}\n\n._8r6qT-6S9EI-,\n.C5SzbO1epLk- {\n margin-bottom: calc(16px / 2);\n margin-bottom: var(--space-small);\n padding-left: calc(16px * 1.5);\n padding-left: var(--space-large);\n}\n\n._08ZPdlE98Ko-[disabled] + .-PUoLXltVlQ- + ._8r6qT-6S9EI- > p {\n color: rgb(181, 181, 181);\n color: var(--color-disabled);\n}\n";
13
+ var styles = {"radioGroup":"_5P8wEHDUdKY-","input":"_08ZPdlE98Ko-","label":"-PUoLXltVlQ-","description":"_8r6qT-6S9EI-","children":"C5SzbO1epLk-"};
14
14
  styleInject_es.styleInject(css_248z);
15
15
 
16
16
  /**
@@ -22,11 +22,13 @@ function RadioOption({ children }) {
22
22
  }
23
23
  function InternalRadioOption({ value, name, label, description, disabled, checked, children, onChange, }) {
24
24
  const inputId = `${value.toString()}_${uuid.v1()}`;
25
+ const shouldRenderIndependentChildren = label && children;
25
26
  return (React__default["default"].createElement("div", null,
26
27
  React__default["default"].createElement("input", { onChange: handleChange, type: "radio", name: name, value: value, disabled: disabled, checked: checked, id: inputId, className: styles.input, "aria-describedby": description ? `${inputId}_description` : undefined }),
27
28
  React__default["default"].createElement("label", { className: styles.label, htmlFor: inputId }, label ? label : children),
28
29
  description && (React__default["default"].createElement("div", { className: styles.description, id: `${inputId}_description` },
29
- React__default["default"].createElement(Text.Text, { variation: "subdued", size: "small" }, description)))));
30
+ React__default["default"].createElement(Text.Text, { variation: "subdued", size: "small" }, description))),
31
+ shouldRenderIndependentChildren && (React__default["default"].createElement("div", { className: styles.children, id: `${inputId}_children` }, children))));
30
32
  function handleChange() {
31
33
  onChange(value);
32
34
  }
@@ -5,15 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var React = require('react');
6
6
  var uuid = require('uuid');
7
7
  var styleInject_es = require('../style-inject.es-9d2f5f4e.js');
8
- var RadioGroup = require('../RadioGroup-67a5f560.js');
8
+ var RadioGroup = require('../RadioGroup-8e76d20b.js');
9
9
  var Text = require('../Text-e7ed0974.js');
10
10
  require('classnames');
11
11
  require('../Typography-fd6f932a.js');
12
- var Option = require('../Option-8277f540.js');
13
- var InputNumber = require('../InputNumber-80a381e9.js');
14
- var InputGroup = require('../InputGroup-34e64048.js');
12
+ var Option = require('../Option-63267b27.js');
13
+ var InputNumber = require('../InputNumber-49873d31.js');
14
+ var InputGroup = require('../InputGroup-3fdde16b.js');
15
15
  var Content = require('../Content-a6590328.js');
16
- require('../FormField-090113ec.js');
16
+ require('../FormField-0f880b07.js');
17
17
  require('../tslib.es6-5b8768b7.js');
18
18
  require('react-hook-form');
19
19
  require('../Button-7698424c.js');
@@ -2,9 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Option = require('../Option-8277f540.js');
5
+ var Option = require('../Option-63267b27.js');
6
6
  require('react');
7
- require('../FormField-090113ec.js');
7
+ require('../FormField-0f880b07.js');
8
8
  require('../tslib.es6-5b8768b7.js');
9
9
  require('uuid');
10
10
  require('react-hook-form');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "4.24.1",
3
+ "version": "4.24.2-JOB-69677.5+458783b0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@jobber/design": "^0.44.4",
23
- "@jobber/formatters": "*",
23
+ "@jobber/formatters": "^0.2.2",
24
24
  "@jobber/hooks": "^2.1.5",
25
25
  "@popperjs/core": "^2.0.6",
26
26
  "@std-proposal/temporal": "0.0.1",
@@ -83,5 +83,5 @@
83
83
  "> 1%",
84
84
  "IE 10"
85
85
  ],
86
- "gitHead": "b464a5ae9d3305c1dc1b92d99dc93bd042fefb7f"
86
+ "gitHead": "458783b0d37ec33792bbda6c681a0c76635eeb6b"
87
87
  }