@react-spectrum/s2 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +3 -3
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css +2 -2
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +3 -3
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionBar.cjs +62 -61
- package/dist/ActionBar.cjs.map +1 -1
- package/dist/ActionBar.css +58 -58
- package/dist/ActionBar.css.map +1 -1
- package/dist/ActionBar.mjs +62 -61
- package/dist/ActionBar.mjs.map +1 -1
- package/dist/ActionButton.cjs +234 -234
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +160 -160
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +234 -234
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/ActionButtonGroup.cjs +16 -16
- package/dist/ActionButtonGroup.css +9 -9
- package/dist/ActionButtonGroup.mjs +16 -16
- package/dist/Add.cjs +10 -10
- package/dist/Add.css +6 -6
- package/dist/Add.mjs +10 -10
- package/dist/AlertDialog.cjs +3 -3
- package/dist/AlertDialog.css +3 -3
- package/dist/AlertDialog.mjs +3 -3
- package/dist/Asterisk.cjs +6 -6
- package/dist/Asterisk.css +4 -4
- package/dist/Asterisk.mjs +6 -6
- package/dist/Avatar.cjs +17 -17
- package/dist/Avatar.css +16 -16
- package/dist/Avatar.mjs +17 -17
- package/dist/AvatarGroup.cjs +121 -121
- package/dist/AvatarGroup.css +31 -31
- package/dist/AvatarGroup.mjs +121 -121
- package/dist/Badge.cjs +197 -197
- package/dist/Badge.css +125 -125
- package/dist/Badge.mjs +197 -197
- package/dist/Breadcrumbs.cjs +235 -235
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +100 -100
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +235 -235
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +333 -333
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +174 -174
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +333 -333
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs +21 -21
- package/dist/ButtonGroup.css +15 -15
- package/dist/ButtonGroup.mjs +21 -21
- package/dist/Calendar.cjs +169 -169
- package/dist/Calendar.cjs.map +1 -1
- package/dist/Calendar.css +134 -134
- package/dist/Calendar.css.map +1 -1
- package/dist/Calendar.mjs +169 -169
- package/dist/Calendar.mjs.map +1 -1
- package/dist/Card.cjs +310 -310
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +206 -206
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +310 -310
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs +19 -19
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css +17 -17
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs +19 -19
- package/dist/CardView.mjs.map +1 -1
- package/dist/CenterBaseline.cjs +1 -1
- package/dist/CenterBaseline.css +2 -2
- package/dist/CenterBaseline.mjs +1 -1
- package/dist/Checkbox.cjs +162 -162
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +95 -91
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +162 -162
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +44 -44
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +37 -37
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +44 -44
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/Checkmark.cjs +12 -12
- package/dist/Checkmark.css +8 -8
- package/dist/Checkmark.mjs +12 -12
- package/dist/Chevron.cjs +12 -12
- package/dist/Chevron.css +10 -10
- package/dist/Chevron.mjs +12 -12
- package/dist/ClearButton.cjs +30 -30
- package/dist/ClearButton.css +30 -30
- package/dist/ClearButton.mjs +30 -30
- package/dist/CloseButton.cjs +56 -56
- package/dist/CloseButton.css +47 -47
- package/dist/CloseButton.mjs +56 -56
- package/dist/ColorArea.cjs +17 -17
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +16 -16
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +17 -17
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +32 -32
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +27 -27
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +32 -32
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +27 -27
- package/dist/ColorHandle.css +42 -42
- package/dist/ColorHandle.mjs +27 -27
- package/dist/ColorSlider.cjs +109 -109
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +52 -52
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +109 -109
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +30 -30
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +29 -29
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +30 -30
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +30 -30
- package/dist/ColorSwatchPicker.css +48 -48
- package/dist/ColorSwatchPicker.mjs +30 -30
- package/dist/ColorWheel.cjs +31 -27
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css +17 -17
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs +31 -27
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +383 -383
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +187 -187
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +383 -383
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +5 -5
- package/dist/ContextualHelp.css +50 -50
- package/dist/ContextualHelp.mjs +5 -5
- package/dist/Cross.cjs +14 -14
- package/dist/Cross.css +10 -10
- package/dist/Cross.mjs +14 -14
- package/dist/CustomDialog.cjs +26 -26
- package/dist/CustomDialog.cjs.map +1 -1
- package/dist/CustomDialog.css +25 -25
- package/dist/CustomDialog.css.map +1 -1
- package/dist/CustomDialog.mjs +26 -26
- package/dist/CustomDialog.mjs.map +1 -1
- package/dist/Dash.cjs +10 -10
- package/dist/Dash.css +6 -6
- package/dist/Dash.mjs +10 -10
- package/dist/DateField.cjs +74 -74
- package/dist/DateField.cjs.map +1 -1
- package/dist/DateField.css +77 -77
- package/dist/DateField.css.map +1 -1
- package/dist/DateField.mjs +74 -74
- package/dist/DateField.mjs.map +1 -1
- package/dist/DatePicker.cjs +173 -173
- package/dist/DatePicker.cjs.map +1 -1
- package/dist/DatePicker.css +128 -128
- package/dist/DatePicker.css.map +1 -1
- package/dist/DatePicker.mjs +173 -173
- package/dist/DatePicker.mjs.map +1 -1
- package/dist/DateRangePicker.cjs +56 -56
- package/dist/DateRangePicker.cjs.map +1 -1
- package/dist/DateRangePicker.css +59 -59
- package/dist/DateRangePicker.css.map +1 -1
- package/dist/DateRangePicker.mjs +56 -56
- package/dist/DateRangePicker.mjs.map +1 -1
- package/dist/Dialog.cjs +17 -17
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css +70 -70
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +17 -17
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs +120 -120
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +112 -112
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +120 -120
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs +26 -26
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css +25 -25
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs +26 -26
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs +62 -62
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +57 -57
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +62 -62
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +348 -348
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +147 -147
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +348 -348
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs +10 -10
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css +9 -9
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs +10 -10
- package/dist/Form.mjs.map +1 -1
- package/dist/FullscreenDialog.cjs +5 -5
- package/dist/FullscreenDialog.cjs.map +1 -1
- package/dist/FullscreenDialog.css +78 -78
- package/dist/FullscreenDialog.css.map +1 -1
- package/dist/FullscreenDialog.mjs +5 -5
- package/dist/FullscreenDialog.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +229 -229
- package/dist/IllustratedMessage.css +72 -72
- package/dist/IllustratedMessage.mjs +229 -229
- package/dist/Image.cjs +14 -14
- package/dist/Image.css +14 -14
- package/dist/Image.mjs +14 -14
- package/dist/InlineAlert.cjs +101 -101
- package/dist/InlineAlert.css +76 -76
- package/dist/InlineAlert.mjs +101 -101
- package/dist/Link.cjs +50 -50
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css +41 -41
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs +50 -50
- package/dist/Link.mjs.map +1 -1
- package/dist/LinkOut.cjs +8 -8
- package/dist/LinkOut.css +8 -8
- package/dist/LinkOut.mjs +8 -8
- package/dist/Menu.cjs +446 -443
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +184 -184
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +446 -443
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +154 -154
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +91 -91
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +154 -154
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +66 -66
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css +54 -54
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs +66 -66
- package/dist/Modal.mjs.map +1 -1
- package/dist/NotificationBadge.cjs +57 -57
- package/dist/NotificationBadge.css +49 -49
- package/dist/NotificationBadge.mjs +57 -57
- package/dist/NumberField.cjs +115 -115
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +99 -99
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +115 -115
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +275 -275
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +173 -173
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +275 -275
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +89 -89
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +70 -70
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +89 -89
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs +164 -164
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +99 -99
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +164 -164
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +32 -32
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +24 -24
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +32 -32
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs +11 -11
- package/dist/Provider.css +10 -10
- package/dist/Provider.mjs +11 -11
- package/dist/Radio.cjs +146 -146
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +78 -78
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +146 -146
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +42 -42
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +37 -37
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +42 -42
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/RangeCalendar.cjs +8 -8
- package/dist/RangeCalendar.cjs.map +1 -1
- package/dist/RangeCalendar.css +10 -10
- package/dist/RangeCalendar.css.map +1 -1
- package/dist/RangeCalendar.mjs +8 -8
- package/dist/RangeCalendar.mjs.map +1 -1
- package/dist/SearchField.cjs +42 -42
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +45 -45
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +42 -42
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +180 -180
- package/dist/SegmentedControl.css +123 -123
- package/dist/SegmentedControl.mjs +180 -180
- package/dist/SelectBoxGroup.cjs +144 -144
- package/dist/SelectBoxGroup.cjs.map +1 -1
- package/dist/SelectBoxGroup.css +120 -120
- package/dist/SelectBoxGroup.css.map +1 -1
- package/dist/SelectBoxGroup.mjs +144 -144
- package/dist/SelectBoxGroup.mjs.map +1 -1
- package/dist/Slider.cjs +295 -295
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +154 -154
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +295 -295
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +116 -116
- package/dist/StatusLight.css +59 -59
- package/dist/StatusLight.mjs +116 -116
- package/dist/Switch.cjs +155 -155
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +74 -74
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +155 -155
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +415 -415
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +199 -199
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +416 -416
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +127 -127
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +105 -105
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +127 -127
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TabsPicker.cjs +127 -127
- package/dist/TabsPicker.cjs.map +1 -1
- package/dist/TabsPicker.css +108 -108
- package/dist/TabsPicker.css.map +1 -1
- package/dist/TabsPicker.mjs +127 -127
- package/dist/TabsPicker.mjs.map +1 -1
- package/dist/TagGroup.cjs +204 -204
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +146 -146
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +204 -204
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +59 -59
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +54 -54
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +59 -59
- package/dist/TextField.mjs.map +1 -1
- package/dist/TimeField.cjs +52 -52
- package/dist/TimeField.cjs.map +1 -1
- package/dist/TimeField.css +47 -47
- package/dist/TimeField.css.map +1 -1
- package/dist/TimeField.mjs +52 -52
- package/dist/TimeField.mjs.map +1 -1
- package/dist/Toast.cjs +120 -120
- package/dist/Toast.cjs.map +1 -1
- package/dist/Toast.css +110 -110
- package/dist/Toast.css.map +1 -1
- package/dist/Toast.mjs +120 -120
- package/dist/Toast.mjs.map +1 -1
- package/dist/ToggleButton.cjs +3 -3
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css +12 -12
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +3 -3
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/ToggleButtonGroup.cjs.map +1 -1
- package/dist/ToggleButtonGroup.mjs.map +1 -1
- package/dist/Tooltip.cjs +78 -78
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +65 -65
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +78 -78
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/TreeView.cjs +144 -128
- package/dist/TreeView.cjs.map +1 -1
- package/dist/TreeView.css +131 -127
- package/dist/TreeView.css.map +1 -1
- package/dist/TreeView.mjs +144 -128
- package/dist/TreeView.mjs.map +1 -1
- package/dist/types.d.ts +68 -72
- package/dist/types.d.ts.map +1 -1
- package/icons/Icon.cjs +12 -12
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +12 -12
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/icons/Skeleton.mjs.map +1 -1
- package/icons/runtime.cjs +16 -3
- package/icons/runtime.cjs.map +1 -1
- package/icons/runtime.mjs +16 -3
- package/icons/runtime.mjs.map +1 -1
- package/package.json +21 -21
- package/src/Accordion.tsx +1 -1
- package/src/ActionBar.tsx +2 -2
- package/src/ActionButton.tsx +1 -1
- package/src/Breadcrumbs.tsx +2 -2
- package/src/Button.tsx +2 -2
- package/src/Calendar.tsx +1 -1
- package/src/Card.tsx +1 -1
- package/src/CardView.tsx +1 -1
- package/src/Checkbox.tsx +2 -1
- package/src/CheckboxGroup.tsx +1 -1
- package/src/CoachMark.tsx +1 -1
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +1 -1
- package/src/ColorWheel.tsx +2 -2
- package/src/ComboBox.tsx +2 -2
- package/src/CustomDialog.tsx +1 -1
- package/src/DateField.tsx +1 -1
- package/src/DatePicker.tsx +1 -1
- package/src/DateRangePicker.tsx +1 -1
- package/src/Dialog.tsx +1 -1
- package/src/Disclosure.tsx +2 -2
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/Field.tsx +3 -3
- package/src/Form.tsx +1 -1
- package/src/FullscreenDialog.tsx +1 -1
- package/src/Link.tsx +1 -1
- package/src/Menu.tsx +11 -13
- package/src/Meter.tsx +1 -1
- package/src/Modal.tsx +1 -1
- package/src/NumberField.tsx +1 -1
- package/src/Picker.tsx +3 -3
- package/src/Popover.tsx +2 -1
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/Radio.tsx +1 -1
- package/src/RadioGroup.tsx +1 -1
- package/src/RangeCalendar.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SelectBoxGroup.tsx +1 -1
- package/src/Slider.tsx +1 -1
- package/src/Switch.tsx +1 -1
- package/src/TableView.tsx +9 -9
- package/src/Tabs.tsx +4 -4
- package/src/TabsPicker.tsx +2 -2
- package/src/TagGroup.tsx +2 -2
- package/src/TextField.tsx +1 -1
- package/src/TimeField.tsx +1 -1
- package/src/Toast.tsx +1 -1
- package/src/ToggleButton.tsx +1 -1
- package/src/ToggleButtonGroup.tsx +1 -1
- package/src/Tooltip.tsx +1 -1
- package/src/TreeView.tsx +10 -6
- package/style/__tests__/mergeStyles.test.ts +68 -0
- package/style/__tests__/style-macro.test.js +79 -59
- package/style/dist/style-macro.cjs +65 -14
- package/style/dist/style-macro.cjs.map +1 -1
- package/style/dist/style-macro.mjs +65 -14
- package/style/dist/style-macro.mjs.map +1 -1
- package/style/runtime.ts +21 -5
- package/style/style-macro.ts +81 -16
- package/style/__tests__/mergeStyles.test.js +0 -32
package/src/Link.tsx
CHANGED
|
@@ -34,7 +34,7 @@ interface LinkStyleProps {
|
|
|
34
34
|
isQuiet?: boolean
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export interface LinkProps extends Omit<RACLinkProps, 'isDisabled' | 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, LinkStyleProps {
|
|
37
|
+
export interface LinkProps extends Omit<RACLinkProps, 'isDisabled' | 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, LinkStyleProps {
|
|
38
38
|
children: ReactNode
|
|
39
39
|
}
|
|
40
40
|
|
package/src/Menu.tsx
CHANGED
|
@@ -74,7 +74,7 @@ export interface MenuTriggerProps extends AriaMenuTriggerProps {
|
|
|
74
74
|
shouldFlip?: boolean
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export interface MenuProps<T> extends Omit<AriaMenuProps<T>, 'children' | 'style' | 'className' | 'dependencies' | 'renderEmptyState' | keyof GlobalDOMAttributes>, StyleProps {
|
|
77
|
+
export interface MenuProps<T> extends Omit<AriaMenuProps<T>, 'children' | 'style' | 'className' | 'render' | 'dependencies' | 'renderEmptyState' | keyof GlobalDOMAttributes>, StyleProps {
|
|
78
78
|
/**
|
|
79
79
|
* The size of the Menu.
|
|
80
80
|
*
|
|
@@ -421,12 +421,8 @@ export function Divider(props: SeparatorProps): ReactNode {
|
|
|
421
421
|
);
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
export interface MenuSectionProps<T extends object> extends Omit<AriaMenuSectionProps<T>, 'style' | 'className' | keyof GlobalDOMAttributes> {
|
|
425
|
-
|
|
426
|
-
* The children of the menu section.
|
|
427
|
-
*/
|
|
428
|
-
children?: ReactNode
|
|
429
|
-
}
|
|
424
|
+
export interface MenuSectionProps<T extends object> extends Omit<AriaMenuSectionProps<T>, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {}
|
|
425
|
+
|
|
430
426
|
export function MenuSection<T extends object>(props: MenuSectionProps<T>): ReactNode {
|
|
431
427
|
// remember, context doesn't work if it's around Section nor inside
|
|
432
428
|
let {size} = useContext(InternalMenuContext);
|
|
@@ -442,7 +438,7 @@ export function MenuSection<T extends object>(props: MenuSectionProps<T>): React
|
|
|
442
438
|
);
|
|
443
439
|
}
|
|
444
440
|
|
|
445
|
-
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
441
|
+
export interface MenuItemProps extends Omit<AriaMenuItemProps, 'children' | 'style' | 'className' | 'render' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
446
442
|
/**
|
|
447
443
|
* The contents of the item.
|
|
448
444
|
*/
|
|
@@ -587,11 +583,13 @@ function MenuTrigger(props: MenuTriggerProps): ReactNode {
|
|
|
587
583
|
shouldFlip: props.shouldFlip
|
|
588
584
|
}}>
|
|
589
585
|
<PopoverContext.Provider value={{hideArrow: true, offset: 8, crossOffset: 0, placement, shouldFlip}}>
|
|
590
|
-
<
|
|
591
|
-
<
|
|
592
|
-
{
|
|
593
|
-
|
|
594
|
-
|
|
586
|
+
<InPopoverContext.Provider value={false}>
|
|
587
|
+
<AriaMenuTrigger {...props}>
|
|
588
|
+
<PressResponder onPressStart={onPressStart} isPressed={isPressed}>
|
|
589
|
+
{props.children}
|
|
590
|
+
</PressResponder>
|
|
591
|
+
</AriaMenuTrigger>
|
|
592
|
+
</InPopoverContext.Provider>
|
|
595
593
|
</PopoverContext.Provider>
|
|
596
594
|
</InternalMenuTriggerContext.Provider>
|
|
597
595
|
);
|
package/src/Meter.tsx
CHANGED
|
@@ -48,7 +48,7 @@ interface MeterStyleProps {
|
|
|
48
48
|
labelPosition?: LabelPosition
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export interface MeterProps extends Omit<AriaMeterProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, MeterStyleProps, StyleProps {
|
|
51
|
+
export interface MeterProps extends Omit<AriaMeterProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, MeterStyleProps, StyleProps {
|
|
52
52
|
/** The content to display as the label. */
|
|
53
53
|
label?: ReactNode
|
|
54
54
|
}
|
package/src/Modal.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import {ModalOverlay, ModalOverlayProps, Modal as RACModal, useLocale} from 'rea
|
|
|
18
18
|
import {style} from '../style' with {type: 'macro'};
|
|
19
19
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
20
20
|
|
|
21
|
-
interface ModalProps extends Omit<ModalOverlayProps, 'className' | 'style' | keyof GlobalDOMAttributes> {
|
|
21
|
+
interface ModalProps extends Omit<ModalOverlayProps, 'className' | 'style' | 'render' | keyof GlobalDOMAttributes> {
|
|
22
22
|
/**
|
|
23
23
|
* The size of the Modal.
|
|
24
24
|
*
|
package/src/NumberField.tsx
CHANGED
|
@@ -38,7 +38,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
export interface NumberFieldProps extends
|
|
41
|
-
Omit<AriaNumberFieldProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>,
|
|
41
|
+
Omit<AriaNumberFieldProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>,
|
|
42
42
|
StyleProps,
|
|
43
43
|
SpectrumLabelableProps,
|
|
44
44
|
HelpTextProps,
|
package/src/Picker.tsx
CHANGED
|
@@ -98,7 +98,7 @@ export interface PickerStyleProps {
|
|
|
98
98
|
|
|
99
99
|
type SelectionMode = 'single' | 'multiple';
|
|
100
100
|
export interface PickerProps<T extends object, M extends SelectionMode = 'single'> extends
|
|
101
|
-
Omit<AriaSelectProps<T, M>, 'children' | 'style' | 'className' | 'allowsEmptyCollection' | keyof GlobalDOMAttributes>,
|
|
101
|
+
Omit<AriaSelectProps<T, M>, 'children' | 'style' | 'className' | 'render' | 'allowsEmptyCollection' | keyof GlobalDOMAttributes>,
|
|
102
102
|
PickerStyleProps,
|
|
103
103
|
StyleProps,
|
|
104
104
|
SpectrumLabelableProps,
|
|
@@ -604,7 +604,7 @@ const PickerButton = createHideableComponent(function PickerButton<T extends obj
|
|
|
604
604
|
);
|
|
605
605
|
});
|
|
606
606
|
|
|
607
|
-
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
607
|
+
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'render' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
608
608
|
children: ReactNode
|
|
609
609
|
}
|
|
610
610
|
|
|
@@ -675,7 +675,7 @@ function DefaultProvider({context, value, children}: {context: React.Context<any
|
|
|
675
675
|
return <context.Provider value={value}>{children}</context.Provider>;
|
|
676
676
|
}
|
|
677
677
|
|
|
678
|
-
export interface PickerSectionProps<T extends object> extends Omit<SectionProps<T>, 'style' | 'className' | keyof GlobalDOMAttributes>, StyleProps {}
|
|
678
|
+
export interface PickerSectionProps<T extends object> extends Omit<SectionProps<T>, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, StyleProps {}
|
|
679
679
|
export function PickerSection<T extends object>(props: PickerSectionProps<T>): ReactNode {
|
|
680
680
|
let {size} = useContext(InternalPickerContext);
|
|
681
681
|
return (
|
package/src/Popover.tsx
CHANGED
|
@@ -40,6 +40,7 @@ export interface PopoverProps extends UnsafeStyles, Omit<AriaPopoverProps,
|
|
|
40
40
|
'shouldUpdatePosition' |
|
|
41
41
|
'style' |
|
|
42
42
|
'className' |
|
|
43
|
+
'render' |
|
|
43
44
|
keyof GlobalDOMAttributes
|
|
44
45
|
> {
|
|
45
46
|
/**
|
|
@@ -255,7 +256,7 @@ export interface PopoverDialogProps extends Pick<PopoverProps,
|
|
|
255
256
|
'triggerRef' |
|
|
256
257
|
'isOpen' |
|
|
257
258
|
'onOpenChange'
|
|
258
|
-
>, Omit<DialogProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
259
|
+
>, Omit<DialogProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
259
260
|
/**
|
|
260
261
|
* The children of the popover.
|
|
261
262
|
*/
|
package/src/ProgressBar.tsx
CHANGED
|
@@ -50,7 +50,7 @@ interface ProgressBarStyleProps {
|
|
|
50
50
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export interface ProgressBarProps extends Omit<AriaProgressBarProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, ProgressBarStyleProps, StyleProps {
|
|
53
|
+
export interface ProgressBarProps extends Omit<AriaProgressBarProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, ProgressBarStyleProps, StyleProps {
|
|
54
54
|
/** The content to display as the label. */
|
|
55
55
|
label?: ReactNode
|
|
56
56
|
}
|
package/src/ProgressCircle.tsx
CHANGED
|
@@ -104,7 +104,7 @@ const hcmStroke = style({
|
|
|
104
104
|
}
|
|
105
105
|
});
|
|
106
106
|
|
|
107
|
-
export interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className' | keyof GlobalDOMAttributes>, ProgressCircleStyleProps, UnsafeStyles {
|
|
107
|
+
export interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className' | 'render' | keyof GlobalDOMAttributes>, ProgressCircleStyleProps, UnsafeStyles {
|
|
108
108
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
109
109
|
styles?: StylesPropWithHeight
|
|
110
110
|
}
|
package/src/Radio.tsx
CHANGED
|
@@ -24,7 +24,7 @@ import {forwardRef, ReactNode, useContext, useRef} from 'react';
|
|
|
24
24
|
import {pressScale} from './pressScale';
|
|
25
25
|
import {useFocusableRef} from '@react-spectrum/utils';
|
|
26
26
|
|
|
27
|
-
export interface RadioProps extends Omit<AriaRadioProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
27
|
+
export interface RadioProps extends Omit<AriaRadioProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
28
28
|
/**
|
|
29
29
|
* The label for the element.
|
|
30
30
|
*/
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -24,7 +24,7 @@ import {style} from '../style' with {type: 'macro'};
|
|
|
24
24
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
25
25
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
26
26
|
|
|
27
|
-
export interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {
|
|
27
|
+
export interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps {
|
|
28
28
|
/**
|
|
29
29
|
* The Radios contained within the RadioGroup.
|
|
30
30
|
*/
|
package/src/RangeCalendar.tsx
CHANGED
|
@@ -34,7 +34,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
export interface RangeCalendarProps<T extends DateValue>
|
|
37
|
-
extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'children' | 'styles' | keyof GlobalDOMAttributes>,
|
|
37
|
+
extends Omit<AriaRangeCalendarProps<T>, 'visibleDuration' | 'style' | 'className' | 'render' | 'children' | 'styles' | keyof GlobalDOMAttributes>,
|
|
38
38
|
StyleProps {
|
|
39
39
|
/**
|
|
40
40
|
* The error message to display when the calendar is invalid.
|
package/src/SearchField.tsx
CHANGED
|
@@ -32,7 +32,7 @@ import SearchIcon from '../s2wf-icons/S2_Icon_Search_20_N.svg';
|
|
|
32
32
|
import {TextFieldRef} from '@react-types/textfield';
|
|
33
33
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
34
34
|
|
|
35
|
-
export interface SearchFieldProps extends Omit<AriaSearchFieldProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
|
|
35
|
+
export interface SearchFieldProps extends Omit<AriaSearchFieldProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
|
|
36
36
|
/**
|
|
37
37
|
* The size of the SearchField.
|
|
38
38
|
*
|
package/src/SelectBoxGroup.tsx
CHANGED
|
@@ -30,7 +30,7 @@ import {TextContext} from './Content';
|
|
|
30
30
|
import {useFocusVisible} from 'react-aria';
|
|
31
31
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
32
32
|
|
|
33
|
-
export interface SelectBoxGroupProps<T> extends StyleProps, Omit<ListBoxProps<T>, keyof GlobalDOMAttributes | 'layout' | 'dragAndDropHooks' | 'dependencies' | 'renderEmptyState' | 'children' | 'onAction' | 'shouldFocusOnHover' | 'selectionBehavior' | 'shouldSelectOnPressUp' | 'shouldFocusWrap' | 'style' | 'className'> {
|
|
33
|
+
export interface SelectBoxGroupProps<T> extends StyleProps, Omit<ListBoxProps<T>, keyof GlobalDOMAttributes | 'layout' | 'dragAndDropHooks' | 'dependencies' | 'renderEmptyState' | 'children' | 'onAction' | 'shouldFocusOnHover' | 'selectionBehavior' | 'shouldSelectOnPressUp' | 'shouldFocusWrap' | 'style' | 'className' | 'render'> {
|
|
34
34
|
/**
|
|
35
35
|
* The SelectBox elements contained within the SelectBoxGroup.
|
|
36
36
|
*/
|
package/src/Slider.tsx
CHANGED
|
@@ -32,7 +32,7 @@ import {useFocusableRef} from '@react-spectrum/utils';
|
|
|
32
32
|
import {useLocale, useNumberFormatter} from '@react-aria/i18n';
|
|
33
33
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
34
34
|
|
|
35
|
-
export interface SliderBaseProps<T> extends Omit<AriaSliderProps<T>, 'children' | 'style' | 'className' | 'orientation' | keyof GlobalDOMAttributes>, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, StyleProps {
|
|
35
|
+
export interface SliderBaseProps<T> extends Omit<AriaSliderProps<T>, 'children' | 'style' | 'className' | 'render' | 'orientation' | keyof GlobalDOMAttributes>, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, StyleProps {
|
|
36
36
|
children?: ReactNode,
|
|
37
37
|
/**
|
|
38
38
|
* The size of the Slider.
|
package/src/Switch.tsx
CHANGED
|
@@ -42,7 +42,7 @@ interface SwitchStyleProps {
|
|
|
42
42
|
|
|
43
43
|
interface RenderProps extends SwitchRenderProps, SwitchStyleProps {}
|
|
44
44
|
|
|
45
|
-
export interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, StyleProps, SwitchStyleProps {
|
|
45
|
+
export interface SwitchProps extends Omit<AriaSwitchProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | keyof GlobalDOMAttributes>, StyleProps, SwitchStyleProps {
|
|
46
46
|
children?: ReactNode
|
|
47
47
|
}
|
|
48
48
|
|
package/src/TableView.tsx
CHANGED
|
@@ -59,7 +59,7 @@ import Close from '../s2wf-icons/S2_Icon_Close_20_N.svg';
|
|
|
59
59
|
import {ColumnSize} from '@react-types/table';
|
|
60
60
|
import {CustomDialog, DialogContainer} from '..';
|
|
61
61
|
import {DOMProps, DOMRef, DOMRefValue, forwardRefType, GlobalDOMAttributes, LinkDOMProps, LoadingState, Node} from '@react-types/shared';
|
|
62
|
-
import {getActiveElement, getOwnerDocument, useLayoutEffect, useObjectRef} from '@react-aria/utils';
|
|
62
|
+
import {getActiveElement, getOwnerDocument, nodeContains, useLayoutEffect, useObjectRef} from '@react-aria/utils';
|
|
63
63
|
import {GridNode} from '@react-types/grid';
|
|
64
64
|
import {IconContext} from './Icon';
|
|
65
65
|
// @ts-ignore
|
|
@@ -120,7 +120,7 @@ interface S2TableProps {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// TODO: Note that loadMore and loadingState are now on the Table instead of on the TableBody
|
|
123
|
-
export interface TableViewProps extends Omit<RACTableProps, 'style' | 'className' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks' | keyof GlobalDOMAttributes>, DOMProps, UnsafeStyles, S2TableProps {
|
|
123
|
+
export interface TableViewProps extends Omit<RACTableProps, 'style' | 'className' | 'render' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks' | keyof GlobalDOMAttributes>, DOMProps, UnsafeStyles, S2TableProps {
|
|
124
124
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
125
125
|
styles?: StylesPropWithHeight
|
|
126
126
|
}
|
|
@@ -388,7 +388,7 @@ const centeredWrapper = style({
|
|
|
388
388
|
height: 'full'
|
|
389
389
|
});
|
|
390
390
|
|
|
391
|
-
export interface TableBodyProps<T> extends Omit<RACTableBodyProps<T>, 'style' | 'className' | keyof GlobalDOMAttributes> {}
|
|
391
|
+
export interface TableBodyProps<T> extends Omit<RACTableBodyProps<T>, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {}
|
|
392
392
|
|
|
393
393
|
/**
|
|
394
394
|
* The body of a `<Table>`, containing the table rows.
|
|
@@ -522,7 +522,7 @@ const columnStyles = style({
|
|
|
522
522
|
forcedColorAdjust: 'none'
|
|
523
523
|
});
|
|
524
524
|
|
|
525
|
-
export interface ColumnProps extends Omit<RACColumnProps, 'style' | 'className' | keyof GlobalDOMAttributes> {
|
|
525
|
+
export interface ColumnProps extends Omit<RACColumnProps, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes> {
|
|
526
526
|
/** Whether the column should render a divider between it and the next column. */
|
|
527
527
|
showDivider?: boolean,
|
|
528
528
|
/** Whether the column allows resizing. */
|
|
@@ -885,7 +885,7 @@ const selectAllCheckboxColumn = style({
|
|
|
885
885
|
backgroundColor: 'gray-75'
|
|
886
886
|
});
|
|
887
887
|
|
|
888
|
-
export interface TableHeaderProps<T> extends Omit<RACTableHeaderProps<T>, 'style' | 'className' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | keyof GlobalDOMAttributes> {}
|
|
888
|
+
export interface TableHeaderProps<T> extends Omit<RACTableHeaderProps<T>, 'style' | 'className' | 'render' | 'onHoverChange' | 'onHoverStart' | 'onHoverEnd' | keyof GlobalDOMAttributes> {}
|
|
889
889
|
|
|
890
890
|
/**
|
|
891
891
|
* A header within a `<Table>`, containing the table columns.
|
|
@@ -1030,7 +1030,7 @@ const cellContent = style({
|
|
|
1030
1030
|
}
|
|
1031
1031
|
});
|
|
1032
1032
|
|
|
1033
|
-
export interface CellProps extends Omit<RACCellProps, 'style' | 'className' | keyof GlobalDOMAttributes>, Pick<ColumnProps, 'align' | 'showDivider'> {
|
|
1033
|
+
export interface CellProps extends Omit<RACCellProps, 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, Pick<ColumnProps, 'align' | 'showDivider'> {
|
|
1034
1034
|
/** @private */
|
|
1035
1035
|
isSticky?: boolean,
|
|
1036
1036
|
/** The content to render as the cell children. */
|
|
@@ -1220,7 +1220,7 @@ function EditableCellInner(props: EditableCellProps & {isFocusVisible: boolean,
|
|
|
1220
1220
|
if (isOpen) {
|
|
1221
1221
|
let activeElement = getActiveElement(getOwnerDocument(formRef.current));
|
|
1222
1222
|
if (activeElement
|
|
1223
|
-
&& formRef.current
|
|
1223
|
+
&& nodeContains(formRef.current, activeElement)
|
|
1224
1224
|
// not going to handle contenteditable https://stackoverflow.com/questions/6139107/programmatically-select-text-in-a-contenteditable-html-element
|
|
1225
1225
|
// seems like an edge case anyways
|
|
1226
1226
|
&& (
|
|
@@ -1301,7 +1301,7 @@ function EditableCellInner(props: EditableCellProps & {isFocusVisible: boolean,
|
|
|
1301
1301
|
onOpenChange={setIsOpen}
|
|
1302
1302
|
ref={popoverRef}
|
|
1303
1303
|
shouldCloseOnInteractOutside={() => {
|
|
1304
|
-
if (!popoverRef.current
|
|
1304
|
+
if (!nodeContains(popoverRef.current, document.activeElement)) {
|
|
1305
1305
|
return false;
|
|
1306
1306
|
}
|
|
1307
1307
|
formRef.current?.requestSubmit();
|
|
@@ -1465,7 +1465,7 @@ export const Row = /*#__PURE__*/ (forwardRef as forwardRefType)(function Row<T e
|
|
|
1465
1465
|
className={renderProps => row({
|
|
1466
1466
|
...renderProps,
|
|
1467
1467
|
...tableVisualOptions
|
|
1468
|
-
}) + (renderProps.isFocusVisible
|
|
1468
|
+
}) + (renderProps.isFocusVisible ? ' ' + raw('&:before { content: ""; display: inline-block; position: sticky; inset-inline-start: 0; width: 3px; height: 100%; margin-inline-end: -3px; margin-block-end: 1px; z-index: 3; background-color: var(--rowFocusIndicatorColor)') : '')}
|
|
1469
1469
|
{...otherProps}>
|
|
1470
1470
|
{selectionMode !== 'none' && selectionBehavior === 'toggle' && (
|
|
1471
1471
|
// Not sure what we want to do with this className, in Cell it currently overrides the className that would have been applied.
|
package/src/Tabs.tsx
CHANGED
|
@@ -42,7 +42,7 @@ import {useHasTabbableChild} from '@react-aria/focus';
|
|
|
42
42
|
import {useLocale} from '@react-aria/i18n';
|
|
43
43
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
44
44
|
|
|
45
|
-
export interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style' | 'children' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
45
|
+
export interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style' | 'render' | 'children' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
46
46
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
47
47
|
styles?: StylesPropWithHeight,
|
|
48
48
|
/** The content to display in the tabs. */
|
|
@@ -60,17 +60,17 @@ export interface TabsProps extends Omit<AriaTabsProps, 'className' | 'style' | '
|
|
|
60
60
|
labelBehavior?: 'show' | 'hide'
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export interface TabProps extends Omit<AriaTabProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
63
|
+
export interface TabProps extends Omit<AriaTabProps, 'children' | 'style' | 'className' | 'render' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps {
|
|
64
64
|
/** The content to display in the tab. */
|
|
65
65
|
children: ReactNode
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
export interface TabListProps<T> extends Omit<AriaTabListProps<T>, 'style' | 'className' | 'aria-label' | 'aria-labelledby' | keyof GlobalDOMAttributes>, StyleProps {
|
|
68
|
+
export interface TabListProps<T> extends Omit<AriaTabListProps<T>, 'style' | 'className' | 'render' | 'aria-label' | 'aria-labelledby' | keyof GlobalDOMAttributes>, StyleProps {
|
|
69
69
|
/** The content to display in the tablist. */
|
|
70
70
|
children: ReactNode | ((item: T) => ReactNode)
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
export interface TabPanelProps extends Omit<AriaTabPanelProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
73
|
+
export interface TabPanelProps extends Omit<AriaTabPanelProps, 'children' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, UnsafeStyles {
|
|
74
74
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
75
75
|
styles?: StylesPropWithHeight,
|
|
76
76
|
/** The content to display in the tab panels. */
|
package/src/TabsPicker.tsx
CHANGED
|
@@ -56,7 +56,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
|
56
56
|
export interface PickerStyleProps {
|
|
57
57
|
}
|
|
58
58
|
export interface PickerProps<T extends object> extends
|
|
59
|
-
Omit<AriaSelectProps<T>, 'children' | 'style' | 'className' | 'placeholder'>,
|
|
59
|
+
Omit<AriaSelectProps<T>, 'children' | 'style' | 'className' | 'render' | 'placeholder'>,
|
|
60
60
|
PickerStyleProps,
|
|
61
61
|
StyleProps,
|
|
62
62
|
SpectrumLabelableProps,
|
|
@@ -318,7 +318,7 @@ function TabLine(props: {isDisabled?: boolean}) {
|
|
|
318
318
|
}
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className'>, StyleProps {
|
|
321
|
+
export interface PickerItemProps extends Omit<ListBoxItemProps, 'children' | 'style' | 'className' | 'render'>, StyleProps {
|
|
322
322
|
children: ReactNode
|
|
323
323
|
}
|
|
324
324
|
export function PickerItem(props: PickerItemProps): ReactNode {
|
package/src/TagGroup.tsx
CHANGED
|
@@ -52,12 +52,12 @@ import {useLocalizedStringFormatter} from '@react-aria/i18n';
|
|
|
52
52
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
53
53
|
|
|
54
54
|
// Get types from RSP and extend those?
|
|
55
|
-
export interface TagProps extends Omit<AriaTagProps, 'children' | 'style' | 'className' | 'onClick' | keyof GlobalDOMAttributes>, LabelableProps {
|
|
55
|
+
export interface TagProps extends Omit<AriaTagProps, 'children' | 'style' | 'className' | 'render' | 'onClick' | keyof GlobalDOMAttributes>, LabelableProps {
|
|
56
56
|
/** The children of the tag. */
|
|
57
57
|
children: ReactNode
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
export interface TagGroupProps<T> extends Omit<AriaTagGroupProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'>, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, StyleProps, Omit<HelpTextProps, 'errorMessage'> {
|
|
60
|
+
export interface TagGroupProps<T> extends Omit<AriaTagGroupProps, 'children' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, Pick<TagListProps<T>, 'items' | 'children' | 'renderEmptyState'>, Omit<SpectrumLabelableProps, 'isRequired' | 'necessityIndicator'>, StyleProps, Omit<HelpTextProps, 'errorMessage'> {
|
|
61
61
|
/** A description for the tag group. */
|
|
62
62
|
description?: ReactNode,
|
|
63
63
|
/**
|
package/src/TextField.tsx
CHANGED
|
@@ -33,7 +33,7 @@ import {StyleString} from '../style/types';
|
|
|
33
33
|
import {TextFieldRef} from '@react-types/textfield';
|
|
34
34
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
35
35
|
|
|
36
|
-
export interface TextFieldProps extends Omit<AriaTextFieldProps, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
|
|
36
|
+
export interface TextFieldProps extends Omit<AriaTextFieldProps, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>, StyleProps, SpectrumLabelableProps, HelpTextProps, Pick<InputProps, 'placeholder'> {
|
|
37
37
|
/**
|
|
38
38
|
* The size of the text field.
|
|
39
39
|
*
|
package/src/TimeField.tsx
CHANGED
|
@@ -27,7 +27,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
export interface TimeFieldProps<T extends TimeValue> extends
|
|
30
|
-
Omit<AriaTimeFieldProps<T>, 'children' | 'className' | 'style' | keyof GlobalDOMAttributes>,
|
|
30
|
+
Omit<AriaTimeFieldProps<T>, 'children' | 'className' | 'style' | 'render' | keyof GlobalDOMAttributes>,
|
|
31
31
|
StyleProps,
|
|
32
32
|
SpectrumLabelableProps,
|
|
33
33
|
HelpTextProps {
|
package/src/Toast.tsx
CHANGED
|
@@ -34,7 +34,7 @@ import {useMediaQuery} from '@react-spectrum/utils';
|
|
|
34
34
|
import {useOverlayTriggerState} from 'react-stately';
|
|
35
35
|
|
|
36
36
|
export type ToastPlacement = 'top' | 'top end' | 'bottom' | 'bottom end';
|
|
37
|
-
export interface ToastContainerProps extends Omit<ToastRegionProps<SpectrumToastValue>, 'queue' | 'children' | 'style' | 'className'> {
|
|
37
|
+
export interface ToastContainerProps extends Omit<ToastRegionProps<SpectrumToastValue>, 'queue' | 'children' | 'style' | 'className' | 'render'> {
|
|
38
38
|
/**
|
|
39
39
|
* Placement of the toast container on the page.
|
|
40
40
|
* @default "bottom"
|
package/src/ToggleButton.tsx
CHANGED
|
@@ -26,7 +26,7 @@ import {useFocusableRef} from '@react-spectrum/utils';
|
|
|
26
26
|
import {useFormProps} from './Form';
|
|
27
27
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
28
28
|
|
|
29
|
-
export interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ActionButtonStyleProps {
|
|
29
|
+
export interface ToggleButtonProps extends Omit<RACToggleButtonProps, 'className' | 'style' | 'render' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange' | 'onClick' | keyof GlobalDOMAttributes>, StyleProps, ActionButtonStyleProps {
|
|
30
30
|
/** The content to display in the button. */
|
|
31
31
|
children: ReactNode,
|
|
32
32
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
@@ -16,7 +16,7 @@ import {createContext, ForwardedRef, forwardRef} from 'react';
|
|
|
16
16
|
import {DOMProps, GlobalDOMAttributes} from '@react-types/shared';
|
|
17
17
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
18
18
|
|
|
19
|
-
export interface ToggleButtonGroupProps extends ActionButtonGroupProps, Omit<RACToggleButtonGroupProps, 'children' | 'style' | 'className' | keyof GlobalDOMAttributes>, DOMProps {
|
|
19
|
+
export interface ToggleButtonGroupProps extends ActionButtonGroupProps, Omit<RACToggleButtonGroupProps, 'children' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes>, DOMProps {
|
|
20
20
|
/** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */
|
|
21
21
|
isEmphasized?: boolean
|
|
22
22
|
}
|
package/src/Tooltip.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export interface TooltipTriggerProps extends Omit<AriaTooltipTriggerComponentPro
|
|
|
38
38
|
placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
export interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange' | keyof GlobalDOMAttributes>, DOMProps, UnsafeStyles {
|
|
41
|
+
export interface TooltipProps extends Omit<AriaTooltipProps, 'children' | 'className' | 'style' | 'render' | 'triggerRef' | 'UNSTABLE_portalContainer' | 'isEntering' | 'isExiting' | 'placement' | 'containerPadding' | 'offset' | 'crossOffset' | 'shouldFlip' | 'arrowBoundaryOffset' | 'isOpen' | 'defaultOpen' | 'onOpenChange' | keyof GlobalDOMAttributes>, DOMProps, UnsafeStyles {
|
|
42
42
|
/** The content of the tooltip. */
|
|
43
43
|
children: ReactNode
|
|
44
44
|
}
|
package/src/TreeView.tsx
CHANGED
|
@@ -50,12 +50,12 @@ interface S2TreeProps {
|
|
|
50
50
|
onAction?: (key: Key) => void
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export interface TreeViewProps<T> extends Omit<RACTreeProps<T>, 'style' | 'className' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks' | keyof GlobalDOMAttributes>, UnsafeStyles, S2TreeProps {
|
|
53
|
+
export interface TreeViewProps<T> extends Omit<RACTreeProps<T>, 'style' | 'className' | 'render' | 'onRowAction' | 'selectionBehavior' | 'onScroll' | 'onCellAction' | 'dragAndDropHooks' | keyof GlobalDOMAttributes>, UnsafeStyles, S2TreeProps {
|
|
54
54
|
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
55
55
|
styles?: StylesPropWithHeight
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export interface TreeViewItemProps extends Omit<RACTreeItemProps, 'className' | 'style' | 'onClick' | keyof GlobalDOMAttributes> {
|
|
58
|
+
export interface TreeViewItemProps extends Omit<RACTreeItemProps, 'className' | 'style' | 'render' | 'onClick' | keyof GlobalDOMAttributes> {
|
|
59
59
|
/** Whether this item has children, even if not loaded yet. */
|
|
60
60
|
hasChildItems?: boolean
|
|
61
61
|
}
|
|
@@ -217,7 +217,11 @@ const treeCheckbox = style({
|
|
|
217
217
|
gridArea: 'checkbox',
|
|
218
218
|
marginStart: 12,
|
|
219
219
|
marginEnd: 0,
|
|
220
|
-
paddingEnd: 0
|
|
220
|
+
paddingEnd: 0,
|
|
221
|
+
visibility: {
|
|
222
|
+
default: 'visible',
|
|
223
|
+
isDisabled: 'hidden'
|
|
224
|
+
}
|
|
221
225
|
});
|
|
222
226
|
|
|
223
227
|
const treeIcon = style({
|
|
@@ -302,7 +306,7 @@ export const TreeViewItemContent = (props: TreeViewItemContentProps): ReactNode
|
|
|
302
306
|
<div className={treeCellGrid({isDisabled, isNextSelected, isSelected, isFirst, isNextFocused})}>
|
|
303
307
|
{selectionMode !== 'none' && selectionBehavior === 'toggle' && (
|
|
304
308
|
// TODO: add transition?
|
|
305
|
-
<div className={treeCheckbox}>
|
|
309
|
+
<div className={treeCheckbox({isDisabled: isDisabled || !state.selectionManager.canSelectItem(id) || state.disabledKeys.has(id)})}>
|
|
306
310
|
<Checkbox slot="selection" />
|
|
307
311
|
</div>
|
|
308
312
|
)}
|
|
@@ -319,8 +323,8 @@ export const TreeViewItemContent = (props: TreeViewItemContentProps): ReactNode
|
|
|
319
323
|
render: centerBaseline({slot: 'icon', styles: treeIcon}),
|
|
320
324
|
styles: style({size: fontRelative(20), flexShrink: 0})
|
|
321
325
|
}],
|
|
322
|
-
[ActionButtonGroupContext, {styles: treeActions}],
|
|
323
|
-
[ActionMenuContext, {styles: treeActionMenu, isQuiet: true}]
|
|
326
|
+
[ActionButtonGroupContext, {styles: treeActions, isDisabled}],
|
|
327
|
+
[ActionMenuContext, {styles: treeActionMenu, isQuiet: true, isDisabled}]
|
|
324
328
|
]}>
|
|
325
329
|
{typeof children === 'string' ? <Text>{children}</Text> : children}
|
|
326
330
|
</Provider>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {mergeStyles} from '../runtime';
|
|
14
|
+
import {style} from '../spectrum-theme';
|
|
15
|
+
|
|
16
|
+
function stripMacro(css) {
|
|
17
|
+
return css.replaceAll(/ -macro-static-[0-9a-zA-Z]+/gi, '').replaceAll(/ -macro-dynamic-[0-9a-zA-Z]+/gi, '');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
describe('mergeStyles', () => {
|
|
21
|
+
it('should merge styles', () => {
|
|
22
|
+
let a = style({backgroundColor: 'red-1000', color: 'pink-100'});
|
|
23
|
+
let b = style({fontSize: 'body-xs', backgroundColor: 'gray-50'});
|
|
24
|
+
let expected = style({backgroundColor: 'gray-50', color: 'pink-100', fontSize: 'body-xs'});
|
|
25
|
+
let merged = mergeStyles(a, b);
|
|
26
|
+
expect(stripMacro(merged)).toBe(stripMacro(expected.toString()));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('should merge with arbitrary values', () => {
|
|
30
|
+
let a = style({backgroundColor: 'red-1000', color: '[hotpink]'});
|
|
31
|
+
let b = style({fontSize: '[15px]', backgroundColor: 'gray-50'});
|
|
32
|
+
let expected = style({backgroundColor: 'gray-50', color: '[hotpink]', fontSize: '[15px]'});
|
|
33
|
+
let merged = mergeStyles(a, b);
|
|
34
|
+
expect(stripMacro(merged)).toBe(stripMacro(expected.toString()));
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
describe('when merging styles with macros', () => {
|
|
38
|
+
it('should not merge multiple static macro classes', () => {
|
|
39
|
+
let a = style({backgroundColor: 'red-1000', color: 'pink-100'});
|
|
40
|
+
let b = style({fontSize: 'body-xs', backgroundColor: 'gray-50'});
|
|
41
|
+
let merged = mergeStyles(a, b);
|
|
42
|
+
// expect the merged styles to include two static different macro classes within the string
|
|
43
|
+
let macroClasses = merged.match(/-macro-static-[0-9a-zA-Z]+/g);
|
|
44
|
+
expect(macroClasses).toHaveLength(2);
|
|
45
|
+
expect(macroClasses![0] !== macroClasses![1]);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should not merge multiple dynamic macro classes', () => {
|
|
49
|
+
let a = style({backgroundColor: 'red-1000', color: {default: '[hotpink]', isDisabled: 'gray-400'}});
|
|
50
|
+
let b = style({fontSize: '[15px]', backgroundColor: {default: 'gray-50', isDisabled: 'gray-400'}});
|
|
51
|
+
let merged = mergeStyles(a({isDisabled: true}), b({isDisabled: false}));
|
|
52
|
+
let macroClasses = merged.match(/-macro-dynamic-[0-9a-zA-Z]+/g);
|
|
53
|
+
expect(macroClasses).toHaveLength(2);
|
|
54
|
+
expect(macroClasses![0] !== macroClasses![1]);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('should retain both static and dynamic macro classes', () => {
|
|
58
|
+
let a = style({backgroundColor: 'red-1000', color: {default: '[hotpink]', isDisabled: 'gray-400'}});
|
|
59
|
+
let b = style({fontSize: 'body-xs', backgroundColor: 'gray-50'});
|
|
60
|
+
let merged = mergeStyles(a({isDisabled: true}), b);
|
|
61
|
+
let staticMacroClasses = merged.match(/-macro-static-[0-9a-zA-Z]+/g);
|
|
62
|
+
expect(staticMacroClasses).toHaveLength(1);
|
|
63
|
+
let dynamicMacroClasses = merged.match(/-macro-dynamic-[0-9a-zA-Z]+/g);
|
|
64
|
+
expect(dynamicMacroClasses).toHaveLength(1);
|
|
65
|
+
expect(staticMacroClasses![0] !== dynamicMacroClasses![0]);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
});
|