clxx 2.0.5 → 2.0.7

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.
Files changed (66) hide show
  1. package/build/Ago/index.d.ts +3 -5
  2. package/build/Ago/index.js +6 -7
  3. package/build/Alert/Wrapper.d.ts +3 -4
  4. package/build/Alert/Wrapper.js +10 -17
  5. package/build/Alert/index.d.ts +2 -2
  6. package/build/Alert/index.js +9 -10
  7. package/build/AutoGrid/index.d.ts +4 -5
  8. package/build/AutoGrid/index.js +19 -21
  9. package/build/CarouselNotice/index.d.ts +4 -5
  10. package/build/CarouselNotice/index.js +20 -21
  11. package/build/Clickable/index.d.ts +2 -2
  12. package/build/Clickable/index.js +16 -10
  13. package/build/Container/index.d.ts +3 -4
  14. package/build/Container/index.js +37 -39
  15. package/build/Countdowner/index.d.ts +4 -5
  16. package/build/Countdowner/index.js +13 -14
  17. package/build/Dialog/Wrapper.d.ts +2 -2
  18. package/build/Dialog/Wrapper.js +6 -9
  19. package/build/Dialog/index.d.ts +3 -3
  20. package/build/Dialog/index.js +17 -12
  21. package/build/Flex/Col.d.ts +7 -9
  22. package/build/Flex/Col.js +14 -15
  23. package/build/Flex/Row.d.ts +7 -9
  24. package/build/Flex/Row.js +14 -15
  25. package/build/Flex/index.d.ts +2 -4
  26. package/build/Flex/index.js +5 -6
  27. package/build/Indicator/index.d.ts +4 -5
  28. package/build/Indicator/index.js +14 -15
  29. package/build/Loading/Wrapper.d.ts +6 -7
  30. package/build/Loading/Wrapper.js +14 -18
  31. package/build/Loading/index.d.ts +1 -1
  32. package/build/Loading/index.js +10 -11
  33. package/build/Overlay/index.d.ts +2 -4
  34. package/build/Overlay/index.js +15 -17
  35. package/build/SafeArea/index.d.ts +2 -4
  36. package/build/SafeArea/index.js +15 -10
  37. package/build/ScrollView/index.d.ts +2 -2
  38. package/build/ScrollView/index.js +3 -8
  39. package/build/Toast/Toast.d.ts +2 -2
  40. package/build/Toast/Toast.js +4 -5
  41. package/build/Toast/index.d.ts +2 -2
  42. package/build/Toast/index.js +13 -11
  43. package/build/Toast/style.d.ts +1 -1
  44. package/build/index.d.ts +1 -3
  45. package/build/index.js +1 -3
  46. package/build/utils/createApp.d.ts +7 -7
  47. package/build/utils/createApp.js +28 -22
  48. package/build/utils/dom.d.ts +5 -5
  49. package/build/utils/dom.js +14 -27
  50. package/package.json +16 -16
  51. package/build/Cascader/Column.d.ts +0 -13
  52. package/build/Cascader/Column.js +0 -65
  53. package/build/Cascader/Wrapper.d.ts +0 -21
  54. package/build/Cascader/Wrapper.js +0 -105
  55. package/build/Cascader/index.d.ts +0 -21
  56. package/build/Cascader/index.js +0 -63
  57. package/build/Cascader/style.d.ts +0 -4
  58. package/build/Cascader/style.js +0 -111
  59. package/build/Picker/Wrapper.d.ts +0 -20
  60. package/build/Picker/Wrapper.js +0 -92
  61. package/build/Picker/index.d.ts +0 -21
  62. package/build/Picker/index.js +0 -64
  63. package/build/Picker/style.d.ts +0 -3
  64. package/build/Picker/style.js +0 -122
  65. package/build/Picker/swiperStyle.d.ts +0 -1
  66. package/build/Picker/swiperStyle.js +0 -66
