@rescui/menu 0.13.6-RUI-296-Build-docs-md-files-for-each-docs-section-b138dd5bf.19 → 0.13.6-RUI-293-Update-menu-component-7a032357e.20
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/check-outline.js +106 -0
- package/lib/_virtual/index.css.js +15 -0
- package/lib/index.css +175 -76
- package/lib/index.d.ts +1 -5
- package/lib/menu.d.ts +17 -11
- package/lib/menu.js +123 -24
- package/lib/menu.p.module.css.js +28 -27
- package/lib/parts/divider.d.ts +3 -6
- package/lib/parts/divider.js +1 -0
- package/lib/parts/group-header.d.ts +2 -8
- package/lib/parts/group-header.js +2 -1
- package/lib/parts/menu-context.d.ts +2 -19
- package/lib/parts/menu-context.js +7 -8
- package/lib/parts/menu-item.d.ts +23 -13
- package/lib/parts/menu-item.js +62 -27
- package/lib/parts/navigation-utils.d.ts +2 -2
- package/lib/parts/use-menu-keyboard-navigation.d.ts +7 -5
- package/lib/parts/use-menu-keyboard-navigation.js +98 -99
- package/lib/public-api.p.css +52 -52
- package/lib/public-api.pcss +52 -52
- package/lib/types.d.ts +64 -0
- package/llm/components/menu.md +48 -0
- package/package.json +4 -4
package/llm/components/menu.md
CHANGED
|
@@ -88,6 +88,46 @@ import {
|
|
|
88
88
|
</Menu>;
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
+
#### Contrast primary color
|
|
92
|
+
|
|
93
|
+
If your primary color background requires dark text color, use `--rs-menu-contrast-primary` CSS variable.
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
import { Menu, MenuItem } from '@rescui/menu';
|
|
97
|
+
|
|
98
|
+
const Demo = () => {
|
|
99
|
+
return (
|
|
100
|
+
<div className="light-green-primary">
|
|
101
|
+
<Menu className="menu-with-contrast-primary" style={{ maxWidth: 200 }}>
|
|
102
|
+
<MenuItem>Some text 1</MenuItem>
|
|
103
|
+
<MenuItem>Some text 2</MenuItem>
|
|
104
|
+
<MenuItem>Some text 3</MenuItem>
|
|
105
|
+
<MenuItem>Some text 4</MenuItem>
|
|
106
|
+
<MenuItem>Some text 5</MenuItem>
|
|
107
|
+
</Menu>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
render(<Demo />);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```postcss
|
|
116
|
+
.menu-with-contrast-primary {
|
|
117
|
+
--rs-menu-contrast-primary: 1;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.light-green-primary {
|
|
121
|
+
--rs-color-primary-light-theme: rgb(71, 224, 84);
|
|
122
|
+
--rs-color-primary-t-dim-light-theme: rgba(71, 224, 84, 0.8);
|
|
123
|
+
--rs-color-primary-t-fog-light-theme: rgba(71, 224, 84, 0.2);
|
|
124
|
+
|
|
125
|
+
--rs-color-primary-dark-theme: rgb(71, 224, 84);
|
|
126
|
+
--rs-color-primary-t-dim-dark-theme: rgba(71, 224, 84, 0.8);
|
|
127
|
+
--rs-color-primary-t-fog-dark-theme: rgba(71, 224, 84, 0.2);
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
91
131
|
## CSS Mixins API
|
|
92
132
|
|
|
93
133
|
#### `Menu` mixins
|
|
@@ -183,6 +223,14 @@ render(
|
|
|
183
223
|
}
|
|
184
224
|
```
|
|
185
225
|
|
|
226
|
+
#### `Menu` CSS Vars
|
|
227
|
+
|
|
228
|
+
| Variable | Syntax | Description |
|
|
229
|
+
| --- | --- | --- |
|
|
230
|
+
| `--rs-menu-contrast-primary` | `0 \| 1` | The flag whenever the current primary is contrast enough and highlighted text color should be inverted |
|
|
231
|
+
|
|
232
|
+
Check out [this example](/components/menu/#contrast-primary-color) for contrast primary.
|
|
233
|
+
|
|
186
234
|
#### `MenuItem` mixins
|
|
187
235
|
|
|
188
236
|
| Mixin name | Details |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/menu",
|
|
3
|
-
"version": "0.13.6-RUI-
|
|
3
|
+
"version": "0.13.6-RUI-293-Update-menu-component-7a032357e.20+7a032357e",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"react": ">=16.8.0 <20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@rescui/colors": "0.3.1-RUI-
|
|
29
|
+
"@rescui/colors": "0.3.1-RUI-293-Update-menu-component-7a032357e.55+7a032357e",
|
|
30
30
|
"@rescui/postcss-preset-library": "0.2.2",
|
|
31
31
|
"@rescui/scripts": "0.5.2",
|
|
32
|
-
"@rescui/typography": "0.27.1-RUI-
|
|
32
|
+
"@rescui/typography": "0.27.1-RUI-293-Update-menu-component-7a032357e.20+7a032357e",
|
|
33
33
|
"@rescui/visual-regression": "0.1.4",
|
|
34
34
|
"postcss": "^8.3.0"
|
|
35
35
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"build-pcss-api": "rescui-scripts build-pcss-api --file public-api.p.css"
|
|
39
39
|
},
|
|
40
40
|
"nx": {},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "7a032357e8f31abbf69e18aa6b7ef2d75e40f42e"
|
|
42
42
|
}
|