@jobber/components 7.1.2-MIKElock--7916eb4.2 → 7.1.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/AtlantisThemeContext-cjs.js +1 -1
- package/dist/AtlantisThemeContext-es.js +9 -9
- package/dist/Autocomplete/index.cjs +2 -2
- package/dist/Autocomplete/index.mjs +5 -5
- package/dist/Body-cjs.js +1 -1
- package/dist/Body-es.js +2 -2
- package/dist/BottomSheet-cjs.js +1 -1
- package/dist/BottomSheet-es.js +1 -1
- package/dist/Box-cjs.js +2 -2
- package/dist/Box-es.js +2 -2
- package/dist/Button/index.mjs +1 -1
- package/dist/Button-es.js +1 -1
- package/dist/Card-cjs.js +1 -1
- package/dist/Card-es.js +1 -1
- package/dist/Checkbox/index.cjs +1 -1
- package/dist/Checkbox/index.mjs +1 -1
- package/dist/Chip/index.mjs +1 -1
- package/dist/Chip-cjs.js +2 -2
- package/dist/Chip-es.js +2 -2
- package/dist/ChipDismissible-es.js +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
- package/dist/Combobox-cjs.js +1 -1
- package/dist/Combobox-es.js +1 -1
- package/dist/ComboboxAction-cjs.js +1 -1
- package/dist/ComboboxAction-es.js +1 -1
- package/dist/ComboboxContent-cjs.js +1 -1
- package/dist/ComboboxContent-es.js +2 -2
- package/dist/ComboboxContentHeader-cjs.js +1 -1
- package/dist/ComboboxContentHeader-es.js +1 -1
- package/dist/ComboboxContentList-es.js +1 -1
- package/dist/ComboboxContentSearch-cjs.js +1 -1
- package/dist/ComboboxContentSearch-es.js +1 -1
- package/dist/ComboboxLoadMore-cjs.js +1 -1
- package/dist/ComboboxLoadMore-es.js +1 -1
- package/dist/ComboboxOption-cjs.js +1 -1
- package/dist/ComboboxOption-es.js +1 -1
- package/dist/Container-cjs.js +1 -1
- package/dist/Container-es.js +1 -1
- package/dist/Content-cjs.js +1 -1
- package/dist/Content-es.js +1 -1
- package/dist/ContentBlock-cjs.js +1 -1
- package/dist/ContentBlock-es.js +1 -1
- package/dist/Countdown-cjs.js +3 -7
- package/dist/Countdown-es.js +4 -8
- package/dist/Cover-cjs.js +1 -1
- package/dist/Cover-es.js +1 -1
- package/dist/DataList-es.js +3 -3
- package/dist/DataList.const-cjs.js +1 -0
- package/dist/DataList.const-es.js +2 -1
- package/dist/DataList.module-cjs.js +1 -1
- package/dist/DataList.module-es.js +1 -1
- package/dist/DataList.utils-es.js +6 -6
- package/dist/DataListAction-cjs.js +1 -1
- package/dist/DataListAction-es.js +1 -1
- package/dist/DataListActionsMenu-cjs.js +1 -1
- package/dist/DataListActionsMenu-es.js +2 -2
- package/dist/DataListBulkActions-cjs.js +1 -1
- package/dist/DataListBulkActions-es.js +1 -1
- package/dist/DataListEmptyState-cjs.js +1 -1
- package/dist/DataListEmptyState-es.js +1 -1
- package/dist/DataListHeaderTile-cjs.js +2 -2
- package/dist/DataListHeaderTile-es.js +2 -2
- package/dist/DataListItemActions-cjs.js +1 -1
- package/dist/DataListItemActions-es.js +2 -2
- package/dist/DataListLayoutActions-cjs.js +1 -1
- package/dist/DataListLayoutActions-es.js +2 -2
- package/dist/DataListLoadMore-cjs.js +1 -1
- package/dist/DataListLoadMore-es.js +1 -1
- package/dist/DataListLoadingState-cjs.js +1 -1
- package/dist/DataListLoadingState-es.js +2 -2
- package/dist/DataListOverflowFade-cjs.js +1 -1
- package/dist/DataListOverflowFade-es.js +1 -1
- package/dist/DataListSearch-cjs.js +1 -1
- package/dist/DataListSearch-es.js +1 -1
- package/dist/DataListSortingOptions-cjs.js +1 -1
- package/dist/DataListSortingOptions-es.js +1 -1
- package/dist/DataListStickyHeader-cjs.js +1 -1
- package/dist/DataListStickyHeader-es.js +1 -1
- package/dist/DataListTags-cjs.js +1 -1
- package/dist/DataListTags-es.js +1 -1
- package/dist/DataListTotalCount-cjs.js +1 -1
- package/dist/DataListTotalCount-es.js +2 -2
- package/dist/DataTable/index.mjs +1 -1
- package/dist/DataTable-cjs.js +3 -3
- package/dist/DataTable-es.js +5 -5
- package/dist/DataTableTable-cjs.js +2 -2
- package/dist/DataTableTable-es.js +3 -3
- package/dist/DatePicker-cjs.js +81 -266
- package/dist/DatePicker-es.js +83 -268
- package/dist/DayOfMonthSelect-cjs.js +5 -5
- package/dist/DayOfMonthSelect-es.js +6 -6
- package/dist/DescriptionList-cjs.js +1 -1
- package/dist/DescriptionList-es.js +1 -1
- package/dist/Disclosure-cjs.js +1 -1
- package/dist/Disclosure-es.js +1 -1
- package/dist/Divider-cjs.js +1 -1
- package/dist/Divider-es.js +1 -1
- package/dist/DrawerGrid-cjs.js +2 -2
- package/dist/DrawerGrid-es.js +2 -2
- package/dist/DrawerRoot-cjs.js +48 -10
- package/dist/DrawerRoot-es.js +50 -12
- package/dist/FeatureSwitch-cjs.js +1 -1
- package/dist/FeatureSwitch-es.js +1 -1
- package/dist/FormField/index.mjs +1 -1
- package/dist/FormField-cjs.js +1 -1
- package/dist/FormField-es.js +2 -2
- package/dist/FormatEmail-cjs.js +1 -1
- package/dist/FormatEmail-es.js +1 -1
- package/dist/FormatFile-cjs.js +6 -1
- package/dist/FormatFile-es.js +6 -1
- package/dist/Frame-cjs.js +1 -1
- package/dist/Frame-es.js +1 -1
- package/dist/Glimmer/index.mjs +1 -1
- package/dist/Glimmer-cjs.js +1 -1
- package/dist/Glimmer-es.js +2 -2
- package/dist/Grid-cjs.js +1 -1
- package/dist/Grid-es.js +1 -1
- package/dist/GridCell-cjs.js +1 -1
- package/dist/GridCell-es.js +1 -1
- package/dist/InputAvatar-cjs.js +1 -1
- package/dist/InputAvatar-es.js +1 -1
- package/dist/InputDate/index.mjs +1 -1
- package/dist/InputEmail/index.mjs +1 -1
- package/dist/InputFile-cjs.js +3 -8
- package/dist/InputFile-es.js +3 -8
- package/dist/InputNumber/index.cjs +59 -165
- package/dist/InputNumber/index.mjs +62 -168
- package/dist/InputPassword-es.js +1 -1
- package/dist/InputPhoneNumber/index.cjs +1 -1
- package/dist/InputPhoneNumber/index.mjs +2 -2
- package/dist/InputText/InputText.d.ts +70 -2
- package/dist/InputText/index.mjs +1 -1
- package/dist/InputTime/index.cjs +1 -0
- package/dist/InputTime/index.mjs +2 -1
- package/dist/InputValidation-cjs.js +1 -1
- package/dist/InputValidation-es.js +1 -1
- package/dist/InternalChipDismissible-cjs.js +1 -1
- package/dist/InternalChipDismissible-es.js +2 -2
- package/dist/LightBox-cjs.js +1 -1
- package/dist/LightBox-es.js +1 -1
- package/dist/Link-cjs.js +1 -1
- package/dist/Link-es.js +1 -1
- package/dist/List-cjs.js +3 -3
- package/dist/List-es.js +7 -7
- package/dist/Markdown-cjs.js +392 -466
- package/dist/Markdown-es.js +398 -472
- package/dist/Menu-cjs.js +577 -739
- package/dist/Menu-es.js +573 -735
- package/dist/Modal/index.cjs +2 -2
- package/dist/Modal/index.mjs +2 -2
- package/dist/MultiSelect-cjs.js +2 -2
- package/dist/MultiSelect-es.js +2 -2
- package/dist/OverlaySeparator-cjs.js +1 -1
- package/dist/OverlaySeparator-es.js +1 -1
- package/dist/Popover-cjs.js +1 -1
- package/dist/Popover-es.js +2 -2
- package/dist/ProgressBar-cjs.js +1 -1
- package/dist/ProgressBar-es.js +1 -1
- package/dist/RadioGroup-cjs.js +1 -1
- package/dist/RadioGroup-es.js +1 -1
- package/dist/RecurringSelect/components/index.mjs +1 -1
- package/dist/RecurringSelect/index.cjs +0 -1
- package/dist/RecurringSelect/index.mjs +0 -1
- package/dist/RecurringSelect-cjs.js +1 -1
- package/dist/RecurringSelect-es.js +2 -2
- package/dist/SegmentedControl-cjs.js +1 -1
- package/dist/SegmentedControl-es.js +2 -2
- package/dist/Select/index.cjs +1 -1
- package/dist/Select/index.mjs +2 -2
- package/dist/SideDrawer-cjs.js +1 -1
- package/dist/SideDrawer-es.js +1 -1
- package/dist/Spinner-cjs.js +1 -1
- package/dist/Spinner-es.js +1 -1
- package/dist/StatusIndicator-cjs.js +1 -1
- package/dist/StatusIndicator-es.js +1 -1
- package/dist/Switch-cjs.js +1 -1
- package/dist/Switch-es.js +1 -1
- package/dist/Table/index.mjs +1 -1
- package/dist/Tabs/index.mjs +1 -1
- package/dist/Tabs-cjs.js +1 -1
- package/dist/Tabs-es.js +6 -6
- package/dist/Text-cjs2.js +164 -298
- package/dist/Text-es2.js +164 -295
- package/dist/Thumbnail-cjs.js +1 -1
- package/dist/Thumbnail-es.js +2 -2
- package/dist/Tiles-cjs.js +1 -1
- package/dist/Tiles-es.js +1 -1
- package/dist/Tooltip-cjs.js +1 -1
- package/dist/Tooltip-es.js +2 -2
- package/dist/Typography-cjs.js +3 -3
- package/dist/Typography-es.js +3 -3
- package/dist/_baseEach-cjs.js +1 -1
- package/dist/_baseEach-es.js +7 -7
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/_getAllKeys-cjs.js +8 -2
- package/dist/_getAllKeys-es.js +10 -4
- package/dist/_getTag-es.js +1 -1
- package/dist/_isIterateeCall-es.js +3 -3
- package/dist/_setToString-es.js +2 -2
- package/dist/debounce-es.js +4 -4
- package/dist/docs/Autocomplete/AutocompleteV1.md +1 -1
- package/dist/docs/Autocomplete/AutocompleteV2.md +1 -1
- package/dist/docs/Banner/Banner.md +1 -1
- package/dist/docs/DataList/DataList.md +1 -1
- package/dist/docs/FormField/FormField.md +2 -2
- package/dist/docs/InputEmail/InputEmail.md +1 -1
- package/dist/docs/InputNumber/InputNumber.md +2 -2
- package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +1 -1
- package/dist/docs/InputText/InputText.md +2 -2
- package/dist/docs/Modal/Modal.md +3 -3
- package/dist/docs/Select/Select.md +2 -2
- package/dist/floating-ui.react-cjs.js +16 -35
- package/dist/floating-ui.react-dom-es.js +2 -2
- package/dist/floating-ui.react-es.js +18 -37
- package/dist/identity-es.js +5 -5
- package/dist/index-cjs.js +6 -6
- package/dist/index-es.js +6 -6
- package/dist/index.esm-es.js +1 -1
- package/dist/index.mjs +6 -6
- package/dist/isSymbol-es.js +1 -1
- package/dist/isTypedArray-cjs.js +4 -4
- package/dist/isTypedArray-es.js +6 -6
- package/dist/keysIn-cjs.js +2 -2
- package/dist/keysIn-es.js +5 -5
- package/dist/noop-es.js +4 -4
- package/dist/omit-cjs.js +5 -37
- package/dist/omit-es.js +14 -46
- package/dist/showToast-cjs.js +1 -1
- package/dist/showToast-es.js +1 -1
- package/dist/styles.css +117 -54
- package/dist/unstyledPrimitives/index.mjs +3 -3
- package/dist/useScrollToActive-cjs.js +1 -1
- package/dist/useScrollToActive-es.js +8 -8
- package/package.json +3 -4
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import React__default, { useEffect, useMemo, useCallback, useRef, useState,
|
|
1
|
+
import React__default, { useEffect, useMemo, useCallback, useRef, useState, createContext, useContext, forwardRef, createRef, useImperativeHandle } from 'react';
|
|
2
2
|
import { _ as __rest } from '../tslib.es6-es.js';
|
|
3
|
-
import { $ as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, b as $e9faafb641e167db$export$90fc3a17d93f704c, c as $507fabe10e71c6fb$export$b9b3dfddab17db27, d as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, e as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, f as $9ab94262bd0047c7$export$420e68273165f4ec, g as $bdb11010cef70236$export$f680877a34711e37, h as $313b98861ee5dd6c$export$d6875122194c7b44, i as $bdb11010cef70236$export$b4cc09c592e8fdb8, j as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, l as $507fabe10e71c6fb$export$8397ddfc504fdb9a, m as $
|
|
4
|
-
import { flushSync } from 'react-dom';
|
|
3
|
+
import { $ as $8ae05eaa5c114e9c$export$7f54fc3180508a52, a as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, b as $e9faafb641e167db$export$90fc3a17d93f704c, c as $507fabe10e71c6fb$export$b9b3dfddab17db27, d as $507fabe10e71c6fb$export$ec71b4b83ac08ec3, e as $a1ea59d68270f0dd$export$f8168d8dd8fd66e6, f as $9ab94262bd0047c7$export$420e68273165f4ec, g as $bdb11010cef70236$export$f680877a34711e37, h as $313b98861ee5dd6c$export$d6875122194c7b44, i as $bdb11010cef70236$export$b4cc09c592e8fdb8, j as $3ef42575df84b30b$export$9d1611c77c2fe928, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, l as $507fabe10e71c6fb$export$8397ddfc504fdb9a, m as $458b0a5536c1a7cf$export$40bfa8c7b0832715, n as $f645667febf57a63$export$4c014de7c8940b4c, o as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, p as $431fbd86ca7dc216$export$f21a1ffae260145a, q as $9446cca9a3875146$export$cb6e0bb50bc19463, r as $9446cca9a3875146$export$7d15b64cf5a3a4c4, s as $fca6afa0e843324b$export$f12b703ca79dfbb1, t as $03deb23ff14920c4$export$4eaf04e54aa8eed6, u as $c87311424ea30a05$export$186c6964ca17d99, v as $c87311424ea30a05$export$a11b0059900ceec8, w as $ff5963eb1fccf552$export$e08e3b67e392101e, x as $c87311424ea30a05$export$fedb369cb70207f1, y as $f39a9eba43920ace$export$86427a43e3e48ebb, z as $64fa3d84918910a7$export$29f1550f4b0d4415, A as $64fa3d84918910a7$export$4d86445c2cf5e3, B as $514c0188e459b4c0$export$5f1af8db9871e1d6, C as $6179b936705e76d3$export$ae780daf29e6d456, D as $64fa3d84918910a7$export$fabf2dc03a41866e, E as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, F as $64fa3d84918910a7$export$ef03459518577ad4, G as $64fa3d84918910a7$export$2881499e37b75b9a, H as $514c0188e459b4c0$export$9afb8bc826b033ea } from '../Text-es2.js';
|
|
5
4
|
import classnames from 'classnames';
|
|
6
5
|
import { I as Icon } from '../Icon-es.js';
|
|
7
6
|
import { T as Text } from '../Text-es.js';
|
|
8
7
|
import { f as filterDataAttributes } from '../filterDataAttributes-es.js';
|
|
9
|
-
import {
|
|
8
|
+
import { k as FormField } from '../FormField-es.js';
|
|
10
9
|
import 'react-hook-form';
|
|
11
10
|
import '@jobber/hooks';
|
|
12
11
|
import 'framer-motion';
|
|
@@ -43,7 +42,8 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
|
43
42
|
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
|
|
44
43
|
};
|
|
45
44
|
}, [
|
|
46
|
-
ref
|
|
45
|
+
ref,
|
|
46
|
+
handleReset
|
|
47
47
|
]);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -629,7 +629,6 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
629
629
|
let updateState = (useCallback)(()=>setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
|
|
630
630
|
let onFocusChange = (useCallback)((isFocused)=>{
|
|
631
631
|
state.current.isFocused = isFocused;
|
|
632
|
-
state.current.isFocusVisible = ($507fabe10e71c6fb$export$b9b3dfddab17db27)();
|
|
633
632
|
setFocused(isFocused);
|
|
634
633
|
updateState();
|
|
635
634
|
}, [
|
|
@@ -638,11 +637,7 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
638
637
|
($507fabe10e71c6fb$export$ec71b4b83ac08ec3)((isFocusVisible)=>{
|
|
639
638
|
state.current.isFocusVisible = isFocusVisible;
|
|
640
639
|
updateState();
|
|
641
|
-
}, [
|
|
642
|
-
isTextInput,
|
|
643
|
-
isFocused
|
|
644
|
-
], {
|
|
645
|
-
enabled: isFocused,
|
|
640
|
+
}, [], {
|
|
646
641
|
isTextInput: isTextInput
|
|
647
642
|
});
|
|
648
643
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
@@ -967,7 +962,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
967
962
|
// This is best-effort. There may be false positives, e.g. setTimeout.
|
|
968
963
|
form.reset = ()=>{
|
|
969
964
|
// React uses MessageChannel for scheduling, so ignore 'message' events.
|
|
970
|
-
isIgnoredReset.current = !window.event || window.event.type === 'message' &&
|
|
965
|
+
isIgnoredReset.current = !window.event || window.event.type === 'message' && window.event.target instanceof MessagePort;
|
|
971
966
|
reset === null || reset === void 0 ? void 0 : reset.call(form);
|
|
972
967
|
isIgnoredReset.current = false;
|
|
973
968
|
};
|
|
@@ -983,6 +978,9 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
983
978
|
};
|
|
984
979
|
}, [
|
|
985
980
|
ref,
|
|
981
|
+
onInvalid,
|
|
982
|
+
onChange,
|
|
983
|
+
onReset,
|
|
986
984
|
validationBehavior
|
|
987
985
|
]);
|
|
988
986
|
}
|
|
@@ -1015,9 +1013,8 @@ function $e93e671b31057976$var$getNativeValidity(input) {
|
|
|
1015
1013
|
}
|
|
1016
1014
|
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
1017
1015
|
for(let i = 0; i < form.elements.length; i++){
|
|
1018
|
-
var _element_validity;
|
|
1019
1016
|
let element = form.elements[i];
|
|
1020
|
-
if (
|
|
1017
|
+
if (!element.validity.valid) return element;
|
|
1021
1018
|
}
|
|
1022
1019
|
return null;
|
|
1023
1020
|
}
|
|
@@ -1064,6 +1061,25 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
1064
1061
|
var _props_defaultValue;
|
|
1065
1062
|
($99facab73266f662$export$5add1d006293d136)(ref, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : initialValue, setValue);
|
|
1066
1063
|
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
1064
|
+
(useEffect)(()=>{
|
|
1065
|
+
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
1066
|
+
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
1067
|
+
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
1068
|
+
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
1069
|
+
// future major version.
|
|
1070
|
+
// https://github.com/facebook/react/issues/19474
|
|
1071
|
+
// https://github.com/facebook/react/issues/11896
|
|
1072
|
+
if (ref.current instanceof ($431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
1073
|
+
let input = ref.current;
|
|
1074
|
+
Object.defineProperty(input, 'defaultValue', {
|
|
1075
|
+
get: ()=>input.value,
|
|
1076
|
+
set: ()=>{},
|
|
1077
|
+
configurable: true
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
}, [
|
|
1081
|
+
ref
|
|
1082
|
+
]);
|
|
1067
1083
|
return {
|
|
1068
1084
|
labelProps: labelProps,
|
|
1069
1085
|
inputProps: ($3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
|
|
@@ -1078,7 +1094,7 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
1078
1094
|
'aria-haspopup': props['aria-haspopup'],
|
|
1079
1095
|
'aria-controls': props['aria-controls'],
|
|
1080
1096
|
value: value,
|
|
1081
|
-
onChange: (e)=>setValue(
|
|
1097
|
+
onChange: (e)=>setValue(e.target.value),
|
|
1082
1098
|
autoComplete: props.autoComplete,
|
|
1083
1099
|
autoCapitalize: props.autoCapitalize,
|
|
1084
1100
|
maxLength: props.maxLength,
|
|
@@ -1188,10 +1204,11 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
1188
1204
|
input.removeEventListener('beforeinput', onBeforeInputFallback, false);
|
|
1189
1205
|
};
|
|
1190
1206
|
}, [
|
|
1191
|
-
inputRef
|
|
1207
|
+
inputRef,
|
|
1208
|
+
onBeforeInputFallback
|
|
1192
1209
|
]);
|
|
1193
1210
|
let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e)=>{
|
|
1194
|
-
let nextValue =
|
|
1211
|
+
let nextValue = e.target.value.slice(0, e.target.selectionStart) + e.data + e.target.value.slice(e.target.selectionEnd);
|
|
1195
1212
|
if (!state.validate(nextValue)) e.preventDefault();
|
|
1196
1213
|
} : null;
|
|
1197
1214
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = ($2d73ec29415bd339$export$712718f7aec83d5)(props, inputRef);
|
|
@@ -1309,25 +1326,22 @@ function $de67e98908f0c6ee$export$7f629e9dc1ecf37c(props) {
|
|
|
1309
1326
|
numberParser,
|
|
1310
1327
|
inputValue
|
|
1311
1328
|
]);
|
|
1312
|
-
let commit = (
|
|
1313
|
-
let newInputValue = overrideValue === undefined ? inputValue : overrideValue;
|
|
1314
|
-
let newParsedValue = parsedValue;
|
|
1315
|
-
if (overrideValue !== undefined) newParsedValue = numberParser.parse(newInputValue);
|
|
1329
|
+
let commit = ()=>{
|
|
1316
1330
|
// Set to empty state if input value is empty
|
|
1317
|
-
if (!
|
|
1331
|
+
if (!inputValue.length) {
|
|
1318
1332
|
setNumberValue(NaN);
|
|
1319
1333
|
setInputValue(value === undefined ? '' : format(numberValue));
|
|
1320
1334
|
return;
|
|
1321
1335
|
}
|
|
1322
1336
|
// if it failed to parse, then reset input to formatted version of current number
|
|
1323
|
-
if (isNaN(
|
|
1337
|
+
if (isNaN(parsedValue)) {
|
|
1324
1338
|
setInputValue(format(numberValue));
|
|
1325
1339
|
return;
|
|
1326
1340
|
}
|
|
1327
1341
|
// Clamp to min and max, round to the nearest step, and round to specified number of digits
|
|
1328
1342
|
let clampedValue;
|
|
1329
|
-
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(
|
|
1330
|
-
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(
|
|
1343
|
+
if (step === undefined || isNaN(step)) clampedValue = ($9446cca9a3875146$export$7d15b64cf5a3a4c4)(parsedValue, minValue, maxValue);
|
|
1344
|
+
else clampedValue = ($9446cca9a3875146$export$cb6e0bb50bc19463)(parsedValue, minValue, maxValue, step);
|
|
1331
1345
|
clampedValue = numberParser.parse(format(clampedValue));
|
|
1332
1346
|
setNumberValue(clampedValue);
|
|
1333
1347
|
// in a controlled state, the numberValue won't change, so we won't go back to our old input without help
|
|
@@ -1693,21 +1707,13 @@ function $parcel$interopDefault$1(a) {
|
|
|
1693
1707
|
|
|
1694
1708
|
|
|
1695
1709
|
|
|
1696
|
-
const $d2e8511e6f209edf$var$noop = ()=>{};
|
|
1697
1710
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
1698
1711
|
const _async = (useRef)(undefined);
|
|
1699
1712
|
let { value: value, textValue: textValue, minValue: minValue, maxValue: maxValue, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, onIncrement: onIncrement, onIncrementPage: onIncrementPage, onDecrement: onDecrement, onDecrementPage: onDecrementPage, onDecrementToMin: onDecrementToMin, onIncrementToMax: onIncrementToMax } = props;
|
|
1700
1713
|
const stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault$1($a99895ee3dc79e61$exports))), '@react-aria/spinbutton');
|
|
1701
|
-
|
|
1702
|
-
const clearAsync = (useCallback)(()=>{
|
|
1703
|
-
clearTimeout(_async.current);
|
|
1704
|
-
isSpinning.current = false;
|
|
1705
|
-
}, []);
|
|
1706
|
-
const clearAsyncEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
1707
|
-
clearAsync();
|
|
1708
|
-
});
|
|
1714
|
+
const clearAsync = ()=>clearTimeout(_async.current);
|
|
1709
1715
|
(useEffect)(()=>{
|
|
1710
|
-
return ()=>
|
|
1716
|
+
return ()=>clearAsync();
|
|
1711
1717
|
}, []);
|
|
1712
1718
|
let onKeyDown = (e)=>{
|
|
1713
1719
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly || e.nativeEvent.isComposing) return;
|
|
@@ -1774,61 +1780,26 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
1774
1780
|
}, [
|
|
1775
1781
|
ariaTextValue
|
|
1776
1782
|
]);
|
|
1777
|
-
|
|
1778
|
-
let onPointerCancel = (useCallback)(()=>{
|
|
1783
|
+
const onIncrementPressStart = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1779
1784
|
clearAsync();
|
|
1780
|
-
|
|
1781
|
-
clearAsync
|
|
1782
|
-
]);
|
|
1783
|
-
const onIncrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onIncrement !== null && onIncrement !== void 0 ? onIncrement : $d2e8511e6f209edf$var$noop);
|
|
1784
|
-
const onDecrementEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(onDecrement !== null && onDecrement !== void 0 ? onDecrement : $d2e8511e6f209edf$var$noop);
|
|
1785
|
-
const stepUpEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
1786
|
-
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) {
|
|
1787
|
-
onIncrementEvent();
|
|
1788
|
-
onIncrementPressStartEvent(60);
|
|
1789
|
-
}
|
|
1790
|
-
});
|
|
1791
|
-
const onIncrementPressStartEvent = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1792
|
-
clearAsyncEvent();
|
|
1793
|
-
isSpinning.current = true;
|
|
1785
|
+
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1794
1786
|
// Start spinning after initial delay
|
|
1795
|
-
_async.current = window.setTimeout(
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) {
|
|
1799
|
-
onDecrementEvent();
|
|
1800
|
-
onDecrementPressStartEvent(60);
|
|
1801
|
-
}
|
|
1787
|
+
_async.current = window.setTimeout(()=>{
|
|
1788
|
+
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) onIncrementPressStart(60);
|
|
1789
|
+
}, initialStepDelay);
|
|
1802
1790
|
});
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1805
|
-
|
|
1791
|
+
const onDecrementPressStart = ($8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1792
|
+
clearAsync();
|
|
1793
|
+
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1806
1794
|
// Start spinning after initial delay
|
|
1807
|
-
_async.current = window.setTimeout(
|
|
1795
|
+
_async.current = window.setTimeout(()=>{
|
|
1796
|
+
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
1797
|
+
}, initialStepDelay);
|
|
1808
1798
|
});
|
|
1809
1799
|
let cancelContextMenu = (e)=>{
|
|
1810
1800
|
e.preventDefault();
|
|
1811
1801
|
};
|
|
1812
1802
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = ($03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
1813
|
-
// Tracks in touch if the press end event was preceded by a press up.
|
|
1814
|
-
// If it wasn't, then we know the finger left the button while still in contact with the screen.
|
|
1815
|
-
// This means that the user is trying to scroll or interact in some way that shouldn't trigger
|
|
1816
|
-
// an increment or decrement.
|
|
1817
|
-
let isUp = (useRef)(false);
|
|
1818
|
-
let [isIncrementPressed, setIsIncrementPressed] = (useState)(null);
|
|
1819
|
-
(useEffect)(()=>{
|
|
1820
|
-
if (isIncrementPressed === 'touch') onIncrementPressStartEvent(600);
|
|
1821
|
-
else if (isIncrementPressed) onIncrementPressStartEvent(400);
|
|
1822
|
-
}, [
|
|
1823
|
-
isIncrementPressed
|
|
1824
|
-
]);
|
|
1825
|
-
let [isDecrementPressed, setIsDecrementPressed] = (useState)(null);
|
|
1826
|
-
(useEffect)(()=>{
|
|
1827
|
-
if (isDecrementPressed === 'touch') onDecrementPressStartEvent(600);
|
|
1828
|
-
else if (isDecrementPressed) onDecrementPressStartEvent(400);
|
|
1829
|
-
}, [
|
|
1830
|
-
isDecrementPressed
|
|
1831
|
-
]);
|
|
1832
1803
|
return {
|
|
1833
1804
|
spinButtonProps: {
|
|
1834
1805
|
role: 'spinbutton',
|
|
@@ -1844,68 +1815,25 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
1844
1815
|
onBlur: onBlur
|
|
1845
1816
|
},
|
|
1846
1817
|
incrementButtonProps: {
|
|
1847
|
-
onPressStart: (
|
|
1848
|
-
|
|
1849
|
-
if (e.pointerType !== 'touch') {
|
|
1850
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1851
|
-
setIsIncrementPressed('mouse');
|
|
1852
|
-
} else {
|
|
1853
|
-
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
1854
|
-
capture: true
|
|
1855
|
-
});
|
|
1856
|
-
isUp.current = false;
|
|
1857
|
-
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
1858
|
-
// the control isn't spinning.
|
|
1859
|
-
setIsIncrementPressed('touch');
|
|
1860
|
-
}
|
|
1818
|
+
onPressStart: ()=>{
|
|
1819
|
+
onIncrementPressStart(400);
|
|
1861
1820
|
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
1862
1821
|
},
|
|
1863
|
-
|
|
1822
|
+
onPressEnd: ()=>{
|
|
1864
1823
|
clearAsync();
|
|
1865
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
1866
1824
|
removeAllGlobalListeners();
|
|
1867
|
-
setIsIncrementPressed(null);
|
|
1868
|
-
},
|
|
1869
|
-
onPressEnd: (e)=>{
|
|
1870
|
-
clearAsync();
|
|
1871
|
-
if (e.pointerType === 'touch') {
|
|
1872
|
-
if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1873
|
-
}
|
|
1874
|
-
isUp.current = false;
|
|
1875
|
-
setIsIncrementPressed(null);
|
|
1876
1825
|
},
|
|
1877
1826
|
onFocus: onFocus,
|
|
1878
1827
|
onBlur: onBlur
|
|
1879
1828
|
},
|
|
1880
1829
|
decrementButtonProps: {
|
|
1881
|
-
onPressStart: (
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1885
|
-
setIsDecrementPressed('mouse');
|
|
1886
|
-
} else {
|
|
1887
|
-
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
1888
|
-
capture: true
|
|
1889
|
-
});
|
|
1890
|
-
isUp.current = false;
|
|
1891
|
-
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
1892
|
-
// the control isn't spinning.
|
|
1893
|
-
setIsDecrementPressed('touch');
|
|
1894
|
-
}
|
|
1830
|
+
onPressStart: ()=>{
|
|
1831
|
+
onDecrementPressStart(400);
|
|
1832
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
1895
1833
|
},
|
|
1896
|
-
|
|
1834
|
+
onPressEnd: ()=>{
|
|
1897
1835
|
clearAsync();
|
|
1898
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
1899
1836
|
removeAllGlobalListeners();
|
|
1900
|
-
setIsDecrementPressed(null);
|
|
1901
|
-
},
|
|
1902
|
-
onPressEnd: (e)=>{
|
|
1903
|
-
clearAsync();
|
|
1904
|
-
if (e.pointerType === 'touch') {
|
|
1905
|
-
if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1906
|
-
}
|
|
1907
|
-
isUp.current = false;
|
|
1908
|
-
setIsDecrementPressed(null);
|
|
1909
1837
|
},
|
|
1910
1838
|
onFocus: onFocus,
|
|
1911
1839
|
onBlur: onBlur
|
|
@@ -2244,30 +2172,15 @@ function $parcel$interopDefault(a) {
|
|
|
2244
2172
|
|
|
2245
2173
|
|
|
2246
2174
|
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
2175
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
2250
2176
|
let { id: id, decrementAriaLabel: decrementAriaLabel, incrementAriaLabel: incrementAriaLabel, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, minValue: minValue, maxValue: maxValue, autoFocus: autoFocus, label: label, formatOptions: formatOptions, onBlur: onBlur = ()=>{}, onFocus: onFocus, onFocusChange: onFocusChange, onKeyDown: onKeyDown, onKeyUp: onKeyUp, description: description, errorMessage: errorMessage, isWheelDisabled: isWheelDisabled, ...otherProps } = props;
|
|
2251
2177
|
let { increment: increment, incrementToMax: incrementToMax, decrement: decrement, decrementToMin: decrementToMin, numberValue: numberValue, inputValue: inputValue, commit: commit, commitValidation: commitValidation } = state;
|
|
2252
2178
|
const stringFormatter = ($fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault($280a227d7cb94b92$exports))), '@react-aria/numberfield');
|
|
2253
|
-
let commitAndAnnounce = (useCallback)(()=>{
|
|
2254
|
-
var _inputRef_current, _inputRef_current1, _inputRef_current2;
|
|
2255
|
-
var _inputRef_current_value;
|
|
2256
|
-
let oldValue = (_inputRef_current_value = (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.value) !== null && _inputRef_current_value !== void 0 ? _inputRef_current_value : '';
|
|
2257
|
-
// Set input value to normalized valid value
|
|
2258
|
-
(flushSync)(()=>{
|
|
2259
|
-
commit();
|
|
2260
|
-
});
|
|
2261
|
-
var _inputRef_current_value1;
|
|
2262
|
-
if (((_inputRef_current1 = inputRef.current) === null || _inputRef_current1 === void 0 ? void 0 : _inputRef_current1.value) !== oldValue) ($319e236875307eab$export$a9b970dcc4ae71a9)((_inputRef_current_value1 = (_inputRef_current2 = inputRef.current) === null || _inputRef_current2 === void 0 ? void 0 : _inputRef_current2.value) !== null && _inputRef_current_value1 !== void 0 ? _inputRef_current_value1 : '', 'assertive');
|
|
2263
|
-
}, [
|
|
2264
|
-
commit,
|
|
2265
|
-
inputRef
|
|
2266
|
-
]);
|
|
2267
2179
|
let inputId = ($bdb11010cef70236$export$f680877a34711e37)(id);
|
|
2268
2180
|
let { focusProps: focusProps } = ($a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
2269
2181
|
onBlur () {
|
|
2270
|
-
|
|
2182
|
+
// Set input value to normalized valid value
|
|
2183
|
+
commit();
|
|
2271
2184
|
}
|
|
2272
2185
|
});
|
|
2273
2186
|
let numberFormatter = ($a916eb452884faea$export$b7a616150fdb9f44)(formatOptions);
|
|
@@ -2343,24 +2256,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2343
2256
|
let onChange = (value)=>{
|
|
2344
2257
|
if (state.validate(value)) state.setInputValue(value);
|
|
2345
2258
|
};
|
|
2346
|
-
let onPaste = (e)=>{
|
|
2347
|
-
var _props_onPaste;
|
|
2348
|
-
(_props_onPaste = props.onPaste) === null || _props_onPaste === void 0 ? void 0 : _props_onPaste.call(props, e);
|
|
2349
|
-
let inputElement = ($d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2350
|
-
var _inputElement_selectionEnd, _inputElement_selectionStart;
|
|
2351
|
-
// we can only handle the case where the paste takes over the entire input, otherwise things get very complicated
|
|
2352
|
-
// trying to calculate the new string based on what the paste is replacing and where in the source string it is
|
|
2353
|
-
if (inputElement && ((_inputElement_selectionEnd = inputElement.selectionEnd) !== null && _inputElement_selectionEnd !== void 0 ? _inputElement_selectionEnd : -1) - ((_inputElement_selectionStart = inputElement.selectionStart) !== null && _inputElement_selectionStart !== void 0 ? _inputElement_selectionStart : 0) === inputElement.value.length) {
|
|
2354
|
-
var _e_clipboardData_getData, _e_clipboardData_getData1, _e_clipboardData;
|
|
2355
|
-
e.preventDefault();
|
|
2356
|
-
var _e_clipboardData_getData_trim;
|
|
2357
|
-
// commit so that the user gets to see what it formats to immediately
|
|
2358
|
-
// paste happens before inputRef's value is updated, so have to prevent the default and do it ourselves
|
|
2359
|
-
// spin button will then handle announcing the new value, this should work with controlled state as well
|
|
2360
|
-
// because the announcement is done as a result of the new rendered input value if there is one
|
|
2361
|
-
commit((_e_clipboardData_getData_trim = (_e_clipboardData = e.clipboardData) === null || _e_clipboardData === void 0 ? void 0 : (_e_clipboardData_getData1 = _e_clipboardData.getData) === null || _e_clipboardData_getData1 === void 0 ? void 0 : (_e_clipboardData_getData = _e_clipboardData_getData1.call(_e_clipboardData, 'text/plain')) === null || _e_clipboardData_getData === void 0 ? void 0 : _e_clipboardData_getData.trim()) !== null && _e_clipboardData_getData_trim !== void 0 ? _e_clipboardData_getData_trim : '');
|
|
2362
|
-
}
|
|
2363
|
-
};
|
|
2364
2259
|
let domProps = ($65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
2365
2260
|
let onKeyDownEnter = (useCallback)((e)=>{
|
|
2366
2261
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -2403,7 +2298,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2403
2298
|
onKeyDown
|
|
2404
2299
|
]),
|
|
2405
2300
|
onKeyUp: onKeyUp,
|
|
2406
|
-
onPaste: onPaste,
|
|
2407
2301
|
description: description,
|
|
2408
2302
|
errorMessage: errorMessage
|
|
2409
2303
|
}, state, inputRef);
|
|
@@ -2425,7 +2319,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2425
2319
|
var _inputRef_current;
|
|
2426
2320
|
// If focus is already on the input, keep it there so we don't hide the
|
|
2427
2321
|
// software keyboard when tapping the increment/decrement buttons.
|
|
2428
|
-
if (
|
|
2322
|
+
if (document.activeElement === inputRef.current) return;
|
|
2429
2323
|
// Otherwise, when using a mouse, move focus to the input.
|
|
2430
2324
|
// On touch, or with a screen reader, focus the button so that the software
|
|
2431
2325
|
// keyboard does not appear and the screen reader cursor is not moved off the button.
|
package/dist/InputPassword-es.js
CHANGED
|
@@ -18,7 +18,7 @@ require('../InputValidation-cjs.js');
|
|
|
18
18
|
require('../Spinner-cjs.js');
|
|
19
19
|
require('react-router-dom');
|
|
20
20
|
|
|
21
|
-
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-"};
|
|
21
|
+
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-","spinning":"T3VvmDmzs-4-"};
|
|
22
22
|
|
|
23
23
|
function useInputMask({ value = "", pattern, delimiter = "*", strict = true, onChange, }) {
|
|
24
24
|
const [isMasking, setIsMasking] = React.useState(!value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useMemo, useCallback, useEffect, cloneElement, forwardRef, useId } from 'react';
|
|
2
2
|
import { _ as __rest } from '../tslib.es6-es.js';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import {
|
|
4
|
+
import { b as useAtlantisFormFieldName, f as FormFieldWrapper, l as formFieldStyles, m as FormFieldPostFix, k as FormField } from '../FormField-es.js';
|
|
5
5
|
import { useFormContext, useForm } from 'react-hook-form';
|
|
6
6
|
import '../Button-es.js';
|
|
7
7
|
import '@jobber/design';
|
|
@@ -16,7 +16,7 @@ import '../InputValidation-es.js';
|
|
|
16
16
|
import '../Spinner-es.js';
|
|
17
17
|
import 'react-router-dom';
|
|
18
18
|
|
|
19
|
-
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-"};
|
|
19
|
+
var styles = {"mask":"_78-Lxj78xPg-","hiddenValue":"GoiXVXaU1Qs-","emptyValue":"oOrjwubmsVA-","spinning":"T3VvmDmzs-4-"};
|
|
20
20
|
|
|
21
21
|
function useInputMask({ value = "", pattern, delimiter = "*", strict = true, onChange, }) {
|
|
22
22
|
const [isMasking, setIsMasking] = useState(!value);
|
|
@@ -1,3 +1,71 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const InputText: React.ForwardRefExoticComponent<
|
|
2
|
+
import type { InputTextRef } from "./InputText.types";
|
|
3
|
+
export declare const InputText: React.ForwardRefExoticComponent<({
|
|
4
|
+
readonly multiline: true;
|
|
5
|
+
readonly rows?: (number | import("./InputText.types").RowRange) | undefined;
|
|
6
|
+
readonly id?: string | undefined;
|
|
7
|
+
readonly align?: ("center" | "right") | undefined;
|
|
8
|
+
readonly description?: React.ReactNode;
|
|
9
|
+
readonly disabled?: boolean | undefined;
|
|
10
|
+
readonly showMiniLabel?: boolean | undefined;
|
|
11
|
+
readonly invalid?: boolean | undefined;
|
|
12
|
+
readonly inline?: boolean | undefined;
|
|
13
|
+
loading?: boolean | undefined;
|
|
14
|
+
readonly name?: string | undefined;
|
|
15
|
+
onChange?: ((newValue: string | number | boolean | Date, event?: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void) | undefined;
|
|
16
|
+
onValidation?: ((message: string) => void) | undefined;
|
|
17
|
+
readonly placeholder?: string | undefined;
|
|
18
|
+
readonly size?: ("small" | "large") | undefined;
|
|
19
|
+
readonly value?: (string | number | Date) | undefined;
|
|
20
|
+
readonly clearable?: import("@jobber/hooks").Clearable | undefined;
|
|
21
|
+
version?: 1 | undefined;
|
|
22
|
+
onFocus?: ((event?: React.FocusEvent) => void) | undefined;
|
|
23
|
+
onBlur?: ((event?: React.FocusEvent) => void) | undefined;
|
|
24
|
+
readonly toolbar?: React.ReactNode;
|
|
25
|
+
readonly defaultValue?: (string | Date) | undefined;
|
|
26
|
+
readonly prefix?: import("..").Affix | undefined;
|
|
27
|
+
readonly maxLength?: number | undefined;
|
|
28
|
+
readonly autofocus?: boolean | undefined;
|
|
29
|
+
readonly autocomplete?: (boolean | import("..").AutocompleteTypes) | undefined;
|
|
30
|
+
inputRef?: React.RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined;
|
|
31
|
+
readonly keyboard?: ("numeric" | "decimal") | undefined;
|
|
32
|
+
readonly suffix?: import("ts-xor").XOR<import("..").Affix, import("..").Suffix> | undefined;
|
|
33
|
+
onEnter?: ((event: React.KeyboardEvent) => void) | undefined;
|
|
34
|
+
readonly readonly?: boolean | undefined;
|
|
35
|
+
readonly validations?: import("react-hook-form").RegisterOptions | undefined;
|
|
36
|
+
readonly toolbarVisibility?: ("always" | "while-editing") | undefined;
|
|
37
|
+
} | {
|
|
38
|
+
rows?: undefined;
|
|
39
|
+
multiline?: boolean | undefined;
|
|
40
|
+
readonly id?: string | undefined;
|
|
41
|
+
readonly align?: ("center" | "right") | undefined;
|
|
42
|
+
readonly description?: React.ReactNode;
|
|
43
|
+
readonly disabled?: boolean | undefined;
|
|
44
|
+
readonly showMiniLabel?: boolean | undefined;
|
|
45
|
+
readonly invalid?: boolean | undefined;
|
|
46
|
+
readonly inline?: boolean | undefined;
|
|
47
|
+
loading?: boolean | undefined;
|
|
48
|
+
readonly name?: string | undefined;
|
|
49
|
+
onChange?: ((newValue: string | number | boolean | Date, event?: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void) | undefined;
|
|
50
|
+
onValidation?: ((message: string) => void) | undefined;
|
|
51
|
+
readonly placeholder?: string | undefined;
|
|
52
|
+
readonly size?: ("small" | "large") | undefined;
|
|
53
|
+
readonly value?: (string | number | Date) | undefined;
|
|
54
|
+
readonly clearable?: import("@jobber/hooks").Clearable | undefined;
|
|
55
|
+
version?: 1 | undefined;
|
|
56
|
+
onFocus?: ((event?: React.FocusEvent) => void) | undefined;
|
|
57
|
+
onBlur?: ((event?: React.FocusEvent) => void) | undefined;
|
|
58
|
+
readonly toolbar?: React.ReactNode;
|
|
59
|
+
readonly defaultValue?: (string | Date) | undefined;
|
|
60
|
+
readonly prefix?: import("..").Affix | undefined;
|
|
61
|
+
readonly maxLength?: number | undefined;
|
|
62
|
+
readonly autofocus?: boolean | undefined;
|
|
63
|
+
readonly autocomplete?: (boolean | import("..").AutocompleteTypes) | undefined;
|
|
64
|
+
inputRef?: React.RefObject<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null> | undefined;
|
|
65
|
+
readonly keyboard?: ("numeric" | "decimal") | undefined;
|
|
66
|
+
readonly suffix?: import("ts-xor").XOR<import("..").Affix, import("..").Suffix> | undefined;
|
|
67
|
+
onEnter?: ((event: React.KeyboardEvent) => void) | undefined;
|
|
68
|
+
readonly readonly?: boolean | undefined;
|
|
69
|
+
readonly validations?: import("react-hook-form").RegisterOptions | undefined;
|
|
70
|
+
readonly toolbarVisibility?: ("always" | "while-editing") | undefined;
|
|
71
|
+
}) & React.RefAttributes<InputTextRef>>;
|
package/dist/InputText/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { forwardRef, useRef, useImperativeHandle, useMemo, useId } from 'react';
|
|
2
2
|
import { useSafeLayoutEffect } from '@jobber/hooks';
|
|
3
|
-
import {
|
|
3
|
+
import { k as FormField, b as useAtlantisFormFieldName, n as mergeRefs, l as formFieldStyles, f as FormFieldWrapper, m as FormFieldPostFix } from '../FormField-es.js';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '../tslib.es6-es.js';
|
|
6
6
|
import 'react-hook-form';
|
package/dist/InputTime/index.cjs
CHANGED
|
@@ -274,6 +274,7 @@ function InputTimeRebuilt(_a) {
|
|
|
274
274
|
const { handleChangeEvent, handleChange, handleBlur, handleClear, handleFocus, handleKeyDown, handleClick, handleMouseDown, handleMouseUp, handlePointerDown, handlePointerUp, } = useInputTimeActions({
|
|
275
275
|
onChange,
|
|
276
276
|
value,
|
|
277
|
+
readOnly,
|
|
277
278
|
disabled: props.disabled,
|
|
278
279
|
inputRef: internalRef,
|
|
279
280
|
onFocus: props.onFocus,
|
package/dist/InputTime/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useState, useCallback, useEffect, useId, useRef } from 'react';
|
|
2
2
|
import { _ as __rest } from '../tslib.es6-es.js';
|
|
3
3
|
import { a as debounce } from '../debounce-es.js';
|
|
4
|
-
import {
|
|
4
|
+
import { f as FormFieldWrapper, l as formFieldStyles, n as mergeRefs, k as FormField } from '../FormField-es.js';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '@jobber/design';
|
|
7
7
|
import 'react-hook-form';
|
|
@@ -272,6 +272,7 @@ function InputTimeRebuilt(_a) {
|
|
|
272
272
|
const { handleChangeEvent, handleChange, handleBlur, handleClear, handleFocus, handleKeyDown, handleClick, handleMouseDown, handleMouseUp, handlePointerDown, handlePointerUp, } = useInputTimeActions({
|
|
273
273
|
onChange,
|
|
274
274
|
value,
|
|
275
|
+
readOnly,
|
|
275
276
|
disabled: props.disabled,
|
|
276
277
|
inputRef: internalRef,
|
|
277
278
|
onFocus: props.onFocus,
|
|
@@ -5,7 +5,7 @@ var framerMotion = require('framer-motion');
|
|
|
5
5
|
var Text = require('./Text-cjs.js');
|
|
6
6
|
var Icon = require('./Icon-cjs.js');
|
|
7
7
|
|
|
8
|
-
var styles = {"message":"lNpgPQh76MY-"};
|
|
8
|
+
var styles = {"hasValidationMessage":"fO5j-2U5rfE-","message":"lNpgPQh76MY-","spinning":"G-lkW6-mFUE-"};
|
|
9
9
|
|
|
10
10
|
function InputValidation({ message, visible = true, }) {
|
|
11
11
|
const messages = [message];
|
|
@@ -3,7 +3,7 @@ import { AnimatePresence, motion } from 'framer-motion';
|
|
|
3
3
|
import { T as Text } from './Text-es.js';
|
|
4
4
|
import { I as Icon } from './Icon-es.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"message":"lNpgPQh76MY-"};
|
|
6
|
+
var styles = {"hasValidationMessage":"fO5j-2U5rfE-","message":"lNpgPQh76MY-","spinning":"G-lkW6-mFUE-"};
|
|
7
7
|
|
|
8
8
|
function InputValidation({ message, visible = true, }) {
|
|
9
9
|
const messages = [message];
|
|
@@ -19,7 +19,7 @@ function InternalChip({ label, active = false, disabled = false, invalid = false
|
|
|
19
19
|
suffix && React.createElement(Chip.Chip.Suffix, null, suffix)));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-"};
|
|
22
|
+
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
|
|
23
23
|
|
|
24
24
|
function InternalChipDismissibleInput(props) {
|
|
25
25
|
const { activator = React.createElement(Button.Button, { icon: "add", type: "secondary", ariaLabel: "Add" }), attachTo, isLoadingMore = false, onLoadMore, options, } = props;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { a as useInternalChipDismissibleInput, d as useScrollToActive, b as useInView, c as useRepositionMenu, u as useInternalChipDismissible } from './useScrollToActive-es.js';
|
|
3
3
|
import './isObjectLike-es.js';
|
|
4
4
|
import '@jobber/hooks';
|
|
5
5
|
import '@jobber/design';
|
|
@@ -17,7 +17,7 @@ function InternalChip({ label, active = false, disabled = false, invalid = false
|
|
|
17
17
|
suffix && React__default.createElement(Chip.Suffix, null, suffix)));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-"};
|
|
20
|
+
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
|
|
21
21
|
|
|
22
22
|
function InternalChipDismissibleInput(props) {
|
|
23
23
|
const { activator = React__default.createElement(Button, { icon: "add", type: "secondary", ariaLabel: "Add" }), attachTo, isLoadingMore = false, onLoadMore, options, } = props;
|
package/dist/LightBox-cjs.js
CHANGED
|
@@ -13,7 +13,7 @@ var Heading = require('./Heading-cjs.js');
|
|
|
13
13
|
var Tooltip = require('./Tooltip-cjs.js');
|
|
14
14
|
var AtlantisThemeContext = require('./AtlantisThemeContext-cjs.js');
|
|
15
15
|
|
|
16
|
-
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftAction":"_3DY1o57MHxg-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-"};
|
|
16
|
+
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftAction":"_3DY1o57MHxg-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-","spinning":"_8tDoqjgfLcw-"};
|
|
17
17
|
|
|
18
18
|
// A little bit more than the transition's duration
|
|
19
19
|
// We're doing this to prevent a bug from framer-motion
|
package/dist/LightBox-es.js
CHANGED
|
@@ -11,7 +11,7 @@ import { H as Heading } from './Heading-es.js';
|
|
|
11
11
|
import { T as Tooltip } from './Tooltip-es.js';
|
|
12
12
|
import { A as AtlantisThemeContextProvider } from './AtlantisThemeContext-es.js';
|
|
13
13
|
|
|
14
|
-
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftAction":"_3DY1o57MHxg-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-"};
|
|
14
|
+
var styles = {"backgroundImage":"i9Tw1T65W-k-","next":"Q8amcRaTGf0-","prev":"W9FVb24yJrk-","buttonHidden":"nsN0TPWsBXI-","buttonVisible":"dkLYp7AD2jE-","lightboxWrapper":"_5p2iAj4JfoE-","toolbar":"rMK4cKdOxFw-","closeButton":"_0m6vb11DgiA-","slideNumber":"kCc68gGuTgg-","leftAction":"_3DY1o57MHxg-","image":"yYFVVScosfQ-","imageArea":"UskuwLHR6fg-","captionWrapper":"OGjhge-r-U4-","title":"tZU2g-NYdIs-","blurOverlay":"GKIdLTmvcvQ-","thumbnailBar":"_3TfQLQEE3GQ-","thumbnailImage":"eBMzUOlcfQ4-","thumbnail":"eapm2zruLn8-","selected":"PeLn2u-QB0k-","spinning":"_8tDoqjgfLcw-"};
|
|
15
15
|
|
|
16
16
|
// A little bit more than the transition's duration
|
|
17
17
|
// We're doing this to prevent a bug from framer-motion
|