1.13.24 • Published 8 months ago

@hexure/ui v1.13.24

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Getting Started

InsTech UI is the source repository for the @hexure/ui npm package. This library of components is the React implementation of the Hexure Design System, and should be used across all Hexure React applications and projects.

Usage

  1. Run npm i @hexure/ui --save
  2. If needed, install/update any required peer dependencies: react, react-dom, @mdi/font, @mdi/js, @mdi/react, moment, numeral
  3. Refer to Hexure Design System for available components and how to use them.
  4. Import components as needed into your React project: import { Button } from @hexure/ui

    b. To use the UI Library in your project npx install @hexure/ui Some common Commands: npm run rollup to run rollup and generate a dist folder npm run storybook to run storybook server and see components on storybook. npm run test to run all test cases.

  5. Optional: Applying a custom theme:

  6. Import the ThemeProvider from styled-components: import { ThemeProvider } from 'styled-components'
  7. Wrap your top level application with the ThemeProvider: <ThemeProvider><YourApp /></ThemeProvider>
  8. Define your custom theme on the provider: <ThemeProvider theme={{ PRIMARY_COLOR: { Hex: 'Blue', Rgb: '10,10,10' } }}><YourApp /></ThemeProvider>
  9. As of v1.9.0 the only theme option is PRIMARY_COLOR and it must be an object with Hex and Rbg values.

Contribute

Setting up your local environment

  1. Clone the repo to your machine
  2. Make sure you have Node and NPM install on your machine
  3. Navigate to the clone repo directory and install it's npm packages: npm i
  4. Run the storybook command to preview the components and your changes: npm run storybook

Creating a new component

  1. Pull down the latest version of main and create a new branch off it that corresponds with a Jira ticket: git branch -b [your_name]/[FEE-#]
  2. Create a new directory in src/components with the following files:
    • index.ts
    • ComponentName.tsx: This should match the name of the React component and the name of the component in the Design System
    • ComponentName.stories.tsx: This should match the name of the tsx file above
  3. Add the following content to index.ts
    • export { default } from './ComponentName';
  4. Build out ComponentName.tsx and ComponentName.stories.tsx as needed.
  5. Make sure ESLint passes by before committing/pushing your changes npm run eslint. You can use npm run eslint-fix to auto-fix some of the ESLint errors
  6. Make sure you run Prettier before committing/pushing your changes: npm run prettier
  7. Once you're work is complete, create a new Pull Request in Azure DevOps against the main branch.
  8. Your Pull Request must be reviewed and approved by the lead over this repository.
  9. Once approved, merge your pull request into main and follow the steps under "Releasing a new version"

Modifying an existing component

  1. Pull down the latest version of main and create a new branch off it that corresponds with a Jira ticket: git branch -b [your_name]/[FEE-#]
  2. Modify ComponentName.tsx and ComponentName.stories.tsx as neeeded.
  3. Make sure ESLint passes by before committing/pushing your changes npm run eslint. You can use npm run eslint-fix to auto-fix some of the ESLint errors
  4. Make sure you run Prettier before committing/pushing your changes: npm run prettier
  5. Once you're work is complete, create a new Pull Request in Azure DevOps against the main branch.
  6. Your Pull Request must be reviewed and approved by the lead over this repository.
  7. Once approved, merge your pull request into main and follow the steps under "Releasing a new version"

Releasing a new version

You should release a new version of this package immediately after a Pull Request in approved.

  1. Determine the new version number based on the following:
    • Major: The only time this would be bumped is if we're making wholistic breaking changes, like doing a major upgrade to React.
    • Minor: This should be bumped if we are:
      • Adding a new component or utility
      • Making breaking changes to an individual component or utility
    • Patch: This should be bumped if we are:
      • Making non-breaking changes to an indivdiual component or utility
      • Making minor bumps to npm packages
      • Fixing bugs with existing components
  2. Pull down the latest version of main and create a new branch off it that corresponds with the new version number: git branch -b release/1.x.x
  3. Update package.json with the new version number.
  4. Make sure ESLint passes: npm run eslint
    • Since ESLint passing is a requirement for all PRs, this should always pass
  5. Run Rollup to compile the src files into the dist directory for distribution: npm run rollup
    • Sometimes rollup won't exit out the command after generating the files into dist. If this happens, just exit out of the process
  6. Verify the updates are seen in the dist directory: git status and/or git diff
  7. Add, commit, and push the changes: git add . then git commit -m "v1.x.x" then git push origin release/1.x.x
  8. Create a Pull Request in Azure DevOps against the main branch.
  9. Your Pull Request must be reviewed and approved by the lead over this repository.
  10. Once approved, merge your pull request into main.
  11. Pull down the updated main branch and run npm publish
  12. Go to the Azure DevOps repo and add a new Tag
    • Tag Name: v1.x.x
    • Description: Add details around what was added/changed
1.13.24

8 months ago

1.13.23

8 months ago

1.13.20

8 months ago

1.13.22

8 months ago

1.13.21

8 months ago

1.13.17

8 months ago

1.13.19

8 months ago

1.13.18

8 months ago

1.12.9

1 year ago

1.12.8

1 year ago

1.12.10

1 year ago

1.12.12

1 year ago

1.12.11

1 year ago

1.12.13

1 year ago

1.13.2

12 months ago

1.13.1

1 year ago

1.13.0

1 year ago

1.13.6

11 months ago

1.13.5

12 months ago

1.13.4

12 months ago

1.13.3

12 months ago

1.13.9

11 months ago

1.13.11

11 months ago

1.13.8

11 months ago

1.13.10

11 months ago

1.13.7

11 months ago

1.13.16

9 months ago

1.13.13

10 months ago

1.13.12

11 months ago

1.13.15

9 months ago

1.13.14

9 months ago

1.12.7

1 year ago

1.12.6

1 year ago

1.12.5

1 year ago

1.12.4

1 year ago

1.12.3

1 year ago

1.12.2

1 year ago

1.12.1

1 year ago

1.12.0

1 year ago

1.11.12

1 year ago

1.11.13

1 year ago

1.11.10

1 year ago

1.11.11

1 year ago

1.11.8

1 year ago

1.11.9

1 year ago

1.11.7

1 year ago

1.11.6

1 year ago

1.11.5

1 year ago

1.11.4

1 year ago

1.11.0

1 year ago

1.11.3

1 year ago

1.11.2

1 year ago

1.11.1

1 year ago

1.9.4

1 year ago

1.9.3

1 year ago

1.10.1

1 year ago

1.10.0

1 year ago

1.9.2

1 year ago

1.9.1

1 year ago

1.8.2

2 years ago

1.6.4

2 years ago

1.8.1

2 years ago

1.6.3

2 years ago

1.8.0

2 years ago

1.6.2

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.6.10

2 years ago

1.3.8

2 years ago

1.3.7

2 years ago

1.9.0

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.7.0

2 years ago

1.3.4

2 years ago

1.5.1

2 years ago

1.3.3

2 years ago

1.5.0

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.8.9

2 years ago

1.8.10

2 years ago

1.8.8

2 years ago

1.8.11

2 years ago

1.8.7

2 years ago

1.6.9

2 years ago

1.8.12

2 years ago

1.8.6

2 years ago

1.6.8

2 years ago

1.8.13

2 years ago

1.8.5

2 years ago

1.6.7

2 years ago

1.8.14

2 years ago

1.8.4

2 years ago

1.6.6

2 years ago

1.8.15

2 years ago

1.8.3

2 years ago

1.6.5

2 years ago

1.8.16

2 years ago

1.8.17

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago