Skip to content

Commit

Permalink
Merge branch 'master' into feat/select-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
piofinn committed Jan 5, 2021
2 parents 886ea59 + 5cd507e commit 517c66c
Show file tree
Hide file tree
Showing 170 changed files with 1,544 additions and 916 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
build: yarn run build
start: yarn serve
wait-on: "http://localhost:9000"
wait-on-timeout: 180
wait-on-timeout: 280
command-prefix: 'percy exec -- npx'

- name: Upload screenshots
Expand Down
12 changes: 12 additions & 0 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ Cypress.Commands.add("waitForAnimation", (timeout = 300) => {
cy.wait(timeout);
});

Cypress.Commands.add("getComponentInIphoneMode", () => {
cy.get("#jkl-portal-device-Iphone-X").click().waitForAnimation(100).getByTestid("jkl-portal__iphone-view");
});

Cypress.Commands.add("getComponentInIpadMode", () => {
cy.get("#jkl-portal-device-Ipad-Pro").click().waitForAnimation(100).getByTestid("jkl-portal__ipad-view");
});

Cypress.Commands.add("getComponentInLaptopMode", () => {
cy.get("#jkl-portal-device-Full-HD").click().waitForAnimation(100).getByTestid("jkl-portal__laptop-view");
});

Cypress.Commands.add("verifyA11y", () => {
// Cypress misunderstand the animation for lack of contrast
// Must wait a bit long to make sure all animations are done, else color contrast is off
Expand Down
6 changes: 6 additions & 0 deletions packages/accordion-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 1.7.0 (2020-12-15)

### Features

- display types in portal ([5c62a16](https://github.com/fremtind/jokul/commit/5c62a161c278d3a5a136741aea8dcf9b62338bda))

## 1.6.0 (2020-11-25)

### Features
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions packages/accordion-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fremtind/jkl-accordion-react",
"version": "1.6.0",
"version": "1.7.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -34,12 +34,12 @@
},
"dependencies": {
"@babel/runtime": "^7.9.0",
"@fremtind/jkl-accordion": "^1.2.7",
"@fremtind/jkl-react-hooks": "^1.9.0",
"@fremtind/jkl-accordion": "^1.2.8",
"@fremtind/jkl-react-hooks": "^1.10.0",
"classnames": "^2.2.6"
},
"devDependencies": {
"@fremtind/jkl-portal-components": "^0.8.0",
"@fremtind/jkl-portal-components": "^0.9.0",
"@nrk/core-toggle": "3.0.8"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/accordion-react/src/Accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import React, { FC } from "react";

interface Props {
inverted?: boolean;
className?: string;
}

export const Accordion: React.FC<Props> = ({ children, inverted, className = "" }) => {
export const Accordion: FC<Props> = ({ children, inverted, className = "" }) => {
return (
<div
data-testid="jkl-accordion"
Expand Down
4 changes: 2 additions & 2 deletions packages/accordion-react/src/ExpandArrow.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import React, { FC } from "react";
import classNames from "classnames";

interface Props {
className?: string;
expanded?: boolean;
}

export const ExpandArrow: React.FC<Props> = ({ expanded = false, className }) => {
export const ExpandArrow: FC<Props> = ({ expanded = false, className }) => {
const componentClassName = classNames(
{
"jkl-expand-arrow": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fremtind/jkl-accordion",
"version": "1.2.7",
"version": "1.2.8",
"publishConfig": {
"access": "public"
},
Expand All @@ -25,7 +25,7 @@
"dev": "parcel example/index.html"
},
"dependencies": {
"@fremtind/jkl-core": "^4.17.0"
"@fremtind/jkl-core": "^4.18.0"
},
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/alert-message-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 1.5.0 (2020-12-15)

### Features

- display types in portal ([5c62a16](https://github.com/fremtind/jokul/commit/5c62a161c278d3a5a136741aea8dcf9b62338bda))

## 1.4.0 (2020-11-25)

### Features
Expand Down
8 changes: 4 additions & 4 deletions packages/alert-message-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fremtind/jkl-alert-message-react",
"version": "1.4.0",
"version": "1.5.0",
"publishConfig": {
"access": "public"
},
Expand Down Expand Up @@ -35,12 +35,12 @@
},
"dependencies": {
"@babel/runtime": "^7.9.0",
"@fremtind/jkl-alert-message": "^1.2.8",
"@fremtind/jkl-alert-message": "^1.2.9",
"classnames": "^2.2.6"
},
"devDependencies": {
"@fremtind/jkl-core": "^4.17.0",
"@fremtind/jkl-portal-components": "^0.8.0"
"@fremtind/jkl-core": "^4.18.0",
"@fremtind/jkl-portal-components": "^0.9.0"
},
"peerDependencies": {
"@types/react": "^16.8.17",
Expand Down
4 changes: 2 additions & 2 deletions packages/alert-message-react/src/AlertMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from "react";
import React, { ReactNode } from "react";
import classNames from "classnames";
import { MessageIcon } from "./common/MessageIcon";

type messageTypes = "info" | "error" | "success" | "warning";

interface Props {
children: React.ReactNode;
children: ReactNode;
className?: string;
inverted?: boolean;
maxContentWidth?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/alert-message/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fremtind/jkl-alert-message",
"version": "1.2.8",
"version": "1.2.9",
"publishConfig": {
"access": "public"
},
Expand All @@ -26,7 +26,7 @@
"dev": "parcel example/index.html"
},
"dependencies": {
"@fremtind/jkl-core": "^4.17.0"
"@fremtind/jkl-core": "^4.18.0"
},
"repository": {
"type": "git",
Expand Down
12 changes: 12 additions & 0 deletions packages/button-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 2.5.1 (2020-12-16)

### Bug Fixes

- **button:** add missing types from button ([76d0259](https://github.com/fremtind/jokul/commit/76d0259e32ef1c394bca06a0927f313e708ff907))

## 2.5.0 (2020-12-15)

### Features

- display types in portal ([5c62a16](https://github.com/fremtind/jokul/commit/5c62a161c278d3a5a136741aea8dcf9b62338bda))

## 2.4.1 (2020-11-26)

### Bug Fixes
Expand Down
57 changes: 3 additions & 54 deletions packages/button-react/documentation/Example.tsx
Original file line number Diff line number Diff line change
@@ -1,59 +1,8 @@
import React from "react";
import { ExampleComponentProps } from "@fremtind/jkl-portal-components";
import { PrimaryButton, SecondaryButton, TertiaryButton } from "../src";
import "./style.scss";

function onClick() {
console.log("Hello!");
}

export const Primary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<PrimaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Send
</PrimaryButton>
);

export const Secondary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<SecondaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Gå videre
</SecondaryButton>
);

export const Tertiary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<TertiaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</TertiaryButton>
);
import { Primary } from "./Primary";
import { Secondary } from "./Secondary";
import { Tertiary } from "./Tertiary";

export const Example: React.FC<ExampleComponentProps> = ({ boolValues }) => {
return (
Expand Down
39 changes: 39 additions & 0 deletions packages/button-react/documentation/Primary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { ExampleComponentProps } from "@fremtind/jkl-portal-components";
import { PrimaryButton } from "../src";

function onClick() {
console.log("Hello!");
}

export const Primary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<PrimaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</PrimaryButton>
);

export const PrimaryCode = `
<PrimaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</PrimaryButton>
`;
39 changes: 39 additions & 0 deletions packages/button-react/documentation/Secondary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { ExampleComponentProps } from "@fremtind/jkl-portal-components";
import { SecondaryButton } from "../src";

function onClick() {
console.log("Hello!");
}

export const Secondary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<SecondaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</SecondaryButton>
);

export const SecondaryCode = `
<SecondaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</SecondaryButton>
`;
39 changes: 39 additions & 0 deletions packages/button-react/documentation/Tertiary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react";
import { ExampleComponentProps } from "@fremtind/jkl-portal-components";
import { TertiaryButton } from "../src";

function onClick() {
console.log("Hello!");
}

export const Tertiary: React.FC<ExampleComponentProps> = ({ boolValues }) => (
<TertiaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</TertiaryButton>
);

export const TertiaryCode = `
<TertiaryButton
inverted={boolValues && boolValues["Invertert"]}
forceCompact={boolValues && boolValues["Kompakt"]}
loader={
!!boolValues?.["withLoader"]
? { showLoader: !!boolValues?.["isLoading"], textDescription: "Laster innhold" }
: undefined
}
onClick={onClick}
className="jkl-spacing--right-1"
>
Avbryt
</TertiaryButton>
`;

0 comments on commit 517c66c

Please sign in to comment.