Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

basic-list-box

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

basic-list-box - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

6

package.json
{
"name": "basic-list-box",
"version": "0.7.5",
"version": "0.7.6",
"description": "A single-selection list box that supports selection highlighting (using the system highlight color) and keyboard navigation.",

@@ -15,4 +15,4 @@ "homepage": "https://component.kitchen",

"dependencies": {
"basic-element-base": "^0.7.5",
"basic-component-mixins": "^0.7.5"
"basic-element-base": "^0.7.6",
"basic-component-mixins": "^0.7.6"
},

@@ -19,0 +19,0 @@ "browserify": {

# API Documentation
<a name="ListBox"></a>
## ListBox ⇐ <code>ElementBase</code>

@@ -61,4 +62,4 @@ A single-selection list box that supports selection highlighting (using the

* [ListBox](#ListBox) ⇐ <code>ElementBase</code>
* [.applySelection(item, selected)](#ContentAsItems+applySelection)
* [.applySelection(item, selected)](#ItemsSelection+applySelection)
* [.applySelection(item, selected)](#ContentAsItems+applySelection)
* [.canSelectNext](#ItemsSelection+canSelectNext) : <code>boolean</code>

@@ -94,2 +95,3 @@ * [.canSelectPrevious](#ItemsSelection+canSelectPrevious) : <code>boolean</code>

* [.selectionRequired](#ItemsSelection+selectionRequired) : <code>boolean</code>
* [.selectionWraps](#ItemsSelection+selectionWraps) : <code>boolean</code>
* [.selectItemWithTextPrefix(prefix)](#KeyboardPrefixSelection+selectItemWithTextPrefix)

@@ -103,17 +105,4 @@ * [.selectLast()](#ItemsSelection+selectLast)

<a name="ItemsSelection+applySelection"></a>
### listBox.applySelection(item, selected)
Apply the indicate selection state to the item.
<a name="ContentAsItems+applySelection"></a>
The default implementation of this method does nothing. User-visible
effects will typically be handled by other mixins.
**Kind**: instance method of <code>[ListBox](#ListBox)</code>. Defined by <code>[ItemsSelection](../basic-component-mixins/docs/ItemsSelection.md)</code> mixin.
| Param | Type | Description |
| --- | --- | --- |
| item | <code>HTMLElement</code> | the item being selected/deselected |
| selected | <code>boolean</code> | true if the item is selected, false if not |
<a name="ContentAsItems+applySelection"></a>
### listBox.applySelection(item, selected)

@@ -133,3 +122,19 @@ Apply the selection state to a single item.

<a name="ItemsSelection+applySelection"></a>
### listBox.applySelection(item, selected)
Apply the indicate selection state to the item.
The default implementation of this method does nothing. User-visible
effects will typically be handled by other mixins.
**Kind**: instance method of <code>[ListBox](#ListBox)</code>. Defined by <code>[ItemsSelection](../basic-component-mixins/docs/ItemsSelection.md)</code> mixin.
| Param | Type | Description |
| --- | --- | --- |
| item | <code>HTMLElement</code> | the item being selected/deselected |
| selected | <code>boolean</code> | true if the item is selected, false if not |
<a name="ItemsSelection+canSelectNext"></a>
### listBox.canSelectNext : <code>boolean</code>

@@ -141,2 +146,3 @@ True if the selection can be moved to the next item, false if not (the

<a name="ItemsSelection+canSelectPrevious"></a>
### listBox.canSelectPrevious : <code>boolean</code>

@@ -148,2 +154,3 @@ True if the selection can be moved to the previous item, false if not

<a name="DistributedChildrenAsContent+content"></a>
### listBox.content : <code>Array.&lt;HTMLElement&gt;</code>

@@ -155,2 +162,3 @@ The content of this component, defined to be the flattened array of

<a name="ObserveContentChanges.event_content-changed"></a>
### "content-changed"

@@ -162,2 +170,3 @@ This event is raised when the component's contents (including distributed

<a name="ObserveContentChanges+contentChanged"></a>
### listBox.contentChanged()

@@ -173,2 +182,3 @@ Invoked when the contents of the component (including distributed

<a name="Generic+generic"></a>
### listBox.generic : <code>Boolean</code>

@@ -184,2 +194,3 @@ True if the component would like to receive generic styling.

<a name="KeyboardDirection+goDown"></a>
### listBox.goDown()

@@ -191,2 +202,3 @@ Invoked when the user wants to go/navigate down.

<a name="KeyboardDirection+goEnd"></a>
### listBox.goEnd()

@@ -198,2 +210,3 @@ Invoked when the user wants to go/navigate to the end (e.g., of a list).

<a name="KeyboardDirection+goLeft"></a>
### listBox.goLeft()

@@ -205,2 +218,3 @@ Invoked when the user wants to go/navigate left.

<a name="KeyboardDirection+goRight"></a>
### listBox.goRight()

@@ -212,2 +226,3 @@ Invoked when the user wants to go/navigate right.

<a name="KeyboardDirection+goStart"></a>
### listBox.goStart()

@@ -219,2 +234,3 @@ Invoked when the user wants to go/navigate to the start (e.g., of a

<a name="KeyboardDirection+goUp"></a>
### listBox.goUp()

@@ -226,2 +242,3 @@ Invoked when the user wants to go/navigate up.

<a name="ItemsSelection+itemAdded"></a>
### listBox.itemAdded(item)

@@ -240,2 +257,3 @@ Handle a new item being added to the list.

<a name="ContentAsItems+itemAdded"></a>
### listBox.itemAdded(item)

@@ -254,2 +272,3 @@ This method is invoked whenever a new item is added to the list.

<a name="ContentAsItems+items"></a>
### listBox.items : <code>Array.&lt;HTMLElement&gt;</code>

@@ -261,2 +280,3 @@ The current set of items in the list. See the top-level documentation for

<a name="ContentAsItems.event_items-changed"></a>
### "items-changed"

@@ -267,2 +287,3 @@ Fires when the items in the list change.

<a name="ContentAsItems+itemsChanged"></a>
### listBox.itemsChanged()

@@ -275,2 +296,3 @@ This method is invoked when the underlying contents change. It is also

<a name="Keyboard+keydown"></a>
### listBox.keydown(event) ⇒ <code>boolean</code>

@@ -290,2 +312,3 @@ Handle the indicated keyboard event.

<a name="KeyboardDirection+navigationAxis"></a>
### listBox.navigationAxis : <code>string</code>

@@ -301,2 +324,3 @@ Indicates the direction of permitted navigation with the keyboard.

<a name="KeyboardPagedSelection+pageDown"></a>
### listBox.pageDown()

@@ -307,2 +331,3 @@ Scroll down one page.

<a name="KeyboardPagedSelection+pageUp"></a>
### listBox.pageUp()

@@ -313,2 +338,3 @@ Scroll up one page.

<a name="SelectionInView+scrollItemIntoView"></a>
### listBox.scrollItemIntoView(item)

@@ -329,2 +355,3 @@ Scroll the given element completely into view, minimizing the degree of

<a name="SelectionInView+scrollTarget"></a>
### listBox.scrollTarget : <code>HTMLElement</code>

@@ -337,2 +364,3 @@ The element that should be scrolled to bring an item into view.

<a name="KeyboardPagedSelection+scrollTarget"></a>
### listBox.scrollTarget : <code>HTMLElement</code>

@@ -344,2 +372,3 @@ The element that should be scrolled with the Page Up/Down keys.

<a name="ItemsSelection.event_selected-index-changed"></a>
### "selected-index-changed"

@@ -355,2 +384,3 @@ Fires when the selectedIndex property changes.

<a name="ItemsSelection.event_selected-item-changed"></a>
### "selected-item-changed"

@@ -367,10 +397,13 @@ Fires when the selectedItem property changes.

<a name="ItemsSelection+selectedIndex"></a>
### listBox.selectedIndex : <code>number</code>
The index of the item which is currently selected, or -1 if there is no
selection.
The index of the item which is currently selected.
Setting the index to -1 deselects any current-selected item.
If `selectionWraps` is false, the index is -1 if there is no selection.
In that case, setting the index to -1 will deselect any
currently-selected item.
**Kind**: instance property of <code>[ListBox](#ListBox)</code>. Defined by <code>[ItemsSelection](../basic-component-mixins/docs/ItemsSelection.md)</code> mixin.
<a name="ItemsSelection+selectedItem"></a>
### listBox.selectedItem : <code>object</code>

@@ -383,2 +416,3 @@ The currently selected item, or null if there is no selection.

<a name="ItemsSelection+selectFirst"></a>
### listBox.selectFirst()

@@ -389,2 +423,3 @@ Select the first item in the list.

<a name="ItemsSelection+selectionRequired"></a>
### listBox.selectionRequired : <code>boolean</code>

@@ -394,3 +429,11 @@ True if the list should always have a selection (if it has items).

**Kind**: instance property of <code>[ListBox](#ListBox)</code>. Defined by <code>[ItemsSelection](../basic-component-mixins/docs/ItemsSelection.md)</code> mixin.
<a name="ItemsSelection+selectionWraps"></a>
### listBox.selectionWraps : <code>boolean</code>
True if selection navigations wrap from last to first, and vice versa.
**Kind**: instance property of <code>[ListBox](#ListBox)</code>. Defined by <code>[ItemsSelection](../basic-component-mixins/docs/ItemsSelection.md)</code> mixin.
**Default**: <code>{false}</code>
<a name="KeyboardPrefixSelection+selectItemWithTextPrefix"></a>
### listBox.selectItemWithTextPrefix(prefix)

@@ -406,2 +449,3 @@ Select the first item whose text content begins with the given prefix.

<a name="ItemsSelection+selectLast"></a>
### listBox.selectLast()

@@ -412,2 +456,3 @@ Select the last item in the list.

<a name="ItemsSelection+selectNext"></a>
### listBox.selectNext()

@@ -418,2 +463,3 @@ Select the next item in the list.

<a name="ItemsSelection+selectPrevious"></a>
### listBox.selectPrevious()

@@ -424,2 +470,3 @@ Select the previous item in the list.

<a name="TargetInCollective+target"></a>
### listBox.target : <code>HTMLElement</code>

@@ -438,2 +485,3 @@ Gets/sets the current target of the component.

<a name="ListBox+value"></a>
### listBox.value : <code>string</code>

@@ -448,2 +496,3 @@ The text content of the selected item.

<a name="ListBox.event_value-changed"></a>
### "value-changed"

@@ -450,0 +499,0 @@ Fires when the list's value property changes.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc