The UI library of Life Under Control. It is built for Next.js — with Storybook, React, Typescript, and Rollup. Package published on NPM as @hgcle/ui-library.
This UI library is built based on the BEM (Block, Element, Modifier) methodology.
- Block: A functionally independent page component that can be reused. A block is created if a section of code might be reused, and it doesn't depend on other page components being implemented.
- Element: A composite part of a block that can't be used separately from it. An element is created if a section of code can't be used separately without the parent entity (the block).
- Modifier: An entity that defines the appearance (
sizeM), state (disabled), or behavior (leftTop) of a block or element.
In HTML, this BEM structure is represented by the class attribute. The structure of an element's full name is BlockName__elementName. The element name is separated from the block name with a double underscore (__). The modifier name is used in a separate class.
Source: Conventional commits
<type>[optional scope]: <description>
<optional body>
<optional footer>
feat– a new feature is introduced with the changesfix– a bug fix has occurredchore– changes that do not relate to a fix or feature and don't modify src or test files (for example updating dependencies)refactor– refactored code that neither fixes a bug nor adds a featuredocs– updates to documentation such as the README or other markdown filesstyle– changes that do not affect the meaning of the code, likely related to code formatting such as white-space, missing semicolons, and so on.test– including new or correcting previous testsperf– performance improvementsci– continuous integration relatedbuild– changes that affect the build system or external dependenciesrevert– reverts a previous commitcontent– content-related commits
Commit example:
fix: fix foo to enable bar
This fixes the broken behavior of the component by doing xyz.
BREAKING CHANGE
Before this fix foo wasn't enabled at all, behavior changes from <old> to <new>
Closes D2IQ-12345
Make sure all new components are exported in src/index.ts. Update the package version number in package.json.
npm i
npm build
npm publish --access public