@jobber/components 6.101.5-JOB-140604-4c8f8f2.41 → 6.101.5-JOB-140604-4487daa.55
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/Autocomplete/Autocomplete.types.d.ts +11 -51
- package/dist/Autocomplete/components/MenuList.d.ts +3 -2
- package/dist/Autocomplete/components/PersistentRegion.d.ts +3 -2
- package/dist/Autocomplete/hooks/useAutocompleteListNav.d.ts +3 -2
- package/dist/Autocomplete/index.cjs +95 -51
- package/dist/Autocomplete/index.mjs +97 -53
- package/dist/Autocomplete/tests/Autocomplete.setup.d.ts +14 -1
- package/dist/Autocomplete/useAutocomplete.d.ts +4 -3
- package/dist/Autocomplete/utils/interactionUtils.d.ts +14 -0
- package/dist/Card-cjs.js +1 -1
- package/dist/Card-es.js +1 -1
- package/dist/Checkbox/Checkbox.rebuilt.d.ts +2 -2
- package/dist/Checkbox/Checkbox.types.d.ts +24 -18
- package/dist/Checkbox/index.cjs +9 -2
- package/dist/Checkbox/index.mjs +9 -2
- package/dist/Chip/Chip.d.ts +1 -2
- package/dist/Chip/hooks/useChildComponent.d.ts +4 -3
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip-cjs.js +5 -4
- package/dist/Chip-es.js +5 -4
- package/dist/ChipDismissible-cjs.js +4 -4
- package/dist/ChipDismissible-es.js +5 -5
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +2 -2
- package/dist/Chips/InternalChipDismissible/hooks/useInView.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useInternalChipDismissibleInput.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/useScrollToActive.d.ts +1 -1
- package/dist/Chips/InternalChipDismissible/index.cjs +2 -2
- package/dist/Chips/InternalChipDismissible/index.mjs +2 -2
- package/dist/Chips/index.cjs +2 -2
- package/dist/Chips/index.mjs +2 -2
- package/dist/Combobox/Combobox.d.ts +2 -1
- package/dist/Combobox/Combobox.types.d.ts +2 -2
- package/dist/Combobox/ComboboxProvider.d.ts +3 -3
- package/dist/Combobox/components/ComboboxActivator/ComboboxActivator.d.ts +1 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContent.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentHeader/ComboboxContentHeader.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentList/ComboboxContentList.d.ts +2 -1
- package/dist/Combobox/components/ComboboxContent/ComboboxContentSearch/ComboboxContentSearch.d.ts +2 -1
- package/dist/Combobox/hooks/useCombobox.d.ts +1 -1
- package/dist/Combobox/hooks/useComboboxAccessibility.d.ts +2 -2
- package/dist/Combobox/hooks/useComboboxContent.d.ts +2 -1
- package/dist/Combobox/hooks/useMakeComboboxHandlers.d.ts +1 -1
- package/dist/ComboboxActivator-cjs.js +2 -2
- package/dist/ComboboxActivator-es.js +3 -3
- package/dist/ComboboxTrigger-cjs.js +1 -1
- package/dist/ComboboxTrigger-es.js +2 -2
- package/dist/DataList/DataList.types.d.ts +2 -2
- package/dist/DataList/DataList.utils.d.ts +2 -2
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListHeaderTile/components/DataListSortingOptions.d.ts +2 -2
- package/dist/DataList/components/DataListItem/DataListItemInternal.d.ts +2 -2
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListSearch/index.cjs +2 -12
- package/dist/DataList/components/DataListSearch/index.mjs +2 -12
- package/dist/DataList/hooks/useGetItemActions.d.ts +1 -1
- package/dist/DataList/index.cjs +1 -8
- package/dist/DataList/index.mjs +1 -8
- package/dist/DataListActions-cjs.js +4 -2
- package/dist/DataListActions-es.js +4 -2
- package/dist/DataListItem-cjs.js +8 -7
- package/dist/DataListItem-es.js +9 -8
- package/dist/DataListSort-cjs.js +1 -1
- package/dist/DataListSort-es.js +2 -2
- package/dist/DataTable/SortIcon.d.ts +2 -1
- package/dist/DataTable/components/DataTableSortableHeader.d.ts +1 -1
- package/dist/DataTable/index.cjs +3 -2
- package/dist/DataTable/index.mjs +3 -2
- package/dist/DatePicker/DatePicker.d.ts +5 -1
- package/dist/DatePicker/index.cjs +2 -2
- package/dist/DatePicker/index.mjs +2 -2
- package/dist/DatePicker/useFocusOnSelectedDate.d.ts +1 -2
- package/dist/DatePicker-cjs.js +4 -2
- package/dist/DatePicker-es.js +5 -3
- package/dist/FormField/FormFieldAffix.d.ts +2 -2
- package/dist/FormField/FormFieldTypes.d.ts +3 -5
- package/dist/FormField/FormFieldWrapper.d.ts +5 -1
- package/dist/FormField/hooks/useFormFieldFocus.d.ts +1 -1
- package/dist/FormField/hooks/useFormFieldWrapperStyles.d.ts +9 -4
- package/dist/FormField-cjs.js +35 -31
- package/dist/FormField-es.js +35 -31
- package/dist/InputDate/InputDate.types.d.ts +12 -7
- package/dist/InputDate/index.cjs +35 -12
- package/dist/InputDate/index.mjs +35 -12
- package/dist/InputDate/useInputDateActivatorActions.d.ts +4 -8
- package/dist/InputEmail/InputEmail.types.d.ts +10 -20
- package/dist/InputEmail/hooks/useInputEmailActions.d.ts +10 -4
- package/dist/InputEmail/index.cjs +43 -60
- package/dist/InputEmail/index.mjs +44 -61
- package/dist/InputFile-cjs.js +5 -2
- package/dist/InputFile-es.js +5 -2
- package/dist/InputGroup-cjs.js +5 -2
- package/dist/InputGroup-es.js +5 -2
- package/dist/InputNumber/InputNumber.rebuilt.types.d.ts +7 -15
- package/dist/InputNumber/index.cjs +7 -5
- package/dist/InputNumber/index.mjs +7 -5
- package/dist/InputPhoneNumber/InputPhoneNumber.types.d.ts +12 -28
- package/dist/InputPhoneNumber/hooks/useInputPhoneActions.d.ts +9 -4
- package/dist/InputPhoneNumber/index.cjs +37 -36
- package/dist/InputPhoneNumber/index.mjs +38 -37
- package/dist/InputText/InputText.d.ts +2 -2
- package/dist/InputText/InputText.types.d.ts +30 -25
- package/dist/InputText/index.cjs +54 -62
- package/dist/InputText/index.mjs +55 -63
- package/dist/InputText/useInputTextActions.d.ts +11 -5
- package/dist/InputText/useTextAreaResize.d.ts +2 -2
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +13 -4
- package/dist/InputTime/hooks/useInputTimeActions.d.ts +21 -0
- package/dist/InputTime/index.cjs +90 -30
- package/dist/InputTime/index.mjs +93 -33
- package/dist/InternalChipDismissible-cjs.js +3 -3
- package/dist/InternalChipDismissible-es.js +4 -4
- package/dist/List/index.cjs +2 -2
- package/dist/List/index.mjs +2 -2
- package/dist/Menu/Menu.d.ts +2 -4
- package/dist/Menu/Menu.types.d.ts +21 -5
- package/dist/Menu-cjs.js +9 -9
- package/dist/Menu-es.js +9 -9
- package/dist/Modal/Modal.types.d.ts +3 -3
- package/dist/Modal/ModalContext.rebuilt.d.ts +2 -2
- package/dist/MultiSelect/DropDownMenu.d.ts +1 -1
- package/dist/MultiSelect/index.cjs +1 -0
- package/dist/MultiSelect/index.mjs +1 -0
- package/dist/MultiSelect-cjs.js +13 -7
- package/dist/MultiSelect-es.js +13 -7
- package/dist/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/RadioGroup/RadioOption.d.ts +1 -1
- package/dist/RecurringSelect/index.cjs +3 -2
- package/dist/RecurringSelect/index.mjs +3 -2
- package/dist/Select/Select.types.d.ts +7 -3
- package/dist/Select/hooks/useSelectActions.d.ts +5 -5
- package/dist/Select/index.cjs +27 -42
- package/dist/Select/index.mjs +29 -44
- package/dist/StatusLabel/StatusLabel.d.ts +2 -1
- package/dist/Tabs/hooks/useTabsOverflow.d.ts +2 -2
- package/dist/Tabs-cjs.js +4 -2
- package/dist/Tabs-es.js +5 -3
- package/dist/Tooltip/useTooltipPositioning.d.ts +1 -1
- package/dist/_baseEach-cjs.js +12 -12
- package/dist/_baseEach-es.js +1 -1
- package/dist/_baseFlatten-cjs.js +2 -2
- package/dist/_baseFlatten-es.js +1 -1
- package/dist/{_baseGet-cjs.js → _getAllKeys-cjs.js} +181 -181
- package/dist/{_baseGet-es.js → _getAllKeys-es.js} +182 -182
- package/dist/debounce-es.js +1 -1
- package/dist/filterDataAttributes-cjs.js +26 -0
- package/dist/filterDataAttributes-es.js +24 -0
- package/dist/floating-ui.react-cjs.js +115 -0
- package/dist/floating-ui.react-es.js +115 -1
- package/dist/helpers-cjs.js +1 -1
- package/dist/helpers-es.js +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.mjs +3 -2
- package/dist/omit-cjs.js +14 -14
- package/dist/omit-es.js +1 -1
- package/dist/sharedHelpers/filterDataAttributes.d.ts +17 -0
- package/dist/sharedHelpers/types.d.ts +231 -0
- package/dist/showToast-cjs.js +2 -2
- package/dist/showToast-es.js +2 -2
- package/dist/styles.css +32 -23
- package/dist/useChildComponent-cjs.js +1 -1
- package/dist/useChildComponent-es.js +1 -1
- package/dist/useScrollToActive-cjs.js +3 -3
- package/dist/useScrollToActive-es.js +2 -2
- package/dist/utils/mergeRefs.d.ts +2 -2
- package/package.json +3 -3
- package/dist/InputEmail/hooks/useInputEmailFormField.d.ts +0 -32
- package/dist/InputPhoneNumber/hooks/useInputPhoneFormField.d.ts +0 -71
- package/dist/InputText/useInputTextFormField.d.ts +0 -352
- package/dist/Select/hooks/useSelectFormField.d.ts +0 -34
|
@@ -1,152 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { f as _arrayLikeKeys, g as _MapCache } from './identity-es.js';
|
|
3
|
-
import { _ as _baseKeys } from './_getTag-es.js';
|
|
1
|
+
import { a as isArray_1, b as isArrayLike_1 } from './isTypedArray-es.js';
|
|
4
2
|
import { i as isSymbol_1 } from './isSymbol-es.js';
|
|
3
|
+
import { g as _MapCache, f as _arrayLikeKeys } from './identity-es.js';
|
|
5
4
|
import { b as _Symbol } from './isObjectLike-es.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* A specialized version of `_.map` for arrays without support for iteratee
|
|
9
|
-
* shorthands.
|
|
10
|
-
*
|
|
11
|
-
* @private
|
|
12
|
-
* @param {Array} [array] The array to iterate over.
|
|
13
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
14
|
-
* @returns {Array} Returns the new mapped array.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
function arrayMap$1(array, iteratee) {
|
|
18
|
-
var index = -1,
|
|
19
|
-
length = array == null ? 0 : array.length,
|
|
20
|
-
result = Array(length);
|
|
21
|
-
|
|
22
|
-
while (++index < length) {
|
|
23
|
-
result[index] = iteratee(array[index], index, array);
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
var _arrayMap = arrayMap$1;
|
|
29
|
-
|
|
30
|
-
var arrayLikeKeys = _arrayLikeKeys,
|
|
31
|
-
baseKeys = _baseKeys,
|
|
32
|
-
isArrayLike = isArrayLike_1;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Creates an array of the own enumerable property names of `object`.
|
|
36
|
-
*
|
|
37
|
-
* **Note:** Non-object values are coerced to objects. See the
|
|
38
|
-
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
39
|
-
* for more details.
|
|
40
|
-
*
|
|
41
|
-
* @static
|
|
42
|
-
* @since 0.1.0
|
|
43
|
-
* @memberOf _
|
|
44
|
-
* @category Object
|
|
45
|
-
* @param {Object} object The object to query.
|
|
46
|
-
* @returns {Array} Returns the array of property names.
|
|
47
|
-
* @example
|
|
48
|
-
*
|
|
49
|
-
* function Foo() {
|
|
50
|
-
* this.a = 1;
|
|
51
|
-
* this.b = 2;
|
|
52
|
-
* }
|
|
53
|
-
*
|
|
54
|
-
* Foo.prototype.c = 3;
|
|
55
|
-
*
|
|
56
|
-
* _.keys(new Foo);
|
|
57
|
-
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
58
|
-
*
|
|
59
|
-
* _.keys('hi');
|
|
60
|
-
* // => ['0', '1']
|
|
61
|
-
*/
|
|
62
|
-
function keys$1(object) {
|
|
63
|
-
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var keys_1 = keys$1;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* A specialized version of `_.filter` for arrays without support for
|
|
70
|
-
* iteratee shorthands.
|
|
71
|
-
*
|
|
72
|
-
* @private
|
|
73
|
-
* @param {Array} [array] The array to iterate over.
|
|
74
|
-
* @param {Function} predicate The function invoked per iteration.
|
|
75
|
-
* @returns {Array} Returns the new filtered array.
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
function arrayFilter$1(array, predicate) {
|
|
79
|
-
var index = -1,
|
|
80
|
-
length = array == null ? 0 : array.length,
|
|
81
|
-
resIndex = 0,
|
|
82
|
-
result = [];
|
|
83
|
-
|
|
84
|
-
while (++index < length) {
|
|
85
|
-
var value = array[index];
|
|
86
|
-
if (predicate(value, index, array)) {
|
|
87
|
-
result[resIndex++] = value;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return result;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
var _arrayFilter = arrayFilter$1;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* This method returns a new empty array.
|
|
97
|
-
*
|
|
98
|
-
* @static
|
|
99
|
-
* @memberOf _
|
|
100
|
-
* @since 4.13.0
|
|
101
|
-
* @category Util
|
|
102
|
-
* @returns {Array} Returns the new empty array.
|
|
103
|
-
* @example
|
|
104
|
-
*
|
|
105
|
-
* var arrays = _.times(2, _.stubArray);
|
|
106
|
-
*
|
|
107
|
-
* console.log(arrays);
|
|
108
|
-
* // => [[], []]
|
|
109
|
-
*
|
|
110
|
-
* console.log(arrays[0] === arrays[1]);
|
|
111
|
-
* // => false
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
function stubArray$1() {
|
|
115
|
-
return [];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
var stubArray_1 = stubArray$1;
|
|
119
|
-
|
|
120
|
-
var arrayFilter = _arrayFilter,
|
|
121
|
-
stubArray = stubArray_1;
|
|
122
|
-
|
|
123
|
-
/** Used for built-in method references. */
|
|
124
|
-
var objectProto = Object.prototype;
|
|
125
|
-
|
|
126
|
-
/** Built-in value references. */
|
|
127
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
128
|
-
|
|
129
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
130
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Creates an array of the own enumerable symbols of `object`.
|
|
134
|
-
*
|
|
135
|
-
* @private
|
|
136
|
-
* @param {Object} object The object to query.
|
|
137
|
-
* @returns {Array} Returns the array of symbols.
|
|
138
|
-
*/
|
|
139
|
-
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
|
|
140
|
-
if (object == null) {
|
|
141
|
-
return [];
|
|
142
|
-
}
|
|
143
|
-
object = Object(object);
|
|
144
|
-
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
145
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
146
|
-
});
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
var _getSymbols = getSymbols$1;
|
|
5
|
+
import { _ as _baseKeys } from './_getTag-es.js';
|
|
150
6
|
|
|
151
7
|
/**
|
|
152
8
|
* Appends the elements of `values` to `array`.
|
|
@@ -170,45 +26,30 @@ function arrayPush$1(array, values) {
|
|
|
170
26
|
|
|
171
27
|
var _arrayPush = arrayPush$1;
|
|
172
28
|
|
|
173
|
-
var arrayPush = _arrayPush,
|
|
174
|
-
isArray$3 = isArray_1;
|
|
175
|
-
|
|
176
29
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* symbols of `object`.
|
|
30
|
+
* A specialized version of `_.map` for arrays without support for iteratee
|
|
31
|
+
* shorthands.
|
|
180
32
|
*
|
|
181
33
|
* @private
|
|
182
|
-
* @param {
|
|
183
|
-
* @param {Function}
|
|
184
|
-
* @
|
|
185
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
34
|
+
* @param {Array} [array] The array to iterate over.
|
|
35
|
+
* @param {Function} iteratee The function invoked per iteration.
|
|
36
|
+
* @returns {Array} Returns the new mapped array.
|
|
186
37
|
*/
|
|
187
|
-
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
188
|
-
var result = keysFunc(object);
|
|
189
|
-
return isArray$3(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
190
|
-
}
|
|
191
38
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
keys = keys_1;
|
|
39
|
+
function arrayMap$1(array, iteratee) {
|
|
40
|
+
var index = -1,
|
|
41
|
+
length = array == null ? 0 : array.length,
|
|
42
|
+
result = Array(length);
|
|
197
43
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
* @param {Object} object The object to query.
|
|
203
|
-
* @returns {Array} Returns the array of property names and symbols.
|
|
204
|
-
*/
|
|
205
|
-
function getAllKeys(object) {
|
|
206
|
-
return baseGetAllKeys(object, keys, getSymbols);
|
|
44
|
+
while (++index < length) {
|
|
45
|
+
result[index] = iteratee(array[index], index, array);
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
207
48
|
}
|
|
208
49
|
|
|
209
|
-
var
|
|
50
|
+
var _arrayMap = arrayMap$1;
|
|
210
51
|
|
|
211
|
-
var isArray$
|
|
52
|
+
var isArray$3 = isArray_1,
|
|
212
53
|
isSymbol$2 = isSymbol_1;
|
|
213
54
|
|
|
214
55
|
/** Used to match property names within property paths. */
|
|
@@ -224,7 +65,7 @@ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
|
224
65
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
225
66
|
*/
|
|
226
67
|
function isKey$1(value, object) {
|
|
227
|
-
if (isArray$
|
|
68
|
+
if (isArray$3(value)) {
|
|
228
69
|
return false;
|
|
229
70
|
}
|
|
230
71
|
var type = typeof value;
|
|
@@ -369,7 +210,7 @@ var _stringToPath = stringToPath$1;
|
|
|
369
210
|
|
|
370
211
|
var Symbol = _Symbol,
|
|
371
212
|
arrayMap = _arrayMap,
|
|
372
|
-
isArray$
|
|
213
|
+
isArray$2 = isArray_1,
|
|
373
214
|
isSymbol$1 = isSymbol_1;
|
|
374
215
|
|
|
375
216
|
/** Used as references for various `Number` constants. */
|
|
@@ -392,7 +233,7 @@ function baseToString$1(value) {
|
|
|
392
233
|
if (typeof value == 'string') {
|
|
393
234
|
return value;
|
|
394
235
|
}
|
|
395
|
-
if (isArray$
|
|
236
|
+
if (isArray$2(value)) {
|
|
396
237
|
// Recursively convert values (susceptible to call stack limits).
|
|
397
238
|
return arrayMap(value, baseToString$1) + '';
|
|
398
239
|
}
|
|
@@ -434,7 +275,7 @@ function toString$1(value) {
|
|
|
434
275
|
|
|
435
276
|
var toString_1 = toString$1;
|
|
436
277
|
|
|
437
|
-
var isArray = isArray_1,
|
|
278
|
+
var isArray$1 = isArray_1,
|
|
438
279
|
isKey = _isKey,
|
|
439
280
|
stringToPath = _stringToPath,
|
|
440
281
|
toString = toString_1;
|
|
@@ -448,7 +289,7 @@ var isArray = isArray_1,
|
|
|
448
289
|
* @returns {Array} Returns the cast property path array.
|
|
449
290
|
*/
|
|
450
291
|
function castPath$1(value, object) {
|
|
451
|
-
if (isArray(value)) {
|
|
292
|
+
if (isArray$1(value)) {
|
|
452
293
|
return value;
|
|
453
294
|
}
|
|
454
295
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
@@ -503,4 +344,163 @@ function baseGet(object, path) {
|
|
|
503
344
|
|
|
504
345
|
var _baseGet = baseGet;
|
|
505
346
|
|
|
347
|
+
var arrayPush = _arrayPush,
|
|
348
|
+
isArray = isArray_1;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
352
|
+
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
353
|
+
* symbols of `object`.
|
|
354
|
+
*
|
|
355
|
+
* @private
|
|
356
|
+
* @param {Object} object The object to query.
|
|
357
|
+
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
358
|
+
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
359
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
360
|
+
*/
|
|
361
|
+
function baseGetAllKeys$1(object, keysFunc, symbolsFunc) {
|
|
362
|
+
var result = keysFunc(object);
|
|
363
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
var _baseGetAllKeys = baseGetAllKeys$1;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* A specialized version of `_.filter` for arrays without support for
|
|
370
|
+
* iteratee shorthands.
|
|
371
|
+
*
|
|
372
|
+
* @private
|
|
373
|
+
* @param {Array} [array] The array to iterate over.
|
|
374
|
+
* @param {Function} predicate The function invoked per iteration.
|
|
375
|
+
* @returns {Array} Returns the new filtered array.
|
|
376
|
+
*/
|
|
377
|
+
|
|
378
|
+
function arrayFilter$1(array, predicate) {
|
|
379
|
+
var index = -1,
|
|
380
|
+
length = array == null ? 0 : array.length,
|
|
381
|
+
resIndex = 0,
|
|
382
|
+
result = [];
|
|
383
|
+
|
|
384
|
+
while (++index < length) {
|
|
385
|
+
var value = array[index];
|
|
386
|
+
if (predicate(value, index, array)) {
|
|
387
|
+
result[resIndex++] = value;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return result;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
var _arrayFilter = arrayFilter$1;
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* This method returns a new empty array.
|
|
397
|
+
*
|
|
398
|
+
* @static
|
|
399
|
+
* @memberOf _
|
|
400
|
+
* @since 4.13.0
|
|
401
|
+
* @category Util
|
|
402
|
+
* @returns {Array} Returns the new empty array.
|
|
403
|
+
* @example
|
|
404
|
+
*
|
|
405
|
+
* var arrays = _.times(2, _.stubArray);
|
|
406
|
+
*
|
|
407
|
+
* console.log(arrays);
|
|
408
|
+
* // => [[], []]
|
|
409
|
+
*
|
|
410
|
+
* console.log(arrays[0] === arrays[1]);
|
|
411
|
+
* // => false
|
|
412
|
+
*/
|
|
413
|
+
|
|
414
|
+
function stubArray$1() {
|
|
415
|
+
return [];
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
var stubArray_1 = stubArray$1;
|
|
419
|
+
|
|
420
|
+
var arrayFilter = _arrayFilter,
|
|
421
|
+
stubArray = stubArray_1;
|
|
422
|
+
|
|
423
|
+
/** Used for built-in method references. */
|
|
424
|
+
var objectProto = Object.prototype;
|
|
425
|
+
|
|
426
|
+
/** Built-in value references. */
|
|
427
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
428
|
+
|
|
429
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
430
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* Creates an array of the own enumerable symbols of `object`.
|
|
434
|
+
*
|
|
435
|
+
* @private
|
|
436
|
+
* @param {Object} object The object to query.
|
|
437
|
+
* @returns {Array} Returns the array of symbols.
|
|
438
|
+
*/
|
|
439
|
+
var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) {
|
|
440
|
+
if (object == null) {
|
|
441
|
+
return [];
|
|
442
|
+
}
|
|
443
|
+
object = Object(object);
|
|
444
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
445
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
var _getSymbols = getSymbols$1;
|
|
450
|
+
|
|
451
|
+
var arrayLikeKeys = _arrayLikeKeys,
|
|
452
|
+
baseKeys = _baseKeys,
|
|
453
|
+
isArrayLike = isArrayLike_1;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Creates an array of the own enumerable property names of `object`.
|
|
457
|
+
*
|
|
458
|
+
* **Note:** Non-object values are coerced to objects. See the
|
|
459
|
+
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
460
|
+
* for more details.
|
|
461
|
+
*
|
|
462
|
+
* @static
|
|
463
|
+
* @since 0.1.0
|
|
464
|
+
* @memberOf _
|
|
465
|
+
* @category Object
|
|
466
|
+
* @param {Object} object The object to query.
|
|
467
|
+
* @returns {Array} Returns the array of property names.
|
|
468
|
+
* @example
|
|
469
|
+
*
|
|
470
|
+
* function Foo() {
|
|
471
|
+
* this.a = 1;
|
|
472
|
+
* this.b = 2;
|
|
473
|
+
* }
|
|
474
|
+
*
|
|
475
|
+
* Foo.prototype.c = 3;
|
|
476
|
+
*
|
|
477
|
+
* _.keys(new Foo);
|
|
478
|
+
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
479
|
+
*
|
|
480
|
+
* _.keys('hi');
|
|
481
|
+
* // => ['0', '1']
|
|
482
|
+
*/
|
|
483
|
+
function keys$1(object) {
|
|
484
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
var keys_1 = keys$1;
|
|
488
|
+
|
|
489
|
+
var baseGetAllKeys = _baseGetAllKeys,
|
|
490
|
+
getSymbols = _getSymbols,
|
|
491
|
+
keys = keys_1;
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* Creates an array of own enumerable property names and symbols of `object`.
|
|
495
|
+
*
|
|
496
|
+
* @private
|
|
497
|
+
* @param {Object} object The object to query.
|
|
498
|
+
* @returns {Array} Returns the array of property names and symbols.
|
|
499
|
+
*/
|
|
500
|
+
function getAllKeys(object) {
|
|
501
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
var _getAllKeys = getAllKeys;
|
|
505
|
+
|
|
506
506
|
export { _arrayPush as _, _arrayMap as a, _baseGet as b, _getSymbols as c, _baseGetAllKeys as d, _getAllKeys as e, _castPath as f, _toKey as g, _isKey as h, keys_1 as k, stubArray_1 as s };
|
package/dist/debounce-es.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filters and returns all data-* attributes from props.
|
|
5
|
+
* This allows components to accept standard HTML data attributes
|
|
6
|
+
* in their natural hyphenated syntax (e.g., data-test-id, data-loading).
|
|
7
|
+
*
|
|
8
|
+
* @param props - The component props object
|
|
9
|
+
* @returns An object containing only the data-* attributes
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const dataAttrs = filterDataAttributes(props);
|
|
14
|
+
* return <input {...dataAttrs} />;
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
function filterDataAttributes(props) {
|
|
18
|
+
return Object.keys(props).reduce((acc, key) => {
|
|
19
|
+
if (key.startsWith("data-")) {
|
|
20
|
+
acc[key] = props[key];
|
|
21
|
+
}
|
|
22
|
+
return acc;
|
|
23
|
+
}, {});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.filterDataAttributes = filterDataAttributes;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filters and returns all data-* attributes from props.
|
|
3
|
+
* This allows components to accept standard HTML data attributes
|
|
4
|
+
* in their natural hyphenated syntax (e.g., data-test-id, data-loading).
|
|
5
|
+
*
|
|
6
|
+
* @param props - The component props object
|
|
7
|
+
* @returns An object containing only the data-* attributes
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const dataAttrs = filterDataAttributes(props);
|
|
12
|
+
* return <input {...dataAttrs} />;
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
function filterDataAttributes(props) {
|
|
16
|
+
return Object.keys(props).reduce((acc, key) => {
|
|
17
|
+
if (key.startsWith("data-")) {
|
|
18
|
+
acc[key] = props[key];
|
|
19
|
+
}
|
|
20
|
+
return acc;
|
|
21
|
+
}, {});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export { filterDataAttributes as f };
|
|
@@ -1065,6 +1065,12 @@ function isVirtualPointerEvent(event) {
|
|
|
1065
1065
|
// iOS VoiceOver returns 0.333• for width/height.
|
|
1066
1066
|
event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';
|
|
1067
1067
|
}
|
|
1068
|
+
function isMouseLikePointerType(pointerType, strict) {
|
|
1069
|
+
// On some Linux machines with Chromium, mouse inputs return a `pointerType`
|
|
1070
|
+
// of "pen": https://github.com/floating-ui/floating-ui/issues/2015
|
|
1071
|
+
const values = ['mouse', 'pen'];
|
|
1072
|
+
return values.includes(pointerType);
|
|
1073
|
+
}
|
|
1068
1074
|
|
|
1069
1075
|
var isClient$1 = typeof document !== 'undefined';
|
|
1070
1076
|
|
|
@@ -4562,6 +4568,114 @@ const FloatingOverlay = /*#__PURE__*/React__namespace.forwardRef(function Floati
|
|
|
4562
4568
|
});
|
|
4563
4569
|
});
|
|
4564
4570
|
|
|
4571
|
+
function isButtonTarget(event) {
|
|
4572
|
+
return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';
|
|
4573
|
+
}
|
|
4574
|
+
function isAnchorTarget(event) {
|
|
4575
|
+
return isHTMLElement(event.target) && event.target.tagName === 'A';
|
|
4576
|
+
}
|
|
4577
|
+
function isSpaceIgnored(element) {
|
|
4578
|
+
return isTypeableElement(element);
|
|
4579
|
+
}
|
|
4580
|
+
/**
|
|
4581
|
+
* Opens or closes the floating element when clicking the reference element.
|
|
4582
|
+
* @see https://floating-ui.com/docs/useClick
|
|
4583
|
+
*/
|
|
4584
|
+
function useClick(context, props) {
|
|
4585
|
+
if (props === void 0) {
|
|
4586
|
+
props = {};
|
|
4587
|
+
}
|
|
4588
|
+
const {
|
|
4589
|
+
open,
|
|
4590
|
+
onOpenChange,
|
|
4591
|
+
dataRef,
|
|
4592
|
+
elements: {
|
|
4593
|
+
domReference
|
|
4594
|
+
}
|
|
4595
|
+
} = context;
|
|
4596
|
+
const {
|
|
4597
|
+
enabled = true,
|
|
4598
|
+
event: eventOption = 'click',
|
|
4599
|
+
toggle = true,
|
|
4600
|
+
ignoreMouse = false,
|
|
4601
|
+
keyboardHandlers = true,
|
|
4602
|
+
stickIfOpen = true
|
|
4603
|
+
} = props;
|
|
4604
|
+
const pointerTypeRef = React__namespace.useRef();
|
|
4605
|
+
const didKeyDownRef = React__namespace.useRef(false);
|
|
4606
|
+
const reference = React__namespace.useMemo(() => ({
|
|
4607
|
+
onPointerDown(event) {
|
|
4608
|
+
pointerTypeRef.current = event.pointerType;
|
|
4609
|
+
},
|
|
4610
|
+
onMouseDown(event) {
|
|
4611
|
+
const pointerType = pointerTypeRef.current;
|
|
4612
|
+
|
|
4613
|
+
// Ignore all buttons except for the "main" button.
|
|
4614
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
|
|
4615
|
+
if (event.button !== 0) return;
|
|
4616
|
+
if (eventOption === 'click') return;
|
|
4617
|
+
if (isMouseLikePointerType(pointerType) && ignoreMouse) return;
|
|
4618
|
+
if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {
|
|
4619
|
+
onOpenChange(false, event.nativeEvent, 'click');
|
|
4620
|
+
} else {
|
|
4621
|
+
// Prevent stealing focus from the floating element
|
|
4622
|
+
event.preventDefault();
|
|
4623
|
+
onOpenChange(true, event.nativeEvent, 'click');
|
|
4624
|
+
}
|
|
4625
|
+
},
|
|
4626
|
+
onClick(event) {
|
|
4627
|
+
const pointerType = pointerTypeRef.current;
|
|
4628
|
+
if (eventOption === 'mousedown' && pointerTypeRef.current) {
|
|
4629
|
+
pointerTypeRef.current = undefined;
|
|
4630
|
+
return;
|
|
4631
|
+
}
|
|
4632
|
+
if (isMouseLikePointerType(pointerType) && ignoreMouse) return;
|
|
4633
|
+
if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {
|
|
4634
|
+
onOpenChange(false, event.nativeEvent, 'click');
|
|
4635
|
+
} else {
|
|
4636
|
+
onOpenChange(true, event.nativeEvent, 'click');
|
|
4637
|
+
}
|
|
4638
|
+
},
|
|
4639
|
+
onKeyDown(event) {
|
|
4640
|
+
pointerTypeRef.current = undefined;
|
|
4641
|
+
if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {
|
|
4642
|
+
return;
|
|
4643
|
+
}
|
|
4644
|
+
if (event.key === ' ' && !isSpaceIgnored(domReference)) {
|
|
4645
|
+
// Prevent scrolling
|
|
4646
|
+
event.preventDefault();
|
|
4647
|
+
didKeyDownRef.current = true;
|
|
4648
|
+
}
|
|
4649
|
+
if (isAnchorTarget(event)) {
|
|
4650
|
+
return;
|
|
4651
|
+
}
|
|
4652
|
+
if (event.key === 'Enter') {
|
|
4653
|
+
if (open && toggle) {
|
|
4654
|
+
onOpenChange(false, event.nativeEvent, 'click');
|
|
4655
|
+
} else {
|
|
4656
|
+
onOpenChange(true, event.nativeEvent, 'click');
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
},
|
|
4660
|
+
onKeyUp(event) {
|
|
4661
|
+
if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {
|
|
4662
|
+
return;
|
|
4663
|
+
}
|
|
4664
|
+
if (event.key === ' ' && didKeyDownRef.current) {
|
|
4665
|
+
didKeyDownRef.current = false;
|
|
4666
|
+
if (open && toggle) {
|
|
4667
|
+
onOpenChange(false, event.nativeEvent, 'click');
|
|
4668
|
+
} else {
|
|
4669
|
+
onOpenChange(true, event.nativeEvent, 'click');
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
}), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);
|
|
4674
|
+
return React__namespace.useMemo(() => enabled ? {
|
|
4675
|
+
reference
|
|
4676
|
+
} : {}, [enabled, reference]);
|
|
4677
|
+
}
|
|
4678
|
+
|
|
4565
4679
|
const bubbleHandlerKeys = {
|
|
4566
4680
|
pointerdown: 'onPointerDown',
|
|
4567
4681
|
mousedown: 'onMouseDown',
|
|
@@ -5943,6 +6057,7 @@ exports.limitShift = limitShift;
|
|
|
5943
6057
|
exports.offset = offset;
|
|
5944
6058
|
exports.shift = shift;
|
|
5945
6059
|
exports.size = size;
|
|
6060
|
+
exports.useClick = useClick;
|
|
5946
6061
|
exports.useDismiss = useDismiss;
|
|
5947
6062
|
exports.useFloating = useFloating;
|
|
5948
6063
|
exports.useFloatingNodeId = useFloatingNodeId;
|