@randstad-uca/design-system 1.0.28 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Select.d.ts +1 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -25,8 +25,7 @@ export declare class FilterableSelect extends LitElement {
|
|
|
25
25
|
private highlightedIndex;
|
|
26
26
|
private debounceTimeout;
|
|
27
27
|
static styles: import("lit").CSSResult;
|
|
28
|
-
|
|
29
|
-
willUpdate(changedProperties: Map<string, any>): void;
|
|
28
|
+
updated(changedProperties: Map<string, any>): void;
|
|
30
29
|
connectedCallback(): void;
|
|
31
30
|
disconnectedCallback(): void;
|
|
32
31
|
private updateResponsiveModeBound;
|
package/dist/index.js
CHANGED
|
@@ -74,14 +74,14 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
74
74
|
line-height: 30px;
|
|
75
75
|
letter-spacing: -1%;
|
|
76
76
|
vertical-align: middle;
|
|
77
|
-
`,
|
|
77
|
+
`,q=t`
|
|
78
78
|
font-family: 'Graphik', sans-serif;
|
|
79
79
|
font-weight: 400;
|
|
80
80
|
font-size: 26px;
|
|
81
81
|
line-height: 30px;
|
|
82
82
|
letter-spacing: -1%;
|
|
83
83
|
vertical-align: middle;
|
|
84
|
-
`;let
|
|
84
|
+
`;let V=class extends e{constructor(){super(...arguments),this.title="",this.isOpen=!1,this.isDesktop=window.innerWidth>940,this.handleResize=()=>{this.isDesktop=window.innerWidth>940}}static{this.styles=t`
|
|
85
85
|
:host {
|
|
86
86
|
display: flex;
|
|
87
87
|
flex-direction: column;
|
|
@@ -159,7 +159,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
159
159
|
<div class="content ${this.isOpen?"open":""}">
|
|
160
160
|
<slot></slot>
|
|
161
161
|
</div>
|
|
162
|
-
`}};n([I({type:String}),a("design:type",Object)],
|
|
162
|
+
`}};n([I({type:String}),a("design:type",Object)],V.prototype,"title",void 0),n([L(),a("design:type",Object)],V.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],V.prototype,"isDesktop",void 0),V=n([l("accordion-panel")],V);let N=class extends e{static{this.styles=t`
|
|
163
163
|
:host {
|
|
164
164
|
display: flex;
|
|
165
165
|
flex-direction: column;
|
|
@@ -1145,7 +1145,7 @@ function F(t,e){return(e,i,o)=>((t,e,i)=>(i.configurable=!0,i.enumerable=!0,Refl
|
|
|
1145
1145
|
}
|
|
1146
1146
|
|
|
1147
1147
|
.modal-title {
|
|
1148
|
-
${
|
|
1148
|
+
${q}
|
|
1149
1149
|
margin: 0;
|
|
1150
1150
|
color: var(--secondary-color);
|
|
1151
1151
|
}
|
|
@@ -1606,7 +1606,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1606
1606
|
* @license
|
|
1607
1607
|
* Copyright 2022 Google LLC
|
|
1608
1608
|
* SPDX-License-Identifier: Apache-2.0
|
|
1609
|
-
*/;let
|
|
1609
|
+
*/;let qt=class extends Dt{};qt.styles=[Ut],qt=n([l("md-radio")],qt);let Vt=class extends e{constructor(){super(...arguments),this.name="radio-group",this.checked=!1,this.disabled=!1,this.error=!1}static{this.styles=t`
|
|
1610
1610
|
:host {
|
|
1611
1611
|
font-family: "Graphik", sans-serif;
|
|
1612
1612
|
}
|
|
@@ -1665,7 +1665,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1665
1665
|
></md-radio>
|
|
1666
1666
|
<span>${this.checked?"On":"Off"} ${this.error?"Error":""}</span>
|
|
1667
1667
|
</label>
|
|
1668
|
-
`}};n([I({type:String}),a("design:type",Object)],
|
|
1668
|
+
`}};n([I({type:String}),a("design:type",Object)],Vt.prototype,"name",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Object)],Vt.prototype,"error",void 0),Vt=n([l("custom-radio")],Vt);let Nt=class extends e{constructor(){super(...arguments),this.options=[],this.placeholder="Filtrar opciones...",this.defaultValue="",this.disabled=!1,this.label="",this.value="",this.labelColor="",this.filterable=!0,this.error=!1,this.required=!1,this.optional=!1,this.isMobile=!1,this.filteredOptions=[],this.filterValue="",this.isOpen=!1,this.mobileFilterValue="",this.highlightedIndex=-1,this.debounceTimeout=null,this.updateResponsiveModeBound=this.updateResponsiveMode.bind(this)}static{this.styles=t`
|
|
1669
1669
|
:host {
|
|
1670
1670
|
display: block;
|
|
1671
1671
|
font-family: 'Graphik', sans-serif;
|
|
@@ -1960,7 +1960,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
1960
1960
|
color: var(--secondary-color-60);
|
|
1961
1961
|
${_}
|
|
1962
1962
|
}
|
|
1963
|
-
`}
|
|
1963
|
+
`}updated(t){if(t.has("options")||t.has("value")||t.has("defaultValue")){const t=this.value||this.defaultValue,e=this.options.find((e=>"string"==typeof e?e===t:e.value===t));this.filterValue=e?"string"==typeof e?e:e.label:""}t.has("options")&&(this.filteredOptions=[...this.options])}connectedCallback(){super.connectedCallback(),this.updateResponsiveMode(),window.addEventListener("resize",this.updateResponsiveModeBound),document.addEventListener("click",this.handleClickOutside.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.updateResponsiveModeBound),document.removeEventListener("click",this.handleClickOutside.bind(this)),super.disconnectedCallback()}updateResponsiveMode(){this.isMobile=window.innerWidth<=940}handleInputClick(t){this.isMobile&&(this.mobileFilterValue=""),this.disabled||(this.isOpen=!this.isOpen,this.requestUpdate())}handleInput(t){if(!this.filterable)return;const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.filterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(this.filterValue.toLowerCase()))),this.isOpen=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{this.filterValue.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:this.filterValue},bubbles:!0,composed:!0}))}),300),this.requestUpdate()}handleMobileInput(t){const e=t.target.value,i=this.maxLength?e.slice(0,this.maxLength).toLowerCase():e.toLowerCase();this.mobileFilterValue=i,this.filteredOptions=this.options.filter((t=>("string"==typeof t?t:t.label).toLowerCase().includes(i))),this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=window.setTimeout((()=>{i.length>2&&this.dispatchEvent(new CustomEvent("filter-location",{detail:{value:i},bubbles:!0,composed:!0}))}),300)}handleSelect(t){this.value="string"==typeof t?t:t.value;const e="string"==typeof t?t:t.value;this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:e},bubbles:!0,composed:!0})),this.filterValue="string"==typeof t?t:t.label,this.isOpen=!1,this.requestUpdate()}handleIconClick(){this.disabled||(this.filterable&&this.filterValue?(this.filterValue="",this.filteredOptions=[...this.options],this.dispatchEvent(new CustomEvent("option-selected",{detail:{value:""},bubbles:!0,composed:!0})),this.isOpen=!1):this.isOpen=!this.isOpen,this.requestUpdate())}handleClickOutside(t){const e=t.target;e instanceof Node&&(this.contains(e)||(this.isOpen=!1,this.requestUpdate()))}handleKeyDown(t){const{key:e}=t;if(!this.isOpen&&("Enter"===e||" "===e))return t.preventDefault(),void(this.isOpen=!0);if(this.isOpen)if("ArrowDown"===e)t.preventDefault(),this.highlightedIndex=Math.min(this.highlightedIndex+1,this.filteredOptions.length-1),this.requestUpdate();else if("ArrowUp"===e)t.preventDefault(),this.highlightedIndex=Math.max(this.highlightedIndex-1,0),this.requestUpdate();else if("Enter"===e){t.preventDefault();const e=this.filteredOptions[this.highlightedIndex];e&&this.handleSelect(e)}else"Escape"===e&&(t.preventDefault(),this.isOpen=!1)}render(){const t=this.isMobile;return i`
|
|
1964
1964
|
<div class="select-container" style="${this.labelColor?` --label-color: ${this.labelColor}`:""}">
|
|
1965
1965
|
${this.label?i`
|
|
1966
1966
|
<div class="label-container">
|
|
@@ -2055,7 +2055,7 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2055
2055
|
`:""}
|
|
2056
2056
|
</div>
|
|
2057
2057
|
</div>
|
|
2058
|
-
`}};n([I({type:Array}),a("design:type",Array)],Nt.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Nt.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Nt.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Nt.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Nt.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"optional",void 0),n([L(),a("design:type",Boolean)],Nt.prototype,"isMobile",void 0),n([L(),a("design:type",Array)],Nt.prototype,"filteredOptions",void 0),n([L(),a("design:type",Object)],Nt.prototype,"filterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],Nt.prototype,"mobileFilterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"highlightedIndex",void 0),Nt=n([l("filterable-select")
|
|
2058
|
+
`}};n([I({type:Array}),a("design:type",Array)],Nt.prototype,"options",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"placeholder",void 0),n([I({type:String,attribute:"default-value"}),a("design:type",Object)],Nt.prototype,"defaultValue",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"disabled",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"label",void 0),n([I({type:String}),a("design:type",String)],Nt.prototype,"value",void 0),n([I({type:String}),a("design:type",Object)],Nt.prototype,"labelColor",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"filterable",void 0),n([I({type:Number}),a("design:type",Number)],Nt.prototype,"maxLength",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Boolean)],Nt.prototype,"error",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"required",void 0),n([I({type:Boolean}),a("design:type",Object)],Nt.prototype,"optional",void 0),n([L(),a("design:type",Boolean)],Nt.prototype,"isMobile",void 0),n([L(),a("design:type",Array)],Nt.prototype,"filteredOptions",void 0),n([L(),a("design:type",Object)],Nt.prototype,"filterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],Nt.prototype,"mobileFilterValue",void 0),n([L(),a("design:type",Object)],Nt.prototype,"highlightedIndex",void 0),Nt=n([l("filterable-select")],Nt);const Gt=new CSSStyleSheet;Gt.replaceSync("\n @font-face {\n font-family: 'Graphik';\n src: url('/src/assets/font/Graphik-Regular.woff2') format('woff2'),\n url('/src/assets/font/Graphik-Regular.woff') format('woff'),\n url('/src/assets/font/Graphik-Regular.eot') format('embedded-opentype');\n font-weight: normal;\n font-style: normal;\n }\n\n .body-s {\n font-weight: 400;\n font-size: 14px;\n line-height: 100%;\n letter-spacing: 0%;\n color: green;\n }\n");class Ht extends e{static{this.styles=[Gt,t`
|
|
2059
2059
|
:host {
|
|
2060
2060
|
display: flex;
|
|
2061
2061
|
position: fixed;
|
|
@@ -2554,5 +2554,5 @@ const Ut=t`@layer{:host{display:inline-flex;height:var(--md-radio-icon-size, 20p
|
|
|
2554
2554
|
</label>
|
|
2555
2555
|
`}
|
|
2556
2556
|
</div>
|
|
2557
|
-
`}};n([I({type:Array}),a("design:type",Array)],Wt.prototype,"files",void 0),n([L(),a("design:type",Object)],Wt.prototype,"loading",void 0),n([L(),a("design:type",Object)],Wt.prototype,"progress",void 0),n([L(),a("design:type",Object)],Wt.prototype,"isDragging",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Wt.prototype,"disabled",void 0),Wt=n([l("upload-image")],Wt);export{N as AccordionList,
|
|
2557
|
+
`}};n([I({type:Array}),a("design:type",Array)],Wt.prototype,"files",void 0),n([L(),a("design:type",Object)],Wt.prototype,"loading",void 0),n([L(),a("design:type",Object)],Wt.prototype,"progress",void 0),n([L(),a("design:type",Object)],Wt.prototype,"isDragging",void 0),n([I({type:Boolean,reflect:!0}),a("design:type",Object)],Wt.prototype,"disabled",void 0),Wt=n([l("upload-image")],Wt);export{N as AccordionList,V as AccordionPanel,H as CarouselCard,K as Checkbox,Q as CustomModal,Z as CustomPopup,Vt as CustomRadio,Kt as CustomStepper,Nt as FilterableSelect,W as FormGroup,X as IconComponent,tt as ProgressCircle,G as RandstadButton,Y as RandstadForm,J as RandstadNotice,Yt as TabsBar,Wt as UploadImage};
|
|
2558
2558
|
//# sourceMappingURL=index.js.map
|