@react-spectrum/s2 1.0.0 → 1.1.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/Accordion.cjs +3 -3
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +62 -61
- package/dist/ActionBar.cjs.map +1 -1
- package/dist/ActionBar.css +58 -58
- package/dist/ActionBar.css.map +1 -1
- package/dist/ActionBar.mjs +62 -61
- package/dist/ActionBar.mjs.map +1 -1
- package/dist/ActionButton.cjs +234 -234
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +160 -160
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +234 -234
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +16 -16
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +16 -16
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +16 -16
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +121 -121
- package/dist/AvatarGroup.css +31 -31
- package/dist/AvatarGroup.mjs +121 -121
- package/dist/Badge.cjs +197 -197
- package/dist/Badge.css +125 -125
- package/dist/Badge.mjs +197 -197
- package/dist/Breadcrumbs.cjs +235 -235
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +100 -100
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +235 -235
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +333 -333
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +174 -174
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +333 -333
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +21 -21
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +21 -21
- package/dist/Calendar.cjs +169 -169
- package/dist/Calendar.cjs.map +1 -1
- package/dist/Calendar.css +134 -134
- package/dist/Calendar.css.map +1 -1
- package/dist/Calendar.mjs +169 -169
- package/dist/Calendar.mjs.map +1 -1
- package/dist/Card.cjs +310 -310
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +206 -206
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +310 -310
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +19 -19
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +17 -17
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +19 -19
- package/dist/CardView.mjs.map +1 -1
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +162 -162
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +95 -91
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +162 -162
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +44 -44
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +37 -37
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +44 -44
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +30 -30
- package/dist/ClearButton.css +30 -30
- package/dist/ClearButton.mjs +30 -30
- package/dist/CloseButton.cjs +56 -56
- package/dist/CloseButton.css +47 -47
- package/dist/CloseButton.mjs +56 -56
- package/dist/ColorArea.cjs +17 -17
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +17 -17
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +32 -32
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +27 -27
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +32 -32
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +109 -109
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +52 -52
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +109 -109
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +30 -30
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +30 -30
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +30 -30
- package/dist/ColorSwatchPicker.css +48 -48
- package/dist/ColorSwatchPicker.mjs +30 -30
- package/dist/ColorWheel.cjs +31 -27
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +31 -27
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +383 -383
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +187 -187
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +383 -383
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +50 -50
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +26 -26
- package/dist/CustomDialog.cjs.map +1 -1
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.css.map +1 -1
- package/dist/CustomDialog.mjs +26 -26
- package/dist/CustomDialog.mjs.map +1 -1
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/DateField.cjs +74 -74
- package/dist/DateField.cjs.map +1 -1
- package/dist/DateField.css +77 -77
- package/dist/DateField.css.map +1 -1
- package/dist/DateField.mjs +74 -74
- package/dist/DateField.mjs.map +1 -1
- package/dist/DatePicker.cjs +173 -173
- package/dist/DatePicker.cjs.map +1 -1
- package/dist/DatePicker.css +128 -128
- package/dist/DatePicker.css.map +1 -1
- package/dist/DatePicker.mjs +173 -173
- package/dist/DatePicker.mjs.map +1 -1
- package/dist/DateRangePicker.cjs +56 -56
- package/dist/DateRangePicker.cjs.map +1 -1
- package/dist/DateRangePicker.css +59 -59
- package/dist/DateRangePicker.css.map +1 -1
- package/dist/DateRangePicker.mjs +56 -56
- package/dist/DateRangePicker.mjs.map +1 -1
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css +70 -70
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +17 -17
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs +120 -120
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +120 -120
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +25 -25
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +26 -26
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +62 -62
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +57 -57
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +62 -62
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +348 -348
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +147 -147
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +348 -348
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +9 -9
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +10 -10
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.cjs.map +1 -1
- package/dist/FullscreenDialog.css +78 -78
- package/dist/FullscreenDialog.css.map +1 -1
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/FullscreenDialog.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +229 -229
- package/dist/IllustratedMessage.css +72 -72
- package/dist/IllustratedMessage.mjs +229 -229
- package/dist/Image.cjs +14 -14
- package/dist/Image.css +14 -14
- package/dist/Image.mjs +14 -14
- package/dist/InlineAlert.cjs +101 -101
- package/dist/InlineAlert.css +76 -76
- package/dist/InlineAlert.mjs +101 -101
- package/dist/Link.cjs +50 -50
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +41 -41
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +50 -50
- package/dist/Link.mjs.map +1 -1
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +446 -443
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +184 -184
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +446 -443
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +154 -154
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +91 -91
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +154 -154
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +66 -66
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css +54 -54
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs +66 -66
- package/dist/Modal.mjs.map +1 -1
- package/dist/NotificationBadge.cjs +57 -57
- package/dist/NotificationBadge.css +49 -49
- package/dist/NotificationBadge.mjs +57 -57
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +99 -99
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -115
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +275 -275
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +173 -173
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +275 -275
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +89 -89
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +70 -70
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +89 -89
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +164 -164
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +99 -99
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +164 -164
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +32 -32
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +24 -24
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +32 -32
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +11 -11
- package/dist/Provider.css +10 -10
- package/dist/Provider.mjs +11 -11
- package/dist/Radio.cjs +146 -146
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +78 -78
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +146 -146
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +42 -42
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +37 -37
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +42 -42
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeCalendar.cjs +8 -8
- package/dist/RangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar.css +10 -10
- package/dist/RangeCalendar.css.map +1 -1
- package/dist/RangeCalendar.mjs +8 -8
- package/dist/RangeCalendar.mjs.map +1 -1
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +45 -45
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +42 -42
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +180 -180
- package/dist/SegmentedControl.css +123 -123
- package/dist/SegmentedControl.mjs +180 -180
- package/dist/SelectBoxGroup.cjs +144 -144
- package/dist/SelectBoxGroup.cjs.map +1 -1
- package/dist/SelectBoxGroup.css +120 -120
- package/dist/SelectBoxGroup.css.map +1 -1
- package/dist/SelectBoxGroup.mjs +144 -144
- package/dist/SelectBoxGroup.mjs.map +1 -1
- package/dist/Slider.cjs +295 -295
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +154 -154
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +295 -295
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +116 -116
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +116 -116
- package/dist/Switch.cjs +155 -155
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +74 -74
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +155 -155
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +415 -415
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +416 -416
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +127 -127
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +105 -105
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +127 -127
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +127 -127
- package/dist/TabsPicker.cjs.map +1 -1
- package/dist/TabsPicker.css +108 -108
- package/dist/TabsPicker.css.map +1 -1
- package/dist/TabsPicker.mjs +127 -127
- package/dist/TabsPicker.mjs.map +1 -1
- package/dist/TagGroup.cjs +204 -204
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +146 -146
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +204 -204
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +54 -54
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +59 -59
- package/dist/TextField.mjs.map +1 -1
- package/dist/TimeField.cjs +52 -52
- package/dist/TimeField.cjs.map +1 -1
- package/dist/TimeField.css +47 -47
- package/dist/TimeField.css.map +1 -1
- package/dist/TimeField.mjs +52 -52
- package/dist/TimeField.mjs.map +1 -1
- package/dist/Toast.cjs +120 -120
- package/dist/Toast.cjs.map +1 -1
- package/dist/Toast.css +110 -110
- package/dist/Toast.css.map +1 -1
- package/dist/Toast.mjs +120 -120
- package/dist/Toast.mjs.map +1 -1
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +3 -3
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +78 -78
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +65 -65
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +78 -78
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +144 -128
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -127
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +144 -128
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +68 -72
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs +12 -12
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +12 -12
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/icons/runtime.cjs +16 -3
- package/icons/runtime.cjs.map +1 -1
- package/icons/runtime.mjs +16 -3
- package/icons/runtime.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionBar.tsx +2 -2
- package/src/ActionButton.tsx +1 -1
- package/src/Breadcrumbs.tsx +2 -2
- package/src/Button.tsx +2 -2
- package/src/Calendar.tsx +1 -1
- package/src/Card.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +2 -1
- package/src/CheckboxGroup.tsx +1 -1
- package/src/CoachMark.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +2 -2
- package/src/ComboBox.tsx +2 -2
- package/src/CustomDialog.tsx +1 -1
- package/src/DateField.tsx +1 -1
- package/src/DatePicker.tsx +1 -1
- package/src/DateRangePicker.tsx +1 -1
- package/src/Dialog.tsx +1 -1
- package/src/Disclosure.tsx +2 -2
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/Field.tsx +3 -3
- package/src/Form.tsx +1 -1
- package/src/FullscreenDialog.tsx +1 -1
- package/src/Link.tsx +1 -1
- package/src/Menu.tsx +11 -13
- package/src/Meter.tsx +1 -1
- package/src/Modal.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +3 -3
- package/src/Popover.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/Radio.tsx +1 -1
- package/src/RadioGroup.tsx +1 -1
- package/src/RangeCalendar.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SelectBoxGroup.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +9 -9
- package/src/Tabs.tsx +4 -4
- package/src/TabsPicker.tsx +2 -2
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +1 -1
- package/src/TimeField.tsx +1 -1
- package/src/Toast.tsx +1 -1
- package/src/ToggleButton.tsx +1 -1
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +1 -1
- package/src/TreeView.tsx +10 -6
- package/style/__tests__/mergeStyles.test.ts +68 -0
- package/style/__tests__/style-macro.test.js +79 -59
- package/style/dist/style-macro.cjs +65 -14
- package/style/dist/style-macro.cjs.map +1 -1
- package/style/dist/style-macro.mjs +65 -14
- package/style/dist/style-macro.mjs.map +1 -1
- package/style/runtime.ts +21 -5
- package/style/style-macro.ts +81 -16
- package/style/__tests__/mergeStyles.test.js +0 -32
package/dist/RadioGroup.css
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.se11 {
|
|
3
3
|
display: grid;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.z2mU11 {
|
|
7
7
|
grid-column-start: 1;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.yvoofG11 {
|
|
11
11
|
grid-column-end: span 2;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.DM8Mfn11 {
|
|
15
15
|
grid-template-columns: 1fr;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.DPlN5qb11 {
|
|
19
19
|
grid-template-columns: auto 1fr;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.DLwlgod11 {
|
|
23
23
|
grid-template-columns: subgrid;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.E4w1sLc11 {
|
|
27
27
|
grid-template-rows: auto 1fr auto;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.EPlN5qb11 {
|
|
31
31
|
grid-template-rows: auto 1fr;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.Cxaocre11 {
|
|
35
35
|
grid-template-areas: "label"
|
|
36
36
|
"input"
|
|
37
37
|
"helptext";
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.CbRM95c11 {
|
|
41
41
|
grid-template-areas: "label input"
|
|
42
42
|
"label helptext";
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.-_6BNtrc-
|
|
45
|
+
.-_6BNtrc-c11 {
|
|
46
46
|
--fs: pow(1.125, 0);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.-_6BNtrc-
|
|
49
|
+
.-_6BNtrc-a11 {
|
|
50
50
|
--fs: pow(1.125, -2);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.-_6BNtrc-
|
|
53
|
+
.-_6BNtrc-b11 {
|
|
54
54
|
--fs: pow(1.125, -1);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.-_6BNtrc-
|
|
57
|
+
.-_6BNtrc-d11 {
|
|
58
58
|
--fs: pow(1.125, 1);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.-_6BNtrc-
|
|
61
|
+
.-_6BNtrc-e11 {
|
|
62
62
|
--fs: pow(1.125, 2);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.vx11 {
|
|
66
66
|
font-size: round(var(--s2-font-size-base, 14) * var(--fs) / 16 * 1rem, 1px);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
.ea11 {
|
|
70
70
|
align-items: baseline;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.
|
|
73
|
+
._Fd11 {
|
|
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-Fx11 {
|
|
78
78
|
--field-height: calc(2rem * var(--s2-scale));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.-BhX7R-
|
|
81
|
+
.-BhX7R-Fn11 {
|
|
82
82
|
--field-height: calc(1.25rem * var(--s2-scale));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.-BhX7R-
|
|
85
|
+
.-BhX7R-Fp11 {
|
|
86
86
|
--field-height: calc(1.5rem * var(--s2-scale));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.-BhX7R-
|
|
89
|
+
.-BhX7R-Fv11 {
|
|
90
90
|
--field-height: calc(2.5rem * var(--s2-scale));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.-BhX7R-
|
|
93
|
+
.-BhX7R-Fz11 {
|
|
94
94
|
--field-height: calc(3rem * var(--s2-scale));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.-AJjOLd-
|
|
97
|
+
.-AJjOLd-UVxyPec11 {
|
|
98
98
|
--field-gap: calc(var(--field-height) - 1lh);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
.qg11 {
|
|
102
102
|
column-gap: .75rem;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.
|
|
105
|
+
.__ca11 {
|
|
106
106
|
-webkit-tap-highlight-color: #0000;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.zXcEWr11 {
|
|
110
110
|
grid-column-start: input;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.yXcEWr11 {
|
|
114
114
|
grid-column-end: input;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
.BXcEWr11 {
|
|
118
118
|
grid-row-start: input;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
.AXcEWr11 {
|
|
122
122
|
grid-row-end: input;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
.sd11 {
|
|
126
126
|
display: flex;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.
|
|
129
|
+
._ta11 {
|
|
130
130
|
flex-direction: column;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
._tc11 {
|
|
134
134
|
flex-direction: row;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.
|
|
137
|
+
._wb11 {
|
|
138
138
|
flex-wrap: wrap;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.
|
|
141
|
+
.ql11 {
|
|
142
142
|
column-gap: 1rem;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
.
|
|
145
|
+
.UgOnRt11 {
|
|
146
146
|
row-gap: var(--field-gap);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
@layer _.b {
|
|
151
|
-
.
|
|
151
|
+
._FnuYUweb11:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans), :lang(zh-CN), :lang(zh-SG)) {
|
|
152
152
|
line-height: 1.5;
|
|
153
153
|
}
|
|
154
154
|
}
|
package/dist/RadioGroup.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACkFoC;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;;;;EAyBb;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzBa;EAAA","sources":["c8770acef16e2ce8","packages/@react-spectrum/s2/src/RadioGroup.tsx"],"sourcesContent":["@import \"759b4f838d0febfe\";\n@import \"c4a9a0d82a5b8e9f\";\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 RadioGroup as AriaRadioGroup,\n RadioGroupProps as AriaRadioGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The Radios contained within the RadioGroup.\n */\n children: ReactNode,\n /**\n * The size of the RadioGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the radio elements should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * Whether the RadioGroup should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<Partial<RadioGroupProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nexport const RadioGroup = /*#__PURE__*/ forwardRef(function RadioGroup(props: RadioGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RadioGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n description,\n errorMessage,\n children,\n isEmphasized,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n ...groupProps\n } = props;\n return (\n <AriaRadioGroup\n {...groupProps}\n orientation={orientation}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: 'calc(var(--field-height) - 1lh)'\n }\n }, getAllowedOverrides())({\n size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n flexWrap: 'wrap',\n // Spectrum uses a fixed spacing value for horizontal (column),\n // but the gap changes depending on t-shirt size in vertical (row).\n columnGap: 16,\n rowGap: '--field-gap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size, isEmphasized}}>\n {children}\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>\n )}\n </AriaRadioGroup>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.css.map"}
|
|
1
|
+
{"mappings":"ACkFoC;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;;;;EAyBb;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzBa;EAAA","sources":["c8770acef16e2ce8","packages/@react-spectrum/s2/src/RadioGroup.tsx"],"sourcesContent":["@import \"759b4f838d0febfe\";\n@import \"c4a9a0d82a5b8e9f\";\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 RadioGroup as AriaRadioGroup,\n RadioGroupProps as AriaRadioGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The Radios contained within the RadioGroup.\n */\n children: ReactNode,\n /**\n * The size of the RadioGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the radio elements should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * Whether the RadioGroup should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<Partial<RadioGroupProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nexport const RadioGroup = /*#__PURE__*/ forwardRef(function RadioGroup(props: RadioGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RadioGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n description,\n errorMessage,\n children,\n isEmphasized,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n ...groupProps\n } = props;\n return (\n <AriaRadioGroup\n {...groupProps}\n orientation={orientation}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: 'calc(var(--field-height) - 1lh)'\n }\n }, getAllowedOverrides())({\n size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n flexWrap: 'wrap',\n // Spectrum uses a fixed spacing value for horizontal (column),\n // but the gap changes depending on t-shirt size in vertical (row).\n columnGap: 16,\n rowGap: '--field-gap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size, isEmphasized}}>\n {children}\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>\n )}\n </AriaRadioGroup>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.css.map"}
|
package/dist/RadioGroup.mjs
CHANGED
|
@@ -40,57 +40,57 @@ const $9a2afae66771094f$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $fZVHt$forwa
|
|
|
40
40
|
let rules = " ";
|
|
41
41
|
let gridColumnStart = false;
|
|
42
42
|
let gridColumnEnd = false;
|
|
43
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
43
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
44
44
|
for (let p of matches){
|
|
45
45
|
if (p[1] === "z") gridColumnStart = true;
|
|
46
46
|
if (p[1] === "y") gridColumnEnd = true;
|
|
47
47
|
rules += p[0];
|
|
48
48
|
}
|
|
49
|
-
rules += '
|
|
49
|
+
rules += ' se11';
|
|
50
50
|
if (props.isInForm) {
|
|
51
|
-
if (!gridColumnStart) rules += '
|
|
51
|
+
if (!gridColumnStart) rules += ' z2mU11';
|
|
52
52
|
}
|
|
53
53
|
if (props.isInForm) {
|
|
54
54
|
if (props.labelPosition === "side") {
|
|
55
|
-
if (!gridColumnEnd) rules += '
|
|
55
|
+
if (!gridColumnEnd) rules += ' yvoofG11';
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
if (props.isInForm) rules += '
|
|
58
|
+
if (props.isInForm) rules += ' DLwlgod11';
|
|
59
59
|
else {
|
|
60
|
-
if (props.labelPosition === "side") rules += '
|
|
61
|
-
else if (props.labelPosition === "top") rules += '
|
|
60
|
+
if (props.labelPosition === "side") rules += ' DPlN5qb11';
|
|
61
|
+
else if (props.labelPosition === "top") rules += ' DM8Mfn11';
|
|
62
62
|
}
|
|
63
|
-
if (props.labelPosition === "side") rules += '
|
|
64
|
-
else if (props.labelPosition === "top") rules += '
|
|
65
|
-
if (props.labelPosition === "side") rules += '
|
|
66
|
-
else if (props.labelPosition === "top") rules += '
|
|
63
|
+
if (props.labelPosition === "side") rules += ' EPlN5qb11';
|
|
64
|
+
else if (props.labelPosition === "top") rules += ' E4w1sLc11';
|
|
65
|
+
if (props.labelPosition === "side") rules += ' CbRM95c11';
|
|
66
|
+
else if (props.labelPosition === "top") rules += ' Cxaocre11';
|
|
67
67
|
if (props.size === "XL") {
|
|
68
|
-
rules += ' -_6BNtrc-
|
|
69
|
-
rules += '
|
|
68
|
+
rules += ' -_6BNtrc-e11';
|
|
69
|
+
rules += ' vx11';
|
|
70
70
|
} else if (props.size === "L") {
|
|
71
|
-
rules += ' -_6BNtrc-
|
|
72
|
-
rules += '
|
|
71
|
+
rules += ' -_6BNtrc-d11';
|
|
72
|
+
rules += ' vx11';
|
|
73
73
|
} else if (props.size === "S") {
|
|
74
|
-
rules += ' -_6BNtrc-
|
|
75
|
-
rules += '
|
|
74
|
+
rules += ' -_6BNtrc-b11';
|
|
75
|
+
rules += ' vx11';
|
|
76
76
|
} else if (props.size === "XS") {
|
|
77
|
-
rules += ' -_6BNtrc-
|
|
78
|
-
rules += '
|
|
77
|
+
rules += ' -_6BNtrc-a11';
|
|
78
|
+
rules += ' vx11';
|
|
79
79
|
} else {
|
|
80
|
-
rules += ' -_6BNtrc-
|
|
81
|
-
rules += '
|
|
80
|
+
rules += ' -_6BNtrc-c11';
|
|
81
|
+
rules += ' vx11';
|
|
82
82
|
}
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
if (props.size === "XL") rules += ' -BhX7R-
|
|
87
|
-
else if (props.size === "L") rules += ' -BhX7R-
|
|
88
|
-
else if (props.size === "S") rules += ' -BhX7R-
|
|
89
|
-
else if (props.size === "XS") rules += ' -BhX7R-
|
|
90
|
-
else rules += ' -BhX7R-
|
|
91
|
-
rules += ' -AJjOLd-
|
|
92
|
-
rules += '
|
|
93
|
-
rules += '
|
|
83
|
+
rules += ' ea11';
|
|
84
|
+
rules += ' _Fd11';
|
|
85
|
+
rules += ' _FnuYUweb11';
|
|
86
|
+
if (props.size === "XL") rules += ' -BhX7R-Fz11';
|
|
87
|
+
else if (props.size === "L") rules += ' -BhX7R-Fv11';
|
|
88
|
+
else if (props.size === "S") rules += ' -BhX7R-Fp11';
|
|
89
|
+
else if (props.size === "XS") rules += ' -BhX7R-Fn11';
|
|
90
|
+
else rules += ' -BhX7R-Fx11';
|
|
91
|
+
rules += ' -AJjOLd-UVxyPec11';
|
|
92
|
+
rules += ' qg11';
|
|
93
|
+
rules += ' __ca11';
|
|
94
94
|
return rules;
|
|
95
95
|
}({
|
|
96
96
|
size: size,
|
|
@@ -112,16 +112,16 @@ const $9a2afae66771094f$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $fZVHt$forwa
|
|
|
112
112
|
/*#__PURE__*/ (0, $fZVHt$jsx)("div", {
|
|
113
113
|
className: function anonymous(props) {
|
|
114
114
|
let rules = " ";
|
|
115
|
-
rules += '
|
|
116
|
-
rules += '
|
|
117
|
-
rules += '
|
|
118
|
-
rules += '
|
|
119
|
-
rules += '
|
|
120
|
-
if (props.orientation === "horizontal") rules += '
|
|
121
|
-
else if (props.orientation === "vertical") rules += '
|
|
122
|
-
rules += '
|
|
123
|
-
rules += '
|
|
124
|
-
rules += '
|
|
115
|
+
rules += ' zXcEWr11';
|
|
116
|
+
rules += ' yXcEWr11';
|
|
117
|
+
rules += ' BXcEWr11';
|
|
118
|
+
rules += ' AXcEWr11';
|
|
119
|
+
rules += ' sd11';
|
|
120
|
+
if (props.orientation === "horizontal") rules += ' _tc11';
|
|
121
|
+
else if (props.orientation === "vertical") rules += ' _ta11';
|
|
122
|
+
rules += ' _wb11';
|
|
123
|
+
rules += ' ql11';
|
|
124
|
+
rules += ' UgOnRt11';
|
|
125
125
|
return rules;
|
|
126
126
|
}({
|
|
127
127
|
orientation: orientation
|
package/dist/RadioGroup.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuCM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAuE;AAM7G,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAA2B;IACxH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,gBACR,YAAY,iBACZ,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,qBACE,gBAAC,CAAA,GAAA,iBAAa;QACX,GAAG,UAAU;QACd,aAAa;QACb,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;kBACxB;2BACA;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBACvB;;kCACE,gBAAC,CAAA,GAAA,yCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gBAAC;wBACC,WAAW;;;;;;;;;;;;;0BAcR;yCAAC;wBAAW;kCACf,cAAA,gBAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;8CAAM;4BAAY;sCAC7D;;;kCAGL,gBAAC,CAAA,GAAA,yCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAMb","sources":["packages/@react-spectrum/s2/src/RadioGroup.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 RadioGroup as AriaRadioGroup,\n RadioGroupProps as AriaRadioGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The Radios contained within the RadioGroup.\n */\n children: ReactNode,\n /**\n * The size of the RadioGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the radio elements should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * Whether the RadioGroup should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<Partial<RadioGroupProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nexport const RadioGroup = /*#__PURE__*/ forwardRef(function RadioGroup(props: RadioGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RadioGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n description,\n errorMessage,\n children,\n isEmphasized,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n ...groupProps\n } = props;\n return (\n <AriaRadioGroup\n {...groupProps}\n orientation={orientation}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: 'calc(var(--field-height) - 1lh)'\n }\n }, getAllowedOverrides())({\n size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n flexWrap: 'wrap',\n // Spectrum uses a fixed spacing value for horizontal (column),\n // but the gap changes depending on t-shirt size in vertical (row).\n columnGap: 16,\n rowGap: '--field-gap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size, isEmphasized}}>\n {children}\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>\n )}\n </AriaRadioGroup>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuCM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAuE;AAM7G,MAAM,4CAAa,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAE,SAAS,WAAW,KAAsB,EAAE,GAA2B;IACxH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,gBACR,YAAY,iBACZ,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,qBACE,gBAAC,CAAA,GAAA,iBAAa;QACX,GAAG,UAAU;QACd,aAAa;QACb,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;kBACxB;2BACA;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBACvB;;kCACE,gBAAC,CAAA,GAAA,yCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gBAAC;wBACC,WAAW;;;;;;;;;;;;;0BAcR;yCAAC;wBAAW;kCACf,cAAA,gBAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;8CAAM;4BAAY;sCAC7D;;;kCAGL,gBAAC,CAAA,GAAA,yCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAMb","sources":["packages/@react-spectrum/s2/src/RadioGroup.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 RadioGroup as AriaRadioGroup,\n RadioGroupProps as AriaRadioGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {DOMRef, DOMRefValue, GlobalDOMAttributes, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport React, {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The Radios contained within the RadioGroup.\n */\n children: ReactNode,\n /**\n * The size of the RadioGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the radio elements should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * Whether the RadioGroup should be displayed with an emphasized style.\n */\n isEmphasized?: boolean\n}\n\nexport const RadioGroupContext = createContext<ContextValue<Partial<RadioGroupProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * Radio groups allow users to select a single option from a list of mutually exclusive options.\n * All possible options are exposed up front for users to compare.\n */\nexport const RadioGroup = /*#__PURE__*/ forwardRef(function RadioGroup(props: RadioGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RadioGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let domRef = useDOMRef(ref);\n\n let {\n label,\n description,\n errorMessage,\n children,\n isEmphasized,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n ...groupProps\n } = props;\n return (\n <AriaRadioGroup\n {...groupProps}\n orientation={orientation}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: 'calc(var(--field-height) - 1lh)'\n }\n }, getAllowedOverrides())({\n size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (\n <>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n flexWrap: 'wrap',\n // Spectrum uses a fixed spacing value for horizontal (column),\n // but the gap changes depending on t-shirt size in vertical (row).\n columnGap: 16,\n rowGap: '--field-gap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size, isEmphasized}}>\n {children}\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>\n )}\n </AriaRadioGroup>\n );\n});\n"],"names":[],"version":3,"file":"RadioGroup.mjs.map"}
|
package/dist/RangeCalendar.cjs
CHANGED
|
@@ -47,19 +47,19 @@ const $ad2936801c627ac5$export$233dd9682e1ad64b = /*#__PURE__*/ (0, $3M0RL$react
|
|
|
47
47
|
const $ad2936801c627ac5$var$calendarStyles = function anonymous(props, overrides) {
|
|
48
48
|
let rules = " ";
|
|
49
49
|
let width = false;
|
|
50
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
50
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
51
51
|
for (let p of matches){
|
|
52
52
|
if (p[1] === "Z") width = true;
|
|
53
53
|
rules += p[0];
|
|
54
54
|
}
|
|
55
|
-
rules += '
|
|
56
|
-
rules += '
|
|
57
|
-
rules += '
|
|
58
|
-
rules += '
|
|
59
|
-
if (!width) rules += '
|
|
55
|
+
rules += ' sd11';
|
|
56
|
+
rules += ' _ta11';
|
|
57
|
+
rules += ' Uj11';
|
|
58
|
+
rules += ' qj11';
|
|
59
|
+
if (!width) rules += ' ZJ11';
|
|
60
60
|
return rules;
|
|
61
61
|
};
|
|
62
|
-
const $ad2936801c627ac5$var$headerStyles = "
|
|
62
|
+
const $ad2936801c627ac5$var$headerStyles = " sd11 eb11 _Ce11 Za11";
|
|
63
63
|
const $ad2936801c627ac5$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $3M0RL$react.forwardRef)(function RangeCalendar(props, ref) {
|
|
64
64
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $ad2936801c627ac5$export$233dd9682e1ad64b);
|
|
65
65
|
let { visibleMonths: visibleMonths = 1, errorMessage: errorMessage, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, ...otherProps } = props;
|
|
@@ -102,7 +102,7 @@ const $ad2936801c627ac5$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $3M0RL$react
|
|
|
102
102
|
})
|
|
103
103
|
}),
|
|
104
104
|
/*#__PURE__*/ (0, $3M0RL$reactjsxruntime.jsx)("div", {
|
|
105
|
-
className: "
|
|
105
|
+
className: " sd11 _tc11 Uj11 qj11 Za11 ed11",
|
|
106
106
|
children: Array.from({
|
|
107
107
|
length: visibleMonths
|
|
108
108
|
}).map((_, i)=>/*#__PURE__*/ (0, $3M0RL$reactjsxruntime.jsx)((0, $e9e9a0d15c3364d7$exports.CalendarGrid), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAuCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAkE;AAGlH,MAAM;;;;;;;;;;;;;;;AAON,MAAM;AAUC,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,cAAmC,KAA4B,EAAE,GAAiC;IACnL,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,iBACF,gBAAgB,iBAChB,YAAY,gBACZ,YAAY,oBACZ,gBAAgB,UAChB,MAAM,EACN,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,iBAAiB;YAAC,QAAQ;QAAa;QACvC,OAAO;QACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,qCAAe,MAAM;kBAC1D,CAAC,aAAC,SAAS,cAAE,UAAU,EAAC;YACvB,qBACE;;kCACE,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,uCAAY;gCAAG;6BAAK;4BACrB;gCAAC,CAAA,GAAA,wCAAa;gCAAG;6BAAK;yBACvB;kCACD,cAAA,iCAAC,CAAA,GAAA,gCAAK;4BAAE,QAAQ;;8CACd,gCAAC,CAAA,GAAA,wCAAa;oCAAE,MAAK;8CAAW,cAAA,gCAAC,CAAA,GAAA,iCAAc;;8CAC/C,gCAAC,CAAA,GAAA,yCAAc;8CACf,gCAAC,CAAA,GAAA,wCAAa;oCAAE,MAAK;8CAAO,cAAA,gCAAC,CAAA,GAAA,iCAAe;;;;;kCAGhD,gCAAC;wBACC,SAAS;kCAOR,MAAM,IAAI,CAAC;4BAAC,QAAQ;wBAAa,GAAG,GAAG,CAAC,CAAC,GAAG,kBAC3C,gCAAC,CAAA,GAAA,sCAAW;gCAAE,QAAQ;+BAAQ;;oBAGjC,2BACC,gCAAC,CAAA,GAAA,+BAAG;wBAAE,MAAK;wBAAe,WAAW,CAAA,GAAA,wCAAa,EAAE;uCAAC;wCAAW;4BAAY,MAAM;wBAAG;kCAClF,gBAAgB,gBAAgB,MAAM,CAAC,6BAA6B;4BAAC,eAAe;wBAAC;;;;QAKhG;;AAGN","sources":["packages/@react-spectrum/s2/src/RangeCalendar.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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.cjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAuCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAkE;AAGlH,MAAM;;;;;;;;;;;;;;;AAON,MAAM;AAUC,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,uBAAS,EAAqB,SAAS,cAAmC,KAA4B,EAAE,GAAiC;IACnL,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,iBACF,gBAAgB,iBAChB,YAAY,gBACZ,YAAY,oBACZ,gBAAgB,UAChB,MAAM,EACN,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAEhE,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,iBAAiB;YAAC,QAAQ;QAAa;QACvC,OAAO;QACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,qCAAe,MAAM;kBAC1D,CAAC,aAAC,SAAS,cAAE,UAAU,EAAC;YACvB,qBACE;;kCACE,gCAAC,CAAA,GAAA,mCAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,uCAAY;gCAAG;6BAAK;4BACrB;gCAAC,CAAA,GAAA,wCAAa;gCAAG;6BAAK;yBACvB;kCACD,cAAA,iCAAC,CAAA,GAAA,gCAAK;4BAAE,QAAQ;;8CACd,gCAAC,CAAA,GAAA,wCAAa;oCAAE,MAAK;8CAAW,cAAA,gCAAC,CAAA,GAAA,iCAAc;;8CAC/C,gCAAC,CAAA,GAAA,yCAAc;8CACf,gCAAC,CAAA,GAAA,wCAAa;oCAAE,MAAK;8CAAO,cAAA,gCAAC,CAAA,GAAA,iCAAe;;;;;kCAGhD,gCAAC;wBACC,SAAS;kCAOR,MAAM,IAAI,CAAC;4BAAC,QAAQ;wBAAa,GAAG,GAAG,CAAC,CAAC,GAAG,kBAC3C,gCAAC,CAAA,GAAA,sCAAW;gCAAE,QAAQ;+BAAQ;;oBAGjC,2BACC,gCAAC,CAAA,GAAA,+BAAG;wBAAE,MAAK;wBAAe,WAAW,CAAA,GAAA,wCAAa,EAAE;uCAAC;wCAAW;4BAAY,MAAM;wBAAG;kCAClF,gBAAgB,gBAAgB,MAAM,CAAC,6BAA6B;4BAAC,eAAe;wBAAC;;;;QAKhG;;AAGN","sources":["packages/@react-spectrum/s2/src/RangeCalendar.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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'render' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.cjs.map"}
|
package/dist/RangeCalendar.css
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._ta11 {
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.ZJ11 {
|
|
7
7
|
width: fit-content;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.eb11 {
|
|
11
11
|
align-items: center;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
._Ce11 {
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.sd11 {
|
|
19
19
|
display: flex;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
._tc11 {
|
|
23
23
|
flex-direction: row;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.Uj11 {
|
|
27
27
|
row-gap: 1.5rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.qj11 {
|
|
31
31
|
column-gap: 1.5rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.Za11 {
|
|
35
35
|
width: 100%;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.ed11 {
|
|
39
39
|
align-items: start;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"ACoDuB;EAAA;;;;EAAA;;;;EAOF;;;;EAAA;;;;EA4CI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA","sources":["42cf5e6605cbc425","packages/@react-spectrum/s2/src/RangeCalendar.tsx"],"sourcesContent":["@import \"a96c42e4e83cb7f1\";\n@import \"e7d3fb02921850b9\";\n@import \"b8fce6763e4c963b\";\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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.css.map"}
|
|
1
|
+
{"mappings":"ACoDuB;EAAA;;;;EAAA;;;;EAOF;;;;EAAA;;;;EA4CI;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA","sources":["42cf5e6605cbc425","packages/@react-spectrum/s2/src/RangeCalendar.tsx"],"sourcesContent":["@import \"a96c42e4e83cb7f1\";\n@import \"e7d3fb02921850b9\";\n@import \"b8fce6763e4c963b\";\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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'render' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.css.map"}
|
package/dist/RangeCalendar.mjs
CHANGED
|
@@ -40,19 +40,19 @@ const $ecdee84c2f0ddfb5$export$233dd9682e1ad64b = /*#__PURE__*/ (0, $6je1a$creat
|
|
|
40
40
|
const $ecdee84c2f0ddfb5$var$calendarStyles = function anonymous(props, overrides) {
|
|
41
41
|
let rules = " ";
|
|
42
42
|
let width = false;
|
|
43
|
-
let matches = (overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
43
|
+
let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L)[^\s]+/g);
|
|
44
44
|
for (let p of matches){
|
|
45
45
|
if (p[1] === "Z") width = true;
|
|
46
46
|
rules += p[0];
|
|
47
47
|
}
|
|
48
|
-
rules += '
|
|
49
|
-
rules += '
|
|
50
|
-
rules += '
|
|
51
|
-
rules += '
|
|
52
|
-
if (!width) rules += '
|
|
48
|
+
rules += ' sd11';
|
|
49
|
+
rules += ' _ta11';
|
|
50
|
+
rules += ' Uj11';
|
|
51
|
+
rules += ' qj11';
|
|
52
|
+
if (!width) rules += ' ZJ11';
|
|
53
53
|
return rules;
|
|
54
54
|
};
|
|
55
|
-
const $ecdee84c2f0ddfb5$var$headerStyles = "
|
|
55
|
+
const $ecdee84c2f0ddfb5$var$headerStyles = " sd11 eb11 _Ce11 Za11";
|
|
56
56
|
const $ecdee84c2f0ddfb5$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $6je1a$forwardRef)(function RangeCalendar(props, ref) {
|
|
57
57
|
[props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $ecdee84c2f0ddfb5$export$233dd9682e1ad64b);
|
|
58
58
|
let { visibleMonths: visibleMonths = 1, errorMessage: errorMessage, UNSAFE_style: UNSAFE_style, UNSAFE_className: UNSAFE_className, styles: styles, ...otherProps } = props;
|
|
@@ -95,7 +95,7 @@ const $ecdee84c2f0ddfb5$export$a4f5c8b89d277a8d = /*#__PURE__*/ (0, $6je1a$forwa
|
|
|
95
95
|
})
|
|
96
96
|
}),
|
|
97
97
|
/*#__PURE__*/ (0, $6je1a$jsx)("div", {
|
|
98
|
-
className: "
|
|
98
|
+
className: " sd11 _tc11 Uj11 qj11 Za11 ed11",
|
|
99
99
|
children: Array.from({
|
|
100
100
|
length: visibleMonths
|
|
101
101
|
}).map((_, i)=>/*#__PURE__*/ (0, $6je1a$jsx)((0, $f06f4d5597ad704c$export$5bd780d491cfc46c), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAuCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAkE;AAGlH,MAAM;;;;;;;;;;;;;;;AAON,MAAM;AAUC,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,cAAmC,KAA4B,EAAE,GAAiC;IACnL,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,iBACF,gBAAgB,iBAChB,YAAY,gBACZ,YAAY,oBACZ,gBAAgB,UAChB,MAAM,EACN,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAEhE,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,iBAAiB;YAAC,QAAQ;QAAa;QACvC,OAAO;QACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,qCAAe,MAAM;kBAC1D,CAAC,aAAC,SAAS,cAAE,UAAU,EAAC;YACvB,qBACE;;kCACE,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAY;gCAAG;6BAAK;4BACrB;gCAAC,CAAA,GAAA,yCAAa;gCAAG;6BAAK;yBACvB;kCACD,cAAA,iBAAC,CAAA,GAAA,yCAAK;4BAAE,QAAQ;;8CACd,gBAAC,CAAA,GAAA,yCAAa;oCAAE,MAAK;8CAAW,cAAA,gBAAC,CAAA,GAAA,wCAAc;;8CAC/C,gBAAC,CAAA,GAAA,wCAAc;8CACf,gBAAC,CAAA,GAAA,yCAAa;oCAAE,MAAK;8CAAO,cAAA,gBAAC,CAAA,GAAA,wCAAe;;;;;kCAGhD,gBAAC;wBACC,SAAS;kCAOR,MAAM,IAAI,CAAC;4BAAC,QAAQ;wBAAa,GAAG,GAAG,CAAC,CAAC,GAAG,kBAC3C,gBAAC,CAAA,GAAA,yCAAW;gCAAE,QAAQ;+BAAQ;;oBAGjC,2BACC,gBAAC,CAAA,GAAA,WAAG;wBAAE,MAAK;wBAAe,WAAW,CAAA,GAAA,yCAAa,EAAE;uCAAC;wCAAW;4BAAY,MAAM;wBAAG;kCAClF,gBAAgB,gBAAgB,MAAM,CAAC,6BAA6B;4BAAC,eAAe;wBAAC;;;;QAKhG;;AAGN","sources":["packages/@react-spectrum/s2/src/RangeCalendar.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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;AAuCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAkE;AAGlH,MAAM;;;;;;;;;;;;;;;AAON,MAAM;AAUC,MAAM,4CAA8B,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,cAAmC,KAA4B,EAAE,GAAiC;IACnL,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,iBACF,gBAAgB,iBAChB,YAAY,gBACZ,YAAY,oBACZ,gBAAgB,UAChB,MAAM,EACN,GAAG,YACJ,GAAG;IACJ,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAEhE,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,iBAAiB;YAAC,QAAQ;QAAa;QACvC,OAAO;QACP,WAAW,AAAC,CAAA,oBAAoB,EAAC,IAAK,qCAAe,MAAM;kBAC1D,CAAC,aAAC,SAAS,cAAE,UAAU,EAAC;YACvB,qBACE;;kCACE,gBAAC,CAAA,GAAA,eAAO;wBACN,QAAQ;4BACN;gCAAC,CAAA,GAAA,yCAAY;gCAAG;6BAAK;4BACrB;gCAAC,CAAA,GAAA,yCAAa;gCAAG;6BAAK;yBACvB;kCACD,cAAA,iBAAC,CAAA,GAAA,yCAAK;4BAAE,QAAQ;;8CACd,gBAAC,CAAA,GAAA,yCAAa;oCAAE,MAAK;8CAAW,cAAA,gBAAC,CAAA,GAAA,wCAAc;;8CAC/C,gBAAC,CAAA,GAAA,wCAAc;8CACf,gBAAC,CAAA,GAAA,yCAAa;oCAAE,MAAK;8CAAO,cAAA,gBAAC,CAAA,GAAA,wCAAe;;;;;kCAGhD,gBAAC;wBACC,SAAS;kCAOR,MAAM,IAAI,CAAC;4BAAC,QAAQ;wBAAa,GAAG,GAAG,CAAC,CAAC,GAAG,kBAC3C,gBAAC,CAAA,GAAA,yCAAW;gCAAE,QAAQ;+BAAQ;;oBAGjC,2BACC,gBAAC,CAAA,GAAA,WAAG;wBAAE,MAAK;wBAAe,WAAW,CAAA,GAAA,yCAAa,EAAE;uCAAC;wCAAW;4BAAY,MAAM;wBAAG;kCAClF,gBAAgB,gBAAgB,MAAM,CAAC,6BAA6B;4BAAC,eAAe;wBAAC;;;;QAKhG;;AAGN","sources":["packages/@react-spectrum/s2/src/RangeCalendar.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 RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n ContextValue,\n DateValue,\n Provider,\n Text\n} from 'react-aria-components';\nimport {CalendarButton, CalendarGrid, CalendarHeading} from './Calendar';\nimport ChevronLeftIcon from '../s2wf-icons/S2_Icon_ChevronLeft_20_N.svg';\nimport ChevronRightIcon from '../s2wf-icons/S2_Icon_ChevronRight_20_N.svg';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {Header, HeaderContext, HeadingContext} from './';\nimport {helpTextStyles} from './Field';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {style} from '../style' with {type: 'macro'};\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\n\nexport interface RangeCalendarProps<T extends DateValue>\n extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'render' | 'children' | 'styles' | keyof GlobalDOMAttributes>,\n StyleProps {\n /**\n * The error message to display when the calendar is invalid.\n */\n errorMessage?: ReactNode,\n /**\n * The number of months to display at once.\n * @default 1\n */\n visibleMonths?: number\n}\n\nexport const RangeCalendarContext = createContext<ContextValue<Partial<RangeCalendarProps<any>>, HTMLDivElement>>(null);\n\n\nconst calendarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 24,\n width: 'fit'\n}, getAllowedOverrides());\n\nconst headerStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: 'full'\n});\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar<T extends DateValue>(props: RangeCalendarProps<T>, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, RangeCalendarContext);\n let {\n visibleMonths = 1,\n errorMessage,\n UNSAFE_style,\n UNSAFE_className,\n styles,\n ...otherProps\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n\n return (\n <AriaRangeCalendar\n {...otherProps}\n ref={ref}\n visibleDuration={{months: visibleMonths}}\n style={UNSAFE_style}\n className={(UNSAFE_className || '') + calendarStyles(null, styles)}>\n {({isInvalid, isDisabled}) => {\n return (\n <>\n <Provider\n values={[\n [HeaderContext, null],\n [HeadingContext, null]\n ]}>\n <Header styles={headerStyles}>\n <CalendarButton slot=\"previous\"><ChevronLeftIcon /></CalendarButton>\n <CalendarHeading />\n <CalendarButton slot=\"next\"><ChevronRightIcon /></CalendarButton>\n </Header>\n </Provider>\n <div\n className={style({\n display: 'flex',\n flexDirection: 'row',\n gap: 24,\n width: 'full',\n alignItems: 'start'\n })}>\n {Array.from({length: visibleMonths}).map((_, i) => (\n <CalendarGrid months={i} key={i} />\n ))}\n </div>\n {isInvalid && (\n <Text slot=\"errorMessage\" className={helpTextStyles({isInvalid, isDisabled, size: 'M'})}>\n {errorMessage || stringFormatter.format('calendar.invalidSelection', {selectedCount: 2})}\n </Text>\n )}\n </>\n );\n }}\n </AriaRangeCalendar>\n );\n});\n"],"names":[],"version":3,"file":"RangeCalendar.mjs.map"}
|