@jobber/components 6.63.1 → 6.63.2
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.
package/dist/InputDate/index.cjs
CHANGED
|
@@ -126,25 +126,24 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
|
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
const InputDateRebuilt = React.forwardRef(
|
|
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:
|
|
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 =
|
|
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 =
|
|
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,
|
|
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;
|
package/dist/InputDate/index.mjs
CHANGED
|
@@ -124,25 +124,24 @@ function useInputDateActivatorActions({ onChange, onBlur, onFocus, }) {
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
const InputDateRebuilt = forwardRef(
|
|
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:
|
|
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 =
|
|
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 =
|
|
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,
|
|
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;
|
package/dist/InputTime/index.cjs
CHANGED
|
@@ -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);
|
package/dist/InputTime/index.mjs
CHANGED
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "6.63.
|
|
3
|
+
"version": "6.63.2",
|
|
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": "
|
|
545
|
+
"gitHead": "1d09b31023be41c83ba1824bf4202ae6dbbcd8ff"
|
|
546
546
|
}
|