diff --git a/packages/ods/react/tests/_app/src/components.ts b/packages/ods/react/tests/_app/src/components.ts index 58422aaf60..1d0902f4bd 100644 --- a/packages/ods/react/tests/_app/src/components.ts +++ b/packages/ods/react/tests/_app/src/components.ts @@ -44,6 +44,7 @@ const componentNames = [ 'datepicker', 'timepicker', 'range', + 'pagination', //--generator-anchor-- ]; diff --git a/packages/ods/src/components/index.ts b/packages/ods/src/components/index.ts index 3b2cd84286..1d04ee87ab 100644 --- a/packages/ods/src/components/index.ts +++ b/packages/ods/src/components/index.ts @@ -43,3 +43,4 @@ export * from './phone-number/src'; export * from './datepicker/src'; export * from './timepicker/src'; export * from './range/src'; +export * from './pagination/src'; \ No newline at end of file diff --git a/packages/ods/src/components/pagination/src/components/ods-pagination/ods-pagination.tsx b/packages/ods/src/components/pagination/src/components/ods-pagination/ods-pagination.tsx index d8343d7470..d25bd8bad6 100644 --- a/packages/ods/src/components/pagination/src/components/ods-pagination/ods-pagination.tsx +++ b/packages/ods/src/components/pagination/src/components/ods-pagination/ods-pagination.tsx @@ -1,4 +1,4 @@ -import type { OdsSelectEventChangeDetail } from '../../components'; +import type { OdsSelectEventChangeDetail } from '../../../../select/src'; import type { OdsPaginationChangedEventDetail, OdsPaginationItemPerPageChangedEventDetail } from '../../interfaces/events'; import type { OdsPaginationPageList } from '../../interfaces/pagination-page-list'; import type { EventEmitter, Fragment, FunctionalComponent } from '@stencil/core'; diff --git a/packages/ods/src/components/pagination/src/index.ts b/packages/ods/src/components/pagination/src/index.ts index 204bcc4a7d..0fcf69c700 100644 --- a/packages/ods/src/components/pagination/src/index.ts +++ b/packages/ods/src/components/pagination/src/index.ts @@ -1,2 +1,3 @@ export { OdsPagination } from './components/ods-pagination/ods-pagination'; -export { ODS_PAGINATION_PER_PAGE, ODS_PAGINATION_PER_PAGE_OPTIONS } from './constants/pagination-per-page'; \ No newline at end of file +export { ODS_PAGINATION_PER_PAGE, ODS_PAGINATION_PER_PAGE_OPTIONS } from './constants/pagination-per-page'; +export { OdsPaginationCurrentChangeEvent, OdsPaginationChangedEventDetail, OdsPaginationEvent, OdsPaginationItemPerPageChangedEvent, OdsPaginationItemPerPageChangedEventDetail } from './interfaces/events'; diff --git a/packages/ods/vue/tests/_app/src/components.ts b/packages/ods/vue/tests/_app/src/components.ts index 58422aaf60..1d0902f4bd 100644 --- a/packages/ods/vue/tests/_app/src/components.ts +++ b/packages/ods/vue/tests/_app/src/components.ts @@ -44,6 +44,7 @@ const componentNames = [ 'datepicker', 'timepicker', 'range', + 'pagination', //--generator-anchor-- ]; diff --git a/packages/storybook/stories/components/pagination/pagination.stories.ts b/packages/storybook/stories/components/pagination/pagination.stories.ts index 454af65555..90012f497f 100644 --- a/packages/storybook/stories/components/pagination/pagination.stories.ts +++ b/packages/storybook/stories/components/pagination/pagination.stories.ts @@ -2,6 +2,7 @@ import type { Meta, StoryObj } from '@storybook/web-components'; import { defineCustomElement } from '@ovhcloud/ods-components/dist/components/ods-pagination'; import { html } from 'lit-html'; import { CONTROL_CATEGORY, orderControls } from '../../control'; +import { ODS_PAGINATION_PER_PAGE, ODS_PAGINATION_PER_PAGE_OPTIONS } from '@ovhcloud/ods-components'; defineCustomElement(); @@ -51,11 +52,11 @@ const totalItemsParam = { defaultItemsPerPage: { table: { category: CONTROL_CATEGORY.general, - defaultValue: { summary: 10 }, + defaultValue: { summary: ODS_PAGINATION_PER_PAGE.min }, type: { summary: 'number' }, }, control: 'select', - options: [10, 25, 50, 100, 300], + options: ODS_PAGINATION_PER_PAGE_OPTIONS, }, totalItems: { table: { @@ -137,7 +138,7 @@ export const TotalItems: StoryObj = { }), args: { defaultCurrentPage: 4, - defaultItemsPerPage: 10, + defaultItemsPerPage: ODS_PAGINATION_PER_PAGE.min, isDisabled: false, labelTooltipPrevious: 'Previous label', labelTooltipNext: 'Next label',