@rededor/cura 1.8.2-alpha.0 → 2.0.0-alpha.4
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/cjs/{cura-accordion_20.cjs.entry.js → cura-accordion_21.cjs.entry.js} +1815 -20
- package/dist/cjs/cura-accordion_21.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-modal.cjs.entry.js +10 -2
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.entry.cjs.js.map +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/index-BK9MSAiE.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.css +1 -1
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js +24 -4
- package/dist/collection/components/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.js +30 -2
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/cura-modal/cura-modal.stories.js +10 -0
- package/dist/collection/components/cura-modal/cura-modal.stories.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +3 -148
- package/dist/collection/components/forms/cura-select/cura-select.js +103 -11
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select-options/cura-select-option.css +15 -0
- package/dist/components/cura-calendar.js +1 -1
- package/dist/components/cura-dropdown-search.js +25 -5
- package/dist/components/cura-dropdown-search.js.map +1 -1
- package/dist/components/cura-input-date.js +3 -3
- package/dist/components/cura-modal.js +11 -2
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-select-option.js +1 -1
- package/dist/components/cura-select.js +1 -1
- package/dist/components/p-CvdWbsfO.js +2147 -0
- package/dist/components/p-CvdWbsfO.js.map +1 -0
- package/dist/components/p-D1cPOZpG.js.map +1 -1
- package/dist/components/{p-BGnJiNyu.js → p-DETZu2ie.js} +4 -4
- package/dist/components/{p-BGnJiNyu.js.map → p-DETZu2ie.js.map} +1 -1
- package/dist/components/{p-DpIu_Oxz.js → p-Dt450DkQ.js} +3 -3
- package/dist/components/p-Dt450DkQ.js.map +1 -0
- package/dist/cura/cura-modal.entry.esm.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/p-2ab58335.entry.js +2 -0
- package/dist/cura/p-2ab58335.entry.js.map +1 -0
- package/dist/cura/p-5ed7ce95.entry.js +2 -0
- package/dist/cura/p-5ed7ce95.entry.js.map +1 -0
- package/dist/cura/p-PPMZr_VE.js.map +1 -1
- package/dist/esm/{cura-accordion_20.entry.js → cura-accordion_21.entry.js} +1815 -21
- package/dist/esm/cura-accordion_21.entry.js.map +1 -0
- package/dist/esm/cura-modal.entry.js +10 -2
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/index-OdKytJIH.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/cura-dropdown-search/cura-dropdown-search.d.ts +2 -0
- package/dist/types/components/cura-modal/cura-modal.d.ts +5 -0
- package/dist/types/components/cura-modal/cura-modal.stories.d.ts +11 -0
- package/dist/types/components/forms/cura-select/cura-select.d.ts +21 -0
- package/dist/types/components.d.ts +10 -0
- package/package.json +3 -2
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-card.cjs.entry.js +0 -81
- package/dist/cjs/cura-card.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-card.entry.cjs.js.map +0 -1
- package/dist/components/p-BTt-pVTn.js +0 -442
- package/dist/components/p-BTt-pVTn.js.map +0 -1
- package/dist/components/p-DpIu_Oxz.js.map +0 -1
- package/dist/cura/cura-card.entry.esm.js.map +0 -1
- package/dist/cura/p-d8aeca82.entry.js +0 -2
- package/dist/cura/p-d8aeca82.entry.js.map +0 -1
- package/dist/cura/p-deb0b764.entry.js +0 -2
- package/dist/cura/p-deb0b764.entry.js.map +0 -1
- package/dist/cura/p-df7cb250.entry.js +0 -2
- package/dist/cura/p-df7cb250.entry.js.map +0 -1
- package/dist/esm/cura-accordion_20.entry.js.map +0 -1
- package/dist/esm/cura-card.entry.js +0 -79
- package/dist/esm/cura-card.entry.js.map +0 -1
|
@@ -58,7 +58,7 @@ class FixedElementScrollBehavior {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
const curaDropdownSearchCss = ":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:0;left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}";
|
|
61
|
+
const curaDropdownSearchCss = ":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}";
|
|
62
62
|
|
|
63
63
|
const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdownSearch extends H {
|
|
64
64
|
constructor() {
|
|
@@ -136,6 +136,13 @@ const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdown
|
|
|
136
136
|
this.setZoomHeight();
|
|
137
137
|
}, this.resizeTimeoutMs);
|
|
138
138
|
};
|
|
139
|
+
this.handleVisualViewportChange = () => {
|
|
140
|
+
if (!this.zoomState)
|
|
141
|
+
return;
|
|
142
|
+
if (this.viewportTimeout)
|
|
143
|
+
clearTimeout(this.viewportTimeout);
|
|
144
|
+
this.viewportTimeout = setTimeout(() => this.setZoomHeight(), this.resizeTimeoutMs);
|
|
145
|
+
};
|
|
139
146
|
this.handleFocus = () => {
|
|
140
147
|
if (this.focusTimeout)
|
|
141
148
|
clearTimeout(this.focusTimeout);
|
|
@@ -234,6 +241,10 @@ const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdown
|
|
|
234
241
|
this.styles['--font-weight-medium'] = this.weights.medium;
|
|
235
242
|
window === null || window === void 0 ? void 0 : window.addEventListener('resize', this.handleWindowResize);
|
|
236
243
|
window === null || window === void 0 ? void 0 : window.addEventListener('orientationchange', this.handleWindowResize);
|
|
244
|
+
if (window === null || window === void 0 ? void 0 : window.visualViewport) {
|
|
245
|
+
window.visualViewport.addEventListener('resize', this.handleVisualViewportChange);
|
|
246
|
+
window.visualViewport.addEventListener('scroll', this.handleVisualViewportChange);
|
|
247
|
+
}
|
|
237
248
|
this.isMobile = checkMobile();
|
|
238
249
|
}
|
|
239
250
|
componentDidLoad() {
|
|
@@ -250,6 +261,10 @@ const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdown
|
|
|
250
261
|
removeAllListeners() {
|
|
251
262
|
window === null || window === void 0 ? void 0 : window.removeEventListener('resize', this.handleWindowResize);
|
|
252
263
|
window === null || window === void 0 ? void 0 : window.removeEventListener('orientationchange', this.handleWindowResize);
|
|
264
|
+
if (window === null || window === void 0 ? void 0 : window.visualViewport) {
|
|
265
|
+
window.visualViewport.removeEventListener('resize', this.handleVisualViewportChange);
|
|
266
|
+
window.visualViewport.removeEventListener('scroll', this.handleVisualViewportChange);
|
|
267
|
+
}
|
|
253
268
|
this.host.removeEventListener('actionclick', this.handleOptionActionClick);
|
|
254
269
|
this.host.removeEventListener('selectoption', this.handleSelectOption);
|
|
255
270
|
}
|
|
@@ -354,9 +369,14 @@ const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdown
|
|
|
354
369
|
setTimeout(() => { this.zoomState = false; }, 300);
|
|
355
370
|
}
|
|
356
371
|
setZoomHeight() {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
372
|
+
if (window === null || window === void 0 ? void 0 : window.visualViewport) {
|
|
373
|
+
const height = `${window.visualViewport.height}px`;
|
|
374
|
+
const topOffset = `${window.visualViewport.offsetTop}px`;
|
|
375
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--height': height, '--top-offset': topOffset });
|
|
376
|
+
return;
|
|
377
|
+
}
|
|
378
|
+
const h = window ? `${window.innerHeight}px` : '100vh';
|
|
379
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--height': h, '--top-offset': '0px' });
|
|
360
380
|
}
|
|
361
381
|
getClasses() {
|
|
362
382
|
return {
|
|
@@ -373,7 +393,7 @@ const CuraDropdownSearch$1 = /*@__PURE__*/ proxyCustomElement(class CuraDropdown
|
|
|
373
393
|
};
|
|
374
394
|
}
|
|
375
395
|
render() {
|
|
376
|
-
return (h(Host, { key: '
|
|
396
|
+
return (h(Host, { key: '6313c87b8faed7e0ddb00cf3fc40c4693712630d', style: this.getHostCSSProperties(), role: "search", "aria-label": this.label, "aria-required": this.required, "aria-disabled": this.disabled, "aria-expanded": this.zoomState }, h("div", { key: '5c052f24e62ee31aa83b4dfbfb0c0eccca506c03', class: this.getClasses(), style: this.styles }, h("div", { key: '8b71f51e5a49d8c84a623ae4ef75f22d2daff692', class: "component-controls" }, this.isMobile && this.zoomState ? (h("cura-button-transparent", { fontColor: "dark", onClick: () => this.handleBackClick(), iconName: "arrowLeft", size: "large", iconOnly: true, color: "primary", id: "button-back" })) : '', h("cura-input-text", { key: '96cf125a4c7f58a312ed6a45cd9dec62a279dc3b', disabled: this.disabled, label: this.label, part: "cura-input-field", mode: this.zoomState ? 'transparent' : 'default', required: this.required, iconName: this.icon || 'search', value: this.value, status: this.status, onValueChange: (ev) => this.handleInputValueChange(ev), onInput: (ev) => this._preventEvent(ev), onFocus: () => this.handleFocus(), onClick: (ev) => this._preventEvent(ev), onBlur: () => this.handleBlur(), onFocusout: () => this.handleFocusout(), onInputClear: (ev) => this.handleInputClear(ev), placeholder: this.placeholder, size: this.size, onKeyDown: (ev) => this.handleKeyDown(ev) }, h("slot", { key: 'e7ee08e0fb309f3931c82bfbcca9ff4f104f1397', name: "helperText" }))), h("div", { key: 'e9364997fcad9c019c3e20f7d46a6e6ab3e8462b', class: "dropdown-container", onMouseOver: () => this.handleDropdownMouseOver() }, h("slot", { key: '627eb3f588059c29194656d9e85fdfc2b9115804', onSlotchange: () => this.handleSlotChange() })))));
|
|
377
397
|
}
|
|
378
398
|
get host() { return this; }
|
|
379
399
|
static get style() { return curaDropdownSearchCss; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-dropdown-search.js","mappings":";;;;;;;MAEa,0BAA0B,CAAA;IAMrC,WAAY,CAAA,WAAgB,EAAE,iBAAsB,EAAA;AA4CpD,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,CAAQ,KAAI;AACnC,YAAA,IAAI,IAAI,CAAC,iBAAiB,CAAC,YAAY,IAAI,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAG;gBAC/E,CAAC,CAAC,cAAc,EAAE;;YAEpB,CAAC,CAAC,eAAe,EAAE;AACrB,SAAC;AAED,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,EAAS,KAAI;YAC5B,EAAE,CAAC,cAAc,EAAE;YACnB,EAAE,CAAC,eAAe,EAAE;AACtB,SAAC;AArDC,QAAA,IA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AAK,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EACxC,OAAO,EAAG,MAAM,IAAI,CAAC,WAAW,EAAE,EAClC,OAAO,EAAG,CAAC,EAAE,KAAK,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EACxC,MAAM,EAAG,MAAM,IAAI,CAAC,UAAU,EAAE,EAChC,UAAU,EAAG,MAAM,IAAI,CAAC,cAAc,EAAE,EACxC,YAAY,EAAG,CAAC,EAAE,KAAK,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC,EAChD,WAAW,EAAG,IAAI,CAAC,WAAW,EAC9B,IAAI,EAAG,IAAI,CAAC,IAAI,EAChB,SAAS,EAAG,CAAC,EAAE,KAAK,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAA,EAE1C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,YAAY,EAAA,CAAQ,CACf,CACd,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oBAAoB,EAAC,WAAW,EAAG,MAAM,IAAI,CAAC,uBAAuB,EAAE,EAAA,EAChF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAU,CAAA,CACxD,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraDropdownSearch","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/FixedElementScrollBehavior.ts","src/components/cura-dropdown-search/cura-dropdown-search.scss?tag=cura-dropdown-search&encapsulation=shadow","src/components/cura-dropdown-search/cura-dropdown-search.tsx"],"sourcesContent":["import { addBodyScrollLockClass, removeBodyScrollLockClass } from './utils';\n\nexport class FixedElementScrollBehavior {\n\n hostElement: any;\n scrollableElement: any;\n scrollPosition: number;\n\n constructor(hostElement: any, scrollableElement: any) {\n if( !hostElement || !scrollableElement ) {\n console.error(\"Componentes host ou scrollable não foram informados corretamente ou não existem.\");\n } else {\n this.hostElement = hostElement;\n this.scrollableElement = scrollableElement;\n }\n }\n\n disableScroll() {\n this.scrollPosition = window.scrollY;\n window.scrollTo({ top: 0, behavior: 'instant' });\n addBodyScrollLockClass();\n this._addEvents();\n }\n\n enableScroll() {\n removeBodyScrollLockClass();\n window.scrollTo({ top: this.scrollPosition, behavior: 'instant' });\n this._removeEvents();\n }\n\n _addEvents() {\n this.hostElement.addEventListener('wheel', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('mousewheel', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('touchmove', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('scroll', this._preventEvent, {passive: false});\n this.scrollableElement.addEventListener('wheel', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('mousewheel', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('touchmove', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('scroll', this._stopPropagationEvent, {passive: false});\n }\n\n _removeEvents() {\n this.hostElement.removeEventListener('wheel', this._preventEvent);\n this.hostElement.removeEventListener('mousewheel', this._preventEvent);\n this.hostElement.removeEventListener('touchmove', this._preventEvent);\n this.hostElement.removeEventListener('scroll', this._preventEvent);\n this.scrollableElement.removeEventListener('wheel', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('mousewheel', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('touchmove', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('scroll', this._stopPropagationEvent);\n }\n\n _stopPropagationEvent = (e: Event) => {\n if( this.scrollableElement.scrollHeight <= this.scrollableElement.clientHeight ) {\n e.preventDefault();\n }\n e.stopPropagation();\n }\n\n _preventEvent = (ev: Event) => {\n ev.preventDefault();\n ev.stopPropagation();\n }\n}","@import '../../scss/mixins/spacing.scss';\n@import '../../scss/mixins/shadows.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n position: relative;\n\n .component-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: #{$spacing-tiny};\n\n #button-back {\n padding: 0 0 0 #{$spacing-xxxs};\n width: max-content;\n }\n }\n\n .component-container {\n box-sizing: border-box;\n width: 100%;\n position: relative;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: min-content 1fr;\n\n &.zoom {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n background: var(--purewhite);\n height: var(--height);\n z-index: 9999;\n overscroll-behavior: contain;\n\n .component-controls {\n border-bottom: 2px solid var(--primary);\n padding: #{$spacing-xxxs} 0;\n }\n\n &.error .component-controls {\n border-bottom: 2px solid var(--error-dark);\n background-color: var(--error-lighter);\n }\n }\n\n .dropdown-container {\n box-sizing: border-box;\n width: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n padding: #{$spacing-xxxs};\n overscroll-behavior: contain;\n }\n\n &:not(.zoom) {\n .dropdown-container {\n @include shadow-level3(--neutral-black-shadow);\n position: absolute;\n bottom: 0;\n left: 0;\n transform: translateY(100%);\n max-height: var(--max-height);\n background-color: var(--purewhite);\n border-radius: 0px 0px #{$spacing-tiny} #{$spacing-tiny};\n border-bottom: 2px solid var(--neutral-light);\n border-left: 2px solid var(--neutral-light);\n border-right: 2px solid var(--neutral-light);\n display: none;\n z-index: 9997;\n }\n\n &.dropdown-visible {\n ::part(cura-input-field) {\n border-radius: 4px 4px 0px 0px;\n }\n ::part(cura-input-text-helper) {\n height: 0px;\n overflow: hidden;\n margin-top: 0px;\n }\n .dropdown-container {\n display: block;\n }\n }\n }\n\n }\n\n}\n","import { Component, Host, h, Prop, Element, State, Method, Event, EventEmitter } from '@stencil/core';\nimport { checkMobile, checkIOS } from '../../utils/utils';\nimport { FixedElementScrollBehavior } from '../../utils/FixedElementScrollBehavior';\n\n@Component({\n tag: 'cura-dropdown-search',\n styleUrl: 'cura-dropdown-search.scss',\n shadow: true,\n})\nexport class CuraDropdownSearch {\n @Element() host: HTMLElement;\n /**\n * Name of the field.\n * Required.\n */\n @Prop({ reflect: true }) name!: string;\n /**\n * Size of the dropdown search component\n * Values: 'small', 'medium' or 'large' (default).\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' | string = 'large';\n /**\n * Define component status.\n * Values: 'error' or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'default' | string = 'default';\n /**\n * Disabled state. Default: false.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Field is required. Default: false.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * The placeholder text.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n /**\n * The label.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Custom icon name. Default: search.\n */\n @Prop({ reflect: true }) icon: string = 'search';\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 400px\n */\n @Prop({ reflect: true }) maxheight: string = '400px';\n /**\n * Readonly property value.\n * Represents the term on the search input field.\n */\n @Prop({ mutable: true }) value: string = '';\n /**\n * Delay in milliseconds to dispatch search events.\n * Default: 400\n */\n @Prop({ reflect: true }) searchdelay: number = 400;\n /**\n * Min chars to dispatch search events.\n * Default: 3\n */\n @Prop({ reflect: true }) searchminchars: number = 3;\n\n /**\n * Set focus to input field.\n */\n @Method()\n async setFocus() {\n this.getInputElement().setFocus();\n }\n /**\n * Select by optionid property of a selectable option component.\n */\n @Method()\n async selectOption(optionid: string) {\n this._selectOption(optionid);\n }\n\n @Event() termchange: EventEmitter<string>;\n @Event() optionselect: EventEmitter<string>;\n\n @State() styles = {};\n @State() zoomState = false;\n @State() isOnFocus: boolean = false;\n\n scrollBehavior: FixedElementScrollBehavior;\n\n weights: any;\n breakpoints: any;\n isMobile: boolean;\n\n resizeTimeout: any;\n resizeTimeoutMs = 66;\n focusTimeout: any;\n focusTimeoutMs = 500;\n blurTimeout: any;\n blurTimeoutMs = 300;\n valueTimeout: any;\n\n dropdownElement: HTMLDivElement;\n selectedOptionElement: any;\n highlightedElement: any;\n highlightedIndex: number = -1;\n @State() dropdownItems = [];\n dropdownSelectableItems = [];\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.breakpoints = window.CuraAPI.theme.breakpoints.get();\n this.styles['--info'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--primary'] = window.CuraAPI.theme.colors.getColor('primary');\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n window?.addEventListener('resize', this.handleWindowResize);\n window?.addEventListener('orientationchange', this.handleWindowResize);\n this.isMobile = checkMobile();\n }\n\n componentDidLoad() {\n this.dropdownElement = this.host.shadowRoot?.querySelector('.dropdown-container');\n this.host.addEventListener('actionclick', this.handleOptionActionClick);\n this.host.addEventListener('selectoption', this.handleSelectOption);\n this.scrollBehavior = new FixedElementScrollBehavior(this.host, this.dropdownElement);\n setTimeout(() => this.getSlotElements(), 10);\n }\n\n disconnectedCallback() {\n this.removeAllListeners();\n }\n\n removeAllListeners() {\n window?.removeEventListener('resize', this.handleWindowResize);\n window?.removeEventListener('orientationchange', this.handleWindowResize);\n this.host.removeEventListener('actionclick', this.handleOptionActionClick);\n this.host.removeEventListener('selectoption', this.handleSelectOption);\n }\n\n handleSlotChange = () => { this.getSlotElements(); }\n\n handleWindowResize = () => {\n if (this.resizeTimeout) clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.isMobile = checkMobile();\n this.setZoomHeight();\n }, this.resizeTimeoutMs);\n }\n\n handleFocus = () => {\n if (this.focusTimeout) clearTimeout(this.focusTimeout);\n this.focusTimeout = setTimeout(() => {\n this.isOnFocus = true;\n this.clearHighlight();\n if (this.isMobile && !this.zoomState) this.enterZoom();\n if (this.zoomState) this.setZoomHeight();\n setTimeout(() => {\n this.selectedOptionElement?.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest'});\n }, 10);\n }, this.focusTimeoutMs);\n }\n\n handleBlur = () => {\n if (this.blurTimeout) clearTimeout(this.blurTimeout);\n this.blurTimeout = setTimeout(() => {\n if (this.zoomState) {\n const delay = checkIOS ? 500 : 100;\n setTimeout(() => this.setZoomHeight(), delay);\n }\n this.isOnFocus = false;\n }, this.blurTimeoutMs);\n }\n\n handleFocusout = () => {\n if( this.zoomState ) this.setZoomHeight();\n }\n\n handleBackClick = () => { this.exitZoom(); }\n\n handleOptionActionClick = (ev: CustomEvent) => {\n this.getInputElement().setFocus();\n this._preventEvent(ev);\n }\n\n handleInputClear = (ev: CustomEvent) => {\n this.setValue('');\n this.clearSelectedOptions();\n this._preventEvent(ev);\n }\n\n handleSelectOption = (ev: CustomEvent) => {\n this._selectOption(ev.detail);\n this._preventEvent(ev);\n }\n\n handleInputValueChange = (ev: CustomEvent) => {\n this.setValue(ev.detail);\n if( this.selectedOptionElement && ev.detail !== this.selectedOptionElement.value) {\n this.clearSelectedOptions();\n }\n this._preventEvent(ev);\n }\n\n handleDropdownMouseOver = () => {\n if( this.highlightedElement || this.highlightedIndex >= 0 ) this.clearHighlight();\n }\n\n handleKeyDown = (ev: KeyboardEvent) => {\n if( ev.key === 'ArrowDown' ) this.moveHighlight('next');\n if( ev.key === 'ArrowUp' ) this.moveHighlight('prev');\n if( ev.key === 'Enter' ) this.selectHighlight();\n }\n\n moveHighlight(direction: 'next' | 'prev') {\n if (!this.dropdownSelectableItems.length) return;\n let position = direction === 'next' ? this.highlightedIndex + 1 : this.highlightedIndex - 1;\n if( position < 0) {\n this.clearHighlight();\n return;\n }\n const selectableItemsLastPosition = this.dropdownSelectableItems.length - 1;\n if( position > selectableItemsLastPosition ) position = selectableItemsLastPosition;\n if( this.highlightedElement ) this.highlightedElement.highlighted = false;\n this.highlightedIndex = position;\n this.highlightedElement = this.dropdownSelectableItems[position];\n if( this.highlightedElement.selected ) {\n this.moveHighlight(direction);\n return;\n }\n this.highlightedElement.highlighted = true;\n this.highlightedElement.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest' });\n }\n\n clearHighlight() {\n if( this.highlightedElement ) {\n this.highlightedElement.highlighted = false;\n this.highlightedElement = null;\n }\n this.highlightedIndex = -1;\n }\n\n selectHighlight() {\n if( this.highlightedElement ) {\n this._selectOption(this.highlightedElement.optionid);\n this.clearHighlight();\n this.getInputElement().blur();\n }\n }\n\n setValue(value: string) {\n if (this.value !== value) {\n this.value = value;\n if( this.valueTimeout) clearTimeout(this.valueTimeout);\n this.valueTimeout = setTimeout(() => {\n this.termchange.emit(this.value === '' || this.value.length < this.searchminchars ? '' : this.value);\n }, this.searchdelay || 300);\n }\n }\n\n _selectOption(optionid: string) {\n if (!optionid) {\n this.clearSelectedOptions();\n this.setValue('');\n return;\n }\n const optionElement = this.dropdownSelectableItems.find(option => option.optionid === optionid);\n if( optionElement && !optionElement.selected ) {\n this.clearSelectedOptions();\n this.selectedOptionElement = optionElement;\n this.selectedOptionElement.selected = true;\n this.setValue(this.selectedOptionElement.value);\n this.optionselect.emit(this.selectedOptionElement.optionid);\n if (this.zoomState) setTimeout(() => this.exitZoom(), this.blurTimeoutMs);\n }\n }\n\n clearSelectedOptions() {\n this.dropdownSelectableItems.forEach(option => {\n if( option.selected ) option.selected = false;\n });\n this.selectedOptionElement = null;\n }\n\n getSlotElements() {\n const elements = [];\n const selectable = [];\n let hasNotFound = false;\n if( this.dropdownElement ) {\n this.dropdownElement\n .querySelector('slot')\n .assignedElements()\n .forEach(item => {\n elements.push(item);\n if( item.localName === 'cura-dropdown-search-option' && item[\"selectable\"] ) selectable.push(item);\n if( item.localName === 'cura-dropdown-search-not-found' ) hasNotFound = true;\n });\n }\n this.dropdownSelectableItems = selectable;\n this.dropdownItems = elements;\n this.status = hasNotFound ? 'error' : 'default';\n }\n\n\n enterZoom() {\n this.scrollBehavior.disableScroll();\n this.setZoomHeight();\n this.zoomState = true;\n }\n\n exitZoom() {\n this.scrollBehavior.enableScroll();\n this.setZoomHeight();\n setTimeout(() => { this.zoomState = false}, 300);\n }\n\n getInputElement = () => this.host.shadowRoot?.querySelector('cura-input-text');\n\n setZoomHeight() {\n const h = window ? `${window.visualViewport?.height || window.innerHeight}px` : '100vh';\n this.styles = { ...this.styles, '--height': h };\n }\n\n getClasses() {\n return {\n \"component-container\": true,\n \"mobile\": this.isMobile,\n \"zoom\": this.zoomState,\n \"dropdown-visible\": this.isOnFocus && (this.dropdownItems.length > 0 && !this.zoomState),\n \"error\": this.status === 'error'\n }\n }\n\n _preventEvent = (ev: Event) => {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n getHostCSSProperties() {\n return {\n '--max-height': this.maxheight || '400px'\n };\n }\n\n render() {\n return (\n <Host style={ this.getHostCSSProperties() }\n role=\"search\"\n aria-label={ this.label }\n aria-required={ this.required }\n aria-disabled={ this.disabled }\n aria-expanded={ this.zoomState }>\n <div class={ this.getClasses() } style={ this.styles }>\n <div class=\"component-controls\">\n { this.isMobile && this.zoomState ? (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={ () => this.handleBackClick() }\n iconName=\"arrowLeft\"\n size=\"large\"\n iconOnly\n color=\"primary\"\n id=\"button-back\">\n </cura-button-transparent>\n ) : '' }\n <cura-input-text\n disabled={ this.disabled }\n label={ this.label }\n part=\"cura-input-field\"\n mode={ this.zoomState ? 'transparent' : 'default' }\n required={ this.required }\n iconName={ this.icon || 'search' }\n value={ this.value }\n status={ this.status }\n onValueChange={ (ev) => this.handleInputValueChange(ev) }\n onInput={ (ev) => this._preventEvent(ev) }\n onFocus={ () => this.handleFocus() }\n onClick={ (ev) => this._preventEvent(ev) }\n onBlur={ () => this.handleBlur() }\n onFocusout={ () => this.handleFocusout() }\n onInputClear={ (ev) => this.handleInputClear(ev) }\n placeholder={ this.placeholder }\n size={ this.size }\n onKeyDown={ (ev) => this.handleKeyDown(ev) }\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div class=\"dropdown-container\" onMouseOver={ () => this.handleDropdownMouseOver() }>\n <slot onSlotchange={ () => this.handleSlotChange() }></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-dropdown-search.js","mappings":";;;;;;;MAEa,0BAA0B,CAAA;IAMrC,WAAY,CAAA,WAAgB,EAAE,iBAAsB,EAAA;AA4CpD,QAAA,IAAA,CAAA,qBAAqB,GAAG,CAAC,CAAQ,KAAI;AACnC,YAAA,IAAI,IAAI,CAAC,iBAAiB,CAAC,YAAY,IAAI,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAG;gBAC/E,CAAC,CAAC,cAAc,EAAE;;YAEpB,CAAC,CAAC,eAAe,EAAE;AACrB,SAAC;AAED,QAAA,IAAA,CAAA,aAAa,GAAG,CAAC,EAAS,KAAI;YAC5B,EAAE,CAAC,cAAc,EAAE;YACnB,EAAE,CAAC,eAAe,EAAE;AACtB,SAAC;AArDC,QAAA,IAAI,CAAC,WAAW,IAAI,CAAC,iBAAiB,EAAG;AACvC,YAAA,OAAO,CAAC,KAAK,CAAC,kFAAkF,CAAC;;aAC5F;AACL,YAAA,IAAI,CAAC,WAAW,GAAG,WAAW;AAC9B,YAAA,IAAI,CAAC,iBAAiB,GAAG,iBAAiB;;;IAI9C,aAAa,GAAA;AACX,QAAA,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO;AACpC,QAAA,MAAM,CAAC,QAAQ,CAAC,EA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G,IAAI,CAAC,IAAI,EAChB,SAAS,EAAG,CAAC,EAAE,KAAK,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAA,EAE1C,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,IAAI,EAAC,YAAY,EAAA,CAAQ,CACf,CACd,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,oBAAoB,EAAC,WAAW,EAAG,MAAM,IAAI,CAAC,uBAAuB,EAAE,EAAA,EAChF,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAM,YAAY,EAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,EAAU,CAAA,CACxD,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraDropdownSearch","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/utils/FixedElementScrollBehavior.ts","src/components/cura-dropdown-search/cura-dropdown-search.scss?tag=cura-dropdown-search&encapsulation=shadow","src/components/cura-dropdown-search/cura-dropdown-search.tsx"],"sourcesContent":["import { addBodyScrollLockClass, removeBodyScrollLockClass } from './utils';\n\nexport class FixedElementScrollBehavior {\n\n hostElement: any;\n scrollableElement: any;\n scrollPosition: number;\n\n constructor(hostElement: any, scrollableElement: any) {\n if( !hostElement || !scrollableElement ) {\n console.error(\"Componentes host ou scrollable não foram informados corretamente ou não existem.\");\n } else {\n this.hostElement = hostElement;\n this.scrollableElement = scrollableElement;\n }\n }\n\n disableScroll() {\n this.scrollPosition = window.scrollY;\n window.scrollTo({ top: 0, behavior: 'instant' });\n addBodyScrollLockClass();\n this._addEvents();\n }\n\n enableScroll() {\n removeBodyScrollLockClass();\n window.scrollTo({ top: this.scrollPosition, behavior: 'instant' });\n this._removeEvents();\n }\n\n _addEvents() {\n this.hostElement.addEventListener('wheel', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('mousewheel', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('touchmove', this._preventEvent, {passive: false});\n this.hostElement.addEventListener('scroll', this._preventEvent, {passive: false});\n this.scrollableElement.addEventListener('wheel', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('mousewheel', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('touchmove', this._stopPropagationEvent, {passive: false});\n this.scrollableElement.addEventListener('scroll', this._stopPropagationEvent, {passive: false});\n }\n\n _removeEvents() {\n this.hostElement.removeEventListener('wheel', this._preventEvent);\n this.hostElement.removeEventListener('mousewheel', this._preventEvent);\n this.hostElement.removeEventListener('touchmove', this._preventEvent);\n this.hostElement.removeEventListener('scroll', this._preventEvent);\n this.scrollableElement.removeEventListener('wheel', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('mousewheel', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('touchmove', this._stopPropagationEvent);\n this.scrollableElement.removeEventListener('scroll', this._stopPropagationEvent);\n }\n\n _stopPropagationEvent = (e: Event) => {\n if( this.scrollableElement.scrollHeight <= this.scrollableElement.clientHeight ) {\n e.preventDefault();\n }\n e.stopPropagation();\n }\n\n _preventEvent = (ev: Event) => {\n ev.preventDefault();\n ev.stopPropagation();\n }\n}","@import '../../scss/mixins/spacing.scss';\n@import '../../scss/mixins/shadows.scss';\n\n:host {\n display: block;\n box-sizing: border-box;\n position: relative;\n\n .component-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: #{$spacing-tiny};\n\n #button-back {\n padding: 0 0 0 #{$spacing-xxxs};\n width: max-content;\n }\n }\n\n .component-container {\n box-sizing: border-box;\n width: 100%;\n position: relative;\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: min-content 1fr;\n\n &.zoom {\n position: fixed;\n top: var(--top-offset, 0);\n left: 0;\n width: 100vw;\n background: var(--purewhite);\n height: var(--height);\n z-index: 9999;\n overscroll-behavior: contain;\n\n .component-controls {\n border-bottom: 2px solid var(--primary);\n padding: #{$spacing-xxxs} 0;\n }\n\n &.error .component-controls {\n border-bottom: 2px solid var(--error-dark);\n background-color: var(--error-lighter);\n }\n }\n\n .dropdown-container {\n box-sizing: border-box;\n width: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n display: flex;\n flex-direction: column;\n padding: #{$spacing-xxxs};\n overscroll-behavior: contain;\n }\n\n &:not(.zoom) {\n .dropdown-container {\n @include shadow-level3(--neutral-black-shadow);\n position: absolute;\n bottom: 0;\n left: 0;\n transform: translateY(100%);\n max-height: var(--max-height);\n background-color: var(--purewhite);\n border-radius: 0px 0px #{$spacing-tiny} #{$spacing-tiny};\n border-bottom: 2px solid var(--neutral-light);\n border-left: 2px solid var(--neutral-light);\n border-right: 2px solid var(--neutral-light);\n display: none;\n z-index: 9997;\n }\n\n &.dropdown-visible {\n ::part(cura-input-field) {\n border-radius: 4px 4px 0px 0px;\n }\n ::part(cura-input-text-helper) {\n height: 0px;\n overflow: hidden;\n margin-top: 0px;\n }\n .dropdown-container {\n display: block;\n }\n }\n }\n\n }\n\n}\n","import { Component, Host, h, Prop, Element, State, Method, Event, EventEmitter } from '@stencil/core';\nimport { checkMobile, checkIOS } from '../../utils/utils';\nimport { FixedElementScrollBehavior } from '../../utils/FixedElementScrollBehavior';\n\n@Component({\n tag: 'cura-dropdown-search',\n styleUrl: 'cura-dropdown-search.scss',\n shadow: true,\n})\nexport class CuraDropdownSearch {\n @Element() host: HTMLElement;\n /**\n * Name of the field.\n * Required.\n */\n @Prop({ reflect: true }) name!: string;\n /**\n * Size of the dropdown search component\n * Values: 'small', 'medium' or 'large' (default).\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' | string = 'large';\n /**\n * Define component status.\n * Values: 'error' or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'default' | string = 'default';\n /**\n * Disabled state. Default: false.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n /**\n * Field is required. Default: false.\n */\n @Prop({ reflect: true }) required: boolean = false;\n /**\n * The placeholder text.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n /**\n * The label.\n */\n @Prop({ reflect: true }) label: string = '';\n /**\n * Custom icon name. Default: search.\n */\n @Prop({ reflect: true }) icon: string = 'search';\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 400px\n */\n @Prop({ reflect: true }) maxheight: string = '400px';\n /**\n * Readonly property value.\n * Represents the term on the search input field.\n */\n @Prop({ mutable: true }) value: string = '';\n /**\n * Delay in milliseconds to dispatch search events.\n * Default: 400\n */\n @Prop({ reflect: true }) searchdelay: number = 400;\n /**\n * Min chars to dispatch search events.\n * Default: 3\n */\n @Prop({ reflect: true }) searchminchars: number = 3;\n\n /**\n * Set focus to input field.\n */\n @Method()\n async setFocus() {\n this.getInputElement().setFocus();\n }\n /**\n * Select by optionid property of a selectable option component.\n */\n @Method()\n async selectOption(optionid: string) {\n this._selectOption(optionid);\n }\n\n @Event() termchange: EventEmitter<string>;\n @Event() optionselect: EventEmitter<string>;\n\n @State() styles = {};\n @State() zoomState = false;\n @State() isOnFocus: boolean = false;\n\n scrollBehavior: FixedElementScrollBehavior;\n\n weights: any;\n breakpoints: any;\n isMobile: boolean;\n\n resizeTimeout: any;\n resizeTimeoutMs = 66;\n focusTimeout: any;\n focusTimeoutMs = 500;\n blurTimeout: any;\n blurTimeoutMs = 300;\n valueTimeout: any;\n viewportTimeout: any;\n\n dropdownElement: HTMLDivElement;\n selectedOptionElement: any;\n highlightedElement: any;\n highlightedIndex: number = -1;\n @State() dropdownItems = [];\n dropdownSelectableItems = [];\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.breakpoints = window.CuraAPI.theme.breakpoints.get();\n this.styles['--info'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--primary'] = window.CuraAPI.theme.colors.getColor('primary');\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n window?.addEventListener('resize', this.handleWindowResize);\n window?.addEventListener('orientationchange', this.handleWindowResize);\n if (window?.visualViewport) {\n window.visualViewport.addEventListener('resize', this.handleVisualViewportChange);\n window.visualViewport.addEventListener('scroll', this.handleVisualViewportChange);\n }\n this.isMobile = checkMobile();\n }\n\n componentDidLoad() {\n this.dropdownElement = this.host.shadowRoot?.querySelector('.dropdown-container');\n this.host.addEventListener('actionclick', this.handleOptionActionClick);\n this.host.addEventListener('selectoption', this.handleSelectOption);\n this.scrollBehavior = new FixedElementScrollBehavior(this.host, this.dropdownElement);\n setTimeout(() => this.getSlotElements(), 10);\n }\n\n disconnectedCallback() {\n this.removeAllListeners();\n }\n\n removeAllListeners() {\n window?.removeEventListener('resize', this.handleWindowResize);\n window?.removeEventListener('orientationchange', this.handleWindowResize);\n if (window?.visualViewport) {\n window.visualViewport.removeEventListener('resize', this.handleVisualViewportChange);\n window.visualViewport.removeEventListener('scroll', this.handleVisualViewportChange);\n }\n this.host.removeEventListener('actionclick', this.handleOptionActionClick);\n this.host.removeEventListener('selectoption', this.handleSelectOption);\n }\n\n handleSlotChange = () => { this.getSlotElements(); }\n\n handleWindowResize = () => {\n if (this.resizeTimeout) clearTimeout(this.resizeTimeout);\n this.resizeTimeout = setTimeout(() => {\n this.isMobile = checkMobile();\n this.setZoomHeight();\n }, this.resizeTimeoutMs);\n }\n\n handleVisualViewportChange = () => {\n if (!this.zoomState) return;\n if (this.viewportTimeout) clearTimeout(this.viewportTimeout);\n this.viewportTimeout = setTimeout(() => this.setZoomHeight(), this.resizeTimeoutMs);\n }\n\n handleFocus = () => {\n if (this.focusTimeout) clearTimeout(this.focusTimeout);\n this.focusTimeout = setTimeout(() => {\n this.isOnFocus = true;\n this.clearHighlight();\n if (this.isMobile && !this.zoomState) this.enterZoom();\n if (this.zoomState) this.setZoomHeight();\n setTimeout(() => {\n this.selectedOptionElement?.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest'});\n }, 10);\n }, this.focusTimeoutMs);\n }\n\n handleBlur = () => {\n if (this.blurTimeout) clearTimeout(this.blurTimeout);\n this.blurTimeout = setTimeout(() => {\n if (this.zoomState) {\n const delay = checkIOS ? 500 : 100;\n setTimeout(() => this.setZoomHeight(), delay);\n }\n this.isOnFocus = false;\n }, this.blurTimeoutMs);\n }\n\n handleFocusout = () => {\n if( this.zoomState ) this.setZoomHeight();\n }\n\n handleBackClick = () => { this.exitZoom(); }\n\n handleOptionActionClick = (ev: CustomEvent) => {\n this.getInputElement().setFocus();\n this._preventEvent(ev);\n }\n\n handleInputClear = (ev: CustomEvent) => {\n this.setValue('');\n this.clearSelectedOptions();\n this._preventEvent(ev);\n }\n\n handleSelectOption = (ev: CustomEvent) => {\n this._selectOption(ev.detail);\n this._preventEvent(ev);\n }\n\n handleInputValueChange = (ev: CustomEvent) => {\n this.setValue(ev.detail);\n if( this.selectedOptionElement && ev.detail !== this.selectedOptionElement.value) {\n this.clearSelectedOptions();\n }\n this._preventEvent(ev);\n }\n\n handleDropdownMouseOver = () => {\n if( this.highlightedElement || this.highlightedIndex >= 0 ) this.clearHighlight();\n }\n\n handleKeyDown = (ev: KeyboardEvent) => {\n if( ev.key === 'ArrowDown' ) this.moveHighlight('next');\n if( ev.key === 'ArrowUp' ) this.moveHighlight('prev');\n if( ev.key === 'Enter' ) this.selectHighlight();\n }\n\n moveHighlight(direction: 'next' | 'prev') {\n if (!this.dropdownSelectableItems.length) return;\n let position = direction === 'next' ? this.highlightedIndex + 1 : this.highlightedIndex - 1;\n if( position < 0) {\n this.clearHighlight();\n return;\n }\n const selectableItemsLastPosition = this.dropdownSelectableItems.length - 1;\n if( position > selectableItemsLastPosition ) position = selectableItemsLastPosition;\n if( this.highlightedElement ) this.highlightedElement.highlighted = false;\n this.highlightedIndex = position;\n this.highlightedElement = this.dropdownSelectableItems[position];\n if( this.highlightedElement.selected ) {\n this.moveHighlight(direction);\n return;\n }\n this.highlightedElement.highlighted = true;\n this.highlightedElement.scrollIntoView({behavior: 'instant', block: 'nearest', inline: 'nearest' });\n }\n\n clearHighlight() {\n if( this.highlightedElement ) {\n this.highlightedElement.highlighted = false;\n this.highlightedElement = null;\n }\n this.highlightedIndex = -1;\n }\n\n selectHighlight() {\n if( this.highlightedElement ) {\n this._selectOption(this.highlightedElement.optionid);\n this.clearHighlight();\n this.getInputElement().blur();\n }\n }\n\n setValue(value: string) {\n if (this.value !== value) {\n this.value = value;\n if( this.valueTimeout) clearTimeout(this.valueTimeout);\n this.valueTimeout = setTimeout(() => {\n this.termchange.emit(this.value === '' || this.value.length < this.searchminchars ? '' : this.value);\n }, this.searchdelay || 300);\n }\n }\n\n _selectOption(optionid: string) {\n if (!optionid) {\n this.clearSelectedOptions();\n this.setValue('');\n return;\n }\n const optionElement = this.dropdownSelectableItems.find(option => option.optionid === optionid);\n if( optionElement && !optionElement.selected ) {\n this.clearSelectedOptions();\n this.selectedOptionElement = optionElement;\n this.selectedOptionElement.selected = true;\n this.setValue(this.selectedOptionElement.value);\n this.optionselect.emit(this.selectedOptionElement.optionid);\n if (this.zoomState) setTimeout(() => this.exitZoom(), this.blurTimeoutMs);\n }\n }\n\n clearSelectedOptions() {\n this.dropdownSelectableItems.forEach(option => {\n if( option.selected ) option.selected = false;\n });\n this.selectedOptionElement = null;\n }\n\n getSlotElements() {\n const elements = [];\n const selectable = [];\n let hasNotFound = false;\n if( this.dropdownElement ) {\n this.dropdownElement\n .querySelector('slot')\n .assignedElements()\n .forEach(item => {\n elements.push(item);\n if( item.localName === 'cura-dropdown-search-option' && item[\"selectable\"] ) selectable.push(item);\n if( item.localName === 'cura-dropdown-search-not-found' ) hasNotFound = true;\n });\n }\n this.dropdownSelectableItems = selectable;\n this.dropdownItems = elements;\n this.status = hasNotFound ? 'error' : 'default';\n }\n\n\n enterZoom() {\n this.scrollBehavior.disableScroll();\n this.setZoomHeight();\n this.zoomState = true;\n }\n\n exitZoom() {\n this.scrollBehavior.enableScroll();\n this.setZoomHeight();\n setTimeout(() => { this.zoomState = false}, 300);\n }\n\n getInputElement = () => this.host.shadowRoot?.querySelector('cura-input-text');\n\n setZoomHeight() {\n if (window?.visualViewport) {\n const height = `${window.visualViewport.height}px`;\n const topOffset = `${window.visualViewport.offsetTop}px`;\n this.styles = { ...this.styles, '--height': height, '--top-offset': topOffset };\n return;\n }\n const h = window ? `${window.innerHeight}px` : '100vh';\n this.styles = { ...this.styles, '--height': h, '--top-offset': '0px' };\n }\n\n getClasses() {\n return {\n \"component-container\": true,\n \"mobile\": this.isMobile,\n \"zoom\": this.zoomState,\n \"dropdown-visible\": this.isOnFocus && (this.dropdownItems.length > 0 && !this.zoomState),\n \"error\": this.status === 'error'\n }\n }\n\n _preventEvent = (ev: Event) => {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n getHostCSSProperties() {\n return {\n '--max-height': this.maxheight || '400px'\n };\n }\n\n render() {\n return (\n <Host style={ this.getHostCSSProperties() }\n role=\"search\"\n aria-label={ this.label }\n aria-required={ this.required }\n aria-disabled={ this.disabled }\n aria-expanded={ this.zoomState }>\n <div class={ this.getClasses() } style={ this.styles }>\n <div class=\"component-controls\">\n { this.isMobile && this.zoomState ? (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={ () => this.handleBackClick() }\n iconName=\"arrowLeft\"\n size=\"large\"\n iconOnly\n color=\"primary\"\n id=\"button-back\">\n </cura-button-transparent>\n ) : '' }\n <cura-input-text\n disabled={ this.disabled }\n label={ this.label }\n part=\"cura-input-field\"\n mode={ this.zoomState ? 'transparent' : 'default' }\n required={ this.required }\n iconName={ this.icon || 'search' }\n value={ this.value }\n status={ this.status }\n onValueChange={ (ev) => this.handleInputValueChange(ev) }\n onInput={ (ev) => this._preventEvent(ev) }\n onFocus={ () => this.handleFocus() }\n onClick={ (ev) => this._preventEvent(ev) }\n onBlur={ () => this.handleBlur() }\n onFocusout={ () => this.handleFocusout() }\n onInputClear={ (ev) => this.handleInputClear(ev) }\n placeholder={ this.placeholder }\n size={ this.size }\n onKeyDown={ (ev) => this.handleKeyDown(ev) }\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div class=\"dropdown-container\" onMouseOver={ () => this.handleDropdownMouseOver() }>\n <slot onSlotchange={ () => this.handleSlotChange() }></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, e as createEvent, h, d as Host } from './p-D1cPOZpG.js';
|
|
2
2
|
import { d as defineCustomElement$9 } from './p-BRDqwZ4N.js';
|
|
3
|
-
import { i as isBefore, a as isAfter, d as defineCustomElement$8 } from './p-
|
|
3
|
+
import { i as isBefore, a as isAfter, d as defineCustomElement$8 } from './p-DETZu2ie.js';
|
|
4
4
|
import { d as defineCustomElement$7 } from './p-B5aO1chh.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './p-CgMS6FUK.js';
|
|
6
6
|
import { d as defineCustomElement$5 } from './p-DR1RHrEX.js';
|
|
7
7
|
import { d as defineCustomElement$4 } from './p-Dqm2sAwv.js';
|
|
8
|
-
import { d as defineCustomElement$3 } from './p-
|
|
9
|
-
import { d as defineCustomElement$2 } from './p-
|
|
8
|
+
import { d as defineCustomElement$3 } from './p-CvdWbsfO.js';
|
|
9
|
+
import { d as defineCustomElement$2 } from './p-Dt450DkQ.js';
|
|
10
10
|
|
|
11
11
|
const curaInputDateCss = ":host{display:block}.container{display:flex;flex-direction:column;position:relative}.container .calendar{padding:0px calc(var(--cura-spacing-base) * 3px);margin-top:-8px;border-radius:0px 0px 4px 4px;border-top:0px;border-right:2px solid #D4D4D4;border-bottom:2px solid #D4D4D4;border-left:2px solid #D4D4D4;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;top:100%;z-index:10;display:none;opacity:0;pointer-events:none}.container .calendar.visible{box-sizing:border-box;display:block;opacity:1;pointer-events:all;width:100%;background-color:#fff}";
|
|
12
12
|
|
|
@@ -47,6 +47,11 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends H {
|
|
|
47
47
|
* Default: Fechar
|
|
48
48
|
*/
|
|
49
49
|
this.mobileCloseLabel = 'Fechar';
|
|
50
|
+
/**
|
|
51
|
+
* Controls whether the modal can be closed. When false, hides all close buttons and prevents closing via backdrop click or ESC key.
|
|
52
|
+
* Default: true
|
|
53
|
+
*/
|
|
54
|
+
this.canClose = true;
|
|
50
55
|
/**
|
|
51
56
|
* Property zindex to control the z-index value of the component.
|
|
52
57
|
* Default: 100
|
|
@@ -54,13 +59,16 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends H {
|
|
|
54
59
|
this.zindex = '100';
|
|
55
60
|
this.styles = {};
|
|
56
61
|
this.handleCloseOnEsc = (evt) => {
|
|
57
|
-
if (evt.key !== 'Escape' || !this.open) {
|
|
62
|
+
if (evt.key !== 'Escape' || !this.open || !this.canClose) {
|
|
58
63
|
return;
|
|
59
64
|
}
|
|
60
65
|
this.open = false;
|
|
61
66
|
this.modalClose.emit();
|
|
62
67
|
};
|
|
63
68
|
this.handleClose = () => {
|
|
69
|
+
if (!this.canClose) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
64
72
|
this.modalClose.emit();
|
|
65
73
|
this.open = false;
|
|
66
74
|
};
|
|
@@ -102,7 +110,7 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends H {
|
|
|
102
110
|
window.addEventListener('keydown', this.handleCloseOnEsc);
|
|
103
111
|
}
|
|
104
112
|
render() {
|
|
105
|
-
return (h(Host, { key: '
|
|
113
|
+
return (h(Host, { key: 'a6f81dd34ff6bea8c00a6ea08ba2967d8b37890b', role: "dialog", "aria-modal": "true", style: { '--zIndex': this.zindex } }, h("div", { key: '87c8a89c0ae261fd6d8ed8259ed4a18b92a6bf55', class: this.open ? 'modal container open' : 'modal container', style: this.styles }, h("div", { key: '1377054aaf87f31e2f27a32b813f21a3227a0679', class: this.open ? 'modal backdrop open' : 'modal backdrop', onClick: this.canClose ? this.handleClose : undefined }), h("div", { key: 'b8764e38f17fc18f6390b1454f73adc5b0f28024', class: "wrapper" }, this.canClose && (h("div", { key: 'e3b741e2885d879368b041c0da3ffa8ff1f6b1c4', class: "close desktop" }, h("cura-button-transparent", { key: '5c85f8cb21415741e3af4ab8833b031597faed50', iconName: "close", color: "error", size: "small", onClick: this.handleClose, iconOnly: true }))), h("slot", { key: 'fd0b51474b2fc973ad1dd6b626f42726e0972afb' }), this.canClose && (h("div", { key: 'da7b3e03af84967a38f398cde77495d6baa8af35', class: "close mobile", onClick: this.handleClose }, h("cura-button-transparent", { key: 'd95e7ed4963e6ad678dca0b23e5fdfb609dc7f6f', color: "error", iconName: "close", size: "small" }, this.mobileCloseLabel)))))));
|
|
106
114
|
}
|
|
107
115
|
static get watchers() { return {
|
|
108
116
|
"background": ["setColors"],
|
|
@@ -120,6 +128,7 @@ const CuraModal$1 = /*@__PURE__*/ proxyCustomElement(class CuraModal extends H {
|
|
|
120
128
|
"left": [2],
|
|
121
129
|
"right": [2],
|
|
122
130
|
"mobileCloseLabel": [513, "mobile-close-label"],
|
|
131
|
+
"canClose": [516, "can-close"],
|
|
123
132
|
"zindex": [513],
|
|
124
133
|
"styles": [32]
|
|
125
134
|
}, undefined, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"cura-modal.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,wpEAAw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B,CAC/H,EACN,CAAa,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,EAEb,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAA,EACjD,CAAyB,CAAA,yBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,OAAO,EAAC,QAAQ,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EACjE,EAAA,IAAI,CAAC,gBAAgB,CACE,CACtB,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraModal","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.handleClose}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n <slot></slot>\n {/* Mobile button */}\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"cura-modal.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,wpEAAwpE;;MCOhqEA,WAAS,iBAAAC,kBAAA,CAAA,MAAA,SAAA,SAAAC,CAAA,CAAA;AALtB,IAAA,WAAA,GAAA;;;;;AAME;;;AAGG;AACqC,QAAA,IAAI,CAAA,IAAA,GAAa,KAAK;AAC9D;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAsB,OAAO;AAC/C;;;AAGG;AACK,QAAA,IAAG,CAAA,GAAA,GAAY,CAAC;AACxB;;;AAGG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,CAAC;AAC3B;;;AAGG;AACK,QAAA,IAAI,CAAA,IAAA,GAAY,CAAC;AACzB;;;AAGG;AACK,QAAA,IAAK,CAAA,KAAA,GAAY,CAAC;AAC1B;;;AAGG;AACsB,QAAA,IAAgB,CAAA,gBAAA,GAAW,QAAQ;AAC5D;;;AAGG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,IAAI;AACjD;;;AAGG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAW,KAAK;AAMtC,QAAA,IAAM,CAAA,MAAA,GAAG,EAAE;AA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["CuraModal","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/cura-modal/cura-modal.scss?tag=cura-modal&encapsulation=shadow","src/components/cura-modal/cura-modal.tsx"],"sourcesContent":["@import '../../../src/scss/mixins/spacing.scss';\n@import '../../../src/scss/mixins/shadows.scss';\n@import '../../../src/scss/mixins/responsive.scss';\n@import '../../../src/scss/mixins/animations.scss';\n\n:host {\n display: block;\n}\n\n.modal {\n position: fixed;\n height: 100%;\n width: 100%;\n top: var(--top-offset);\n bottom: var(--bottom-offset);\n left: var(--left-offset);\n right: var(--right-offset);\n z-index: -1;\n margin-top: var(--offset-top);\n\n &.open {\n z-index: var(--zIndex);\n\n .backdrop,\n .wrapper {\n opacity: 1;\n visibility: visible;\n animation: fadeIn 0.3s ease-out;\n }\n }\n}\n\n.container {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.backdrop,\n.wrapper {\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n}\n\n.backdrop {\n background-color: var(--background-color);\n z-index: calc(var(--zIndex) - 10);\n animation: fadeIn 0.3s ease-out;\n}\n\n.wrapper {\n position: fixed;\n background-color: var(--neutral-purewhite);\n border: 2px solid var(--neutral-light);\n border-radius: #{$spacing-xxxs};\n max-width: 600px;\n min-width: 200px;\n padding: calc(#{$spacing-tiny} / 2) #{$spacing-xxs} #{$spacing-xxs} #{$spacing-xxs};\n z-index: var(--zIndex);\n\n @include shadow-level4();\n\n transform: scale(0.95);\n transition: transform 0.3s ease-out, opacity 0.3s ease, visibility 0.3s ease;\n\n ::slotted(*) {\n max-height: 80vh;\n overflow: auto;\n padding-right: #{$spacing-xs};\n }\n}\n\n.modal.open .wrapper {\n transform: scale(1);\n opacity: 1;\n visibility: visible;\n}\n\n.close {\n justify-self: flex-end;\n padding-top: #{$spacing-xxs};\n background: none;\n border: none;\n cursor: pointer;\n\n &.mobile {\n display: none;\n }\n\n &.desktop {\n display: flex;\n padding: 0;\n margin-right: -8px;\n }\n}\n\n@include mobile-only() {\n .wrapper {\n position: fixed;\n bottom: #{$spacing-none};\n width: 80%;\n padding-top: #{$spacing-xxs};\n padding-bottom: #{$spacing-none};\n border-radius: #{$spacing-xxxs} #{$spacing-xxxs} #{$spacing-none} #{$spacing-none};\n border-bottom: none;\n }\n\n .close {\n align-items: center;\n border-top: 1px dashed var(--neutral-light);\n margin-top: #{$spacing-xxs};\n padding: #{$spacing-mini} #{$spacing-none};\n justify-content: center;\n width: 100%;\n\n &.mobile {\n display: flex;\n gap: #{$spacing-mini};\n }\n\n &.desktop {\n display: none;\n }\n }\n}\n\n@include fadeIn();\n@include fadeOut();\n","import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-modal',\n styleUrl: 'cura-modal.scss',\n shadow: true,\n})\nexport class CuraModal {\n /**\n * Property open to control modal visibility.\n * Default: false\n */\n @Prop({ mutable: true, reflect: true }) open?: boolean = false;\n /**\n * Property background to control modal backdrop color.\n * Default: light\n */\n @Prop() background?: 'dark' | 'light' = 'light';\n /**\n * Property top to control modal top position.\n * Default: 0px\n */\n @Prop() top?: number = 0;\n /**\n * Property bottom to control modal bottom position.\n * Default: 0px\n */\n @Prop() bottom?: number = 0;\n /**\n * Property left to control modal left position.\n * Default: 0px\n */\n @Prop() left?: number = 0;\n /**\n * Property right to control modal right position.\n * Default: 0px\n */\n @Prop() right?: number = 0;\n /**\n * Defines the label for the close button when the modal is viewed on mobile.\n * Default: Fechar\n */\n @Prop({ reflect: true }) mobileCloseLabel: string = 'Fechar';\n /**\n * Controls whether the modal can be closed. When false, hides all close buttons and prevents closing via backdrop click or ESC key.\n * Default: true\n */\n @Prop({ reflect: true }) canClose: boolean = true;\n /**\n * Property zindex to control the z-index value of the component.\n * Default: 100\n */\n @Prop({ reflect: true }) zindex: string = '100';\n /**\n * Event close to handle modal close.\n */\n @Event({ eventName: 'modalClose' }) modalClose: EventEmitter<void>;\n\n @State() styles = {};\n\n @Watch('background')\n setColors() {\n const backgroundTheme = {\n dark: window.CuraAPI.theme.colors.getColor('neutral-black', 0.4),\n light: window.CuraAPI.theme.colors.getColor('primary-darker', 0.8),\n };\n\n this.styles = {\n ...this.styles,\n '--background-color': backgroundTheme[this.background],\n };\n }\n\n setOffset(name: string, value: number) {\n this.styles = {\n ...this.styles,\n [`--${name}-offset`]: `${value}px`,\n };\n }\n\n @Watch('top')\n setTop() {\n this.setOffset('top', this.top);\n }\n\n @Watch('bottom')\n setBottom() {\n this.setOffset('bottom', this.bottom);\n }\n\n @Watch('left')\n setLeft() {\n this.setOffset('left', this.left);\n }\n\n @Watch('right')\n setRight() {\n this.setOffset('right', this.right);\n }\n\n handleCloseOnEsc = (evt: KeyboardEvent) => {\n if (evt.key !== 'Escape' || !this.open || !this.canClose) {\n return;\n }\n\n this.open = false;\n this.modalClose.emit();\n };\n\n connectedCallback() {\n this.styles = {\n ...this.styles,\n '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'),\n '--neutral-light': window.CuraAPI.theme.colors.getColor('neutral-light'),\n '--base-spacing': window.CuraAPI.theme.spacing.getSpacing(),\n };\n this.setColors();\n this.setTop();\n this.setBottom();\n this.setLeft();\n this.setRight();\n }\n\n private handleClose = () => {\n if (!this.canClose) {\n return;\n }\n this.modalClose.emit();\n this.open = false;\n };\n\n disconnectedCallback() {\n window.removeEventListener('keydown', this.handleCloseOnEsc);\n }\n\n componentDidLoad() {\n window.addEventListener('keydown', this.handleCloseOnEsc);\n }\n\n render() {\n return (\n <Host role=\"dialog\" aria-modal=\"true\" style={{ '--zIndex': this.zindex }}>\n <div class={this.open ? 'modal container open' : 'modal container'} style={this.styles}>\n <div class={this.open ? 'modal backdrop open' : 'modal backdrop'} onClick={this.canClose ? this.handleClose : undefined}></div>\n <div class=\"wrapper\">\n {/* Desktop button */}\n {this.canClose && (\n <div class=\"close desktop\">\n <cura-button-transparent iconName=\"close\" color=\"error\" size=\"small\" onClick={this.handleClose} iconOnly></cura-button-transparent>\n </div>\n )}\n <slot></slot>\n {/* Mobile button */}\n {this.canClose && (\n <div class=\"close mobile\" onClick={this.handleClose}>\n <cura-button-transparent color=\"error\" iconName=\"close\" size=\"small\">\n {this.mobileCloseLabel}\n </cura-button-transparent>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CuraSelectOption$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { C as CuraSelectOption$1, d as defineCustomElement$1 } from './p-Dt450DkQ.js';
|
|
2
2
|
|
|
3
3
|
const CuraSelectOption = CuraSelectOption$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|