@react-spectrum/s2 3.0.0-nightly-5ae234603-240925 → 3.0.0-nightly-d57bd8d90-240927
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.map +1 -1
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/AlertDialog.cjs.map +1 -1
- package/dist/AlertDialog.css.map +1 -1
- package/dist/AlertDialog.mjs.map +1 -1
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs.map +1 -1
- package/dist/AvatarGroup.cjs.map +1 -1
- package/dist/AvatarGroup.css.map +1 -1
- package/dist/AvatarGroup.mjs.map +1 -1
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +39 -5
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +64 -0
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +39 -5
- package/dist/Button.mjs.map +1 -1
- package/dist/ButtonGroup.cjs.map +1 -1
- package/dist/ButtonGroup.css.map +1 -1
- package/dist/ButtonGroup.mjs.map +1 -1
- package/dist/Card.cjs +2 -2
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +2 -2
- package/dist/Card.mjs.map +1 -1
- package/dist/CardView.cjs.map +1 -1
- package/dist/CardView.css.map +1 -1
- package/dist/CardView.mjs.map +1 -1
- package/dist/CenterBaseline.cjs.map +1 -1
- package/dist/CenterBaseline.css.map +1 -1
- package/dist/CenterBaseline.mjs.map +1 -1
- package/dist/Checkbox.cjs +4 -1
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +4 -0
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +4 -1
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs.map +1 -1
- package/dist/ClearButton.css.map +1 -1
- package/dist/ClearButton.mjs.map +1 -1
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs.map +1 -1
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs.map +1 -1
- package/dist/ColorWheel.cjs.map +1 -1
- package/dist/ColorWheel.css.map +1 -1
- package/dist/ColorWheel.mjs.map +1 -1
- package/dist/ComboBox.cjs +3 -0
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +3 -0
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/Content.cjs +0 -2
- package/dist/Content.cjs.map +1 -1
- package/dist/Content.mjs +1 -2
- package/dist/Content.mjs.map +1 -1
- package/dist/ContextualHelp.cjs.map +1 -1
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs.map +1 -1
- package/dist/Dialog.cjs +7 -5
- package/dist/Dialog.cjs.map +1 -1
- package/dist/Dialog.css.map +1 -1
- package/dist/Dialog.mjs +8 -6
- package/dist/Dialog.mjs.map +1 -1
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/Divider.cjs.map +1 -1
- package/dist/Divider.css.map +1 -1
- package/dist/Divider.mjs.map +1 -1
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs.map +1 -1
- package/dist/Form.cjs.map +1 -1
- package/dist/Form.css.map +1 -1
- package/dist/Form.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs.map +1 -1
- package/dist/Image.css.map +1 -1
- package/dist/Image.mjs.map +1 -1
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Link.cjs.map +1 -1
- package/dist/Link.css.map +1 -1
- package/dist/Link.mjs.map +1 -1
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs.map +1 -1
- package/dist/Modal.css.map +1 -1
- package/dist/Modal.mjs.map +1 -1
- package/dist/MoveHorizontalCircleTableWidget.cjs +33 -0
- package/dist/MoveHorizontalCircleTableWidget.cjs.map +1 -0
- package/dist/MoveHorizontalCircleTableWidget.mjs +28 -0
- package/dist/MoveHorizontalCircleTableWidget.mjs.map +1 -0
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +3 -0
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +3 -0
- package/dist/Picker.mjs.map +1 -1
- package/dist/Popover.cjs +1 -0
- package/dist/Popover.cjs.map +1 -1
- package/dist/Popover.css +4 -0
- package/dist/Popover.css.map +1 -1
- package/dist/Popover.mjs +1 -0
- package/dist/Popover.mjs.map +1 -1
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +0 -1
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +0 -4
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +0 -1
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.cjs.map +1 -1
- package/dist/Provider.css.map +1 -1
- package/dist/Provider.mjs.map +1 -1
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +11 -8
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +11 -8
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/SkeletonCollection.cjs.map +1 -1
- package/dist/SkeletonCollection.mjs.map +1 -1
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs.map +1 -1
- package/dist/Table.cjs +1064 -0
- package/dist/Table.cjs.map +1 -0
- package/dist/Table.css +801 -0
- package/dist/Table.css.map +1 -0
- package/dist/Table.mjs +1054 -0
- package/dist/Table.mjs.map +1 -0
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs +5 -3
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +5 -3
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs.map +1 -1
- package/dist/ToggleButton.cjs +2 -1
- package/dist/ToggleButton.cjs.map +1 -1
- package/dist/ToggleButton.css.map +1 -1
- package/dist/ToggleButton.mjs +2 -1
- package/dist/ToggleButton.mjs.map +1 -1
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/ar-AE.cjs +5 -0
- package/dist/ar-AE.cjs.map +1 -1
- package/dist/ar-AE.mjs +5 -0
- package/dist/ar-AE.mjs.map +1 -1
- package/dist/bg-BG.cjs +5 -0
- package/dist/bg-BG.cjs.map +1 -1
- package/dist/bg-BG.mjs +5 -0
- package/dist/bg-BG.mjs.map +1 -1
- package/dist/cs-CZ.cjs +5 -0
- package/dist/cs-CZ.cjs.map +1 -1
- package/dist/cs-CZ.mjs +5 -0
- package/dist/cs-CZ.mjs.map +1 -1
- package/dist/da-DK.cjs +5 -0
- package/dist/da-DK.cjs.map +1 -1
- package/dist/da-DK.mjs +5 -0
- package/dist/da-DK.mjs.map +1 -1
- package/dist/de-DE.cjs +5 -0
- package/dist/de-DE.cjs.map +1 -1
- package/dist/de-DE.mjs +5 -0
- package/dist/de-DE.mjs.map +1 -1
- package/dist/el-GR.cjs +5 -0
- package/dist/el-GR.cjs.map +1 -1
- package/dist/el-GR.mjs +5 -0
- package/dist/el-GR.mjs.map +1 -1
- package/dist/en-US.cjs +5 -0
- package/dist/en-US.cjs.map +1 -1
- package/dist/en-US.mjs +5 -0
- package/dist/en-US.mjs.map +1 -1
- package/dist/es-ES.cjs +5 -0
- package/dist/es-ES.cjs.map +1 -1
- package/dist/es-ES.mjs +5 -0
- package/dist/es-ES.mjs.map +1 -1
- package/dist/et-EE.cjs +5 -0
- package/dist/et-EE.cjs.map +1 -1
- package/dist/et-EE.mjs +5 -0
- package/dist/et-EE.mjs.map +1 -1
- package/dist/fi-FI.cjs +5 -0
- package/dist/fi-FI.cjs.map +1 -1
- package/dist/fi-FI.mjs +5 -0
- package/dist/fi-FI.mjs.map +1 -1
- package/dist/fr-FR.cjs +5 -0
- package/dist/fr-FR.cjs.map +1 -1
- package/dist/fr-FR.mjs +5 -0
- package/dist/fr-FR.mjs.map +1 -1
- package/dist/he-IL.cjs +5 -0
- package/dist/he-IL.cjs.map +1 -1
- package/dist/he-IL.mjs +5 -0
- package/dist/he-IL.mjs.map +1 -1
- package/dist/hr-HR.cjs +5 -0
- package/dist/hr-HR.cjs.map +1 -1
- package/dist/hr-HR.mjs +5 -0
- package/dist/hr-HR.mjs.map +1 -1
- package/dist/hu-HU.cjs +5 -0
- package/dist/hu-HU.cjs.map +1 -1
- package/dist/hu-HU.mjs +5 -0
- package/dist/hu-HU.mjs.map +1 -1
- package/dist/it-IT.cjs +5 -0
- package/dist/it-IT.cjs.map +1 -1
- package/dist/it-IT.mjs +5 -0
- package/dist/it-IT.mjs.map +1 -1
- package/dist/ja-JP.cjs +5 -0
- package/dist/ja-JP.cjs.map +1 -1
- package/dist/ja-JP.mjs +5 -0
- package/dist/ja-JP.mjs.map +1 -1
- package/dist/ko-KR.cjs +5 -0
- package/dist/ko-KR.cjs.map +1 -1
- package/dist/ko-KR.mjs +5 -0
- package/dist/ko-KR.mjs.map +1 -1
- package/dist/lt-LT.cjs +5 -0
- package/dist/lt-LT.cjs.map +1 -1
- package/dist/lt-LT.mjs +5 -0
- package/dist/lt-LT.mjs.map +1 -1
- package/dist/lv-LV.cjs +5 -0
- package/dist/lv-LV.cjs.map +1 -1
- package/dist/lv-LV.mjs +5 -0
- package/dist/lv-LV.mjs.map +1 -1
- package/dist/main.cjs +11 -0
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +5 -1
- package/dist/module.mjs.map +1 -1
- package/dist/nb-NO.cjs +5 -0
- package/dist/nb-NO.cjs.map +1 -1
- package/dist/nb-NO.mjs +5 -0
- package/dist/nb-NO.mjs.map +1 -1
- package/dist/nl-NL.cjs +5 -0
- package/dist/nl-NL.cjs.map +1 -1
- package/dist/nl-NL.mjs +5 -0
- package/dist/nl-NL.mjs.map +1 -1
- package/dist/pl-PL.cjs +5 -0
- package/dist/pl-PL.cjs.map +1 -1
- package/dist/pl-PL.mjs +5 -0
- package/dist/pl-PL.mjs.map +1 -1
- package/dist/pt-BR.cjs +5 -0
- package/dist/pt-BR.cjs.map +1 -1
- package/dist/pt-BR.mjs +5 -0
- package/dist/pt-BR.mjs.map +1 -1
- package/dist/pt-PT.cjs +5 -0
- package/dist/pt-PT.cjs.map +1 -1
- package/dist/pt-PT.mjs +5 -0
- package/dist/pt-PT.mjs.map +1 -1
- package/dist/ro-RO.cjs +5 -0
- package/dist/ro-RO.cjs.map +1 -1
- package/dist/ro-RO.mjs +5 -0
- package/dist/ro-RO.mjs.map +1 -1
- package/dist/ru-RU.cjs +5 -0
- package/dist/ru-RU.cjs.map +1 -1
- package/dist/ru-RU.mjs +5 -0
- package/dist/ru-RU.mjs.map +1 -1
- package/dist/sk-SK.cjs +5 -0
- package/dist/sk-SK.cjs.map +1 -1
- package/dist/sk-SK.mjs +5 -0
- package/dist/sk-SK.mjs.map +1 -1
- package/dist/sl-SI.cjs +5 -0
- package/dist/sl-SI.cjs.map +1 -1
- package/dist/sl-SI.mjs +5 -0
- package/dist/sl-SI.mjs.map +1 -1
- package/dist/sr-SP.cjs +5 -0
- package/dist/sr-SP.cjs.map +1 -1
- package/dist/sr-SP.mjs +5 -0
- package/dist/sr-SP.mjs.map +1 -1
- package/dist/sv-SE.cjs +5 -0
- package/dist/sv-SE.cjs.map +1 -1
- package/dist/sv-SE.mjs +5 -0
- package/dist/sv-SE.mjs.map +1 -1
- package/dist/tr-TR.cjs +5 -0
- package/dist/tr-TR.cjs.map +1 -1
- package/dist/tr-TR.mjs +5 -0
- package/dist/tr-TR.mjs.map +1 -1
- package/dist/types.d.ts +136 -30
- package/dist/types.d.ts.map +1 -1
- package/dist/uk-UA.cjs +5 -0
- package/dist/uk-UA.cjs.map +1 -1
- package/dist/uk-UA.mjs +5 -0
- package/dist/uk-UA.mjs.map +1 -1
- package/dist/utils.cjs +30 -0
- package/dist/utils.cjs.map +1 -0
- package/dist/utils.mjs +25 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/zh-CN.cjs +5 -0
- package/dist/zh-CN.cjs.map +1 -1
- package/dist/zh-CN.mjs +5 -0
- package/dist/zh-CN.mjs.map +1 -1
- package/dist/zh-TW.cjs +5 -0
- package/dist/zh-TW.cjs.map +1 -1
- package/dist/zh-TW.mjs +5 -0
- package/dist/zh-TW.mjs.map +1 -1
- package/icons/Skeleton.cjs.map +1 -1
- package/icons/Skeleton.css.map +1 -1
- package/icons/Skeleton.mjs.map +1 -1
- package/package.json +18 -16
- package/src/Accordion.tsx +2 -2
- package/src/ActionButton.tsx +3 -3
- package/src/AlertDialog.tsx +1 -1
- package/src/Avatar.tsx +1 -1
- package/src/AvatarGroup.tsx +1 -1
- package/src/Badge.tsx +1 -1
- package/src/Breadcrumbs.tsx +2 -2
- package/src/Button.tsx +41 -19
- package/src/ButtonGroup.tsx +1 -1
- package/src/Card.tsx +7 -7
- package/src/CardView.tsx +2 -2
- package/src/CenterBaseline.tsx +1 -1
- package/src/Checkbox.tsx +3 -2
- package/src/CheckboxGroup.tsx +1 -1
- package/src/ClearButton.tsx +1 -1
- package/src/CloseButton.tsx +2 -2
- package/src/ColorArea.tsx +1 -1
- package/src/ColorField.tsx +1 -1
- package/src/ColorHandle.tsx +1 -1
- package/src/ColorSlider.tsx +1 -1
- package/src/ColorSwatch.tsx +3 -3
- package/src/ColorSwatchPicker.tsx +5 -5
- package/src/ColorWheel.tsx +1 -1
- package/src/ComboBox.tsx +7 -4
- package/src/Content.tsx +1 -3
- package/src/ContextualHelp.tsx +1 -1
- package/src/Dialog.tsx +4 -3
- package/src/Disclosure.tsx +4 -4
- package/src/Divider.tsx +1 -1
- package/src/DropZone.tsx +1 -1
- package/src/Field.tsx +2 -2
- package/src/Form.tsx +1 -1
- package/src/IllustratedMessage.tsx +1 -1
- package/src/Image.tsx +1 -1
- package/src/InlineAlert.tsx +2 -2
- package/src/Link.tsx +2 -2
- package/src/Menu.tsx +2 -2
- package/src/Meter.tsx +1 -1
- package/src/Modal.tsx +1 -1
- package/src/NumberField.tsx +2 -2
- package/src/Picker.tsx +7 -4
- package/src/Popover.tsx +5 -2
- package/src/ProgressBar.tsx +1 -1
- package/src/ProgressCircle.tsx +7 -5
- package/src/Provider.tsx +1 -1
- package/src/Radio.tsx +2 -2
- package/src/RadioGroup.tsx +1 -1
- package/src/SearchField.tsx +1 -1
- package/src/SegmentedControl.tsx +32 -22
- package/src/Skeleton.tsx +4 -1
- package/src/SkeletonCollection.tsx +4 -0
- package/src/Slider.tsx +2 -2
- package/src/StatusLight.tsx +1 -1
- package/src/Switch.tsx +2 -2
- package/src/Table.tsx +1063 -48
- package/src/Tabs.tsx +3 -3
- package/src/TagGroup.tsx +5 -4
- package/src/TextField.tsx +1 -1
- package/src/ToggleButton.tsx +3 -2
- package/src/Tooltip.tsx +1 -1
- package/src/index.ts +4 -0
- package/src/style-utils.ts +0 -10
- package/src/utils.ts +28 -0
- package/style/__tests__/mergeStyles.test.js +32 -0
- package/style/__tests__/style-macro.test.js +128 -0
- package/style/dist/main.cjs +38 -0
- package/style/dist/main.cjs.map +1 -0
- package/style/dist/module.mjs +26 -0
- package/style/dist/module.mjs.map +1 -0
- package/style/dist/spectrum-theme.cjs +1989 -0
- package/style/dist/spectrum-theme.cjs.map +1 -0
- package/style/dist/spectrum-theme.mjs +1978 -0
- package/style/dist/spectrum-theme.mjs.map +1 -0
- package/style/dist/style-macro.cjs +544 -0
- package/style/dist/style-macro.cjs.map +1 -0
- package/style/dist/style-macro.mjs +534 -0
- package/style/dist/style-macro.mjs.map +1 -0
- package/style/dist/types.d.ts +791 -0
- package/style/dist/types.d.ts.map +1 -0
- package/style/index.ts +24 -0
- package/style/runtime.ts +103 -0
- package/style/spectrum-theme.ts +980 -0
- package/style/style-macro.ts +638 -0
- package/style/tokens.ts +68 -0
- package/style/types.ts +178 -0
package/src/ProgressCircle.tsx
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import {ContextValue, ProgressBar as RACProgressBar, ProgressBarProps as RACProgressBarProps} from 'react-aria-components';
|
|
14
14
|
import {createContext, forwardRef} from 'react';
|
|
15
15
|
import {DOMRef, DOMRefValue} from '@react-types/shared';
|
|
16
|
-
import {getAllowedOverrides,
|
|
16
|
+
import {getAllowedOverrides, StylesPropWithHeight, UnsafeStyles} from './style-utils' with {type: 'macro'};
|
|
17
17
|
import {keyframes} from '../style/style-macro' with {type: 'macro'};
|
|
18
|
-
import {style} from '../style
|
|
18
|
+
import {style} from '../style' with {type: 'macro'};
|
|
19
19
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
20
20
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
21
21
|
|
|
@@ -45,8 +45,7 @@ const wrapper = style<ProgressCircleStyleProps>({
|
|
|
45
45
|
L: 64
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
aspectRatio: 'square'
|
|
49
|
-
display: 'inline-block'
|
|
48
|
+
aspectRatio: 'square'
|
|
50
49
|
}, getAllowedOverrides({height: true}));
|
|
51
50
|
|
|
52
51
|
const track = style<ProgressCircleStyleProps>({
|
|
@@ -73,7 +72,10 @@ const fill = style<ProgressCircleStyleProps>({
|
|
|
73
72
|
transformOrigin: 'center'
|
|
74
73
|
});
|
|
75
74
|
|
|
76
|
-
export interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps,
|
|
75
|
+
export interface ProgressCircleProps extends Omit<RACProgressBarProps, 'children' | 'style' | 'valueLabel' | 'formatOptions' | 'label' | 'className'>, ProgressCircleStyleProps, UnsafeStyles {
|
|
76
|
+
/** Spectrum-defined styles, returned by the `style()` macro. */
|
|
77
|
+
styles?: StylesPropWithHeight
|
|
78
|
+
}
|
|
77
79
|
|
|
78
80
|
const rotationAnimation = keyframes(`
|
|
79
81
|
0% {
|
package/src/Provider.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import {createContext, JSX, ReactNode, useContext} from 'react';
|
|
|
16
16
|
import {generateDefaultColorSchemeStyles} from './page.macro' with {type: 'macro'};
|
|
17
17
|
import {I18nProvider, RouterProvider, useLocale} from 'react-aria-components';
|
|
18
18
|
import {mergeStyles} from '../style/runtime';
|
|
19
|
-
import {style} from '../style
|
|
19
|
+
import {style} from '../style' with {type: 'macro'};
|
|
20
20
|
import {StyleString} from '../style/types';
|
|
21
21
|
|
|
22
22
|
export interface ProviderProps extends UnsafeStyles {
|
package/src/Radio.tsx
CHANGED
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
RadioProps as AriaRadioProps,
|
|
16
16
|
RadioRenderProps
|
|
17
17
|
} from 'react-aria-components';
|
|
18
|
-
import {baseColor, style} from '../style
|
|
18
|
+
import {baseColor, focusRing, style} from '../style' with {type: 'macro'};
|
|
19
19
|
import {CenterBaseline} from './CenterBaseline';
|
|
20
20
|
import {FocusableRef} from '@react-types/shared';
|
|
21
|
-
import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
22
21
|
import {FormContext, useFormProps} from './Form';
|
|
23
22
|
import {forwardRef, ReactNode, useContext, useRef} from 'react';
|
|
23
|
+
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
24
24
|
import {pressScale} from './pressScale';
|
|
25
25
|
import {useFocusableRef} from '@react-spectrum/utils';
|
|
26
26
|
|
package/src/RadioGroup.tsx
CHANGED
|
@@ -20,7 +20,7 @@ import {field, getAllowedOverrides, StyleProps} from './style-utils' with {type:
|
|
|
20
20
|
import {FieldLabel, HelpText} from './Field';
|
|
21
21
|
import {FormContext, useFormProps} from './Form';
|
|
22
22
|
import React, {createContext, forwardRef, ReactNode, useContext} from 'react';
|
|
23
|
-
import {style} from '../style
|
|
23
|
+
import {style} from '../style' with {type: 'macro'};
|
|
24
24
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
25
25
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
26
26
|
|
package/src/SearchField.tsx
CHANGED
|
@@ -22,7 +22,7 @@ import {createContext, forwardRef, Ref, useContext, useImperativeHandle, useRef}
|
|
|
22
22
|
import {createFocusableRef} from '@react-spectrum/utils';
|
|
23
23
|
import {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
24
24
|
import {FieldGroup, FieldLabel, HelpText, Input} from './Field';
|
|
25
|
-
import {fontRelative, style} from '../style
|
|
25
|
+
import {fontRelative, style} from '../style' with {type: 'macro'};
|
|
26
26
|
import {FormContext, useFormProps} from './Form';
|
|
27
27
|
import {HelpTextProps, SpectrumLabelableProps} from '@react-types/shared';
|
|
28
28
|
import {IconContext} from './Icon';
|
package/src/SegmentedControl.tsx
CHANGED
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {AriaLabelingProps, DOMRef, DOMRefValue, FocusableRef} from '@react-types/shared';
|
|
13
14
|
import {centerBaseline} from './CenterBaseline';
|
|
14
|
-
import {ContextValue, DEFAULT_SLOT, Provider, TextContext as RACTextContext, Radio, RadioGroup,
|
|
15
|
+
import {ContextValue, DEFAULT_SLOT, Provider, TextContext as RACTextContext, Radio, RadioGroup, RadioGroupStateContext, SlotProps} from 'react-aria-components';
|
|
15
16
|
import {createContext, forwardRef, ReactNode, RefObject, useCallback, useContext, useRef} from 'react';
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
17
|
+
import {focusRing, size, style} from '../style' with {type: 'macro'};
|
|
18
|
+
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
18
19
|
import {IconContext} from './Icon';
|
|
19
20
|
import {pressScale} from './pressScale';
|
|
20
|
-
import {size, style} from '../style/spectrum-theme' with {type: 'macro'};
|
|
21
21
|
import {Text, TextContext} from './Content';
|
|
22
22
|
import {useDOMRef, useFocusableRef} from '@react-spectrum/utils';
|
|
23
23
|
import {useLayoutEffect} from '@react-aria/utils';
|
|
24
24
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
|
25
25
|
|
|
26
|
-
export interface SegmentedControlProps extends
|
|
26
|
+
export interface SegmentedControlProps extends AriaLabelingProps, StyleProps, SlotProps {
|
|
27
27
|
/**
|
|
28
28
|
* The content to display in the segmented control.
|
|
29
29
|
*/
|
|
@@ -32,16 +32,22 @@ export interface SegmentedControlProps extends Omit<RadioGroupProps, 'isReadOnly
|
|
|
32
32
|
* Whether the segmented control is disabled.
|
|
33
33
|
*/
|
|
34
34
|
isDisabled?: boolean,
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
/** The id of the currently selected item (controlled). */
|
|
36
|
+
selectedKey?: string | null,
|
|
37
|
+
/** The id of the initial selected item (uncontrolled). */
|
|
38
|
+
defaultSelectedKey?: string,
|
|
39
|
+
/** Handler that is called when the selection changes. */
|
|
40
|
+
onSelectionChange?: (id: string) => void
|
|
39
41
|
}
|
|
40
|
-
export interface SegmentedControlItemProps extends
|
|
42
|
+
export interface SegmentedControlItemProps extends AriaLabelingProps, StyleProps {
|
|
41
43
|
/**
|
|
42
|
-
* The content to display in the control item.
|
|
44
|
+
* The content to display in the segmented control item.
|
|
43
45
|
*/
|
|
44
|
-
children: ReactNode
|
|
46
|
+
children: ReactNode,
|
|
47
|
+
/** The id of the item, matching the value used in SegmentedControl's `selectedKey` prop. */
|
|
48
|
+
id: string,
|
|
49
|
+
/** Whether the item is disabled or not. */
|
|
50
|
+
isDisabled?: boolean
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
export const SegmentedControlContext = createContext<ContextValue<SegmentedControlProps, DOMRefValue<HTMLDivElement>>>(null);
|
|
@@ -135,8 +141,9 @@ const InternalSegmentedControlContext = createContext<InternalSegmentedControlCo
|
|
|
135
141
|
function SegmentedControl(props: SegmentedControlProps, ref: DOMRef<HTMLDivElement>) {
|
|
136
142
|
[props, ref] = useSpectrumContextProps(props, ref, SegmentedControlContext);
|
|
137
143
|
let {
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
defaultSelectedKey,
|
|
145
|
+
selectedKey,
|
|
146
|
+
onSelectionChange
|
|
140
147
|
} = props;
|
|
141
148
|
let domRef = useDOMRef(ref);
|
|
142
149
|
|
|
@@ -148,21 +155,23 @@ function SegmentedControl(props: SegmentedControlProps, ref: DOMRef<HTMLDivEleme
|
|
|
148
155
|
prevRef.current = currentSelectedRef?.current.getBoundingClientRect();
|
|
149
156
|
}
|
|
150
157
|
|
|
151
|
-
if (
|
|
152
|
-
|
|
158
|
+
if (onSelectionChange) {
|
|
159
|
+
onSelectionChange(value);
|
|
153
160
|
}
|
|
154
161
|
};
|
|
155
162
|
|
|
156
163
|
return (
|
|
157
164
|
<RadioGroup
|
|
158
165
|
{...props}
|
|
166
|
+
value={selectedKey}
|
|
167
|
+
defaultValue={defaultSelectedKey}
|
|
159
168
|
ref={domRef}
|
|
160
169
|
orientation="horizontal"
|
|
161
170
|
style={props.UNSAFE_style}
|
|
162
171
|
onChange={onChange}
|
|
163
172
|
className={(props.UNSAFE_className || '') + segmentedControl({size: 'M'}, props.styles)}
|
|
164
173
|
aria-label={props['aria-label']}>
|
|
165
|
-
<DefaultSelectionTracker defaultValue={
|
|
174
|
+
<DefaultSelectionTracker defaultValue={defaultSelectedKey} value={selectedKey} prevRef={prevRef} currentSelectedRef={currentSelectedRef}>
|
|
166
175
|
{props.children}
|
|
167
176
|
</DefaultSelectionTracker>
|
|
168
177
|
</RadioGroup>
|
|
@@ -197,7 +206,7 @@ function SegmentedControlItem(props: SegmentedControlItemProps, ref: FocusableRe
|
|
|
197
206
|
let divRef = useRef<HTMLDivElement>(null);
|
|
198
207
|
let {register, prevRef, currentSelectedRef} = useContext(InternalSegmentedControlContext);
|
|
199
208
|
let state = useContext(RadioGroupStateContext);
|
|
200
|
-
let isSelected = props.
|
|
209
|
+
let isSelected = props.id === state?.selectedValue;
|
|
201
210
|
// do not apply animation if a user has the prefers-reduced-motion setting
|
|
202
211
|
let isReduced = false;
|
|
203
212
|
if (window?.matchMedia) {
|
|
@@ -205,7 +214,7 @@ function SegmentedControlItem(props: SegmentedControlItemProps, ref: FocusableRe
|
|
|
205
214
|
}
|
|
206
215
|
|
|
207
216
|
useLayoutEffect(() => {
|
|
208
|
-
register?.(props.
|
|
217
|
+
register?.(props.id);
|
|
209
218
|
}, []);
|
|
210
219
|
|
|
211
220
|
useLayoutEffect(() => {
|
|
@@ -231,7 +240,8 @@ function SegmentedControlItem(props: SegmentedControlItemProps, ref: FocusableRe
|
|
|
231
240
|
|
|
232
241
|
return (
|
|
233
242
|
<Radio
|
|
234
|
-
{...props}
|
|
243
|
+
{...props}
|
|
244
|
+
value={props.id}
|
|
235
245
|
ref={domRef}
|
|
236
246
|
inputRef={inputRef}
|
|
237
247
|
style={props.UNSAFE_style}
|
|
@@ -259,13 +269,13 @@ function SegmentedControlItem(props: SegmentedControlItemProps, ref: FocusableRe
|
|
|
259
269
|
}
|
|
260
270
|
|
|
261
271
|
/**
|
|
262
|
-
* A
|
|
272
|
+
* A SegmentedControlItem represents an option within a SegmentedControl.
|
|
263
273
|
*/
|
|
264
274
|
const _SegmentedControlItem = /*#__PURE__*/ forwardRef(SegmentedControlItem);
|
|
265
275
|
export {_SegmentedControlItem as SegmentedControlItem};
|
|
266
276
|
|
|
267
277
|
/**
|
|
268
|
-
* A
|
|
278
|
+
* A SegmentedControl is a mutually exclusive group of buttons used for view switching.
|
|
269
279
|
*/
|
|
270
280
|
const _SegmentedControl = /*#__PURE__*/ forwardRef(SegmentedControl);
|
|
271
281
|
export {_SegmentedControl as SegmentedControl};
|
package/src/Skeleton.tsx
CHANGED
|
@@ -15,7 +15,7 @@ import {colorToken} from '../style/tokens' with {type: 'macro'};
|
|
|
15
15
|
import {mergeRefs} from '@react-aria/utils';
|
|
16
16
|
import {mergeStyles} from '../style/runtime';
|
|
17
17
|
import {raw} from '../style/style-macro' with {type: 'macro'};
|
|
18
|
-
import {style} from '../style
|
|
18
|
+
import {style} from '../style' with {type: 'macro'};
|
|
19
19
|
import {StyleString} from '../style/types';
|
|
20
20
|
|
|
21
21
|
let reduceMotion = typeof window?.matchMedia === 'function'
|
|
@@ -64,6 +64,9 @@ export interface SkeletonProps {
|
|
|
64
64
|
isLoading: boolean
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* A Skeleton wraps around content to render it as a placeholder.
|
|
69
|
+
*/
|
|
67
70
|
export function Skeleton({children, isLoading}: SkeletonProps) {
|
|
68
71
|
// Disable all form components inside a skeleton.
|
|
69
72
|
return (
|
|
@@ -19,6 +19,10 @@ export interface SkeletonCollectionProps {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
let cache = new WeakMap();
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A SkeletonCollection generates placeholder content within a collection component such as CardView.
|
|
25
|
+
*/
|
|
22
26
|
export const SkeletonCollection = createLeafComponent('skeleton', (props: SkeletonCollectionProps, ref, node) => {
|
|
23
27
|
// Cache rendering based on node object identity. This allows the children function to randomize
|
|
24
28
|
// its content (e.g. heights) and preserve on re-renders.
|
package/src/Slider.tsx
CHANGED
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
} from 'react-aria-components';
|
|
21
21
|
import {clamp} from '@react-aria/utils';
|
|
22
22
|
import {createContext, forwardRef, ReactNode, RefObject, useContext, useRef} from 'react';
|
|
23
|
-
import {field, fieldInput,
|
|
23
|
+
import {field, fieldInput, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
24
24
|
import {FieldLabel} from './Field';
|
|
25
25
|
import {FocusableRef, FocusableRefValue, InputDOMProps, SpectrumLabelableProps} from '@react-types/shared';
|
|
26
|
+
import {focusRing, size, style} from '../style' with {type: 'macro'};
|
|
26
27
|
import {FormContext, useFormProps} from './Form';
|
|
27
28
|
import {mergeStyles} from '../style/runtime';
|
|
28
29
|
import {pressScale} from './pressScale';
|
|
29
|
-
import {size, style} from '../style/spectrum-theme' with {type: 'macro'};
|
|
30
30
|
import {useFocusableRef} from '@react-spectrum/utils';
|
|
31
31
|
import {useLocale, useNumberFormatter} from '@react-aria/i18n';
|
|
32
32
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|
package/src/StatusLight.tsx
CHANGED
|
@@ -16,7 +16,7 @@ import {ContextValue, SlotProps} from 'react-aria-components';
|
|
|
16
16
|
import {createContext, forwardRef, ReactNode} from 'react';
|
|
17
17
|
import {filterDOMProps} from '@react-aria/utils';
|
|
18
18
|
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
19
|
-
import {size, style} from '../style
|
|
19
|
+
import {size, style} from '../style' with {type: 'macro'};
|
|
20
20
|
import {Text} from './Content';
|
|
21
21
|
import {useDOMRef} from '@react-spectrum/utils';
|
|
22
22
|
import {useIsSkeleton} from './Skeleton';
|
package/src/Switch.tsx
CHANGED
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
ContextValue,
|
|
17
17
|
SwitchRenderProps
|
|
18
18
|
} from 'react-aria-components';
|
|
19
|
-
import {baseColor, fontRelative, style} from '../style
|
|
19
|
+
import {baseColor, focusRing, fontRelative, style} from '../style' with {type: 'macro'};
|
|
20
20
|
import {CenterBaseline} from './CenterBaseline';
|
|
21
21
|
import {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';
|
|
22
22
|
import {FocusableRef, FocusableRefValue} from '@react-types/shared';
|
|
23
|
-
import {focusRing, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
24
23
|
import {FormContext, useFormProps} from './Form';
|
|
24
|
+
import {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};
|
|
25
25
|
import {pressScale} from './pressScale';
|
|
26
26
|
import {useFocusableRef} from '@react-spectrum/utils';
|
|
27
27
|
import {useSpectrumContextProps} from './useSpectrumContextProps';
|