@aleph-alpha/ui-library 7.1.0 → 7.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/system/components/UiPagination/UiPagination.vue.d.ts +19 -0
  2. package/dist/system/components/UiPagination/constants.d.ts +6 -0
  3. package/dist/system/components/UiPagination/index.d.ts +3 -0
  4. package/dist/system/components/UiPagination/types.d.ts +81 -0
  5. package/dist/system/components/core/pagination/Pagination.vue.d.ts +29 -0
  6. package/dist/system/components/core/pagination/PaginationContent.vue.d.ts +29 -0
  7. package/dist/system/components/core/pagination/PaginationEllipsis.vue.d.ts +22 -0
  8. package/dist/system/components/core/pagination/PaginationFirst.vue.d.ts +22 -0
  9. package/dist/system/components/core/pagination/PaginationItem.vue.d.ts +26 -0
  10. package/dist/system/components/core/pagination/PaginationLast.vue.d.ts +22 -0
  11. package/dist/system/components/core/pagination/PaginationNext.vue.d.ts +22 -0
  12. package/dist/system/components/core/pagination/PaginationPrevious.vue.d.ts +22 -0
  13. package/dist/system/components/core/pagination/index.d.ts +8 -0
  14. package/dist/system/components/index.d.ts +1 -0
  15. package/dist/system/icons/story-sidebar-icons.json +4 -0
  16. package/dist/system/lib.js +11605 -10906
  17. package/dist/system/patterns/UiBulkAction/UiBulkAction.vue.d.ts +43 -0
  18. package/dist/system/patterns/UiBulkAction/index.d.ts +3 -0
  19. package/dist/system/patterns/UiBulkAction/types.d.ts +109 -0
  20. package/dist/system/patterns/UiBulkAction/useBulkAction.d.ts +7 -0
  21. package/dist/system/patterns/UiDataTable/constants.d.ts +10 -0
  22. package/dist/system/patterns/index.d.ts +1 -0
  23. package/dist/system/story-sidebar-icons.json +4 -0
  24. package/package.json +10 -5
  25. package/src/components/UiPagination/UiPagination.guidance.md +60 -0
  26. package/src/components/UiPagination/UiPagination.stories.ts +1070 -0
  27. package/src/components/UiPagination/UiPagination.vue +109 -0
  28. package/src/components/UiPagination/__tests__/UiPagination.test.ts +203 -0
  29. package/src/components/UiPagination/constants.ts +17 -0
  30. package/src/components/UiPagination/index.ts +3 -0
  31. package/src/components/UiPagination/types.ts +82 -0
  32. package/src/components/core/pagination/Pagination.vue +26 -0
  33. package/src/components/core/pagination/PaginationContent.vue +24 -0
  34. package/src/components/core/pagination/PaginationEllipsis.vue +30 -0
  35. package/src/components/core/pagination/PaginationFirst.vue +30 -0
  36. package/src/components/core/pagination/PaginationItem.vue +39 -0
  37. package/src/components/core/pagination/PaginationLast.vue +30 -0
  38. package/src/components/core/pagination/PaginationNext.vue +35 -0
  39. package/src/components/core/pagination/PaginationPrevious.vue +35 -0
  40. package/src/components/core/pagination/index.ts +8 -0
  41. package/src/components/index.ts +1 -0
  42. package/src/patterns/UiBulkAction/UiBulkAction.guidance.md +59 -0
  43. package/src/patterns/UiBulkAction/UiBulkAction.stories.ts +2238 -0
  44. package/src/patterns/UiBulkAction/UiBulkAction.vue +62 -0
  45. package/src/patterns/UiBulkAction/__tests__/useBulkAction.test.ts +78 -0
  46. package/src/patterns/UiBulkAction/index.ts +3 -0
  47. package/src/patterns/UiBulkAction/types.ts +126 -0
  48. package/src/patterns/UiBulkAction/useBulkAction.ts +50 -0
  49. package/src/patterns/UiDataTable/UiDataTable.stories.ts +375 -1
  50. package/src/patterns/UiDataTable/UiDataTablePagination.vue +43 -60
  51. package/src/patterns/UiDataTable/__tests__/UiDataTablePagination.test.ts +58 -29
  52. package/src/patterns/UiDataTable/constants.ts +10 -0
  53. package/src/patterns/index.ts +1 -0
