@react-spectrum/s2 3.0.0-nightly-4b8b33a02-250211 → 3.0.0-nightly-260eb700f-250213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +3 -3
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +47 -47
- package/dist/ActionBar.css +51 -51
- package/dist/ActionBar.mjs +47 -47
- package/dist/ActionButton.cjs +97 -97
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +96 -96
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +97 -97
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +11 -11
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +11 -11
- package/dist/ActionMenu.cjs.map +1 -1
- package/dist/ActionMenu.mjs.map +1 -1
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css +14 -14
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs +17 -17
- package/dist/Avatar.mjs.map +1 -1
- package/dist/AvatarGroup.cjs +100 -100
- package/dist/AvatarGroup.cjs.map +1 -1
- package/dist/AvatarGroup.css +34 -34
- package/dist/AvatarGroup.css.map +1 -1
- package/dist/AvatarGroup.mjs +100 -100
- package/dist/AvatarGroup.mjs.map +1 -1
- package/dist/Badge.cjs +68 -92
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +92 -164
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +68 -92
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +115 -115
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +89 -89
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +115 -115
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +152 -236
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +165 -309
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +152 -236
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +19 -19
- package/dist/ButtonGroup.cjs.map +1 -1
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.css.map +1 -1
- package/dist/ButtonGroup.mjs +19 -19
- package/dist/ButtonGroup.mjs.map +1 -1
- package/dist/Card.cjs +261 -264
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +198 -210
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +261 -264
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +15 -15
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +18 -18
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +15 -15
- 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 +73 -124
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +81 -201
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +73 -124
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +49 -49
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +41 -41
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +49 -49
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs +15 -15
- package/dist/ClearButton.css +17 -17
- package/dist/ClearButton.mjs +15 -15
- package/dist/CloseButton.cjs +35 -35
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +33 -33
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +35 -35
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +22 -22
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +15 -15
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +22 -22
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +38 -38
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +32 -32
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +38 -38
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +21 -27
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +45 -93
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +21 -27
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +52 -52
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +51 -51
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +52 -52
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +24 -27
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -41
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +24 -27
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +23 -23
- package/dist/ColorSwatchPicker.css +48 -60
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +23 -23
- package/dist/ColorWheel.cjs +22 -22
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +16 -16
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +22 -22
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +80 -80
- package/dist/ComboBox.css +88 -88
- package/dist/ComboBox.mjs +80 -80
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.cjs.map +1 -1
- package/dist/ContextualHelp.css +38 -38
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/ContextualHelp.mjs.map +1 -1
- package/dist/CustomDialog.cjs +31 -31
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.mjs +31 -31
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.css +64 -64
- package/dist/Dialog.mjs +17 -17
- package/dist/Disclosure.cjs +108 -111
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -124
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +108 -111
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +16 -16
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +26 -26
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +47 -56
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +56 -80
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +47 -56
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +150 -204
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +150 -246
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +150 -204
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +9 -9
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +10 -10
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.css +72 -72
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/IllustratedMessage.cjs +134 -134
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css +69 -69
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs +134 -134
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs +12 -12
- package/dist/Image.cjs.map +1 -1
- package/dist/Image.css +13 -13
- package/dist/Image.css.map +1 -1
- package/dist/Image.mjs +12 -12
- package/dist/Image.mjs.map +1 -1
- package/dist/InlineAlert.cjs +77 -104
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +77 -149
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +77 -104
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs +31 -31
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +30 -30
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +31 -31
- package/dist/Link.mjs.map +1 -1
- package/dist/Menu.cjs +269 -268
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +158 -154
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +269 -268
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +85 -85
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +81 -81
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +85 -85
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +48 -48
- package/dist/Modal.css +46 -46
- package/dist/Modal.mjs +48 -48
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +114 -114
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -115
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +177 -194
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +167 -223
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +177 -194
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +79 -85
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +65 -89
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +79 -85
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +98 -98
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +92 -92
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +98 -98
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +17 -17
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +15 -15
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +17 -17
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +4 -4
- package/dist/Provider.css +5 -5
- package/dist/Provider.mjs +4 -4
- package/dist/Radio.cjs +80 -152
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +96 -240
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +80 -152
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +47 -47
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +41 -41
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +47 -47
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeSlider.cjs.map +1 -1
- package/dist/RangeSlider.mjs.map +1 -1
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +47 -47
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +42 -42
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +89 -101
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +92 -140
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +89 -101
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +196 -229
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +149 -221
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +196 -229
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +56 -56
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs +56 -56
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs +74 -107
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +69 -141
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +74 -107
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +253 -280
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +163 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +253 -280
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +112 -124
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +84 -108
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +112 -124
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +105 -105
- package/dist/TabsPicker.css +111 -111
- package/dist/TabsPicker.mjs +105 -105
- package/dist/TagGroup.cjs +148 -148
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +134 -134
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +148 -148
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +62 -62
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +59 -59
- package/dist/TextField.mjs.map +1 -1
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +3 -3
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +57 -60
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +71 -83
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +57 -60
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +217 -244
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +166 -190
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +220 -244
- package/dist/TreeView.mjs.map +1 -1
- package/dist/main.cjs +1 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +2 -2
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +77 -72
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs.map +1 -1
- package/icons/Icon.mjs.map +1 -1
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +5 -5
- package/icons/Skeleton.css.map +1 -1
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionButton.tsx +2 -2
- package/src/ActionMenu.tsx +1 -1
- package/src/Avatar.tsx +1 -1
- package/src/AvatarGroup.tsx +1 -1
- package/src/Breadcrumbs.tsx +4 -4
- package/src/Button.tsx +4 -4
- package/src/ButtonGroup.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +1 -1
- package/src/CheckboxGroup.tsx +2 -2
- package/src/CloseButton.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +1 -1
- package/src/Content.tsx +7 -7
- package/src/ContextualHelp.tsx +2 -2
- package/src/Disclosure.tsx +1 -1
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +2 -2
- package/src/Field.tsx +1 -1
- package/src/Form.tsx +2 -2
- package/src/Icon.tsx +2 -2
- package/src/IllustratedMessage.tsx +1 -1
- package/src/Image.tsx +1 -1
- package/src/Link.tsx +2 -2
- package/src/Menu.tsx +4 -3
- package/src/Meter.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RadioGroup.tsx +2 -2
- package/src/RangeSlider.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SegmentedControl.tsx +2 -2
- package/src/Skeleton.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/StatusLight.tsx +2 -2
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +1 -1
- package/src/Tabs.tsx +16 -16
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +2 -2
- package/src/ToggleButton.tsx +2 -2
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +3 -3
- package/src/TreeView.tsx +97 -144
- package/src/index.ts +1 -1
- package/style/__tests__/style-macro.test.js +18 -18
- package/style/dist/spectrum-theme.cjs +10 -20
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +10 -20
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +0 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +11 -19
package/dist/ActionButton.mjs
CHANGED
|
@@ -40,71 +40,71 @@ 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)(?:
|
|
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 $
|
|
46
|
-
let $
|
|
47
|
-
let $
|
|
48
|
-
let $
|
|
49
|
-
let $
|
|
45
|
+
let $_9 = false;
|
|
46
|
+
let $__a = false;
|
|
47
|
+
let $h = false;
|
|
48
|
+
let $q = false;
|
|
49
|
+
let $__R = false;
|
|
50
50
|
for (let p of matches){
|
|
51
|
-
if (/^\s*
|
|
52
|
-
if (/^\s*
|
|
53
|
-
if (/^\s*
|
|
54
|
-
if (/^\s*
|
|
55
|
-
if (/^\s*
|
|
51
|
+
if (/^\s*_9/.test(p)) $_9 = true;
|
|
52
|
+
if (/^\s*__a/.test(p)) $__a = true;
|
|
53
|
+
if (/^\s*h/.test(p)) $h = true;
|
|
54
|
+
if (/^\s*q/.test(p)) $q = true;
|
|
55
|
+
if (/^\s*__R/.test(p)) $__R = true;
|
|
56
56
|
}
|
|
57
|
-
if (props.isFocusVisible) rules += '
|
|
58
|
-
else rules += '
|
|
59
|
-
rules += '
|
|
60
|
-
if (props.isStaticColor) rules += '
|
|
61
|
-
else rules += '
|
|
62
|
-
rules += '
|
|
63
|
-
rules += '
|
|
57
|
+
if (props.isFocusVisible) rules += ' _Mb';
|
|
58
|
+
else rules += ' _Ma';
|
|
59
|
+
rules += ' da_____M';
|
|
60
|
+
if (props.isStaticColor) rules += ' d_____G';
|
|
61
|
+
else rules += ' dx';
|
|
62
|
+
rules += ' _Oc';
|
|
63
|
+
rules += ' _N-3t1z';
|
|
64
64
|
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
65
65
|
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
66
|
+
rules += ' _0d';
|
|
67
|
+
rules += ' _2c';
|
|
66
68
|
rules += ' _3d';
|
|
67
|
-
rules += '
|
|
68
|
-
rules += '
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (props.isInGroup) rules += ' __c-3t1x';
|
|
73
|
-
else rules += ' __c-3t1y';
|
|
69
|
+
rules += ' jbH';
|
|
70
|
+
rules += ' jG';
|
|
71
|
+
if (!$_9) {
|
|
72
|
+
if (props.isInGroup) rules += ' _9-3t1x';
|
|
73
|
+
else rules += ' _9-3t1y';
|
|
74
74
|
}
|
|
75
|
-
if (!$
|
|
76
|
-
if (props.isJustified) rules += '
|
|
75
|
+
if (!$__a) {
|
|
76
|
+
if (props.isJustified) rules += ' __a-3t1y';
|
|
77
77
|
}
|
|
78
|
-
if (!$
|
|
79
|
-
if (props.isJustified) rules += '
|
|
78
|
+
if (!$h) {
|
|
79
|
+
if (props.isJustified) rules += ' ha';
|
|
80
80
|
}
|
|
81
|
-
rules += '
|
|
82
|
-
rules += '
|
|
83
|
-
rules += '
|
|
84
|
-
rules += '
|
|
85
|
-
rules += '
|
|
86
|
-
rules += '
|
|
87
|
-
rules += '
|
|
88
|
-
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';
|
|
89
89
|
if (props.size === "XL") {
|
|
90
|
-
rules += '
|
|
91
|
-
rules += '
|
|
90
|
+
rules += ' _ebj';
|
|
91
|
+
rules += ' _ei';
|
|
92
92
|
} else if (props.size === "L") {
|
|
93
|
-
rules += '
|
|
94
|
-
rules += '
|
|
93
|
+
rules += ' _ebh';
|
|
94
|
+
rules += ' _eg';
|
|
95
95
|
} else if (props.size === "S") {
|
|
96
|
-
rules += '
|
|
97
|
-
rules += '
|
|
96
|
+
rules += ' _ebd';
|
|
97
|
+
rules += ' _ec';
|
|
98
98
|
} else if (props.size === "XS") {
|
|
99
|
-
rules += '
|
|
100
|
-
rules += '
|
|
99
|
+
rules += ' _ebb';
|
|
100
|
+
rules += ' _ea';
|
|
101
101
|
} else {
|
|
102
|
-
rules += '
|
|
103
|
-
rules += '
|
|
102
|
+
rules += ' _ebf';
|
|
103
|
+
rules += ' _ee';
|
|
104
104
|
}
|
|
105
|
-
rules += '
|
|
106
|
-
rules += '
|
|
107
|
-
rules += '
|
|
105
|
+
rules += ' _fc';
|
|
106
|
+
rules += ' _g-1x99dlob';
|
|
107
|
+
rules += ' _ga';
|
|
108
108
|
if (props.isDisabled) rules += ' aa_____O';
|
|
109
109
|
else if (props.isSelected) rules += ' aa_____N';
|
|
110
110
|
else rules += ' aa_____K';
|
|
@@ -127,52 +127,52 @@ const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, over
|
|
|
127
127
|
else if (props.isHovered) rules += ' ao';
|
|
128
128
|
else rules += ' an';
|
|
129
129
|
}
|
|
130
|
-
rules += '
|
|
131
|
-
rules += '
|
|
132
|
-
if (!$
|
|
133
|
-
if (props.size === "XL") rules += '
|
|
134
|
-
else if (props.size === "L") rules += '
|
|
135
|
-
else if (props.size === "S") rules += '
|
|
136
|
-
else if (props.size === "XS") rules += '
|
|
137
|
-
else rules += '
|
|
130
|
+
rules += ' __Ea';
|
|
131
|
+
rules += ' k-375toq';
|
|
132
|
+
if (!$q) {
|
|
133
|
+
if (props.size === "XL") rules += ' qj';
|
|
134
|
+
else if (props.size === "L") rules += ' qi';
|
|
135
|
+
else if (props.size === "S") rules += ' qh';
|
|
136
|
+
else if (props.size === "XS") rules += ' qg';
|
|
137
|
+
else rules += ' qf';
|
|
138
138
|
}
|
|
139
|
+
rules += ' _Pa';
|
|
140
|
+
rules += ' _R-375x7f';
|
|
139
141
|
rules += ' _Sa';
|
|
140
|
-
rules += '
|
|
141
|
-
rules += ' _Va';
|
|
142
|
-
rules += ' _Db';
|
|
142
|
+
rules += ' _Ab';
|
|
143
143
|
rules += ' b-375toh';
|
|
144
|
-
rules += ' -
|
|
145
|
-
rules += '
|
|
146
|
-
rules += '
|
|
147
|
-
rules += '
|
|
148
|
-
rules += '
|
|
149
|
-
rules += '
|
|
150
|
-
rules += '
|
|
151
|
-
rules += '
|
|
144
|
+
rules += ' -rwx0fg_e-b';
|
|
145
|
+
rules += ' wf';
|
|
146
|
+
rules += ' C-1imc51ya';
|
|
147
|
+
rules += ' CI';
|
|
148
|
+
rules += ' D-1imc51ya';
|
|
149
|
+
rules += ' DI';
|
|
150
|
+
rules += ' Ea';
|
|
151
|
+
rules += ' Fa';
|
|
152
152
|
if (props.density === "compact") {
|
|
153
|
-
rules += '
|
|
154
|
-
rules += '
|
|
155
|
-
} else rules += '
|
|
153
|
+
rules += ' _w-13alit4h';
|
|
154
|
+
rules += ' _wa';
|
|
155
|
+
} else rules += ' _wh';
|
|
156
156
|
if (props.density === "compact") {
|
|
157
|
-
if (props.orientation === "vertical") rules += '
|
|
158
|
-
else if (props.orientation === "horizontal") rules += '
|
|
159
|
-
else rules += '
|
|
160
|
-
} else rules += '
|
|
157
|
+
if (props.orientation === "vertical") rules += ' _x-13alit4h';
|
|
158
|
+
else if (props.orientation === "horizontal") rules += ' _x-uamghwh';
|
|
159
|
+
else rules += ' _xa';
|
|
160
|
+
} else rules += ' _xh';
|
|
161
161
|
if (props.density === "compact") {
|
|
162
|
-
if (props.orientation === "vertical") rules += '
|
|
163
|
-
else if (props.orientation === "horizontal") rules += '
|
|
164
|
-
else rules += '
|
|
165
|
-
} else rules += '
|
|
162
|
+
if (props.orientation === "vertical") rules += ' _y-uamghwh';
|
|
163
|
+
else if (props.orientation === "horizontal") rules += ' _y-13alit4h';
|
|
164
|
+
else rules += ' _ya';
|
|
165
|
+
} else rules += ' _yh';
|
|
166
166
|
if (props.density === "compact") {
|
|
167
|
-
rules += '
|
|
168
|
-
rules += '
|
|
169
|
-
} else rules += '
|
|
170
|
-
rules += ' -
|
|
171
|
-
rules += ' -
|
|
172
|
-
if (!$
|
|
173
|
-
if (props.isFocusVisible) rules += '
|
|
167
|
+
rules += ' _z-uamghwh';
|
|
168
|
+
rules += ' _za';
|
|
169
|
+
} else rules += ' _zh';
|
|
170
|
+
rules += ' -oelgqu_A--1imc51ya';
|
|
171
|
+
rules += ' -oelgqu_A--177861o';
|
|
172
|
+
if (!$__R) {
|
|
173
|
+
if (props.isFocusVisible) rules += ' __R-3t1z';
|
|
174
174
|
}
|
|
175
|
-
rules += '
|
|
175
|
+
rules += ' __S-yksgrp';
|
|
176
176
|
if (props.isSelected) {
|
|
177
177
|
if (props.isDisabled) rules += ' -_375toh_b-a_____J';
|
|
178
178
|
else rules += ' -_375toh_b-a_____M';
|
|
@@ -215,11 +215,11 @@ const $da878a05ab4a403e$export$446543cff2a0f496 = function anonymous(props, over
|
|
|
215
215
|
else if (props.isQuiet) rules += ' -_375toh_b-a';
|
|
216
216
|
else rules += ' -_375toh_b-g';
|
|
217
217
|
}
|
|
218
|
-
if (props.size === "XL") rules += ' -
|
|
219
|
-
else if (props.size === "L") rules += ' -
|
|
220
|
-
else if (props.size === "S") rules += ' -
|
|
221
|
-
else if (props.size === "XS") rules += ' -
|
|
222
|
-
else rules += ' -
|
|
218
|
+
if (props.size === "XL") rules += ' -_375toq_k-j';
|
|
219
|
+
else if (props.size === "L") rules += ' -_375toq_k-i';
|
|
220
|
+
else if (props.size === "S") rules += ' -_375toq_k-h';
|
|
221
|
+
else if (props.size === "XS") rules += ' -_375toq_k-g';
|
|
222
|
+
else rules += ' -_375toq_k-f';
|
|
223
223
|
return rules;
|
|
224
224
|
};
|
|
225
225
|
// Matching icon sizes. TBD.
|
|
@@ -266,7 +266,7 @@ const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwa
|
|
|
266
266
|
[
|
|
267
267
|
(0, $8e847109a6ab556d$export$9afb8bc826b033ea),
|
|
268
268
|
{
|
|
269
|
-
styles: "
|
|
269
|
+
styles: " E-1gogtue F-1gogtue __B-3t1y __wb __xb _na _qb"
|
|
270
270
|
}
|
|
271
271
|
],
|
|
272
272
|
[
|
|
@@ -274,16 +274,16 @@ const $da878a05ab4a403e$export$cfc7921d29ef7b80 = /*#__PURE__*/ (0, $hl1Zj$forwa
|
|
|
274
274
|
{
|
|
275
275
|
render: (0, $1f4b04be3f24aae3$export$9d7e2342a7e53afa)({
|
|
276
276
|
slot: 'icon',
|
|
277
|
-
styles: "
|
|
277
|
+
styles: " __B-3t1x"
|
|
278
278
|
}),
|
|
279
|
-
styles: "
|
|
279
|
+
styles: " l-1sthc3k k-1sthc3k y-oelgqu _9-3t1x"
|
|
280
280
|
}
|
|
281
281
|
],
|
|
282
282
|
[
|
|
283
283
|
(0, $3ffa2cd930156220$export$a20dad690e1279e2),
|
|
284
284
|
{
|
|
285
285
|
size: $da878a05ab4a403e$var$avatarSize[size],
|
|
286
|
-
styles: "
|
|
286
|
+
styles: " y-oelgqu _9-3t1x __B-3t1x"
|
|
287
287
|
}
|
|
288
288
|
]
|
|
289
289
|
],
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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,EAAkF;AAM1H,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<Partial<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,18 +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)(?:
|
|
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 += '
|
|
36
|
-
if (props.density === "regular") {
|
|
37
|
-
if (props.size === "XL") rules += ' hd';
|
|
38
|
-
else if (props.size === "L") rules += ' hd';
|
|
39
|
-
else if (props.size === "M") rules += ' hd';
|
|
40
|
-
else if (props.size === "S") rules += ' hc';
|
|
41
|
-
else if (props.size === "XS") rules += ' hc';
|
|
42
|
-
} else if (props.density === "compact") rules += ' hb';
|
|
33
|
+
rules += ' _0d';
|
|
34
|
+
if (props.orientation === "vertical") rules += ' _7b';
|
|
35
|
+
else if (props.orientation === "horizontal") rules += ' _7a';
|
|
43
36
|
if (props.density === "regular") {
|
|
44
37
|
if (props.size === "XL") rules += ' id';
|
|
45
38
|
else if (props.size === "L") rules += ' id';
|
|
@@ -47,6 +40,13 @@ const $7a26131f6144af2b$export$641cbcd1f6f6802f = function anonymous(props, over
|
|
|
47
40
|
else if (props.size === "S") rules += ' ic';
|
|
48
41
|
else if (props.size === "XS") rules += ' ic';
|
|
49
42
|
} else if (props.density === "compact") rules += ' ib';
|
|
43
|
+
if (props.density === "regular") {
|
|
44
|
+
if (props.size === "XL") rules += ' jd';
|
|
45
|
+
else if (props.size === "L") rules += ' jd';
|
|
46
|
+
else if (props.size === "M") rules += ' jd';
|
|
47
|
+
else if (props.size === "S") rules += ' jc';
|
|
48
|
+
else if (props.size === "XS") rules += ' jc';
|
|
49
|
+
} else if (props.density === "compact") rules += ' jb';
|
|
50
50
|
return rules;
|
|
51
51
|
};
|
|
52
52
|
const $7a26131f6144af2b$export$33f5f2f2cb85d743 = /*#__PURE__*/ (0, $jGK4W$react.createContext)(null);
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._0d {
|
|
3
3
|
display: flex;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._7a {
|
|
7
7
|
flex-direction: row;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
._7b {
|
|
11
11
|
flex-direction: column;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.ib {
|
|
15
15
|
row-gap: .125rem;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.ic {
|
|
19
19
|
row-gap: .25rem;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
.id {
|
|
23
23
|
row-gap: .5rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.jb {
|
|
27
27
|
column-gap: .125rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.jc {
|
|
31
31
|
column-gap: .25rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
.jd {
|
|
35
35
|
column-gap: .5rem;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -20,18 +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)(?:
|
|
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 += '
|
|
28
|
-
if (props.density === "regular") {
|
|
29
|
-
if (props.size === "XL") rules += ' hd';
|
|
30
|
-
else if (props.size === "L") rules += ' hd';
|
|
31
|
-
else if (props.size === "M") rules += ' hd';
|
|
32
|
-
else if (props.size === "S") rules += ' hc';
|
|
33
|
-
else if (props.size === "XS") rules += ' hc';
|
|
34
|
-
} else if (props.density === "compact") rules += ' hb';
|
|
25
|
+
rules += ' _0d';
|
|
26
|
+
if (props.orientation === "vertical") rules += ' _7b';
|
|
27
|
+
else if (props.orientation === "horizontal") rules += ' _7a';
|
|
35
28
|
if (props.density === "regular") {
|
|
36
29
|
if (props.size === "XL") rules += ' id';
|
|
37
30
|
else if (props.size === "L") rules += ' id';
|
|
@@ -39,6 +32,13 @@ const $10401bdc118cbc90$export$641cbcd1f6f6802f = function anonymous(props, over
|
|
|
39
32
|
else if (props.size === "S") rules += ' ic';
|
|
40
33
|
else if (props.size === "XS") rules += ' ic';
|
|
41
34
|
} else if (props.density === "compact") rules += ' ib';
|
|
35
|
+
if (props.density === "regular") {
|
|
36
|
+
if (props.size === "XL") rules += ' jd';
|
|
37
|
+
else if (props.size === "L") rules += ' jd';
|
|
38
|
+
else if (props.size === "M") rules += ' jd';
|
|
39
|
+
else if (props.size === "S") rules += ' jc';
|
|
40
|
+
else if (props.size === "XS") rules += ' jc';
|
|
41
|
+
} else if (props.density === "compact") rules += ' jb';
|
|
42
42
|
return rules;
|
|
43
43
|
};
|
|
44
44
|
const $10401bdc118cbc90$export$33f5f2f2cb85d743 = /*#__PURE__*/ (0, $aTsYn$createContext)(null);
|
package/dist/ActionMenu.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,0BAAY,EAAqF;AAK3H,MAAM,4CAA0B,AAAb,WAAW,GAAG,CAAA,GAAA,uBAAS,EAAqB,SAAS,WAA6B,KAAyB,EAAE,GAAoC;IACzK,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,oCAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iCAAC,CAAA,GAAA,qCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gCAAC,CAAA,GAAA,sCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gCAAC,CAAA,GAAA,iCAAO;;0BAEV,gCAAC,CAAA,GAAA,8BAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<Partial<ActionMenuProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nexport const ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(function ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n});\n"],"names":[],"version":3,"file":"ActionMenu.cjs.map"}
|
package/dist/ActionMenu.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AAwBM,MAAM,0DAAoB,CAAA,GAAA,oBAAY,EAAqF;AAK3H,MAAM,4CAA0B,AAAb,WAAW,GAAG,CAAA,GAAA,iBAAS,EAAqB,SAAS,WAA6B,KAAyB,EAAE,GAAoC;IACzK,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,qBAAa,EAAE,OAAO;QAAC,WAAW;IAAI;IACxD,IAAI,WAAW,CAAC,aAAa,KAAK,WAChC,WAAW,CAAC,aAAa,GAAG,gBAAgB,MAAM,CAAC;IAGrD,qBACE,iBAAC,CAAA,GAAA,yCAAU;QACT,QAAQ,MAAM,MAAM;QACpB,aAAa,MAAM,WAAW;QAC9B,cAAc,MAAM,YAAY;QAChC,OAAO,MAAM,KAAK;QAClB,WAAW,MAAM,SAAS;QAC1B,YAAY,MAAM,UAAU;;0BAC5B,gBAAC,CAAA,GAAA,yCAAW;gBACV,KAAK;gBACL,MAAM,MAAM,IAAI;gBAChB,YAAY,MAAM,UAAU;gBAC5B,WAAW,MAAM,SAAS;gBAC1B,SAAS,MAAM,OAAO;gBACtB,QAAQ,MAAM,MAAM;gBACnB,GAAG,WAAW;0BACf,cAAA,gBAAC,CAAA,GAAA,wCAAO;;0BAEV,gBAAC,CAAA,GAAA,yCAAG;gBACF,OAAO,MAAM,KAAK;gBAClB,cAAc,MAAM,YAAY;gBAChC,UAAU,MAAM,QAAQ;gBACxB,MAAM,MAAM,QAAQ;0BACnB,MAAM,QAAQ;;;;AAIvB","sources":["packages/@react-spectrum/s2/src/ActionMenu.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 {ActionButton, ActionButtonProps} from './ActionButton';\nimport {AriaLabelingProps, DOMProps, FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {forwardRefType} from './types';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Menu, MenuProps, MenuTrigger, MenuTriggerProps} from './Menu';\nimport MoreIcon from '../s2wf-icons/S2_Icon_More_20_N.svg';\nimport {StyleProps} from './style-utils' with { type: 'macro' };\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ActionMenuProps<T> extends\n Pick<MenuTriggerProps, 'isOpen' | 'defaultOpen' | 'onOpenChange' | 'align' | 'direction' | 'shouldFlip'>,\n Pick<MenuProps<T>, 'children' | 'items' | 'disabledKeys' | 'onAction'>,\n Pick<ActionButtonProps, 'isDisabled' | 'isQuiet' | 'autoFocus' | 'size'>,\n StyleProps, DOMProps, AriaLabelingProps {\n menuSize?: 'S' | 'M' | 'L' | 'XL'\n}\n\nexport const ActionMenuContext = createContext<ContextValue<Partial<ActionMenuProps<any>>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * ActionMenu combines an ActionButton with a Menu for simple \"more actions\" use cases.\n */\nexport const ActionMenu = /*#__PURE__*/(forwardRef as forwardRefType)(function ActionMenu<T extends object>(props: ActionMenuProps<T>, ref: FocusableRef<HTMLButtonElement>) {\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n [props, ref] = useSpectrumContextProps(props, ref, ActionMenuContext);\n let buttonProps = filterDOMProps(props, {labelable: true});\n if (buttonProps['aria-label'] === undefined) {\n buttonProps['aria-label'] = stringFormatter.format('menu.moreActions');\n }\n\n return (\n <MenuTrigger\n isOpen={props.isOpen}\n defaultOpen={props.defaultOpen}\n onOpenChange={props.onOpenChange}\n align={props.align}\n direction={props.direction}\n shouldFlip={props.shouldFlip}>\n <ActionButton\n ref={ref}\n size={props.size}\n isDisabled={props.isDisabled}\n autoFocus={props.autoFocus}\n isQuiet={props.isQuiet}\n styles={props.styles}\n {...buttonProps}>\n <MoreIcon />\n </ActionButton>\n <Menu\n items={props.items}\n disabledKeys={props.disabledKeys}\n onAction={props.onAction}\n size={props.menuSize}>\n {props.children}\n </Menu>\n </MenuTrigger>\n );\n});\n"],"names":[],"version":3,"file":"ActionMenu.mjs.map"}
|
package/dist/AlertDialog.cjs
CHANGED
|
@@ -50,9 +50,9 @@ $parcel$export(module.exports, "AlertDialog", () => $d67aa10f4fac9e2b$export$de4
|
|
|
50
50
|
|
|
51
51
|
const $d67aa10f4fac9e2b$var$icon = function anonymous(props) {
|
|
52
52
|
let rules = " .";
|
|
53
|
-
rules += '
|
|
54
|
-
if (props.variant === "warning") rules += ' -
|
|
55
|
-
else if (props.variant === "error") rules += ' -
|
|
53
|
+
rules += ' zd';
|
|
54
|
+
if (props.variant === "warning") rules += ' -rwx0fg_e-g';
|
|
55
|
+
else if (props.variant === "error") rules += ' -rwx0fg_e-e';
|
|
56
56
|
return rules;
|
|
57
57
|
};
|
|
58
58
|
const $d67aa10f4fac9e2b$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $dZ5J1$react.forwardRef)(function AlertDialog(props, ref) {
|
package/dist/AlertDialog.css
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.zd {
|
|
3
3
|
margin-inline-end: .5rem;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.-
|
|
6
|
+
.-rwx0fg_e-e {
|
|
7
7
|
--iconPrimary: var(--lightningcss-light, #f03823) var(--lightningcss-dark, #fc432e);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.-
|
|
10
|
+
.-rwx0fg_e-g {
|
|
11
11
|
--iconPrimary: var(--lightningcss-light, #d45b00) var(--lightningcss-dark, #e06400);
|
|
12
12
|
}
|
|
13
13
|
}
|
package/dist/AlertDialog.mjs
CHANGED
|
@@ -44,9 +44,9 @@ function $parcel$interopDefault(a) {
|
|
|
44
44
|
|
|
45
45
|
const $94a8ad475d9a330c$var$icon = function anonymous(props) {
|
|
46
46
|
let rules = " .";
|
|
47
|
-
rules += '
|
|
48
|
-
if (props.variant === "warning") rules += ' -
|
|
49
|
-
else if (props.variant === "error") rules += ' -
|
|
47
|
+
rules += ' zd';
|
|
48
|
+
if (props.variant === "warning") rules += ' -rwx0fg_e-g';
|
|
49
|
+
else if (props.variant === "error") rules += ' -rwx0fg_e-e';
|
|
50
50
|
return rules;
|
|
51
51
|
};
|
|
52
52
|
const $94a8ad475d9a330c$export$de466dd8317b0b75 = /*#__PURE__*/ (0, $2iZqV$forwardRef)(function AlertDialog(props, ref) {
|
package/dist/Avatar.cjs
CHANGED
|
@@ -31,28 +31,28 @@ $parcel$export(module.exports, "Avatar", () => $38071d9ce246d4cf$export$e2255cf6
|
|
|
31
31
|
|
|
32
32
|
const $38071d9ce246d4cf$var$imageStyles = function anonymous(props, overrides) {
|
|
33
33
|
let rules = " .";
|
|
34
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
34
|
+
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)[^\s]+/g) || [];
|
|
35
35
|
rules += matches.join('');
|
|
36
|
-
let $
|
|
37
|
-
let $
|
|
36
|
+
let $_9 = false;
|
|
37
|
+
let $__a = false;
|
|
38
38
|
for (let p of matches){
|
|
39
|
-
if (/^\s*
|
|
40
|
-
if (/^\s*
|
|
39
|
+
if (/^\s*_9/.test(p)) $_9 = true;
|
|
40
|
+
if (/^\s*__a/.test(p)) $__a = true;
|
|
41
41
|
}
|
|
42
|
+
rules += ' _wf';
|
|
43
|
+
rules += ' _xf';
|
|
44
|
+
rules += ' _yf';
|
|
42
45
|
rules += ' _zf';
|
|
43
|
-
rules += '
|
|
44
|
-
rules += ' _Bf';
|
|
45
|
-
rules += ' _Cf';
|
|
46
|
+
rules += ' lI';
|
|
46
47
|
rules += ' kI';
|
|
47
|
-
rules += '
|
|
48
|
-
if (!$
|
|
49
|
-
|
|
50
|
-
rules += '
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
rules += '
|
|
54
|
-
|
|
55
|
-
else rules += ' _Rb';
|
|
48
|
+
if (!$_9) rules += ' _9-3t1x';
|
|
49
|
+
if (!$__a) rules += ' __a-3t1x';
|
|
50
|
+
rules += ' __S-yksgrp';
|
|
51
|
+
if (props.isOverBackground) rules += ' _Mb';
|
|
52
|
+
else rules += ' _Ma';
|
|
53
|
+
rules += ' d-1de2x0q';
|
|
54
|
+
if (props.isLarge) rules += ' _Oc';
|
|
55
|
+
else rules += ' _Ob';
|
|
56
56
|
return rules;
|
|
57
57
|
};
|
|
58
58
|
const $38071d9ce246d4cf$export$a20dad690e1279e2 = /*#__PURE__*/ (0, $1YWJ0$react.createContext)(null);
|
package/dist/Avatar.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,0BAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AA4BD,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBC,MAAM,0DAAgB,CAAA,GAAA,0BAAY,EAAqE;AAKvG,MAAM,0DAAS,CAAA,GAAA,uBAAS,EAAE,SAAS,OAAO,KAAkB,EAAE,GAA6B;IAChG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,OACF,MAAM,SACN,GAAG,gBACH,YAAY,oBACZ,mBAAmB,UACnB,OAAO,sBACP,gBAAgB,QAChB,OAAO,UACP,GAAG,YACJ,GAAG;IACJ,MAAM,WAAW,CAAA,GAAA,oCAAa,EAAE;IAEhC,IAAI,UAAU,OAAO,KAAK;IAC1B,IAAI,UAAU,QAAQ;IACtB,qBACE,gCAAC,CAAA,GAAA,+BAAI;QACF,GAAG,QAAQ;QACZ,KAAK;QACL,MAAM;QACN,KAAK;QACL,cAAc;YACZ,GAAG,YAAY;YACf,OAAO;YACP,QAAQ;QACV;QACA,kBAAkB;QAClB,QAAQ,kCAAY;8BAAC;qBAAkB;QAAO,GAAG,MAAM,MAAM;QAC7D,KAAK;;AAEX","sources":["packages/@react-spectrum/s2/src/Avatar.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 {ContextValue, SlotProps} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport {DOMProps, DOMRef, DOMRefValue} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {getAllowedOverrides, StylesPropWithoutWidth, UnsafeStyles} from './style-utils' with {type: 'macro'};\nimport {Image} from './Image';\nimport {style} from '../style' with { type: 'macro' };\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps {\n /** Text description of the avatar. */\n alt?: string,\n /** The image URL for the avatar. */\n src?: string,\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithoutWidth,\n /**\n * The size of the avatar.\n * @default 24\n */\n size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}),\n /** Whether the avatar is over a color background. */\n isOverBackground?: boolean\n}\n\nconst imageStyles = style({\n borderRadius: 'full',\n size: 20,\n flexShrink: 0,\n flexGrow: 0,\n disableTapHighlight: true,\n outlineStyle: {\n default: 'none',\n isOverBackground: 'solid'\n },\n outlineColor: '--s2-container-bg',\n outlineWidth: {\n default: 1,\n isLarge: 2\n }\n}, getAllowedOverrides({width: false}));\n\nexport const AvatarContext = createContext<ContextValue<Partial<AvatarProps>, DOMRefValue<HTMLImageElement>>>(null);\n\n/**\n * An avatar is a thumbnail representation of an entity, such as a user or an organization.\n */\nexport const Avatar = forwardRef(function Avatar(props: AvatarProps, ref: DOMRef<HTMLImageElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, AvatarContext);\n let domRef = useDOMRef(ref);\n let {\n alt = '',\n src,\n UNSAFE_style,\n UNSAFE_className = '',\n size = 24,\n isOverBackground,\n slot = 'avatar',\n ...otherProps\n } = props;\n const domProps = filterDOMProps(otherProps);\n\n let remSize = size / 16 + 'rem';\n let isLarge = size >= 64;\n return (\n <Image\n {...domProps}\n ref={domRef}\n slot={slot}\n alt={alt}\n UNSAFE_style={{\n ...UNSAFE_style,\n width: remSize,\n height: remSize\n }}\n UNSAFE_className={UNSAFE_className}\n styles={imageStyles({isOverBackground, isLarge}, props.styles)}\n src={src} />\n );\n});\n"],"names":[],"version":3,"file":"Avatar.cjs.map"}
|