@platned/ui 0.9.6 → 0.9.7
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/LICENSE +31 -0
- package/README.md +8 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs +18 -1839
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +16 -1873
- package/dist/sidebar.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -3650,8 +3650,9 @@ interface SidebarTriggerProps extends Omit<IconButtonProps, 'aria-label' | 'chil
|
|
|
3650
3650
|
}
|
|
3651
3651
|
/**
|
|
3652
3652
|
* The menu button that opens the sidebar's drawer below `md`. New in 0.9.6. Put it in the
|
|
3653
|
-
* app header
|
|
3654
|
-
*
|
|
3653
|
+
* app header, with a `SidebarProvider` above both. Hidden from `md` up, where the sidebar is
|
|
3654
|
+
* on the page. Outside a provider it renders nothing (0.9.7), so a header that is also used
|
|
3655
|
+
* on its own — in a test, a story — does not need one.
|
|
3655
3656
|
*/
|
|
3656
3657
|
declare const SidebarTrigger: react.ForwardRefExoticComponent<SidebarTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
3657
3658
|
interface NavTreeItem {
|
package/dist/index.js
CHANGED
|
@@ -7141,7 +7141,9 @@ function RailParent({ item }) {
|
|
|
7141
7141
|
] });
|
|
7142
7142
|
}
|
|
7143
7143
|
var SidebarTrigger = forwardRef27(function SidebarTrigger2({ "aria-label": ariaLabel = "Open navigation", className, onClick, variant = "subtle", ...rest }, ref) {
|
|
7144
|
-
const
|
|
7144
|
+
const context = useContext14(SidebarContext);
|
|
7145
|
+
if (!context) return null;
|
|
7146
|
+
const { mobileOpen, setMobileOpen } = context;
|
|
7145
7147
|
return /* @__PURE__ */ jsx65(
|
|
7146
7148
|
IconButton,
|
|
7147
7149
|
{
|