From 94312ac2c5325afa2ac4d28f310aa43ee797fb86 Mon Sep 17 00:00:00 2001 From: James Nguyen Date: Fri, 27 Oct 2023 15:08:46 +1000 Subject: [PATCH 1/6] fix: #194 add documentation for Font Weight --- .../stories/foundation/typography.stories.tsx | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/ui/src/stories/foundation/typography.stories.tsx b/packages/ui/src/stories/foundation/typography.stories.tsx index 3fb9b6f79..91d2fe8f8 100644 --- a/packages/ui/src/stories/foundation/typography.stories.tsx +++ b/packages/ui/src/stories/foundation/typography.stories.tsx @@ -91,3 +91,39 @@ export const BodyFont = () => { ); }; + +/** + * Fonts weight + */ +export const FontWeight = () => { + const fontWeight = [ + { className: 'typography-brand-8 font-light', weight: '300' }, + { className: 'typography-brand-8 font-normal', weight: '400' }, + { className: 'typography-brand-8 font-medium', weight: '500' }, + { className: 'typography-brand-8 font-semibold', weight: '600' }, + { className: 'typography-brand-8 font-bold', weight: '700' }, + ]; + return ( + + Font Weight + + + Token + Value + Tailwind class + + + + {fontWeight.map(i => ( + + + {i.className.replace('typography-brand-8 font-', '')} + + {i.weight} + {i.className.replace('typography-brand-8 ', '')} + + ))} + +
+ ); +}; From de4514d2cf3dc4f170f28d301c514db042826495 Mon Sep 17 00:00:00 2001 From: James Nguyen Date: Fri, 27 Oct 2023 15:38:23 +1000 Subject: [PATCH 2/6] fix: add capitalize letter --- .../stories/foundation/typography.stories.tsx | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/stories/foundation/typography.stories.tsx b/packages/ui/src/stories/foundation/typography.stories.tsx index 91d2fe8f8..af4c1b7df 100644 --- a/packages/ui/src/stories/foundation/typography.stories.tsx +++ b/packages/ui/src/stories/foundation/typography.stories.tsx @@ -1,4 +1,5 @@ import { type Meta, StoryFn } from '@storybook/react'; +import { clsx } from 'clsx'; import { Table } from '../../components/index.js'; @@ -40,7 +41,7 @@ export const BrandFont = () => { {typographyBrandScale.map(i => ( - {i.className.replace('typography-', '')} + {i.className.replace('typography-', '')} {i.size} {i.className} @@ -81,7 +82,7 @@ export const BodyFont = () => { {typographyBrandScale.map(i => ( - {i.className.replace('typography-', '')} + {i.className.replace('typography-', '')} {i.size} {i.className} @@ -97,11 +98,11 @@ export const BodyFont = () => { */ export const FontWeight = () => { const fontWeight = [ - { className: 'typography-brand-8 font-light', weight: '300' }, - { className: 'typography-brand-8 font-normal', weight: '400' }, - { className: 'typography-brand-8 font-medium', weight: '500' }, - { className: 'typography-brand-8 font-semibold', weight: '600' }, - { className: 'typography-brand-8 font-bold', weight: '700' }, + { className: 'typography-brand-7 font-light', weight: '300' }, + { className: 'typography-brand-7 font-normal', weight: '400' }, + { className: 'typography-brand-7 font-medium', weight: '500' }, + { className: 'typography-brand-7 font-semibold', weight: '600' }, + { className: 'typography-brand-7 font-bold', weight: '700' }, ]; return ( @@ -117,10 +118,12 @@ export const FontWeight = () => { {fontWeight.map(i => ( - {i.className.replace('typography-brand-8 font-', '')} + + {i.className.replace('typography-brand-7 font-', '')} + {i.weight} - {i.className.replace('typography-brand-8 ', '')} + {i.className.replace('typography-brand-7 ', '')} ))} From 8628ca5d21415ecc2a8c480b9af3b67fa27fef57 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 30 Oct 2023 22:44:17 +0000 Subject: [PATCH 3/6] Version Packages --- .changeset/cuddly-horses-dress.md | 5 ----- apps/site/CHANGELOG.md | 7 +++++++ apps/site/package.json | 2 +- packages/ui/CHANGELOG.md | 6 ++++++ packages/ui/package.json | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 .changeset/cuddly-horses-dress.md diff --git a/.changeset/cuddly-horses-dress.md b/.changeset/cuddly-horses-dress.md deleted file mode 100644 index ecc9ba551..000000000 --- a/.changeset/cuddly-horses-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@westpac/ui': minor ---- - -misc style fixes and removed stories from node package diff --git a/apps/site/CHANGELOG.md b/apps/site/CHANGELOG.md index 0d88574f8..62ad9b081 100644 --- a/apps/site/CHANGELOG.md +++ b/apps/site/CHANGELOG.md @@ -1,5 +1,12 @@ # site +## 0.0.17 + +### Patch Changes + +- Updated dependencies [842f28d] + - @westpac/ui@0.8.0 + ## 0.0.16 ### Patch Changes diff --git a/apps/site/package.json b/apps/site/package.json index bd8a9aaa4..62b09347c 100644 --- a/apps/site/package.json +++ b/apps/site/package.json @@ -1,6 +1,6 @@ { "name": "site", - "version": "0.0.16", + "version": "0.0.17", "private": true, "scripts": { "build": "next build", diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index e5f818220..f42fd4d34 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,11 @@ # @westpac/ui +## 0.8.0 + +### Minor Changes + +- 842f28d: misc style fixes and removed stories from node package + ## 0.7.1 ### Patch Changes diff --git a/packages/ui/package.json b/packages/ui/package.json index 4f3b007fa..30bb51330 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@westpac/ui", - "version": "0.7.1", + "version": "0.8.0", "license": "MIT", "sideEffects": false, "type": "module", From 714999f9e169179dcae40e681c7dc091435835bf Mon Sep 17 00:00:00 2001 From: samithaf Date: Tue, 31 Oct 2023 13:37:43 +1100 Subject: [PATCH 4/6] merged develop and updated the font weight table --- .../stories/foundation/typography.stories.tsx | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/ui/src/stories/foundation/typography.stories.tsx b/packages/ui/src/stories/foundation/typography.stories.tsx index 841b64642..470be07e9 100644 --- a/packages/ui/src/stories/foundation/typography.stories.tsx +++ b/packages/ui/src/stories/foundation/typography.stories.tsx @@ -149,3 +149,39 @@ export const LineHeight = () => { ); }; + +/** + * Fonts weight + */ +export const FontWeight = () => { + const fontWeight = [ + { className: 'font-light', weight: '300' }, + { className: 'font-normal', weight: '400' }, + { className: 'font-medium', weight: '500' }, + { className: 'font-semibold', weight: '600' }, + { className: 'font-bold', weight: '700' }, + ]; + return ( +
+ Font Weight + + + Token + Font weight + Tailwind class + + + + {fontWeight.map(i => ( + + + {i.className.replace('font-', '')} + + {i.weight} + {i.className} + + ))} + +
+ ); +}; From ec6bc6802ea93c3a44415079bed65ea0d90d2a53 Mon Sep 17 00:00:00 2001 From: Kenji Shiroma Date: Mon, 6 Nov 2023 12:07:25 +1000 Subject: [PATCH 5/6] closes #242: lego accordion border bug --- .../components/accordion-item/accordion-item.styles.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts b/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts index d4a12e74f..b92b01f2b 100644 --- a/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts +++ b/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts @@ -14,7 +14,8 @@ export const styles = tv( itemHeader: 'border-t border-border bg-light', }, lego: { - itemHeader: 'border-l-[0.375rem] border-t border-border bg-light transition-colors', + itemHeader: + 'border-l-[0.375rem] border-border bg-light shadow-[inset_0_1px_0_var(--tw-shadow-color)] !shadow-border transition-colors', }, }, isOpen: { @@ -50,6 +51,7 @@ export const styles = tv( look: 'lego', isOpen: true, className: 'border-l-hero', + // className: 'border-l-hero', }, { slots: ['content'], From 0fdf2186a05039579ee0af081f37ca7c120b5182 Mon Sep 17 00:00:00 2001 From: Kenji Shiroma Date: Mon, 6 Nov 2023 13:55:25 +1000 Subject: [PATCH 6/6] fix #242 removing the gap on the left --- packages/ui/src/components/accordion/accordion.component.tsx | 2 +- .../components/accordion-item/accordion-item.styles.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/ui/src/components/accordion/accordion.component.tsx b/packages/ui/src/components/accordion/accordion.component.tsx index 4d1178aac..96b375c68 100644 --- a/packages/ui/src/components/accordion/accordion.component.tsx +++ b/packages/ui/src/components/accordion/accordion.component.tsx @@ -36,7 +36,7 @@ function Accordion( return (
-
+
{[...state.collection].map(item => ( key={item.key} item={item} state={state} look={look} /> ))} diff --git a/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts b/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts index b92b01f2b..9ad2aa2aa 100644 --- a/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts +++ b/packages/ui/src/components/accordion/components/accordion-item/accordion-item.styles.ts @@ -51,7 +51,6 @@ export const styles = tv( look: 'lego', isOpen: true, className: 'border-l-hero', - // className: 'border-l-hero', }, { slots: ['content'],