@pitchfork-ui/elements 0.1.0 → 0.2.1

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 (264) hide show
  1. package/dist/cjs/control-label-C0eK8bPh.js +36 -0
  2. package/dist/cjs/control-label-C0eK8bPh.js.map +1 -0
  3. package/dist/cjs/index-CIskGKk1.js +4 -4
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/pf-checkbox.cjs.entry.js +3 -1
  6. package/dist/cjs/pf-checkbox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/pf-combobox.cjs.entry.js +4 -3
  8. package/dist/cjs/pf-combobox.cjs.entry.js.map +1 -1
  9. package/dist/cjs/pf-date-picker.cjs.entry.js +3 -2
  10. package/dist/cjs/pf-date-picker.cjs.entry.js.map +1 -1
  11. package/dist/cjs/pf-date-range-picker.cjs.entry.js +6 -5
  12. package/dist/cjs/pf-date-range-picker.cjs.entry.js.map +1 -1
  13. package/dist/cjs/pf-header-navigation.cjs.entry.js +15 -3
  14. package/dist/cjs/pf-header-navigation.cjs.entry.js.map +1 -1
  15. package/dist/cjs/pf-input.cjs.entry.js +3 -1
  16. package/dist/cjs/pf-input.cjs.entry.js.map +1 -1
  17. package/dist/cjs/pf-modal.cjs.entry.js +89 -1
  18. package/dist/cjs/pf-modal.cjs.entry.js.map +1 -1
  19. package/dist/cjs/pf-multi-select.cjs.entry.js +4 -3
  20. package/dist/cjs/pf-multi-select.cjs.entry.js.map +1 -1
  21. package/dist/cjs/pf-nav-item.cjs.entry.js +29 -4
  22. package/dist/cjs/pf-nav-item.cjs.entry.js.map +1 -1
  23. package/dist/cjs/pf-number-input.cjs.entry.js +2 -1
  24. package/dist/cjs/pf-number-input.cjs.entry.js.map +1 -1
  25. package/dist/cjs/pf-select.cjs.entry.js +4 -3
  26. package/dist/cjs/pf-select.cjs.entry.js.map +1 -1
  27. package/dist/cjs/pf-sidebar-navigation.cjs.entry.js +11 -8
  28. package/dist/cjs/pf-sidebar-navigation.cjs.entry.js.map +1 -1
  29. package/dist/cjs/pf-slider.cjs.entry.js +4 -2
  30. package/dist/cjs/pf-slider.cjs.entry.js.map +1 -1
  31. package/dist/cjs/pf-switch.cjs.entry.js +3 -1
  32. package/dist/cjs/pf-switch.cjs.entry.js.map +1 -1
  33. package/dist/cjs/pf-tag-input.cjs.entry.js +3 -2
  34. package/dist/cjs/pf-tag-input.cjs.entry.js.map +1 -1
  35. package/dist/cjs/pf-textarea.cjs.entry.js +2 -1
  36. package/dist/cjs/pf-textarea.cjs.entry.js.map +1 -1
  37. package/dist/cjs/pf-time-picker.cjs.entry.js +3 -2
  38. package/dist/cjs/pf-time-picker.cjs.entry.js.map +1 -1
  39. package/dist/cjs/pitchfork.cjs.js +1 -1
  40. package/dist/collection/components/pf-accordion/pf-accordion.js +2 -2
  41. package/dist/collection/components/pf-alert/pf-alert.js +1 -1
  42. package/dist/collection/components/pf-avatar/pf-avatar.js +2 -2
  43. package/dist/collection/components/pf-badge/pf-badge.js +1 -1
  44. package/dist/collection/components/pf-badge-group/pf-badge-group.js +3 -3
  45. package/dist/collection/components/pf-button/pf-button.js +3 -3
  46. package/dist/collection/components/pf-checkbox/pf-checkbox.js +4 -1
  47. package/dist/collection/components/pf-checkbox/pf-checkbox.js.map +1 -1
  48. package/dist/collection/components/pf-combobox/pf-combobox.js +4 -3
  49. package/dist/collection/components/pf-combobox/pf-combobox.js.map +1 -1
  50. package/dist/collection/components/pf-content-divider/pf-content-divider.js +1 -1
  51. package/dist/collection/components/pf-credit-card/pf-credit-card.js +1 -1
  52. package/dist/collection/components/pf-date-picker/pf-date-picker.js +3 -2
  53. package/dist/collection/components/pf-date-picker/pf-date-picker.js.map +1 -1
  54. package/dist/collection/components/pf-date-range-picker/pf-date-range-picker.js +6 -5
  55. package/dist/collection/components/pf-date-range-picker/pf-date-range-picker.js.map +1 -1
  56. package/dist/collection/components/pf-empty-state/pf-empty-state.js +1 -1
  57. package/dist/collection/components/pf-header-navigation/pf-header-navigation.js +25 -4
  58. package/dist/collection/components/pf-header-navigation/pf-header-navigation.js.map +1 -1
  59. package/dist/collection/components/pf-inline-cta/pf-inline-cta.js +1 -1
  60. package/dist/collection/components/pf-input/pf-input.js +5 -2
  61. package/dist/collection/components/pf-input/pf-input.js.map +1 -1
  62. package/dist/collection/components/pf-kbd/pf-kbd.js +1 -1
  63. package/dist/collection/components/pf-line-chart/pf-line-chart.js +1 -1
  64. package/dist/collection/components/pf-loading-dots/pf-loading-dots.js +1 -1
  65. package/dist/collection/components/pf-metric-card/pf-metric-card.js +1 -1
  66. package/dist/collection/components/pf-modal/pf-modal.js +77 -6
  67. package/dist/collection/components/pf-modal/pf-modal.js.map +1 -1
  68. package/dist/collection/components/pf-multi-select/pf-multi-select.js +4 -3
  69. package/dist/collection/components/pf-multi-select/pf-multi-select.js.map +1 -1
  70. package/dist/collection/components/pf-nav-item/pf-nav-item.js +50 -5
  71. package/dist/collection/components/pf-nav-item/pf-nav-item.js.map +1 -1
  72. package/dist/collection/components/pf-notification/pf-notification.js +1 -1
  73. package/dist/collection/components/pf-number-input/pf-number-input.js +2 -1
  74. package/dist/collection/components/pf-number-input/pf-number-input.js.map +1 -1
  75. package/dist/collection/components/pf-progress-steps/pf-progress-steps.js +1 -1
  76. package/dist/collection/components/pf-radio-group/pf-radio-group.js +1 -1
  77. package/dist/collection/components/pf-rating-badge/pf-rating-badge.js +1 -1
  78. package/dist/collection/components/pf-scroll-area/pf-scroll-area.js +1 -1
  79. package/dist/collection/components/pf-section-header/pf-section-header.js +1 -1
  80. package/dist/collection/components/pf-select/pf-select.js +4 -3
  81. package/dist/collection/components/pf-select/pf-select.js.map +1 -1
  82. package/dist/collection/components/pf-sidebar-navigation/pf-sidebar-navigation.js +12 -9
  83. package/dist/collection/components/pf-sidebar-navigation/pf-sidebar-navigation.js.map +1 -1
  84. package/dist/collection/components/pf-slideout-menu/pf-slideout-menu.js +2 -2
  85. package/dist/collection/components/pf-slider/pf-slider.js +5 -2
  86. package/dist/collection/components/pf-slider/pf-slider.js.map +1 -1
  87. package/dist/collection/components/pf-switch/pf-switch.js +4 -1
  88. package/dist/collection/components/pf-switch/pf-switch.js.map +1 -1
  89. package/dist/collection/components/pf-tab/pf-tab.js +2 -2
  90. package/dist/collection/components/pf-table-cell/pf-table-cell.js +1 -1
  91. package/dist/collection/components/pf-tabs/pf-tabs.js +2 -2
  92. package/dist/collection/components/pf-tag/pf-tag.js +1 -1
  93. package/dist/collection/components/pf-tag-input/pf-tag-input.js +3 -2
  94. package/dist/collection/components/pf-tag-input/pf-tag-input.js.map +1 -1
  95. package/dist/collection/components/pf-textarea/pf-textarea.js +2 -1
  96. package/dist/collection/components/pf-textarea/pf-textarea.js.map +1 -1
  97. package/dist/collection/components/pf-time-picker/pf-time-picker.js +3 -2
  98. package/dist/collection/components/pf-time-picker/pf-time-picker.js.map +1 -1
  99. package/dist/collection/components/pf-timeline-item/pf-timeline-item.js +1 -1
  100. package/dist/collection/components/pf-toaster/pf-toaster.js +2 -2
  101. package/dist/collection/components/pf-toolbar/pf-toolbar.js +1 -1
  102. package/dist/collection/components/pf-toolbar-separator/pf-toolbar-separator.js +1 -1
  103. package/dist/collection/components/pf-utility-button/pf-utility-button.js +2 -2
  104. package/dist/collection/components/pf-video-player/pf-video-player.js +2 -2
  105. package/dist/collection/control-label.js +30 -0
  106. package/dist/collection/control-label.js.map +1 -0
  107. package/dist/components/p-Cy_kHPeC.js +2 -0
  108. package/dist/components/p-Cy_kHPeC.js.map +1 -0
  109. package/dist/components/pf-checkbox.js +1 -1
  110. package/dist/components/pf-checkbox.js.map +1 -1
  111. package/dist/components/pf-combobox.js +1 -1
  112. package/dist/components/pf-combobox.js.map +1 -1
  113. package/dist/components/pf-date-picker.js +1 -1
  114. package/dist/components/pf-date-picker.js.map +1 -1
  115. package/dist/components/pf-date-range-picker.js +1 -1
  116. package/dist/components/pf-date-range-picker.js.map +1 -1
  117. package/dist/components/pf-header-navigation.js +1 -1
  118. package/dist/components/pf-header-navigation.js.map +1 -1
  119. package/dist/components/pf-input.js +1 -1
  120. package/dist/components/pf-input.js.map +1 -1
  121. package/dist/components/pf-modal.js +1 -1
  122. package/dist/components/pf-modal.js.map +1 -1
  123. package/dist/components/pf-multi-select.js +1 -1
  124. package/dist/components/pf-multi-select.js.map +1 -1
  125. package/dist/components/pf-nav-item.js +1 -1
  126. package/dist/components/pf-nav-item.js.map +1 -1
  127. package/dist/components/pf-number-input.js +1 -1
  128. package/dist/components/pf-number-input.js.map +1 -1
  129. package/dist/components/pf-select.js +1 -1
  130. package/dist/components/pf-select.js.map +1 -1
  131. package/dist/components/pf-sidebar-navigation.js +1 -1
  132. package/dist/components/pf-sidebar-navigation.js.map +1 -1
  133. package/dist/components/pf-slider.js +1 -1
  134. package/dist/components/pf-slider.js.map +1 -1
  135. package/dist/components/pf-switch.js +1 -1
  136. package/dist/components/pf-switch.js.map +1 -1
  137. package/dist/components/pf-tag-input.js +1 -1
  138. package/dist/components/pf-tag-input.js.map +1 -1
  139. package/dist/components/pf-textarea.js +1 -1
  140. package/dist/components/pf-textarea.js.map +1 -1
  141. package/dist/components/pf-time-picker.js +1 -1
  142. package/dist/components/pf-time-picker.js.map +1 -1
  143. package/dist/docs.json +73 -52
  144. package/dist/elements.json +100 -10
  145. package/dist/esm/control-label-Cy_kHPeC.js +34 -0
  146. package/dist/esm/control-label-Cy_kHPeC.js.map +1 -0
  147. package/dist/esm/index-Bm6UxEit.js +4 -4
  148. package/dist/esm/loader.js +1 -1
  149. package/dist/esm/pf-checkbox.entry.js +4 -2
  150. package/dist/esm/pf-checkbox.entry.js.map +1 -1
  151. package/dist/esm/pf-combobox.entry.js +4 -3
  152. package/dist/esm/pf-combobox.entry.js.map +1 -1
  153. package/dist/esm/pf-date-picker.entry.js +3 -2
  154. package/dist/esm/pf-date-picker.entry.js.map +1 -1
  155. package/dist/esm/pf-date-range-picker.entry.js +6 -5
  156. package/dist/esm/pf-date-range-picker.entry.js.map +1 -1
  157. package/dist/esm/pf-header-navigation.entry.js +15 -3
  158. package/dist/esm/pf-header-navigation.entry.js.map +1 -1
  159. package/dist/esm/pf-input.entry.js +4 -2
  160. package/dist/esm/pf-input.entry.js.map +1 -1
  161. package/dist/esm/pf-modal.entry.js +89 -1
  162. package/dist/esm/pf-modal.entry.js.map +1 -1
  163. package/dist/esm/pf-multi-select.entry.js +4 -3
  164. package/dist/esm/pf-multi-select.entry.js.map +1 -1
  165. package/dist/esm/pf-nav-item.entry.js +30 -5
  166. package/dist/esm/pf-nav-item.entry.js.map +1 -1
  167. package/dist/esm/pf-number-input.entry.js +2 -1
  168. package/dist/esm/pf-number-input.entry.js.map +1 -1
  169. package/dist/esm/pf-select.entry.js +4 -3
  170. package/dist/esm/pf-select.entry.js.map +1 -1
  171. package/dist/esm/pf-sidebar-navigation.entry.js +11 -8
  172. package/dist/esm/pf-sidebar-navigation.entry.js.map +1 -1
  173. package/dist/esm/pf-slider.entry.js +5 -3
  174. package/dist/esm/pf-slider.entry.js.map +1 -1
  175. package/dist/esm/pf-switch.entry.js +4 -2
  176. package/dist/esm/pf-switch.entry.js.map +1 -1
  177. package/dist/esm/pf-tag-input.entry.js +3 -2
  178. package/dist/esm/pf-tag-input.entry.js.map +1 -1
  179. package/dist/esm/pf-textarea.entry.js +2 -1
  180. package/dist/esm/pf-textarea.entry.js.map +1 -1
  181. package/dist/esm/pf-time-picker.entry.js +3 -2
  182. package/dist/esm/pf-time-picker.entry.js.map +1 -1
  183. package/dist/esm/pitchfork.js +1 -1
  184. package/dist/pitchfork/p-01ed0d56.entry.js +2 -0
  185. package/dist/pitchfork/p-01ed0d56.entry.js.map +1 -0
  186. package/dist/pitchfork/p-02e28338.entry.js +2 -0
  187. package/dist/pitchfork/p-02e28338.entry.js.map +1 -0
  188. package/dist/pitchfork/p-19c0145c.entry.js +2 -0
  189. package/dist/pitchfork/p-19c0145c.entry.js.map +1 -0
  190. package/dist/pitchfork/p-22d8c69d.entry.js +2 -0
  191. package/dist/pitchfork/p-22d8c69d.entry.js.map +1 -0
  192. package/dist/pitchfork/p-2add2e98.entry.js +2 -0
  193. package/dist/pitchfork/p-2add2e98.entry.js.map +1 -0
  194. package/dist/pitchfork/p-45039de3.entry.js +2 -0
  195. package/dist/pitchfork/p-45039de3.entry.js.map +1 -0
  196. package/dist/pitchfork/p-4dfe7e8a.entry.js +2 -0
  197. package/dist/pitchfork/p-4dfe7e8a.entry.js.map +1 -0
  198. package/dist/pitchfork/p-51353d53.entry.js +2 -0
  199. package/dist/pitchfork/p-51353d53.entry.js.map +1 -0
  200. package/dist/pitchfork/p-5b98848c.entry.js +2 -0
  201. package/dist/pitchfork/{p-fd5a5ea1.entry.js.map → p-5b98848c.entry.js.map} +1 -1
  202. package/dist/pitchfork/p-7197ef71.entry.js +2 -0
  203. package/dist/pitchfork/p-7197ef71.entry.js.map +1 -0
  204. package/dist/pitchfork/p-Cy_kHPeC.js +2 -0
  205. package/dist/pitchfork/p-Cy_kHPeC.js.map +1 -0
  206. package/dist/pitchfork/p-ab6c09e7.entry.js +2 -0
  207. package/dist/pitchfork/p-ab6c09e7.entry.js.map +1 -0
  208. package/dist/pitchfork/p-d7ca4026.entry.js +2 -0
  209. package/dist/pitchfork/p-d7ca4026.entry.js.map +1 -0
  210. package/dist/pitchfork/p-dd48d94d.entry.js +2 -0
  211. package/dist/pitchfork/p-dd48d94d.entry.js.map +1 -0
  212. package/dist/pitchfork/p-ec8df806.entry.js +2 -0
  213. package/dist/pitchfork/p-ec8df806.entry.js.map +1 -0
  214. package/dist/pitchfork/p-f5df568f.entry.js +2 -0
  215. package/dist/pitchfork/p-f5df568f.entry.js.map +1 -0
  216. package/dist/pitchfork/p-f713c62d.entry.js +2 -0
  217. package/dist/pitchfork/p-f713c62d.entry.js.map +1 -0
  218. package/dist/pitchfork/p-fd802631.entry.js +2 -0
  219. package/dist/pitchfork/p-fd802631.entry.js.map +1 -0
  220. package/dist/pitchfork/pitchfork.esm.js +1 -1
  221. package/dist/types/components/pf-checkbox/pf-checkbox.d.ts +1 -0
  222. package/dist/types/components/pf-header-navigation/pf-header-navigation.d.ts +11 -2
  223. package/dist/types/components/pf-input/pf-input.d.ts +1 -0
  224. package/dist/types/components/pf-modal/pf-modal.d.ts +56 -3
  225. package/dist/types/components/pf-nav-item/pf-nav-item.d.ts +21 -1
  226. package/dist/types/components/pf-sidebar-navigation/pf-sidebar-navigation.d.ts +10 -7
  227. package/dist/types/components/pf-slider/pf-slider.d.ts +1 -0
  228. package/dist/types/components/pf-switch/pf-switch.d.ts +1 -0
  229. package/dist/types/components.d.ts +57 -18
  230. package/dist/types/control-label.d.ts +24 -0
  231. package/package.json +4 -4
  232. package/dist/pitchfork/p-1dbea97f.entry.js +0 -2
  233. package/dist/pitchfork/p-1dbea97f.entry.js.map +0 -1
  234. package/dist/pitchfork/p-23b1be9b.entry.js +0 -2
  235. package/dist/pitchfork/p-23b1be9b.entry.js.map +0 -1
  236. package/dist/pitchfork/p-33857f80.entry.js +0 -2
  237. package/dist/pitchfork/p-33857f80.entry.js.map +0 -1
  238. package/dist/pitchfork/p-47cabc33.entry.js +0 -2
  239. package/dist/pitchfork/p-47cabc33.entry.js.map +0 -1
  240. package/dist/pitchfork/p-48b2d3f7.entry.js +0 -2
  241. package/dist/pitchfork/p-48b2d3f7.entry.js.map +0 -1
  242. package/dist/pitchfork/p-5064d2dd.entry.js +0 -2
  243. package/dist/pitchfork/p-5064d2dd.entry.js.map +0 -1
  244. package/dist/pitchfork/p-52eef7eb.entry.js +0 -2
  245. package/dist/pitchfork/p-52eef7eb.entry.js.map +0 -1
  246. package/dist/pitchfork/p-845c5252.entry.js +0 -2
  247. package/dist/pitchfork/p-845c5252.entry.js.map +0 -1
  248. package/dist/pitchfork/p-a24bf2bd.entry.js +0 -2
  249. package/dist/pitchfork/p-a24bf2bd.entry.js.map +0 -1
  250. package/dist/pitchfork/p-a9b77dbb.entry.js +0 -2
  251. package/dist/pitchfork/p-a9b77dbb.entry.js.map +0 -1
  252. package/dist/pitchfork/p-c6bdd9cd.entry.js +0 -2
  253. package/dist/pitchfork/p-c6bdd9cd.entry.js.map +0 -1
  254. package/dist/pitchfork/p-d0d2070b.entry.js +0 -2
  255. package/dist/pitchfork/p-d0d2070b.entry.js.map +0 -1
  256. package/dist/pitchfork/p-d248b027.entry.js +0 -2
  257. package/dist/pitchfork/p-d248b027.entry.js.map +0 -1
  258. package/dist/pitchfork/p-d6425298.entry.js +0 -2
  259. package/dist/pitchfork/p-d6425298.entry.js.map +0 -1
  260. package/dist/pitchfork/p-d7eb6335.entry.js +0 -2
  261. package/dist/pitchfork/p-d7eb6335.entry.js.map +0 -1
  262. package/dist/pitchfork/p-e944f504.entry.js +0 -2
  263. package/dist/pitchfork/p-e944f504.entry.js.map +0 -1
  264. package/dist/pitchfork/p-fd5a5ea1.entry.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"pf-date-range-picker.js","sourceRoot":"","sources":["../../../src/components/pf-date-range-picker/pf-date-range-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACN,MAAM,eAAe,CAAC;AAEvB,MAAM,KAAK,GAAiC;IAC1C,CAAC,IAAI,CAAC,UAAU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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n addMonths,\n buildCalendarDays,\n CALENDAR_CELL_COUNT,\n clampMonthToYearRange,\n composeDescribedBy,\n formatDateRange,\n formatISODate,\n isOutsideDateRange,\n isSameDay,\n isSameMonth,\n Keys,\n moveCalendarDate,\n nextDateRangeSelection,\n observeAnchoredPosition,\n parseDateRange,\n parseISODate,\n rangeDayState,\n startOfMonth,\n toMidday,\n WEEKDAY_LABELS,\n type CalendarMove,\n type DateRangeValue,\n} from '@pitchfork-ui/core';\n\nimport { applyControlValidity } from '../../form-validity';\nimport { placePopover } from '../../place-popover';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nconst MOVES: Record<string, CalendarMove> = {\n [Keys.ArrowRight]: 'day-next',\n [Keys.ArrowLeft]: 'day-previous',\n [Keys.ArrowDown]: 'week-next',\n [Keys.ArrowUp]: 'week-previous',\n [Keys.Home]: 'week-start',\n [Keys.End]: 'week-end',\n PageDown: 'month-next',\n PageUp: 'month-previous',\n};\n\n/**\n * A form-associated date-range field: two month grids in a popover, with a\n * preview that follows the pointer while the range is half-made.\n *\n * **It submits two entries from one control.** `setFormValue` accepts a\n * `FormData`, and every entry in it is submitted — measured, along with the\n * fact that the element's own `name` attribute is then ignored entirely. So a\n * range goes in as `${name}-start` and `${name}-end`, which is what a server\n * handling a form actually wants, rather than one field a handler has to split.\n * The `value` property stays a single round-trippable `start/end` string.\n *\n * The grids are rendered here rather than composed from two `pf-calendar`s:\n * the range preview spans both months, so one element has to own the hover and\n * the selection for both. The day-state and selection rules are core's, shared\n * with the React component.\n *\n * @part field - the wrapper around label, control and messages.\n * @part label - the label element.\n * @part trigger - the button that opens the grids.\n * @part clear - the clear button.\n * @part panel - the floating panel.\n * @part grid - each month grid.\n * @part day - every day cell.\n * @part description - the hint text below the control.\n * @part error - the error message below the control.\n */\n@Component({\n tag: 'pf-date-range-picker',\n styleUrl: 'pf-date-range-picker.css',\n formAssociated: true,\n shadow: true,\n})\nexport class PfDateRangePicker {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The base name for the two submitted entries, `${name}-start` and\n * `${name}-end`. Reflected for selectors; the submission reads the property,\n * because a `FormData` value carries its own keys.\n */\n @Prop({ reflect: true }) name?: string;\n\n /** The range as `YYYY-MM-DD/YYYY-MM-DD`, or empty. */\n @Prop({ mutable: true }) value = '';\n\n /** Whether the panel is showing. Reflected for the stylesheet. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n @Prop() label?: string;\n\n @Prop() description?: string;\n\n @Prop() error?: string;\n\n @Prop() placeholder = 'Select dates';\n\n @Prop({ reflect: true }) required = false;\n\n @Prop({ reflect: true }) disabled = false;\n\n /** Offer a button that empties the range. */\n @Prop() allowClear = false;\n\n @Prop() min?: string;\n\n @Prop() max?: string;\n\n @Prop() startYear?: number;\n\n @Prop() endYear?: number;\n\n /** A predicate for days that cannot be chosen; see `pf-calendar`. */\n @Prop() isDateDisabled?: (date: Date) => boolean;\n\n /** Fires when the range changes or is cleared, with the `start/end` string. */\n @Event() pfChange!: EventEmitter<{ value: string; start: string; end: string }>;\n\n /** Fires whenever the panel opens or closes, whoever caused it. */\n @Event() pfOpenChange!: EventEmitter<{ open: boolean }>;\n\n /** The left-hand month; the right-hand one is always the month after. */\n @State() leftMonth: Date = startOfMonth(new Date());\n\n /** The day the grids' single tab stop sits on. */\n @State() focusedDate: Date = toMidday(new Date());\n\n /** The day under the pointer, which previews the missing end. */\n @State() hovered: Date | null = null;\n\n /** True once a start is chosen and the next click sets the end. */\n @State() awaitingEnd = false;\n\n private initialValue = '';\n\n /**\n * The start held while the range is half-made.\n *\n * Not in `value`, because `value` is the *submitted* range and a half-made\n * one is not a range — a form read mid-selection would see a start with no\n * end. Held here instead, and folded back in for rendering.\n */\n private pendingStart: Date | null = null;\n private stopObserving?: () => void;\n private shouldRestoreFocus = false;\n\n componentWillLoad() {\n this.initialValue = this.value ?? '';\n const { start } = this.range();\n const base = start ?? toMidday(new Date());\n this.focusedDate = base;\n this.leftMonth = this.clamp(startOfMonth(base));\n this.syncFormState();\n }\n\n componentDidRender() {\n if (!this.shouldRestoreFocus) return;\n this.shouldRestoreFocus = false;\n this.el.shadowRoot?.querySelector<HTMLButtonElement>('button[data-day][tabindex=\"0\"]')?.focus();\n }\n\n disconnectedCallback() {\n this.stopObserving?.();\n }\n\n /**\n * Follows a range set from outside, so the grids show what they are told.\n *\n * Without this the element kept whatever month it loaded with, and a\n * consumer assigning `value` got a correct value over the wrong months —\n * the days it names were not even rendered.\n */\n @Watch('value')\n syncDisplayedMonths() {\n const { start, end } = this.range();\n if (!start || !end) return;\n this.pendingStart = null;\n this.awaitingEnd = false;\n this.focusedDate = start;\n this.leftMonth = this.clamp(startOfMonth(start));\n }\n\n /*\n * `name` is watched here and not on the controls that pass a plain string to\n * `setFormValue`: those take their submission name from the reflected\n * attribute, so the platform picks a change up by itself. This one builds\n * the name *into* a FormData, so without the watch a name assigned after\n * load would never reach the submission.\n */\n @Watch('name')\n @Watch('value')\n @Watch('error')\n @Watch('required')\n syncFormState() {\n const { start, end } = this.range();\n\n if (!start || !end || !this.name) {\n this.internals.setFormValue(null);\n } else {\n /*\n * A FormData, so one control submits both ends. Measured: every entry in\n * it reaches the submission, and the element's own `name` attribute is\n * ignored in this mode — which is why the keys are built here.\n */\n const data = new FormData();\n data.append(`${this.name}-start`, formatISODate(start));\n data.append(`${this.name}-end`, formatISODate(end));\n this.internals.setFormValue(data);\n }\n\n applyControlValidity(this.internals, Boolean(start && end), this.required, this.error);\n }\n\n @Watch('open')\n syncOpen(next: boolean, previous: boolean) {\n if (next) this.showPanel();\n else this.hidePanel();\n if (next !== previous) this.pfOpenChange.emit({ open: next });\n }\n\n @Method()\n async show(): Promise<void> {\n if (!this.disabled) this.open = true;\n }\n\n @Method()\n async hide(): Promise<void> {\n this.open = false;\n }\n\n @Method()\n async checkValidity(): Promise<boolean> {\n return this.internals.checkValidity();\n }\n\n @Method()\n async reportValidity(): Promise<boolean> {\n return this.internals.reportValidity();\n }\n\n @Method()\n async getValidationMessage(): Promise<string> {\n return this.internals.validationMessage;\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.awaitingEnd = false;\n this.hovered = null;\n }\n\n private range(): DateRangeValue {\n return parseDateRange(this.value, parseISODate);\n }\n\n private get years() {\n const now = new Date().getFullYear();\n const start = this.startYear ?? now - 50;\n const end = this.endYear ?? now + 50;\n return { start: Math.min(start, end), end: Math.max(start, end) };\n }\n\n private clamp(date: Date): Date {\n const { start, end } = this.years;\n return clampMonthToYearRange(date, start, end);\n }\n\n private get panel() {\n return this.el.shadowRoot?.querySelector<HTMLElement>('[part=\"panel\"]') ?? null;\n }\n\n private get trigger() {\n return this.el.shadowRoot?.querySelector<HTMLButtonElement>('[part=\"trigger\"]') ?? null;\n }\n\n private isDisabled(date: Date): boolean {\n if (isOutsideDateRange(date, parseISODate(this.min), parseISODate(this.max))) return true;\n return this.isDateDisabled?.(date) ?? false;\n }\n\n private showPanel() {\n const panel = this.panel;\n if (this.disabled || !panel || panel.matches(':popover-open')) return;\n\n panel.showPopover();\n this.stopObserving?.();\n this.stopObserving = observeAnchoredPosition({\n getAnchor: () => this.trigger,\n getFloating: () => panel,\n align: 'start',\n matchAnchorWidth: false,\n flip: true,\n onChange: ({ left, top }) => placePopover(panel, left, top),\n });\n\n this.shouldRestoreFocus = true;\n }\n\n private hidePanel() {\n this.stopObserving?.();\n this.stopObserving = undefined;\n this.hovered = null;\n const panel = this.panel;\n if (panel?.matches(':popover-open')) panel.hidePopover();\n }\n\n private onToggle = (event: ToggleEvent) => {\n const nowOpen = event.newState === 'open';\n if (this.open !== nowOpen) this.open = nowOpen;\n if (!nowOpen) this.trigger?.focus();\n };\n\n /** One click through core's state machine, plus this element's side-effects. */\n private pick(date: Date) {\n if (this.isDisabled(date)) return;\n\n /*\n * `displayRange()`, not `range()`. A half-made range is deliberately kept\n * out of `value`, so reading the state machine's input from `value` hands\n * it a range with no start — and core, correctly, treats that as \"begin a\n * new range\". Every second click restarted instead of closing. Caught by\n * the swap and Enter tests.\n */\n const next = nextDateRangeSelection(\n { range: this.displayRange(), awaitingEnd: this.awaitingEnd },\n date,\n );\n\n this.awaitingEnd = next.awaitingEnd;\n this.focusedDate = toMidday(date);\n\n if (next.awaitingEnd) {\n // Half-made: hold the start without reporting an incomplete range.\n this.value = '';\n this.pendingStart = next.range.start;\n return;\n }\n\n this.pendingStart = null;\n this.hovered = null;\n this.value = formatDateRange(next.range, formatISODate);\n this.pfChange.emit({\n value: this.value,\n start: next.range.start ? formatISODate(next.range.start) : '',\n end: next.range.end ? formatISODate(next.range.end) : '',\n });\n this.open = false;\n }\n\n /** What the grids draw: the committed range, or the half-made one. */\n private displayRange(): DateRangeValue {\n const committed = this.range();\n if (committed.start && committed.end) return committed;\n return { start: this.pendingStart, end: null };\n }\n\n private moveFocus(move: CalendarMove) {\n const next = moveCalendarDate(this.focusedDate, move);\n const { start, end } = this.years;\n if (next.getFullYear() < start || next.getFullYear() > end) return;\n\n this.focusedDate = next;\n this.shouldRestoreFocus = true;\n\n // Keep the focused day on screen: it belongs to one of the two months.\n const right = addMonths(this.leftMonth, 1);\n if (!isSameMonth(next, this.leftMonth) && !isSameMonth(next, right)) {\n this.leftMonth = this.clamp(startOfMonth(next));\n }\n }\n\n private onKeyDown = (event: KeyboardEvent) => {\n const move = MOVES[event.key];\n if (move) {\n event.preventDefault();\n this.moveFocus(move);\n return;\n }\n\n if (event.key === Keys.Enter || event.key === Keys.Space) {\n event.preventDefault();\n this.pick(this.focusedDate);\n this.shouldRestoreFocus = true;\n }\n };\n\n private clear = (event: MouseEvent) => {\n event.stopPropagation();\n if (!this.value && !this.pendingStart) return;\n this.value = '';\n this.pendingStart = null;\n this.awaitingEnd = false;\n this.hovered = null;\n this.pfChange.emit({ value: '', start: '', end: '' });\n };\n\n private formatted(): string {\n const { start, end } = this.range();\n if (!start || !end) return '';\n const format = new Intl.DateTimeFormat('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n });\n return `${format.format(start)} – ${format.format(end)}`;\n }\n\n private renderGrid(month: Date) {\n const days = buildCalendarDays(month);\n const range = this.displayRange();\n const today = toMidday(new Date());\n const label = new Intl.DateTimeFormat('en-US', {\n month: 'long',\n year: 'numeric',\n }).format(month);\n\n return (\n <div class=\"month\">\n <p class=\"month-label\">{label}</p>\n <div class=\"grid\" part=\"grid\" role=\"grid\" aria-label={label}>\n <div class=\"row\" role=\"row\">\n {WEEKDAY_LABELS.map((day) => (\n <span key={day} class=\"weekday\" role=\"columnheader\" aria-label={day}>\n {day}\n </span>\n ))}\n </div>\n\n {Array.from({ length: CALENDAR_CELL_COUNT / 7 }, (_, week) => (\n <div key={week} class=\"row\" role=\"row\">\n {days.slice(week * 7, week * 7 + 7).map(({ date, inCurrentMonth }) => {\n if (!inCurrentMonth) {\n return <span key={formatISODate(date)} class=\"empty\" role=\"gridcell\"></span>;\n }\n\n const state = rangeDayState(date, range, this.hovered);\n const isEndpoint = state.isStart || state.isEnd;\n const disabled = this.isDisabled(date);\n\n return (\n <button\n key={formatISODate(date)}\n type=\"button\"\n role=\"gridcell\"\n data-day={formatISODate(date)}\n part=\"day\"\n class={{\n day: true,\n 'day--today': isSameDay(today, date),\n 'day--endpoint': isEndpoint,\n 'day--start': state.isStart,\n 'day--end': state.isEnd,\n 'day--inside': state.isInside,\n }}\n tabindex={isSameDay(this.focusedDate, date) ? 0 : -1}\n aria-selected={isEndpoint || state.isInside ? 'true' : 'false'}\n aria-current={isSameDay(today, date) ? 'date' : null}\n aria-disabled={disabled ? 'true' : null}\n aria-label={new Intl.DateTimeFormat('en-US', {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n }).format(date)}\n onClick={() => {\n this.pick(date);\n this.shouldRestoreFocus = true;\n }}\n onMouseEnter={() => {\n if (this.awaitingEnd && !disabled) this.hovered = date;\n }}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n render() {\n const describedBy = composeDescribedBy(\n this.description && 'description',\n this.error && 'error',\n );\n const text = this.formatted();\n const right = addMonths(this.leftMonth, 1);\n\n return (\n <Host>\n <div class=\"field\" part=\"field\">\n {this.label && (\n <label class=\"label\" part=\"label\" htmlFor=\"trigger\">\n {this.label}\n {this.required && (\n <span class=\"required\" aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n <div class=\"row-controls\">\n <button\n id=\"trigger\"\n part=\"trigger\"\n class={{ trigger: true, 'trigger--invalid': Boolean(this.error) }}\n type=\"button\"\n disabled={this.disabled}\n aria-haspopup=\"dialog\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls=\"panel\"\n aria-invalid={this.error ? 'true' : null}\n aria-required={this.required ? 'true' : null}\n aria-describedby={describedBy}\n onClick={() => {\n if (!this.disabled) this.open = !this.open;\n }}\n >\n <span class={{ value: true, 'value--placeholder': !text }}>\n {text || this.placeholder}\n </span>\n <pf-icon name=\"calendar\"></pf-icon>\n </button>\n\n {this.allowClear && (this.value || this.pendingStart) && (\n <button\n class=\"clear\"\n part=\"clear\"\n type=\"button\"\n aria-label=\"Clear selected dates\"\n disabled={this.disabled}\n onClick={this.clear}\n >\n <pf-icon name=\"circle-xmark\"></pf-icon>\n </button>\n )}\n </div>\n\n {this.description && (\n <p class=\"description\" part=\"description\" id=\"description\">\n {this.description}\n </p>\n )}\n {this.error && (\n <p class=\"error\" part=\"error\" id=\"error\">\n {this.error}\n </p>\n )}\n </div>\n\n <div\n id=\"panel\"\n part=\"panel\"\n class=\"panel\"\n popover=\"auto\"\n role=\"dialog\"\n aria-label=\"Choose a date range\"\n onToggle={this.onToggle}\n onKeyDown={this.onKeyDown}\n onMouseLeave={() => {\n this.hovered = null;\n }}\n >\n <div class=\"nav\">\n <button\n type=\"button\"\n class=\"step\"\n aria-label=\"Previous month\"\n onClick={() => {\n this.leftMonth = this.clamp(addMonths(this.leftMonth, -1));\n }}\n >\n <pf-icon name=\"square-caret-left\"></pf-icon>\n </button>\n <button\n type=\"button\"\n class=\"step\"\n aria-label=\"Next month\"\n onClick={() => {\n this.leftMonth = this.clamp(addMonths(this.leftMonth, 1));\n }}\n >\n <pf-icon name=\"square-caret-right\"></pf-icon>\n </button>\n </div>\n\n <div class=\"months\">\n {this.renderGrid(this.leftMonth)}\n {this.renderGrid(right)}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pf-date-range-picker.js","sourceRoot":"","sources":["../../../src/components/pf-date-range-picker/pf-date-range-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,SAAS,EACT,WAAW,EACX,IAAI,EACJ,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,cAAc,GAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3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G,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;wBAC5D,CAAC;wBAED,gEAAS,IAAI,EAAC,oBAAoB,GAAW,CACtC,CACL;gBAEN,4DAAK,KAAK,EAAC,QAAQ;oBAChB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC/B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CACnB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n addMonths,\n buildCalendarDays,\n CALENDAR_CELL_COUNT,\n clampMonthToYearRange,\n composeDescribedBy,\n formatDateRange,\n formatISODate,\n isOutsideDateRange,\n isSameDay,\n isSameMonth,\n Keys,\n moveCalendarDate,\n nextDateRangeSelection,\n observeAnchoredPosition,\n parseDateRange,\n parseISODate,\n rangeDayState,\n startOfMonth,\n toMidday,\n WEEKDAY_LABELS,\n type CalendarMove,\n type DateRangeValue,\n} from '@pitchfork-ui/core';\n\nimport { applyControlValidity } from '../../form-validity';\nimport { controlAriaLabel } from '../../control-label';\nimport { placePopover } from '../../place-popover';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\nconst MOVES: Record<string, CalendarMove> = {\n [Keys.ArrowRight]: 'day-next',\n [Keys.ArrowLeft]: 'day-previous',\n [Keys.ArrowDown]: 'week-next',\n [Keys.ArrowUp]: 'week-previous',\n [Keys.Home]: 'week-start',\n [Keys.End]: 'week-end',\n PageDown: 'month-next',\n PageUp: 'month-previous',\n};\n\n/**\n * A form-associated date-range field: two month grids in a popover, with a\n * preview that follows the pointer while the range is half-made.\n *\n * **It submits two entries from one control.** `setFormValue` accepts a\n * `FormData`, and every entry in it is submitted — measured, along with the\n * fact that the element's own `name` attribute is then ignored entirely. So a\n * range goes in as `${name}-start` and `${name}-end`, which is what a server\n * handling a form actually wants, rather than one field a handler has to split.\n * The `value` property stays a single round-trippable `start/end` string.\n *\n * The grids are rendered here rather than composed from two `pf-calendar`s:\n * the range preview spans both months, so one element has to own the hover and\n * the selection for both. The day-state and selection rules are core's, shared\n * with the React component.\n *\n * @part field - the wrapper around label, control and messages.\n * @part label - the label element.\n * @part trigger - the button that opens the grids.\n * @part clear - the clear button.\n * @part panel - the floating panel.\n * @part grid - each month grid.\n * @part day - every day cell.\n * @part description - the hint text below the control.\n * @part error - the error message below the control.\n */\n@Component({\n tag: 'pf-date-range-picker',\n styleUrl: 'pf-date-range-picker.css',\n formAssociated: true,\n shadow: true,\n})\nexport class PfDateRangePicker {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The base name for the two submitted entries, `${name}-start` and\n * `${name}-end`. Reflected for selectors; the submission reads the property,\n * because a `FormData` value carries its own keys.\n */\n @Prop({ reflect: true }) name?: string;\n\n /** The range as `YYYY-MM-DD/YYYY-MM-DD`, or empty. */\n @Prop({ mutable: true }) value = '';\n\n /** Whether the panel is showing. Reflected for the stylesheet. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n @Prop() label?: string;\n\n @Prop() description?: string;\n\n @Prop() error?: string;\n\n @Prop() placeholder = 'Select dates';\n\n @Prop({ reflect: true }) required = false;\n\n @Prop({ reflect: true }) disabled = false;\n\n /** Offer a button that empties the range. */\n @Prop() allowClear = false;\n\n @Prop() min?: string;\n\n @Prop() max?: string;\n\n @Prop() startYear?: number;\n\n @Prop() endYear?: number;\n\n /** A predicate for days that cannot be chosen; see `pf-calendar`. */\n @Prop() isDateDisabled?: (date: Date) => boolean;\n\n /** Fires when the range changes or is cleared, with the `start/end` string. */\n @Event() pfChange!: EventEmitter<{ value: string; start: string; end: string }>;\n\n /** Fires whenever the panel opens or closes, whoever caused it. */\n @Event() pfOpenChange!: EventEmitter<{ open: boolean }>;\n\n /** The left-hand month; the right-hand one is always the month after. */\n @State() leftMonth: Date = startOfMonth(new Date());\n\n /** The day the grids' single tab stop sits on. */\n @State() focusedDate: Date = toMidday(new Date());\n\n /** The day under the pointer, which previews the missing end. */\n @State() hovered: Date | null = null;\n\n /** True once a start is chosen and the next click sets the end. */\n @State() awaitingEnd = false;\n\n private initialValue = '';\n\n /**\n * The start held while the range is half-made.\n *\n * Not in `value`, because `value` is the *submitted* range and a half-made\n * one is not a range — a form read mid-selection would see a start with no\n * end. Held here instead, and folded back in for rendering.\n */\n private pendingStart: Date | null = null;\n private stopObserving?: () => void;\n private shouldRestoreFocus = false;\n\n componentWillLoad() {\n this.initialValue = this.value ?? '';\n const { start } = this.range();\n const base = start ?? toMidday(new Date());\n this.focusedDate = base;\n this.leftMonth = this.clamp(startOfMonth(base));\n this.syncFormState();\n }\n\n componentDidRender() {\n if (!this.shouldRestoreFocus) return;\n this.shouldRestoreFocus = false;\n this.el.shadowRoot?.querySelector<HTMLButtonElement>('button[data-day][tabindex=\"0\"]')?.focus();\n }\n\n disconnectedCallback() {\n this.stopObserving?.();\n }\n\n /**\n * Follows a range set from outside, so the grids show what they are told.\n *\n * Without this the element kept whatever month it loaded with, and a\n * consumer assigning `value` got a correct value over the wrong months —\n * the days it names were not even rendered.\n */\n @Watch('value')\n syncDisplayedMonths() {\n const { start, end } = this.range();\n if (!start || !end) return;\n this.pendingStart = null;\n this.awaitingEnd = false;\n this.focusedDate = start;\n this.leftMonth = this.clamp(startOfMonth(start));\n }\n\n /*\n * `name` is watched here and not on the controls that pass a plain string to\n * `setFormValue`: those take their submission name from the reflected\n * attribute, so the platform picks a change up by itself. This one builds\n * the name *into* a FormData, so without the watch a name assigned after\n * load would never reach the submission.\n */\n @Watch('name')\n @Watch('value')\n @Watch('error')\n @Watch('required')\n syncFormState() {\n const { start, end } = this.range();\n\n if (!start || !end || !this.name) {\n this.internals.setFormValue(null);\n } else {\n /*\n * A FormData, so one control submits both ends. Measured: every entry in\n * it reaches the submission, and the element's own `name` attribute is\n * ignored in this mode — which is why the keys are built here.\n */\n const data = new FormData();\n data.append(`${this.name}-start`, formatISODate(start));\n data.append(`${this.name}-end`, formatISODate(end));\n this.internals.setFormValue(data);\n }\n\n applyControlValidity(this.internals, Boolean(start && end), this.required, this.error);\n }\n\n @Watch('open')\n syncOpen(next: boolean, previous: boolean) {\n if (next) this.showPanel();\n else this.hidePanel();\n if (next !== previous) this.pfOpenChange.emit({ open: next });\n }\n\n @Method()\n async show(): Promise<void> {\n if (!this.disabled) this.open = true;\n }\n\n @Method()\n async hide(): Promise<void> {\n this.open = false;\n }\n\n @Method()\n async checkValidity(): Promise<boolean> {\n return this.internals.checkValidity();\n }\n\n @Method()\n async reportValidity(): Promise<boolean> {\n return this.internals.reportValidity();\n }\n\n @Method()\n async getValidationMessage(): Promise<string> {\n return this.internals.validationMessage;\n }\n\n formResetCallback() {\n this.value = this.initialValue;\n this.awaitingEnd = false;\n this.hovered = null;\n }\n\n private range(): DateRangeValue {\n return parseDateRange(this.value, parseISODate);\n }\n\n private get years() {\n const now = new Date().getFullYear();\n const start = this.startYear ?? now - 50;\n const end = this.endYear ?? now + 50;\n return { start: Math.min(start, end), end: Math.max(start, end) };\n }\n\n private clamp(date: Date): Date {\n const { start, end } = this.years;\n return clampMonthToYearRange(date, start, end);\n }\n\n private get panel() {\n return this.el.shadowRoot?.querySelector<HTMLElement>('[part=\"panel\"]') ?? null;\n }\n\n private get trigger() {\n return this.el.shadowRoot?.querySelector<HTMLButtonElement>('[part=\"trigger\"]') ?? null;\n }\n\n private isDisabled(date: Date): boolean {\n if (isOutsideDateRange(date, parseISODate(this.min), parseISODate(this.max))) return true;\n return this.isDateDisabled?.(date) ?? false;\n }\n\n private showPanel() {\n const panel = this.panel;\n if (this.disabled || !panel || panel.matches(':popover-open')) return;\n\n panel.showPopover();\n this.stopObserving?.();\n this.stopObserving = observeAnchoredPosition({\n getAnchor: () => this.trigger,\n getFloating: () => panel,\n align: 'start',\n matchAnchorWidth: false,\n flip: true,\n onChange: ({ left, top }) => placePopover(panel, left, top),\n });\n\n this.shouldRestoreFocus = true;\n }\n\n private hidePanel() {\n this.stopObserving?.();\n this.stopObserving = undefined;\n this.hovered = null;\n const panel = this.panel;\n if (panel?.matches(':popover-open')) panel.hidePopover();\n }\n\n private onToggle = (event: ToggleEvent) => {\n const nowOpen = event.newState === 'open';\n if (this.open !== nowOpen) this.open = nowOpen;\n if (!nowOpen) this.trigger?.focus();\n };\n\n /** One click through core's state machine, plus this element's side-effects. */\n private pick(date: Date) {\n if (this.isDisabled(date)) return;\n\n /*\n * `displayRange()`, not `range()`. A half-made range is deliberately kept\n * out of `value`, so reading the state machine's input from `value` hands\n * it a range with no start — and core, correctly, treats that as \"begin a\n * new range\". Every second click restarted instead of closing. Caught by\n * the swap and Enter tests.\n */\n const next = nextDateRangeSelection(\n { range: this.displayRange(), awaitingEnd: this.awaitingEnd },\n date,\n );\n\n this.awaitingEnd = next.awaitingEnd;\n this.focusedDate = toMidday(date);\n\n if (next.awaitingEnd) {\n // Half-made: hold the start without reporting an incomplete range.\n this.value = '';\n this.pendingStart = next.range.start;\n return;\n }\n\n this.pendingStart = null;\n this.hovered = null;\n this.value = formatDateRange(next.range, formatISODate);\n this.pfChange.emit({\n value: this.value,\n start: next.range.start ? formatISODate(next.range.start) : '',\n end: next.range.end ? formatISODate(next.range.end) : '',\n });\n this.open = false;\n }\n\n /** What the grids draw: the committed range, or the half-made one. */\n private displayRange(): DateRangeValue {\n const committed = this.range();\n if (committed.start && committed.end) return committed;\n return { start: this.pendingStart, end: null };\n }\n\n private moveFocus(move: CalendarMove) {\n const next = moveCalendarDate(this.focusedDate, move);\n const { start, end } = this.years;\n if (next.getFullYear() < start || next.getFullYear() > end) return;\n\n this.focusedDate = next;\n this.shouldRestoreFocus = true;\n\n // Keep the focused day on screen: it belongs to one of the two months.\n const right = addMonths(this.leftMonth, 1);\n if (!isSameMonth(next, this.leftMonth) && !isSameMonth(next, right)) {\n this.leftMonth = this.clamp(startOfMonth(next));\n }\n }\n\n private onKeyDown = (event: KeyboardEvent) => {\n const move = MOVES[event.key];\n if (move) {\n event.preventDefault();\n this.moveFocus(move);\n return;\n }\n\n if (event.key === Keys.Enter || event.key === Keys.Space) {\n event.preventDefault();\n this.pick(this.focusedDate);\n this.shouldRestoreFocus = true;\n }\n };\n\n private clear = (event: MouseEvent) => {\n event.stopPropagation();\n if (!this.value && !this.pendingStart) return;\n this.value = '';\n this.pendingStart = null;\n this.awaitingEnd = false;\n this.hovered = null;\n this.pfChange.emit({ value: '', start: '', end: '' });\n };\n\n private formatted(): string {\n const { start, end } = this.range();\n if (!start || !end) return '';\n const format = new Intl.DateTimeFormat('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n });\n return `${format.format(start)} – ${format.format(end)}`;\n }\n\n private renderGrid(month: Date) {\n const days = buildCalendarDays(month);\n const range = this.displayRange();\n const today = toMidday(new Date());\n const label = new Intl.DateTimeFormat('en-US', {\n month: 'long',\n year: 'numeric',\n }).format(month);\n\n return (\n <div class=\"month\">\n <p class=\"month-label\">{label}</p>\n <div class=\"grid\" part=\"grid\" role=\"grid\" aria-label={label}>\n <div class=\"row\" role=\"row\">\n {WEEKDAY_LABELS.map((day) => (\n <span key={day} class=\"weekday\" role=\"columnheader\" aria-label={day}>\n {day}\n </span>\n ))}\n </div>\n\n {Array.from({ length: CALENDAR_CELL_COUNT / 7 }, (_, week) => (\n <div key={week} class=\"row\" role=\"row\">\n {days.slice(week * 7, week * 7 + 7).map(({ date, inCurrentMonth }) => {\n if (!inCurrentMonth) {\n return <span key={formatISODate(date)} class=\"empty\" role=\"gridcell\"></span>;\n }\n\n const state = rangeDayState(date, range, this.hovered);\n const isEndpoint = state.isStart || state.isEnd;\n const disabled = this.isDisabled(date);\n\n return (\n <button\n key={formatISODate(date)}\n type=\"button\"\n role=\"gridcell\"\n data-day={formatISODate(date)}\n part=\"day\"\n class={{\n day: true,\n 'day--today': isSameDay(today, date),\n 'day--endpoint': isEndpoint,\n 'day--start': state.isStart,\n 'day--end': state.isEnd,\n 'day--inside': state.isInside,\n }}\n tabindex={isSameDay(this.focusedDate, date) ? 0 : -1}\n aria-selected={isEndpoint || state.isInside ? 'true' : 'false'}\n aria-current={isSameDay(today, date) ? 'date' : null}\n aria-disabled={disabled ? 'true' : null}\n aria-label={new Intl.DateTimeFormat('en-US', {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n }).format(date)}\n onClick={() => {\n this.pick(date);\n this.shouldRestoreFocus = true;\n }}\n onMouseEnter={() => {\n if (this.awaitingEnd && !disabled) this.hovered = date;\n }}\n >\n {date.getDate()}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n render() {\n const describedBy = composeDescribedBy(\n this.description && 'description',\n this.error && 'error',\n );\n const text = this.formatted();\n const right = addMonths(this.leftMonth, 1);\n\n return (\n <Host>\n <div class=\"field\" part=\"field\">\n {this.label && (\n <label class=\"label\" part=\"label\" htmlFor=\"trigger\">\n {this.label}\n {this.required && (\n <span class=\"required\" aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n <div class=\"row-controls\">\n <button\n id=\"trigger\"\n aria-label={controlAriaLabel(this.el, this.label)}\n part=\"trigger\"\n class={{ trigger: true, 'trigger--invalid': Boolean(this.error) }}\n type=\"button\"\n disabled={this.disabled}\n aria-haspopup=\"dialog\"\n aria-expanded={this.open ? 'true' : 'false'}\n aria-controls=\"panel\"\n aria-invalid={this.error ? 'true' : null}\n aria-required={this.required ? 'true' : null}\n aria-describedby={describedBy}\n onClick={() => {\n if (!this.disabled) this.open = !this.open;\n }}\n >\n <span class={{ value: true, 'value--placeholder': !text }}>\n {text || this.placeholder}\n </span>\n <pf-icon name=\"calendar\"></pf-icon>\n </button>\n\n {this.allowClear && (this.value || this.pendingStart) && (\n <button\n class=\"clear\"\n part=\"clear\"\n type=\"button\"\n aria-label=\"Clear selected dates\"\n disabled={this.disabled}\n onClick={this.clear}\n >\n <pf-icon name=\"circle-xmark\"></pf-icon>\n </button>\n )}\n </div>\n\n {this.description && (\n <p class=\"description\" part=\"description\" id=\"description\">\n {this.description}\n </p>\n )}\n {this.error && (\n <p class=\"error\" part=\"error\" id=\"error\">\n {this.error}\n </p>\n )}\n </div>\n\n <div\n id=\"panel\"\n part=\"panel\"\n class=\"panel\"\n popover=\"auto\"\n role=\"dialog\"\n aria-label=\"Choose a date range\"\n onToggle={this.onToggle}\n onKeyDown={this.onKeyDown}\n onMouseLeave={() => {\n this.hovered = null;\n }}\n >\n <div class=\"nav\">\n <button\n type=\"button\"\n class=\"step\"\n aria-label=\"Previous month\"\n onClick={() => {\n this.leftMonth = this.clamp(addMonths(this.leftMonth, -1));\n }}\n >\n <pf-icon name=\"square-caret-left\"></pf-icon>\n </button>\n <button\n type=\"button\"\n class=\"step\"\n aria-label=\"Next month\"\n onClick={() => {\n this.leftMonth = this.clamp(addMonths(this.leftMonth, 1));\n }}\n >\n <pf-icon name=\"square-caret-right\"></pf-icon>\n </button>\n </div>\n\n <div class=\"months\">\n {this.renderGrid(this.leftMonth)}\n {this.renderGrid(right)}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -77,7 +77,7 @@ export class PfEmptyState {
77
77
  "references": {
78
78
  "PfEmptyStateSize": {
79
79
  "location": "local",
80
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-empty-state/pf-empty-state.tsx",
80
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-empty-state/pf-empty-state.tsx",
81
81
  "id": "src/components/pf-empty-state/pf-empty-state.tsx::PfEmptyStateSize"
82
82
  }
83
83
  }
@@ -45,8 +45,20 @@ export class PfHeaderNavigation {
45
45
  this.sync();
46
46
  }
47
47
  /**
48
- * Re-reads the items, for a consumer who marked one current through its
49
- * *property* — which leaves no attribute and fires no `slotchange`.
48
+ * An item's `current` changed, so the resolution has to run again.
49
+ *
50
+ * The items are this navigation's own light-DOM children, so nothing is
51
+ * retargeted and a host listener is safe — the same reason the sidebar can
52
+ * listen for a section's copy of this event. `refresh()` stays for a
53
+ * consumer who changes something else the group reads.
54
+ */
55
+ handleStructureChange(event) {
56
+ event.stopPropagation();
57
+ this.sync();
58
+ }
59
+ /**
60
+ * Re-reads the items, for a consumer who changed something the group reads
61
+ * and has no event for.
50
62
  */
51
63
  async refresh() {
52
64
  this.sync();
@@ -80,7 +92,7 @@ export class PfHeaderNavigation {
80
92
  }
81
93
  }
82
94
  render() {
83
- return (h(Host, { key: '2b0c0031fc8225b1b3d87cf91c06a84138840dca' }, h("nav", { key: '196a2e3faf81b1b831683ae4e422beedeeef1af6', class: "nav", part: "nav", "aria-label": this.label }, h("span", { key: 'a99fb70cb2763fd865f1d39290632952d1f27fbb', class: { brand: true, empty: !this.hasBrand }, part: "brand" }, h("slot", { key: 'e9d3eb13fd19f1265b3caed47e082331414e47f9', name: "brand", onSlotchange: () => this.refresh() })), h("ul", { key: 'c03966d2083df04e560b2151d89694755276aea2', class: "list", part: "list" }, h("slot", { key: '754a8d4910efc0aee658ea4c01e392f2a2f91178', onSlotchange: () => this.refresh() })), h("span", { key: 'bee95bd441bb2bac3ef88ce5ca40ea07989adba4', class: { actions: true, empty: !this.hasActions }, part: "actions" }, h("slot", { key: 'a5a75d6aa8ff4736d32a6ddd9535c34c629ee524', name: "actions", onSlotchange: () => this.refresh() })))));
95
+ return (h(Host, { key: 'f3f8c91ba9eab4755b1e5e96adc7245e630bd7fa' }, h("nav", { key: '7984894e4bcc395140ef229f351bbc037efa565e', class: "nav", part: "nav", "aria-label": this.label }, h("span", { key: 'fc21f987ab7f5ac3c74779157f70a23c5375cb27', class: { brand: true, empty: !this.hasBrand }, part: "brand" }, h("slot", { key: 'bb68a3a686be890c522671f3d6a569f438275631', name: "brand", onSlotchange: () => this.refresh() })), h("ul", { key: '43f0bb0d2d82497373ac74bfda26d9e2e545932e', class: "list", part: "list" }, h("slot", { key: '30be86d24556bd3521642ee79195a2af6a8c70c9', onSlotchange: () => this.refresh() })), h("span", { key: '687115f0db5bb7f35a82bb1b5dd79234a0049c99', class: { actions: true, empty: !this.hasActions }, part: "actions" }, h("slot", { key: 'f11f998414c8a424d64ddf759369a31b9ddbd0bb', name: "actions", onSlotchange: () => this.refresh() })))));
84
96
  }
85
97
  static get is() { return "pf-header-navigation"; }
86
98
  static get encapsulation() { return "shadow"; }
@@ -139,12 +151,21 @@ export class PfHeaderNavigation {
139
151
  "return": "Promise<void>"
140
152
  },
141
153
  "docs": {
142
- "text": "Re-reads the items, for a consumer who marked one current through its\n*property* \u2014 which leaves no attribute and fires no `slotchange`.",
154
+ "text": "Re-reads the items, for a consumer who changed something the group reads\nand has no event for.",
143
155
  "tags": []
144
156
  }
145
157
  }
146
158
  };
147
159
  }
148
160
  static get elementRef() { return "el"; }
161
+ static get listeners() {
162
+ return [{
163
+ "name": "pfNavStructure",
164
+ "method": "handleStructureChange",
165
+ "target": undefined,
166
+ "capture": false,
167
+ "passive": false
168
+ }];
169
+ }
149
170
  }
150
171
  //# sourceMappingURL=pf-header-navigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pf-header-navigation.js","sourceRoot":"","sources":["../../../src/components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AAI,EAAC,SAAS;oBACrE,6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,GAAI,CACtD,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { resolveCurrentNavItem } from '@pitchfork-ui/core';\nimport { Component, Element, h, Host, Method, Prop, State } from '@stencil/core';\n\n/**\n * A header navigation over `pf-nav-item` children.\n *\n * The group owns the one thing an item cannot know: which item is the current\n * page. Core's rule decides, so the React `HeaderNavigation` marks the same\n * one, and it is one index — which is what stops a navigation claiming two\n * current pages.\n *\n * The host is **not** a banner. The React component renders a `<header>`,\n * which is the banner landmark at the top level of a page, but an element\n * cannot know whether it is the page's header: a second banner is a defect,\n * not a decoration. So the shadow root renders only the `<nav>` landmark, and\n * a consumer who wants a banner puts this inside their own `<header>`.\n *\n * @slot - the `pf-nav-item` children.\n * @slot brand - a logo or product name, before the items.\n * @slot actions - controls after the items, such as a sign-in button.\n * @part nav - the navigation landmark.\n * @part brand - the brand's box.\n * @part list - the list the items are slotted into.\n * @part actions - the actions' box.\n */\n@Component({\n tag: 'pf-header-navigation',\n styleUrl: 'pf-header-navigation.css',\n shadow: true,\n})\nexport class PfHeaderNavigation {\n @Element() el!: HTMLElement;\n\n /** The navigation's accessible name. */\n @Prop() label = 'Header navigation';\n\n /**\n * Whether anything was slotted into `brand` and `actions`.\n *\n * Asked in JS because a wrapper around a slot cannot be collapsed from CSS\n * — `:not(:has(*))` never matches, since the `<slot>` is itself a child —\n * and these two boxes have to exist when they are used: they are grid\n * items, so an empty one still takes a column and a gap, which would push\n * every item along by one `--space-3` for no visible reason.\n */\n @State() hasBrand = false;\n @State() hasActions = false;\n\n /** The light DOM is readable here, so first paint is already right. */\n componentWillLoad() {\n this.sync();\n }\n\n componentDidLoad() {\n this.sync();\n }\n\n /**\n * Re-reads the items, for a consumer who marked one current through its\n * *property* — which leaves no attribute and fires no `slotchange`.\n */\n @Method()\n async refresh() {\n this.sync();\n }\n\n /** Direct children only: a nested navigation owns its own items. */\n private get items(): HTMLElement[] {\n return Array.from(this.el.querySelectorAll<HTMLElement>('pf-nav-item')).filter(\n (item) => item.parentElement === this.el,\n );\n }\n\n /**\n * The property if the item has upgraded, the attribute if it has not:\n * `componentWillLoad` can run before a child parsed from HTML upgrades.\n */\n private isCurrent(item: HTMLElement) {\n return (item as HTMLElement & { current?: boolean }).current ?? item.hasAttribute('current');\n }\n\n private sync() {\n /*\n * The children are read one by one rather than with a `:scope >`\n * selector, which Stencil's mock DOM does not support at all — it throws\n * from jQuery's selector engine rather than returning nothing.\n */\n const slotted = (name: string) =>\n Array.from(this.el.children).some((child) => child.getAttribute('slot') === name);\n\n this.hasBrand = slotted('brand');\n this.hasActions = slotted('actions');\n\n const items = this.items;\n const currentIndex = resolveCurrentNavItem(\n items.map((item) => ({ current: this.isCurrent(item) })),\n );\n\n for (const [index, item] of items.entries()) {\n const node = item as HTMLElement & { currentPage: boolean; orientation: string };\n node.currentPage = index === currentIndex;\n node.orientation = 'horizontal';\n }\n }\n\n render() {\n return (\n <Host>\n <nav class=\"nav\" part=\"nav\" aria-label={this.label}>\n {/*\n The slots stay in the tree whether or not they hold anything: a\n slot that is not rendered never fires `slotchange`, so content\n added later would stay invisible for good. The box is hidden\n instead.\n */}\n <span class={{ brand: true, empty: !this.hasBrand }} part=\"brand\">\n <slot name=\"brand\" onSlotchange={() => this.refresh()} />\n </span>\n\n <ul class=\"list\" part=\"list\">\n <slot onSlotchange={() => this.refresh()} />\n </ul>\n\n <span class={{ actions: true, empty: !this.hasActions }} part=\"actions\">\n <slot name=\"actions\" onSlotchange={() => this.refresh()} />\n </span>\n </nav>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pf-header-navigation.js","sourceRoot":"","sources":["../../../src/components/pf-header-navigation/pf-header-navigation.tsx"],"names":[],"mappings":"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,6DAAM,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,IAAI,EAAC,SAAS;oBACrE,6DAAM,IAAI,EAAC,SAAS,EAAC,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,GAAI,CACtD,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { resolveCurrentNavItem } from '@pitchfork-ui/core';\nimport { Component, Element, h, Host, Listen, Method, Prop, State } from '@stencil/core';\n\n/**\n * A header navigation over `pf-nav-item` children.\n *\n * The group owns the one thing an item cannot know: which item is the current\n * page. Core's rule decides, so the React `HeaderNavigation` marks the same\n * one, and it is one index — which is what stops a navigation claiming two\n * current pages.\n *\n * The host is **not** a banner. The React component renders a `<header>`,\n * which is the banner landmark at the top level of a page, but an element\n * cannot know whether it is the page's header: a second banner is a defect,\n * not a decoration. So the shadow root renders only the `<nav>` landmark, and\n * a consumer who wants a banner puts this inside their own `<header>`.\n *\n * @slot - the `pf-nav-item` children.\n * @slot brand - a logo or product name, before the items.\n * @slot actions - controls after the items, such as a sign-in button.\n * @part nav - the navigation landmark.\n * @part brand - the brand's box.\n * @part list - the list the items are slotted into.\n * @part actions - the actions' box.\n */\n@Component({\n tag: 'pf-header-navigation',\n styleUrl: 'pf-header-navigation.css',\n shadow: true,\n})\nexport class PfHeaderNavigation {\n @Element() el!: HTMLElement;\n\n /** The navigation's accessible name. */\n @Prop() label = 'Header navigation';\n\n /**\n * Whether anything was slotted into `brand` and `actions`.\n *\n * Asked in JS because a wrapper around a slot cannot be collapsed from CSS\n * — `:not(:has(*))` never matches, since the `<slot>` is itself a child —\n * and these two boxes have to exist when they are used: they are grid\n * items, so an empty one still takes a column and a gap, which would push\n * every item along by one `--space-3` for no visible reason.\n */\n @State() hasBrand = false;\n @State() hasActions = false;\n\n /** The light DOM is readable here, so first paint is already right. */\n componentWillLoad() {\n this.sync();\n }\n\n componentDidLoad() {\n this.sync();\n }\n\n /**\n * An item's `current` changed, so the resolution has to run again.\n *\n * The items are this navigation's own light-DOM children, so nothing is\n * retargeted and a host listener is safe — the same reason the sidebar can\n * listen for a section's copy of this event. `refresh()` stays for a\n * consumer who changes something else the group reads.\n */\n @Listen('pfNavStructure')\n handleStructureChange(event: CustomEvent<void>) {\n event.stopPropagation();\n this.sync();\n }\n\n /**\n * Re-reads the items, for a consumer who changed something the group reads\n * and has no event for.\n */\n @Method()\n async refresh() {\n this.sync();\n }\n\n /** Direct children only: a nested navigation owns its own items. */\n private get items(): HTMLElement[] {\n return Array.from(this.el.querySelectorAll<HTMLElement>('pf-nav-item')).filter(\n (item) => item.parentElement === this.el,\n );\n }\n\n /**\n * The property if the item has upgraded, the attribute if it has not:\n * `componentWillLoad` can run before a child parsed from HTML upgrades.\n */\n private isCurrent(item: HTMLElement) {\n return (item as HTMLElement & { current?: boolean }).current ?? item.hasAttribute('current');\n }\n\n private sync() {\n /*\n * The children are read one by one rather than with a `:scope >`\n * selector, which Stencil's mock DOM does not support at all — it throws\n * from jQuery's selector engine rather than returning nothing.\n */\n const slotted = (name: string) =>\n Array.from(this.el.children).some((child) => child.getAttribute('slot') === name);\n\n this.hasBrand = slotted('brand');\n this.hasActions = slotted('actions');\n\n const items = this.items;\n const currentIndex = resolveCurrentNavItem(\n items.map((item) => ({ current: this.isCurrent(item) })),\n );\n\n for (const [index, item] of items.entries()) {\n const node = item as HTMLElement & { currentPage: boolean; orientation: string };\n node.currentPage = index === currentIndex;\n node.orientation = 'horizontal';\n }\n }\n\n render() {\n return (\n <Host>\n <nav class=\"nav\" part=\"nav\" aria-label={this.label}>\n {/*\n The slots stay in the tree whether or not they hold anything: a\n slot that is not rendered never fires `slotchange`, so content\n added later would stay invisible for good. The box is hidden\n instead.\n */}\n <span class={{ brand: true, empty: !this.hasBrand }} part=\"brand\">\n <slot name=\"brand\" onSlotchange={() => this.refresh()} />\n </span>\n\n <ul class=\"list\" part=\"list\">\n <slot onSlotchange={() => this.refresh()} />\n </ul>\n\n <span class={{ actions: true, empty: !this.hasActions }} part=\"actions\">\n <slot name=\"actions\" onSlotchange={() => this.refresh()} />\n </span>\n </nav>\n </Host>\n );\n }\n}\n"]}
@@ -114,7 +114,7 @@ export class PfInlineCta {
114
114
  "references": {
115
115
  "PfInlineCtaTone": {
116
116
  "location": "local",
117
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-inline-cta/pf-inline-cta.tsx",
117
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-inline-cta/pf-inline-cta.tsx",
118
118
  "id": "src/components/pf-inline-cta/pf-inline-cta.tsx::PfInlineCtaTone"
119
119
  }
120
120
  }
@@ -1,5 +1,6 @@
1
1
  import { composeDescribedBy } from "@pitchfork-ui/core";
2
2
  import { applyControlValidity } from "../../form-validity";
3
+ import { controlAriaLabel } from "../../control-label";
3
4
  import { h, Host, } from "@stencil/core";
4
5
  /**
5
6
  * A form-associated text input.
@@ -16,6 +17,7 @@ import { h, Host, } from "@stencil/core";
16
17
  * @part error - the error message below the control.
17
18
  */
18
19
  export class PfInput {
20
+ el;
19
21
  internals;
20
22
  /**
21
23
  * Submitted under this name.
@@ -95,7 +97,7 @@ export class PfInput {
95
97
  // IDs are scoped to this shadow root, so they can be literal -- the useId()
96
98
  // the React component needs has no counterpart here.
97
99
  const describedBy = composeDescribedBy(this.description && 'description', this.error && 'error');
98
- return (h(Host, { key: 'a6d68ce6641fb92407356c94e2181b280bdc03b6' }, h("div", { key: '312ee69f4a661494548b01f598b74ed56bd443fc', class: "field", part: "field" }, this.label && (h("label", { key: '59188fde6b3639105f8ade8b497c764ddd5d658f', class: "label", part: "label", htmlFor: "input" }, this.label, this.required && (h("span", { key: '4f71679ec6bb99d3f7dc8f941d8c02bb94452c21', class: "required", "aria-hidden": "true" }, "*")))), h("input", { key: '0680b0e5aa0f8ddf9850a212f735f0f8c5b273a3', id: "input", part: "input", class: { input: true, 'input--invalid': Boolean(this.error) }, type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, readOnly: this.readonly, "aria-invalid": this.error ? 'true' : null, "aria-describedby": describedBy, onInput: this.onInput, onChange: this.onChange }), this.description && (h("p", { key: 'f732742b8602ed6094600065d5036bdad538ad35', class: "description", part: "description", id: "description" }, this.description)), this.error && (h("p", { key: '9d524a204abfb733afaf2bf3cc5ec9a5e1c65b94', class: "error", part: "error", id: "error" }, this.error)))));
100
+ return (h(Host, { key: '2eabd0d15d1a83b03064dee5feef9884a55a3c4c' }, h("div", { key: '3c10b0b9d675eede30e34c27013d51713584baca', class: "field", part: "field" }, this.label && (h("label", { key: 'f0b9b45f307792a93190a354efcf0a980a326589', class: "label", part: "label", htmlFor: "input" }, this.label, this.required && (h("span", { key: 'e3d8edb769ea8736ca485f5e539a0398ba1d1a33', class: "required", "aria-hidden": "true" }, "*")))), h("input", { key: '419f2ba1f5a7b62b5042d1fd94b96a8abee829a7', id: "input", "aria-label": controlAriaLabel(this.el, this.label), part: "input", class: { input: true, 'input--invalid': Boolean(this.error) }, type: this.type, name: this.name, value: this.value, placeholder: this.placeholder, required: this.required, disabled: this.disabled, readOnly: this.readonly, "aria-invalid": this.error ? 'true' : null, "aria-describedby": describedBy, onInput: this.onInput, onChange: this.onChange }), this.description && (h("p", { key: 'c0d1323a34f5503a2049cc3ac5ef9e892cfb1cb6', class: "description", part: "description", id: "description" }, this.description)), this.error && (h("p", { key: '915301b580225bbf0b901c53f977b73a53fa94ee', class: "error", part: "error", id: "error" }, this.error)))));
99
101
  }
100
102
  static get is() { return "pf-input"; }
101
103
  static get encapsulation() { return "shadow"; }
@@ -161,7 +163,7 @@ export class PfInput {
161
163
  "references": {
162
164
  "PfInputType": {
163
165
  "location": "local",
164
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-input/pf-input.tsx",
166
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-input/pf-input.tsx",
165
167
  "id": "src/components/pf-input/pf-input.tsx::PfInputType"
166
168
  }
167
169
  }
@@ -404,6 +406,7 @@ export class PfInput {
404
406
  }
405
407
  };
406
408
  }
409
+ static get elementRef() { return "el"; }
407
410
  static get watchers() {
408
411
  return [{
409
412
  "propName": "value",
@@ -1 +1 @@
1
- {"version":3,"file":"pf-input.js","sourceRoot":"","sources":["../../../src/components/pf-input/pf-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,SAAS,EACT,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAIvB;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,OAAO;IACC,SAAS,CAAoB;IAEhD;;;;;;;;OAQG;IACsB,IAAI,CAAU;IAEvC,2BAA2B;IACF,KAAK,GAAG,EAAE,CAAC;IAEX,IAAI,GAAgB,MAAM,CAAC;IAEpD,6EAA6E;IACrE,KAAK,CAAU;IAEvB,mCAAmC;IAC3B,WAAW,CAAU;IAE7B,qEAAqE;IAC7D,KAAK,CAAU;IAEf,WAAW,CAAU;IAEJ,QAAQ,GAAG,KAAK,CAAC;IAEjB,QAAQ,GAAG,KAAK,CAAC;IAEjB,QAAQ,GAAG,KAAK,CAAC;IAE1C,+DAA+D;IACtD,OAAO,CAAmC;IAEnD,yEAAyE;IAChE,QAAQ,CAAmC;IAEpD;;;OAGG;IACK,YAAY,GAAG,EAAE,CAAC;IAE1B,iBAAiB;QACf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;QACrC,IAAI,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { composeDescribedBy } from '@pitchfork-ui/core';\nimport { applyControlValidity } from '../../form-validity';\nimport {\n AttachInternals,\n Component,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\n\nexport type PfInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url';\n\n/**\n * A form-associated text input.\n *\n * `formAssociated` plus `ElementInternals` is what makes this participate in a\n * real `<form>`: the value reaches `FormData`, constraint validation works, and\n * Angular's generated value accessor has something to bind to. A plain\n * `<input>` inside a shadow root does none of that.\n *\n * @part field - the wrapper around label, control and messages.\n * @part label - the label element.\n * @part input - the native input.\n * @part description - the hint text below the control.\n * @part error - the error message below the control.\n */\n@Component({\n tag: 'pf-input',\n styleUrl: 'pf-input.css',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n})\nexport class PfInput {\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * Submitted under this name.\n *\n * Reflected, because a form-associated custom element takes its submission\n * name from the `name` *content attribute* -- not from this property. A\n * framework wrapper that sets properties rather than attributes (the\n * generated React bindings do) would otherwise leave the control nameless\n * and absent from the submission, with every other sign of working.\n */\n @Prop({ reflect: true }) name?: string;\n\n /** The control's value. */\n @Prop({ mutable: true }) value = '';\n\n @Prop({ reflect: true }) type: PfInputType = 'text';\n\n /** Visible label. Rendered in the same root as the input, so `for` works. */\n @Prop() label?: string;\n\n /** Hint text below the control. */\n @Prop() description?: string;\n\n /** Error message. Its presence is what marks the control invalid. */\n @Prop() error?: string;\n\n @Prop() placeholder?: string;\n\n @Prop({ reflect: true }) required = false;\n\n @Prop({ reflect: true }) disabled = false;\n\n @Prop({ reflect: true }) readonly = false;\n\n /** Fires on every keystroke, like the native `input` event. */\n @Event() pfInput!: EventEmitter<{ value: string }>;\n\n /** Fires when the value is committed, like the native `change` event. */\n @Event() pfChange!: EventEmitter<{ value: string }>;\n\n /**\n * The value the control had when it was created, which is what a form reset\n * restores. Captured here because `value` has been overwritten by then.\n */\n private initialValue = '';\n\n componentWillLoad() {\n this.initialValue = this.value ?? '';\n this.syncFormState();\n }\n\n @Watch('value')\n @Watch('error')\n @Watch('required')\n syncFormState() {\n this.internals.setFormValue(this.value ?? '');\n applyControlValidity(this.internals, Boolean(this.value), this.required, this.error);\n }\n\n /**\n * Whether the control currently satisfies its constraints.\n *\n * A form-associated custom element does not inherit `checkValidity` from\n * anywhere -- the spec puts it on ElementInternals, so the element has to\n * forward it or consumers cannot ask.\n */\n @Method()\n async checkValidity(): Promise<boolean> {\n return this.internals.checkValidity();\n }\n\n /** As `checkValidity`, but also shows the browser's validation message. */\n @Method()\n async reportValidity(): Promise<boolean> {\n return this.internals.reportValidity();\n }\n\n /** The message explaining why the control is invalid, or an empty string. */\n @Method()\n async getValidationMessage(): Promise<string> {\n return this.internals.validationMessage;\n }\n\n /**\n * A reset restores the value the control started with, not an empty string —\n * verified against a native `<input value=\"initial\">`, which comes back to\n * \"initial\" rather than to \"\". Clearing it was a real defect: a\n * `<pf-input value=\"…\">` in a form lost its value on any reset.\n */\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n private onInput = (event: Event) => {\n this.value = (event.target as HTMLInputElement).value;\n this.pfInput.emit({ value: this.value });\n };\n\n private onChange = () => {\n this.pfChange.emit({ value: this.value });\n };\n\n render() {\n // IDs are scoped to this shadow root, so they can be literal -- the useId()\n // the React component needs has no counterpart here.\n const describedBy = composeDescribedBy(\n this.description && 'description',\n this.error && 'error',\n );\n\n return (\n <Host>\n <div class=\"field\" part=\"field\">\n {this.label && (\n <label class=\"label\" part=\"label\" htmlFor=\"input\">\n {this.label}\n {this.required && (\n <span class=\"required\" aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n <input\n id=\"input\"\n part=\"input\"\n class={{ input: true, 'input--invalid': Boolean(this.error) }}\n type={this.type}\n name={this.name}\n value={this.value}\n placeholder={this.placeholder}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n aria-invalid={this.error ? 'true' : null}\n aria-describedby={describedBy}\n onInput={this.onInput}\n onChange={this.onChange}\n />\n {this.description && (\n <p class=\"description\" part=\"description\" id=\"description\">\n {this.description}\n </p>\n )}\n {this.error && (\n <p class=\"error\" part=\"error\" id=\"error\">\n {this.error}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pf-input.js","sourceRoot":"","sources":["../../../src/components/pf-input/pf-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACL,eAAe,EACf,SAAS,EACT,OAAO,EACP,KAAK,EAEL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAIvB;;;;;;;;;;;;;GAaG;AAOH,MAAM,OAAO,OAAO;IACP,EAAE,CAAe;IAET,SAAS,CAAoB;IAEhD;;;;;;;;OAQG;IACsB,IAAI,CAAU;IAEvC,2BAA2B;IACF,KAAK,GAAG,EAAE,CAAC;IAEX,IAAI,GAAgB,MAAM,CAAC;IAEpD,6EAA6E;IACrE,KAAK,CAAU;IAEvB,mCAAmC;IAC3B,WAAW,CAAU;IAE7B,qEAAqE;IAC7D,KAAK,CAAU;IAEf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AC,OAAO,EACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GACvB;gBACD,IAAI,CAAC,WAAW,IAAI,CACnB,0DAAG,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,aAAa,EAAC,EAAE,EAAC,aAAa,IACvD,IAAI,CAAC,WAAW,CACf,CACL;gBACA,IAAI,CAAC,KAAK,IAAI,CACb,0DAAG,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,EAAE,EAAC,OAAO,IACrC,IAAI,CAAC,KAAK,CACT,CACL,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { composeDescribedBy } from '@pitchfork-ui/core';\nimport { applyControlValidity } from '../../form-validity';\nimport { controlAriaLabel } from '../../control-label';\nimport {\n AttachInternals,\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n Watch,\n} from '@stencil/core';\n\nexport type PfInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url';\n\n/**\n * A form-associated text input.\n *\n * `formAssociated` plus `ElementInternals` is what makes this participate in a\n * real `<form>`: the value reaches `FormData`, constraint validation works, and\n * Angular's generated value accessor has something to bind to. A plain\n * `<input>` inside a shadow root does none of that.\n *\n * @part field - the wrapper around label, control and messages.\n * @part label - the label element.\n * @part input - the native input.\n * @part description - the hint text below the control.\n * @part error - the error message below the control.\n */\n@Component({\n tag: 'pf-input',\n styleUrl: 'pf-input.css',\n formAssociated: true,\n shadow: { delegatesFocus: true },\n})\nexport class PfInput {\n @Element() el!: HTMLElement;\n\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * Submitted under this name.\n *\n * Reflected, because a form-associated custom element takes its submission\n * name from the `name` *content attribute* -- not from this property. A\n * framework wrapper that sets properties rather than attributes (the\n * generated React bindings do) would otherwise leave the control nameless\n * and absent from the submission, with every other sign of working.\n */\n @Prop({ reflect: true }) name?: string;\n\n /** The control's value. */\n @Prop({ mutable: true }) value = '';\n\n @Prop({ reflect: true }) type: PfInputType = 'text';\n\n /** Visible label. Rendered in the same root as the input, so `for` works. */\n @Prop() label?: string;\n\n /** Hint text below the control. */\n @Prop() description?: string;\n\n /** Error message. Its presence is what marks the control invalid. */\n @Prop() error?: string;\n\n @Prop() placeholder?: string;\n\n @Prop({ reflect: true }) required = false;\n\n @Prop({ reflect: true }) disabled = false;\n\n @Prop({ reflect: true }) readonly = false;\n\n /** Fires on every keystroke, like the native `input` event. */\n @Event() pfInput!: EventEmitter<{ value: string }>;\n\n /** Fires when the value is committed, like the native `change` event. */\n @Event() pfChange!: EventEmitter<{ value: string }>;\n\n /**\n * The value the control had when it was created, which is what a form reset\n * restores. Captured here because `value` has been overwritten by then.\n */\n private initialValue = '';\n\n componentWillLoad() {\n this.initialValue = this.value ?? '';\n this.syncFormState();\n }\n\n @Watch('value')\n @Watch('error')\n @Watch('required')\n syncFormState() {\n this.internals.setFormValue(this.value ?? '');\n applyControlValidity(this.internals, Boolean(this.value), this.required, this.error);\n }\n\n /**\n * Whether the control currently satisfies its constraints.\n *\n * A form-associated custom element does not inherit `checkValidity` from\n * anywhere -- the spec puts it on ElementInternals, so the element has to\n * forward it or consumers cannot ask.\n */\n @Method()\n async checkValidity(): Promise<boolean> {\n return this.internals.checkValidity();\n }\n\n /** As `checkValidity`, but also shows the browser's validation message. */\n @Method()\n async reportValidity(): Promise<boolean> {\n return this.internals.reportValidity();\n }\n\n /** The message explaining why the control is invalid, or an empty string. */\n @Method()\n async getValidationMessage(): Promise<string> {\n return this.internals.validationMessage;\n }\n\n /**\n * A reset restores the value the control started with, not an empty string —\n * verified against a native `<input value=\"initial\">`, which comes back to\n * \"initial\" rather than to \"\". Clearing it was a real defect: a\n * `<pf-input value=\"…\">` in a form lost its value on any reset.\n */\n formResetCallback() {\n this.value = this.initialValue;\n }\n\n private onInput = (event: Event) => {\n this.value = (event.target as HTMLInputElement).value;\n this.pfInput.emit({ value: this.value });\n };\n\n private onChange = () => {\n this.pfChange.emit({ value: this.value });\n };\n\n render() {\n // IDs are scoped to this shadow root, so they can be literal -- the useId()\n // the React component needs has no counterpart here.\n const describedBy = composeDescribedBy(\n this.description && 'description',\n this.error && 'error',\n );\n\n return (\n <Host>\n <div class=\"field\" part=\"field\">\n {this.label && (\n <label class=\"label\" part=\"label\" htmlFor=\"input\">\n {this.label}\n {this.required && (\n <span class=\"required\" aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n <input\n id=\"input\"\n aria-label={controlAriaLabel(this.el, this.label)}\n part=\"input\"\n class={{ input: true, 'input--invalid': Boolean(this.error) }}\n type={this.type}\n name={this.name}\n value={this.value}\n placeholder={this.placeholder}\n required={this.required}\n disabled={this.disabled}\n readOnly={this.readonly}\n aria-invalid={this.error ? 'true' : null}\n aria-describedby={describedBy}\n onInput={this.onInput}\n onChange={this.onChange}\n />\n {this.description && (\n <p class=\"description\" part=\"description\" id=\"description\">\n {this.description}\n </p>\n )}\n {this.error && (\n <p class=\"error\" part=\"error\" id=\"error\">\n {this.error}\n </p>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -59,7 +59,7 @@ export class PfKbd {
59
59
  "references": {
60
60
  "PfKbdSize": {
61
61
  "location": "local",
62
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-kbd/pf-kbd.tsx",
62
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-kbd/pf-kbd.tsx",
63
63
  "id": "src/components/pf-kbd/pf-kbd.tsx::PfKbdSize"
64
64
  }
65
65
  }
@@ -140,7 +140,7 @@ export class PfLineChart {
140
140
  "references": {
141
141
  "PfChartRow": {
142
142
  "location": "local",
143
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-line-chart/pf-line-chart.tsx",
143
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-line-chart/pf-line-chart.tsx",
144
144
  "id": "src/components/pf-line-chart/pf-line-chart.tsx::PfChartRow"
145
145
  }
146
146
  }
@@ -36,7 +36,7 @@ export class PfLoadingDots {
36
36
  "references": {
37
37
  "PfLoadingDotsSize": {
38
38
  "location": "local",
39
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-loading-dots/pf-loading-dots.tsx",
39
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-loading-dots/pf-loading-dots.tsx",
40
40
  "id": "src/components/pf-loading-dots/pf-loading-dots.tsx::PfLoadingDotsSize"
41
41
  }
42
42
  }
@@ -78,7 +78,7 @@ export class PfMetricCard {
78
78
  "references": {
79
79
  "PfMetricTrend": {
80
80
  "location": "local",
81
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-metric-card/pf-metric-card.tsx",
81
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-metric-card/pf-metric-card.tsx",
82
82
  "id": "src/components/pf-metric-card/pf-metric-card.tsx::PfMetricTrend"
83
83
  }
84
84
  }
@@ -1,13 +1,17 @@
1
- import { lockPageScroll } from "@pitchfork-ui/core";
1
+ import { getFocusableElements, lockPageScroll } from "@pitchfork-ui/core";
2
2
  import { h, Host, } from "@stencil/core";
3
3
  /**
4
4
  * A modal dialog.
5
5
  *
6
6
  * A native `<dialog>` opened with `showModal()`, which from inside a shadow
7
7
  * root gives the focus trap, Escape and the backdrop for nothing — all
8
- * measured: focus moves inside on open and cannot be taken by a light-DOM
9
- * button, and a real Escape fires `cancel` then `close`. So `trapFocus` from
10
- * core is not needed here, unlike in the React component.
8
+ * measured: focus cannot be taken by a light-DOM button, and a real Escape
9
+ * fires `cancel` then `close`. So `trapFocus` from core is not needed here,
10
+ * unlike in the React component.
11
+ *
12
+ * The one part of `showModal()` that cannot be relied on is where it puts
13
+ * focus, and the gap is exactly the case every framework consumer is in. See
14
+ * `showDialog` below.
11
15
  *
12
16
  * What `showModal()` does *not* do is lock page scroll — measured: a real
13
17
  * wheel still scrolled the page behind an open modal — so this element locks
@@ -88,12 +92,79 @@ export class PfModal {
88
92
  this.releaseScroll?.();
89
93
  this.releaseScroll = null;
90
94
  }
95
+ /**
96
+ * Opens the dialog, and makes sure focus actually went into it.
97
+ *
98
+ * `showModal()` focuses the dialog or its first focusable descendant — but
99
+ * **not** when light-DOM children were appended in the same task as the
100
+ * open. Measured in Chromium with no framework involved: append the three
101
+ * `pf-modal-*` sections to a long-mounted `pf-modal` and set `open` in the
102
+ * same task, and the dialog opens with `document.activeElement` still on
103
+ * `<body>` and `:focus-within` false. Leave one frame between the two and
104
+ * focus lands inside; mount the element with its children and `open`
105
+ * already set and focus lands inside. So it is the append racing the open,
106
+ * and the flattened tree `showModal()`'s focusing steps read.
107
+ *
108
+ * That race is not an edge case: React, Angular and Vue all commit a
109
+ * modal's content and its `open` in one go, so every framework consumer got
110
+ * an open modal with focus outside it and nothing to say so — the page is
111
+ * still inert, so the only symptom is that a reader is not taken to the
112
+ * dialog and the first Tab is needed. Porting `apps/demo` is what found it.
113
+ *
114
+ * What the trace shows, with element identity and a `MutationObserver` on
115
+ * the shadow root: `showModal()` **does** focus, onto `div[part=panel]`,
116
+ * and one frame later a `focusout` with `relatedTarget: null` drops it,
117
+ * with nothing removed from the shadow root. That is Chromium's focus
118
+ * fixup running once the appended children are assigned to the slot and
119
+ * finding the panel is no longer a valid target -- so it is not a render
120
+ * that loses focus, and re-asserting after a render does not catch it
121
+ * (measured: `componentDidRender` alone changes nothing here).
122
+ *
123
+ * So the dialog watches for exactly that: a `focusout` that goes nowhere
124
+ * while the modal is open puts focus back. `requestAnimationFrame` after
125
+ * `showModal()` covers the case where focus never arrived at all, and
126
+ * `componentDidRender` covers a render that discards the focused node. All
127
+ * three are the same guarded call, and the `:focus-within` guard makes it a
128
+ * no-op whenever focus is already inside -- so none of them moves focus
129
+ * that the platform or a consumer placed.
130
+ */
91
131
  showDialog() {
92
132
  const dialog = this.dialog;
93
133
  if (!dialog || dialog.open)
94
134
  return;
95
135
  dialog.showModal();
96
136
  this.lockScroll();
137
+ requestAnimationFrame(() => this.ensureFocusInside());
138
+ }
139
+ componentDidRender() {
140
+ this.ensureFocusInside();
141
+ }
142
+ /**
143
+ * Focus left the dialog for nothing while it is open, which the platform
144
+ * does when its focus fixup runs after the slotted content changes.
145
+ *
146
+ * `relatedTarget` is the test: a Tab or a click inside names where focus
147
+ * went, and a modal dialog means it cannot have gone outside. The window
148
+ * losing focus also reports null, hence the `document.hasFocus()` guard --
149
+ * without it, switching tabs would pull focus back on return.
150
+ */
151
+ onFocusOut = (event) => {
152
+ if (!this.open || event.relatedTarget)
153
+ return;
154
+ requestAnimationFrame(() => {
155
+ if (document.hasFocus())
156
+ this.ensureFocusInside();
157
+ });
158
+ };
159
+ /** Focus inside the open dialog, unless it is already there. */
160
+ ensureFocusInside() {
161
+ const dialog = this.dialog;
162
+ if (!this.open || !dialog?.isConnected || !dialog.open)
163
+ return;
164
+ if (dialog.matches(':focus-within'))
165
+ return;
166
+ const [first] = getFocusableElements(dialog);
167
+ (first ?? dialog).focus();
97
168
  }
98
169
  closeDialog() {
99
170
  const dialog = this.dialog;
@@ -135,7 +206,7 @@ export class PfModal {
135
206
  return text ? text.slice(0, 120) : undefined;
136
207
  }
137
208
  render() {
138
- return (h(Host, { key: '4445c1692e0cdf8ea4243f031984d25c3fa35148' }, h("dialog", { key: '6a87d0181761644d8f9bc2d02ead398c10030668', part: "dialog", class: "dialog", "aria-label": this.accessibleName(), onCancel: this.onCancel, onClose: this.onClose, onClick: this.onDialogClick }, h("div", { key: '0ce7125e86b87d9fd834aee12491d384c0a47f7c', class: "panel", part: "panel" }, this.showCloseButton && (h("button", { key: 'e395307252b805932cdbebe2bc8e31178b8c8fb6', class: "close", part: "close", type: "button", "aria-label": "Close", onClick: () => this.hide() }, h("svg", { key: 'f83625e2e03e6c0e5f29aa1dd76dabab6011d27f', viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", focusable: "false" }, h("path", { key: 'fccb0dadc0442661f9300fdec4b36234124fcd93', d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", "stroke-width": "1.6", "stroke-linecap": "round", fill: "none" })))), h("slot", { key: '8a01602089364eeeb8dfb4b8c1f9d6b48bc3f4a5' })))));
209
+ return (h(Host, { key: 'bf6b14acf276e7e327dad4e2adb0759c5371caa0' }, h("dialog", { key: 'fa8836858cd2ac18fe270c860671e77f5f9f6b93', part: "dialog", class: "dialog", "aria-label": this.accessibleName(), onCancel: this.onCancel, onFocusout: this.onFocusOut, onClose: this.onClose, onClick: this.onDialogClick }, h("div", { key: '6bfce72c9c19619388b93e3385b2fa8fe8fecc8e', class: "panel", part: "panel" }, this.showCloseButton && (h("button", { key: 'f11faa39f8854d5dd6854bb3c6e8e8e2f1abc6e3', class: "close", part: "close", type: "button", "aria-label": "Close", onClick: () => this.hide() }, h("svg", { key: '7530bfc0821a2d09e6045589cbbf2d390e8c6897', viewBox: "0 0 16 16", width: "16", height: "16", "aria-hidden": "true", focusable: "false" }, h("path", { key: '74c4d8385baa9776cfdf23570f46fd1621bd3fa2', d: "M4 4l8 8M12 4l-8 8", stroke: "currentColor", "stroke-width": "1.6", "stroke-linecap": "round", fill: "none" })))), h("slot", { key: 'd11d9ae0716dc7f846ea05dc24689f0c6465057d' })))));
139
210
  }
140
211
  static get is() { return "pf-modal"; }
141
212
  static get encapsulation() { return "shadow"; }
@@ -180,7 +251,7 @@ export class PfModal {
180
251
  "references": {
181
252
  "PfModalSize": {
182
253
  "location": "local",
183
- "path": "/Users/lelandrangel/Development/lelandrangel.com/pitchfork-ui/packages/elements/src/components/pf-modal/pf-modal.tsx",
254
+ "path": "/home/runner/work/pitchfork-ui/pitchfork-ui/packages/elements/src/components/pf-modal/pf-modal.tsx",
184
255
  "id": "src/components/pf-modal/pf-modal.tsx::PfModalSize"
185
256
  }
186
257
  }