Socket
Socket
Sign inDemoInstall

@asemirsk/navigation

Package Overview
Dependencies
120
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-canary-24-22.0 to 1.0.0-canary-24-23.0

lib/Breadcrumbs/asBreadcrumb.d.ts

18

doc/Breadcrumbs.md

@@ -22,3 +22,3 @@ # Breadcrumbs

```js
import { asReadOnly } from '@bodiless/core';
import { asReadOnly } from '@asemirsk/core';
import {

@@ -30,4 +30,4 @@ BreadcrumbsClean,

withMenuTitleEditors,
} from '@bodiless/navigation';
import { flowHoc } from '@bodiless/fclasses';
} from '@asemirsk/navigation';
import { flowHoc } from '@asemirsk/fclasses';

@@ -64,7 +64,7 @@ import { $withBreadcrumbStyles } from './MenuBreadcrumbs.token';

#### Breadcrumbs Context Provider and Store
For breadcrumbs to work right, we need a place where Breadcrumb Items will be stored. There is a `withBreadcrumbStore` HOC exported from the `@bodiless/navigation` that may be used to add a `BreadcrumbStore` to the component. Usually it is registered on the top-level container so that the rest of the components on the page have an access to it.
For breadcrumbs to work right, we need a place where Breadcrumb Items will be stored. There is a `withBreadcrumbStore` HOC exported from the `@asemirsk/navigation` that may be used to add a `BreadcrumbStore` to the component. Usually it is registered on the top-level container so that the rest of the components on the page have an access to it.
```js
import { Fragment } from '@bodiless/fclasses';
import { withBreadcrumbStore } from '@bodiless/navigation';
import { Fragment } from '@asemirsk/fclasses';
import { withBreadcrumbStore } from '@asemirsk/navigation';

@@ -138,3 +138,3 @@ const BreadcrumbsProvider = withBreadcrumbStore(Fragment);

```js
import { asReadOnly } from '@bodiless/core';
import { asReadOnly } from '@asemirsk/core';
import {

@@ -146,4 +146,4 @@ BreadcrumbsClean,

withMenuTitleEditors,
} from '@bodiless/navigation';
import { flowHoc } from '@bodiless/fclasses';
} from '@asemirsk/navigation';
import { flowHoc } from '@asemirsk/fclasses';

@@ -150,0 +150,0 @@ import { $withBreadcrumbStyles } from './MenuBreadcrumbs.token';

@@ -5,3 +5,3 @@

### Exported HOCs
There are several burger-menu specific HOCs provided by `@bodiless/navigation` that can be composed together to build a Burger Menu.
There are several burger-menu specific HOCs provided by `@asemirsk/navigation` that can be composed together to build a Burger Menu.

@@ -21,7 +21,7 @@ - `asBurgerMenu` - Helper, which allows specifying which submenu types are configured by default for the Burger Menu. Transforms selected submenus into accordions.

```js
import { flowHoc } from '@bodiless/fclasses';
import { flowHoc } from '@asemirsk/fclasses';
import {
asBodilessMenu, withListSubMenu, withColumnSubMenu, withMenuDesign,
withCardsSubMenu, withBurgerMenuWrapper, withMenuTitleEditors,
} from '@bodiless/navigation';
} from '@asemirsk/navigation';

@@ -64,4 +64,4 @@ // Define menu schema first

```js
import { flowHoc, replaceWith, withDesign } from '@bodiless/fclasses';
import { withBurgerMenuWrapper } from '@bodiless/navigation';
import { flowHoc, replaceWith, withDesign } from '@asemirsk/fclasses';
import { withBurgerMenuWrapper } from '@asemirsk/navigation';

@@ -91,4 +91,4 @@ import { DemoMenuBase } from './Menu';

```js
import { flowHoc, withDesign } from '@bodiless/fclasses';
import { asBurgerMenu, withMenuDesign, withOverviewLink } from '@bodiless/navigation';
import { flowHoc, withDesign } from '@asemirsk/fclasses';
import { asBurgerMenu, withMenuDesign, withOverviewLink } from '@asemirsk/navigation';

@@ -122,7 +122,7 @@ import { DemoMenuBase } from './Menu';

