Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions packages/@react-spectrum/s2/chromatic/ListView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import {ActionMenu} from '../src/ActionMenu';
import {checkers} from './check';
import {Content, Heading, Text} from '../src/Content';
import Delete from '../s2wf-icons/S2_Icon_Delete_20_N.svg';
import {DragBetweenLists, Reorderable} from '../stories/ListView.stories';
import Edit from '../s2wf-icons/S2_Icon_Edit_20_N.svg';
import {expect, userEvent, within} from 'storybook/test';
import File from '../s2wf-icons/S2_Icon_File_20_N.svg';
import Folder from '../s2wf-icons/S2_Icon_Folder_20_N.svg';
import FolderOpen from '../spectrum-illustrations/linear/FolderOpen';
Expand Down Expand Up @@ -261,3 +263,45 @@ export const EmptyState: Story = {
</ListView>
)
};

export const InsertionIndicator: Story = {
...Reorderable,
play: async ({canvasElement}) => {
await userEvent.tab();
await userEvent.keyboard('[Tab]');
// TODO: strangely enough tabbing via user event actually focuses the drag handle and not just the row
// can't reproduce manually
// await userEvent.keyboard('[ArrowRight]');
await userEvent.keyboard('[Enter]');
let body = canvasElement.ownerDocument.body;
await within(body).findByText('Insert between Adobe Photoshop and Adobe XD');
}
};

export const RootDrop: Story = {
...DragBetweenLists,
play: async () => {
await userEvent.tab();
await userEvent.keyboard('[Tab]');
// await userEvent.keyboard('[ArrowRight]');
await userEvent.keyboard('[Enter]');
await userEvent.keyboard('[Tab]');
expect(document.activeElement).toHaveRole('button');
expect(document.activeElement).toHaveAttribute('aria-label', 'Drop on');
}
};

