Skip to content

Commit 723ad59

Browse files
authored
IBX-10191: Update various variables and names to match figma changes (#7)
1 parent 91e2ada commit 723ad59

File tree

14 files changed

+63
-43
lines changed

14 files changed

+63
-43
lines changed

packages/assets/src/scss/_buttons.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $btns-types: (
9494
transparent,
9595
),
9696
),
97-
'black-secondary': (
97+
'secondary-alt': (
9898
'default': (
9999
$color-neutral-240,
100100
transparent,
@@ -122,7 +122,7 @@ $btns-types: (
122122
$color-neutral-60,
123123
),
124124
),
125-
'black-tertiary': (
125+
'tertiary-alt': (
126126
'default': (
127127
$color-neutral-240,
128128
transparent,
@@ -153,7 +153,7 @@ $btns-types: (
153153
);
154154

155155
$btns-sizes: (
156-
'large': calculateRem(14px) calculateRem(18px) calculateRem(11px) calculateRem(12px),
156+
'medium': calculateRem(14px) calculateRem(18px) calculateRem(11px) calculateRem(12px),
157157
'small': calculateRem(14px) calculateRem(18px) calculateRem(7px) calculateRem(16px),
158158
'extra-small': calculateRem(10px) calculateRem(15px) calculateRem(4px) calculateRem(8px),
159159
);

packages/assets/src/scss/_icons.scss

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@
33
@use 'mixins/icons' as mixins;
44

55
$icons-sizes:
6-
'tiny' calculateRem(8px),
7-
'tiny-small' calculateRem(12px),
8-
'small' calculateRem(16px),
9-
'small-medium' calculateRem(20px),
10-
'medium' calculateRem(24px),
11-
'medium-large' calculateRem(38px),
12-
'large' calculateRem(48px),
13-
'extra-large' calculateRem(64px);
6+
'tiny' calculateRem(12px),
7+
'tiny-small' calculateRem(16px),
8+
'small' calculateRem(20px),
9+
'small-medium' calculateRem(24px),
10+
'medium' calculateRem(28px),
11+
'medium-large' calculateRem(32px),
12+
'large' calculateRem(36px),
13+
'large-huge' calculateRem(48px),
14+
'huge' calculateRem(64px);
1415

1516
.ids-icon {
16-
width: calculateRem(32px);
17-
height: calculateRem(32px);
17+
width: calculateRem(16px);
18+
height: calculateRem(16px);
1819
transition: fill 0.3s $transition-timing-function;
1920

2021
@each $name, $size in $icons-sizes {

packages/assets/src/scss/_variables.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ $base-line-height: 1.5 !default;
1313

1414
// Various component variables
1515
$border-radius-medium: calculateRem(8px) !default;
16+
$border-radius-large: calculateRem(12px) !default;
1617

1718
$assets-base-path: '/' !default;
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
@use 'variables';
1+
@use 'variables' as *;
22

33
%heading {
4-
font-family: variables.$font-family-headings;
4+
font-family: $font-family-alt;
55
font-weight: 600;
66
}
77

88
@mixin h1 {
99
@extend %heading;
10-
font-size: variables.$h1-font-size;
10+
font-size: $text-font-size-3xl;
1111
}
1212

1313
@mixin h2 {
1414
@extend %heading;
15-
font-size: variables.$h2-font-size;
15+
font-size: $text-font-size-2xl;
1616
}
1717

1818
@mixin h3 {
1919
@extend %heading;
20-
font-size: variables.$h3-font-size;
20+
font-size: $text-font-size-xl;
2121
}
2222

2323
@mixin h4 {
2424
@extend %heading;
25-
font-size: variables.$h4-font-size;
25+
font-size: $text-font-size-l;
2626
}
2727

2828
@mixin h5 {
2929
@extend %heading;
30-
font-size: variables.$h5-font-size;
30+
font-size: $text-font-size-m;
3131
}
3232

3333
@mixin h6 {
3434
@extend %heading;
35-
font-size: variables.$h6-font-size;
35+
font-size: $text-font-size-s;
3636
}

packages/assets/src/scss/variables/_typography.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ $font-family:
2424
'Helvetica Neue',
2525
Arial,
2626
sans-serif !default;
27-
$font-family-headings: 'Work Sans', sans-serif !default;
27+
$font-family-alt: 'Work Sans', 'Futura', 'Avenir Next', 'Trebuchet MS', 'Verdana', sans-serif !default;

packages/components/src/Button/Button.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const SecondaryWithExtraAria: Story = {
9595
export const BlackSecondary: Story = {
9696
name: 'Black Secondary',
9797
args: {
98-
type: 'black-secondary',
98+
type: 'secondary-alt',
9999
children: 'Button label',
100100
disabled: false,
101101
},
@@ -104,7 +104,7 @@ export const BlackSecondary: Story = {
104104
export const BlackSecondarySmall: Story = {
105105
name: 'Black Secondary (Small)',
106106
args: {
107-
type: 'black-secondary',
107+
type: 'secondary-alt',
108108
children: 'Button label',
109109
size: 'small',
110110
},
@@ -113,7 +113,7 @@ export const BlackSecondarySmall: Story = {
113113
export const BlackSecondaryExtraSmall: Story = {
114114
name: 'Black Secondary (Extra Small)',
115115
args: {
116-
type: 'black-secondary',
116+
type: 'secondary-alt',
117117
children: 'Button label',
118118
size: 'extra-small',
119119
},

packages/components/src/Button/Button.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ const Button = ({
1111
disabled = false,
1212
extraAria = {},
1313
extraClasses = '',
14-
size = 'large',
14+
size = 'medium',
1515
title = '',
1616
type = 'primary',
1717
}: ButtonProps) => {
1818
const classes = createCssClassNames({
1919
'ids-btn': true,
20-
[`ids-btn--${type}`]: !!type,
21-
[`ids-btn--${size}`]: !!size,
20+
[`ids-btn--${type}`]: true,
21+
[`ids-btn--${size}`]: true,
2222
'ids-btn--disabled': disabled,
23-
[extraClasses]: true,
23+
[extraClasses]: !!extraClasses,
2424
});
2525
const btnAriaLabel = ariaLabel ?? (typeof children === 'string' ? children : undefined);
2626

packages/components/src/Button/Button.types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { ReactNode } from 'react';
22

33
import { BaseComponentAriaAttributes } from '@ids-types/general';
44

5-
export const BUTTON_SIZE_VALUES = ['large', 'small', 'extra-small'] as const;
6-
export const BUTTON_TYPE_VALUES = ['primary', 'secondary', 'tertiary', 'black-secondary', 'black-tertiary'] as const;
5+
export const BUTTON_SIZE_VALUES = ['medium', 'small', 'extra-small'] as const;
6+
export const BUTTON_TYPE_VALUES = ['primary', 'secondary', 'tertiary', 'secondary-alt', 'tertiary-alt'] as const;
77

88
export type ButtonSizeType = (typeof BUTTON_SIZE_VALUES)[number];
99
export type ButtonTypesType = (typeof BUTTON_TYPE_VALUES)[number];

packages/components/src/Expander/Expander.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const Expander = ({ onClick, collapseLabel = '', expandLabel = '', hasIcon = tru
4040
onClick(!isExpanded);
4141
}}
4242
size="small"
43-
type="black-tertiary"
43+
type="tertiary-alt"
4444
>
4545
{label}
4646
{renderExpanderIcon()}

packages/components/src/Icon/Icon.stories.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,19 @@ export const IconLarge: Story = {
9393
},
9494
};
9595

96-
export const IconExtraLarge: Story = {
97-
name: 'Icon Extra-Large',
96+
export const IconLargeHuge: Story = {
97+
name: 'Icon Large-Huge',
9898
args: {
9999
name: 'bookmark',
100-
size: 'extra-large',
100+
size: 'large-huge',
101+
},
102+
};
103+
104+
export const IconHuge: Story = {
105+
name: 'Icon Huge',
106+
args: {
107+
name: 'bookmark',
108+
size: 'huge',
101109
},
102110
};
103111

0 commit comments

Comments
 (0)