#### Burger Menu Context Provider
In most cases, Burger Menu is hidden by default and can be toggled visible by clicking a Burger Menu toggler button. For toggler to work, the burger menu and toggler button have to be inside a `BurgerMenuContext`. There is an `withBurgerMenuProvider` HOC available in `@bodiless/navigation` that wraps a component with the `BurgerMenuContext`. Usually, one of the top-level elements such as `Page` or `Layout` is wrapped with the `BurgerMenuContext`.
In most cases, Burger Menu is hidden by default and can be toggled visible by clicking a Burger Menu toggler button. For toggler to work, the burger menu and toggler button have to be inside a `BurgerMenuContext`. There is an `withBurgerMenuProvider` HOC available in `@asemirsk/navigation` that wraps a component with the `BurgerMenuContext`. Usually, one of the top-level elements such as `Page` or `Layout` is wrapped with the `BurgerMenuContext`.
```js
import { Fragment } from '@bodiless/fclasses';
import { withBurgerMenuProvider } from '@bodiless/navigation';
import { Fragment } from '@asemirsk/fclasses';
import { withBurgerMenuProvider } from '@asemirsk/navigation';

@@ -160,6 +160,6 @@ const BurgerMenuProvider = withBurgerMenuProvider(Fragment);

There is a `BurgerMenuDefaultToggler` component exported by the `@bodiless/navigation`. It is a stylable component that toggles the burger menu visibility and its icon from `menu` when the burger menu is hidden to `close` when burger menu is visible.
There is a `BurgerMenuDefaultToggler` component exported by the `@asemirsk/navigation`. It is a stylable component that toggles the burger menu visibility and its icon from `menu` when the burger menu is hidden to `close` when burger menu is visible.
```js
import { flowHoc, withDesign, addClasses } from '@bodiless/fclasses';
import { BurgerMenuDefaultToggler } from '@bodiless/navigation';
import { flowHoc, withDesign, addClasses } from '@asemirsk/fclasses';
import { BurgerMenuDefaultToggler } from '@asemirsk/navigation';

@@ -199,4 +199,4 @@ export const BurgerMenuToggler = flowHoc(

```js
import { withDesign, flowHoc } from '@bodiless/fclasses';
import { asBurgerMenu } from '@bodiless/navigation';
import { withDesign, flowHoc } from '@asemirsk/fclasses';
import { asBurgerMenu } from '@asemirsk/navigation';

@@ -220,4 +220,4 @@ // Create Menu Token

```js
import { withDesign, flowHoc, addClasses } from '@bodiless/fclasses';
import { asBurgerMenu } from '@bodiless/navigation';
import { withDesign, flowHoc, addClasses } from '@asemirsk/fclasses';
import { asBurgerMenu } from '@asemirsk/navigation';

@@ -251,4 +251,4 @@ // Lets make accordion Labels bold.

```js
import { withDesign, flowHoc, addClasses } from '@bodiless/fclasses';
import { asBurgerMenu, withMenuDesign, asSlideLeft } from '@bodiless/navigation';
import { withDesign, flowHoc, addClasses } from '@asemirsk/fclasses';
import { asBurgerMenu, withMenuDesign, asSlideLeft } from '@asemirsk/navigation';

@@ -280,7 +280,7 @@ const $withBoldAccordionTitle = withDesign({

```js
import { withDesign, flowHoc, addClasses } from '@bodiless/fclasses';
import { withDesign, flowHoc, addClasses } from '@asemirsk/fclasses';
import {
withOverviewLink, asBurgerMenu, withMenuDesign, asSlideLeft,
withBurgerMenuWrapper, withMenuTitleEditors,
} from '@bodiless/navigation';
} from '@asemirsk/navigation';

@@ -287,0 +287,0 @@ import { DemoMenuBase } from './Menu';

@@ -6,3 +6,3 @@

### Exported HOCs
There are several menu-specific HOCs provided by `@bodiless/navigation` that can be composed together to build a Menu.
There are several menu-specific HOCs provided by `@asemirsk/navigation` that can be composed together to build a Menu.

@@ -22,3 +22,3 @@ - `asBodilessMenu` - Bodiless HOC generator which creates the basic structure of the Bodiless Menu. This serves as a base for various views on the Menu data, including a site's main menu, a burger menu, and breadcrumbs.

