@flipdish/ui-library 0.45.3 → 0.46.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/components/molecules/Pagination/components/PaginationBase.cjs +20 -6
- package/dist/components/molecules/Pagination/components/PaginationBase.cjs.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationBase.d.ts +7 -2
- package/dist/components/molecules/Pagination/components/PaginationBase.d.ts.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationBase.js +19 -6
- package/dist/components/molecules/Pagination/components/PaginationBase.js.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationDot.cjs +2 -2
- package/dist/components/molecules/Pagination/components/PaginationDot.cjs.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationDot.js +3 -3
- package/dist/components/molecules/Pagination/components/PaginationDot.js.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationLine.cjs +2 -2
- package/dist/components/molecules/Pagination/components/PaginationLine.cjs.map +1 -1
- package/dist/components/molecules/Pagination/components/PaginationLine.js +3 -3
- package/dist/components/molecules/Pagination/components/PaginationLine.js.map +1 -1
- package/dist/components/molecules/Pagination/index.cjs +48 -64
- package/dist/components/molecules/Pagination/index.cjs.map +1 -1
- package/dist/components/molecules/Pagination/index.d.ts +24 -71
- package/dist/components/molecules/Pagination/index.d.ts.map +1 -1
- package/dist/components/molecules/Pagination/index.js +52 -63
- package/dist/components/molecules/Pagination/index.js.map +1 -1
- package/dist/components/organisms/Table/index.cjs +5 -2
- package/dist/components/organisms/Table/index.cjs.map +1 -1
- package/dist/components/organisms/Table/index.d.ts +5 -1
- package/dist/components/organisms/Table/index.d.ts.map +1 -1
- package/dist/components/organisms/Table/index.js +5 -2
- package/dist/components/organisms/Table/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/molecules/Pagination/components/PaginationPages.cjs +0 -27
- package/dist/components/molecules/Pagination/components/PaginationPages.cjs.map +0 -1
- package/dist/components/molecules/Pagination/components/PaginationPages.d.ts +0 -18
- package/dist/components/molecules/Pagination/components/PaginationPages.d.ts.map +0 -1
- package/dist/components/molecules/Pagination/components/PaginationPages.js +0 -25
- package/dist/components/molecules/Pagination/components/PaginationPages.js.map +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import { cx } from '@flipdish/ui-library/utilities/cx';
|
|
3
|
-
import { joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
|
|
4
|
-
import { Pagination } from './PaginationBase.js';
|
|
5
|
-
|
|
6
|
-
const PaginationItem = ({ value, rounded, isCurrent }) => {
|
|
7
|
-
return (jsx(Pagination.Item, { value: value, isCurrent: isCurrent, className: ({ isSelected }) => cx('flex size-9 cursor-pointer items-center justify-center p-3 text-sm font-medium text-quaternary outline-focus-ring transition duration-100 ease-linear hover:bg-primary_hover hover:text-secondary focus-visible:z-10 focus-visible:bg-primary_hover focus-visible:outline-2 focus-visible:outline-offset-2', rounded ? 'rounded-full' : 'rounded-lg', isSelected && 'bg-primary_hover text-secondary'), children: value }));
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Shared `Pagination.Context` body used by the numbered-page pagination variants:
|
|
11
|
-
* the desktop row of page buttons/ellipses, plus the mobile "Page X of Y" line.
|
|
12
|
-
*/
|
|
13
|
-
const PaginationPages = ({ rounded, wideMobileLine, 'data-testid': dataTestId }) => {
|
|
14
|
-
return (jsx(Pagination.Context, { children: ({ pages, currentPage, total, testIdPrefix }) => {
|
|
15
|
-
const prefix = dataTestId ?? testIdPrefix;
|
|
16
|
-
return (jsxs(Fragment, { children: [jsx("div", { className: "hidden justify-center gap-0.5 md:flex", "data-testid": prefix ? joinTestId(prefix, 'pages') : undefined, children: pages.map((page, index) => page.type === 'page' ? (
|
|
17
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: This is a custom component and we need to use the index as the key
|
|
18
|
-
jsx(PaginationItem, { rounded: rounded, ...page }, index)) : (
|
|
19
|
-
// biome-ignore lint/suspicious/noArrayIndexKey: This is a custom component and we need to use the index as the key
|
|
20
|
-
jsx(Pagination.Ellipsis, { className: "flex size-9 shrink-0 items-center justify-center text-tertiary", children: "\u2026" }, index))) }), jsxs("div", { className: cx('flex', wideMobileLine && 'flex-1', 'justify-center text-sm whitespace-pre text-fg-secondary md:hidden'), "data-testid": prefix ? joinTestId(prefix, 'mobile-status') : undefined, children: ["Page ", jsx("span", { className: "font-medium", children: currentPage }), " of ", jsx("span", { className: "font-medium", children: total })] })] }));
|
|
21
|
-
} }));
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export { PaginationPages };
|
|
25
|
-
//# sourceMappingURL=PaginationPages.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationPages.js","sources":["../../../../../src/components/molecules/Pagination/components/PaginationPages.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;AAMA,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAA4D,KAAI;IACjH,QACEA,IAAC,UAAU,CAAC,IAAI,EAAA,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,KACxB,EAAE,CACA,4SAA4S,EAC5S,OAAO,GAAG,cAAc,GAAG,YAAY,EACvC,UAAU,IAAI,iCAAiC,CAChD,EAAA,QAAA,EAGF,KAAK,EAAA,CACU;AAEtB,CAAC;AAcD;;;AAGG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAwB,KAAI;AAC9G,IAAA,QACEA,GAAA,CAAC,UAAU,CAAC,OAAO,cAChB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,KAAI;AAC/C,YAAA,MAAM,MAAM,GAAG,UAAU,IAAI,YAAY;A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