1 | import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2 | import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
3 | import { useStyle as useAntdStyle } from '@ant-design/pro-provider';
|
4 | var genSettingDrawerStyle = function genSettingDrawerStyle(token) {
|
5 | var _ref;
|
6 | return _ref = {}, _defineProperty(_ref, "".concat(token.componentCls, "-handle"), {
|
7 | position: 'fixed',
|
8 | insetBlockStart: '240px',
|
9 | insetInlineEnd: '0px',
|
10 | zIndex: 0,
|
11 | display: 'flex',
|
12 | alignItems: 'center',
|
13 | justifyContent: 'center',
|
14 | width: '48px',
|
15 | height: '48px',
|
16 | fontSize: '16px',
|
17 | textAlign: 'center',
|
18 | backgroundColor: token.colorPrimary,
|
19 | borderEndStartRadius: token.borderRadiusLG,
|
20 | borderStartStartRadius: token.borderRadiusLG,
|
21 | '-webkit-backdropilter': 'saturate(180%) blur(20px)',
|
22 | backdropFilter: 'saturate(180%) blur(20px)',
|
23 | cursor: 'pointer',
|
24 | pointerEvents: 'auto'
|
25 | }), _defineProperty(_ref, token.componentCls, {
|
26 | '&-content': {
|
27 | position: 'relative',
|
28 | minHeight: '100%',
|
29 | color: token.colorText
|
30 | },
|
31 | '&-body-title': {
|
32 | marginBlock: token.marginXS,
|
33 | fontSize: '14px',
|
34 | lineHeight: '22px',
|
35 | color: token.colorTextHeading
|
36 | },
|
37 | '&-block-checkbox': {
|
38 | display: 'flex',
|
39 | minHeight: 42,
|
40 | gap: 12,
|
41 | '& &-item': {
|
42 | position: 'relative',
|
43 | width: '44px',
|
44 | height: '36px',
|
45 | overflow: 'hidden',
|
46 | borderRadius: '4px',
|
47 | boxShadow: token.boxShadow,
|
48 | cursor: 'pointer',
|
49 | fontSize: 56,
|
50 | lineHeight: '56px',
|
51 | '&::before': {
|
52 | position: 'absolute',
|
53 | insetBlockStart: 0,
|
54 | insetInlineStart: 0,
|
55 | width: '33%',
|
56 | height: '100%',
|
57 | content: "''"
|
58 | },
|
59 | '&::after': {
|
60 | position: 'absolute',
|
61 | insetBlockStart: 0,
|
62 | insetInlineStart: 0,
|
63 | width: '100%',
|
64 | height: '25%',
|
65 | content: "''"
|
66 | },
|
67 | '&-realDark': {
|
68 | backgroundColor: 'rgba(0, 21, 41, 0.85)',
|
69 | '&::before': {
|
70 | backgroundColor: 'rgba(0, 0, 0, 0.65)'
|
71 | },
|
72 | '&::after': {
|
73 | backgroundColor: 'rgba(0, 0, 0, 0.85)'
|
74 | }
|
75 | },
|
76 | '&-light': {
|
77 | backgroundColor: '#fff',
|
78 | '&::before': {
|
79 | backgroundColor: '#fff'
|
80 | },
|
81 | '&::after': {
|
82 | backgroundColor: '#fff'
|
83 | }
|
84 | },
|
85 | '&-dark,&-side': {
|
86 | backgroundColor: '#f7f8fa',
|
87 | '&::before': {
|
88 | zIndex: '1',
|
89 | backgroundColor: '#001529'
|
90 | },
|
91 | '&::after': {
|
92 | backgroundColor: '#fff'
|
93 | }
|
94 | },
|
95 | '&-top': {
|
96 | backgroundColor: '#f7f8fa',
|
97 | '&::before': {
|
98 | backgroundColor: 'transparent'
|
99 | },
|
100 | '&::after': {
|
101 | backgroundColor: '#001529'
|
102 | }
|
103 | },
|
104 | '&-mix': {
|
105 | backgroundColor: '#f7f8fa',
|
106 | '&::before': {
|
107 | backgroundColor: '#fff'
|
108 | },
|
109 | '&::after': {
|
110 | backgroundColor: '#001529'
|
111 | }
|
112 | }
|
113 | },
|
114 | '& &-selectIcon': {
|
115 | position: 'absolute',
|
116 | insetInlineEnd: '6px',
|
117 | bottom: '4px',
|
118 | color: token.colorPrimary,
|
119 | fontWeight: 'bold',
|
120 | fontSize: '14px',
|
121 | pointerEvents: 'none',
|
122 | '.action': {
|
123 | color: token.colorPrimary
|
124 | }
|
125 | },
|
126 | '& &-icon': {
|
127 | fontSize: 56,
|
128 | lineHeight: '56px'
|
129 | }
|
130 | },
|
131 | '&-theme-color': {
|
132 | marginBlockStart: '16px',
|
133 | overflow: 'hidden',
|
134 | '& &-block': {
|
135 | float: 'left',
|
136 | width: '20px',
|
137 | height: '20px',
|
138 | marginBlockStart: 8,
|
139 | marginInlineEnd: 8,
|
140 | color: '#fff',
|
141 | fontWeight: 'bold',
|
142 | textAlign: 'center',
|
143 | borderRadius: '2px',
|
144 | cursor: 'pointer'
|
145 | }
|
146 | },
|
147 | '&-list': _defineProperty({}, "li".concat(token.antCls, "-list-item"), {
|
148 | paddingInline: 0,
|
149 | paddingBlock: 8
|
150 | })
|
151 | }), _ref;
|
152 | };
|
153 | export function useStyle(prefixCls) {
|
154 | return useAntdStyle('ProLayoutSettingDrawer', function (token) {
|
155 | var settingDrawerToken = _objectSpread(_objectSpread({}, token), {}, {
|
156 | componentCls: ".".concat(prefixCls)
|
157 | });
|
158 | return [genSettingDrawerStyle(settingDrawerToken)];
|
159 | });
|
160 | } |
\ | No newline at end of file |