@skbkontur/side-menu 3.0.2 → 3.0.3
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/CHANGELOG.md +8 -0
- package/README.md +29 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.0.3](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@3.0.2...@skbkontur/side-menu@3.0.3) (2024-11-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @skbkontur/side-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.0.2](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@3.0.1...@skbkontur/side-menu@3.0.2) (2024-10-31)
|
|
7
15
|
|
|
8
16
|
|
package/README.md
CHANGED
|
@@ -2,11 +2,28 @@ SideMenu в фирменном стиле (макеты живут [здесь](
|
|
|
2
2
|
|
|
3
3
|
[Пример в песочнице](https://codesandbox.io/s/competent-wiles-k85wlm)
|
|
4
4
|
|
|
5
|
+
Пример типизации кастомной темы SideMenu.
|
|
6
|
+
|
|
7
|
+
```jsx static
|
|
8
|
+
import { ThemeContext, ThemeFactory } from '@skbkontur/react-ui';
|
|
9
|
+
import { SideMenu, SideMenuThemeIn } from '@skbkontur/side-menu';
|
|
10
|
+
|
|
11
|
+
const myTheme = ThemeFactory.create<SideMenuThemeIn>({
|
|
12
|
+
sideMenuProductColor: '#64b419',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
<ThemeContext.Provider value={myTheme}>
|
|
16
|
+
<SideMenu />
|
|
17
|
+
</ThemeContext.Provider>;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Базовый пример использования SideMenu
|
|
21
|
+
|
|
5
22
|
```jsx harmony
|
|
6
23
|
import { getKonturAvatarUrl } from '@skbkontur/react-ui-addons';
|
|
7
24
|
import { Kontur, Ofd } from '@skbkontur/logos';
|
|
8
|
-
import { ThemeContext, ThemeFactory, MenuItem, MenuSeparator
|
|
9
|
-
import { SideMenu } from '
|
|
25
|
+
import { ThemeContext, ThemeFactory, MenuItem, MenuSeparator } from '@skbkontur/react-ui';
|
|
26
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
10
27
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
11
28
|
import { CommentRectTextIcon24Regular } from '@skbkontur/icons/icons/CommentRectTextIcon/CommentRectTextIcon24Regular';
|
|
12
29
|
import { LightbulbIcon24Regular } from '@skbkontur/icons/icons/LightbulbIcon/LightbulbIcon24Regular';
|
|
@@ -18,7 +35,7 @@ import { FaceAHappyIcon24Regular } from '@skbkontur/icons/icons/FaceAHappyIcon/F
|
|
|
18
35
|
import { AttachLinkIcon } from '@skbkontur/icons/icons/AttachLinkIcon';
|
|
19
36
|
|
|
20
37
|
<div style={{height: '600px', position: 'relative'}}>
|
|
21
|
-
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#64b419' }
|
|
38
|
+
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#64b419' })}>
|
|
22
39
|
<SideMenu>
|
|
23
40
|
<SideMenu.Header konturLogo={<Kontur/>} productLogo={<Ofd/>}/>
|
|
24
41
|
<SideMenu.Body>
|
|
@@ -84,8 +101,8 @@ SideMenu с меню второго уровня в отдельной коло
|
|
|
84
101
|
```jsx harmony
|
|
85
102
|
import { getKonturAvatarUrl } from '@skbkontur/react-ui-addons';
|
|
86
103
|
import { Buhgalteria, Kontur } from '@skbkontur/logos';
|
|
87
|
-
import { ThemeContext, ThemeFactory, MenuItem, Modal, Input, MenuSeparator
|
|
88
|
-
import { SideMenu } from '
|
|
104
|
+
import { ThemeContext, ThemeFactory, MenuItem, Modal, Input, MenuSeparator } from '@skbkontur/react-ui';
|
|
105
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
89
106
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
90
107
|
import { CommentRectTextIcon24Regular } from '@skbkontur/icons/icons/CommentRectTextIcon/CommentRectTextIcon24Regular';
|
|
91
108
|
import { LightbulbIcon24Regular } from '@skbkontur/icons/icons/LightbulbIcon/LightbulbIcon24Regular';
|
|
@@ -126,7 +143,7 @@ const renderModal = () => {
|
|
|
126
143
|
}
|
|
127
144
|
|
|
128
145
|
<div style={{height: '600px', width: '100%', position: 'relative', display: 'flex'}}>
|
|
129
|
-
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#b750d1' }
|
|
146
|
+
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#b750d1' })}>
|
|
130
147
|
<SideMenu isSeparatedMenu={true}>
|
|
131
148
|
<SideMenu.Header konturLogo={<Kontur/>} productLogo={<Buhgalteria/>} withWidget={false}/>
|
|
132
149
|
<SideMenu.Body>
|
|
@@ -209,8 +226,8 @@ SideMenu с ручным управлением.
|
|
|
209
226
|
import { useState } from 'react';
|
|
210
227
|
import { getKonturAvatarUrl } from '@skbkontur/react-ui-addons';
|
|
211
228
|
import { Kontur, Ofd } from '@skbkontur/logos';
|
|
212
|
-
import { ThemeContext, ThemeFactory, MenuItem, Select, Switcher, MenuSeparator
|
|
213
|
-
import { SideMenu } from '
|
|
229
|
+
import { ThemeContext, ThemeFactory, MenuItem, Select, Switcher, MenuSeparator} from '@skbkontur/react-ui';
|
|
230
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
214
231
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
215
232
|
import { CommentRectTextIcon24Regular } from '@skbkontur/icons/icons/CommentRectTextIcon/CommentRectTextIcon24Regular';
|
|
216
233
|
import { LightbulbIcon24Regular } from '@skbkontur/icons/icons/LightbulbIcon/LightbulbIcon24Regular';
|
|
@@ -249,7 +266,7 @@ const items = [
|
|
|
249
266
|
];
|
|
250
267
|
|
|
251
268
|
<div style={{ height: '600px', display: 'flex', position: 'relative' }}>
|
|
252
|
-
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#64b419' }
|
|
269
|
+
<ThemeContext.Provider value={ThemeFactory.create({ sideMenuProductColor: '#64b419' })}>
|
|
253
270
|
<SideMenu activeItem={activeItem} onActiveItemChange={setActiveItem} isSeparatedMenu={isSeparatedMenu}>
|
|
254
271
|
<SideMenu.Header konturLogo={<Kontur />} productLogo={<Ofd />} withWidget={false} />
|
|
255
272
|
<SideMenu.Body>
|
|
@@ -473,7 +490,7 @@ const SideMenuReactRouterLink: React.FunctionComponent<SideMenuReactRouterLinkPr
|
|
|
473
490
|
|
|
474
491
|
```jsx harmony
|
|
475
492
|
import { Kontur, Ofd } from '@skbkontur/logos';
|
|
476
|
-
import { SideMenu } from '
|
|
493
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
477
494
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
478
495
|
import { SettingsGearIcon24Regular } from '@skbkontur/icons/icons/SettingsGearIcon/SettingsGearIcon24Regular';
|
|
479
496
|
import { ThemeContext, ThemeFactory } from '@skbkontur/react-ui';
|
|
@@ -497,7 +514,7 @@ import { ThemeContext, ThemeFactory } from '@skbkontur/react-ui';
|
|
|
497
514
|
|
|
498
515
|
```jsx harmony
|
|
499
516
|
import { Kontur, Ofd } from '@skbkontur/logos';
|
|
500
|
-
import { SideMenu } from '
|
|
517
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
501
518
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
502
519
|
import { SettingsGearIcon24Regular } from '@skbkontur/icons/icons/SettingsGearIcon/SettingsGearIcon24Regular';
|
|
503
520
|
import { ThemeContext, ThemeFactory, Button } from '@skbkontur/react-ui';
|
|
@@ -527,7 +544,7 @@ const [isOpen, setIsOpen] = React.useState(true);
|
|
|
527
544
|
|
|
528
545
|
```jsx harmony
|
|
529
546
|
import { Kontur, Ofd } from '@skbkontur/logos';
|
|
530
|
-
import { SideMenu } from '
|
|
547
|
+
import { SideMenu } from '@skbkontur/side-menu';
|
|
531
548
|
import { DocTextIcon24Regular } from '@skbkontur/icons/icons/DocTextIcon/DocTextIcon24Regular';
|
|
532
549
|
import { SettingsGearIcon24Regular } from '@skbkontur/icons/icons/SettingsGearIcon/SettingsGearIcon24Regular';
|
|
533
550
|
import { ThemeContext, ThemeFactory, Button } from '@skbkontur/react-ui';
|