New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/select

Package Overview
Dependencies
Maintainers
19
Versions
430
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/select - npm Package Compare versions

Comparing version 22.0.0-beta1 to 22.0.0-beta2

28

package.json
{
"name": "@vaadin/select",
"version": "22.0.0-beta1",
"version": "22.0.0-beta2",
"publishConfig": {

@@ -37,17 +37,17 @@ "access": "public"

"@polymer/polymer": "^3.2.0",
"@vaadin/button": "22.0.0-beta1",
"@vaadin/component-base": "22.0.0-beta1",
"@vaadin/field-base": "22.0.0-beta1",
"@vaadin/input-container": "22.0.0-beta1",
"@vaadin/item": "22.0.0-beta1",
"@vaadin/list-box": "22.0.0-beta1",
"@vaadin/vaadin-list-mixin": "22.0.0-beta1",
"@vaadin/vaadin-lumo-styles": "22.0.0-beta1",
"@vaadin/vaadin-material-styles": "22.0.0-beta1",
"@vaadin/vaadin-overlay": "22.0.0-beta1",
"@vaadin/vaadin-themable-mixin": "22.0.0-beta1"
"@vaadin/button": "22.0.0-beta2",
"@vaadin/component-base": "22.0.0-beta2",
"@vaadin/field-base": "22.0.0-beta2",
"@vaadin/input-container": "22.0.0-beta2",
"@vaadin/item": "22.0.0-beta2",
"@vaadin/list-box": "22.0.0-beta2",
"@vaadin/vaadin-list-mixin": "22.0.0-beta2",
"@vaadin/vaadin-lumo-styles": "22.0.0-beta2",
"@vaadin/vaadin-material-styles": "22.0.0-beta2",
"@vaadin/vaadin-overlay": "22.0.0-beta2",
"@vaadin/vaadin-themable-mixin": "22.0.0-beta2"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/polymer-legacy-adapter": "22.0.0-beta1",
"@vaadin/polymer-legacy-adapter": "22.0.0-beta2",
"@vaadin/testing-helpers": "^0.3.0",

@@ -57,3 +57,3 @@ "lit": "^2.0.0",

},
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
"gitHead": "f13833683e6667f6ca6678452db14aa6b7eac4a4"
}

@@ -1,15 +0,12 @@

