@vnejs/uis.react.page-selector 0.1.7 → 0.1.9
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/PageSelector.d.ts.map +1 -1
- package/dist/PageSelector.js +2 -1
- package/dist/PageSelector.js.map +1 -1
- package/dist/PageSelector.types.d.ts +5 -4
- package/dist/PageSelector.types.d.ts.map +1 -1
- package/package.json +6 -5
- package/src/PageSelector.stories.tsx +2 -2
- package/src/PageSelector.tsx +5 -2
- package/src/PageSelector.types.tsx +6 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageSelector.d.ts","sourceRoot":"","sources":["../src/PageSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PageSelector.d.ts","sourceRoot":"","sources":["../src/PageSelector.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AA0BjE,eAAO,MAAM,YAAY,GAAI,gGAU1B,iBAAiB,4CAqCnB,CAAC"}
|
package/dist/PageSelector.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
|
+
import { Text } from "@vnejs/uis.react.text";
|
|
4
|
+
import { Flex } from "@vnejs/uis.react.flex";
|
|
3
5
|
import { getVneLength } from "@vnejs/uis.utils";
|
|
4
|
-
import { Text, Flex } from "@vnejs/uis.react";
|
|
5
6
|
const LINE_ARGS = { x1: "3", y1: "24", x2: "60", y2: "60" };
|
|
6
7
|
const LINE_ARGS_1 = { ...LINE_ARGS, y1: "24" };
|
|
7
8
|
const LINE_ARGS_2 = { ...LINE_ARGS, y1: "96" };
|
package/dist/PageSelector.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageSelector.js","sourceRoot":"","sources":["../src/PageSelector.tsx"],"names":[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,cAAc,IAAI,UAAU,IAAI,UAAU,EAAE,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC;IAExH,OAAO,CACL,MAAC,IAAI,IACH,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACxB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,EAC5B,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAC7B,GAAG,EAAE,GAAG,aAEP,WAAW,CAAC,cAAc,EAAE,GAAG,EAAE,EAAE,EAAE,iBAAiB,CAAC,EACxD,KAAC,IAAI,IACH,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,GAAG,IAAI,MAAM,UAAU,EAAE,EAC/B,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,GACzB,EACD,WAAW,CAAC,eAAe,EAAE,CAAC,EAAE,EAAE,EAAE,iBAAiB,CAAC,IAClD,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import type { CssInsertValueLength, CssInsertValueNumber } from "@vnejs/uis.utils";
|
|
1
2
|
export type PageSelectorProps = {
|
|
2
3
|
page: number;
|
|
3
4
|
pagesCount: number;
|
|
4
5
|
pagesMinCount: number;
|
|
5
|
-
gap?:
|
|
6
|
-
size?:
|
|
7
|
-
transition?:
|
|
8
|
-
itemWidth?:
|
|
6
|
+
gap?: CssInsertValueLength;
|
|
7
|
+
size?: CssInsertValueLength;
|
|
8
|
+
transition?: CssInsertValueNumber;
|
|
9
|
+
itemWidth?: CssInsertValueLength;
|
|
9
10
|
onNextPage?: () => void;
|
|
10
11
|
onPrevPage?: () => void;
|
|
11
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageSelector.types.d.ts","sourceRoot":"","sources":["../src/PageSelector.types.tsx"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"PageSelector.types.d.ts","sourceRoot":"","sources":["../src/PageSelector.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAC3B,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/uis.react.page-selector",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@vnejs/uis.utils": "~0.1.0"
|
|
17
17
|
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@vnejs/uis.react": "~0.1.0"
|
|
20
|
-
},
|
|
21
18
|
"files": [
|
|
22
19
|
"dist",
|
|
23
20
|
"src",
|
|
24
21
|
"tsconfig.json"
|
|
25
|
-
]
|
|
22
|
+
],
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@vnejs/uis.react.flex": "~0.1.0",
|
|
25
|
+
"@vnejs/uis.react.text": "~0.1.0"
|
|
26
|
+
}
|
|
26
27
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { renderWithVneWrap, VneWrap } from "@vnejs/uis.react";
|
|
3
|
+
import { renderWithVneWrap, VneWrap } from "@vnejs/uis.react.vne-wrap";
|
|
4
4
|
|
|
5
|
-
import { PageSelector } from "
|
|
5
|
+
import { PageSelector } from "./PageSelector.js";
|
|
6
6
|
|
|
7
7
|
export const Common = {
|
|
8
8
|
args: {
|
package/src/PageSelector.tsx
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react";
|
|
2
|
+
|
|
2
3
|
import type { CSSProperties } from "react";
|
|
3
4
|
|
|
4
|
-
import {
|
|
5
|
+
import { Text } from "@vnejs/uis.react.text";
|
|
5
6
|
|
|
6
|
-
import {
|
|
7
|
+
import { Flex } from "@vnejs/uis.react.flex";
|
|
8
|
+
|
|
9
|
+
import { getVneLength } from "@vnejs/uis.utils";
|
|
7
10
|
|
|
8
11
|
import { type PageSelectorProps } from "./PageSelector.types.js";
|
|
9
12
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import type { CssInsertValueLength, CssInsertValueNumber } from "@vnejs/uis.utils";
|
|
2
|
+
|
|
1
3
|
export type PageSelectorProps = {
|
|
2
4
|
page: number;
|
|
3
5
|
pagesCount: number;
|
|
4
6
|
pagesMinCount: number;
|
|
5
|
-
gap?:
|
|
6
|
-
size?:
|
|
7
|
-
transition?:
|
|
8
|
-
itemWidth?:
|
|
7
|
+
gap?: CssInsertValueLength;
|
|
8
|
+
size?: CssInsertValueLength;
|
|
9
|
+
transition?: CssInsertValueNumber;
|
|
10
|
+
itemWidth?: CssInsertValueLength;
|
|
9
11
|
onNextPage?: () => void;
|
|
10
12
|
onPrevPage?: () => void;
|
|
11
13
|
};
|