@vnejs/uis.react.position-box 0.1.8 → 0.1.10
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
2
1
|
import type { MutableRefObject, ReactNode } from "react";
|
|
2
|
+
import type { Widen } from "@vnejs/shared";
|
|
3
|
+
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
3
4
|
export type PositionBoxProps<T = unknown> = {
|
|
4
5
|
top?: CssInsertValue;
|
|
5
6
|
right?: CssInsertValue;
|
|
@@ -27,4 +28,9 @@ export type PositionBoxProps<T = unknown> = {
|
|
|
27
28
|
className?: string;
|
|
28
29
|
children?: ReactNode;
|
|
29
30
|
};
|
|
31
|
+
type PositionBoxPropKey = "position" | "flatPosition";
|
|
32
|
+
export type WidenViewProps<T> = T extends (...args: infer A) => infer R ? (...args: A) => R : T extends readonly (infer U)[] ? WidenViewProps<U>[] : T extends object ? {
|
|
33
|
+
-readonly [K in keyof T]: K extends PositionBoxPropKey ? PositionBoxProps : WidenViewProps<T[K]>;
|
|
34
|
+
} : Widen<T>;
|
|
35
|
+
export {};
|
|
30
36
|
//# sourceMappingURL=PositionBox.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PositionBox.types.d.ts","sourceRoot":"","sources":["../src/PositionBox.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PositionBox.types.d.ts","sourceRoot":"","sources":["../src/PositionBox.types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE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C,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GACnE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACjB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAC5B,cAAc,CAAC,CAAC,CAAC,EAAE,GACnB,CAAC,SAAS,MAAM,GACd;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,kBAAkB,GAAG,gBAAgB,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GACpG,KAAK,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/uis.react.position-box",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -13,11 +13,9 @@
|
|
|
13
13
|
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
+
"@vnejs/shared": "~0.0.9",
|
|
16
17
|
"@vnejs/uis.utils": "~0.1.0"
|
|
17
18
|
},
|
|
18
|
-
"devDependencies": {
|
|
19
|
-
"@vnejs/uis.react": "~0.1.0"
|
|
20
|
-
},
|
|
21
19
|
"files": [
|
|
22
20
|
"dist",
|
|
23
21
|
"src",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { VneWrap, renderWithVneWrap } from "@vnejs/uis.react";
|
|
2
|
-
|
|
3
|
-
import { PositionBox } from "@vnejs/uis.react";
|
|
1
|
+
import { VneWrap, renderWithVneWrap } from "@vnejs/uis.react.vne-wrap";
|
|
2
|
+
import { PositionBox } from "./PositionBox.js";
|
|
4
3
|
|
|
5
4
|
export const Common = {
|
|
6
5
|
args: {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
2
1
|
import type { MutableRefObject, ReactNode } from "react";
|
|
3
2
|
|
|
3
|
+
import type { Widen } from "@vnejs/shared";
|
|
4
|
+
import type { CssInsertValue, CssInsertValueNumber, CssInsertValueString } from "@vnejs/uis.utils";
|
|
5
|
+
|
|
4
6
|
export type PositionBoxProps<T = unknown> = {
|
|
5
7
|
top?: CssInsertValue;
|
|
6
8
|
right?: CssInsertValue;
|
|
@@ -28,3 +30,13 @@ export type PositionBoxProps<T = unknown> = {
|
|
|
28
30
|
className?: string;
|
|
29
31
|
children?: ReactNode;
|
|
30
32
|
};
|
|
33
|
+
|
|
34
|
+
type PositionBoxPropKey = "position" | "flatPosition";
|
|
35
|
+
|
|
36
|
+
export type WidenViewProps<T> = T extends (...args: infer A) => infer R
|
|
37
|
+
? (...args: A) => R
|
|
38
|
+
: T extends readonly (infer U)[]
|
|
39
|
+
? WidenViewProps<U>[]
|
|
40
|
+
: T extends object
|
|
41
|
+
? { -readonly [K in keyof T]: K extends PositionBoxPropKey ? PositionBoxProps : WidenViewProps<T[K]> }
|
|
42
|
+
: Widen<T>;
|