Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytter ut ikonene i alle komponenter #1661

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4225bf2
feat(ffe-accordion-react): bytter ikon til material
HeleneKassandra Aug 17, 2023
45c8e91
fix(ffe-accordion): endre måten ikon farge settes
HeleneKassandra Aug 17, 2023
1e288e2
fix(component-overview): oppdater eksempler
HeleneKassandra Aug 21, 2023
82af56c
feat(ffe-buttons-react): bytt ikoner til material symbols
HeleneKassandra Aug 21, 2023
fd2a0a1
fix(ffe-buttons): endringer relatert til ikonbytte
HeleneKassandra Aug 21, 2023
c025c9b
fix(ffe-message-box-react): endrer ikon til material symbols
HeleneKassandra Aug 22, 2023
de4620a
fix(ffe-message-box): tilpasser styling til nye ikoner
HeleneKassandra Aug 22, 2023
1dffae7
fix(ffe-system-message-react): endrer ikon til material symbols
HeleneKassandra Aug 22, 2023
15fd201
fix(ffe-system-message): endre til material symbols
HeleneKassandra Aug 22, 2023
ee0e4b6
fix(ffe-symbols): endre font fil til mindre
HeleneKassandra Aug 25, 2023
057b97a
fix(ffe-symbols-react): fjerner color prop
HeleneKassandra Aug 25, 2023
f600d20
fix(ffe-message-box-react): added missing titleElement ts type
Aug 25, 2023
483285c
chore(release): publish
sb1-designsystem Aug 25, 2023
8d59124
fix(ffe-buttons-react): erstatter fragment i expandbutton med span
HeleneKassandra Aug 29, 2023
0126d6f
fix(ffe-symbols): deler opp ikon font-filen
HeleneKassandra Aug 28, 2023
03a086e
fix(ffe-symbols-react): endringer relatert til at det nå er flere fon…
HeleneKassandra Aug 28, 2023
b3ea1f6
chore(release): publish
sb1-designsystem Aug 29, 2023
5a46ff4
fix(ffe-context-message): stil endringer for å passe nye ikoner
HeleneKassandra Sep 1, 2023
308eb1a
fix(ffe-context-message-react): endrer fra ffe-icons til ffe-symbols
HeleneKassandra Sep 1, 2023
35e4c73
chore(release): publish
sb1-designsystem Aug 25, 2023
ea75f56
chore(release): publish
sb1-designsystem Aug 29, 2023
68ec216
chore(ffe-account-selector-react)!: remove AccountSelectorHighCapacity
simen-sb1 Aug 29, 2023
aa6d9c5
chore(release): publish
sb1-designsystem Aug 31, 2023
8f073bd
feat(ffe-formatters): add foreign account number formating
henninghuseby Aug 31, 2023
e205687
chore(release): publish
sb1-designsystem Sep 1, 2023
6b4f772
chore(ffe-searchable-dropdown-react)!: remove SearchableDropdownHighC…
simen-sb1 Sep 1, 2023
93b1d96
chore(release): publish
sb1-designsystem Sep 1, 2023
7c2bd85
fix(component-overview): delete high capacity examples og account sle…
Sep 1, 2023
d21ed5d
chore(release): publish
sb1-designsystem Sep 1, 2023
104a1e7
Merge branch 'develop' into update-icons-in-components
HeleneKassandra Sep 19, 2023
6fe5697
fix(ffe-lists-react): endrer fra ffe-icons til ffe-symbols
HeleneKassandra Sep 19, 2023
df03a61
fix(ffe-lists): endre styling til å passe ffe-symbols
HeleneKassandra Sep 19, 2023
6255002
fix(component-overview): oppdater eksempler
HeleneKassandra Sep 27, 2023
0c42c7a
fix(ffe-cards-react): endrer til ffe-symbols
HeleneKassandra Sep 27, 2023
d53b3e1
fix(ffe-cards): endrer til ffe-symbols
HeleneKassandra Sep 27, 2023
9e066b6
fix(ffe-context-message-react): fix failing test
HeleneKassandra Sep 28, 2023
5bbbf6f
fix(ffe-cards-react): fix failing test
HeleneKassandra Oct 2, 2023
03da33e
Merge branch 'develop' into update-icons-in-components
HeleneKassandra Oct 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ActionButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { HakeIkon } from '@sb1/ffe-icons-react';

