@jobber/components 7.1.2-MIKElock--7916eb4.2 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/Chip.d.ts +7 -1
- package/dist/Chip/Chip.types.d.ts +7 -2
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip/index.mjs +2 -2
- package/dist/Chip-cjs.js +42 -27
- package/dist/Chip-es.js +42 -27
- package/dist/ChipDismissible-es.js +1 -1
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -1
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -1
- package/dist/Combobox/components/ComboboxTrigger/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 +2 -2
- package/dist/InternalChipDismissible-es.js +3 -3
- 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/Chip/Chip.md +4 -2
- 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
package/dist/Grid-es.js
CHANGED
|
@@ -3,7 +3,7 @@ import classnames from 'classnames';
|
|
|
3
3
|
import { a as GridCell } from './GridCell-es.js';
|
|
4
4
|
import { g as getMappedAtlantisSpaceToken } from './getMappedAtlantisSpaceToken-es.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"grid":"_0X4jj5NERa4-","gap":"d3vl57tdCWA-"};
|
|
6
|
+
var styles = {"grid":"_0X4jj5NERa4-","gap":"d3vl57tdCWA-","spinning":"Y--XfgJk5Fw-"};
|
|
7
7
|
|
|
8
8
|
var alignments = {"center":"V-24AGDyie4-","start":"H0zdYNTapmM-","end":"O5VtcGWRV3M-","stretch":"wVv5gaWrouI-","spinning":"DcsVgHCowbg-"};
|
|
9
9
|
|
package/dist/GridCell-cjs.js
CHANGED
package/dist/GridCell-es.js
CHANGED
package/dist/InputAvatar-cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ var ProgressBar = require('./ProgressBar-cjs.js');
|
|
|
8
8
|
var Button = require('./Button-cjs.js');
|
|
9
9
|
require('classnames');
|
|
10
10
|
|
|
11
|
-
var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-"};
|
|
11
|
+
var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-","spinning":"aeMMyPDHQho-"};
|
|
12
12
|
|
|
13
13
|
function InputAvatar(_a) {
|
|
14
14
|
var { getUploadParams, onUploadComplete, onChange } = _a, avatarProps = tslib_es6.__rest(_a, ["getUploadParams", "onUploadComplete", "onChange"]);
|
package/dist/InputAvatar-es.js
CHANGED
|
@@ -6,7 +6,7 @@ import { P as ProgressBar } from './ProgressBar-es.js';
|
|
|
6
6
|
import { B as Button } from './Button-es.js';
|
|
7
7
|
import 'classnames';
|
|
8
8
|
|
|
9
|
-
var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-"};
|
|
9
|
+
var styles = {"inputAvatar":"CMahTsC0SPE-","preview":"VOVr4KEFeVk-","centered":"HzGL7-Sfok4-","overlay":"Cflv-yL6aVQ-","spinning":"aeMMyPDHQho-"};
|
|
10
10
|
|
|
11
11
|
function InputAvatar(_a) {
|
|
12
12
|
var { getUploadParams, onUploadComplete, onChange } = _a, avatarProps = __rest(_a, ["getUploadParams", "onUploadComplete", "onChange"]);
|
package/dist/InputDate/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect, forwardRef } from 'react';
|
|
2
2
|
import { o as omit } from '../omit-es.js';
|
|
3
|
-
import {
|
|
3
|
+
import { k as FormField } from '../FormField-es.js';
|
|
4
4
|
import 'classnames';
|
|
5
5
|
import '../tslib.es6-es.js';
|
|
6
6
|
import 'react-hook-form';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { forwardRef, useId, useRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { k as FormField, b as useAtlantisFormFieldName, f as FormFieldWrapper, l as formFieldStyles, m as FormFieldPostFix } from '../FormField-es.js';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import '../tslib.es6-es.js';
|
|
5
5
|
import 'react-hook-form';
|
package/dist/InputFile-cjs.js
CHANGED
|
@@ -330,11 +330,6 @@ function fromFileEntry(entry) {
|
|
|
330
330
|
var _default = function (file, acceptedFiles) {
|
|
331
331
|
if (file && acceptedFiles) {
|
|
332
332
|
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
|
|
333
|
-
|
|
334
|
-
if (acceptedFilesArray.length === 0) {
|
|
335
|
-
return true;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
333
|
var fileName = file.name || '';
|
|
339
334
|
var mimeType = (file.type || '').toLowerCase();
|
|
340
335
|
var baseMimeType = mimeType.replace(/\/.*$/, '');
|
|
@@ -357,7 +352,7 @@ var _default = function (file, acceptedFiles) {
|
|
|
357
352
|
|
|
358
353
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
359
354
|
|
|
360
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source),
|
|
355
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
361
356
|
|
|
362
357
|
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
363
358
|
|
|
@@ -575,7 +570,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
575
570
|
|
|
576
571
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
577
572
|
|
|
578
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source),
|
|
573
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
579
574
|
|
|
580
575
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
581
576
|
|
|
@@ -1445,7 +1440,7 @@ function reducer(state, action) {
|
|
|
1445
1440
|
|
|
1446
1441
|
function noop() {}
|
|
1447
1442
|
|
|
1448
|
-
var styles = {"dropZoneBase":"fSDkYM-382I-","dropZone":"yT6m1v71VK8-","active":"fCb0O1wAjR0-","error":"Cm5wIem0XQI-","validationErrors":"wyjYhAlF1qA-","dropzoneContent":"sAxF04DcAi4-"};
|
|
1443
|
+
var styles = {"dropZoneBase":"fSDkYM-382I-","dropZone":"yT6m1v71VK8-","active":"fCb0O1wAjR0-","error":"Cm5wIem0XQI-","validationErrors":"wyjYhAlF1qA-","dropzoneContent":"sAxF04DcAi4-","spinning":"SUZshYRxxl4-"};
|
|
1449
1444
|
|
|
1450
1445
|
var FileTypes;
|
|
1451
1446
|
(function (FileTypes) {
|
package/dist/InputFile-es.js
CHANGED
|
@@ -328,11 +328,6 @@ function fromFileEntry(entry) {
|
|
|
328
328
|
var _default = function (file, acceptedFiles) {
|
|
329
329
|
if (file && acceptedFiles) {
|
|
330
330
|
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(',');
|
|
331
|
-
|
|
332
|
-
if (acceptedFilesArray.length === 0) {
|
|
333
|
-
return true;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
331
|
var fileName = file.name || '';
|
|
337
332
|
var mimeType = (file.type || '').toLowerCase();
|
|
338
333
|
var baseMimeType = mimeType.replace(/\/.*$/, '');
|
|
@@ -355,7 +350,7 @@ var _default = function (file, acceptedFiles) {
|
|
|
355
350
|
|
|
356
351
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
357
352
|
|
|
358
|
-
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source),
|
|
353
|
+
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
359
354
|
|
|
360
355
|
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
361
356
|
|
|
@@ -573,7 +568,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
573
568
|
|
|
574
569
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
575
570
|
|
|
576
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source),
|
|
571
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
577
572
|
|
|
578
573
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
579
574
|
|
|
@@ -1443,7 +1438,7 @@ function reducer(state, action) {
|
|
|
1443
1438
|
|
|
1444
1439
|
function noop() {}
|
|
1445
1440
|
|
|
1446
|
-
var styles = {"dropZoneBase":"fSDkYM-382I-","dropZone":"yT6m1v71VK8-","active":"fCb0O1wAjR0-","error":"Cm5wIem0XQI-","validationErrors":"wyjYhAlF1qA-","dropzoneContent":"sAxF04DcAi4-"};
|
|
1441
|
+
var styles = {"dropZoneBase":"fSDkYM-382I-","dropZone":"yT6m1v71VK8-","active":"fCb0O1wAjR0-","error":"Cm5wIem0XQI-","validationErrors":"wyjYhAlF1qA-","dropzoneContent":"sAxF04DcAi4-","spinning":"SUZshYRxxl4-"};
|
|
1447
1442
|
|
|
1448
1443
|
var FileTypes;
|
|
1449
1444
|
(function (FileTypes) {
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var tslib_es6 = require('../tslib.es6-cjs.js');
|
|
5
5
|
var Text = require('../Text-cjs2.js');
|
|
6
|
-
var ReactDOM = require('react-dom');
|
|
7
6
|
var classnames = require('classnames');
|
|
8
7
|
var Icon = require('../Icon-cjs.js');
|
|
9
8
|
var Text$1 = require('../Text-cjs.js');
|
|
@@ -45,7 +44,8 @@ function $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {
|
|
|
45
44
|
form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);
|
|
46
45
|
};
|
|
47
46
|
}, [
|
|
48
|
-
ref
|
|
47
|
+
ref,
|
|
48
|
+
handleReset
|
|
49
49
|
]);
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -631,7 +631,6 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
631
631
|
let updateState = (React.useCallback)(()=>setFocusVisible(state.current.isFocused && state.current.isFocusVisible), []);
|
|
632
632
|
let onFocusChange = (React.useCallback)((isFocused)=>{
|
|
633
633
|
state.current.isFocused = isFocused;
|
|
634
|
-
state.current.isFocusVisible = (Text.$507fabe10e71c6fb$export$b9b3dfddab17db27)();
|
|
635
634
|
setFocused(isFocused);
|
|
636
635
|
updateState();
|
|
637
636
|
}, [
|
|
@@ -640,11 +639,7 @@ function $f7dceffc5ad7768b$export$4e328f61c538687f(props = {}) {
|
|
|
640
639
|
(Text.$507fabe10e71c6fb$export$ec71b4b83ac08ec3)((isFocusVisible)=>{
|
|
641
640
|
state.current.isFocusVisible = isFocusVisible;
|
|
642
641
|
updateState();
|
|
643
|
-
}, [
|
|
644
|
-
isTextInput,
|
|
645
|
-
isFocused
|
|
646
|
-
], {
|
|
647
|
-
enabled: isFocused,
|
|
642
|
+
}, [], {
|
|
648
643
|
isTextInput: isTextInput
|
|
649
644
|
});
|
|
650
645
|
let { focusProps: focusProps } = (Text.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
@@ -969,7 +964,7 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
969
964
|
// This is best-effort. There may be false positives, e.g. setTimeout.
|
|
970
965
|
form.reset = ()=>{
|
|
971
966
|
// React uses MessageChannel for scheduling, so ignore 'message' events.
|
|
972
|
-
isIgnoredReset.current = !window.event || window.event.type === 'message' &&
|
|
967
|
+
isIgnoredReset.current = !window.event || window.event.type === 'message' && window.event.target instanceof MessagePort;
|
|
973
968
|
reset === null || reset === void 0 ? void 0 : reset.call(form);
|
|
974
969
|
isIgnoredReset.current = false;
|
|
975
970
|
};
|
|
@@ -985,6 +980,9 @@ function $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {
|
|
|
985
980
|
};
|
|
986
981
|
}, [
|
|
987
982
|
ref,
|
|
983
|
+
onInvalid,
|
|
984
|
+
onChange,
|
|
985
|
+
onReset,
|
|
988
986
|
validationBehavior
|
|
989
987
|
]);
|
|
990
988
|
}
|
|
@@ -1017,9 +1015,8 @@ function $e93e671b31057976$var$getNativeValidity(input) {
|
|
|
1017
1015
|
}
|
|
1018
1016
|
function $e93e671b31057976$var$getFirstInvalidInput(form) {
|
|
1019
1017
|
for(let i = 0; i < form.elements.length; i++){
|
|
1020
|
-
var _element_validity;
|
|
1021
1018
|
let element = form.elements[i];
|
|
1022
|
-
if (
|
|
1019
|
+
if (!element.validity.valid) return element;
|
|
1023
1020
|
}
|
|
1024
1021
|
return null;
|
|
1025
1022
|
}
|
|
@@ -1066,6 +1063,25 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
1066
1063
|
var _props_defaultValue;
|
|
1067
1064
|
($99facab73266f662$export$5add1d006293d136)(ref, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : initialValue, setValue);
|
|
1068
1065
|
($e93e671b31057976$export$b8473d3665f3a75a)(props, validationState, ref);
|
|
1066
|
+
(React.useEffect)(()=>{
|
|
1067
|
+
// This works around a React/Chrome bug that prevents textarea elements from validating when controlled.
|
|
1068
|
+
// We prevent React from updating defaultValue (i.e. children) of textarea when `value` changes,
|
|
1069
|
+
// which causes Chrome to skip validation. Only updating `value` is ok in our case since our
|
|
1070
|
+
// textareas are always controlled. React is planning on removing this synchronization in a
|
|
1071
|
+
// future major version.
|
|
1072
|
+
// https://github.com/facebook/react/issues/19474
|
|
1073
|
+
// https://github.com/facebook/react/issues/11896
|
|
1074
|
+
if (ref.current instanceof (Text.$431fbd86ca7dc216$export$f21a1ffae260145a)(ref.current).HTMLTextAreaElement) {
|
|
1075
|
+
let input = ref.current;
|
|
1076
|
+
Object.defineProperty(input, 'defaultValue', {
|
|
1077
|
+
get: ()=>input.value,
|
|
1078
|
+
set: ()=>{},
|
|
1079
|
+
configurable: true
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
}, [
|
|
1083
|
+
ref
|
|
1084
|
+
]);
|
|
1069
1085
|
return {
|
|
1070
1086
|
labelProps: labelProps,
|
|
1071
1087
|
inputProps: (Text.$3ef42575df84b30b$export$9d1611c77c2fe928)(domProps, inputElementType === 'input' ? inputOnlyProps : undefined, {
|
|
@@ -1080,7 +1096,7 @@ function $2d73ec29415bd339$export$712718f7aec83d5(props, ref) {
|
|
|
1080
1096
|
'aria-haspopup': props['aria-haspopup'],
|
|
1081
1097
|
'aria-controls': props['aria-controls'],
|
|
1082
1098
|
value: value,
|
|
1083
|
-
onChange: (e)=>setValue(
|
|
1099
|
+
onChange: (e)=>setValue(e.target.value),
|
|
1084
1100
|
autoComplete: props.autoComplete,
|
|
1085
1101
|
autoCapitalize: props.autoCapitalize,
|
|
1086
1102
|
maxLength: props.maxLength,
|
|
@@ -1190,10 +1206,11 @@ function $d841c8010a73d545$export$4f384c9210e583c3(props, state, inputRef) {
|
|
|
1190
1206
|
input.removeEventListener('beforeinput', onBeforeInputFallback, false);
|
|
1191
1207
|
};
|
|
1192
1208
|
}, [
|
|
1193
|
-
inputRef
|
|
1209
|
+
inputRef,
|
|
1210
|
+
onBeforeInputFallback
|
|
1194
1211
|
]);
|
|
1195
1212
|
let onBeforeInput = !$d841c8010a73d545$var$supportsNativeBeforeInputEvent() ? (e)=>{
|
|
1196
|
-
let nextValue =
|
|
1213
|
+
let nextValue = e.target.value.slice(0, e.target.selectionStart) + e.data + e.target.value.slice(e.target.selectionEnd);
|
|
1197
1214
|
if (!state.validate(nextValue)) e.preventDefault();
|
|
1198
1215
|
} : null;
|
|
1199
1216
|
let { labelProps: labelProps, inputProps: textFieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, ...validation } = ($2d73ec29415bd339$export$712718f7aec83d5)(props, inputRef);
|
|
@@ -1311,25 +1328,22 @@ function $de67e98908f0c6ee$export$7f629e9dc1ecf37c(props) {
|
|
|
1311
1328
|
numberParser,
|
|
1312
1329
|
inputValue
|
|
1313
1330
|
]);
|
|
1314
|
-
let commit = (
|
|
1315
|
-
let newInputValue = overrideValue === undefined ? inputValue : overrideValue;
|
|
1316
|
-
let newParsedValue = parsedValue;
|
|
1317
|
-
if (overrideValue !== undefined) newParsedValue = numberParser.parse(newInputValue);
|
|
1331
|
+
let commit = ()=>{
|
|
1318
1332
|
// Set to empty state if input value is empty
|
|
1319
|
-
if (!
|
|
1333
|
+
if (!inputValue.length) {
|
|
1320
1334
|
setNumberValue(NaN);
|
|
1321
1335
|
setInputValue(value === undefined ? '' : format(numberValue));
|
|
1322
1336
|
return;
|
|
1323
1337
|
}
|
|
1324
1338
|
// if it failed to parse, then reset input to formatted version of current number
|
|
1325
|
-
if (isNaN(
|
|
1339
|
+
if (isNaN(parsedValue)) {
|
|
1326
1340
|
setInputValue(format(numberValue));
|
|
1327
1341
|
return;
|
|
1328
1342
|
}
|
|
1329
1343
|
// Clamp to min and max, round to the nearest step, and round to specified number of digits
|
|
1330
1344
|
let clampedValue;
|
|
1331
|
-
if (step === undefined || isNaN(step)) clampedValue = (Text.$9446cca9a3875146$export$7d15b64cf5a3a4c4)(
|
|
1332
|
-
else clampedValue = (Text.$9446cca9a3875146$export$cb6e0bb50bc19463)(
|
|
1345
|
+
if (step === undefined || isNaN(step)) clampedValue = (Text.$9446cca9a3875146$export$7d15b64cf5a3a4c4)(parsedValue, minValue, maxValue);
|
|
1346
|
+
else clampedValue = (Text.$9446cca9a3875146$export$cb6e0bb50bc19463)(parsedValue, minValue, maxValue, step);
|
|
1333
1347
|
clampedValue = numberParser.parse(format(clampedValue));
|
|
1334
1348
|
setNumberValue(clampedValue);
|
|
1335
1349
|
// in a controlled state, the numberValue won't change, so we won't go back to our old input without help
|
|
@@ -1695,21 +1709,13 @@ function $parcel$interopDefault$1(a) {
|
|
|
1695
1709
|
|
|
1696
1710
|
|
|
1697
1711
|
|
|
1698
|
-
const $d2e8511e6f209edf$var$noop = ()=>{};
|
|
1699
1712
|
function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
1700
1713
|
const _async = (React.useRef)(undefined);
|
|
1701
1714
|
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;
|
|
1702
1715
|
const stringFormatter = (Text.$fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault$1($a99895ee3dc79e61$exports))), '@react-aria/spinbutton');
|
|
1703
|
-
|
|
1704
|
-
const clearAsync = (React.useCallback)(()=>{
|
|
1705
|
-
clearTimeout(_async.current);
|
|
1706
|
-
isSpinning.current = false;
|
|
1707
|
-
}, []);
|
|
1708
|
-
const clearAsyncEvent = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
1709
|
-
clearAsync();
|
|
1710
|
-
});
|
|
1716
|
+
const clearAsync = ()=>clearTimeout(_async.current);
|
|
1711
1717
|
(React.useEffect)(()=>{
|
|
1712
|
-
return ()=>
|
|
1718
|
+
return ()=>clearAsync();
|
|
1713
1719
|
}, []);
|
|
1714
1720
|
let onKeyDown = (e)=>{
|
|
1715
1721
|
if (e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || isReadOnly || e.nativeEvent.isComposing) return;
|
|
@@ -1776,61 +1782,26 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
1776
1782
|
}, [
|
|
1777
1783
|
ariaTextValue
|
|
1778
1784
|
]);
|
|
1779
|
-
|
|
1780
|
-
let onPointerCancel = (React.useCallback)(()=>{
|
|
1785
|
+
const onIncrementPressStart = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1781
1786
|
clearAsync();
|
|
1782
|
-
|
|
1783
|
-
clearAsync
|
|
1784
|
-
]);
|
|
1785
|
-
const onIncrementEvent = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)(onIncrement !== null && onIncrement !== void 0 ? onIncrement : $d2e8511e6f209edf$var$noop);
|
|
1786
|
-
const onDecrementEvent = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)(onDecrement !== null && onDecrement !== void 0 ? onDecrement : $d2e8511e6f209edf$var$noop);
|
|
1787
|
-
const stepUpEvent = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{
|
|
1788
|
-
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) {
|
|
1789
|
-
onIncrementEvent();
|
|
1790
|
-
onIncrementPressStartEvent(60);
|
|
1791
|
-
}
|
|
1792
|
-
});
|
|
1793
|
-
const onIncrementPressStartEvent = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1794
|
-
clearAsyncEvent();
|
|
1795
|
-
isSpinning.current = true;
|
|
1787
|
+
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1796
1788
|
// Start spinning after initial delay
|
|
1797
|
-
_async.current = window.setTimeout(
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) {
|
|
1801
|
-
onDecrementEvent();
|
|
1802
|
-
onDecrementPressStartEvent(60);
|
|
1803
|
-
}
|
|
1789
|
+
_async.current = window.setTimeout(()=>{
|
|
1790
|
+
if (maxValue === undefined || isNaN(maxValue) || value === undefined || isNaN(value) || value < maxValue) onIncrementPressStart(60);
|
|
1791
|
+
}, initialStepDelay);
|
|
1804
1792
|
});
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1807
|
-
|
|
1793
|
+
const onDecrementPressStart = (Text.$8ae05eaa5c114e9c$export$7f54fc3180508a52)((initialStepDelay)=>{
|
|
1794
|
+
clearAsync();
|
|
1795
|
+
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1808
1796
|
// Start spinning after initial delay
|
|
1809
|
-
_async.current = window.setTimeout(
|
|
1797
|
+
_async.current = window.setTimeout(()=>{
|
|
1798
|
+
if (minValue === undefined || isNaN(minValue) || value === undefined || isNaN(value) || value > minValue) onDecrementPressStart(60);
|
|
1799
|
+
}, initialStepDelay);
|
|
1810
1800
|
});
|
|
1811
1801
|
let cancelContextMenu = (e)=>{
|
|
1812
1802
|
e.preventDefault();
|
|
1813
1803
|
};
|
|
1814
1804
|
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (Text.$03deb23ff14920c4$export$4eaf04e54aa8eed6)();
|
|
1815
|
-
// Tracks in touch if the press end event was preceded by a press up.
|
|
1816
|
-
// If it wasn't, then we know the finger left the button while still in contact with the screen.
|
|
1817
|
-
// This means that the user is trying to scroll or interact in some way that shouldn't trigger
|
|
1818
|
-
// an increment or decrement.
|
|
1819
|
-
let isUp = (React.useRef)(false);
|
|
1820
|
-
let [isIncrementPressed, setIsIncrementPressed] = (React.useState)(null);
|
|
1821
|
-
(React.useEffect)(()=>{
|
|
1822
|
-
if (isIncrementPressed === 'touch') onIncrementPressStartEvent(600);
|
|
1823
|
-
else if (isIncrementPressed) onIncrementPressStartEvent(400);
|
|
1824
|
-
}, [
|
|
1825
|
-
isIncrementPressed
|
|
1826
|
-
]);
|
|
1827
|
-
let [isDecrementPressed, setIsDecrementPressed] = (React.useState)(null);
|
|
1828
|
-
(React.useEffect)(()=>{
|
|
1829
|
-
if (isDecrementPressed === 'touch') onDecrementPressStartEvent(600);
|
|
1830
|
-
else if (isDecrementPressed) onDecrementPressStartEvent(400);
|
|
1831
|
-
}, [
|
|
1832
|
-
isDecrementPressed
|
|
1833
|
-
]);
|
|
1834
1805
|
return {
|
|
1835
1806
|
spinButtonProps: {
|
|
1836
1807
|
role: 'spinbutton',
|
|
@@ -1846,68 +1817,25 @@ function $d2e8511e6f209edf$export$e908e06f4b8e3402(props) {
|
|
|
1846
1817
|
onBlur: onBlur
|
|
1847
1818
|
},
|
|
1848
1819
|
incrementButtonProps: {
|
|
1849
|
-
onPressStart: (
|
|
1850
|
-
|
|
1851
|
-
if (e.pointerType !== 'touch') {
|
|
1852
|
-
onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1853
|
-
setIsIncrementPressed('mouse');
|
|
1854
|
-
} else {
|
|
1855
|
-
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
1856
|
-
capture: true
|
|
1857
|
-
});
|
|
1858
|
-
isUp.current = false;
|
|
1859
|
-
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
1860
|
-
// the control isn't spinning.
|
|
1861
|
-
setIsIncrementPressed('touch');
|
|
1862
|
-
}
|
|
1820
|
+
onPressStart: ()=>{
|
|
1821
|
+
onIncrementPressStart(400);
|
|
1863
1822
|
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
1864
1823
|
},
|
|
1865
|
-
|
|
1824
|
+
onPressEnd: ()=>{
|
|
1866
1825
|
clearAsync();
|
|
1867
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
1868
1826
|
removeAllGlobalListeners();
|
|
1869
|
-
setIsIncrementPressed(null);
|
|
1870
|
-
},
|
|
1871
|
-
onPressEnd: (e)=>{
|
|
1872
|
-
clearAsync();
|
|
1873
|
-
if (e.pointerType === 'touch') {
|
|
1874
|
-
if (!isSpinning.current && isUp.current) onIncrement === null || onIncrement === void 0 ? void 0 : onIncrement();
|
|
1875
|
-
}
|
|
1876
|
-
isUp.current = false;
|
|
1877
|
-
setIsIncrementPressed(null);
|
|
1878
1827
|
},
|
|
1879
1828
|
onFocus: onFocus,
|
|
1880
1829
|
onBlur: onBlur
|
|
1881
1830
|
},
|
|
1882
1831
|
decrementButtonProps: {
|
|
1883
|
-
onPressStart: (
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1887
|
-
setIsDecrementPressed('mouse');
|
|
1888
|
-
} else {
|
|
1889
|
-
addGlobalListener(window, 'pointercancel', onPointerCancel, {
|
|
1890
|
-
capture: true
|
|
1891
|
-
});
|
|
1892
|
-
isUp.current = false;
|
|
1893
|
-
// For touch users, don't trigger a decrement on press start, we'll wait for the press end to trigger it if
|
|
1894
|
-
// the control isn't spinning.
|
|
1895
|
-
setIsDecrementPressed('touch');
|
|
1896
|
-
}
|
|
1832
|
+
onPressStart: ()=>{
|
|
1833
|
+
onDecrementPressStart(400);
|
|
1834
|
+
addGlobalListener(window, 'contextmenu', cancelContextMenu);
|
|
1897
1835
|
},
|
|
1898
|
-
|
|
1836
|
+
onPressEnd: ()=>{
|
|
1899
1837
|
clearAsync();
|
|
1900
|
-
if (e.pointerType === 'touch') isUp.current = true;
|
|
1901
1838
|
removeAllGlobalListeners();
|
|
1902
|
-
setIsDecrementPressed(null);
|
|
1903
|
-
},
|
|
1904
|
-
onPressEnd: (e)=>{
|
|
1905
|
-
clearAsync();
|
|
1906
|
-
if (e.pointerType === 'touch') {
|
|
1907
|
-
if (!isSpinning.current && isUp.current) onDecrement === null || onDecrement === void 0 ? void 0 : onDecrement();
|
|
1908
|
-
}
|
|
1909
|
-
isUp.current = false;
|
|
1910
|
-
setIsDecrementPressed(null);
|
|
1911
1839
|
},
|
|
1912
1840
|
onFocus: onFocus,
|
|
1913
1841
|
onBlur: onBlur
|
|
@@ -2246,30 +2174,15 @@ function $parcel$interopDefault(a) {
|
|
|
2246
2174
|
|
|
2247
2175
|
|
|
2248
2176
|
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
2177
|
function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
2252
2178
|
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;
|
|
2253
2179
|
let { increment: increment, incrementToMax: incrementToMax, decrement: decrement, decrementToMin: decrementToMin, numberValue: numberValue, inputValue: inputValue, commit: commit, commitValidation: commitValidation } = state;
|
|
2254
2180
|
const stringFormatter = (Text.$fca6afa0e843324b$export$f12b703ca79dfbb1)((($parcel$interopDefault($280a227d7cb94b92$exports))), '@react-aria/numberfield');
|
|
2255
|
-
let commitAndAnnounce = (React.useCallback)(()=>{
|
|
2256
|
-
var _inputRef_current, _inputRef_current1, _inputRef_current2;
|
|
2257
|
-
var _inputRef_current_value;
|
|
2258
|
-
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 : '';
|
|
2259
|
-
// Set input value to normalized valid value
|
|
2260
|
-
(ReactDOM.flushSync)(()=>{
|
|
2261
|
-
commit();
|
|
2262
|
-
});
|
|
2263
|
-
var _inputRef_current_value1;
|
|
2264
|
-
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');
|
|
2265
|
-
}, [
|
|
2266
|
-
commit,
|
|
2267
|
-
inputRef
|
|
2268
|
-
]);
|
|
2269
2181
|
let inputId = (Text.$bdb11010cef70236$export$f680877a34711e37)(id);
|
|
2270
2182
|
let { focusProps: focusProps } = (Text.$a1ea59d68270f0dd$export$f8168d8dd8fd66e6)({
|
|
2271
2183
|
onBlur () {
|
|
2272
|
-
|
|
2184
|
+
// Set input value to normalized valid value
|
|
2185
|
+
commit();
|
|
2273
2186
|
}
|
|
2274
2187
|
});
|
|
2275
2188
|
let numberFormatter = ($a916eb452884faea$export$b7a616150fdb9f44)(formatOptions);
|
|
@@ -2345,24 +2258,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2345
2258
|
let onChange = (value)=>{
|
|
2346
2259
|
if (state.validate(value)) state.setInputValue(value);
|
|
2347
2260
|
};
|
|
2348
|
-
let onPaste = (e)=>{
|
|
2349
|
-
var _props_onPaste;
|
|
2350
|
-
(_props_onPaste = props.onPaste) === null || _props_onPaste === void 0 ? void 0 : _props_onPaste.call(props, e);
|
|
2351
|
-
let inputElement = (Text.$d4ee10de306f2510$export$e58f029f0fbfdb29)(e);
|
|
2352
|
-
var _inputElement_selectionEnd, _inputElement_selectionStart;
|
|
2353
|
-
// we can only handle the case where the paste takes over the entire input, otherwise things get very complicated
|
|
2354
|
-
// trying to calculate the new string based on what the paste is replacing and where in the source string it is
|
|
2355
|
-
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) {
|
|
2356
|
-
var _e_clipboardData_getData, _e_clipboardData_getData1, _e_clipboardData;
|
|
2357
|
-
e.preventDefault();
|
|
2358
|
-
var _e_clipboardData_getData_trim;
|
|
2359
|
-
// commit so that the user gets to see what it formats to immediately
|
|
2360
|
-
// paste happens before inputRef's value is updated, so have to prevent the default and do it ourselves
|
|
2361
|
-
// spin button will then handle announcing the new value, this should work with controlled state as well
|
|
2362
|
-
// because the announcement is done as a result of the new rendered input value if there is one
|
|
2363
|
-
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 : '');
|
|
2364
|
-
}
|
|
2365
|
-
};
|
|
2366
2261
|
let domProps = (Text.$65484d02dcb7eb3e$export$457c3d6518dd4c6f)(props);
|
|
2367
2262
|
let onKeyDownEnter = (React.useCallback)((e)=>{
|
|
2368
2263
|
if (e.nativeEvent.isComposing) return;
|
|
@@ -2405,7 +2300,6 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2405
2300
|
onKeyDown
|
|
2406
2301
|
]),
|
|
2407
2302
|
onKeyUp: onKeyUp,
|
|
2408
|
-
onPaste: onPaste,
|
|
2409
2303
|
description: description,
|
|
2410
2304
|
errorMessage: errorMessage
|
|
2411
2305
|
}, state, inputRef);
|
|
@@ -2427,7 +2321,7 @@ function $81397a9303501bda$export$23f548e970bdf099(props, state, inputRef) {
|
|
|
2427
2321
|
var _inputRef_current;
|
|
2428
2322
|
// If focus is already on the input, keep it there so we don't hide the
|
|
2429
2323
|
// software keyboard when tapping the increment/decrement buttons.
|
|
2430
|
-
if (
|
|
2324
|
+
if (document.activeElement === inputRef.current) return;
|
|
2431
2325
|
// Otherwise, when using a mouse, move focus to the input.
|
|
2432
2326
|
// On touch, or with a screen reader, focus the button so that the software
|
|
2433
2327
|
// keyboard does not appear and the screen reader cursor is not moved off the button.
|