@pegakit/pegakit
Version:
The living styleguide, pattern library, UI ToolKit, and front-end build tools that power Pega's digital web properties.
46 lines • 1.82 kB
JavaScript
// //ChoicesJS. Custom select and input filtering enhancements.
// // import Choices from 'choices.js'
// var Choices = require('choices.js');
//
// // if (document.getElementsByClassName('js-custom-select').length > 0){
// //
// // for (var i = 0; i < selectBoxes.length; i++){
// // var enableSearch = selectBoxes[i].getAttribute('data-custom-select-search');
// // var parentWrapper = selectBoxes[i].parentNode;
// //
// //
// // parentWrapper.classList.add('is-enhanced');
// // //js-custom-select-wrapper
//
// const choices = new Choices(selectBoxes[i], {
// classNames: {
// containerOuter: 'c-custom-select',
// containerInner: 'c-custom-select__inner',
// input: 'c-custom-select__input',
// inputCloned: 'c-custom-select__input--cloned',
// list: 'c-custom-select__list',
// listItems: 'c-custom-select__list--multiple',
// listSingle: 'c-custom-select__list--single',
// listDropdown: 'c-custom-select__list--dropdown',
// item: 'c-custom-select__item',
// itemSelectable: 'c-custom-select__item--selectable',
// itemDisabled: 'c-custom-select__item--disabled',
// itemChoice: 'c-custom-select__item--choice',
// group: 'c-custom-select__group',
// groupHeading : 'c-custom-select__heading',
// button: 'c-custom-select__button',
// activeState: 'is-active',
// focusState: 'is-focused',
// openState: 'is-open',
// disabledState: 'is-disabled',
// highlightedState: 'is-highlighted',
// hiddenState: 'is-hidden',
// flippedState: 'is-flipped',
// loadingState: 'is-loading'
// }
// });
// // ,
// // search: enableSearch
// // });
// // }
// // }