@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/ActionButton.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {useFormProps as $9b916426527cebe7$export$a6b5be5c6b451665} from "./Form.
|
|
|
10
10
|
import {useSpectrumContextProps as $5ce63c423902f47d$export$764f6146fadd77f7} from "../icons/useSpectrumContextProps.mjs";
|
|
11
11
|
import {jsx as $hl1Zj$jsx} from "react/jsx-runtime";
|
|
12
12
|
import {OverlayTriggerStateContext as $hl1Zj$OverlayTriggerStateContext, useSlottedContext as $hl1Zj$useSlottedContext, Button as $hl1Zj$Button, Provider as $hl1Zj$Provider} from "react-aria-components";
|
|
13
|
-
import {createContext as $hl1Zj$createContext,
|
|
13
|
+
import {createContext as $hl1Zj$createContext, forwardRef as $hl1Zj$forwardRef, useContext as $hl1Zj$useContext} from "react";
|
|
14
14
|
import {useFocusableRef as $hl1Zj$useFocusableRef} from "@react-spectrum/utils";
|
|
15
15
|
|
|
16
16
|
/*
|
|
@@ -40,90 +40,82 @@ import {useFocusableRef as $hl1Zj$useFocusableRef} from "@react-spectrum/utils";
|
|
|
40
40
|
const $da878a05ab4a403e$var$iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';
|
|
41
41
|
const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, overrides) {
|
|
42
42
|
let rules = " .";
|
|
43
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|
|
|
43
|
+
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) || [];
|
|
44
44
|
rules += matches.join('');
|
|
45
|
-
let $_8 = false;
|
|
46
45
|
let $_9 = false;
|
|
46
|
+
let $__a = false;
|
|
47
47
|
let $h = false;
|
|
48
48
|
let $q = false;
|
|
49
|
-
let $
|
|
49
|
+
let $__R = false;
|
|
50
50
|
for (let p of matches){
|
|
51
|
-
if (/^\s*_8/.test(p)) $_8 = true;
|
|
52
51
|
if (/^\s*_9/.test(p)) $_9 = true;
|
|
52
|
+
if (/^\s*__a/.test(p)) $__a = true;
|
|
53
53
|
if (/^\s*h/.test(p)) $h = true;
|
|
54
54
|
if (/^\s*q/.test(p)) $q = true;
|
|
55
|
-
if (/^\s*
|
|
55
|
+
if (/^\s*__R/.test(p)) $__R = true;
|
|
56
56
|
}
|
|
57
|
-
if (props.isFocusVisible) rules += '
|
|
58
|
-
else rules += '
|
|
59
|
-
rules += '
|
|
60
|
-
if (props.
|
|
61
|
-
else if (props.staticColor === "white") rules += ' dc';
|
|
57
|
+
if (props.isFocusVisible) rules += ' _Mb';
|
|
58
|
+
else rules += ' _Ma';
|
|
59
|
+
rules += ' da_____M';
|
|
60
|
+
if (props.isStaticColor) rules += ' d_____G';
|
|
62
61
|
else rules += ' dx';
|
|
63
|
-
rules += '
|
|
64
|
-
rules += '
|
|
65
|
-
rules += '
|
|
66
|
-
rules += '
|
|
67
|
-
rules += '
|
|
62
|
+
rules += ' _Oc';
|
|
63
|
+
rules += ' _N-3t1z';
|
|
64
|
+
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
65
|
+
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
66
|
+
rules += ' _0d';
|
|
67
|
+
rules += ' _2c';
|
|
68
|
+
rules += ' _3d';
|
|
68
69
|
rules += ' jbH';
|
|
69
70
|
rules += ' jG';
|
|
70
|
-
if (!$_8) {
|
|
71
|
-
if (props.isInGroup) rules += ' _8-3t1x';
|
|
72
|
-
else rules += ' _8-3t1y';
|
|
73
|
-
}
|
|
74
71
|
if (!$_9) {
|
|
75
|
-
if (props.
|
|
72
|
+
if (props.isInGroup) rules += ' _9-3t1x';
|
|
73
|
+
else rules += ' _9-3t1y';
|
|
74
|
+
}
|
|
75
|
+
if (!$__a) {
|
|
76
|
+
if (props.isJustified) rules += ' __a-3t1y';
|
|
76
77
|
}
|
|
77
78
|
if (!$h) {
|
|
78
79
|
if (props.isJustified) rules += ' ha';
|
|
79
80
|
}
|
|
80
|
-
rules += '
|
|
81
|
-
rules += '
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
81
|
+
rules += ' _d-bc1l9oh';
|
|
82
|
+
rules += ' _d-1uotwbwg';
|
|
83
|
+
rules += ' _d-eo0c6sf';
|
|
84
|
+
rules += ' _d-enzzrge';
|
|
85
|
+
rules += ' _d-enzykdd';
|
|
86
|
+
rules += ' _d-enzwzjc';
|
|
87
|
+
rules += ' _d-enzrfpb';
|
|
88
|
+
rules += ' _da';
|
|
88
89
|
if (props.size === "XL") {
|
|
89
|
-
rules += '
|
|
90
|
-
rules += '
|
|
90
|
+
rules += ' _ebj';
|
|
91
|
+
rules += ' _ei';
|
|
91
92
|
} else if (props.size === "L") {
|
|
92
|
-
rules += '
|
|
93
|
-
rules += '
|
|
93
|
+
rules += ' _ebh';
|
|
94
|
+
rules += ' _eg';
|
|
94
95
|
} else if (props.size === "S") {
|
|
95
|
-
rules += '
|
|
96
|
-
rules += '
|
|
96
|
+
rules += ' _ebd';
|
|
97
|
+
rules += ' _ec';
|
|
97
98
|
} else if (props.size === "XS") {
|
|
98
|
-
rules += '
|
|
99
|
-
rules += '
|
|
99
|
+
rules += ' _ebb';
|
|
100
|
+
rules += ' _ea';
|
|
100
101
|
} else {
|
|
101
|
-
rules += '
|
|
102
|
-
rules += '
|
|
102
|
+
rules += ' _ebf';
|
|
103
|
+
rules += ' _ee';
|
|
103
104
|
}
|
|
104
|
-
rules += '
|
|
105
|
-
rules += '
|
|
106
|
-
rules += '
|
|
107
|
-
if (props.isDisabled) rules += '
|
|
108
|
-
else if (props.isSelected) rules += '
|
|
109
|
-
else rules += '
|
|
110
|
-
if (props.
|
|
111
|
-
if (props.isDisabled) rules += '
|
|
112
|
-
else if (props.isSelected) rules += '
|
|
105
|
+
rules += ' _fc';
|
|
106
|
+
rules += ' _g-1x99dlob';
|
|
107
|
+
rules += ' _ga';
|
|
108
|
+
if (props.isDisabled) rules += ' aa_____O';
|
|
109
|
+
else if (props.isSelected) rules += ' aa_____N';
|
|
110
|
+
else rules += ' aa_____K';
|
|
111
|
+
if (props.isStaticColor) {
|
|
112
|
+
if (props.isDisabled) rules += ' a_____A';
|
|
113
|
+
else if (props.isSelected) rules += ' a_____R';
|
|
113
114
|
else {
|
|
114
|
-
if (props.isPressed) rules += '
|
|
115
|
-
else if (props.isFocusVisible) rules += '
|
|
116
|
-
else if (props.isHovered) rules += '
|
|
117
|
-
else rules += '
|
|
118
|
-
}
|
|
119
|
-
} else if (props.staticColor === "white") {
|
|
120
|
-
if (props.isDisabled) rules += ' a_____a';
|
|
121
|
-
else if (props.isSelected) rules += ' ab';
|
|
122
|
-
else {
|
|
123
|
-
if (props.isPressed) rules += ' a_____f';
|
|
124
|
-
else if (props.isFocusVisible) rules += ' a_____f';
|
|
125
|
-
else if (props.isHovered) rules += ' a_____f';
|
|
126
|
-
else rules += ' a_____e';
|
|
115
|
+
if (props.isPressed) rules += ' a_____F';
|
|
116
|
+
else if (props.isFocusVisible) rules += ' a_____F';
|
|
117
|
+
else if (props.isHovered) rules += ' a_____F';
|
|
118
|
+
else rules += ' a_____E';
|
|
127
119
|
}
|
|
128
120
|
} else if (props.isDisabled) rules += ' aj';
|
|
129
121
|
else if (props.isSelected) {
|
|
@@ -135,7 +127,7 @@ const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, over
|
|
|
135
127
|
else if (props.isHovered) rules += ' ao';
|
|
136
128
|
else rules += ' an';
|
|
137
129
|
}
|
|
138
|
-
rules += '
|
|
130
|
+
rules += ' __Ea';
|
|
139
131
|
rules += ' k-375toq';
|
|
140
132
|
if (!$q) {
|
|
141
133
|
if (props.size === "XL") rules += ' qj';
|
|
@@ -144,68 +136,11 @@ const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, over
|
|
|
144
136
|
else if (props.size === "XS") rules += ' qg';
|
|
145
137
|
else rules += ' qf';
|
|
146
138
|
}
|
|
147
|
-
rules += '
|
|
148
|
-
rules += '
|
|
149
|
-
rules += '
|
|
150
|
-
rules += '
|
|
151
|
-
|
|
152
|
-
if (props.isDisabled) rules += ' ba_____w';
|
|
153
|
-
else rules += ' ba_____z';
|
|
154
|
-
} else rules += ' ba_____w';
|
|
155
|
-
if (props.staticColor === "black") {
|
|
156
|
-
if (props.isSelected) {
|
|
157
|
-
if (props.isDisabled) {
|
|
158
|
-
if (props.isQuiet) rules += ' ba';
|
|
159
|
-
else rules += ' b_____k';
|
|
160
|
-
} else {
|
|
161
|
-
if (props.isPressed) rules += ' b_____s';
|
|
162
|
-
else if (props.isFocusVisible) rules += ' b_____s';
|
|
163
|
-
else if (props.isHovered) rules += ' b_____s';
|
|
164
|
-
else rules += ' b_____r';
|
|
165
|
-
}
|
|
166
|
-
} else if (props.isPressed) rules += ' b_____l';
|
|
167
|
-
else if (props.isFocusVisible) rules += ' b_____l';
|
|
168
|
-
else if (props.isHovered) rules += ' b_____l';
|
|
169
|
-
else if (props.isQuiet) rules += ' ba';
|
|
170
|
-
else rules += ' b_____k';
|
|
171
|
-
} else if (props.staticColor === "white") {
|
|
172
|
-
if (props.isSelected) {
|
|
173
|
-
if (props.isDisabled) {
|
|
174
|
-
if (props.isQuiet) rules += ' ba';
|
|
175
|
-
else rules += ' b____7';
|
|
176
|
-
} else {
|
|
177
|
-
if (props.isPressed) rules += ' b_____f';
|
|
178
|
-
else if (props.isFocusVisible) rules += ' b_____f';
|
|
179
|
-
else if (props.isHovered) rules += ' b_____f';
|
|
180
|
-
else rules += ' b_____e';
|
|
181
|
-
}
|
|
182
|
-
} else if (props.isPressed) rules += ' b____8';
|
|
183
|
-
else if (props.isFocusVisible) rules += ' b____8';
|
|
184
|
-
else if (props.isHovered) rules += ' b____8';
|
|
185
|
-
else if (props.isQuiet) rules += ' ba';
|
|
186
|
-
else rules += ' b____7';
|
|
187
|
-
} else if (props.isSelected) {
|
|
188
|
-
if (props.isDisabled) {
|
|
189
|
-
if (props.isQuiet) rules += ' ba';
|
|
190
|
-
else rules += ' bg';
|
|
191
|
-
} else if (props.isEmphasized) {
|
|
192
|
-
if (props.isPressed) rules += ' b_____F';
|
|
193
|
-
else if (props.isFocusVisible) rules += ' b_____F';
|
|
194
|
-
else if (props.isHovered) rules += ' b_____F';
|
|
195
|
-
else rules += ' b_____E';
|
|
196
|
-
} else {
|
|
197
|
-
if (props.isPressed) rules += ' bo';
|
|
198
|
-
else if (props.isFocusVisible) rules += ' bo';
|
|
199
|
-
else if (props.isHovered) rules += ' bo';
|
|
200
|
-
else rules += ' bn';
|
|
201
|
-
}
|
|
202
|
-
} else {
|
|
203
|
-
if (props.isPressed) rules += ' bh';
|
|
204
|
-
else if (props.isFocusVisible) rules += ' bh';
|
|
205
|
-
else if (props.isHovered) rules += ' bh';
|
|
206
|
-
else if (props.isQuiet) rules += ' ba';
|
|
207
|
-
else rules += ' bg';
|
|
208
|
-
}
|
|
139
|
+
rules += ' _Pa';
|
|
140
|
+
rules += ' _R-375x7f';
|
|
141
|
+
rules += ' _Sa';
|
|
142
|
+
rules += ' _Ab';
|
|
143
|
+
rules += ' b-375toh';
|
|
209
144
|
rules += ' -rwx0fg_e-b';
|
|
210
145
|
rules += ' wf';
|
|
211
146
|
rules += ' C-1imc51ya';
|
|
@@ -215,29 +150,71 @@ const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, over
|
|
|
215
150
|
rules += ' Ea';
|
|
216
151
|
rules += ' Fa';
|
|
217
152
|
if (props.density === "compact") {
|
|
218
|
-
rules += '
|
|
219
|
-
rules += '
|
|
220
|
-
} else rules += ' _vh';
|
|
221
|
-
if (props.density === "compact") {
|
|
222
|
-
if (props.orientation === "vertical") rules += ' _w-13alit4h';
|
|
223
|
-
else if (props.orientation === "horizontal") rules += ' _w-uamghwh';
|
|
224
|
-
else rules += ' _wa';
|
|
153
|
+
rules += ' _w-13alit4h';
|
|
154
|
+
rules += ' _wa';
|
|
225
155
|
} else rules += ' _wh';
|
|
226
156
|
if (props.density === "compact") {
|
|
227
|
-
if (props.orientation === "vertical") rules += ' _x-
|
|
228
|
-
else if (props.orientation === "horizontal") rules += ' _x-
|
|
157
|
+
if (props.orientation === "vertical") rules += ' _x-13alit4h';
|
|
158
|
+
else if (props.orientation === "horizontal") rules += ' _x-uamghwh';
|
|
229
159
|
else rules += ' _xa';
|
|
230
160
|
} else rules += ' _xh';
|
|
231
161
|
if (props.density === "compact") {
|
|
232
|
-
rules += ' _y-uamghwh';
|
|
233
|
-
rules += '
|
|
162
|
+
if (props.orientation === "vertical") rules += ' _y-uamghwh';
|
|
163
|
+
else if (props.orientation === "horizontal") rules += ' _y-13alit4h';
|
|
164
|
+
else rules += ' _ya';
|
|
234
165
|
} else rules += ' _yh';
|
|
166
|
+
if (props.density === "compact") {
|
|
167
|
+
rules += ' _z-uamghwh';
|
|
168
|
+
rules += ' _za';
|
|
169
|
+
} else rules += ' _zh';
|
|
235
170
|
rules += ' -oelgqu_A--1imc51ya';
|
|
236
171
|
rules += ' -oelgqu_A--177861o';
|
|
237
|
-
if (!$
|
|
238
|
-
if (props.isFocusVisible) rules += '
|
|
172
|
+
if (!$__R) {
|
|
173
|
+
if (props.isFocusVisible) rules += ' __R-3t1z';
|
|
174
|
+
}
|
|
175
|
+
rules += ' __S-yksgrp';
|
|
176
|
+
if (props.isSelected) {
|
|
177
|
+
if (props.isDisabled) rules += ' -_375toh_b-a_____J';
|
|
178
|
+
else rules += ' -_375toh_b-a_____M';
|
|
179
|
+
} else rules += ' -_375toh_b-a_____J';
|
|
180
|
+
if (props.isStaticColor) {
|
|
181
|
+
if (props.isSelected) {
|
|
182
|
+
if (props.isDisabled) {
|
|
183
|
+
if (props.isQuiet) rules += ' -_375toh_b-a';
|
|
184
|
+
else rules += ' -_375toh_b-_____x';
|
|
185
|
+
} else {
|
|
186
|
+
if (props.isPressed) rules += ' -_375toh_b-_____F';
|
|
187
|
+
else if (props.isFocusVisible) rules += ' -_375toh_b-_____F';
|
|
188
|
+
else if (props.isHovered) rules += ' -_375toh_b-_____F';
|
|
189
|
+
else rules += ' -_375toh_b-_____E';
|
|
190
|
+
}
|
|
191
|
+
} else if (props.isPressed) rules += ' -_375toh_b-_____y';
|
|
192
|
+
else if (props.isFocusVisible) rules += ' -_375toh_b-_____y';
|
|
193
|
+
else if (props.isHovered) rules += ' -_375toh_b-_____y';
|
|
194
|
+
else if (props.isQuiet) rules += ' -_375toh_b-a';
|
|
195
|
+
else rules += ' -_375toh_b-_____x';
|
|
196
|
+
} else if (props.isSelected) {
|
|
197
|
+
if (props.isDisabled) {
|
|
198
|
+
if (props.isQuiet) rules += ' -_375toh_b-a';
|
|
199
|
+
else rules += ' -_375toh_b-g';
|
|
200
|
+
} else if (props.isEmphasized) {
|
|
201
|
+
if (props.isPressed) rules += ' -_375toh_b-_____S';
|
|
202
|
+
else if (props.isFocusVisible) rules += ' -_375toh_b-_____S';
|
|
203
|
+
else if (props.isHovered) rules += ' -_375toh_b-_____S';
|
|
204
|
+
else rules += ' -_375toh_b-_____R';
|
|
205
|
+
} else {
|
|
206
|
+
if (props.isPressed) rules += ' -_375toh_b-o';
|
|
207
|
+
else if (props.isFocusVisible) rules += ' -_375toh_b-o';
|
|
208
|
+
else if (props.isHovered) rules += ' -_375toh_b-o';
|
|
209
|
+
else rules += ' -_375toh_b-n';
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
if (props.isPressed) rules += ' -_375toh_b-h';
|
|
213
|
+
else if (props.isFocusVisible) rules += ' -_375toh_b-h';
|
|
214
|
+
else if (props.isHovered) rules += ' -_375toh_b-h';
|
|
215
|
+
else if (props.isQuiet) rules += ' -_375toh_b-a';
|
|
216
|
+
else rules += ' -_375toh_b-g';
|
|
239
217
|
}
|
|
240
|
-
rules += ' __R-yksgrp';
|
|
241
218
|
if (props.size === "XL") rules += ' -_375toq_k-j';
|
|
242
219
|
else if (props.size === "L") rules += ' -_375toq_k-i';
|
|
243
220
|
else if (props.size === "S") rules += ' -_375toq_k-h';
|
|
@@ -254,7 +231,7 @@ const $da878a05ab4a403e$var$avatarSize = {
|
|
|
254
231
|
X: 26
|
|
255
232
|
};
|
|
256
233
|
const $da878a05ab4a403e$export$2ff682723a46d413 = /*#__PURE__*/ (0, $hl1Zj$createContext)(null);
|
|
257
|
-
|
|
234
|
+
const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwardRef)(function ActionButton(props, ref) {
|
|
258
235
|
[props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $da878a05ab4a403e$export$2ff682723a46d413);
|
|
259
236
|
props = (0, $9b916426527cebe7$export$a6b5be5c6b451665)(props);
|
|
260
237
|
let domRef = (0, $hl1Zj$useFocusableRef)(ref);
|
|
@@ -272,6 +249,7 @@ function $da878a05ab4a403e$var$ActionButton(props, ref) {
|
|
|
272
249
|
// Retain hover styles when an overlay is open.
|
|
273
250
|
isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,
|
|
274
251
|
staticColor: staticColor,
|
|
252
|
+
isStaticColor: !!staticColor,
|
|
275
253
|
size: size,
|
|
276
254
|
isQuiet: isQuiet,
|
|
277
255
|
density: density,
|
|
@@ -288,7 +266,7 @@ function $da878a05ab4a403e$var$ActionButton(props, ref) {
|
|
|
288
266
|
[
|
|
289
267
|
(0, $8e847109a6ab556d$export$9afb8bc826b033ea),
|
|
290
268
|
{
|
|
291
|
-
styles: " . E-1gogtue F-1gogtue
|
|
269
|
+
styles: " . E-1gogtue F-1gogtue __B-3t1y __wb __xb _na _qb"
|
|
292
270
|
}
|
|
293
271
|
],
|
|
294
272
|
[
|
|
@@ -296,16 +274,16 @@ function $da878a05ab4a403e$var$ActionButton(props, ref) {
|
|
|
296
274
|
{
|
|
297
275
|
render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
|
|
298
276
|
slot: 'icon',
|
|
299
|
-
styles: " .
|
|
277
|
+
styles: " . __B-3t1x"
|
|
300
278
|
}),
|
|
301
|
-
styles: " . l-1sthc3k k-1sthc3k y-oelgqu
|
|
279
|
+
styles: " . l-1sthc3k k-1sthc3k y-oelgqu _9-3t1x"
|
|
302
280
|
}
|
|
303
281
|
],
|
|
304
282
|
[
|
|
305
283
|
(0, $3ffa2cd930156220$export$a20dad690e1279e2),
|
|
306
284
|
{
|
|
307
285
|
size: $da878a05ab4a403e$var$avatarSize[size],
|
|
308
|
-
styles: " . y-oelgqu
|
|
286
|
+
styles: " . y-oelgqu _9-3t1x __B-3t1x"
|
|
309
287
|
}
|
|
310
288
|
]
|
|
311
289
|
],
|
|
@@ -314,11 +292,7 @@ function $da878a05ab4a403e$var$ActionButton(props, ref) {
|
|
|
314
292
|
}) : props.children
|
|
315
293
|
})
|
|
316
294
|
});
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* ActionButtons allow users to perform an action.
|
|
320
|
-
* They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.
|
|
321
|
-
*/ let $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwardRef)($da878a05ab4a403e$var$ActionButton);
|
|
295
|
+
});
|
|
322
296
|
|
|
323
297
|
|
|
324
298
|
export {$da878a05ab4a403e$export$446543cff2a0f496 as btnStyles, $da878a05ab4a403e$export$2ff682723a46d413 as ActionButtonContext, $da878a05ab4a403e$export$cfc7921d29ef7b80 as ActionButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAiDD,yDAAyD;AACzD,MAAM,iCAAW;AACV,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLb,4BAA4B;AAC5B,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEO,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAyE;AAExH,SAAS,mCAAa,KAAwB,EAAE,GAAoC;IAClF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,sBAAsB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,iCAAyB;IAC9D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,QACvB,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gBAAC,CAAA,GAAA,aAAQ;QACN,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAU;gBACnE,GAAG,WAAW;gBACd,+CAA+C;gBAC/C,WAAW,YAAY,SAAS,IAAI,qBAAqB,UAAU;6BACnE;sBACA;yBACA;yBACA;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAY;oBAAG;wBACd,MAAM,gCAAU,CAAC,KAAK;wBACtB,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F;AAEA;;;CAGC,GACD,IAAI,0DAAgB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ActionButton.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 {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children?: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean}>({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n staticColor: {\n white: {\n ...baseColor('transparent-white-100'),\n default: {\n default: 'transparent-white-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-white-800'),\n isDisabled: {\n default: 'transparent-white-100',\n isQuiet: 'transparent'\n }\n }\n },\n black: {\n ...baseColor('transparent-black-100'),\n default: {\n default: 'transparent-black-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-black-800'),\n isDisabled: {\n default: 'transparent-black-100',\n isQuiet: 'transparent'\n }\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n staticColor: {\n white: {\n default: baseColor('transparent-white-800'),\n isSelected: 'black',\n isDisabled: 'transparent-white-400'\n },\n black: {\n default: baseColor('transparent-black-800'),\n isSelected: 'white',\n isDisabled: 'transparent-black-400'\n }\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n staticColor: {\n white: 'white',\n black: 'black'\n },\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<ActionButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\nfunction ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n}\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nlet _ActionButton = forwardRef(ActionButton);\nexport {_ActionButton as ActionButton};\n"],"names":[],"version":3,"file":"ActionButton.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;AAiDD,yDAAyD;AACzD,MAAM,iCAAW;AACV,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgKb,4BAA4B;AAC5B,MAAM,mCAAa;IACjB,IAAI;IACJ,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;AACL;AAEO,MAAM,0DAAsB,CAAA,GAAA,oBAAY,EAAyE;AAMjH,MAAM,0DAAe,CAAA,GAAA,iBAAS,EAAE,SAAS,aAAa,KAAwB,EAAE,GAAoC;IACzH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,sBAAsB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,iCAAyB;IAC9D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,CAAA,GAAA,yCAAuB;IACnD,IAAI,YAAY,CAAC,CAAC;IAClB,IAAI,WACF,UAAU,wBACV,WAAW,eACX,cAAc,2BACd,cAAc,MAAM,WAAW,WAC/B,UAAU,MAAM,OAAO,QACvB,OAAO,MAAM,IAAI,IAAI,iBACrB,aAAa,MAAM,UAAU,EAC9B,GAAG,OAAO,CAAC;IAEZ,qBACE,gBAAC,CAAA,GAAA,aAAQ;QACN,GAAG,KAAK;QACT,YAAY;QACZ,KAAK;QACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ,MAAM,YAAY;QAC5C,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,0CAAU;gBACnE,GAAG,WAAW;gBACd,+CAA+C;gBAC/C,WAAW,YAAY,SAAS,IAAI,qBAAqB,UAAU;6BACnE;gBACA,eAAe,CAAC,CAAC;sBACjB;yBACA;yBACA;6BACA;6BACA;2BACA;YACF,GAAG,MAAM,MAAM;kBACf,cAAA,gBAAC,CAAA,GAAA,eAAO;YACN,QAAQ;gBACN;oBAAC,CAAA,GAAA,yCAAc;oBAAG;iBAAK;gBACvB;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBAAC,MAAM;oBAA+D;iBAAE;gBACtF;oBAAC,CAAA,GAAA,yCAAU;oBAAG;wBACZ,QAAQ,CAAA,GAAA,yCAAa,EAAE;4BAAC,MAAM;4BAAQ,MAAM;wBAAmB;wBAC/D,MAAM;oBACR;iBAAE;gBACF;oBAAC,CAAA,GAAA,yCAAY;oBAAG;wBACd,MAAM,gCAAU,CAAC,KAAK;wBACtB,MAAM;oBACR;iBAAE;aACH;sBACA,OAAO,MAAM,QAAQ,KAAK,yBAAW,gBAAC,CAAA,GAAA,yCAAG;0BAAG,MAAM,QAAQ;iBAAW,MAAM,QAAQ;;;AAI5F","sources":["packages/@react-spectrum/s2/src/ActionButton.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 {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {AvatarContext} from './Avatar';\nimport {baseColor, focusRing, fontRelative, style} from '../style' with { type: 'macro' };\nimport {ButtonProps, ButtonRenderProps, ContextValue, OverlayTriggerStateContext, Provider, Button as RACButton, useSlottedContext} from 'react-aria-components';\nimport {centerBaseline} from './CenterBaseline';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with { type: 'macro' };\nimport {IconContext} from './Icon';\nimport {pressScale} from './pressScale';\nimport {SkeletonContext} from './Skeleton';\nimport {Text, TextContext} from './Content';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useFormProps} from './Form';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonStyleProps {\n /**\n * The size of the ActionButton.\n *\n * @default 'M'\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the ActionButton appears over a color background. */\n staticColor?: 'black' | 'white' | 'auto',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean\n}\n\ninterface ToggleButtonStyleProps {\n /** Whether the ActionButton should be selected (controlled). */\n isSelected?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n isEmphasized?: boolean\n}\n\ninterface ActionGroupItemStyleProps {\n density?: 'regular' | 'compact',\n orientation?: 'horizontal' | 'vertical',\n isJustified?: boolean\n}\n\nexport interface ActionButtonProps extends Omit<ButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'isPending'>, StyleProps, ActionButtonStyleProps {\n /** The content to display in the ActionButton. */\n children?: ReactNode\n}\n\n// These styles handle both ActionButton and ToggleButton\nconst iconOnly = ':has([slot=icon], [slot=avatar]):not(:has([data-rsp-slot=text]))';\nexport const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & ToggleButtonStyleProps & ActionGroupItemStyleProps & {isInGroup: boolean, isStaticColor: boolean}>({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n columnGap: 'text-to-visual',\n flexShrink: {\n default: 1,\n isInGroup: 0\n },\n flexGrow: {\n isJustified: 1\n },\n flexBasis: {\n isJustified: 0\n },\n font: 'control',\n fontWeight: 'medium',\n userSelect: 'none',\n height: 'control',\n minWidth: 'control',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: {\n ...baseColor('gray-100'),\n default: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isSelected: {\n default: 'neutral',\n isEmphasized: 'accent',\n isDisabled: {\n default: 'gray-100',\n isQuiet: 'transparent'\n }\n },\n isStaticColor: {\n ...baseColor('transparent-overlay-100'),\n default: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n },\n isSelected: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: {\n default: 'transparent-overlay-100',\n isQuiet: 'transparent'\n }\n }\n },\n forcedColors: {\n default: 'ButtonFace',\n isSelected: {\n default: 'Highlight',\n isDisabled: 'ButtonFace'\n }\n }\n },\n color: {\n default: 'neutral',\n isSelected: {\n default: 'gray-25',\n isEmphasized: 'white'\n },\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isSelected: 'auto',\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isSelected: 'HighlightText',\n isDisabled: {\n default: 'GrayText'\n }\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n },\n borderStyle: 'none',\n paddingX: {\n default: 'edge-to-text',\n [iconOnly]: 0\n },\n paddingY: 0,\n borderTopStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':first-child': 'control'\n }\n }\n },\n borderTopEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':last-child': 'control'\n },\n vertical: {\n ':first-child': 'control'\n }\n }\n }\n }\n },\n borderBottomStartRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n orientation: {\n horizontal: {\n ':first-child': 'control'\n },\n vertical: {\n ':last-child': 'control'\n }\n }\n }\n }\n },\n borderBottomEndRadius: {\n default: 'control',\n density: {\n compact: {\n default: 'none',\n ':last-child': 'control'\n }\n }\n },\n '--iconMargin': {\n type: 'marginTop',\n value: {\n default: fontRelative(-2),\n [iconOnly]: 0\n }\n },\n zIndex: {\n isFocusVisible: 2\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\n// Matching icon sizes. TBD.\nconst avatarSize = {\n XS: 14,\n S: 16,\n M: 20,\n L: 22,\n X: 26\n} as const;\n\nexport const ActionButtonContext = createContext<ContextValue<ActionButtonProps, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionButtons allow users to perform an action.\n * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention.\n */\nexport const ActionButton = forwardRef(function ActionButton(props: ActionButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonContext);\n props = useFormProps(props as any);\n let domRef = useFocusableRef(ref);\n let overlayTriggerState = useContext(OverlayTriggerStateContext);\n let ctx = useSlottedContext(ActionButtonGroupContext);\n let isInGroup = !!ctx;\n let {\n density = 'regular',\n isJustified,\n orientation = 'horizontal',\n staticColor = props.staticColor,\n isQuiet = props.isQuiet,\n size = props.size || 'M',\n isDisabled = props.isDisabled\n } = ctx || {};\n\n return (\n <RACButton\n {...props}\n isDisabled={isDisabled}\n ref={domRef}\n style={pressScale(domRef, props.UNSAFE_style)}\n className={renderProps => (props.UNSAFE_className || '') + btnStyles({\n ...renderProps,\n // Retain hover styles when an overlay is open.\n isHovered: renderProps.isHovered || overlayTriggerState?.isOpen || false,\n staticColor,\n isStaticColor: !!staticColor,\n size,\n isQuiet,\n density,\n isJustified,\n orientation,\n isInGroup\n }, props.styles)}>\n <Provider\n values={[\n [SkeletonContext, null],\n [TextContext, {styles: style({paddingY: '--labelPadding', order: 1, truncate: true})}],\n [IconContext, {\n render: centerBaseline({slot: 'icon', styles: style({order: 0})}),\n styles: style({size: fontRelative(20), marginStart: '--iconMargin', flexShrink: 0})\n }],\n [AvatarContext, {\n size: avatarSize[size],\n styles: style({marginStart: '--iconMargin', flexShrink: 0, order: 0})\n }]\n ]}>\n {typeof props.children === 'string' ? <Text>{props.children}</Text> : props.children}\n </Provider>\n </RACButton>\n );\n});\n"],"names":[],"version":3,"file":"ActionButton.mjs.map"}
|
|
@@ -28,11 +28,11 @@ $parcel$export(module.exports, "ActionButtonGroup", () => $7a26131f6144af2b$expo
|
|
|
28
28
|
|
|
29
29
|
const $7a26131f6144af2b$export$641cbcd1f6f6802f = function anonymous(props, overrides) {
|
|
30
30
|
let rules = " .";
|
|
31
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|
|
|
31
|
+
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|k|o|p)[^\s]+/g) || [];
|
|
32
32
|
rules += matches.join('');
|
|
33
|
-
rules += '
|
|
34
|
-
if (props.orientation === "vertical") rules += '
|
|
35
|
-
else if (props.orientation === "horizontal") rules += '
|
|
33
|
+
rules += ' _0d';
|
|
34
|
+
if (props.orientation === "vertical") rules += ' _7b';
|
|
35
|
+
else if (props.orientation === "horizontal") rules += ' _7a';
|
|
36
36
|
if (props.density === "regular") {
|
|
37
37
|
if (props.size === "XL") rules += ' id';
|
|
38
38
|
else if (props.size === "L") rules += ' id';
|
|
@@ -50,7 +50,7 @@ const $7a26131f6144af2b$export$641cbcd1f6f6802f = function anonymous(props, over
|
|
|
50
50
|
return rules;
|
|
51
51
|
};
|
|
52
52
|
const $7a26131f6144af2b$export$33f5f2f2cb85d743 = /*#__PURE__*/ (0, $jGK4W$react.createContext)(null);
|
|
53
|
-
|
|
53
|
+
const $7a26131f6144af2b$export$73d695ae27330056 = /*#__PURE__*/ (0, $jGK4W$react.forwardRef)(function ActionButtonGroup(props, ref) {
|
|
54
54
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $7a26131f6144af2b$export$33f5f2f2cb85d743);
|
|
55
55
|
let { density: density = 'regular', size: size = 'M', orientation: orientation = 'horizontal', isJustified: isJustified, children: children, UNSAFE_className: UNSAFE_className = '', UNSAFE_style: UNSAFE_style, styles: styles } = props;
|
|
56
56
|
return /*#__PURE__*/ (0, $jGK4W$reactjsxruntime.jsx)((0, $jGK4W$reactariacomponents.Toolbar), {
|
|
@@ -68,10 +68,7 @@ function $7a26131f6144af2b$var$ActionButtonGroup(props, ref) {
|
|
|
68
68
|
children: children
|
|
69
69
|
})
|
|
70
70
|
});
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* An ActionButtonGroup is a grouping of related ActionButtons.
|
|
74
|
-
*/ const $7a26131f6144af2b$export$73d695ae27330056 = /*#__PURE__*/ (0, $jGK4W$react.forwardRef)($7a26131f6144af2b$var$ActionButtonGroup);
|
|
71
|
+
});
|
|
75
72
|
|
|
76
73
|
|
|
77
74
|
//# sourceMappingURL=ActionButtonGroup.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAuCM,MAAM;;;;;;;;;;;;;;;;;;;;;;;AAyBN,MAAM,0DAA2B,CAAA,GAAA,0BAAY,EAAiE;AAK9G,MAAM,0DAAoB,CAAA,GAAA,uBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,kBACP,cAAc,2BACd,WAAW,YACX,QAAQ,oBACR,mBAAmB,kBACnB,YAAY,UACZ,MAAM,EACP,GAAG;IAEJ,qBACE,gCAAC,CAAA,GAAA,kCAAM;QACJ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,0CAAiB;kBAAC;qBAAM;yBAAS;yBAAa;QAAW,GAAG;kBAC1F,cAAA,gCAAC,0CAAyB,QAAQ;YAAC,OAAO;sBACvC;;;AAIT","sources":["packages/@react-spectrum/s2/src/ActionButtonGroup.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 {AriaLabelingProps} from '@react-types/shared';\nimport {ContextValue, SlotProps, Toolbar} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The children of the group. */\n children: ReactNode,\n /**\n * Size of the buttons.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * Spacing between the buttons.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean,\n /** Whether the buttons should divide the container width equally. */\n isJustified?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The axis the group should align with.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** Whether the group is disabled. */\n isDisabled?: boolean\n}\n\nexport const actionGroupStyle = style({\n display: 'flex',\n flexDirection: {\n orientation: {\n horizontal: 'row',\n vertical: 'column'\n }\n },\n gap: {\n density: {\n compact: 2,\n regular: {\n size: {\n XS: 4,\n S: 4,\n M: 8,\n L: 8,\n XL: 8\n }\n }\n }\n }\n}, getAllowedOverrides({height: true}));\n\n\nexport const ActionButtonGroupContext = createContext<ContextValue<Partial<ActionButtonGroupProps>, HTMLDivElement>>(null);\n\n/**\n * An ActionButtonGroup is a grouping of related ActionButtons.\n */\nexport const ActionButtonGroup = forwardRef(function ActionButtonGroup(props: ActionButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonGroupContext);\n let {\n density = 'regular',\n size = 'M',\n orientation = 'horizontal',\n isJustified,\n children,\n UNSAFE_className = '',\n UNSAFE_style,\n styles\n } = props;\n\n return (\n <Toolbar\n {...props}\n ref={ref}\n style={UNSAFE_style}\n className={UNSAFE_className + actionGroupStyle({size, density, orientation, isJustified}, styles)}>\n <ActionButtonGroupContext.Provider value={props}>\n {children}\n </ActionButtonGroupContext.Provider>\n </Toolbar>\n );\n});\n"],"names":[],"version":3,"file":"ActionButtonGroup.cjs.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":"AAiDgC;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/ActionButtonGroup.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 {AriaLabelingProps} from '@react-types/shared';\nimport {ContextValue, SlotProps, Toolbar} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The children of the group. */\n children: ReactNode,\n /**\n * Size of the buttons.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * Spacing between the buttons.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean,\n /** Whether the buttons should divide the container width equally. */\n isJustified?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The axis the group should align with.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** Whether the group is disabled. */\n isDisabled?: boolean\n}\n\nexport const actionGroupStyle = style({\n display: 'flex',\n flexDirection: {\n orientation: {\n horizontal: 'row',\n vertical: 'column'\n }\n },\n gap: {\n density: {\n compact: 2,\n regular: {\n size: {\n XS: 4,\n S: 4,\n M: 8,\n L: 8,\n XL: 8\n }\n }\n }\n }\n}, getAllowedOverrides({height: true}));\n\n\nexport const ActionButtonGroupContext = createContext<ContextValue<Partial<ActionButtonGroupProps>, HTMLDivElement>>(null);\n\n/**\n * An ActionButtonGroup is a grouping of related ActionButtons.\n */\nexport const ActionButtonGroup = forwardRef(function ActionButtonGroup(props: ActionButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonGroupContext);\n let {\n density = 'regular',\n size = 'M',\n orientation = 'horizontal',\n isJustified,\n children,\n UNSAFE_className = '',\n UNSAFE_style,\n styles\n } = props;\n\n return (\n <Toolbar\n {...props}\n ref={ref}\n style={UNSAFE_style}\n className={UNSAFE_className + actionGroupStyle({size, density, orientation, isJustified}, styles)}>\n <ActionButtonGroupContext.Provider value={props}>\n {children}\n </ActionButtonGroupContext.Provider>\n </Toolbar>\n );\n});\n"],"names":[],"version":3,"file":"ActionButtonGroup.css.map"}
|
|
@@ -20,11 +20,11 @@ import {createContext as $aTsYn$createContext, forwardRef as $aTsYn$forwardRef}
|
|
|
20
20
|
|
|
21
21
|
const $10401bdc118cbc90$export$641cbcd1f6f6802f = function anonymous(props, overrides) {
|
|
22
22
|
let rules = " .";
|
|
23
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|_9|
|
|
23
|
+
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|k|o|p)[^\s]+/g) || [];
|
|
24
24
|
rules += matches.join('');
|
|
25
|
-
rules += '
|
|
26
|
-
if (props.orientation === "vertical") rules += '
|
|
27
|
-
else if (props.orientation === "horizontal") rules += '
|
|
25
|
+
rules += ' _0d';
|
|
26
|
+
if (props.orientation === "vertical") rules += ' _7b';
|
|
27
|
+
else if (props.orientation === "horizontal") rules += ' _7a';
|
|
28
28
|
if (props.density === "regular") {
|
|
29
29
|
if (props.size === "XL") rules += ' id';
|
|
30
30
|
else if (props.size === "L") rules += ' id';
|
|
@@ -42,7 +42,7 @@ const $10401bdc118cbc90$export$641cbcd1f6f6802f = function anonymous(props, over
|
|
|
42
42
|
return rules;
|
|
43
43
|
};
|
|
44
44
|
const $10401bdc118cbc90$export$33f5f2f2cb85d743 = /*#__PURE__*/ (0, $aTsYn$createContext)(null);
|
|
45
|
-
|
|
45
|
+
const $10401bdc118cbc90$export$73d695ae27330056 = /*#__PURE__*/ (0, $aTsYn$forwardRef)(function ActionButtonGroup(props, ref) {
|
|
46
46
|
[props, ref] = (0, $5ce63c423902f47d$export$764f6146fadd77f7)(props, ref, $10401bdc118cbc90$export$33f5f2f2cb85d743);
|
|
47
47
|
let { density: density = 'regular', size: size = 'M', orientation: orientation = 'horizontal', isJustified: isJustified, children: children, UNSAFE_className: UNSAFE_className = '', UNSAFE_style: UNSAFE_style, styles: styles } = props;
|
|
48
48
|
return /*#__PURE__*/ (0, $aTsYn$jsx)((0, $aTsYn$Toolbar), {
|
|
@@ -60,10 +60,7 @@ function $10401bdc118cbc90$var$ActionButtonGroup(props, ref) {
|
|
|
60
60
|
children: children
|
|
61
61
|
})
|
|
62
62
|
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* An ActionButtonGroup is a grouping of related ActionButtons.
|
|
66
|
-
*/ const $10401bdc118cbc90$export$73d695ae27330056 = /*#__PURE__*/ (0, $aTsYn$forwardRef)($10401bdc118cbc90$var$ActionButtonGroup);
|
|
63
|
+
});
|
|
67
64
|
|
|
68
65
|
|
|
69
66
|
export {$10401bdc118cbc90$export$641cbcd1f6f6802f as actionGroupStyle, $10401bdc118cbc90$export$33f5f2f2cb85d743 as ActionButtonGroupContext, $10401bdc118cbc90$export$73d695ae27330056 as ActionButtonGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;
|
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;AAuCM,MAAM;;;;;;;;;;;;;;;;;;;;;;;AAyBN,MAAM,0DAA2B,CAAA,GAAA,oBAAY,EAAiE;AAK9G,MAAM,0DAAoB,CAAA,GAAA,iBAAS,EAAE,SAAS,kBAAkB,KAA6B,EAAE,GAAiC;IACrI,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,WACF,UAAU,iBACV,OAAO,kBACP,cAAc,2BACd,WAAW,YACX,QAAQ,oBACR,mBAAmB,kBACnB,YAAY,UACZ,MAAM,EACP,GAAG;IAEJ,qBACE,gBAAC,CAAA,GAAA,cAAM;QACJ,GAAG,KAAK;QACT,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB,0CAAiB;kBAAC;qBAAM;yBAAS;yBAAa;QAAW,GAAG;kBAC1F,cAAA,gBAAC,0CAAyB,QAAQ;YAAC,OAAO;sBACvC;;;AAIT","sources":["packages/@react-spectrum/s2/src/ActionButtonGroup.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 {AriaLabelingProps} from '@react-types/shared';\nimport {ContextValue, SlotProps, Toolbar} from 'react-aria-components';\nimport {createContext, ForwardedRef, forwardRef, ReactNode} from 'react';\nimport {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight,\n /** The children of the group. */\n children: ReactNode,\n /**\n * Size of the buttons.\n * @default \"M\"\n */\n size?: 'XS' | 'S' | 'M' | 'L' | 'XL',\n /**\n * Spacing between the buttons.\n * @default \"regular\"\n */\n density?: 'compact' | 'regular',\n /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */\n isQuiet?: boolean,\n /** Whether the buttons should divide the container width equally. */\n isJustified?: boolean,\n /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */\n staticColor?: 'white' | 'black' | 'auto',\n /**\n * The axis the group should align with.\n * @default 'horizontal'\n */\n orientation?: 'horizontal' | 'vertical',\n /** Whether the group is disabled. */\n isDisabled?: boolean\n}\n\nexport const actionGroupStyle = style({\n display: 'flex',\n flexDirection: {\n orientation: {\n horizontal: 'row',\n vertical: 'column'\n }\n },\n gap: {\n density: {\n compact: 2,\n regular: {\n size: {\n XS: 4,\n S: 4,\n M: 8,\n L: 8,\n XL: 8\n }\n }\n }\n }\n}, getAllowedOverrides({height: true}));\n\n\nexport const ActionButtonGroupContext = createContext<ContextValue<Partial<ActionButtonGroupProps>, HTMLDivElement>>(null);\n\n/**\n * An ActionButtonGroup is a grouping of related ActionButtons.\n */\nexport const ActionButtonGroup = forwardRef(function ActionButtonGroup(props: ActionButtonGroupProps, ref: ForwardedRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ActionButtonGroupContext);\n let {\n density = 'regular',\n size = 'M',\n orientation = 'horizontal',\n isJustified,\n children,\n UNSAFE_className = '',\n UNSAFE_style,\n styles\n } = props;\n\n return (\n <Toolbar\n {...props}\n ref={ref}\n style={UNSAFE_style}\n className={UNSAFE_className + actionGroupStyle({size, density, orientation, isJustified}, styles)}>\n <ActionButtonGroupContext.Provider value={props}>\n {children}\n </ActionButtonGroupContext.Provider>\n </Toolbar>\n );\n});\n"],"names":[],"version":3,"file":"ActionButtonGroup.mjs.map"}
|
package/dist/ActionMenu.cjs
CHANGED
|
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "ActionMenu", () => $e5a758dd286599f2$export$ed57
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
const $e5a758dd286599f2$export$7f4b66acaca28bd5 = /*#__PURE__*/ (0, $lyMvd$react.createContext)(null);
|
|
42
|
-
|
|
42
|
+
const $e5a758dd286599f2$export$ed57a210b9d13bb6 = /*#__PURE__*/ (0, $lyMvd$react.forwardRef)(function ActionMenu(props, ref) {
|
|
43
43
|
let stringFormatter = (0, $lyMvd$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
|
|
44
44
|
[props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $e5a758dd286599f2$export$7f4b66acaca28bd5);
|
|
45
45
|
let buttonProps = (0, $lyMvd$reactariautils.filterDOMProps)(props, {
|
|
@@ -73,10 +73,7 @@ function $e5a758dd286599f2$var$ActionMenu(props, ref) {
|
|
|
73
73
|
})
|
|
74
74
|
]
|
|
75
75
|
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
|
|
79
|
-
*/ let $e5a758dd286599f2$export$ed57a210b9d13bb6 = /*#__PURE__*/ (0, $lyMvd$react.forwardRef)($e5a758dd286599f2$var$ActionMenu);
|
|
76
|
+
});
|
|
80
77
|
|
|
81
78
|
|
|
82
79
|
//# sourceMappingURL=ActionMenu.cjs.map
|