@dropi/ui 0.1.51 → 0.1.52

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.
Files changed (289) hide show
  1. package/dist/cjs/dropi-date-picker-range.cjs.entry.js +92 -20
  2. package/dist/cjs/dropi-date-picker.cjs.entry.js +140 -55
  3. package/dist/cjs/dropi-drawer.cjs.entry.js +2 -2
  4. package/dist/cjs/dropi-empty-state.cjs.entry.js +1 -1
  5. package/dist/cjs/dropi-favorite-button.cjs.entry.js +1 -1
  6. package/dist/cjs/dropi-file-upload-progress-bar.cjs.entry.js +1 -1
  7. package/dist/cjs/dropi-file-upload.cjs.entry.js +1 -1
  8. package/dist/cjs/dropi-image-miniature.cjs.entry.js +1 -1
  9. package/dist/cjs/dropi-input_3.cjs.entry.js +2 -2
  10. package/dist/cjs/dropi-logo.cjs.entry.js +1 -1
  11. package/dist/cjs/dropi-navbar.cjs.entry.js +2 -2
  12. package/dist/cjs/dropi-otp-send-code.cjs.entry.js +2 -2
  13. package/dist/cjs/dropi-phone-input.cjs.entry.js +2 -2
  14. package/dist/cjs/dropi-progress-bar.cjs.entry.js +1 -1
  15. package/dist/cjs/dropi-radio-button.cjs.entry.js +1 -1
  16. package/dist/cjs/dropi-read-more.cjs.entry.js +1 -1
  17. package/dist/cjs/dropi-select.cjs.entry.js +1 -1
  18. package/dist/cjs/dropi-switch.cjs.entry.js +1 -1
  19. package/dist/cjs/dropi-tag-type-product.cjs.entry.js +1 -1
  20. package/dist/cjs/dropi-tooltip.cjs.entry.js +1 -1
  21. package/dist/cjs/dropi-ui.cjs.js +1 -1
  22. package/dist/cjs/dropi-youtube-lazy-video.cjs.entry.js +1 -1
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/collection/components/dropi-date-picker/dropi-date-picker.css +119 -72
  25. package/dist/collection/components/dropi-date-picker/dropi-date-picker.js +169 -62
  26. package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.css +60 -4
  27. package/dist/collection/components/dropi-date-picker-range/dropi-date-picker-range.js +96 -23
  28. package/dist/collection/components/dropi-drawer/dropi-drawer.js +2 -2
  29. package/dist/collection/components/dropi-empty-state/dropi-empty-state.js +1 -1
  30. package/dist/collection/components/dropi-favorite-button/dropi-favorite-button.js +1 -1
  31. package/dist/collection/components/dropi-file-upload/dropi-file-upload.js +1 -1
  32. package/dist/collection/components/dropi-file-upload-progress-bar/dropi-file-upload-progress-bar.js +1 -1
  33. package/dist/collection/components/dropi-image-miniature/dropi-image-miniature.js +1 -1
  34. package/dist/collection/components/dropi-logo/dropi-logo.js +1 -1
  35. package/dist/collection/components/dropi-navbar/dropi-navbar.js +2 -2
  36. package/dist/collection/components/dropi-otp-send-code/dropi-otp-send-code.js +2 -2
  37. package/dist/collection/components/dropi-paginator/dropi-paginator.js +2 -2
  38. package/dist/collection/components/dropi-phone-input/dropi-phone-input.js +2 -2
  39. package/dist/collection/components/dropi-progress-bar/dropi-progress-bar.js +1 -1
  40. package/dist/collection/components/dropi-radio-button/dropi-radio-button.js +1 -1
  41. package/dist/collection/components/dropi-read-more/dropi-read-more.js +1 -1
  42. package/dist/collection/components/dropi-select/dropi-select.js +1 -1
  43. package/dist/collection/components/dropi-switch/dropi-switch.js +1 -1
  44. package/dist/collection/components/dropi-tag-type-product/dropi-tag-type-product.js +1 -1
  45. package/dist/collection/components/dropi-tooltip/dropi-tooltip.js +1 -1
  46. package/dist/collection/components/dropi-youtube-lazy-video/dropi-youtube-lazy-video.js +1 -1
  47. package/dist/components/dropi-card-section.js +1 -1
  48. package/dist/components/dropi-date-picker-range.js +1 -1
  49. package/dist/components/dropi-date-picker.js +1 -1
  50. package/dist/components/dropi-drawer.js +1 -1
  51. package/dist/components/dropi-empty-state.js +1 -1
  52. package/dist/components/dropi-favorite-button.js +1 -1
  53. package/dist/components/dropi-file-upload-progress-bar.js +1 -1
  54. package/dist/components/dropi-file-upload.js +1 -1
  55. package/dist/components/dropi-image-miniature.js +1 -1
  56. package/dist/components/dropi-logo.js +1 -1
  57. package/dist/components/dropi-navbar.js +1 -1
  58. package/dist/components/dropi-otp-send-code.js +1 -1
  59. package/dist/components/dropi-paginator.js +1 -1
  60. package/dist/components/dropi-phone-input.js +1 -1
  61. package/dist/components/dropi-progress-bar.js +1 -1
  62. package/dist/components/dropi-radio-button.js +1 -1
  63. package/dist/components/dropi-read-more.js +1 -1
  64. package/dist/components/dropi-select.js +1 -1
  65. package/dist/components/dropi-switch.js +1 -1
  66. package/dist/components/dropi-table.js +1 -1
  67. package/dist/components/dropi-tag-type-product.js +1 -1
  68. package/dist/components/dropi-tooltip.js +1 -1
  69. package/dist/components/dropi-youtube-lazy-video.js +1 -1
  70. package/dist/components/p-34gP610W.js +1 -0
  71. package/dist/components/p-BfQEGsBq.js +1 -0
  72. package/dist/components/p-BieZ2Zwa.js +1 -0
  73. package/dist/components/p-Ckpdx21D.js +1 -0
  74. package/dist/components/p-CqTImUhL.js +1 -0
  75. package/dist/components/p-D76mTEoh.js +1 -0
  76. package/dist/components/p-DdM0zO53.js +1 -0
  77. package/dist/components/p-eusoHxve.js +1 -0
  78. package/dist/docs.json +40 -11
  79. package/dist/dropi-ui/dropi-accordion-item.entry.js +1 -1
  80. package/dist/dropi-ui/dropi-accordion.entry.js +1 -1
  81. package/dist/dropi-ui/dropi-alert-legacy.entry.js +1 -1
  82. package/dist/dropi-ui/dropi-alert-modal.entry.js +15 -9
  83. package/dist/dropi-ui/dropi-alert-modal.entry.js.map +1 -1
  84. package/dist/dropi-ui/dropi-alert.entry.js +1 -1
  85. package/dist/dropi-ui/dropi-avatars.entry.js +1 -1
  86. package/dist/dropi-ui/dropi-badge-legacy.entry.js +1 -1
  87. package/dist/dropi-ui/dropi-badge.entry.js +1 -1
  88. package/dist/dropi-ui/dropi-banner-external.entry.js +1 -1
  89. package/dist/dropi-ui/dropi-breadcrumb.entry.js +1 -1
  90. package/dist/dropi-ui/dropi-button.entry.js +1 -1
  91. package/dist/dropi-ui/dropi-card-checkbox.entry.js +2 -2
  92. package/dist/dropi-ui/dropi-card-checkbox.entry.js.map +1 -1
  93. package/dist/dropi-ui/dropi-card-product.entry.js +1 -1
  94. package/dist/dropi-ui/dropi-card-section.entry.js +2 -2
  95. package/dist/dropi-ui/dropi-card-section.entry.js.map +1 -1
  96. package/dist/dropi-ui/dropi-carousel.entry.js +1 -1
  97. package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js +2 -2
  98. package/dist/dropi-ui/dropi-checkbox-selection-list.entry.js.map +1 -1
  99. package/dist/dropi-ui/dropi-checkbox.entry.js +4 -4
  100. package/dist/dropi-ui/dropi-checkbox.entry.js.map +1 -1
  101. package/dist/dropi-ui/dropi-chips.entry.js +1 -1
  102. package/dist/dropi-ui/dropi-city-selector.entry.js +1 -1
  103. package/dist/dropi-ui/dropi-color-picker.entry.js +1 -1
  104. package/dist/dropi-ui/dropi-country-flags.entry.js +1 -1
  105. package/dist/dropi-ui/dropi-country-selector.entry.js +4 -4
  106. package/dist/dropi-ui/dropi-country-selector.entry.js.map +1 -1
  107. package/dist/dropi-ui/dropi-date-picker-range.entry.js +211 -32
  108. package/dist/dropi-ui/dropi-date-picker-range.entry.js.map +1 -1
  109. package/dist/dropi-ui/dropi-date-picker.entry.js +104 -57
  110. package/dist/dropi-ui/dropi-date-picker.entry.js.map +1 -1
  111. package/dist/dropi-ui/dropi-drawer.entry.js +3 -3
  112. package/dist/dropi-ui/dropi-dropdown.entry.js +2 -2
  113. package/dist/dropi-ui/dropi-dropdown.entry.js.map +1 -1
  114. package/dist/dropi-ui/dropi-empty-state.entry.js +88 -11
  115. package/dist/dropi-ui/dropi-empty-state.entry.js.map +1 -1
  116. package/dist/dropi-ui/dropi-favorite-button.entry.js +2 -2
  117. package/dist/dropi-ui/dropi-file-upload-progress-bar.entry.js +2 -2
  118. package/dist/dropi-ui/dropi-file-upload.entry.js +2 -2
  119. package/dist/dropi-ui/dropi-icon.entry.js +295 -24
  120. package/dist/dropi-ui/dropi-icon.entry.js.map +1 -1
  121. package/dist/dropi-ui/dropi-ilustration-icon.entry.js +11 -7
  122. package/dist/dropi-ui/dropi-ilustration-icon.entry.js.map +1 -1
  123. package/dist/dropi-ui/dropi-image-miniature.entry.js +2 -2
  124. package/dist/dropi-ui/dropi-image-overlay.entry.js +1 -1
  125. package/dist/dropi-ui/dropi-input.entry.js +8 -6
  126. package/dist/dropi-ui/dropi-input.entry.js.map +1 -1
  127. package/dist/dropi-ui/dropi-languages-selector.entry.js +1 -1
  128. package/dist/dropi-ui/dropi-logo.entry.js +2 -2
  129. package/dist/dropi-ui/dropi-lottie-loader.entry.js +2 -2
  130. package/dist/dropi-ui/dropi-lottie-loader.entry.js.map +1 -1
  131. package/dist/dropi-ui/dropi-media-player.entry.js +1 -1
  132. package/dist/dropi-ui/dropi-modal.entry.js +1 -1
  133. package/dist/dropi-ui/dropi-navbar.entry.js +3 -3
  134. package/dist/dropi-ui/dropi-otp-send-code.entry.js +4 -4
  135. package/dist/dropi-ui/dropi-otp-send-code.entry.js.map +1 -1
  136. package/dist/dropi-ui/dropi-paginator.entry.js +3 -3
  137. package/dist/dropi-ui/dropi-phone-input.entry.js +4 -4
  138. package/dist/dropi-ui/dropi-phone-input.entry.js.map +1 -1
  139. package/dist/dropi-ui/dropi-progress-bar.entry.js +2 -2
  140. package/dist/dropi-ui/dropi-radio-button.entry.js +4 -4
  141. package/dist/dropi-ui/dropi-radio-button.entry.js.map +1 -1
  142. package/dist/dropi-ui/dropi-radio-selection-list.entry.js +1 -1
  143. package/dist/dropi-ui/dropi-read-more.entry.js +2 -2
  144. package/dist/dropi-ui/dropi-search.entry.js +2 -2
  145. package/dist/dropi-ui/dropi-search.entry.js.map +1 -1
  146. package/dist/dropi-ui/dropi-select.entry.js +3 -3
  147. package/dist/dropi-ui/dropi-select.entry.js.map +1 -1
  148. package/dist/dropi-ui/dropi-sidebar.entry.js +1 -1
  149. package/dist/dropi-ui/dropi-simple-stepper.entry.js +1 -1
  150. package/dist/dropi-ui/dropi-skeleton.entry.js +1 -1
  151. package/dist/dropi-ui/dropi-steps.entry.js +1 -1
  152. package/dist/dropi-ui/dropi-switch.entry.js +3 -3
  153. package/dist/dropi-ui/dropi-switch.entry.js.map +1 -1
  154. package/dist/dropi-ui/dropi-table.entry.js +4 -4
  155. package/dist/dropi-ui/dropi-table.entry.js.map +1 -1
  156. package/dist/dropi-ui/dropi-tabs.entry.js +1 -1
  157. package/dist/dropi-ui/dropi-tag-type-product.entry.js +2 -2
  158. package/dist/dropi-ui/dropi-tag.entry.js +1 -1
  159. package/dist/dropi-ui/dropi-text-area.entry.js +8 -8
  160. package/dist/dropi-ui/dropi-text-area.entry.js.map +1 -1
  161. package/dist/dropi-ui/dropi-time-line.entry.js +1 -1
  162. package/dist/dropi-ui/dropi-toast.entry.js +1 -1
  163. package/dist/dropi-ui/dropi-tooltip-v2.entry.js +1 -1
  164. package/dist/dropi-ui/dropi-tooltip.entry.js +2 -2
  165. package/dist/dropi-ui/dropi-ui.esm.js +1 -1
  166. package/dist/dropi-ui/dropi-ui.esm.js.map +1 -1
  167. package/dist/dropi-ui/dropi-vertical-steps.entry.js +1 -1
  168. package/dist/dropi-ui/dropi-youtube-lazy-video.entry.js +2 -2
  169. package/dist/dropi-ui/index-CPacpXAJ.js +4625 -0
  170. package/dist/dropi-ui/index-CPacpXAJ.js.map +1 -0
  171. package/dist/dropi-ui/p-0190a96b.entry.js +1 -0
  172. package/dist/dropi-ui/p-02e0f8cc.entry.js +1 -0
  173. package/dist/dropi-ui/p-0551c30a.entry.js +1 -0
  174. package/dist/dropi-ui/p-05541247.entry.js +1 -0
  175. package/dist/dropi-ui/p-07cc280c.entry.js +1 -0
  176. package/dist/dropi-ui/p-094ab555.entry.js +1 -0
  177. package/dist/dropi-ui/p-0d3cabe9.entry.js +1 -0
  178. package/dist/dropi-ui/p-0d8ff50d.entry.js +1 -0
  179. package/dist/dropi-ui/p-11833072.entry.js +1 -0
  180. package/dist/dropi-ui/p-119a353b.entry.js +1 -0
  181. package/dist/dropi-ui/p-13ae29ad.entry.js +1 -0
  182. package/dist/dropi-ui/p-149c92ba.entry.js +1 -0
  183. package/dist/dropi-ui/p-17133bc1.entry.js +1 -0
  184. package/dist/dropi-ui/p-181b2d76.entry.js +1 -0
  185. package/dist/dropi-ui/p-1976985d.entry.js +1 -0
  186. package/dist/dropi-ui/p-1a874d9f.entry.js +1 -0
  187. package/dist/dropi-ui/p-1cc30188.entry.js +1 -0
  188. package/dist/dropi-ui/p-267fda26.entry.js +1 -0
  189. package/dist/dropi-ui/p-26c997a4.entry.js +1 -0
  190. package/dist/dropi-ui/p-280c5731.entry.js +1 -0
  191. package/dist/dropi-ui/p-287a3a81.entry.js +1 -0
  192. package/dist/dropi-ui/p-29e4dacf.entry.js +1 -0
  193. package/dist/dropi-ui/p-2af47f62.entry.js +1 -0
  194. package/dist/dropi-ui/p-2d1a6f05.entry.js +1 -0
  195. package/dist/dropi-ui/p-2f6b96de.entry.js +1 -0
  196. package/dist/dropi-ui/p-32512758.entry.js +1 -0
  197. package/dist/dropi-ui/p-32c71a16.entry.js +1 -0
  198. package/dist/dropi-ui/p-34f2e28d.entry.js +1 -0
  199. package/dist/dropi-ui/p-3769ad78.entry.js +1 -0
  200. package/dist/dropi-ui/p-3a9cd930.entry.js +1 -0
  201. package/dist/dropi-ui/p-3b1bb32e.entry.js +1 -0
  202. package/dist/dropi-ui/p-4390c849.entry.js +1 -0
  203. package/dist/dropi-ui/p-492f9d36.entry.js +1 -0
  204. package/dist/dropi-ui/p-4f4b4a39.entry.js +1 -0
  205. package/dist/dropi-ui/p-51a44cdc.entry.js +1 -0
  206. package/dist/dropi-ui/p-59caf3ac.entry.js +1 -0
  207. package/dist/dropi-ui/p-5e0b54e3.entry.js +1 -0
  208. package/dist/dropi-ui/p-63356807.entry.js +1 -0
  209. package/dist/dropi-ui/p-64dd3db0.entry.js +1 -0
  210. package/dist/dropi-ui/p-65e31926.entry.js +1 -0
  211. package/dist/dropi-ui/p-66cf3dbe.entry.js +1 -0
  212. package/dist/dropi-ui/p-6a6171ba.entry.js +1 -0
  213. package/dist/dropi-ui/p-6aaf5a93.entry.js +1 -0
  214. package/dist/dropi-ui/p-6d9b61a9.entry.js +1 -0
  215. package/dist/dropi-ui/p-71ad00c8.entry.js +1 -0
  216. package/dist/dropi-ui/p-788b7388.entry.js +1 -0
  217. package/dist/dropi-ui/p-7a78e38d.entry.js +1 -0
  218. package/dist/dropi-ui/p-7a9628df.entry.js +1 -0
  219. package/dist/dropi-ui/p-7be214a0.entry.js +1 -0
  220. package/dist/dropi-ui/p-7ce74f7f.entry.js +1 -0
  221. package/dist/dropi-ui/p-7e0783d3.entry.js +1 -0
  222. package/dist/dropi-ui/p-7f6f757b.entry.js +1 -0
  223. package/dist/dropi-ui/p-7f85578a.entry.js +1 -0
  224. package/dist/dropi-ui/p-81e8b29e.entry.js +1 -0
  225. package/dist/dropi-ui/p-83fa5e18.entry.js +1 -0
  226. package/dist/dropi-ui/p-870846af.entry.js +1 -0
  227. package/dist/dropi-ui/p-87167578.entry.js +1 -0
  228. package/dist/dropi-ui/p-8adb80a4.entry.js +1 -0
  229. package/dist/dropi-ui/p-92879d0d.entry.js +1 -0
  230. package/dist/dropi-ui/p-964ba5de.entry.js +1 -0
  231. package/dist/dropi-ui/p-97de6718.entry.js +1 -0
  232. package/dist/dropi-ui/p-9b7810f9.entry.js +1 -0
  233. package/dist/dropi-ui/p-9bfd53be.entry.js +1 -0
  234. package/dist/dropi-ui/p-9c9c6274.entry.js +1 -0
  235. package/dist/dropi-ui/p-a0a87272.entry.js +1 -0
  236. package/dist/dropi-ui/p-a1471797.entry.js +1 -0
  237. package/dist/dropi-ui/p-a469a6d4.entry.js +1 -0
  238. package/dist/dropi-ui/p-ad7ea336.entry.js +1 -0
  239. package/dist/dropi-ui/p-b063716d.entry.js +1 -0
  240. package/dist/dropi-ui/p-b4e9dba6.entry.js +1 -0
  241. package/dist/dropi-ui/p-b66d88bf.entry.js +1 -0
  242. package/dist/dropi-ui/p-b801e55f.entry.js +1 -0
  243. package/dist/dropi-ui/p-bb6b09b7.entry.js +1 -0
  244. package/dist/dropi-ui/p-c6c40748.entry.js +1 -0
  245. package/dist/dropi-ui/p-c72650a6.entry.js +1 -0
  246. package/dist/dropi-ui/p-d104c97d.entry.js +1 -0
  247. package/dist/dropi-ui/p-d6ab011e.entry.js +1 -0
  248. package/dist/dropi-ui/p-d7d7b98b.entry.js +1 -0
  249. package/dist/dropi-ui/p-d9f7e521.entry.js +1 -0
  250. package/dist/dropi-ui/p-e0641dc8.entry.js +1 -0
  251. package/dist/dropi-ui/p-e0d43ef4.entry.js +1 -0
  252. package/dist/dropi-ui/p-e2413d09.entry.js +1 -0
  253. package/dist/dropi-ui/p-e3339048.entry.js +1 -0
  254. package/dist/dropi-ui/p-eac3194d.entry.js +1 -0
  255. package/dist/dropi-ui/p-eed4f130.entry.js +1 -0
  256. package/dist/dropi-ui/p-f03f0bf3.entry.js +1 -0
  257. package/dist/dropi-ui/p-f1457004.entry.js +1 -0
  258. package/dist/dropi-ui/p-f50b982c.entry.js +1 -0
  259. package/dist/dropi-ui/p-f87589c0.entry.js +1 -0
  260. package/dist/dropi-ui/p-fce82770.entry.js +1 -0
  261. package/dist/esm/dropi-date-picker-range.entry.js +92 -20
  262. package/dist/esm/dropi-date-picker.entry.js +140 -55
  263. package/dist/esm/dropi-drawer.entry.js +2 -2
  264. package/dist/esm/dropi-empty-state.entry.js +1 -1
  265. package/dist/esm/dropi-favorite-button.entry.js +1 -1
  266. package/dist/esm/dropi-file-upload-progress-bar.entry.js +1 -1
  267. package/dist/esm/dropi-file-upload.entry.js +1 -1
  268. package/dist/esm/dropi-image-miniature.entry.js +1 -1
  269. package/dist/esm/dropi-input_3.entry.js +2 -2
  270. package/dist/esm/dropi-logo.entry.js +1 -1
  271. package/dist/esm/dropi-navbar.entry.js +2 -2
  272. package/dist/esm/dropi-otp-send-code.entry.js +2 -2
  273. package/dist/esm/dropi-phone-input.entry.js +2 -2
  274. package/dist/esm/dropi-progress-bar.entry.js +1 -1
  275. package/dist/esm/dropi-radio-button.entry.js +1 -1
  276. package/dist/esm/dropi-read-more.entry.js +1 -1
  277. package/dist/esm/dropi-select.entry.js +1 -1
  278. package/dist/esm/dropi-switch.entry.js +1 -1
  279. package/dist/esm/dropi-tag-type-product.entry.js +1 -1
  280. package/dist/esm/dropi-tooltip.entry.js +1 -1
  281. package/dist/esm/dropi-ui.js +1 -1
  282. package/dist/esm/dropi-youtube-lazy-video.entry.js +1 -1
  283. package/dist/esm/loader.js +1 -1
  284. package/dist/types/components/dropi-date-picker/dropi-date-picker.d.ts +22 -9
  285. package/dist/types/components/dropi-date-picker-range/dropi-date-picker-range.d.ts +11 -5
  286. package/dist/types/components.d.ts +19 -26
  287. package/hydrate/index.js +262 -101
  288. package/hydrate/index.mjs +262 -101
  289. package/package.json +1 -1