@@ -1,105 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from "@emotion/react";
3
- import { useCallback, useEffect, useMemo, useRef } from "react";
4
- import { RowBetween } from "../Flex/Row";
5
- import { style } from "./style";
6
- import { Column } from "./Column";
7
- import useUpdate from "../Effect/useUpdate";
8
- export function Wrapper(props) {
9
- const { options, defaultValue, onSelect, renderTitle, renderCancel, renderConfirm } = props;
10
- const update = useUpdate();
11
- // 当前选中的值
12
- let selectedValueArray = useRef(Array.isArray(defaultValue) ? defaultValue : []);
13
- // 待渲染项,每一项渲染一个Column组件(Swiper组件)
14
- const currentColumns = useRef([]);
15
- // 获取options的最大深度以及所有子树
16
- const { maxDepth, subOptionsRecord } = useMemo(() => {
17
- let subOptionsRecord = {};
18
- let maxDepth = 1;
19
- const traverse = (options, currentDepth) => {
20
- options.forEach((option) => {
21
- if (Array.isArray(option.children) && option.children.length >= 1) {
22
- subOptionsRecord[option.value] = option.children;
23
- maxDepth = Math.max(currentDepth + 1, maxDepth);
24
- traverse(option.children, currentDepth + 1);
25
- }
26
- });
27
- };
28
- traverse(options, 1);
29
- return { maxDepth, subOptionsRecord };
30
- }, [options]);
31
- // 常量函数,根据options以及初始值获取初始渲染列
32
- const getInitColumns = useCallback((options, selectedValue) => {
33
- var _a;
34
- // 待渲染的Columns项,每一项最终渲染一个Column组件(独立的Swiper组件)
35
- let initColumns = [options.map((item) => ({ value: item.value, label: item.label }))];
36
- // 当前待搜索的子项
37
- let currentSubOption = options;
38
- // 根据初始值获取下一次的子项
39
- for (let i = 0; i < maxDepth - 1; i++) {
40
- let currentValue = selectedValue[i];
41
- let nextIndex = currentSubOption.findIndex((item) => item.value === currentValue);
42
- // 没有找到就取第一项作为下一次的子项
43
- let nextSubOption = ((_a = currentSubOption[nextIndex === -1 ? 0 : nextIndex]) === null || _a === void 0 ? void 0 : _a.children) || [];
44
- initColumns.push(nextSubOption.map((item) => ({
45
- value: item.value,
46
- label: item.label,
47
- })));
48
- currentSubOption = nextSubOption;
49
- }
50
- return initColumns;
51
- }, []);
52
- // 选项列表或初始值更新时,重新计算当前渲染项
53
- useEffect(() => {
54
- selectedValueArray.current = Array.isArray(defaultValue) ? defaultValue : [];
55
- currentColumns.current = getInitColumns(options, selectedValueArray.current);
56
- update();
57
- }, [options, defaultValue]);
58
- // 更新columns项,触发onSelect回调
59
- const updateColumnsAndSelectedValues = useCallback((value, index) => {
60
- let usedTree = subOptionsRecord[value];
61
- // index之前的默认值不变
62
- let updateValueArray = selectedValueArray.current.slice(0, index);
63
- updateValueArray.push(value);
64
- // index+1之前的columns不变
65
- let updateCurrentColumns = currentColumns.current.slice(0, index + 1);
66
- for (let i = 0; i < maxDepth - index - 1; i++) {
67
- if (!usedTree) {
68
- updateCurrentColumns.push([]);
69
- continue;
70
- }
71
- updateValueArray.push(usedTree[0].value);
72
- updateCurrentColumns.push(usedTree.map((item) => ({ value: item.value, label: item.label })));
73
- usedTree = subOptionsRecord[usedTree[0].value];
74
- }
75
- // 更新当前选中值
76
- selectedValueArray.current = updateValueArray;
77
- // 触发onSelect回调
78
- onSelect === null || onSelect === void 0 ? void 0 : onSelect(updateValueArray);
79
- // 更新渲染项
80
- currentColumns.current = updateCurrentColumns;
81
- update();
82
- }, []);
83
- const showRenderContent = (render, defaultContent) => {
84
- var _a;
85
- return typeof render === "function" ? (_a = render()) !== null && _a !== void 0 ? _a : defaultContent : render !== null && render !== void 0 ? render : defaultContent;
86
- };
87
- return (jsx("div", { css: [style.container] },
88
- jsx(RowBetween, { css: style.header },
89
- jsx("div", { css: style.title }, showRenderContent(renderTitle, "")),
90
- jsx("div", { css: [style.btn, style.btnCancel], onClick: () => {
91
- var _a;
92
- (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
93
- } }, showRenderContent(renderCancel, "取消")),
94
- jsx("div", { css: [style.btn, style.btnConfirm], onClick: () => {
95
- var _a;
96
- (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, selectedValueArray.current);
97
- } }, showRenderContent(renderConfirm, "确认"))),
98
- jsx(RowBetween, null, currentColumns.current.map((column, index) => {
99
- return (jsx(Column, { updateColumns: (value) => {
100
- updateColumnsAndSelectedValues(value, index);
101
- }, columnOptions: column,
102
- // defaultValue实际上只有初始化时有效
103
- defaultValue: selectedValueArray.current[index], key: index }));
104
- }))));
105
- }
@@ -1,21 +0,0 @@
1
- import React from "react";
2
- import { WrapperProps } from "./Wrapper";
3
- export interface ShowCascaderProps extends WrapperProps {
4
- blankClosable: boolean;
5
- showMask?: boolean;
6
- maskColor?: string;
7
- }
8
- export interface CascaderProps extends ShowCascaderProps, Omit<React.HTMLProps<HTMLDivElement>, "defaultValue" | "onSelect"> {
9
- children?: React.ReactNode;
10
- }
11
- /**
12
- * 显示Cascader
13
- * @param option
14
- */
15
- export declare function showCascader(props: ShowCascaderProps): () => Promise<void>;
16
- /**
17
- * Cascader组件
18
- * @param props
19
- * @returns
20
- */
21
- export declare function Cascader(props: CascaderProps): JSX.Element;
@@ -1,63 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import React from "react";
13
- import { showDialog } from "../Dialog";
14
- import { Wrapper } from "./Wrapper";
15
- import { omit, pick } from "lodash";
16
- /**
17
- * 显示Cascader
18
- * @param option
19
- */
20
- export function showCascader(props) {
21
- const { blankClosable, showMask, maskColor, onCancel, onConfirm } = props, extra = __rest(props, ["blankClosable", "showMask", "maskColor", "onCancel", "onConfirm"]);
22
- const stop = showDialog({
23
- content: (React.createElement(Wrapper, Object.assign({}, extra, { onCancel: () => {
24
- stop();
25
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
26
- }, onConfirm: (values) => {
27
- stop();
28
- onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(values);
29
- } }))),
30
- type: "pullUp",
31
- blankClosable,
32
- showMask,
33
- maskColor,
34
- });
35
- return stop;
36
- }
37
- /**
38
- * Cascader组件
39
- * @param props
40
- * @returns
41
- */
42
- export function Cascader(props) {
43
- const { children, onClick } = props, option = __rest(props, ["children", "onClick"]);
44
- const cascaderProps = [
45
- "blankClosable",
46
- "showMask",
47
- "maskColor",
48
- "options",
49
- "defaultValue",
50
- "onSelect",
51
- "renderCancel",
52
- "renderConfirm",
53
- "renderTitle",
54
- "onConfirm",
55
- "onCancel",
56
- ];
57
- const showPickerOption = pick(option, cascaderProps);
58
- const boxProps = omit(option, cascaderProps);
59
- return (React.createElement("div", Object.assign({ onClick: (event) => {
60
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
61
- showCascader(showPickerOption);
62
- } }, boxProps), children));
63
- }
@@ -1,4 +0,0 @@
1
- import { Theme } from "@emotion/react";
2
- import { Interpolation } from "@emotion/serialize";
3
- export declare const tinyLine: Interpolation<Theme>;
4
- export declare const style: Record<string, Interpolation<Theme>>;
@@ -1,111 +0,0 @@
1
- import { adaptive } from "../utils/cssUtil";
2
- export const tinyLine = {
3
- "&:after,&::after": {
4
- content: "''",
5
- position: "absolute",
6
- left: 0,
7
- right: 0,
8
- height: "1px",
9
- backgroundColor: "#c0c0c0",
10
- transform: `scale(1, ${1 / window.devicePixelRatio})`, // todo
11
- },
12
- };
13
- // 标题栏和每个选项通用的高度
14
- const itemHeight = 90;
15
- export const style = {
16
- container: [
17
- {
18
- backgroundColor: "#fff",
19
- overflow: "hidden",
20
- position: "relative",
21
- },
22
- adaptive({
23
- borderTopLeftRadius: 16,
24
- borderTopRightRadius: 16,
25
- }),
26
- ],
27
- header: [
28
- {
29
- position: "relative",
30
- backgroundColor: "#fafafa",
31
- "&:after,&::after": {
32
- bottom: 0,
33
- },
34
- },
35
- tinyLine,
36
- adaptive({
37
- height: itemHeight,
38
- }),
39
- ],
40
- title: [
41
- {
42
- position: "absolute",
43
- left: "50%",
44
- top: "50%",
45
- transform: "translate(-50%,-50%)",
46
- },
47
- adaptive({
48
- fontSize: 28,
49
- }),
50
- ],
51
- btn: [
52
- {
53
- textAlign: "center",
54
- },
55
- adaptive({
56
- fontSize: 32,
57
- minWidth: 120,
58
- }),
59
- ],
60
- btnCancel: {
61
- color: "#666",
62
- },
63
- btnConfirm: {
64
- color: "#007afe",
65
- },
66
- body: {
67
- overflow: "hidden",
68
- position: "relative",
69
- flex: "1 1 0",
70
- },
71
- swiper: [
72
- {
73
- position: "relative",
74
- overflow: "hidden",
75
- flex: "1 1 0",
76
- },
77
- adaptive({
78
- height: itemHeight * 5,
79
- }),
80
- ],
81
- mask: [
82
- {
83
- position: "absolute",
84
- width: "100%",
85
- zIndex: 2,
86
- left: 0,
87
- },
88
- tinyLine,
89
- adaptive({
90
- height: itemHeight * 2,
91
- }),
92
- ],
93
- maskTop: [
94
- {
95
- top: 0,
96
- background: "linear-gradient(#fefefe, transparent)",
97
- "&:after,&::after": {
98
- bottom: 0,
99
- },
100
- },
101
- ],
102
- maskBottom: [
103
- {
104
- bottom: 0,
105
- background: "linear-gradient(transparent, #fefefe)",
106
- "&:after,&::after": {
107
- top: 0,
108
- },
109
- },
110
- ],
111
- };
@@ -1,20 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from "@emotion/react";
3
- import React from "react";
4
- export declare type OptionType = {
5
- value: string | number;
6
- label?: React.ReactNode;
7
- [key: string]: any;
8
- };
9
- export interface PickerWrapperProps {
10
- options: OptionType[];
11
- defaultValue?: number;
12
- renderOption?: (option: OptionType, index: number) => React.ReactNode;
13
- onConfirm?: (option: OptionType, index: number) => void;
14
- onCancel?: () => void;
15
- renderCancel?: () => React.ReactNode;
16
- renderConfirm?: () => React.ReactNode;
17
- showTitle?: boolean;
18
- renderTitle?: (option: OptionType, index: number) => React.ReactNode;
19
- }
20
- export declare function Wrapper(props: PickerWrapperProps): jsx.JSX.Element;
@@ -1,92 +0,0 @@
1
- /** @jsx jsx */
2
- import { jsx } from "@emotion/react";
3
- import { RowBetween } from "../Flex/Row";
4
- import { Col } from "../Flex/Col";
5
- import { style } from "./style";
6
- import { swiperStyle } from "./swiperStyle";
7
- import { Clickable } from "../Clickable";
8
- import Swiper from "swiper";
9
- import { useCallback, useEffect, useRef, useState } from "react";
10
- export function Wrapper(props) {
11
- const { onConfirm, onCancel, renderCancel, renderConfirm, options, renderOption, showTitle = true, renderTitle, defaultValue, } = props;
12
- // 获取初始索引
13
- const getInitialSlide = useCallback(() => {
14
- let initialSlide = 0;
15
- if (Array.isArray(options)) {
16
- let findIndex = options.findIndex((option) => option.value === defaultValue);
17
- if (findIndex >= 0) {
18
- initialSlide = findIndex;
19
- }
20
- }
21
- return initialSlide;
22
- }, [options, defaultValue]);
23
- const swiperRef = useRef(null);
24
- const [index, setIndex] = useState(getInitialSlide());
25
- useEffect(() => {
26
- const swiper = new Swiper(swiperRef.current, {
27
- initialSlide: getInitialSlide(),
28
- direction: "vertical",
29
- slidesPerView: 5,
30
- centeredSlides: true,
31
- freeMode: true,
32
- freeModeSticky: true,
33
- });
34
- swiper.on("init", () => {
35
- setIndex(swiper.realIndex);
36
- });
37
- swiper.on("slideChange", () => {
38
- setIndex(swiper.realIndex);
39
- });
40
- return () => {
41
- swiper.destroy();
42
- };
43
- }, [getInitialSlide]);
44
- // 显示标题逻辑
45
- const showTitleContent = () => {
46
- if (showTitle) {
47
- const option = options[index];
48
- if (typeof renderTitle === "function") {
49
- return jsx("div", { css: style.title }, renderTitle(option, index));
50
- }
51
- else {
52
- return (jsx(Col, { css: style.title },
53
- jsx("span", { css: style.titleLabel }, "\u5F53\u524D\u9009\u62E9"),
54
- jsx("span", { css: style.titleContent }, option.label)));
55
- }
56
- }
57
- };
58
- // 按钮逻辑
59
- const showCancel = () => {
60
- var _a;
61
- return (_a = renderCancel === null || renderCancel === void 0 ? void 0 : renderCancel()) !== null && _a !== void 0 ? _a : jsx("div", { css: [style.btn, style.btnCancel] }, "\u53D6\u6D88");
62
- };
63
- const showConfirm = () => {
64
- var _a;
65
- return (_a = renderConfirm === null || renderConfirm === void 0 ? void 0 : renderConfirm()) !== null && _a !== void 0 ? _a : jsx("div", { css: [style.btn, style.btnConfirm] }, "\u786E\u5B9A");
66
- };
67
- /**
68
- * 显示选项列表
69
- * @returns
70
- */
71
- const showOptions = () => {
72
- if (Array.isArray(options)) {
73
- return options.map((option, index) => {
74
- let content = option.label;
75
- if (typeof renderOption === "function") {
76
- content = renderOption(option, index);
77
- }
78
- return (jsx("div", { className: "swiper-slide", key: option.value }, content));
79
- });
80
- }
81
- };
82
- return (jsx("div", { css: [style.container] },
83
- jsx(RowBetween, { css: style.header },
84
- showTitleContent(),
85
- jsx(Clickable, { css: style.btnBox, onClick: onCancel }, showCancel()),
86
- jsx(Clickable, { css: style.btnBox, onClick: () => onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(options[index], index) }, showConfirm())),
87
- jsx("div", { css: [swiperStyle, style.body] },
88
- jsx("div", { className: "swiper", css: style.swiper, ref: swiperRef },
89
- jsx("div", { className: "swiper-wrapper" }, showOptions()),
90
- jsx("div", { css: [style.mask, style.maskTop] }),
91
- jsx("div", { css: [style.mask, style.maskBottom] })))));
92
- }
@@ -1,21 +0,0 @@
1
- import { PickerWrapperProps } from "./Wrapper";
2
- import React from "react";
3
- export interface ShowPickerOption extends PickerWrapperProps {
4
- blankClosable?: boolean;
5
- showMask?: boolean;
6
- maskColor?: string;
7
- }
8
- export interface PickerOption extends ShowPickerOption, Omit<React.HTMLProps<HTMLDivElement>, "defaultValue"> {
9
- children?: React.ReactNode;
10
- }
11
- /**
12
- * 显示picker
13
- * @param option
14
- */
15
- export declare function showPicker(option: ShowPickerOption): void;
16
- /**
17
- * picker组件
18
- * @param props
19
- * @returns
20
- */
21
- export declare function Picker(props: PickerOption): JSX.Element;
@@ -1,64 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import { showDialog } from "../Dialog";
13
- import { Wrapper } from "./Wrapper";
14
- import React from "react";
15
- import pick from "lodash/pick";
16
- import omit from "lodash/omit";
17
- /**
18
- * 显示picker
19
- * @param option
20
- */
21
- export function showPicker(option) {
22
- const { blankClosable, showMask, maskColor, onCancel, onConfirm } = option, extra = __rest(option, ["blankClosable", "showMask", "maskColor", "onCancel", "onConfirm"]);
23
- const stop = showDialog({
24
- content: (React.createElement(Wrapper, Object.assign({}, extra, { onCancel: () => {
25
- stop();
26
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
27
- }, onConfirm: (option, index) => {
28
- stop();
29
- onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(option, index);
30
- } }))),
31
- type: "pullUp",
32
- blankClosable,
33
- showMask,
34
- maskColor,
35
- });
36
- }
37
- /**
38
- * picker组件
39
- * @param props
40
- * @returns
41
- */
42
- export function Picker(props) {
43
- const { children, onClick } = props, option = __rest(props, ["children", "onClick"]);
44
- const pickerProps = [
45
- "blankClosable",
46
- "showMask",
47
- "maskColor",
48
- "options",
49
- "defaultValue",
50
- "renderOption",
51
- "onConfirm",
52
- "onCancel",
53
- "renderCancel",
54
- "renderConfirm",
55
- "showTitle",
56
- "renderTitle",
57
- ];
58
- const showPickerOption = pick(option, pickerProps);
59
- const boxProps = omit(option, pickerProps);
60
- return (React.createElement("div", Object.assign({ onClick: (event) => {
61
- onClick === null || onClick === void 0 ? void 0 : onClick(event);
62
- showPicker(showPickerOption);
63
- } }, boxProps), children));
64
- }
@@ -1,3 +0,0 @@
1
- import { Interpolation, Theme } from "@emotion/react";
2
- export declare const tinyLine: Interpolation<Theme>;
3
- export declare const style: Record<string, Interpolation<Theme>>;
@@ -1,122 +0,0 @@
1
- import { adaptive } from "../utils/cssUtil";
2
- export const tinyLine = {
3
- "&:after,&::after": {
4
- content: "''",
5
- position: "absolute",
6
- left: 0,
7
- right: 0,
8
- height: "1px",
9
- backgroundColor: "#c0c0c0",
10
- transform: `scale(1, ${1 / window.devicePixelRatio})`,
11
- },
12
- };
13
- // 标题栏和每个选项通用的高度
14
- const itemHeight = 90;
15
- export const style = {
16
- container: [
17
- {
18
- backgroundColor: "#fff",
19
- overflow: "hidden",
20
- position: "relative",
21
- },
22
- adaptive({
23
- borderTopLeftRadius: 16,
24
- borderTopRightRadius: 16,
25
- }),
26
- ],
27
- header: [
28
- {
29
- position: "relative",
30
- backgroundColor: "#fafafa",
31
- "&:after,&::after": {
32
- bottom: 0,
33
- },
34
- },
35
- tinyLine,
36
- adaptive({
37
- height: itemHeight,
38
- }),
39
- ],
40
- title: {
41
- position: "absolute",
42
- left: "50%",
43
- top: "50%",
44
- transform: "translate(-50%, -50%)",
45
- zIndex: 1,
46
- },
47
- titleLabel: [
48
- {
49
- color: "#666",
50
- lineHeight: 1,
51
- },
52
- adaptive({
53
- fontSize: 20,
54
- marginBottom: 5,
55
- }),
56
- ],
57
- titleContent: [
58
- {
59
- color: "#333",
60
- lineHeight: 1,
61
- },
62
- adaptive({
63
- fontSize: 28,
64
- }),
65
- ],
66
- btnBox: {
67
- zIndex: 2,
68
- },
69
- btn: [
70
- { textAlign: "center", lineHeight: 2 },
71
- adaptive({
72
- width: 120,
73
- fontSize: 32,
74
- }),
75
- ],
76
- btnCancel: {
77
- color: "#666",
78
- },
79
- btnConfirm: {
80
- color: "#007afe",
81
- },
82
- body: {
83
- overflow: "hidden",
84
- position: "relative",
85
- },
86
- swiper: [
87
- adaptive({ height: itemHeight * 5, fontSize: 32 }),
88
- {
89
- ".swiper-slide": {
90
- display: "flex",
91
- justifyContent: "center",
92
- alignItems: "center",
93
- },
94
- },
95
- ],
96
- mask: [
97
- {
98
- position: "absolute",
99
- left: 0,
100
- width: "100%",
101
- zIndex: 2,
102
- },
103
- tinyLine,
104
- adaptive({
105
- height: itemHeight * 2,
106
- }),
107
- ],
108
- maskTop: {
109
- top: 0,
110
- backgroundImage: "linear-gradient(180deg, #fefefe, transparent)",
111
- "&:after,&::after": {
112
- bottom: 0,
113
- },
114
- },
115
- maskBottom: {
116
- backgroundImage: "linear-gradient(0deg, #fefefe, transparent)",
117
- bottom: 0,
118
- "&:after,&::after": {
119
- top: 0,
120
- },
121
- },
122
- };
@@ -1 +0,0 @@
1
- export declare const swiperStyle: import("@emotion/utils").SerializedStyles;