@react-spectrum/datepicker 3.14.11 → 3.15.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/import.mjs +5 -5
- package/dist/main.js +8 -8
- package/dist/main.js.map +1 -1
- package/dist/module.js +5 -5
- package/dist/module.js.map +1 -1
- package/dist/types/src/index.d.ts +8 -0
- package/package.json +12 -44
- package/src/index.ts +9 -5
- package/dist/DateField.main.js +0 -108
- package/dist/DateField.main.js.map +0 -1
- package/dist/DateField.mjs +0 -103
- package/dist/DateField.module.js +0 -103
- package/dist/DateField.module.js.map +0 -1
- package/dist/DatePicker.main.js +0 -197
- package/dist/DatePicker.main.js.map +0 -1
- package/dist/DatePicker.mjs +0 -192
- package/dist/DatePicker.module.js +0 -192
- package/dist/DatePicker.module.js.map +0 -1
- package/dist/DatePickerField.main.js +0 -72
- package/dist/DatePickerField.main.js.map +0 -1
- package/dist/DatePickerField.mjs +0 -67
- package/dist/DatePickerField.module.js +0 -67
- package/dist/DatePickerField.module.js.map +0 -1
- package/dist/DatePickerSegment.main.js +0 -73
- package/dist/DatePickerSegment.main.js.map +0 -1
- package/dist/DatePickerSegment.mjs +0 -68
- package/dist/DatePickerSegment.module.js +0 -68
- package/dist/DatePickerSegment.module.js.map +0 -1
- package/dist/DateRangePicker.main.js +0 -229
- package/dist/DateRangePicker.main.js.map +0 -1
- package/dist/DateRangePicker.mjs +0 -224
- package/dist/DateRangePicker.module.js +0 -224
- package/dist/DateRangePicker.module.js.map +0 -1
- package/dist/Input.main.js +0 -128
- package/dist/Input.main.js.map +0 -1
- package/dist/Input.mjs +0 -123
- package/dist/Input.module.js +0 -123
- package/dist/Input.module.js.map +0 -1
- package/dist/TimeField.main.js +0 -100
- package/dist/TimeField.main.js.map +0 -1
- package/dist/TimeField.mjs +0 -95
- package/dist/TimeField.module.js +0 -95
- package/dist/TimeField.module.js.map +0 -1
- package/dist/ar-AE.main.js +0 -8
- package/dist/ar-AE.main.js.map +0 -1
- package/dist/ar-AE.mjs +0 -10
- package/dist/ar-AE.module.js +0 -10
- package/dist/ar-AE.module.js.map +0 -1
- package/dist/bg-BG.main.js +0 -8
- package/dist/bg-BG.main.js.map +0 -1
- package/dist/bg-BG.mjs +0 -10
- package/dist/bg-BG.module.js +0 -10
- package/dist/bg-BG.module.js.map +0 -1
- package/dist/cs-CZ.main.js +0 -8
- package/dist/cs-CZ.main.js.map +0 -1
- package/dist/cs-CZ.mjs +0 -10
- package/dist/cs-CZ.module.js +0 -10
- package/dist/cs-CZ.module.js.map +0 -1
- package/dist/da-DK.main.js +0 -8
- package/dist/da-DK.main.js.map +0 -1
- package/dist/da-DK.mjs +0 -10
- package/dist/da-DK.module.js +0 -10
- package/dist/da-DK.module.js.map +0 -1
- package/dist/datepicker.4d1286b0.css +0 -649
- package/dist/datepicker.4d1286b0.css.map +0 -1
- package/dist/datepicker.776a7787.css +0 -550
- package/dist/datepicker.776a7787.css.map +0 -1
- package/dist/datepicker.e85992d8.css +0 -204
- package/dist/datepicker.e85992d8.css.map +0 -1
- package/dist/de-DE.main.js +0 -8
- package/dist/de-DE.main.js.map +0 -1
- package/dist/de-DE.mjs +0 -10
- package/dist/de-DE.module.js +0 -10
- package/dist/de-DE.module.js.map +0 -1
- package/dist/el-GR.main.js +0 -8
- package/dist/el-GR.main.js.map +0 -1
- package/dist/el-GR.mjs +0 -10
- package/dist/el-GR.module.js +0 -10
- package/dist/el-GR.module.js.map +0 -1
- package/dist/en-US.main.js +0 -8
- package/dist/en-US.main.js.map +0 -1
- package/dist/en-US.mjs +0 -10
- package/dist/en-US.module.js +0 -10
- package/dist/en-US.module.js.map +0 -1
- package/dist/es-ES.main.js +0 -8
- package/dist/es-ES.main.js.map +0 -1
- package/dist/es-ES.mjs +0 -10
- package/dist/es-ES.module.js +0 -10
- package/dist/es-ES.module.js.map +0 -1
- package/dist/et-EE.main.js +0 -8
- package/dist/et-EE.main.js.map +0 -1
- package/dist/et-EE.mjs +0 -10
- package/dist/et-EE.module.js +0 -10
- package/dist/et-EE.module.js.map +0 -1
- package/dist/fi-FI.main.js +0 -8
- package/dist/fi-FI.main.js.map +0 -1
- package/dist/fi-FI.mjs +0 -10
- package/dist/fi-FI.module.js +0 -10
- package/dist/fi-FI.module.js.map +0 -1
- package/dist/fr-FR.main.js +0 -8
- package/dist/fr-FR.main.js.map +0 -1
- package/dist/fr-FR.mjs +0 -10
- package/dist/fr-FR.module.js +0 -10
- package/dist/fr-FR.module.js.map +0 -1
- package/dist/he-IL.main.js +0 -8
- package/dist/he-IL.main.js.map +0 -1
- package/dist/he-IL.mjs +0 -10
- package/dist/he-IL.module.js +0 -10
- package/dist/he-IL.module.js.map +0 -1
- package/dist/hr-HR.main.js +0 -8
- package/dist/hr-HR.main.js.map +0 -1
- package/dist/hr-HR.mjs +0 -10
- package/dist/hr-HR.module.js +0 -10
- package/dist/hr-HR.module.js.map +0 -1
- package/dist/hu-HU.main.js +0 -8
- package/dist/hu-HU.main.js.map +0 -1
- package/dist/hu-HU.mjs +0 -10
- package/dist/hu-HU.module.js +0 -10
- package/dist/hu-HU.module.js.map +0 -1
- package/dist/inputgroup_vars_css.main.js +0 -86
- package/dist/inputgroup_vars_css.main.js.map +0 -1
- package/dist/inputgroup_vars_css.mjs +0 -88
- package/dist/inputgroup_vars_css.module.js +0 -88
- package/dist/inputgroup_vars_css.module.js.map +0 -1
- package/dist/intlStrings.main.js +0 -108
- package/dist/intlStrings.main.js.map +0 -1
- package/dist/intlStrings.mjs +0 -110
- package/dist/intlStrings.module.js +0 -110
- package/dist/intlStrings.module.js.map +0 -1
- package/dist/it-IT.main.js +0 -8
- package/dist/it-IT.main.js.map +0 -1
- package/dist/it-IT.mjs +0 -10
- package/dist/it-IT.module.js +0 -10
- package/dist/it-IT.module.js.map +0 -1
- package/dist/ja-JP.main.js +0 -8
- package/dist/ja-JP.main.js.map +0 -1
- package/dist/ja-JP.mjs +0 -10
- package/dist/ja-JP.module.js +0 -10
- package/dist/ja-JP.module.js.map +0 -1
- package/dist/ko-KR.main.js +0 -8
- package/dist/ko-KR.main.js.map +0 -1
- package/dist/ko-KR.mjs +0 -10
- package/dist/ko-KR.module.js +0 -10
- package/dist/ko-KR.module.js.map +0 -1
- package/dist/lt-LT.main.js +0 -8
- package/dist/lt-LT.main.js.map +0 -1
- package/dist/lt-LT.mjs +0 -10
- package/dist/lt-LT.module.js +0 -10
- package/dist/lt-LT.module.js.map +0 -1
- package/dist/lv-LV.main.js +0 -8
- package/dist/lv-LV.main.js.map +0 -1
- package/dist/lv-LV.mjs +0 -10
- package/dist/lv-LV.module.js +0 -10
- package/dist/lv-LV.module.js.map +0 -1
- package/dist/nb-NO.main.js +0 -8
- package/dist/nb-NO.main.js.map +0 -1
- package/dist/nb-NO.mjs +0 -10
- package/dist/nb-NO.module.js +0 -10
- package/dist/nb-NO.module.js.map +0 -1
- package/dist/nl-NL.main.js +0 -8
- package/dist/nl-NL.main.js.map +0 -1
- package/dist/nl-NL.mjs +0 -10
- package/dist/nl-NL.module.js +0 -10
- package/dist/nl-NL.module.js.map +0 -1
- package/dist/pl-PL.main.js +0 -8
- package/dist/pl-PL.main.js.map +0 -1
- package/dist/pl-PL.mjs +0 -10
- package/dist/pl-PL.module.js +0 -10
- package/dist/pl-PL.module.js.map +0 -1
- package/dist/pt-BR.main.js +0 -8
- package/dist/pt-BR.main.js.map +0 -1
- package/dist/pt-BR.mjs +0 -10
- package/dist/pt-BR.module.js +0 -10
- package/dist/pt-BR.module.js.map +0 -1
- package/dist/pt-PT.main.js +0 -8
- package/dist/pt-PT.main.js.map +0 -1
- package/dist/pt-PT.mjs +0 -10
- package/dist/pt-PT.module.js +0 -10
- package/dist/pt-PT.module.js.map +0 -1
- package/dist/ro-RO.main.js +0 -8
- package/dist/ro-RO.main.js.map +0 -1
- package/dist/ro-RO.mjs +0 -10
- package/dist/ro-RO.module.js +0 -10
- package/dist/ro-RO.module.js.map +0 -1
- package/dist/ru-RU.main.js +0 -8
- package/dist/ru-RU.main.js.map +0 -1
- package/dist/ru-RU.mjs +0 -10
- package/dist/ru-RU.module.js +0 -10
- package/dist/ru-RU.module.js.map +0 -1
- package/dist/sk-SK.main.js +0 -8
- package/dist/sk-SK.main.js.map +0 -1
- package/dist/sk-SK.mjs +0 -10
- package/dist/sk-SK.module.js +0 -10
- package/dist/sk-SK.module.js.map +0 -1
- package/dist/sl-SI.main.js +0 -8
- package/dist/sl-SI.main.js.map +0 -1
- package/dist/sl-SI.mjs +0 -10
- package/dist/sl-SI.module.js +0 -10
- package/dist/sl-SI.module.js.map +0 -1
- package/dist/sr-SP.main.js +0 -8
- package/dist/sr-SP.main.js.map +0 -1
- package/dist/sr-SP.mjs +0 -10
- package/dist/sr-SP.module.js +0 -10
- package/dist/sr-SP.module.js.map +0 -1
- package/dist/styles_css.main.js +0 -77
- package/dist/styles_css.main.js.map +0 -1
- package/dist/styles_css.mjs +0 -79
- package/dist/styles_css.module.js +0 -79
- package/dist/styles_css.module.js.map +0 -1
- package/dist/sv-SE.main.js +0 -8
- package/dist/sv-SE.main.js.map +0 -1
- package/dist/sv-SE.mjs +0 -10
- package/dist/sv-SE.module.js +0 -10
- package/dist/sv-SE.module.js.map +0 -1
- package/dist/textfield_vars_css.main.js +0 -74
- package/dist/textfield_vars_css.main.js.map +0 -1
- package/dist/textfield_vars_css.mjs +0 -76
- package/dist/textfield_vars_css.module.js +0 -76
- package/dist/textfield_vars_css.module.js.map +0 -1
- package/dist/tr-TR.main.js +0 -8
- package/dist/tr-TR.main.js.map +0 -1
- package/dist/tr-TR.mjs +0 -10
- package/dist/tr-TR.module.js +0 -10
- package/dist/tr-TR.module.js.map +0 -1
- package/dist/types.d.ts +0 -33
- package/dist/types.d.ts.map +0 -1
- package/dist/uk-UA.main.js +0 -8
- package/dist/uk-UA.main.js.map +0 -1
- package/dist/uk-UA.mjs +0 -10
- package/dist/uk-UA.module.js +0 -10
- package/dist/uk-UA.module.js.map +0 -1
- package/dist/utils.main.js +0 -117
- package/dist/utils.main.js.map +0 -1
- package/dist/utils.mjs +0 -105
- package/dist/utils.module.js +0 -105
- package/dist/utils.module.js.map +0 -1
- package/dist/zh-CN.main.js +0 -8
- package/dist/zh-CN.main.js.map +0 -1
- package/dist/zh-CN.mjs +0 -10
- package/dist/zh-CN.module.js +0 -10
- package/dist/zh-CN.module.js.map +0 -1
- package/dist/zh-TW.main.js +0 -8
- package/dist/zh-TW.main.js.map +0 -1
- package/dist/zh-TW.mjs +0 -10
- package/dist/zh-TW.module.js +0 -10
- package/dist/zh-TW.module.js.map +0 -1
- package/src/DateField.tsx +0 -106
- package/src/DatePicker.tsx +0 -196
- package/src/DatePickerField.tsx +0 -61
- package/src/DatePickerSegment.tsx +0 -69
- package/src/DateRangePicker.tsx +0 -234
- package/src/Input.tsx +0 -142
- package/src/TimeField.tsx +0 -96
- package/src/styles.css +0 -203
- package/src/utils.tsx +0 -96
package/dist/import.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {DatePicker as $
|
|
2
|
-
import {DateRangePicker as $
|
|
3
|
-
import {TimeField as $
|
|
4
|
-
import {DateField as $
|
|
1
|
+
import {DatePicker as $c7ac4bdd25f04f7c$re_export$DatePicker} from "@adobe/react-spectrum/DatePicker";
|
|
2
|
+
import {DateRangePicker as $c7ac4bdd25f04f7c$re_export$DateRangePicker} from "@adobe/react-spectrum/DateRangePicker";
|
|
3
|
+
import {TimeField as $c7ac4bdd25f04f7c$re_export$TimeField} from "@adobe/react-spectrum/TimeField";
|
|
4
|
+
import {DateField as $c7ac4bdd25f04f7c$re_export$DateField} from "@adobe/react-spectrum/DateField";
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -20,5 +20,5 @@ import {DateField as $0129798af6791690$export$d9781c7894a82487} from "./DateFiel
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
export {$
|
|
23
|
+
export {$c7ac4bdd25f04f7c$re_export$DatePicker as DatePicker, $c7ac4bdd25f04f7c$re_export$DateRangePicker as DateRangePicker, $c7ac4bdd25f04f7c$re_export$TimeField as TimeField, $c7ac4bdd25f04f7c$re_export$DateField as DateField};
|
|
24
24
|
//# sourceMappingURL=module.js.map
|
package/dist/main.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var $
|
|
2
|
-
var $
|
|
3
|
-
var $
|
|
4
|
-
var $
|
|
1
|
+
var $jezCk$adobereactspectrumDatePicker = require("@adobe/react-spectrum/DatePicker");
|
|
2
|
+
var $jezCk$adobereactspectrumDateRangePicker = require("@adobe/react-spectrum/DateRangePicker");
|
|
3
|
+
var $jezCk$adobereactspectrumTimeField = require("@adobe/react-spectrum/TimeField");
|
|
4
|
+
var $jezCk$adobereactspectrumDateField = require("@adobe/react-spectrum/DateField");
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
function $parcel$export(e, n, v, s) {
|
|
8
8
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
$parcel$export(module.exports, "DatePicker", ()
|
|
12
|
-
$parcel$export(module.exports, "DateRangePicker", ()
|
|
13
|
-
$parcel$export(module.exports, "TimeField", ()
|
|
14
|
-
$parcel$export(module.exports, "DateField", ()
|
|
11
|
+
$parcel$export(module.exports, "DatePicker", function () { return $jezCk$adobereactspectrumDatePicker.DatePicker; });
|
|
12
|
+
$parcel$export(module.exports, "DateRangePicker", function () { return $jezCk$adobereactspectrumDateRangePicker.DateRangePicker; });
|
|
13
|
+
$parcel$export(module.exports, "TimeField", function () { return $jezCk$adobereactspectrumTimeField.TimeField; });
|
|
14
|
+
$parcel$export(module.exports, "DateField", function () { return $jezCk$adobereactspectrumDateField.DateField; });
|
|
15
15
|
/*
|
|
16
16
|
* Copyright 2020 Adobe. All rights reserved.
|
|
17
17
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/datepicker/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {DatePicker} from '
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/datepicker/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {DatePicker} from '@adobe/react-spectrum/DatePicker';\n\nexport {DateRangePicker} from '@adobe/react-spectrum/DateRangePicker';\nexport {TimeField} from '@adobe/react-spectrum/TimeField';\nexport {DateField} from '@adobe/react-spectrum/DateField';\nexport type {SpectrumDateFieldProps} from '@adobe/react-spectrum/DateField';\nexport type {SpectrumDatePickerProps} from '@adobe/react-spectrum/DatePicker';\nexport type {SpectrumDateRangePickerProps} from '@adobe/react-spectrum/DateRangePicker';\nexport type {SpectrumTimeFieldProps} from '@adobe/react-spectrum/TimeField';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {DatePicker as $
|
|
2
|
-
import {DateRangePicker as $
|
|
3
|
-
import {TimeField as $
|
|
4
|
-
import {DateField as $
|
|
1
|
+
import {DatePicker as $c7ac4bdd25f04f7c$re_export$DatePicker} from "@adobe/react-spectrum/DatePicker";
|
|
2
|
+
import {DateRangePicker as $c7ac4bdd25f04f7c$re_export$DateRangePicker} from "@adobe/react-spectrum/DateRangePicker";
|
|
3
|
+
import {TimeField as $c7ac4bdd25f04f7c$re_export$TimeField} from "@adobe/react-spectrum/TimeField";
|
|
4
|
+
import {DateField as $c7ac4bdd25f04f7c$re_export$DateField} from "@adobe/react-spectrum/DateField";
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -20,5 +20,5 @@ import {DateField as $0129798af6791690$export$d9781c7894a82487} from "./DateFiel
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
export {$
|
|
23
|
+
export {$c7ac4bdd25f04f7c$re_export$DatePicker as DatePicker, $c7ac4bdd25f04f7c$re_export$DateRangePicker as DateRangePicker, $c7ac4bdd25f04f7c$re_export$TimeField as TimeField, $c7ac4bdd25f04f7c$re_export$DateField as DateField};
|
|
24
24
|
//# sourceMappingURL=module.js.map
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/datepicker/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {DatePicker} from '
|
|
1
|
+
{"mappings":";;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/datepicker/src/index.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {DatePicker} from '@adobe/react-spectrum/DatePicker';\n\nexport {DateRangePicker} from '@adobe/react-spectrum/DateRangePicker';\nexport {TimeField} from '@adobe/react-spectrum/TimeField';\nexport {DateField} from '@adobe/react-spectrum/DateField';\nexport type {SpectrumDateFieldProps} from '@adobe/react-spectrum/DateField';\nexport type {SpectrumDatePickerProps} from '@adobe/react-spectrum/DatePicker';\nexport type {SpectrumDateRangePickerProps} from '@adobe/react-spectrum/DateRangePicker';\nexport type {SpectrumTimeFieldProps} from '@adobe/react-spectrum/TimeField';\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DatePicker } from '@adobe/react-spectrum/DatePicker';
|
|
2
|
+
export { DateRangePicker } from '@adobe/react-spectrum/DateRangePicker';
|
|
3
|
+
export { TimeField } from '@adobe/react-spectrum/TimeField';
|
|
4
|
+
export { DateField } from '@adobe/react-spectrum/DateField';
|
|
5
|
+
export type { SpectrumDateFieldProps } from '@adobe/react-spectrum/DateField';
|
|
6
|
+
export type { SpectrumDatePickerProps } from '@adobe/react-spectrum/DatePicker';
|
|
7
|
+
export type { SpectrumDateRangePickerProps } from '@adobe/react-spectrum/DateRangePicker';
|
|
8
|
+
export type { SpectrumTimeFieldProps } from '@adobe/react-spectrum/TimeField';
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/datepicker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.15.0",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"module": "dist/module.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"./dist/types.d.ts",
|
|
12
|
-
"./
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"types": "./dist/types/src/index.d.ts",
|
|
12
|
+
"import": "./dist/import.mjs",
|
|
13
|
+
"require": "./dist/main.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
16
|
},
|
|
17
|
-
"types": "dist/types.d.ts",
|
|
17
|
+
"types": "dist/types/src/index.d.ts",
|
|
18
18
|
"source": "src/index.ts",
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -24,54 +24,22 @@
|
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"targets": {
|
|
27
|
-
"
|
|
28
|
-
"includeNodeModules": [
|
|
29
|
-
"@adobe/spectrum-css-temp"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"module": {
|
|
33
|
-
"includeNodeModules": [
|
|
34
|
-
"@adobe/spectrum-css-temp"
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
"types": false
|
|
37
28
|
},
|
|
38
29
|
"repository": {
|
|
39
30
|
"type": "git",
|
|
40
31
|
"url": "https://github.com/adobe/react-spectrum"
|
|
41
32
|
},
|
|
42
33
|
"dependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@react-aria/datepicker": "^3.16.1",
|
|
45
|
-
"@react-aria/focus": "^3.21.5",
|
|
46
|
-
"@react-aria/i18n": "^3.12.16",
|
|
47
|
-
"@react-aria/interactions": "^3.27.1",
|
|
48
|
-
"@react-aria/utils": "^3.33.1",
|
|
49
|
-
"@react-spectrum/button": "^3.17.7",
|
|
50
|
-
"@react-spectrum/calendar": "^3.7.11",
|
|
51
|
-
"@react-spectrum/dialog": "^3.9.7",
|
|
52
|
-
"@react-spectrum/form": "^3.7.22",
|
|
53
|
-
"@react-spectrum/label": "^3.16.22",
|
|
54
|
-
"@react-spectrum/layout": "^3.6.22",
|
|
55
|
-
"@react-spectrum/utils": "^3.12.12",
|
|
56
|
-
"@react-spectrum/view": "^3.6.26",
|
|
57
|
-
"@react-stately/datepicker": "^3.16.1",
|
|
58
|
-
"@react-types/datepicker": "^3.13.5",
|
|
59
|
-
"@react-types/shared": "^3.33.1",
|
|
60
|
-
"@spectrum-icons/ui": "^3.6.23",
|
|
61
|
-
"@spectrum-icons/workflow": "^4.2.28",
|
|
34
|
+
"@adobe/react-spectrum": "3.47.0",
|
|
62
35
|
"@swc/helpers": "^0.5.0"
|
|
63
36
|
},
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"@adobe/spectrum-css-temp": "3.0.0-alpha.1",
|
|
66
|
-
"@react-spectrum/test-utils-internal": "3.0.0-alpha.1"
|
|
67
|
-
},
|
|
68
37
|
"peerDependencies": {
|
|
69
|
-
"@react-spectrum/provider": "^3.0.0",
|
|
70
38
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
71
39
|
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
72
40
|
},
|
|
73
41
|
"publishConfig": {
|
|
74
42
|
"access": "public"
|
|
75
43
|
},
|
|
76
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
|
|
77
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
/// <reference types="css-module-types" />
|
|
14
14
|
|
|
15
|
-
export {DatePicker} from '
|
|
16
|
-
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
15
|
+
export {DatePicker} from '@adobe/react-spectrum/DatePicker';
|
|
16
|
+
|
|
17
|
+
export {DateRangePicker} from '@adobe/react-spectrum/DateRangePicker';
|
|
18
|
+
export {TimeField} from '@adobe/react-spectrum/TimeField';
|
|
19
|
+
export {DateField} from '@adobe/react-spectrum/DateField';
|
|
20
|
+
export type {SpectrumDateFieldProps} from '@adobe/react-spectrum/DateField';
|
|
21
|
+
export type {SpectrumDatePickerProps} from '@adobe/react-spectrum/DatePicker';
|
|
22
|
+
export type {SpectrumDateRangePickerProps} from '@adobe/react-spectrum/DateRangePicker';
|
|
23
|
+
export type {SpectrumTimeFieldProps} from '@adobe/react-spectrum/TimeField';
|
package/dist/DateField.main.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
var $edac158d20ebe4a9$exports = require("./DatePickerSegment.main.js");
|
|
2
|
-
require("./datepicker.e85992d8.css");
|
|
3
|
-
var $91c3db8c6a21ca71$exports = require("./styles_css.main.js");
|
|
4
|
-
var $c3ebc4931d9b9977$exports = require("./Input.main.js");
|
|
5
|
-
var $9d3b96715dbbb2b7$exports = require("./utils.main.js");
|
|
6
|
-
var $2sBGl$reactspectrumutils = require("@react-spectrum/utils");
|
|
7
|
-
var $2sBGl$internationalizeddate = require("@internationalized/date");
|
|
8
|
-
var $2sBGl$reactspectrumlabel = require("@react-spectrum/label");
|
|
9
|
-
var $2sBGl$react = require("react");
|
|
10
|
-
var $2sBGl$reactariadatepicker = require("@react-aria/datepicker");
|
|
11
|
-
var $2sBGl$reactstatelydatepicker = require("@react-stately/datepicker");
|
|
12
|
-
var $2sBGl$reactspectrumform = require("@react-spectrum/form");
|
|
13
|
-
var $2sBGl$reactariai18n = require("@react-aria/i18n");
|
|
14
|
-
var $2sBGl$reactspectrumprovider = require("@react-spectrum/provider");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function $parcel$interopDefault(a) {
|
|
18
|
-
return a && a.__esModule ? a.default : a;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function $parcel$export(e, n, v, s) {
|
|
22
|
-
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
$parcel$export(module.exports, "DateField", () => $1ab74d2cd1dc2e45$export$d9781c7894a82487);
|
|
26
|
-
/*
|
|
27
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
28
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
29
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
30
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
31
|
-
*
|
|
32
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
33
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
34
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
35
|
-
* governing permissions and limitations under the License.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const $1ab74d2cd1dc2e45$export$d9781c7894a82487 = /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).forwardRef(function DateField(props, ref) {
|
|
50
|
-
props = (0, $2sBGl$reactspectrumprovider.useProviderProps)(props);
|
|
51
|
-
props = (0, $2sBGl$reactspectrumform.useFormProps)(props);
|
|
52
|
-
let { autoFocus: autoFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isQuiet: isQuiet } = props;
|
|
53
|
-
let domRef = (0, $9d3b96715dbbb2b7$exports.useFocusManagerRef)(ref);
|
|
54
|
-
let { locale: locale } = (0, $2sBGl$reactariai18n.useLocale)();
|
|
55
|
-
let state = (0, $2sBGl$reactstatelydatepicker.useDateFieldState)({
|
|
56
|
-
...props,
|
|
57
|
-
locale: locale,
|
|
58
|
-
createCalendar: $2sBGl$internationalizeddate.createCalendar
|
|
59
|
-
});
|
|
60
|
-
let fieldRef = (0, $2sBGl$react.useRef)(null);
|
|
61
|
-
let inputRef = (0, $2sBGl$react.useRef)(null);
|
|
62
|
-
let { labelProps: labelProps, fieldProps: fieldProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $2sBGl$reactariadatepicker.useDateField)({
|
|
63
|
-
...props,
|
|
64
|
-
inputRef: inputRef
|
|
65
|
-
}, state, fieldRef);
|
|
66
|
-
// Note: this description is intentionally not passed to useDatePicker.
|
|
67
|
-
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
68
|
-
let description = (0, $9d3b96715dbbb2b7$exports.useFormatHelpText)(props);
|
|
69
|
-
if (description && !props.description) descriptionProps.id = undefined;
|
|
70
|
-
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
71
|
-
let approximateWidth = (0, $9d3b96715dbbb2b7$exports.useFormattedDateWidth)(state) + 'ch';
|
|
72
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $2sBGl$reactspectrumlabel.Field), {
|
|
73
|
-
...props,
|
|
74
|
-
ref: domRef,
|
|
75
|
-
elementType: "span",
|
|
76
|
-
description: description,
|
|
77
|
-
labelProps: labelProps,
|
|
78
|
-
descriptionProps: descriptionProps,
|
|
79
|
-
errorMessageProps: errorMessageProps,
|
|
80
|
-
validationState: validationState !== null && validationState !== void 0 ? validationState : undefined,
|
|
81
|
-
isInvalid: isInvalid,
|
|
82
|
-
validationErrors: validationErrors,
|
|
83
|
-
validationDetails: validationDetails,
|
|
84
|
-
wrapperClassName: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
85
|
-
}, /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $c3ebc4931d9b9977$exports.Input), {
|
|
86
|
-
ref: fieldRef,
|
|
87
|
-
fieldProps: fieldProps,
|
|
88
|
-
isDisabled: isDisabled,
|
|
89
|
-
isQuiet: isQuiet,
|
|
90
|
-
autoFocus: autoFocus,
|
|
91
|
-
validationState: validationState,
|
|
92
|
-
minWidth: approximateWidth,
|
|
93
|
-
className: (0, $2sBGl$reactspectrumutils.classNames)((0, ($parcel$interopDefault($91c3db8c6a21ca71$exports))), 'react-spectrum-DateField')
|
|
94
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement((0, $edac158d20ebe4a9$exports.DatePickerSegment), {
|
|
95
|
-
key: i,
|
|
96
|
-
segment: segment,
|
|
97
|
-
state: state,
|
|
98
|
-
isDisabled: isDisabled,
|
|
99
|
-
isReadOnly: isReadOnly,
|
|
100
|
-
isRequired: isRequired
|
|
101
|
-
})), /*#__PURE__*/ (0, ($parcel$interopDefault($2sBGl$react))).createElement("input", {
|
|
102
|
-
...inputProps,
|
|
103
|
-
ref: inputRef
|
|
104
|
-
})));
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
//# sourceMappingURL=DateField.main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAsBM,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,UAA+B,KAAgC,EAAE,GAA8B;IAChJ,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IACrB,IAAI,aACF,SAAS,cACT,UAAU,cACV,UAAU,cACV,UAAU,WACV,OAAO,EACR,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,4CAAiB,EAAE;IAChC,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,8BAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,+CAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAsB;IAC1C,IAAI,WAAW,CAAA,GAAA,mBAAK,EAA2B;IAC/C,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,aAAE,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,uCAAW,EAAE;QAC3I,GAAG,KAAK;kBACR;IACF,GAAG,OAAO;IAEV,uEAAuE;IACvE,wGAAwG;IACxG,IAAI,cAAc,CAAA,GAAA,2CAAgB,EAAE;IACpC,IAAI,eAAe,CAAC,MAAM,WAAW,EACnC,iBAAiB,EAAE,GAAG;IAGxB,IAAI,kBAAkB,MAAM,eAAe,IAAK,CAAA,YAAY,YAAY,IAAG;IAE3E,IAAI,mBAAmB,CAAA,GAAA,+CAAoB,EAAE,SAAS;IAEtD,qBACE,0DAAC,CAAA,GAAA,+BAAI;QACF,GAAG,KAAK;QACT,KAAK;QACL,aAAY;QACZ,aAAa;QACb,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,iBAAiB,4BAAA,6BAAA,kBAAmB;QACpC,WAAW;QACX,kBAAkB;QAClB,mBAAmB;QACnB,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;qBAC/C,0DAAC,CAAA,GAAA,+BAAI;QACH,KAAK;QACL,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,WAAW;QACX,iBAAiB;QACjB,UAAU;QACV,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;OACvC,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,0DAAC,CAAA,GAAA,2CAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,0DAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAIpC","sources":["packages/@react-spectrum/datepicker/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDateFieldProps} from '@react-types/datepicker';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\nimport React, {ReactElement, useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useFocusManagerRef, useFormatHelpText, useFormattedDateWidth} from './utils';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * DateFields allow users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport const DateField = React.forwardRef(function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n isQuiet\n } = props;\n\n let domRef = useFocusManagerRef(ref);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let fieldRef = useRef<HTMLElement | null>(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors, validationDetails} = useDateField({\n ...props,\n inputRef\n }, state, fieldRef);\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = undefined;\n }\n\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n let approximateWidth = useFormattedDateWidth(state) + 'ch';\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState ?? undefined}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <Input\n ref={fieldRef}\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n autoFocus={autoFocus}\n validationState={validationState}\n minWidth={approximateWidth}\n className={classNames(datepickerStyles, 'react-spectrum-DateField')}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </Input>\n </Field>\n );\n}) as <T extends DateValue>(props: SpectrumDateFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"DateField.main.js.map"}
|
package/dist/DateField.mjs
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {DatePickerSegment as $cfa347761f172638$export$6388987c5223b54e} from "./DatePickerSegment.mjs";
|
|
2
|
-
import "./datepicker.e85992d8.css";
|
|
3
|
-
import $6iHxC$styles_cssmodulejs from "./styles_css.mjs";
|
|
4
|
-
import {Input as $79348162c55d687f$export$f5b8910cec6cf069} from "./Input.mjs";
|
|
5
|
-
import {useFocusManagerRef as $ea94a5cfe92db3c2$export$71a23a36270e4bf0, useFormatHelpText as $ea94a5cfe92db3c2$export$322f4580ccd8dde6, useFormattedDateWidth as $ea94a5cfe92db3c2$export$31e22e3c931fc056} from "./utils.mjs";
|
|
6
|
-
import {classNames as $6iHxC$classNames} from "@react-spectrum/utils";
|
|
7
|
-
import {createCalendar as $6iHxC$createCalendar} from "@internationalized/date";
|
|
8
|
-
import {Field as $6iHxC$Field} from "@react-spectrum/label";
|
|
9
|
-
import $6iHxC$react, {useRef as $6iHxC$useRef} from "react";
|
|
10
|
-
import {useDateField as $6iHxC$useDateField} from "@react-aria/datepicker";
|
|
11
|
-
import {useDateFieldState as $6iHxC$useDateFieldState} from "@react-stately/datepicker";
|
|
12
|
-
import {useFormProps as $6iHxC$useFormProps} from "@react-spectrum/form";
|
|
13
|
-
import {useLocale as $6iHxC$useLocale} from "@react-aria/i18n";
|
|
14
|
-
import {useProviderProps as $6iHxC$useProviderProps} from "@react-spectrum/provider";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function $parcel$interopDefault(a) {
|
|
18
|
-
return a && a.__esModule ? a.default : a;
|
|
19
|
-
}
|
|
20
|
-
/*
|
|
21
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
22
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
-
* governing permissions and limitations under the License.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const $0129798af6791690$export$d9781c7894a82487 = /*#__PURE__*/ (0, $6iHxC$react).forwardRef(function DateField(props, ref) {
|
|
44
|
-
props = (0, $6iHxC$useProviderProps)(props);
|
|
45
|
-
props = (0, $6iHxC$useFormProps)(props);
|
|
46
|
-
let { autoFocus: autoFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isQuiet: isQuiet } = props;
|
|
47
|
-
let domRef = (0, $ea94a5cfe92db3c2$export$71a23a36270e4bf0)(ref);
|
|
48
|
-
let { locale: locale } = (0, $6iHxC$useLocale)();
|
|
49
|
-
let state = (0, $6iHxC$useDateFieldState)({
|
|
50
|
-
...props,
|
|
51
|
-
locale: locale,
|
|
52
|
-
createCalendar: $6iHxC$createCalendar
|
|
53
|
-
});
|
|
54
|
-
let fieldRef = (0, $6iHxC$useRef)(null);
|
|
55
|
-
let inputRef = (0, $6iHxC$useRef)(null);
|
|
56
|
-
let { labelProps: labelProps, fieldProps: fieldProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $6iHxC$useDateField)({
|
|
57
|
-
...props,
|
|
58
|
-
inputRef: inputRef
|
|
59
|
-
}, state, fieldRef);
|
|
60
|
-
// Note: this description is intentionally not passed to useDatePicker.
|
|
61
|
-
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
62
|
-
let description = (0, $ea94a5cfe92db3c2$export$322f4580ccd8dde6)(props);
|
|
63
|
-
if (description && !props.description) descriptionProps.id = undefined;
|
|
64
|
-
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
65
|
-
let approximateWidth = (0, $ea94a5cfe92db3c2$export$31e22e3c931fc056)(state) + 'ch';
|
|
66
|
-
return /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $6iHxC$Field), {
|
|
67
|
-
...props,
|
|
68
|
-
ref: domRef,
|
|
69
|
-
elementType: "span",
|
|
70
|
-
description: description,
|
|
71
|
-
labelProps: labelProps,
|
|
72
|
-
descriptionProps: descriptionProps,
|
|
73
|
-
errorMessageProps: errorMessageProps,
|
|
74
|
-
validationState: validationState !== null && validationState !== void 0 ? validationState : undefined,
|
|
75
|
-
isInvalid: isInvalid,
|
|
76
|
-
validationErrors: validationErrors,
|
|
77
|
-
validationDetails: validationDetails,
|
|
78
|
-
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
79
|
-
}, /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $79348162c55d687f$export$f5b8910cec6cf069), {
|
|
80
|
-
ref: fieldRef,
|
|
81
|
-
fieldProps: fieldProps,
|
|
82
|
-
isDisabled: isDisabled,
|
|
83
|
-
isQuiet: isQuiet,
|
|
84
|
-
autoFocus: autoFocus,
|
|
85
|
-
validationState: validationState,
|
|
86
|
-
minWidth: approximateWidth,
|
|
87
|
-
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-DateField')
|
|
88
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $6iHxC$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
|
|
89
|
-
key: i,
|
|
90
|
-
segment: segment,
|
|
91
|
-
state: state,
|
|
92
|
-
isDisabled: isDisabled,
|
|
93
|
-
isReadOnly: isReadOnly,
|
|
94
|
-
isRequired: isRequired
|
|
95
|
-
})), /*#__PURE__*/ (0, $6iHxC$react).createElement("input", {
|
|
96
|
-
...inputProps,
|
|
97
|
-
ref: inputRef
|
|
98
|
-
})));
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export {$0129798af6791690$export$d9781c7894a82487 as DateField};
|
|
103
|
-
//# sourceMappingURL=DateField.module.js.map
|
package/dist/DateField.module.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import {DatePickerSegment as $cfa347761f172638$export$6388987c5223b54e} from "./DatePickerSegment.module.js";
|
|
2
|
-
import "./datepicker.e85992d8.css";
|
|
3
|
-
import $6iHxC$styles_cssmodulejs from "./styles_css.module.js";
|
|
4
|
-
import {Input as $79348162c55d687f$export$f5b8910cec6cf069} from "./Input.module.js";
|
|
5
|
-
import {useFocusManagerRef as $ea94a5cfe92db3c2$export$71a23a36270e4bf0, useFormatHelpText as $ea94a5cfe92db3c2$export$322f4580ccd8dde6, useFormattedDateWidth as $ea94a5cfe92db3c2$export$31e22e3c931fc056} from "./utils.module.js";
|
|
6
|
-
import {classNames as $6iHxC$classNames} from "@react-spectrum/utils";
|
|
7
|
-
import {createCalendar as $6iHxC$createCalendar} from "@internationalized/date";
|
|
8
|
-
import {Field as $6iHxC$Field} from "@react-spectrum/label";
|
|
9
|
-
import $6iHxC$react, {useRef as $6iHxC$useRef} from "react";
|
|
10
|
-
import {useDateField as $6iHxC$useDateField} from "@react-aria/datepicker";
|
|
11
|
-
import {useDateFieldState as $6iHxC$useDateFieldState} from "@react-stately/datepicker";
|
|
12
|
-
import {useFormProps as $6iHxC$useFormProps} from "@react-spectrum/form";
|
|
13
|
-
import {useLocale as $6iHxC$useLocale} from "@react-aria/i18n";
|
|
14
|
-
import {useProviderProps as $6iHxC$useProviderProps} from "@react-spectrum/provider";
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function $parcel$interopDefault(a) {
|
|
18
|
-
return a && a.__esModule ? a.default : a;
|
|
19
|
-
}
|
|
20
|
-
/*
|
|
21
|
-
* Copyright 2020 Adobe. All rights reserved.
|
|
22
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
-
* governing permissions and limitations under the License.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const $0129798af6791690$export$d9781c7894a82487 = /*#__PURE__*/ (0, $6iHxC$react).forwardRef(function DateField(props, ref) {
|
|
44
|
-
props = (0, $6iHxC$useProviderProps)(props);
|
|
45
|
-
props = (0, $6iHxC$useFormProps)(props);
|
|
46
|
-
let { autoFocus: autoFocus, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, isQuiet: isQuiet } = props;
|
|
47
|
-
let domRef = (0, $ea94a5cfe92db3c2$export$71a23a36270e4bf0)(ref);
|
|
48
|
-
let { locale: locale } = (0, $6iHxC$useLocale)();
|
|
49
|
-
let state = (0, $6iHxC$useDateFieldState)({
|
|
50
|
-
...props,
|
|
51
|
-
locale: locale,
|
|
52
|
-
createCalendar: $6iHxC$createCalendar
|
|
53
|
-
});
|
|
54
|
-
let fieldRef = (0, $6iHxC$useRef)(null);
|
|
55
|
-
let inputRef = (0, $6iHxC$useRef)(null);
|
|
56
|
-
let { labelProps: labelProps, fieldProps: fieldProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = (0, $6iHxC$useDateField)({
|
|
57
|
-
...props,
|
|
58
|
-
inputRef: inputRef
|
|
59
|
-
}, state, fieldRef);
|
|
60
|
-
// Note: this description is intentionally not passed to useDatePicker.
|
|
61
|
-
// The format help text is unnecessary for screen reader users because each segment already has a label.
|
|
62
|
-
let description = (0, $ea94a5cfe92db3c2$export$322f4580ccd8dde6)(props);
|
|
63
|
-
if (description && !props.description) descriptionProps.id = undefined;
|
|
64
|
-
let validationState = state.validationState || (isInvalid ? 'invalid' : null);
|
|
65
|
-
let approximateWidth = (0, $ea94a5cfe92db3c2$export$31e22e3c931fc056)(state) + 'ch';
|
|
66
|
-
return /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $6iHxC$Field), {
|
|
67
|
-
...props,
|
|
68
|
-
ref: domRef,
|
|
69
|
-
elementType: "span",
|
|
70
|
-
description: description,
|
|
71
|
-
labelProps: labelProps,
|
|
72
|
-
descriptionProps: descriptionProps,
|
|
73
|
-
errorMessageProps: errorMessageProps,
|
|
74
|
-
validationState: validationState !== null && validationState !== void 0 ? validationState : undefined,
|
|
75
|
-
isInvalid: isInvalid,
|
|
76
|
-
validationErrors: validationErrors,
|
|
77
|
-
validationDetails: validationDetails,
|
|
78
|
-
wrapperClassName: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-Datepicker-fieldWrapper')
|
|
79
|
-
}, /*#__PURE__*/ (0, $6iHxC$react).createElement((0, $79348162c55d687f$export$f5b8910cec6cf069), {
|
|
80
|
-
ref: fieldRef,
|
|
81
|
-
fieldProps: fieldProps,
|
|
82
|
-
isDisabled: isDisabled,
|
|
83
|
-
isQuiet: isQuiet,
|
|
84
|
-
autoFocus: autoFocus,
|
|
85
|
-
validationState: validationState,
|
|
86
|
-
minWidth: approximateWidth,
|
|
87
|
-
className: (0, $6iHxC$classNames)((0, ($parcel$interopDefault($6iHxC$styles_cssmodulejs))), 'react-spectrum-DateField')
|
|
88
|
-
}, state.segments.map((segment, i)=>/*#__PURE__*/ (0, $6iHxC$react).createElement((0, $cfa347761f172638$export$6388987c5223b54e), {
|
|
89
|
-
key: i,
|
|
90
|
-
segment: segment,
|
|
91
|
-
state: state,
|
|
92
|
-
isDisabled: isDisabled,
|
|
93
|
-
isReadOnly: isReadOnly,
|
|
94
|
-
isRequired: isRequired
|
|
95
|
-
})), /*#__PURE__*/ (0, $6iHxC$react).createElement("input", {
|
|
96
|
-
...inputProps,
|
|
97
|
-
ref: inputRef
|
|
98
|
-
})));
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
export {$0129798af6791690$export$d9781c7894a82487 as DateField};
|
|
103
|
-
//# sourceMappingURL=DateField.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAsBM,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,UAA+B,KAAgC,EAAE,GAA8B;IAChJ,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,aACF,SAAS,cACT,UAAU,cACV,UAAU,cACV,UAAU,WACV,OAAO,EACR,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,yCAAiB,EAAE;IAChC,IAAI,UAAC,MAAM,EAAC,GAAG,CAAA,GAAA,gBAAQ;IACvB,IAAI,QAAQ,CAAA,GAAA,wBAAgB,EAAE;QAC5B,GAAG,KAAK;gBACR;wBACA;IACF;IAEA,IAAI,WAAW,CAAA,GAAA,aAAK,EAAsB;IAC1C,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,cAAC,UAAU,cAAE,UAAU,cAAE,UAAU,oBAAE,gBAAgB,qBAAE,iBAAiB,aAAE,SAAS,oBAAE,gBAAgB,qBAAE,iBAAiB,EAAC,GAAG,CAAA,GAAA,mBAAW,EAAE;QAC3I,GAAG,KAAK;kBACR;IACF,GAAG,OAAO;IAEV,uEAAuE;IACvE,wGAAwG;IACxG,IAAI,cAAc,CAAA,GAAA,yCAAgB,EAAE;IACpC,IAAI,eAAe,CAAC,MAAM,WAAW,EACnC,iBAAiB,EAAE,GAAG;IAGxB,IAAI,kBAAkB,MAAM,eAAe,IAAK,CAAA,YAAY,YAAY,IAAG;IAE3E,IAAI,mBAAmB,CAAA,GAAA,yCAAoB,EAAE,SAAS;IAEtD,qBACE,gCAAC,CAAA,GAAA,YAAI;QACF,GAAG,KAAK;QACT,KAAK;QACL,aAAY;QACZ,aAAa;QACb,YAAY;QACZ,kBAAkB;QAClB,mBAAmB;QACnB,iBAAiB,4BAAA,6BAAA,kBAAmB;QACpC,WAAW;QACX,kBAAkB;QAClB,mBAAmB;QACnB,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;qBAC/C,gCAAC,CAAA,GAAA,yCAAI;QACH,KAAK;QACL,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,WAAW;QACX,iBAAiB;QACjB,UAAU;QACV,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,mDAAe,GAAG;OACvC,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,kBAC3B,gCAAC,CAAA,GAAA,yCAAgB;YAChB,KAAK;YACL,SAAS;YACT,OAAO;YACP,YAAY;YACZ,YAAY;YACZ,YAAY;2BAEhB,gCAAC;QAAO,GAAG,UAAU;QAAE,KAAK;;AAIpC","sources":["packages/@react-spectrum/datepicker/src/DateField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames} from '@react-spectrum/utils';\nimport {createCalendar} from '@internationalized/date';\nimport {DatePickerSegment} from './DatePickerSegment';\nimport datepickerStyles from './styles.css';\nimport {DateValue, SpectrumDateFieldProps} from '@react-types/datepicker';\nimport {Field} from '@react-spectrum/label';\nimport {FocusableRef} from '@react-types/shared';\nimport {Input} from './Input';\nimport React, {ReactElement, useRef} from 'react';\nimport {useDateField} from '@react-aria/datepicker';\nimport {useDateFieldState} from '@react-stately/datepicker';\nimport {useFocusManagerRef, useFormatHelpText, useFormattedDateWidth} from './utils';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\n/**\n * DateFields allow users to enter and edit date and time values using a keyboard.\n * Each part of a date value is displayed in an individually editable segment.\n */\nexport const DateField = React.forwardRef(function DateField<T extends DateValue>(props: SpectrumDateFieldProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n autoFocus,\n isDisabled,\n isReadOnly,\n isRequired,\n isQuiet\n } = props;\n\n let domRef = useFocusManagerRef(ref);\n let {locale} = useLocale();\n let state = useDateFieldState({\n ...props,\n locale,\n createCalendar\n });\n\n let fieldRef = useRef<HTMLElement | null>(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let {labelProps, fieldProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors, validationDetails} = useDateField({\n ...props,\n inputRef\n }, state, fieldRef);\n\n // Note: this description is intentionally not passed to useDatePicker.\n // The format help text is unnecessary for screen reader users because each segment already has a label.\n let description = useFormatHelpText(props);\n if (description && !props.description) {\n descriptionProps.id = undefined;\n }\n\n let validationState = state.validationState || (isInvalid ? 'invalid' : null);\n\n let approximateWidth = useFormattedDateWidth(state) + 'ch';\n\n return (\n <Field\n {...props}\n ref={domRef}\n elementType=\"span\"\n description={description}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState ?? undefined}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n wrapperClassName={classNames(datepickerStyles, 'react-spectrum-Datepicker-fieldWrapper')}>\n <Input\n ref={fieldRef}\n fieldProps={fieldProps}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n autoFocus={autoFocus}\n validationState={validationState}\n minWidth={approximateWidth}\n className={classNames(datepickerStyles, 'react-spectrum-DateField')}>\n {state.segments.map((segment, i) =>\n (<DatePickerSegment\n key={i}\n segment={segment}\n state={state}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />)\n )}\n <input {...inputProps} ref={inputRef} />\n </Input>\n </Field>\n );\n}) as <T extends DateValue>(props: SpectrumDateFieldProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n"],"names":[],"version":3,"file":"DateField.module.js.map"}
|