Socket
Socket
Sign inDemoInstall

@patternfly/pfe-select

Package Overview
Dependencies
Maintainers
12
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-select - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

dist/pfe-select.css.map

6

_temp/pfe-select.js
/*!
* PatternFly Elements: PfeSelect 1.1.0
* PatternFly Elements: PfeSelect 1.1.1
* @license
* Copyright 2020 Red Hat, Inc.
* Copyright 2021 Red Hat, Inc.
*

@@ -35,3 +35,3 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

static get version() {
return "1.1.0";
return "1.1.1";
}

@@ -38,0 +38,0 @@

import { storiesOf } from "@storybook/polymer";
import * as storybookBridge from "@storybook/addon-knobs/polymer";
import * as storybookBridge from "@storybook/addon-knobs";
import * as tools from "../../../.storybook/utils.js";

@@ -4,0 +4,0 @@

@@ -35,5 +35,5 @@ import PFElement from '../../pfelement/dist/pfelement.js';

/*!
* PatternFly Elements: PfeSelect 1.1.0
* PatternFly Elements: PfeSelect 1.1.1
* @license
* Copyright 2020 Red Hat, Inc.
* Copyright 2021 Red Hat, Inc.
*

@@ -64,3 +64,3 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

static get version() {
return "1.1.0";
return "1.1.1";
}

@@ -67,0 +67,0 @@

import e from"../../pfelement/dist/pfelement.min.js";"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i)for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])}return r},writable:!0,configurable:!0})
/*!
* PatternFly Elements: PfeSelect 1.1.0
* PatternFly Elements: PfeSelect 1.1.1
* @license
* Copyright 2020 Red Hat, Inc.
* Copyright 2021 Red Hat, Inc.
*

@@ -25,3 +25,3 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

*
*/;class t extends e{static get version(){return"1.1.0"}get html(){return"\n<style>:host{position:relative;display:inline-block;width:100%;line-height:1.5em;font-weight:400;text-align:left;text-rendering:optimizelegibility;border-top:1px solid #f0f0f0;border-top:var(--pfe-select--BorderTop,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-right:1px solid #f0f0f0;border-right:var(--pfe-select--BorderRight,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-bottom:1px solid #3c3f42;border-bottom:var(--pfe-select--BorderBottom,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor,var(--pfe-theme--color--surface--darker,#3c3f42)));border-left:1px solid #f0f0f0;border-left:var(--pfe-select--BorderLeft,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515))}:host *,:host ::after,:host ::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host::after{border-style:solid;border-style:var(--pfe-theme--surface--border-style,solid);border-width:6px 6px 0;border-color:transparent;border-top-color:#030303;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(16px * .875);top:calc(var(--pfe-theme--container-padding,16px) * .875);right:calc(16px * .75);right:calc(var(--pfe-theme--container-padding,16px) * .75)}:host([hidden]){display:none}:host(:hover){border-bottom:1px solid #06c;border-bottom:var(--pfe-select--BorderBottom--hover,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c)))}:host(:focus-within){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#06c;border-bottom-color:var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c))}:host(:focus-within) ::slotted(select){padding-bottom:calc(1rem * .438);padding-bottom:calc(var(--pfe-theme-container-padding,1rem) * .438)}:host ::slotted(select){text-rendering:auto!important;background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515));border-radius:0;width:100%;min-width:100%;font-size:16px;font-size:var(--pfe-theme--font-size,16px);font-weight:500;font-weight:var(--pfe-theme--font-weight--normal,500);font-family:Overpass,Overpass,Helvetica,helvetica,arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Overpass\", Overpass, Helvetica, helvetica, arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(16px * .5);padding:calc(var(--pfe-theme--container-padding,16px) * .5);padding-right:calc(16px * 1.5);padding-right:calc(var(--pfe-theme--container-padding,16px) * 1.5)}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center} /*# sourceMappingURL=pfe-select.min.css.map */</style>\n<slot></slot>"}static get tag(){return"pfe-select"}get templateUrl(){return"pfe-select.html"}get styleUrl(){return"pfe-select.scss"}get pfeOptions(){return this._pfeOptions}set pfeOptions(e){this._pfeOptions=e.filter(e=>e.selected).length>1?this._handleMultipleSelectedValues(e):e,this._modifyDOM()}static get events(){return{change:`${this.tag}:change`}}static get properties(){return{invalid:{type:Boolean,observer:"_handleInvalid",default:!1},oldInvalid:{type:Boolean,alias:"invalid",attr:"pfe-invalid"}}}_handleInvalid(e,t){const r=t?"true":"false";this.querySelector("select").setAttribute("aria-invalid",r)}constructor(){super(t),this._pfeOptions=null,this._init=this._init.bind(this),this._inputChanged=this._inputChanged.bind(this),this.observer=new MutationObserver(this._init)}connectedCallback(){super.connectedCallback(),customElements.whenDefined(t.tag).then(()=>{this.pfeOptions?(this._modifyDOM(),this._init()):this.hasLightDOM()?this._init():this.warn("The first child in the light DOM must be a supported select tag")}),this.observer.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect(),this._input.removeEventListener("input",this._inputChanged)}addOptions(e){this._pfeOptions=this._pfeOptions?this._pfeOptions.concat(e):e}_handleMultipleSelectedValues(e){this.warn("The first 'selected' option will take precedence over others incase of multiple 'selected' options");const t=e.findIndex(e=>e.selected);return e.map((e,r)=>(e.selected=t==r,e))}_init(){this._input=this.querySelector("select"),this._input?this._input.addEventListener("change",this._inputChanged):this.warn("The first child needs to be a select element")}_inputChanged(){this.emitEvent(t.events.change,{detail:{value:this._input.value}})}_modifyDOM(){let e=document.createElement("select");if(this._pfeOptions.map(t=>{const r=Object.assign(document.createElement("option"),t);e.add(r,null)}),this.hasLightDOM()){const t=this.querySelector("select");t.parentNode.replaceChild(e,t)}else this.appendChild(e)}}e.create(t);export default t;
*/;class t extends e{static get version(){return"1.1.1"}get html(){return"\n<style>:host{position:relative;display:inline-block;width:100%;line-height:1.5em;font-weight:400;text-align:left;text-rendering:optimizelegibility;border-top:1px solid #f0f0f0;border-top:var(--pfe-select--BorderTop,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-right:1px solid #f0f0f0;border-right:var(--pfe-select--BorderRight,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-bottom:1px solid #3c3f42;border-bottom:var(--pfe-select--BorderBottom,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor,var(--pfe-theme--color--surface--darker,#3c3f42)));border-left:1px solid #f0f0f0;border-left:var(--pfe-select--BorderLeft,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515))}:host *,:host ::after,:host ::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host::after{border-style:solid;border-style:var(--pfe-theme--surface--border-style,solid);border-width:6px 6px 0;border-color:transparent;border-top-color:#030303;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(16px * .875);top:calc(var(--pfe-theme--container-padding,16px) * .875);right:calc(16px * .75);right:calc(var(--pfe-theme--container-padding,16px) * .75)}:host([hidden]){display:none}:host(:hover){border-bottom:1px solid #06c;border-bottom:var(--pfe-select--BorderBottom--hover,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c)))}:host(:focus-within){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#06c;border-bottom-color:var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c))}:host(:focus-within) ::slotted(select){padding-bottom:calc(1rem * .438);padding-bottom:calc(var(--pfe-theme-container-padding,1rem) * .438)}:host ::slotted(select){text-rendering:auto!important;background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515));border-radius:0;width:100%;min-width:100%;font-size:16px;font-size:var(--pfe-theme--font-size,16px);font-weight:500;font-weight:var(--pfe-theme--font-weight--normal,500);font-family:Overpass,Overpass,Helvetica,helvetica,arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Overpass\", Overpass, Helvetica, helvetica, arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(16px * .5);padding:calc(var(--pfe-theme--container-padding,16px) * .5);padding-right:calc(16px * 1.5);padding-right:calc(var(--pfe-theme--container-padding,16px) * 1.5)}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center} /*# sourceMappingURL=pfe-select.min.css.map */</style>\n<slot></slot>"}static get tag(){return"pfe-select"}get templateUrl(){return"pfe-select.html"}get styleUrl(){return"pfe-select.scss"}get pfeOptions(){return this._pfeOptions}set pfeOptions(e){this._pfeOptions=e.filter(e=>e.selected).length>1?this._handleMultipleSelectedValues(e):e,this._modifyDOM()}static get events(){return{change:`${this.tag}:change`}}static get properties(){return{invalid:{type:Boolean,observer:"_handleInvalid",default:!1},oldInvalid:{type:Boolean,alias:"invalid",attr:"pfe-invalid"}}}_handleInvalid(e,t){const r=t?"true":"false";this.querySelector("select").setAttribute("aria-invalid",r)}constructor(){super(t),this._pfeOptions=null,this._init=this._init.bind(this),this._inputChanged=this._inputChanged.bind(this),this.observer=new MutationObserver(this._init)}connectedCallback(){super.connectedCallback(),customElements.whenDefined(t.tag).then(()=>{this.pfeOptions?(this._modifyDOM(),this._init()):this.hasLightDOM()?this._init():this.warn("The first child in the light DOM must be a supported select tag")}),this.observer.observe(this,{childList:!0})}disconnectedCallback(){super.disconnectedCallback(),this.observer.disconnect(),this._input.removeEventListener("input",this._inputChanged)}addOptions(e){this._pfeOptions=this._pfeOptions?this._pfeOptions.concat(e):e}_handleMultipleSelectedValues(e){this.warn("The first 'selected' option will take precedence over others incase of multiple 'selected' options");const t=e.findIndex(e=>e.selected);return e.map((e,r)=>(e.selected=t==r,e))}_init(){this._input=this.querySelector("select"),this._input?this._input.addEventListener("change",this._inputChanged):this.warn("The first child needs to be a select element")}_inputChanged(){this.emitEvent(t.events.change,{detail:{value:this._input.value}})}_modifyDOM(){let e=document.createElement("select");if(this._pfeOptions.map(t=>{const r=Object.assign(document.createElement("option"),t);e.add(r,null)}),this.hasLightDOM()){const t=this.querySelector("select");t.parentNode.replaceChild(e,t)}else this.appendChild(e)}}e.create(t);export default t;
//# sourceMappingURL=pfe-select.min.js.map
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../../pfelement/dist/pfelement.umd')) :
typeof define === 'function' && define.amd ? define(['../../pfelement/dist/pfelement.umd'], factory) :
(global.PfeSelect = factory(global.PFElement));
(global = global || self, global.PfeSelect = factory(global.PFElement));
}(this, (function (PFElement) { 'use strict';
PFElement = PFElement && PFElement.hasOwnProperty('default') ? PFElement['default'] : PFElement;
PFElement = PFElement && Object.prototype.hasOwnProperty.call(PFElement, 'default') ? PFElement['default'] : PFElement;

@@ -115,5 +115,5 @@ // @POLYFILL Object.assign, for IE11

/*!
* PatternFly Elements: PfeSelect 1.1.0
* PatternFly Elements: PfeSelect 1.1.1
* @license
* Copyright 2020 Red Hat, Inc.
* Copyright 2021 Red Hat, Inc.
*

@@ -153,3 +153,3 @@ * Permission is hereby granted, free of charge, to any person obtaining a copy

// Injected at build-time
get: function get$$1() {
get: function get() {
return "\n<style>:host{position:relative;display:inline-block;width:100%;line-height:1.5em;font-weight:400;text-align:left;text-rendering:optimizelegibility;border-top:1px solid #f0f0f0;border-top:var(--pfe-select--BorderTop,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-right:1px solid #f0f0f0;border-right:var(--pfe-select--BorderRight,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-bottom:1px solid #3c3f42;border-bottom:var(--pfe-select--BorderBottom,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor,var(--pfe-theme--color--surface--darker,#3c3f42)));border-left:1px solid #f0f0f0;border-left:var(--pfe-select--BorderLeft,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515))}:host *,:host ::after,:host ::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host::after{border-style:solid;border-style:var(--pfe-theme--surface--border-style,solid);border-width:6px 6px 0;border-color:transparent;border-top-color:#030303;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(16px * .875);top:calc(var(--pfe-theme--container-padding,16px) * .875);right:calc(16px * .75);right:calc(var(--pfe-theme--container-padding,16px) * .75)}:host([hidden]){display:none}:host(:hover){border-bottom:1px solid #06c;border-bottom:var(--pfe-select--BorderBottom--hover,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c)))}:host(:focus-within){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#06c;border-bottom-color:var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c))}:host(:focus-within) ::slotted(select){padding-bottom:calc(1rem * .438);padding-bottom:calc(var(--pfe-theme-container-padding,1rem) * .438)}:host ::slotted(select){text-rendering:auto!important;background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515));border-radius:0;width:100%;min-width:100%;font-size:16px;font-size:var(--pfe-theme--font-size,16px);font-weight:500;font-weight:var(--pfe-theme--font-weight--normal,500);font-family:Overpass,Overpass,Helvetica,helvetica,arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Overpass\", Overpass, Helvetica, helvetica, arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(16px * .5);padding:calc(var(--pfe-theme--container-padding,16px) * .5);padding-right:calc(16px * 1.5);padding-right:calc(var(--pfe-theme--container-padding,16px) * 1.5)}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center} /*# sourceMappingURL=pfe-select.min.css.map */</style>\n<slot></slot>";

@@ -159,3 +159,3 @@ }

key: "templateUrl",
get: function get$$1() {
get: function get() {
return "pfe-select.html";

@@ -165,3 +165,3 @@ }

key: "styleUrl",
get: function get$$1() {
get: function get() {
return "pfe-select.scss";

@@ -174,6 +174,6 @@ }

key: "pfeOptions",
get: function get$$1() {
get: function get() {
return this._pfeOptions;
},
set: function set$$1(options) {
set: function set(options) {
this._pfeOptions = options.filter(function (el) {

@@ -189,8 +189,8 @@ return el.selected;

// Injected at build-time
get: function get$$1() {
return "1.1.0";
get: function get() {
return "1.1.1";
}
}, {
key: "tag",
get: function get$$1() {
get: function get() {
return "pfe-select";

@@ -200,3 +200,3 @@ }

key: "events",
get: function get$$1() {
get: function get() {
return {

@@ -208,3 +208,3 @@ change: this.tag + ":change"

key: "properties",
get: function get$$1() {
get: function get() {
return {

@@ -211,0 +211,0 @@ invalid: {

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../../pfelement/dist/pfelement.umd.min")):"function"==typeof define&&define.amd?define(["../../pfelement/dist/pfelement.umd.min"],t):e.PfeSelect=t(e.PFElement)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),o=1;o<arguments.length;o++){var r=arguments[o];if(null!=r)for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},writable:!0,configurable:!0});var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(e,t,o){return t&&r(e.prototype,t),o&&r(e,o),e};function r(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0!==r){if("value"in r)return r.value;r=r.get;return void 0!==r?r.call(o):void 0}if(e=Object.getPrototypeOf(e),null!==e)return n(e,t,o)}var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},o=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,e),o(a,[{key:"_handleInvalid",value:function(e,t){t=t?"true":"false";this.querySelector("select").setAttribute("aria-invalid",t)}},{key:"html",get:function(){return"\n<style>:host{position:relative;display:inline-block;width:100%;line-height:1.5em;font-weight:400;text-align:left;text-rendering:optimizelegibility;border-top:1px solid #f0f0f0;border-top:var(--pfe-select--BorderTop,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-right:1px solid #f0f0f0;border-right:var(--pfe-select--BorderRight,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-bottom:1px solid #3c3f42;border-bottom:var(--pfe-select--BorderBottom,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor,var(--pfe-theme--color--surface--darker,#3c3f42)));border-left:1px solid #f0f0f0;border-left:var(--pfe-select--BorderLeft,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515))}:host *,:host ::after,:host ::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host::after{border-style:solid;border-style:var(--pfe-theme--surface--border-style,solid);border-width:6px 6px 0;border-color:transparent;border-top-color:#030303;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(16px * .875);top:calc(var(--pfe-theme--container-padding,16px) * .875);right:calc(16px * .75);right:calc(var(--pfe-theme--container-padding,16px) * .75)}:host([hidden]){display:none}:host(:hover){border-bottom:1px solid #06c;border-bottom:var(--pfe-select--BorderBottom--hover,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c)))}:host(:focus-within){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#06c;border-bottom-color:var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c))}:host(:focus-within) ::slotted(select){padding-bottom:calc(1rem * .438);padding-bottom:calc(var(--pfe-theme-container-padding,1rem) * .438)}:host ::slotted(select){text-rendering:auto!important;background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515));border-radius:0;width:100%;min-width:100%;font-size:16px;font-size:var(--pfe-theme--font-size,16px);font-weight:500;font-weight:var(--pfe-theme--font-weight--normal,500);font-family:Overpass,Overpass,Helvetica,helvetica,arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Overpass\", Overpass, Helvetica, helvetica, arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(16px * .5);padding:calc(var(--pfe-theme--container-padding,16px) * .5);padding-right:calc(16px * 1.5);padding-right:calc(var(--pfe-theme--container-padding,16px) * 1.5)}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center} /*# sourceMappingURL=pfe-select.min.css.map */</style>\n<slot></slot>"}},{key:"templateUrl",get:function(){return"pfe-select.html"}},{key:"styleUrl",get:function(){return"pfe-select.scss"}},{key:"pfeOptions",get:function(){return this._pfeOptions},set:function(e){this._pfeOptions=1<e.filter(function(e){return e.selected}).length?this._handleMultipleSelectedValues(e):e,this._modifyDOM()}}],[{key:"version",get:function(){return"1.1.0"}},{key:"tag",get:function(){return"pfe-select"}},{key:"events",get:function(){return{change:this.tag+":change"}}},{key:"properties",get:function(){return{invalid:{type:Boolean,observer:"_handleInvalid",default:!1},oldInvalid:{type:Boolean,alias:"invalid",attr:"pfe-invalid"}}}}]),o(a,[{key:"connectedCallback",value:function(){var e=this;n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"connectedCallback",this).call(this),customElements.whenDefined(a.tag).then(function(){e.pfeOptions?(e._modifyDOM(),e._init()):e.hasLightDOM()?e._init():e.warn("The first child in the light DOM must be a supported select tag")}),this.observer.observe(this,{childList:!0})}},{key:"disconnectedCallback",value:function(){n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"disconnectedCallback",this).call(this),this.observer.disconnect(),this._input.removeEventListener("input",this._inputChanged)}},{key:"addOptions",value:function(e){this._pfeOptions=this._pfeOptions?this._pfeOptions.concat(e):e}},{key:"_handleMultipleSelectedValues",value:function(e){this.warn("The first 'selected' option will take precedence over others incase of multiple 'selected' options");var o=e.findIndex(function(e){return e.selected});return e.map(function(e,t){return e.selected=o==t,e})}},{key:"_init",value:function(){this._input=this.querySelector("select"),this._input?this._input.addEventListener("change",this._inputChanged):this.warn("The first child needs to be a select element")}},{key:"_inputChanged",value:function(){this.emitEvent(a.events.change,{detail:{value:this._input.value}})}},{key:"_modifyDOM",value:function(){var e,t=document.createElement("select");this._pfeOptions.map(function(e){e=Object.assign(document.createElement("option"),e);t.add(e,null)}),this.hasLightDOM()?(e=this.querySelector("select")).parentNode.replaceChild(t,e):this.appendChild(t)}}]),a);function a(){t(this,a);var e=i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a));return e._pfeOptions=null,e._init=e._init.bind(e),e._inputChanged=e._inputChanged.bind(e),e.observer=new MutationObserver(e._init),e}return e.create(o),o});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("../../pfelement/dist/pfelement.umd.min")):"function"==typeof define&&define.amd?define(["../../pfelement/dist/pfelement.umd.min"],t):(e=e||self).PfeSelect=t(e.PFElement)}(this,function(e){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e,"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),o=1;o<arguments.length;o++){var r=arguments[o];if(null!=r)for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},writable:!0,configurable:!0});var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},o=function(e,t,o){return t&&r(e.prototype,t),o&&r(e,o),e};function r(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function n(e,t,o){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0!==r){if("value"in r)return r.value;r=r.get;return void 0!==r?r.call(o):void 0}if(e=Object.getPrototypeOf(e),null!==e)return n(e,t,o)}var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},o=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(a,e),o(a,[{key:"_handleInvalid",value:function(e,t){t=t?"true":"false";this.querySelector("select").setAttribute("aria-invalid",t)}},{key:"html",get:function(){return"\n<style>:host{position:relative;display:inline-block;width:100%;line-height:1.5em;font-weight:400;text-align:left;text-rendering:optimizelegibility;border-top:1px solid #f0f0f0;border-top:var(--pfe-select--BorderTop,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-right:1px solid #f0f0f0;border-right:var(--pfe-select--BorderRight,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));border-bottom:1px solid #3c3f42;border-bottom:var(--pfe-select--BorderBottom,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor,var(--pfe-theme--color--surface--darker,#3c3f42)));border-left:1px solid #f0f0f0;border-left:var(--pfe-select--BorderLeft,var(--pfe-select--BorderWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderColor,var(--pfe-theme--color--surface--lighter,#f0f0f0)));background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515))}:host *,:host ::after,:host ::before{-webkit-box-sizing:border-box;box-sizing:border-box}:host::after{border-style:solid;border-style:var(--pfe-theme--surface--border-style,solid);border-width:6px 6px 0;border-color:transparent;border-top-color:#030303;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(16px * .875);top:calc(var(--pfe-theme--container-padding,16px) * .875);right:calc(16px * .75);right:calc(var(--pfe-theme--container-padding,16px) * .75)}:host([hidden]){display:none}:host(:hover){border-bottom:1px solid #06c;border-bottom:var(--pfe-select--BorderBottom--hover,var(--pfe-select--BorderBottomWidth,var(--pfe-theme--ui--border-width,1px)) var(--pfe-theme--ui--border-style,solid) var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c)))}:host(:focus-within){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#06c;border-bottom-color:var(--pfe-select--BorderBottomColor--hover,var(--pfe-theme--color--link,#06c))}:host(:focus-within) ::slotted(select){padding-bottom:calc(1rem * .438);padding-bottom:calc(var(--pfe-theme-container-padding,1rem) * .438)}:host ::slotted(select){text-rendering:auto!important;background-color:#fff;background-color:var(--pfe-select--BackgroundColor,var(--pfe-theme--color--surface--lightest,#fff));color:#151515;color:var(--pfe-select--Color,var(--pfe-theme--color--text,#151515));border-radius:0;width:100%;min-width:100%;font-size:16px;font-size:var(--pfe-theme--font-size,16px);font-weight:500;font-weight:var(--pfe-theme--font-weight--normal,500);font-family:Overpass,Overpass,Helvetica,helvetica,arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Overpass\", Overpass, Helvetica, helvetica, arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(16px * .5);padding:calc(var(--pfe-theme--container-padding,16px) * .5);padding-right:calc(16px * 1.5);padding-right:calc(var(--pfe-theme--container-padding,16px) * 1.5)}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center}:host([invalid]){border-bottom-width:calc(4px / 2);border-bottom-width:calc(var(--pfe-theme--surface--border-width--heavy,4px)/ 2);border-bottom-color:#a30000;border-bottom-color:var(--pfe-select--BorderBottomColor--error,var(--pfe-theme--color--feedback--critical,#a30000))}:host([invalid]) ::slotted(select){padding-bottom:calc(16px * .438);padding-bottom:calc(var(--pfe-theme--container-padding,16px) * .438);background-image:url(\"data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23c9190b' d='M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E\");background-size:.875rem;background-repeat:no-repeat;background-position:calc(100% - calc(16px * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,16px) * 2)) center} /*# sourceMappingURL=pfe-select.min.css.map */</style>\n<slot></slot>"}},{key:"templateUrl",get:function(){return"pfe-select.html"}},{key:"styleUrl",get:function(){return"pfe-select.scss"}},{key:"pfeOptions",get:function(){return this._pfeOptions},set:function(e){this._pfeOptions=1<e.filter(function(e){return e.selected}).length?this._handleMultipleSelectedValues(e):e,this._modifyDOM()}}],[{key:"version",get:function(){return"1.1.1"}},{key:"tag",get:function(){return"pfe-select"}},{key:"events",get:function(){return{change:this.tag+":change"}}},{key:"properties",get:function(){return{invalid:{type:Boolean,observer:"_handleInvalid",default:!1},oldInvalid:{type:Boolean,alias:"invalid",attr:"pfe-invalid"}}}}]),o(a,[{key:"connectedCallback",value:function(){var e=this;n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"connectedCallback",this).call(this),customElements.whenDefined(a.tag).then(function(){e.pfeOptions?(e._modifyDOM(),e._init()):e.hasLightDOM()?e._init():e.warn("The first child in the light DOM must be a supported select tag")}),this.observer.observe(this,{childList:!0})}},{key:"disconnectedCallback",value:function(){n(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"disconnectedCallback",this).call(this),this.observer.disconnect(),this._input.removeEventListener("input",this._inputChanged)}},{key:"addOptions",value:function(e){this._pfeOptions=this._pfeOptions?this._pfeOptions.concat(e):e}},{key:"_handleMultipleSelectedValues",value:function(e){this.warn("The first 'selected' option will take precedence over others incase of multiple 'selected' options");var o=e.findIndex(function(e){return e.selected});return e.map(function(e,t){return e.selected=o==t,e})}},{key:"_init",value:function(){this._input=this.querySelector("select"),this._input?this._input.addEventListener("change",this._inputChanged):this.warn("The first child needs to be a select element")}},{key:"_inputChanged",value:function(){this.emitEvent(a.events.change,{detail:{value:this._input.value}})}},{key:"_modifyDOM",value:function(){var e,t=document.createElement("select");this._pfeOptions.map(function(e){e=Object.assign(document.createElement("option"),e);t.add(e,null)}),this.hasLightDOM()?(e=this.querySelector("select")).parentNode.replaceChild(t,e):this.appendChild(t)}}]),a);function a(){t(this,a);var e=i(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,a));return e._pfeOptions=null,e._init=e._init.bind(e),e._inputChanged=e._inputChanged.bind(e),e.observer=new MutationObserver(e._init),e}return e.create(o),o});
//# sourceMappingURL=pfe-select.umd.min.js.map

@@ -1,2 +0,2 @@

Copyright 2020 Red Hat, Inc.
Copyright 2021 Red Hat, Inc.

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

@@ -8,3 +8,3 @@ {

},
"version": "1.1.0",
"version": "1.1.1",
"description": "Select element for PatternFly Elements",

@@ -30,9 +30,9 @@ "repository": {

"dependencies": {
"@patternfly/pfelement": "^1.1.0"
"@patternfly/pfelement": "^1.1.1"
},
"devDependencies": {
"@patternfly/pfe-sass": "^1.1.0"
"@patternfly/pfe-sass": "^1.1.1"
},
"generator-pfelement-version": "1.1.0",
"gitHead": "2429c3cff8e5f1804f4b16a8f02c4e8c937fd8a4"
"gitHead": "b9507e719b7c4e4ee3311eeebcee447adc4d5bf9"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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