@rescui/collapse 0.5.2 → 0.5.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/lib/_virtual/add-outline.js +37 -0
- package/lib/_virtual/index.css.js +10 -0
- package/lib/_virtual/right.js +37 -0
- package/lib/collapse.js +2 -1
- package/lib/collapse.p.module.css.js +32 -32
- package/lib/index.css +126 -64
- package/package.json +6 -7
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import cn from 'classnames';
|
|
6
|
+
import styles from './index.css.js';
|
|
7
|
+
var _excluded = ["theme", "size", "className"];
|
|
8
|
+
var sizeStyles = {
|
|
9
|
+
"xs": styles.sizeXS,
|
|
10
|
+
"s": styles.sizeS,
|
|
11
|
+
"m": styles.sizeM,
|
|
12
|
+
"l": styles.sizeL
|
|
13
|
+
};
|
|
14
|
+
var AddOutlineIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15
|
+
var theme = _ref.theme,
|
|
16
|
+
size = _ref.size,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
|
|
20
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
|
+
viewBox: "0 0 24 24"
|
|
22
|
+
}, props, {
|
|
23
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
24
|
+
ref: ref
|
|
25
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26
|
+
d: "M12.997 3h-2v8H3v2h7.997v8h2v-8H21v-2h-8.003V3z"
|
|
27
|
+
}));
|
|
28
|
+
});
|
|
29
|
+
AddOutlineIcon.propTypes = {
|
|
30
|
+
className: PropTypes.string,
|
|
31
|
+
theme: PropTypes.oneOf(["light", "dark"]),
|
|
32
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l"])
|
|
33
|
+
};
|
|
34
|
+
AddOutlineIcon.defaultProps = {
|
|
35
|
+
size: "m"
|
|
36
|
+
};
|
|
37
|
+
export { AddOutlineIcon as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var styles = {
|
|
2
|
+
"icon": "_icon_ekw7ne_4",
|
|
3
|
+
"sizeXS": "_sizeXS_ekw7ne_14",
|
|
4
|
+
"sizeS": "_sizeS_ekw7ne_18",
|
|
5
|
+
"sizeM": "_sizeM_ekw7ne_22",
|
|
6
|
+
"sizeL": "_sizeL_ekw7ne_26",
|
|
7
|
+
"light": "_light_ekw7ne_30",
|
|
8
|
+
"dark": "_dark_ekw7ne_34"
|
|
9
|
+
};
|
|
10
|
+
export { styles as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/esm/objectWithoutProperties';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import cn from 'classnames';
|
|
6
|
+
import styles from './index.css.js';
|
|
7
|
+
var _excluded = ["theme", "size", "className"];
|
|
8
|
+
var sizeStyles = {
|
|
9
|
+
"xs": styles.sizeXS,
|
|
10
|
+
"s": styles.sizeS,
|
|
11
|
+
"m": styles.sizeM,
|
|
12
|
+
"l": styles.sizeL
|
|
13
|
+
};
|
|
14
|
+
var RightIcon = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
15
|
+
var theme = _ref.theme,
|
|
16
|
+
size = _ref.size,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
|
+
|
|
20
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
21
|
+
viewBox: "0 0 24 24"
|
|
22
|
+
}, props, {
|
|
23
|
+
className: cn(styles.icon, styles[theme], sizeStyles[size], className),
|
|
24
|
+
ref: ref
|
|
25
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26
|
+
d: "M9.004 19l8-7-8-7v14z"
|
|
27
|
+
}));
|
|
28
|
+
});
|
|
29
|
+
RightIcon.propTypes = {
|
|
30
|
+
className: PropTypes.string,
|
|
31
|
+
theme: PropTypes.oneOf(["light", "dark"]),
|
|
32
|
+
size: PropTypes.oneOf(["xs", "s", "m", "l"])
|
|
33
|
+
};
|
|
34
|
+
RightIcon.defaultProps = {
|
|
35
|
+
size: "m"
|
|
36
|
+
};
|
|
37
|
+
export { RightIcon as default };
|
package/lib/collapse.js
CHANGED
|
@@ -18,9 +18,10 @@ import "core-js/modules/web.dom-collections.for-each.js";
|
|
|
18
18
|
import React, { useRef, useContext, useState, useEffect } from 'react';
|
|
19
19
|
import cn from 'classnames';
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
|
-
import { RightIcon, AddOutlineIcon } from '@rescui/icons';
|
|
22
21
|
import { useThemeWithUndefined, ThemeProvider } from '@rescui/ui-contexts';
|
|
23
22
|
import { useResizeObserver } from '@rescui/use-resize-observer';
|
|
23
|
+
import RightIcon from './_virtual/right.js';
|
|
24
|
+
import AddOutlineIcon from './_virtual/add-outline.js';
|
|
24
25
|
import { collapseContext } from './context.js';
|
|
25
26
|
import { useCollapseState, COLLAPSE_STATES, useStartedClosing } from './use-collapse-state.js';
|
|
26
27
|
import styles from './collapse.p.module.css.js';
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
var styles = {
|
|
2
|
-
"themeLight": "
|
|
3
|
-
"themeDark": "
|
|
4
|
-
"sizeS": "
|
|
5
|
-
"sizeM": "
|
|
6
|
-
"sizeL": "
|
|
7
|
-
"classic": "
|
|
8
|
-
"rock": "
|
|
9
|
-
"clear": "
|
|
10
|
-
"hasBorderBottom": "
|
|
11
|
-
"leftIcon": "
|
|
12
|
-
"rightIcon": "
|
|
13
|
-
"disableLeftPadding": "
|
|
14
|
-
"main": "
|
|
15
|
-
"opening": "
|
|
16
|
-
"opened": "
|
|
17
|
-
"closing": "
|
|
18
|
-
"title": "
|
|
19
|
-
"content": "
|
|
20
|
-
"closed": "
|
|
21
|
-
"closingTransition": "
|
|
22
|
-
"innerWrapper": "
|
|
23
|
-
"button": "
|
|
24
|
-
"icon": "
|
|
25
|
-
"iconPlus": "
|
|
26
|
-
"iconArrow": "
|
|
27
|
-
"accordion": "
|
|
28
|
-
"accordionGap0": "
|
|
29
|
-
"accordionGap8": "
|
|
30
|
-
"accordionGap12": "
|
|
31
|
-
"accordionGap16": "
|
|
32
|
-
"accordionGap24": "
|
|
33
|
-
"accordionGap32": "
|
|
2
|
+
"themeLight": "_themeLight_1myve4k_6",
|
|
3
|
+
"themeDark": "_themeDark_1myve4k_9",
|
|
4
|
+
"sizeS": "_sizeS_1myve4k_13",
|
|
5
|
+
"sizeM": "_sizeM_1myve4k_16",
|
|
6
|
+
"sizeL": "_sizeL_1myve4k_19",
|
|
7
|
+
"classic": "_classic_1myve4k_23",
|
|
8
|
+
"rock": "_rock_1myve4k_26",
|
|
9
|
+
"clear": "_clear_1myve4k_29",
|
|
10
|
+
"hasBorderBottom": "_hasBorderBottom_1myve4k_33",
|
|
11
|
+
"leftIcon": "_leftIcon_1myve4k_37",
|
|
12
|
+
"rightIcon": "_rightIcon_1myve4k_40",
|
|
13
|
+
"disableLeftPadding": "_disableLeftPadding_1myve4k_44",
|
|
14
|
+
"main": "_main_1myve4k_48",
|
|
15
|
+
"opening": "_opening_1myve4k_59",
|
|
16
|
+
"opened": "_opened_1myve4k_60",
|
|
17
|
+
"closing": "_closing_1myve4k_61",
|
|
18
|
+
"title": "_title_1myve4k_95",
|
|
19
|
+
"content": "_content_1myve4k_103",
|
|
20
|
+
"closed": "_closed_1myve4k_113",
|
|
21
|
+
"closingTransition": "_closingTransition_1myve4k_122",
|
|
22
|
+
"innerWrapper": "_innerWrapper_1myve4k_129",
|
|
23
|
+
"button": "_button_1myve4k_135",
|
|
24
|
+
"icon": "_icon_1myve4k_190",
|
|
25
|
+
"iconPlus": "_iconPlus_1myve4k_206",
|
|
26
|
+
"iconArrow": "_iconArrow_1myve4k_211",
|
|
27
|
+
"accordion": "_accordion_1myve4k_217",
|
|
28
|
+
"accordionGap0": "_accordionGap0_1myve4k_222",
|
|
29
|
+
"accordionGap8": "_accordionGap8_1myve4k_225",
|
|
30
|
+
"accordionGap12": "_accordionGap12_1myve4k_228",
|
|
31
|
+
"accordionGap16": "_accordionGap16_1myve4k_231",
|
|
32
|
+
"accordionGap24": "_accordionGap24_1myve4k_234",
|
|
33
|
+
"accordionGap32": "_accordionGap32_1myve4k_237"
|
|
34
34
|
};
|
|
35
35
|
export { styles as default };
|
package/lib/index.css
CHANGED
|
@@ -1,15 +1,89 @@
|
|
|
1
|
-
.
|
|
1
|
+
._icon_ekw7ne_4{
|
|
2
|
+
--_rs-theme-dark:var(
|
|
3
|
+
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
4
|
+
var(--rs-theme-dark, 0)
|
|
5
|
+
);
|
|
6
|
+
--_rs-theme-flip:var(--rs-theme-flip, 0);
|
|
7
|
+
--_rs-theme-dark-coefficient:calc(var(--_rs-theme-dark)*(1 - var(--_rs-theme-flip)) + var(--_rs-theme-flip)*(1 - var(--_rs-theme-dark)));
|
|
8
|
+
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
9
|
+
}
|
|
10
|
+
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
11
|
+
._icon_ekw7ne_4{
|
|
12
|
+
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
13
|
+
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
14
|
+
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
15
|
+
--_rs-color-primary-t-dim:color-mix(in srgb, var(--rs-color-primary-t-dim-light-theme, rgba(107, 87, 255, 0.8)) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-dim-dark-theme, rgba(132, 115, 255,0.8)) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
16
|
+
--_rs-color-primary-t-fog:color-mix(in srgb, var(--rs-color-primary-t-fog-light-theme, rgba(107, 87, 255,0.2)) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-t-fog-dark-theme, rgba(132, 115, 255,0.3)) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
20
|
+
._icon_ekw7ne_4{
|
|
21
|
+
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
22
|
+
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
23
|
+
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
24
|
+
--_rs-color-primary-t-dim:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, 0.8);
|
|
25
|
+
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
._icon_ekw7ne_4{
|
|
29
|
+
|
|
30
|
+
fill:var(--_rs-icons-themed-fill-or-initial, currentcolor);
|
|
31
|
+
|
|
32
|
+
width:auto;
|
|
33
|
+
height:var(--_rs-icons-height);
|
|
34
|
+
}
|
|
35
|
+
._sizeXS_ekw7ne_14{
|
|
36
|
+
--_rs-icons-height:16px;
|
|
37
|
+
}
|
|
38
|
+
._sizeS_ekw7ne_18{
|
|
39
|
+
--_rs-icons-height:20px;
|
|
40
|
+
}
|
|
41
|
+
._sizeM_ekw7ne_22{
|
|
42
|
+
--_rs-icons-height:24px;
|
|
43
|
+
}
|
|
44
|
+
._sizeL_ekw7ne_26{
|
|
45
|
+
--_rs-icons-height:28px;
|
|
46
|
+
}
|
|
47
|
+
._light_ekw7ne_30{
|
|
2
48
|
--rs-theme-dark:0;
|
|
49
|
+
--_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
3
50
|
}
|
|
4
|
-
.
|
|
51
|
+
._dark_ekw7ne_34{
|
|
5
52
|
--rs-theme-dark:1;
|
|
53
|
+
--_rs-icons-themed-fill-or-initial:rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227));
|
|
54
|
+
}
|
|
55
|
+
@-webkit-keyframes rs-icon-rotate{
|
|
56
|
+
from{
|
|
57
|
+
-webkit-transform:rotate(0deg);
|
|
58
|
+
transform:rotate(0deg);
|
|
59
|
+
}
|
|
60
|
+
to{
|
|
61
|
+
-webkit-transform:rotate(360deg);
|
|
62
|
+
transform:rotate(360deg);
|
|
63
|
+
}
|
|
6
64
|
}
|
|
7
|
-
|
|
65
|
+
@keyframes rs-icon-rotate{
|
|
66
|
+
from{
|
|
67
|
+
-webkit-transform:rotate(0deg);
|
|
68
|
+
transform:rotate(0deg);
|
|
69
|
+
}
|
|
70
|
+
to{
|
|
71
|
+
-webkit-transform:rotate(360deg);
|
|
72
|
+
transform:rotate(360deg);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
._themeLight_1myve4k_6{
|
|
76
|
+
--rs-theme-dark:0;
|
|
77
|
+
}
|
|
78
|
+
._themeDark_1myve4k_9{
|
|
79
|
+
--rs-theme-dark:1;
|
|
80
|
+
}
|
|
81
|
+
._sizeS_1myve4k_13{
|
|
8
82
|
--_rs-collapse-vertical-padding:6px;
|
|
9
83
|
--_rs-collapse-horizontal-padding:8px;
|
|
10
84
|
--_rs-collapse-icon-size:20px;
|
|
11
85
|
}
|
|
12
|
-
.
|
|
86
|
+
._sizeS_1myve4k_13 > [data-rs-internal='collapse__button'] > [data-rs-internal='collapse__title']{
|
|
13
87
|
--_rs-typography-letter-spacing:normal;
|
|
14
88
|
--_rs-typography-text-transform:initial;
|
|
15
89
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -37,7 +111,7 @@
|
|
|
37
111
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
38
112
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
39
113
|
}
|
|
40
|
-
.
|
|
114
|
+
._sizeS_1myve4k_13 > [data-rs-internal='collapse__content']{
|
|
41
115
|
--_rs-typography-letter-spacing:0.0045em;
|
|
42
116
|
--_rs-typography-text-transform:initial;
|
|
43
117
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -71,12 +145,12 @@
|
|
|
71
145
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
72
146
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
73
147
|
}
|
|
74
|
-
.
|
|
148
|
+
._sizeM_1myve4k_16{
|
|
75
149
|
--_rs-collapse-vertical-padding:8px;
|
|
76
150
|
--_rs-collapse-horizontal-padding:8px;
|
|
77
151
|
--_rs-collapse-icon-size:24px;
|
|
78
152
|
}
|
|
79
|
-
.
|
|
153
|
+
._sizeM_1myve4k_16 > [data-rs-internal='collapse__button'] > [data-rs-internal='collapse__title']{
|
|
80
154
|
--_rs-typography-letter-spacing:normal;
|
|
81
155
|
--_rs-typography-text-transform:initial;
|
|
82
156
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -104,7 +178,7 @@
|
|
|
104
178
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
105
179
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
106
180
|
}
|
|
107
|
-
.
|
|
181
|
+
._sizeM_1myve4k_16 > [data-rs-internal='collapse__content']{
|
|
108
182
|
--_rs-typography-letter-spacing:0.0015em;
|
|
109
183
|
--_rs-typography-text-transform:initial;
|
|
110
184
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -139,16 +213,16 @@
|
|
|
139
213
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
140
214
|
}
|
|
141
215
|
@media screen and (max-width: 640px){
|
|
142
|
-
.
|
|
216
|
+
._sizeM_1myve4k_16 > [data-rs-internal='collapse__content']{
|
|
143
217
|
--_rs-typography-list-li-margin-top-from-text:12px;
|
|
144
218
|
}
|
|
145
219
|
}
|
|
146
|
-
.
|
|
220
|
+
._sizeL_1myve4k_19{
|
|
147
221
|
--_rs-collapse-vertical-padding:12px;
|
|
148
222
|
--_rs-collapse-horizontal-padding:16px;
|
|
149
223
|
--_rs-collapse-icon-size:28px;
|
|
150
224
|
}
|
|
151
|
-
.
|
|
225
|
+
._sizeL_1myve4k_19 > [data-rs-internal='collapse__button'] > [data-rs-internal='collapse__title']{
|
|
152
226
|
--_rs-typography-letter-spacing:normal;
|
|
153
227
|
--_rs-typography-text-transform:initial;
|
|
154
228
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -176,7 +250,7 @@
|
|
|
176
250
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
177
251
|
--_rs-typography-link-border-bottom-width-from-text:2px;
|
|
178
252
|
}
|
|
179
|
-
.
|
|
253
|
+
._sizeL_1myve4k_19 > [data-rs-internal='collapse__content']{
|
|
180
254
|
--_rs-typography-letter-spacing:normal;
|
|
181
255
|
--_rs-typography-text-transform:initial;
|
|
182
256
|
--_rs-typography-font-variant-numeric:initial;
|
|
@@ -211,11 +285,11 @@
|
|
|
211
285
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
212
286
|
}
|
|
213
287
|
@media screen and (max-width: 640px){
|
|
214
|
-
.
|
|
288
|
+
._sizeL_1myve4k_19 > [data-rs-internal='collapse__content']{
|
|
215
289
|
--_rs-typography-list-li-margin-top-from-text:16px;
|
|
216
290
|
}
|
|
217
291
|
}
|
|
218
|
-
.
|
|
292
|
+
._classic_1myve4k_23{
|
|
219
293
|
--_rs-collapse-active-theme-flip:0;
|
|
220
294
|
--_rs-collapse-active-background:rgba(
|
|
221
295
|
calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227),
|
|
@@ -229,7 +303,7 @@
|
|
|
229
303
|
);
|
|
230
304
|
--_rs-collapse-button-hover-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 1);
|
|
231
305
|
}
|
|
232
|
-
.
|
|
306
|
+
._rock_1myve4k_26{
|
|
233
307
|
--_rs-collapse-active-theme-flip:1;
|
|
234
308
|
--_rs-collapse-active-background:rgb(calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*230), calc(255 - var(--_rs-theme-dark-coefficient, 0)*227));
|
|
235
309
|
--_rs-collapse-active-border-bottom-to-padding-multiplier:1;
|
|
@@ -240,7 +314,7 @@
|
|
|
240
314
|
);
|
|
241
315
|
--_rs-collapse-button-hover-color:rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 1);
|
|
242
316
|
}
|
|
243
|
-
.
|
|
317
|
+
._clear_1myve4k_29{
|
|
244
318
|
--_rs-collapse-active-theme-flip:0;
|
|
245
319
|
--_rs-collapse-active-background:transparent;
|
|
246
320
|
--_rs-collapse-active-border-bottom-to-padding-multiplier:0;
|
|
@@ -251,27 +325,27 @@
|
|
|
251
325
|
0.7
|
|
252
326
|
);
|
|
253
327
|
}
|
|
254
|
-
.
|
|
328
|
+
._hasBorderBottom_1myve4k_33{
|
|
255
329
|
--_rs-collapse-border-bottom-width-or-initial:1px;
|
|
256
330
|
}
|
|
257
|
-
.
|
|
331
|
+
._leftIcon_1myve4k_37{
|
|
258
332
|
--_rs-collapse-button-flex-direction:row;
|
|
259
333
|
--_rs-collapse-icon-margin:0 var(--_rs-collapse-horizontal-padding) 0 0;
|
|
260
334
|
--_rs-collapse-inner-wrapper-padding-left-base:calc(var(--_rs-collapse-horizontal-padding)*2 + var(--_rs-collapse-icon-size));
|
|
261
335
|
}
|
|
262
|
-
.
|
|
336
|
+
._rightIcon_1myve4k_40{
|
|
263
337
|
--_rs-collapse-button-flex-direction:row-reverse;
|
|
264
338
|
--_rs-collapse-icon-margin:0 0 0 var(--_rs-collapse-horizontal-padding);
|
|
265
339
|
--_rs-collapse-inner-wrapper-padding-left-base:var(
|
|
266
340
|
--_rs-collapse-horizontal-padding
|
|
267
341
|
);
|
|
268
342
|
}
|
|
269
|
-
.
|
|
343
|
+
._disableLeftPadding_1myve4k_44{
|
|
270
344
|
--_rs-collapse-inner-wrapper-padding-left-from-disable-left-padding-or-initial:var(
|
|
271
345
|
--_rs-collapse-horizontal-padding
|
|
272
346
|
);
|
|
273
347
|
}
|
|
274
|
-
.
|
|
348
|
+
._main_1myve4k_48{
|
|
275
349
|
--_rs-theme-dark:var(
|
|
276
350
|
--_rs-internal-force-theme-dark-consult-rescui-before-using,
|
|
277
351
|
var(--rs-theme-dark, 0)
|
|
@@ -281,7 +355,7 @@
|
|
|
281
355
|
--_rs-theme-light-coefficient:calc(1 - var(--_rs-theme-dark-coefficient));
|
|
282
356
|
}
|
|
283
357
|
@supports (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
284
|
-
.
|
|
358
|
+
._main_1myve4k_48{
|
|
285
359
|
--_rs-color-primary:color-mix(in srgb, var(--rs-color-primary-light-theme, #6B57FF) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dark-theme, #8473FF) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
286
360
|
--_rs-color-primary-dim:color-mix(in srgb, var(--rs-color-primary-dim-light-theme, #8979ff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-dim-dark-theme, #6f61d2) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
287
361
|
--_rs-color-primary-fog:color-mix(in srgb, var(--rs-color-primary-fog-light-theme, #e1ddff) calc(100%*var(--_rs-theme-light-coefficient, 1)), var(--rs-color-primary-fog-dark-theme, #2e2b49) calc(100%*var(--_rs-theme-dark-coefficient, 0)));
|
|
@@ -290,7 +364,7 @@
|
|
|
290
364
|
}
|
|
291
365
|
}
|
|
292
366
|
@supports not (color: color-mix(in srgb, #fff 50%, #000 50%)){
|
|
293
|
-
.
|
|
367
|
+
._main_1myve4k_48{
|
|
294
368
|
--_rs-color-primary:rgb(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255);
|
|
295
369
|
--_rs-color-primary-dim:rgb(calc(var(--_rs-theme-light-coefficient, 1)*137 + var(--_rs-theme-dark-coefficient, 0)*111), calc(var(--_rs-theme-light-coefficient, 1)*121 + var(--_rs-theme-dark-coefficient, 0)*97), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*210));
|
|
296
370
|
--_rs-color-primary-fog:rgb(calc(var(--_rs-theme-light-coefficient, 1)*225 + var(--_rs-theme-dark-coefficient, 0)*46), calc(var(--_rs-theme-light-coefficient, 1)*221 + var(--_rs-theme-dark-coefficient, 0)*43), calc(var(--_rs-theme-light-coefficient, 1)*255 + var(--_rs-theme-dark-coefficient, 0)*73));
|
|
@@ -298,7 +372,7 @@
|
|
|
298
372
|
--_rs-color-primary-t-fog:rgba(calc(var(--_rs-theme-light-coefficient, 1)*107 + var(--_rs-theme-dark-coefficient, 0)*132), calc(var(--_rs-theme-light-coefficient, 1)*87 + var(--_rs-theme-dark-coefficient, 0)*115), 255, calc(var(--_rs-theme-light-coefficient, 1)*0.2 + var(--_rs-theme-dark-coefficient, 0)*0.3));
|
|
299
373
|
}
|
|
300
374
|
}
|
|
301
|
-
.
|
|
375
|
+
._main_1myve4k_48 {
|
|
302
376
|
--_rs-collapse-border-bottom-width:var(
|
|
303
377
|
--_rs-collapse-border-bottom-width-or-initial,
|
|
304
378
|
0px
|
|
@@ -313,9 +387,9 @@
|
|
|
313
387
|
border-bottom:var(--_rs-collapse-border-bottom-width) solid rgba(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227), 0.2);
|
|
314
388
|
border-radius:var(--rs-collapse-border-radius, 0px);
|
|
315
389
|
}
|
|
316
|
-
.
|
|
317
|
-
.
|
|
318
|
-
.
|
|
390
|
+
._main_1myve4k_48._opening_1myve4k_59,
|
|
391
|
+
._main_1myve4k_48._opened_1myve4k_60,
|
|
392
|
+
._main_1myve4k_48._closing_1myve4k_61{
|
|
319
393
|
--rs-theme-flip:var(--_rs-collapse-active-theme-flip);
|
|
320
394
|
|
|
321
395
|
padding-bottom:calc(var(--_rs-collapse-border-bottom-width)*var(--_rs-collapse-active-border-bottom-to-padding-multiplier));
|
|
@@ -325,7 +399,7 @@
|
|
|
325
399
|
background:var(--_rs-collapse-active-background);
|
|
326
400
|
}
|
|
327
401
|
@media (hover: hover){
|
|
328
|
-
.
|
|
402
|
+
._main_1myve4k_48:hover{
|
|
329
403
|
--rs-theme-flip:var(--_rs-collapse-active-theme-flip);
|
|
330
404
|
|
|
331
405
|
padding-bottom:calc(var(--_rs-collapse-border-bottom-width)*var(--_rs-collapse-active-border-bottom-to-padding-multiplier));
|
|
@@ -335,7 +409,7 @@
|
|
|
335
409
|
background:var(--_rs-collapse-active-background);
|
|
336
410
|
}
|
|
337
411
|
}
|
|
338
|
-
.
|
|
412
|
+
._title_1myve4k_95{
|
|
339
413
|
letter-spacing:var(
|
|
340
414
|
--rs-text-base-letter-spacing,
|
|
341
415
|
var(--_rs-typography-letter-spacing)
|
|
@@ -348,12 +422,6 @@
|
|
|
348
422
|
font-variant-numeric:var(--_rs-typography-font-variant-numeric);
|
|
349
423
|
-webkit-font-feature-settings:'kern', 'liga', 'calt';
|
|
350
424
|
font-feature-settings:'kern', 'liga', 'calt';
|
|
351
|
-
}
|
|
352
|
-
._title_1cw3s8q_95 > p:not(:nth-child(1)),
|
|
353
|
-
._title_1cw3s8q_95 > pre:not(:nth-child(1)){
|
|
354
|
-
padding-top:var(--_rs-typography-auto-offset-or-initial);
|
|
355
|
-
}
|
|
356
|
-
._title_1cw3s8q_95 {
|
|
357
425
|
|
|
358
426
|
-webkit-box-flex:1;
|
|
359
427
|
|
|
@@ -363,7 +431,7 @@
|
|
|
363
431
|
|
|
364
432
|
color:inherit;
|
|
365
433
|
}
|
|
366
|
-
.
|
|
434
|
+
._content_1myve4k_103{
|
|
367
435
|
letter-spacing:var(
|
|
368
436
|
--rs-text-base-letter-spacing,
|
|
369
437
|
var(--_rs-typography-letter-spacing)
|
|
@@ -376,12 +444,6 @@
|
|
|
376
444
|
font-variant-numeric:var(--_rs-typography-font-variant-numeric);
|
|
377
445
|
-webkit-font-feature-settings:'kern', 'liga', 'calt';
|
|
378
446
|
font-feature-settings:'kern', 'liga', 'calt';
|
|
379
|
-
}
|
|
380
|
-
._content_1cw3s8q_103 > p:not(:nth-child(1)),
|
|
381
|
-
._content_1cw3s8q_103 > pre:not(:nth-child(1)){
|
|
382
|
-
padding-top:var(--_rs-typography-auto-offset-or-initial);
|
|
383
|
-
}
|
|
384
|
-
._content_1cw3s8q_103 {
|
|
385
447
|
--_rs-typography-hardness-color:var(
|
|
386
448
|
--rs-color-hard,
|
|
387
449
|
rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227))
|
|
@@ -393,24 +455,24 @@
|
|
|
393
455
|
|
|
394
456
|
color:var(--_rs-typography-hardness-color);
|
|
395
457
|
}
|
|
396
|
-
.
|
|
458
|
+
._closed_1myve4k_113 > ._content_1myve4k_103{
|
|
397
459
|
display:none;
|
|
398
460
|
}
|
|
399
|
-
.
|
|
461
|
+
._opened_1myve4k_60 > ._content_1myve4k_103{
|
|
400
462
|
height:initial;
|
|
401
463
|
}
|
|
402
|
-
.
|
|
403
|
-
.
|
|
464
|
+
._opening_1myve4k_59 > ._content_1myve4k_103,
|
|
465
|
+
._closingTransition_1myve4k_122 > ._content_1myve4k_103{
|
|
404
466
|
overflow:hidden;
|
|
405
467
|
|
|
406
468
|
-webkit-transition:height 300ms;
|
|
407
469
|
|
|
408
470
|
transition:height 300ms;
|
|
409
471
|
}
|
|
410
|
-
.
|
|
472
|
+
._innerWrapper_1myve4k_129{
|
|
411
473
|
padding:0 var(--_rs-collapse-horizontal-padding) var(--_rs-collapse-horizontal-padding) var(--_rs-collapse-inner-wrapper-padding-left);
|
|
412
474
|
}
|
|
413
|
-
.
|
|
475
|
+
._button_1myve4k_135{
|
|
414
476
|
--_rs-typography-hardness-color:var(
|
|
415
477
|
--rs-color-hard,
|
|
416
478
|
rgb(calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(25 + var(--_rs-theme-dark-coefficient, 0)*230), calc(28 + var(--_rs-theme-dark-coefficient, 0)*227))
|
|
@@ -455,25 +517,25 @@
|
|
|
455
517
|
-moz-osx-font-smoothing:inherit;
|
|
456
518
|
-webkit-appearance:none;
|
|
457
519
|
}
|
|
458
|
-
.
|
|
520
|
+
._button_1myve4k_135::-moz-focus-inner{
|
|
459
521
|
padding:0;
|
|
460
522
|
|
|
461
523
|
border:0;
|
|
462
524
|
}
|
|
463
|
-
.
|
|
525
|
+
._button_1myve4k_135:focus{
|
|
464
526
|
outline:none;
|
|
465
527
|
}
|
|
466
|
-
.
|
|
528
|
+
._button_1myve4k_135:focus[data-focus-method='key']{
|
|
467
529
|
-webkit-box-shadow:var(--_rs-color-primary-t-dim) 0 0 0 4px;
|
|
468
530
|
box-shadow:var(--_rs-color-primary-t-dim) 0 0 0 4px;
|
|
469
531
|
}
|
|
470
532
|
@media (hover: hover){
|
|
471
|
-
.
|
|
533
|
+
._button_1myve4k_135:hover{
|
|
472
534
|
color:var(--_rs-collapse-button-hover-color);
|
|
473
535
|
background:var(--_rs-collapse-button-hover-background);
|
|
474
536
|
}
|
|
475
537
|
}
|
|
476
|
-
.
|
|
538
|
+
._icon_1myve4k_190{
|
|
477
539
|
position:relative;
|
|
478
540
|
top:0;
|
|
479
541
|
left:0;
|
|
@@ -500,17 +562,17 @@
|
|
|
500
562
|
|
|
501
563
|
will-change:transform;
|
|
502
564
|
}
|
|
503
|
-
.
|
|
504
|
-
.
|
|
565
|
+
._opening_1myve4k_59._iconPlus_1myve4k_206 > ._button_1myve4k_135 > ._icon_1myve4k_190,
|
|
566
|
+
._opened_1myve4k_60._iconPlus_1myve4k_206 > ._button_1myve4k_135 > ._icon_1myve4k_190{
|
|
505
567
|
-webkit-transform:rotate(45deg);
|
|
506
568
|
transform:rotate(45deg);
|
|
507
569
|
}
|
|
508
|
-
.
|
|
509
|
-
.
|
|
570
|
+
._opening_1myve4k_59._iconArrow_1myve4k_211 > ._button_1myve4k_135 > ._icon_1myve4k_190,
|
|
571
|
+
._opened_1myve4k_60._iconArrow_1myve4k_211 > ._button_1myve4k_135 > ._icon_1myve4k_190{
|
|
510
572
|
-webkit-transform:rotate(90deg);
|
|
511
573
|
transform:rotate(90deg);
|
|
512
574
|
}
|
|
513
|
-
.
|
|
575
|
+
._accordion_1myve4k_217{
|
|
514
576
|
display:-webkit-box;
|
|
515
577
|
display:-ms-flexbox;
|
|
516
578
|
display:flex;
|
|
@@ -520,21 +582,21 @@
|
|
|
520
582
|
flex-direction:column;
|
|
521
583
|
row-gap:var(--_rs-collapse-accordion-gap);
|
|
522
584
|
}
|
|
523
|
-
.
|
|
585
|
+
._accordionGap0_1myve4k_222{
|
|
524
586
|
--_rs-collapse-accordion-gap:0px;
|
|
525
587
|
}
|
|
526
|
-
.
|
|
588
|
+
._accordionGap8_1myve4k_225{
|
|
527
589
|
--_rs-collapse-accordion-gap:8px;
|
|
528
590
|
}
|
|
529
|
-
.
|
|
591
|
+
._accordionGap12_1myve4k_228{
|
|
530
592
|
--_rs-collapse-accordion-gap:12px;
|
|
531
593
|
}
|
|
532
|
-
.
|
|
594
|
+
._accordionGap16_1myve4k_231{
|
|
533
595
|
--_rs-collapse-accordion-gap:16px;
|
|
534
596
|
}
|
|
535
|
-
.
|
|
597
|
+
._accordionGap24_1myve4k_234{
|
|
536
598
|
--_rs-collapse-accordion-gap:24px;
|
|
537
599
|
}
|
|
538
|
-
.
|
|
600
|
+
._accordionGap32_1myve4k_237{
|
|
539
601
|
--_rs-collapse-accordion-gap:32px;
|
|
540
602
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/collapse",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime-corejs3": "^7.14.0",
|
|
18
|
-
"@rescui/
|
|
19
|
-
"@rescui/use-resize-observer": "^0.2.1",
|
|
18
|
+
"@rescui/use-resize-observer": "^0.2.3",
|
|
20
19
|
"classnames": "^2.2.6",
|
|
21
20
|
"core-js": "^3.9.1"
|
|
22
21
|
},
|
|
@@ -26,9 +25,9 @@
|
|
|
26
25
|
"react": ">=16.8.0 <19"
|
|
27
26
|
},
|
|
28
27
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "^0.2.
|
|
30
|
-
"@rescui/scripts": "^0.3.
|
|
31
|
-
"@rescui/typography": "^0.
|
|
28
|
+
"@rescui/colors": "^0.2.3",
|
|
29
|
+
"@rescui/scripts": "^0.3.3",
|
|
30
|
+
"@rescui/typography": "^0.17.0",
|
|
32
31
|
"@rescui/visual-regression": "^0.1.2",
|
|
33
32
|
"@types/classnames": "^2.2.11"
|
|
34
33
|
},
|
|
@@ -37,5 +36,5 @@
|
|
|
37
36
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
38
37
|
},
|
|
39
38
|
"nx": {},
|
|
40
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "b422496bacb5df4a601008c646abfb08cebe461c"
|
|
41
40
|
}
|