@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.
@@ -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
- var ICON_PLACEMENT_STYLES = {
7
+ const ICON_PLACEMENT_STYLES = {
26
8
  left: styles.iconPlacementLeft,
27
9
  right: styles.iconPlacementRight
28
10
  };
29
- var MODE_STYLES = {
11
+ const MODE_STYLES = {
30
12
  classic: styles.modeClassic,
31
13
  clear: styles.modeClear,
32
14
  rock: styles.modeRock
33
15
  };
34
- var SIZE_STYLES = {
16
+ const SIZE_STYLES = {
35
17
  s: styles.sizeS,
36
18
  m: styles.sizeM,
37
19
  l: styles.sizeL
38
20
  };
39
- var THEME_STYLES = {
21
+ const THEME_STYLES = {
40
22
  light: styles.themeLight,
41
23
  dark: styles.themeDark
42
24
  }; // eslint-disable-next-line complexity
43
25
 
44
- var MenuItemInner = function MenuItemInner(_ref, ref) {
45
- var _menuContext$theme, _ref2, _menuContext$itemTag, _ref3, _menuContext$iconPlac, _menuContext$mode, _menuContext$size, _menuContext$disableC;
46
-
47
- var className = _ref.className,
48
- tag = _ref.tag,
49
- children = _ref.children,
50
- icon = _ref.icon,
51
- _ref$size = _ref.size,
52
- size = _ref$size === void 0 ? 'm' : _ref$size,
53
- _ref$mode = _ref.mode,
54
- mode = _ref$mode === void 0 ? 'classic' : _ref$mode,
55
- theme = _ref.theme,
56
- disabled = _ref.disabled,
57
- disableCursor = _ref.disableCursor,
58
- selected = _ref.selected,
59
- highlighted = _ref.highlighted,
60
- _ref$iconPlacement = _ref.iconPlacement,
61
- iconPlacement = _ref$iconPlacement === void 0 ? 'left' : _ref$iconPlacement,
62
- restProps = _objectWithoutProperties(_ref, _excluded);
63
-
64
- var _useMenuContext = useMenuContext(),
65
- unregisterItem = _useMenuContext.unregisterItem,
66
- registerItem = _useMenuContext.registerItem,
67
- activeItemRef = _useMenuContext.activeItemRef,
68
- isKeyboardNavigating = _useMenuContext.isKeyboardNavigating,
69
- wrapWithLi = _useMenuContext.wrapWithLi,
70
- menuContext = _objectWithoutProperties(_useMenuContext, _excluded2);
71
-
72
- var actualTheme = useThemeWithUndefined((_menuContext$theme = menuContext.theme) !== null && _menuContext$theme !== void 0 ? _menuContext$theme : theme);
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
- var autoTag = 'span';
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
- var Tag = (_ref2 = (_menuContext$itemTag = menuContext.itemTag) !== null && _menuContext$itemTag !== void 0 ? _menuContext$itemTag : tag) !== null && _ref2 !== void 0 ? _ref2 : autoTag;
93
- var actualIconPlacement = (_ref3 = (_menuContext$iconPlac = menuContext.iconPlacement) !== null && _menuContext$iconPlac !== void 0 ? _menuContext$iconPlac : iconPlacement) !== null && _ref3 !== void 0 ? _ref3 : 'left';
94
- var actualMode = (_menuContext$mode = menuContext.mode) !== null && _menuContext$mode !== void 0 ? _menuContext$mode : mode;
95
- var actualSize = (_menuContext$size = menuContext.size) !== null && _menuContext$size !== void 0 ? _menuContext$size : size;
96
- var actualDisableCursor = (_menuContext$disableC = menuContext.disableCursor) !== null && _menuContext$disableC !== void 0 ? _menuContext$disableC : disableCursor;
97
- var iconElement = icon ? /*#__PURE__*/cloneElement(icon, {
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
- var actualHighlighted = highlighted || activeItemRef === thisRef && isKeyboardNavigating;
74
+ const actualHighlighted = highlighted || activeItemRef === thisRef && isKeyboardNavigating;
101
75
 
102
- var handleRef = function handleRef(r) {
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 && _typeof(ref) === 'object') {
82
+ } else if (ref != null && typeof ref === 'object') {
109
83
  ref.current = r;
110
84
  }
111
85
  };
112
86
 
113
- var handleKeyDown = function handleKeyDown(e) {
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
- var Wrapper = wrapWithLi ? 'li' : 'div';
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, _objectSpread({
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
- }, restProps), iconElement, /*#__PURE__*/React.createElement("span", {
108
+ tabIndex: 0,
109
+ ...restProps
110
+ }, iconElement, /*#__PURE__*/React.createElement("span", {
136
111
  className: styles.content
137
112
  }, children)));
138
113
  };
139
114
 
140
- var MenuItem = /*#__PURE__*/React.forwardRef(MenuItemInner);
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
- var focusedIndex = _findIndexInstanceProperty(sortedItems).call(sortedItems, function (el) {
13
- return el === activeItem;
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
- var focusedIndex = _findIndexInstanceProperty(sortedItems).call(sortedItems, function (el) {
27
- return el === activeItem;
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
- var id;
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(function () {
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
- var _context;
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
- var enableKeyboardNavigation = _ref.enableKeyboardNavigation,
32
- activateFirstItem = _ref.activateFirstItem,
33
- returnFocusOnUnmount = _ref.returnFocusOnUnmount;
34
- var activeItemRef = useRef(null);
35
-
36
- var _useState = useState(false),
37
- _useState2 = _slicedToArray(_useState, 2),
38
- setDummyState = _useState2[1];
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(function (t) {
48
- return !t;
49
- });
36
+ setDummyState(t => !t);
50
37
  }, [setDummyState]);
51
- var menuItemsSet = useRef(new _Set());
52
- useEffect(function () {
38
+ const menuItemsSet = useRef(new Set());
39
+ useEffect(() => {
53
40
  if (!enableKeyboardNavigation || !activateFirstItem || !returnFocusOnUnmount) {
54
41
  return;
55
42
  }
56
43
 
57
- var lastFocusedEl = document.activeElement; // eslint-disable-next-line consistent-return
44
+ const lastFocusedEl = document.activeElement; // eslint-disable-next-line consistent-return
58
45
 
59
- return function () {
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
- var debouncedActivateFirstItem = debounce(function () {
68
- var items = getSortedItems(menuItemsSet.current);
54
+ const debouncedActivateFirstItem = debounce(() => {
55
+ const items = getSortedItems(menuItemsSet.current);
69
56
  setActiveItemRef(getFirstItem(items));
70
57
  }, 50);
71
- var registerItem = useCallback(function (ref) {
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
- var unregisterItem = useCallback(function (ref) {
67
+ const unregisterItem = useCallback(ref => {
81
68
  menuItemsSet.current.delete(ref);
82
69
  }, []);
83
-
84
- var _useState3 = useState(true),
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(function () {
80
+ useEffect(() => {
99
81
  if (isKeyboardNavigating) {
100
82
  document.addEventListener('mousemove', handleMouseMove);
101
- return function () {
102
- return document.removeEventListener('mousemove', handleMouseMove);
103
- };
83
+ return () => document.removeEventListener('mousemove', handleMouseMove);
104
84
  }
105
85
  }, [handleMouseMove, isKeyboardNavigating]);
106
- useEffect(function () {
86
+ useEffect(() => {
107
87
  if (!enableKeyboardNavigation) {
108
88
  return;
109
89
  }
110
90
 
111
- var handler = function handler(e) {
91
+ const handler = e => {
112
92
  setIsKeyboardNavigating(true);
113
- var items = getSortedItems(menuItemsSet.current);
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 function () {
120
+ return () => {
141
121
  document.removeEventListener('keydown', handler, true);
142
122
  };
143
123
  }, [enableKeyboardNavigation]);
144
124
  return {
145
- activeItemRef: activeItemRef,
146
- registerItem: registerItem,
147
- unregisterItem: unregisterItem,
148
- isKeyboardNavigating: isKeyboardNavigating
125
+ activeItemRef,
126
+ registerItem,
127
+ unregisterItem,
128
+ isKeyboardNavigating
149
129
  };
150
130
  }
151
131
 
@@ -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:16px;
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:24px;
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:16px;
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:24px;
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(