```js
import { asBodilessMenu, withMenuTitleEditors, withMenuDesign } from '@bodiless/navigation';
import { asBodilessMenu, withMenuTitleEditors, withMenuDesign } from '@asemirsk/navigation';

@@ -41,6 +41,6 @@ // Menu doesn't provide any default editors so we need to configure one.

```js
import { flowHoc } from '@bodiless/fclasses';
import { flowHoc } from '@asemirsk/fclasses';
import {
asBodilessMenu, withListSubMenu, withColumnSubMenu, withCardsSubMenu,
} from '@bodiless/navigation';
} from '@asemirsk/navigation';

@@ -114,3 +114,3 @@ export const DemoMenu = flowHoc(

#### Using `asTopNav` to add default menu styles:
There is a `asTopNav` helper exported by the `@bodiless/navigation` that may be used to add default menu styles. It is responsible for menu/submenu position and interaction styles such as displaying on hover, keeping it open when editing a submenu title, etc.
There is a `asTopNav` helper exported by the `@asemirsk/navigation` that may be used to add default menu styles. It is responsible for menu/submenu position and interaction styles such as displaying on hover, keeping it open when editing a submenu title, etc.

@@ -126,3 +126,3 @@ It accepts an optional list of submenu keys to which default styling has to be applied to:

#### Styling menu with `withMenuDesign`:
To make it easier to work on menu styling, there is a `withMenuDesign` helper exported from the `@bodiless/navigation` package. It is a helper, which makes it easier to target a particular type of submenu.
To make it easier to work on menu styling, there is a `withMenuDesign` helper exported from the `@asemirsk/navigation` package. It is a helper, which makes it easier to target a particular type of submenu.

@@ -161,4 +161,4 @@ There are two arguments that `withMenuDesign(keys, depths)(...tokenDefs)` accepts. The first parameter is a **list of the submenu key(s)** and the second param is the **design keys depth** to which the tokens provided as a second argument should be applied. It also accepts the special key `Main` to apply the design to the top-level menu. All arguments are optional. If you do not specify `keys` or `depths` -- it will apply token to all submenus as well as the top menu.

```js
import { ifToggledOn } from '@bodiless/core';
import { useIsActiveTrail } from '@bodiless/navigation';
import { ifToggledOn } from '@asemirsk/core';
import { useIsActiveTrail } from '@asemirsk/navigation';
import { withActiveMenuBackground, asBold, asUnderline } from './DemoMenu.token';

@@ -174,7 +174,7 @@

```js
import { flowHoc } from '@bodiless/fclasses';
import { flowHoc } from '@asemirsk/fclasses';
import {
asTopNav, withMenuDesign, asBodilessMenu, withColumnSubMenu, withCardsSubMenu,
withMenuTitleEditors,
} from '@bodiless/navigation';
} from '@asemirsk/navigation';
import {

@@ -181,0 +181,0 @@ $withTitleStyles,

# Bodiless Navigation Upgrade Guide
This documentation is applicable only if you have used older versions of `Menu`/`BurgerMenu` from
`@bodiless/organisms` and Breadcrumbs from `@bodiless/components`. The examples provided for the
`@asemirsk/organisms` and Breadcrumbs from `@asemirsk/components`. The examples provided for the
**new** state are applicable.

@@ -9,3 +9,3 @@

There is no need to separate between a `SimpleMenu` and a `MegaMenu`. We can import `asBodilessMenu()` from `@bodiless/navigation`. It may be extended with any type of submenus and comes with no submenus configured by default.
There is no need to separate between a `SimpleMenu` and a `MegaMenu`. We can import `asBodilessMenu()` from `@asemirsk/navigation`. It may be extended with any type of submenus and comes with no submenus configured by default.

@@ -38,3 +38,3 @@ Here is an **old** example of the menu:

// Then we provide menu Title Editors and menu styles:
const $withTitleEditors = withMenuTitleEditors(); // Use default Title editors from `@bodiless/navigation`
const $withTitleEditors = withMenuTitleEditors(); // Use default Title editors from `@asemirsk/navigation`

@@ -105,3 +105,3 @@ const $withMenuStyles = flowHoc(

// While you can still use withDesign to provide `Menu` body, it is better
// to use `withBurgerMenuWrapper` HOC that is exported by `@bodiless/navigation` package.
// to use `withBurgerMenuWrapper` HOC that is exported by `@asemirsk/navigation` package.
withDesign({

@@ -130,8 +130,8 @@ Body: replaceWith(MegaBurgerMenuBody),

The new Burger menu API does not rely on 3rd party library to toggle burger menu visibility. Instead there is a `BurgerMenuContext` that handles toggle. It is **important to note** that for the burger menu to behave correct it has to be inside a `BurgerMenuContext`. There is a `withBurgerMenuProvider` HOC exported from the `@bodiless/navigation` package that can be use to wrap element in `BurgerMenuContext`. Usually it is applied to the top-level container ( `layout` ).
The new Burger menu API does not rely on 3rd party library to toggle burger menu visibility. Instead there is a `BurgerMenuContext` that handles toggle. It is **important to note** that for the burger menu to behave correct it has to be inside a `BurgerMenuContext`. There is a `withBurgerMenuProvider` HOC exported from the `@asemirsk/navigation` package that can be use to wrap element in `BurgerMenuContext`. Usually it is applied to the top-level container ( `layout` ).
Here is an example:
```js
import { Fragment } from '@bodiless/fclasses';
import { withBurgerMenuProvider } from '@bodiless/navigation';
import { Fragment } from '@asemirsk/fclasses';
import { withBurgerMenuProvider } from '@asemirsk/navigation';

@@ -156,6 +156,6 @@ const BurgerMenuProvider = withBurgerMenuProvider(Fragment);

The button that toggles burger menu visibility is now a standalone element and can be placed anywhere on the page within the `BurgerMenuContext`. There is a `BurgerMenuDefaultToggler` component exported by the `@bodiless/navigation`. It is a stylable component that toggles the burger menu visibility and its icon from `menu` when the burger menu is hidden to `close` when burger menu is visible.
The button that toggles burger menu visibility is now a standalone element and can be placed anywhere on the page within the `BurgerMenuContext`. There is a `BurgerMenuDefaultToggler` component exported by the `@asemirsk/navigation`. It is a stylable component that toggles the burger menu visibility and its icon from `menu` when the burger menu is hidden to `close` when burger menu is visible.
```js
import { flowHoc, withDesign, addClasses } from '@bodiless/fclasses';
import { BurgerMenuDefaultToggler } from '@bodiless/navigation';
import { flowHoc, withDesign, addClasses } from '@asemirsk/fclasses';
import { BurgerMenuDefaultToggler } from '@asemirsk/navigation';

@@ -172,3 +172,3 @@ export const BurgerMenuToggler = flowHoc(

There is a `withOverviewLink` helper exported from `@bodiless/navigation` that makes it easier to work with overview links.
There is a `withOverviewLink` helper exported from `@asemirsk/navigation` that makes it easier to work with overview links.

@@ -175,0 +175,0 @@ Let's take a look at the **old overview link** example:

@@ -15,3 +15,3 @@ /* eslint-disable import/no-dynamic-require, global-require */

*/
import { getPackageDocs } from '@bodiless/cli';
import { getPackageDocs } from '@asemirsk/cli';

@@ -18,0 +18,0 @@ export const getDocs = (nameSpace) => getPackageDocs({

{
"name": "@asemirsk/navigation",
"version": "1.0.0-canary-24-22.0+a48e91c",
"version": "1.0.0-canary-24-23.0+2cab1ea",
"description": "BodilessJs Navigation Components",

@@ -33,9 +33,9 @@ "author": "Ivan Rudiuk <IRudiuk@its.jnj.com>",

"dependencies": {
"@asemirsk/accordion": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/card": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/components": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/components-ui": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/core": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/fclasses": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/organisms": "1.0.0-canary-24-22.0+a48e91c",
"@asemirsk/accordion": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/card": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/components": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/components-ui": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/core": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/fclasses": "1.0.0-canary-24-23.0+2cab1ea",
"@asemirsk/organisms": "1.0.0-canary-24-23.0+2cab1ea",
"enzyme": "^3.9.0",

@@ -52,3 +52,3 @@ "lodash": "^4.17.19",

},
"gitHead": "a48e91c77704024ccd08e24d4f85d1cd6971ccb1"
"gitHead": "2cab1eaf4ac4d1a8ef3ef53ba3228ff16f7504eb"
}

@@ -1,4 +0,4 @@

# `@bodiless/navigation`
# `@asemirsk/navigation`
See [Navigation Docs](./doc/README.md).

@@ -15,3 +15,3 @@ /* eslint-disable import/no-dynamic-require, global-require */

*/
import { getPackageTailwindConfig } from '@bodiless/fclasses';
import { getPackageTailwindConfig } from '@asemirsk/fclasses';

@@ -18,0 +18,0 @@ /**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc