@aleph-alpha/ui-library 7.1.0 → 7.2.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/system/components/UiPagination/UiPagination.vue.d.ts +19 -0
- package/dist/system/components/UiPagination/constants.d.ts +6 -0
- package/dist/system/components/UiPagination/index.d.ts +3 -0
- package/dist/system/components/UiPagination/types.d.ts +81 -0
- package/dist/system/components/core/pagination/Pagination.vue.d.ts +29 -0
- package/dist/system/components/core/pagination/PaginationContent.vue.d.ts +29 -0
- package/dist/system/components/core/pagination/PaginationEllipsis.vue.d.ts +22 -0
- package/dist/system/components/core/pagination/PaginationFirst.vue.d.ts +22 -0
- package/dist/system/components/core/pagination/PaginationItem.vue.d.ts +26 -0
- package/dist/system/components/core/pagination/PaginationLast.vue.d.ts +22 -0
- package/dist/system/components/core/pagination/PaginationNext.vue.d.ts +22 -0
- package/dist/system/components/core/pagination/PaginationPrevious.vue.d.ts +22 -0
- package/dist/system/components/core/pagination/index.d.ts +8 -0
- package/dist/system/components/index.d.ts +1 -0
- package/dist/system/icons/story-sidebar-icons.json +4 -0
- package/dist/system/lib.js +11605 -10906
- package/dist/system/patterns/UiBulkAction/UiBulkAction.vue.d.ts +43 -0
- package/dist/system/patterns/UiBulkAction/index.d.ts +3 -0
- package/dist/system/patterns/UiBulkAction/types.d.ts +109 -0
- package/dist/system/patterns/UiBulkAction/useBulkAction.d.ts +7 -0
- package/dist/system/patterns/UiDataTable/constants.d.ts +10 -0
- package/dist/system/patterns/index.d.ts +1 -0
- package/dist/system/story-sidebar-icons.json +4 -0
- package/package.json +1 -1
- package/src/components/UiPagination/UiPagination.guidance.md +60 -0
- package/src/components/UiPagination/UiPagination.stories.ts +1070 -0
- package/src/components/UiPagination/UiPagination.vue +109 -0
- package/src/components/UiPagination/__tests__/UiPagination.test.ts +203 -0
- package/src/components/UiPagination/constants.ts +17 -0
- package/src/components/UiPagination/index.ts +3 -0
- package/src/components/UiPagination/types.ts +82 -0
- package/src/components/core/pagination/Pagination.vue +26 -0
- package/src/components/core/pagination/PaginationContent.vue +24 -0
- package/src/components/core/pagination/PaginationEllipsis.vue +30 -0
- package/src/components/core/pagination/PaginationFirst.vue +30 -0
- package/src/components/core/pagination/PaginationItem.vue +39 -0
- package/src/components/core/pagination/PaginationLast.vue +30 -0
- package/src/components/core/pagination/PaginationNext.vue +35 -0
- package/src/components/core/pagination/PaginationPrevious.vue +35 -0
- package/src/components/core/pagination/index.ts +8 -0
- package/src/components/index.ts +1 -0
- package/src/patterns/UiBulkAction/UiBulkAction.guidance.md +59 -0
- package/src/patterns/UiBulkAction/UiBulkAction.stories.ts +2238 -0
- package/src/patterns/UiBulkAction/UiBulkAction.vue +62 -0
- package/src/patterns/UiBulkAction/__tests__/useBulkAction.test.ts +78 -0
- package/src/patterns/UiBulkAction/index.ts +3 -0
- package/src/patterns/UiBulkAction/types.ts +126 -0
- package/src/patterns/UiBulkAction/useBulkAction.ts +50 -0
- package/src/patterns/UiDataTable/UiDataTable.stories.ts +375 -1
- package/src/patterns/UiDataTable/UiDataTablePagination.vue +43 -60
- package/src/patterns/UiDataTable/__tests__/UiDataTablePagination.test.ts +58 -29
- package/src/patterns/UiDataTable/constants.ts +10 -0
- package/src/patterns/index.ts +1 -0
package/src/components/index.ts
CHANGED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
## Usage
|
|
2
|
+
|
|
3
|
+
Bulk actions let the user apply one action to many rows at once — export, assign, change a status, delete. They are not a component of their own: the Floating Action carries them, placed above the Data Table.
|
|
4
|
+
|
|
5
|
+
Each product decides which actions it offers. This page describes how they behave, not which ones they are.
|
|
6
|
+
|
|
7
|
+
### Selection comes first
|
|
8
|
+
|
|
9
|
+
The Floating Action follows the selection:
|
|
10
|
+
|
|
11
|
+
- With nothing selected, it shows the checkbox and table-wide actions only
|
|
12
|
+
- Once rows are selected, it shows the count and the bulk actions
|
|
13
|
+
- The header checkbox selects the current page; “Select all results” is a separate step
|
|
14
|
+
- Clearing the selection returns it to its default state
|
|
15
|
+
|
|
16
|
+
### One band, in a fixed order
|
|
17
|
+
|
|
18
|
+
The Floating Action keeps the same order in every product:
|
|
19
|
+
|
|
20
|
+
1. Selection checkbox, with the count of selected rows
|
|
21
|
+
2. Primary actions, as labelled buttons
|
|
22
|
+
3. Further actions, collected in an overflow menu
|
|
23
|
+
4. Destructive actions last, set apart by a separator
|
|
24
|
+
|
|
25
|
+
### What each product decides
|
|
26
|
+
|
|
27
|
+
The behaviour is shared; the content is not. Each product sets:
|
|
28
|
+
|
|
29
|
+
- Which actions are offered, and how many show before the overflow
|
|
30
|
+
- Whether an action asks for confirmation or can be undone
|
|
31
|
+
- The Floating Action type — Label, Icon or Input — per breakpoint
|
|
32
|
+
- Whether the selection survives a change of scope tab
|
|
33
|
+
|
|
34
|
+
## Do
|
|
35
|
+
|
|
36
|
+
- Show how many rows are selected, in the Floating Action itself
|
|
37
|
+
- Keep the same order of actions in every product
|
|
38
|
+
- Label actions with a verb — Export, Assign, Delete
|
|
39
|
+
- Disable an action that does not apply to the selection, and say why
|
|
40
|
+
- Keep the selection while the user filters, and say when selected rows are hidden
|
|
41
|
+
- Report the result — how many rows succeeded, and which failed
|
|
42
|
+
|
|
43
|
+
## Don't
|
|
44
|
+
|
|
45
|
+
- Build a separate bulk-action bar next to the Floating Action
|
|
46
|
+
- Show bulk actions before anything is selected
|
|
47
|
+
- Name the same action differently on the row and in the Floating Action
|
|
48
|
+
- Run a destructive bulk action without confirmation or undo
|
|
49
|
+
- Clear the selection silently when the user filters or pages
|
|
50
|
+
- Use icons alone where there is room for labels
|
|
51
|
+
|
|
52
|
+
## Accessibility
|
|
53
|
+
|
|
54
|
+
- The selected count is announced when it changes (role="status")
|
|
55
|
+
- Every action in the Floating Action is reachable by keyboard, in visual order
|
|
56
|
+
- Icon-only actions carry an accessible name and a tooltip
|
|
57
|
+
- Disabled actions stay focusable and explain why they are unavailable
|
|
58
|
+
- The header checkbox reports a mixed state when only some rows are selected
|
|
59
|
+
- The result of a bulk action is announced, not only shown
|