@react-spectrum/s2 1.4.0 → 1.5.1
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/exports/CenterBaseline.cjs +12 -0
- package/dist/exports/CenterBaseline.cjs.map +1 -0
- package/dist/exports/CenterBaseline.mjs +7 -0
- package/dist/exports/CenterBaseline.mjs.map +1 -0
- package/dist/exports/Skeleton.cjs +1 -0
- package/dist/exports/Skeleton.cjs.map +1 -1
- package/dist/exports/Skeleton.mjs +2 -2
- package/dist/exports/Skeleton.mjs.map +1 -1
- package/dist/exports/index.cjs +3 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.mjs +3 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/private/Accordion.cjs +2 -2
- package/dist/private/Accordion.css +2 -2
- package/dist/private/Accordion.mjs +2 -2
- package/dist/private/ActionBar.cjs +59 -59
- package/dist/private/ActionBar.cjs.map +1 -1
- package/dist/private/ActionBar.css +58 -58
- package/dist/private/ActionBar.css.map +1 -1
- package/dist/private/ActionBar.mjs +59 -59
- package/dist/private/ActionBar.mjs.map +1 -1
- package/dist/private/ActionButton.cjs +247 -247
- package/dist/private/ActionButton.cjs.map +1 -1
- package/dist/private/ActionButton.css +169 -169
- package/dist/private/ActionButton.css.map +1 -1
- package/dist/private/ActionButton.mjs +247 -247
- package/dist/private/ActionButton.mjs.map +1 -1
- package/dist/private/ActionButtonGroup.cjs +15 -15
- package/dist/private/ActionButtonGroup.css +9 -9
- package/dist/private/ActionButtonGroup.mjs +15 -15
- package/dist/private/ActionMenu.cjs.map +1 -1
- package/dist/private/ActionMenu.mjs.map +1 -1
- package/dist/private/Add.cjs +10 -10
- package/dist/private/Add.css +6 -6
- package/dist/private/Add.mjs +10 -10
- package/dist/private/AlertDialog.cjs +3 -3
- package/dist/private/AlertDialog.cjs.map +1 -1
- package/dist/private/AlertDialog.css +3 -3
- package/dist/private/AlertDialog.css.map +1 -1
- package/dist/private/AlertDialog.mjs +3 -3
- package/dist/private/AlertDialog.mjs.map +1 -1
- package/dist/private/Asterisk.cjs +6 -6
- package/dist/private/Asterisk.css +4 -4
- package/dist/private/Asterisk.mjs +6 -6
- package/dist/private/Avatar.cjs +16 -16
- package/dist/private/Avatar.css +16 -16
- package/dist/private/Avatar.mjs +16 -16
- package/dist/private/AvatarGroup.cjs +120 -120
- package/dist/private/AvatarGroup.css +31 -31
- package/dist/private/AvatarGroup.mjs +120 -120
- package/dist/private/Badge.cjs +197 -197
- package/dist/private/Badge.css +125 -125
- package/dist/private/Badge.mjs +197 -197
- package/dist/private/Breadcrumbs.cjs +234 -234
- package/dist/private/Breadcrumbs.cjs.map +1 -1
- package/dist/private/Breadcrumbs.css +100 -100
- package/dist/private/Breadcrumbs.css.map +1 -1
- package/dist/private/Breadcrumbs.mjs +234 -234
- package/dist/private/Breadcrumbs.mjs.map +1 -1
- package/dist/private/Button.cjs +335 -326
- package/dist/private/Button.cjs.map +1 -1
- package/dist/private/Button.css +176 -172
- package/dist/private/Button.css.map +1 -1
- package/dist/private/Button.mjs +335 -326
- package/dist/private/Button.mjs.map +1 -1
- package/dist/private/ButtonGroup.cjs +23 -20
- package/dist/private/ButtonGroup.cjs.map +1 -1
- package/dist/private/ButtonGroup.css +19 -15
- package/dist/private/ButtonGroup.css.map +1 -1
- package/dist/private/ButtonGroup.mjs +23 -20
- package/dist/private/ButtonGroup.mjs.map +1 -1
- package/dist/private/Calendar.cjs +232 -232
- package/dist/private/Calendar.cjs.map +1 -1
- package/dist/private/Calendar.css +149 -149
- package/dist/private/Calendar.css.map +1 -1
- package/dist/private/Calendar.mjs +232 -232
- package/dist/private/Calendar.mjs.map +1 -1
- package/dist/private/Card.cjs +309 -309
- package/dist/private/Card.css +206 -206
- package/dist/private/Card.mjs +309 -309
- package/dist/private/CardView.cjs +17 -17
- package/dist/private/CardView.css +17 -17
- package/dist/private/CardView.mjs +17 -17
- package/dist/private/CenterBaseline.cjs +1 -1
- package/dist/private/CenterBaseline.cjs.map +1 -1
- package/dist/private/CenterBaseline.css +2 -2
- package/dist/private/CenterBaseline.css.map +1 -1
- package/dist/private/CenterBaseline.mjs +1 -1
- package/dist/private/CenterBaseline.mjs.map +1 -1
- package/dist/private/Checkbox.cjs +188 -188
- package/dist/private/Checkbox.css +110 -110
- package/dist/private/Checkbox.mjs +188 -188
- package/dist/private/CheckboxGroup.cjs +43 -43
- package/dist/private/CheckboxGroup.css +37 -37
- package/dist/private/CheckboxGroup.mjs +43 -43
- package/dist/private/Checkmark.cjs +12 -12
- package/dist/private/Checkmark.css +8 -8
- package/dist/private/Checkmark.mjs +12 -12
- package/dist/private/Chevron.cjs +12 -12
- package/dist/private/Chevron.css +10 -10
- package/dist/private/Chevron.mjs +12 -12
- package/dist/private/ClearButton.cjs +30 -30
- package/dist/private/ClearButton.css +30 -30
- package/dist/private/ClearButton.mjs +30 -30
- package/dist/private/CloseButton.cjs +52 -52
- package/dist/private/CloseButton.cjs.map +1 -1
- package/dist/private/CloseButton.css +46 -46
- package/dist/private/CloseButton.css.map +1 -1
- package/dist/private/CloseButton.mjs +52 -52
- package/dist/private/CloseButton.mjs.map +1 -1
- package/dist/private/ColorArea.cjs +16 -16
- package/dist/private/ColorArea.css +16 -16
- package/dist/private/ColorArea.mjs +16 -16
- package/dist/private/ColorField.cjs +31 -31
- package/dist/private/ColorField.css +27 -27
- package/dist/private/ColorField.mjs +31 -31
- package/dist/private/ColorHandle.cjs +27 -27
- package/dist/private/ColorHandle.css +42 -42
- package/dist/private/ColorHandle.mjs +27 -27
- package/dist/private/ColorSlider.cjs +108 -108
- package/dist/private/ColorSlider.css +52 -52
- package/dist/private/ColorSlider.mjs +108 -108
- package/dist/private/ColorSwatch.cjs +29 -29
- package/dist/private/ColorSwatch.css +29 -29
- package/dist/private/ColorSwatch.mjs +29 -29
- package/dist/private/ColorSwatchPicker.cjs +29 -29
- package/dist/private/ColorSwatchPicker.css +48 -48
- package/dist/private/ColorSwatchPicker.mjs +29 -29
- package/dist/private/ColorWheel.cjs +26 -26
- package/dist/private/ColorWheel.css +17 -17
- package/dist/private/ColorWheel.mjs +26 -26
- package/dist/private/ComboBox.cjs +381 -381
- package/dist/private/ComboBox.cjs.map +1 -1
- package/dist/private/ComboBox.css +188 -188
- package/dist/private/ComboBox.css.map +1 -1
- package/dist/private/ComboBox.mjs +381 -381
- package/dist/private/ComboBox.mjs.map +1 -1
- package/dist/private/ContextualHelp.cjs +5 -5
- package/dist/private/ContextualHelp.cjs.map +1 -1
- package/dist/private/ContextualHelp.css +50 -50
- package/dist/private/ContextualHelp.css.map +1 -1
- package/dist/private/ContextualHelp.mjs +5 -5
- package/dist/private/ContextualHelp.mjs.map +1 -1
- package/dist/private/CornerTriangle.cjs +8 -8
- package/dist/private/CornerTriangle.css +6 -6
- package/dist/private/CornerTriangle.mjs +8 -8
- package/dist/private/Cross.cjs +14 -14
- package/dist/private/Cross.css +10 -10
- package/dist/private/Cross.mjs +14 -14
- package/dist/private/CustomDialog.cjs +25 -25
- package/dist/private/CustomDialog.css +25 -25
- package/dist/private/CustomDialog.mjs +25 -25
- package/dist/private/Dash.cjs +10 -10
- package/dist/private/Dash.css +6 -6
- package/dist/private/Dash.mjs +10 -10
- package/dist/private/DateField.cjs +73 -73
- package/dist/private/DateField.css +77 -77
- package/dist/private/DateField.mjs +73 -73
- package/dist/private/DatePicker.cjs +172 -172
- package/dist/private/DatePicker.cjs.map +1 -1
- package/dist/private/DatePicker.css +128 -128
- package/dist/private/DatePicker.css.map +1 -1
- package/dist/private/DatePicker.mjs +172 -172
- package/dist/private/DatePicker.mjs.map +1 -1
- package/dist/private/DateRangePicker.cjs +55 -55
- package/dist/private/DateRangePicker.cjs.map +1 -1
- package/dist/private/DateRangePicker.css +59 -59
- package/dist/private/DateRangePicker.css.map +1 -1
- package/dist/private/DateRangePicker.mjs +55 -55
- package/dist/private/DateRangePicker.mjs.map +1 -1
- package/dist/private/Dialog.cjs +17 -17
- package/dist/private/Dialog.css +70 -70
- package/dist/private/Dialog.mjs +17 -17
- package/dist/private/Disclosure.cjs +144 -122
- package/dist/private/Disclosure.cjs.map +1 -1
- package/dist/private/Disclosure.css +112 -112
- package/dist/private/Disclosure.css.map +1 -1
- package/dist/private/Disclosure.mjs +144 -122
- package/dist/private/Disclosure.mjs.map +1 -1
- package/dist/private/Divider.cjs +25 -25
- package/dist/private/Divider.css +25 -25
- package/dist/private/Divider.mjs +25 -25
- package/dist/private/DragHandle.cjs +8 -8
- package/dist/private/DragHandle.css +6 -6
- package/dist/private/DragHandle.mjs +8 -8
- package/dist/private/DragPreview.cjs +154 -154
- package/dist/private/DragPreview.css +106 -106
- package/dist/private/DragPreview.mjs +154 -154
- package/dist/private/DropZone.cjs +61 -61
- package/dist/private/DropZone.cjs.map +1 -1
- package/dist/private/DropZone.css +57 -57
- package/dist/private/DropZone.css.map +1 -1
- package/dist/private/DropZone.mjs +61 -61
- package/dist/private/DropZone.mjs.map +1 -1
- package/dist/private/Field.cjs +360 -360
- package/dist/private/Field.cjs.map +1 -1
- package/dist/private/Field.css +160 -160
- package/dist/private/Field.css.map +1 -1
- package/dist/private/Field.mjs +360 -360
- package/dist/private/Field.mjs.map +1 -1
- package/dist/private/Form.cjs +9 -9
- package/dist/private/Form.css +9 -9
- package/dist/private/Form.mjs +9 -9
- package/dist/private/FullscreenDialog.cjs +5 -5
- package/dist/private/FullscreenDialog.css +78 -78
- package/dist/private/FullscreenDialog.mjs +5 -5
- package/dist/private/IllustratedMessage.cjs +228 -228
- package/dist/private/IllustratedMessage.css +72 -72
- package/dist/private/IllustratedMessage.mjs +228 -228
- package/dist/private/Image.cjs +14 -14
- package/dist/private/Image.css +14 -14
- package/dist/private/Image.mjs +14 -14
- package/dist/private/InlineAlert.cjs +100 -100
- package/dist/private/InlineAlert.cjs.map +1 -1
- package/dist/private/InlineAlert.css +76 -76
- package/dist/private/InlineAlert.css.map +1 -1
- package/dist/private/InlineAlert.mjs +100 -100
- package/dist/private/InlineAlert.mjs.map +1 -1
- package/dist/private/LabeledValue.cjs +134 -134
- package/dist/private/LabeledValue.css +63 -63
- package/dist/private/LabeledValue.mjs +134 -134
- package/dist/private/Link.cjs +49 -49
- package/dist/private/Link.css +41 -41
- package/dist/private/Link.mjs +49 -49
- package/dist/private/LinkOut.cjs +8 -8
- package/dist/private/LinkOut.css +8 -8
- package/dist/private/LinkOut.mjs +8 -8
- package/dist/private/ListView.cjs +245 -245
- package/dist/private/ListView.cjs.map +1 -1
- package/dist/private/ListView.css +177 -177
- package/dist/private/ListView.css.map +1 -1
- package/dist/private/ListView.mjs +245 -245
- package/dist/private/ListView.mjs.map +1 -1
- package/dist/private/Menu.cjs +446 -446
- package/dist/private/Menu.cjs.map +1 -1
- package/dist/private/Menu.css +196 -196
- package/dist/private/Menu.css.map +1 -1
- package/dist/private/Menu.mjs +446 -446
- package/dist/private/Menu.mjs.map +1 -1
- package/dist/private/Meter.cjs +153 -153
- package/dist/private/Meter.css +91 -91
- package/dist/private/Meter.mjs +153 -153
- package/dist/private/Modal.cjs +74 -74
- package/dist/private/Modal.css +59 -59
- package/dist/private/Modal.mjs +74 -74
- package/dist/private/NotificationBadge.cjs +56 -56
- package/dist/private/NotificationBadge.cjs.map +1 -1
- package/dist/private/NotificationBadge.css +49 -49
- package/dist/private/NotificationBadge.css.map +1 -1
- package/dist/private/NotificationBadge.mjs +56 -56
- package/dist/private/NotificationBadge.mjs.map +1 -1
- package/dist/private/NumberField.cjs +114 -114
- package/dist/private/NumberField.css +99 -99
- package/dist/private/NumberField.mjs +114 -114
- package/dist/private/Picker.cjs +275 -275
- package/dist/private/Picker.cjs.map +1 -1
- package/dist/private/Picker.css +173 -173
- package/dist/private/Picker.css.map +1 -1
- package/dist/private/Picker.mjs +275 -275
- package/dist/private/Picker.mjs.map +1 -1
- package/dist/private/Popover.cjs +95 -95
- package/dist/private/Popover.cjs.map +1 -1
- package/dist/private/Popover.css +75 -75
- package/dist/private/Popover.css.map +1 -1
- package/dist/private/Popover.mjs +95 -95
- package/dist/private/Popover.mjs.map +1 -1
- package/dist/private/ProgressBar.cjs +163 -163
- package/dist/private/ProgressBar.css +99 -99
- package/dist/private/ProgressBar.mjs +163 -163
- package/dist/private/ProgressCircle.cjs +34 -31
- package/dist/private/ProgressCircle.cjs.map +1 -1
- package/dist/private/ProgressCircle.css +24 -24
- package/dist/private/ProgressCircle.css.map +1 -1
- package/dist/private/ProgressCircle.mjs +34 -31
- package/dist/private/ProgressCircle.mjs.map +1 -1
- package/dist/private/Provider.cjs +19 -19
- package/dist/private/Provider.css +15 -15
- package/dist/private/Provider.mjs +19 -19
- package/dist/private/RadioGroup.cjs +208 -208
- package/dist/private/RadioGroup.css +113 -113
- package/dist/private/RadioGroup.mjs +208 -208
- package/dist/private/RangeCalendar.cjs +16 -16
- package/dist/private/RangeCalendar.cjs.map +1 -1
- package/dist/private/RangeCalendar.css +17 -17
- package/dist/private/RangeCalendar.css.map +1 -1
- package/dist/private/RangeCalendar.mjs +16 -16
- package/dist/private/RangeCalendar.mjs.map +1 -1
- package/dist/private/RangeSlider.cjs.map +1 -1
- package/dist/private/RangeSlider.mjs.map +1 -1
- package/dist/private/SearchField.cjs +41 -41
- package/dist/private/SearchField.css +45 -45
- package/dist/private/SearchField.mjs +41 -41
- package/dist/private/SegmentedControl.cjs +178 -178
- package/dist/private/SegmentedControl.css +123 -123
- package/dist/private/SegmentedControl.mjs +178 -178
- package/dist/private/SelectBoxGroup.cjs +142 -142
- package/dist/private/SelectBoxGroup.css +120 -120
- package/dist/private/SelectBoxGroup.mjs +142 -142
- package/dist/private/Slider.cjs +292 -292
- package/dist/private/Slider.css +159 -159
- package/dist/private/Slider.mjs +292 -292
- package/dist/private/StatusLight.cjs +115 -115
- package/dist/private/StatusLight.css +59 -59
- package/dist/private/StatusLight.mjs +115 -115
- package/dist/private/Switch.cjs +171 -171
- package/dist/private/Switch.css +85 -85
- package/dist/private/Switch.mjs +171 -171
- package/dist/private/TableView.cjs +551 -534
- package/dist/private/TableView.cjs.map +1 -1
- package/dist/private/TableView.css +329 -303
- package/dist/private/TableView.css.map +1 -1
- package/dist/private/TableView.mjs +551 -534
- package/dist/private/TableView.mjs.map +1 -1
- package/dist/private/Tabs.cjs +131 -125
- package/dist/private/Tabs.cjs.map +1 -1
- package/dist/private/Tabs.css +105 -105
- package/dist/private/Tabs.css.map +1 -1
- package/dist/private/Tabs.mjs +131 -125
- package/dist/private/Tabs.mjs.map +1 -1
- package/dist/private/TabsPicker.cjs +127 -127
- package/dist/private/TabsPicker.css +108 -108
- package/dist/private/TabsPicker.mjs +127 -127
- package/dist/private/TagGroup.cjs +203 -203
- package/dist/private/TagGroup.cjs.map +1 -1
- package/dist/private/TagGroup.css +146 -146
- package/dist/private/TagGroup.css.map +1 -1
- package/dist/private/TagGroup.mjs +203 -203
- package/dist/private/TagGroup.mjs.map +1 -1
- package/dist/private/TextField.cjs +58 -58
- package/dist/private/TextField.css +54 -54
- package/dist/private/TextField.mjs +58 -58
- package/dist/private/TimeField.cjs +51 -51
- package/dist/private/TimeField.css +47 -47
- package/dist/private/TimeField.mjs +51 -51
- package/dist/private/Toast.cjs +120 -120
- package/dist/private/Toast.cjs.map +1 -1
- package/dist/private/Toast.css +110 -110
- package/dist/private/Toast.css.map +1 -1
- package/dist/private/Toast.mjs +120 -120
- package/dist/private/Toast.mjs.map +1 -1
- package/dist/private/ToggleButton.cjs +16 -16
- package/dist/private/ToggleButton.css +23 -23
- package/dist/private/ToggleButton.mjs +16 -16
- package/dist/private/Tooltip.cjs +86 -86
- package/dist/private/Tooltip.css +70 -70
- package/dist/private/Tooltip.mjs +86 -86
- package/dist/private/TreeView.cjs +229 -229
- package/dist/private/TreeView.cjs.map +1 -1
- package/dist/private/TreeView.css +184 -184
- package/dist/private/TreeView.css.map +1 -1
- package/dist/private/TreeView.mjs +229 -229
- package/dist/private/TreeView.mjs.map +1 -1
- package/dist/private/dnd-utils.cjs +42 -42
- package/dist/private/dnd-utils.css +39 -39
- package/dist/private/dnd-utils.mjs +42 -42
- package/dist/types/exports/CenterBaseline.d.ts +1 -0
- package/dist/types/exports/Skeleton.d.ts +1 -1
- package/dist/types/exports/index.d.ts +1 -0
- package/dist/types/src/CenterBaseline.d.ts +17 -0
- package/dist/types/src/ContextualHelp.d.ts +1 -1
- package/dist/types/src/Disclosure.d.ts +6 -1
- package/dist/types/src/ListView.d.ts +1 -1
- package/dist/types/src/Menu.d.ts +1 -1
- package/dist/types/src/Popover.d.ts +2 -2
- package/dist/types/src/style-utils.d.ts +4 -1
- package/exports/CenterBaseline.ts +1 -0
- package/exports/Skeleton.ts +1 -1
- package/exports/index.ts +2 -0
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/package.json +6 -6
- package/src/ActionBar.tsx +0 -1
- package/src/ActionButton.tsx +0 -1
- package/src/ActionMenu.tsx +0 -1
- package/src/AlertDialog.tsx +0 -1
- package/src/Breadcrumbs.tsx +0 -4
- package/src/Button.tsx +12 -3
- package/src/ButtonGroup.tsx +1 -0
- package/src/Calendar.tsx +0 -1
- package/src/CenterBaseline.tsx +17 -0
- package/src/CloseButton.tsx +0 -1
- package/src/ComboBox.tsx +0 -1
- package/src/ContextualHelp.tsx +1 -2
- package/src/DatePicker.tsx +0 -1
- package/src/DateRangePicker.tsx +0 -1
- package/src/Disclosure.tsx +92 -79
- package/src/DropZone.tsx +0 -1
- package/src/Field.tsx +0 -1
- package/src/InlineAlert.tsx +0 -1
- package/src/ListView.tsx +0 -2
- package/src/Menu.tsx +1 -8
- package/src/NotificationBadge.tsx +0 -1
- package/src/Picker.tsx +0 -1
- package/src/Popover.tsx +2 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RangeCalendar.tsx +0 -1
- package/src/RangeSlider.tsx +0 -1
- package/src/TableView.tsx +75 -37
- package/src/Tabs.tsx +9 -2
- package/src/TagGroup.tsx +0 -1
- package/src/Toast.tsx +0 -3
- package/src/TreeView.tsx +0 -1
- package/src/style-utils.ts +13 -2
- package/style/__tests__/style-macro.test.js +73 -71
- package/style/dist/main.cjs +25 -25
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +224 -224
- package/style/dist/spectrum-theme.mjs +217 -217
- package/style/dist/style-macro.cjs +100 -100
- package/style/dist/style-macro.mjs +94 -94
- package/style/dist/style-utils.cjs +51 -39
- package/style/dist/style-utils.cjs.map +1 -1
- package/style/dist/style-utils.mjs +50 -38
- package/style/dist/style-utils.mjs.map +1 -1
package/src/Disclosure.tsx
CHANGED
|
@@ -41,7 +41,12 @@ import {
|
|
|
41
41
|
DisclosureProps as RACDisclosureProps
|
|
42
42
|
} from 'react-aria-components/Disclosure';
|
|
43
43
|
import {filterDOMProps} from 'react-aria/filterDOMProps';
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
getAllowedOverrides,
|
|
46
|
+
StyleProps,
|
|
47
|
+
StylesPropWithFont,
|
|
48
|
+
UnsafeStyles
|
|
49
|
+
} from './style-utils' with {type: 'macro'};
|
|
45
50
|
import {Heading} from 'react-aria-components/Heading';
|
|
46
51
|
import React, {createContext, forwardRef, ReactNode, useContext} from 'react';
|
|
47
52
|
import {useDOMRef} from './useDOMRef';
|
|
@@ -139,6 +144,11 @@ export interface DisclosureTitleProps extends UnsafeStyles, DOMProps {
|
|
|
139
144
|
level?: number;
|
|
140
145
|
/** The contents of the disclosure header. */
|
|
141
146
|
children: React.ReactNode;
|
|
147
|
+
/**
|
|
148
|
+
* Spectrum-defined styles, returned by the `style()` macro. Only allows overriding
|
|
149
|
+
* `font`, `fontFamily`, `fontWeight`, `fontSize`, and `lineHeight`.
|
|
150
|
+
*/
|
|
151
|
+
styles?: StylesPropWithFont;
|
|
142
152
|
}
|
|
143
153
|
|
|
144
154
|
interface DisclosureHeaderProps extends UnsafeStyles, DOMProps {
|
|
@@ -153,85 +163,88 @@ const headingStyle = style({
|
|
|
153
163
|
minWidth: 0
|
|
154
164
|
});
|
|
155
165
|
|
|
156
|
-
const buttonStyles = style(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
166
|
+
const buttonStyles = style(
|
|
167
|
+
{
|
|
168
|
+
...focusRing(),
|
|
169
|
+
outlineOffset: -2,
|
|
170
|
+
font: 'heading',
|
|
171
|
+
color: {
|
|
172
|
+
default: baseColor('neutral'),
|
|
173
|
+
forcedColors: 'ButtonText',
|
|
174
|
+
isDisabled: {
|
|
175
|
+
default: 'disabled',
|
|
176
|
+
forcedColors: 'GrayText'
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
fontWeight: 'bold',
|
|
180
|
+
fontSize: {
|
|
181
|
+
size: {
|
|
182
|
+
S: 'title-sm',
|
|
183
|
+
M: 'title',
|
|
184
|
+
L: 'title-lg',
|
|
185
|
+
XL: 'title-xl'
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
lineHeight: 'ui',
|
|
189
|
+
display: 'flex',
|
|
190
|
+
flexGrow: 1,
|
|
191
|
+
alignItems: 'baseline',
|
|
192
|
+
paddingX: 'calc(self(minHeight) * 3/8 - 1px)',
|
|
193
|
+
paddingY: centerPadding(),
|
|
194
|
+
gap: 'calc(self(minHeight) * 3/8 - 1px)',
|
|
195
|
+
minHeight: {
|
|
196
|
+
// compact is equivalent to 'control', but other densities have more padding.
|
|
197
|
+
size: {
|
|
198
|
+
S: {
|
|
199
|
+
density: {
|
|
200
|
+
compact: 18,
|
|
201
|
+
regular: 24,
|
|
202
|
+
spacious: 32
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
M: {
|
|
206
|
+
density: {
|
|
207
|
+
compact: 24,
|
|
208
|
+
regular: 32,
|
|
209
|
+
spacious: 40
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
L: {
|
|
213
|
+
density: {
|
|
214
|
+
compact: 32,
|
|
215
|
+
regular: 40,
|
|
216
|
+
spacious: 48
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
XL: {
|
|
220
|
+
density: {
|
|
221
|
+
compact: 40,
|
|
222
|
+
regular: 48,
|
|
223
|
+
spacious: 56
|
|
224
|
+
}
|
|
213
225
|
}
|
|
214
226
|
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
},
|
|
228
|
+
width: 'full',
|
|
229
|
+
backgroundColor: {
|
|
230
|
+
default: 'transparent',
|
|
231
|
+
isFocusVisible: lightDark('transparent-black-100', 'transparent-white-100'),
|
|
232
|
+
isHovered: lightDark('transparent-black-100', 'transparent-white-100'),
|
|
233
|
+
isPressed: lightDark('transparent-black-300', 'transparent-white-300')
|
|
234
|
+
},
|
|
235
|
+
transition: 'default',
|
|
236
|
+
borderWidth: 0,
|
|
237
|
+
borderRadius: {
|
|
238
|
+
// Only rounded for keyboard focus and quiet.
|
|
239
|
+
default: 'none',
|
|
240
|
+
isFocusVisible: 'default',
|
|
241
|
+
isQuiet: 'default'
|
|
242
|
+
},
|
|
243
|
+
textAlign: 'start',
|
|
244
|
+
disableTapHighlight: true
|
|
231
245
|
},
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
});
|
|
246
|
+
getAllowedOverrides({font: true})
|
|
247
|
+
);
|
|
235
248
|
|
|
236
249
|
const chevronStyles = style({
|
|
237
250
|
rotate: {
|
|
@@ -293,7 +306,7 @@ export const DisclosureTitle = forwardRef(function DisclosureTitle(
|
|
|
293
306
|
props: DisclosureTitleProps,
|
|
294
307
|
ref: DOMRef<HTMLDivElement>
|
|
295
308
|
) {
|
|
296
|
-
let {level = 3, UNSAFE_style, UNSAFE_className = '', ...otherProps} = props;
|
|
309
|
+
let {level = 3, UNSAFE_style, UNSAFE_className = '', styles, ...otherProps} = props;
|
|
297
310
|
let domRef = useDOMRef(ref);
|
|
298
311
|
const domProps = filterDOMProps(otherProps);
|
|
299
312
|
let {direction} = useLocale();
|
|
@@ -309,7 +322,7 @@ export const DisclosureTitle = forwardRef(function DisclosureTitle(
|
|
|
309
322
|
style={UNSAFE_style}
|
|
310
323
|
className={(UNSAFE_className ?? '') + headingStyle}>
|
|
311
324
|
<Button
|
|
312
|
-
className={renderProps => buttonStyles({...renderProps, size, density, isQuiet})}
|
|
325
|
+
className={renderProps => buttonStyles({...renderProps, size, density, isQuiet}, styles)}
|
|
313
326
|
slot="trigger">
|
|
314
327
|
<CenterBaseline>
|
|
315
328
|
<Chevron size={size} className={chevronStyles({isExpanded, isRTL})} aria-hidden="true" />
|
package/src/DropZone.tsx
CHANGED
|
@@ -26,7 +26,6 @@ import {
|
|
|
26
26
|
UnsafeStyles
|
|
27
27
|
} from './style-utils' with {type: 'macro'};
|
|
28
28
|
import {IllustratedMessageContext} from './IllustratedMessage';
|
|
29
|
-
// @ts-ignore
|
|
30
29
|
import intlMessages from '../intl/*.json';
|
|
31
30
|
import {style} from '../style' with {type: 'macro'};
|
|
32
31
|
import {useDOMRef} from './useDOMRef';
|
package/src/Field.tsx
CHANGED
|
@@ -39,7 +39,6 @@ import intlMessages from '../intl/*.json';
|
|
|
39
39
|
import {Label, LabelProps} from 'react-aria-components/Label';
|
|
40
40
|
import {mergeStyles} from '../style/runtime';
|
|
41
41
|
import {Provider} from 'react-aria-components/slots';
|
|
42
|
-
// @ts-ignore
|
|
43
42
|
import {StyleString} from '../style/types';
|
|
44
43
|
import {Text} from 'react-aria-components/Text';
|
|
45
44
|
import {useDOMRef} from './useDOMRef';
|
package/src/InlineAlert.tsx
CHANGED
|
@@ -21,7 +21,6 @@ import {focusRing, style} from '../style' with {type: 'macro'};
|
|
|
21
21
|
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
22
22
|
import {IconContext} from './Icon';
|
|
23
23
|
import InfoCircle from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';
|
|
24
|
-
// @ts-ignore
|
|
25
24
|
import intlMessages from '../intl/*.json';
|
|
26
25
|
import NoticeSquare from '../s2wf-icons/S2_Icon_AlertDiamond_20_N.svg';
|
|
27
26
|
import {useDOMRef} from './useDOMRef';
|
package/src/ListView.tsx
CHANGED
|
@@ -67,7 +67,6 @@ import {
|
|
|
67
67
|
} from 'react-aria-components/GridList';
|
|
68
68
|
import {IconContext} from './Icon';
|
|
69
69
|
import {ImageContext} from './Image';
|
|
70
|
-
// @ts-ignore
|
|
71
70
|
import intlMessages from '../intl/*.json';
|
|
72
71
|
import {Key} from '@react-types/shared';
|
|
73
72
|
import {LayoutInfo, Virtualizer} from 'react-aria-components/Virtualizer';
|
|
@@ -93,7 +92,6 @@ export interface ListViewProps<T>
|
|
|
93
92
|
| 'selectionBehavior'
|
|
94
93
|
| 'layout'
|
|
95
94
|
| 'render'
|
|
96
|
-
| 'keyboardNavigationBehavior'
|
|
97
95
|
| 'orientation'
|
|
98
96
|
| keyof GlobalDOMAttributes
|
|
99
97
|
>,
|
package/src/Menu.tsx
CHANGED
|
@@ -64,7 +64,6 @@ import {IconContext} from './Icon';
|
|
|
64
64
|
import {ImageContext} from './Image';
|
|
65
65
|
import InfoCircleIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg'; // chevron right removed??
|
|
66
66
|
import {InPopoverContext, Popover, PopoverContext} from './Popover';
|
|
67
|
-
// @ts-ignore
|
|
68
67
|
import intlMessages from '../intl/*.json';
|
|
69
68
|
import LinkOutIcon from '../ui-icons/LinkOut';
|
|
70
69
|
import {mergeStyles} from '../style/runtime';
|
|
@@ -106,13 +105,7 @@ export interface MenuProps<T>
|
|
|
106
105
|
extends
|
|
107
106
|
Omit<
|
|
108
107
|
AriaMenuProps<T>,
|
|
109
|
-
| '
|
|
110
|
-
| 'style'
|
|
111
|
-
| 'className'
|
|
112
|
-
| 'render'
|
|
113
|
-
| 'dependencies'
|
|
114
|
-
| 'renderEmptyState'
|
|
115
|
-
| keyof GlobalDOMAttributes
|
|
108
|
+
'children' | 'style' | 'className' | 'render' | 'renderEmptyState' | keyof GlobalDOMAttributes
|
|
116
109
|
>,
|
|
117
110
|
StyleProps {
|
|
118
111
|
/**
|
|
@@ -15,7 +15,6 @@ import {ContextValue, SlotProps} from 'react-aria-components/slots';
|
|
|
15
15
|
import {filterDOMProps} from 'react-aria/filterDOMProps';
|
|
16
16
|
import {fontRelative, style} from '../style' with {type: 'macro'};
|
|
17
17
|
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
18
|
-
// @ts-ignore
|
|
19
18
|
import intlMessages from '../intl/*.json';
|
|
20
19
|
import {NumberFormatter} from '@internationalized/number';
|
|
21
20
|
import React, {createContext, forwardRef} from 'react';
|
package/src/Picker.tsx
CHANGED
|
@@ -82,7 +82,6 @@ import {ListLayout} from 'react-stately/useVirtualizerState';
|
|
|
82
82
|
import {mergeStyles} from '../style/runtime';
|
|
83
83
|
import {Placement} from 'react-aria-components/Popover';
|
|
84
84
|
import {Popover} from './Popover';
|
|
85
|
-
// @ts-ignore
|
|
86
85
|
import {PressResponder} from 'react-aria/private/interactions/PressResponder';
|
|
87
86
|
import {pressScale} from './pressScale';
|
|
88
87
|
import {ProgressCircle} from './ProgressCircle';
|
package/src/Popover.tsx
CHANGED
|
@@ -49,7 +49,6 @@ export interface PopoverProps
|
|
|
49
49
|
Omit<
|
|
50
50
|
AriaPopoverProps,
|
|
51
51
|
| 'arrowSize'
|
|
52
|
-
| 'isNonModal'
|
|
53
52
|
| 'arrowBoundaryOffset'
|
|
54
53
|
| 'isKeyboardDismissDisabled'
|
|
55
54
|
| 'shouldCloseOnInteractOutside'
|
|
@@ -291,6 +290,8 @@ export interface PopoverDialogProps
|
|
|
291
290
|
| 'containerPadding'
|
|
292
291
|
| 'offset'
|
|
293
292
|
| 'crossOffset'
|
|
293
|
+
| 'getTargetRect'
|
|
294
|
+
| 'isNonModal'
|
|
294
295
|
| 'triggerRef'
|
|
295
296
|
| 'isOpen'
|
|
296
297
|
| 'onOpenChange'
|
package/src/ProgressCircle.tsx
CHANGED
|
@@ -198,7 +198,7 @@ export const ProgressCircle = /*#__PURE__*/ forwardRef(function ProgressCircle(
|
|
|
198
198
|
)
|
|
199
199
|
}>
|
|
200
200
|
{({percentage, isIndeterminate}) => (
|
|
201
|
-
<svg fill="none" width="100%" height="100%">
|
|
201
|
+
<svg fill="none" width="100%" height="100%" style={{display: 'block'}}>
|
|
202
202
|
<circle cx="50%" cy="50%" r={radius} className={hcmStroke({size})} />
|
|
203
203
|
<circle cx="50%" cy="50%" r={radius} className={track({isStaticColor, size})} />
|
|
204
204
|
<circle
|
package/src/RangeCalendar.tsx
CHANGED
|
@@ -22,7 +22,6 @@ import {forwardRefType, GlobalDOMAttributes} from '@react-types/shared';
|
|
|
22
22
|
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
23
23
|
import {HeaderContext, HeadingContext} from './Content';
|
|
24
24
|
import {helpTextStyles} from './Field';
|
|
25
|
-
// @ts-ignore
|
|
26
25
|
import intlMessages from '../intl/*.json';
|
|
27
26
|
import {style} from '../style' with {type: 'macro'};
|
|
28
27
|
import {Text} from 'react-aria-components/Text';
|
package/src/RangeSlider.tsx
CHANGED
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
} from './Slider';
|
|
25
25
|
import {FocusableRef, FocusableRefValue, RangeValue} from '@react-types/shared';
|
|
26
26
|
import {FormContext, useFormProps} from './Form';
|
|
27
|
-
// @ts-ignore
|
|
28
27
|
import intlMessages from '../intl/*.json';
|
|
29
28
|
import {pressScale} from './pressScale';
|
|
30
29
|
import {SliderFill, SliderThumb, SliderTrack} from 'react-aria-components/Slider';
|
package/src/TableView.tsx
CHANGED
|
@@ -92,7 +92,6 @@ import {
|
|
|
92
92
|
import {getOwnerDocument} from 'react-aria/private/utils/domHelpers';
|
|
93
93
|
import {GridNode} from 'react-stately/private/grid/GridCollection';
|
|
94
94
|
import {IconContext} from './Icon';
|
|
95
|
-
// @ts-ignore
|
|
96
95
|
import intlMessages from '../intl/*.json';
|
|
97
96
|
import {Key} from '@react-types/shared';
|
|
98
97
|
import {LayoutInfo, Rect, TableLayout, Virtualizer} from 'react-aria-components/Virtualizer';
|
|
@@ -101,7 +100,6 @@ import {Menu, MenuItem, MenuSection, MenuTrigger} from './Menu';
|
|
|
101
100
|
import Nubbin from '../ui-icons/S2_MoveHorizontalTableWidget.svg';
|
|
102
101
|
import {OverlayTriggerStateContext} from 'react-aria-components/Dialog';
|
|
103
102
|
import {ProgressCircle} from './ProgressCircle';
|
|
104
|
-
// @ts-ignore
|
|
105
103
|
import {CheckboxContext as RACCheckboxContext} from 'react-aria-components/Checkbox';
|
|
106
104
|
import {Popover as RACPopover} from 'react-aria-components/Popover';
|
|
107
105
|
import React, {
|
|
@@ -689,7 +687,15 @@ function CellFocusRing() {
|
|
|
689
687
|
return (
|
|
690
688
|
<div
|
|
691
689
|
role="presentation"
|
|
692
|
-
className={style({
|
|
690
|
+
className={style({
|
|
691
|
+
...cellFocus,
|
|
692
|
+
position: 'absolute',
|
|
693
|
+
top: 'var(--topFocusRing, 0)',
|
|
694
|
+
bottom: 0,
|
|
695
|
+
insetStart: 0,
|
|
696
|
+
insetEnd: 0,
|
|
697
|
+
pointerEvents: 'none'
|
|
698
|
+
})({
|
|
693
699
|
isFocusVisible: true
|
|
694
700
|
})}
|
|
695
701
|
/>
|
|
@@ -1927,7 +1933,12 @@ const rowTextColor = {
|
|
|
1927
1933
|
|
|
1928
1934
|
const row = style<
|
|
1929
1935
|
RowRenderProps &
|
|
1930
|
-
S2TableProps & {
|
|
1936
|
+
S2TableProps & {
|
|
1937
|
+
isInFooter?: boolean;
|
|
1938
|
+
isNextSelected?: boolean;
|
|
1939
|
+
isPrevSelected?: boolean;
|
|
1940
|
+
isFirstItem?: boolean;
|
|
1941
|
+
}
|
|
1931
1942
|
>({
|
|
1932
1943
|
height: 'full',
|
|
1933
1944
|
position: 'relative',
|
|
@@ -2030,20 +2041,18 @@ const row = style<
|
|
|
2030
2041
|
}
|
|
2031
2042
|
}
|
|
2032
2043
|
},
|
|
2033
|
-
// When checkbox selection, render the gray divider between rows as a border
|
|
2034
2044
|
borderTopWidth: 0,
|
|
2035
|
-
borderBottomWidth:
|
|
2036
|
-
selectionStyle: {
|
|
2037
|
-
highlight: 0,
|
|
2038
|
-
checkbox: 1
|
|
2039
|
-
}
|
|
2040
|
-
},
|
|
2045
|
+
borderBottomWidth: 1,
|
|
2041
2046
|
borderStartWidth: 0,
|
|
2042
2047
|
borderEndWidth: 0,
|
|
2043
2048
|
borderStyle: 'solid',
|
|
2044
2049
|
borderColor: {
|
|
2045
2050
|
selectionStyle: {
|
|
2046
|
-
highlight:
|
|
2051
|
+
highlight: {
|
|
2052
|
+
default: 'gray-300',
|
|
2053
|
+
isSelected: 'transparent',
|
|
2054
|
+
isNextSelected: 'transparent'
|
|
2055
|
+
},
|
|
2047
2056
|
checkbox: {
|
|
2048
2057
|
default: 'gray-300',
|
|
2049
2058
|
forcedColors: 'ButtonBorder'
|
|
@@ -2074,20 +2083,11 @@ const row = style<
|
|
|
2074
2083
|
isSelected: '--borderColorBlue'
|
|
2075
2084
|
}
|
|
2076
2085
|
},
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
isNextSelected: '[inset 0 0 0 var(--borderColorGray)]'
|
|
2083
|
-
// TODO: Determine if we want to support gray dividers between selected grouped rows
|
|
2084
|
-
// isSelected: {
|
|
2085
|
-
// isNextSelected: '[inset 0 -1px 0px var(--borderColorGray)]'
|
|
2086
|
-
// }
|
|
2087
|
-
}
|
|
2088
|
-
},
|
|
2089
|
-
forcedColors: {
|
|
2090
|
-
isFocusVisible: '[inset 0 0 0 2px Highlight]'
|
|
2086
|
+
'--focusRingColor': {
|
|
2087
|
+
type: 'outlineColor',
|
|
2088
|
+
value: {
|
|
2089
|
+
default: 'focus-ring',
|
|
2090
|
+
forcedColors: 'Highlight'
|
|
2091
2091
|
}
|
|
2092
2092
|
},
|
|
2093
2093
|
fontWeight: {
|
|
@@ -2095,20 +2095,50 @@ const row = style<
|
|
|
2095
2095
|
isInFooter: 'bold'
|
|
2096
2096
|
},
|
|
2097
2097
|
isolation: 'isolate',
|
|
2098
|
-
forcedColorAdjust: 'none'
|
|
2098
|
+
forcedColorAdjust: 'none',
|
|
2099
|
+
'--topFocusRing': {
|
|
2100
|
+
type: 'top',
|
|
2101
|
+
value: {
|
|
2102
|
+
default: '[-1px]',
|
|
2103
|
+
isFirstItem: 0
|
|
2104
|
+
}
|
|
2105
|
+
},
|
|
2106
|
+
'--topHighlightBorder': {
|
|
2107
|
+
type: 'top',
|
|
2108
|
+
value: {
|
|
2109
|
+
default: 0,
|
|
2110
|
+
isSelected: '[-1px]',
|
|
2111
|
+
// Don't overlap focus ring of row above.
|
|
2112
|
+
isPrevSelected: 0,
|
|
2113
|
+
isFirstItem: 0,
|
|
2114
|
+
forcedColors: 0
|
|
2115
|
+
}
|
|
2116
|
+
},
|
|
2117
|
+
'--bottomPosition': {
|
|
2118
|
+
type: 'bottom',
|
|
2119
|
+
value: {
|
|
2120
|
+
selectionStyle: {
|
|
2121
|
+
checkbox: {
|
|
2122
|
+
default: '[-1px]',
|
|
2123
|
+
// Avoid the next row's selected background covering this row's focus ring.
|
|
2124
|
+
isNextSelected: 0
|
|
2125
|
+
},
|
|
2126
|
+
highlight: '[-1px]'
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2099
2130
|
});
|
|
2100
2131
|
|
|
2101
2132
|
// Sticky cells (the drag cell, and the checkbox cell when present) get an inline z-index=2 applied by the virtualizer's layout
|
|
2102
|
-
// To ensure that the highlight selection border is painted above the
|
|
2133
|
+
// To ensure that the highlight selection border is painted above the sticky cells, set z-index to 3
|
|
2103
2134
|
const highlightSelectionBorder = css(
|
|
2104
2135
|
`&:before {
|
|
2105
2136
|
content: "";
|
|
2106
|
-
|
|
2107
|
-
|
|
2137
|
+
top: var(--topHighlightBorder);
|
|
2138
|
+
bottom: -1px;
|
|
2139
|
+
inset-inline: 0;
|
|
2108
2140
|
position: absolute;
|
|
2109
|
-
inset: 0;
|
|
2110
2141
|
z-index: 3;
|
|
2111
|
-
box-sizing: border-box;
|
|
2112
2142
|
border-style: solid;
|
|
2113
2143
|
border-color: var(--borderColor);
|
|
2114
2144
|
border-top-width: var(--borderTopWidth);
|
|
@@ -2127,15 +2157,15 @@ const highlightSelectionBorder = css(
|
|
|
2127
2157
|
const focusIndicator = css(
|
|
2128
2158
|
`&:after {
|
|
2129
2159
|
content: "";
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
z-index: 2;
|
|
2160
|
+
top: var(--topFocusRing);
|
|
2161
|
+
bottom: var(--bottomPosition);
|
|
2162
|
+
z-index: 3;
|
|
2134
2163
|
inset-inline-start: 0;
|
|
2164
|
+
inset-inline-end: 0;
|
|
2135
2165
|
border-radius: 5px;
|
|
2136
2166
|
position: absolute;
|
|
2137
2167
|
outline-style: solid;
|
|
2138
|
-
outline-color: var(--
|
|
2168
|
+
outline-color: var(--focusRingColor);
|
|
2139
2169
|
outline-width: 2px;
|
|
2140
2170
|
outline-offset: -2px;
|
|
2141
2171
|
pointer-events: none;
|
|
@@ -2191,6 +2221,7 @@ export const Row = /*#__PURE__*/ (forwardRef as forwardRefType)(function Row<T>(
|
|
|
2191
2221
|
...tableVisualOptions,
|
|
2192
2222
|
selectionStyle,
|
|
2193
2223
|
isInFooter,
|
|
2224
|
+
isFirstItem: isFirstItem(renderProps.id, renderProps.state),
|
|
2194
2225
|
isNextSelected: isNextSelected(renderProps.id, renderProps.state),
|
|
2195
2226
|
isPrevSelected: isPrevSelected(renderProps.id, renderProps.state)
|
|
2196
2227
|
}) +
|
|
@@ -2271,3 +2302,10 @@ export function isPrevSelected(id: Key | undefined, state: TableState<unknown>)
|
|
|
2271
2302
|
let keyBefore = state.collection.getKeyBefore(id);
|
|
2272
2303
|
return keyBefore != null && state.selectionManager.isSelected(keyBefore);
|
|
2273
2304
|
}
|
|
2305
|
+
|
|
2306
|
+
function isFirstItem(id: Key | undefined, state: TableState<unknown>) {
|
|
2307
|
+
if (id == null || !state) {
|
|
2308
|
+
return false;
|
|
2309
|
+
}
|
|
2310
|
+
return state.collection.getFirstKey() === id;
|
|
2311
|
+
}
|
package/src/Tabs.tsx
CHANGED
|
@@ -139,6 +139,7 @@ const InternalTabsContext = createContext<
|
|
|
139
139
|
Partial<TabsProps> & {
|
|
140
140
|
tablistRef?: RefObject<HTMLDivElement | null>;
|
|
141
141
|
selectedKey?: Key | null;
|
|
142
|
+
baseId?: string;
|
|
142
143
|
}
|
|
143
144
|
>({});
|
|
144
145
|
|
|
@@ -200,6 +201,8 @@ export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef<HTMLD
|
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
let tablistRef = useRef<HTMLDivElement | null>(null);
|
|
204
|
+
// Shared base id so child Tab/TabPanel components can derive stable ids.
|
|
205
|
+
let baseId = useId();
|
|
203
206
|
|
|
204
207
|
return (
|
|
205
208
|
<Provider
|
|
@@ -215,6 +218,7 @@ export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef<HTMLD
|
|
|
215
218
|
tablistRef,
|
|
216
219
|
onSelectionChange: setValue,
|
|
217
220
|
labelBehavior,
|
|
221
|
+
baseId,
|
|
218
222
|
'aria-label': props['aria-label'],
|
|
219
223
|
'aria-labelledby': props['aria-labelledby']
|
|
220
224
|
}
|
|
@@ -460,9 +464,12 @@ const icon = style({
|
|
|
460
464
|
});
|
|
461
465
|
|
|
462
466
|
export function Tab(props: TabProps): ReactNode {
|
|
463
|
-
let {density, orientation, labelBehavior} = useContext(InternalTabsContext) ?? {};
|
|
467
|
+
let {density, orientation, labelBehavior, baseId} = useContext(InternalTabsContext) ?? {};
|
|
464
468
|
|
|
465
|
-
|
|
469
|
+
// Derive a stable content id from the shared baseId on InternalTabsContext.
|
|
470
|
+
// Prevents infinite loop when rendering across multiple CollectionBuilder portals.
|
|
471
|
+
let fallbackId = useId();
|
|
472
|
+
let contentId = `${baseId ?? fallbackId}-content-${props.id ?? fallbackId}`;
|
|
466
473
|
let ariaLabelledBy = props['aria-labelledby'] || '';
|
|
467
474
|
|
|
468
475
|
return (
|
package/src/TagGroup.tsx
CHANGED
|
@@ -63,7 +63,6 @@ import {TextContext as RACTextContext} from 'react-aria-components/Text';
|
|
|
63
63
|
import {Text, TextContext} from './Content';
|
|
64
64
|
import {useDOMRef} from './useDOMRef';
|
|
65
65
|
import {useEffectEvent} from 'react-aria/private/utils/useEffectEvent';
|
|
66
|
-
// @ts-ignore
|
|
67
66
|
import {useId} from 'react-aria/useId';
|
|
68
67
|
import {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';
|
|
69
68
|
import {useLocale} from 'react-aria/I18nProvider';
|
package/src/Toast.tsx
CHANGED
|
@@ -28,7 +28,6 @@ import InfoIcon from '../s2wf-icons/S2_Icon_InfoCircle_20_N.svg';
|
|
|
28
28
|
import intlMessages from '../intl/*.json';
|
|
29
29
|
import {isWebKit} from 'react-aria/private/utils/platform';
|
|
30
30
|
import {ToastOptions as RACToastOptions, ToastQueue} from 'react-stately/useToastState';
|
|
31
|
-
// @ts-ignore
|
|
32
31
|
import {Text} from './Content';
|
|
33
32
|
import {
|
|
34
33
|
UNSTABLE_Toast as Toast,
|
|
@@ -39,9 +38,7 @@ import {
|
|
|
39
38
|
ToastRegionProps,
|
|
40
39
|
UNSTABLE_ToastStateContext as ToastStateContext
|
|
41
40
|
} from 'react-aria-components/Toast';
|
|
42
|
-
|
|
43
41
|
import toastCss from './Toast.module.css';
|
|
44
|
-
|
|
45
42
|
import {useEvent} from 'react-aria/private/utils/useEvent';
|
|
46
43
|
import {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';
|
|
47
44
|
import {useMediaQuery} from './useMediaQuery';
|
package/src/TreeView.tsx
CHANGED
|
@@ -41,7 +41,6 @@ import {
|
|
|
41
41
|
UnsafeStyles
|
|
42
42
|
} from './style-utils' with {type: 'macro'};
|
|
43
43
|
import {IconContext} from './Icon';
|
|
44
|
-
// @ts-ignore
|
|
45
44
|
import intlMessages from '../intl/*.json';
|
|
46
45
|
import {ProgressCircle} from './ProgressCircle';
|
|
47
46
|
import {Provider, useContextProps} from 'react-aria-components/slots';
|
package/src/style-utils.ts
CHANGED
|
@@ -375,6 +375,14 @@ export const widthProperties = ['width', 'minWidth', 'maxWidth'] as const;
|
|
|
375
375
|
|
|
376
376
|
export const heightProperties = ['size', 'height', 'minHeight', 'maxHeight'] as const;
|
|
377
377
|
|
|
378
|
+
export const fontProperties = [
|
|
379
|
+
'font',
|
|
380
|
+
'fontFamily',
|
|
381
|
+
'fontWeight',
|
|
382
|
+
'lineHeight',
|
|
383
|
+
'fontSize'
|
|
384
|
+
] as const;
|
|
385
|
+
|
|
378
386
|
export type StylesProp = StyleString<
|
|
379
387
|
(typeof allowedOverrides)[number] | (typeof widthProperties)[number]
|
|
380
388
|
>;
|
|
@@ -384,6 +392,8 @@ export type StylesPropWithHeight = StyleString<
|
|
|
384
392
|
| (typeof heightProperties)[number]
|
|
385
393
|
>;
|
|
386
394
|
export type StylesPropWithoutWidth = StyleString<(typeof allowedOverrides)[number]>;
|
|
395
|
+
|
|
396
|
+
export type StylesPropWithFont = StyleString<(typeof fontProperties)[number]>;
|
|
387
397
|
export type UnsafeClassName = string & {properties?: never};
|
|
388
398
|
export interface UnsafeStyles {
|
|
389
399
|
/**
|
|
@@ -404,8 +414,9 @@ export interface StyleProps extends UnsafeStyles {
|
|
|
404
414
|
styles?: StylesProp;
|
|
405
415
|
}
|
|
406
416
|
|
|
407
|
-
export function getAllowedOverrides({width = true, height = false} = {}): string[] {
|
|
417
|
+
export function getAllowedOverrides({width = true, height = false, font = false} = {}): string[] {
|
|
408
418
|
return (allowedOverrides as unknown as string[])
|
|
409
419
|
.concat(width ? widthProperties : [])
|
|
410
|
-
.concat(height ? heightProperties : [])
|
|
420
|
+
.concat(height ? heightProperties : [])
|
|
421
|
+
.concat(font ? ['fontFamily', 'fontWeight', 'lineHeight', 'fontSize'] : []);
|
|
411
422
|
}
|