<>
<ButtonGroup thin={true}>
<ActionButton
onClick={f => f}
ariaLoadingMessage="Vennligst vent..."
leftIcon={<HakeIkon />}
leftIcon="check"
>
Bekreft
</ActionButton>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ActionButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { HakeIkon } from '@sb1/ffe-icons-react';

<>
<ButtonGroup thin={true}>
<ActionButton
onClick={f => f}
ariaLoadingMessage="Vennligst vent..."
rightIcon={<HakeIkon />}
rightIcon="check"
>
Bekreft
</ActionButton>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PrimaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { HakeIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<PrimaryButton leftIcon={<HakeIkon />} onClick={f => f}>Primary knapp</PrimaryButton>
<PrimaryButton leftIcon='check' onClick={f => f}>Primary knapp</PrimaryButton>
</ButtonGroup>;
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { PrimaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { HakeIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<PrimaryButton rightIcon={<HakeIkon />} onClick={f => f}>Primary knapp</PrimaryButton>
<PrimaryButton rightIcon="check" onClick={f => f}>Primary knapp</PrimaryButton>
</ButtonGroup>;
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { SecondaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { BindersIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<SecondaryButton leftIcon={<BindersIkon />} onClick={f => f}>
<SecondaryButton leftIcon="attach_file" onClick={f => f}>
Secondary m/ ikon
</SecondaryButton>
</ButtonGroup>;
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { SecondaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { BindersIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<SecondaryButton rightIcon={<BindersIkon />} onClick={f => f}>
<SecondaryButton rightIcon="attach_file" onClick={f => f}>
Secondary m/ ikon
</SecondaryButton>
</ButtonGroup>;
3 changes: 1 addition & 2 deletions component-overview/examples/buttons/SecondaryButton.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { SecondaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { BindersIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<SecondaryButton onClick={f => f}>Secondary knapp</SecondaryButton>
<SecondaryButton leftIcon={<BindersIkon />} onClick={f => f}>
<SecondaryButton leftIcon="attach_file" onClick={f => f}>
Secondary m/ ikon
</SecondaryButton>
<SecondaryButton
Expand Down
3 changes: 1 addition & 2 deletions component-overview/examples/buttons/TaskButton.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TaskButton, ButtonGroup } from '@sb1/ffe-buttons-react';
import { PlussIkon } from '@sb1/ffe-icons-react';

<ButtonGroup thin={true}>
<TaskButton icon={<PlussIkon />}>Legg til bruker</TaskButton>
<TaskButton icon="add">Legg til bruker</TaskButton>
</ButtonGroup>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { TertiaryButton, ButtonGroup } from '@sb1/ffe-buttons-react';

<ButtonGroup thin={true}>
<TertiaryButton onClick={f => f}>Tertiærknapp</TertiaryButton>
<TertiaryButton rightIcon="check" onClick={f => f}>Tertiærknapp</TertiaryButton>
<TertiaryButton leftIcon="check" onClick={f => f}>Tertiærknapp</TertiaryButton>
</ButtonGroup>
4 changes: 2 additions & 2 deletions component-overview/examples/cards/IconCard-condensed.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IconCard } from '@sb1/ffe-cards-react';
import { SparegrisIkon } from '@sb1/ffe-icons-react';
import Symbol from "@sb1/ffe-symbols-react";

<IconCard href="https://design.sparebank1.no" icon={<SparegrisIkon />} condensed={true}>
<IconCard href="https://design.sparebank1.no" icon={<Symbol ariaLabel={null}>savings</Symbol>} condensed={true}>
{({ Title, Subtext }) => (
<>
<Title>Sparekonto voksen 25</Title>
Expand Down
4 changes: 2 additions & 2 deletions component-overview/examples/cards/IconCard.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IconCard } from '@sb1/ffe-cards-react';
import { GrafOppIkon } from '@sb1/ffe-icons-react';
import Symbol from "@sb1/ffe-symbols-react";

<IconCard href="https://design.sparebank1.no" icon={<GrafOppIkon />}>
<IconCard href="https://design.sparebank1.no" icon={<Symbol ariaLabel={null}>savings</Symbol>}>
{({ CardName, Title, Subtext, Text }) => (
<>
<CardName>Kortnavn</CardName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StippledCard } from '@sb1/ffe-cards-react';
import { GrafOppIkon } from '@sb1/ffe-icons-react';
import Symbol from '@sb1/ffe-symbols-react';

<StippledCard href="https://design.sparebank1.no" img={{ type: 'icon', element: <GrafOppIkon /> } } condensed={true}>
<StippledCard href="https://design.sparebank1.no" img={{ type: 'icon', element: <Symbol ariaLabel={null}>monitoring</Symbol> } } condensed={true}>
{({ Title, Subtext }) => (
<>
<Title>Sparekonto voksen 25</Title>
Expand Down
4 changes: 2 additions & 2 deletions component-overview/examples/cards/StippledCard.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { StippledCard } from '@sb1/ffe-cards-react';
import { GrafOppIkon } from '@sb1/ffe-icons-react';
import Symbol from '@sb1/ffe-symbols-react';


<div>
Expand All @@ -19,7 +19,7 @@ import { GrafOppIkon } from '@sb1/ffe-icons-react';
</>
)}
</StippledCard>
<StippledCard href="https://design.sparebank1.no" img={{ type: 'icon', element: <GrafOppIkon /> } }>
<StippledCard href="https://design.sparebank1.no" img={{ type: 'icon', element: <Symbol ariaLabel={true}>monitoring</Symbol> } }>
{({ CardName, Title, Subtext, Text }) => (
<>
<CardName>CardName</CardName>
Expand Down
2 changes: 1 addition & 1 deletion packages/ffe-accordion-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@sb1/ffe-accordion": "^9.1.0",
"@sb1/ffe-collapse-react": "^2.0.4",
"@sb1/ffe-icons-react": "^7.3.5",
"@sb1/ffe-symbols-react": "^2.0.1",
"classnames": "^2.3.1",
"prop-types": "^15.7.2",
"uuid": "^9.0.0"
Expand Down
11 changes: 7 additions & 4 deletions packages/ffe-accordion-react/src/AccordionItem.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useRef, useState } from 'react';
import { bool, func, node, string } from 'prop-types';
import { v4 as uuid } from 'uuid';
import { ChevronIkon } from '@sb1/ffe-icons-react';
import Symbol from '@sb1/ffe-symbols-react';
import Collapse from '@sb1/ffe-collapse-react';
import classNames from 'classnames';

Expand Down Expand Up @@ -71,10 +71,13 @@ const AccordionItem = ({
<span className="ffe-accordion-item__heading-button-content">
{heading}
<span className="ffe-accordion-item__heading-icon-wrapper">
<ChevronIkon
<Symbol
className="ffe-accordion-item__heading-icon"
aria-hidden="true"
/>
ariaLabel=""
size="sm"
>
expand_more
</Symbol>
</span>
</span>
</button>
Expand Down
10 changes: 4 additions & 6 deletions packages/ffe-accordion/less/accordion.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
&:hover {
.ffe-accordion-item__heading-icon {
transition: fill @ffe-transition-duration @ffe-ease;
fill: var(--ffe-v-accordion-secondary-color);
color: var(--ffe-v-accordion-secondary-color);
}

.ffe-accordion-item__heading-icon-wrapper {
Expand All @@ -56,14 +56,12 @@
line-height: 0;
border: 1px solid var(--ffe-v-accordion-primary-color);
border-radius: 50%;
padding: 11px;
padding: var(--ffe-spacing-xs);
}

&__heading-icon {
flex: 0 0 auto;
fill: var(--ffe-v-accordion-primary-color);
width: 11px;
height: 11px;
color: var(--ffe-v-accordion-primary-color);
transition: transform @ffe-transition-duration @ffe-ease-in-out-back;
}

Expand Down Expand Up @@ -92,7 +90,7 @@
.ffe-accordion-item {
&:hover {
.ffe-accordion-item__heading-icon {
fill: var(--ffe-v-accordion-secondary-color);
color: var(--ffe-v-accordion-secondary-color);
}

.ffe-accordion-item__heading-icon-wrapper {
Expand Down
2 changes: 1 addition & 1 deletion packages/ffe-buttons-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@sb1/ffe-buttons": "^17.1.0",
"@sb1/ffe-icons-react": "^7.3.5",
"@sb1/ffe-symbols-react": "^2.0.1",
"classnames": "^2.3.1",
"prop-types": "^15.7.2"
},
Expand Down
25 changes: 20 additions & 5 deletions packages/ffe-buttons-react/src/ActionButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,31 @@ import {
elementType,
} from 'prop-types';
import classNames from 'classnames';
import Symbol from '@sb1/ffe-symbols-react';

import Button from './BaseButton';

export default function ActionButton(props) {
const { className, ...rest } = props;
const { className, leftIcon, rightIcon, ...rest } = props;

return (
<Button
buttonType="action"
className={classNames(className)}
leftIcon={
leftIcon && (
<Symbol ariaLabel="" size="sm">
{leftIcon}
</Symbol>
)
}
rightIcon={
rightIcon && (
<Symbol ariaLabel="" size="sm">
{rightIcon}
</Symbol>
)
}
{...rest}
/>
);
Expand All @@ -40,8 +55,8 @@ ActionButton.propTypes = {
innerRef: oneOfType([func, shape({ current: object })]),
/** Shows a loader if true */
isLoading: bool,
/** Icon shown to the left of the label */
leftIcon: node,
/** Icon shown to the right of the label */
rightIcon: node,
/** Name of Icon shown to the left of the label */
leftIcon: string,
/** Name of Icon shown to the right of the label */
rightIcon: string,
};
15 changes: 14 additions & 1 deletion packages/ffe-buttons-react/src/BackButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,21 @@ import {
elementType,
} from 'prop-types';
import InlineButton from './InlineBaseButton';
import Symbol from '@sb1/ffe-symbols-react';

const BackButton = props => <InlineButton buttonType="back" {...props} />;
const BackButton = props => {
return (
<InlineButton
buttonType="back"
leftIcon={
<Symbol ariaLabel="" size="md">
chevron_left
</Symbol>
}
{...props}
/>
);
};

BackButton.propTypes = {
/** The button label */
Expand Down
4 changes: 2 additions & 2 deletions packages/ffe-buttons-react/src/BaseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ const BaseButton = props => {
{leftIcon &&
React.cloneElement(leftIcon, {
className: 'ffe-button__icon ffe-button__icon--left',
'aria-hidden': 'true',
weight: 300,
})}
{children}
{rightIcon &&
React.cloneElement(rightIcon, {
className: 'ffe-button__icon ffe-button__icon--right',
'aria-hidden': 'true',
weight: 300,
})}
</span>
{supportsSpinner && isLoading && (
Expand Down
49 changes: 31 additions & 18 deletions packages/ffe-buttons-react/src/ExpandButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
elementType,
} from 'prop-types';
import classNames from 'classnames';
import { KryssIkon } from '@sb1/ffe-icons-react';
import Symbol from '@sb1/ffe-symbols-react';

const ExpandButton = props => {
const {
Expand Down Expand Up @@ -38,23 +38,36 @@ const ExpandButton = props => {
{...rest}
>
{isExpanded && (
<KryssIkon className="ffe-button__icon" aria-hidden="true" />
<Symbol
className="ffe-button__icon"
ariaLabel=""
size="sm"
weight={300}
>
close
</Symbol>
)}
{!isExpanded && (
<span>
{leftIcon &&
React.cloneElement(leftIcon, {
'aria-hidden': true,
className:
'ffe-button__icon ffe-button__icon--left',
})}
{leftIcon && (
<Symbol
className="ffe-button__icon ffe-button__icon--left"
ariaLabel=""
weight={300}
>
{leftIcon}
</Symbol>
)}
{children}
{rightIcon &&
React.cloneElement(rightIcon, {
'aria-hidden': true,
className:
'ffe-button__icon ffe-button__icon--right',
})}
{rightIcon && (
<Symbol
className="ffe-button__icon ffe-button__icon--right"
ariaLabel=""
weight={300}
>
{rightIcon}
</Symbol>
)}
</span>
)}
</Element>
Expand All @@ -70,10 +83,10 @@ ExpandButton.propTypes = {
element: oneOfType([func, string, elementType]),
/** An accessible label for the close-button, only shown in the "isExpanded" state */
closeLabel: string,
/** Icon shown to the left of the label */
leftIcon: node,
/** Icon shown to the right of the label */
rightIcon: node,
/** Name of Icon shown to the left of the label */
leftIcon: string,
/** Name of Icon shown to the right of the label */
rightIcon: string,
/** Ref-setting function, or ref created by useRef, passed to the button element */
innerRef: oneOfType([func, shape({ current: object })]),
/** When true the component will render a circle with an X indicating whatever is controlled is in an expanded state. */
Expand Down
Loading