# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Refer to the [CONTRIBUTING guide](https://github.com/lightspeed/cirrus/blob/master/.github/CONTRIBUTING.md) for more info.

## 1.0.4 - 2022-11-16

- Version bump because lerna

## 1.0.3 - 2022-11-16

- Version bump because lerna

## 1.0.2 - 2020-07-17

### Fixed

- Use a safer selector to add padding between components ([#927](https://github.com/lightspeed/cirrus/pull/927))
- Fix weird typing issues caused by upgrade ([#927](https://github.com/lightspeed/cirrus/pull/927))

## 1.0.1 - 2019-12-09

### Fixed

- Output TypeScript types to esm builds ([#914](https://github.com/lightspeed/cirrus/pull/914))

## 1.0.0 - 2019-10-10

### Breaking

- Use Flame instead of Cirrus for base components

## 0.16.0 - 2019-09-10

### Added

- `applyFilters` function is now exported by the TableActions.Context. This function will enable you to override multiple filters at the same time ([#873](https://github.com/lightspeed/cirrus/pull/873))

### Removed

- Remove the `onFilterChange` callback from the dependency list ([#875](https://github.com/lightspeed/cirrus/pull/875))

## 0.15.3 - 2019-09-05

### Fixed

- Fix sort feature hook by properly passing in hook dependencies ([#865](https://github.com/lightspeed/cirrus/pull/865))
- ActionBar: left hand actions will automatically take full width if no right hand action is present ([#870](https://github.com/lightspeed/cirrus/pull/870))
- Update LICENSE.md ([#872](https://github.com/lightspeed/cirrus/pull/872))

## 0.15.2 - 2019-09-03

### Fixed

- Remove form from search bar. Rely on regular old onClick ([#865](https://github.com/lightspeed/cirrus/pull/865))

## 0.15.1 - 2019-08-27

### Fixed

- Add `validate-build` step for `prepublish`, run before publishing workflow ([#862](https://github.com/lightspeed/cirrus/pull/862))
- Add TypeScript file extensions to build commands, `dist` was not including builded `.js` files, only types ([#862](https://github.com/lightspeed/cirrus/pull/862))

## ~~0.15.0 - 2019-08-26~~

This release has been deprecated in favor of `0.15.1`, but still includes the following changes:

### Added

- `as` prop can now be used in conjunction with the `SearchBar` to tweak the wrapper component ([#859](https://github.com/lightspeed/cirrus/pull/859))

### Fixed

- `SearchBar` will no longer throw a warning about uncontrolled properties ([#859](https://github.com/lightspeed/cirrus/pull/859))

## 0.14.0 - 2019-08-16

### Breaking

- Removed `Table.Container` ([#841](https://github.com/lightspeed/cirrus/pull/841))

### Added

- Table is now fully Typescript ([#841](https://github.com/lightspeed/cirrus/pull/841))

### Fixed

- Removed core-js dependency. Let consumer application dictate the polyfill to include ([#840](https://github.com/lightspeed/cirrus/pull/840))

## 0.13.0 - 2019-07-30

### Added

- Updated from `styled-system@3.0` to `styled-system@5.0` ([#820](https://github.com/lightspeed/cirrus/pull/820))
- Rebind individual style props to use the new grouped style props of `styled-system@5` ([#820](https://github.com/lightspeed/cirrus/pull/820))

## 0.12.1 - 2019-07-30

### Fixed

- Set `styled-system` as a dependency, instead of a peerDependency ([#819](https://github.com/lightspeed/cirrus/pull/819))

## 0.12.0 - 2019-07-09

All changes made in `0.12.0` pre-releases:

### Added

- Draggable feature can now be used to create draggable rows ([#780](https://github.com/lightspeed/cirrus/pull/780))
- Update Cirrus peerDependency to `^7.1.0` to get new row-handle Icon ([#780](https://github.com/lightspeed/cirrus/pull/780))

## 0.12.0-alpha.0 - 2019-06-25

### Added

- Draggable feature can now be used to create draggable rows ([#780](https://github.com/lightspeed/cirrus/pull/780))
- Update Cirrus peerDependency to `^7.1.0` to get new row-handle Icon ([#780](https://github.com/lightspeed/cirrus/pull/780))

## 0.11.0 - 2019-06-21

All changes made in `0.11.0` pre-releases:

### Breaking

- [React Hooks](https://reactjs.org/docs/hooks-intro.html) are making their way in! Update `peerDependencies` to include `react` and `react-dom` version `^16.8.0` and Cirrus to `^7.0.0` ([#771](https://github.com/lightspeed/cirrus/pull/771))
- `TableActions.FilterPanelProvider` has been renamed to `TableActions.Provider`
- Replaced Unstated by React Context
- Expose Providers/Context of features to consumers
- `Sortable.Th` is completely uncontrolled. You will need to forward the appropriate `onClick` and `direction` handler
- `BatchSelect.HeaderTr` is fully uncontrolled and will inject automatically a checkbox in the first TH element. You can edit the checkbox properties via the "checkboxProps" prop
- `BatchSelect.Tr` is fully uncontrolled and will inject automatically a checkbox in the first TD element. You can edit the checkbox properties via the "checkboxProps" prop
- `Table` no longer exposes a `feature` prop
- `Table` no longer exposes a `data` prop
- Table features no longer export a `feature` function. Replace them with the appropriate hook.
- Sortable is completely uncontrolled and does not expose any callbacks. Instead, rely on `React.useEffect` to watch for changes
- Table search no longer uses the `onSubmit` prop to remove redundancy with the `onFilterChange` prop.

### Added

- `Tbody` and `Tfoot` can now be used. They are simple `styled` instantiation of their respective components
- `TableActions.SearchBar` is now reactive to changes done to the searchTerm contained within the TableActions context.
- Added the `deleteAllFiltersAndSearchTerm` to remove all filters AND the search term.
- Sortable now exposes the useSortable hook for complete control over the Sorting mechanism.
- BatchSelect now exposes the useBatchSelect hook for complete control over the Selecting mechanism.
- `Sortable.Th` now exposes the `direction` prop to control the arrow.
- `TableActions.DropdownContent` has been added as a convenience component to automatically manage paddings.

### Fixed

- Dropdowns will now remove all default list style.
- Dropdown can now be closed by pressing the `ESC` key.

## 0.11.0-alpha.2 - 2019-06-20

### Breaking

- [React Hooks](https://reactjs.org/docs/hooks-intro.html) are making their way in! Update `peerDependencies` to include `react` and `react-dom` version `^16.8.0` and Cirrus to `^7.0.0` ([#771](https://github.com/lightspeed/cirrus/pull/771))

## 0.11.0-alpha.1 - 2019-06-06

### Breaking

- `TableActions.FilterPanelProvider` has been renamed to `TableActions.Provider`

### Added

- `Tbody` and `Tfoot` can now be used. They are simple `styled` instantiation of their respective components
- `TableActions.SearchBar` is now reactive to changes done to the searchTerm contained within the TableActions context.
- Added the `deleteAllFiltersAndSearchTerm` to remove all filters AND the search term.

### Fixed

- Dropdowns will now remove all default list style.
- Dropdown can now be closed by pressing the `ESC` key.

## 0.11.0-alpha.0 - 2019-05-31

### Breaking

- Replaced Unstated by React Context
- Expose Providers/Context of features to consumers
- `Sortable.Th` is completely uncontrolled. You will need to forward the appropriate `onClick` and `direction` handler
- `BatchSelect.HeaderTr` is fully uncontrolled and will inject automatically a checkbox in the first TH element. You can edit the checkbox properties via the "checkboxProps" prop
- `BatchSelect.Tr` is fully uncontrolled and will inject automatically a checkbox in the first TD element. You can edit the checkbox properties via the "checkboxProps" prop
- `Table` no longer exposes a `feature` prop
- `Table` no longer exposes a `data` prop
- Table features no longer export a `feature` function. Replace them with the appropriate hook.
- Sortable is completely uncontrolled and does not expose any callbacks. Instead, rely on `React.useEffect` to watch for changes
- Table search no longer uses the `onSubmit` prop to remove redundancy with the `onFilterChange` prop.

### Added

- Sortable now exposes the useSortable hook for complete control over the Sorting mechanism.
- BatchSelect now exposes the useBatchSelect hook for complete control over the Selecting mechanism.
- `Sortable.Th` now exposes the `direction` prop to control the arrow.
- `TableActions.DropdownContent` has been added as a convenience component to automatically manage paddings.

## 0.10.0 - 2019-05-10

### Changed

- Move dependency for Cirrus to `^6.0.0` ([#713](https://github.com/lightspeed/cirrus/pull/713))

## 0.10.0-beta.1 - 2019-04-29

- Version bump because lerna

## 0.10.0-beta.0 - 2019-04-23

### Added

- Table will now mostly use the new color aliases from CirrusTheme. This is to enable easy theme swapping

## 0.9.2 - 2019-02-28

### Fixed

- Fix search bar input border-radius when there is no filter dropdown ([#674](https://github.com/lightspeed/cirrus/pull/674))

## 0.9.1 - 2019-02-27

### Fixed

- Enable `height` Styled System prop for Th ([#672](https://github.com/lightspeed/cirrus/pull/672))

## 0.9.0 - 2019-02-20

### Breaking

- Changed Cirrus imports from default to named ([#639](https://github.com/lightspeed/cirrus/pull/639))

### Fixed

- Add and enable `@lightspeed/eslint-config` ([#643](https://github.com/lightspeed/cirrus/pull/643))

## 0.8.0 - 2019-02-12

### Added

- Add TableActions.RadioGroup as a filter ([#631](https://github.com/lightspeed/cirrus/pull/631))
- Update TableActions.RadioGroup and TableActions.CheckboxGroup label PropType to be more representative of what it can expect as values ([#631](https://github.com/lightspeed/cirrus/pull/631))

### Changed

- TableActions.CheckboxGroup's `undoChange` will now reset state entirely of the checkboxes to empty ([#631](https://github.com/lightspeed/cirrus/pull/631))

## 0.7.0 - 2019-02-05

### Added

- Add `isHoverable` prop to Tr ([#619](https://github.com/lightspeed/cirrus/pull/619))

### Fixed

- Fix Tr `selected` for Batch Select feature ([#619](https://github.com/lightspeed/cirrus/pull/619))
- Enable theme `color` prop on Tr and Td ([#619](https://github.com/lightspeed/cirrus/pull/619))

## 0.6.2 - 2019-01-29

### Fixed

- Use `@lightspeed/config-prettier`, re-format all files ([#612](https://github.com/lightspeed/cirrus/pull/612))

## 0.6.1 - 2019-01-29

### Fixed

- You can now forward props for each TableActions.Section ([#610](https://github.com/lightspeed/cirrus/pull/610))
- Added `buttonTitle` for TableActions.SearchBar to properly forward the title property ([#610](https://github.com/lightspeed/cirrus/pull/610))

## 0.6.0 - 2019-01-24

### Breaking

- Table now uses the cirrus single package instead of split components ([#601](https://github.com/lightspeed/cirrus/pull/601))

## 0.5.1 - 2019-01-22

### Fixed

- Make feature instantiation check more lenient to prevent throwing error on production builds ([#603](https://github.com/lightspeed/cirrus/pull/603))

## 0.5.0 - 2019-01-21

### Breaking

- Sorting callback now sends back an array of sort objects ([#598](https://github.com/lightspeed/cirrus/pull/598))
- onFilterChange callback changes: searchTerm parameter will now send back an array of filtering objects, instead of an object. ([#595](https://github.com/lightspeed/cirrus/pull/595))

### Added

- Add initalSearchTerm and initialSearchFilters as props to configure the actions with pre-configured values ([#595](https://github.com/lightspeed/cirrus/pull/595))
- Added dropdownDisabled prop on TableActions.Container to disable the dropdown button. ([#600](https://github.com/lightspeed/cirrus/pull/600))
- Added the disabled prop on TableActions.SearchBar to disable input and search button. ([#600](https://github.com/lightspeed/cirrus/pull/600))

## 0.4.1 - 2019-01-17

### Fixed

- Style default `th` in Table like `Th` ([#592](https://github.com/lightspeed/cirrus/pull/592))
- Make Sortable Th aligneable to right ([#592](https://github.com/lightspeed/cirrus/pull/592))
- Add hoverable Tr color ([#592](https://github.com/lightspeed/cirrus/pull/592))
- Fix example links in README ([#592](https://github.com/lightspeed/cirrus/pull/592))

## 0.4.0 - 2019-01-17

### Breaking

- Converted pager to a singular component ([#591](https://github.com/lightspeed/cirrus/pull/591))

### Added

- Added new search filtering components ([#591](https://github.com/lightspeed/cirrus/pull/591))

## 0.3.0 - 2019-01-14

### Breaking

- Converted table to use unstated containers ([#566](https://github.com/lightspeed/cirrus/pull/566))
- Removal of the following props in table: renderRow, renderFooter, renderHeader, renderNoData ([#566](https://github.com/lightspeed/cirrus/pull/566))
- Removed TableRenderer, extendTableFeatures ([#566](https://github.com/lightspeed/cirrus/pull/566))
- Replace SortableHeader component by Sortable.Th ([#566](https://github.com/lightspeed/cirrus/pull/566))
- Changed table features prop api. No longer uses an array of object config, but instead a tableFeature function ([#566](https://github.com/lightspeed/cirrus/pull/566))

### Added

- Add Bulk feature to Table ([#566](https://github.com/lightspeed/cirrus/pull/566))

## 0.2.1 - 2018-12-12

### Fixed

- Remove `background-color` from styled `<table>` tag ([#559](https://github.com/lightspeed/cirrus/pull/559))

## 0.2.0 - 2018-12-12

### Changed

- Match design to spec ([#557](https://github.com/lightspeed/cirrus/pull/557))
- Remove Card from Table ([#551](https://github.com/lightspeed/cirrus/pull/551))

### Added

- Enable `width` styled-system utility for `Th` + `Td` components ([#557](https://github.com/lightspeed/cirrus/pull/557))
- Add TablePager component ([#553](https://github.com/lightspeed/cirrus/pull/553))
- Add Sortable feature ([#544](https://github.com/lightspeed/cirrus/pull/544))

## 0.1.0 - 2018-12-06

### Added

- Add `<Table>` component, phase 1 ([#517](https://github.com/lightspeed/cirrus/pull/517))
