@dt-dds/react-pagination 1.0.0-beta.23 → 1.0.0-beta.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @dt-ui/react-pagination
2
2
 
3
+ ## 1.0.0-beta.25
4
+
5
+ ### Patch Changes
6
+
7
+ - chore(dependencies): upgrade builders versions
8
+ - Updated dependencies
9
+ - @dt-dds/react-core@1.0.0-beta.45
10
+ - @dt-dds/react-icon@1.0.0-beta.46
11
+ - @dt-dds/react-typography@1.0.0-beta.36
12
+ - @dt-dds/themes@1.0.0-beta.5
13
+
14
+ ## 1.0.0-beta.24
15
+
16
+ ### Patch Changes
17
+
18
+ - refactor(themes): consolidate theme structure
19
+ - Updated dependencies
20
+ - @dt-dds/react-core@1.0.0-beta.44
21
+ - @dt-dds/react-icon@1.0.0-beta.45
22
+ - @dt-dds/react-typography@1.0.0-beta.35
23
+ - @dt-dds/themes@1.0.0-beta.4
24
+
3
25
  ## 1.0.0-beta.23
4
26
 
5
27
  ### Minor Changes
@@ -0,0 +1,39 @@
1
+ import { CustomTheme } from '@dt-dds/themes';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { BaseProps } from '@dt-dds/react-core';
4
+ import React$1 from 'react';
5
+
6
+ interface ContentProps {
7
+ totalPages: number;
8
+ onClick: () => void;
9
+ }
10
+ interface ArrowProps {
11
+ onClick: () => void;
12
+ disabled?: boolean;
13
+ }
14
+ interface PaginationInputProps {
15
+ totalPages: number;
16
+ onChange: (value: number) => void;
17
+ onHandleKeyDown: (event: React$1.KeyboardEvent<HTMLInputElement>) => void;
18
+ value?: number;
19
+ }
20
+ declare const Pagination: {
21
+ ({ children, dataTestId }: BaseProps): react_jsx_runtime.JSX.Element;
22
+ Content({ totalPages, onClick }: ContentProps): react_jsx_runtime.JSX.Element;
23
+ NextItem({ onClick, disabled }: ArrowProps): react_jsx_runtime.JSX.Element;
24
+ PreviousItem({ onClick, disabled }: ArrowProps): react_jsx_runtime.JSX.Element;
25
+ };
26
+ declare const PaginationInput: ({ totalPages, onHandleKeyDown, value, onChange, }: PaginationInputProps) => react_jsx_runtime.JSX.Element;
27
+
28
+ declare const usePagination: () => {
29
+ currentPage: number;
30
+ handleChange: (value: number) => void;
31
+ handleUserInput: (e: React.KeyboardEvent<HTMLInputElement>) => void;
32
+ };
33
+
34
+ declare module '@emotion/react' {
35
+ interface Theme extends CustomTheme {
36
+ }
37
+ }
38
+
39
+ export { type ArrowProps, type ContentProps, Pagination, PaginationInput, type PaginationInputProps, usePagination };
package/dist/index.d.ts CHANGED
@@ -36,4 +36,4 @@ declare module '@emotion/react' {
36
36
  }
37
37
  }
38
38
 
39
- export { ArrowProps, ContentProps, Pagination, PaginationInput, PaginationInputProps, usePagination };
39
+ export { type ArrowProps, type ContentProps, Pagination, PaginationInput, type PaginationInputProps, usePagination };
package/dist/index.js CHANGED
@@ -28,13 +28,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // index.ts
31
- var pagination_exports = {};
32
- __export(pagination_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  Pagination: () => Pagination,
34
34
  PaginationInput: () => PaginationInput,
35
35
  usePagination: () => usePagination
36
36
  });
37
- module.exports = __toCommonJS(pagination_exports);
37
+ module.exports = __toCommonJS(index_exports);
38
38
 
39
39
  // src/Pagination.tsx
40
40
  var import_react_core = require("@dt-dds/react-core");
@@ -70,7 +70,7 @@ var ArrowStyled = import_styled.default.button`
70
70
  `;
71
71
  var InputStyled = import_styled.default.input`
72
72
  ${({ theme, hasError }) => `
73
- ${theme.fontStyles.pXSmall};
73
+ ${theme.fontStyles.bodyMdRegularXSmall};
74
74
  text-align: center;
75
75
  padding: 6px 8px;
76
76
  margin: 0px;
@@ -93,7 +93,7 @@ var Pagination = ({ children, dataTestId }) => {
93
93
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PaginationStyled, { "data-testid": dataTestId != null ? dataTestId : "pagination-wrapper", children });
94
94
  };
95
95
  Pagination.Content = ({ totalPages, onClick }) => {
96
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_typography.Typography, { fontStyles: "pXSmall", children: [
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_typography.Typography, { fontStyles: "bodyXsRegular", children: [
97
97
  "of",
98
98
  " ",
99
99
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
package/dist/index.mjs CHANGED
@@ -32,7 +32,7 @@ var ArrowStyled = styled.button`
32
32
  `;
33
33
  var InputStyled = styled.input`
34
34
  ${({ theme, hasError }) => `
35
- ${theme.fontStyles.pXSmall};
35
+ ${theme.fontStyles.bodyMdRegularXSmall};
36
36
  text-align: center;
37
37
  padding: 6px 8px;
38
38
  margin: 0px;
@@ -55,7 +55,7 @@ var Pagination = ({ children, dataTestId }) => {
55
55
  return /* @__PURE__ */ jsx(PaginationStyled, { "data-testid": dataTestId != null ? dataTestId : "pagination-wrapper", children });
56
56
  };
57
57
  Pagination.Content = ({ totalPages, onClick }) => {
58
- return /* @__PURE__ */ jsxs(Typography, { fontStyles: "pXSmall", children: [
58
+ return /* @__PURE__ */ jsxs(Typography, { fontStyles: "bodyXsRegular", children: [
59
59
  "of",
60
60
  " ",
61
61
  /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-dds/react-pagination",
3
- "version": "1.0.0-beta.23",
3
+ "version": "1.0.0-beta.25",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -20,10 +20,10 @@
20
20
  "test:update:snapshot": "jest -u"
21
21
  },
22
22
  "dependencies": {
23
- "@dt-dds/react-core": "1.0.0-beta.43",
24
- "@dt-dds/react-typography": "1.0.0-beta.34",
25
- "@dt-dds/react-icon": "1.0.0-beta.44",
26
- "@dt-dds/themes": "1.0.0-beta.3"
23
+ "@dt-dds/react-core": "1.0.0-beta.45",
24
+ "@dt-dds/react-typography": "1.0.0-beta.36",
25
+ "@dt-dds/react-icon": "1.0.0-beta.46",
26
+ "@dt-dds/themes": "1.0.0-beta.5"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.22.9",
@@ -44,7 +44,7 @@
44
44
  "react": "^18.1.0",
45
45
  "react-dom": "^18.2.0",
46
46
  "tsconfig": "*",
47
- "tsup": "^6.6.3",
47
+ "tsup": "^8.5.0",
48
48
  "typescript": "^4.5.3"
49
49
  },
50
50
  "peerDependencies": {