@randstad-uca/design-system 1.0.29 → 1.0.31
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 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/package.json +21 -18
- package/package.json +21 -18
|
@@ -25,7 +25,7 @@ export declare class FilterableSelect extends LitElement {
|
|
|
25
25
|
private highlightedIndex;
|
|
26
26
|
private debounceTimeout;
|
|
27
27
|
static styles: import("lit").CSSResult;
|
|
28
|
-
|
|
28
|
+
update(changedProperties: Map<string, any>): void;
|
|
29
29
|
connectedCallback(): void;
|
|
30
30
|
disconnectedCallback(): void;
|
|
31
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
|
+
`,V=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 q=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)],q.prototype,"title",void 0),n([L(),a("design:type",Object)],q.prototype,"isOpen",void 0),n([L(),a("design:type",Object)],q.prototype,"isDesktop",void 0),q=n([l("accordion-panel")],q);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
|
+
${V}
|
|
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 Vt=class extends Dt{};Vt.styles=[Ut],Vt=n([l("md-radio")],Vt);let qt=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)],qt.prototype,"name",void 0),n([I({type:Boolean}),a("design:type",Object)],qt.prototype,"checked",void 0),n([I({type:Boolean}),a("design:type",Object)],qt.prototype,"disabled",void 0),n([I({type:Boolean}),a("design:type",Object)],qt.prototype,"error",void 0),qt=n([l("custom-radio")],qt);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
|
+
`}update(t){if(t.has("options")&&(this.filteredOptions=[...this.options]),t.has("defaultValue")||t.has("options")){const t=this.options.find((t=>"string"==typeof t?t===this.defaultValue:t.value===this.defaultValue));t&&(this.filterValue="string"==typeof t?t:t.label)}if(t.has("value")){const t=this.options.find((t=>"string"==typeof t?t===this.value:t.value===this.value));t&&(this.filterValue="string"==typeof t?t:t.label)}super.update(t)}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">
|
|
@@ -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,q as AccordionPanel,H as CarouselCard,K as Checkbox,Q as CustomModal,Z as CustomPopup,qt 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
|