# <vaadin-select>
# @vaadin/select
[Live Demo ↗](https://vaadin.com/components/vaadin-select/html-examples)
|
[API documentation ↗](https://vaadin.com/components/vaadin-select/html-api)
A web component for selecting a single value from a list of options presented in an overlay.
[<vaadin-select>](https://vaadin.com/components/vaadin-select) is a Web Component similar to a native browser select element, part of the [Vaadin components](https://vaadin.com/components).
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/select)
[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-select)](https://www.npmjs.com/package/@vaadin/vaadin-select)
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-select)
[![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
```html
<vaadin-select></vaadin-select>
<vaadin-select label="Sort by"></vaadin-select>
<script>

@@ -22,10 +19,10 @@ document.querySelector('vaadin-select').renderer = (root) => {

// Note that innerHTML is only used for demo purposes here!
// Prefer using a templating library instead.
// Consider using Lit or another template library instead.
root.innerHTML = `
<vaadin-list-box>
<vaadin-item>Option one</vaadin-item>
<vaadin-item>Option two</vaadin-item>
<vaadin-item>Option three</vaadin-item>
<hr>
<vaadin-item disabled>Option four</vaadin-item>
<vaadin-item value="recent">Most recent first</vaadin-item>
<vaadin-item value="rating-desc">Rating: high to low</vaadin-item>
<vaadin-item value="rating-asc">Rating: low to high</vaadin-item>
<vaadin-item value="price-desc">Price: high to low</vaadin-item>
<vaadin-item value="price-asc">Price: low to high</vaadin-item>
</vaadin-list-box>

@@ -37,38 +34,41 @@ `;

[<img src="https://raw.githubusercontent.com/vaadin/vaadin-select/master/screenshot.gif" width="220" alt="Screenshot of vaadin-select">](https://vaadin.com/components/vaadin-select)
[<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/select/screenshot.png" width="231" alt="Screenshot of vaadin-select">](https://vaadin.com/docs/latest/ds/components/select)
## Installation
Install `vaadin-select`:
Install the component:
```sh
npm i @vaadin/vaadin-select --save
npm i @vaadin/select
```
Once installed, import it in your application:
Once installed, import the component in your application:
```js
import '@vaadin/vaadin-select/vaadin-select.js';
import '@vaadin/select';
```
## Getting started
## Themes
Vaadin components use the Lumo theme by default.
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material.
The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/select/vaadin-select.js) of the package uses the Lumo theme.
To use the Material theme, import the correspondent file from the `theme/material` folder.
To use the Material theme, import the component from the `theme/material` folder:
## Entry points
```js
import '@vaadin/select/theme/material/vaadin-select.js';
```
- The component with the Lumo theme:
You can also import the Lumo version of the component explicitly:
`theme/lumo/vaadin-select.js`
```js
import '@vaadin/select/theme/lumo/vaadin-select.js';
```
- The component with the Material theme:
Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
- `theme/material/vaadin-select.js`
```js
import '@vaadin/select/src/vaadin-select.js';
```
- Alias for `theme/lumo/vaadin-select.js`:
- `vaadin-select.js`
## Contributing

@@ -82,2 +82,3 @@

Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
Vaadin collects usage statistics at development time to improve this product.
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.

@@ -7,4 +7,4 @@ /**

import { OverlayElement } from '@vaadin/vaadin-overlay/src/vaadin-overlay.js';
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import { PositionMixin } from '@vaadin/vaadin-overlay/src/vaadin-overlay-position-mixin.js';
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -11,0 +11,0 @@ registerStyles(

@@ -7,3 +7,3 @@ /**

import { Button } from '@vaadin/button/src/vaadin-button.js';
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -10,0 +10,0 @@ registerStyles(

@@ -6,4 +6,7 @@ /**

*/
import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
import '@polymer/iron-media-query/iron-media-query.js';
import '@vaadin/input-container/src/vaadin-input-container.js';
import './vaadin-select-overlay.js';
import './vaadin-select-value-button.js';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';

@@ -16,7 +19,3 @@ import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';

import { inputFieldContainer } from '@vaadin/field-base/src/styles/input-field-container-styles.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import '@vaadin/input-container/src/vaadin-input-container.js';
import './vaadin-select-overlay.js';
import './vaadin-select-value-button.js';
import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -349,2 +348,6 @@ registerStyles('vaadin-select', [fieldShared, inputFieldContainer], { moduleId: 'vaadin-select-styles' });

requestContentUpdate() {
if (!this._overlayElement) {
return;
}
this._overlayElement.requestContentUpdate();

@@ -386,3 +389,5 @@

menuElement.addEventListener('selected-changed', () => this.__updateValueButton());
menuElement.addEventListener('keydown', (e) => this._onKeyDownInside(e));
// Use capture phase to make it possible for `<vaadin-grid-pro-edit-select>`
// to override and handle the keydown event before the value change happens.
menuElement.addEventListener('keydown', (e) => this._onKeyDownInside(e), true);
menuElement.addEventListener(

@@ -389,0 +394,0 @@ 'click',

@@ -6,8 +6,8 @@ /**

*/
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import '@vaadin/vaadin-lumo-styles/sizing.js';
import '@vaadin/vaadin-lumo-styles/style.js';
import '@vaadin/vaadin-lumo-styles/font-icons.js';
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
import { menuOverlay } from '@vaadin/vaadin-lumo-styles/mixins/menu-overlay.js';
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -19,2 +19,6 @@ const select = css`

[part='input-field'] {
cursor: var(--lumo-clickable-cursor);
}
[part='input-field'] ::slotted([slot='value']) {

@@ -24,4 +28,8 @@ font-weight: 500;

[part='input-field'] ::slotted([slot='value']:not([placeholder])) {
color: var(--lumo-body-text-color);
}
/* placeholder styles */
:host [part='input-field'] ::slotted([slot='value'][placeholder]) {
[part='input-field'] ::slotted([slot='value'][placeholder]) {
color: inherit;

@@ -32,6 +40,2 @@ transition: opacity 0.175s 0.1s;

:host [part='input-field'] ::slotted([slot='value']) {
color: var(--lumo-body-text-color);
}
[part='toggle-button']::before {

@@ -38,0 +42,0 @@ content: var(--lumo-icons-dropdown);

@@ -6,6 +6,6 @@ /**

*/
import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import '@vaadin/vaadin-material-styles/font-icons.js';
import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
import { menuOverlay } from '@vaadin/vaadin-material-styles/mixins/menu-overlay.js';
import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

@@ -12,0 +12,0 @@ const select = css`

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