@jobber/components 6.63.1 → 6.63.3

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,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var styles = {"wrapper":"v3oESmhykhE-","titleContainer":"KuG6k-a5jEM-","headerFilters":"E0wzULGeIvs-","headerTitles":"TzEnOGRRd8g-","batchSelectContainer":"DvRzj3qOLCk-","headerBatchSelect":"pmQV-ZYKQMg-","listItem":"i-w6mU9puzE-","listItemClickable":"Hx3I3kI1E7Q-","active":"eCAyzR-N1Xk-","selectable":"zvpLQa7hDp0-","selectAllCheckbox":"_8fx-1j3wk2E-","visible":"VaDzSy52w-w-","selected":"_0qmb-Daumfs-","filtering":"Xl0eCv2fMNM-","filteringSpinner":"t9txZ5-Upp4-","srOnly":"HBTfumId4rA-","spinning":"_8Bw0FhmP0Mk-"};
3
+ var styles = {"wrapper":"v3oESmhykhE-","titleContainer":"KuG6k-a5jEM-","headerFilters":"E0wzULGeIvs-","headerTitles":"TzEnOGRRd8g-","batchSelectContainer":"DvRzj3qOLCk-","headerBatchSelect":"pmQV-ZYKQMg-","listItem":"i-w6mU9puzE-","listItemClickable":"Hx3I3kI1E7Q-","active":"eCAyzR-N1Xk-","selectable":"zvpLQa7hDp0-","selectAllCheckbox":"_8fx-1j3wk2E-","selected":"_0qmb-Daumfs-","filtering":"Xl0eCv2fMNM-","filteringSpinner":"t9txZ5-Upp4-","srOnly":"HBTfumId4rA-","spinning":"_8Bw0FhmP0Mk-"};
4
4
 
5
5
  exports.styles = styles;
@@ -1,3 +1,3 @@
1
- var styles = {"wrapper":"v3oESmhykhE-","titleContainer":"KuG6k-a5jEM-","headerFilters":"E0wzULGeIvs-","headerTitles":"TzEnOGRRd8g-","batchSelectContainer":"DvRzj3qOLCk-","headerBatchSelect":"pmQV-ZYKQMg-","listItem":"i-w6mU9puzE-","listItemClickable":"Hx3I3kI1E7Q-","active":"eCAyzR-N1Xk-","selectable":"zvpLQa7hDp0-","selectAllCheckbox":"_8fx-1j3wk2E-","visible":"VaDzSy52w-w-","selected":"_0qmb-Daumfs-","filtering":"Xl0eCv2fMNM-","filteringSpinner":"t9txZ5-Upp4-","srOnly":"HBTfumId4rA-","spinning":"_8Bw0FhmP0Mk-"};
1
+ var styles = {"wrapper":"v3oESmhykhE-","titleContainer":"KuG6k-a5jEM-","headerFilters":"E0wzULGeIvs-","headerTitles":"TzEnOGRRd8g-","batchSelectContainer":"DvRzj3qOLCk-","headerBatchSelect":"pmQV-ZYKQMg-","listItem":"i-w6mU9puzE-","listItemClickable":"Hx3I3kI1E7Q-","active":"eCAyzR-N1Xk-","selectable":"zvpLQa7hDp0-","selectAllCheckbox":"_8fx-1j3wk2E-","selected":"_0qmb-Daumfs-","filtering":"Xl0eCv2fMNM-","filteringSpinner":"t9txZ5-Upp4-","srOnly":"HBTfumId4rA-","spinning":"_8Bw0FhmP0Mk-"};
2
2
 
3
3
  export { styles as s };
@@ -27,9 +27,9 @@ function DataListHeaderCheckbox({ children }) {
27
27
  const deselectText = sm ? "Deselect All" : "Deselect";
28
28
  const selectedLabel = selectedCount ? `${selectedCount} selected` : "";
29
29
  return (React.createElement("div", { className: DataList_module.styles.selectable },
30
- React.createElement("div", { "data-testid": DATA_LIST_HEADER_CHECKBOX_TEST_ID, className: classnames(DataList_module.styles.selectAllCheckbox, {
31
- [DataList_module.styles.visible]: canSelectAll,
32
- }) },
30
+ React.createElement("div", { "data-testid": DATA_LIST_HEADER_CHECKBOX_TEST_ID, style: {
31
+ visibility: canSelectAll ? "visible" : "hidden",
32
+ }, className: classnames(DataList_module.styles.selectAllCheckbox) },
33
33
  React.createElement(Checkbox_index.Checkbox, { checked: isAllSelected(), indeterminate: isIndeterminate(), onChange: handleSelectAll },
34
34
  React.createElement("div", { className: DataList_module.styles.srOnly }, selectedLabel))),
35
35
  React.createElement(ColumnHeaderContent, { canSelectAll: canSelectAll, hasAtLeastOneSelected: hasAtLeastOneSelected, selectedCount: selectedCount, deselectText: deselectText, onSelect: onSelect }, children)));
@@ -25,9 +25,9 @@ function DataListHeaderCheckbox({ children }) {
25
25
  const deselectText = sm ? "Deselect All" : "Deselect";
26
26
  const selectedLabel = selectedCount ? `${selectedCount} selected` : "";
27
27
  return (React__default.createElement("div", { className: styles.selectable },
28
- React__default.createElement("div", { "data-testid": DATA_LIST_HEADER_CHECKBOX_TEST_ID, className: classnames(styles.selectAllCheckbox, {
29
- [styles.visible]: canSelectAll,
30
- }) },
28
+ React__default.createElement("div", { "data-testid": DATA_LIST_HEADER_CHECKBOX_TEST_ID, style: {
29
+ visibility: canSelectAll ? "visible" : "hidden",
30
+ }, className: classnames(styles.selectAllCheckbox) },
31
31
  React__default.createElement(Checkbox, { checked: isAllSelected(), indeterminate: isIndeterminate(), onChange: handleSelectAll },
32
32
  React__default.createElement("div", { className: styles.srOnly }, selectedLabel))),
33
33
  React__default.createElement(ColumnHeaderContent, { canSelectAll: canSelectAll, hasAtLeastOneSelected: hasAtLeastOneSelected, selectedCount: selectedCount, deselectText: deselectText, onSelect: onSelect }, children)));
@@ -126,25 +126,24 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
126
126
  };
127
127
  }
128
128
 
129
- const InputDateRebuilt = React.forwardRef(function InputDateInternal(props, inputRefs) {
129
+ const InputDateRebuilt = React.forwardRef((props, forwardedRef) => {
130
130
  const { onChange } = props;
131
131
  return (React.createElement(DatePicker.DatePicker, { selected: props.value, onChange: newValue => {
132
132
  onChange(newValue);
133
133
  }, disabled: props.disabled, readonly: props.readOnly, fullWidth: !props.inline, minDate: props.minDate, maxDate: props.maxDate, smartAutofocus: false, activator: InputDateActivator }));
134
134
  function InputDateActivator(activatorProps) {
135
135
  const { onClick, value } = activatorProps;
136
- const newActivatorProps = omit.omit(activatorProps, ["activator", "fullWidth"]);
137
136
  const { handleChange, handleFocus, handleBlur, isFocused } = useInputDateActivatorActions({
138
- onChange: newActivatorProps.onChange,
137
+ onChange: activatorProps.onChange,
139
138
  onFocus: event => {
140
139
  var _a, _b;
141
140
  (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, event);
142
- (_b = newActivatorProps.onFocus) === null || _b === void 0 ? void 0 : _b.call(newActivatorProps);
141
+ (_b = activatorProps.onFocus) === null || _b === void 0 ? void 0 : _b.call(activatorProps);
143
142
  },
144
143
  onBlur: event => {
145
144
  var _a, _b;
146
145
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, event);
147
- (_b = newActivatorProps.onBlur) === null || _b === void 0 ? void 0 : _b.call(newActivatorProps);
146
+ (_b = activatorProps.onBlur) === null || _b === void 0 ? void 0 : _b.call(activatorProps);
148
147
  },
149
148
  });
150
149
  const suffix = props.showIcon !== false
@@ -158,15 +157,16 @@ const InputDateRebuilt = React.forwardRef(function InputDateInternal(props, inpu
158
157
  return (
159
158
  // 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
160
159
  React.createElement("div", { onClick: onClick },
161
- React.createElement(InputText_index.InputText, Object.assign({}, newActivatorProps, props, { version: 2, value: showEmptyValueLabel ? props.emptyValueLabel || "" : value || "", ref: inputRefs, suffix: suffix, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: event => {
160
+ React.createElement(InputText_index.InputText, { "aria-describedby": activatorProps.ariaDescribedBy, "aria-invalid": activatorProps.ariaInvalid === "true" ? true : false, "aria-labelledby": activatorProps.ariaLabelledBy, "aria-required": activatorProps.ariaRequired === "true" ? true : false, id: activatorProps.id, disabled: props.disabled, error: props.error, readOnly: props.readOnly, placeholder: props.placeholder, size: props.size, inline: props.inline, align: props.align, description: props.description, invalid: props.invalid, name: props.name, version: 2, value: showEmptyValueLabel ? props.emptyValueLabel || "" : value || "", ref: forwardedRef, suffix: suffix, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: event => {
162
161
  var _a, _b;
163
162
  if (props.showIcon === false && event.key === "ArrowDown") {
164
163
  (_a = activatorProps.onClick) === null || _a === void 0 ? void 0 : _a.call(activatorProps);
165
164
  }
166
165
  (_b = props.onKeyDown) === null || _b === void 0 ? void 0 : _b.call(props, event);
167
- }, onChange: handleChange }))));
166
+ }, onChange: handleChange })));
168
167
  }
169
168
  });
169
+ InputDateRebuilt.displayName = "InputDateRebuilt";
170
170
 
171
171
  function isNewInputDateProps(props) {
172
172
  return props.version === 2;
@@ -124,25 +124,24 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
124
124
  };
125
125
  }
126
126
 
127
- const InputDateRebuilt = forwardRef(function InputDateInternal(props, inputRefs) {
127
+ const InputDateRebuilt = forwardRef((props, forwardedRef) => {
128
128
  const { onChange } = props;
129
129
  return (React__default.createElement(DatePicker, { selected: props.value, onChange: newValue => {
130
130
  onChange(newValue);
131
131
  }, disabled: props.disabled, readonly: props.readOnly, fullWidth: !props.inline, minDate: props.minDate, maxDate: props.maxDate, smartAutofocus: false, activator: InputDateActivator }));
132
132
  function InputDateActivator(activatorProps) {
133
133
  const { onClick, value } = activatorProps;
134
- const newActivatorProps = omit(activatorProps, ["activator", "fullWidth"]);
135
134
  const { handleChange, handleFocus, handleBlur, isFocused } = useInputDateActivatorActions({
136
- onChange: newActivatorProps.onChange,
135
+ onChange: activatorProps.onChange,
137
136
  onFocus: event => {
138
137
  var _a, _b;
139
138
  (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, event);
140
- (_b = newActivatorProps.onFocus) === null || _b === void 0 ? void 0 : _b.call(newActivatorProps);
139
+ (_b = activatorProps.onFocus) === null || _b === void 0 ? void 0 : _b.call(activatorProps);
141
140
  },
142
141
  onBlur: event => {
143
142
  var _a, _b;
144
143
  (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, event);
145
- (_b = newActivatorProps.onBlur) === null || _b === void 0 ? void 0 : _b.call(newActivatorProps);
144
+ (_b = activatorProps.onBlur) === null || _b === void 0 ? void 0 : _b.call(activatorProps);
146
145
  },
147
146
  });
148
147
  const suffix = props.showIcon !== false
@@ -156,15 +155,16 @@ const InputDateRebuilt = forwardRef(function InputDateInternal(props, inputRefs)
156
155
  return (
157
156
  // 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
158
157
  React__default.createElement("div", { onClick: onClick },
159
- React__default.createElement(InputText, Object.assign({}, newActivatorProps, props, { version: 2, value: showEmptyValueLabel ? props.emptyValueLabel || "" : value || "", ref: inputRefs, suffix: suffix, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: event => {
158
+ React__default.createElement(InputText, { "aria-describedby": activatorProps.ariaDescribedBy, "aria-invalid": activatorProps.ariaInvalid === "true" ? true : false, "aria-labelledby": activatorProps.ariaLabelledBy, "aria-required": activatorProps.ariaRequired === "true" ? true : false, id: activatorProps.id, disabled: props.disabled, error: props.error, readOnly: props.readOnly, placeholder: props.placeholder, size: props.size, inline: props.inline, align: props.align, description: props.description, invalid: props.invalid, name: props.name, version: 2, value: showEmptyValueLabel ? props.emptyValueLabel || "" : value || "", ref: forwardedRef, suffix: suffix, onFocus: handleFocus, onBlur: handleBlur, onKeyDown: event => {
160
159
  var _a, _b;
161
160
  if (props.showIcon === false && event.key === "ArrowDown") {
162
161
  (_a = activatorProps.onClick) === null || _a === void 0 ? void 0 : _a.call(activatorProps);
163
162
  }
164
163
  (_b = props.onKeyDown) === null || _b === void 0 ? void 0 : _b.call(props, event);
165
- }, onChange: handleChange }))));
164
+ }, onChange: handleChange })));
166
165
  }
167
166
  });
167
+ InputDateRebuilt.displayName = "InputDateRebuilt";
168
168
 
169
169
  function isNewInputDateProps(props) {
170
170
  return props.version === 2;
@@ -211,7 +211,7 @@ function InputTimeRebuilt(_a) {
211
211
  const { inputStyle } = FormField.useFormFieldWrapperStyles(params);
212
212
  const id = getId(params);
213
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
- React.createElement("input", { ref: ref, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, disabled: params.disabled, readOnly: params.readonly, onChange: handleChangeEvent, onFocus: handleFocus, "data-testid": "ATL-InputTime-input", onKeyUp: e => {
214
+ 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
215
  if (params.disabled || params.readonly)
216
216
  return;
217
217
  !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
@@ -209,7 +209,7 @@ function InputTimeRebuilt(_a) {
209
209
  const { inputStyle } = useFormFieldWrapperStyles(params);
210
210
  const id = getId(params);
211
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
- React__default.createElement("input", { ref: ref, type: "time", name: params.name, className: inputStyle, onBlur: handleBlur, disabled: params.disabled, readOnly: params.readonly, onChange: handleChangeEvent, onFocus: handleFocus, "data-testid": "ATL-InputTime-input", onKeyUp: e => {
212
+ 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
213
  if (params.disabled || params.readonly)
214
214
  return;
215
215
  !isNaN(parseInt(e.key, 10)) && setTypedTime(prev => prev + e.key);
package/dist/styles.css CHANGED
@@ -4879,17 +4879,12 @@ a._7BLGtYNuJOU-.zgRx3ehZ2z8-:hover {
4879
4879
  ._8fx-1j3wk2E- {
4880
4880
  display: -ms-flexbox;
4881
4881
  display: flex;
4882
- visibility: hidden;
4883
4882
 
4884
4883
  /* To compensate the Checkbox's label margin that we are using for screen-readers */
4885
4884
  margin-right: calc(16px * -1);
4886
4885
  margin-right: calc(var(--space-base) * -1);
4887
4886
  }
4888
4887
 
4889
- ._8fx-1j3wk2E-.VaDzSy52w-w- {
4890
- visibility: visible;
4891
- }
4892
-
4893
4888
  .i-w6mU9puzE- .zvpLQa7hDp0- > :first-child {
4894
4889
  -ms-flex-order: 2;
4895
4890
  order: 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components",
3
- "version": "6.63.1",
3
+ "version": "6.63.3",
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": "dbc1fa0d717c8345fdcae7b520e5604838f144a3"
545
+ "gitHead": "d56a2ccd266e490f2a4ebce54a5fa9fc90437f5e"
546
546
  }