@react-aria/datepicker
Advanced tools
Comparing version 3.0.0-nightly-fb28ab3b4-241024 to 3.0.0-nightly-fd7075c5f-250128
@@ -43,3 +43,3 @@ var $4acc2f407c169e55$exports = require("./useDateField.main.js"); | ||
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) { | ||
var _state_value, _state_value1; | ||
var _state_value, _state_value1, _state_dateRange; | ||
let stringFormatter = (0, $Xt1Bd$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($c1905b78f6d2f5bf$exports))), '@react-aria/datepicker'); | ||
@@ -109,2 +109,3 @@ let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
let endFieldValidation = (0, $Xt1Bd$react.useRef)((0, $Xt1Bd$reactstatelyform.DEFAULT_VALIDATION_RESULT)); | ||
var _state_value_start, _state_value_end; | ||
return { | ||
@@ -148,3 +149,3 @@ groupProps: (0, $Xt1Bd$reactariautils.mergeProps)(domProps, groupProps, fieldProps, descProps, focusWithinProps, { | ||
...commonFieldProps, | ||
value: (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start, | ||
value: (_state_value_start = (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start) !== null && _state_value_start !== void 0 ? _state_value_start : null, | ||
onChange: (start)=>state.setDateTime('start', start), | ||
@@ -167,3 +168,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end, | ||
value: (_state_value_end = (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end) !== null && _state_value_end !== void 0 ? _state_value_end : null, | ||
onChange: (end)=>state.setDateTime('end', end), | ||
@@ -186,3 +187,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: ((_state_dateRange = state.dateRange) === null || _state_dateRange === void 0 ? void 0 : _state_dateRange.start) && state.dateRange.end ? state.dateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -189,0 +190,0 @@ minValue: props.minValue, |
@@ -37,3 +37,3 @@ import {focusManagerSymbol as $16f0b7bb276bc17e$export$7b3062cd49e80452, roleSymbol as $16f0b7bb276bc17e$export$300019f83c56d282} from "./useDateField.module.js"; | ||
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) { | ||
var _state_value, _state_value1; | ||
var _state_value, _state_value1, _state_dateRange; | ||
let stringFormatter = (0, $eIQ1H$useLocalizedStringFormatter)((0, ($parcel$interopDefault($eIQ1H$intlStringsmodulejs))), '@react-aria/datepicker'); | ||
@@ -103,2 +103,3 @@ let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
let endFieldValidation = (0, $eIQ1H$useRef)((0, $eIQ1H$DEFAULT_VALIDATION_RESULT)); | ||
var _state_value_start, _state_value_end; | ||
return { | ||
@@ -142,3 +143,3 @@ groupProps: (0, $eIQ1H$mergeProps)(domProps, groupProps, fieldProps, descProps, focusWithinProps, { | ||
...commonFieldProps, | ||
value: (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start, | ||
value: (_state_value_start = (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start) !== null && _state_value_start !== void 0 ? _state_value_start : null, | ||
onChange: (start)=>state.setDateTime('start', start), | ||
@@ -161,3 +162,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end, | ||
value: (_state_value_end = (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end) !== null && _state_value_end !== void 0 ? _state_value_end : null, | ||
onChange: (end)=>state.setDateTime('end', end), | ||
@@ -180,3 +181,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: ((_state_dateRange = state.dateRange) === null || _state_dateRange === void 0 ? void 0 : _state_dateRange.start) && state.dateRange.end ? state.dateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -183,0 +184,0 @@ minValue: props.minValue, |
{ | ||
"name": "@react-aria/datepicker", | ||
"version": "3.0.0-nightly-fb28ab3b4-241024", | ||
"version": "3.0.0-nightly-fd7075c5f-250128", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,29 +25,28 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@internationalized/date": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@internationalized/number": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@internationalized/string": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/focus": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/form": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/i18n": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/interactions": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/label": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/spinbutton": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-aria/utils": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-stately/datepicker": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-stately/form": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/button": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/calendar": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/datepicker": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/dialog": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@react-types/shared": "^3.0.0-nightly-fb28ab3b4-241024", | ||
"@internationalized/date": "3.0.0-nightly-fd7075c5f-250128", | ||
"@internationalized/number": "3.0.0-nightly-fd7075c5f-250128", | ||
"@internationalized/string": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/focus": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/form": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/i18n": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/interactions": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/label": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/spinbutton": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-aria/utils": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-stately/datepicker": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-stately/form": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-types/button": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-types/calendar": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-types/datepicker": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-types/dialog": "3.0.0-nightly-fd7075c5f-250128", | ||
"@react-types/shared": "3.0.0-nightly-fd7075c5f-250128", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "3.11.4" | ||
} | ||
} |
@@ -17,2 +17,3 @@ /* | ||
import {createFocusManager} from '@react-aria/focus'; | ||
import {DateRange, RangeCalendarProps} from '@react-types/calendar'; | ||
import {DateRangePickerState} from '@react-stately/datepicker'; | ||
@@ -25,3 +26,2 @@ import {DEFAULT_VALIDATION_RESULT, mergeValidation, privateValidationStateProp} from '@react-stately/form'; | ||
import intlMessages from '../intl/*.json'; | ||
import {RangeCalendarProps} from '@react-types/calendar'; | ||
import {useDatePickerGroup} from './useDatePickerGroup'; | ||
@@ -173,3 +173,3 @@ import {useField} from '@react-aria/label'; | ||
...commonFieldProps, | ||
value: state.value?.start, | ||
value: state.value?.start ?? null, | ||
onChange: start => state.setDateTime('start', start), | ||
@@ -192,3 +192,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: state.value?.end, | ||
value: state.value?.end ?? null, | ||
onChange: end => state.setDateTime('end', end), | ||
@@ -211,3 +211,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: state.dateRange?.start && state.dateRange.end ? state.dateRange as DateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -214,0 +214,0 @@ minValue: props.minValue, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
537065
6481
+ Added@internationalized/date@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@internationalized/message@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@internationalized/number@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@internationalized/string@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/focus@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/form@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/i18n@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/interactions@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/label@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/live-announcer@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/spinbutton@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/ssr@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-aria/utils@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-stately/datepicker@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-stately/form@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-stately/overlays@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-stately/utils@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/button@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/calendar@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/datepicker@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/dialog@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/overlays@3.0.0-nightly-fd7075c5f-250128(transitive)
+ Added@react-types/shared@3.0.0-nightly-fd7075c5f-250128(transitive)
- Removed@internationalized/date@3.7.0(transitive)
- Removed@internationalized/message@3.1.6(transitive)
- Removed@internationalized/number@3.6.0(transitive)
- Removed@internationalized/string@3.2.5(transitive)
- Removed@react-aria/focus@3.19.1(transitive)
- Removed@react-aria/form@3.0.12(transitive)
- Removed@react-aria/i18n@3.12.5(transitive)
- Removed@react-aria/interactions@3.23.0(transitive)
- Removed@react-aria/label@3.7.14(transitive)
- Removed@react-aria/live-announcer@3.4.1(transitive)
- Removed@react-aria/spinbutton@3.6.11(transitive)
- Removed@react-aria/ssr@3.9.7(transitive)
- Removed@react-aria/utils@3.27.0(transitive)
- Removed@react-stately/datepicker@3.12.0(transitive)
- Removed@react-stately/form@3.1.1(transitive)
- Removed@react-stately/overlays@3.6.13(transitive)
- Removed@react-stately/utils@3.10.5(transitive)
- Removed@react-types/button@3.10.2(transitive)
- Removed@react-types/calendar@3.6.0(transitive)
- Removed@react-types/datepicker@3.10.0(transitive)
- Removed@react-types/dialog@3.5.15(transitive)
- Removed@react-types/overlays@3.8.12(transitive)
- Removed@react-types/shared@3.27.0(transitive)
Updated@internationalized/date@3.0.0-nightly-fd7075c5f-250128
Updated@internationalized/number@3.0.0-nightly-fd7075c5f-250128
Updated@internationalized/string@3.0.0-nightly-fd7075c5f-250128
Updated@react-aria/interactions@3.0.0-nightly-fd7075c5f-250128
Updated@react-aria/spinbutton@3.0.0-nightly-fd7075c5f-250128
Updated@react-stately/datepicker@3.0.0-nightly-fd7075c5f-250128
Updated@react-types/datepicker@3.0.0-nightly-fd7075c5f-250128