react-aria-components 1.12.2 → 1.14.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/Autocomplete.main.js +3 -3
- package/dist/Autocomplete.main.js.map +1 -1
- package/dist/Autocomplete.mjs +3 -3
- package/dist/Autocomplete.module.js +3 -3
- package/dist/Autocomplete.module.js.map +1 -1
- package/dist/Breadcrumbs.main.js +5 -3
- package/dist/Breadcrumbs.main.js.map +1 -1
- package/dist/Breadcrumbs.mjs +5 -3
- package/dist/Breadcrumbs.module.js +5 -3
- package/dist/Breadcrumbs.module.js.map +1 -1
- package/dist/Button.main.js +5 -11
- package/dist/Button.main.js.map +1 -1
- package/dist/Button.mjs +5 -11
- package/dist/Button.module.js +5 -11
- package/dist/Button.module.js.map +1 -1
- package/dist/Calendar.main.js +2 -2
- package/dist/Calendar.main.js.map +1 -1
- package/dist/Calendar.mjs +2 -2
- package/dist/Calendar.module.js +2 -2
- package/dist/Calendar.module.js.map +1 -1
- package/dist/Checkbox.main.js.map +1 -1
- package/dist/Checkbox.module.js.map +1 -1
- package/dist/Collection.main.js +1 -1
- package/dist/Collection.main.js.map +1 -1
- package/dist/Collection.mjs +1 -1
- package/dist/Collection.module.js +1 -1
- package/dist/Collection.module.js.map +1 -1
- package/dist/ColorArea.main.js +1 -1
- package/dist/ColorArea.main.js.map +1 -1
- package/dist/ColorArea.mjs +1 -1
- package/dist/ColorArea.module.js +1 -1
- package/dist/ColorArea.module.js.map +1 -1
- package/dist/ColorField.main.js +1 -1
- package/dist/ColorField.main.js.map +1 -1
- package/dist/ColorField.mjs +1 -1
- package/dist/ColorField.module.js +1 -1
- package/dist/ColorField.module.js.map +1 -1
- package/dist/ColorPicker.main.js +1 -1
- package/dist/ColorPicker.main.js.map +1 -1
- package/dist/ColorPicker.mjs +1 -1
- package/dist/ColorPicker.module.js +1 -1
- package/dist/ColorPicker.module.js.map +1 -1
- package/dist/ColorSlider.main.js +1 -1
- package/dist/ColorSlider.main.js.map +1 -1
- package/dist/ColorSlider.mjs +1 -1
- package/dist/ColorSlider.module.js +1 -1
- package/dist/ColorSlider.module.js.map +1 -1
- package/dist/ColorSwatch.main.js.map +1 -1
- package/dist/ColorSwatch.module.js.map +1 -1
- package/dist/ColorSwatchPicker.main.js +1 -1
- package/dist/ColorSwatchPicker.main.js.map +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ColorSwatchPicker.module.js +1 -1
- package/dist/ColorSwatchPicker.module.js.map +1 -1
- package/dist/ColorThumb.main.js.map +1 -1
- package/dist/ColorThumb.module.js.map +1 -1
- package/dist/ColorWheel.main.js +1 -1
- package/dist/ColorWheel.main.js.map +1 -1
- package/dist/ColorWheel.mjs +1 -1
- package/dist/ColorWheel.module.js +1 -1
- package/dist/ColorWheel.module.js.map +1 -1
- package/dist/ComboBox.main.js.map +1 -1
- package/dist/ComboBox.module.js.map +1 -1
- package/dist/DateField.main.js +15 -9
- package/dist/DateField.main.js.map +1 -1
- package/dist/DateField.mjs +15 -9
- package/dist/DateField.module.js +15 -9
- package/dist/DateField.module.js.map +1 -1
- package/dist/DatePicker.main.js +6 -2
- package/dist/DatePicker.main.js.map +1 -1
- package/dist/DatePicker.mjs +6 -2
- package/dist/DatePicker.module.js +6 -2
- package/dist/DatePicker.module.js.map +1 -1
- package/dist/Dialog.main.js.map +1 -1
- package/dist/Dialog.module.js.map +1 -1
- package/dist/Disclosure.main.js +2 -1
- package/dist/Disclosure.main.js.map +1 -1
- package/dist/Disclosure.mjs +2 -1
- package/dist/Disclosure.module.js +2 -1
- package/dist/Disclosure.module.js.map +1 -1
- package/dist/DragAndDrop.main.js.map +1 -1
- package/dist/DragAndDrop.module.js.map +1 -1
- package/dist/DropZone.main.js.map +1 -1
- package/dist/DropZone.module.js.map +1 -1
- package/dist/FieldError.main.js.map +1 -1
- package/dist/FieldError.module.js.map +1 -1
- package/dist/FileTrigger.main.js +1 -0
- package/dist/FileTrigger.main.js.map +1 -1
- package/dist/FileTrigger.mjs +1 -0
- package/dist/FileTrigger.module.js +1 -0
- package/dist/FileTrigger.module.js.map +1 -1
- package/dist/Form.main.js.map +1 -1
- package/dist/Form.module.js.map +1 -1
- package/dist/GridList.main.js +25 -22
- package/dist/GridList.main.js.map +1 -1
- package/dist/GridList.mjs +26 -24
- package/dist/GridList.module.js +26 -24
- package/dist/GridList.module.js.map +1 -1
- package/dist/Group.main.js +5 -4
- package/dist/Group.main.js.map +1 -1
- package/dist/Group.mjs +5 -4
- package/dist/Group.module.js +5 -4
- package/dist/Group.module.js.map +1 -1
- package/dist/HiddenDateInput.main.js +5 -3
- package/dist/HiddenDateInput.main.js.map +1 -1
- package/dist/HiddenDateInput.mjs +5 -3
- package/dist/HiddenDateInput.module.js +5 -3
- package/dist/HiddenDateInput.module.js.map +1 -1
- package/dist/Input.main.js +4 -1
- package/dist/Input.main.js.map +1 -1
- package/dist/Input.mjs +4 -1
- package/dist/Input.module.js +4 -1
- package/dist/Input.module.js.map +1 -1
- package/dist/Link.main.js.map +1 -1
- package/dist/Link.module.js.map +1 -1
- package/dist/ListBox.main.js +20 -7
- package/dist/ListBox.main.js.map +1 -1
- package/dist/ListBox.mjs +21 -8
- package/dist/ListBox.module.js +21 -8
- package/dist/ListBox.module.js.map +1 -1
- package/dist/Menu.main.js +17 -7
- package/dist/Menu.main.js.map +1 -1
- package/dist/Menu.mjs +17 -7
- package/dist/Menu.module.js +17 -7
- package/dist/Menu.module.js.map +1 -1
- package/dist/Meter.main.js.map +1 -1
- package/dist/Meter.module.js.map +1 -1
- package/dist/Modal.main.js +9 -1
- package/dist/Modal.main.js.map +1 -1
- package/dist/Modal.mjs +10 -2
- package/dist/Modal.module.js +10 -2
- package/dist/Modal.module.js.map +1 -1
- package/dist/NumberField.main.js +2 -1
- package/dist/NumberField.main.js.map +1 -1
- package/dist/NumberField.mjs +2 -1
- package/dist/NumberField.module.js +2 -1
- package/dist/NumberField.module.js.map +1 -1
- package/dist/OverlayArrow.main.js.map +1 -1
- package/dist/OverlayArrow.module.js.map +1 -1
- package/dist/Popover.main.js.map +1 -1
- package/dist/Popover.module.js.map +1 -1
- package/dist/ProgressBar.main.js.map +1 -1
- package/dist/ProgressBar.module.js.map +1 -1
- package/dist/RSPContexts.main.js +4 -0
- package/dist/RSPContexts.main.js.map +1 -1
- package/dist/RSPContexts.mjs +3 -1
- package/dist/RSPContexts.module.js +3 -1
- package/dist/RSPContexts.module.js.map +1 -1
- package/dist/RadioGroup.main.js +10 -2
- package/dist/RadioGroup.main.js.map +1 -1
- package/dist/RadioGroup.mjs +10 -2
- package/dist/RadioGroup.module.js +10 -2
- package/dist/RadioGroup.module.js.map +1 -1
- package/dist/SearchField.main.js +7 -3
- package/dist/SearchField.main.js.map +1 -1
- package/dist/SearchField.mjs +7 -3
- package/dist/SearchField.module.js +7 -3
- package/dist/SearchField.module.js.map +1 -1
- package/dist/Select.main.js +62 -22
- package/dist/Select.main.js.map +1 -1
- package/dist/Select.mjs +65 -25
- package/dist/Select.module.js +65 -25
- package/dist/Select.module.js.map +1 -1
- package/dist/SelectionIndicator.main.js +45 -0
- package/dist/SelectionIndicator.main.js.map +1 -0
- package/dist/SelectionIndicator.mjs +35 -0
- package/dist/SelectionIndicator.module.js +35 -0
- package/dist/SelectionIndicator.module.js.map +1 -0
- package/dist/Separator.main.js.map +1 -1
- package/dist/Separator.module.js.map +1 -1
- package/dist/SharedElementTransition.main.js +139 -0
- package/dist/SharedElementTransition.main.js.map +1 -0
- package/dist/SharedElementTransition.mjs +129 -0
- package/dist/SharedElementTransition.module.js +129 -0
- package/dist/SharedElementTransition.module.js.map +1 -0
- package/dist/Slider.main.js.map +1 -1
- package/dist/Slider.module.js.map +1 -1
- package/dist/Switch.main.js.map +1 -1
- package/dist/Switch.module.js.map +1 -1
- package/dist/Table.main.js +142 -53
- package/dist/Table.main.js.map +1 -1
- package/dist/Table.mjs +143 -54
- package/dist/Table.module.js +143 -54
- package/dist/Table.module.js.map +1 -1
- package/dist/Tabs.main.js +86 -9
- package/dist/Tabs.main.js.map +1 -1
- package/dist/Tabs.mjs +88 -12
- package/dist/Tabs.module.js +88 -12
- package/dist/Tabs.module.js.map +1 -1
- package/dist/TagGroup.main.js +29 -17
- package/dist/TagGroup.main.js.map +1 -1
- package/dist/TagGroup.mjs +29 -17
- package/dist/TagGroup.module.js +29 -17
- package/dist/TagGroup.module.js.map +1 -1
- package/dist/TextArea.main.js.map +1 -1
- package/dist/TextArea.module.js.map +1 -1
- package/dist/TextField.main.js +2 -2
- package/dist/TextField.main.js.map +1 -1
- package/dist/TextField.mjs +2 -2
- package/dist/TextField.module.js +2 -2
- package/dist/TextField.module.js.map +1 -1
- package/dist/Toast.main.js.map +1 -1
- package/dist/Toast.module.js.map +1 -1
- package/dist/ToggleButton.main.js +7 -1
- package/dist/ToggleButton.main.js.map +1 -1
- package/dist/ToggleButton.mjs +7 -1
- package/dist/ToggleButton.module.js +7 -1
- package/dist/ToggleButton.module.js.map +1 -1
- package/dist/ToggleButtonGroup.main.js +4 -1
- package/dist/ToggleButtonGroup.main.js.map +1 -1
- package/dist/ToggleButtonGroup.mjs +4 -1
- package/dist/ToggleButtonGroup.module.js +4 -1
- package/dist/ToggleButtonGroup.module.js.map +1 -1
- package/dist/Toolbar.main.js.map +1 -1
- package/dist/Toolbar.module.js.map +1 -1
- package/dist/Tooltip.main.js.map +1 -1
- package/dist/Tooltip.module.js.map +1 -1
- package/dist/Tree.main.js +16 -4
- package/dist/Tree.main.js.map +1 -1
- package/dist/Tree.mjs +16 -4
- package/dist/Tree.module.js +16 -4
- package/dist/Tree.module.js.map +1 -1
- package/dist/import.mjs +13 -7
- package/dist/main.js +23 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +13 -7
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +663 -58
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.main.js +0 -1
- package/dist/utils.main.js.map +1 -1
- package/dist/utils.mjs +0 -1
- package/dist/utils.module.js +0 -1
- package/dist/utils.module.js.map +1 -1
- package/i18n/ar-AE.js +1 -1
- package/i18n/ar-AE.mjs +1 -1
- package/i18n/bg-BG.js +1 -1
- package/i18n/bg-BG.mjs +1 -1
- package/i18n/cs-CZ.js +1 -1
- package/i18n/cs-CZ.mjs +1 -1
- package/i18n/da-DK.js +1 -1
- package/i18n/da-DK.mjs +1 -1
- package/i18n/de-DE.js +1 -1
- package/i18n/de-DE.mjs +1 -1
- package/i18n/el-GR.js +1 -1
- package/i18n/el-GR.mjs +1 -1
- package/i18n/en-US.js +1 -1
- package/i18n/en-US.mjs +1 -1
- package/i18n/es-ES.js +1 -1
- package/i18n/es-ES.mjs +1 -1
- package/i18n/et-EE.js +1 -1
- package/i18n/et-EE.mjs +1 -1
- package/i18n/fi-FI.js +1 -1
- package/i18n/fi-FI.mjs +1 -1
- package/i18n/fr-FR.js +1 -1
- package/i18n/fr-FR.mjs +1 -1
- package/i18n/he-IL.js +1 -1
- package/i18n/he-IL.mjs +1 -1
- package/i18n/hr-HR.js +1 -1
- package/i18n/hr-HR.mjs +1 -1
- package/i18n/hu-HU.js +1 -1
- package/i18n/hu-HU.mjs +1 -1
- package/i18n/index.js +67 -67
- package/i18n/index.mjs +67 -67
- package/i18n/it-IT.js +1 -1
- package/i18n/it-IT.mjs +1 -1
- package/i18n/ja-JP.js +1 -1
- package/i18n/ja-JP.mjs +1 -1
- package/i18n/ko-KR.js +1 -1
- package/i18n/ko-KR.mjs +1 -1
- package/i18n/lt-LT.js +1 -1
- package/i18n/lt-LT.mjs +1 -1
- package/i18n/lv-LV.js +1 -1
- package/i18n/lv-LV.mjs +1 -1
- package/i18n/nb-NO.js +1 -1
- package/i18n/nb-NO.mjs +1 -1
- package/i18n/nl-NL.js +1 -1
- package/i18n/nl-NL.mjs +1 -1
- package/i18n/pl-PL.js +1 -1
- package/i18n/pl-PL.mjs +1 -1
- package/i18n/pt-BR.js +1 -1
- package/i18n/pt-BR.mjs +1 -1
- package/i18n/pt-PT.js +1 -1
- package/i18n/pt-PT.mjs +1 -1
- package/i18n/ro-RO.js +1 -1
- package/i18n/ro-RO.mjs +1 -1
- package/i18n/ru-RU.js +1 -1
- package/i18n/ru-RU.mjs +1 -1
- package/i18n/sk-SK.js +1 -1
- package/i18n/sk-SK.mjs +1 -1
- package/i18n/sl-SI.js +1 -1
- package/i18n/sl-SI.mjs +1 -1
- package/i18n/sr-SP.js +1 -1
- package/i18n/sr-SP.mjs +1 -1
- package/i18n/sv-SE.js +1 -1
- package/i18n/sv-SE.mjs +1 -1
- package/i18n/tr-TR.js +1 -1
- package/i18n/tr-TR.mjs +1 -1
- package/i18n/uk-UA.js +1 -1
- package/i18n/uk-UA.mjs +1 -1
- package/i18n/zh-CN.js +1 -1
- package/i18n/zh-CN.mjs +1 -1
- package/i18n/zh-TW.js +1 -1
- package/i18n/zh-TW.mjs +1 -1
- package/package.json +25 -25
- package/src/Autocomplete.tsx +2 -2
- package/src/Breadcrumbs.tsx +25 -6
- package/src/Button.tsx +15 -11
- package/src/Calendar.tsx +51 -6
- package/src/Checkbox.tsx +25 -2
- package/src/Collection.tsx +1 -1
- package/src/ColorArea.tsx +15 -2
- package/src/ColorField.tsx +16 -1
- package/src/ColorPicker.tsx +5 -2
- package/src/ColorSlider.tsx +16 -2
- package/src/ColorSwatch.tsx +15 -2
- package/src/ColorSwatchPicker.tsx +18 -1
- package/src/ColorThumb.tsx +8 -2
- package/src/ColorWheel.tsx +24 -3
- package/src/ComboBox.tsx +18 -1
- package/src/DateField.tsx +60 -16
- package/src/DatePicker.tsx +38 -5
- package/src/Dialog.tsx +5 -0
- package/src/Disclosure.tsx +30 -5
- package/src/DragAndDrop.tsx +8 -2
- package/src/DropZone.tsx +16 -2
- package/src/FieldError.tsx +8 -2
- package/src/FileTrigger.tsx +1 -0
- package/src/Form.tsx +5 -0
- package/src/GridList.tsx +66 -35
- package/src/Group.tsx +32 -18
- package/src/HiddenDateInput.tsx +6 -4
- package/src/Input.tsx +23 -3
- package/src/Link.tsx +15 -2
- package/src/ListBox.tsx +58 -14
- package/src/Menu.tsx +41 -8
- package/src/Meter.tsx +16 -2
- package/src/Modal.tsx +30 -3
- package/src/NumberField.tsx +21 -3
- package/src/OverlayArrow.tsx +14 -2
- package/src/Popover.tsx +13 -1
- package/src/ProgressBar.tsx +17 -3
- package/src/RSPContexts.ts +19 -0
- package/src/RadioGroup.tsx +33 -4
- package/src/SearchField.tsx +36 -4
- package/src/Select.tsx +100 -36
- package/src/SelectionIndicator.tsx +46 -0
- package/src/Separator.tsx +10 -1
- package/src/SharedElementTransition.tsx +185 -0
- package/src/Slider.tsx +35 -3
- package/src/Switch.tsx +18 -5
- package/src/Table.tsx +204 -83
- package/src/Tabs.tsx +158 -15
- package/src/TagGroup.tsx +60 -26
- package/src/TextArea.tsx +14 -2
- package/src/TextField.tsx +20 -2
- package/src/Toast.tsx +22 -2
- package/src/ToggleButton.tsx +19 -2
- package/src/ToggleButtonGroup.tsx +26 -4
- package/src/Toolbar.tsx +13 -1
- package/src/Tooltip.tsx +13 -1
- package/src/Tree.tsx +76 -40
- package/src/index.ts +17 -10
- package/src/utils.tsx +2 -3
- package/dist/context.main.js +0 -25
- package/dist/context.main.js.map +0 -1
- package/dist/context.mjs +0 -19
- package/dist/context.module.js +0 -19
- package/dist/context.module.js.map +0 -1
- package/src/context.tsx +0 -34
package/i18n/zh-TW.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default{"@react-aria/
|
|
1
|
+
export default{"@react-aria/tree":{collapse:`收合`,expand:`展開`},"@react-aria/toast":{close:`關閉`,notifications:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} 個通知`,other:()=>`${t.number(e.count)} 個通知`})}。`},"@react-aria/tag":{removeButtonLabel:`移除`,removeDescription:`按 Delete 鍵以移除標記。`},"@react-aria/table":{ascending:`遞增`,ascendingSort:e=>`已依據「${e.columnName}」欄遞增排序`,columnSize:e=>`${e.value} 像素`,descending:`遞減`,descendingSort:e=>`已依據「${e.columnName}」欄遞減排序`,resizerDescription:`按 Enter 鍵以開始調整大小`,select:`選取`,selectAll:`全選`,sortable:`可排序的欄`},"@react-aria/steplist":{steplist:`步驟清單`},"@react-aria/spinbutton":{Empty:`空白`},"@react-aria/searchfield":{"Clear search":`清除搜尋條件`},"@react-aria/overlays":{dismiss:`關閉`},"@react-aria/numberfield":{decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:`數字欄位`},"@react-aria/menu":{longPressMessage:`長按或按 Alt+向下鍵以開啟功能表`},"@react-aria/gridlist":{hasActionAnnouncement:`列有動作`,hasLinkAnnouncement:e=>`列有連結:${e.link}`},"@react-aria/grid":{deselectedItem:e=>`未選取「${e.item}」。`,longPressToSelect:`長按以進入選擇模式。`,select:`選取`,selectedAll:`已選取所有項目。`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`未選取任何項目`,one:()=>`已選取 ${t.number(e.count)} 個項目`,other:()=>`已選取 ${t.number(e.count)} 個項目`})}。`,selectedItem:e=>`已選取「${e.item}」。`},"@react-aria/dnd":{dragDescriptionKeyboard:`按 Enter 鍵以開始拖曳。`,dragDescriptionKeyboardAlt:`按 Alt+Enter 鍵以開始拖曳。`,dragDescriptionLongPress:`長按以開始拖曳。`,dragDescriptionTouch:`輕點兩下以開始拖曳。`,dragDescriptionVirtual:`按一下滑鼠以開始拖曳。`,dragItem:e=>`拖曳「${e.itemText}」`,dragSelectedItems:(e,t)=>`拖曳 ${t.plural(e.count,{one:()=>`${t.number(e.count)} 個選定項目`,other:()=>`${t.number(e.count)} 個選定項目`})}`,dragSelectedKeyboard:(e,t)=>`按 Enter 鍵以拖曳 ${t.plural(e.count,{one:()=>`${t.number(e.count)} 個選定項目`,other:()=>`${t.number(e.count)} 個選定項目`})}。`,dragSelectedKeyboardAlt:(e,t)=>`按 Alt+Enter 鍵以拖曳 ${t.plural(e.count,{one:()=>`${t.number(e.count)} 個選定項目`,other:()=>`${t.number(e.count)} 個選定項目`})}。`,dragSelectedLongPress:(e,t)=>`長按以拖曳 ${t.plural(e.count,{one:()=>`${t.number(e.count)} 個選定項目`,other:()=>`${t.number(e.count)} 個選定項目`})}。`,dragStartedKeyboard:`已開始拖曳。按 Tab 鍵以瀏覽至放置目標,然後按 Enter 鍵以放置,或按 Escape 鍵以取消。`,dragStartedTouch:`已開始拖曳。瀏覽至放置目標,然後輕點兩下以放置。`,dragStartedVirtual:`已開始拖曳。瀏覽至放置目標,然後按一下滑鼠或按 Enter 鍵以放置。`,dropCanceled:`放置已取消。`,dropComplete:`放置已完成。`,dropDescriptionKeyboard:`按 Enter 鍵以放置。按 Escape 鍵以取消拖曳。`,dropDescriptionTouch:`輕點兩下以放置。`,dropDescriptionVirtual:`按一下滑鼠以放置。`,dropIndicator:`放置指示器`,dropOnItem:e=>`放置在「${e.itemText}」上`,dropOnRoot:`放置在`,endDragKeyboard:`拖曳中。按 Enter 鍵以取消拖曳。`,endDragTouch:`拖曳中。輕點兩下以取消拖曳。`,endDragVirtual:`拖曳中。按一下滑鼠以取消拖曳。`,insertAfter:e=>`插入至「${e.itemText}」之後`,insertBefore:e=>`插入至「${e.itemText}」之前`,insertBetween:e=>`插入至「${e.beforeItemText}」和「${e.afterItemText}」之間`},"@react-aria/datepicker":{calendar:`日曆`,day:`日`,dayPeriod:`上午/下午`,endDate:`結束日期`,era:`纪元`,hour:`小时`,minute:`分钟`,month:`月`,second:`秒`,selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.startDate} 至 ${e.endDate}`,selectedTimeDescription:e=>`選定的時間:${e.time}`,startDate:`開始日期`,timeZoneName:`时区`,weekday:`工作日`,year:`年`},"@react-aria/combobox":{buttonLabel:`顯示建議`,countAnnouncement:(e,t)=>`${t.plural(e.optionCount,{one:()=>`${t.number(e.optionCount)} 選項`,other:()=>`${t.number(e.optionCount)} 選項`})} 可用。`,focusAnnouncement:(e,t)=>`${t.select({true:()=>`輸入的群組 ${e.groupTitle}, 有 ${t.plural(e.groupCount,{one:()=>`${t.number(e.groupCount)} 選項`,other:()=>`${t.number(e.groupCount)} 選項`})}. `,other:""},e.isGroupChange)}${e.optionText}${t.select({true:`, 已選取`,other:""},e.isSelected)}`,listboxLabel:`建議`,selectedAnnouncement:e=>`${e.optionText}, 已選取`},"@react-aria/color":{colorInputLabel:e=>`${e.label},${e.channelLabel}`,colorNameAndValue:e=>`${e.name}:${e.value}`,colorPicker:`檢色器`,colorSwatch:`色票`,transparent:`透明`,twoDimensionalSlider:`2D 滑桿`},"@react-aria/calendar":{dateRange:e=>`${e.startDate} 至 ${e.endDate}`,dateSelected:e=>`已選取 ${e.date}`,finishRangeSelectionPrompt:`按一下以完成選取日期範圍`,maximumDate:`最後一個可用日期`,minimumDate:`第一個可用日期`,next:`下一頁`,previous:`上一頁`,selectedDateDescription:e=>`選定的日期:${e.date}`,selectedRangeDescription:e=>`選定的範圍:${e.dateRange}`,startRangeSelectionPrompt:`按一下以開始選取日期範圍`,todayDate:e=>`今天,${e.date}`,todayDateSelected:e=>`已選取今天,${e.date}`},"@react-aria/breadcrumbs":{breadcrumbs:`導覽列`},"@react-aria/autocomplete":{collectionLabel:`建議`},"@react-stately/datepicker":{rangeOverflow:e=>`值必須是 ${e.maxValue} 或更早。`,rangeReversed:`開始日期必須在結束日期之前。`,rangeUnderflow:e=>`值必須是 ${e.minValue} 或更晚。`,unavailableDate:`所選日期無法使用。`},"@react-stately/color":{alpha:"Alpha",black:`黑`,blue:`藍色`,"blue purple":`藍紫`,brightness:`亮度`,brown:`棕`,"brown yellow":`棕黃`,colorName:e=>`${e.lightness} ${e.chroma} ${e.hue}`,cyan:`青`,"cyan blue":`青藍`,dark:`暗`,gray:`灰`,grayish:`偏灰`,green:`綠色`,"green cyan":`青綠`,hue:`色相`,light:`淺`,lightness:`明亮`,magenta:`洋紅`,"magenta pink":`淺洋紅`,orange:`橙`,"orange yellow":`橙黃`,pale:`淡`,pink:`粉紅`,"pink red":`粉紅`,purple:`紫`,"purple magenta":`紫洋紅`,red:`紅色`,"red orange":`橙紅`,saturation:`飽和度`,transparentColorName:e=>`${e.lightness} ${e.chroma} ${e.hue}, ${e.percentTransparent} 透明`,"very dark":`很暗`,"very light":`很淺`,vibrant:`鮮豔`,white:`白`,yellow:`黃`,"yellow green":`黃綠`},"react-aria-components":{colorSwatchPicker:`色票`,dropzoneLabel:`放置區`,selectPlaceholder:`選取項目`,tableResizer:`大小調整器`}};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-aria-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "A library of styleable components built using React Aria",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -41,34 +41,34 @@
|
|
|
41
41
|
"url": "https://github.com/adobe/react-spectrum"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@internationalized/date": "^3.
|
|
44
|
+
"@internationalized/date": "^3.10.1",
|
|
45
45
|
"@internationalized/string": "^3.2.7",
|
|
46
|
-
"@react-aria/autocomplete": "3.0.0-rc.
|
|
47
|
-
"@react-aria/collections": "3.0.
|
|
48
|
-
"@react-aria/dnd": "^3.11.
|
|
49
|
-
"@react-aria/focus": "^3.21.
|
|
50
|
-
"@react-aria/interactions": "^3.
|
|
46
|
+
"@react-aria/autocomplete": "3.0.0-rc.4",
|
|
47
|
+
"@react-aria/collections": "^3.0.1",
|
|
48
|
+
"@react-aria/dnd": "^3.11.4",
|
|
49
|
+
"@react-aria/focus": "^3.21.3",
|
|
50
|
+
"@react-aria/interactions": "^3.26.0",
|
|
51
51
|
"@react-aria/live-announcer": "^3.4.4",
|
|
52
|
-
"@react-aria/overlays": "^3.
|
|
52
|
+
"@react-aria/overlays": "^3.31.0",
|
|
53
53
|
"@react-aria/ssr": "^3.9.10",
|
|
54
|
-
"@react-aria/textfield": "^3.18.
|
|
55
|
-
"@react-aria/toolbar": "3.0.0-beta.
|
|
56
|
-
"@react-aria/utils": "^3.
|
|
57
|
-
"@react-aria/virtualizer": "^4.1.
|
|
58
|
-
"@react-stately/autocomplete": "3.0.0-beta.
|
|
59
|
-
"@react-stately/layout": "^4.5.
|
|
60
|
-
"@react-stately/selection": "^3.20.
|
|
61
|
-
"@react-stately/table": "^3.15.
|
|
62
|
-
"@react-stately/utils": "^3.
|
|
63
|
-
"@react-stately/virtualizer": "^4.4.
|
|
64
|
-
"@react-types/form": "^3.7.
|
|
65
|
-
"@react-types/grid": "^3.3.
|
|
66
|
-
"@react-types/shared": "^3.32.
|
|
67
|
-
"@react-types/table": "^3.13.
|
|
54
|
+
"@react-aria/textfield": "^3.18.3",
|
|
55
|
+
"@react-aria/toolbar": "3.0.0-beta.22",
|
|
56
|
+
"@react-aria/utils": "^3.32.0",
|
|
57
|
+
"@react-aria/virtualizer": "^4.1.11",
|
|
58
|
+
"@react-stately/autocomplete": "3.0.0-beta.4",
|
|
59
|
+
"@react-stately/layout": "^4.5.2",
|
|
60
|
+
"@react-stately/selection": "^3.20.7",
|
|
61
|
+
"@react-stately/table": "^3.15.2",
|
|
62
|
+
"@react-stately/utils": "^3.11.0",
|
|
63
|
+
"@react-stately/virtualizer": "^4.4.4",
|
|
64
|
+
"@react-types/form": "^3.7.16",
|
|
65
|
+
"@react-types/grid": "^3.3.6",
|
|
66
|
+
"@react-types/shared": "^3.32.1",
|
|
67
|
+
"@react-types/table": "^3.13.4",
|
|
68
68
|
"@swc/helpers": "^0.5.0",
|
|
69
69
|
"client-only": "^0.0.1",
|
|
70
|
-
"react-aria": "^3.
|
|
71
|
-
"react-stately": "^3.
|
|
70
|
+
"react-aria": "^3.45.0",
|
|
71
|
+
"react-stately": "^3.43.0",
|
|
72
72
|
"use-sync-external-store": "^1.4.0"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@tailwindcss/postcss": "^4.0.0"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "4d838da5bfe36abb35aed166995a9ef63825370f"
|
|
85
85
|
}
|
package/src/Autocomplete.tsx
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import {AriaAutocompleteProps, useAutocomplete} from '@react-aria/autocomplete';
|
|
14
14
|
import {AutocompleteState, useAutocompleteState} from '@react-stately/autocomplete';
|
|
15
|
-
import {FieldInputContext, SelectableCollectionContext} from './
|
|
15
|
+
import {FieldInputContext, SelectableCollectionContext} from './RSPContexts';
|
|
16
16
|
import {mergeProps} from '@react-aria/utils';
|
|
17
17
|
import {Provider, removeDataAttributes, SlotProps, SlottedContextValue, useSlottedContext} from './utils';
|
|
18
18
|
import React, {createContext, JSX, useRef} from 'react';
|
|
@@ -22,7 +22,7 @@ export const AutocompleteContext = createContext<SlottedContextValue<Partial<Aut
|
|
|
22
22
|
export const AutocompleteStateContext = createContext<AutocompleteState | null>(null);
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* An autocomplete
|
|
25
|
+
* An autocomplete allows users to search or filter a list of suggestions.
|
|
26
26
|
*/
|
|
27
27
|
export function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element {
|
|
28
28
|
let ctx = useSlottedContext(AutocompleteContext, props.slot);
|
package/src/Breadcrumbs.tsx
CHANGED
|
@@ -10,16 +10,30 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import {AriaBreadcrumbsProps, useBreadcrumbs} from 'react-aria';
|
|
13
|
+
import {AriaLabelingProps, forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';
|
|
14
|
+
import {
|
|
15
|
+
ClassNameOrFunction,
|
|
16
|
+
ContextValue,
|
|
17
|
+
RenderProps,
|
|
18
|
+
SlotProps,
|
|
19
|
+
StyleProps,
|
|
20
|
+
useContextProps,
|
|
21
|
+
useRenderProps,
|
|
22
|
+
useSlottedContext
|
|
23
|
+
} from './utils';
|
|
13
24
|
import {Collection, CollectionBuilder, CollectionNode, createLeafComponent} from '@react-aria/collections';
|
|
14
25
|
import {CollectionProps, CollectionRendererContext} from './Collection';
|
|
15
|
-
import {ContextValue, RenderProps, SlotProps, StyleProps, useContextProps, useRenderProps, useSlottedContext} from './utils';
|
|
16
26
|
import {filterDOMProps, mergeProps} from '@react-aria/utils';
|
|
17
|
-
import {forwardRefType, GlobalDOMAttributes, Key} from '@react-types/shared';
|
|
18
27
|
import {LinkContext} from './Link';
|
|
19
28
|
import {Node} from 'react-stately';
|
|
20
29
|
import React, {createContext, ForwardedRef, forwardRef, useContext} from 'react';
|
|
21
30
|
|
|
22
|
-
export interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, GlobalDOMAttributes<HTMLOListElement> {
|
|
31
|
+
export interface BreadcrumbsProps<T> extends Omit<CollectionProps<T>, 'disabledKeys'>, AriaBreadcrumbsProps, StyleProps, SlotProps, AriaLabelingProps, GlobalDOMAttributes<HTMLOListElement> {
|
|
32
|
+
/**
|
|
33
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
|
|
34
|
+
* @default 'react-aria-Breadcrumbs'
|
|
35
|
+
*/
|
|
36
|
+
className?: string,
|
|
23
37
|
/** Whether the breadcrumbs are disabled. */
|
|
24
38
|
isDisabled?: boolean,
|
|
25
39
|
/** Handler that is called when a breadcrumb is clicked. */
|
|
@@ -35,7 +49,7 @@ export const Breadcrumbs = /*#__PURE__*/ (forwardRef as forwardRefType)(function
|
|
|
35
49
|
[props, ref] = useContextProps(props, ref, BreadcrumbsContext);
|
|
36
50
|
let {CollectionRoot} = useContext(CollectionRendererContext);
|
|
37
51
|
let {navProps} = useBreadcrumbs(props);
|
|
38
|
-
let DOMProps = filterDOMProps(props, {global: true});
|
|
52
|
+
let DOMProps = filterDOMProps(props, {global: true, labelable: true});
|
|
39
53
|
|
|
40
54
|
return (
|
|
41
55
|
<CollectionBuilder content={<Collection {...props} />}>
|
|
@@ -68,7 +82,12 @@ export interface BreadcrumbRenderProps {
|
|
|
68
82
|
isDisabled: boolean
|
|
69
83
|
}
|
|
70
84
|
|
|
71
|
-
export interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, GlobalDOMAttributes<HTMLLIElement> {
|
|
85
|
+
export interface BreadcrumbProps extends RenderProps<BreadcrumbRenderProps>, AriaLabelingProps, GlobalDOMAttributes<HTMLLIElement> {
|
|
86
|
+
/**
|
|
87
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
88
|
+
* @default 'react-aria-Breadcrumb'
|
|
89
|
+
*/
|
|
90
|
+
className?: ClassNameOrFunction<BreadcrumbRenderProps>,
|
|
72
91
|
/** A unique id for the breadcrumb, which will be passed to `onAction` when the breadcrumb is pressed. */
|
|
73
92
|
id?: Key
|
|
74
93
|
}
|
|
@@ -97,7 +116,7 @@ export const Breadcrumb = /*#__PURE__*/ createLeafComponent(BreadcrumbNode, func
|
|
|
97
116
|
defaultClassName: 'react-aria-Breadcrumb'
|
|
98
117
|
});
|
|
99
118
|
|
|
100
|
-
let DOMProps = filterDOMProps(props as any, {global: true});
|
|
119
|
+
let DOMProps = filterDOMProps(props as any, {global: true, labelable: true});
|
|
101
120
|
delete DOMProps.id;
|
|
102
121
|
|
|
103
122
|
return (
|
package/src/Button.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
useId
|
|
22
22
|
} from 'react-aria';
|
|
23
23
|
import {
|
|
24
|
+
ClassNameOrFunction,
|
|
24
25
|
ContextValue,
|
|
25
26
|
RenderProps,
|
|
26
27
|
SlotProps,
|
|
@@ -67,6 +68,11 @@ export interface ButtonRenderProps {
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
export interface ButtonProps extends Omit<AriaButtonProps, 'children' | 'href' | 'target' | 'rel' | 'elementType'>, HoverEvents, SlotProps, RenderProps<ButtonRenderProps>, Omit<GlobalDOMAttributes<HTMLButtonElement>, 'onClick'> {
|
|
71
|
+
/**
|
|
72
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
73
|
+
* @default 'react-aria-Button'
|
|
74
|
+
*/
|
|
75
|
+
className?: ClassNameOrFunction<ButtonRenderProps>,
|
|
70
76
|
/**
|
|
71
77
|
* Whether the button is in a pending state. This disables press and hover events
|
|
72
78
|
* while retaining focusability, and announces the pending state to screen readers.
|
|
@@ -85,10 +91,10 @@ export const ButtonContext = createContext<ContextValue<ButtonContextValue, HTML
|
|
|
85
91
|
*/
|
|
86
92
|
export const Button = /*#__PURE__*/ createHideableComponent(function Button(props: ButtonProps, ref: ForwardedRef<HTMLButtonElement>) {
|
|
87
93
|
[props, ref] = useContextProps(props, ref, ButtonContext);
|
|
88
|
-
props = disablePendingProps(props);
|
|
89
94
|
let ctx = props as ButtonContextValue;
|
|
90
95
|
let {isPending} = ctx;
|
|
91
96
|
let {buttonProps, isPressed} = useButton(props, ref);
|
|
97
|
+
buttonProps = useDisableInteractions(buttonProps, isPending);
|
|
92
98
|
let {focusProps, isFocused, isFocusVisible} = useFocusRing(props);
|
|
93
99
|
let {hoverProps, isHovered} = useHover({
|
|
94
100
|
...props,
|
|
@@ -161,18 +167,16 @@ export const Button = /*#__PURE__*/ createHideableComponent(function Button(prop
|
|
|
161
167
|
);
|
|
162
168
|
});
|
|
163
169
|
|
|
164
|
-
function
|
|
170
|
+
function useDisableInteractions(props, isPending) {
|
|
165
171
|
// Don't allow interaction while isPending is true
|
|
166
|
-
if (
|
|
167
|
-
props
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
props.onKeyDown = undefined;
|
|
173
|
-
props.onKeyUp = undefined;
|
|
174
|
-
props.onClick = undefined;
|
|
172
|
+
if (isPending) {
|
|
173
|
+
for (const key in props) {
|
|
174
|
+
if (key.startsWith('on') && !(key.includes('Focus') || key.includes('Blur'))) {
|
|
175
|
+
props[key] = undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
175
178
|
props.href = undefined;
|
|
179
|
+
props.target = undefined;
|
|
176
180
|
}
|
|
177
181
|
return props;
|
|
178
182
|
}
|
package/src/Calendar.tsx
CHANGED
|
@@ -26,7 +26,18 @@ import {
|
|
|
26
26
|
import {ButtonContext} from './Button';
|
|
27
27
|
import {CalendarDate, CalendarIdentifier, createCalendar, DateDuration, endOfMonth, Calendar as ICalendar, isSameDay, isSameMonth, isToday} from '@internationalized/date';
|
|
28
28
|
import {CalendarState, RangeCalendarState, useCalendarState, useRangeCalendarState} from 'react-stately';
|
|
29
|
-
import {
|
|
29
|
+
import {
|
|
30
|
+
ClassNameOrFunction,
|
|
31
|
+
ContextValue,
|
|
32
|
+
DOMProps,
|
|
33
|
+
Provider,
|
|
34
|
+
RenderProps,
|
|
35
|
+
SlotProps,
|
|
36
|
+
StyleProps,
|
|
37
|
+
useContextProps,
|
|
38
|
+
useRenderProps,
|
|
39
|
+
useSlottedContext
|
|
40
|
+
} from './utils';
|
|
30
41
|
import {DOMAttributes, FocusableElement, forwardRefType, GlobalDOMAttributes, HoverEvents} from '@react-types/shared';
|
|
31
42
|
import {filterDOMProps} from '@react-aria/utils';
|
|
32
43
|
import {HeadingContext} from './RSPContexts';
|
|
@@ -58,12 +69,16 @@ export interface RangeCalendarRenderProps extends Omit<CalendarRenderProps, 'sta
|
|
|
58
69
|
}
|
|
59
70
|
|
|
60
71
|
export interface CalendarProps<T extends DateValue> extends Omit<AriaCalendarProps<T>, 'errorMessage' | 'validationState'>, RenderProps<CalendarRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
72
|
+
/**
|
|
73
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
74
|
+
* @default 'react-aria-Calendar'
|
|
75
|
+
*/
|
|
76
|
+
className?: ClassNameOrFunction<CalendarRenderProps>,
|
|
61
77
|
/**
|
|
62
78
|
* The amount of days that will be displayed at once. This affects how pagination works.
|
|
63
79
|
* @default {months: 1}
|
|
64
80
|
*/
|
|
65
81
|
visibleDuration?: DateDuration,
|
|
66
|
-
|
|
67
82
|
/**
|
|
68
83
|
* A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
|
|
69
84
|
* object for a given calendar identifier. If not provided, the `createCalendar` function
|
|
@@ -73,12 +88,16 @@ export interface CalendarProps<T extends DateValue> extends Omit<AriaCalendarPro
|
|
|
73
88
|
}
|
|
74
89
|
|
|
75
90
|
export interface RangeCalendarProps<T extends DateValue> extends Omit<AriaRangeCalendarProps<T>, 'errorMessage' | 'validationState'>, RenderProps<RangeCalendarRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
91
|
+
/**
|
|
92
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
93
|
+
* @default 'react-aria-RangeCalendar'
|
|
94
|
+
*/
|
|
95
|
+
className?: ClassNameOrFunction<RangeCalendarRenderProps>,
|
|
76
96
|
/**
|
|
77
97
|
* The amount of days that will be displayed at once. This affects how pagination works.
|
|
78
98
|
* @default {months: 1}
|
|
79
99
|
*/
|
|
80
100
|
visibleDuration?: DateDuration,
|
|
81
|
-
|
|
82
101
|
/**
|
|
83
102
|
* A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html)
|
|
84
103
|
* object for a given calendar identifier. If not provided, the `createCalendar` function
|
|
@@ -326,6 +345,11 @@ export interface CalendarCellRenderProps {
|
|
|
326
345
|
}
|
|
327
346
|
|
|
328
347
|
export interface CalendarGridProps extends StyleProps, GlobalDOMAttributes<HTMLTableElement> {
|
|
348
|
+
/**
|
|
349
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
|
|
350
|
+
* @default 'react-aria-CalendarGrid'
|
|
351
|
+
*/
|
|
352
|
+
className?: string,
|
|
329
353
|
/**
|
|
330
354
|
* Either a function to render calendar cells for each date in the month,
|
|
331
355
|
* or children containing a `<CalendarGridHeader>`` and `<CalendarGridBody>`
|
|
@@ -406,6 +430,11 @@ export const CalendarGrid = /*#__PURE__*/ (forwardRef as forwardRefType)(functio
|
|
|
406
430
|
});
|
|
407
431
|
|
|
408
432
|
export interface CalendarGridHeaderProps extends StyleProps, GlobalDOMAttributes<HTMLTableSectionElement> {
|
|
433
|
+
/**
|
|
434
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
|
|
435
|
+
* @default 'react-aria-CalendarGridHeader'
|
|
436
|
+
*/
|
|
437
|
+
className?: string,
|
|
409
438
|
/** A function to render a `<CalendarHeaderCell>` for a weekday name. */
|
|
410
439
|
children: (day: string) => ReactElement
|
|
411
440
|
}
|
|
@@ -420,7 +449,7 @@ function CalendarGridHeader(props: CalendarGridHeaderProps, ref: ForwardedRef<HT
|
|
|
420
449
|
{...mergeProps(DOMProps, headerProps)}
|
|
421
450
|
ref={ref}
|
|
422
451
|
style={style}
|
|
423
|
-
className={className
|
|
452
|
+
className={className ?? 'react-aria-CalendarGridHeader'}>
|
|
424
453
|
<tr>
|
|
425
454
|
{weekDays.map((day, key) => React.cloneElement(children(day), {key}))}
|
|
426
455
|
</tr>
|
|
@@ -434,7 +463,13 @@ function CalendarGridHeader(props: CalendarGridHeaderProps, ref: ForwardedRef<HT
|
|
|
434
463
|
const CalendarGridHeaderForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(CalendarGridHeader);
|
|
435
464
|
export {CalendarGridHeaderForwardRef as CalendarGridHeader};
|
|
436
465
|
|
|
437
|
-
export interface CalendarHeaderCellProps extends DOMProps, GlobalDOMAttributes<HTMLTableHeaderCellElement> {
|
|
466
|
+
export interface CalendarHeaderCellProps extends DOMProps, GlobalDOMAttributes<HTMLTableHeaderCellElement> {
|
|
467
|
+
/**
|
|
468
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
|
|
469
|
+
* @default 'react-aria-CalendarHeaderCell'
|
|
470
|
+
*/
|
|
471
|
+
className?: string
|
|
472
|
+
}
|
|
438
473
|
|
|
439
474
|
function CalendarHeaderCell(props: CalendarHeaderCellProps, ref: ForwardedRef<HTMLTableCellElement>) {
|
|
440
475
|
let {children, style, className} = props;
|
|
@@ -457,6 +492,11 @@ const CalendarHeaderCellForwardRef = forwardRef(CalendarHeaderCell);
|
|
|
457
492
|
export {CalendarHeaderCellForwardRef as CalendarHeaderCell};
|
|
458
493
|
|
|
459
494
|
export interface CalendarGridBodyProps extends StyleProps, GlobalDOMAttributes<HTMLTableSectionElement> {
|
|
495
|
+
/**
|
|
496
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element.
|
|
497
|
+
* @default 'react-aria-CalendarGridBody'
|
|
498
|
+
*/
|
|
499
|
+
className?: string,
|
|
460
500
|
/** A function to render a `<CalendarCell>` for a given date. */
|
|
461
501
|
children: (date: CalendarDate) => ReactElement
|
|
462
502
|
}
|
|
@@ -474,7 +514,7 @@ function CalendarGridBody(props: CalendarGridBodyProps, ref: ForwardedRef<HTMLTa
|
|
|
474
514
|
{...DOMProps}
|
|
475
515
|
ref={ref}
|
|
476
516
|
style={style}
|
|
477
|
-
className={className
|
|
517
|
+
className={className ?? 'react-aria-CalendarGridBody'}>
|
|
478
518
|
{[...new Array(weeksInMonth).keys()].map((weekIndex) => (
|
|
479
519
|
<tr key={weekIndex}>
|
|
480
520
|
{state.getDatesInWeek(weekIndex, startDate).map((date, i) => (
|
|
@@ -495,6 +535,11 @@ const CalendarGridBodyForwardRef = /*#__PURE__*/ (forwardRef as forwardRefType)(
|
|
|
495
535
|
export {CalendarGridBodyForwardRef as CalendarGridBody};
|
|
496
536
|
|
|
497
537
|
export interface CalendarCellProps extends RenderProps<CalendarCellRenderProps>, HoverEvents, GlobalDOMAttributes<HTMLTableCellElement> {
|
|
538
|
+
/**
|
|
539
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
540
|
+
* @default 'react-aria-CalendarCell'
|
|
541
|
+
*/
|
|
542
|
+
className?: ClassNameOrFunction<CalendarCellRenderProps>,
|
|
498
543
|
/** The date to render in the cell. */
|
|
499
544
|
date: CalendarDate
|
|
500
545
|
}
|
package/src/Checkbox.tsx
CHANGED
|
@@ -12,7 +12,19 @@
|
|
|
12
12
|
import {AriaCheckboxGroupProps, AriaCheckboxProps, HoverEvents, mergeProps, useCheckbox, useCheckboxGroup, useCheckboxGroupItem, useFocusRing, useHover, VisuallyHidden} from 'react-aria';
|
|
13
13
|
import {CheckboxContext} from './RSPContexts';
|
|
14
14
|
import {CheckboxGroupState, useCheckboxGroupState, useToggleState} from 'react-stately';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
ClassNameOrFunction,
|
|
17
|
+
ContextValue,
|
|
18
|
+
Provider,
|
|
19
|
+
RACValidation,
|
|
20
|
+
removeDataAttributes,
|
|
21
|
+
RenderProps,
|
|
22
|
+
SlotProps,
|
|
23
|
+
useContextProps,
|
|
24
|
+
useRenderProps,
|
|
25
|
+
useSlot,
|
|
26
|
+
useSlottedContext
|
|
27
|
+
} from './utils';
|
|
16
28
|
import {FieldErrorContext} from './FieldError';
|
|
17
29
|
import {filterDOMProps, mergeRefs, useObjectRef} from '@react-aria/utils';
|
|
18
30
|
import {FormContext} from './Form';
|
|
@@ -21,8 +33,19 @@ import {LabelContext} from './Label';
|
|
|
21
33
|
import React, {createContext, ForwardedRef, forwardRef, useContext, useMemo} from 'react';
|
|
22
34
|
import {TextContext} from './Text';
|
|
23
35
|
|
|
24
|
-
export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
36
|
+
export interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'children' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<CheckboxGroupRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
37
|
+
/**
|
|
38
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
39
|
+
* @default 'react-aria-CheckboxGroup'
|
|
40
|
+
*/
|
|
41
|
+
className?: ClassNameOrFunction<CheckboxGroupRenderProps>
|
|
42
|
+
}
|
|
25
43
|
export interface CheckboxProps extends Omit<AriaCheckboxProps, 'children' | 'validationState' | 'validationBehavior'>, HoverEvents, RACValidation, RenderProps<CheckboxRenderProps>, SlotProps, Omit<GlobalDOMAttributes<HTMLLabelElement>, 'onClick'> {
|
|
44
|
+
/**
|
|
45
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
46
|
+
* @default 'react-aria-Checkbox'
|
|
47
|
+
*/
|
|
48
|
+
className?: ClassNameOrFunction<CheckboxRenderProps>,
|
|
26
49
|
/**
|
|
27
50
|
* A ref for the HTML input element.
|
|
28
51
|
*/
|
package/src/Collection.tsx
CHANGED
|
@@ -195,7 +195,7 @@ export function renderAfterDropIndicators(collection: ICollection<Node<unknown>>
|
|
|
195
195
|
let afterIndicators: ReactNode[] = [];
|
|
196
196
|
if (nextItemInSameLevel == null) {
|
|
197
197
|
let current: Node<unknown> | null = node;
|
|
198
|
-
while (current && (!nextItemInFlattenedCollection || (current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level))) {
|
|
198
|
+
while (current?.type === 'item' && (!nextItemInFlattenedCollection || (current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level))) {
|
|
199
199
|
let indicator = renderDropIndicator({
|
|
200
200
|
type: 'item',
|
|
201
201
|
key: current.key,
|
package/src/ColorArea.tsx
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import {AriaColorAreaProps, useColorArea} from 'react-aria';
|
|
2
|
+
import {
|
|
3
|
+
ClassNameOrFunction,
|
|
4
|
+
Provider,
|
|
5
|
+
RenderProps,
|
|
6
|
+
SlotProps,
|
|
7
|
+
useContextProps,
|
|
8
|
+
useRenderProps
|
|
9
|
+
} from './utils';
|
|
2
10
|
import {ColorAreaContext} from './RSPContexts';
|
|
3
11
|
import {ColorAreaState, useColorAreaState} from 'react-stately';
|
|
4
12
|
import {filterDOMProps, mergeProps} from '@react-aria/utils';
|
|
5
13
|
import {GlobalDOMAttributes} from '@react-types/shared';
|
|
6
14
|
import {InternalColorThumbContext} from './ColorThumb';
|
|
7
|
-
import {Provider, RenderProps, SlotProps, useContextProps, useRenderProps} from './utils';
|
|
8
15
|
import React, {createContext, ForwardedRef, forwardRef, useRef} from 'react';
|
|
9
16
|
|
|
10
17
|
export interface ColorAreaRenderProps {
|
|
@@ -19,7 +26,13 @@ export interface ColorAreaRenderProps {
|
|
|
19
26
|
state: ColorAreaState
|
|
20
27
|
}
|
|
21
28
|
|
|
22
|
-
export interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
29
|
+
export interface ColorAreaProps extends AriaColorAreaProps, RenderProps<ColorAreaRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
30
|
+
/**
|
|
31
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
32
|
+
* @default 'react-aria-ColorArea'
|
|
33
|
+
*/
|
|
34
|
+
className?: ClassNameOrFunction<ColorAreaRenderProps>
|
|
35
|
+
}
|
|
23
36
|
|
|
24
37
|
export const ColorAreaStateContext = createContext<ColorAreaState | null>(null);
|
|
25
38
|
|
package/src/ColorField.tsx
CHANGED
|
@@ -11,6 +11,17 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {AriaColorFieldProps, useColorChannelField, useColorField, useLocale} from 'react-aria';
|
|
14
|
+
import {
|
|
15
|
+
ClassNameOrFunction,
|
|
16
|
+
Provider,
|
|
17
|
+
RACValidation,
|
|
18
|
+
removeDataAttributes,
|
|
19
|
+
RenderProps,
|
|
20
|
+
SlotProps,
|
|
21
|
+
useContextProps,
|
|
22
|
+
useRenderProps,
|
|
23
|
+
useSlot
|
|
24
|
+
} from './utils';
|
|
14
25
|
import {ColorChannel, ColorFieldState, ColorSpace, useColorChannelFieldState, useColorFieldState} from 'react-stately';
|
|
15
26
|
import {ColorFieldContext} from './RSPContexts';
|
|
16
27
|
import {FieldErrorContext} from './FieldError';
|
|
@@ -19,7 +30,6 @@ import {GlobalDOMAttributes, InputDOMProps, ValidationResult} from '@react-types
|
|
|
19
30
|
import {GroupContext} from './Group';
|
|
20
31
|
import {InputContext} from './Input';
|
|
21
32
|
import {LabelContext} from './Label';
|
|
22
|
-
import {Provider, RACValidation, removeDataAttributes, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';
|
|
23
33
|
import React, {createContext, ForwardedRef, forwardRef, HTMLAttributes, InputHTMLAttributes, LabelHTMLAttributes, Ref, useRef} from 'react';
|
|
24
34
|
import {TextContext} from './Text';
|
|
25
35
|
|
|
@@ -46,6 +56,11 @@ export interface ColorFieldRenderProps {
|
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
export interface ColorFieldProps extends Omit<AriaColorFieldProps, 'label' | 'placeholder' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, InputDOMProps, RenderProps<ColorFieldRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
59
|
+
/**
|
|
60
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
61
|
+
* @default 'react-aria-ColorField'
|
|
62
|
+
*/
|
|
63
|
+
className?: ClassNameOrFunction<ColorFieldRenderProps>,
|
|
49
64
|
/**
|
|
50
65
|
* The color channel that this field edits. If not provided,
|
|
51
66
|
* the color is edited as a hex value.
|
package/src/ColorPicker.tsx
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import {ChildrenOrFunction, Provider, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';
|
|
13
14
|
import {Color, ColorPickerState, ColorPickerProps as StatelyColorPickerProps, useColorPickerState} from 'react-stately';
|
|
14
15
|
import {ColorAreaContext, ColorFieldContext, ColorSliderContext, ColorWheelContext} from './RSPContexts';
|
|
15
16
|
import {ColorSwatchContext} from './ColorSwatch';
|
|
16
17
|
import {ColorSwatchPickerContext} from './ColorSwatchPicker';
|
|
17
18
|
import {mergeProps} from 'react-aria';
|
|
18
|
-
import {Provider, RenderProps, SlotProps, SlottedContextValue, useRenderProps, useSlottedContext} from './utils';
|
|
19
19
|
import React, {createContext, JSX} from 'react';
|
|
20
20
|
|
|
21
21
|
export interface ColorPickerRenderProps {
|
|
@@ -23,7 +23,10 @@ export interface ColorPickerRenderProps {
|
|
|
23
23
|
color: Color
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
export interface ColorPickerProps extends StatelyColorPickerProps, SlotProps
|
|
26
|
+
export interface ColorPickerProps extends StatelyColorPickerProps, SlotProps {
|
|
27
|
+
/** The children of the component. A function may be provided to alter the children based on component state. */
|
|
28
|
+
children: ChildrenOrFunction<ColorPickerRenderProps>
|
|
29
|
+
}
|
|
27
30
|
|
|
28
31
|
export const ColorPickerContext = createContext<SlottedContextValue<ColorPickerProps>>(null);
|
|
29
32
|
export const ColorPickerStateContext = createContext<ColorPickerState | null>(null);
|
package/src/ColorSlider.tsx
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import {AriaColorSliderProps, Orientation, useColorSlider, useLocale} from 'react-aria';
|
|
2
|
+
import {
|
|
3
|
+
ClassNameOrFunction,
|
|
4
|
+
Provider,
|
|
5
|
+
RenderProps,
|
|
6
|
+
SlotProps,
|
|
7
|
+
useContextProps,
|
|
8
|
+
useRenderProps,
|
|
9
|
+
useSlot
|
|
10
|
+
} from './utils';
|
|
2
11
|
import {ColorSliderContext} from './RSPContexts';
|
|
3
12
|
import {ColorSliderState, useColorSliderState} from 'react-stately';
|
|
4
13
|
import {filterDOMProps} from '@react-aria/utils';
|
|
5
14
|
import {GlobalDOMAttributes} from '@react-types/shared';
|
|
6
15
|
import {InternalColorThumbContext} from './ColorThumb';
|
|
7
16
|
import {LabelContext} from './Label';
|
|
8
|
-
import {Provider, RenderProps, SlotProps, useContextProps, useRenderProps, useSlot} from './utils';
|
|
9
17
|
import React, {createContext, ForwardedRef, forwardRef} from 'react';
|
|
10
18
|
import {SliderOutputContext, SliderStateContext, SliderTrackContext} from './Slider';
|
|
11
19
|
|
|
@@ -26,7 +34,13 @@ export interface ColorSliderRenderProps {
|
|
|
26
34
|
state: ColorSliderState
|
|
27
35
|
}
|
|
28
36
|
|
|
29
|
-
export interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
37
|
+
export interface ColorSliderProps extends Omit<AriaColorSliderProps, 'label'>, RenderProps<ColorSliderRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
38
|
+
/**
|
|
39
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
40
|
+
* @default 'react-aria-ColorSlider'
|
|
41
|
+
*/
|
|
42
|
+
className?: ClassNameOrFunction<ColorSliderRenderProps>
|
|
43
|
+
}
|
|
30
44
|
|
|
31
45
|
export const ColorSliderStateContext = createContext<ColorSliderState | null>(null);
|
|
32
46
|
|
package/src/ColorSwatch.tsx
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import {AriaColorSwatchProps, useColorSwatch} from 'react-aria';
|
|
2
|
+
import {
|
|
3
|
+
ClassNameOrFunction,
|
|
4
|
+
ContextValue,
|
|
5
|
+
SlotProps,
|
|
6
|
+
StyleRenderProps,
|
|
7
|
+
useContextProps,
|
|
8
|
+
useRenderProps
|
|
9
|
+
} from './utils';
|
|
2
10
|
import {Color} from 'react-stately';
|
|
3
|
-
import {ContextValue, SlotProps, StyleRenderProps, useContextProps, useRenderProps} from './utils';
|
|
4
11
|
import {filterDOMProps, mergeProps} from '@react-aria/utils';
|
|
5
12
|
import {GlobalDOMAttributes} from '@react-types/shared';
|
|
6
13
|
import React, {createContext, ForwardedRef, forwardRef} from 'react';
|
|
@@ -10,7 +17,13 @@ export interface ColorSwatchRenderProps {
|
|
|
10
17
|
color: Color
|
|
11
18
|
}
|
|
12
19
|
|
|
13
|
-
export interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
20
|
+
export interface ColorSwatchProps extends AriaColorSwatchProps, StyleRenderProps<ColorSwatchRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
|
|
21
|
+
/**
|
|
22
|
+
* The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state.
|
|
23
|
+
* @default 'react-aria-ColorSwatch'
|
|
24
|
+
*/
|
|
25
|
+
className?: ClassNameOrFunction<ColorSwatchRenderProps>
|
|
26
|
+
}
|
|
14
27
|
|
|
15
28
|
export const ColorSwatchContext = createContext<ContextValue<ColorSwatchProps, HTMLDivElement>>(null);
|
|
16
29
|
|