@startupjs-ui/smart-sidebar 0.1.13 → 0.1.19
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 +16 -0
- package/README.mdx +11 -9
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [0.1.19](https://github.com/startupjs/startupjs-ui/compare/v0.1.18...v0.1.19) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @startupjs-ui/smart-sidebar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.1.16](https://github.com/startupjs/startupjs-ui/compare/v0.1.15...v0.1.16) (2026-02-10)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @startupjs-ui/smart-sidebar
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.1.13](https://github.com/startupjs/startupjs-ui/compare/v0.1.12...v0.1.13) (2026-02-03)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @startupjs-ui/smart-sidebar
|
package/README.mdx
CHANGED
|
@@ -11,13 +11,15 @@ import './index.mdx.cssx.styl'
|
|
|
11
11
|
|
|
12
12
|
# SmartSidebar
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
A responsive sidebar that automatically switches between a fixed [Sidebar](/docs/components/Sidebar) on desktop and a [DrawerSidebar](/docs/components/DrawerSidebar) on mobile, based on a configurable screen-width breakpoint. By default it is not visible on the screen.
|
|
15
|
+
|
|
16
|
+
Use `$open` for two-way data binding to control the open state, `renderContent` to render the sidebar content, and `children` for the main content area. You can also pass custom `style` for the root wrapper, `sidebarStyle` for the sidebar container in fixed layout, and `width` (defaults to `264`) to set the sidebar width.
|
|
15
17
|
|
|
16
18
|
```jsx
|
|
17
19
|
import { SmartSidebar } from 'startupjs-ui'
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
## Simple
|
|
22
|
+
## Simple example
|
|
21
23
|
|
|
22
24
|
```jsx example
|
|
23
25
|
const $open = $()
|
|
@@ -36,9 +38,9 @@ return (
|
|
|
36
38
|
)
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
## Fixed
|
|
41
|
+
## Fixed layout breakpoint
|
|
40
42
|
|
|
41
|
-
The `fixedLayoutBreakpoint`
|
|
43
|
+
The `fixedLayoutBreakpoint` prop specifies the screen width (in pixels) below which the component switches from a fixed [Sidebar](/docs/components/Sidebar) to a [DrawerSidebar](/docs/components/DrawerSidebar). It defaults to `1024`.
|
|
42
44
|
|
|
43
45
|
```jsx example noscroll
|
|
44
46
|
const $open = $()
|
|
@@ -75,7 +77,7 @@ return (
|
|
|
75
77
|
|
|
76
78
|
## Position
|
|
77
79
|
|
|
78
|
-
The `position`
|
|
80
|
+
The `position` prop specifies which side of the screen the sidebar appears on. Accepted values are `'left'` (default) and `'right'`.
|
|
79
81
|
|
|
80
82
|
```jsx example noscroll
|
|
81
83
|
const $open = $()
|
|
@@ -115,7 +117,7 @@ return (
|
|
|
115
117
|
|
|
116
118
|
## Default visibility (desktop only)
|
|
117
119
|
|
|
118
|
-
|
|
120
|
+
Set the `defaultOpen` prop to `true` to have the sidebar open by default on desktop. It defaults to `false`.
|
|
119
121
|
|
|
120
122
|
```jsx example
|
|
121
123
|
const $open = $()
|
|
@@ -149,9 +151,9 @@ return (
|
|
|
149
151
|
)
|
|
150
152
|
```
|
|
151
153
|
|
|
152
|
-
##
|
|
154
|
+
## Disabled sidebar
|
|
153
155
|
|
|
154
|
-
|
|
156
|
+
Set the `disabled` prop to `true` to keep the sidebar closed and prevent it from responding to the `open` state. It defaults to `false`.
|
|
155
157
|
|
|
156
158
|
```jsx example
|
|
157
159
|
const $open = $()
|
|
@@ -187,7 +189,7 @@ return (
|
|
|
187
189
|
|
|
188
190
|
## Lazy rendering
|
|
189
191
|
|
|
190
|
-
By default the
|
|
192
|
+
By default the sidebar content is not destroyed when the sidebar is closed. Set `lazy` to `true` to unmount the sidebar content when it is closed and remount it when it opens again. It defaults to `false`.
|
|
191
193
|
|
|
192
194
|
```jsx example
|
|
193
195
|
const $open = $()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startupjs-ui/smart-sidebar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"types": "index.d.ts",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@startupjs-ui/core": "^0.1.
|
|
12
|
-
"@startupjs-ui/drawer-sidebar": "^0.1.
|
|
13
|
-
"@startupjs-ui/sidebar": "^0.1.
|
|
11
|
+
"@startupjs-ui/core": "^0.1.19",
|
|
12
|
+
"@startupjs-ui/drawer-sidebar": "^0.1.19",
|
|
13
|
+
"@startupjs-ui/sidebar": "^0.1.19"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"react": "*",
|
|
17
17
|
"react-native": "*",
|
|
18
18
|
"startupjs": "*"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "bfcca786dc363f42a09b6eef4feb7ca8139302fc"
|
|
21
21
|
}
|