@jobber/components 6.63.3 → 6.64.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.
@@ -3,6 +3,9 @@ export declare enum FileTypes {
3
3
  JPG = "image/jpg",
4
4
  PNG = "image/png",
5
5
  HEIC = "image/heic",
6
+ WEBP = "image/webp",
7
+ GIF = "image/gif",
8
+ AVIF = "image/avif",
6
9
  PDF = "application/pdf",
7
10
  DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
8
11
  XLSX = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -1448,6 +1448,9 @@ var FileTypes;
1448
1448
  FileTypes["JPG"] = "image/jpg";
1449
1449
  FileTypes["PNG"] = "image/png";
1450
1450
  FileTypes["HEIC"] = "image/heic";
1451
+ FileTypes["WEBP"] = "image/webp";
1452
+ FileTypes["GIF"] = "image/gif";
1453
+ FileTypes["AVIF"] = "image/avif";
1451
1454
  FileTypes["PDF"] = "application/pdf";
1452
1455
  FileTypes["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1453
1456
  FileTypes["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
@@ -1446,6 +1446,9 @@ var FileTypes;
1446
1446
  FileTypes["JPG"] = "image/jpg";
1447
1447
  FileTypes["PNG"] = "image/png";
1448
1448
  FileTypes["HEIC"] = "image/heic";
1449
+ FileTypes["WEBP"] = "image/webp";
1450
+ FileTypes["GIF"] = "image/gif";
1451
+ FileTypes["AVIF"] = "image/avif";
1449
1452
  FileTypes["PDF"] = "application/pdf";
1450
1453
  FileTypes["DOCX"] = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
1451
1454
  FileTypes["XLSX"] = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
@@ -209,8 +209,9 @@ function InputTimeRebuilt(_a) {
209
209
  handleChange,
210
210
  });
211
211
  const { inputStyle } = FormField.useFormFieldWrapperStyles(params);
212
+ const wrapperRef = React.useRef(null);
212
213
  const id = getId(params);
213
- return (React.createElement(FormField.FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, clearable: (_c = params.clearable) !== null && _c !== void 0 ? _c : "never", onClear: handleClear, type: "time", readonly: params.readonly, placeholder: params.placeholder, value: dateToTimeString(value) },
214
+ return (React.createElement(FormField.FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, clearable: (_c = params.clearable) !== null && _c !== void 0 ? _c : "never", onClear: handleClear, type: "time", readonly: params.readonly, placeholder: params.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
214
215
  React.createElement("input", { ref: ref, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, id: id, disabled: params.disabled, readOnly: params.readonly, onChange: handleChangeEvent, onFocus: handleFocus, "data-testid": "ATL-InputTime-input", onKeyUp: e => {
215
216
  if (params.disabled || params.readonly)
216
217
  return;
@@ -250,13 +251,14 @@ function InputTimeRebuilt(_a) {
250
251
  function InputTime$1(_a) {
251
252
  var { defaultValue, value, onChange } = _a, params = tslib_es6.__rest(_a, ["defaultValue", "value", "onChange"]);
252
253
  const ref = React.useRef(null);
254
+ const wrapperRef = React.useRef(null);
253
255
  const { setTypedTime } = useTimePredict({ value, handleChange });
254
256
  const fieldProps = omit.omit(Object.assign(Object.assign(Object.assign({ onChange: handleChange }, (defaultValue && { defaultValue: dateToTimeString(defaultValue) })), (!defaultValue && { value: dateToTimeString(value) })), params), ["version"]);
255
257
  return (React.createElement(FormField.FormField, Object.assign({ inputRef: ref, type: "time" }, fieldProps, { onBlur: handleBlur, onKeyUp: e => {
256
258
  var _a;
257
259
  (_a = fieldProps.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(fieldProps, e);
258
260
  !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
259
- } })));
261
+ }, wrapperRef: wrapperRef })));
260
262
  function handleChange(newValue) {
261
263
  onChange === null || onChange === void 0 ? void 0 : onChange(timeStringToDate(newValue));
262
264
  }
@@ -207,8 +207,9 @@ function InputTimeRebuilt(_a) {
207
207
  handleChange,
208
208
  });
209
209
  const { inputStyle } = useFormFieldWrapperStyles(params);
210
+ const wrapperRef = React__default.useRef(null);
210
211
  const id = getId(params);
211
- return (React__default.createElement(FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, clearable: (_c = params.clearable) !== null && _c !== void 0 ? _c : "never", onClear: handleClear, type: "time", readonly: params.readonly, placeholder: params.placeholder, value: dateToTimeString(value) },
212
+ return (React__default.createElement(FormFieldWrapper, { disabled: params.disabled, size: params.size, align: params.align, inline: params.inline, name: params.name, error: params.error || "", identifier: id, descriptionIdentifier: `descriptionUUID--${id}`, invalid: Boolean(params.invalid), description: params.description, clearable: (_c = params.clearable) !== null && _c !== void 0 ? _c : "never", onClear: handleClear, type: "time", readonly: params.readonly, placeholder: params.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
212
213
  React__default.createElement("input", { ref: ref, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, id: id, disabled: params.disabled, readOnly: params.readonly, onChange: handleChangeEvent, onFocus: handleFocus, "data-testid": "ATL-InputTime-input", onKeyUp: e => {
213
214
  if (params.disabled || params.readonly)
214
215
  return;
@@ -248,13 +249,14 @@ function InputTimeRebuilt(_a) {
248
249
  function InputTime$1(_a) {
249
250
  var { defaultValue, value, onChange } = _a, params = __rest(_a, ["defaultValue", "value", "onChange"]);
250
251
  const ref = useRef(null);
252
+ const wrapperRef = useRef(null);
251
253
  const { setTypedTime } = useTimePredict({ value, handleChange });
252
254
  const fieldProps = omit(Object.assign(Object.assign(Object.assign({ onChange: handleChange }, (defaultValue && { defaultValue: dateToTimeString(defaultValue) })), (!defaultValue && { value: dateToTimeString(value) })), params), ["version"]);
253
255
  return (React__default.createElement(FormField, Object.assign({ inputRef: ref, type: "time" }, fieldProps, { onBlur: handleBlur, onKeyUp: e => {
254
256
  var _a;
255
257
  (_a = fieldProps.onKeyUp) === null || _a === void 0 ? void 0 : _a.call(fieldProps, e);
256
258
  !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
257
- } })));
259
+ }, wrapperRef: wrapperRef })));
258
260
  function handleChange(newValue) {
259
261
  onChange === null || onChange === void 0 ? void 0 : onChange(timeStringToDate(newValue));
260
262
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.63.3",
3
+ "version": "6.64.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -542,5 +542,5 @@
542
542
  "> 1%",
543
543
  "IE 10"
544
544
  ],
545
- "gitHead": "d56a2ccd266e490f2a4ebce54a5fa9fc90437f5e"
545
+ "gitHead": "33eceb2f5045af7c89bad1e5faaeb49f02d0e07b"
546
546
  }