Socket
Socket
Sign inDemoInstall

@patternfly/pfe-select

Package Overview
Dependencies
1
Maintainers
13
Versions
53
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.8.0 to 1.9.0

4

_temp/pfe-select.js
/*!
* PatternFly Elements: PfeSelect 1.8.0
* PatternFly Elements: PfeSelect 1.9.0
* @license

@@ -35,3 +35,3 @@ * Copyright 2021 Red Hat, Inc.

static get version() {
return "1.8.0";
return "1.9.0";
}

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

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

/*!
* PatternFly Elements: PfeSelect 1.8.0
* PatternFly Elements: PfeSelect 1.9.0
* @license

@@ -64,3 +64,3 @@ * Copyright 2021 Red Hat, Inc.

static get version() {
return "1.8.0";
return "1.9.0";
}

@@ -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.8.0
* PatternFly Elements: PfeSelect 1.9.0
* @license

@@ -25,3 +25,3 @@ * Copyright 2021 Red Hat, Inc.

*
*/;class t extends e{static get version(){return"1.8.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:#3c3f42;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(1rem * .875);top:calc(var(--pfe-theme--container-padding,1rem) * .875);right:calc(1rem * .75);right:calc(var(--pfe-theme--container-padding,1rem) * .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:1rem;font-size:var(--pfe-theme--font-size,1rem);font-weight:400;font-weight:var(--pfe-theme--font-weight--normal,400);font-family:\"Red Hat Text\",RedHatText,Overpass,Overpass,Arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Red Hat Text\", \"RedHatText\", \"Overpass\", Overpass, Arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(1rem * .5);padding:calc(var(--pfe-theme--container-padding,1rem) * .5);padding-right:calc(1rem * 1.5);padding-right:calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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&&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 in case 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.9.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:#3c3f42;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(1rem * .875);top:calc(var(--pfe-theme--container-padding,1rem) * .875);right:calc(1rem * .75);right:calc(var(--pfe-theme--container-padding,1rem) * .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:1rem;font-size:var(--pfe-theme--font-size,1rem);font-weight:400;font-weight:var(--pfe-theme--font-weight--normal,400);font-family:\"Red Hat Text\",RedHatText,Overpass,Overpass,Arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Red Hat Text\", \"RedHatText\", \"Overpass\", Overpass, Arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(1rem * .5);padding:calc(var(--pfe-theme--container-padding,1rem) * .5);padding-right:calc(1rem * 1.5);padding-right:calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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&&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 in case 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

@@ -115,3 +115,3 @@ (function (global, factory) {

/*!
* PatternFly Elements: PfeSelect 1.8.0
* PatternFly Elements: PfeSelect 1.9.0
* @license

@@ -186,3 +186,3 @@ * Copyright 2021 Red Hat, Inc.

get: function get() {
return "1.8.0";
return "1.9.0";
}

@@ -189,0 +189,0 @@ }, {

@@ -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=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,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 n=arguments[o];if(null!=n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},writable:!0,configurable:!0});var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e};function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,t,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,t);if(void 0!==o){if("value"in o)return o.value;o=o.get;return void 0!==o?o.call(r):void 0}if(null!==(e=Object.getPrototypeOf(e)))return n(e,t,r)}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},r=(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),r(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:#3c3f42;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(1rem * .875);top:calc(var(--pfe-theme--container-padding,1rem) * .875);right:calc(1rem * .75);right:calc(var(--pfe-theme--container-padding,1rem) * .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:1rem;font-size:var(--pfe-theme--font-size,1rem);font-weight:400;font-weight:var(--pfe-theme--font-weight--normal,400);font-family:\"Red Hat Text\",RedHatText,Overpass,Overpass,Arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Red Hat Text\", \"RedHatText\", \"Overpass\", Overpass, Arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(1rem * .5);padding:calc(var(--pfe-theme--container-padding,1rem) * .5);padding-right:calc(1rem * 1.5);padding-right:calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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.8.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"}}}}]),r(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&&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 in case of multiple 'selected' options");var r=e.findIndex(function(e){return e.selected});return e.map(function(e,t){return e.selected=r==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(r),r});
!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,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 n=arguments[o];if(null!=n)for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])}return r},writable:!0,configurable:!0});var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},r=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),e};function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function n(e,t,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,t);if(void 0!==o){if("value"in o)return o.value;o=o.get;return void 0!==o?o.call(r):void 0}if(null!==(e=Object.getPrototypeOf(e)))return n(e,t,r)}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},r=(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),r(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:#3c3f42;-webkit-transform:rotate(0);transform:rotate(0);display:inline-block;content:\"\";position:absolute;top:calc(1rem * .875);top:calc(var(--pfe-theme--container-padding,1rem) * .875);right:calc(1rem * .75);right:calc(var(--pfe-theme--container-padding,1rem) * .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:1rem;font-size:var(--pfe-theme--font-size,1rem);font-weight:400;font-weight:var(--pfe-theme--font-weight--normal,400);font-family:\"Red Hat Text\",RedHatText,Overpass,Overpass,Arial,sans-serif;font-family:var(--pfe-select--FontFamily, var(--pfe-theme--font-family, \"Red Hat Text\", \"RedHatText\", \"Overpass\", Overpass, Arial, sans-serif));-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-box-shadow:none;box-shadow:none;border:none;padding:calc(1rem * .5);padding:calc(var(--pfe-theme--container-padding,1rem) * .5);padding-right:calc(1rem * 1.5);padding-right:calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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(1rem * .438);padding-bottom:calc(var(--pfe-theme--container-padding,1rem) * .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(1rem * 2)) center;background-position:calc(100% - calc(var(--pfe-theme--container-padding,1rem) * 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.9.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"}}}}]),r(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&&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 in case of multiple 'selected' options");var r=e.findIndex(function(e){return e.selected});return e.map(function(e,t){return e.selected=r==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(r),r});
//# sourceMappingURL=pfe-select.umd.min.js.map

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

},
"version": "1.8.0",
"version": "1.9.0",
"description": "Select element for PatternFly Elements",

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

"devDependencies": {
"@patternfly/pfe-sass": "^1.8.0"
"@patternfly/pfe-sass": "^1.9.0"
},
"dependencies": {
"@patternfly/pfelement": "^1.8.0"
"@patternfly/pfelement": "^1.9.0"
},

@@ -40,3 +40,3 @@ "generator-pfelement-version": "1.1.0",

},
"gitHead": "ba6b21c6a3456db10e9d32a21825c313a5d3c5bb"
"gitHead": "1f38b8d08a6d73678ff98e5fa1d23daf0ac8cb9e"
}

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc