From 68507940891224ef4bc3e402823eeab454202a9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:44:20 +0000 Subject: [PATCH 01/29] Bump react-native-paper from 5.11.1 to 5.12.3 Bumps [react-native-paper](https://github.com/callstack/react-native-paper) from 5.11.1 to 5.12.3. - [Release notes](https://github.com/callstack/react-native-paper/releases) - [Changelog](https://github.com/callstack/react-native-paper/blob/main/.release-it.json) - [Commits](https://github.com/callstack/react-native-paper/compare/v5.11.1...v5.12.3) --- updated-dependencies: - dependency-name: react-native-paper dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ca91fa7..5e94a92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3295,9 +3295,9 @@ react-is@^17.0.1: integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== react-native-paper@^5.0.0: - version "5.11.1" - resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-5.11.1.tgz#34f612d6fb28099334db08a1bd109086ea91dcac" - integrity sha512-axqRTagGL8LtuYh172cx2Q2THOVJ3PTpPjCKhL5ECRdpJs2ceiboVecSiOIBuO3H7dVpaneptBA0vJr9HeVHwg== + version "5.12.3" + resolved "https://registry.yarnpkg.com/react-native-paper/-/react-native-paper-5.12.3.tgz#d583119722ebbfbb7fe40400181d63748cca3683" + integrity sha512-nH1e1pGPE/aOE5YR2GRX7CfMHFA9cAfrAfgCtwL4amJPDZCoVjc5yt2VDiUE1rT+JUfk0qdICMP3UggxvjMgug== dependencies: "@callstack/react-theme-provider" "^3.0.9" color "^3.1.2" From f68063cbd23b5853b0512782438e162059a3e6cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 07:19:48 +0000 Subject: [PATCH 02/29] Bump ip from 1.1.8 to 1.1.9 Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9. - [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5e94a92..c3114a9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2175,9 +2175,9 @@ invariant@*, invariant@^2.2.4: loose-envify "^1.0.0" ip@^1.1.5: - version "1.1.8" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" - integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== + version "1.1.9" + resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396" + integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ== is-arrayish@^0.2.1: version "0.2.1" From 67cf5ff9d8954584487d692d260aeba21a71c3d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:29:18 +0000 Subject: [PATCH 03/29] Bump typescript from 5.2.2 to 5.3.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.2.2 to 5.3.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.2.2...v5.3.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index c3114a9..1fd844a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3892,9 +3892,9 @@ type-fest@^0.7.1: integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== typescript@^5.0.4: - version "5.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== uglify-es@^3.1.9: version "3.3.9" From e7103d8d21446c763ccaef8e78d4d109101a4108 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Thu, 28 Mar 2024 15:58:03 +0530 Subject: [PATCH 04/29] fix font family and update readme --- README.md | 17 +++++++++++++++-- src/shared.ts | 32 ++++++++------------------------ 2 files changed, 23 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index a146a53..40c89b3 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,6 @@ import * as BLUIThemes from '@brightlayer-ui/react-native-themes'; ``` - ### React Native Paper Components Style Override This Document contains a set of style overrides in components around various [React Native Paper](https://callstack.github.io/react-native-paper/index.html) components. @@ -77,6 +76,20 @@ const theme = useExtendedTheme(); ``` +## Changing fontWeight of a Text Element + +When you need to change the `fontWeight` of a `Text` element in your application, it's important to note that it should be done through the `fontFamily` property rather than the `fontWeight` property. + +The `fontFamily` property allows you to specify the font and its weight. By using the appropriate font family that supports the desired weight, you can achieve the desired fontWeight effect. + +For example, if you want to set the fontWeight to "bold", you can use a font family that includes a bold variant, such as: + +```tsx + + headlineLarge + +``` + ### Upgrading from version 6 -> 7 In the version 7, the library has been updated to use [React Native Paper](https://callstack.github.io/react-native-paper/) v5, which is adopting [Material Design 3](https://m3.material.io/). The themes have now been updated to use Material Design 3 Themes. @@ -85,4 +98,4 @@ In the version 7, the library has been updated to use [React Native Paper](https ## Demo [Check it out](https://github.com/etn-ccis/blui-react-native-showcase-demo/tree/master) ---> \ No newline at end of file +--> diff --git a/src/shared.ts b/src/shared.ts index 91a556c..1bf7345 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -1,103 +1,87 @@ import { Platform } from 'react-native'; import { MD3Theme, useTheme } from 'react-native-paper'; -import { MD3Type, MD3Typescale } from 'react-native-paper/lib/typescript/types'; import { $DeepPartial } from '@callstack/react-theme-provider'; export const fontConfig = { displaySmall: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 36, - lineHeight: 45, + lineHeight: 48, }, displayMedium: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 45, lineHeight: 56, }, displayLarge: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, - fontSize: 54, - lineHeight: 68, - letterSpacing: 1, + fontSize: 57, + lineHeight: 72, + letterSpacing: -0.25, }, headlineSmall: { fontFamily: 'OpenSans-Regular', - fontWeight: '500' as const, fontSize: 24, lineHeight: 32, }, headlineMedium: { fontFamily: 'OpenSans-Regular', - fontWeight: '500' as const, - fontSize: 27, - lineHeight: 40, + fontSize: 28, + lineHeight: 36, }, headlineLarge: { fontFamily: 'OpenSans-Regular', - fontWeight: '500' as const, fontSize: 32, lineHeight: 40, }, titleSmall: { - fontFamily: 'OpenSans-Regular', - fontWeight: '600' as const, + fontFamily: 'OpenSans-SemiBold', fontSize: 14, lineHeight: 20, letterSpacing: 0.1, }, titleMedium: { - fontFamily: 'OpenSans-Regular', - fontWeight: '600' as const, + fontFamily: 'OpenSans-SemiBold', fontSize: 16, lineHeight: 24, letterSpacing: 0.15, }, titleLarge: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 22, lineHeight: 28, }, labelSmall: { fontFamily: 'OpenSans-SemiBold', - fontWeight: '600' as const, fontSize: 11, lineHeight: 16, letterSpacing: 0.5, }, labelMedium: { fontFamily: 'OpenSans-SemiBold', - fontWeight: '600' as const, fontSize: 12, lineHeight: 16, letterSpacing: 0.2, }, labelLarge: { fontFamily: 'OpenSans-SemiBold', - fontWeight: '600' as const, fontSize: 14, lineHeight: 20, letterSpacing: 0.1, }, bodySmall: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 12, lineHeight: 16, }, bodyMedium: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 14, lineHeight: 20, }, bodyLarge: { fontFamily: 'OpenSans-Regular', - fontWeight: '400' as const, fontSize: 16, lineHeight: 24, letterSpacing: 0.15, From ba1becb0ba996b2580a19be24704abd9fb0c390c Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Fri, 29 Mar 2024 14:31:29 +0530 Subject: [PATCH 05/29] update changelog and package version --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 311111a..b297537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v7.0.1 (Unreleased) + +### Fixed + +- Text variants not working correctly on Android [89](https://github.com/etn-ccis/blui-react-native-themes/issues/89). + ## v7.0.0 (January 12, 2024) ### Changed diff --git a/package.json b/package.json index 8cee170..6e14b4c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.0", + "version": "7.0.1", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 766b3e1b8998b07edb81e8bb44452ce5cb8bec96 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 11:27:39 +0000 Subject: [PATCH 06/29] Bump typescript from 5.3.3 to 5.4.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3 to 5.4.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 1fd844a..dd0f171 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3892,9 +3892,9 @@ type-fest@^0.7.1: integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== typescript@^5.0.4: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== + version "5.4.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" + integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== uglify-es@^3.1.9: version "3.3.9" From 9f5a937ef84508386d53e48f5f8a7c8c2ebd53a2 Mon Sep 17 00:00:00 2001 From: manojleaton Date: Fri, 12 Apr 2024 00:08:47 +0530 Subject: [PATCH 07/29] alpha package 1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e14b4c..62614f6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1", + "version": "7.0.1-alpha.1", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 93c1caececed0ec8f9f3bf6531a15bdcebd4676e Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Wed, 17 Apr 2024 08:39:36 -0400 Subject: [PATCH 08/29] Add blui-ci github workflow --- .circleci/config.yml | 65 --------------------------- .github/workflows/blui-ci.yml | 83 +++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 65 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/blui-ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 0c4ff26..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,65 +0,0 @@ -version: 2.1 -orbs: - gh: circleci/github-cli@1.0.3 -jobs: - build: - docker: - - image: cimg/node:16.19.1-browsers - steps: - - checkout - - restore_cache: - keys: - - v1-dependencies-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: | - yarn install --frozen-lockfile - - save_cache: - name: Save Cache - paths: - - node_modules - key: v1-dependencies-{{ checksum "yarn.lock" }} - - run: - name: Prettier Check - command: yarn prettier:check - - run: - name: Build - command: yarn build - - run: - name: Verify Artifacts - command: yarn test - - persist_to_workspace: - root: . - paths: - - dist - - publish: - docker: - - image: cimg/node:16.19.1-browsers - steps: - - checkout - - attach_workspace: - at: . - - run: - name: Authenticate with registry - command: | - echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc - echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc - - run: - name: Publish @brightlayer-ui/react-native-themes - command: | - yarn publish:package -b $CIRCLE_BRANCH - -workflows: - version: 2 - themes: - jobs: - - build - - publish: - requires: - - build - filters: - branches: - only: - - master - - dev diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml new file mode 100644 index 0000000..de6b394 --- /dev/null +++ b/.github/workflows/blui-ci.yml @@ -0,0 +1,83 @@ +name: CI Run + +on: + push: + branches: [ "dev", "master" ] + pull_request: + branches: [ "dev", "master" ] + pull_request_target: + types: + - opened + branches: + - '*/*' + +permissions: + pull-requests: write + contents: read + +jobs: + prettier: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn install --frozen-lockfile + - run: yarn prettier:check + + build_theme_verify_artifacts: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + - run: yarn --frozen-lockfile + - run: yarn build + - name: Save build + uses: actions/upload-artifact@v3 + with: + name: dist + if-no-files-found: error + path: dist + - run: yarn test + + publish_react_native_theme: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev') }} + needs: build_theme_verify_artifacts + strategy: + matrix: + node-version: [18.x] + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + BRANCH: ${{ github.ref == 'refs/heads/master' && 'master' || 'dev' }} + steps: + - uses: actions/checkout@v4 + - name: Download dist + uses: actions/download-artifact@v3 + with: + name: dist + path: dist + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - run: yarn --frozen-lockfile + - run: yarn publish:package -b ${{env.BRANCH}} \ No newline at end of file From 648130a8923205df9e0daefa275a6477cb5d0910 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Wed, 17 Apr 2024 09:19:08 -0400 Subject: [PATCH 09/29] align indents --- .github/workflows/blui-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index de6b394..fe90da9 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -21,8 +21,7 @@ jobs: strategy: matrix: - node-version: [18.x] - + node-version: [18.x] steps: - name: Checkout uses: actions/checkout@v4 @@ -40,7 +39,6 @@ jobs: strategy: matrix: node-version: [18.x] - steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} From 91bf4ccdfe37a2733593537d958c6e137d649621 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Wed, 17 Apr 2024 23:47:59 +0530 Subject: [PATCH 10/29] add useFontWeight utility --- src/index.ts | 2 +- src/shared.ts | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 165fbb5..6a7873d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,4 +7,4 @@ This code is licensed under the BSD-3 license found in the LICENSE file in the r **/ export { MD3BluiLightTheme as blue } from './blueTheme'; export { MD3BluiDarkTheme as blueDark } from './blueDarkTheme'; -export { ExtendedTheme, useExtendedTheme } from './shared'; +export { ExtendedTheme, useExtendedTheme, useFontWeight } from './shared'; diff --git a/src/shared.ts b/src/shared.ts index 1bf7345..d00c4f4 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -213,3 +213,37 @@ export type ExtendedTheme = Omit & { export const useExtendedTheme = (overrides?: $DeepPartial): ExtendedTheme => useTheme(overrides); + +export type bluiFontWeight = '300' | '400' | '600' | '700' | undefined; + +export type FontStyle = { + fontFamily: string; + fontWeight: bluiFontWeight; +}; + +export const useFontWeight = (weight: bluiFontWeight): FontStyle => { + switch (weight) { + case '300': + return { + fontFamily: 'OpenSans-light', + fontWeight: '300', + }; + case '400': + return { + fontFamily: 'OpenSans-regular', + fontWeight: '400', + }; + case '600': + return { + fontFamily: 'OpenSans-semiBold', + fontWeight: '600', + }; + case '700': + return { + fontFamily: 'OpenSans-bold', + fontWeight: '700', + }; + default: + throw new Error(`Invalid font weight: ${weight}`); + } +}; From 8d434a6f37369056626d4e7608f65ca69e5779da Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Thu, 18 Apr 2024 13:32:17 +0530 Subject: [PATCH 11/29] add alpha package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62614f6..f4b42d7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.1", + "version": "7.0.1-alpha.2", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 17470b4d2313ee5451ea7f8b4cbd4e65534d874a Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Thu, 18 Apr 2024 13:42:20 +0530 Subject: [PATCH 12/29] revert removal of fontWeight --- src/shared.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/shared.ts b/src/shared.ts index d00c4f4..e9ee187 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -6,82 +6,97 @@ import { $DeepPartial } from '@callstack/react-theme-provider'; export const fontConfig = { displaySmall: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 36, lineHeight: 48, }, displayMedium: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 45, lineHeight: 56, }, displayLarge: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 57, lineHeight: 72, letterSpacing: -0.25, }, headlineSmall: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 24, lineHeight: 32, }, headlineMedium: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 28, lineHeight: 36, }, headlineLarge: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 32, lineHeight: 40, }, titleSmall: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600' as const, fontSize: 14, lineHeight: 20, letterSpacing: 0.1, }, titleMedium: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600' as const, fontSize: 16, lineHeight: 24, letterSpacing: 0.15, }, titleLarge: { fontFamily: 'OpenSans-Regular', + fontWeight: '600' as const, fontSize: 22, lineHeight: 28, }, labelSmall: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600' as const, fontSize: 11, lineHeight: 16, letterSpacing: 0.5, }, labelMedium: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600' as const, fontSize: 12, lineHeight: 16, letterSpacing: 0.2, }, labelLarge: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600' as const, fontSize: 14, lineHeight: 20, letterSpacing: 0.1, }, bodySmall: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 12, lineHeight: 16, }, bodyMedium: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 14, lineHeight: 20, }, bodyLarge: { fontFamily: 'OpenSans-Regular', + fontWeight: '400' as const, fontSize: 16, lineHeight: 24, letterSpacing: 0.15, From 1219231423989904ef4e60867002213b29cfa639 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Thu, 18 Apr 2024 17:28:03 +0530 Subject: [PATCH 13/29] Revert unpublished package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4b42d7..62614f6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.2", + "version": "7.0.1-alpha.1", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 696e24b80be59e9df1934ffdadc4fabb80dbc3f6 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Thu, 18 Apr 2024 17:43:37 +0530 Subject: [PATCH 14/29] publish failed package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62614f6..f4b42d7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.1", + "version": "7.0.1-alpha.2", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 6f3c0366bae7652c7705c2dd19dd5c729aef09c1 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Thu, 18 Apr 2024 08:56:20 -0400 Subject: [PATCH 15/29] use setup-node v3 --- .github/workflows/blui-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index fe90da9..99a0ca7 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -73,7 +73,7 @@ jobs: with: name: dist path: dist - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' From 3cef26456b1389050c7a4e472dfc12f4bbe4710a Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Thu, 18 Apr 2024 12:22:25 -0400 Subject: [PATCH 16/29] test npm publish & revert alpha --- .github/workflows/blui-ci.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index 99a0ca7..d2f61e9 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -78,4 +78,4 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - run: yarn --frozen-lockfile - - run: yarn publish:package -b ${{env.BRANCH}} \ No newline at end of file + - run: npm run publish:package -b ${{env.BRANCH}} \ No newline at end of file diff --git a/package.json b/package.json index f4b42d7..62614f6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.2", + "version": "7.0.1-alpha.1", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 84897ac074e9763ef8c80380df319ab270496002 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Thu, 18 Apr 2024 13:08:46 -0400 Subject: [PATCH 17/29] tests publish alpha --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 62614f6..f4b42d7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.1", + "version": "7.0.1-alpha.2", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 1624de55fdab82ebd374d4041a3ea532ba803c80 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Thu, 18 Apr 2024 13:48:30 -0400 Subject: [PATCH 18/29] test with new token --- .github/workflows/blui-ci.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index d2f61e9..99a0ca7 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -78,4 +78,4 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - run: yarn --frozen-lockfile - - run: npm run publish:package -b ${{env.BRANCH}} \ No newline at end of file + - run: yarn publish:package -b ${{env.BRANCH}} \ No newline at end of file diff --git a/package.json b/package.json index f4b42d7..1808ca1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.2", + "version": "7.0.1-alpha.3", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From 4fc6d68abbe77358adb3187ad9d6832159b32d3c Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Thu, 18 Apr 2024 13:52:39 -0400 Subject: [PATCH 19/29] use npm run publish --- .github/workflows/blui-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index 99a0ca7..d2f61e9 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -78,4 +78,4 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - run: yarn --frozen-lockfile - - run: yarn publish:package -b ${{env.BRANCH}} \ No newline at end of file + - run: npm run publish:package -b ${{env.BRANCH}} \ No newline at end of file From d9e5981011c5f5be88ba597e2d793d573cf17673 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Fri, 19 Apr 2024 15:19:48 +0530 Subject: [PATCH 20/29] font families are case sensitive --- package.json | 2 +- src/shared.ts | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 1808ca1..5ad15b3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.3", + "version": "7.0.1-alpha.4", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { diff --git a/src/shared.ts b/src/shared.ts index e9ee187..07e8e29 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -229,7 +229,7 @@ export type ExtendedTheme = Omit & { export const useExtendedTheme = (overrides?: $DeepPartial): ExtendedTheme => useTheme(overrides); -export type bluiFontWeight = '300' | '400' | '600' | '700' | undefined; +export type bluiFontWeight = '300' | '400' | '600' | '700' | '800' | undefined; export type FontStyle = { fontFamily: string; @@ -240,24 +240,29 @@ export const useFontWeight = (weight: bluiFontWeight): FontStyle => { switch (weight) { case '300': return { - fontFamily: 'OpenSans-light', + fontFamily: 'OpenSans-Light', fontWeight: '300', }; case '400': return { - fontFamily: 'OpenSans-regular', + fontFamily: 'OpenSans-Regular', fontWeight: '400', }; case '600': return { - fontFamily: 'OpenSans-semiBold', + fontFamily: 'OpenSans-SemiBold', fontWeight: '600', }; case '700': return { - fontFamily: 'OpenSans-bold', + fontFamily: 'OpenSans-Bold', fontWeight: '700', }; + case '800': + return { + fontFamily: 'OpenSans-ExtraBold', + fontWeight: '800', + }; default: throw new Error(`Invalid font weight: ${weight}`); } From c137b258ebc7d3c3826e0318a73733562bcba888 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Mon, 22 Apr 2024 23:10:44 +0530 Subject: [PATCH 21/29] fix title large variant font weight --- package.json | 2 +- src/shared.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 5ad15b3..1fe5fcf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.4", + "version": "7.0.1-alpha.5", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { diff --git a/src/shared.ts b/src/shared.ts index 07e8e29..df4682c 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -57,7 +57,7 @@ export const fontConfig = { }, titleLarge: { fontFamily: 'OpenSans-Regular', - fontWeight: '600' as const, + fontWeight: '400' as const, fontSize: 22, lineHeight: 28, }, From 26015fa3e4fcb2c3b40ff00922695ebd68b8a58b Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Mon, 22 Apr 2024 23:33:14 +0530 Subject: [PATCH 22/29] update readme --- README.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 40c89b3..40321f2 100644 --- a/README.md +++ b/README.md @@ -76,16 +76,12 @@ const theme = useExtendedTheme(); ``` -## Changing fontWeight of a Text Element +## Usage of useFontWeight hook in your project -When you need to change the `fontWeight` of a `Text` element in your application, it's important to note that it should be done through the `fontFamily` property rather than the `fontWeight` property. - -The `fontFamily` property allows you to specify the font and its weight. By using the appropriate font family that supports the desired weight, you can achieve the desired fontWeight effect. - -For example, if you want to set the fontWeight to "bold", you can use a font family that includes a bold variant, such as: +When the fontFamily of a Text element in your application needs to be modified, you can use the useFontWeight hook.For instance, to set the fontWeight to "bold", you can utilize the useFontWeight() hook as demonstrated below: ```tsx - + headlineLarge ``` From c233295665c62d8396dce851d9ee1df4d95af7c9 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Fri, 26 Apr 2024 15:17:05 +0530 Subject: [PATCH 23/29] update readme code for useFontWeight --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 40321f2..5518e4c 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,9 @@ const theme = useExtendedTheme(); When the fontFamily of a Text element in your application needs to be modified, you can use the useFontWeight hook.For instance, to set the fontWeight to "bold", you can utilize the useFontWeight() hook as demonstrated below: ```tsx +import { useFontWeight } from '@brightlayer-ui/react-native-themes'; +... +const fontStyleBold = useExtendedTheme('700'); headlineLarge From 86e83c514a431ee55077a8044bfac3cd644b50b5 Mon Sep 17 00:00:00 2001 From: ektaghag-eaton Date: Fri, 26 Apr 2024 15:43:35 +0530 Subject: [PATCH 24/29] update method name --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5518e4c..be8fe97 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ When the fontFamily of a Text element in your application needs to be modified, ```tsx import { useFontWeight } from '@brightlayer-ui/react-native-themes'; ... -const fontStyleBold = useExtendedTheme('700'); +const fontStyleBold = useFontWeight('700'); headlineLarge From 8a80913602c56c6002be3330aaae6e28021cee95 Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Tue, 30 Apr 2024 11:57:22 -0400 Subject: [PATCH 25/29] add build badge & remove reference to circleCI --- .github/workflows/blui-ci.yml | 2 +- PUBLISHING.md | 4 ++-- README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index d2f61e9..d3f8c11 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -1,4 +1,4 @@ -name: CI Run +name: Build on: push: diff --git a/PUBLISHING.md b/PUBLISHING.md index 201b702..96e37f2 100644 --- a/PUBLISHING.md +++ b/PUBLISHING.md @@ -2,7 +2,7 @@ ## Automatic Publishing -This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. +This package is published to NPM automatically by Github when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch. - The `dev` branch will publish versions marked as `alpha` or `beta`. - The `master` branch will publish any version (`alpha`, `beta`, or `latest`). @@ -26,4 +26,4 @@ yarn build npm adduser && yarn publish:package ``` -> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI. +> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in Github. diff --git a/README.md b/README.md index be8fe97..d91b305 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Brightlayer UI themes for React Native applications -[![](https://img.shields.io/circleci/project/github/etn-ccis/blui-react-native-themes/master.svg?style=flat)](https://circleci.com/gh/etn-ccis/blui-react-native-themes/tree/master) +[![Build](https://github.com/etn-ccis/blui-react-native-themes/actions/workflows/blui-ci.yml/badge.svg?branch=master)](https://github.com/etn-ccis/blui-react-native-themes/actions/workflows/blui-ci.yml) [![](https://img.shields.io/npm/v/@brightlayer-ui/react-native-themes.svg?label=@brightlayer-ui/react-native-themes&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/react-native-themes) This package provides [theming](https://brightlayer-ui.github.io/style/themes) support for Eaton applications using the Brightlayer UI design system. It includes resources for developers using React Native with [react-native-paper](https://www.npmjs.com/package/react-native-paper). This package comes with two theme options: a Blue theme (standard) and a Dark theme. From 3733342efd8457fbc0afee326e5c8c1113d46877 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 11:19:59 +0000 Subject: [PATCH 26/29] Bump typescript from 5.4.3 to 5.4.5 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.4.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.5) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index dd0f171..e4b9255 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3892,9 +3892,9 @@ type-fest@^0.7.1: integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== typescript@^5.0.4: - version "5.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.3.tgz#5c6fedd4c87bee01cd7a528a30145521f8e0feff" - integrity sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg== + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== uglify-es@^3.1.9: version "3.3.9" From 849fd0871aaa3313de9fcadbbb532fbb7ad4265a Mon Sep 17 00:00:00 2001 From: jeffgreiner-eaton Date: Wed, 1 May 2024 13:43:40 -0400 Subject: [PATCH 27/29] use yarn --immutable --- .github/workflows/blui-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/blui-ci.yml b/.github/workflows/blui-ci.yml index d3f8c11..c65d9da 100644 --- a/.github/workflows/blui-ci.yml +++ b/.github/workflows/blui-ci.yml @@ -30,7 +30,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: yarn install --frozen-lockfile + - run: yarn install --immutable - run: yarn prettier:check build_theme_verify_artifacts: @@ -46,7 +46,7 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'yarn' - - run: yarn --frozen-lockfile + - run: yarn --immutable - run: yarn build - name: Save build uses: actions/upload-artifact@v3 @@ -77,5 +77,5 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: 'https://registry.npmjs.org' - - run: yarn --frozen-lockfile + - run: yarn --immutable - run: npm run publish:package -b ${{env.BRANCH}} \ No newline at end of file From 912fc94b0c4a9b143731ffab54ec93b83936e697 Mon Sep 17 00:00:00 2001 From: priyankakmEaton Date: Wed, 8 May 2024 15:17:05 +0530 Subject: [PATCH 28/29] version update --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1fe5fcf..6e14b4c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@brightlayer-ui/react-native-themes", "author": "Brightlayer UI ", "license": "BSD-3-Clause", - "version": "7.0.1-alpha.5", + "version": "7.0.1", "description": "React Native themes for Brightlayer UI applications", "main": "./dist/index.js", "scripts": { From ac91b6d83ff77dabafc2fd884b418f046b2451f6 Mon Sep 17 00:00:00 2001 From: priyankakmEaton Date: Thu, 9 May 2024 12:18:48 +0530 Subject: [PATCH 29/29] Release date update --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b297537..feee2da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## v7.0.1 (Unreleased) +## v7.0.1 (May 9, 2024) ### Fixed