@rescui/menu 0.10.9 → 0.10.11-RUI-226-Update-card-cn-6e43cc89.60
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/index.css +63 -81
- package/lib/index.p.module.css.js +26 -26
- package/lib/menu.js +33 -53
- package/lib/parts/divider.js +13 -28
- package/lib/parts/group-header.js +12 -14
- package/lib/parts/menu-context.js +10 -13
- package/lib/parts/menu-item.js +53 -78
- package/lib/parts/navigation-utils.js +4 -12
- package/lib/parts/use-menu-keyboard-navigation.js +32 -52
- package/lib/public-api.p.css +32 -20
- package/lib/public-api.pcss +32 -20
- package/package.json +9 -9
package/lib/parts/menu-item.js
CHANGED
|
@@ -1,87 +1,60 @@
|
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
|
2
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
|
3
|
-
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
4
|
-
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
6
|
-
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
7
|
-
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
8
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
9
|
-
import _typeof from "@babel/runtime-corejs3/helpers/esm/typeof";
|
|
10
|
-
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
11
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
|
12
|
-
var _excluded = ["className", "tag", "children", "icon", "size", "mode", "theme", "disabled", "disableCursor", "selected", "highlighted", "iconPlacement"],
|
|
13
|
-
_excluded2 = ["unregisterItem", "registerItem", "activeItemRef", "isKeyboardNavigating", "wrapWithLi"];
|
|
14
|
-
|
|
15
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
-
|
|
17
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
-
|
|
19
1
|
import React, { useState, useEffect, cloneElement } from 'react';
|
|
20
2
|
import cn from 'classnames';
|
|
21
3
|
import PropTypes from 'prop-types';
|
|
22
4
|
import { useThemeWithUndefined } from '@rescui/ui-contexts';
|
|
23
5
|
import styles from '../index.p.module.css.js';
|
|
24
6
|
import { useMenuContext } from './menu-context.js';
|
|
25
|
-
|
|
7
|
+
const ICON_PLACEMENT_STYLES = {
|
|
26
8
|
left: styles.iconPlacementLeft,
|
|
27
9
|
right: styles.iconPlacementRight
|
|
28
10
|
};
|
|
29
|
-
|
|
11
|
+
const MODE_STYLES = {
|
|
30
12
|
classic: styles.modeClassic,
|
|
31
13
|
clear: styles.modeClear,
|
|
32
14
|
rock: styles.modeRock
|
|
33
15
|
};
|
|
34
|
-
|
|
16
|
+
const SIZE_STYLES = {
|
|
35
17
|
s: styles.sizeS,
|
|
36
18
|
m: styles.sizeM,
|
|
37
19
|
l: styles.sizeL
|
|
38
20
|
};
|
|
39
|
-
|
|
21
|
+
const THEME_STYLES = {
|
|
40
22
|
light: styles.themeLight,
|
|
41
23
|
dark: styles.themeDark
|
|
42
24
|
}; // eslint-disable-next-line complexity
|
|
43
25
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var _useState = useState(null),
|
|
75
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
76
|
-
thisRef = _useState2[0],
|
|
77
|
-
setThisRef = _useState2[1];
|
|
78
|
-
|
|
79
|
-
useEffect(function () {
|
|
80
|
-
return function () {
|
|
81
|
-
return unregisterItem(thisRef);
|
|
82
|
-
};
|
|
26
|
+
const MenuItemInner = (_ref, ref) => {
|
|
27
|
+
let {
|
|
28
|
+
className,
|
|
29
|
+
tag,
|
|
30
|
+
children,
|
|
31
|
+
icon,
|
|
32
|
+
size = 'm',
|
|
33
|
+
mode = 'classic',
|
|
34
|
+
theme,
|
|
35
|
+
disabled,
|
|
36
|
+
disableCursor,
|
|
37
|
+
selected,
|
|
38
|
+
|
|
39
|
+
/* @private */
|
|
40
|
+
highlighted,
|
|
41
|
+
iconPlacement = 'left',
|
|
42
|
+
...restProps
|
|
43
|
+
} = _ref;
|
|
44
|
+
const {
|
|
45
|
+
unregisterItem,
|
|
46
|
+
registerItem,
|
|
47
|
+
activeItemRef,
|
|
48
|
+
isKeyboardNavigating,
|
|
49
|
+
wrapWithLi,
|
|
50
|
+
...menuContext
|
|
51
|
+
} = useMenuContext();
|
|
52
|
+
const actualTheme = useThemeWithUndefined(menuContext.theme ?? theme);
|
|
53
|
+
const [thisRef, setThisRef] = useState(null);
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
return () => unregisterItem(thisRef);
|
|
83
56
|
}, [unregisterItem, thisRef]);
|
|
84
|
-
|
|
57
|
+
let autoTag = 'span';
|
|
85
58
|
|
|
86
59
|
if (restProps.href) {
|
|
87
60
|
autoTag = 'a';
|
|
@@ -89,28 +62,29 @@ var MenuItemInner = function MenuItemInner(_ref, ref) {
|
|
|
89
62
|
autoTag = 'button';
|
|
90
63
|
}
|
|
91
64
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
className: cn(icon.props.className, styles.icon)
|
|
65
|
+
const Tag = menuContext.itemTag ?? tag ?? autoTag;
|
|
66
|
+
const actualIconPlacement = menuContext.iconPlacement ?? iconPlacement ?? 'left';
|
|
67
|
+
const actualMode = menuContext.mode ?? mode;
|
|
68
|
+
const actualSize = menuContext.size ?? size;
|
|
69
|
+
const actualDisableCursor = menuContext.disableCursor ?? disableCursor;
|
|
70
|
+
const iconElement = icon ? /*#__PURE__*/cloneElement(icon, {
|
|
71
|
+
className: cn(icon.props.className, styles.icon),
|
|
72
|
+
'data-render-all-sizes': true
|
|
99
73
|
}) : null;
|
|
100
|
-
|
|
74
|
+
const actualHighlighted = highlighted || activeItemRef === thisRef && isKeyboardNavigating;
|
|
101
75
|
|
|
102
|
-
|
|
76
|
+
const handleRef = r => {
|
|
103
77
|
registerItem(r);
|
|
104
78
|
setThisRef(r);
|
|
105
79
|
|
|
106
80
|
if (typeof ref === 'function') {
|
|
107
81
|
ref(r);
|
|
108
|
-
} else if (ref != null &&
|
|
82
|
+
} else if (ref != null && typeof ref === 'object') {
|
|
109
83
|
ref.current = r;
|
|
110
84
|
}
|
|
111
85
|
};
|
|
112
86
|
|
|
113
|
-
|
|
87
|
+
const handleKeyDown = e => {
|
|
114
88
|
if (isKeyboardNavigating && (e.key === ' ' || e.key === 'Enter')) {
|
|
115
89
|
e.preventDefault();
|
|
116
90
|
|
|
@@ -120,24 +94,25 @@ var MenuItemInner = function MenuItemInner(_ref, ref) {
|
|
|
120
94
|
}
|
|
121
95
|
};
|
|
122
96
|
|
|
123
|
-
|
|
97
|
+
const Wrapper = wrapWithLi ? 'li' : 'div';
|
|
124
98
|
return /*#__PURE__*/React.createElement(Wrapper, {
|
|
125
99
|
className: cn(styles.wrapper, className, ICON_PLACEMENT_STYLES[actualIconPlacement], MODE_STYLES[actualMode], SIZE_STYLES[actualSize], THEME_STYLES[actualTheme]),
|
|
126
100
|
"data-test": 'menu-item__wrapper',
|
|
127
101
|
"data-rs-internal": 'menu__menu-item'
|
|
128
|
-
}, /*#__PURE__*/React.createElement(Tag,
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
129
103
|
onKeyDown: handleKeyDown,
|
|
130
104
|
ref: handleRef,
|
|
131
105
|
className: cn(styles.menuItem, (menuContext.disabled || disabled) && styles.disabled, selected && styles.selected, actualHighlighted && styles.highlighted, actualDisableCursor && styles.disableCursor),
|
|
132
106
|
"data-test": 'menu-item',
|
|
133
107
|
"data-rs-internal": 'menu__menu-item__inner',
|
|
134
|
-
tabIndex: 0
|
|
135
|
-
|
|
108
|
+
tabIndex: 0,
|
|
109
|
+
...restProps
|
|
110
|
+
}, iconElement, /*#__PURE__*/React.createElement("span", {
|
|
136
111
|
className: styles.content
|
|
137
112
|
}, children)));
|
|
138
113
|
};
|
|
139
114
|
|
|
140
|
-
|
|
115
|
+
const MenuItem = /*#__PURE__*/React.forwardRef(MenuItemInner);
|
|
141
116
|
MenuItem.propTypes = {
|
|
142
117
|
size: PropTypes.oneOf(['l', 'm', 's']),
|
|
143
118
|
mode: PropTypes.oneOf(['clear', 'classic', 'rock']),
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _findIndexInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find-index";
|
|
2
|
-
|
|
3
1
|
function getFirstItem(sortedItems) {
|
|
4
2
|
return sortedItems[0];
|
|
5
3
|
}
|
|
@@ -9,11 +7,8 @@ function getLastItem(sortedItems) {
|
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
function getNextItem(sortedItems, activeItem) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
var indexToFocus = focusedIndex + 1;
|
|
10
|
+
const focusedIndex = sortedItems.findIndex(el => el === activeItem);
|
|
11
|
+
const indexToFocus = focusedIndex + 1;
|
|
17
12
|
|
|
18
13
|
if (indexToFocus < sortedItems.length) {
|
|
19
14
|
return sortedItems[indexToFocus];
|
|
@@ -23,11 +18,8 @@ function getNextItem(sortedItems, activeItem) {
|
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
function getPrevItem(sortedItems, activeItem) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
var indexToFocus = focusedIndex - 1;
|
|
21
|
+
const focusedIndex = sortedItems.findIndex(el => el === activeItem);
|
|
22
|
+
const indexToFocus = focusedIndex - 1;
|
|
31
23
|
|
|
32
24
|
if (indexToFocus >= 0) {
|
|
33
25
|
return sortedItems[indexToFocus];
|
|
@@ -1,62 +1,49 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
2
|
-
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
3
|
-
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
|
4
|
-
import _valuesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/values";
|
|
5
|
-
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
6
1
|
import { useRef, useState, useCallback, useEffect } from 'react';
|
|
7
2
|
import { getLastItem, getFirstItem, getPrevItem, getNextItem, htmlElementsComparator } from './navigation-utils.js';
|
|
8
3
|
|
|
9
4
|
function debounce(callback, timeout) {
|
|
10
|
-
|
|
5
|
+
let id;
|
|
11
6
|
return function () {
|
|
12
7
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13
8
|
args[_key] = arguments[_key];
|
|
14
9
|
}
|
|
15
10
|
|
|
16
11
|
clearTimeout(id);
|
|
17
|
-
id = setTimeout(
|
|
18
|
-
return callback.apply(void 0, args);
|
|
19
|
-
}, timeout);
|
|
12
|
+
id = setTimeout(() => callback(...args), timeout);
|
|
20
13
|
return id;
|
|
21
14
|
};
|
|
22
15
|
}
|
|
23
16
|
|
|
24
17
|
function getSortedItems(itemsSet) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return _sortInstanceProperty(_context = _Array$from(_valuesInstanceProperty(itemsSet).call(itemsSet))).call(_context, htmlElementsComparator);
|
|
18
|
+
return Array.from(itemsSet.values()).sort(htmlElementsComparator);
|
|
28
19
|
}
|
|
29
20
|
|
|
30
21
|
function useMenuKeyboardNavigation(_ref) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var setActiveItemRef = useCallback(function (ref) {
|
|
22
|
+
let {
|
|
23
|
+
enableKeyboardNavigation,
|
|
24
|
+
activateFirstItem,
|
|
25
|
+
returnFocusOnUnmount
|
|
26
|
+
} = _ref;
|
|
27
|
+
const activeItemRef = useRef(null);
|
|
28
|
+
const [, setDummyState] = useState(false);
|
|
29
|
+
const setActiveItemRef = useCallback(ref => {
|
|
41
30
|
activeItemRef.current = ref;
|
|
42
31
|
|
|
43
32
|
if (ref) {
|
|
44
33
|
ref.focus();
|
|
45
34
|
}
|
|
46
35
|
|
|
47
|
-
setDummyState(
|
|
48
|
-
return !t;
|
|
49
|
-
});
|
|
36
|
+
setDummyState(t => !t);
|
|
50
37
|
}, [setDummyState]);
|
|
51
|
-
|
|
52
|
-
useEffect(
|
|
38
|
+
const menuItemsSet = useRef(new Set());
|
|
39
|
+
useEffect(() => {
|
|
53
40
|
if (!enableKeyboardNavigation || !activateFirstItem || !returnFocusOnUnmount) {
|
|
54
41
|
return;
|
|
55
42
|
}
|
|
56
43
|
|
|
57
|
-
|
|
44
|
+
const lastFocusedEl = document.activeElement; // eslint-disable-next-line consistent-return
|
|
58
45
|
|
|
59
|
-
return
|
|
46
|
+
return () => {
|
|
60
47
|
if (lastFocusedEl) {
|
|
61
48
|
lastFocusedEl.focus({
|
|
62
49
|
preventScroll: true
|
|
@@ -64,11 +51,11 @@ function useMenuKeyboardNavigation(_ref) {
|
|
|
64
51
|
}
|
|
65
52
|
};
|
|
66
53
|
}, []);
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
const debouncedActivateFirstItem = debounce(() => {
|
|
55
|
+
const items = getSortedItems(menuItemsSet.current);
|
|
69
56
|
setActiveItemRef(getFirstItem(items));
|
|
70
57
|
}, 50);
|
|
71
|
-
|
|
58
|
+
const registerItem = useCallback(ref => {
|
|
72
59
|
if (ref && !menuItemsSet.current.has(ref)) {
|
|
73
60
|
menuItemsSet.current.add(ref);
|
|
74
61
|
|
|
@@ -77,16 +64,11 @@ function useMenuKeyboardNavigation(_ref) {
|
|
|
77
64
|
}
|
|
78
65
|
}
|
|
79
66
|
}, []);
|
|
80
|
-
|
|
67
|
+
const unregisterItem = useCallback(ref => {
|
|
81
68
|
menuItemsSet.current.delete(ref);
|
|
82
69
|
}, []);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
86
|
-
isKeyboardNavigating = _useState4[0],
|
|
87
|
-
setIsKeyboardNavigating = _useState4[1];
|
|
88
|
-
|
|
89
|
-
var handleMouseMove = useCallback(function () {
|
|
70
|
+
const [isKeyboardNavigating, setIsKeyboardNavigating] = useState(true);
|
|
71
|
+
const handleMouseMove = useCallback(() => {
|
|
90
72
|
if (menuItemsSet.current.has(document.activeElement) && document.activeElement.blur) {
|
|
91
73
|
document.activeElement.blur();
|
|
92
74
|
}
|
|
@@ -95,22 +77,20 @@ function useMenuKeyboardNavigation(_ref) {
|
|
|
95
77
|
setIsKeyboardNavigating(false);
|
|
96
78
|
}, []); // eslint-disable-next-line consistent-return
|
|
97
79
|
|
|
98
|
-
useEffect(
|
|
80
|
+
useEffect(() => {
|
|
99
81
|
if (isKeyboardNavigating) {
|
|
100
82
|
document.addEventListener('mousemove', handleMouseMove);
|
|
101
|
-
return
|
|
102
|
-
return document.removeEventListener('mousemove', handleMouseMove);
|
|
103
|
-
};
|
|
83
|
+
return () => document.removeEventListener('mousemove', handleMouseMove);
|
|
104
84
|
}
|
|
105
85
|
}, [handleMouseMove, isKeyboardNavigating]);
|
|
106
|
-
useEffect(
|
|
86
|
+
useEffect(() => {
|
|
107
87
|
if (!enableKeyboardNavigation) {
|
|
108
88
|
return;
|
|
109
89
|
}
|
|
110
90
|
|
|
111
|
-
|
|
91
|
+
const handler = e => {
|
|
112
92
|
setIsKeyboardNavigating(true);
|
|
113
|
-
|
|
93
|
+
const items = getSortedItems(menuItemsSet.current);
|
|
114
94
|
|
|
115
95
|
switch (e.key) {
|
|
116
96
|
case 'ArrowDown':
|
|
@@ -137,15 +117,15 @@ function useMenuKeyboardNavigation(_ref) {
|
|
|
137
117
|
|
|
138
118
|
document.addEventListener('keydown', handler, true); // eslint-disable-next-line consistent-return
|
|
139
119
|
|
|
140
|
-
return
|
|
120
|
+
return () => {
|
|
141
121
|
document.removeEventListener('keydown', handler, true);
|
|
142
122
|
};
|
|
143
123
|
}, [enableKeyboardNavigation]);
|
|
144
124
|
return {
|
|
145
|
-
activeItemRef
|
|
146
|
-
registerItem
|
|
147
|
-
unregisterItem
|
|
148
|
-
isKeyboardNavigating
|
|
125
|
+
activeItemRef,
|
|
126
|
+
registerItem,
|
|
127
|
+
unregisterItem,
|
|
128
|
+
isKeyboardNavigating
|
|
149
129
|
};
|
|
150
130
|
}
|
|
151
131
|
|
package/lib/public-api.p.css
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
--_rs-menu-mi-icon-offset:8px;
|
|
4
4
|
--_rs-menu-mi-vertical-padding:6px;
|
|
5
5
|
--_rs-menu-mi-horizontal-padding:8px;
|
|
6
|
-
--_rs-typography-letter-spacing:0.0045em;
|
|
6
|
+
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
7
7
|
--_rs-typography-text-transform:initial;
|
|
8
8
|
--_rs-typography-font-variant-numeric:initial;
|
|
9
9
|
--_rs-typography-font-family:var(
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
& [data-rs-internal="menu__group-header"]{
|
|
40
40
|
--_rs-menu-gh-vertical-padding:6px;
|
|
41
41
|
--_rs-menu-gh-horizontal-padding:8px;
|
|
42
|
-
--_rs-typography-letter-spacing:normal;
|
|
42
|
+
--_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
|
|
43
43
|
--_rs-typography-text-transform:initial;
|
|
44
44
|
--_rs-typography-font-variant-numeric:initial;
|
|
45
45
|
--_rs-typography-font-family:var(
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
--_rs-menu-mi-icon-offset:8px;
|
|
76
76
|
--_rs-menu-mi-vertical-padding:8px;
|
|
77
77
|
--_rs-menu-mi-horizontal-padding:16px;
|
|
78
|
-
--_rs-typography-letter-spacing:0.0015em;
|
|
78
|
+
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
79
79
|
--_rs-typography-text-transform:initial;
|
|
80
80
|
--_rs-typography-font-variant-numeric:initial;
|
|
81
81
|
--_rs-typography-font-family:var(
|
|
@@ -103,20 +103,23 @@
|
|
|
103
103
|
--_rs-typography-text-auto-offset:16px;
|
|
104
104
|
--_rs-typography-ul-list-li-padding-left:22px;
|
|
105
105
|
--_rs-typography-ol-list-li-padding-left:26px;
|
|
106
|
-
--_rs-typography-list-li-margin-top-from-text:
|
|
106
|
+
--_rs-typography-list-li-margin-top-from-text:var(
|
|
107
|
+
--_rs-typography-text-2-sm-list-li-margin-top-from-text,
|
|
108
|
+
16px
|
|
109
|
+
);
|
|
107
110
|
--_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
|
|
108
111
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
109
112
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
110
113
|
}
|
|
111
114
|
@media screen and (max-width: 640px){
|
|
112
115
|
& [data-rs-internal="menu__menu-item"]{
|
|
113
|
-
--_rs-typography-list-li-margin-top-from-text:12px;
|
|
116
|
+
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
& [data-rs-internal="menu__group-header"]{
|
|
117
120
|
--_rs-menu-gh-vertical-padding:8px;
|
|
118
121
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
119
|
-
--_rs-typography-letter-spacing:normal;
|
|
122
|
+
--_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
|
|
120
123
|
--_rs-typography-text-transform:initial;
|
|
121
124
|
--_rs-typography-font-variant-numeric:initial;
|
|
122
125
|
--_rs-typography-font-family:var(
|
|
@@ -152,7 +155,7 @@
|
|
|
152
155
|
--_rs-menu-mi-icon-offset:16px;
|
|
153
156
|
--_rs-menu-mi-vertical-padding:12px;
|
|
154
157
|
--_rs-menu-mi-horizontal-padding:16px;
|
|
155
|
-
--_rs-typography-letter-spacing:normal;
|
|
158
|
+
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
156
159
|
--_rs-typography-text-transform:initial;
|
|
157
160
|
--_rs-typography-font-variant-numeric:initial;
|
|
158
161
|
--_rs-typography-font-family:var(
|
|
@@ -180,20 +183,23 @@
|
|
|
180
183
|
--_rs-typography-text-auto-offset:32px;
|
|
181
184
|
--_rs-typography-ul-list-li-padding-left:26px;
|
|
182
185
|
--_rs-typography-ol-list-li-padding-left:32px;
|
|
183
|
-
--_rs-typography-list-li-margin-top-from-text:
|
|
186
|
+
--_rs-typography-list-li-margin-top-from-text:var(
|
|
187
|
+
--_rs-typography-text-1-sm-list-li-margin-top-from-text,
|
|
188
|
+
24px
|
|
189
|
+
);
|
|
184
190
|
--_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
|
|
185
191
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
186
192
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
187
193
|
}
|
|
188
194
|
@media screen and (max-width: 640px){
|
|
189
195
|
& [data-rs-internal="menu__menu-item"]{
|
|
190
|
-
--_rs-typography-list-li-margin-top-from-text:16px;
|
|
196
|
+
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
191
197
|
}
|
|
192
198
|
}
|
|
193
199
|
& [data-rs-internal="menu__group-header"]{
|
|
194
200
|
--_rs-menu-gh-vertical-padding:12px;
|
|
195
201
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
196
|
-
--_rs-typography-letter-spacing:normal;
|
|
202
|
+
--_rs-typography-letter-spacing:var(--rs-h3-letter-spacing, normal);
|
|
197
203
|
--_rs-typography-text-transform:initial;
|
|
198
204
|
--_rs-typography-font-variant-numeric:initial;
|
|
199
205
|
--_rs-typography-font-family:var(
|
|
@@ -288,7 +294,7 @@
|
|
|
288
294
|
--_rs-menu-mi-icon-offset:8px;
|
|
289
295
|
--_rs-menu-mi-vertical-padding:6px;
|
|
290
296
|
--_rs-menu-mi-horizontal-padding:8px;
|
|
291
|
-
--_rs-typography-letter-spacing:0.0045em;
|
|
297
|
+
--_rs-typography-letter-spacing:var(--rs-text-3-letter-spacing, 0.0045em);
|
|
292
298
|
--_rs-typography-text-transform:initial;
|
|
293
299
|
--_rs-typography-font-variant-numeric:initial;
|
|
294
300
|
--_rs-typography-font-family:var(
|
|
@@ -327,7 +333,7 @@
|
|
|
327
333
|
--_rs-menu-mi-icon-offset:8px;
|
|
328
334
|
--_rs-menu-mi-vertical-padding:8px;
|
|
329
335
|
--_rs-menu-mi-horizontal-padding:16px;
|
|
330
|
-
--_rs-typography-letter-spacing:0.0015em;
|
|
336
|
+
--_rs-typography-letter-spacing:var(--rs-text-2-letter-spacing, 0.0015em);
|
|
331
337
|
--_rs-typography-text-transform:initial;
|
|
332
338
|
--_rs-typography-font-variant-numeric:initial;
|
|
333
339
|
--_rs-typography-font-family:var(
|
|
@@ -355,14 +361,17 @@
|
|
|
355
361
|
--_rs-typography-text-auto-offset:16px;
|
|
356
362
|
--_rs-typography-ul-list-li-padding-left:22px;
|
|
357
363
|
--_rs-typography-ol-list-li-padding-left:26px;
|
|
358
|
-
--_rs-typography-list-li-margin-top-from-text:
|
|
364
|
+
--_rs-typography-list-li-margin-top-from-text:var(
|
|
365
|
+
--_rs-typography-text-2-sm-list-li-margin-top-from-text,
|
|
366
|
+
16px
|
|
367
|
+
);
|
|
359
368
|
--_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
|
|
360
369
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
361
370
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
362
371
|
}
|
|
363
372
|
@media screen and (max-width: 640px){
|
|
364
373
|
&[class]{
|
|
365
|
-
--_rs-typography-list-li-margin-top-from-text:12px;
|
|
374
|
+
--_rs-typography-text-2-sm-list-li-margin-top-from-text:12px;
|
|
366
375
|
}
|
|
367
376
|
}
|
|
368
377
|
}
|
|
@@ -371,7 +380,7 @@
|
|
|
371
380
|
--_rs-menu-mi-icon-offset:16px;
|
|
372
381
|
--_rs-menu-mi-vertical-padding:12px;
|
|
373
382
|
--_rs-menu-mi-horizontal-padding:16px;
|
|
374
|
-
--_rs-typography-letter-spacing:normal;
|
|
383
|
+
--_rs-typography-letter-spacing:var(--rs-text-1-letter-spacing, normal);
|
|
375
384
|
--_rs-typography-text-transform:initial;
|
|
376
385
|
--_rs-typography-font-variant-numeric:initial;
|
|
377
386
|
--_rs-typography-font-family:var(
|
|
@@ -399,14 +408,17 @@
|
|
|
399
408
|
--_rs-typography-text-auto-offset:32px;
|
|
400
409
|
--_rs-typography-ul-list-li-padding-left:26px;
|
|
401
410
|
--_rs-typography-ol-list-li-padding-left:32px;
|
|
402
|
-
--_rs-typography-list-li-margin-top-from-text:
|
|
411
|
+
--_rs-typography-list-li-margin-top-from-text:var(
|
|
412
|
+
--_rs-typography-text-1-sm-list-li-margin-top-from-text,
|
|
413
|
+
24px
|
|
414
|
+
);
|
|
403
415
|
--_rs-typography-link-standalone-border-offset-from-text-base:1.15em;
|
|
404
416
|
--_rs-typography-link-external-standalone-border-offset-from-text-base:1.02em;
|
|
405
417
|
--_rs-typography-link-border-bottom-width-from-text:1px;
|
|
406
418
|
}
|
|
407
419
|
@media screen and (max-width: 640px){
|
|
408
420
|
&[class]{
|
|
409
|
-
--_rs-typography-list-li-margin-top-from-text:16px;
|
|
421
|
+
--_rs-typography-text-1-sm-list-li-margin-top-from-text:16px;
|
|
410
422
|
}
|
|
411
423
|
}
|
|
412
424
|
}
|
|
@@ -473,7 +485,7 @@
|
|
|
473
485
|
&[class]{
|
|
474
486
|
--_rs-menu-gh-vertical-padding:6px;
|
|
475
487
|
--_rs-menu-gh-horizontal-padding:8px;
|
|
476
|
-
--_rs-typography-letter-spacing:normal;
|
|
488
|
+
--_rs-typography-letter-spacing:var(--rs-h5-letter-spacing, normal);
|
|
477
489
|
--_rs-typography-text-transform:initial;
|
|
478
490
|
--_rs-typography-font-variant-numeric:initial;
|
|
479
491
|
--_rs-typography-font-family:var(
|
|
@@ -508,7 +520,7 @@
|
|
|
508
520
|
&[class]{
|
|
509
521
|
--_rs-menu-gh-vertical-padding:8px;
|
|
510
522
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
511
|
-
--_rs-typography-letter-spacing:normal;
|
|
523
|
+
--_rs-typography-letter-spacing:var(--rs-h4-letter-spacing, normal);
|
|
512
524
|
--_rs-typography-text-transform:initial;
|
|
513
525
|
--_rs-typography-font-variant-numeric:initial;
|
|
514
526
|
--_rs-typography-font-family:var(
|
|
@@ -543,7 +555,7 @@
|
|
|
543
555
|
&[class]{
|
|
544
556
|
--_rs-menu-gh-vertical-padding:12px;
|
|
545
557
|
--_rs-menu-gh-horizontal-padding:16px;
|
|
546
|
-
--_rs-typography-letter-spacing:normal;
|
|
558
|
+
--_rs-typography-letter-spacing:var(--rs-h3-letter-spacing, normal);
|
|
547
559
|
--_rs-typography-text-transform:initial;
|
|
548
560
|
--_rs-typography-font-variant-numeric:initial;
|
|
549
561
|
--_rs-typography-font-family:var(
|