Skip to content

Commit

Permalink
refactor: TypeScript rewrite (#16)
Browse files Browse the repository at this point in the history
* chore(release): remove unused semantic-release script

* refactor(typescript): convert all components, with errors

* fix(component): add event handlers to button props

* build:lib task - change extension to .ts

* jest: d.ts files aren't test files

* Button.test.tsx: add aria-label to quiet warnings

* __tests__/types.d.ts: add ListenerMap

* Dropdown.test.tsx: initialize map as ListenerMap

* Modal.test.tsx: initialize map as ListenerMap

* mergeDeep.ts: add types

* warning.ts: add types

* set default when destructuring

* remove unused variable

* don't show aria-label warning if button has text in addition to icon

* rename cls to buttonStyles

* Button.tsx: refactor types

* all components: Props extends React.HTMLAttributes<T>

* Transition.tsx: types

* HelperText.tsx: types

* index.ts: sort exports

* Button.tsx: support any tag value

* __tests__/Button.test.tsx: test for arbitrary type

* Select.tsx: `multiple` prop is provided by HTMLSelectElement

* TableHeader.tsx: remove type alias for HTMLTableSectionElement

* Textarea.tsx: `disabled` prop is provided by HTMLTextAreaElement

* Windmill.tsx: `children` is required

* consolidate types

* tsconfig: change outDir to ./dist

* tsconfig: add include/exclude

* webpack config: add resolve

* package.json: add build:ts script

* package.json: consolidate build steps

* Input.tsx: for some reason we don't get autoFocus for free

* refactor(input): remove autofocus

The use of `autoFocus` needs to be better tested. Until then, `ref` with `useEffect` should be used
to focus the input.

* fix(packages): update dependencies

* build(release): update release packages

* Release 0.4.0-beta.0

Co-authored-by: Andrew Gillis <[email protected]>
Co-authored-by: HerbCaudill <[email protected]>
  • Loading branch information
3 people authored Oct 28, 2020
1 parent 65bbe42 commit 60c747b
Show file tree
Hide file tree
Showing 73 changed files with 2,181 additions and 1,851 deletions.
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

11 changes: 11 additions & 0 deletions @types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// used in ThemeContext
type Mode = string | null

declare module '*.svg' {
const content: any
export default content
}

declare type ListenerMap = {
[k: string]: any
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# [0.4.0-beta.0](https://github.com/estevanmaito/windmill-react-ui/compare/0.3.1...0.4.0-beta.0) (2020-10-26)


### Bug Fixes

* **button:** fix gradient style applied to anchor buttons due to type ([131bd69](https://github.com/estevanmaito/windmill-react-ui/commit/131bd69580622a98e4fddabe2330db812648c1a1)), closes [#7](https://github.com/estevanmaito/windmill-react-ui/issues/7)
* **component:** add event handlers to button props ([90a3d69](https://github.com/estevanmaito/windmill-react-ui/commit/90a3d694dd82e99b8169b17c4f080c8fa994b65a))
* **packages:** update dependencies ([330a535](https://github.com/estevanmaito/windmill-react-ui/commit/330a53547028ee42da16cbb4d02157268df6e6a2))

## [0.3.2](https://github.com/estevanmaito/windmill-react-ui/compare/0.3.1...0.3.2) (2020-08-08)

### Bug Fixes
Expand Down
38 changes: 0 additions & 38 deletions __tests__/context/ThemeContext.test.js

This file was deleted.

Loading

0 comments on commit 60c747b

Please sign in to comment.