@react-spectrum/s2 0.5.0 → 0.6.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 +5 -8
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +5 -8
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +264 -0
- package/dist/ActionBar.cjs.map +1 -0
- package/dist/ActionBar.css +267 -0
- package/dist/ActionBar.css.map +1 -0
- package/dist/ActionBar.mjs +257 -0
- package/dist/ActionBar.mjs.map +1 -0
- package/dist/ActionButton.cjs +121 -147
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +133 -153
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +122 -148
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +6 -9
- package/dist/ActionButtonGroup.cjs.map +1 -1
- package/dist/ActionButtonGroup.css +3 -3
- package/dist/ActionButtonGroup.css.map +1 -1
- package/dist/ActionButtonGroup.mjs +6 -9
- package/dist/ActionButtonGroup.mjs.map +1 -1
- package/dist/ActionMenu.cjs +2 -5
- package/dist/ActionMenu.cjs.map +1 -1
- package/dist/ActionMenu.mjs +2 -5
- package/dist/ActionMenu.mjs.map +1 -1
- package/dist/AlertDialog.cjs +2 -5
- package/dist/AlertDialog.cjs.map +1 -1
- package/dist/AlertDialog.css.map +1 -1
- package/dist/AlertDialog.mjs +2 -5
- package/dist/AlertDialog.mjs.map +1 -1
- package/dist/Avatar.cjs +12 -15
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css +11 -11
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs +12 -15
- package/dist/Avatar.mjs.map +1 -1
- package/dist/AvatarGroup.cjs +99 -102
- package/dist/AvatarGroup.cjs.map +1 -1
- package/dist/AvatarGroup.css +31 -31
- package/dist/AvatarGroup.css.map +1 -1
- package/dist/AvatarGroup.mjs +99 -102
- package/dist/AvatarGroup.mjs.map +1 -1
- package/dist/Badge.cjs +99 -102
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +76 -76
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +99 -102
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +93 -94
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +70 -64
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +94 -95
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +305 -278
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +255 -182
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +307 -280
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +17 -20
- package/dist/ButtonGroup.cjs.map +1 -1
- package/dist/ButtonGroup.css +11 -11
- package/dist/ButtonGroup.css.map +1 -1
- package/dist/ButtonGroup.mjs +18 -21
- package/dist/ButtonGroup.mjs.map +1 -1
- package/dist/Card.cjs +167 -167
- package/dist/Card.css +121 -121
- package/dist/Card.mjs +167 -167
- package/dist/CardView.cjs +47 -21
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +39 -15
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +49 -23
- 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 +58 -62
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +54 -54
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +59 -63
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +43 -45
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +32 -32
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +44 -46
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs +7 -8
- package/dist/ClearButton.cjs.map +1 -1
- package/dist/ClearButton.css +5 -5
- package/dist/ClearButton.css.map +1 -1
- package/dist/ClearButton.mjs +7 -8
- package/dist/ClearButton.mjs.map +1 -1
- package/dist/CloseButton.cjs +40 -53
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +45 -49
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +40 -53
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +12 -15
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +10 -10
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +12 -15
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +31 -34
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +24 -24
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +32 -35
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +11 -11
- package/dist/ColorHandle.css +19 -19
- package/dist/ColorHandle.mjs +11 -11
- package/dist/ColorSlider.cjs +43 -46
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +43 -43
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +44 -47
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +8 -11
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +14 -14
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +9 -12
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +15 -18
- package/dist/ColorSwatchPicker.cjs.map +1 -1
- package/dist/ColorSwatchPicker.css +33 -33
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +15 -18
- package/dist/ColorSwatchPicker.mjs.map +1 -1
- package/dist/ColorWheel.cjs +18 -21
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +15 -15
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +18 -21
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +61 -61
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +52 -52
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +62 -62
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/Content.cjs +12 -19
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs +12 -19
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +7 -10
- package/dist/ContextualHelp.cjs.map +1 -1
- package/dist/ContextualHelp.css +23 -23
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +7 -10
- package/dist/ContextualHelp.mjs.map +1 -1
- package/dist/CustomDialog.cjs +10 -13
- package/dist/CustomDialog.cjs.map +1 -1
- package/dist/CustomDialog.css +9 -9
- package/dist/CustomDialog.css.map +1 -1
- package/dist/CustomDialog.mjs +10 -13
- package/dist/CustomDialog.mjs.map +1 -1
- package/dist/Dialog.cjs +12 -16
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css +39 -39
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +12 -16
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs +60 -69
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +49 -49
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +61 -70
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +15 -19
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +18 -18
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +15 -19
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +30 -33
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +26 -26
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +30 -33
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +133 -131
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +76 -84
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +133 -131
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +6 -9
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +3 -3
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +6 -9
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +7 -10
- package/dist/FullscreenDialog.cjs.map +1 -1
- package/dist/FullscreenDialog.css +54 -54
- package/dist/FullscreenDialog.css.map +1 -1
- package/dist/FullscreenDialog.mjs +7 -10
- package/dist/FullscreenDialog.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +128 -132
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css +58 -58
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs +128 -132
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs +12 -13
- package/dist/Image.cjs.map +1 -1
- package/dist/Image.css +11 -11
- package/dist/Image.css.map +1 -1
- package/dist/Image.mjs +13 -14
- package/dist/Image.mjs.map +1 -1
- package/dist/InlineAlert.cjs +75 -84
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +59 -63
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +76 -85
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +36 -39
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +42 -42
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +37 -40
- package/dist/Link.mjs.map +1 -1
- package/dist/Menu.cjs +322 -234
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +118 -116
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +323 -235
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +66 -70
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +69 -73
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +66 -70
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +36 -45
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css +48 -72
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs +37 -46
- package/dist/Modal.mjs.map +1 -1
- package/dist/NumberField.cjs +66 -69
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +70 -70
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +67 -70
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +122 -122
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +84 -84
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +123 -123
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +47 -69
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +55 -126
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +48 -70
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +85 -87
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +81 -85
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +85 -87
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +16 -18
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +16 -16
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +16 -18
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +5 -5
- package/dist/Provider.css +6 -6
- package/dist/Provider.mjs +5 -5
- package/dist/Radio.cjs +54 -58
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +50 -50
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +55 -59
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +39 -43
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +32 -32
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +40 -44
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeSlider.cjs +2 -3
- package/dist/RangeSlider.cjs.map +1 -1
- package/dist/RangeSlider.mjs +3 -4
- package/dist/RangeSlider.mjs.map +1 -1
- package/dist/SearchField.cjs +34 -37
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +30 -30
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +35 -38
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +67 -73
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +63 -63
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +68 -74
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +111 -112
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +87 -87
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +112 -113
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +28 -32
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css +26 -26
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs +28 -32
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs +56 -60
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +48 -48
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +57 -61
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +209 -196
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +95 -95
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +211 -198
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +59 -62
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +42 -42
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +59 -62
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs +122 -124
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +93 -93
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +122 -124
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +44 -55
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +33 -33
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +45 -56
- package/dist/TextField.mjs.map +1 -1
- package/dist/ToggleButton.cjs +6 -9
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +7 -7
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +6 -9
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs +2 -5
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs +2 -5
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +48 -48
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +55 -70
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +49 -49
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/ar-AE.cjs +10 -2
- package/dist/ar-AE.cjs.map +1 -1
- package/dist/ar-AE.mjs +10 -2
- package/dist/ar-AE.mjs.map +1 -1
- package/dist/bg-BG.cjs +11 -2
- package/dist/bg-BG.cjs.map +1 -1
- package/dist/bg-BG.mjs +11 -2
- package/dist/bg-BG.mjs.map +1 -1
- package/dist/cs-CZ.cjs +7 -2
- package/dist/cs-CZ.cjs.map +1 -1
- package/dist/cs-CZ.mjs +7 -2
- package/dist/cs-CZ.mjs.map +1 -1
- package/dist/da-DK.cjs +12 -4
- package/dist/da-DK.cjs.map +1 -1
- package/dist/da-DK.mjs +12 -4
- package/dist/da-DK.mjs.map +1 -1
- package/dist/de-DE.cjs +11 -2
- package/dist/de-DE.cjs.map +1 -1
- package/dist/de-DE.mjs +11 -2
- package/dist/de-DE.mjs.map +1 -1
- package/dist/el-GR.cjs +11 -2
- package/dist/el-GR.cjs.map +1 -1
- package/dist/el-GR.mjs +11 -2
- package/dist/el-GR.mjs.map +1 -1
- package/dist/en-US.cjs +8 -0
- package/dist/en-US.cjs.map +1 -1
- package/dist/en-US.mjs +8 -0
- package/dist/en-US.mjs.map +1 -1
- package/dist/es-ES.cjs +11 -2
- package/dist/es-ES.cjs.map +1 -1
- package/dist/es-ES.mjs +11 -2
- package/dist/es-ES.mjs.map +1 -1
- package/dist/et-EE.cjs +10 -2
- package/dist/et-EE.cjs.map +1 -1
- package/dist/et-EE.mjs +10 -2
- package/dist/et-EE.mjs.map +1 -1
- package/dist/fi-FI.cjs +10 -2
- package/dist/fi-FI.cjs.map +1 -1
- package/dist/fi-FI.mjs +10 -2
- package/dist/fi-FI.mjs.map +1 -1
- package/dist/fr-FR.cjs +11 -2
- package/dist/fr-FR.cjs.map +1 -1
- package/dist/fr-FR.mjs +11 -2
- package/dist/fr-FR.mjs.map +1 -1
- package/dist/he-IL.cjs +11 -2
- package/dist/he-IL.cjs.map +1 -1
- package/dist/he-IL.mjs +11 -2
- package/dist/he-IL.mjs.map +1 -1
- package/dist/hr-HR.cjs +7 -2
- package/dist/hr-HR.cjs.map +1 -1
- package/dist/hr-HR.mjs +7 -2
- package/dist/hr-HR.mjs.map +1 -1
- package/dist/hu-HU.cjs +10 -2
- package/dist/hu-HU.cjs.map +1 -1
- package/dist/hu-HU.mjs +10 -2
- package/dist/hu-HU.mjs.map +1 -1
- package/dist/it-IT.cjs +11 -2
- package/dist/it-IT.cjs.map +1 -1
- package/dist/it-IT.mjs +11 -2
- package/dist/it-IT.mjs.map +1 -1
- package/dist/ja-JP.cjs +10 -2
- package/dist/ja-JP.cjs.map +1 -1
- package/dist/ja-JP.mjs +10 -2
- package/dist/ja-JP.mjs.map +1 -1
- package/dist/ko-KR.cjs +12 -4
- package/dist/ko-KR.cjs.map +1 -1
- package/dist/ko-KR.mjs +12 -4
- package/dist/ko-KR.mjs.map +1 -1
- package/dist/lt-LT.cjs +9 -4
- package/dist/lt-LT.cjs.map +1 -1
- package/dist/lt-LT.mjs +9 -4
- package/dist/lt-LT.mjs.map +1 -1
- package/dist/lv-LV.cjs +11 -3
- package/dist/lv-LV.cjs.map +1 -1
- package/dist/lv-LV.mjs +11 -3
- package/dist/lv-LV.mjs.map +1 -1
- package/dist/main.cjs +4 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +3 -1
- package/dist/module.mjs.map +1 -1
- package/dist/nb-NO.cjs +9 -4
- package/dist/nb-NO.cjs.map +1 -1
- package/dist/nb-NO.mjs +9 -4
- package/dist/nb-NO.mjs.map +1 -1
- package/dist/nl-NL.cjs +10 -2
- package/dist/nl-NL.cjs.map +1 -1
- package/dist/nl-NL.mjs +10 -2
- package/dist/nl-NL.mjs.map +1 -1
- package/dist/pl-PL.cjs +8 -3
- package/dist/pl-PL.cjs.map +1 -1
- package/dist/pl-PL.mjs +8 -3
- package/dist/pl-PL.mjs.map +1 -1
- package/dist/pt-BR.cjs +11 -2
- package/dist/pt-BR.cjs.map +1 -1
- package/dist/pt-BR.mjs +11 -2
- package/dist/pt-BR.mjs.map +1 -1
- package/dist/pt-PT.cjs +11 -2
- package/dist/pt-PT.cjs.map +1 -1
- package/dist/pt-PT.mjs +11 -2
- package/dist/pt-PT.mjs.map +1 -1
- package/dist/ro-RO.cjs +12 -3
- package/dist/ro-RO.cjs.map +1 -1
- package/dist/ro-RO.mjs +12 -3
- package/dist/ro-RO.mjs.map +1 -1
- package/dist/ru-RU.cjs +7 -2
- package/dist/ru-RU.cjs.map +1 -1
- package/dist/ru-RU.mjs +7 -2
- package/dist/ru-RU.mjs.map +1 -1
- package/dist/sk-SK.cjs +7 -2
- package/dist/sk-SK.cjs.map +1 -1
- package/dist/sk-SK.mjs +7 -2
- package/dist/sk-SK.mjs.map +1 -1
- package/dist/sl-SI.cjs +7 -2
- package/dist/sl-SI.cjs.map +1 -1
- package/dist/sl-SI.mjs +7 -2
- package/dist/sl-SI.mjs.map +1 -1
- package/dist/sr-SP.cjs +7 -2
- package/dist/sr-SP.cjs.map +1 -1
- package/dist/sr-SP.mjs +7 -2
- package/dist/sr-SP.mjs.map +1 -1
- package/dist/sv-SE.cjs +11 -2
- package/dist/sv-SE.cjs.map +1 -1
- package/dist/sv-SE.mjs +11 -2
- package/dist/sv-SE.mjs.map +1 -1
- package/dist/tr-TR.cjs +10 -2
- package/dist/tr-TR.cjs.map +1 -1
- package/dist/tr-TR.mjs +10 -2
- package/dist/tr-TR.mjs.map +1 -1
- package/dist/types.d.ts +109 -89
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.cjs +7 -2
- package/dist/uk-UA.cjs.map +1 -1
- package/dist/uk-UA.mjs +7 -2
- package/dist/uk-UA.mjs.map +1 -1
- package/dist/zh-CN.cjs +10 -2
- package/dist/zh-CN.cjs.map +1 -1
- package/dist/zh-CN.mjs +10 -2
- package/dist/zh-CN.mjs.map +1 -1
- package/dist/zh-TW.cjs +10 -2
- package/dist/zh-TW.cjs.map +1 -1
- package/dist/zh-TW.mjs +10 -2
- package/dist/zh-TW.mjs.map +1 -1
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +5 -5
- package/icons/Skeleton.mjs +2 -2
- package/package.json +20 -21
- package/src/Accordion.tsx +5 -8
- package/src/ActionBar.tsx +229 -0
- package/src/ActionButton.tsx +25 -52
- package/src/ActionButtonGroup.tsx +9 -11
- package/src/ActionMenu.tsx +5 -8
- package/src/AlertDialog.tsx +5 -8
- package/src/Avatar.tsx +5 -8
- package/src/AvatarGroup.tsx +5 -8
- package/src/Badge.tsx +5 -8
- package/src/Breadcrumbs.tsx +6 -12
- package/src/Button.tsx +197 -154
- package/src/ButtonGroup.tsx +5 -8
- package/src/CardView.tsx +37 -12
- package/src/Checkbox.tsx +6 -9
- package/src/CheckboxGroup.tsx +6 -9
- package/src/ClearButton.tsx +2 -5
- package/src/CloseButton.tsx +21 -31
- package/src/ColorArea.tsx +5 -8
- package/src/ColorField.tsx +5 -8
- package/src/ColorSlider.tsx +5 -8
- package/src/ColorSwatch.tsx +5 -8
- package/src/ColorSwatchPicker.tsx +5 -8
- package/src/ColorWheel.tsx +5 -8
- package/src/ComboBox.tsx +7 -9
- package/src/Content.tsx +12 -30
- package/src/ContextualHelp.tsx +5 -8
- package/src/CustomDialog.tsx +5 -8
- package/src/Dialog.tsx +6 -9
- package/src/Disclosure.tsx +15 -24
- package/src/Divider.tsx +16 -25
- package/src/DropZone.tsx +5 -8
- package/src/Field.tsx +25 -32
- package/src/Form.tsx +5 -8
- package/src/FullscreenDialog.tsx +5 -8
- package/src/IllustratedMessage.tsx +6 -9
- package/src/Image.tsx +3 -6
- package/src/InlineAlert.tsx +6 -10
- package/src/Link.tsx +13 -21
- package/src/Menu.tsx +69 -33
- package/src/Meter.tsx +13 -23
- package/src/Modal.tsx +22 -52
- package/src/NumberField.tsx +5 -8
- package/src/Picker.tsx +7 -9
- package/src/Popover.tsx +30 -104
- package/src/ProgressBar.tsx +14 -24
- package/src/ProgressCircle.tsx +18 -24
- package/src/Radio.tsx +6 -9
- package/src/RadioGroup.tsx +6 -9
- package/src/RangeSlider.tsx +2 -5
- package/src/SearchField.tsx +5 -8
- package/src/SegmentedControl.tsx +10 -16
- package/src/Slider.tsx +2 -5
- package/src/StatusLight.tsx +6 -9
- package/src/Switch.tsx +6 -9
- package/src/TableView.tsx +53 -50
- package/src/Tabs.tsx +5 -8
- package/src/TagGroup.tsx +7 -14
- package/src/TextField.tsx +20 -28
- package/src/ToggleButton.tsx +7 -9
- package/src/ToggleButtonGroup.tsx +5 -8
- package/src/Tooltip.tsx +30 -51
- package/src/bar-utils.ts +3 -10
- package/src/index.ts +2 -0
- package/src/style-utils.ts +15 -8
- package/style/dist/main.cjs +1 -0
- package/style/dist/main.cjs.map +1 -1
- package/style/dist/module.mjs +2 -2
- package/style/dist/module.mjs.map +1 -1
- package/style/dist/spectrum-theme.cjs +72 -5
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +72 -6
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/style-macro.cjs +13 -1
- package/style/dist/style-macro.cjs.map +1 -1
- package/style/dist/style-macro.mjs +13 -1
- package/style/dist/style-macro.mjs.map +1 -1
- package/style/dist/types.d.ts +50 -29
- package/style/dist/types.d.ts.map +1 -1
- package/style/index.ts +1 -1
- package/style/spectrum-theme.ts +72 -7
- package/style/style-macro.ts +20 -4
- package/style/tokens.ts +30 -0
- package/style/types.ts +1 -1
package/dist/RadioGroup.cjs
CHANGED
|
@@ -32,7 +32,7 @@ $parcel$export(module.exports, "RadioGroup", () => $10d624be839a1d01$export$a98f
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
const $10d624be839a1d01$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $ijW5U$react.createContext)(null);
|
|
35
|
-
|
|
35
|
+
const $10d624be839a1d01$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $ijW5U$react.forwardRef)(function RadioGroup(props, ref) {
|
|
36
36
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $10d624be839a1d01$export$a79eda4ff50e30b6);
|
|
37
37
|
let formContext = (0, $ijW5U$react.useContext)((0, $bfa4962d90c8af48$exports.FormContext));
|
|
38
38
|
props = (0, $bfa4962d90c8af48$exports.useFormProps)(props);
|
|
@@ -44,51 +44,51 @@ function $10d624be839a1d01$var$RadioGroup(props, ref) {
|
|
|
44
44
|
style: UNSAFE_style,
|
|
45
45
|
className: UNSAFE_className + function anonymous(props, overrides) {
|
|
46
46
|
let rules = " .";
|
|
47
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|
|
|
47
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r)[^\s]+/g) || [];
|
|
48
48
|
rules += matches.join('');
|
|
49
|
-
let $__a = false;
|
|
50
49
|
let $__b = false;
|
|
50
|
+
let $__c = false;
|
|
51
51
|
for (let p of matches){
|
|
52
|
-
if (/^\s*__a/.test(p)) $__a = true;
|
|
53
52
|
if (/^\s*__b/.test(p)) $__b = true;
|
|
53
|
+
if (/^\s*__c/.test(p)) $__c = true;
|
|
54
54
|
}
|
|
55
|
-
rules += '
|
|
56
|
-
if (!$__a) {
|
|
57
|
-
if (props.isInForm) rules += ' __a-3t1y';
|
|
58
|
-
}
|
|
55
|
+
rules += ' _0f';
|
|
59
56
|
if (!$__b) {
|
|
57
|
+
if (props.isInForm) rules += ' __b-3t1y';
|
|
58
|
+
}
|
|
59
|
+
if (!$__c) {
|
|
60
60
|
if (props.isInForm) {
|
|
61
|
-
if (props.labelPosition === "side") rules += '
|
|
61
|
+
if (props.labelPosition === "side") rules += ' __c-yqnebx';
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
if (props.isInForm) rules += '
|
|
64
|
+
if (props.isInForm) rules += ' __i-1a97rzt';
|
|
65
65
|
else {
|
|
66
|
-
if (props.labelPosition === "side") rules += '
|
|
67
|
-
else if (props.labelPosition === "top") rules += '
|
|
66
|
+
if (props.labelPosition === "side") rules += ' __i-ar5vcf';
|
|
67
|
+
else if (props.labelPosition === "top") rules += ' __i-2wzs0i';
|
|
68
68
|
}
|
|
69
|
-
if (props.labelPosition === "side") rules += '
|
|
70
|
-
else if (props.labelPosition === "top") rules += '
|
|
71
|
-
if (props.labelPosition === "side") rules += '
|
|
72
|
-
else if (props.labelPosition === "top") rules += '
|
|
69
|
+
if (props.labelPosition === "side") rules += ' __j-ar5vcf';
|
|
70
|
+
else if (props.labelPosition === "top") rules += ' __j-1a6w430';
|
|
71
|
+
if (props.labelPosition === "side") rules += ' __k-18h2yqz';
|
|
72
|
+
else if (props.labelPosition === "top") rules += ' __k-1srn173';
|
|
73
73
|
if (props.size === "XL") {
|
|
74
|
-
rules += '
|
|
75
|
-
rules += '
|
|
74
|
+
rules += ' _ebj';
|
|
75
|
+
rules += ' _ei';
|
|
76
76
|
} else if (props.size === "L") {
|
|
77
|
-
rules += '
|
|
78
|
-
rules += '
|
|
77
|
+
rules += ' _ebh';
|
|
78
|
+
rules += ' _eg';
|
|
79
79
|
} else if (props.size === "S") {
|
|
80
|
-
rules += '
|
|
81
|
-
rules += '
|
|
80
|
+
rules += ' _ebd';
|
|
81
|
+
rules += ' _ec';
|
|
82
82
|
} else if (props.size === "XS") {
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
83
|
+
rules += ' _ebb';
|
|
84
|
+
rules += ' _ea';
|
|
85
85
|
} else {
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
86
|
+
rules += ' _ebf';
|
|
87
|
+
rules += ' _ee';
|
|
88
88
|
}
|
|
89
|
-
rules += '
|
|
90
|
-
rules += '
|
|
91
|
-
rules += '
|
|
89
|
+
rules += ' _2d';
|
|
90
|
+
rules += ' _g-1x99dlob';
|
|
91
|
+
rules += ' _ga';
|
|
92
92
|
if (props.size === "XL") rules += ' -aqrvqh_k-j';
|
|
93
93
|
else if (props.size === "L") rules += ' -aqrvqh_k-i';
|
|
94
94
|
else if (props.size === "S") rules += ' -aqrvqh_k-h';
|
|
@@ -96,7 +96,7 @@ function $10d624be839a1d01$var$RadioGroup(props, ref) {
|
|
|
96
96
|
else rules += ' -aqrvqh_k-f';
|
|
97
97
|
rules += ' -_1inj1bc_i--vfy389';
|
|
98
98
|
rules += ' je';
|
|
99
|
-
rules += '
|
|
99
|
+
rules += ' __S-yksgrp';
|
|
100
100
|
return rules;
|
|
101
101
|
}({
|
|
102
102
|
size: size,
|
|
@@ -118,14 +118,14 @@ function $10d624be839a1d01$var$RadioGroup(props, ref) {
|
|
|
118
118
|
/*#__PURE__*/ (0, $ijW5U$reactjsxruntime.jsx)("div", {
|
|
119
119
|
className: function anonymous(props) {
|
|
120
120
|
let rules = " .";
|
|
121
|
-
rules += '
|
|
122
|
-
rules += '
|
|
123
|
-
rules += '
|
|
124
|
-
rules += '
|
|
125
|
-
rules += '
|
|
126
|
-
if (props.orientation === "horizontal") rules += '
|
|
127
|
-
else if (props.orientation === "vertical") rules += '
|
|
128
|
-
rules += '
|
|
121
|
+
rules += ' __b-g2ozi1';
|
|
122
|
+
rules += ' __c-g2ozi1';
|
|
123
|
+
rules += ' __d-g2ozi1';
|
|
124
|
+
rules += ' __e-g2ozi1';
|
|
125
|
+
rules += ' _0d';
|
|
126
|
+
if (props.orientation === "horizontal") rules += ' _7a';
|
|
127
|
+
else if (props.orientation === "vertical") rules += ' _7b';
|
|
128
|
+
rules += ' _8a';
|
|
129
129
|
rules += ' jf';
|
|
130
130
|
rules += ' i-1inj1bc';
|
|
131
131
|
return rules;
|
|
@@ -152,11 +152,7 @@ function $10d624be839a1d01$var$RadioGroup(props, ref) {
|
|
|
152
152
|
]
|
|
153
153
|
})
|
|
154
154
|
});
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
|
158
|
-
* All possible options are exposed up front for users to compare.
|
|
159
|
-
*/ let $10d624be839a1d01$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $ijW5U$react.forwardRef)($10d624be839a1d01$var$RadioGroup);
|
|
155
|
+
});
|
|
160
156
|
|
|
161
157
|
|
|
162
158
|
//# sourceMappingURL=RadioGroup.cjs.map
|
package/dist/RadioGroup.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAuCM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,E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C7D;;;kCAGL,gCAAC,CAAA,GAAA,kCAAO;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, 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'>, 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<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\n return (\n <AriaRadioGroup\n {...groupProps}\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.cjs.map"}
|
package/dist/RadioGroup.css
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._0f {
|
|
3
3
|
display: grid;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.__b-3t1y {
|
|
7
7
|
grid-column-start: 1;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.__c-yqnebx {
|
|
11
11
|
grid-column-end: span 2;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.__i-2wzs0i {
|
|
15
15
|
grid-template-columns: 1fr;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.__i-ar5vcf {
|
|
19
19
|
grid-template-columns: auto 1fr;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.__i-1a97rzt {
|
|
23
23
|
grid-template-columns: subgrid;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.__j-1a6w430 {
|
|
27
27
|
grid-template-rows: auto 1fr auto;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.__j-ar5vcf {
|
|
31
31
|
grid-template-rows: auto 1fr;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.__k-1srn173 {
|
|
35
35
|
grid-template-areas: "label"
|
|
36
36
|
"input"
|
|
37
37
|
"helptext";
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.__k-18h2yqz {
|
|
41
41
|
grid-template-areas: "label input"
|
|
42
42
|
"label helptext";
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
45
|
+
._ee {
|
|
46
46
|
font-size: .875rem;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
._ea {
|
|
50
50
|
font-size: .6875rem;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
._ec {
|
|
54
54
|
font-size: .75rem;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
.
|
|
57
|
+
._eg {
|
|
58
58
|
font-size: 1rem;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.
|
|
61
|
+
._ei {
|
|
62
62
|
font-size: 1.125rem;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
._2d {
|
|
66
66
|
align-items: baseline;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
._ga {
|
|
70
70
|
line-height: 1.3;
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -98,39 +98,39 @@
|
|
|
98
98
|
column-gap: .75rem;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
.__S-yksgrp {
|
|
102
102
|
-webkit-tap-highlight-color: #0000;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
.
|
|
105
|
+
.__b-g2ozi1 {
|
|
106
106
|
grid-column-start: input;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.__c-g2ozi1 {
|
|
110
110
|
grid-column-end: input;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.__d-g2ozi1 {
|
|
114
114
|
grid-row-start: input;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
.__e-g2ozi1 {
|
|
118
118
|
grid-row-end: input;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.
|
|
121
|
+
._0d {
|
|
122
122
|
display: flex;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
._7b {
|
|
126
126
|
flex-direction: column;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
.
|
|
129
|
+
._7a {
|
|
130
130
|
flex-direction: row;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.
|
|
133
|
+
._8a {
|
|
134
134
|
flex-wrap: wrap;
|
|
135
135
|
}
|
|
136
136
|
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
@layer _.b {
|
|
147
|
-
.
|
|
147
|
+
._g-1x99dlob:is(:lang(ja), :lang(ko), :lang(zh), :lang(zh-Hant), :lang(zh-Hans)) {
|
|
148
148
|
line-height: 1.5;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -153,23 +153,23 @@
|
|
|
153
153
|
|
|
154
154
|
@layer _.b.b {
|
|
155
155
|
@media not ((hover: hover) and (pointer: fine)) {
|
|
156
|
-
.
|
|
156
|
+
._ebf {
|
|
157
157
|
font-size: 1.0625rem;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.
|
|
160
|
+
._ebb {
|
|
161
161
|
font-size: .8125rem;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.
|
|
164
|
+
._ebd {
|
|
165
165
|
font-size: .9375rem;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.
|
|
168
|
+
._ebh {
|
|
169
169
|
font-size: 1.1875rem;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
.
|
|
172
|
+
._ebj {
|
|
173
173
|
font-size: 1.375rem;
|
|
174
174
|
}
|
|
175
175
|
}
|
package/dist/RadioGroup.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
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;;;;EAyBb;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAzBa;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAyBb","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, 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'>, 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<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\n return (\n <AriaRadioGroup\n {...groupProps}\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
|
@@ -4,7 +4,7 @@ import {FormContext as $9b916426527cebe7$export$c24727297075ec6a, useFormProps a
|
|
|
4
4
|
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
|
|
5
5
|
import {jsx as $fZVHt$jsx, jsxs as $fZVHt$jsxs, Fragment as $fZVHt$Fragment} from "react/jsx-runtime";
|
|
6
6
|
import {RadioGroup as $fZVHt$RadioGroup} from "react-aria-components";
|
|
7
|
-
import {createContext as $fZVHt$createContext,
|
|
7
|
+
import {createContext as $fZVHt$createContext, forwardRef as $fZVHt$forwardRef, useContext as $fZVHt$useContext} from "react";
|
|
8
8
|
import {useDOMRef as $fZVHt$useDOMRef} from "@react-spectrum/utils";
|
|
9
9
|
|
|
10
10
|
/*
|
|
@@ -25,7 +25,7 @@ import {useDOMRef as $fZVHt$useDOMRef} from "@react-spectrum/utils";
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
const $9a2afae66771094f$export$a79eda4ff50e30b6 = /*#__PURE__*/ (0, $fZVHt$createContext)(null);
|
|
28
|
-
|
|
28
|
+
const $9a2afae66771094f$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $fZVHt$forwardRef)(function RadioGroup(props, ref) {
|
|
29
29
|
[props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $9a2afae66771094f$export$a79eda4ff50e30b6);
|
|
30
30
|
let formContext = (0, $fZVHt$useContext)((0, $9b916426527cebe7$export$c24727297075ec6a));
|
|
31
31
|
props = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props);
|
|
@@ -37,51 +37,51 @@ function $9a2afae66771094f$var$RadioGroup(props, ref) {
|
|
|
37
37
|
style: UNSAFE_style,
|
|
38
38
|
className: UNSAFE_className + function anonymous(props, overrides) {
|
|
39
39
|
let rules = " .";
|
|
40
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|
|
|
40
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r)[^\s]+/g) || [];
|
|
41
41
|
rules += matches.join('');
|
|
42
|
-
let $__a = false;
|
|
43
42
|
let $__b = false;
|
|
43
|
+
let $__c = false;
|
|
44
44
|
for (let p of matches){
|
|
45
|
-
if (/^\s*__a/.test(p)) $__a = true;
|
|
46
45
|
if (/^\s*__b/.test(p)) $__b = true;
|
|
46
|
+
if (/^\s*__c/.test(p)) $__c = true;
|
|
47
47
|
}
|
|
48
|
-
rules += '
|
|
49
|
-
if (!$__a) {
|
|
50
|
-
if (props.isInForm) rules += ' __a-3t1y';
|
|
51
|
-
}
|
|
48
|
+
rules += ' _0f';
|
|
52
49
|
if (!$__b) {
|
|
50
|
+
if (props.isInForm) rules += ' __b-3t1y';
|
|
51
|
+
}
|
|
52
|
+
if (!$__c) {
|
|
53
53
|
if (props.isInForm) {
|
|
54
|
-
if (props.labelPosition === "side") rules += '
|
|
54
|
+
if (props.labelPosition === "side") rules += ' __c-yqnebx';
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
if (props.isInForm) rules += '
|
|
57
|
+
if (props.isInForm) rules += ' __i-1a97rzt';
|
|
58
58
|
else {
|
|
59
|
-
if (props.labelPosition === "side") rules += '
|
|
60
|
-
else if (props.labelPosition === "top") rules += '
|
|
59
|
+
if (props.labelPosition === "side") rules += ' __i-ar5vcf';
|
|
60
|
+
else if (props.labelPosition === "top") rules += ' __i-2wzs0i';
|
|
61
61
|
}
|
|
62
|
-
if (props.labelPosition === "side") rules += '
|
|
63
|
-
else if (props.labelPosition === "top") rules += '
|
|
64
|
-
if (props.labelPosition === "side") rules += '
|
|
65
|
-
else if (props.labelPosition === "top") rules += '
|
|
62
|
+
if (props.labelPosition === "side") rules += ' __j-ar5vcf';
|
|
63
|
+
else if (props.labelPosition === "top") rules += ' __j-1a6w430';
|
|
64
|
+
if (props.labelPosition === "side") rules += ' __k-18h2yqz';
|
|
65
|
+
else if (props.labelPosition === "top") rules += ' __k-1srn173';
|
|
66
66
|
if (props.size === "XL") {
|
|
67
|
-
rules += '
|
|
68
|
-
rules += '
|
|
67
|
+
rules += ' _ebj';
|
|
68
|
+
rules += ' _ei';
|
|
69
69
|
} else if (props.size === "L") {
|
|
70
|
-
rules += '
|
|
71
|
-
rules += '
|
|
70
|
+
rules += ' _ebh';
|
|
71
|
+
rules += ' _eg';
|
|
72
72
|
} else if (props.size === "S") {
|
|
73
|
-
rules += '
|
|
74
|
-
rules += '
|
|
73
|
+
rules += ' _ebd';
|
|
74
|
+
rules += ' _ec';
|
|
75
75
|
} else if (props.size === "XS") {
|
|
76
|
-
rules += '
|
|
77
|
-
rules += '
|
|
76
|
+
rules += ' _ebb';
|
|
77
|
+
rules += ' _ea';
|
|
78
78
|
} else {
|
|
79
|
-
rules += '
|
|
80
|
-
rules += '
|
|
79
|
+
rules += ' _ebf';
|
|
80
|
+
rules += ' _ee';
|
|
81
81
|
}
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
82
|
+
rules += ' _2d';
|
|
83
|
+
rules += ' _g-1x99dlob';
|
|
84
|
+
rules += ' _ga';
|
|
85
85
|
if (props.size === "XL") rules += ' -aqrvqh_k-j';
|
|
86
86
|
else if (props.size === "L") rules += ' -aqrvqh_k-i';
|
|
87
87
|
else if (props.size === "S") rules += ' -aqrvqh_k-h';
|
|
@@ -89,7 +89,7 @@ function $9a2afae66771094f$var$RadioGroup(props, ref) {
|
|
|
89
89
|
else rules += ' -aqrvqh_k-f';
|
|
90
90
|
rules += ' -_1inj1bc_i--vfy389';
|
|
91
91
|
rules += ' je';
|
|
92
|
-
rules += '
|
|
92
|
+
rules += ' __S-yksgrp';
|
|
93
93
|
return rules;
|
|
94
94
|
}({
|
|
95
95
|
size: size,
|
|
@@ -111,14 +111,14 @@ function $9a2afae66771094f$var$RadioGroup(props, ref) {
|
|
|
111
111
|
/*#__PURE__*/ (0, $fZVHt$jsx)("div", {
|
|
112
112
|
className: function anonymous(props) {
|
|
113
113
|
let rules = " .";
|
|
114
|
-
rules += '
|
|
115
|
-
rules += '
|
|
116
|
-
rules += '
|
|
117
|
-
rules += '
|
|
118
|
-
rules += '
|
|
119
|
-
if (props.orientation === "horizontal") rules += '
|
|
120
|
-
else if (props.orientation === "vertical") rules += '
|
|
121
|
-
rules += '
|
|
114
|
+
rules += ' __b-g2ozi1';
|
|
115
|
+
rules += ' __c-g2ozi1';
|
|
116
|
+
rules += ' __d-g2ozi1';
|
|
117
|
+
rules += ' __e-g2ozi1';
|
|
118
|
+
rules += ' _0d';
|
|
119
|
+
if (props.orientation === "horizontal") rules += ' _7a';
|
|
120
|
+
else if (props.orientation === "vertical") rules += ' _7b';
|
|
121
|
+
rules += ' _8a';
|
|
122
122
|
rules += ' jf';
|
|
123
123
|
rules += ' i-1inj1bc';
|
|
124
124
|
return rules;
|
|
@@ -145,11 +145,7 @@ function $9a2afae66771094f$var$RadioGroup(props, ref) {
|
|
|
145
145
|
]
|
|
146
146
|
})
|
|
147
147
|
});
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Radio groups allow users to select a single option from a list of mutually exclusive options.
|
|
151
|
-
* All possible options are exposed up front for users to compare.
|
|
152
|
-
*/ let $9a2afae66771094f$export$a98f0dcb43a68a25 = /*#__PURE__*/ (0, $fZVHt$forwardRef)($9a2afae66771094f$var$RadioGroup);
|
|
148
|
+
});
|
|
153
149
|
|
|
154
150
|
|
|
155
151
|
export {$9a2afae66771094f$export$a79eda4ff50e30b6 as RadioGroupContext, $9a2afae66771094f$export$a98f0dcb43a68a25 as RadioGroup};
|
package/dist/RadioGroup.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;AAAA;;;;;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C,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, 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'>, 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<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\n return (\n <AriaRadioGroup\n {...groupProps}\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/RangeSlider.cjs
CHANGED
|
@@ -41,7 +41,7 @@ $parcel$export(module.exports, "RangeSlider", () => $bf1a51351cead47b$export$826
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
const $bf1a51351cead47b$export$9e0b46d8c4f4c18f = /*#__PURE__*/ (0, $lbQ1p$react.createContext)(null);
|
|
44
|
-
|
|
44
|
+
const $bf1a51351cead47b$export$826424dabc3dd705 = /*#__PURE__*/ (0, $lbQ1p$react.forwardRef)(function RangeSlider(props, ref) {
|
|
45
45
|
let stringFormatter = (0, $lbQ1p$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
|
|
46
46
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $bf1a51351cead47b$export$9e0b46d8c4f4c18f);
|
|
47
47
|
let formContext = (0, $lbQ1p$react.useContext)((0, $bfa4962d90c8af48$exports.FormContext));
|
|
@@ -155,8 +155,7 @@ function $bf1a51351cead47b$var$RangeSlider(props, ref) {
|
|
|
155
155
|
})
|
|
156
156
|
})
|
|
157
157
|
});
|
|
158
|
-
}
|
|
159
|
-
let $bf1a51351cead47b$export$826424dabc3dd705 = /*#__PURE__*/ (0, $lbQ1p$react.forwardRef)($bf1a51351cead47b$var$RangeSlider);
|
|
158
|
+
});
|
|
160
159
|
|
|
161
160
|
|
|
162
161
|
//# sourceMappingURL=RangeSlider.cjs.map
|
package/dist/RangeSlider.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA6BM,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAqE;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AA6BM,MAAM,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AAM,CAAC;4BACnC,KAAK;4BACL,OAAO,CAAC,cAAgB,CAAA,GAAA,oCAAS,EAAE,eAAe;oCAChD,WAAW;gCACb,GAAG;oCAAC,GAAG,WAAW;oCAAE,WAAW,YAAY,UAAU;gCAAA;sCACpD,CAAC,4BACA,gCAAC;oCAAI,WAAW,CAAA,GAAA,sCAAW,EAAE;8CAAC;oCAAI;8CAChC,cAAA,gCAAC;wCACC,WAAW,CAAA,GAAA,+BAAI,EAAE;4CACf,GAAG,WAAW;kDACd;wDACA;wCACF;;;;;;;;AASpB","sources":["packages/@react-spectrum/s2/src/RangeSlider.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 ContextValue,\n SliderThumb,\n SliderTrack\n} from 'react-aria-components';\nimport {createContext, forwardRef, useContext, useRef} from 'react';\nimport {filledTrack, SliderBase, SliderBaseProps, thumb, thumbContainer, thumbHitArea, track, upperTrack} from './Slider';\nimport {FocusableRef, FocusableRefValue, RangeValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocale, useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface RangeSliderProps extends Omit<SliderBaseProps<RangeValue<number>>, 'children'> {\n /**\n * The name of the start input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).\n */\n startName?: string,\n /**\n * The name of the end input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname).\n */\n endName?: string\n}\n\nexport const RangeSliderContext = createContext<ContextValue<RangeSliderProps, FocusableRefValue<HTMLDivElement>>>(null);\n\nexport const RangeSlider = /*#__PURE__*/ forwardRef(function RangeSlider(props: RangeSliderProps, ref: FocusableRef<HTMLDivElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, RangeSliderContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n labelPosition = 'top',\n size = 'M',\n isEmphasized,\n trackStyle = 'thin',\n thumbStyle = 'default'\n } = props;\n let lowerThumbRef = useRef(null);\n let upperThumbRef = useRef(null);\n let inputRef = useRef(null); // TODO: need to pass inputRef to SliderThumb when we release the next version of RAC 1.3.0\n let domRef = useFocusableRef(ref, inputRef);\n\n let {direction} = useLocale();\n let cssDirection = direction === 'rtl' ? 'right' : 'left';\n\n return (\n <SliderBase\n {...props}\n value={props.value ? [props.value.start, props.value.end] : undefined}\n defaultValue={props.defaultValue ? [props.defaultValue.start, props.defaultValue.end] : [props.minValue ?? 0, props.maxValue ?? 100]}\n onChange={v => props.onChange?.({start: v[0], end: v[1]})}\n onChangeEnd={v => props.onChangeEnd?.({start: v[0], end: v[1]})}\n sliderRef={domRef}>\n <SliderTrack\n className={track({size, labelPosition, isInForm: !!formContext})}>\n {({state, isDisabled}) => (\n <>\n <div className={upperTrack({isDisabled, trackStyle})} />\n <div\n style={{\n width: `${Math.abs(state.getThumbPercent(0) - state.getThumbPercent(1)) * 100}%`,\n [cssDirection]: `${state.getThumbPercent(0) * 100}%`\n }}\n className={filledTrack({isDisabled, isEmphasized, trackStyle})} />\n <SliderThumb\n className={thumbContainer}\n index={0}\n name={props.startName}\n aria-label={stringFormatter.format('slider.minimum')}\n ref={lowerThumbRef}\n style={(renderProps) => pressScale(lowerThumbRef, {\n transform: 'translate(-50%, -50%)',\n zIndex: state.getThumbPercent(0) === 1 ? 1 : undefined\n })({...renderProps, isPressed: renderProps.isDragging})}>\n {(renderProps) => (\n <div className={thumbHitArea({size})}>\n <div\n className={thumb({\n ...renderProps,\n size,\n thumbStyle\n })} />\n </div>\n )}\n </SliderThumb>\n <SliderThumb\n className={thumbContainer}\n index={1}\n name={props.endName}\n aria-label={stringFormatter.format('slider.maximum')}\n ref={upperThumbRef}\n style={(renderProps) => pressScale(upperThumbRef, {\n transform: 'translate(-50%, -50%)'\n })({...renderProps, isPressed: renderProps.isDragging})}>\n {(renderProps) => (\n <div className={thumbHitArea({size})}>\n <div\n className={thumb({\n ...renderProps,\n size,\n thumbStyle\n })} />\n </div>\n )}\n </SliderThumb>\n </>\n )}\n </SliderTrack>\n </SliderBase>\n );\n});\n"],"names":[],"version":3,"file":"RangeSlider.cjs.map"}
|