@@ -0,0 +1,19 @@
1
+ import { UiPaginationProps } from './types';
2
+ type __VLS_Props = UiPaginationProps;
3
+ type __VLS_PublicProps = {
4
+ 'page'?: number;
5
+ } & __VLS_Props;
6
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:page": (value: number) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
9
+ "onUpdate:page"?: ((value: number) => any) | undefined;
10
+ }>, {
11
+ disabled: boolean;
12
+ defaultPage: number;
13
+ itemsPerPage: number;
14
+ siblingCount: number;
15
+ showEdges: boolean;
16
+ showFirstLast: boolean;
17
+ labels: Partial<import('./types').UiPaginationLabels>;
18
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
19
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { UiPaginationLabels } from './types';
2
+ /**
3
+ * Default labels for UiPagination.
4
+ * Override any of them through the `labels` prop, e.g. for translations.
5
+ */
6
+ export declare const UI_PAGINATION_LABELS: UiPaginationLabels;
@@ -0,0 +1,3 @@
1
+ export { default as UiPagination } from './UiPagination.vue';
2
+ export { UI_PAGINATION_LABELS } from './constants';
3
+ export type * from './types';
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Text used for the visible and screen-reader labels.
3
+ */
4
+ export interface UiPaginationLabels {
5
+ /** Accessible name of the `nav` landmark. */
6
+ navigation: string;
7
+ /** Visible text of the previous button (shown from the `sm` breakpoint up). */
8
+ previous: string;
9
+ /** Visible text of the next button (shown from the `sm` breakpoint up). */
10
+ next: string;
11
+ /** Accessible name of the previous button. Should contain `previous`. */
12
+ previousPage: string;
13
+ /** Accessible name of the next button. Should contain `next`. */
14
+ nextPage: string;
15
+ /** Accessible name of the first-page button. */
16
+ firstPage: string;
17
+ /** Accessible name of the last-page button. */
18
+ lastPage: string;
19
+ /** Screen-reader text for the ellipsis that stands in for skipped pages. */
20
+ morePages: string;
21
+ /** Accessible name of a page button. */
22
+ page: (page: number) => string;
23
+ }
24
+ /**
25
+ * Lets users move through content split across multiple pages, such as
26
+ * search results, lists, or tables. Renders a labelled `nav` landmark with
27
+ * previous/next controls, page numbers, and ellipses for skipped ranges.
28
+ * @category Navigation
29
+ * @useCases paginated list, search results, table paging, page navigation, browse records
30
+ * @keywords pagination, pager, pages, next, previous, page numbers, paging
31
+ * @related UiDataTable, UiButton, UiBreadcrumb
32
+ */
33
+ export interface UiPaginationProps {
34
+ /**
35
+ * The controlled current page (1-based).
36
+ * - Omit for uncontrolled mode
37
+ * - Use `v-model:page` for controlled mode
38
+ */
39
+ page?: number;
40
+ /**
41
+ * The page selected on first render when uncontrolled.
42
+ * @default 1
43
+ */
44
+ defaultPage?: number;
45
+ /**
46
+ * Total number of items across all pages. The page count is derived from
47
+ * `total` and `itemsPerPage`.
48
+ */
49
+ total: number;
50
+ /**
51
+ * Number of items shown per page.
52
+ * @default 10
53
+ */
54
+ itemsPerPage?: number;
55
+ /**
56
+ * Number of page buttons shown on each side of the current page.
57
+ * @default 1
58
+ */
59
+ siblingCount?: number;
60
+ /**
61
+ * Always show the first and last page numbers, collapsing the gaps with an
62
+ * ellipsis.
63
+ * @default true
64
+ */
65
+ showEdges?: boolean;
66
+ /**
67
+ * Show icon-only buttons that jump to the first and last page.
68
+ * @default false
69
+ */
70
+ showFirstLast?: boolean;
71
+ /**
72
+ * Disables every control.
73
+ * @default false
74
+ */
75
+ disabled?: boolean;
76
+ /**
77
+ * Overrides for the visible and screen-reader labels. Unset keys fall back
78
+ * to the English defaults.
79
+ */
80
+ labels?: Partial<UiPaginationLabels>;
81
+ }
@@ -0,0 +1,29 @@
1
+ import { PaginationRootProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationRootProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {
10
+ page: number;
11
+ pageCount: number;
12
+ }): any;
13
+ };
14
+ refs: {};
15
+ rootEl: any;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ "update:page": (value: number) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
21
+ "onUpdate:page"?: ((value: number) => any) | undefined;
22
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ export default _default;
25
+ type __VLS_WithTemplateSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,29 @@
1
+ import { PaginationListProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationListProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {
10
+ items: ({
11
+ type: "ellipsis";
12
+ } | {
13
+ type: "page";
14
+ value: number;
15
+ })[];
16
+ }): any;
17
+ };
18
+ refs: {};
19
+ rootEl: any;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
+ export default _default;
25
+ type __VLS_WithTemplateSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,22 @@
1
+ import { PaginationEllipsisProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationEllipsisProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,22 @@
1
+ import { PaginationFirstProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationFirstProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,26 @@
1
+ import { PaginationListItemProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationListItemProps & {
4
+ isActive?: boolean;
5
+ class?: HTMLAttributes['class'];
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ };
12
+ refs: {};
13
+ rootEl: any;
14
+ };
15
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ class: HTMLAttributes["class"];
18
+ isActive: boolean;
19
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
20
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
21
+ export default _default;
22
+ type __VLS_WithTemplateSlots<T, S> = T & {
23
+ new (): {
24
+ $slots: S;
25
+ };
26
+ };
@@ -0,0 +1,22 @@
1
+ import { PaginationLastProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationLastProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,22 @@
1
+ import { PaginationNextProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationNextProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,22 @@
1
+ import { PaginationPrevProps } from 'reka-ui';
2
+ import { HTMLAttributes } from 'vue';
3
+ type __VLS_Props = PaginationPrevProps & {
4
+ class?: HTMLAttributes['class'];
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ default?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: any;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,8 @@
1
+ export { default as Pagination } from './Pagination.vue';
2
+ export { default as PaginationContent } from './PaginationContent.vue';
3
+ export { default as PaginationEllipsis } from './PaginationEllipsis.vue';
4
+ export { default as PaginationFirst } from './PaginationFirst.vue';
5
+ export { default as PaginationItem } from './PaginationItem.vue';
6
+ export { default as PaginationLast } from './PaginationLast.vue';
7
+ export { default as PaginationNext } from './PaginationNext.vue';
8
+ export { default as PaginationPrevious } from './PaginationPrevious.vue';
@@ -33,6 +33,7 @@ export * from './UiKbd';
33
33
  export * from './UiLabel';
34
34
  export * from './UiListbox';
35
35
  export * from './UiNavigationMenu';
36
+ export * from './UiPagination';
36
37
  export * from './UiPopover';
37
38
  export * from './UiProgress';
38
39
  export * from './UiRadioGroup';
@@ -49,6 +49,8 @@
49
49
  "components-uilistbox--accessibility": "accessibility",
50
50
  "components-uinavigationmenu--design-notes": "palette",
51
51
  "components-uinavigationmenu--accessibility": "accessibility",
52
+ "components-uipagination--design-notes": "palette",
53
+ "components-uipagination--accessibility": "accessibility",
52
54
  "components-uipopover--design-notes": "palette",
53
55
  "components-uipopover--accessibility": "accessibility",
54
56
  "components-uiprogress--design-notes": "palette",
@@ -90,6 +92,8 @@
90
92
  "components-uitogglegroup--accessibility": "accessibility",
91
93
  "components-uitooltip--design-notes": "palette",
92
94
  "components-uitooltip--accessibility": "accessibility",
95
+ "patterns-uibulkaction--design-notes": "palette",
96
+ "patterns-uibulkaction--accessibility": "accessibility",
93
97
  "patterns-uidatatable--design-notes": "palette",
94
98
  "patterns-uidatatable--accessibility": "accessibility",
95
99
  "patterns-uidatepicker--design-notes": "palette",