@vnejs/uis.react.screen 0.1.3 → 0.1.4
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/Screen.d.ts +0 -1
- package/dist/Screen.d.ts.map +1 -1
- package/dist/Screen.js +1 -3
- package/dist/Screen.js.map +1 -1
- package/dist/Screen.styles.d.ts +2 -0
- package/dist/Screen.styles.d.ts.map +1 -0
- package/dist/Screen.styles.js +62 -0
- package/dist/Screen.styles.js.map +1 -0
- package/package.json +12 -18
- package/src/Screen.stories.tsx +55 -0
- package/src/Screen.styles.ts +64 -0
- package/src/Screen.tsx +74 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +18 -0
- package/dist/Screen.styl +0 -45
package/dist/Screen.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./Screen.styl";
|
|
2
1
|
export declare const Screen: ({ zIndex, transition, className, bgSrc, view, transformOriginX, transformOriginY, scale, clip, mask, filter, isShow, isForce, isHidden, withBlur, withDark, withBackgroundDark, withBackgroundBlur, withPointerEventsNone, isStretchedRatio, isDisableAutoread, isIgnoreOnScreenshot, isAllowAutoread, onClick, children, }: {
|
|
3
2
|
zIndex?: number;
|
|
4
3
|
transition?: number;
|
package/dist/Screen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM,GAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtB,4CAyCA,CAAC"}
|
package/dist/Screen.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import { cn } from "@bem-react/classname";
|
|
4
3
|
import { View } from "@vnejs/uis.react";
|
|
5
|
-
import "./Screen.
|
|
6
|
-
const b = cn("Screen");
|
|
4
|
+
import { b } from "./Screen.styles.js";
|
|
7
5
|
export const Screen = ({ zIndex = 0, transition = 500, className = "", bgSrc = "", view = "", transformOriginX = null, transformOriginY = null, scale = null, clip = null, mask = null, filter = null, isShow = false, isForce = false, isHidden = false, withBlur = false, withDark = false, withBackgroundDark = false, withBackgroundBlur = false, withPointerEventsNone = false, isStretchedRatio = false, isDisableAutoread = true, isIgnoreOnScreenshot = true, isAllowAutoread = false, onClick, children, }) => {
|
|
8
6
|
const styleBg = useMemo(() => {
|
|
9
7
|
const result = {};
|
package/dist/Screen.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Screen.js","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,MAAM,GAAG,CAAC,EACV,UAAU,GAAG,GAAG,EAChB,SAAS,GAAG,EAAE,EACd,KAAK,GAAG,EAAE,EACV,IAAI,GAAG,EAAE,EACT,gBAAgB,GAAG,IAAI,EACvB,gBAAgB,GAAG,IAAI,EACvB,KAAK,GAAG,IAAI,EACZ,IAAI,GAAG,IAAI,EACX,IAAI,GAAG,IAAI,EACX,MAAM,GAAG,IAAI,EACb,MAAM,GAAG,KAAK,EACd,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,kBAAkB,GAAG,KAAK,EAC1B,kBAAkB,GAAG,KAAK,EAC1B,qBAAqB,GAAG,KAAK,EAC7B,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,GAAG,IAAI,EACxB,oBAAoB,GAAG,IAAI,EAC3B,eAAe,GAAG,KAAK,EACvB,OAAO,EACP,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE;QAC3B,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,IAAI,KAAK;YAAE,MAAM,CAAC,eAAe,GAAG,QAAQ,KAAK,IAAI,CAAC;QACtD,IAAI,UAAU,IAAI,CAAC,OAAO;YAAE,MAAM,CAAC,UAAU,GAAG,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,CAAC;QAE9F,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;IAEjC,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAChG,GAAG,EAAE,CAAC,EACN,KAAK,EAAE,CAAC,EACR,MAAM,EAAE,CAAC,EACT,IAAI,EAAE,CAAC,EACP,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,aAEhB,cACE,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,EAC1F,KAAK,EAAE,OAAO,GACd,EACF,cAAK,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,YAAG,QAAQ,GAAO,IAC1C,CACR,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.styles.d.ts","sourceRoot":"","sources":["../src/Screen.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,CAAC,4BAAe,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { cn, injectStyles, sel } from "@vnejs/uis.utils";
|
|
2
|
+
export const b = cn("Screen");
|
|
3
|
+
const CSS = `
|
|
4
|
+
${sel(b("background"))},
|
|
5
|
+
${sel(b("children"))} {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
${sel(b("background"))} {
|
|
14
|
+
background-position: center;
|
|
15
|
+
background-repeat: no-repeat;
|
|
16
|
+
background-size: cover;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
${sel(b("background", { withBlur: true }))} {
|
|
20
|
+
filter: blur(var(--vne-screen-blur));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
${sel(b("background", { withDark: true }))} {
|
|
24
|
+
filter: brightness(var(--vne-screen-brightness));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
${sel(b("background", { withBlur: true, withDark: true }))} {
|
|
28
|
+
filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${sel(b())} {
|
|
32
|
+
--vne-screen-brightness: 0.4;
|
|
33
|
+
--vne-screen-blur: 20px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
${sel(b({ withBlur: true }))} {
|
|
37
|
+
backdrop-filter: blur(var(--vne-screen-blur));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
${sel(b({ withDark: true }))} {
|
|
41
|
+
backdrop-filter: brightness(var(--vne-screen-brightness));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
${sel(b({ withBlur: true, withDark: true }))} {
|
|
45
|
+
backdrop-filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
${sel(b({ withPointerEventsNone: true }))} {
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
${sel(b({ isStretchedRatio: true }))} {
|
|
53
|
+
aspect-ratio: 16 / 9;
|
|
54
|
+
min-width: 100vw;
|
|
55
|
+
min-height: 100vh;
|
|
56
|
+
top: 50% !important;
|
|
57
|
+
left: 50% !important;
|
|
58
|
+
transform: translateX(-50%) translateY(-50%);
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
injectStyles(CSS);
|
|
62
|
+
//# sourceMappingURL=Screen.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.styles.js","sourceRoot":"","sources":["../src/Screen.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEzD,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AAE9B,MAAM,GAAG,GAAG;EACV,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;EACpB,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;;;;;;;;EAQlB,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;;;;;;EAMpB,GAAG,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAIxC,GAAG,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAIxC,GAAG,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAIxD,GAAG,CAAC,CAAC,EAAE,CAAC;;;;;EAKR,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAI1B,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAI1B,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAI1C,GAAG,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;;;;EAIvC,GAAG,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;;;;;;;;CAQnC,CAAC;AAEF,YAAY,CAAC,GAAG,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vnejs/uis.react.screen",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "
|
|
8
|
-
"publish:major:
|
|
9
|
-
"publish:minor:
|
|
10
|
-
"publish:patch:
|
|
11
|
-
"publish:major": "
|
|
12
|
-
"publish:minor": "
|
|
13
|
-
"publish:patch": "
|
|
7
|
+
"build": "npx @vnejs/monorepo package",
|
|
8
|
+
"publish:major:uis:react": "npm run publish:major",
|
|
9
|
+
"publish:minor:uis:react": "npm run publish:minor",
|
|
10
|
+
"publish:patch:uis:react": "npm run publish:patch",
|
|
11
|
+
"publish:major": "npx @vnejs/monorepo publish major --access public",
|
|
12
|
+
"publish:minor": "npx @vnejs/monorepo publish minor --access public",
|
|
13
|
+
"publish:patch": "npx @vnejs/monorepo publish patch --access public"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@
|
|
17
|
-
"@vnejs/uis.utils": "~0.1.0",
|
|
18
|
-
"react": "19.2.4",
|
|
19
|
-
"react-dom": "19.2.4",
|
|
20
|
-
"@vnejs/uis.react": "~0.1.0"
|
|
16
|
+
"@vnejs/uis.utils": "~0.1.0"
|
|
21
17
|
},
|
|
22
18
|
"devDependencies": {
|
|
23
|
-
"@vnejs/uis.react": "~0.1.0"
|
|
24
|
-
"typescript": "^6.0.3",
|
|
25
|
-
"@types/react": "^19.0.10",
|
|
26
|
-
"@types/react-dom": "^19.0.4"
|
|
19
|
+
"@vnejs/uis.react": "~0.1.0"
|
|
27
20
|
},
|
|
28
21
|
"files": [
|
|
29
22
|
"dist",
|
|
30
|
-
"
|
|
23
|
+
"src",
|
|
24
|
+
"tsconfig.json"
|
|
31
25
|
]
|
|
32
26
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { VneWrap, renderWithVneWrap } from "@vnejs/uis.react";
|
|
2
|
+
|
|
3
|
+
import { Button, Flex, Text } from "@vnejs/uis.react";
|
|
4
|
+
|
|
5
|
+
import { Screen } from "./Screen";
|
|
6
|
+
|
|
7
|
+
export const Common = {
|
|
8
|
+
args: {
|
|
9
|
+
...VneWrap.DEFAULT_ARGS,
|
|
10
|
+
|
|
11
|
+
transition: 300,
|
|
12
|
+
zIndex: 20,
|
|
13
|
+
bgSrc: "./light.png",
|
|
14
|
+
isShow: true,
|
|
15
|
+
|
|
16
|
+
withBlur: false,
|
|
17
|
+
withDark: false,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: "Complex/Screen",
|
|
23
|
+
render: renderWithVneWrap(({ ...args }) => (
|
|
24
|
+
<Screen {...args}>
|
|
25
|
+
<Flex
|
|
26
|
+
align={Flex.ALIGN.CENTER}
|
|
27
|
+
justify={Flex.JUSTIFY.CENTER}
|
|
28
|
+
direction={Flex.DIRECTION.COLUMN}
|
|
29
|
+
height={2160}
|
|
30
|
+
gap={96}
|
|
31
|
+
>
|
|
32
|
+
<Text
|
|
33
|
+
size={96}
|
|
34
|
+
text="Какой-то контент"
|
|
35
|
+
/>
|
|
36
|
+
<Button
|
|
37
|
+
text="Кнопка"
|
|
38
|
+
textSize={60}
|
|
39
|
+
borderWidth={6}
|
|
40
|
+
padding={24}
|
|
41
|
+
isRounded={true}
|
|
42
|
+
/>
|
|
43
|
+
</Flex>
|
|
44
|
+
</Screen>
|
|
45
|
+
)),
|
|
46
|
+
argTypes: {
|
|
47
|
+
// engine
|
|
48
|
+
...VneWrap.ARGS,
|
|
49
|
+
|
|
50
|
+
// Screen
|
|
51
|
+
zIndex: { control: { type: "number", min: -100, max: 100, step: 1 } },
|
|
52
|
+
transition: { control: { type: "number", min: 0, max: 1000, step: 50 } },
|
|
53
|
+
bgSrc: { control: { type: "select" }, options: ["./light.png", "./dark.png", ""] },
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { cn, injectStyles, sel } from "@vnejs/uis.utils";
|
|
2
|
+
|
|
3
|
+
export const b = cn("Screen");
|
|
4
|
+
|
|
5
|
+
const CSS = `
|
|
6
|
+
${sel(b("background"))},
|
|
7
|
+
${sel(b("children"))} {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
right: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
${sel(b("background"))} {
|
|
16
|
+
background-position: center;
|
|
17
|
+
background-repeat: no-repeat;
|
|
18
|
+
background-size: cover;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
${sel(b("background", { withBlur: true }))} {
|
|
22
|
+
filter: blur(var(--vne-screen-blur));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${sel(b("background", { withDark: true }))} {
|
|
26
|
+
filter: brightness(var(--vne-screen-brightness));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
${sel(b("background", { withBlur: true, withDark: true }))} {
|
|
30
|
+
filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
${sel(b())} {
|
|
34
|
+
--vne-screen-brightness: 0.4;
|
|
35
|
+
--vne-screen-blur: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
${sel(b({ withBlur: true }))} {
|
|
39
|
+
backdrop-filter: blur(var(--vne-screen-blur));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
${sel(b({ withDark: true }))} {
|
|
43
|
+
backdrop-filter: brightness(var(--vne-screen-brightness));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
${sel(b({ withBlur: true, withDark: true }))} {
|
|
47
|
+
backdrop-filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
${sel(b({ withPointerEventsNone: true }))} {
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
${sel(b({ isStretchedRatio: true }))} {
|
|
55
|
+
aspect-ratio: 16 / 9;
|
|
56
|
+
min-width: 100vw;
|
|
57
|
+
min-height: 100vh;
|
|
58
|
+
top: 50% !important;
|
|
59
|
+
left: 50% !important;
|
|
60
|
+
transform: translateX(-50%) translateY(-50%);
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
injectStyles(CSS);
|
package/src/Screen.tsx
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
|
|
3
|
+
import { View } from "@vnejs/uis.react";
|
|
4
|
+
|
|
5
|
+
import { b } from "./Screen.styles.js";
|
|
6
|
+
|
|
7
|
+
export const Screen = ({
|
|
8
|
+
zIndex = 0,
|
|
9
|
+
transition = 500,
|
|
10
|
+
className = "",
|
|
11
|
+
bgSrc = "",
|
|
12
|
+
view = "",
|
|
13
|
+
transformOriginX = null,
|
|
14
|
+
transformOriginY = null,
|
|
15
|
+
scale = null,
|
|
16
|
+
clip = null,
|
|
17
|
+
mask = null,
|
|
18
|
+
filter = null,
|
|
19
|
+
isShow = false,
|
|
20
|
+
isForce = false,
|
|
21
|
+
isHidden = false,
|
|
22
|
+
withBlur = false,
|
|
23
|
+
withDark = false,
|
|
24
|
+
withBackgroundDark = false,
|
|
25
|
+
withBackgroundBlur = false,
|
|
26
|
+
withPointerEventsNone = false,
|
|
27
|
+
isStretchedRatio = false,
|
|
28
|
+
isDisableAutoread = true,
|
|
29
|
+
isIgnoreOnScreenshot = true,
|
|
30
|
+
isAllowAutoread = false,
|
|
31
|
+
onClick,
|
|
32
|
+
children,
|
|
33
|
+
}) => {
|
|
34
|
+
const styleBg = useMemo(() => {
|
|
35
|
+
const result: Record<string, any> = {};
|
|
36
|
+
|
|
37
|
+
if (bgSrc) result.backgroundImage = `url("${bgSrc}")`;
|
|
38
|
+
if (transition && !isForce) result.transition = transition === 0 ? "none" : `${transition}ms`;
|
|
39
|
+
|
|
40
|
+
return result;
|
|
41
|
+
}, [transition, bgSrc, isForce]);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<View
|
|
45
|
+
className={b({ view, withBlur, withDark, withPointerEventsNone, isStretchedRatio }, [className])}
|
|
46
|
+
top={0}
|
|
47
|
+
right={0}
|
|
48
|
+
bottom={0}
|
|
49
|
+
left={0}
|
|
50
|
+
isDisableAutoread={isDisableAutoread}
|
|
51
|
+
isIgnoreOnScreenshot={isIgnoreOnScreenshot}
|
|
52
|
+
isAllowAutoread={isAllowAutoread}
|
|
53
|
+
transition={transition}
|
|
54
|
+
zIndex={zIndex}
|
|
55
|
+
isShow={isShow}
|
|
56
|
+
isForce={isForce}
|
|
57
|
+
isHidden={isHidden}
|
|
58
|
+
view={view}
|
|
59
|
+
scale={scale}
|
|
60
|
+
clip={clip}
|
|
61
|
+
mask={mask}
|
|
62
|
+
filter={filter}
|
|
63
|
+
transformOriginX={transformOriginX}
|
|
64
|
+
transformOriginY={transformOriginY}
|
|
65
|
+
onClick={onClick}
|
|
66
|
+
>
|
|
67
|
+
<div
|
|
68
|
+
className={b("background", { withDark: withBackgroundDark, withBlur: withBackgroundBlur })}
|
|
69
|
+
style={styleBg}
|
|
70
|
+
/>
|
|
71
|
+
<div className={b("children")}>{children}</div>
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Screen";
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../../tsconfig.react.base.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "dist",
|
|
5
|
+
"rootDir": "src"
|
|
6
|
+
},
|
|
7
|
+
"include": [
|
|
8
|
+
"src/**/*.ts",
|
|
9
|
+
"src/**/*.tsx",
|
|
10
|
+
"../../../globals.d.ts",
|
|
11
|
+
"../../../peer-modules.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"exclude": [
|
|
14
|
+
"dist",
|
|
15
|
+
"node_modules",
|
|
16
|
+
"src/**/*.stories.tsx"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/dist/Screen.styl
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
.Screen
|
|
2
|
-
--vne-screen-brightness: 0.4
|
|
3
|
-
--vne-screen-blur: 20px
|
|
4
|
-
|
|
5
|
-
&-background,
|
|
6
|
-
&-children
|
|
7
|
-
position: absolute
|
|
8
|
-
top: 0
|
|
9
|
-
bottom: 0
|
|
10
|
-
left: 0
|
|
11
|
-
right: 0
|
|
12
|
-
|
|
13
|
-
&-background
|
|
14
|
-
background-position: center
|
|
15
|
-
background-repeat: no-repeat
|
|
16
|
-
background-size: cover
|
|
17
|
-
|
|
18
|
-
&_withBlur
|
|
19
|
-
filter: blur(var(--vne-screen-blur))
|
|
20
|
-
|
|
21
|
-
&_withDark
|
|
22
|
-
filter: brightness(var(--vne-screen-brightness))
|
|
23
|
-
|
|
24
|
-
&_withBlur&_withDark
|
|
25
|
-
filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness))
|
|
26
|
-
|
|
27
|
-
&_withBlur
|
|
28
|
-
backdrop-filter: blur(var(--vne-screen-blur))
|
|
29
|
-
|
|
30
|
-
&_withDark
|
|
31
|
-
backdrop-filter: brightness(var(--vne-screen-brightness))
|
|
32
|
-
|
|
33
|
-
&_withBlur&_withDark
|
|
34
|
-
backdrop-filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness))
|
|
35
|
-
|
|
36
|
-
&_withPointerEventsNone
|
|
37
|
-
pointer-events: none
|
|
38
|
-
|
|
39
|
-
&_isStretchedRatio
|
|
40
|
-
aspect-ratio: 16 / 9
|
|
41
|
-
min-width: 100vw
|
|
42
|
-
min-height: 100vh
|
|
43
|
-
top: 50% !important
|
|
44
|
-
left: 50% !important
|
|
45
|
-
transform: translateX(-50%) translateY(-50%)
|