@@ -3,6 +3,7 @@ const MONTHS_ES = [
3
3
  'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
4
4
  'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
5
5
  ];
6
+ const MONTHS_SHORT = ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'];
6
7
  const DAYS_ES = ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'];
7
8
  /**
8
9
  * @component dropi-date-picker
@@ -13,16 +14,14 @@ export class DropiDatePicker {
13
14
  internals;
14
15
  /** Name for native form submission */
15
16
  name;
16
- /** Selected date (ISO string, single mode) - matches Angular 'selectedDate' */
17
+ /** Selected date (ISO string, single mode) */
17
18
  selectedDate = '';
18
19
  /** Range start date (ISO string, range mode) */
19
20
  startDate = '';
20
21
  /** Range end date (ISO string, range mode) */
21
22
  endDate = '';
22
- valueChanged() {
23
- this.updateFormValue();
24
- }
25
- /** Enable range selection - matches Angular selectionMode */
23
+ valueChanged() { this.updateFormValue(); }
24
+ /** Enable range selection */
26
25
  selectionMode = 'single';
27
26
  /** Min selectable date (ISO string) */
28
27
  minDate = '';
@@ -34,29 +33,28 @@ export class DropiDatePicker {
34
33
  placeholder = 'DD/MM/YYYY';
35
34
  /** Disabled */
36
35
  disabled = false;
37
- /** Is invalid state - matches Angular */
36
+ /** Is invalid state */
38
37
  isInvalid = false;
39
- /** Loading state - matches Angular */
38
+ /** Loading state */
40
39
  loading = false;
40
+ /** Hide "Hoy" shortcut */
41
+ hideTodayShortcut = false;
41
42
  open = false;
42
43
  viewYear = new Date().getFullYear();
43
44
  viewMonth = new Date().getMonth();
44
45
  hoverDate = '';
46
+ viewMode = 'day';
47
+ activeShortcut = -1;
45
48
  el;
46
49
  handleDocClick(e) {
47
50
  if (this.open && !e.composedPath().includes(this.el)) {
48
51
  this.open = false;
49
52
  }
50
53
  }
51
- /** Emitted when date selected — matches Angular 'onChangeDate' */
52
54
  dropiChangeDate;
53
- /** Emitted when panel closes — matches Angular 'onClosePanel' */
54
55
  dropiClosePanel;
55
- /** Emitted when range selected */
56
56
  dropiRangeChange;
57
- componentWillLoad() {
58
- this.updateFormValue();
59
- }
57
+ componentWillLoad() { this.updateFormValue(); }
60
58
  updateFormValue() {
61
59
  if (this.selectionMode === 'range') {
62
60
  this.internals.setFormValue(this.startDate && this.endDate ? `${this.startDate},${this.endDate}` : '');
@@ -88,23 +86,96 @@ export class DropiDatePicker {
88
86
  this.viewYear = d.getFullYear();
89
87
  this.viewMonth = d.getMonth();
90
88
  }
89
+ this.viewMode = 'day';
91
90
  this.open = true;
92
91
  }
93
- prevMonth() {
94
- if (this.viewMonth === 0) {
95
- this.viewMonth = 11;
92
+ get decadeStart() {
93
+ return Math.floor(this.viewYear / 10) * 10;
94
+ }
95
+ get navTitle() {
96
+ if (this.viewMode === 'day')
97
+ return `${MONTHS_ES[this.viewMonth]} ${this.viewYear}`;
98
+ if (this.viewMode === 'month')
99
+ return `${this.viewYear}`;
100
+ return `${this.decadeStart}-${this.decadeStart + 9}`;
101
+ }
102
+ cycleView() {
103
+ if (this.viewMode === 'day')
104
+ this.viewMode = 'month';
105
+ else if (this.viewMode === 'month')
106
+ this.viewMode = 'year';
107
+ }
108
+ prevNav() {
109
+ if (this.viewMode === 'day') {
110
+ if (this.viewMonth === 0) {
111
+ this.viewMonth = 11;
112
+ this.viewYear--;
113
+ }
114
+ else
115
+ this.viewMonth--;
116
+ }
117
+ else if (this.viewMode === 'month') {
96
118
  this.viewYear--;
97
119
  }
98
- else
99
- this.viewMonth--;
120
+ else {
121
+ this.viewYear = this.decadeStart - 10;
122
+ }
100
123
  }
101
- nextMonth() {
102
- if (this.viewMonth === 11) {
103
- this.viewMonth = 0;
124
+ nextNav() {
125
+ if (this.viewMode === 'day') {
126
+ if (this.viewMonth === 11) {
127
+ this.viewMonth = 0;
128
+ this.viewYear++;
129
+ }
130
+ else
131
+ this.viewMonth++;
132
+ }
133
+ else if (this.viewMode === 'month') {
104
134
  this.viewYear++;
105
135
  }
106
- else
107
- this.viewMonth++;
136
+ else {
137
+ this.viewYear = this.decadeStart + 10;
138
+ }
139
+ }
140
+ selectMonth(month) {
141
+ this.viewMonth = month;
142
+ this.viewMode = 'day';
143
+ }
144
+ selectYear(year) {
145
+ this.viewYear = year;
146
+ this.viewMode = 'month';
147
+ }
148
+ get today() {
149
+ return new Date().toISOString().slice(0, 10);
150
+ }
151
+ daysAgo(n) {
152
+ const d = new Date();
153
+ d.setDate(d.getDate() - n);
154
+ return d.toISOString().slice(0, 10);
155
+ }
156
+ get shortcuts() {
157
+ const all = [
158
+ { label: 'Hoy', start: this.today, end: this.today },
159
+ { label: 'Últimos 7 días', start: this.daysAgo(6), end: this.today },
160
+ { label: 'Últimos 15 días', start: this.daysAgo(14), end: this.today },
161
+ { label: 'Últimos 30 días', start: this.daysAgo(29), end: this.today },
162
+ { label: 'Últimos 90 días', start: this.daysAgo(89), end: this.today },
163
+ ];
164
+ return this.hideTodayShortcut ? all.slice(1) : all;
165
+ }
166
+ selectShortcut(idx) {
167
+ const s = this.shortcuts[idx];
168
+ this.activeShortcut = idx;
169
+ if (this.selectionMode === 'range') {
170
+ this.startDate = s.start;
171
+ this.endDate = s.end;
172
+ this.dropiRangeChange.emit({ start: s.start, end: s.end });
173
+ }
174
+ else {
175
+ this.selectedDate = s.end;
176
+ this.dropiChangeDate.emit(s.end);
177
+ }
178
+ this.open = false;
108
179
  }
109
180
  toISO(year, month, day) {
110
181
  return `${year}-${String(month + 1).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
@@ -135,7 +206,6 @@ export class DropiDatePicker {
135
206
  this.dropiChangeDate.emit(iso);
136
207
  return;
137
208
  }
138
- // Range mode
139
209
  if (!this.startDate || (this.startDate && this.endDate)) {
140
210
  this.startDate = iso;
141
211
  this.endDate = '';
@@ -156,23 +226,18 @@ export class DropiDatePicker {
156
226
  const year = this.viewYear;
157
227
  const month = this.viewMonth;
158
228
  const firstDay = new Date(year, month, 1).getDay();
159
- // Adjust to Sunday-first
160
- const startOffset = firstDay;
161
229
  const daysInMonth = new Date(year, month + 1, 0).getDate();
162
230
  const daysInPrevMonth = new Date(year, month, 0).getDate();
163
231
  const cells = [];
164
- // Previous month filler
165
- for (let i = startOffset - 1; i >= 0; i--) {
232
+ for (let i = firstDay - 1; i >= 0; i--) {
166
233
  const d = daysInPrevMonth - i;
167
234
  const m = month === 0 ? 11 : month - 1;
168
235
  const y = month === 0 ? year - 1 : year;
169
236
  cells.push({ iso: this.toISO(y, m, d), day: d, currentMonth: false });
170
237
  }
171
- // Current month
172
238
  for (let d = 1; d <= daysInMonth; d++) {
173
239
  cells.push({ iso: this.toISO(year, month, d), day: d, currentMonth: true });
174
240
  }
175
- // Next month filler
176
241
  const remaining = 42 - cells.length;
177
242
  for (let d = 1; d <= remaining; d++) {
178
243
  const m = month === 11 ? 0 : month + 1;
@@ -181,15 +246,9 @@ export class DropiDatePicker {
181
246
  }
182
247
  return cells;
183
248
  }
184
- render() {
249
+ renderDayView(today) {
185
250
  const days = this.buildDays();
186
- const today = new Date().toISOString().slice(0, 10);
187
- return (h("div", { key: 'd2f6248ff409e53e916e266ab5d23136e9da76d0', class: "dp-wrap" }, this.label && h("label", { key: 'ba51f4091f18437e4449c05378def5b099883acd', class: "dp-label" }, this.label), h("button", { key: '88eb474ca75c9b62996765bdb4816a8cfc14bb8e', class: {
188
- 'dp-trigger': true,
189
- 'dp-trigger--disabled': this.disabled,
190
- 'dp-trigger--invalid': this.isInvalid,
191
- 'dp-trigger--loading': this.loading
192
- }, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '1044cef59317f88cc472d2a466a6937a0c4d58f7', name: "Calendar", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("span", { key: '6a7c5687cd06b9b2f42c256bc03ff0f412ca5573', class: { 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue } }, this.displayValue || this.placeholder), h("dropi-icon", { key: '4be1fc67ed6f9ffb5a5d936e3e8d8330bb91fb0b', name: "Arrow-Down-2", iconWidth: "12px", iconHeight: "12px", color: "Gray-Gray-400" })), this.open && (h("div", { key: '5ad107e256d62a46b57e4bd1bebead70ecc8e46c', class: "dp-popup" }, h("div", { key: 'e3d51afbd24df88867777e43c9bd63dd41c3f542', class: "dp-nav" }, h("button", { key: '8819f79389c1d50ec639f719228aab88be4d0335', class: "dp-nav__btn", onClick: () => this.prevMonth(), type: "button" }, h("dropi-icon", { key: 'a17004ad24ce40590474d91227a826f46edf50ba', name: "Arrow-Left-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" })), h("span", { key: 'e91c8a46b963a1e7f0d01c56610c2e4bb6fa3d39', class: "dp-nav__title" }, h("span", { key: '214a575cbd83e8c3bafe64ffbd93e914119b09aa' }, MONTHS_ES[this.viewMonth]), h("span", { key: '1f71a83e7110bf8a91f7b5e14e0400b09ba28e1a' }, this.viewYear)), h("button", { key: '21dbc0fdaabc423bd864bfb33ba314b72ca62d48', class: "dp-nav__btn", onClick: () => this.nextMonth(), type: "button" }, h("dropi-icon", { key: 'f248e65855555878afdbda7d1ba9a802d9eae4d5', name: "Arrow-Right-2", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" }))), h("div", { key: '4fb29792028bf2132ea78a105c7694cf3806ff05', class: "dp-grid" }, DAYS_ES.map(d => (h("div", { class: "dp-day-header" }, d))), days.map(({ iso, day, currentMonth }) => {
251
+ return (h("div", { class: "dp-grid" }, DAYS_ES.map(d => h("div", { class: "dp-day-header" }, d)), days.map(({ iso, day, currentMonth }) => {
193
252
  const isSelected = this.selectionMode !== 'range'
194
253
  ? iso === this.selectedDate
195
254
  : iso === this.startDate || iso === this.endDate;
@@ -211,22 +270,48 @@ export class DropiDatePicker {
211
270
  if (this.selectionMode === 'range' && this.startDate && !this.endDate)
212
271
  this.hoverDate = iso;
213
272
  }, onMouseLeave: () => this.hoverDate = '' }, day));
214
- })), h("div", { key: '9c670c5ad5a6115b628d5a7bd3a2422c7631e237', class: "dp-footer" }, h("button", { key: 'f939595cde989ea0bd462a3d94c6333b5220d1ee', class: "dp-footer__clear", type: "button", onClick: () => {
215
- this.selectedDate = '';
216
- this.startDate = '';
217
- this.endDate = '';
218
- this.open = false;
219
- } }, "Limpiar"), h("button", { key: '87b88413962d73229f0cac5a15918b9cd7aebea3', class: "dp-footer__today", type: "button", onClick: () => {
220
- if (this.selectionMode !== 'range') {
221
- this.selectedDate = today;
222
- this.open = false;
223
- this.dropiChangeDate.emit(today);
224
- }
225
- else {
226
- this.startDate = today;
227
- this.endDate = '';
228
- }
229
- } }, "Hoy"))))));
273
+ })));
274
+ }
275
+ renderMonthView() {
276
+ const todayMonth = new Date().getMonth();
277
+ const todayYear = new Date().getFullYear();
278
+ return (h("div", { class: "dp-month-grid" }, MONTHS_SHORT.map((name, idx) => {
279
+ const isSelected = idx === this.viewMonth;
280
+ const isCurrent = idx === todayMonth && this.viewYear === todayYear;
281
+ return (h("button", { class: {
282
+ 'dp-month-cell': true,
283
+ 'dp-month-cell--selected': isSelected,
284
+ 'dp-month-cell--current': isCurrent && !isSelected,
285
+ }, type: "button", onClick: () => this.selectMonth(idx) }, name));
286
+ })));
287
+ }
288
+ renderYearView() {
289
+ const currentYear = new Date().getFullYear();
290
+ const start = this.decadeStart;
291
+ const years = Array.from({ length: 10 }, (_, i) => start + i);
292
+ return (h("div", { class: "dp-year-grid" }, years.map(year => {
293
+ const isSelected = year === this.viewYear;
294
+ const isCurrent = year === currentYear;
295
+ return (h("button", { class: {
296
+ 'dp-year-cell': true,
297
+ 'dp-year-cell--selected': isSelected,
298
+ 'dp-year-cell--current': isCurrent && !isSelected,
299
+ }, type: "button", onClick: () => this.selectYear(year) }, year));
300
+ })));
301
+ }
302
+ render() {
303
+ const today = new Date().toISOString().slice(0, 10);
304
+ return (h("div", { key: '6ae00de99b93a13faba81ac027c292b9624d0336', class: "dp-wrap" }, this.label && h("label", { key: '9282bb57332ebaef9861702d80759d641ea21757', class: "dp-label" }, this.label), h("button", { key: '1fe5d5fcd8ce1c0b151381d9c249c401d322f78a', class: {
305
+ 'dp-trigger': true,
306
+ 'dp-trigger--disabled': this.disabled,
307
+ 'dp-trigger--invalid': this.isInvalid,
308
+ 'dp-trigger--loading': this.loading
309
+ }, onClick: () => this.open ? this.open = false : this.open_(), disabled: this.disabled || this.loading, type: "button" }, h("dropi-icon", { key: '560cf80eb7652543b9000e375b213a3dba91060b', name: "Calendar", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-400" }), h("span", { key: '3bdc45bd4706502af4050475e709c15beebce028', class: { 'dp-trigger__value': true, 'dp-trigger__placeholder': !this.displayValue } }, this.displayValue || this.placeholder)), this.open && (h("div", { key: 'e21053dd38d62ab43c01f337fbbeb8b36e70680c', class: "dp-popup" }, h("div", { key: 'd6c8fc40ec4bd11bcd5bf3d8b3706c4c62099bbf', class: "dp-calendar" }, h("div", { key: 'cf8f21d301592077851a44eb588418302240598f', class: "dp-nav" }, h("button", { key: '28702d76d499cec07cd69d7bd23f5eb0369d288f', class: "dp-nav__btn", onClick: () => this.prevNav(), type: "button" }, h("dropi-icon", { key: '18b1c6fb2ea5f51b4a4b59592c7d89c5406c6c39', name: "dropdown-left", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" })), h("button", { key: '755274772a90deae38d613da369863aefe95e297', class: "dp-nav__title", onClick: () => this.cycleView(), type: "button" }, this.viewMode === 'day'
310
+ ? [h("span", null, MONTHS_ES[this.viewMonth]), h("span", null, this.viewYear)]
311
+ : h("span", null, this.navTitle)), h("button", { key: '6442690df1e434f9fb0128327f8f07c3cecbed4c', class: "dp-nav__btn", onClick: () => this.nextNav(), type: "button" }, h("dropi-icon", { key: '00525ae2cbe5cc8a881d165141de10ce3d72e439', name: "dropdown-right", iconWidth: "16px", iconHeight: "16px", color: "Gray-Gray-600" }))), this.viewMode === 'day' && this.renderDayView(today), this.viewMode === 'month' && this.renderMonthView(), this.viewMode === 'year' && this.renderYearView()), this.selectionMode === 'range' && [
312
+ h("div", { key: '688df97b843c3c3342fc301d6c6c74ec88921d68', class: "dp-divider" }),
313
+ h("div", { key: '2c75f7b004812ee1eb18bbc349f03ab55623cd9f', class: "dp-shortcuts" }, this.shortcuts.map((s, i) => (h("button", { key: i, class: { 'shortcut-btn': true, 'shortcut-btn--active': this.activeShortcut === i }, onClick: () => this.selectShortcut(i), type: "button" }, s.label))))
314
+ ]))));
230
315
  }
231
316
  static get is() { return "dropi-date-picker"; }
232
317
  static get encapsulation() { return "shadow"; }
@@ -274,7 +359,7 @@ export class DropiDatePicker {
274
359
  "optional": false,
275
360
  "docs": {
276
361
  "tags": [],
277
- "text": "Selected date (ISO string, single mode) - matches Angular 'selectedDate'"
362
+ "text": "Selected date (ISO string, single mode)"
278
363
  },
279
364
  "getter": false,
280
365
  "setter": false,
@@ -334,7 +419,7 @@ export class DropiDatePicker {
334
419
  "optional": false,
335
420
  "docs": {
336
421
  "tags": [],
337
- "text": "Enable range selection - matches Angular selectionMode"
422
+ "text": "Enable range selection"
338
423
  },
339
424
  "getter": false,
340
425
  "setter": false,
@@ -454,7 +539,7 @@ export class DropiDatePicker {
454
539
  "optional": false,
455
540
  "docs": {
456
541
  "tags": [],
457
- "text": "Is invalid state - matches Angular"
542
+ "text": "Is invalid state"
458
543
  },
459
544
  "getter": false,
460
545
  "setter": false,
@@ -474,13 +559,33 @@ export class DropiDatePicker {
474
559
  "optional": false,
475
560
  "docs": {
476
561
  "tags": [],
477
- "text": "Loading state - matches Angular"
562
+ "text": "Loading state"
478
563
  },
479
564
  "getter": false,
480
565
  "setter": false,
481
566
  "reflect": false,
482
567
  "attribute": "loading",
483
568
  "defaultValue": "false"
569
+ },
570
+ "hideTodayShortcut": {
571
+ "type": "boolean",
572
+ "mutable": false,
573
+ "complexType": {
574
+ "original": "boolean",
575
+ "resolved": "boolean",
576
+ "references": {}
577
+ },
578
+ "required": false,
579
+ "optional": false,
580
+ "docs": {
581
+ "tags": [],
582
+ "text": "Hide \"Hoy\" shortcut"
583
+ },
584
+ "getter": false,
585
+ "setter": false,
586
+ "reflect": false,
587
+ "attribute": "hide-today-shortcut",
588
+ "defaultValue": "false"
484
589
  }
485
590
  };
486
591
  }
@@ -489,7 +594,9 @@ export class DropiDatePicker {
489
594
  "open": {},
490
595
  "viewYear": {},
491
596
  "viewMonth": {},
492
- "hoverDate": {}
597
+ "hoverDate": {},
598
+ "viewMode": {},
599
+ "activeShortcut": {}
493
600
  };
494
601
  }
495
602
  static get events() {
@@ -501,7 +608,7 @@ export class DropiDatePicker {
501
608
  "composed": true,
502
609
  "docs": {
503
610
  "tags": [],
504
- "text": "Emitted when date selected \u2014 matches Angular 'onChangeDate'"
611
+ "text": ""
505
612
  },
506
613
  "complexType": {
507
614
  "original": "string",
@@ -516,7 +623,7 @@ export class DropiDatePicker {
516
623
  "composed": true,
517
624
  "docs": {
518
625
  "tags": [],
519
- "text": "Emitted when panel closes \u2014 matches Angular 'onClosePanel'"
626
+ "text": ""
520
627
  },
521
628
  "complexType": {
522
629
  "original": "void",
@@ -531,7 +638,7 @@ export class DropiDatePicker {
531
638
  "composed": true,
532
639
  "docs": {
533
640
  "tags": [],
534
- "text": "Emitted when range selected"
641
+ "text": ""
535
642
  },
536
643
  "complexType": {
537
644
  "original": "{ start: string; end: string }",
@@ -4,15 +4,16 @@
4
4
  /* Label */
5
5
  .dpr-label {
6
6
  display: block;
7
- font-size: var(--font-size-xxs, 10px);
7
+ font-size: var(--font-size-xs, 10px);
8
+ font-weight: var(--font-weight-regular, 400);
8
9
  color: var(--Gray-Gray-600, #475066);
9
- margin-bottom: 4px;
10
+ margin-bottom: 8px;
10
11
  }
11
12
 
12
13
  /* Trigger */
13
14
  .dpr-trigger {
14
15
  width: 100%;
15
- height: 44px;
16
+ height: 40px;
16
17
  display: flex;
17
18
  align-items: center;
18
19
  gap: var(--Size-2, 8px);
@@ -114,6 +115,53 @@
114
115
  }
115
116
 
116
117
  /* ── Calendar styles (copied from dropi-date-picker) ── */
118
+
119
+ /* Month grid */
120
+ .dp-month-grid {
121
+ display: grid;
122
+ grid-template-columns: repeat(3, 1fr);
123
+ gap: 8px;
124
+ }
125
+ .dp-month-cell {
126
+ padding: 10px 4px;
127
+ font-size: var(--font-size-s, 14px);
128
+ font-family: inherit;
129
+ font-weight: var(--font-weight-regular, 400);
130
+ color: var(--Gray-Gray-700, #32394d);
131
+ background: transparent;
132
+ border: 1px solid transparent;
133
+ border-radius: var(--Border-2, 8px);
134
+ cursor: pointer;
135
+ text-align: center;
136
+ transition: background 0.15s, border-color 0.15s;
137
+ }
138
+ .dp-month-cell:hover { background: var(--Gray-Gray-50, #f7f8fa); }
139
+ .dp-month-cell--selected { border-color: var(--Info-Info-500, #50a5f1); font-weight: var(--font-weight-semibold, 600); }
140
+ .dp-month-cell--current { background: var(--Gray-Gray-100, #e6eaf2); }
141
+
142
+ /* Year grid */
143
+ .dp-year-grid {
144
+ display: grid;
145
+ grid-template-columns: repeat(2, 1fr);
146
+ gap: 8px;
147
+ }
148
+ .dp-year-cell {
149
+ padding: 10px 4px;
150
+ font-size: var(--font-size-s, 14px);
151
+ font-family: inherit;
152
+ font-weight: var(--font-weight-regular, 400);
153
+ color: var(--Gray-Gray-700, #32394d);
154
+ background: transparent;
155
+ border: 1px solid transparent;
156
+ border-radius: var(--Border-2, 8px);
157
+ cursor: pointer;
158
+ text-align: center;
159
+ transition: background 0.15s, border-color 0.15s;
160
+ }
161
+ .dp-year-cell:hover { background: var(--Gray-Gray-50, #f7f8fa); }
162
+ .dp-year-cell--selected { border-color: var(--Info-Info-500, #50a5f1); font-weight: var(--font-weight-semibold, 600); }
163
+ .dp-year-cell--current { background: var(--Gray-Gray-100, #e6eaf2); }
164
+
117
165
  .dp-nav {
118
166
  display: flex;
119
167
  align-items: center;
@@ -137,12 +185,20 @@
137
185
  }
138
186
  .dp-nav__btn:hover { background: var(--Gray-Gray-50, #f7f8fa); }
139
187
  .dp-nav__title {
188
+ background: none;
189
+ border: none;
140
190
  font-size: var(--font-size-s, 14px);
141
191
  font-weight: var(--font-weight-bold, 700);
142
192
  color: var(--Gray-Gray-700, #32394d);
143
193
  display: flex;
144
194
  gap: 8px;
195
+ cursor: pointer;
196
+ padding: 4px 8px;
197
+ border-radius: var(--Border-1, 4px);
198
+ font-family: inherit;
199
+ transition: background 0.15s;
145
200
  }
201
+ .dp-nav__title:hover { background: var(--Gray-Gray-50, #f7f8fa); }
146
202
 
147
203
  .dp-grid {
148
204
  display: grid;
@@ -220,7 +276,7 @@
220
276
  100% { background-position: 468px 0; }
221
277
  }
222
278
  .skeleton {
223
- height: 44px;
279
+ height: 40px;
224
280
  width: 100%;
225
281
  border-radius: 8px;
226
282
  animation: shimmer 1s linear infinite;