157 Commits

Author SHA1 Message Date
Tom Southall
e414f8efa1 Remove console.log 2022-02-24 14:25:45 +00:00
Tom Southall
1deef54576 Correctly handle clearing search input 2022-02-24 14:22:44 +00:00
Tom Southall
9d60c6e667 Give SplitMatch component some PropTypes validation 2022-02-23 23:04:41 +00:00
Tom Southall
76bf7f2f99 Remove text splitting and make text matching an option with a prop 2022-02-23 22:59:20 +00:00
Tom Southall
a1242eec5d Add ability to pass in an Item component
Create SplitMatch component

Create first (WIP) example
2022-02-23 21:41:55 +00:00
Tom Southall
f9467a8ede Rename splitChar to separator 2022-02-22 00:43:18 +00:00
Tom Southall
6e1b054195 dataSearchType now determines how list items are highlighted
Full search string now highlighted for startswith searches

Regularised item markup
2022-02-22 00:35:51 +00:00
Tom Southall
583726fcb9 Consolidate itemGroups and data props into a single listbox prop 2022-02-21 21:07:52 +00:00
Tom Southall
ac6f749762 Make ListBox one word: Listbox 2022-02-21 20:08:03 +00:00
Tom Southall
f9bf89b108 Add unit tests for reducer 2022-02-21 19:49:28 +00:00
Tom Southall
464459435d Fix broken tests 2022-02-21 18:46:53 +00:00
Tom Southall
a805a90222 Unit tests for actions 2022-02-21 18:40:52 +00:00
Tom Southall
c2c8ccca90 Remove console.log 2022-02-21 18:28:22 +00:00
Tom Southall
8e12ba19f8 Ensure first of default items is not highlighted
Move logic from actions to reducer
2022-02-21 17:51:44 +00:00
Tom Southall
69e344d29d Clear selected value when query changes 2022-02-21 17:08:46 +00:00
Tom Southall
d66a2f413d Simplify rules for whether listbox is expanded 2022-02-21 16:42:55 +00:00
Tom Southall
1e91265556 Add examples folder 2022-02-21 15:57:53 +00:00
Tom Southall
cde5b0a91b Rename Items component as ListBox 2022-02-20 22:13:45 +00:00
Tom Southall
4a5d0b0ad4 Add disabled prop to replace isDisabled 2022-02-20 21:51:12 +00:00
Tom Southall
c70c6a9fce Bump version 2022-02-20 00:25:55 +00:00
Tom Southall
69cd22a716 Bump version 2022-02-20 00:20:50 +00:00
Tom Southall
837d16a44c Remove nanoid dependency
Replace × with \u00d7
2022-02-20 00:19:20 +00:00
Tom Southall
d7db51adc2 Up version 2022-02-19 22:31:11 +00:00
Tom Southall
8090af703c Remove unnecessary await 2022-02-19 22:24:47 +00:00
Tom Southall
9484556d65 First pass at some integration tests 2022-02-19 22:20:39 +00:00
Tom Southall
ec8a714f73 Fix bug preventing clear button from working 2022-02-19 17:24:09 +00:00
Tom Southall
913156cfed Add role to Items element 2022-02-19 17:19:49 +00:00
Tom Southall
59d023d956 Call isHighlighted function 2022-02-19 17:14:01 +00:00
Tom Southall
ffb131530a Add id prop to container test 2022-02-19 17:12:20 +00:00
Tom Southall
d14bd62aeb Add ARIA accessbility attributes to elements 2022-02-19 17:09:45 +00:00
Tom Southall
2bb09af284 Tests for useData hook 2022-02-18 21:54:01 +00:00
Tom Southall
98d56cc702 Rudimentary test for container 2022-02-17 23:06:19 +00:00
Tom Southall
4e0e05635a Add useSelected hook 2022-02-17 22:39:33 +00:00
Tom Southall
7fc85cac8b Remove redundant variables 2022-02-17 21:16:15 +00:00
Tom Southall
3488c2951c Add useHighlight hook 2022-02-17 21:14:56 +00:00
Tom Southall
fc76372086 Remove loading feature 2022-02-17 20:33:56 +00:00
Tom Southall
ea835df0e4 Add useItemsState hook
Store props in state

Enforce minimum of 1 for minQueryLength prop
2022-02-17 19:47:44 +00:00
Tom Southall
c110222c9d Move customStyles and splitChar to global state 2022-02-17 15:45:42 +00:00
Tom Southall
5ee40eab38 Tweaks to item test 2022-02-17 15:22:50 +00:00
Tom Southall
6954154ee0 Add selected to global state 2022-02-17 14:27:14 +00:00
Tom Southall
a7f7a497c0 Rename context provider 2022-02-17 14:11:50 +00:00
Tom Southall
7783080796 Fix tests broken due to refactor 2022-02-17 14:06:51 +00:00
Tom Southall
61a804f593 Begin to refactor towards a global state context 2022-02-17 01:36:53 +00:00
Tom Southall
e9135f06e7 Refactor queryMatchesTypeahead and add tests 2022-02-16 19:26:15 +00:00
Tom Southall
067a9e9cb8 Start to separate out and test container useEffect hooks 2022-02-16 16:46:01 +00:00
Tom Southall
5564a45bf6 First pass at some tests 2022-02-14 20:23:31 +00:00
Tom Southall
c6fb80ecec Disable ESLint props validation in all child components 2022-02-13 20:56:30 +00:00
Tom Southall
762db58b97 Set up vitest 2022-02-12 23:00:14 +00:00
Tom Southall
a2e9ee56d0 Add prop type validation 2022-02-12 20:52:34 +00:00
Tom Southall
69f1a5c46d Add default styles to no items dropdown 2022-02-12 16:41:12 +00:00