export const OnFolderDrop: Story = {
...DragBetweenLists,
play: async () => {
await userEvent.tab();
await userEvent.keyboard('[Tab]');
// await userEvent.keyboard('[ArrowRight]');
await userEvent.keyboard('[Enter]');
await userEvent.keyboard('[Tab]');
await userEvent.keyboard('[ArrowDown]');
await userEvent.keyboard('[ArrowDown]');
expect(document.activeElement).toHaveRole('button');
expect(document.activeElement).toHaveAttribute('aria-label', 'Drop on Pictures');
}
};
8 changes: 4 additions & 4 deletions packages/@react-spectrum/s2/exports/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export {Image, ImageContext} from '../src/Image';
export {ImageCoordinator} from '../src/ImageCoordinator';
export {InlineAlert, InlineAlertContext} from '../src/InlineAlert';
export {Link, LinkContext} from '../src/Link';
export {ListView, ListViewContext, ListViewItem} from '../src/ListView';
export {ListView, ListViewContext, ListViewItem, ListViewDragPreview} from '../src/ListView';
export {MenuItem, MenuTrigger, Menu, MenuSection, SubmenuTrigger, UnavailableMenuItemTrigger, MenuContext} from '../src/Menu';
export {Meter, MeterContext} from '../src/Meter';
export {NotificationBadge, NotificationBadgeContext} from '../src/NotificationBadge';
Expand All @@ -77,7 +77,7 @@ export {Skeleton, useIsSkeleton} from '../src/Skeleton';
export {SkeletonCollection} from '../src/SkeletonCollection';
export {StatusLight, StatusLightContext} from '../src/StatusLight';
export {Switch, SwitchContext} from '../src/Switch';
export {TableView, TableHeader, TableBody, Row, Cell, Column, TableContext, EditableCell} from '../src/TableView';
export {TableView, TableHeader, TableBody, Row, Cell, Column, TableContext, EditableCell, TableViewDragPreview} from '../src/TableView';
export {Tabs, TabList, Tab, TabPanel, TabsContext} from '../src/Tabs';
export {TagGroup, Tag, TagGroupContext} from '../src/TagGroup';
export {TextArea, TextField, TextAreaContext, TextFieldContext} from '../src/TextField';
Expand Down Expand Up @@ -144,7 +144,7 @@ export type {InlineAlertProps} from '../src/InlineAlert';
export type {ImageProps} from '../src/Image';
export type {ImageCoordinatorProps} from '../src/ImageCoordinator';
export type {LinkProps} from '../src/Link';
export type {ListViewProps, ListViewItemProps} from '../src/ListView';
export type {ListViewProps, ListViewItemProps, ListViewDragPreviewProps} from '../src/ListView';
export type {MenuTriggerProps, MenuProps, MenuItemProps, MenuSectionProps, SubmenuTriggerProps, UnavailableMenuItemTriggerProps} from '../src/Menu';
export type {MeterProps} from '../src/Meter';
export type {NotificationBadgeProps} from '../src/NotificationBadge';
Expand All @@ -164,7 +164,7 @@ export type {SkeletonProps} from '../src/Skeleton';
export type {SkeletonCollectionProps} from '../src/SkeletonCollection';
export type {StatusLightProps} from '../src/StatusLight';
export type {SwitchProps} from '../src/Switch';
export type {TableViewProps, TableHeaderProps, TableBodyProps, RowProps, CellProps, ColumnProps} from '../src/TableView';
export type {TableViewProps, TableHeaderProps, TableBodyProps, RowProps, CellProps, ColumnProps, TableDragPreviewProps} from '../src/TableView';
export type {TabsProps, TabProps, TabListProps, TabPanelProps} from '../src/Tabs';
export type {TagGroupProps, TagProps} from '../src/TagGroup';
export type {TextFieldProps, TextAreaProps, TextFieldRef} from '../src/TextField';
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/ar-AE.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "أقصى",
"slider.minimum": "أدنى",
"table.cancel": "إلغاء",
"table.drag": "سحب",
"table.editCell": "تعديل الخلية",
"table.loading": "جارٍ التحميل...",
"table.loadingMore": "جارٍ تحميل المزيد...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/bg-BG.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Максимум",
"slider.minimum": "Минимум",
"table.cancel": "Отказ",
"table.drag": "Плъзнете",
"table.editCell": "Редактиране на клетка",
"table.loading": "Зареждане...",
"table.loadingMore": "Зареждане на още...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/cs-CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Zrušit",
"table.drag": "Přetáhnout",
"table.editCell": "Upravit buňku",
"table.loading": "Načítání...",
"table.loadingMore": "Načítání dalších...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/da-DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimum",
"slider.minimum": "Minimum",
"table.cancel": "Annuller",
"table.drag": "Træk",
"table.editCell": "Rediger celle",
"table.loading": "Indlæser...",
"table.loadingMore": "Indlæser flere...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Abbrechen",
"table.drag": "Ziehen",
"table.editCell": "Zelle bearbeiten",
"table.loading": "Laden...",
"table.loadingMore": "Mehr laden ...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Μέγιστο",
"slider.minimum": "Ελάχιστο",
"table.cancel": "Ακύρωση",
"table.drag": "Μεταφορά",
"table.editCell": "Επεξεργασία κελιού",
"table.loading": "Φόρτωση...",
"table.loadingMore": "Φόρτωση περισσότερων...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Cancel",
"table.drag": "Drag",
"table.editCell": "Edit cell",
"table.loading": "Loading…",
"table.loadingMore": "Loading more…",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/es-ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Máximo",
"slider.minimum": "Mínimo",
"table.cancel": "Cancelar",
"table.drag": "Arrastrar",
"table.editCell": "Editar celda",
"table.loading": "Cargando…",
"table.loadingMore": "Cargando más…",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/et-EE.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimaalne",
"slider.minimum": "Minimaalne",
"table.cancel": "Tühista",
"table.drag": "Lohista",
"table.editCell": "Muuda lahtrit",
"table.loading": "Laadimine...",
"table.loadingMore": "Laadi rohkem...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/fi-FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimi",
"slider.minimum": "Minimi",
"table.cancel": "Peruuta",
"table.drag": "Vedä",
"table.editCell": "Muokkaa solua",
"table.loading": "Ladataan…",
"table.loadingMore": "Ladataan lisää…",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Annuler",
"table.drag": "Faire glisser",
"table.editCell": "Modifier la cellule",
"table.loading": "Chargement...",
"table.loadingMore": "Chargement supplémentaire...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/he-IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "מקסימום",
"slider.minimum": "מינימום",
"table.cancel": "ביטול",
"table.drag": "גרור",
"table.editCell": "עריכת תא",
"table.loading": "טוען...",
"table.loadingMore": "טוען עוד...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/hr-HR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Najviše",
"slider.minimum": "Najmanje",
"table.cancel": "Poništi",
"table.drag": "Povucite",
"table.editCell": "Uredi ćeliju",
"table.loading": "Učitavam...",
"table.loadingMore": "Učitavam još...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/hu-HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Mégse",
"table.drag": "Húzás",
"table.editCell": "Cella szerkesztése",
"table.loading": "Betöltés folyamatban…",
"table.loadingMore": "Továbbiak betöltése folyamatban…",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/it-IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Massimo",
"slider.minimum": "Minimo",
"table.cancel": "Annulla",
"table.drag": "Trascina",
"table.editCell": "Modifica cella",
"table.loading": "Caricamento...",
"table.loadingMore": "Caricamento altri...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "最大",
"slider.minimum": "最小",
"table.cancel": "キャンセル",
"table.drag": "ドラッグ",
"table.editCell": "セルを編集",
"table.loading": "読み込み中...",
"table.loadingMore": "さらに読み込み中...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "최대",
"slider.minimum": "최소",
"table.cancel": "취소",
"table.drag": "드래그",
"table.editCell": "셀 편집",
"table.loading": "로드 중…",
"table.loadingMore": "추가 로드 중…",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/lt-LT.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Daugiausia",
"slider.minimum": "Mažiausia",
"table.cancel": "Atšaukti",
"table.drag": "Vilkti",
"table.editCell": "Redaguoti langelį",
"table.loading": "Įkeliama...",
"table.loadingMore": "Įkeliama daugiau...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/lv-LV.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimālā vērtība",
"slider.minimum": "Minimālā vērtība",
"table.cancel": "Atcelt",
"table.drag": "Vilkšana",
"table.editCell": "Rediģēt šūnu",
"table.loading": "Notiek ielāde...",
"table.loadingMore": "Tiek ielādēts vēl...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/nb-NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimum",
"slider.minimum": "Minimum",
"table.cancel": "Avbryt",
"table.drag": "Dra",
"table.editCell": "Rediger celle",
"table.loading": "Laster inn...",
"table.loadingMore": "Laster inn flere...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/nl-NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Annuleren",
"table.drag": "Slepen",
"table.editCell": "Cel bewerken",
"table.loading": "Laden...",
"table.loadingMore": "Meer laden...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/pl-PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimum",
"slider.minimum": "Minimum",
"table.cancel": "Anuluj",
"table.drag": "Przeciągnij",
"table.editCell": "Edytuj komórkę",
"table.loading": "Wczytywanie...",
"table.loadingMore": "Wczytywanie większej liczby...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Máximo",
"slider.minimum": "Mínimo",
"table.cancel": "Cancelar",
"table.drag": "Arraste",
"table.editCell": "Editar célula",
"table.loading": "Carregando...",
"table.loadingMore": "Carregando mais...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Máximo",
"slider.minimum": "Mínimo",
"table.cancel": "Cancelar",
"table.drag": "Arrastar",
"table.editCell": "Editar célula",
"table.loading": "A carregar...",
"table.loadingMore": "A carregar mais...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/ro-RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Anulare",
"table.drag": "Trageți",
"table.editCell": "Editați celula",
"table.loading": "Se încarcă...",
"table.loadingMore": "Se încarcă mai multe...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/ru-RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Максимум",
"slider.minimum": "Минимум",
"table.cancel": "Отмена",
"table.drag": "Перетаскивание",
"table.editCell": "Редактировать ячейку",
"table.loading": "Загрузка...",
"table.loadingMore": "Дополнительная загрузка...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/sk-SK.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Zrušiť",
"table.drag": "Presunúť",
"table.editCell": "Upraviť bunku",
"table.loading": "Načítava sa...",
"table.loadingMore": "Načítava sa viac...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/sl-SI.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Največji",
"slider.minimum": "Najmanj",
"table.cancel": "Prekliči",
"table.drag": "Povleci",
"table.editCell": "Uredi celico",
"table.loading": "Nalaganje...",
"table.loadingMore": "Nalaganje več vsebine...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/sr-SP.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Najviše",
"slider.minimum": "Najmanje",
"table.cancel": "Otkaži",
"table.drag": "Prevuci",
"table.editCell": "Uredi ćeliju",
"table.loading": "Učitavam...",
"table.loadingMore": "Učitavam još...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/sv-SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maximum",
"slider.minimum": "Minimum",
"table.cancel": "Avbryt",
"table.drag": "Dra",
"table.editCell": "Redigera cell",
"table.loading": "Läser in...",
"table.loadingMore": "Läser in mer...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/tr-TR.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Maksimum",
"slider.minimum": "Minimum",
"table.cancel": "İptal et",
"table.drag": "Sürükle",
"table.editCell": "Hücreyi düzenle",
"table.loading": "Yükleniyor...",
"table.loadingMore": "Daha fazla yükleniyor...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/uk-UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "Максимум",
"slider.minimum": "Мінімум",
"table.cancel": "Скасувати",
"table.drag": "Перетягнути",
"table.editCell": "Редагувати клітинку",
"table.loading": "Завантаження…",
"table.loadingMore": "Завантаження інших об’єктів...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "最大",
"slider.minimum": "最小",
"table.cancel": "取消",
"table.drag": "拖动",
"table.editCell": "编辑单元格",
"table.loading": "正在加载...",
"table.loadingMore": "正在加载更多...",
Expand Down
1 change: 1 addition & 0 deletions packages/@react-spectrum/s2/intl/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"slider.maximum": "最大值",
"slider.minimum": "最小值",
"table.cancel": "取消",
"table.drag": "拖曳",
"table.editCell": "編輯儲存格",
"table.loading": "載入中…",
"table.loadingMore": "正在載入更多…",
Expand Down
Loading
Loading