@react-spectrum/s2 1.4.0 → 1.5.1
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/exports/CenterBaseline.cjs +12 -0
- package/dist/exports/CenterBaseline.cjs.map +1 -0
- package/dist/exports/CenterBaseline.mjs +7 -0
- package/dist/exports/CenterBaseline.mjs.map +1 -0
- package/dist/exports/Skeleton.cjs +1 -0
- package/dist/exports/Skeleton.cjs.map +1 -1
- package/dist/exports/Skeleton.mjs +2 -2
- package/dist/exports/Skeleton.mjs.map +1 -1
- package/dist/exports/index.cjs +3 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.mjs +3 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/private/Accordion.cjs +2 -2
- package/dist/private/Accordion.css +2 -2
- package/dist/private/Accordion.mjs +2 -2
- package/dist/private/ActionBar.cjs +59 -59
- package/dist/private/ActionBar.cjs.map +1 -1
- package/dist/private/ActionBar.css +58 -58
- package/dist/private/ActionBar.css.map +1 -1
- package/dist/private/ActionBar.mjs +59 -59
- package/dist/private/ActionBar.mjs.map +1 -1
- package/dist/private/ActionButton.cjs +247 -247
- package/dist/private/ActionButton.cjs.map +1 -1
- package/dist/private/ActionButton.css +169 -169
- package/dist/private/ActionButton.css.map +1 -1
- package/dist/private/ActionButton.mjs +247 -247
- package/dist/private/ActionButton.mjs.map +1 -1
- package/dist/private/ActionButtonGroup.cjs +15 -15
- package/dist/private/ActionButtonGroup.css +9 -9
- package/dist/private/ActionButtonGroup.mjs +15 -15
- package/dist/private/ActionMenu.cjs.map +1 -1
- package/dist/private/ActionMenu.mjs.map +1 -1
- package/dist/private/Add.cjs +10 -10
- package/dist/private/Add.css +6 -6
- package/dist/private/Add.mjs +10 -10
- package/dist/private/AlertDialog.cjs +3 -3
- package/dist/private/AlertDialog.cjs.map +1 -1
- package/dist/private/AlertDialog.css +3 -3
- package/dist/private/AlertDialog.css.map +1 -1
- package/dist/private/AlertDialog.mjs +3 -3
- package/dist/private/AlertDialog.mjs.map +1 -1
- package/dist/private/Asterisk.cjs +6 -6
- package/dist/private/Asterisk.css +4 -4
- package/dist/private/Asterisk.mjs +6 -6
- package/dist/private/Avatar.cjs +16 -16
- package/dist/private/Avatar.css +16 -16
- package/dist/private/Avatar.mjs +16 -16
- package/dist/private/AvatarGroup.cjs +120 -120
- package/dist/private/AvatarGroup.css +31 -31
- package/dist/private/AvatarGroup.mjs +120 -120
- package/dist/private/Badge.cjs +197 -197
- package/dist/private/Badge.css +125 -125
- package/dist/private/Badge.mjs +197 -197
- package/dist/private/Breadcrumbs.cjs +234 -234
- package/dist/private/Breadcrumbs.cjs.map +1 -1
- package/dist/private/Breadcrumbs.css +100 -100
- package/dist/private/Breadcrumbs.css.map +1 -1
- package/dist/private/Breadcrumbs.mjs +234 -234
- package/dist/private/Breadcrumbs.mjs.map +1 -1
- package/dist/private/Button.cjs +335 -326
- package/dist/private/Button.cjs.map +1 -1
- package/dist/private/Button.css +176 -172
- package/dist/private/Button.css.map +1 -1
- package/dist/private/Button.mjs +335 -326
- package/dist/private/Button.mjs.map +1 -1
- package/dist/private/ButtonGroup.cjs +23 -20
- package/dist/private/ButtonGroup.cjs.map +1 -1
- package/dist/private/ButtonGroup.css +19 -15
- package/dist/private/ButtonGroup.css.map +1 -1
- package/dist/private/ButtonGroup.mjs +23 -20
- package/dist/private/ButtonGroup.mjs.map +1 -1
- package/dist/private/Calendar.cjs +232 -232
- package/dist/private/Calendar.cjs.map +1 -1
- package/dist/private/Calendar.css +149 -149
- package/dist/private/Calendar.css.map +1 -1
- package/dist/private/Calendar.mjs +232 -232
- package/dist/private/Calendar.mjs.map +1 -1
- package/dist/private/Card.cjs +309 -309
- package/dist/private/Card.css +206 -206
- package/dist/private/Card.mjs +309 -309
- package/dist/private/CardView.cjs +17 -17
- package/dist/private/CardView.css +17 -17
- package/dist/private/CardView.mjs +17 -17
- package/dist/private/CenterBaseline.cjs +1 -1
- package/dist/private/CenterBaseline.cjs.map +1 -1
- package/dist/private/CenterBaseline.css +2 -2
- package/dist/private/CenterBaseline.css.map +1 -1
- package/dist/private/CenterBaseline.mjs +1 -1
- package/dist/private/CenterBaseline.mjs.map +1 -1
- package/dist/private/Checkbox.cjs +188 -188
- package/dist/private/Checkbox.css +110 -110
- package/dist/private/Checkbox.mjs +188 -188
- package/dist/private/CheckboxGroup.cjs +43 -43
- package/dist/private/CheckboxGroup.css +37 -37
- package/dist/private/CheckboxGroup.mjs +43 -43
- package/dist/private/Checkmark.cjs +12 -12
- package/dist/private/Checkmark.css +8 -8
- package/dist/private/Checkmark.mjs +12 -12
- package/dist/private/Chevron.cjs +12 -12
- package/dist/private/Chevron.css +10 -10
- package/dist/private/Chevron.mjs +12 -12
- package/dist/private/ClearButton.cjs +30 -30
- package/dist/private/ClearButton.css +30 -30
- package/dist/private/ClearButton.mjs +30 -30
- package/dist/private/CloseButton.cjs +52 -52
- package/dist/private/CloseButton.cjs.map +1 -1
- package/dist/private/CloseButton.css +46 -46
- package/dist/private/CloseButton.css.map +1 -1
- package/dist/private/CloseButton.mjs +52 -52
- package/dist/private/CloseButton.mjs.map +1 -1
- package/dist/private/ColorArea.cjs +16 -16
- package/dist/private/ColorArea.css +16 -16
- package/dist/private/ColorArea.mjs +16 -16
- package/dist/private/ColorField.cjs +31 -31
- package/dist/private/ColorField.css +27 -27
- package/dist/private/ColorField.mjs +31 -31
- package/dist/private/ColorHandle.cjs +27 -27
- package/dist/private/ColorHandle.css +42 -42
- package/dist/private/ColorHandle.mjs +27 -27
- package/dist/private/ColorSlider.cjs +108 -108
- package/dist/private/ColorSlider.css +52 -52
- package/dist/private/ColorSlider.mjs +108 -108
- package/dist/private/ColorSwatch.cjs +29 -29
- package/dist/private/ColorSwatch.css +29 -29
- package/dist/private/ColorSwatch.mjs +29 -29
- package/dist/private/ColorSwatchPicker.cjs +29 -29
- package/dist/private/ColorSwatchPicker.css +48 -48
- package/dist/private/ColorSwatchPicker.mjs +29 -29
- package/dist/private/ColorWheel.cjs +26 -26
- package/dist/private/ColorWheel.css +17 -17
- package/dist/private/ColorWheel.mjs +26 -26
- package/dist/private/ComboBox.cjs +381 -381
- package/dist/private/ComboBox.cjs.map +1 -1
- package/dist/private/ComboBox.css +188 -188
- package/dist/private/ComboBox.css.map +1 -1
- package/dist/private/ComboBox.mjs +381 -381
- package/dist/private/ComboBox.mjs.map +1 -1
- package/dist/private/ContextualHelp.cjs +5 -5
- package/dist/private/ContextualHelp.cjs.map +1 -1
- package/dist/private/ContextualHelp.css +50 -50
- package/dist/private/ContextualHelp.css.map +1 -1
- package/dist/private/ContextualHelp.mjs +5 -5
- package/dist/private/ContextualHelp.mjs.map +1 -1
- package/dist/private/CornerTriangle.cjs +8 -8
- package/dist/private/CornerTriangle.css +6 -6
- package/dist/private/CornerTriangle.mjs +8 -8
- package/dist/private/Cross.cjs +14 -14
- package/dist/private/Cross.css +10 -10
- package/dist/private/Cross.mjs +14 -14
- package/dist/private/CustomDialog.cjs +25 -25
- package/dist/private/CustomDialog.css +25 -25
- package/dist/private/CustomDialog.mjs +25 -25
- package/dist/private/Dash.cjs +10 -10
- package/dist/private/Dash.css +6 -6
- package/dist/private/Dash.mjs +10 -10
- package/dist/private/DateField.cjs +73 -73
- package/dist/private/DateField.css +77 -77
- package/dist/private/DateField.mjs +73 -73
- package/dist/private/DatePicker.cjs +172 -172
- package/dist/private/DatePicker.cjs.map +1 -1
- package/dist/private/DatePicker.css +128 -128
- package/dist/private/DatePicker.css.map +1 -1
- package/dist/private/DatePicker.mjs +172 -172
- package/dist/private/DatePicker.mjs.map +1 -1
- package/dist/private/DateRangePicker.cjs +55 -55
- package/dist/private/DateRangePicker.cjs.map +1 -1
- package/dist/private/DateRangePicker.css +59 -59
- package/dist/private/DateRangePicker.css.map +1 -1
- package/dist/private/DateRangePicker.mjs +55 -55
- package/dist/private/DateRangePicker.mjs.map +1 -1
- package/dist/private/Dialog.cjs +17 -17
- package/dist/private/Dialog.css +70 -70
- package/dist/private/Dialog.mjs +17 -17
- package/dist/private/Disclosure.cjs +144 -122
- package/dist/private/Disclosure.cjs.map +1 -1
- package/dist/private/Disclosure.css +112 -112
- package/dist/private/Disclosure.css.map +1 -1
- package/dist/private/Disclosure.mjs +144 -122
- package/dist/private/Disclosure.mjs.map +1 -1
- package/dist/private/Divider.cjs +25 -25
- package/dist/private/Divider.css +25 -25
- package/dist/private/Divider.mjs +25 -25
- package/dist/private/DragHandle.cjs +8 -8
- package/dist/private/DragHandle.css +6 -6
- package/dist/private/DragHandle.mjs +8 -8
- package/dist/private/DragPreview.cjs +154 -154
- package/dist/private/DragPreview.css +106 -106
- package/dist/private/DragPreview.mjs +154 -154
- package/dist/private/DropZone.cjs +61 -61
- package/dist/private/DropZone.cjs.map +1 -1
- package/dist/private/DropZone.css +57 -57
- package/dist/private/DropZone.css.map +1 -1
- package/dist/private/DropZone.mjs +61 -61
- package/dist/private/DropZone.mjs.map +1 -1
- package/dist/private/Field.cjs +360 -360
- package/dist/private/Field.cjs.map +1 -1
- package/dist/private/Field.css +160 -160
- package/dist/private/Field.css.map +1 -1
- package/dist/private/Field.mjs +360 -360
- package/dist/private/Field.mjs.map +1 -1
- package/dist/private/Form.cjs +9 -9
- package/dist/private/Form.css +9 -9
- package/dist/private/Form.mjs +9 -9
- package/dist/private/FullscreenDialog.cjs +5 -5
- package/dist/private/FullscreenDialog.css +78 -78
- package/dist/private/FullscreenDialog.mjs +5 -5
- package/dist/private/IllustratedMessage.cjs +228 -228
- package/dist/private/IllustratedMessage.css +72 -72
- package/dist/private/IllustratedMessage.mjs +228 -228
- package/dist/private/Image.cjs +14 -14
- package/dist/private/Image.css +14 -14
- package/dist/private/Image.mjs +14 -14
- package/dist/private/InlineAlert.cjs +100 -100
- package/dist/private/InlineAlert.cjs.map +1 -1
- package/dist/private/InlineAlert.css +76 -76
- package/dist/private/InlineAlert.css.map +1 -1
- package/dist/private/InlineAlert.mjs +100 -100
- package/dist/private/InlineAlert.mjs.map +1 -1
- package/dist/private/LabeledValue.cjs +134 -134
- package/dist/private/LabeledValue.css +63 -63
- package/dist/private/LabeledValue.mjs +134 -134
- package/dist/private/Link.cjs +49 -49
- package/dist/private/Link.css +41 -41
- package/dist/private/Link.mjs +49 -49
- package/dist/private/LinkOut.cjs +8 -8
- package/dist/private/LinkOut.css +8 -8
- package/dist/private/LinkOut.mjs +8 -8
- package/dist/private/ListView.cjs +245 -245
- package/dist/private/ListView.cjs.map +1 -1
- package/dist/private/ListView.css +177 -177
- package/dist/private/ListView.css.map +1 -1
- package/dist/private/ListView.mjs +245 -245
- package/dist/private/ListView.mjs.map +1 -1
- package/dist/private/Menu.cjs +446 -446
- package/dist/private/Menu.cjs.map +1 -1
- package/dist/private/Menu.css +196 -196
- package/dist/private/Menu.css.map +1 -1
- package/dist/private/Menu.mjs +446 -446
- package/dist/private/Menu.mjs.map +1 -1
- package/dist/private/Meter.cjs +153 -153
- package/dist/private/Meter.css +91 -91
- package/dist/private/Meter.mjs +153 -153
- package/dist/private/Modal.cjs +74 -74
- package/dist/private/Modal.css +59 -59
- package/dist/private/Modal.mjs +74 -74
- package/dist/private/NotificationBadge.cjs +56 -56
- package/dist/private/NotificationBadge.cjs.map +1 -1
- package/dist/private/NotificationBadge.css +49 -49
- package/dist/private/NotificationBadge.css.map +1 -1
- package/dist/private/NotificationBadge.mjs +56 -56
- package/dist/private/NotificationBadge.mjs.map +1 -1
- package/dist/private/NumberField.cjs +114 -114
- package/dist/private/NumberField.css +99 -99
- package/dist/private/NumberField.mjs +114 -114
- package/dist/private/Picker.cjs +275 -275
- package/dist/private/Picker.cjs.map +1 -1
- package/dist/private/Picker.css +173 -173
- package/dist/private/Picker.css.map +1 -1
- package/dist/private/Picker.mjs +275 -275
- package/dist/private/Picker.mjs.map +1 -1
- package/dist/private/Popover.cjs +95 -95
- package/dist/private/Popover.cjs.map +1 -1
- package/dist/private/Popover.css +75 -75
- package/dist/private/Popover.css.map +1 -1
- package/dist/private/Popover.mjs +95 -95
- package/dist/private/Popover.mjs.map +1 -1
- package/dist/private/ProgressBar.cjs +163 -163
- package/dist/private/ProgressBar.css +99 -99
- package/dist/private/ProgressBar.mjs +163 -163
- package/dist/private/ProgressCircle.cjs +34 -31
- package/dist/private/ProgressCircle.cjs.map +1 -1
- package/dist/private/ProgressCircle.css +24 -24
- package/dist/private/ProgressCircle.css.map +1 -1
- package/dist/private/ProgressCircle.mjs +34 -31
- package/dist/private/ProgressCircle.mjs.map +1 -1
- package/dist/private/Provider.cjs +19 -19
- package/dist/private/Provider.css +15 -15
- package/dist/private/Provider.mjs +19 -19
- package/dist/private/RadioGroup.cjs +208 -208
- package/dist/private/RadioGroup.css +113 -113
- package/dist/private/RadioGroup.mjs +208 -208
- package/dist/private/RangeCalendar.cjs +16 -16
- package/dist/private/RangeCalendar.cjs.map +1 -1
- package/dist/private/RangeCalendar.css +17 -17
- package/dist/private/RangeCalendar.css.map +1 -1
- package/dist/private/RangeCalendar.mjs +16 -16
- package/dist/private/RangeCalendar.mjs.map +1 -1
- package/dist/private/RangeSlider.cjs.map +1 -1
- package/dist/private/RangeSlider.mjs.map +1 -1
- package/dist/private/SearchField.cjs +41 -41
- package/dist/private/SearchField.css +45 -45
- package/dist/private/SearchField.mjs +41 -41
- package/dist/private/SegmentedControl.cjs +178 -178
- package/dist/private/SegmentedControl.css +123 -123
- package/dist/private/SegmentedControl.mjs +178 -178
- package/dist/private/SelectBoxGroup.cjs +142 -142
- package/dist/private/SelectBoxGroup.css +120 -120
- package/dist/private/SelectBoxGroup.mjs +142 -142
- package/dist/private/Slider.cjs +292 -292
- package/dist/private/Slider.css +159 -159
- package/dist/private/Slider.mjs +292 -292
- package/dist/private/StatusLight.cjs +115 -115
- package/dist/private/StatusLight.css +59 -59
- package/dist/private/StatusLight.mjs +115 -115
- package/dist/private/Switch.cjs +171 -171
- package/dist/private/Switch.css +85 -85
- package/dist/private/Switch.mjs +171 -171
- package/dist/private/TableView.cjs +551 -534
- package/dist/private/TableView.cjs.map +1 -1
- package/dist/private/TableView.css +329 -303
- package/dist/private/TableView.css.map +1 -1
- package/dist/private/TableView.mjs +551 -534
- package/dist/private/TableView.mjs.map +1 -1
- package/dist/private/Tabs.cjs +131 -125
- package/dist/private/Tabs.cjs.map +1 -1
- package/dist/private/Tabs.css +105 -105
- package/dist/private/Tabs.css.map +1 -1
- package/dist/private/Tabs.mjs +131 -125
- package/dist/private/Tabs.mjs.map +1 -1
- package/dist/private/TabsPicker.cjs +127 -127
- package/dist/private/TabsPicker.css +108 -108
- package/dist/private/TabsPicker.mjs +127 -127
- package/dist/private/TagGroup.cjs +203 -203
- package/dist/private/TagGroup.cjs.map +1 -1
- package/dist/private/TagGroup.css +146 -146
- package/dist/private/TagGroup.css.map +1 -1
- package/dist/private/TagGroup.mjs +203 -203
- package/dist/private/TagGroup.mjs.map +1 -1
- package/dist/private/TextField.cjs +58 -58
- package/dist/private/TextField.css +54 -54
- package/dist/private/TextField.mjs +58 -58
- package/dist/private/TimeField.cjs +51 -51
- package/dist/private/TimeField.css +47 -47
- package/dist/private/TimeField.mjs +51 -51
- package/dist/private/Toast.cjs +120 -120
- package/dist/private/Toast.cjs.map +1 -1
- package/dist/private/Toast.css +110 -110
- package/dist/private/Toast.css.map +1 -1
- package/dist/private/Toast.mjs +120 -120
- package/dist/private/Toast.mjs.map +1 -1
- package/dist/private/ToggleButton.cjs +16 -16
- package/dist/private/ToggleButton.css +23 -23
- package/dist/private/ToggleButton.mjs +16 -16
- package/dist/private/Tooltip.cjs +86 -86
- package/dist/private/Tooltip.css +70 -70
- package/dist/private/Tooltip.mjs +86 -86
- package/dist/private/TreeView.cjs +229 -229
- package/dist/private/TreeView.cjs.map +1 -1
- package/dist/private/TreeView.css +184 -184
- package/dist/private/TreeView.css.map +1 -1
- package/dist/private/TreeView.mjs +229 -229
- package/dist/private/TreeView.mjs.map +1 -1
- package/dist/private/dnd-utils.cjs +42 -42
- package/dist/private/dnd-utils.css +39 -39
- package/dist/private/dnd-utils.mjs +42 -42
- package/dist/types/exports/CenterBaseline.d.ts +1 -0
- package/dist/types/exports/Skeleton.d.ts +1 -1
- package/dist/types/exports/index.d.ts +1 -0
- package/dist/types/src/CenterBaseline.d.ts +17 -0
- package/dist/types/src/ContextualHelp.d.ts +1 -1
- package/dist/types/src/Disclosure.d.ts +6 -1
- package/dist/types/src/ListView.d.ts +1 -1
- package/dist/types/src/Menu.d.ts +1 -1
- package/dist/types/src/Popover.d.ts +2 -2
- package/dist/types/src/style-utils.d.ts +4 -1
- package/exports/CenterBaseline.ts +1 -0
- package/exports/Skeleton.ts +1 -1
- package/exports/index.ts +2 -0
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/package.json +6 -6
- package/src/ActionBar.tsx +0 -1
- package/src/ActionButton.tsx +0 -1
- package/src/ActionMenu.tsx +0 -1
- package/src/AlertDialog.tsx +0 -1
- package/src/Breadcrumbs.tsx +0 -4
- package/src/Button.tsx +12 -3
- package/src/ButtonGroup.tsx +1 -0
- package/src/Calendar.tsx +0 -1
- package/src/CenterBaseline.tsx +17 -0
- package/src/CloseButton.tsx +0 -1
- package/src/ComboBox.tsx +0 -1
- package/src/ContextualHelp.tsx +1 -2
- package/src/DatePicker.tsx +0 -1
- package/src/DateRangePicker.tsx +0 -1
- package/src/Disclosure.tsx +92 -79
- package/src/DropZone.tsx +0 -1
- package/src/Field.tsx +0 -1
- package/src/InlineAlert.tsx +0 -1
- package/src/ListView.tsx +0 -2
- package/src/Menu.tsx +1 -8
- package/src/NotificationBadge.tsx +0 -1
- package/src/Picker.tsx +0 -1
- package/src/Popover.tsx +2 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RangeCalendar.tsx +0 -1
- package/src/RangeSlider.tsx +0 -1
- package/src/TableView.tsx +75 -37
- package/src/Tabs.tsx +9 -2
- package/src/TagGroup.tsx +0 -1
- package/src/Toast.tsx +0 -3
- package/src/TreeView.tsx +0 -1
- package/src/style-utils.ts +13 -2
- package/style/__tests__/style-macro.test.js +73 -71
- package/style/dist/main.cjs +25 -25
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +224 -224
- package/style/dist/spectrum-theme.mjs +217 -217
- package/style/dist/style-macro.cjs +100 -100
- package/style/dist/style-macro.mjs +94 -94
- package/style/dist/style-utils.cjs +51 -39
- package/style/dist/style-utils.cjs.map +1 -1
- package/style/dist/style-utils.mjs +50 -38
- package/style/dist/style-utils.mjs.map +1 -1
|
@@ -67,51 +67,51 @@ const $932c2841127a87c7$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bwmQw$react
|
|
|
67
67
|
if (p[1] === "y") gridColumnEnd = true;
|
|
68
68
|
rules += p[0];
|
|
69
69
|
}
|
|
70
|
-
rules += '
|
|
70
|
+
rules += ' se151';
|
|
71
71
|
if (props.isInForm) {
|
|
72
|
-
if (!gridColumnStart) rules += '
|
|
72
|
+
if (!gridColumnStart) rules += ' z2mU151';
|
|
73
73
|
}
|
|
74
74
|
if (props.isInForm) {
|
|
75
75
|
if (props.labelPosition === "side") {
|
|
76
|
-
if (!gridColumnEnd) rules += '
|
|
76
|
+
if (!gridColumnEnd) rules += ' yvoofG151';
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
if (props.isInForm) rules += '
|
|
79
|
+
if (props.isInForm) rules += ' DLwlgod151';
|
|
80
80
|
else {
|
|
81
|
-
if (props.labelPosition === "side") rules += '
|
|
82
|
-
else if (props.labelPosition === "top") rules += '
|
|
81
|
+
if (props.labelPosition === "side") rules += ' DPlN5qb151';
|
|
82
|
+
else if (props.labelPosition === "top") rules += ' DM8Mfn151';
|
|
83
83
|
}
|
|
84
|
-
if (props.labelPosition === "side") rules += '
|
|
85
|
-
else if (props.labelPosition === "top") rules += '
|
|
86
|
-
if (props.labelPosition === "side") rules += '
|
|
87
|
-
else if (props.labelPosition === "top") rules += '
|
|
84
|
+
if (props.labelPosition === "side") rules += ' EPlN5qb151';
|
|
85
|
+
else if (props.labelPosition === "top") rules += ' E4w1sLc151';
|
|
86
|
+
if (props.labelPosition === "side") rules += ' CbRM95c151';
|
|
87
|
+
else if (props.labelPosition === "top") rules += ' Cxaocre151';
|
|
88
88
|
if (props.size === "XL") {
|
|
89
|
-
rules += ' -_6BNtrc-
|
|
90
|
-
rules += '
|
|
89
|
+
rules += ' -_6BNtrc-e151';
|
|
90
|
+
rules += ' vx151';
|
|
91
91
|
} else if (props.size === "L") {
|
|
92
|
-
rules += ' -_6BNtrc-
|
|
93
|
-
rules += '
|
|
92
|
+
rules += ' -_6BNtrc-d151';
|
|
93
|
+
rules += ' vx151';
|
|
94
94
|
} else if (props.size === "S") {
|
|
95
|
-
rules += ' -_6BNtrc-
|
|
96
|
-
rules += '
|
|
95
|
+
rules += ' -_6BNtrc-b151';
|
|
96
|
+
rules += ' vx151';
|
|
97
97
|
} else if (props.size === "XS") {
|
|
98
|
-
rules += ' -_6BNtrc-
|
|
99
|
-
rules += '
|
|
98
|
+
rules += ' -_6BNtrc-a151';
|
|
99
|
+
rules += ' vx151';
|
|
100
100
|
} else {
|
|
101
|
-
rules += ' -_6BNtrc-
|
|
102
|
-
rules += '
|
|
101
|
+
rules += ' -_6BNtrc-c151';
|
|
102
|
+
rules += ' vx151';
|
|
103
103
|
}
|
|
104
|
-
rules += '
|
|
105
|
-
rules += '
|
|
106
|
-
rules += '
|
|
107
|
-
if (props.size === "XL") rules += ' -BhX7R-
|
|
108
|
-
else if (props.size === "L") rules += ' -BhX7R-
|
|
109
|
-
else if (props.size === "S") rules += ' -BhX7R-
|
|
110
|
-
else if (props.size === "XS") rules += ' -BhX7R-
|
|
111
|
-
else rules += ' -BhX7R-
|
|
112
|
-
rules += ' -AJjOLd-
|
|
113
|
-
rules += '
|
|
114
|
-
rules += '
|
|
104
|
+
rules += ' ea151';
|
|
105
|
+
rules += ' _Fd151';
|
|
106
|
+
rules += ' _FnuYUweb151';
|
|
107
|
+
if (props.size === "XL") rules += ' -BhX7R-Fz151';
|
|
108
|
+
else if (props.size === "L") rules += ' -BhX7R-Fv151';
|
|
109
|
+
else if (props.size === "S") rules += ' -BhX7R-Fp151';
|
|
110
|
+
else if (props.size === "XS") rules += ' -BhX7R-Fn151';
|
|
111
|
+
else rules += ' -BhX7R-Fx151';
|
|
112
|
+
rules += ' -AJjOLd-UVkF0Db151';
|
|
113
|
+
rules += ' qg151';
|
|
114
|
+
rules += ' __ca151';
|
|
115
115
|
return rules;
|
|
116
116
|
}({
|
|
117
117
|
isInForm: !!formContext,
|
|
@@ -148,27 +148,27 @@ const $932c2841127a87c7$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bwmQw$react
|
|
|
148
148
|
size: size,
|
|
149
149
|
styles: function anonymous(props) {
|
|
150
150
|
let rules = " ";
|
|
151
|
-
rules += '
|
|
152
|
-
rules += '
|
|
153
|
-
rules += '
|
|
154
|
-
rules += '
|
|
155
|
-
if (props.size === "XL") rules += '
|
|
156
|
-
else if (props.size === "L") rules += '
|
|
157
|
-
else if (props.size === "S") rules += '
|
|
158
|
-
else if (props.size === "XS") rules += '
|
|
159
|
-
else rules += '
|
|
160
|
-
if (props.isQuiet) rules += '
|
|
161
|
-
else rules += '
|
|
162
|
-
if (props.size === "XL") rules += ' -Anxdcc-
|
|
163
|
-
else if (props.size === "L") rules += ' -Anxdcc-
|
|
164
|
-
else if (props.size === "S") rules += ' -Anxdcc-
|
|
165
|
-
else rules += ' -Anxdcc-
|
|
166
|
-
rules += '
|
|
167
|
-
rules += '
|
|
168
|
-
rules += '
|
|
169
|
-
rules += '
|
|
170
|
-
rules += ' -S_-
|
|
171
|
-
rules += ' -R_-
|
|
151
|
+
rules += ' zXcEWr151';
|
|
152
|
+
rules += ' yXcEWr151';
|
|
153
|
+
rules += ' BXcEWr151';
|
|
154
|
+
rules += ' AXcEWr151';
|
|
155
|
+
if (props.size === "XL") rules += ' Nl151';
|
|
156
|
+
else if (props.size === "L") rules += ' Nj151';
|
|
157
|
+
else if (props.size === "S") rules += ' Nf151';
|
|
158
|
+
else if (props.size === "XS") rules += ' Ne151';
|
|
159
|
+
else rules += ' Nk151';
|
|
160
|
+
if (props.isQuiet) rules += ' _qd151';
|
|
161
|
+
else rules += ' _qtb151';
|
|
162
|
+
if (props.size === "XL") rules += ' -Anxdcc-Zt151';
|
|
163
|
+
else if (props.size === "L") rules += ' -Anxdcc-ZStdtne151';
|
|
164
|
+
else if (props.size === "S") rules += ' -Anxdcc-Zr151';
|
|
165
|
+
else rules += ' -Anxdcc-Z3fn9H151';
|
|
166
|
+
rules += ' __v6TNLWb151';
|
|
167
|
+
rules += ' __Wb151';
|
|
168
|
+
rules += ' SMBFGYc151';
|
|
169
|
+
rules += ' RfBFGYc151';
|
|
170
|
+
rules += ' -S_-Sv151';
|
|
171
|
+
rules += ' -R_-Rp151';
|
|
172
172
|
return rules;
|
|
173
173
|
}({
|
|
174
174
|
size: size
|
|
@@ -181,7 +181,7 @@ const $932c2841127a87c7$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bwmQw$react
|
|
|
181
181
|
}),
|
|
182
182
|
/*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsx)("span", {
|
|
183
183
|
"aria-hidden": "true",
|
|
184
|
-
className: "
|
|
184
|
+
className: " _va151 _ua151 Sj151 Rj151",
|
|
185
185
|
children: "\u2013"
|
|
186
186
|
}),
|
|
187
187
|
/*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsx)((0, $d19642654b699f84$exports.DateInput), {
|
|
@@ -194,7 +194,7 @@ const $932c2841127a87c7$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bwmQw$react
|
|
|
194
194
|
isDisabled: isDisabled
|
|
195
195
|
}),
|
|
196
196
|
/*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsx)("div", {
|
|
197
|
-
className: "
|
|
197
|
+
className: " _va151 _ub151 sd151 _Cb151",
|
|
198
198
|
children: /*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsx)((0, $e6aad0776f57e0e9$exports.CalendarButton), {
|
|
199
199
|
isOpen: isOpen,
|
|
200
200
|
size: size,
|
|
@@ -213,7 +213,7 @@ const $932c2841127a87c7$export$17334619f3ac2224 = /*#__PURE__*/ (0, $bwmQw$react
|
|
|
213
213
|
errorMessage: resolvedErrorMessage
|
|
214
214
|
}),
|
|
215
215
|
showTimeField && /*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsxs)("div", {
|
|
216
|
-
className: "
|
|
216
|
+
className: " sd151 Ul151 ql151 _qb151 JA151",
|
|
217
217
|
children: [
|
|
218
218
|
/*#__PURE__*/ (0, $bwmQw$reactjsxruntime.jsx)((0, $7b93ad26130ad3f8$exports.TimeField), {
|
|
219
219
|
styles: (0, $e6aad0776f57e0e9$exports.timeField),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AA+DM,MAAM,yDACX,CAAA,GAAA,0BAAY,EAAoE;AAM3E,MAAM,4CAAgC,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EACrD,SAAS,gBACP,KAA8B,EAC9B,GAAwB;IAExB,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,SACF,KAAK,kBACL,cAAc,EACd,aAAa,kBAAkB,gBAC/B,YAAY,cACZ,UAAU,QACV,OAAO,oBACP,gBAAgB,2BAChB,kBAAkB,cAClB,aAAa,uBACb,YAAY,oBACZ,gBAAgB,UAChB,MAAM,oBACN,gBAAgB,oBAChB,mBAAmB,mBACnB,cAAc,kBACd,cAAc,EACd,GAAG,gBACJ,GAAG;IACJ,IAAI,cAAc,CAAA,GAAA,uBAAS,EAA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Aa;kCACZ;;;;QAIT;;AAGN","sources":["packages/@react-spectrum/s2/src/DateRangePicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateValue\n} from 'react-aria-components/DateRangePicker';\nimport {CalendarButton, CalendarPopover, timeField} from './DatePicker';\nimport {ContextValue} from 'react-aria-components/slots';\nimport {createContext, forwardRef, ReactElement, Ref, useContext, useState} from 'react';\nimport {DateInput, DateInputContainer, InvalidIndicator} from './DateField';\nimport {\n field,\n fieldInput,\n getAllowedOverrides,\n StyleProps\n} from './style-utils' with {type: 'macro'};\nimport {FieldGroup, FieldLabel, HelpText} from './Field';\nimport {FormContext} from 'react-aria-components/Form';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HelpTextProps,\n SpectrumLabelableProps\n} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {PopoverProps} from 'react-aria-components/Popover';\nimport {RangeCalendar, RangeCalendarProps} from './RangeCalendar';\nimport {style} from '../style' with {type: 'macro'};\nimport {TimeField} from './TimeField';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DateRangePickerProps<T extends DateValue>\n extends\n Omit<\n AriaDateRangePickerProps<T>,\n 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes\n >,\n Pick<\n RangeCalendarProps<T>,\n 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable' | 'commitBehavior'\n >,\n Pick<PopoverProps, 'shouldFlip'>,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps {\n /**\n * The size of the DateField.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL';\n /**\n * The maximum number of months to display at once in the calendar popover, if screen space\n * permits.\n *\n * @default 1\n */\n maxVisibleMonths?: number;\n}\n\nexport const DateRangePickerContext =\n createContext<ContextValue<Partial<DateRangePickerProps<any>>, HTMLDivElement>>(null);\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(\n function DateRangePicker<T extends DateValue>(\n props: DateRangePickerProps<T>,\n ref: Ref<HTMLDivElement>\n ): ReactElement {\n [props, ref] = useSpectrumContextProps(props, ref, DateRangePickerContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n label,\n contextualHelp,\n description: descriptionMessage,\n errorMessage,\n isRequired,\n size = 'M',\n labelPosition = 'top',\n necessityIndicator,\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className,\n styles,\n placeholderValue,\n maxVisibleMonths = 1,\n createCalendar,\n commitBehavior,\n ...dateFieldProps\n } = props;\n let formContext = useContext(FormContext);\n let [buttonHasFocus, setButtonHasFocus] = useState(false);\n\n return (\n <AriaDateRangePicker\n ref={ref}\n isRequired={isRequired}\n {...dateFieldProps}\n style={UNSAFE_style}\n className={\n (UNSAFE_className || '') +\n style(field(), getAllowedOverrides())(\n {\n isInForm: !!formContext,\n labelPosition,\n size\n },\n styles\n )\n }>\n {({isDisabled, isInvalid, isOpen, state}) => {\n let placeholder: DateValue | undefined = placeholderValue || undefined;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : undefined;\n let showTimeField = !!timeGranularity;\n\n // Ideally, we could omit errorMessage here and let S2 Calendar read it from RAC's CalendarContext which already contains the resolved value via calendarProps from useDatePicker.\n // However, RAC's CalendarProps omits errorMessage, so reading it back from the context would require an unsafe cast. Instead, we resolve it here using the same logic as useDatePicker.\n let resolvedErrorMessage =\n typeof errorMessage === 'function'\n ? errorMessage(state.displayValidation)\n : errorMessage || state.displayValidation.validationErrors.join(' ');\n return (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup\n role=\"presentation\"\n shouldTurnOffFocusRing={buttonHasFocus}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n size={size}\n styles={style({\n ...fieldInput(),\n textWrap: 'nowrap',\n paddingStart: 'edge-to-text',\n paddingEnd: 4\n })({size})}>\n <DateInputContainer>\n <DateInput slot=\"start\" />\n <span\n aria-hidden=\"true\"\n className={style({flexShrink: 0, flexGrow: 0, paddingX: 2})}>\n –\n </span>\n <DateInput slot=\"end\" />\n </DateInputContainer>\n <InvalidIndicator isInvalid={isInvalid} isDisabled={isDisabled} />\n <div\n className={style({\n flexShrink: 0,\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'end'\n })}>\n <CalendarButton\n isOpen={isOpen}\n size={size}\n setButtonHasFocus={setButtonHasFocus}\n />\n </div>\n </FieldGroup>\n <CalendarPopover shouldFlip={props.shouldFlip}>\n <RangeCalendar\n visibleMonths={maxVisibleMonths}\n createCalendar={createCalendar}\n commitBehavior={commitBehavior}\n errorMessage={resolvedErrorMessage}\n />\n {showTimeField && (\n <div\n className={style({\n display: 'flex',\n gap: 16,\n contain: 'inline-size',\n marginTop: 24\n })}>\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n </div>\n )}\n </CalendarPopover>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {resolvedErrorMessage}\n </HelpText>\n </>\n );\n }}\n </AriaDateRangePicker>\n );\n }\n);\n"],"names":[],"version":3,"file":"DateRangePicker.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;AA8DM,MAAM,yDACX,CAAA,GAAA,0BAAY,EAAoE;AAM3E,MAAM,4CAAgC,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EACrD,SAAS,gBACP,KAA8B,EAC9B,GAAwB;IAExB,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,kBAAkB,CAAA,GAAA,uEAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,SACF,KAAK,kBACL,cAAc,EACd,aAAa,kBAAkB,gBAC/B,YAAY,cACZ,UAAU,QACV,OAAO,oBACP,gBAAgB,2BAChB,kBAAkB,cAClB,aAAa,uBACb,YAAY,oBACZ,gBAAgB,UAChB,MAAM,oBACN,gBAAgB,oBAChB,mBAAmB,mBACnB,cAAc,kBACd,cAAc,EACd,GAAG,gBACJ,GAAG;IACJ,IA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BACN,YAAY;wBACZ,WAAW;wBACX,aAAa;kCACZ;;;;QAIT;;AAGN","sources":["packages/@react-spectrum/s2/src/DateRangePicker.tsx"],"sourcesContent":["/*\n * Copyright 2024 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 {\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateValue\n} from 'react-aria-components/DateRangePicker';\nimport {CalendarButton, CalendarPopover, timeField} from './DatePicker';\nimport {ContextValue} from 'react-aria-components/slots';\nimport {createContext, forwardRef, ReactElement, Ref, useContext, useState} from 'react';\nimport {DateInput, DateInputContainer, InvalidIndicator} from './DateField';\nimport {\n field,\n fieldInput,\n getAllowedOverrides,\n StyleProps\n} from './style-utils' with {type: 'macro'};\nimport {FieldGroup, FieldLabel, HelpText} from './Field';\nimport {FormContext} from 'react-aria-components/Form';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HelpTextProps,\n SpectrumLabelableProps\n} from '@react-types/shared';\nimport intlMessages from '../intl/*.json';\nimport {PopoverProps} from 'react-aria-components/Popover';\nimport {RangeCalendar, RangeCalendarProps} from './RangeCalendar';\nimport {style} from '../style' with {type: 'macro'};\nimport {TimeField} from './TimeField';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DateRangePickerProps<T extends DateValue>\n extends\n Omit<\n AriaDateRangePickerProps<T>,\n 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes\n >,\n Pick<\n RangeCalendarProps<T>,\n 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable' | 'commitBehavior'\n >,\n Pick<PopoverProps, 'shouldFlip'>,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps {\n /**\n * The size of the DateField.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL';\n /**\n * The maximum number of months to display at once in the calendar popover, if screen space\n * permits.\n *\n * @default 1\n */\n maxVisibleMonths?: number;\n}\n\nexport const DateRangePickerContext =\n createContext<ContextValue<Partial<DateRangePickerProps<any>>, HTMLDivElement>>(null);\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(\n function DateRangePicker<T extends DateValue>(\n props: DateRangePickerProps<T>,\n ref: Ref<HTMLDivElement>\n ): ReactElement {\n [props, ref] = useSpectrumContextProps(props, ref, DateRangePickerContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n label,\n contextualHelp,\n description: descriptionMessage,\n errorMessage,\n isRequired,\n size = 'M',\n labelPosition = 'top',\n necessityIndicator,\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className,\n styles,\n placeholderValue,\n maxVisibleMonths = 1,\n createCalendar,\n commitBehavior,\n ...dateFieldProps\n } = props;\n let formContext = useContext(FormContext);\n let [buttonHasFocus, setButtonHasFocus] = useState(false);\n\n return (\n <AriaDateRangePicker\n ref={ref}\n isRequired={isRequired}\n {...dateFieldProps}\n style={UNSAFE_style}\n className={\n (UNSAFE_className || '') +\n style(field(), getAllowedOverrides())(\n {\n isInForm: !!formContext,\n labelPosition,\n size\n },\n styles\n )\n }>\n {({isDisabled, isInvalid, isOpen, state}) => {\n let placeholder: DateValue | undefined = placeholderValue || undefined;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : undefined;\n let showTimeField = !!timeGranularity;\n\n // Ideally, we could omit errorMessage here and let S2 Calendar read it from RAC's CalendarContext which already contains the resolved value via calendarProps from useDatePicker.\n // However, RAC's CalendarProps omits errorMessage, so reading it back from the context would require an unsafe cast. Instead, we resolve it here using the same logic as useDatePicker.\n let resolvedErrorMessage =\n typeof errorMessage === 'function'\n ? errorMessage(state.displayValidation)\n : errorMessage || state.displayValidation.validationErrors.join(' ');\n return (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup\n role=\"presentation\"\n shouldTurnOffFocusRing={buttonHasFocus}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n size={size}\n styles={style({\n ...fieldInput(),\n textWrap: 'nowrap',\n paddingStart: 'edge-to-text',\n paddingEnd: 4\n })({size})}>\n <DateInputContainer>\n <DateInput slot=\"start\" />\n <span\n aria-hidden=\"true\"\n className={style({flexShrink: 0, flexGrow: 0, paddingX: 2})}>\n –\n </span>\n <DateInput slot=\"end\" />\n </DateInputContainer>\n <InvalidIndicator isInvalid={isInvalid} isDisabled={isDisabled} />\n <div\n className={style({\n flexShrink: 0,\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'end'\n })}>\n <CalendarButton\n isOpen={isOpen}\n size={size}\n setButtonHasFocus={setButtonHasFocus}\n />\n </div>\n </FieldGroup>\n <CalendarPopover shouldFlip={props.shouldFlip}>\n <RangeCalendar\n visibleMonths={maxVisibleMonths}\n createCalendar={createCalendar}\n commitBehavior={commitBehavior}\n errorMessage={resolvedErrorMessage}\n />\n {showTimeField && (\n <div\n className={style({\n display: 'flex',\n gap: 16,\n contain: 'inline-size',\n marginTop: 24\n })}>\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n </div>\n )}\n </CalendarPopover>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {resolvedErrorMessage}\n </HelpText>\n </>\n );\n }}\n </AriaDateRangePicker>\n );\n }\n);\n"],"names":[],"version":3,"file":"DateRangePicker.cjs.map"}
|
|
@@ -1,245 +1,245 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.se151 {
|
|
3
3
|
display: grid;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.z2mU151 {
|
|
7
7
|
grid-column-start: 1;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.yvoofG151 {
|
|
11
11
|
grid-column-end: span 2;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.DM8Mfn151 {
|
|
15
15
|
grid-template-columns: 1fr;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.DPlN5qb151 {
|
|
19
19
|
grid-template-columns: auto 1fr;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.DLwlgod151 {
|
|
23
23
|
grid-template-columns: subgrid;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.E4w1sLc151 {
|
|
27
27
|
grid-template-rows: auto 1fr auto;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.EPlN5qb151 {
|
|
31
31
|
grid-template-rows: auto 1fr;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.Cxaocre151 {
|
|
35
35
|
grid-template-areas: "label"
|
|
36
36
|
"input"
|
|
37
37
|
"helptext";
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.CbRM95c151 {
|
|
41
41
|
grid-template-areas: "label input"
|
|
42
42
|
"label helptext";
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.-_6BNtrc-
|
|
45
|
+
.-_6BNtrc-c151 {
|
|
46
46
|
--fs: pow(1.125, 0);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.-_6BNtrc-
|
|
49
|
+
.-_6BNtrc-a151 {
|
|
50
50
|
--fs: pow(1.125, -2);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.-_6BNtrc-
|
|
53
|
+
.-_6BNtrc-b151 {
|
|
54
54
|
--fs: pow(1.125, -1);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.-_6BNtrc-
|
|
57
|
+
.-_6BNtrc-d151 {
|
|
58
58
|
--fs: pow(1.125, 1);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.-_6BNtrc-
|
|
61
|
+
.-_6BNtrc-e151 {
|
|
62
62
|
--fs: pow(1.125, 2);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.vx151 {
|
|
66
66
|
font-size: round(var(--s2-font-size-base, 14) * var(--fs) / 16 * 1rem, 1px);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
.ea151 {
|
|
70
70
|
align-items: baseline;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.
|
|
73
|
+
._Fd151 {
|
|
74
74
|
line-height: round(1em * (1.15 + (1 - ((min(32, var(--s2-font-size-base, 14) * var(--fs)) - 10)) / 22) * .15), 2px);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.-BhX7R-
|
|
77
|
+
.-BhX7R-Fx151 {
|
|
78
78
|
--field-height: calc(2rem * var(--s2-scale));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.-BhX7R-
|
|
81
|
+
.-BhX7R-Fn151 {
|
|
82
82
|
--field-height: calc(1.25rem * var(--s2-scale));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.-BhX7R-
|
|
85
|
+
.-BhX7R-Fp151 {
|
|
86
86
|
--field-height: calc(1.5rem * var(--s2-scale));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.-BhX7R-
|
|
89
|
+
.-BhX7R-Fv151 {
|
|
90
90
|
--field-height: calc(2.5rem * var(--s2-scale));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.-BhX7R-
|
|
93
|
+
.-BhX7R-Fz151 {
|
|
94
94
|
--field-height: calc(3rem * var(--s2-scale));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.-AJjOLd-
|
|
97
|
+
.-AJjOLd-UVkF0Db151 {
|
|
98
98
|
--field-gap: calc((var(--field-height) - var(--_k, 0px) - var(--h, 0px) - 1lh) / 2);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
.qg151 {
|
|
102
102
|
column-gap: .75rem;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.
|
|
105
|
+
.__ca151 {
|
|
106
106
|
-webkit-tap-highlight-color: #0000;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.zXcEWr151 {
|
|
110
110
|
grid-column-start: input;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.yXcEWr151 {
|
|
114
114
|
grid-column-end: input;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
.BXcEWr151 {
|
|
118
118
|
grid-row-start: input;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
.AXcEWr151 {
|
|
122
122
|
grid-row-end: input;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
.Nk151 {
|
|
126
126
|
min-width: calc(2rem * var(--s2-scale));
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.
|
|
129
|
+
.Ne151 {
|
|
130
130
|
min-width: calc(1.25rem * var(--s2-scale));
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
.Nf151 {
|
|
134
134
|
min-width: calc(1.5rem * var(--s2-scale));
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.
|
|
137
|
+
.Nj151 {
|
|
138
138
|
min-width: calc(2.5rem * var(--s2-scale));
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.
|
|
141
|
+
.Nl151 {
|
|
142
142
|
min-width: calc(3rem * var(--s2-scale));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.
|
|
145
|
+
._qd151 {
|
|
146
146
|
contain: none;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.-Anxdcc-
|
|
149
|
+
.-Anxdcc-Z3fn9H151 {
|
|
150
150
|
--defaultWidth: calc(13rem * var(--s2-scale));
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
.-Anxdcc-
|
|
153
|
+
.-Anxdcc-Zr151 {
|
|
154
154
|
--defaultWidth: calc(12rem * var(--s2-scale));
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
.-Anxdcc-
|
|
157
|
+
.-Anxdcc-ZStdtne151 {
|
|
158
158
|
--defaultWidth: calc(14rem * var(--s2-scale));
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.-Anxdcc-
|
|
161
|
+
.-Anxdcc-Zt151 {
|
|
162
162
|
--defaultWidth: calc(15rem * var(--s2-scale));
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.
|
|
165
|
+
.__v6TNLWb151 {
|
|
166
166
|
contain-intrinsic-width: calc(var(--defaultWidth) - var(--S, 0px) - var(--R, 0px) - var(--m, 0px) - var(--l, 0px));
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
.
|
|
169
|
+
.__Wb151 {
|
|
170
170
|
text-wrap: nowrap;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
.
|
|
173
|
+
.SMBFGYc151 {
|
|
174
174
|
padding-inline-start: var(--S);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
.
|
|
177
|
+
.RfBFGYc151 {
|
|
178
178
|
padding-inline-end: var(--R);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
.-S_-
|
|
181
|
+
.-S_-Sv151 {
|
|
182
182
|
--S: calc(var(--F, var(--M)) * 3 / 8);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
.-R_-
|
|
185
|
+
.-R_-Rp151 {
|
|
186
186
|
--R: 4px;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
.
|
|
189
|
+
._ua151 {
|
|
190
190
|
flex-grow: 0;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
.
|
|
193
|
+
.Sj151 {
|
|
194
194
|
padding-inline-start: 2px;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
.
|
|
197
|
+
.Rj151 {
|
|
198
198
|
padding-inline-end: 2px;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
.
|
|
201
|
+
._va151 {
|
|
202
202
|
flex-shrink: 0;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
.
|
|
205
|
+
._ub151 {
|
|
206
206
|
flex-grow: 1;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
.
|
|
209
|
+
._Cb151 {
|
|
210
210
|
justify-content: end;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
.
|
|
213
|
+
.sd151 {
|
|
214
214
|
display: flex;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
.
|
|
217
|
+
.Ul151 {
|
|
218
218
|
row-gap: 1rem;
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
.
|
|
221
|
+
.ql151 {
|
|
222
222
|
column-gap: 1rem;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
.
|
|
225
|
+
._qb151 {
|
|
226
226
|
contain: inline-size;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
.
|
|
229
|
+
.JA151 {
|
|
230
230
|
margin-top: 1.5rem;
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
@layer _.b {
|
|
235
|
-
.
|
|
235
|
+
._FnuYUweb151:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
236
236
|
line-height: 1.5;
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
@layer _.b.t {
|
|
241
241
|
@supports (contain-intrinsic-width: 1px) {
|
|
242
|
-
.
|
|
242
|
+
._qtb151 {
|
|
243
243
|
contain: inline-size;
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACqHU;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgDc;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAUO;;;;EAAA;;;;EAAA;;;;EAOF;;;;EAAA;;;;EAAA;;;;EAsBE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAvFrB;EAAA;;;;;AAgDc;EAAA;IAAA","sources":["d7a279a73f170432","packages/@react-spectrum/s2/src/DateRangePicker.tsx"],"sourcesContent":["@import \"270ce443556f6832\";\n@import \"e665ec5e30b00bf9\";\n@import \"187f6499c2fa9b0d\";\n@import \"1dda7790205ac36a\";\n@import \"b7a8eac09818aeb5\";\n","/*\n * Copyright 2024 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 {\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateValue\n} from 'react-aria-components/DateRangePicker';\nimport {CalendarButton, CalendarPopover, timeField} from './DatePicker';\nimport {ContextValue} from 'react-aria-components/slots';\nimport {createContext, forwardRef, ReactElement, Ref, useContext, useState} from 'react';\nimport {DateInput, DateInputContainer, InvalidIndicator} from './DateField';\nimport {\n field,\n fieldInput,\n getAllowedOverrides,\n StyleProps\n} from './style-utils' with {type: 'macro'};\nimport {FieldGroup, FieldLabel, HelpText} from './Field';\nimport {FormContext} from 'react-aria-components/Form';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HelpTextProps,\n SpectrumLabelableProps\n} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {PopoverProps} from 'react-aria-components/Popover';\nimport {RangeCalendar, RangeCalendarProps} from './RangeCalendar';\nimport {style} from '../style' with {type: 'macro'};\nimport {TimeField} from './TimeField';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DateRangePickerProps<T extends DateValue>\n extends\n Omit<\n AriaDateRangePickerProps<T>,\n 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes\n >,\n Pick<\n RangeCalendarProps<T>,\n 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable' | 'commitBehavior'\n >,\n Pick<PopoverProps, 'shouldFlip'>,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps {\n /**\n * The size of the DateField.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL';\n /**\n * The maximum number of months to display at once in the calendar popover, if screen space\n * permits.\n *\n * @default 1\n */\n maxVisibleMonths?: number;\n}\n\nexport const DateRangePickerContext =\n createContext<ContextValue<Partial<DateRangePickerProps<any>>, HTMLDivElement>>(null);\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(\n function DateRangePicker<T extends DateValue>(\n props: DateRangePickerProps<T>,\n ref: Ref<HTMLDivElement>\n ): ReactElement {\n [props, ref] = useSpectrumContextProps(props, ref, DateRangePickerContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n label,\n contextualHelp,\n description: descriptionMessage,\n errorMessage,\n isRequired,\n size = 'M',\n labelPosition = 'top',\n necessityIndicator,\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className,\n styles,\n placeholderValue,\n maxVisibleMonths = 1,\n createCalendar,\n commitBehavior,\n ...dateFieldProps\n } = props;\n let formContext = useContext(FormContext);\n let [buttonHasFocus, setButtonHasFocus] = useState(false);\n\n return (\n <AriaDateRangePicker\n ref={ref}\n isRequired={isRequired}\n {...dateFieldProps}\n style={UNSAFE_style}\n className={\n (UNSAFE_className || '') +\n style(field(), getAllowedOverrides())(\n {\n isInForm: !!formContext,\n labelPosition,\n size\n },\n styles\n )\n }>\n {({isDisabled, isInvalid, isOpen, state}) => {\n let placeholder: DateValue | undefined = placeholderValue || undefined;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : undefined;\n let showTimeField = !!timeGranularity;\n\n // Ideally, we could omit errorMessage here and let S2 Calendar read it from RAC's CalendarContext which already contains the resolved value via calendarProps from useDatePicker.\n // However, RAC's CalendarProps omits errorMessage, so reading it back from the context would require an unsafe cast. Instead, we resolve it here using the same logic as useDatePicker.\n let resolvedErrorMessage =\n typeof errorMessage === 'function'\n ? errorMessage(state.displayValidation)\n : errorMessage || state.displayValidation.validationErrors.join(' ');\n return (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup\n role=\"presentation\"\n shouldTurnOffFocusRing={buttonHasFocus}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n size={size}\n styles={style({\n ...fieldInput(),\n textWrap: 'nowrap',\n paddingStart: 'edge-to-text',\n paddingEnd: 4\n })({size})}>\n <DateInputContainer>\n <DateInput slot=\"start\" />\n <span\n aria-hidden=\"true\"\n className={style({flexShrink: 0, flexGrow: 0, paddingX: 2})}>\n –\n </span>\n <DateInput slot=\"end\" />\n </DateInputContainer>\n <InvalidIndicator isInvalid={isInvalid} isDisabled={isDisabled} />\n <div\n className={style({\n flexShrink: 0,\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'end'\n })}>\n <CalendarButton\n isOpen={isOpen}\n size={size}\n setButtonHasFocus={setButtonHasFocus}\n />\n </div>\n </FieldGroup>\n <CalendarPopover shouldFlip={props.shouldFlip}>\n <RangeCalendar\n visibleMonths={maxVisibleMonths}\n createCalendar={createCalendar}\n commitBehavior={commitBehavior}\n errorMessage={resolvedErrorMessage}\n />\n {showTimeField && (\n <div\n className={style({\n display: 'flex',\n gap: 16,\n contain: 'inline-size',\n marginTop: 24\n })}>\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n </div>\n )}\n </CalendarPopover>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {resolvedErrorMessage}\n </HelpText>\n </>\n );\n }}\n </AriaDateRangePicker>\n );\n }\n);\n"],"names":[],"version":3,"file":"DateRangePicker.css.map"}
|
|
1
|
+
{"mappings":"ACoHU;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAgDc;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAUO;;;;EAAA;;;;EAAA;;;;EAOF;;;;EAAA;;;;EAAA;;;;EAsBE;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAvFrB;EAAA;;;;;AAgDc;EAAA;IAAA","sources":["d7a279a73f170432","packages/@react-spectrum/s2/src/DateRangePicker.tsx"],"sourcesContent":["@import \"270ce443556f6832\";\n@import \"e665ec5e30b00bf9\";\n@import \"187f6499c2fa9b0d\";\n@import \"1dda7790205ac36a\";\n@import \"b7a8eac09818aeb5\";\n","/*\n * Copyright 2024 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 {\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateValue\n} from 'react-aria-components/DateRangePicker';\nimport {CalendarButton, CalendarPopover, timeField} from './DatePicker';\nimport {ContextValue} from 'react-aria-components/slots';\nimport {createContext, forwardRef, ReactElement, Ref, useContext, useState} from 'react';\nimport {DateInput, DateInputContainer, InvalidIndicator} from './DateField';\nimport {\n field,\n fieldInput,\n getAllowedOverrides,\n StyleProps\n} from './style-utils' with {type: 'macro'};\nimport {FieldGroup, FieldLabel, HelpText} from './Field';\nimport {FormContext} from 'react-aria-components/Form';\nimport {\n forwardRefType,\n GlobalDOMAttributes,\n HelpTextProps,\n SpectrumLabelableProps\n} from '@react-types/shared';\nimport intlMessages from '../intl/*.json';\nimport {PopoverProps} from 'react-aria-components/Popover';\nimport {RangeCalendar, RangeCalendarProps} from './RangeCalendar';\nimport {style} from '../style' with {type: 'macro'};\nimport {TimeField} from './TimeField';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface DateRangePickerProps<T extends DateValue>\n extends\n Omit<\n AriaDateRangePickerProps<T>,\n 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes\n >,\n Pick<\n RangeCalendarProps<T>,\n 'createCalendar' | 'pageBehavior' | 'firstDayOfWeek' | 'isDateUnavailable' | 'commitBehavior'\n >,\n Pick<PopoverProps, 'shouldFlip'>,\n StyleProps,\n SpectrumLabelableProps,\n HelpTextProps {\n /**\n * The size of the DateField.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL';\n /**\n * The maximum number of months to display at once in the calendar popover, if screen space\n * permits.\n *\n * @default 1\n */\n maxVisibleMonths?: number;\n}\n\nexport const DateRangePickerContext =\n createContext<ContextValue<Partial<DateRangePickerProps<any>>, HTMLDivElement>>(null);\n\n/**\n * DateRangePickers combine two DateFields and a RangeCalendar popover to allow users\n * to enter or select a date and time range.\n */\nexport const DateRangePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(\n function DateRangePicker<T extends DateValue>(\n props: DateRangePickerProps<T>,\n ref: Ref<HTMLDivElement>\n ): ReactElement {\n [props, ref] = useSpectrumContextProps(props, ref, DateRangePickerContext);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let {\n label,\n contextualHelp,\n description: descriptionMessage,\n errorMessage,\n isRequired,\n size = 'M',\n labelPosition = 'top',\n necessityIndicator,\n labelAlign = 'start',\n UNSAFE_style,\n UNSAFE_className,\n styles,\n placeholderValue,\n maxVisibleMonths = 1,\n createCalendar,\n commitBehavior,\n ...dateFieldProps\n } = props;\n let formContext = useContext(FormContext);\n let [buttonHasFocus, setButtonHasFocus] = useState(false);\n\n return (\n <AriaDateRangePicker\n ref={ref}\n isRequired={isRequired}\n {...dateFieldProps}\n style={UNSAFE_style}\n className={\n (UNSAFE_className || '') +\n style(field(), getAllowedOverrides())(\n {\n isInForm: !!formContext,\n labelPosition,\n size\n },\n styles\n )\n }>\n {({isDisabled, isInvalid, isOpen, state}) => {\n let placeholder: DateValue | undefined = placeholderValue || undefined;\n let timePlaceholder = placeholder && 'hour' in placeholder ? placeholder : undefined;\n let timeMinValue =\n props.minValue && 'hour' in props.minValue ? props.minValue : undefined;\n let timeMaxValue =\n props.maxValue && 'hour' in props.maxValue ? props.maxValue : undefined;\n let timeGranularity =\n state.granularity === 'hour' ||\n state.granularity === 'minute' ||\n state.granularity === 'second'\n ? state.granularity\n : undefined;\n let showTimeField = !!timeGranularity;\n\n // Ideally, we could omit errorMessage here and let S2 Calendar read it from RAC's CalendarContext which already contains the resolved value via calendarProps from useDatePicker.\n // However, RAC's CalendarProps omits errorMessage, so reading it back from the context would require an unsafe cast. Instead, we resolve it here using the same logic as useDatePicker.\n let resolvedErrorMessage =\n typeof errorMessage === 'function'\n ? errorMessage(state.displayValidation)\n : errorMessage || state.displayValidation.validationErrors.join(' ');\n return (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={contextualHelp}>\n {label}\n </FieldLabel>\n <FieldGroup\n role=\"presentation\"\n shouldTurnOffFocusRing={buttonHasFocus}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n size={size}\n styles={style({\n ...fieldInput(),\n textWrap: 'nowrap',\n paddingStart: 'edge-to-text',\n paddingEnd: 4\n })({size})}>\n <DateInputContainer>\n <DateInput slot=\"start\" />\n <span\n aria-hidden=\"true\"\n className={style({flexShrink: 0, flexGrow: 0, paddingX: 2})}>\n –\n </span>\n <DateInput slot=\"end\" />\n </DateInputContainer>\n <InvalidIndicator isInvalid={isInvalid} isDisabled={isDisabled} />\n <div\n className={style({\n flexShrink: 0,\n flexGrow: 1,\n display: 'flex',\n justifyContent: 'end'\n })}>\n <CalendarButton\n isOpen={isOpen}\n size={size}\n setButtonHasFocus={setButtonHasFocus}\n />\n </div>\n </FieldGroup>\n <CalendarPopover shouldFlip={props.shouldFlip}>\n <RangeCalendar\n visibleMonths={maxVisibleMonths}\n createCalendar={createCalendar}\n commitBehavior={commitBehavior}\n errorMessage={resolvedErrorMessage}\n />\n {showTimeField && (\n <div\n className={style({\n display: 'flex',\n gap: 16,\n contain: 'inline-size',\n marginTop: 24\n })}>\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.startTime')}\n value={state.timeRange?.start || null}\n onChange={v => state.setTime('start', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n <TimeField\n styles={timeField}\n label={stringFormatter.format('datepicker.endTime')}\n value={state.timeRange?.end || null}\n onChange={v => state.setTime('end', v)}\n placeholderValue={timePlaceholder}\n granularity={timeGranularity}\n minValue={timeMinValue}\n maxValue={timeMaxValue}\n hourCycle={props.hourCycle}\n hideTimeZone={props.hideTimeZone}\n />\n </div>\n )}\n </CalendarPopover>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={descriptionMessage}>\n {resolvedErrorMessage}\n </HelpText>\n </>\n );\n }}\n </AriaDateRangePicker>\n );\n }\n);\n"],"names":[],"version":3,"file":"DateRangePicker.css.map"}
|