Skip to content

Commit

Permalink
fix: finished renaming contextual-menu => menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarni committed Oct 17, 2024
1 parent 65e836c commit 18ada17
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion packages/core/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use "jkl/typography";
@use "styles";

/* Used by contextual-menu to figure out if it should render a compact or comfortable view */
/* Used by menu to figure out if it should render a compact or comfortable view */
@include jkl.comfortable-density-variables {
--jkl-density: "comfortable";
}
Expand Down
2 changes: 1 addition & 1 deletion packages/jokul/src/core/styles/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@use "../jkl/typography";
@use "./_index";

/* Used by contextual-menu to figure out if it should render a compact or comfortable view */
/* Used by menu to figure out if it should render a compact or comfortable view */
@include jkl.comfortable-density-variables {
--jkl-density: "comfortable";
}
Expand Down
14 changes: 7 additions & 7 deletions packages/menu-react/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# [`@fremtind/jkl-contextual-menu-react`](https://jokul.fremtind.no/komponenter/contextual-menu)
# [`@fremtind/jkl-menu-react`](https://jokul.fremtind.no/komponenter/menu)

Se portalen for [bruk og prinsipper](https://jokul.fremtind.no/komponenter/contextual-menu).
Se portalen for [bruk og prinsipper](https://jokul.fremtind.no/komponenter/menu).

## Installasjon

**Tips:** [stilpakken](../contextual-menu/) blir automatisk installert som en avhengighet.
**Tips:** [stilpakken](../menu/) blir automatisk installert som en avhengighet.

1. `npm i @fremtind/jkl-contextual-menu-react`.
1. `npm i @fremtind/jkl-menu-react`.
2. Importér _både_ React-komponent og stilark i prosjektet ditt.

```js
import { ContextualMenu } from "@fremtind/jkl-contextual-menu-react";
import { ContextualMenu } from "@fremtind/jkl-menu-react";

// Importer stilark via JavaScript med CSS-loader.
import "@fremtind/jkl-contextual-menu/contextual-menu.min.css";
import "@fremtind/jkl-menu/menu.min.css";
import "@fremtind/jkl-icons/icons.min.css";
```

```scss
// Eller importer stilark via SCSS.
@use "@fremtind/jkl-contextual-menu/contextual-menu";
@use "@fremtind/jkl-menu/menu";
@use "@fremtind/jkl-icons/icons";
```
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

describe("ContextualMenu", () => {
beforeEach(() => {
cy.testComponent("contextualmenu");
cy.testComponent("menu");
});

it("renders menu when trigger is clicked", () => {
cy.takeSnapshots({
eq: 0,
customSelector: () => cy.get(".jkl-contextual-menu"),
customSelector: () => cy.get(".jkl-menu"),
setup: () => {
cy.getByTestid("trigger-contextual-menu").first().click();
cy.getByTestid("trigger-menu").first().click();
},
});
});
Expand Down
10 changes: 5 additions & 5 deletions packages/menu-react/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@fremtind/jkl-contextual-menu-react",
"name": "@fremtind/jkl-menu-react",
"version": "3.4.37",
"publishConfig": {
"access": "public"
},
"description": "Jøkul react contextual-menu",
"homepage": "https://github.com/fremtind/jokul/tree/main/packages/contextual-menu-react",
"description": "Jøkul react menu",
"homepage": "https://github.com/fremtind/jokul/tree/main/packages/menu-react",
"keywords": [
"jøkul",
"fremtind"
Expand All @@ -30,14 +30,14 @@
"build:types": "tsc -p tsconfig-for-declarations.json",
"build:scripts": "node ./esbuild.prod.mjs",
"build": "run-s build:*",
"test": "jest --testMatch '**/contextual-menu-react/**/*.test.+(ts|tsx|js)' --config=../../jest.config.js",
"test": "jest --testMatch '**/menu-react/**/*.test.+(ts|tsx|js)' --config=../../jest.config.js",
"dev:js": "ESBUILD_WATCH=true node ./esbuild.dev.mjs",
"dev:server": "nodemon ./dist/server.js",
"dev": "node ./esbuild.dev.mjs && run-p dev:*"
},
"dependencies": {
"@floating-ui/react": "^0.24.2",
"@fremtind/jkl-contextual-menu": "^2.2.0",
"@fremtind/jkl-menu": "^2.3.1",
"@fremtind/jkl-core": "^14.4.0",
"@fremtind/jkl-icons-react": "^9.1.6",
"@fremtind/jkl-react-hooks": "^12.1.8",
Expand Down
12 changes: 6 additions & 6 deletions packages/menu/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# [`@fremtind/jkl-contextual-menu`](https://jokul.fremtind.no/komponenter/contextual-menu)
# [`@fremtind/jkl-menu`](https://jokul.fremtind.no/komponenter/menu)

Se portalen for [bruk og prinsipper](https://jokul.fremtind.no/komponenter/contextual-menu).
Se portalen for [bruk og prinsipper](https://jokul.fremtind.no/komponenter/menu).

## Installasjon

**Tips:** om du bruker [React-pakken](../contextual-menu-react/) trenger du ikke installere denne pakken direkte.
**Tips:** om du bruker [React-pakken](../menu-react/) trenger du ikke installere denne pakken direkte.

1. `npm i @fremtind/jkl-contextual-menu`.
1. `npm i @fremtind/jkl-menu`.
2. Importér stil-pakken i prosjektet ditt.

```js
// Importer stilark via JavaScript med CSS-loader.
import "@fremtind/jkl-contextual-menu/contextual-menu.min.css";
import "@fremtind/jkl-menu/menu.min.css";
```

```scss
// Eller importer stilark via SCSS.
@use "@fremtind/jkl-contextual-menu/contextual-menu";
@use "@fremtind/jkl-menu/menu";
```
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions portal/gatsby-browser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ import "@fremtind/jkl-list/list.min.css";
import "@fremtind/jkl-loader/loader.min.css";
import "@fremtind/jkl-loader/skeleton-loader.min.css";
import "@fremtind/jkl-logo/logo.min.css";
import "@fremtind/jkl-menu/menu.min.css";
import "../packages/menu/menu.min.css";
import "@fremtind/jkl-contextual-menu/contextual-menu.min.css";
import "@fremtind/jkl-message/message.min.css";
import "@fremtind/jkl-modal/modal.min.css";
import "@fremtind/jkl-radio-button/radio-button.min.css";
Expand All @@ -41,7 +42,6 @@ import "@fremtind/jkl-toggle-switch/toggle-switch.min.css";
import "@fremtind/jkl-icons/icons.min.css";
import "@fremtind/jkl-image/image.min.css";
import "@fremtind/jkl-cookie-consent/cookie-consent.min.css";
import "@fremtind/jkl-contextual-menu/contextual-menu.min.css";
import "@fremtind/jkl-expand-button/expand-button.min.css";
import "@fremtind/jkl-progress-bar/progress-bar.min.css";
import "@fremtind/jkl-popover/popover.min.css";
Expand Down

0 comments on commit 18ada17

Please sign in to comment.