@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/CloseButton.cjs
CHANGED
|
@@ -44,51 +44,51 @@ const $2f907cb84c6e9e75$var$hoverBackground = {
|
|
|
44
44
|
};
|
|
45
45
|
const $2f907cb84c6e9e75$var$styles = function anonymous(props, overrides) {
|
|
46
46
|
let rules = " .";
|
|
47
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
47
|
+
let matches = (overrides || '').match(/(?:^|\s)(?:y|z|A|B|__a|_9|h|_6|_5|__B|__d|__e|__b|__c|V|__R|Y|_a|W|X|l|q|r)[^\s]+/g) || [];
|
|
48
48
|
rules += matches.join('');
|
|
49
|
-
let $
|
|
50
|
-
let $
|
|
49
|
+
let $l = false;
|
|
50
|
+
let $_9 = false;
|
|
51
51
|
for (let p of matches){
|
|
52
|
-
if (/^\s*
|
|
53
|
-
if (/^\s*
|
|
52
|
+
if (/^\s*l/.test(p)) $l = true;
|
|
53
|
+
if (/^\s*_9/.test(p)) $_9 = true;
|
|
54
54
|
}
|
|
55
|
-
if (props.isFocusVisible) rules += '
|
|
56
|
-
else rules += '
|
|
57
|
-
rules += '
|
|
58
|
-
if (props.isStaticColor) rules += '
|
|
59
|
-
else rules += '
|
|
60
|
-
rules += '
|
|
61
|
-
rules += '
|
|
55
|
+
if (props.isFocusVisible) rules += ' _Mb';
|
|
56
|
+
else rules += ' _Ma';
|
|
57
|
+
rules += ' da_____M';
|
|
58
|
+
if (props.isStaticColor) rules += ' d_____G';
|
|
59
|
+
else rules += ' dx';
|
|
60
|
+
rules += ' _Oc';
|
|
61
|
+
rules += ' _N-3t1z';
|
|
62
62
|
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
63
63
|
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
64
|
+
rules += ' _0d';
|
|
65
|
+
rules += ' _2c';
|
|
64
66
|
rules += ' _3d';
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (props.size === "
|
|
69
|
-
else if (props.size === "
|
|
70
|
-
else
|
|
71
|
-
else if (props.size === "XS") rules += ' kg';
|
|
72
|
-
else rules += ' kf';
|
|
67
|
+
if (!$l) {
|
|
68
|
+
if (props.size === "XL") rules += ' lj';
|
|
69
|
+
else if (props.size === "L") rules += ' li';
|
|
70
|
+
else if (props.size === "S") rules += ' lh';
|
|
71
|
+
else if (props.size === "XS") rules += ' lg';
|
|
72
|
+
else rules += ' lf';
|
|
73
73
|
}
|
|
74
|
-
if (props.size === "XL") rules += '
|
|
75
|
-
else if (props.size === "L") rules += '
|
|
76
|
-
else if (props.size === "S") rules += '
|
|
77
|
-
else if (props.size === "XS") rules += '
|
|
78
|
-
else rules += '
|
|
79
|
-
if (!$
|
|
74
|
+
if (props.size === "XL") rules += ' kj';
|
|
75
|
+
else if (props.size === "L") rules += ' ki';
|
|
76
|
+
else if (props.size === "S") rules += ' kh';
|
|
77
|
+
else if (props.size === "XS") rules += ' kg';
|
|
78
|
+
else rules += ' kf';
|
|
79
|
+
if (!$_9) rules += ' _9-3t1x';
|
|
80
|
+
rules += ' _wf';
|
|
81
|
+
rules += ' _xf';
|
|
82
|
+
rules += ' _yf';
|
|
80
83
|
rules += ' _zf';
|
|
81
|
-
rules += '
|
|
82
|
-
rules += ' _Bf';
|
|
83
|
-
rules += ' _Cf';
|
|
84
|
-
rules += ' Ha';
|
|
85
|
-
rules += ' Ia';
|
|
84
|
+
rules += ' Ea';
|
|
86
85
|
rules += ' Fa';
|
|
87
|
-
rules += '
|
|
88
|
-
rules += '
|
|
86
|
+
rules += ' Ca';
|
|
87
|
+
rules += ' Da';
|
|
88
|
+
rules += ' wf';
|
|
89
|
+
rules += ' _Pa';
|
|
90
|
+
rules += ' _R-375x7f';
|
|
89
91
|
rules += ' _Sa';
|
|
90
|
-
rules += ' _U-375x7f';
|
|
91
|
-
rules += ' _Va';
|
|
92
92
|
if (props.isPressed) {
|
|
93
93
|
if (props.isStaticColor) rules += ' b_____y';
|
|
94
94
|
else rules += ' bh';
|
package/dist/CloseButton.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCC,MAAM,0DAAqB,CAAA,GAAA,0BAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCC,MAAM,0DAAqB,CAAA,GAAA,0BAAY,EAAiF;AAKxH,MAAM,0DAAc,CAAA,GAAA,uBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,KAAK,CAAC,aAAa,IAAI,gBAAgB,MAAM,CAAC;QAC1D,OAAO,CAAA,GAAA,oCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;gBAAE,eAAe,CAAC,CAAC,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBACtJ,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled' | 'onPress'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\nconst hoverBackground = {\n default: 'gray-200',\n isStaticColor: 'transparent-overlay-200'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<Partial<CloseButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={props['aria-label'] || stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.cjs.map"}
|
package/dist/CloseButton.css
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
._Ma {
|
|
3
3
|
outline-style: none;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
._Mb {
|
|
7
7
|
outline-style: solid;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.dx {
|
|
11
11
|
outline-color: var(--lightningcss-light, #4b75ff) var(--lightningcss-dark, #4069fd);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.d_____G {
|
|
15
15
|
outline-color: lch(from var(--s2-container-bg) calc((49.44 - l) * infinity) 0 0 / 1);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
._Oc {
|
|
19
19
|
outline-width: 2px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
._N-3t1z {
|
|
23
23
|
outline-offset: 2px;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -31,107 +31,107 @@
|
|
|
31
31
|
--s2-container-bg: black;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
._0d {
|
|
35
35
|
display: flex;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
._2c {
|
|
39
39
|
align-items: center;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
._3d {
|
|
43
43
|
justify-content: center;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
.lf {
|
|
47
47
|
width: calc(2rem * var(--s2-scale));
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
.lg {
|
|
51
51
|
width: calc(1.25rem * var(--s2-scale));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
.lh {
|
|
55
55
|
width: calc(1.5rem * var(--s2-scale));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.
|
|
58
|
+
.li {
|
|
59
59
|
width: calc(2.5rem * var(--s2-scale));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.lj {
|
|
63
63
|
width: calc(3rem * var(--s2-scale));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
.
|
|
66
|
+
.kf {
|
|
67
67
|
height: calc(2rem * var(--s2-scale));
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.
|
|
70
|
+
.kg {
|
|
71
71
|
height: calc(1.25rem * var(--s2-scale));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
.
|
|
74
|
+
.kh {
|
|
75
75
|
height: calc(1.5rem * var(--s2-scale));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.
|
|
78
|
+
.ki {
|
|
79
79
|
height: calc(2.5rem * var(--s2-scale));
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
.
|
|
82
|
+
.kj {
|
|
83
83
|
height: calc(3rem * var(--s2-scale));
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
.
|
|
86
|
+
._9-3t1x {
|
|
87
87
|
flex-shrink: 0;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
.
|
|
90
|
+
._wf {
|
|
91
91
|
border-start-start-radius: 9999px;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
.
|
|
94
|
+
._xf {
|
|
95
95
|
border-start-end-radius: 9999px;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
.
|
|
98
|
+
._yf {
|
|
99
99
|
border-end-start-radius: 9999px;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.
|
|
102
|
+
._zf {
|
|
103
103
|
border-end-end-radius: 9999px;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.Ea {
|
|
107
107
|
padding-top: 0;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
.
|
|
110
|
+
.Fa {
|
|
111
111
|
padding-bottom: 0;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.
|
|
114
|
+
.Ca {
|
|
115
115
|
padding-inline-start: 0;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
.
|
|
118
|
+
.Da {
|
|
119
119
|
padding-inline-end: 0;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
.
|
|
122
|
+
.wf {
|
|
123
123
|
border-style: none;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
.
|
|
126
|
+
._Pa {
|
|
127
127
|
transition-property: color, background-color, var(--gp), border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, translate, scale, rotate, filter, backdrop-filter;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.
|
|
130
|
+
._R-375x7f {
|
|
131
131
|
transition-duration: .15s;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
.
|
|
134
|
+
._Sa {
|
|
135
135
|
transition-timing-function: cubic-bezier(.45, 0, .4, 1);
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
|
|
177
177
|
@layer _.b.a {
|
|
178
178
|
@media (forced-colors: active) {
|
|
179
|
-
.
|
|
179
|
+
.da_____M {
|
|
180
180
|
outline-color: highlight;
|
|
181
181
|
}
|
|
182
182
|
|
package/dist/CloseButton.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAyCe;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled' | 'onPress'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\nconst hoverBackground = {\n default: 'gray-200',\n isStaticColor: 'transparent-overlay-200'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<CloseButtonProps
|
|
1
|
+
{"mappings":"AAyCe;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled' | 'onPress'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\nconst hoverBackground = {\n default: 'gray-200',\n isStaticColor: 'transparent-overlay-200'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<Partial<CloseButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={props['aria-label'] || stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.css.map"}
|
package/dist/CloseButton.mjs
CHANGED
|
@@ -38,51 +38,51 @@ const $a9cda54c4f47ce52$var$hoverBackground = {
|
|
|
38
38
|
};
|
|
39
39
|
const $a9cda54c4f47ce52$var$styles = function anonymous(props, overrides) {
|
|
40
40
|
let rules = " .";
|
|
41
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
41
|
+
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) || [];
|
|
42
42
|
rules += matches.join('');
|
|
43
|
-
let $
|
|
44
|
-
let $
|
|
43
|
+
let $l = false;
|
|
44
|
+
let $_9 = false;
|
|
45
45
|
for (let p of matches){
|
|
46
|
-
if (/^\s*
|
|
47
|
-
if (/^\s*
|
|
46
|
+
if (/^\s*l/.test(p)) $l = true;
|
|
47
|
+
if (/^\s*_9/.test(p)) $_9 = true;
|
|
48
48
|
}
|
|
49
|
-
if (props.isFocusVisible) rules += '
|
|
50
|
-
else rules += '
|
|
51
|
-
rules += '
|
|
52
|
-
if (props.isStaticColor) rules += '
|
|
53
|
-
else rules += '
|
|
54
|
-
rules += '
|
|
55
|
-
rules += '
|
|
49
|
+
if (props.isFocusVisible) rules += ' _Mb';
|
|
50
|
+
else rules += ' _Ma';
|
|
51
|
+
rules += ' da_____M';
|
|
52
|
+
if (props.isStaticColor) rules += ' d_____G';
|
|
53
|
+
else rules += ' dx';
|
|
54
|
+
rules += ' _Oc';
|
|
55
|
+
rules += ' _N-3t1z';
|
|
56
56
|
if (props.staticColor === "white") rules += ' -_1de2x0q_b-b';
|
|
57
57
|
else if (props.staticColor === "black") rules += ' -_1de2x0q_b-c';
|
|
58
|
+
rules += ' _0d';
|
|
59
|
+
rules += ' _2c';
|
|
58
60
|
rules += ' _3d';
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (props.size === "
|
|
63
|
-
else if (props.size === "
|
|
64
|
-
else
|
|
65
|
-
else if (props.size === "XS") rules += ' kg';
|
|
66
|
-
else rules += ' kf';
|
|
61
|
+
if (!$l) {
|
|
62
|
+
if (props.size === "XL") rules += ' lj';
|
|
63
|
+
else if (props.size === "L") rules += ' li';
|
|
64
|
+
else if (props.size === "S") rules += ' lh';
|
|
65
|
+
else if (props.size === "XS") rules += ' lg';
|
|
66
|
+
else rules += ' lf';
|
|
67
67
|
}
|
|
68
|
-
if (props.size === "XL") rules += '
|
|
69
|
-
else if (props.size === "L") rules += '
|
|
70
|
-
else if (props.size === "S") rules += '
|
|
71
|
-
else if (props.size === "XS") rules += '
|
|
72
|
-
else rules += '
|
|
73
|
-
if (!$
|
|
68
|
+
if (props.size === "XL") rules += ' kj';
|
|
69
|
+
else if (props.size === "L") rules += ' ki';
|
|
70
|
+
else if (props.size === "S") rules += ' kh';
|
|
71
|
+
else if (props.size === "XS") rules += ' kg';
|
|
72
|
+
else rules += ' kf';
|
|
73
|
+
if (!$_9) rules += ' _9-3t1x';
|
|
74
|
+
rules += ' _wf';
|
|
75
|
+
rules += ' _xf';
|
|
76
|
+
rules += ' _yf';
|
|
74
77
|
rules += ' _zf';
|
|
75
|
-
rules += '
|
|
76
|
-
rules += ' _Bf';
|
|
77
|
-
rules += ' _Cf';
|
|
78
|
-
rules += ' Ha';
|
|
79
|
-
rules += ' Ia';
|
|
78
|
+
rules += ' Ea';
|
|
80
79
|
rules += ' Fa';
|
|
81
|
-
rules += '
|
|
82
|
-
rules += '
|
|
80
|
+
rules += ' Ca';
|
|
81
|
+
rules += ' Da';
|
|
82
|
+
rules += ' wf';
|
|
83
|
+
rules += ' _Pa';
|
|
84
|
+
rules += ' _R-375x7f';
|
|
83
85
|
rules += ' _Sa';
|
|
84
|
-
rules += ' _U-375x7f';
|
|
85
|
-
rules += ' _Va';
|
|
86
86
|
if (props.isPressed) {
|
|
87
87
|
if (props.isStaticColor) rules += ' b_____y';
|
|
88
88
|
else rules += ' bh';
|
package/dist/CloseButton.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCC,MAAM,0DAAqB,CAAA,GAAA,oBAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;AA0BD,MAAM,wCAAkB;IACtB,SAAS;IACT,eAAe;AACjB;AAEA,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCC,MAAM,0DAAqB,CAAA,GAAA,oBAAY,EAAiF;AAKxH,MAAM,0DAAc,CAAA,GAAA,iBAAS,EAAE,SAAS,YAAY,KAAuB,EAAE,GAAoC;IACtH,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,gBAAC,YAAY,oBAAE,mBAAmB,IAAG,GAAG;IAC5C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE;IAC7B,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,+CAAW,GAAG;IAChE,qBACE,gBAAC,CAAA,GAAA,aAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,MAAK;QACL,cAAY,KAAK,CAAC,aAAa,IAAI,gBAAgB,MAAM,CAAC;QAC1D,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;QAC1B,WAAW,CAAA,cAAe,mBAAmB,6BAAO;gBAAC,GAAG,WAAW;gBAAE,aAAa,MAAM,WAAW;gBAAE,eAAe,CAAC,CAAC,MAAM,WAAW;YAAA,GAAG,MAAM,MAAM;kBACtJ,cAAA,gBAAC,CAAA,GAAA,wCAAQ;YAAE,MAAM,AAAC;gBAAC,GAAG;gBAAK,GAAG;gBAAM,GAAG;gBAAO,IAAI;YAAM,CAAW,CAAC,MAAM,IAAI,IAAI,IAAI;;;AAG5F","sources":["packages/@react-spectrum/s2/src/CloseButton.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 {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {Button, ButtonProps, ContextValue} from 'react-aria-components';\nimport {createContext, forwardRef} from 'react';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, staticColor, StyleProps} from './style-utils' with {type: 'macro'};\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CloseButtonProps extends Pick<ButtonProps, 'isDisabled' | 'onPress'>, StyleProps {\n /**\n * The size of the CloseButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** The static color style to apply. Useful when the Button appears over a color background. */\n staticColor?: 'white' | 'black' | 'auto'\n}\n\nconst hoverBackground = {\n default: 'gray-200',\n isStaticColor: 'transparent-overlay-200'\n} as const;\n\nconst styles = style({\n ...focusRing(),\n ...staticColor(),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n size: 'control',\n flexShrink: 0,\n borderRadius: 'full',\n padding: 0,\n borderStyle: 'none',\n transition: 'default',\n backgroundColor: {\n default: 'transparent',\n isHovered: hoverBackground,\n isFocusVisible: hoverBackground,\n isPressed: hoverBackground\n },\n '--iconPrimary': {\n type: 'color',\n value: {\n default: 'neutral',\n isDisabled: 'disabled',\n isStaticColor: {\n default: baseColor('transparent-overlay-800'),\n isDisabled: 'transparent-overlay-400'\n },\n forcedColors: {\n default: 'ButtonText',\n isDisabled: 'GrayText'\n }\n }\n },\n outlineColor: {\n default: 'focus-ring',\n isStaticColor: 'transparent-overlay-1000',\n forcedColors: 'Highlight'\n }\n}, getAllowedOverrides());\n\nexport const CloseButtonContext = createContext<ContextValue<Partial<CloseButtonProps>, FocusableRefValue<HTMLButtonElement>>>(null);\n\n/**\n * A CloseButton allows a user to dismiss a dialog.\n */\nexport const CloseButton = forwardRef(function CloseButton(props: CloseButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CloseButtonContext);\n let {UNSAFE_style, UNSAFE_className = ''} = props;\n let domRef = useFocusableRef(ref);\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n return (\n <Button\n {...props}\n ref={domRef}\n slot=\"close\"\n aria-label={props['aria-label'] || stringFormatter.format('dialog.dismiss')}\n style={pressScale(domRef, UNSAFE_style)}\n className={renderProps => UNSAFE_className + styles({...renderProps, staticColor: props.staticColor, isStaticColor: !!props.staticColor}, props.styles)}>\n <CrossIcon size={({S: 'L', M: 'XL', L: 'XXL', XL: 'XXXL'} as const)[props.size || 'M']} />\n </Button>\n );\n});\n"],"names":[],"version":3,"file":"CloseButton.mjs.map"}
|
package/dist/ColorArea.cjs
CHANGED
|
@@ -46,35 +46,35 @@ const $4c6639e34959fe36$export$b2103f68a961418e = /*#__PURE__*/ (0, $lfrPf$react
|
|
|
46
46
|
}),
|
|
47
47
|
className: (renderProps)=>UNSAFE_className + function anonymous(props, overrides) {
|
|
48
48
|
let rules = " .";
|
|
49
|
-
let matches = (overrides || '').match(/(?:^|\s)(?:
|
|
49
|
+
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) || [];
|
|
50
50
|
rules += matches.join('');
|
|
51
|
-
let $
|
|
51
|
+
let $V = false;
|
|
52
|
+
let $l = false;
|
|
52
53
|
let $k = false;
|
|
53
|
-
let $
|
|
54
|
-
let $
|
|
55
|
-
let $n = false;
|
|
54
|
+
let $q = false;
|
|
55
|
+
let $o = false;
|
|
56
56
|
for (let p of matches){
|
|
57
|
-
if (/^\s*
|
|
57
|
+
if (/^\s*V/.test(p)) $V = true;
|
|
58
|
+
if (/^\s*l/.test(p)) $l = true;
|
|
58
59
|
if (/^\s*k/.test(p)) $k = true;
|
|
59
|
-
if (/^\s*
|
|
60
|
-
if (/^\s*
|
|
61
|
-
if (/^\s*n/.test(p)) $n = true;
|
|
60
|
+
if (/^\s*q/.test(p)) $q = true;
|
|
61
|
+
if (/^\s*o/.test(p)) $o = true;
|
|
62
62
|
}
|
|
63
|
-
if (!$
|
|
63
|
+
if (!$V) rules += ' Vc';
|
|
64
|
+
if (!$l) rules += ' l___u';
|
|
64
65
|
if (!$k) rules += ' k___u';
|
|
65
|
-
if (!$
|
|
66
|
-
if (!$
|
|
67
|
-
|
|
66
|
+
if (!$q) rules += ' q_q';
|
|
67
|
+
if (!$o) rules += ' o_q';
|
|
68
|
+
rules += ' _wc';
|
|
69
|
+
rules += ' _xc';
|
|
70
|
+
rules += ' _yc';
|
|
68
71
|
rules += ' _zc';
|
|
69
|
-
rules += '
|
|
70
|
-
rules += '
|
|
71
|
-
rules += '
|
|
72
|
-
rules += '
|
|
73
|
-
rules += '
|
|
74
|
-
rules += '
|
|
75
|
-
rules += ' _Q-3hmpv';
|
|
76
|
-
if (props.isDisabled) rules += ' _Pa';
|
|
77
|
-
else rules += ' _Pb';
|
|
72
|
+
rules += ' da_____I';
|
|
73
|
+
rules += ' dp10';
|
|
74
|
+
rules += ' _Ob';
|
|
75
|
+
rules += ' _N-3hmpv';
|
|
76
|
+
if (props.isDisabled) rules += ' _Ma';
|
|
77
|
+
else rules += ' _Mb';
|
|
78
78
|
if (props.isDisabled) rules += ' bg';
|
|
79
79
|
return rules;
|
|
80
80
|
}(renderProps, styles),
|
package/dist/ColorArea.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAiBM,MAAM,0DAAmB,CAAA,GAAA,0BAAY,EAAsE;AAK3G,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAAqB,EAAE,GAA2B;IACvG,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,oBAAC,mBAAmB,kBAAI,YAAY,UAAE,MAAM,EAAC,GAAG;IACpD,IAAI,eAAe,CAAA,GAAA,mCAAQ,EAAE;IAC7B,qBACE,gCAAC,CAAA,GAAA,oCAAY;QACV,GAAG,KAAK;QACT,KAAK;QACL,OAAO,CAAC,gBAAC,YAAY,cAAE,UAAU,EAAC,GAAM,CAAA;gBACtC,GAAG,YAAY;gBACf,YAAY,aAAa,YAAY,aAAa,UAAU;gBAC5D,kEAAkE;gBAClE,UAAU;gBACV,GAAG,YAAY;YACjB,CAAA;QACA,WAAW,CAAA,cAAe,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBL,aAAa;kBACpD,CAAC,SAAC,KAAK,EAAC,iBACN,gCAAC,CAAA,GAAA,qCAAU;gBACV,cAAc;gBACd,aAAa,IAAM,MAAM,gBAAgB;;;AAInD","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.cjs.map"}
|
package/dist/ColorArea.css
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
@layer _.a {
|
|
2
|
-
.
|
|
2
|
+
.Vc {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.
|
|
6
|
+
.l___u {
|
|
7
7
|
width: calc(12rem * var(--s2-scale));
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.k___u {
|
|
11
11
|
height: calc(12rem * var(--s2-scale));
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.q_q {
|
|
15
15
|
min-width: calc(4rem * var(--s2-scale));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.o_q {
|
|
19
19
|
min-height: calc(4rem * var(--s2-scale));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
22
|
+
._wc {
|
|
23
23
|
border-start-start-radius: .5rem;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
._xc {
|
|
27
27
|
border-start-end-radius: .5rem;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
._yc {
|
|
31
31
|
border-end-start-radius: .5rem;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
34
|
+
._zc {
|
|
35
35
|
border-end-end-radius: .5rem;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.dp10 {
|
|
39
39
|
outline-color: var(--lightningcss-light, #0000001a) var(--lightningcss-dark, #ffffff1a);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
._Ob {
|
|
43
43
|
outline-width: 1px;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.
|
|
46
|
+
._N-3hmpv {
|
|
47
47
|
outline-offset: -1px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
._Mb {
|
|
51
51
|
outline-style: solid;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
._Ma {
|
|
55
55
|
outline-style: none;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
@layer _.b.a {
|
|
66
66
|
@media (forced-colors: active) {
|
|
67
|
-
.
|
|
67
|
+
.da_____I {
|
|
68
68
|
outline-color: buttonborder;
|
|
69
69
|
}
|
|
70
70
|
}
|
package/dist/ColorArea.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA+CmD;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<ColorAreaProps
|
|
1
|
+
{"mappings":"AA+CmD;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA","sources":["packages/@react-spectrum/s2/src/ColorArea.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n ColorArea as AriaColorArea,\n ColorAreaProps as AriaColorAreaProps,\n ContextValue\n} from 'react-aria-components';\nimport {ColorHandle} from './ColorHandle';\nimport {createContext, forwardRef} from 'react';\nimport {DOMRef, DOMRefValue} from '@react-types/shared';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ColorAreaProps extends Omit<AriaColorAreaProps, 'children' | 'className' | 'style'>, StyleProps {}\n\nexport const ColorAreaContext = createContext<ContextValue<Partial<ColorAreaProps>, DOMRefValue<HTMLDivElement>>>(null);\n\n/**\n * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.\n */\nexport const ColorArea = forwardRef(function ColorArea(props: ColorAreaProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, ColorAreaContext);\n let {UNSAFE_className = '', UNSAFE_style, styles} = props;\n let containerRef = useDOMRef(ref);\n return (\n <AriaColorArea\n {...props}\n ref={containerRef}\n style={({defaultStyle, isDisabled}) => ({\n ...defaultStyle,\n background: isDisabled ? undefined : defaultStyle.background,\n // Move position: relative to style macro so it can be overridden.\n position: undefined,\n ...UNSAFE_style\n })}\n className={renderProps => UNSAFE_className + style({\n position: 'relative',\n size: 192,\n minSize: 64,\n borderRadius: 'default',\n outlineColor: {\n default: 'gray-1000/10',\n forcedColors: 'ButtonBorder'\n },\n outlineWidth: 1,\n outlineOffset: -1,\n outlineStyle: {\n default: 'solid',\n isDisabled: 'none'\n },\n backgroundColor: {\n isDisabled: 'disabled'\n }\n }, getAllowedOverrides({height: true}))(renderProps, styles)}>\n {({state}) =>\n (<ColorHandle\n containerRef={containerRef}\n getPosition={() => state.getThumbPosition()} />)\n }\n </AriaColorArea>\n );\n});\n"],"names":[],"version":3,"file":"ColorArea.css.map"}
|