3.0.3 • Published 5 years ago

@jasoftware/mcd-multi-select v3.0.3

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

Published on webcomponents.org

\<mcd-multi-select>

Web component that enables multi-selection from a given set of items.

Usage

<mcd-multi-select> enables multi-selection from a given set of items. You can use the selected-items attribute to data-bind the items selected by the user, or simply use the value property to retrieve them.

<mcd-multi-select items="{{items}}"></mcd-multi-select>

Attributes

AttributeDescriptionTypeDefault
openedWhether the dialog is opened or notBooleanfalse
labelThe label to be shown to userStringLabel
placeholderThe placeholder to be shown to user in case he didn't select any itemString-
itemsArray containing selections to be shown to userArray-
selected-itemsArray of selected items made by the userArray-
propProperty shall be used for each item in case the user passed an array of objectsString-
filter-placeholderPlaceholder for the filtering input fieldStringSearch...
dismiss-titleTitle of the dismiss buttonStringDismiss
toggle-titleTitle of the toggle-all buttonStringToggle All
rtlShow layout for right-to-left languagesBooleanfalse

Styling

The following custom properties and mixins are available for styling:

Custom propertyDescriptionDefault
--mcd-multi-select-selectionMixin applied to each selection of the selected items{}
--mcd-multi-select-labelMixin applied to label{}
--mcd-multi-select-placeholderMixin applied to placeholder{}
--mcd-multi-select-dismissMixin applied to the dismiss button{}
--mcd-multi-select-dismiss-focusMixin applied to the dismiss button when it is focused using the keyboard{}
--mcd-multi-select-dismiss-hoverMixin applied to the dismiss button when it is hovered{}
--mcd-multi-select-toggleMixin applied to the toggle button{}
--mcd-multi-select-toggle-focusMixin applied to the toggle button when it is focused using the keyboard{}
--mcd-multi-select-toggle-hoverMixin applied to the toggle button when it is hovered{}

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your element locally.

Viewing Your Element

$ polymer serve

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Copyright (c) 2018 Mohammed ALSarraf http://mastercodekw.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.