@dropi/ui 0.1.43 → 0.1.45
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/dropi-button.cjs.entry.js +19 -2
- package/dist/cjs/dropi-checkbox.cjs.entry.js +23 -2
- package/dist/cjs/dropi-country-selector.cjs.entry.js +15 -2
- package/dist/cjs/dropi-date-picker.cjs.entry.js +40 -4
- package/dist/cjs/dropi-input_3.cjs.entry.js +3 -3
- package/dist/cjs/dropi-otp-send-code.cjs.entry.js +22 -2
- package/dist/cjs/dropi-phone-input.cjs.entry.js +25 -2
- package/dist/cjs/dropi-radio-button.cjs.entry.js +18 -1
- package/dist/cjs/dropi-select.cjs.entry.js +1 -1
- package/dist/cjs/dropi-switch.cjs.entry.js +22 -1
- package/dist/cjs/dropi-text-area.cjs.entry.js +3 -3
- package/dist/cjs/dropi-ui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/dropi-button/dropi-button.js +39 -2
- package/dist/collection/components/dropi-checkbox/dropi-checkbox.js +38 -2
- package/dist/collection/components/dropi-country-selector/dropi-country-selector.js +29 -2
- package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +55 -4
- package/dist/collection/components/dropi-input/dropi-input.js +4 -4
- package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +36 -2
- package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +39 -2
- package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +13 -2
- package/dist/collection/components/dropi-select/dropi-select.js +2 -2
- package/dist/collection/components/dropi-switch/dropi-switch.js +37 -1
- package/dist/collection/components/dropi-text-area/dropi-text-area.js +4 -4
- package/dist/components/dropi-alert-modal.js +1 -1
- package/dist/components/dropi-button.js +1 -1
- package/dist/components/dropi-card-checkbox.js +1 -1
- package/dist/components/dropi-card-section.js +1 -1
- package/dist/components/dropi-checkbox-selection-list.js +1 -1
- package/dist/components/dropi-checkbox.js +1 -1
- package/dist/components/dropi-country-selector.js +1 -1
- package/dist/components/dropi-date-picker.js +1 -1
- package/dist/components/dropi-dropdown.js +1 -1
- package/dist/components/dropi-empty-state.js +1 -1
- package/dist/components/dropi-file-upload.js +1 -1
- package/dist/components/dropi-input.js +1 -1
- package/dist/components/dropi-otp-send-code.js +1 -1
- package/dist/components/dropi-phone-input.js +1 -1
- package/dist/components/dropi-radio-button.js +1 -1
- package/dist/components/dropi-search.js +1 -1
- package/dist/components/dropi-select.js +1 -1
- package/dist/components/dropi-switch.js +1 -1
- package/dist/components/dropi-table.js +1 -1
- package/dist/components/dropi-text-area.js +1 -1
- package/dist/components/p-CCZ6rIo5.js +1 -0
- package/dist/components/p-Dd1g1gjR.js +1 -0
- package/dist/components/p-Dnx3uXgo.js +1 -0
- package/dist/components/p-Qrac2GRu.js +1 -0
- package/dist/dropi-ui/dropi-button.entry.js +19 -2
- package/dist/dropi-ui/dropi-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-checkbox.entry.js +23 -2
- package/dist/dropi-ui/dropi-checkbox.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-country-selector.entry.js +15 -2
- package/dist/dropi-ui/dropi-country-selector.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-date-picker.entry.js +40 -4
- package/dist/dropi-ui/dropi-date-picker.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-input.entry.js +3 -3
- package/dist/dropi-ui/dropi-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-otp-send-code.entry.js +22 -2
- package/dist/dropi-ui/dropi-otp-send-code.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-phone-input.entry.js +25 -2
- package/dist/dropi-ui/dropi-phone-input.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-radio-button.entry.js +18 -1
- package/dist/dropi-ui/dropi-radio-button.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-select.entry.js +1 -1
- package/dist/dropi-ui/dropi-select.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-switch.entry.js +22 -1
- package/dist/dropi-ui/dropi-switch.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-text-area.entry.js +3 -3
- package/dist/dropi-ui/dropi-text-area.entry.js.map +1 -1
- package/dist/dropi-ui/dropi-ui.esm.js +1 -1
- package/dist/dropi-ui/p-09462f7b.entry.js +1 -0
- package/dist/dropi-ui/p-42a85ce5.entry.js +1 -0
- package/dist/dropi-ui/p-43e21ed8.entry.js +1 -0
- package/dist/dropi-ui/p-532136cc.entry.js +1 -0
- package/dist/dropi-ui/p-9a569a4e.entry.js +1 -0
- package/dist/dropi-ui/p-b2e8c0e2.entry.js +1 -0
- package/dist/dropi-ui/p-bc6bb893.entry.js +1 -0
- package/dist/dropi-ui/p-c08b8995.entry.js +1 -0
- package/dist/dropi-ui/p-c6926604.entry.js +1 -0
- package/dist/dropi-ui/p-eaa10fe8.entry.js +1 -0
- package/dist/dropi-ui/p-fb4856ea.entry.js +1 -0
- package/dist/esm/dropi-button.entry.js +19 -2
- package/dist/esm/dropi-checkbox.entry.js +23 -2
- package/dist/esm/dropi-country-selector.entry.js +15 -2
- package/dist/esm/dropi-date-picker.entry.js +40 -4
- package/dist/esm/dropi-input_3.entry.js +3 -3
- package/dist/esm/dropi-otp-send-code.entry.js +22 -2
- package/dist/esm/dropi-phone-input.entry.js +25 -2
- package/dist/esm/dropi-radio-button.entry.js +18 -1
- package/dist/esm/dropi-select.entry.js +1 -1
- package/dist/esm/dropi-switch.entry.js +22 -1
- package/dist/esm/dropi-text-area.entry.js +3 -3
- package/dist/esm/dropi-ui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/dropi-button/dropi-button.d.ts +4 -0
- package/dist/types/components/dropi-checkbox/dropi-checkbox.d.ts +5 -0
- package/dist/types/components/dropi-country-selector/dropi-country-selector.d.ts +3 -0
- package/dist/types/components/dropi-date-picker/dropi-date-picker.d.ts +6 -0
- package/dist/types/components/dropi-otp-send-code/dropi-otp-send-code.d.ts +3 -0
- package/dist/types/components/dropi-phone-input/dropi-phone-input.d.ts +5 -0
- package/dist/types/components/dropi-radio-button/dropi-radio-button.d.ts +3 -0
- package/dist/types/components/dropi-switch/dropi-switch.d.ts +5 -0
- package/dist/types/components.d.ts +109 -4
- package/hydrate/index.js +218 -43
- package/hydrate/index.mjs +218 -43
- package/package.json +1 -1
- package/readme.md +225 -6
- package/skills/update-context/skill.md +37 -0
|
@@ -126,7 +126,17 @@ const DropiCountrySelector = class {
|
|
|
126
126
|
constructor(hostRef) {
|
|
127
127
|
registerInstance(this, hostRef);
|
|
128
128
|
this.dropiChange = createEvent(this, "dropiChange", 7);
|
|
129
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
130
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
134
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
135
|
+
}
|
|
129
136
|
}
|
|
137
|
+
internals;
|
|
138
|
+
/** Name for native form submission */
|
|
139
|
+
name = '';
|
|
130
140
|
/** Label above the select */
|
|
131
141
|
label = '';
|
|
132
142
|
/** Placeholder when nothing is selected */
|
|
@@ -171,6 +181,7 @@ const DropiCountrySelector = class {
|
|
|
171
181
|
searchInputRef;
|
|
172
182
|
currentSelectionChanged(val) {
|
|
173
183
|
this.selected = COUNTRIES.find(c => c.code === val) || null;
|
|
184
|
+
this.internals.setFormValue(val);
|
|
174
185
|
}
|
|
175
186
|
selectPropertiesChanged(val) {
|
|
176
187
|
if (!val)
|
|
@@ -191,6 +202,7 @@ const DropiCountrySelector = class {
|
|
|
191
202
|
this.selectPropertiesChanged(this.selectProperties);
|
|
192
203
|
if (this.currentSelection)
|
|
193
204
|
this.currentSelectionChanged(this.currentSelection);
|
|
205
|
+
this.internals.setFormValue(this.currentSelection ?? '');
|
|
194
206
|
}
|
|
195
207
|
componentDidLoad() {
|
|
196
208
|
if (this.appendTo !== 'body')
|
|
@@ -263,12 +275,13 @@ const DropiCountrySelector = class {
|
|
|
263
275
|
this.dropiChange.emit(country);
|
|
264
276
|
}
|
|
265
277
|
render() {
|
|
266
|
-
return (h("div", { key: '
|
|
278
|
+
return (h("div", { key: '98292dbf6f84139b409cefe4690fb5ce834372c7', class: "custom-select" }, this.label && (h("label", { key: '7dd60d54e701108f7061623a89e8ff29edbb8dc6' }, this.label, this.showObligatory && h("span", { key: '971fd2a900d9ef4740a96145cadc948aab95232a', class: "required" }, "*"))), h("button", { key: '6c0067cfaf920160a4f8c05f59c34f3539540d29', type: "button", ref: (el) => { this.buttonRef = el; }, class: {
|
|
267
279
|
'select-button': true,
|
|
268
280
|
'select-completed': !!this.selected,
|
|
269
281
|
'select-invalid': this.hasError,
|
|
270
|
-
}, disabled: this.disabled, onClick: () => this.open() }, h("div", { key: '
|
|
282
|
+
}, disabled: this.disabled, onClick: () => this.open() }, h("div", { key: 'b28c2c5b0de9b8052bb920a272b9dcc51f4eac6f', class: "selected-content" }, this.selected ? (h("span", { class: "selected-option" }, h("img", { class: "flag-img", src: `https://flagsapi.com/${this.selected.code}/shiny/24.png`, alt: this.selected.name }), this.selected.name)) : (h("span", { class: "placeholder-text" }, this.placeholder))), h("dropi-icon", { key: '2ec568b0ad4efdb3a22ffceb1e85fbc6f1d483e8', name: this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2', iconWidth: "20px", iconHeight: "20px", color: "Gray-Gray-500" })), h("ul", { key: '34f0e5772ebb21e85cb246cbb91196d128d9ca59', class: `select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}` }, h("li", { key: '77cdf81222a7c593f1d54198e2b897468db890a5', class: "search-li" }, h("div", { key: '970723feefd04adf0b113ae63931092f58d0264a', class: "search-field" }, h("input", { key: '294868580087dc1bdb04258ad84672f3d10e7ba7', ref: (el) => { this.searchInputRef = el; }, type: "text", class: "country-search", placeholder: "Buscar pa\u00EDs...", value: this.searchTerm, onInput: (e) => { this.searchTerm = e.target.value; } }), h("span", { key: '02781dc595e568865ab5ae14aeed326b71b36e10', class: "search-icon" }, h("dropi-icon", { key: '0c06d5e5f26d2a2e5ec20967a2ebb9430397f3ea', name: "Search", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" })))), this.filtered.map(country => (h("li", { key: country.code }, h("button", { class: "option", type: "button", onClick: () => this.select(country) }, h("img", { class: "flag-img", src: `https://flagsapi.com/${country.code}/shiny/24.png`, alt: country.name }), country.name))))), this.textHelper && (h("div", { key: 'aae58bc17bbb6953a676818fe02da94b5a4e9f73', class: { 'select-helper': true, 'select-helper-error': this.hasError } }, this.hasError && h("dropi-icon", { key: '7542ef4620499957711079c587f6cb650096f6d3', name: "Warning-circle", iconWidth: "12px", iconHeight: "12px", color: "Error-Error-500" }), h("span", { key: 'ea4c5cedd3b87444a90b4e210f7afa3a318a4832' }, this.textHelper)))));
|
|
271
283
|
}
|
|
284
|
+
static get formAssociated() { return true; }
|
|
272
285
|
static get watchers() { return {
|
|
273
286
|
"currentSelection": [{
|
|
274
287
|
"currentSelectionChanged": 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropi-country-selector.entry.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,MAAM,CAAC,uiHAAuiH,CAAC;;ACE/kH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlB;AAQD,MAAM,SAAS,GAAkB;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,EAAE,IAAI,EAAE,WAA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AAI,CAAC,UAAU,KACd,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EACxE,IAAI,CAAC,QAAQ,IAAI,mEAAY,IAAI,EAAC,gBAAgB,EAAC,SAAS,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAA,CAAG,EACjH,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,UAAU,CAAQ,CAC1B,CACP,CACG;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-country-selector/dropi-country-selector.css?tag=dropi-country-selector&encapsulation=shadow","src/components/dropi-country-selector/dropi-country-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n text-align: left;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.custom-select {\n position: relative;\n width: 100%;\n}\n\n/* ── Label ───────────────────────────────────────────────────────── */\nlabel {\n display: block;\n font-size: var(--font-size-xs, 11px);\n font-weight: var(--font-weight-regular, 400);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 6px;\n}\n\n.required {\n color: var(--Error-Error-500, #ef4444);\n margin-left: 2px;\n}\n\n/* ── Trigger button ──────────────────────────────────────────────── */\n.select-button {\n width: 100%;\n height: 44px;\n padding: 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n color: var(--Gray-Gray-500, #69738c);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-align: left;\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.select-button:focus {\n outline: none;\n border-color: var(--Info-Info-500, #3b82f6);\n}\n\n.select-button:disabled {\n border-color: var(--Gray-Gray-200, #c3c9d9);\n color: var(--Gray-Gray-400, #858ea6);\n background: var(--Gray-Gray-50, #f7f8fa);\n cursor: not-allowed;\n}\n\n.select-button.select-completed {\n color: var(--Gray-Gray-700, #32394d);\n}\n\n.select-button.select-invalid {\n border-color: var(--Error-Error-500, #ef4444);\n}\n\n.selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n flex: 1;\n}\n\n.selected-option {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n}\n\n.placeholder-text {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n/* ── Flag ────────────────────────────────────────────────────────── */\n.flag-img {\n border-radius: var(--Border-1, 4px);\n width: 24px;\n height: 24px;\n object-fit: cover;\n flex-shrink: 0;\n}\n\n/* ── Dropdown ────────────────────────────────────────────────────── */\n.select-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n z-index: var(--dropi-z-index-overlay, 11000);\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);\n overflow: hidden;\n transition: max-height 0.2s ease, opacity 0.2s ease;\n}\n\n.select-dropdown.expanded {\n max-height: 300px;\n opacity: 1;\n overflow-y: auto;\n}\n\n.select-dropdown.collapsed {\n max-height: 0;\n opacity: 0;\n pointer-events: none;\n border-color: transparent;\n box-shadow: none;\n}\n\n/* Scrollbar — siempre claro, nunca negro */\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background: var(--Gray-Gray-300, #a3abbf);\n}\n\n/* ── Search ──────────────────────────────────────────────────────── */\n.search-li {\n padding: 10px 12px;\n position: sticky;\n top: 0;\n background: var(--Neutral-White, #ffffff);\n z-index: 1;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.country-search {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n outline: none;\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n transition: border-color 0.15s, background 0.15s;\n}\n\n.country-search:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.country-search::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options ─────────────────────────────────────────────────────── */\n.option {\n width: 100%;\n min-height: 44px;\n padding: 10px 16px;\n border: none;\n background: transparent;\n text-align: left;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background 0.1s ease;\n white-space: nowrap;\n}\n\n.option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen } from '@stencil/core';\n\nconst PORTAL_CSS = `\n.select-dropdown {\n background: #ffffff;\n border: 1px solid #c3c9d9;\n border-radius: 8px;\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0,0,0,.10);\n overflow: hidden;\n transition: max-height .2s ease, opacity .2s ease;\n font-family: inherit;\n font-size: 14px;\n}\n.select-dropdown.expanded { max-height: 300px; opacity: 1; overflow-y: auto; }\n.select-dropdown.collapsed { max-height: 0; opacity: 0; pointer-events: none; border-color: transparent; box-shadow: none; }\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb { background: #c3c9d9; border-radius: 4px; }\n.search-li { padding: 10px 12px; position: sticky; top: 0; background: #ffffff; z-index: 1; border-bottom: 1px solid #e6eaf2; }\n.search-field { position: relative; display: flex; align-items: center; }\n.country-search { width: 100%; height: 36px; padding: 0 36px 0 12px; border: 1px solid #c3c9d9; border-radius: 8px; outline: none; font-size: 14px; font-family: inherit; color: #32394d; background: #f7f8fa; }\n.country-search:focus { border-color: #50a5f1; background: #ffffff; }\n.country-search::placeholder { color: #858ea6; }\n.search-icon { position: absolute; right: 10px; display: flex; align-items: center; pointer-events: none; }\n.option { width: 100%; min-height: 44px; padding: 10px 16px; border: none; background: transparent; text-align: left; color: #32394d; font-size: 14px; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .1s ease; white-space: nowrap; }\n.option:hover { background: #f7f8fa; }\n.flag-img { border-radius: 4px; width: 24px; height: 24px; object-fit: cover; flex-shrink: 0; }\n`;\n\nexport interface CountryItem {\n name: string;\n code: string;\n codePhone: string;\n}\n\nconst COUNTRIES: CountryItem[] = [\n { name: 'Afghanistan', code: 'AF', codePhone: '93' },\n { name: 'Albania', code: 'AL', codePhone: '355' },\n { name: 'Algeria', code: 'DZ', codePhone: '213' },\n { name: 'Argentina', code: 'AR', codePhone: '54' },\n { name: 'Australia', code: 'AU', codePhone: '61' },\n { name: 'Austria', code: 'AT', codePhone: '43' },\n { name: 'Azerbaijan', code: 'AZ', codePhone: '994' },\n { name: 'Bahamas', code: 'BS', codePhone: '1242' },\n { name: 'Bahrain', code: 'BH', codePhone: '973' },\n { name: 'Bangladesh', code: 'BD', codePhone: '880' },\n { name: 'Belgium', code: 'BE', codePhone: '32' },\n { name: 'Bolivia', code: 'BO', codePhone: '591' },\n { name: 'Brazil', code: 'BR', codePhone: '55' },\n { name: 'Cambodia', code: 'KH', codePhone: '855' },\n { name: 'Canada', code: 'CA', codePhone: '1' },\n { name: 'Chile', code: 'CL', codePhone: '56' },\n { name: 'China', code: 'CN', codePhone: '86' },\n { name: 'Colombia', code: 'CO', codePhone: '57' },\n { name: 'Costa Rica', code: 'CR', codePhone: '506' },\n { name: 'Cuba', code: 'CU', codePhone: '53' },\n { name: 'Czech Republic', code: 'CZ', codePhone: '420' },\n { name: 'Denmark', code: 'DK', codePhone: '45' },\n { name: 'Dominican Republic', code: 'DO', codePhone: '1' },\n { name: 'Ecuador', code: 'EC', codePhone: '593' },\n { name: 'Egypt', code: 'EG', codePhone: '20' },\n { name: 'El Salvador', code: 'SV', codePhone: '503' },\n { name: 'Estonia', code: 'EE', codePhone: '372' },\n { name: 'Ethiopia', code: 'ET', codePhone: '251' },\n { name: 'Finland', code: 'FI', codePhone: '358' },\n { name: 'France', code: 'FR', codePhone: '33' },\n { name: 'Germany', code: 'DE', codePhone: '49' },\n { name: 'Ghana', code: 'GH', codePhone: '233' },\n { name: 'Greece', code: 'GR', codePhone: '30' },\n { name: 'Guatemala', code: 'GT', codePhone: '502' },\n { name: 'Honduras', code: 'HN', codePhone: '504' },\n { name: 'Hong Kong', code: 'HK', codePhone: '852' },\n { name: 'Hungary', code: 'HU', codePhone: '36' },\n { name: 'India', code: 'IN', codePhone: '91' },\n { name: 'Indonesia', code: 'ID', codePhone: '62' },\n { name: 'Iran, Islamic Republic Of', code: 'IR', codePhone: '98' },\n { name: 'Iraq', code: 'IQ', codePhone: '964' },\n { name: 'Ireland', code: 'IE', codePhone: '353' },\n { name: 'Israel', code: 'IL', codePhone: '972' },\n { name: 'Italy', code: 'IT', codePhone: '39' },\n { name: 'Jamaica', code: 'JM', codePhone: '1876' },\n { name: 'Japan', code: 'JP', codePhone: '81' },\n { name: 'Jordan', code: 'JO', codePhone: '962' },\n { name: 'Kazakhstan', code: 'KZ', codePhone: '7' },\n { name: 'Kenya', code: 'KE', codePhone: '254' },\n { name: 'Kuwait', code: 'KW', codePhone: '965' },\n { name: 'Lebanon', code: 'LB', codePhone: '961' },\n { name: 'Malaysia', code: 'MY', codePhone: '60' },\n { name: 'Mexico', code: 'MX', codePhone: '52' },\n { name: 'Morocco', code: 'MA', codePhone: '212' },\n { name: 'Netherlands', code: 'NL', codePhone: '31' },\n { name: 'New Zealand', code: 'NZ', codePhone: '64' },\n { name: 'Nicaragua', code: 'NI', codePhone: '505' },\n { name: 'Nigeria', code: 'NG', codePhone: '234' },\n { name: 'Norway', code: 'NO', codePhone: '47' },\n { name: 'Pakistan', code: 'PK', codePhone: '92' },\n { name: 'Panama', code: 'PA', codePhone: '507' },\n { name: 'Paraguay', code: 'PY', codePhone: '595' },\n { name: 'Peru', code: 'PE', codePhone: '51' },\n { name: 'Philippines', code: 'PH', codePhone: '63' },\n { name: 'Poland', code: 'PL', codePhone: '48' },\n { name: 'Portugal', code: 'PT', codePhone: '351' },\n { name: 'Qatar', code: 'QA', codePhone: '974' },\n { name: 'Romania', code: 'RO', codePhone: '40' },\n { name: 'Russian Federation', code: 'RU', codePhone: '7' },\n { name: 'Saudi Arabia', code: 'SA', codePhone: '966' },\n { name: 'Singapore', code: 'SG', codePhone: '65' },\n { name: 'South Africa', code: 'ZA', codePhone: '27' },\n { name: 'Spain', code: 'ES', codePhone: '34' },\n { name: 'Sri Lanka', code: 'LK', codePhone: '94' },\n { name: 'Sweden', code: 'SE', codePhone: '46' },\n { name: 'Switzerland', code: 'CH', codePhone: '41' },\n { name: 'Taiwan, Province of China', code: 'TW', codePhone: '886' },\n { name: 'Thailand', code: 'TH', codePhone: '66' },\n { name: 'Tunisia', code: 'TN', codePhone: '216' },\n { name: 'Turkey', code: 'TR', codePhone: '90' },\n { name: 'Uganda', code: 'UG', codePhone: '256' },\n { name: 'Ukraine', code: 'UA', codePhone: '380' },\n { name: 'United Arab Emirates', code: 'AE', codePhone: '971' },\n { name: 'United Kingdom', code: 'GB', codePhone: '44' },\n { name: 'United States', code: 'US', codePhone: '1' },\n { name: 'Uruguay', code: 'UY', codePhone: '598' },\n { name: 'Venezuela', code: 'VE', codePhone: '58' },\n { name: 'Viet Nam', code: 'VN', codePhone: '84' },\n { name: 'Zimbabwe', code: 'ZW', codePhone: '263' },\n];\n\n/**\n * @component dropi-country-selector\n * Searchable country dropdown with flag images. Mirrors Angular dropi-country-selector.\n *\n * @example\n * <dropi-country-selector label=\"País\" placeholder=\"Selecciona un país\"></dropi-country-selector>\n */\n@Component({\n tag: 'dropi-country-selector',\n styleUrl: 'dropi-country-selector.css',\n shadow: true,\n})\nexport class DropiCountrySelector {\n /** Label above the select */\n @Prop() label: string = '';\n /** Placeholder when nothing is selected */\n @Prop() placeholder: string = 'Selecciona un país';\n /** Pre-selected country code (ISO 3166-1 alpha-2) */\n @Prop({ mutable: true }) currentSelection: string = '';\n /** Whether the selector is disabled */\n @Prop() disabled: boolean = false;\n /** Show asterisk for required field */\n @Prop() showObligatory: boolean = false;\n /** Show error border */\n @Prop() hasError: boolean = false;\n /** Helper text below the select */\n @Prop() textHelper: string = '';\n /** Search term for filtering (matches Angular `searchTerm`) */\n @Prop({ mutable: true }) searchTerm: string = '';\n /**\n * Convenience object prop — matches Angular `selectProperties: SelectProperties`.\n * When provided, its non-null fields override individual props.\n */\n @Prop() selectProperties: any = null;\n /** When set to \"body\", the dropdown renders with fixed positioning to escape parent overflow clipping */\n @Prop() appendTo: string = '';\n\n /** Emitted when a country is selected. Detail is the CountryItem. */\n @Event() dropiChange: EventEmitter<CountryItem>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: CountryItem | null = null;\n\n @Element() el!: HTMLElement;\n private buttonRef?: HTMLButtonElement;\n private portalContainer: HTMLDivElement | null = null;\n private portalFocusedSelector: string | null = null;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (!this.isOpen) return;\n const path = e.composedPath();\n if (path.includes(this.el)) return;\n if (this.portalContainer && path.includes(this.portalContainer)) return;\n this.isOpen = false;\n }\n\n private searchInputRef?: HTMLInputElement;\n\n @Watch('currentSelection')\n currentSelectionChanged(val: string) {\n this.selected = COUNTRIES.find(c => c.code === val) || null;\n }\n\n @Watch('selectProperties')\n selectPropertiesChanged(val: any) {\n if (!val) return;\n if (val.label !== undefined) this.label = val.label;\n if (val.placeholder !== undefined) this.placeholder = val.placeholder;\n if (val.showObligatory !== undefined) this.showObligatory = val.showObligatory;\n if (val.textHelper !== undefined) this.textHelper = val.textHelper;\n if (val.hasError !== undefined) this.hasError = val.hasError;\n }\n\n componentWillLoad() {\n if (this.selectProperties) this.selectPropertiesChanged(this.selectProperties);\n if (this.currentSelection) this.currentSelectionChanged(this.currentSelection);\n }\n\n componentDidLoad() {\n if (this.appendTo !== 'body') return;\n this.portalContainer = document.createElement('div');\n const style = document.createElement('style');\n style.textContent = PORTAL_CSS;\n this.portalContainer.appendChild(style);\n document.body.appendChild(this.portalContainer);\n }\n\n disconnectedCallback() {\n this.returnUlToShadow();\n this.portalContainer?.remove();\n this.portalContainer = null;\n }\n\n componentWillRender() {\n if (!this.portalContainer) return;\n const active = document.activeElement;\n if (active && this.portalContainer.contains(active)) {\n this.portalFocusedSelector = '.' + Array.from((active as HTMLElement).classList).join('.');\n }\n this.returnUlToShadow();\n }\n\n componentDidRender() {\n if (!this.portalContainer || !this.buttonRef) return;\n const ul = this.el.shadowRoot?.querySelector('ul.select-dropdown') as HTMLUListElement;\n if (!ul) return;\n const rect = this.buttonRef.getBoundingClientRect();\n ul.style.cssText = `position:fixed;top:${rect.bottom + 4}px;left:${rect.left}px;width:${rect.width}px;z-index:11000;`;\n this.portalContainer.appendChild(ul);\n if (this.portalFocusedSelector) {\n const el = this.portalContainer.querySelector(this.portalFocusedSelector) as HTMLElement;\n if (el) {\n const len = (el as HTMLInputElement).value?.length ?? 0;\n el.focus();\n (el as HTMLInputElement).setSelectionRange?.(len, len);\n }\n this.portalFocusedSelector = null;\n }\n }\n\n private returnUlToShadow() {\n if (!this.portalContainer) return;\n const ul = this.portalContainer.querySelector('ul.select-dropdown');\n if (ul) this.el.shadowRoot?.querySelector('.custom-select')?.appendChild(ul);\n }\n\n private get filtered(): CountryItem[] {\n if (!this.searchTerm) return COUNTRIES;\n const t = this.searchTerm.toLowerCase();\n return COUNTRIES.filter(c => c.name.toLowerCase().includes(t));\n }\n\n private open() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n setTimeout(() => this.searchInputRef?.focus(), 50);\n }\n }\n\n private select(country: CountryItem) {\n this.selected = country;\n this.isOpen = false;\n this.searchTerm = '';\n this.currentSelection = country.code;\n this.dropiChange.emit(country);\n }\n\n render() {\n return (\n <div class=\"custom-select\">\n {this.label && (\n <label>\n {this.label}\n {this.showObligatory && <span class=\"required\">*</span>}\n </label>\n )}\n\n <button\n type=\"button\"\n ref={(el) => { this.buttonRef = el as HTMLButtonElement; }}\n class={{\n 'select-button': true,\n 'select-completed': !!this.selected,\n 'select-invalid': this.hasError,\n }}\n disabled={this.disabled}\n onClick={() => this.open()}\n >\n <div class=\"selected-content\">\n {this.selected ? (\n <span class=\"selected-option\">\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${this.selected.code}/shiny/24.png`}\n alt={this.selected.name}\n />\n {this.selected.name}\n </span>\n ) : (\n <span class=\"placeholder-text\">{this.placeholder}</span>\n )}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"20px\"\n iconHeight=\"20px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n <ul class={`select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}`}>\n <li class=\"search-li\">\n <div class=\"search-field\">\n <input\n ref={(el) => { this.searchInputRef = el; }}\n type=\"text\"\n class=\"country-search\"\n placeholder=\"Buscar país...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </li>\n {this.filtered.map(country => (\n <li key={country.code}>\n <button class=\"option\" type=\"button\" onClick={() => this.select(country)}>\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${country.code}/shiny/24.png`}\n alt={country.name}\n />\n {country.name}\n </button>\n </li>\n ))}\n </ul>\n {this.textHelper && (\n <div class={{ 'select-helper': true, 'select-helper-error': this.hasError }}>\n {this.hasError && <dropi-icon name=\"Warning-circle\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Error-Error-500\" />}\n <span>{this.textHelper}</span>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropi-country-selector.entry.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,MAAM,CAAC,uiHAAuiH,CAAC;;ACE/kH,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BlB;AAQD,MAAM,SAAS,GAAkB;IAC/B,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IACpD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACjD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAClD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAChD,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE;IACpD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AAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,qBAAqB,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAA,EACxE,IAAI,CAAC,QAAQ,IAAI,mEAAY,IAAI,EAAC,gBAAgB,EAAC,SAAS,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,EAAC,KAAK,EAAC,iBAAiB,EAAA,CAAG,EACjH,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,IAAI,CAAC,UAAU,CAAQ,CAC1B,CACP,CACG;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-country-selector/dropi-country-selector.css?tag=dropi-country-selector&encapsulation=shadow","src/components/dropi-country-selector/dropi-country-selector.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n text-align: left;\n}\n\n*, *::before, *::after { box-sizing: border-box; }\n\n.custom-select {\n position: relative;\n width: 100%;\n}\n\n/* ── Label ───────────────────────────────────────────────────────── */\nlabel {\n display: block;\n font-size: var(--font-size-xs, 11px);\n font-weight: var(--font-weight-regular, 400);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 6px;\n}\n\n.required {\n color: var(--Error-Error-500, #ef4444);\n margin-left: 2px;\n}\n\n/* ── Trigger button ──────────────────────────────────────────────── */\n.select-button {\n width: 100%;\n height: 44px;\n padding: 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n color: var(--Gray-Gray-500, #69738c);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-align: left;\n cursor: pointer;\n transition: border-color 0.15s ease;\n}\n\n.select-button:focus {\n outline: none;\n border-color: var(--Info-Info-500, #3b82f6);\n}\n\n.select-button:disabled {\n border-color: var(--Gray-Gray-200, #c3c9d9);\n color: var(--Gray-Gray-400, #858ea6);\n background: var(--Gray-Gray-50, #f7f8fa);\n cursor: not-allowed;\n}\n\n.select-button.select-completed {\n color: var(--Gray-Gray-700, #32394d);\n}\n\n.select-button.select-invalid {\n border-color: var(--Error-Error-500, #ef4444);\n}\n\n.selected-content {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n flex: 1;\n}\n\n.selected-option {\n display: flex;\n align-items: center;\n gap: 8px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n}\n\n.placeholder-text {\n color: var(--Gray-Gray-400, #858ea6);\n font-size: var(--font-size-s, 14px);\n}\n\n/* ── Flag ────────────────────────────────────────────────────────── */\n.flag-img {\n border-radius: var(--Border-1, 4px);\n width: 24px;\n height: 24px;\n object-fit: cover;\n flex-shrink: 0;\n}\n\n/* ── Dropdown ────────────────────────────────────────────────────── */\n.select-dropdown {\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n z-index: var(--dropi-z-index-overlay, 11000);\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);\n overflow: hidden;\n transition: max-height 0.2s ease, opacity 0.2s ease;\n}\n\n.select-dropdown.expanded {\n max-height: 300px;\n opacity: 1;\n overflow-y: auto;\n}\n\n.select-dropdown.collapsed {\n max-height: 0;\n opacity: 0;\n pointer-events: none;\n border-color: transparent;\n box-shadow: none;\n}\n\n/* Scrollbar — siempre claro, nunca negro */\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb {\n background: var(--Gray-Gray-200, #c3c9d9);\n border-radius: 4px;\n}\n.select-dropdown::-webkit-scrollbar-thumb:hover {\n background: var(--Gray-Gray-300, #a3abbf);\n}\n\n/* ── Search ──────────────────────────────────────────────────────── */\n.search-li {\n padding: 10px 12px;\n position: sticky;\n top: 0;\n background: var(--Neutral-White, #ffffff);\n z-index: 1;\n border-bottom: 1px solid var(--Gray-Gray-100, #e6eaf2);\n}\n\n.search-field {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.country-search {\n width: 100%;\n height: 36px;\n padding: 0 36px 0 12px;\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n outline: none;\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n color: var(--Gray-Gray-700, #32394d);\n background: var(--Gray-Gray-50, #f7f8fa);\n transition: border-color 0.15s, background 0.15s;\n}\n\n.country-search:focus {\n border-color: var(--Info-Info-500, #50a5f1);\n background: var(--Neutral-White, #ffffff);\n}\n\n.country-search::placeholder {\n color: var(--Gray-Gray-400, #858ea6);\n}\n\n.search-icon {\n position: absolute;\n right: 10px;\n display: flex;\n align-items: center;\n pointer-events: none;\n}\n\n/* ── Options ─────────────────────────────────────────────────────── */\n.option {\n width: 100%;\n min-height: 44px;\n padding: 10px 16px;\n border: none;\n background: transparent;\n text-align: left;\n color: var(--Gray-Gray-700, #32394d);\n font-size: var(--font-size-s, 14px);\n font-family: inherit;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 10px;\n transition: background 0.1s ease;\n white-space: nowrap;\n}\n\n.option:hover {\n background: var(--Gray-Gray-50, #f7f8fa);\n}\n","import { Component, Prop, Event, EventEmitter, State, Watch, h, Element, Listen, AttachInternals } from '@stencil/core';\n\nconst PORTAL_CSS = `\n.select-dropdown {\n background: #ffffff;\n border: 1px solid #c3c9d9;\n border-radius: 8px;\n list-style: none;\n padding: 0;\n margin: 0;\n box-shadow: 0 8px 24px rgba(0,0,0,.10);\n overflow: hidden;\n transition: max-height .2s ease, opacity .2s ease;\n font-family: inherit;\n font-size: 14px;\n}\n.select-dropdown.expanded { max-height: 300px; opacity: 1; overflow-y: auto; }\n.select-dropdown.collapsed { max-height: 0; opacity: 0; pointer-events: none; border-color: transparent; box-shadow: none; }\n.select-dropdown::-webkit-scrollbar { width: 6px; }\n.select-dropdown::-webkit-scrollbar-track { background: transparent; }\n.select-dropdown::-webkit-scrollbar-thumb { background: #c3c9d9; border-radius: 4px; }\n.search-li { padding: 10px 12px; position: sticky; top: 0; background: #ffffff; z-index: 1; border-bottom: 1px solid #e6eaf2; }\n.search-field { position: relative; display: flex; align-items: center; }\n.country-search { width: 100%; height: 36px; padding: 0 36px 0 12px; border: 1px solid #c3c9d9; border-radius: 8px; outline: none; font-size: 14px; font-family: inherit; color: #32394d; background: #f7f8fa; }\n.country-search:focus { border-color: #50a5f1; background: #ffffff; }\n.country-search::placeholder { color: #858ea6; }\n.search-icon { position: absolute; right: 10px; display: flex; align-items: center; pointer-events: none; }\n.option { width: 100%; min-height: 44px; padding: 10px 16px; border: none; background: transparent; text-align: left; color: #32394d; font-size: 14px; font-family: inherit; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .1s ease; white-space: nowrap; }\n.option:hover { background: #f7f8fa; }\n.flag-img { border-radius: 4px; width: 24px; height: 24px; object-fit: cover; flex-shrink: 0; }\n`;\n\nexport interface CountryItem {\n name: string;\n code: string;\n codePhone: string;\n}\n\nconst COUNTRIES: CountryItem[] = [\n { name: 'Afghanistan', code: 'AF', codePhone: '93' },\n { name: 'Albania', code: 'AL', codePhone: '355' },\n { name: 'Algeria', code: 'DZ', codePhone: '213' },\n { name: 'Argentina', code: 'AR', codePhone: '54' },\n { name: 'Australia', code: 'AU', codePhone: '61' },\n { name: 'Austria', code: 'AT', codePhone: '43' },\n { name: 'Azerbaijan', code: 'AZ', codePhone: '994' },\n { name: 'Bahamas', code: 'BS', codePhone: '1242' },\n { name: 'Bahrain', code: 'BH', codePhone: '973' },\n { name: 'Bangladesh', code: 'BD', codePhone: '880' },\n { name: 'Belgium', code: 'BE', codePhone: '32' },\n { name: 'Bolivia', code: 'BO', codePhone: '591' },\n { name: 'Brazil', code: 'BR', codePhone: '55' },\n { name: 'Cambodia', code: 'KH', codePhone: '855' },\n { name: 'Canada', code: 'CA', codePhone: '1' },\n { name: 'Chile', code: 'CL', codePhone: '56' },\n { name: 'China', code: 'CN', codePhone: '86' },\n { name: 'Colombia', code: 'CO', codePhone: '57' },\n { name: 'Costa Rica', code: 'CR', codePhone: '506' },\n { name: 'Cuba', code: 'CU', codePhone: '53' },\n { name: 'Czech Republic', code: 'CZ', codePhone: '420' },\n { name: 'Denmark', code: 'DK', codePhone: '45' },\n { name: 'Dominican Republic', code: 'DO', codePhone: '1' },\n { name: 'Ecuador', code: 'EC', codePhone: '593' },\n { name: 'Egypt', code: 'EG', codePhone: '20' },\n { name: 'El Salvador', code: 'SV', codePhone: '503' },\n { name: 'Estonia', code: 'EE', codePhone: '372' },\n { name: 'Ethiopia', code: 'ET', codePhone: '251' },\n { name: 'Finland', code: 'FI', codePhone: '358' },\n { name: 'France', code: 'FR', codePhone: '33' },\n { name: 'Germany', code: 'DE', codePhone: '49' },\n { name: 'Ghana', code: 'GH', codePhone: '233' },\n { name: 'Greece', code: 'GR', codePhone: '30' },\n { name: 'Guatemala', code: 'GT', codePhone: '502' },\n { name: 'Honduras', code: 'HN', codePhone: '504' },\n { name: 'Hong Kong', code: 'HK', codePhone: '852' },\n { name: 'Hungary', code: 'HU', codePhone: '36' },\n { name: 'India', code: 'IN', codePhone: '91' },\n { name: 'Indonesia', code: 'ID', codePhone: '62' },\n { name: 'Iran, Islamic Republic Of', code: 'IR', codePhone: '98' },\n { name: 'Iraq', code: 'IQ', codePhone: '964' },\n { name: 'Ireland', code: 'IE', codePhone: '353' },\n { name: 'Israel', code: 'IL', codePhone: '972' },\n { name: 'Italy', code: 'IT', codePhone: '39' },\n { name: 'Jamaica', code: 'JM', codePhone: '1876' },\n { name: 'Japan', code: 'JP', codePhone: '81' },\n { name: 'Jordan', code: 'JO', codePhone: '962' },\n { name: 'Kazakhstan', code: 'KZ', codePhone: '7' },\n { name: 'Kenya', code: 'KE', codePhone: '254' },\n { name: 'Kuwait', code: 'KW', codePhone: '965' },\n { name: 'Lebanon', code: 'LB', codePhone: '961' },\n { name: 'Malaysia', code: 'MY', codePhone: '60' },\n { name: 'Mexico', code: 'MX', codePhone: '52' },\n { name: 'Morocco', code: 'MA', codePhone: '212' },\n { name: 'Netherlands', code: 'NL', codePhone: '31' },\n { name: 'New Zealand', code: 'NZ', codePhone: '64' },\n { name: 'Nicaragua', code: 'NI', codePhone: '505' },\n { name: 'Nigeria', code: 'NG', codePhone: '234' },\n { name: 'Norway', code: 'NO', codePhone: '47' },\n { name: 'Pakistan', code: 'PK', codePhone: '92' },\n { name: 'Panama', code: 'PA', codePhone: '507' },\n { name: 'Paraguay', code: 'PY', codePhone: '595' },\n { name: 'Peru', code: 'PE', codePhone: '51' },\n { name: 'Philippines', code: 'PH', codePhone: '63' },\n { name: 'Poland', code: 'PL', codePhone: '48' },\n { name: 'Portugal', code: 'PT', codePhone: '351' },\n { name: 'Qatar', code: 'QA', codePhone: '974' },\n { name: 'Romania', code: 'RO', codePhone: '40' },\n { name: 'Russian Federation', code: 'RU', codePhone: '7' },\n { name: 'Saudi Arabia', code: 'SA', codePhone: '966' },\n { name: 'Singapore', code: 'SG', codePhone: '65' },\n { name: 'South Africa', code: 'ZA', codePhone: '27' },\n { name: 'Spain', code: 'ES', codePhone: '34' },\n { name: 'Sri Lanka', code: 'LK', codePhone: '94' },\n { name: 'Sweden', code: 'SE', codePhone: '46' },\n { name: 'Switzerland', code: 'CH', codePhone: '41' },\n { name: 'Taiwan, Province of China', code: 'TW', codePhone: '886' },\n { name: 'Thailand', code: 'TH', codePhone: '66' },\n { name: 'Tunisia', code: 'TN', codePhone: '216' },\n { name: 'Turkey', code: 'TR', codePhone: '90' },\n { name: 'Uganda', code: 'UG', codePhone: '256' },\n { name: 'Ukraine', code: 'UA', codePhone: '380' },\n { name: 'United Arab Emirates', code: 'AE', codePhone: '971' },\n { name: 'United Kingdom', code: 'GB', codePhone: '44' },\n { name: 'United States', code: 'US', codePhone: '1' },\n { name: 'Uruguay', code: 'UY', codePhone: '598' },\n { name: 'Venezuela', code: 'VE', codePhone: '58' },\n { name: 'Viet Nam', code: 'VN', codePhone: '84' },\n { name: 'Zimbabwe', code: 'ZW', codePhone: '263' },\n];\n\n/**\n * @component dropi-country-selector\n * Searchable country dropdown with flag images. Mirrors Angular dropi-country-selector.\n *\n * @example\n * <dropi-country-selector label=\"País\" placeholder=\"Selecciona un país\"></dropi-country-selector>\n */\n@Component({\n tag: 'dropi-country-selector',\n styleUrl: 'dropi-country-selector.css',\n shadow: true,\n formAssociated: true,\n})\nexport class DropiCountrySelector {\n @AttachInternals() internals: ElementInternals;\n\n /** Name for native form submission */\n @Prop({ reflect: true }) name: string = '';\n\n /** Label above the select */\n @Prop() label: string = '';\n /** Placeholder when nothing is selected */\n @Prop() placeholder: string = 'Selecciona un país';\n /** Pre-selected country code (ISO 3166-1 alpha-2) */\n @Prop({ mutable: true }) currentSelection: string = '';\n /** Whether the selector is disabled */\n @Prop() disabled: boolean = false;\n /** Show asterisk for required field */\n @Prop() showObligatory: boolean = false;\n /** Show error border */\n @Prop() hasError: boolean = false;\n /** Helper text below the select */\n @Prop() textHelper: string = '';\n /** Search term for filtering (matches Angular `searchTerm`) */\n @Prop({ mutable: true }) searchTerm: string = '';\n /**\n * Convenience object prop — matches Angular `selectProperties: SelectProperties`.\n * When provided, its non-null fields override individual props.\n */\n @Prop() selectProperties: any = null;\n /** When set to \"body\", the dropdown renders with fixed positioning to escape parent overflow clipping */\n @Prop() appendTo: string = '';\n\n /** Emitted when a country is selected. Detail is the CountryItem. */\n @Event() dropiChange: EventEmitter<CountryItem>;\n\n @State() private isOpen: boolean = false;\n @State() private selected: CountryItem | null = null;\n\n @Element() el!: HTMLElement;\n private buttonRef?: HTMLButtonElement;\n private portalContainer: HTMLDivElement | null = null;\n private portalFocusedSelector: string | null = null;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (!this.isOpen) return;\n const path = e.composedPath();\n if (path.includes(this.el)) return;\n if (this.portalContainer && path.includes(this.portalContainer)) return;\n this.isOpen = false;\n }\n\n private searchInputRef?: HTMLInputElement;\n\n @Watch('currentSelection')\n currentSelectionChanged(val: string) {\n this.selected = COUNTRIES.find(c => c.code === val) || null;\n this.internals.setFormValue(val);\n }\n\n\n @Watch('selectProperties')\n selectPropertiesChanged(val: any) {\n if (!val) return;\n if (val.label !== undefined) this.label = val.label;\n if (val.placeholder !== undefined) this.placeholder = val.placeholder;\n if (val.showObligatory !== undefined) this.showObligatory = val.showObligatory;\n if (val.textHelper !== undefined) this.textHelper = val.textHelper;\n if (val.hasError !== undefined) this.hasError = val.hasError;\n }\n\n componentWillLoad() {\n if (this.selectProperties) this.selectPropertiesChanged(this.selectProperties);\n if (this.currentSelection) this.currentSelectionChanged(this.currentSelection);\n this.internals.setFormValue(this.currentSelection ?? '');\n }\n\n\n componentDidLoad() {\n if (this.appendTo !== 'body') return;\n this.portalContainer = document.createElement('div');\n const style = document.createElement('style');\n style.textContent = PORTAL_CSS;\n this.portalContainer.appendChild(style);\n document.body.appendChild(this.portalContainer);\n }\n\n disconnectedCallback() {\n this.returnUlToShadow();\n this.portalContainer?.remove();\n this.portalContainer = null;\n }\n\n componentWillRender() {\n if (!this.portalContainer) return;\n const active = document.activeElement;\n if (active && this.portalContainer.contains(active)) {\n this.portalFocusedSelector = '.' + Array.from((active as HTMLElement).classList).join('.');\n }\n this.returnUlToShadow();\n }\n\n componentDidRender() {\n if (!this.portalContainer || !this.buttonRef) return;\n const ul = this.el.shadowRoot?.querySelector('ul.select-dropdown') as HTMLUListElement;\n if (!ul) return;\n const rect = this.buttonRef.getBoundingClientRect();\n ul.style.cssText = `position:fixed;top:${rect.bottom + 4}px;left:${rect.left}px;width:${rect.width}px;z-index:11000;`;\n this.portalContainer.appendChild(ul);\n if (this.portalFocusedSelector) {\n const el = this.portalContainer.querySelector(this.portalFocusedSelector) as HTMLElement;\n if (el) {\n const len = (el as HTMLInputElement).value?.length ?? 0;\n el.focus();\n (el as HTMLInputElement).setSelectionRange?.(len, len);\n }\n this.portalFocusedSelector = null;\n }\n }\n\n private returnUlToShadow() {\n if (!this.portalContainer) return;\n const ul = this.portalContainer.querySelector('ul.select-dropdown');\n if (ul) this.el.shadowRoot?.querySelector('.custom-select')?.appendChild(ul);\n }\n\n private get filtered(): CountryItem[] {\n if (!this.searchTerm) return COUNTRIES;\n const t = this.searchTerm.toLowerCase();\n return COUNTRIES.filter(c => c.name.toLowerCase().includes(t));\n }\n\n private open() {\n if (this.disabled) return;\n this.isOpen = !this.isOpen;\n if (this.isOpen) {\n setTimeout(() => this.searchInputRef?.focus(), 50);\n }\n }\n\n private select(country: CountryItem) {\n this.selected = country;\n this.isOpen = false;\n this.searchTerm = '';\n this.currentSelection = country.code;\n this.dropiChange.emit(country);\n }\n\n render() {\n return (\n <div class=\"custom-select\">\n {this.label && (\n <label>\n {this.label}\n {this.showObligatory && <span class=\"required\">*</span>}\n </label>\n )}\n\n <button\n type=\"button\"\n ref={(el) => { this.buttonRef = el as HTMLButtonElement; }}\n class={{\n 'select-button': true,\n 'select-completed': !!this.selected,\n 'select-invalid': this.hasError,\n }}\n disabled={this.disabled}\n onClick={() => this.open()}\n >\n <div class=\"selected-content\">\n {this.selected ? (\n <span class=\"selected-option\">\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${this.selected.code}/shiny/24.png`}\n alt={this.selected.name}\n />\n {this.selected.name}\n </span>\n ) : (\n <span class=\"placeholder-text\">{this.placeholder}</span>\n )}\n </div>\n <dropi-icon\n name={this.isOpen ? 'Arrow-Up-2' : 'Arrow-Down-2'}\n iconWidth=\"20px\"\n iconHeight=\"20px\"\n color=\"Gray-Gray-500\"\n />\n </button>\n\n <ul class={`select-dropdown${this.isOpen ? ' expanded' : ' collapsed'}`}>\n <li class=\"search-li\">\n <div class=\"search-field\">\n <input\n ref={(el) => { this.searchInputRef = el; }}\n type=\"text\"\n class=\"country-search\"\n placeholder=\"Buscar país...\"\n value={this.searchTerm}\n onInput={(e) => { this.searchTerm = (e.target as HTMLInputElement).value; }}\n />\n <span class=\"search-icon\">\n <dropi-icon name=\"Search\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n </span>\n </div>\n </li>\n {this.filtered.map(country => (\n <li key={country.code}>\n <button class=\"option\" type=\"button\" onClick={() => this.select(country)}>\n <img\n class=\"flag-img\"\n src={`https://flagsapi.com/${country.code}/shiny/24.png`}\n alt={country.name}\n />\n {country.name}\n </button>\n </li>\n ))}\n </ul>\n {this.textHelper && (\n <div class={{ 'select-helper': true, 'select-helper-error': this.hasError }}>\n {this.hasError && <dropi-icon name=\"Warning-circle\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Error-Error-500\" />}\n <span>{this.textHelper}</span>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -13,13 +13,26 @@ const DropiDatePicker = class {
|
|
|
13
13
|
this.dropiChangeDate = createEvent(this, "dropiChangeDate", 7);
|
|
14
14
|
this.dropiClosePanel = createEvent(this, "dropiClosePanel", 7);
|
|
15
15
|
this.dropiRangeChange = createEvent(this, "dropiRangeChange", 7);
|
|
16
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
17
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
21
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
22
|
+
}
|
|
16
23
|
}
|
|
24
|
+
internals;
|
|
25
|
+
/** Name for native form submission */
|
|
26
|
+
name = '';
|
|
17
27
|
/** Selected date (ISO string, single mode) - matches Angular 'selectedDate' */
|
|
18
28
|
selectedDate = '';
|
|
19
29
|
/** Range start date (ISO string, range mode) */
|
|
20
30
|
startDate = '';
|
|
21
31
|
/** Range end date (ISO string, range mode) */
|
|
22
32
|
endDate = '';
|
|
33
|
+
valueChanged() {
|
|
34
|
+
this.updateFormValue();
|
|
35
|
+
}
|
|
23
36
|
/** Enable range selection - matches Angular selectionMode */
|
|
24
37
|
selectionMode = 'single';
|
|
25
38
|
/** Min selectable date (ISO string) */
|
|
@@ -52,6 +65,17 @@ const DropiDatePicker = class {
|
|
|
52
65
|
dropiClosePanel;
|
|
53
66
|
/** Emitted when range selected */
|
|
54
67
|
dropiRangeChange;
|
|
68
|
+
componentWillLoad() {
|
|
69
|
+
this.updateFormValue();
|
|
70
|
+
}
|
|
71
|
+
updateFormValue() {
|
|
72
|
+
if (this.selectionMode === 'range') {
|
|
73
|
+
this.internals.setFormValue(this.startDate && this.endDate ? `${this.startDate},${this.endDate}` : '');
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
this.internals.setFormValue(this.selectedDate || '');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
55
79
|
get displayValue() {
|
|
56
80
|
if (this.selectionMode === 'range') {
|
|
57
81
|
if (this.startDate && this.endDate)
|
|
@@ -171,12 +195,12 @@ const DropiDatePicker = class {
|
|
|
171
195
|
render() {
|
|
172
196
|
const days = this.buildDays();
|
|
173
197
|
const today = new Date().toISOString().slice(0, 10);
|
|
174
|
-
return (h("div", { key: '
|
|
198
|
+
return (h("div", { key: '97a96b56b0e8ae551f747bad4a3459a1f4945411', class: "dp-wrap" }, this.label && h("label", { key: 'a1792032ab9ae2dbe574f50b7a537df687eae40c', class: "dp-label" }, this.label), h("button", { key: '4237c2b988f1e9fbaa77dc2a989964216e3fe902', class: {
|
|
175
199
|
'dp-trigger': true,
|
|
176
200
|
'dp-trigger--disabled': this.disabled,
|
|
177
201
|
'dp-trigger--invalid': this.isInvalid,
|
|
178
202
|
'dp-trigger--loading': this.loading
|
|
179
|
-
}, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '
|
|
203
|
+
}, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '39591fedb92b92e6507b564fc8c145711f1a21b1', name: "Calendar", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("span", { key: '305e3f81d64c01603687d53edc59e1d19ef06c3c', class: { 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue } }, this.displayValue || this.placeholder), h("dropi-icon", { key: '13feb346ad7b07a7e2f208e299f62a8261a97655', name: "Arrow-Down-2", iconWidth: "12px", iconHeight: "12px", color: "Gray-Gray-400" })), this.open && (h("div", { key: '4cdf8a69422a0b54d0f7c1a6711a683dab7d1f34', class: "dp-popup" }, h("div", { key: '0c6fb31094003c66c5b471e738dd75e7b865401f', class: "dp-nav" }, h("button", { key: '4fa24f9450cf6c5e888cea374619e14245c0c005', class: "dp-nav__btn", onClick: () => this.prevMonth(), type: "button" }, h("dropi-icon", { key: '2196f85700b252d4f83536f11ed197c083fc45ec', name: "Arrow-Left-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" })), h("span", { key: '01619de7c5218b506f75234745f3184af813a491', class: "dp-nav__title" }, h("span", { key: '8074e7deeb6c102bad7f1911739e785187783a7c' }, MONTHS_ES[this.viewMonth]), h("span", { key: '69e9c3b41361e293a843f911b5bcf4690995d2b4' }, this.viewYear)), h("button", { key: '51c0ad3da96835736170fbf94338fd70c942c3d2', class: "dp-nav__btn", onClick: () => this.nextMonth(), type: "button" }, h("dropi-icon", { key: '24eb4385639c9a71f5312f32b33b36593c2b0259', name: "Arrow-Right-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" }))), h("div", { key: 'c18cecd81af38b3a6f23402501011c09b8b453d7', class: "dp-grid" }, DAYS_ES.map(d => (h("div", { class: "dp-day-header" }, d))), days.map(({ iso, day, currentMonth }) => {
|
|
180
204
|
const isSelected = this.selectionMode !== 'range'
|
|
181
205
|
? iso === this.selectedDate
|
|
182
206
|
: iso === this.startDate || iso === this.endDate;
|
|
@@ -198,12 +222,12 @@ const DropiDatePicker = class {
|
|
|
198
222
|
if (this.selectionMode === 'range' && this.startDate && !this.endDate)
|
|
199
223
|
this.hoverDate = iso;
|
|
200
224
|
}, onMouseLeave: () => this.hoverDate = '' }, day));
|
|
201
|
-
})), h("div", { key: '
|
|
225
|
+
})), h("div", { key: '594f280cb269c32ac3a129401e13b710af1a7c7e', class: "dp-footer" }, h("button", { key: '6028ef84bc17f0d1bb0fd587a991698a8fc69338', class: "dp-footer__clear", type: "button", onClick: () => {
|
|
202
226
|
this.selectedDate = '';
|
|
203
227
|
this.startDate = '';
|
|
204
228
|
this.endDate = '';
|
|
205
229
|
this.open = false;
|
|
206
|
-
} }, "Limpiar"), h("button", { key: '
|
|
230
|
+
} }, "Limpiar"), h("button", { key: 'ab01840a18d657621205d4fba69cc53feb474d11', class: "dp-footer__today", type: "button", onClick: () => {
|
|
207
231
|
if (this.selectionMode !== 'range') {
|
|
208
232
|
this.selectedDate = today;
|
|
209
233
|
this.open = false;
|
|
@@ -215,6 +239,18 @@ const DropiDatePicker = class {
|
|
|
215
239
|
}
|
|
216
240
|
} }, "Hoy"))))));
|
|
217
241
|
}
|
|
242
|
+
static get formAssociated() { return true; }
|
|
243
|
+
static get watchers() { return {
|
|
244
|
+
"selectedDate": [{
|
|
245
|
+
"valueChanged": 0
|
|
246
|
+
}],
|
|
247
|
+
"startDate": [{
|
|
248
|
+
"valueChanged": 0
|
|
249
|
+
}],
|
|
250
|
+
"endDate": [{
|
|
251
|
+
"valueChanged": 0
|
|
252
|
+
}]
|
|
253
|
+
}; }
|
|
218
254
|
};
|
|
219
255
|
DropiDatePicker.style = dropiDatePickerCss();
|
|
220
256
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"dropi-date-picker.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,MAAM,CAAC,usIAAusI,CAAC;;ACE1uI,MAAM,SAAS,GAAG;IAChB,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO;IAChD,OAAO,EA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AG,GAAG;AAAE,iBAAC,EACpH,YAAY,EAAE,MAAM,IAAI,CAAC,SAAS,GAAG,EAAE,EAAA,EAEtC,GAAG,CACG;AAEb,SAAC,CAAC,CACE,EAGN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,WAAW,EAAA,EACpB,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAK;AAC3D,gBAAA,IAAI,CAAC,YAAY,GAAG,EAAE;AAAE,gBAAA,IAAI,CAAC,SAAS,GAAG,EAAE;AAAE,gBAAA,IAAI,CAAC,OAAO,GAAG,EAAE;AAC9D,gBAAA,IAAI,CAAC,IAAI,GAAG,KAAK;aAClB,EAAA,EAAA,SAAA,CAEQ,EACT,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,kBAAkB,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAK;AAC3D,gBAAA,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,EAAE;AAAE,oBAAA,IAAI,CAAC,YAAY,GAAG,KAAK;AAAE,oBAAA,IAAI,CAAC,IAAI,GAAG,KAAK;AAAE,oBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;;qBAC/G;AAAE,oBAAA,IAAI,CAAC,SAAS,GAAG,KAAK;AAAE,oBAAA,IAAI,CAAC,OAAO,GAAG,EAAE;;aACjD,UAEQ,CACL,CACF,CACP,CACG;;;;;;;","names":[],"sources":["src/components/dropi-date-picker/dropi-date-picker.css?tag=dropi-date-picker&encapsulation=shadow","src/components/dropi-date-picker/dropi-date-picker.tsx"],"sourcesContent":[":host { display: block; width: 100%; position: relative; }\n*, *::before, *::after { box-sizing: border-box; }\n\n.dp-label {\n display: block;\n font-size: var(--font-size-xxs, 10px);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 4px;\n}\n\n/* Trigger */\n.dp-trigger {\n width: 100%;\n height: 44px;\n display: flex;\n align-items: center;\n gap: var(--Size-2, 8px);\n padding: 0 var(--Size-3, 12px);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n cursor: pointer;\n font-family: inherit;\n transition: border-color 0.2s;\n}\n.dp-trigger:hover:not(:disabled) { border-color: var(--Info-Info-500, #50a5f1); }\n.dp-trigger--disabled { background: var(--Gray-Gray-50, #f7f8fa); cursor: not-allowed; opacity: 0.6; }\n\n.dp-trigger__value {\n flex: 1;\n text-align: left;\n font-size: var(--font-size-xs, 12px);\n color: var(--Gray-Gray-700, #32394d);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dp-trigger__placeholder { color: var(--Gray-Gray-400, #858ea6); }\n\n/* Popup */\n.dp-popup {\n position: absolute;\n top: calc(100% + 8px);\n left: 0;\n width: 320px;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-3, 12px);\n box-shadow: 0 4px 16px rgba(0,0,0,0.08);\n z-index: 300;\n padding: var(--Size-4, 16px);\n}\n\n/* Navigation */\n.dp-nav {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--Size-4, 16px);\n}\n\n.dp-nav__btn {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n transition: background 0.15s;\n}\n.dp-nav__btn:hover { background: var(--Gray-Gray-50, #f7f8fa); }\n\n.dp-nav__title {\n font-size: var(--font-size-s, 14px);\n font-weight: var(--font-weight-bold, 700);\n color: var(--Gray-Gray-700, #32394d);\n display: flex;\n gap: 8px;\n}\n\n/* Grid */\n.dp-grid {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n row-gap: 8px;\n column-gap: 4px;\n}\n\n.dp-day-header {\n font-size: var(--font-size-s, 14px);\n color: var(--Gray-Gray-700, #32394d);\n text-align: center;\n padding: 8px 0;\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Day cells */\n.dp-cell {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size-xs, 12px);\n font-family: inherit;\n border: none;\n cursor: pointer;\n background: transparent;\n color: var(--Gray-Gray-600, #475066);\n width: 100%;\n position: relative;\n z-index: 1;\n padding: 0;\n}\n\n/* Pseudo-element for the circle (selected / hover / today) */\n.dp-cell::after {\n content: \"\";\n position: absolute;\n top: 0; left: 0; right: 0; bottom: 0;\n border-radius: 50%;\n transition: all 0.2s;\n z-index: -1;\n background: transparent;\n}\n\n/* Pseudo-element for the continuous light-orange range background */\n.dp-cell::before {\n content: \"\";\n position: absolute;\n top: 0; bottom: 0;\n z-index: -2;\n border-radius: 0;\n background: transparent;\n}\n\n.dp-cell:hover:not(:disabled)::after {\n background: var(--Gray-Gray-100, #e6eaf2);\n}\n\n.dp-cell--other-month { color: var(--Gray-Gray-300, #a0a9c0); }\n\n.dp-cell--today {\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--today::after {\n background: var(--Gray-Gray-100, #e6eaf2);\n}\n\n.dp-cell--selected {\n color: var(--Neutral-White, #ffffff);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--selected::after {\n background: var(--Orange-orange-500, #f49a3d) !important;\n}\n\n/* Range modes */\n.dp-cell--range-start, .dp-cell--range-end {\n color: var(--Neutral-White, #ffffff);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--range-start::after, .dp-cell--range-end::after {\n background: var(--Orange-orange-500, #f49a3d) !important;\n}\n\n.dp-cell--in-range {\n color: var(--Orange-orange-500, #f49a3d);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--in-range::before {\n left: -2px; right: -2px;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-start::before {\n left: 50%; right: -2px;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-end::before {\n left: -2px; right: 50%;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-start.dp-cell--range-end::before {\n background: transparent;\n}\n\n.dp-cell--disabled { opacity: 0.35; cursor: not-allowed; }\n\n/* Footer */\n.dp-footer {\n display: flex;\n justify-content: space-between;\n margin-top: var(--Size-3, 12px);\n border-top: 1px solid var(--Gray-Gray-100, #e6eaf2);\n padding-top: var(--Size-2, 8px);\n}\n\n.dp-footer__clear,\n.dp-footer__today {\n background: none;\n border: none;\n padding: 4px 8px;\n font-size: var(--font-size-xxs, 10px);\n font-family: inherit;\n cursor: pointer;\n border-radius: var(--Border-1, 4px);\n transition: background 0.15s;\n}\n.dp-footer__clear { color: var(--Gray-Gray-500, #69738c); }\n.dp-footer__today { color: var(--Orange-orange-500, #f49a3d); font-weight: var(--font-weight-bold, 700); }\n.dp-footer__clear:hover { background: var(--Gray-Gray-50, #f7f8fa); }\n.dp-footer__today:hover { background: var(--Orange-orange-50, #fef5ec); }\n","import { Component, Prop, State, Event, EventEmitter, h, Element, Listen } from '@stencil/core';\n\nconst MONTHS_ES = [\n 'Enero','Febrero','Marzo','Abril','Mayo','Junio',\n 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'\n];\nconst DAYS_ES = ['Do','Lu','Ma','Mi','Ju','Vi','Sa'];\n\n/**\n * @component dropi-date-picker\n * Calendar date picker with optional date range mode.\n * Emits ISO date strings (YYYY-MM-DD).\n */\n@Component({\n tag: 'dropi-date-picker',\n styleUrl: 'dropi-date-picker.css',\n shadow: true,\n})\nexport class DropiDatePicker {\n /** Selected date (ISO string, single mode) - matches Angular 'selectedDate' */\n @Prop({ mutable: true }) selectedDate: string = '';\n /** Range start date (ISO string, range mode) */\n @Prop({ mutable: true }) startDate: string = '';\n /** Range end date (ISO string, range mode) */\n @Prop({ mutable: true }) endDate: string = '';\n /** Enable range selection - matches Angular selectionMode */\n @Prop() selectionMode: 'single' | 'range' = 'single';\n /** Min selectable date (ISO string) */\n @Prop() minDate: string = '';\n /** Max selectable date (ISO string) */\n @Prop() maxDate: string = '';\n /** Label */\n @Prop() label: string | null = null;\n /** Placeholder */\n @Prop() placeholder: string = 'DD/MM/YYYY';\n /** Disabled */\n @Prop() disabled: boolean = false;\n /** Is invalid state - matches Angular */\n @Prop() isInvalid: boolean = false;\n /** Loading state - matches Angular */\n @Prop() loading: boolean = false;\n\n @State() private open: boolean = false;\n @State() private viewYear: number = new Date().getFullYear();\n @State() private viewMonth: number = new Date().getMonth();\n @State() private hoverDate: string = '';\n\n @Element() el!: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (this.open && !e.composedPath().includes(this.el)) {\n this.open = false;\n }\n }\n\n /** Emitted when date selected — matches Angular 'onChangeDate' */\n @Event() dropiChangeDate: EventEmitter<string>;\n /** Emitted when panel closes — matches Angular 'onClosePanel' */\n @Event() dropiClosePanel: EventEmitter<void>;\n /** Emitted when range selected */\n @Event() dropiRangeChange: EventEmitter<{ start: string; end: string }>;\n\n private get displayValue(): string {\n if (this.selectionMode === 'range') {\n if (this.startDate && this.endDate) return `${this.startDate} – ${this.endDate}`;\n if (this.startDate) return this.startDate;\n return '';\n }\n return this.selectedDate;\n }\n\n private open_() {\n if (this.disabled) return;\n if (this.selectedDate) {\n const d = new Date(this.selectedDate);\n this.viewYear = d.getFullYear();\n this.viewMonth = d.getMonth();\n } else if (this.startDate) {\n const d = new Date(this.startDate);\n this.viewYear = d.getFullYear();\n this.viewMonth = d.getMonth();\n }\n this.open = true;\n }\n\n private prevMonth() {\n if (this.viewMonth === 0) { this.viewMonth = 11; this.viewYear--; }\n else this.viewMonth--;\n }\n\n private nextMonth() {\n if (this.viewMonth === 11) { this.viewMonth = 0; this.viewYear++; }\n else this.viewMonth++;\n }\n\n private toISO(year: number, month: number, day: number): string {\n return `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n }\n\n private isDisabled(iso: string): boolean {\n if (this.minDate && iso < this.minDate) return true;\n if (this.maxDate && iso > this.maxDate) return true;\n return false;\n }\n\n private isInRange(iso: string): boolean {\n if (this.selectionMode !== 'range') return false;\n const start = this.startDate;\n const end = this.endDate || this.hoverDate;\n if (!start || !end) return false;\n const [s, e] = start <= end ? [start, end] : [end, start];\n return iso > s && iso < e;\n }\n\n private selectDate(iso: string) {\n if (this.isDisabled(iso)) return;\n\n if (this.selectionMode !== 'range') {\n this.selectedDate = iso;\n this.open = false;\n this.dropiChangeDate.emit(iso);\n return;\n }\n\n // Range mode\n if (!this.startDate || (this.startDate && this.endDate)) {\n this.startDate = iso;\n this.endDate = '';\n } else {\n if (iso < this.startDate) {\n this.endDate = this.startDate;\n this.startDate = iso;\n } else {\n this.endDate = iso;\n }\n this.open = false;\n this.dropiRangeChange.emit({ start: this.startDate, end: this.endDate });\n }\n }\n\n private buildDays(): Array<{ iso: string; day: number; currentMonth: boolean }> {\n const year = this.viewYear;\n const month = this.viewMonth;\n\n const firstDay = new Date(year, month, 1).getDay();\n // Adjust to Sunday-first\n const startOffset = firstDay;\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const daysInPrevMonth = new Date(year, month, 0).getDate();\n\n const cells: Array<{ iso: string; day: number; currentMonth: boolean }> = [];\n\n // Previous month filler\n for (let i = startOffset - 1; i >= 0; i--) {\n const d = daysInPrevMonth - i;\n const m = month === 0 ? 11 : month - 1;\n const y = month === 0 ? year - 1 : year;\n cells.push({ iso: this.toISO(y, m, d), day: d, currentMonth: false });\n }\n\n // Current month\n for (let d = 1; d <= daysInMonth; d++) {\n cells.push({ iso: this.toISO(year, month, d), day: d, currentMonth: true });\n }\n\n // Next month filler\n const remaining = 42 - cells.length;\n for (let d = 1; d <= remaining; d++) {\n const m = month === 11 ? 0 : month + 1;\n const y = month === 11 ? year + 1 : year;\n cells.push({ iso: this.toISO(y, m, d), day: d, currentMonth: false });\n }\n\n return cells;\n }\n\n render() {\n const days = this.buildDays();\n const today = new Date().toISOString().slice(0, 10);\n\n return (\n <div class=\"dp-wrap\">\n {this.label && <label class=\"dp-label\">{this.label}</label>}\n\n {/* Trigger */}\n <button\n class={{\n 'dp-trigger': true,\n 'dp-trigger--disabled': this.disabled,\n 'dp-trigger--invalid': this.isInvalid,\n 'dp-trigger--loading': this.loading\n }}\n onClick={() => this.open ? this.open = false : this.open_()}\n disabled={this.disabled || this.loading}\n type=\"button\"\n >\n <dropi-icon name=\"Calendar\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n <span class={{ 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue }}>\n {this.displayValue || this.placeholder}\n </span>\n <dropi-icon name=\"Arrow-Down-2\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Gray-Gray-400\" />\n </button>\n\n {/* Calendar popup */}\n {this.open && (\n <div class=\"dp-popup\">\n {/* Navigation */}\n <div class=\"dp-nav\">\n <button class=\"dp-nav__btn\" onClick={() => this.prevMonth()} type=\"button\">\n <dropi-icon name=\"Arrow-Left-2\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-600\" />\n </button>\n <span class=\"dp-nav__title\">\n <span>{MONTHS_ES[this.viewMonth]}</span>\n <span>{this.viewYear}</span>\n </span>\n <button class=\"dp-nav__btn\" onClick={() => this.nextMonth()} type=\"button\">\n <dropi-icon name=\"Arrow-Right-2\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-600\" />\n </button>\n </div>\n\n {/* Day headers */}\n <div class=\"dp-grid\">\n {DAYS_ES.map(d => (\n <div class=\"dp-day-header\">{d}</div>\n ))}\n\n {/* Day cells */}\n {days.map(({ iso, day, currentMonth }) => {\n const isSelected = this.selectionMode !== 'range'\n ? iso === this.selectedDate\n : iso === this.startDate || iso === this.endDate;\n const isRangeStart = this.selectionMode === 'range' && iso === this.startDate;\n const isRangeEnd = this.selectionMode === 'range' && iso === this.endDate;\n const inRange = this.isInRange(iso);\n const disabled = this.isDisabled(iso);\n const isToday = iso === today;\n\n return (\n <button\n class={{\n 'dp-cell': true,\n 'dp-cell--other-month': !currentMonth,\n 'dp-cell--today': isToday,\n 'dp-cell--selected': isSelected,\n 'dp-cell--range-start': isRangeStart,\n 'dp-cell--range-end': isRangeEnd,\n 'dp-cell--in-range': inRange,\n 'dp-cell--disabled': disabled,\n }}\n type=\"button\"\n disabled={disabled}\n onClick={() => this.selectDate(iso)}\n onMouseEnter={() => { if (this.selectionMode === 'range' && this.startDate && !this.endDate) this.hoverDate = iso; }}\n onMouseLeave={() => this.hoverDate = ''}\n >\n {day}\n </button>\n );\n })}\n </div>\n\n {/* Footer */}\n <div class=\"dp-footer\">\n <button class=\"dp-footer__clear\" type=\"button\" onClick={() => {\n this.selectedDate = ''; this.startDate = ''; this.endDate = '';\n this.open = false;\n }}>\n Limpiar\n </button>\n <button class=\"dp-footer__today\" type=\"button\" onClick={() => {\n if (this.selectionMode !== 'range') { this.selectedDate = today; this.open = false; this.dropiChangeDate.emit(today); }\n else { this.startDate = today; this.endDate = ''; }\n }}>\n Hoy\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"dropi-date-picker.entry.js","mappings":";;AAAA,MAAM,kBAAkB,GAAG,MAAM,CAAC,usIAAusI,CAAC;;ACE1uI,MAAM,SAAS,GAAG;IAChB,OAAO,EAAC,SAAS,EAAC,OAAO,EAAC,OAAO,EAAC,MAAM,EAAC,OAAO;IAChD,OAAO,EAAC,QAAQ,EAAC,YAAY,EAAC,SAAS,EAAC,WAAW,EAAC;CACrD;AACD,MAAM,OAAO,GAAG,CAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,CAAC;MAavC,eAAe,GAAA,MAAA;;;;;;;;;;;;;;AACP,IAAA,SAAS;;IAGH,IAAI,GAAW,EAAE;;IA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ACjD,UAEQ,CACL,CACF,CACP,CACG;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/dropi-date-picker/dropi-date-picker.css?tag=dropi-date-picker&encapsulation=shadow","src/components/dropi-date-picker/dropi-date-picker.tsx"],"sourcesContent":[":host { display: block; width: 100%; position: relative; }\n*, *::before, *::after { box-sizing: border-box; }\n\n.dp-label {\n display: block;\n font-size: var(--font-size-xxs, 10px);\n color: var(--Gray-Gray-600, #475066);\n margin-bottom: 4px;\n}\n\n/* Trigger */\n.dp-trigger {\n width: 100%;\n height: 44px;\n display: flex;\n align-items: center;\n gap: var(--Size-2, 8px);\n padding: 0 var(--Size-3, 12px);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-2, 8px);\n background: var(--Neutral-White, #ffffff);\n cursor: pointer;\n font-family: inherit;\n transition: border-color 0.2s;\n}\n.dp-trigger:hover:not(:disabled) { border-color: var(--Info-Info-500, #50a5f1); }\n.dp-trigger--disabled { background: var(--Gray-Gray-50, #f7f8fa); cursor: not-allowed; opacity: 0.6; }\n\n.dp-trigger__value {\n flex: 1;\n text-align: left;\n font-size: var(--font-size-xs, 12px);\n color: var(--Gray-Gray-700, #32394d);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.dp-trigger__placeholder { color: var(--Gray-Gray-400, #858ea6); }\n\n/* Popup */\n.dp-popup {\n position: absolute;\n top: calc(100% + 8px);\n left: 0;\n width: 320px;\n background: var(--Neutral-White, #ffffff);\n border: 1px solid var(--Gray-Gray-200, #c3c9d9);\n border-radius: var(--Border-3, 12px);\n box-shadow: 0 4px 16px rgba(0,0,0,0.08);\n z-index: 300;\n padding: var(--Size-4, 16px);\n}\n\n/* Navigation */\n.dp-nav {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: var(--Size-4, 16px);\n}\n\n.dp-nav__btn {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n transition: background 0.15s;\n}\n.dp-nav__btn:hover { background: var(--Gray-Gray-50, #f7f8fa); }\n\n.dp-nav__title {\n font-size: var(--font-size-s, 14px);\n font-weight: var(--font-weight-bold, 700);\n color: var(--Gray-Gray-700, #32394d);\n display: flex;\n gap: 8px;\n}\n\n/* Grid */\n.dp-grid {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n row-gap: 8px;\n column-gap: 4px;\n}\n\n.dp-day-header {\n font-size: var(--font-size-s, 14px);\n color: var(--Gray-Gray-700, #32394d);\n text-align: center;\n padding: 8px 0;\n font-weight: var(--font-weight-bold, 700);\n}\n\n/* Day cells */\n.dp-cell {\n aspect-ratio: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--font-size-xs, 12px);\n font-family: inherit;\n border: none;\n cursor: pointer;\n background: transparent;\n color: var(--Gray-Gray-600, #475066);\n width: 100%;\n position: relative;\n z-index: 1;\n padding: 0;\n}\n\n/* Pseudo-element for the circle (selected / hover / today) */\n.dp-cell::after {\n content: \"\";\n position: absolute;\n top: 0; left: 0; right: 0; bottom: 0;\n border-radius: 50%;\n transition: all 0.2s;\n z-index: -1;\n background: transparent;\n}\n\n/* Pseudo-element for the continuous light-orange range background */\n.dp-cell::before {\n content: \"\";\n position: absolute;\n top: 0; bottom: 0;\n z-index: -2;\n border-radius: 0;\n background: transparent;\n}\n\n.dp-cell:hover:not(:disabled)::after {\n background: var(--Gray-Gray-100, #e6eaf2);\n}\n\n.dp-cell--other-month { color: var(--Gray-Gray-300, #a0a9c0); }\n\n.dp-cell--today {\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--today::after {\n background: var(--Gray-Gray-100, #e6eaf2);\n}\n\n.dp-cell--selected {\n color: var(--Neutral-White, #ffffff);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--selected::after {\n background: var(--Orange-orange-500, #f49a3d) !important;\n}\n\n/* Range modes */\n.dp-cell--range-start, .dp-cell--range-end {\n color: var(--Neutral-White, #ffffff);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--range-start::after, .dp-cell--range-end::after {\n background: var(--Orange-orange-500, #f49a3d) !important;\n}\n\n.dp-cell--in-range {\n color: var(--Orange-orange-500, #f49a3d);\n font-weight: var(--font-weight-bold, 700);\n}\n.dp-cell--in-range::before {\n left: -2px; right: -2px;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-start::before {\n left: 50%; right: -2px;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-end::before {\n left: -2px; right: 50%;\n background: var(--Orange-orange-50, #fef5ec);\n}\n.dp-cell--range-start.dp-cell--range-end::before {\n background: transparent;\n}\n\n.dp-cell--disabled { opacity: 0.35; cursor: not-allowed; }\n\n/* Footer */\n.dp-footer {\n display: flex;\n justify-content: space-between;\n margin-top: var(--Size-3, 12px);\n border-top: 1px solid var(--Gray-Gray-100, #e6eaf2);\n padding-top: var(--Size-2, 8px);\n}\n\n.dp-footer__clear,\n.dp-footer__today {\n background: none;\n border: none;\n padding: 4px 8px;\n font-size: var(--font-size-xxs, 10px);\n font-family: inherit;\n cursor: pointer;\n border-radius: var(--Border-1, 4px);\n transition: background 0.15s;\n}\n.dp-footer__clear { color: var(--Gray-Gray-500, #69738c); }\n.dp-footer__today { color: var(--Orange-orange-500, #f49a3d); font-weight: var(--font-weight-bold, 700); }\n.dp-footer__clear:hover { background: var(--Gray-Gray-50, #f7f8fa); }\n.dp-footer__today:hover { background: var(--Orange-orange-50, #fef5ec); }\n","import { Component, Prop, State, Event, EventEmitter, h, Element, Listen, AttachInternals, Watch } from '@stencil/core';\n\nconst MONTHS_ES = [\n 'Enero','Febrero','Marzo','Abril','Mayo','Junio',\n 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'\n];\nconst DAYS_ES = ['Do','Lu','Ma','Mi','Ju','Vi','Sa'];\n\n/**\n * @component dropi-date-picker\n * Calendar date picker with optional date range mode.\n * Emits ISO date strings (YYYY-MM-DD).\n */\n@Component({\n tag: 'dropi-date-picker',\n styleUrl: 'dropi-date-picker.css',\n shadow: true,\n formAssociated: true,\n})\nexport class DropiDatePicker {\n @AttachInternals() internals: ElementInternals;\n\n /** Name for native form submission */\n @Prop({ reflect: true }) name: string = '';\n\n /** Selected date (ISO string, single mode) - matches Angular 'selectedDate' */\n @Prop({ mutable: true }) selectedDate: string = '';\n /** Range start date (ISO string, range mode) */\n @Prop({ mutable: true }) startDate: string = '';\n /** Range end date (ISO string, range mode) */\n @Prop({ mutable: true }) endDate: string = '';\n\n @Watch('selectedDate')\n @Watch('startDate')\n @Watch('endDate')\n valueChanged() {\n this.updateFormValue();\n }\n\n /** Enable range selection - matches Angular selectionMode */\n @Prop() selectionMode: 'single' | 'range' = 'single';\n /** Min selectable date (ISO string) */\n @Prop() minDate: string = '';\n /** Max selectable date (ISO string) */\n @Prop() maxDate: string = '';\n /** Label */\n @Prop() label: string | null = null;\n /** Placeholder */\n @Prop() placeholder: string = 'DD/MM/YYYY';\n /** Disabled */\n @Prop() disabled: boolean = false;\n /** Is invalid state - matches Angular */\n @Prop() isInvalid: boolean = false;\n /** Loading state - matches Angular */\n @Prop() loading: boolean = false;\n\n @State() private open: boolean = false;\n @State() private viewYear: number = new Date().getFullYear();\n @State() private viewMonth: number = new Date().getMonth();\n @State() private hoverDate: string = '';\n\n @Element() el!: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleDocClick(e: MouseEvent) {\n if (this.open && !e.composedPath().includes(this.el)) {\n this.open = false;\n }\n }\n\n /** Emitted when date selected — matches Angular 'onChangeDate' */\n @Event() dropiChangeDate: EventEmitter<string>;\n /** Emitted when panel closes — matches Angular 'onClosePanel' */\n @Event() dropiClosePanel: EventEmitter<void>;\n /** Emitted when range selected */\n @Event() dropiRangeChange: EventEmitter<{ start: string; end: string }>;\n\n componentWillLoad() {\n this.updateFormValue();\n }\n\n private updateFormValue() {\n if (this.selectionMode === 'range') {\n this.internals.setFormValue(this.startDate && this.endDate ? `${this.startDate},${this.endDate}` : '');\n } else {\n this.internals.setFormValue(this.selectedDate || '');\n }\n }\n\n\n private get displayValue(): string {\n if (this.selectionMode === 'range') {\n if (this.startDate && this.endDate) return `${this.startDate} – ${this.endDate}`;\n if (this.startDate) return this.startDate;\n return '';\n }\n return this.selectedDate;\n }\n\n private open_() {\n if (this.disabled) return;\n if (this.selectedDate) {\n const d = new Date(this.selectedDate);\n this.viewYear = d.getFullYear();\n this.viewMonth = d.getMonth();\n } else if (this.startDate) {\n const d = new Date(this.startDate);\n this.viewYear = d.getFullYear();\n this.viewMonth = d.getMonth();\n }\n this.open = true;\n }\n\n private prevMonth() {\n if (this.viewMonth === 0) { this.viewMonth = 11; this.viewYear--; }\n else this.viewMonth--;\n }\n\n private nextMonth() {\n if (this.viewMonth === 11) { this.viewMonth = 0; this.viewYear++; }\n else this.viewMonth++;\n }\n\n private toISO(year: number, month: number, day: number): string {\n return `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;\n }\n\n private isDisabled(iso: string): boolean {\n if (this.minDate && iso < this.minDate) return true;\n if (this.maxDate && iso > this.maxDate) return true;\n return false;\n }\n\n private isInRange(iso: string): boolean {\n if (this.selectionMode !== 'range') return false;\n const start = this.startDate;\n const end = this.endDate || this.hoverDate;\n if (!start || !end) return false;\n const [s, e] = start <= end ? [start, end] : [end, start];\n return iso > s && iso < e;\n }\n\n private selectDate(iso: string) {\n if (this.isDisabled(iso)) return;\n\n if (this.selectionMode !== 'range') {\n this.selectedDate = iso;\n this.open = false;\n this.dropiChangeDate.emit(iso);\n return;\n }\n\n // Range mode\n if (!this.startDate || (this.startDate && this.endDate)) {\n this.startDate = iso;\n this.endDate = '';\n } else {\n if (iso < this.startDate) {\n this.endDate = this.startDate;\n this.startDate = iso;\n } else {\n this.endDate = iso;\n }\n this.open = false;\n this.dropiRangeChange.emit({ start: this.startDate, end: this.endDate });\n }\n }\n\n private buildDays(): Array<{ iso: string; day: number; currentMonth: boolean }> {\n const year = this.viewYear;\n const month = this.viewMonth;\n\n const firstDay = new Date(year, month, 1).getDay();\n // Adjust to Sunday-first\n const startOffset = firstDay;\n const daysInMonth = new Date(year, month + 1, 0).getDate();\n const daysInPrevMonth = new Date(year, month, 0).getDate();\n\n const cells: Array<{ iso: string; day: number; currentMonth: boolean }> = [];\n\n // Previous month filler\n for (let i = startOffset - 1; i >= 0; i--) {\n const d = daysInPrevMonth - i;\n const m = month === 0 ? 11 : month - 1;\n const y = month === 0 ? year - 1 : year;\n cells.push({ iso: this.toISO(y, m, d), day: d, currentMonth: false });\n }\n\n // Current month\n for (let d = 1; d <= daysInMonth; d++) {\n cells.push({ iso: this.toISO(year, month, d), day: d, currentMonth: true });\n }\n\n // Next month filler\n const remaining = 42 - cells.length;\n for (let d = 1; d <= remaining; d++) {\n const m = month === 11 ? 0 : month + 1;\n const y = month === 11 ? year + 1 : year;\n cells.push({ iso: this.toISO(y, m, d), day: d, currentMonth: false });\n }\n\n return cells;\n }\n\n render() {\n const days = this.buildDays();\n const today = new Date().toISOString().slice(0, 10);\n\n return (\n <div class=\"dp-wrap\">\n {this.label && <label class=\"dp-label\">{this.label}</label>}\n\n {/* Trigger */}\n <button\n class={{\n 'dp-trigger': true,\n 'dp-trigger--disabled': this.disabled,\n 'dp-trigger--invalid': this.isInvalid,\n 'dp-trigger--loading': this.loading\n }}\n onClick={() => this.open ? this.open = false : this.open_()}\n disabled={this.disabled || this.loading}\n type=\"button\"\n >\n <dropi-icon name=\"Calendar\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-400\" />\n <span class={{ 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue }}>\n {this.displayValue || this.placeholder}\n </span>\n <dropi-icon name=\"Arrow-Down-2\" iconWidth=\"12px\" iconHeight=\"12px\" color=\"Gray-Gray-400\" />\n </button>\n\n {/* Calendar popup */}\n {this.open && (\n <div class=\"dp-popup\">\n {/* Navigation */}\n <div class=\"dp-nav\">\n <button class=\"dp-nav__btn\" onClick={() => this.prevMonth()} type=\"button\">\n <dropi-icon name=\"Arrow-Left-2\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-600\" />\n </button>\n <span class=\"dp-nav__title\">\n <span>{MONTHS_ES[this.viewMonth]}</span>\n <span>{this.viewYear}</span>\n </span>\n <button class=\"dp-nav__btn\" onClick={() => this.nextMonth()} type=\"button\">\n <dropi-icon name=\"Arrow-Right-2\" iconWidth=\"16px\" iconHeight=\"16px\" color=\"Gray-Gray-600\" />\n </button>\n </div>\n\n {/* Day headers */}\n <div class=\"dp-grid\">\n {DAYS_ES.map(d => (\n <div class=\"dp-day-header\">{d}</div>\n ))}\n\n {/* Day cells */}\n {days.map(({ iso, day, currentMonth }) => {\n const isSelected = this.selectionMode !== 'range'\n ? iso === this.selectedDate\n : iso === this.startDate || iso === this.endDate;\n const isRangeStart = this.selectionMode === 'range' && iso === this.startDate;\n const isRangeEnd = this.selectionMode === 'range' && iso === this.endDate;\n const inRange = this.isInRange(iso);\n const disabled = this.isDisabled(iso);\n const isToday = iso === today;\n\n return (\n <button\n class={{\n 'dp-cell': true,\n 'dp-cell--other-month': !currentMonth,\n 'dp-cell--today': isToday,\n 'dp-cell--selected': isSelected,\n 'dp-cell--range-start': isRangeStart,\n 'dp-cell--range-end': isRangeEnd,\n 'dp-cell--in-range': inRange,\n 'dp-cell--disabled': disabled,\n }}\n type=\"button\"\n disabled={disabled}\n onClick={() => this.selectDate(iso)}\n onMouseEnter={() => { if (this.selectionMode === 'range' && this.startDate && !this.endDate) this.hoverDate = iso; }}\n onMouseLeave={() => this.hoverDate = ''}\n >\n {day}\n </button>\n );\n })}\n </div>\n\n {/* Footer */}\n <div class=\"dp-footer\">\n <button class=\"dp-footer__clear\" type=\"button\" onClick={() => {\n this.selectedDate = ''; this.startDate = ''; this.endDate = '';\n this.open = false;\n }}>\n Limpiar\n </button>\n <button class=\"dp-footer__today\" type=\"button\" onClick={() => {\n if (this.selectionMode !== 'range') { this.selectedDate = today; this.open = false; this.dropiChangeDate.emit(today); }\n else { this.startDate = today; this.endDate = ''; }\n }}>\n Hoy\n </button>\n </div>\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -153,6 +153,7 @@ const DropiInput = class {
|
|
|
153
153
|
this.value = val;
|
|
154
154
|
this.internals.setFormValue(val);
|
|
155
155
|
this.dropiInput.emit(val);
|
|
156
|
+
this.dropiChange.emit(val);
|
|
156
157
|
}
|
|
157
158
|
handleKeyDown(e) {
|
|
158
159
|
if ((this.isNumericInput || this.isMoneyInput || this.isThousandSeparator) && !this.isAllowedNumberKey(e)) {
|
|
@@ -167,7 +168,6 @@ const DropiInput = class {
|
|
|
167
168
|
}
|
|
168
169
|
handleBlur() {
|
|
169
170
|
this.touched = true;
|
|
170
|
-
this.dropiChange.emit(this.value);
|
|
171
171
|
this.dropiBlur.emit();
|
|
172
172
|
}
|
|
173
173
|
togglePassword() {
|
|
@@ -233,14 +233,14 @@ const DropiInput = class {
|
|
|
233
233
|
render() {
|
|
234
234
|
const showObligatoryAsterisk = this.required && this.showObligatoryAsterisk && !this.disabled;
|
|
235
235
|
const showIconInline = !!this.icon;
|
|
236
|
-
return (h("div", { key: '
|
|
236
|
+
return (h("div", { key: '6af757e1d86bfe96d471e9cbed258a50727ae190', class: { 'fixed-label-container': this.fixedLabel } }, this.fixedLabel && (h("div", { key: 'e88bf81fd2b79933e386c2e5fa38f57d85cfe836', class: "input-label Body-S-Regular" }, this.label, showObligatoryAsterisk && h("span", { key: 'be8ec1b0d3ef624ca22e58ae072917ad2ecc79fb', class: "asterisk" }, " *"))), h("div", { key: '4806c0d250f00bb08788d9d6aa935ca15f2aa826', class: "form-group" }, h("div", { key: 'b9fa243d299bcd165458947d6695fcc845764276', class: { 'input-container': true, 'input-container--has-icon': showIconInline } }, showIconInline && (h("dropi-icon", { key: '92b3cf11803745784f13e908ea88992f76c74473', class: "icon-input", name: this.icon, color: this.iconColor, iconWidth: "20px", iconHeight: "20px", style: { width: '20px', height: '20px' } })), this.passwordInput && (h("dropi-icon", { key: 'c7dc725d577a6d4afb7f87c8b53b16c621de9e86', class: "icon-input-password", name: this.showPassword ? 'Eye' : 'Eye-crossed', iconWidth: "20px", iconHeight: "20px", style: { width: '20px', height: '20px' }, color: "Gray-Gray-500", onClick: () => this.togglePassword() })), h("input", { key: '8146ae1794cbe1f200bb681358c7319f10faab3c', id: this.resolvedId, class: {
|
|
237
237
|
'form-control': true,
|
|
238
238
|
'form-control-valid': !this.isInvalid && this.touched && !!this.value,
|
|
239
239
|
'form-control-invalid': this.isInvalid,
|
|
240
240
|
'padding-icon': showIconInline,
|
|
241
241
|
'text-password': this.passwordInput && !this.showPassword,
|
|
242
242
|
'fixed-label-input': this.fixedLabel,
|
|
243
|
-
}, type: this.inputType, value: this.value, placeholder: this.fixedLabel ? this.placeholder : ' ', disabled: this.disabled, required: this.required, maxLength: this.maxLength, inputMode: this.inputMode, "data-cy": undefined, onInput: e => this.handleInput(e), onKeyDown: e => this.handleKeyDown(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), !this.fixedLabel && (h("label", { key: '
|
|
243
|
+
}, type: this.inputType, value: this.value, placeholder: this.fixedLabel ? this.placeholder : ' ', disabled: this.disabled, required: this.required, maxLength: this.maxLength, inputMode: this.inputMode, "data-cy": undefined, onInput: e => this.handleInput(e), onKeyDown: e => this.handleKeyDown(e), onFocus: () => this.handleFocus(), onBlur: () => this.handleBlur() }), !this.fixedLabel && (h("label", { key: '005d15af6b50b2cb2d47ac8381a722794eb273e5', class: "Body-S-Regular label-bottom", htmlFor: this.resolvedId }, this.label, showObligatoryAsterisk && h("span", { key: 'ad56df877cff3df8a801cdfcb607d9af02f7465a', class: "asterisk" }, " *"))), this.showHelper && (h("div", { key: '76e858c13a798f69b2d20ee9908f17531568dad1', class: "form-control-helper" }, this.isInvalid && h("dropi-icon", { key: '3e42ffb4db7444ebfb49cc9c6720d5a9d02b2860', name: "Warning-circle", iconWidth: "12px", iconHeight: "12px", color: "Error-Error-500" }), h("span", { key: '5e970903eb51ca6b72a43bef0edf6ef149443247', class: {
|
|
244
244
|
'disabled-helper': this.disabled,
|
|
245
245
|
'invalid-color': this.isInvalid,
|
|
246
246
|
} }, this.textHelper)))))));
|