Josua Vogel
eb22895f00
Add option labelId to improve a11y ( #971 )
...
* Add option labelId to improve a11y
* Console.log entfernt
* Add test case for aria-labeledby
Co-authored-by: Josua Vogel <josua.vogel@t-systems.com>
2022-01-18 17:07:07 -05:00
Matt Triff
29097d5457
Bump dev dependencies
2022-01-13 20:31:33 -05:00
Karsten Müller
75caa0b1f3
Resolve #887
...
Fix compatibility with Internet Explorer 11
2022-01-10 10:56:10 +01:00
Matt Triff
ce3d1111d8
Merge pull request #991 from Choices-js/fuse6
...
Upgrade to Fuse v6
2022-01-02 13:27:09 -05:00
Matt Triff
25a7ed0318
Add test with searchFloor of 0
2021-12-31 21:51:00 -05:00
Daiana Cambruzzi Ávila
23f0b7cb9d
Fix Issue 630: allow triggering of 'search' event when clearing the input field
2021-12-31 18:23:13 -05:00
Matt Triff
303d12504c
Upgrade to Fuse v6
2021-12-31 18:11:45 -05:00
Matt Triff
9605f367f9
Search using non-sanitised input value
2021-12-30 22:05:03 -05:00
Mason Rogers
824eca6f81
fix: Fix non-string-valeus
2021-12-27 15:58:25 +00:00
Mason Rogers
7e200664c4
feat: Export interfaces
2021-12-27 14:46:22 +00:00
Matt Triff
bf94386cc5
Update configuration to output types
2021-12-26 16:37:23 -05:00
Matt Triff
66c6864267
Update allowHTML wording, set remote examples to allowHTML false
2021-12-26 09:36:12 -05:00
viction
391c3e39cb
fix: README examples & change template type
2021-12-26 02:47:49 +00:00
viction
3d402d4560
fix: Circular dep caused by requiring options
2021-12-25 21:38:19 +00:00
viction
545a442f5c
fix: Custom template displaying/unit tests
2021-12-25 20:29:54 +00:00
viction
6b16e93977
fix: template testing & type errors
2021-12-24 17:32:50 +00:00
viction
7f727480e8
feat: allowHTML
2021-12-23 16:59:48 +00:00
Bob Maerten
82b94228f9
Enhance inputCloned text input with type and name ( #908 )
...
* Enhance inputCloned text input with type and name
Safari will display a contact autocomplete on every text input which `name` attribute contains "*name*" or does not have any `name` attribute.
Adding a fine tuned `name`attribute to the input should prevent that.
Plus, input type="search" seems more suited to the field intent (https://developer.mozilla.org/fr/docs/Web/HTML/Element/Input/search ).
* Adapt inputCloned related test
2021-12-22 16:56:04 -05:00
Matt Triff
22f9be0d93
Update tests for >
2021-12-21 18:07:31 -05:00
Raphaël Jorel
2222f767a9
Fix sanitise function
...
HTML uses `>` to encode `>` characters.
2021-12-21 11:15:44 -05:00
Matt Triff
9835eb756a
Implement stylelint
2021-12-19 17:43:03 -05:00
Hans Kuijpers
046afbb614
Solve deprecated warning using / for division outside of calc() ( #976 )
...
* replace / by *
* replace / by *
* add leading zero
* add leading zero
2021-12-19 10:02:21 -05:00
Matt Triff
3d921621b7
Update dependencies, fix linting issues, split interfaces and default objects to resolve dependency cycles
2021-12-17 16:26:52 -05:00
Josh Johnson
68313da412
Convert to typescript ( #795 )
...
* Typescript config setup
* Add type annotations to components
* Further type additions
* And more...
* Add types to actions
* Add types to templates
* Further type checks
* Further type additons
* Install fuse latest
* Housekeeping
* Remove old type definitions
* Fix remaning type issues
* Fix some failing tests
* Remove types workflow
* Fix failing unit tests
* Resolve back space event regression
* Convert cypress files to .ts
* Fix eslint issues
* Remove cachebusting urls
* Resolve delete button bug
* Resolve regression bugs
* Fix lint script
* Fix lint workflow
* Pass args instead of object to keyboard handlers
* Flatten misc reducer
* Resolve keyboad action test failures
* Use Pick instead of Partial
* Use interfaces in action tests
* Update firefox image
* Incorporate #791
* Incorporate #788
2019-12-23 18:22:54 +00:00
dGrammatiko
3ed027229d
Adds a variable for the z-index ( #794 )
2019-12-15 19:26:56 +00:00
Josh Johnson
44b4326a52
Resolve #780 ( #785 )
...
* Attempt #1
* Remove console.log
* Update puppeteer screenshot
2019-12-03 12:56:47 +00:00
Josh Johnson
9676cff128
Resolve #622 and #781 ( #784 )
...
* Resolve duplicate initialise in demo
* Update README with versioned cdn links
* Update log
* Re-add env var
2019-11-27 11:46:40 +00:00
Josh Johnson
62e849d1b4
Resolve 774 ( #777 )
...
* Include customProperties in removeItem
* Add tests
* Housekeeping
* Update mac vm label
* Add .nvmrc
2019-11-24 17:32:02 +00:00
Josh Johnson
67266a3aae
Resolve #762 ( #767 )
...
* Update value with character value
* Remove .only
* Lowercase character before updating value
* Add cypress tests covering change
* Update logic to affect both select inputs
* Update cypress
* Emphasise remove button focus
* Text change
* Revert "Update cypress"
This reverts commit 81e406de85
.
* Remove false positive tests
2019-11-22 19:09:45 +00:00
Josh Johnson
592c326442
Update polyfill list ( #765 )
...
* Update polyfill list
* Update eslintrc.json
* Add keydown methods to types
* Resolve type issue
2019-11-19 18:34:08 +00:00
Kazuki Nishikawa
0e8e42e015
Fix #573 ( #574 )
...
* add specs
* fix to restore preset choices after destroy
* avoid to modify `this.config.choices` directly
* Update cypress/integration/select-one.spec.js
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update public/test/select-one.html
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update public/test/select-one.html
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update public/test/select-one.html
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update public/test/select-one.html
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* fix specs
* restoring passed element initial options
- Save `passedElement.options` values as `this._presetOptions`
- Restore saved `this._presetOptions` to `passedElement.options` on `destroy`
- It avoids restoring options in `this.config.choices`
* Update cypress/integration/select-one.spec.js
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update cypress/integration/select-one.spec.js
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* Update public/test/select-one.html
Co-Authored-By: Josh Johnson <josh@joshuajohnson.co.uk>
* move preset options assignment statement
2019-11-17 12:34:34 +00:00
Josh Johnson
933ea6093f
Remove redundant check ( #755 )
...
* Remove redundant check
* Add integration tests covering fix
* Add missing test
2019-11-13 15:40:47 +00:00
Josh Johnson
84b952e115
Resolve bug #637 ( #754 )
...
* Add is-selected class when item is selected
* Remove console.log
* Update README
2019-11-13 14:49:23 +00:00
Chris DeLuca
f745be449d
Always hide remove button if no value is selected ( #744 )
...
In some cases, the remove item X button is not hidden when there is no
selection made from the dropdown. This is not as usable, since there's
no item to clear, hence an effective noop.
The condition I saw seeing this issue arise is in single selects with
a placeholder value, a selection has been made, and then cleared: the
button HTML remains.
To fix, add some styles to hide the button if the select doesn't have a
value selected, in this case keying off of it's parents `data-value`
property.
fixes #684
2019-11-12 12:29:34 +00:00
Konstantin Vyatkin
8775bacdd9
improve whole-page performance by scoping events handlers ( #740 )
...
* scope onMouseDown event capture
* supercedes #710
* make isIE11 a const
* scope keydown
* scope mouseover
* fix removeEventListener for keyup
2019-11-12 09:47:41 +00:00
Oleg Dmitrochenko
fb2310cb56
Indent fixed in "choices__list--dropdown" ( #750 )
...
Indent fixed in "choices__list--dropdown". Added "box-sizing: border-box;".
2019-11-12 09:03:04 +00:00
Josh Johnson
d04031e02f
Fix id types ( #743 )
...
* Set ids to be numbers
* Split out _setLoading into start/stop methods
* Build
2019-11-08 09:19:18 +00:00
Josh Johnson
b5b593a62f
Resolve bug 473 ( #739 )
...
* Fix #473
* Add tests
* Tweak cypress tests
* Build
2019-11-07 08:50:19 +00:00
Josh Johnson
f30b976424
Resolve bug 533 ( #736 )
...
* Add placeholder options to demo page
* Use constant types in components
* Refactor adding predefined groups/items/choices
* Add 'highlighted' flag to Item type
* Fix dispatch param type
* Build
* Add jsdoc comments to utils
* Remove unused file
* Add default values to js doc comments
* Use Redux Action type
* Housekeeping
* Increase utils coverage
* Apply suggestions from code review
* Add _getTemplate unit tests
* Resolve #533
* Add tests
2019-11-03 18:12:47 +00:00
Josh Johnson
ab22347d7b
Code refactoring ( #735 )
...
* Add placeholder options to demo page
* Use constant types in components
* Refactor adding predefined groups/items/choices
* Add 'highlighted' flag to Item type
* Fix dispatch param type
* Build
* Add jsdoc comments to utils
* Remove unused file
* Add default values to js doc comments
* Use Redux Action type
* Housekeeping
* Increase utils coverage
* Apply suggestions from code review
* Add _getTemplate unit tests
2019-11-03 17:45:16 +00:00
Josh Johnson
e6882f3e4b
Add missing type definitions + rename sortFn ( #734 )
...
* Add wrapped element getters + fix some types
* Remove comment
* Add missing config options to types
* Add types to constants
* Rename sortFn to sorter
* Update PR template
* Add refactor to PR template
* Add passed element types to constants
* Add js doc comments to actions
* Add "returns" to js doc comments
* Add missing choice prop to type
* Add types to store.js
* Add jsdoc comments to components
* Ignore strict null checks
* Move loading action into misc.js
* Further type def additions
* Rename itemCompare to valueCompare
* Update badges
* Rename scrollToChoice to scrollToChildElement
2019-11-03 13:18:16 +00:00
Josh Johnson
a0fe05f926
Fix #727 ( #731 )
...
* Housekeeping
* Resolve placeholder bug + hide from choice list
* Restructure test folder
* Update cypress test to assert one placeholder
* Fix breaking e2e test
* Remove ability to pass placeholder via config for select boxes
* Add further e2e tests covering placeholders
* Add unit tests for _generatePlaceholderValue
* Display placeholder choice for select one
* Add further e2e test to assert on placeholder ordering
* Add labels to exclude from draft releases
* Add failure case to e2e test workflow
* Resolve broken e2e test
* Update puppeteer snapshot baseline
2019-11-02 13:49:33 +00:00
Konstantin Vyatkin
939a73b762
fix setChoices flow ( #730 )
...
* fix setChoices flow
* ignore Promise as it gate checked
* re-run cypress
2019-11-02 12:58:18 +00:00
Konstantin Vyatkin
5afe8b5a7f
speed up getAdjacentEl ( #726 )
...
* use element accessors
* don't change params
2019-10-31 17:49:27 +00:00
Konstantin Vyatkin
034191c78a
use CSS queries ( #718 )
...
* use matchMedia
* use last-of-type
* better type check
* simplify distanceFromTopWindow
* use visibility
* update JSDoc
2019-10-30 17:28:15 +00:00
Josh Johnson
0e44a916e3
Fix constructor ( #693 )
...
* breaking test
* Remove ablity to pass multiple elements + tests
* Update readme
* Update README.md
* 🔖 Version 8.0.0
* Remove type definition hack
* Update coverage command
* Add some missing list tests
* Remove .only
* Update demo page to loop over elements
* Update constructor to set initialised flag if already active
* Make templates private
* Throw type error once if element is invalid
* Fix list children bug
* Re-add generic examples to index.html
* Housekeeping
* Use typeof instead of isType where applicable
* Remove isElement
* Add test for isIE11
2019-10-29 21:19:56 +00:00
Josh Johnson
88f63faa0b
Update code styling rules ( #713 )
...
* Enforce curly braces around conditionals
* Install sort class members + update rules
* Satisfy linting changes
* Add todo
* Add tests for clearChoices
* Update eslint-plugin-prettier to latest
* Resolve conflicts
* Fix linting errors
2019-10-29 18:26:11 +00:00
Konstantin Vyatkin
172366d6fa
[Tooling] Expand browsers target while keeping Polyfills under control ( #709 )
...
* expand browsers target
* add eslint-plugin-compat
* sort polyfils
* adjust readme
* add polyfills sync check action
* only build js
* trim
* add Element.prototype.closest
* add closest to demo links
* fix ignore
2019-10-29 18:19:19 +00:00
Konstantin Vyatkin
e3cc6eaf1b
[MAJOR] Remove .ajax
and allow async function for .setChoices
( #701 )
...
* WIP: remove ajax
* copy #700
* remove ajax, add fetchChoices
* extend setChoices
* update README
2019-10-29 18:12:32 +00:00
Konstantin Vyatkin
1f5192b4ad
remove delegateEvents ( #703 )
2019-10-29 17:46:10 +00:00