@pine-ds/core 4.2.0 → 4.4.0

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 (545) hide show
  1. package/components/closest.js +1 -1
  2. package/components/floating-ui.dom.js +1 -1
  3. package/components/i18n-format.js +1 -1
  4. package/components/index.d.ts +2 -0
  5. package/components/index.js +1 -1
  6. package/components/index2.js +1 -1
  7. package/components/mock-pds-modal.js +1 -1
  8. package/components/pds-button2.js +1 -1
  9. package/components/pds-checkbox2.js +1 -1
  10. package/components/pds-chip2.js +1 -1
  11. package/components/pds-combobox.js +2 -2
  12. package/components/pds-container.js +1 -1
  13. package/components/pds-copytext.js +1 -1
  14. package/components/pds-datepicker.d.ts +11 -0
  15. package/components/pds-datepicker.js +1 -0
  16. package/components/pds-divider.js +1 -1
  17. package/components/pds-drawer-content.js +1 -1
  18. package/components/pds-drawer-footer.js +1 -1
  19. package/components/pds-drawer-header.js +1 -1
  20. package/components/pds-drawer.js +1 -1
  21. package/components/pds-dropdown-menu-item.js +1 -1
  22. package/components/pds-dropdown-menu-separator.js +1 -1
  23. package/components/pds-dropdown-menu.js +1 -1
  24. package/components/pds-filter.js +1 -1
  25. package/components/pds-filters.js +1 -1
  26. package/components/pds-icon2.js +1 -1
  27. package/components/pds-image.js +1 -1
  28. package/components/pds-input.js +1 -1
  29. package/components/pds-input2.js +1 -0
  30. package/components/pds-link2.js +1 -1
  31. package/components/pds-loader2.js +1 -1
  32. package/components/pds-modal-content.js +1 -1
  33. package/components/pds-modal-footer.js +1 -1
  34. package/components/pds-modal-header.js +1 -1
  35. package/components/pds-modal2.js +1 -1
  36. package/components/pds-multiselect.js +1 -1
  37. package/components/pds-popover.js +1 -1
  38. package/components/pds-progress.js +1 -1
  39. package/components/pds-property.js +1 -1
  40. package/components/pds-radio-group.js +1 -1
  41. package/components/pds-radio.js +1 -1
  42. package/components/pds-row.js +1 -1
  43. package/components/pds-select.js +1 -1
  44. package/components/pds-sortable-item.js +1 -1
  45. package/components/pds-sortable.js +2 -2
  46. package/components/pds-switch.js +1 -1
  47. package/components/pds-table-body.js +1 -1
  48. package/components/pds-table-cell2.js +1 -1
  49. package/components/pds-table-head-cell2.js +1 -1
  50. package/components/pds-table-head.js +1 -1
  51. package/components/pds-table-row.js +1 -1
  52. package/components/pds-tabpanel.js +1 -1
  53. package/components/pds-tabs.js +1 -1
  54. package/components/pds-text2.js +1 -1
  55. package/components/pds-textarea.js +1 -1
  56. package/components/pds-toast.js +1 -1
  57. package/components/pds-tooltip.js +1 -1
  58. package/components/utils.js +1 -1
  59. package/dist/cjs/closest-D0qyYtJ3.js +20 -0
  60. package/dist/cjs/{floating-ui.dom-BZk7Blsu.js → floating-ui.dom-Dc8Anyel.js} +79 -0
  61. package/dist/cjs/{i18n-format-CrpIhahc.js → i18n-format-BD0PmYzT.js} +1 -0
  62. package/dist/cjs/{index-CuQil7H0.js → index-Bl5KnQay.js} +4 -1
  63. package/dist/cjs/{index-Bu3NXpbK.js → index-D-QQKB0y.js} +9 -1
  64. package/dist/cjs/loader.cjs.js +2 -2
  65. package/dist/cjs/mock-pds-modal.cjs.entry.js +3 -3
  66. package/dist/cjs/pds-accordion.cjs.entry.js +2 -2
  67. package/dist/cjs/pds-alert.cjs.entry.js +1 -1
  68. package/dist/cjs/pds-avatar.cjs.entry.js +2 -2
  69. package/dist/cjs/pds-box.cjs.entry.js +2 -2
  70. package/dist/cjs/pds-button.cjs.entry.js +54 -5
  71. package/dist/cjs/pds-checkbox.cjs.entry.js +14 -6
  72. package/dist/cjs/pds-chip.cjs.entry.js +34 -9
  73. package/dist/cjs/pds-combobox.cjs.entry.js +1225 -117
  74. package/dist/cjs/pds-container.cjs.entry.js +2 -2
  75. package/dist/cjs/pds-copytext.cjs.entry.js +5 -5
  76. package/dist/cjs/pds-datepicker.cjs.entry.js +1962 -0
  77. package/dist/cjs/pds-divider.cjs.entry.js +2 -2
  78. package/dist/cjs/pds-drawer-content.cjs.entry.js +2 -2
  79. package/dist/cjs/pds-drawer-footer.cjs.entry.js +2 -2
  80. package/dist/cjs/pds-drawer-header.cjs.entry.js +2 -2
  81. package/dist/cjs/pds-drawer.cjs.entry.js +11 -4
  82. package/dist/cjs/pds-dropdown-menu-item.cjs.entry.js +2 -2
  83. package/dist/cjs/pds-dropdown-menu-separator.cjs.entry.js +2 -2
  84. package/dist/cjs/pds-dropdown-menu.cjs.entry.js +11 -4
  85. package/dist/cjs/pds-filter.cjs.entry.js +3 -3
  86. package/dist/cjs/pds-filters.cjs.entry.js +2 -2
  87. package/dist/cjs/pds-icon.cjs.entry.js +2 -2
  88. package/dist/cjs/pds-image.cjs.entry.js +3 -3
  89. package/dist/cjs/pds-input.cjs.entry.js +8 -5
  90. package/dist/cjs/pds-link.cjs.entry.js +5 -5
  91. package/dist/cjs/pds-loader.cjs.entry.js +2 -2
  92. package/dist/cjs/pds-modal-content.cjs.entry.js +3 -3
  93. package/dist/cjs/pds-modal-footer.cjs.entry.js +2 -2
  94. package/dist/cjs/pds-modal-header.cjs.entry.js +2 -2
  95. package/dist/cjs/pds-modal.cjs.entry.js +42 -8
  96. package/dist/cjs/pds-multiselect.cjs.entry.js +264 -51
  97. package/dist/cjs/pds-popover.cjs.entry.js +30 -12
  98. package/dist/cjs/pds-progress.cjs.entry.js +4 -2
  99. package/dist/cjs/pds-property.cjs.entry.js +2 -2
  100. package/dist/cjs/pds-radio-group.cjs.entry.js +5 -5
  101. package/dist/cjs/pds-radio.cjs.entry.js +6 -6
  102. package/dist/cjs/pds-row.cjs.entry.js +2 -2
  103. package/dist/cjs/pds-select.cjs.entry.js +3 -3
  104. package/dist/cjs/pds-sortable-item.cjs.entry.js +3 -3
  105. package/dist/cjs/pds-sortable.cjs.entry.js +2 -2
  106. package/dist/cjs/pds-switch.cjs.entry.js +14 -6
  107. package/dist/cjs/pds-tab.cjs.entry.js +1 -1
  108. package/dist/cjs/pds-table-body.cjs.entry.js +2 -2
  109. package/dist/cjs/pds-table-cell.cjs.entry.js +5 -5
  110. package/dist/cjs/pds-table-head-cell.cjs.entry.js +4 -4
  111. package/dist/cjs/pds-table-head.cjs.entry.js +3 -3
  112. package/dist/cjs/pds-table-row.cjs.entry.js +3 -3
  113. package/dist/cjs/pds-table.cjs.entry.js +1 -1
  114. package/dist/cjs/pds-tabpanel.cjs.entry.js +2 -2
  115. package/dist/cjs/pds-tabs.cjs.entry.js +2 -2
  116. package/dist/cjs/pds-text.cjs.entry.js +5 -5
  117. package/dist/cjs/pds-textarea.cjs.entry.js +14 -9
  118. package/dist/cjs/pds-toast.cjs.entry.js +4 -4
  119. package/dist/cjs/pds-tooltip.cjs.entry.js +4 -4
  120. package/dist/cjs/pine-core.cjs.js +2 -2
  121. package/dist/cjs/{truncation-tooltip-Bps7_rUy.js → truncation-tooltip-CYgQfBLt.js} +1 -1
  122. package/dist/cjs/{utils-7jx8T2mW.js → utils-BhRmyxT8.js} +51 -6
  123. package/dist/collection/collection-manifest.json +1 -0
  124. package/dist/collection/components/pds-button/pds-button.css +1 -2
  125. package/dist/collection/components/pds-button/pds-button.js +53 -2
  126. package/dist/collection/components/pds-checkbox/pds-checkbox.css +13 -4
  127. package/dist/collection/components/pds-checkbox/pds-checkbox.js +19 -3
  128. package/dist/collection/components/pds-chip/pds-chip.css +60 -6
  129. package/dist/collection/components/pds-chip/pds-chip.js +69 -4
  130. package/dist/collection/components/pds-chip/pds-chip.tokens.css +16 -0
  131. package/dist/collection/components/pds-chip/stories/pds-chip.stories.js +39 -1
  132. package/dist/collection/components/pds-combobox/grouped-options-panel.js +262 -0
  133. package/dist/collection/components/pds-combobox/pds-combobox.css +243 -15
  134. package/dist/collection/components/pds-combobox/pds-combobox.js +1129 -115
  135. package/dist/collection/components/pds-combobox/stories/pds-combobox.stories.js +240 -0
  136. package/dist/collection/components/pds-container/pds-container.js +1 -1
  137. package/dist/collection/components/pds-copytext/pds-copytext.js +1 -1
  138. package/dist/collection/components/pds-datepicker/calendar-portal.js +136 -0
  139. package/dist/collection/components/pds-datepicker/date-utils.js +132 -0
  140. package/dist/collection/components/pds-datepicker/datepicker-interface.js +1 -0
  141. package/dist/collection/components/pds-datepicker/pds-datepicker.css +545 -0
  142. package/dist/collection/components/pds-datepicker/pds-datepicker.js +2406 -0
  143. package/dist/collection/components/pds-datepicker/presets.js +96 -0
  144. package/dist/collection/components/pds-datepicker/stories/pds-datepicker.stories.js +195 -0
  145. package/dist/collection/components/pds-datepicker/value.js +238 -0
  146. package/dist/collection/components/pds-divider/pds-divider.js +1 -1
  147. package/dist/collection/components/pds-drawer/pds-drawer-content/pds-drawer-content.js +1 -1
  148. package/dist/collection/components/pds-drawer/pds-drawer-footer/pds-drawer-footer.js +1 -1
  149. package/dist/collection/components/pds-drawer/pds-drawer-header/pds-drawer-header.js +1 -1
  150. package/dist/collection/components/pds-drawer/pds-drawer.css +4 -0
  151. package/dist/collection/components/pds-drawer/pds-drawer.js +9 -2
  152. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-item/pds-dropdown-menu-item.js +1 -1
  153. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu-separator/pds-dropdown-menu-separator.js +1 -1
  154. package/dist/collection/components/pds-dropdown-menu/pds-dropdown-menu.js +9 -2
  155. package/dist/collection/components/pds-filters/pds-filter/pds-filter.js +1 -1
  156. package/dist/collection/components/pds-filters/pds-filters.js +1 -1
  157. package/dist/collection/components/pds-image/pds-image.js +2 -2
  158. package/dist/collection/components/pds-input/pds-input.js +6 -3
  159. package/dist/collection/components/pds-link/pds-link.js +2 -2
  160. package/dist/collection/components/pds-loader/pds-loader.js +1 -1
  161. package/dist/collection/components/pds-modal/pds-modal-content/pds-modal-content.js +2 -2
  162. package/dist/collection/components/pds-modal/pds-modal-footer/pds-modal-footer.js +1 -1
  163. package/dist/collection/components/pds-modal/pds-modal-header/pds-modal-header.js +1 -1
  164. package/dist/collection/components/pds-modal/pds-modal.css +20 -0
  165. package/dist/collection/components/pds-modal/pds-modal.js +55 -10
  166. package/dist/collection/components/pds-modal/stories/pds-modal.stories.js +14 -0
  167. package/dist/collection/components/pds-modal/test/mock-pds-modal.js +1 -1
  168. package/dist/collection/components/pds-multiselect/pds-multiselect.css +19 -1
  169. package/dist/collection/components/pds-multiselect/pds-multiselect.js +390 -47
  170. package/dist/collection/components/pds-multiselect/stories/pds-multiselect.stories.js +136 -1
  171. package/dist/collection/components/pds-popover/pds-popover.js +29 -11
  172. package/dist/collection/components/pds-progress/pds-progress.js +3 -1
  173. package/dist/collection/components/pds-property/pds-property.js +1 -1
  174. package/dist/collection/components/pds-radio/pds-radio.css +1 -2
  175. package/dist/collection/components/pds-radio/pds-radio.js +3 -3
  176. package/dist/collection/components/pds-radio-group/pds-radio-group.js +3 -3
  177. package/dist/collection/components/pds-row/pds-row.js +1 -1
  178. package/dist/collection/components/pds-select/pds-select.js +1 -1
  179. package/dist/collection/components/pds-sortable/pds-sortable-item/pds-sortable-item.js +1 -1
  180. package/dist/collection/components/pds-sortable/pds-sortable.js +1 -1
  181. package/dist/collection/components/pds-switch/pds-switch.css +3 -0
  182. package/dist/collection/components/pds-switch/pds-switch.js +20 -4
  183. package/dist/collection/components/pds-table/pds-table-body/pds-table-body.js +1 -1
  184. package/dist/collection/components/pds-table/pds-table-cell/pds-table-cell.js +2 -2
  185. package/dist/collection/components/pds-table/pds-table-head/pds-table-head.js +1 -1
  186. package/dist/collection/components/pds-table/pds-table-head-cell/pds-table-head-cell.js +2 -2
  187. package/dist/collection/components/pds-table/pds-table-row/pds-table-row.js +1 -1
  188. package/dist/collection/components/pds-tabs/pds-tabpanel/pds-tabpanel.js +1 -1
  189. package/dist/collection/components/pds-tabs/pds-tabs.js +1 -1
  190. package/dist/collection/components/pds-text/pds-text.js +1 -1
  191. package/dist/collection/components/pds-textarea/pds-textarea.js +11 -6
  192. package/dist/collection/components/pds-toast/pds-toast.js +3 -3
  193. package/dist/collection/components/pds-tooltip/pds-tooltip.js +2 -2
  194. package/dist/collection/utils/closest.js +8 -0
  195. package/dist/collection/utils/utils.js +49 -6
  196. package/dist/docs.json +2055 -84
  197. package/dist/esm/closest-DHPzKMVS.js +17 -0
  198. package/dist/esm/{floating-ui.dom-DDtwbwIl.js → floating-ui.dom-BPqJgIq6.js} +79 -1
  199. package/dist/esm/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
  200. package/dist/esm/{index-CTLu1TM4.js → index-CB8Yh0Nt.js} +4 -1
  201. package/dist/esm/{index-DdPaBxPo.js → index-DxI-61GK.js} +6 -2
  202. package/dist/esm/loader.js +3 -3
  203. package/dist/esm/mock-pds-modal.entry.js +3 -3
  204. package/dist/esm/pds-accordion.entry.js +2 -2
  205. package/dist/esm/pds-alert.entry.js +1 -1
  206. package/dist/esm/pds-avatar.entry.js +2 -2
  207. package/dist/esm/pds-box.entry.js +2 -2
  208. package/dist/esm/pds-button.entry.js +54 -5
  209. package/dist/esm/pds-checkbox.entry.js +14 -6
  210. package/dist/esm/pds-chip.entry.js +34 -9
  211. package/dist/esm/pds-combobox.entry.js +1225 -117
  212. package/dist/esm/pds-container.entry.js +2 -2
  213. package/dist/esm/pds-copytext.entry.js +5 -5
  214. package/dist/esm/pds-datepicker.entry.js +1960 -0
  215. package/dist/esm/pds-divider.entry.js +2 -2
  216. package/dist/esm/pds-drawer-content.entry.js +2 -2
  217. package/dist/esm/pds-drawer-footer.entry.js +2 -2
  218. package/dist/esm/pds-drawer-header.entry.js +2 -2
  219. package/dist/esm/pds-drawer.entry.js +11 -4
  220. package/dist/esm/pds-dropdown-menu-item.entry.js +2 -2
  221. package/dist/esm/pds-dropdown-menu-separator.entry.js +2 -2
  222. package/dist/esm/pds-dropdown-menu.entry.js +11 -4
  223. package/dist/esm/pds-filter.entry.js +3 -3
  224. package/dist/esm/pds-filters.entry.js +2 -2
  225. package/dist/esm/pds-icon.entry.js +2 -2
  226. package/dist/esm/pds-image.entry.js +3 -3
  227. package/dist/esm/pds-input.entry.js +8 -5
  228. package/dist/esm/pds-link.entry.js +5 -5
  229. package/dist/esm/pds-loader.entry.js +2 -2
  230. package/dist/esm/pds-modal-content.entry.js +3 -3
  231. package/dist/esm/pds-modal-footer.entry.js +2 -2
  232. package/dist/esm/pds-modal-header.entry.js +2 -2
  233. package/dist/esm/pds-modal.entry.js +42 -8
  234. package/dist/esm/pds-multiselect.entry.js +264 -51
  235. package/dist/esm/pds-popover.entry.js +30 -12
  236. package/dist/esm/pds-progress.entry.js +4 -2
  237. package/dist/esm/pds-property.entry.js +2 -2
  238. package/dist/esm/pds-radio-group.entry.js +5 -5
  239. package/dist/esm/pds-radio.entry.js +6 -6
  240. package/dist/esm/pds-row.entry.js +2 -2
  241. package/dist/esm/pds-select.entry.js +3 -3
  242. package/dist/esm/pds-sortable-item.entry.js +3 -3
  243. package/dist/esm/pds-sortable.entry.js +2 -2
  244. package/dist/esm/pds-switch.entry.js +14 -6
  245. package/dist/esm/pds-tab.entry.js +1 -1
  246. package/dist/esm/pds-table-body.entry.js +2 -2
  247. package/dist/esm/pds-table-cell.entry.js +5 -5
  248. package/dist/esm/pds-table-head-cell.entry.js +4 -4
  249. package/dist/esm/pds-table-head.entry.js +3 -3
  250. package/dist/esm/pds-table-row.entry.js +3 -3
  251. package/dist/esm/pds-table.entry.js +1 -1
  252. package/dist/esm/pds-tabpanel.entry.js +2 -2
  253. package/dist/esm/pds-tabs.entry.js +2 -2
  254. package/dist/esm/pds-text.entry.js +5 -5
  255. package/dist/esm/pds-textarea.entry.js +14 -9
  256. package/dist/esm/pds-toast.entry.js +4 -4
  257. package/dist/esm/pds-tooltip.entry.js +4 -4
  258. package/dist/esm/pine-core.js +3 -3
  259. package/dist/esm/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
  260. package/dist/esm/{utils-tJa4KYNO.js → utils-OYK5-nwe.js} +50 -7
  261. package/dist/esm-es5/closest-DHPzKMVS.js +1 -0
  262. package/dist/esm-es5/floating-ui.dom-BPqJgIq6.js +1 -0
  263. package/dist/esm-es5/{i18n-format-BKsJZTyn.js → i18n-format-BJgZHCWe.js} +1 -1
  264. package/dist/esm-es5/index-CB8Yh0Nt.js +2 -0
  265. package/dist/esm-es5/index-DxI-61GK.js +1 -0
  266. package/dist/esm-es5/loader.js +1 -1
  267. package/dist/esm-es5/mock-pds-modal.entry.js +1 -1
  268. package/dist/esm-es5/pds-accordion.entry.js +1 -1
  269. package/dist/esm-es5/pds-alert.entry.js +1 -1
  270. package/dist/esm-es5/pds-avatar.entry.js +1 -1
  271. package/dist/esm-es5/pds-box.entry.js +1 -1
  272. package/dist/esm-es5/pds-button.entry.js +1 -1
  273. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  274. package/dist/esm-es5/pds-chip.entry.js +1 -1
  275. package/dist/esm-es5/pds-combobox.entry.js +2 -2
  276. package/dist/esm-es5/pds-container.entry.js +1 -1
  277. package/dist/esm-es5/pds-copytext.entry.js +1 -1
  278. package/dist/esm-es5/pds-datepicker.entry.js +1 -0
  279. package/dist/esm-es5/pds-divider.entry.js +1 -1
  280. package/dist/esm-es5/pds-drawer-content.entry.js +1 -1
  281. package/dist/esm-es5/pds-drawer-footer.entry.js +1 -1
  282. package/dist/esm-es5/pds-drawer-header.entry.js +1 -1
  283. package/dist/esm-es5/pds-drawer.entry.js +1 -1
  284. package/dist/esm-es5/pds-dropdown-menu-item.entry.js +1 -1
  285. package/dist/esm-es5/pds-dropdown-menu-separator.entry.js +1 -1
  286. package/dist/esm-es5/pds-dropdown-menu.entry.js +1 -1
  287. package/dist/esm-es5/pds-filter.entry.js +1 -1
  288. package/dist/esm-es5/pds-filters.entry.js +1 -1
  289. package/dist/esm-es5/pds-icon.entry.js +1 -1
  290. package/dist/esm-es5/pds-image.entry.js +1 -1
  291. package/dist/esm-es5/pds-input.entry.js +1 -1
  292. package/dist/esm-es5/pds-link.entry.js +1 -1
  293. package/dist/esm-es5/pds-loader.entry.js +1 -1
  294. package/dist/esm-es5/pds-modal-content.entry.js +1 -1
  295. package/dist/esm-es5/pds-modal-footer.entry.js +1 -1
  296. package/dist/esm-es5/pds-modal-header.entry.js +1 -1
  297. package/dist/esm-es5/pds-modal.entry.js +1 -1
  298. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  299. package/dist/esm-es5/pds-popover.entry.js +1 -1
  300. package/dist/esm-es5/pds-progress.entry.js +1 -1
  301. package/dist/esm-es5/pds-property.entry.js +1 -1
  302. package/dist/esm-es5/pds-radio-group.entry.js +1 -1
  303. package/dist/esm-es5/pds-radio.entry.js +1 -1
  304. package/dist/esm-es5/pds-row.entry.js +1 -1
  305. package/dist/esm-es5/pds-select.entry.js +1 -1
  306. package/dist/esm-es5/pds-sortable-item.entry.js +1 -1
  307. package/dist/esm-es5/pds-sortable.entry.js +2 -2
  308. package/dist/esm-es5/pds-switch.entry.js +1 -1
  309. package/dist/esm-es5/pds-tab.entry.js +1 -1
  310. package/dist/esm-es5/pds-table-body.entry.js +1 -1
  311. package/dist/esm-es5/pds-table-cell.entry.js +1 -1
  312. package/dist/esm-es5/pds-table-head-cell.entry.js +1 -1
  313. package/dist/esm-es5/pds-table-head.entry.js +1 -1
  314. package/dist/esm-es5/pds-table-row.entry.js +1 -1
  315. package/dist/esm-es5/pds-table.entry.js +1 -1
  316. package/dist/esm-es5/pds-tabpanel.entry.js +1 -1
  317. package/dist/esm-es5/pds-tabs.entry.js +1 -1
  318. package/dist/esm-es5/pds-text.entry.js +1 -1
  319. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  320. package/dist/esm-es5/pds-toast.entry.js +1 -1
  321. package/dist/esm-es5/pds-tooltip.entry.js +1 -1
  322. package/dist/esm-es5/pine-core.js +1 -1
  323. package/dist/esm-es5/{truncation-tooltip-CdtEBn_5.js → truncation-tooltip-_902ENWC.js} +1 -1
  324. package/dist/esm-es5/utils-OYK5-nwe.js +1 -0
  325. package/dist/pine-core/p-0414092a.system.entry.js +1 -0
  326. package/dist/pine-core/p-04807201.entry.js +1 -0
  327. package/dist/pine-core/{p-56b34569.system.entry.js → p-07f0d168.system.entry.js} +1 -1
  328. package/dist/pine-core/p-08f5d19c.entry.js +1 -0
  329. package/dist/pine-core/{p-15d3a4bc.system.entry.js → p-0aaf8faa.system.entry.js} +1 -1
  330. package/dist/pine-core/p-0bad5955.entry.js +1 -0
  331. package/dist/pine-core/{p-4d388957.system.entry.js → p-0c3bf377.system.entry.js} +1 -1
  332. package/dist/pine-core/p-0ce79cd0.entry.js +1 -0
  333. package/dist/pine-core/{p-3464b456.system.entry.js → p-1057b8c3.system.entry.js} +1 -1
  334. package/dist/pine-core/{p-bf3afa16.system.entry.js → p-108c910a.system.entry.js} +1 -1
  335. package/dist/pine-core/{p-53a4852e.system.entry.js → p-166f61a6.system.entry.js} +1 -1
  336. package/dist/pine-core/{p-31e1722e.entry.js → p-16c8f5e3.entry.js} +1 -1
  337. package/dist/pine-core/p-16e258d1.entry.js +1 -0
  338. package/dist/pine-core/{p-591fbff5.entry.js → p-1be33c95.entry.js} +1 -1
  339. package/dist/pine-core/p-1e3a31da.entry.js +1 -0
  340. package/dist/pine-core/p-1f228db9.entry.js +1 -0
  341. package/dist/pine-core/p-257c6ef9.entry.js +1 -0
  342. package/dist/pine-core/p-26415245.system.entry.js +1 -0
  343. package/dist/pine-core/p-26e1e5bb.entry.js +1 -0
  344. package/dist/pine-core/p-27c06bf8.entry.js +2 -0
  345. package/dist/pine-core/p-31aee437.entry.js +1 -0
  346. package/dist/pine-core/p-330a76f6.system.entry.js +1 -0
  347. package/dist/pine-core/{p-3c4236a8.system.entry.js → p-33c63be6.system.entry.js} +1 -1
  348. package/dist/pine-core/{p-d46adf7d.entry.js → p-344609f9.entry.js} +2 -2
  349. package/dist/pine-core/{p-049681fc.entry.js → p-3a1711c1.entry.js} +1 -1
  350. package/dist/pine-core/p-3a9c58bd.system.entry.js +1 -0
  351. package/dist/pine-core/{p-e3a7d2db.entry.js → p-3ebd543f.entry.js} +1 -1
  352. package/dist/pine-core/p-3fbcb0c8.system.entry.js +1 -0
  353. package/dist/pine-core/{p-b923a70b.entry.js → p-427b4aeb.entry.js} +1 -1
  354. package/dist/pine-core/{p-5772f260.system.entry.js → p-42bd87ea.system.entry.js} +1 -1
  355. package/dist/pine-core/{p-1e2a9b5d.system.entry.js → p-43c691bf.system.entry.js} +1 -1
  356. package/dist/pine-core/p-4566d659.system.entry.js +1 -0
  357. package/dist/pine-core/p-4b8cf04a.system.entry.js +1 -0
  358. package/dist/pine-core/p-4d6f471c.entry.js +1 -0
  359. package/dist/pine-core/{p-3e0c6384.entry.js → p-4e7580c4.entry.js} +1 -1
  360. package/dist/pine-core/{p-0ab735aa.system.entry.js → p-4f4a2d2a.system.entry.js} +1 -1
  361. package/dist/pine-core/{p-7e2b934d.entry.js → p-5211aba7.entry.js} +1 -1
  362. package/dist/pine-core/{p-376f8286.entry.js → p-524b7d3f.entry.js} +1 -1
  363. package/dist/pine-core/{p-3f12afb1.entry.js → p-5613c64c.entry.js} +1 -1
  364. package/dist/pine-core/p-5bb24cb4.entry.js +1 -0
  365. package/dist/pine-core/{p-d7865297.entry.js → p-5bb80b3c.entry.js} +1 -1
  366. package/dist/pine-core/{p-e3cd4627.system.entry.js → p-5c6e0a26.system.entry.js} +1 -1
  367. package/dist/pine-core/{p-51dff5af.system.entry.js → p-5db57551.system.entry.js} +1 -1
  368. package/dist/pine-core/{p-f94667b5.entry.js → p-5eb00ba5.entry.js} +1 -1
  369. package/dist/pine-core/p-61756414.system.entry.js +1 -0
  370. package/dist/pine-core/{p-e5bbe8cc.entry.js → p-682e9e8f.entry.js} +1 -1
  371. package/dist/pine-core/p-6965db1d.entry.js +1 -0
  372. package/dist/pine-core/{p-5aea1082.entry.js → p-6b180ee2.entry.js} +1 -1
  373. package/dist/pine-core/{p-d21739eb.entry.js → p-6c53962f.entry.js} +1 -1
  374. package/dist/pine-core/p-6da6520b.system.entry.js +3 -0
  375. package/dist/pine-core/p-6e3bf862.system.entry.js +1 -0
  376. package/dist/pine-core/{p-053b0898.system.entry.js → p-71c9f866.system.entry.js} +1 -1
  377. package/dist/pine-core/{p-78fd593d.system.entry.js → p-7265b94c.system.entry.js} +1 -1
  378. package/dist/pine-core/{p-9187c26c.system.entry.js → p-74229b5e.system.entry.js} +1 -1
  379. package/dist/pine-core/p-7512c2d4.system.entry.js +1 -0
  380. package/dist/pine-core/p-76db406d.system.entry.js +1 -0
  381. package/dist/pine-core/{p-e1653d75.system.entry.js → p-79aa5f43.system.entry.js} +1 -1
  382. package/dist/pine-core/p-7bbcda0f.system.entry.js +1 -0
  383. package/dist/pine-core/p-7c8946e6.entry.js +1 -0
  384. package/dist/pine-core/p-7c98c90a.system.entry.js +1 -0
  385. package/dist/pine-core/p-81292c03.system.entry.js +1 -0
  386. package/dist/pine-core/p-81300046.system.entry.js +1 -0
  387. package/dist/pine-core/{p-a11a9c40.system.entry.js → p-8252cd84.system.entry.js} +1 -1
  388. package/dist/pine-core/{p-d0d2a886.system.entry.js → p-84ba0e6a.system.entry.js} +1 -1
  389. package/dist/pine-core/{p-c1f8a187.entry.js → p-86fc0bfa.entry.js} +1 -1
  390. package/dist/pine-core/p-90692bb6.entry.js +1 -0
  391. package/dist/pine-core/{p-2eb8d697.system.entry.js → p-90ea812c.system.entry.js} +1 -1
  392. package/dist/pine-core/p-948826db.entry.js +1 -0
  393. package/dist/pine-core/{p-714bfdbd.entry.js → p-9b66642d.entry.js} +1 -1
  394. package/dist/pine-core/p-BJgZHCWe.js +1 -0
  395. package/dist/pine-core/p-BPqJgIq6.js +1 -0
  396. package/dist/pine-core/p-BSRFZB4I.system.js +1 -0
  397. package/dist/pine-core/p-BZsj6eAn.system.js +1 -0
  398. package/dist/pine-core/p-CB8Yh0Nt.js +2 -0
  399. package/dist/pine-core/{p-B2qvvB3q.system.js → p-CBu9UrXr.system.js} +1 -1
  400. package/dist/pine-core/p-COtCa1Md.system.js +1 -0
  401. package/dist/pine-core/p-CTQZ2fkv.system.js +1 -0
  402. package/dist/pine-core/{p-B2nn1gSd.js → p-CnM3cCof.js} +1 -1
  403. package/dist/pine-core/p-CnO10OxH.system.js +1 -0
  404. package/dist/pine-core/p-D-akEPIU.system.js +2 -0
  405. package/dist/pine-core/p-DHPzKMVS.js +1 -0
  406. package/dist/pine-core/p-Dx8tEj0U.system.js +1 -0
  407. package/dist/pine-core/p-DxI-61GK.js +1 -0
  408. package/dist/pine-core/p-OYK5-nwe.js +1 -0
  409. package/dist/pine-core/p-a10af84b.system.entry.js +1 -0
  410. package/dist/pine-core/p-a21b530a.system.entry.js +1 -0
  411. package/dist/pine-core/p-a85535a4.system.entry.js +1 -0
  412. package/dist/pine-core/p-abc0fe2f.system.entry.js +1 -0
  413. package/dist/pine-core/p-ac6a5bf0.entry.js +1 -0
  414. package/dist/pine-core/{p-f7a5062f.entry.js → p-b0526f98.entry.js} +1 -1
  415. package/dist/pine-core/p-b130b716.entry.js +1 -0
  416. package/dist/pine-core/{p-09413b07.entry.js → p-b195d345.entry.js} +1 -1
  417. package/dist/pine-core/{p-e3600c53.entry.js → p-b4923acf.entry.js} +1 -1
  418. package/dist/pine-core/{p-e410b0d8.system.entry.js → p-b4e440e3.system.entry.js} +1 -1
  419. package/dist/pine-core/p-b8693a87.entry.js +1 -0
  420. package/dist/pine-core/{p-e95225cf.entry.js → p-b8ada1eb.entry.js} +1 -1
  421. package/dist/pine-core/{p-1614c000.system.entry.js → p-bb85bbb5.system.entry.js} +1 -1
  422. package/dist/pine-core/{p-fec298bb.system.entry.js → p-bbc539bc.system.entry.js} +2 -2
  423. package/dist/pine-core/{p-f21aea90.system.entry.js → p-bf833976.system.entry.js} +1 -1
  424. package/dist/pine-core/{p-c5ce6dea.entry.js → p-c23097af.entry.js} +1 -1
  425. package/dist/pine-core/p-c2dd84bd.system.entry.js +1 -0
  426. package/dist/pine-core/{p-869ed1c0.system.entry.js → p-c4520b04.system.entry.js} +1 -1
  427. package/dist/pine-core/{p-3605a5f5.entry.js → p-c4f68dfc.entry.js} +1 -1
  428. package/dist/pine-core/{p-d9ffb2d9.system.entry.js → p-c6fa6744.system.entry.js} +1 -1
  429. package/dist/pine-core/p-c7dba815.entry.js +1 -0
  430. package/dist/pine-core/p-cb6f55ff.entry.js +1 -0
  431. package/dist/pine-core/p-cfb8fa7c.system.entry.js +1 -0
  432. package/dist/pine-core/{p-86bc2a0c.entry.js → p-d0d7d1d4.entry.js} +1 -1
  433. package/dist/pine-core/{p-b109de2e.entry.js → p-d1112c8a.entry.js} +1 -1
  434. package/dist/pine-core/p-d4e91ad9.system.entry.js +1 -0
  435. package/dist/pine-core/{p-7b1e3e91.entry.js → p-da018dcb.entry.js} +1 -1
  436. package/dist/pine-core/{p-c09dab1a.system.entry.js → p-dc27abe6.system.entry.js} +1 -1
  437. package/dist/pine-core/{p-3eca0b00.entry.js → p-dc343b6d.entry.js} +1 -1
  438. package/dist/pine-core/p-dde753e7.system.entry.js +1 -0
  439. package/dist/pine-core/{p-f35596cd.entry.js → p-dea3a582.entry.js} +1 -1
  440. package/dist/pine-core/p-df29fd41.entry.js +1 -0
  441. package/dist/pine-core/{p-1f307e59.system.entry.js → p-e4e2eae2.system.entry.js} +1 -1
  442. package/dist/pine-core/{p-51b8490d.entry.js → p-e8668178.entry.js} +1 -1
  443. package/dist/pine-core/{p-5dd393cd.system.entry.js → p-eb28d21d.system.entry.js} +1 -1
  444. package/dist/pine-core/p-eb71a82d.system.entry.js +1 -0
  445. package/dist/pine-core/{p-8eef80d5.entry.js → p-ed63873c.entry.js} +1 -1
  446. package/dist/pine-core/{p-12182cab.entry.js → p-f4f6dc36.entry.js} +1 -1
  447. package/dist/pine-core/{p-be819bff.system.entry.js → p-f67a0ca8.system.entry.js} +1 -1
  448. package/dist/pine-core/p-fc455968.entry.js +1 -0
  449. package/dist/pine-core/{p-92ef1608.system.entry.js → p-fe3e2ebd.system.entry.js} +1 -1
  450. package/dist/pine-core/pine-core.css +1 -1
  451. package/dist/pine-core/pine-core.esm.js +1 -1
  452. package/dist/pine-core/pine-core.js +1 -1
  453. package/dist/types/components/pds-button/pds-button.d.ts +10 -0
  454. package/dist/types/components/pds-checkbox/pds-checkbox.d.ts +5 -0
  455. package/dist/types/components/pds-chip/pds-chip.d.ts +12 -0
  456. package/dist/types/components/pds-combobox/combobox-interface.d.ts +17 -0
  457. package/dist/types/components/pds-combobox/grouped-options-panel.d.ts +105 -0
  458. package/dist/types/components/pds-combobox/pds-combobox.d.ts +235 -3
  459. package/dist/types/components/pds-datepicker/calendar-portal.d.ts +43 -0
  460. package/dist/types/components/pds-datepicker/date-utils.d.ts +48 -0
  461. package/dist/types/components/pds-datepicker/datepicker-interface.d.ts +30 -0
  462. package/dist/types/components/pds-datepicker/pds-datepicker.d.ts +489 -0
  463. package/dist/types/components/pds-datepicker/presets.d.ts +23 -0
  464. package/dist/types/components/pds-datepicker/value.d.ts +47 -0
  465. package/dist/types/components/pds-dropdown-menu/pds-dropdown-menu.d.ts +1 -0
  466. package/dist/types/components/pds-modal/pds-modal.d.ts +9 -2
  467. package/dist/types/components/pds-multiselect/multiselect-interface.d.ts +19 -0
  468. package/dist/types/components/pds-multiselect/pds-multiselect.d.ts +56 -1
  469. package/dist/types/components/pds-popover/pds-popover.d.ts +1 -0
  470. package/dist/types/components/pds-switch/pds-switch.d.ts +5 -0
  471. package/dist/types/components.d.ts +702 -11
  472. package/dist/types/utils/closest.d.ts +2 -0
  473. package/dist/types/utils/types.d.ts +2 -1
  474. package/dist/types/utils/utils.d.ts +25 -2
  475. package/dist/vscode.html-data.json +497 -7
  476. package/hydrate/index.js +4059 -377
  477. package/hydrate/index.mjs +4059 -377
  478. package/package.json +2 -2
  479. package/dist/cjs/closest-BZXvuB_Y.js +0 -11
  480. package/dist/esm/closest-DnUJodVd.js +0 -9
  481. package/dist/esm-es5/closest-DnUJodVd.js +0 -1
  482. package/dist/esm-es5/floating-ui.dom-DDtwbwIl.js +0 -1
  483. package/dist/esm-es5/index-CTLu1TM4.js +0 -2
  484. package/dist/esm-es5/index-DdPaBxPo.js +0 -1
  485. package/dist/esm-es5/utils-tJa4KYNO.js +0 -1
  486. package/dist/pine-core/p--Llh7wKm.system.js +0 -1
  487. package/dist/pine-core/p-02a47ebb.entry.js +0 -1
  488. package/dist/pine-core/p-12ec8186.system.entry.js +0 -1
  489. package/dist/pine-core/p-17dc3f87.entry.js +0 -1
  490. package/dist/pine-core/p-18a59cdd.system.entry.js +0 -1
  491. package/dist/pine-core/p-2016c878.entry.js +0 -1
  492. package/dist/pine-core/p-222ff58e.system.entry.js +0 -1
  493. package/dist/pine-core/p-324a7ae4.system.entry.js +0 -1
  494. package/dist/pine-core/p-32f10aa9.entry.js +0 -1
  495. package/dist/pine-core/p-33c0f3c9.system.entry.js +0 -1
  496. package/dist/pine-core/p-34e38037.system.entry.js +0 -1
  497. package/dist/pine-core/p-3873f55b.entry.js +0 -1
  498. package/dist/pine-core/p-3aec9079.entry.js +0 -1
  499. package/dist/pine-core/p-3c229a00.system.entry.js +0 -1
  500. package/dist/pine-core/p-43338f77.system.entry.js +0 -1
  501. package/dist/pine-core/p-4661259e.system.entry.js +0 -1
  502. package/dist/pine-core/p-585ad368.system.entry.js +0 -1
  503. package/dist/pine-core/p-5d585aa8.entry.js +0 -1
  504. package/dist/pine-core/p-613a64f1.entry.js +0 -1
  505. package/dist/pine-core/p-630f33d6.system.entry.js +0 -1
  506. package/dist/pine-core/p-63686e2a.system.entry.js +0 -1
  507. package/dist/pine-core/p-6f7a7d55.entry.js +0 -1
  508. package/dist/pine-core/p-6fd863e5.system.entry.js +0 -1
  509. package/dist/pine-core/p-76286a68.system.entry.js +0 -1
  510. package/dist/pine-core/p-7691a875.system.entry.js +0 -3
  511. package/dist/pine-core/p-7e44106e.entry.js +0 -1
  512. package/dist/pine-core/p-84ade640.entry.js +0 -1
  513. package/dist/pine-core/p-8be301b6.entry.js +0 -1
  514. package/dist/pine-core/p-8cc270f0.system.entry.js +0 -1
  515. package/dist/pine-core/p-8cea0d7a.system.entry.js +0 -1
  516. package/dist/pine-core/p-957dbb0c.entry.js +0 -1
  517. package/dist/pine-core/p-BG6uGRQj.system.js +0 -1
  518. package/dist/pine-core/p-BKsJZTyn.js +0 -1
  519. package/dist/pine-core/p-BrLs99ML.system.js +0 -1
  520. package/dist/pine-core/p-CTLu1TM4.js +0 -2
  521. package/dist/pine-core/p-Cr7-rJtJ.system.js +0 -1
  522. package/dist/pine-core/p-DAIsVNlL.system.js +0 -2
  523. package/dist/pine-core/p-DDtwbwIl.js +0 -1
  524. package/dist/pine-core/p-DdPaBxPo.js +0 -1
  525. package/dist/pine-core/p-DnUJodVd.js +0 -1
  526. package/dist/pine-core/p-Dr-FzkdE.system.js +0 -1
  527. package/dist/pine-core/p-a4a58477.entry.js +0 -1
  528. package/dist/pine-core/p-a98bf89f.system.entry.js +0 -1
  529. package/dist/pine-core/p-ac0098fd.entry.js +0 -1
  530. package/dist/pine-core/p-b32e3174.system.entry.js +0 -1
  531. package/dist/pine-core/p-be4a6cc2.entry.js +0 -1
  532. package/dist/pine-core/p-c0b3f2c1.system.entry.js +0 -1
  533. package/dist/pine-core/p-c8bffb08.system.entry.js +0 -1
  534. package/dist/pine-core/p-cf24ed1e.system.entry.js +0 -1
  535. package/dist/pine-core/p-d12ef40d.entry.js +0 -1
  536. package/dist/pine-core/p-d280741f.entry.js +0 -1
  537. package/dist/pine-core/p-d415bb01.entry.js +0 -2
  538. package/dist/pine-core/p-d43db3ba.entry.js +0 -1
  539. package/dist/pine-core/p-db5703f2.entry.js +0 -1
  540. package/dist/pine-core/p-dd6d9807.system.entry.js +0 -1
  541. package/dist/pine-core/p-e0da17aa.system.entry.js +0 -1
  542. package/dist/pine-core/p-ed297f3e.entry.js +0 -1
  543. package/dist/pine-core/p-fbf5f315.entry.js +0 -1
  544. package/dist/pine-core/p-kYMYDfJY.system.js +0 -1
  545. package/dist/pine-core/p-tJa4KYNO.js +0 -1
@@ -0,0 +1 @@
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,Host as r,transformTag as n}from"@stencil/core/internal/client";import{a,c as o,o as d,f as l,b as c,s as h,h as p}from"./floating-ui.dom.js";import{c as u,j as v,k as m,m as b,r as f,n as g}from"./index2.js";import{i as k}from"./form.js";import{r as _,f as y}from"./i18n-format.js";import{a as x}from"./closest.js";import{d as w}from"./pds-icon2.js";import{d as D}from"./pds-input2.js";const M=/^(\d{4})-(\d{2})-(\d{2})$/;function C(e){const t=M.exec((null!=e?e:"").trim());if(!t)return null;const[,i,s,r]=t.map(Number),n=new Date(Date.UTC(i,s-1,r));return n.getUTCFullYear()===i&&n.getUTCMonth()===s-1&&n.getUTCDate()===r?n:null}function $(e){return e.toISOString().slice(0,10)}function A(){const e=new Date;return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()))}function T(e,t){return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+t))}function L(e,t){const i=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),s=j(i.getUTCFullYear(),i.getUTCMonth());return new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),Math.min(e.getUTCDate(),s)))}function j(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}function P(e,t){return!!e&&!!t&&e.getTime()===t.getTime()}function H(e,t,i){return t&&e<t?t:i&&e>i?i:e}function Y(e,t,i){return!!t&&e<t||!!i&&e>i}function E(e,t){return(e.getUTCDay()-t+7)%7}function z(e,t){return new Intl.DateTimeFormat(e,Object.assign(Object.assign({},t),{timeZone:"UTC",calendar:"gregory"}))}function S(e,t,i){return z(t,i).format(e)}class N{constructor(e){this.datepicker=e,this.copiedProperties=[],this.host=document.createElement("div"),this.host.className=N.className,this.host.pdsDatepicker=e,this.host.style.display="contents",this.root=this.host.attachShadow({mode:"open"})}mount(e,t){this.host.isConnected?t!==this.locale&&this.copyContext(t):(function(e){const t=new Set;let i=e;for(;i&&!t.has(i);){if(t.add(i),i.nodeType===Node.ELEMENT_NODE&&F(i))return i;const e=i.nodeType===Node.ELEMENT_NODE?i.assignedSlot:null;if(e){i=e;continue}const s=i.parentNode;i=s instanceof ShadowRoot?s.host:s}return document.body}(this.datepicker).appendChild(this.host),this.copyContext(t)),e.parentNode!==this.root&&this.root.appendChild(e)}remove(){this.host.remove()}contains(e){return!!e&&(e===this.host||this.root.contains(e))}copyContext(e){var t,i;this.locale=e;const s=this.datepicker.shadowRoot;s&&((null===(t=s.adoptedStyleSheets)||void 0===t?void 0:t.length)?this.root.adoptedStyleSheets=s.adoptedStyleSheets:this.root.querySelector("style")||s.querySelectorAll("style").forEach((e=>this.root.appendChild(e.cloneNode(!0)))));const r=getComputedStyle(this.datepicker);this.host.dir=r.direction||"ltr",this.host.lang=e,this.copyCustomProperties(r);const n=null===(i=x("[data-theme]",this.datepicker)||null)||void 0===i?void 0:i.getAttribute("data-theme");n?this.host.setAttribute("data-theme",n):this.host.removeAttribute("data-theme")}copyCustomProperties(e){for(const e of this.copiedProperties)this.host.style.removeProperty(e);this.copiedProperties=[];const t=this.host.parentElement,i=t?getComputedStyle(t):null;for(let t=0;t<e.length;t++){const s=e[t];if(!s.startsWith("--"))continue;const r=e.getPropertyValue(s);i&&r===i.getPropertyValue(s)||(this.host.style.setProperty(s,r.trim()),this.copiedProperties.push(s))}}}function F(e){if("dialog"===e.localName)return e.open;if(!e.hasAttribute("popover"))return!1;try{return e.matches(":popover-open")}catch(e){return!1}}N.className="pds-datepicker-calendar-portal";const U={today:"Today",yesterday:"Yesterday","last-7-days":"Last 7 days","last-30-days":"Last 30 days","last-90-days":"Last 90 days","this-month":"This month","last-month":"Last month","this-quarter":"This quarter","last-quarter":"Last quarter","this-year":"This year","last-year":"Last year","year-to-date":"Year to date","last-12-months":"Last 12 months"},O=(e,t,i)=>new Date(Date.UTC(e,t,i));function q(e,t){const i=t.getUTCFullYear(),s=t.getUTCMonth(),r=s-s%3;switch(e){case"today":return[t,t];case"yesterday":return[T(t,-1),T(t,-1)];case"last-7-days":return[T(t,-6),t];case"last-30-days":return[T(t,-29),t];case"last-90-days":return[T(t,-89),t];case"this-month":return[O(i,s,1),O(i,s+1,0)];case"last-month":return[O(i,s-1,1),O(i,s,0)];case"this-quarter":return[O(i,r,1),O(i,r+3,0)];case"last-quarter":return[O(i,r-3,1),O(i,r,0)];case"this-year":return[O(i,0,1),O(i,11,31)];case"last-year":return[O(i-1,0,1),O(i-1,11,31)];case"year-to-date":return[O(i,0,1),t];case"last-12-months":return[L(t,-12),t];default:return null}}function I(e,t,i){if(t&&i)return e.find((e=>e.start.getTime()===t.getTime()&&e.end.getTime()===i.getTime()))}function R(e,t,i){return!Y(e.start,t,i)&&!Y(e.end,t,i)}const W=/^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}):(\d{2}))?$/;function K(e){const t=W.exec((null!=e?e:"").trim());if(!t)return null;const i=C(t[1]);return i?void 0===t[2]?{date:i,time:null}:Number(t[2])<24&&Number(t[3])<60?{date:i,time:`${t[2]}:${t[3]}`}:null:null}const V="YYYY-MM-DD",X=/\[([^\]]*)\]|YYYY|MMMM|MMM|MM|M|DD|D|HH|H|hh|h|mm|A|a/g,Z=/HH|H|hh|h/,B=/hh|h/,G=/A|a/;function J(e,t,i=!1){const s=(null==e?void 0:e.trim())||V,r=(e=>e.replace(/\[[^\]]*\]/g,""))(s);return B.test(r)&&!G.test(r)?s+" A":!t||Z.test(r)?s:`${s} ${i?"h:mm A":"HH:mm"}`}const Q=(e,t=2)=>(e+"").padStart(t,"0"),ee=new Map;function te(e){let t=ee.get(e);if(!t){const i=t=>{const i=new Intl.DateTimeFormat(e,{month:t,timeZone:"UTC",calendar:"gregory"});return Array.from({length:12},((e,t)=>i.format(new Date(Date.UTC(2023,t,1)))))},s=ue(e);t={months:i("long"),shortMonths:i("short"),am:s.am,pm:s.pm},ee.set(e,t)}return t}const ie=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),se=e=>ie(e).replace(/\s+/g,"\\s*"),re=e=>`(${e.map(ie).join("|")})`;function ne(e,t=V,i="en-US"){var s;return null!==(s=function(e,t,i="en-US"){var s,r,n,a,o,d,l,c,h,p;const u=te(i),v=te("en-US"),m=[u.am,u.pm,v.am,v.pm],b={YYYY:"(\\d{4})",MMMM:re([...u.months,...v.months]),MMM:re([...u.shortMonths,...v.shortMonths]),MM:"(\\d{1,2})",M:"(\\d{1,2})",DD:"(\\d{1,2})",D:"(\\d{1,2})",HH:"(\\d{1,2})",H:"(\\d{1,2})",hh:"(\\d{1,2})",h:"(\\d{1,2})",mm:"(\\d{2})",A:re(m),a:re(m)},f=[],g=()=>{f.length=0;let e="",i=0;return t.replace(X,((s,r,n)=>(e+=se(t.slice(i,n)),void 0!==r?e+=se(r):(e+=b[s],f.push(s)),i=n+s.length,s))),RegExp(`^\\s*${e}${se(t.slice(i))}\\s*$`,"i")};let k=g().exec(null!=e?e:"");if(k||(b.mm="(\\d{1,2})",k=g().exec(null!=e?e:"")),!k)return null;const _=k,y={};f.forEach(((e,t)=>y[e]=_[t+1]));const x=(e,t)=>{if(void 0===e)return;const i=t?[u.months,v.months]:[u.shortMonths,v.shortMonths];for(const t of i){const i=t.findIndex((t=>t.toLowerCase()===e.toLowerCase()));if(i>=0)return i+1}},w=Number(y.YYYY),D=null!==(r=null!==(s=x(y.MMMM,!0))&&void 0!==s?s:x(y.MMM,!1))&&void 0!==r?r:Number(null!==(n=y.MM)&&void 0!==n?n:y.M),M=Number(null!==(a=y.DD)&&void 0!==a?a:y.D);if(!y.YYYY||!D||!M)return null;const $=C(`${Q(w,4)}-${Q(D)}-${Q(M)}`);if(!$)return null;const A=null!==(l=null!==(d=null!==(o=y.HH)&&void 0!==o?o:y.H)&&void 0!==d?d:y.hh)&&void 0!==l?l:y.h;if(void 0===A)return{date:$,time:null};let T=Number(A);const L=Number(null!==(c=y.mm)&&void 0!==c?c:0),j=null===(p=null!==(h=y.A)&&void 0!==h?h:y.a)||void 0===p?void 0:p.toLowerCase();if(void 0!==y.hh||void 0!==y.h){if(T<1||T>12)return null;T=T%12+(j===u.pm.toLowerCase()||j===v.pm.toLowerCase()?12:0)}return T<24&&L<60?{date:$,time:pe(T,L)}:null}(e,t,i))&&void 0!==s?s:K(e)}function ae(e,t=V,i="en-US"){const s=(null!=e?e:"").trim(),r=RegExp(`${ie(ce)}|\\s+(?:–|—|-|to)\\s+${t.includes("/")?"":"|\\s*/\\s*"}`,"gi");let n;for(;null!==(n=r.exec(s));){const e=ne(s.slice(0,n.index),t,i),r=ne(s.slice(n.index+n[0].length),t,i);if(e&&r)return oe(e,r)<=0?[e,r]:null}return null}function oe(e,t){var i,s;const r=e.date.getTime()-t.date.getTime();return 0!==r?r:(null!==(i=e.time)&&void 0!==i?i:"00:00").localeCompare(null!==(s=t.time)&&void 0!==s?s:"00:00")}function de(e){return e.time?`${$(e.date)}T${e.time}`:$(e.date)}function le(e,t,i="en-US"){return function(e,t,i="en-US"){var s;const r=te(i),[n,a]=he(null!==(s=e.time)&&void 0!==s?s:"00:00"),o=n%12||12,d=e.date.getUTCMonth(),l=n<12?r.am:r.pm,c={YYYY:Q(e.date.getUTCFullYear(),4),MMMM:r.months[d],MMM:r.shortMonths[d],MM:Q(d+1),M:d+1+"",DD:Q(e.date.getUTCDate()),D:e.date.getUTCDate()+"",HH:Q(n),H:n+"",hh:Q(o),h:o+"",mm:Q(a),A:l,a:l.toLowerCase()};return t.replace(X,((e,t)=>null!=t?t:c[e]))}(e,null!=t?t:J(V,!!e.time),i)}const ce=" – ";function he(e){const[t,i]=e.split(":").map(Number);return[t||0,i||0]}function pe(e,t){return`${(e+"").padStart(2,"0")}:${(t+"").padStart(2,"0")}`}function ue(e){var t,i;const s=new Intl.DateTimeFormat(e,{hour:"numeric",timeZone:"UTC"}),r=e=>{var t;return null===(t=s.formatToParts(new Date(Date.UTC(2023,0,1,e))).find((e=>"dayPeriod"===e.type)))||void 0===t?void 0:t.value};return{hour12:!!s.resolvedOptions().hour12,am:null!==(t=r(1))&&void 0!==t?t:"AM",pm:null!==(i=r(13))&&void 0!==i?i:"PM"}}const ve={weekday:"long",year:"numeric",month:"long",day:"numeric"},me="00:00",be="23:59";let fe=0;const ge=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ke=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsDatepickerChange=i(this,"pdsDatepickerChange",7),this.pdsBlur=i(this,"pdsBlur",7),this.pdsFocus=i(this,"pdsFocus",7),this.focusActiveDay=!1,this.fallbackId="pds-datepicker-"+ ++fe,this.skipForwardedClick=!1,this.presetByArrow=!1,this.valueAtOpen="",this.committing=!1,this.hasFocus=!1,this.applyLabel="Apply",this.autoApply=!1,this.cancelLabel="Cancel",this.clearable=!1,this.clearLabel="Clear",this.customRangeLabel="Custom range",this.endTimeLabel="End time",this.format="YYYY-MM-DD",this.hourLabel="Hour",this.invalidDateMessage="Enter a date in the format shown.",this.maxDateMessage="Choose {date} or earlier.",this.minDateMessage="Choose {date} or later.",this.minuteIncrement=1,this.minuteLabel="Minute",this.monthLabel="Month",this.nextMonthLabel="Next month",this.periodLabel="AM or PM",this.placement="bottom-start",this.presetsLabel="Presets",this.previousMonthLabel="Previous month",this.range=!1,this.showDropdowns=!1,this.startTimeLabel="Start time",this.timePicker=!1,this.timeLabel="Time",this.triggerLabel="Choose date",this.value="",this.yearLabel="Year",this.isOpen=!1,this.text="",this.textError="",this.activeDate="",this.viewMonth="",this.draftStart="",this.draftEnd="",this.startTime=me,this.endTime=be,this.previewDate="",this.onApply=()=>{const e=this.draftParts();e&&(this.commitParts(e),this.closeCalendar(!0))},this.onCancel=()=>{this.clearable?this.commitValue(""):this.restoreValueAtOpen(),this.closeCalendar(!0)},this.onPresetClick=(e,t)=>{this.draftStart=$(t.start),this.draftEnd=$(t.end),this.previewDate="",!this.appliesOnPick||this.presetByArrow?(this.showDate(t.end,!0),e.currentTarget.focus()):this.onApply()},this.onPresetsKeyDown=e=>{const t={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1}[e.key],i={Home:"first",End:"last"}[e.key];if(!t&&!i)return;const s=Array.from(e.currentTarget.querySelectorAll('[role="radio"]:not([disabled])')),r=s.indexOf(e.target),n="first"===i?s[0]:"last"===i?s[s.length-1]:s[(r+t+s.length)%s.length];n&&(e.preventDefault(),n.focus(),n.classList.contains("pds-datepicker__preset")&&n!==s[s.length-1]&&(this.presetByArrow=!0,n.click(),this.presetByArrow=!1))},this.onClearMouseDown=e=>{e.preventDefault()},this.onClearClick=()=>{var e;this.commitValue(""),this.closeCalendar(!1),null===(e=this.inputEl)||void 0===e||e.setFocus()},this.onCustomRangeClick=()=>{var e,t;null===(t=null===(e=this.dialogEl)||void 0===e?void 0:e.querySelector('[data-date][tabindex="0"]'))||void 0===t||t.focus()},this.onDocumentPointerDown=e=>{var t;const i=e.composedPath();i.includes(this.el)||this.portal&&i.includes(this.portal.host)||(this.closeCalendar(!1),"dialog"===(null===(t=i[0])||void 0===t?void 0:t.localName)&&function(){const e=e=>{e.stopPropagation(),e.preventDefault()};document.addEventListener("click",e,{capture:!0,once:!0}),window.setTimeout((()=>document.removeEventListener("click",e,{capture:!0})),500)}())},this.onHostFocusIn=e=>{this.focusEntered(e)},this.onCalendarFocusIn=e=>{var t,i;this.focusEntered(e),null===(t=this.dialogEl)||void 0===t||t.setAttribute("aria-modal","true"),e.target===this.dialogEl&&(null===(i=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===i||i.focus({preventScroll:!0}))},this.onCalendarFocusOut=e=>{var t,i;const s=e.relatedTarget;s&&(null===(t=this.dialogEl)||void 0===t?void 0:t.contains(s))||null===(i=this.dialogEl)||void 0===i||i.removeAttribute("aria-modal"),this.checkFocusLeft(e,null!==s)},this.onHostFocusOut=e=>{const t=e.relatedTarget;t&&this.isInside(t)||this.checkFocusLeft(e,null!==t)},this.stopInnerEvent=e=>e.stopPropagation(),this.onFieldClick=e=>{var t,i;const s=e.composedPath();if(this.triggerEl&&s.includes(this.triggerEl)||this.clearEl&&s.includes(this.clearEl))return;const r=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("label");if(r&&s.includes(r))return this.skipForwardedClick=!0,void window.setTimeout((()=>this.skipForwardedClick=!1));if(this.skipForwardedClick)return void(this.skipForwardedClick=!1);const n=this.fieldReference();n&&n!==this.inputEl&&!s.includes(n)||this.openCalendar(!1)},this.onTextInput=e=>{var t,i;if(e.stopPropagation(),this.text=(null!==(t=e.detail.value)&&void 0!==t?t:"")+"",!this.isOpen)return;const s=this.parseText(this.text);if(!s)return;const[r,n]=[this.startTime,this.endTime];if(null!==(i=this.timesBeforeTyping)&&void 0!==i||(this.timesBeforeTyping=[r,n]),this.loadDraft(s),this.timePicker){const e=this.resolvedFormat,t=this.resolvedLocale,i=this.range?ae(this.text,e,t):[ne(this.text,e,t)],s=this.parsedValue(),a=e=>{var t,r,n;return!(null===(t=null==i?void 0:i[e])||void 0===t?void 0:t.time)||(null===(r=i[e])||void 0===r?void 0:r.time)===(null===(n=null==s?void 0:s[e])||void 0===n?void 0:n.time)};a(0)&&(this.startTime=r),this.range&&a(1)&&(this.endTime=n)}this.showDate(s[s.length-1].date)},this.onTextChange=e=>{e.stopPropagation(),this.isOpen&&this.hasFooter?window.setTimeout((()=>{var e;this.isOpen&&(this.el.matches(":focus-within")||(null===(e=this.portal)||void 0===e?void 0:e.host.matches(":focus-within")))||this.commitPendingText()})):this.commitText()},this.onTextKeyDown=e=>{e.stopPropagation();const t=e.detail;if(t.altKey&&"ArrowDown"===t.key)t.preventDefault(),this.isOpen?(this.focusActiveDay=!0,this.flushActiveDayFocus()):this.openCalendar(!0);else if("Enter"===t.key&&this.isOpen){if(!this.hasFooter||this.text!==this.fieldText()&&!this.parseText(this.text))this.commitText();else{const e=this.draftParts();e&&this.commitParts(e)}this.textError||this.closeCalendar(!1)}else"Escape"===t.key&&this.isOpen&&(t.preventDefault(),t.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!1))},this.onTriggerKeyDown=e=>{var t;if(this.isOpen)return"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),void this.closeCalendar(!1)):void("Tab"!==e.key||e.shiftKey||"visible"!==(null===(t=this.dialogEl)||void 0===t?void 0:t.style.visibility)||(e.preventDefault(),this.focusActiveDay=!0,this.flushActiveDayFocus()))},this.onTriggerClick=()=>{this.isOpen?this.closeCalendar(!0):this.openCalendar(!0)},this.onDialogKeyDown=e=>{"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.restoreValueAtOpen(),this.closeCalendar(!0)):"Tab"===e.key&&this.trapTab(e)},this.onGridKeyDown=e=>{const t=C(this.activeDate);if(!t)return;const i="rtl"===getComputedStyle(this.el).direction,s=E(t,this.weekStart);let r=null;switch(e.key){case"ArrowLeft":r=T(t,i?1:-1);break;case"ArrowRight":r=T(t,i?-1:1);break;case"ArrowUp":r=T(t,-7);break;case"ArrowDown":r=T(t,7);break;case"Home":r=T(t,-s);break;case"End":r=T(t,6-s);break;case"PageUp":r=L(t,e.shiftKey?-12:-1);break;case"PageDown":r=L(t,e.shiftKey?12:1);break;case"Enter":case" ":return e.preventDefault(),this.pickDate(t),void(this.hasFooter&&(this.focusActiveDay=!0));default:return}e.preventDefault();const n=H(r,this.minDate,this.maxDate);this.showDate(n),this.range&&(this.previewDate=$(n)),this.focusActiveDay=!0},this.onGridClick=e=>{const t=this.dayFromEvent(e);t&&this.pickDate(t)},this.onGridPointerOver=e=>{if(!this.range||!this.draftStart||this.draftEnd)return;const t=this.dayFromEvent(e),i=t&&$(t);i&&i!==this.previewDate&&(this.previewDate=i)}}async open(){this.openCalendar(!0)}async close(){this.closeCalendar(!1)}async setFocus(){var e;await(null===(e=this.inputEl)||void 0===e?void 0:e.setFocus())}valueChanged(){var e;this.committing||(this.valueAtOpen=null!==(e=this.value)&&void 0!==e?e:""),this.refreshFromValue()}contextChanged(){this.refreshFromValue()}placementChanged(){this.stopPositioning()}refreshFromValue(){var e;if(this.text=this.fieldText(),this.textError="",this.updateFormValue(),!this.isOpen)return;const t=this.parsedValue();this.loadDraft(t);const i=null!==(e=t&&t[t.length-1].date)&&void 0!==e?e:A();this.showDate(H(i,this.minDate,this.maxDate),!0)}requiredChanged(){this.updateFormValue()}componentWillLoad(){this.text=this.fieldText()}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals())}componentDidLoad(){this.updateFormValue()}disconnectedCallback(){var e;this.closeCalendar(!1),null===(e=this.portal)||void 0===e||e.remove()}componentDidRender(){var e,t;this.isOpen&&this.dialogEl?(null!==(t=this.portal)&&void 0!==t||(this.portal=new N(this.el)),this.portal.mount(this.dialogEl,this.resolvedLocale),this.cleanupAutoUpdate||this.startPositioning(),this.flushActiveDayFocus()):null===(e=this.portal)||void 0===e||e.remove()}flushActiveDayFocus(){var e,t;this.focusActiveDay&&"visible"===(null===(e=this.dialogEl)||void 0===e?void 0:e.style.visibility)&&(this.focusActiveDay=!1,null===(t=this.dialogEl.querySelector(`[data-date="${this.activeDate}"]`))||void 0===t||t.focus())}get baseId(){return this.componentId||this.fallbackId}get resolvedLocale(){return function(e){var t;try{return null!==(t=Intl.DateTimeFormat.supportedLocalesOf(e)[0])&&void 0!==t?t:"en-US"}catch(e){return"en-US"}}(this.locale||_(this.el))}get weekStart(){const e=this.firstDayOfWeek;return"number"==typeof e&&Number.isInteger(e)&&e>=0&&e<=6?e:function(e){var t,i,s;const r=Intl.Locale;if(!r)return 0;try{const n=new r(e),a=null!==(i=null===(t=n.getWeekInfo)||void 0===t?void 0:t.call(n).firstDay)&&void 0!==i?i:null===(s=n.weekInfo)||void 0===s?void 0:s.firstDay;return"number"==typeof a?a%7:0}catch(e){return 0}}(this.resolvedLocale)}get minDate(){return C(this.min)}get maxDate(){return C(this.max)}get isInteractive(){return!this.disabled&&!this.readonly}get monthCount(){const e="undefined"!=typeof window&&window.innerWidth<640;return this.range&&!e?2:1}get appliesOnPick(){return this.range&&this.autoApply&&!this.timePicker}get hasFooter(){return(this.range||this.timePicker)&&!this.appliesOnPick}get resolvedPresets(){return this.range?function(e,t){const i="string"==typeof e?e.split(",").map((e=>e.trim())).filter(Boolean).map((e=>({key:e}))):Array.isArray(e)?e:[],s=[];for(const e of i){if(!e||"string"!=typeof e.key)continue;const i="string"==typeof e.start?C(e.start):null,r="string"==typeof e.end?C(e.end):null,n=i&&r&&i<=r?[i,r]:q(e.key,t),a="string"==typeof e.label?e.label:U[e.key];n&&a&&s.push({key:e.key,label:a,start:n[0],end:n[1]})}return s}(this.presets,A()):[]}parsedValue(e=this.value){if(this.range){const[t,i,s]=(null!=e?e:"").split("/"),r=K(t),n=K(i);return void 0===s&&r&&n&&oe(r,n)<=0?[r,n]:null}const t=K(e);return t?[t]:null}get resolvedFormat(){return J(this.format,this.timePicker,this.timePicker&&ue(this.resolvedLocale).hour12)}fieldText(){var e;const t=this.parsedValue();return t?t.map((e=>le(this.withTimePicker(e),this.resolvedFormat,this.resolvedLocale))).join(ce):null!==(e=this.value)&&void 0!==e?e:""}withTimePicker(e,t=me){var i;return{date:e.date,time:this.timePicker?null!==(i=e.time)&&void 0!==i?i:t:null}}get fieldPlaceholder(){if(this.placeholder)return this.placeholder;const e=this.resolvedFormat;return this.range?`${e}${ce}${e}`:e}loadDraft(e){var t,i;const[s,r]=null!=e?e:[];this.draftStart=s?$(s.date):"",this.draftEnd=this.range&&r?$(r.date):"",this.startTime=null!==(t=null==s?void 0:s.time)&&void 0!==t?t:me,this.endTime=null!==(i=null==r?void 0:r.time)&&void 0!==i?i:be,this.previewDate=""}openCalendar(e){var t,i;if(!this.isInteractive||this.isOpen)return;const s=this.parsedValue();this.loadDraft(s),this.valueAtOpen=null!==(t=this.value)&&void 0!==t?t:"";const r=null!==(i=s&&s[s.length-1].date)&&void 0!==i?i:A();this.showDate(H(r,this.minDate,this.maxDate),!0),this.focusActiveDay=e,this.isOpen=!0,document.addEventListener("pointerdown",this.onDocumentPointerDown,!0)}closeCalendar(e){var t;this.isOpen&&(this.commitPendingText(),this.timesBeforeTyping=void 0,this.isOpen=!1,this.stopPositioning(),document.removeEventListener("pointerdown",this.onDocumentPointerDown,!0),e&&(null===(t=this.triggerEl)||void 0===t||t.focus()))}showDate(e,t=!1){const i=ge(e),s=C(this.viewMonth),r=s&&L(s,this.monthCount-1);t||!s||i<s?this.viewMonth=$(t?L(i,1-this.monthCount):i):r&&i>r&&(this.viewMonth=$(L(i,1-this.monthCount))),this.activeDate=$(e)}pickDate(e){Y(e,this.minDate,this.maxDate)||(this.dropTypedText(),this.range?this.pickRangeDay(e):this.timePicker?(this.draftStart=$(e),this.activeDate=this.draftStart):(this.commitValue($(e)),this.closeCalendar(!0)))}pickRangeDay(e){const t=C(this.draftStart),i=$(e);!t||this.draftEnd?(this.draftStart=i,this.draftEnd=""):e<t?this.draftStart=i:this.draftEnd=i,this.previewDate="",this.activeDate=i,this.draftEnd&&this.appliesOnPick&&this.onApply()}commitValue(e,t={}){var i;const s=e!==(null!==(i=this.value)&&void 0!==i?i:"");this.timesBeforeTyping=void 0,this.committing=!0,this.value=e,this.committing=!1,this.text=this.fieldText(),this.textError="",this.updateFormValue(),s&&this.pdsDatepickerChange.emit(Object.assign({value:e},t))}commitParts(e){if(!this.range)return void this.commitValue(de(e[0]));const[t,i]=e,s=I(this.resolvedPresets,t.date,i.date);this.commitValue(`${de(t)}/${de(i)}`,Object.assign({start:de(t),end:de(i)},s?{preset:s.key}:{}))}draftParts(){var e;const t=C(this.draftStart);if(!t)return null;const i=this.withTimePicker({date:t,time:this.startTime});if(!this.range)return[i];const s=this.withTimePicker({date:null!==(e=C(this.draftEnd))&&void 0!==e?e:t,time:this.endTime});return[i,oe(s,i)<0?Object.assign(Object.assign({},s),{time:i.time}):s]}restoreValueAtOpen(){var e;if(this.valueAtOpen===(null!==(e=this.value)&&void 0!==e?e:""))return void this.dropTypedText();const t=this.parsedValue(this.valueAtOpen);t?this.commitParts(t):this.commitValue(this.valueAtOpen)}isInside(e){var t,i;return!!e&&(e===this.el||this.el.contains(e)||!!(null===(t=this.el.shadowRoot)||void 0===t?void 0:t.contains(e))||!!(null===(i=this.portal)||void 0===i?void 0:i.contains(e)))}focusEntered(e){this.hasFocus||(this.hasFocus=!0,this.pdsFocus.emit(e))}checkFocusLeft(e,t){window.setTimeout((()=>{var i;this.el.matches(":focus-within")||(null===(i=this.portal)||void 0===i?void 0:i.host.matches(":focus-within"))||(t&&this.closeCalendar(!1),this.hasFocus&&(this.hasFocus=!1,this.pdsBlur.emit(e)))}))}startPositioning(){const e=this.fieldReference(),t=this.dialogEl;e&&t&&(this.cleanupAutoUpdate=a(e,t,(()=>{o(e,t,{placement:this.placement,strategy:"fixed",middleware:[d(4),l({padding:8}),c({padding:8,apply({availableWidth:e,availableHeight:t,elements:i}){const s=window.innerHeight-16;Object.assign(i.floating.style,{maxHeight:Math.max(0,Math.max(t,Math.min(s,480)))+"px",maxWidth:Math.max(0,e)+"px"})}}),h({padding:8,crossAxis:!0}),p()]}).then((({x:e,y:i,middlewareData:s})=>{var r;const n=!!(null===(r=s.hide)||void 0===r?void 0:r.referenceHidden);Object.assign(t.style,{left:e+"px",top:i+"px",visibility:n?"hidden":"visible"}),this.flushActiveDayFocus()}))})))}stopPositioning(){var e;null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this),this.cleanupAutoUpdate=void 0}fieldReference(){var e,t,i;return null!==(i=null===(t=null===(e=this.inputEl)||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector(".pds-input__field-wrapper"))&&void 0!==i?i:this.inputEl}commitPendingText(){if(this.text===this.fieldText())return;const e=this.parseText(this.text)?this.draftParts():null;e?this.commitParts(e):this.commitText()}readText(e){const t=this.resolvedFormat,i=this.resolvedLocale,s=this.range?ae(e,t,i):[ne(e,t,i)];return!s||s.some((e=>!e))?null:s.map(((e,t)=>this.withTimePicker(e,1===t?be:me)))}parseText(e){const t=this.readText(e);return t&&!this.rangeError(t)?t:null}rangeError(e){return this.minDate&&e.some((e=>e.date<this.minDate))?"min":this.maxDate&&e.some((e=>e.date>this.maxDate))?"max":""}valueError(){if(!this.value)return"";const e=this.parsedValue();return e?this.rangeError(e):"format"}commitText(){const e=this.text.trim();if(""===e)return void this.commitValue("");const t=this.readText(e),i=t?this.rangeError(t):"format";t&&!i?this.commitParts(t):(this.textError=i,this.updateFormValue())}canShowMonth(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A();return e<0?!this.minDate||T(i,-1)>=this.minDate:!this.maxDate||L(i,this.monthCount)<=this.maxDate}showMonth(e,t){var i,s;const r=null!==(i=C(this.viewMonth))&&void 0!==i?i:A(),n=null!==(s=C(this.activeDate))&&void 0!==s?s:A();this.viewMonth=$(L(r,t)),this.activeDate=$(H(L(n,t),this.minDate,this.maxDate)),this.canShowMonth(t)?e.currentTarget.focus():this.focusActiveDay=!0}jumpTo(e,t,i){var s;const r=H(new Date(Date.UTC(t,i,1)),this.minDate,this.maxDate);this.viewMonth=$(L(ge(r),-e));const n=null!==(s=C(this.activeDate))&&void 0!==s?s:r,a=Math.min(n.getUTCDate(),new Date(Date.UTC(t,i+1,0)).getUTCDate());this.activeDate=$(H(new Date(Date.UTC(t,i,a)),this.minDate,this.maxDate))}dropTypedText(){this.timesBeforeTyping&&([this.startTime,this.endTime]=this.timesBeforeTyping),this.timesBeforeTyping=void 0,(this.text!==this.fieldText()||this.textError)&&(this.text=this.fieldText(),this.inputEl&&(this.inputEl.value=this.text),this.textError="",this.updateFormValue())}trapTab(e){var t,i,s,r;const n=Array.from(null!==(i=null===(t=this.dialogEl)||void 0===t?void 0:t.querySelectorAll('button:not([disabled]):not([tabindex="-1"]), select:not([disabled]), [data-date][tabindex="0"]'))&&void 0!==i?i:[]);if(0===n.length)return;const a=null===(r=null===(s=this.dialogEl)||void 0===s?void 0:s.getRootNode())||void 0===r?void 0:r.activeElement,o=n[0],d=n[n.length-1];e.shiftKey&&a===o?(e.preventDefault(),d.focus()):e.shiftKey||a!==d||(e.preventDefault(),o.focus())}dayFromEvent(e){var t,i;const s=null===(i=null===(t=e.target)||void 0===t?void 0:t.closest)||void 0===i?void 0:i.call(t,"[data-date]");return C(null==s?void 0:s.dataset.date)}updateFormValue(){var e,t,i,s;if(k()||!(null===(e=this.internals)||void 0===e?void 0:e.setFormValue))return;if(this.internals.setFormValue(this.value||null),!this.internals.setValidity)return;const r=null!==(s=null===(i=null===(t=this.inputEl)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input"))&&void 0!==s?s:void 0,n=this.textError||this.valueError();"format"===n?this.internals.setValidity({badInput:!0},this.invalidDateMessage,r):"min"===n?this.internals.setValidity({rangeUnderflow:!0},this.boundMessage(this.minDateMessage,this.minDate),r):"max"===n?this.internals.setValidity({rangeOverflow:!0},this.boundMessage(this.maxDateMessage,this.maxDate),r):this.required&&!this.value?this.internals.setValidity({valueMissing:!0},(null==r?void 0:r.validationMessage)||this.invalidDateMessage,r):this.internals.setValidity({})}boundMessage(e,t){const i=t?le({date:t,time:null},this.format||void 0,this.resolvedLocale):"";return y(e,{date:i})}formResetCallback(){this.value="",this.text="",this.textError="",this.closeCalendar(!1),this.updateFormValue()}interactivityChanged(){this.isInteractive||this.closeCalendar(!1)}formDisabledCallback(e){this.disabled=e,e&&this.closeCalendar(!1)}formStateRestoreCallback(e){"string"==typeof e&&(this.value=e)}triggerAccessibleName(e){const t=this.parsedValue();if(!t)return this.triggerLabel;const i=t.map((t=>S(t.date,e,ve)));return`${this.triggerLabel}, ${i.join(ce)}`}highlightedRange(){const e=C(this.draftStart),t=C(this.draftEnd);if(!e||t)return[e,t];const i=C(this.previewDate);return[e,i&&i>e?i:null]}selectedDay(){return this.range?null:C(this.draftStart)}renderMonthHeading(e,t,i,r){const n=S(e,i,{month:"long",year:"numeric"}),a=0===t?"polite":null;if(!this.showDropdowns)return s("div",{class:"pds-datepicker__heading",id:r,"aria-live":a},n);const o=e.getUTCFullYear(),d=e.getUTCMonth(),l=this.minDate,c=this.maxDate,h=A().getUTCFullYear(),p=l?l.getUTCFullYear():h-100,v=c?c.getUTCFullYear():h+100,m=z(i,{month:"long"}),b=z(i,{year:"numeric"});return s("div",{class:"pds-datepicker__dropdowns"},s("span",{class:"visually-hidden",id:r,"aria-live":a},n),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.monthLabel,onChange:e=>this.jumpTo(t,o,Number(e.target.value))},Array.from({length:12},((e,t)=>{const i=!!l&&new Date(Date.UTC(o,t+1,0))<l||!!c&&new Date(Date.UTC(o,t,1))>c;return s("option",{value:t+"",selected:t===d,disabled:i},m.format(new Date(Date.UTC(o,t,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})),s("span",{class:"pds-datepicker__select-wrap"},s("select",{class:"pds-datepicker__heading-select","aria-label":this.yearLabel,onChange:e=>this.jumpTo(t,Number(e.target.value),d)},Array.from({length:Math.max(v,o)-Math.min(p,o)+1},((e,t)=>{const i=Math.min(p,o)+t;return s("option",{value:i+"",selected:i===o},b.format(new Date(Date.UTC(i,0,1))))}))),s("pds-icon",{class:"pds-datepicker__select-caret",icon:u,size:"small","aria-hidden":"true"})))}renderMonth(e,t,i){const r=e.getUTCFullYear(),n=e.getUTCMonth(),a=this.minDate,o=this.maxDate,d=this.selectedDay(),[l,c]=this.range?this.highlightedRange():[null,null],h=A(),p=z(i,ve),u=z(i,{day:"numeric"}),b=`${this.baseId}-calendar-heading-${t}`,f=t===this.monthCount-1;return s("div",{class:"pds-datepicker__month"},s("div",{class:"pds-datepicker__header"},0===t?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--previous","aria-label":this.previousMonthLabel,disabled:!this.canShowMonth(-1),onClick:e=>this.showMonth(e,-1)},s("pds-icon",{icon:v,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"}),this.renderMonthHeading(e,t,i,b),f?s("button",{type:"button",class:"pds-datepicker__nav pds-datepicker__nav--next","aria-label":this.nextMonthLabel,disabled:!this.canShowMonth(1),onClick:e=>this.showMonth(e,1)},s("pds-icon",{icon:m,"aria-hidden":"true"})):s("span",{class:"pds-datepicker__nav-spacer"})),s("table",{class:"pds-datepicker__grid",role:"grid","aria-labelledby":b,"aria-multiselectable":this.range?"true":null,onKeyDown:this.onGridKeyDown,onClick:this.onGridClick,onPointerOver:this.onGridPointerOver},s("thead",null,s("tr",null,function(e,t){const i=z(e,{weekday:"short"}),s=z(e,{weekday:"long"}),r=Array.from({length:7},((e,i)=>new Date(Date.UTC(2023,0,1+(t+i)%7)))),n=r.map((e=>i.format(e).replace(/\.$/,""))),a=n.every((e=>/^[A-Za-z\u00C0-\u024F]+$/.test(e))),o=n.map((e=>e.slice(0,2))),d=a&&7===new Set(o.map((e=>e.toLowerCase()))).size;return r.map(((e,t)=>({short:d?o[t]:i.format(e),long:s.format(e)})))}(i,this.weekStart).map((e=>s("th",{scope:"col",class:"pds-datepicker__weekday"},s("span",{"aria-hidden":"true"},e.short),s("span",{class:"visually-hidden"},e.long)))))),s("tbody",null,function(e,t,i){const s=new Date(Date.UTC(e,t,1)),r=Array(E(s,i)).fill(null);for(let i=1;i<=j(e,t);i++)r.push(new Date(Date.UTC(e,t,i)));for(;r.length%7!=0;)r.push(null);const n=[];for(let e=0;e<r.length;e+=7)n.push(r.slice(e,e+7));return n}(r,n,this.weekStart).map((e=>s("tr",null,e.map(((e,t)=>{if(!e)return s("td",{class:"pds-datepicker__day pds-datepicker__day--empty"});const i=$(e),r=Y(e,a,o),n=P(e,l)||P(e,c),v=!!l&&!!c&&!P(l,c),m=!!l&&!!c&&e>=l&&e<=c,b=P(e,d)||n||m,f=P(e,h);return s("td",{class:{"pds-datepicker__day":!0,"pds-datepicker__day--selected":P(e,d)||n,"pds-datepicker__day--in-range":m&&!n,"pds-datepicker__day--range-start":v&&P(e,l),"pds-datepicker__day--range-end":v&&P(e,c),"pds-datepicker__day--row-start":m&&0===t,"pds-datepicker__day--row-end":m&&6===t,"pds-datepicker__day--today":f,"pds-datepicker__day--disabled":r},"data-date":i,tabindex:i===this.activeDate?"0":"-1","aria-label":p.format(e),"aria-selected":b?"true":null,"aria-current":f?"date":null,"aria-disabled":r?"true":null},((e,t)=>{var i,s;return null!==(s=null===(i=e.formatToParts(t).find((e=>"day"===e.type)))||void 0===i?void 0:i.value)&&void 0!==s?s:e.format(t)})(u,e))}))))))),this.timePicker&&this.timesUnderMonth(t).map((e=>this.renderTime(e,i))))}timesUnderMonth(e){return this.range?1===this.monthCount?["start","end"]:[0===e?"start":"end"]:["start"]}renderTime(e,t){var i,r,n;const a="start"===e?this.startTime:null!==(n=null===(r=null===(i=this.draftParts())||void 0===i?void 0:i[1])||void 0===r?void 0:r.time)&&void 0!==n?n:this.endTime,[o,d]=he(a),l=ue(t),c=Math.max(1,Math.min(60,Math.floor(this.minuteIncrement)||1)),h=(t,i)=>{const s=pe(t,i);"start"===e?this.startTime=s:this.endTime=s,this.timesBeforeTyping&&(this.timesBeforeTyping["start"===e?0:1]=s)},p=this.range?"start"===e?this.startTimeLabel:this.endTimeLabel:this.timeLabel,u=o>=12,v=l.hour12?Array.from({length:12},((e,t)=>t+1)):Array.from({length:24},((e,t)=>t)),m=l.hour12?o%12||12:o,b=Array.from({length:Math.ceil(60/c)},((e,t)=>t*c));b.includes(d)||b.push(d),b.sort(((e,t)=>e-t));const f=`${this.baseId}-time-${e}`;return s("div",{class:"pds-datepicker__time",role:"group","aria-labelledby":f},s("span",{class:"pds-datepicker__time-label",id:f},p),s("span",{class:"pds-datepicker__time-field"},s("select",{class:"pds-datepicker__time-select","aria-label":this.hourLabel,onChange:e=>{const t=Number(e.target.value);h(l.hour12?t%12+(u?12:0):t,d)}},v.map((e=>s("option",{value:e+"",selected:e===m},l.hour12?e+"":(e+"").padStart(2,"0"))))),s("span",{class:"pds-datepicker__time-separator","aria-hidden":"true"},":"),s("select",{class:"pds-datepicker__time-select","aria-label":this.minuteLabel,onChange:e=>h(o,Number(e.target.value))},b.map((e=>s("option",{value:e+"",selected:e===d},(e+"").padStart(2,"0"))))),l.hour12&&s("select",{class:"pds-datepicker__time-select pds-datepicker__time-select--period","aria-label":this.periodLabel,onChange:e=>{h(o%12+("pm"===e.target.value?12:0),d)}},s("option",{value:"am",selected:!u},l.am),s("option",{value:"pm",selected:u},l.pm))))}renderPresets(){var e;const t=this.resolvedPresets;if(0===t.length)return null;const i=I(t,C(this.draftStart),C(this.draftEnd)),r=!i&&!!this.draftStart,n=e=>R(e,this.minDate,this.maxDate),a=i&&n(i)?i:r?"custom":null!==(e=t.find(n))&&void 0!==e?e:"custom";return s("div",{class:"pds-datepicker__presets-column"},s("ul",{class:"pds-datepicker__presets",part:"presets",role:"radiogroup","aria-label":this.presetsLabel,onKeyDown:this.onPresetsKeyDown},t.map((e=>{const t=e===i;return s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":t},"aria-checked":t?"true":"false",tabindex:e===a?"0":"-1",disabled:!R(e,this.minDate,this.maxDate),onClick:t=>this.onPresetClick(t,e)},s("span",null,e.label),t&&s("pds-icon",{icon:b,"aria-hidden":"true"})))})),s("li",{role:"none"},s("button",{type:"button",role:"radio",class:{"pds-datepicker__preset":!0,"pds-datepicker__preset--selected":r},"aria-checked":r?"true":"false",tabindex:"custom"===a?"0":"-1",onClick:this.onCustomRangeClick},s("span",null,this.customRangeLabel),r&&s("pds-icon",{icon:b,"aria-hidden":"true"})))))}selectionText(){const e=this.draftParts();if(!e)return"";const t=this.resolvedFormat,i=this.resolvedLocale;return this.range&&!this.draftEnd?`${le(e[0],t,i)}${ce}`:e.map((e=>le(e,t,i))).join(ce)}renderFooter(){const e=this.draftParts(),t=this.selectionText();return s("div",{class:"pds-datepicker__footer"},s("span",{class:"pds-datepicker__selection","aria-live":"polite"},t),s("button",{type:"button",class:"pds-datepicker__action",onClick:this.onCancel},this.clearable?this.clearLabel:this.cancelLabel),s("button",{type:"button",class:"pds-datepicker__action pds-datepicker__action--primary",disabled:!e,onClick:this.onApply},this.applyLabel))}renderCalendar(e){var t;const i=null!==(t=C(this.viewMonth))&&void 0!==t?t:A(),r=Array.from({length:this.monthCount},((e,t)=>L(i,t)));return s("div",{class:{"pds-datepicker__dialog":!0,"pds-datepicker__dialog--range":this.range},id:this.baseId+"-calendar",role:"dialog",tabindex:"-1","aria-labelledby":this.range?null:this.baseId+"-calendar-heading-0","aria-label":this.range?this.label||this.triggerLabel:null,part:"calendar",ref:e=>this.dialogEl=e,onKeyDown:this.onDialogKeyDown,onFocusin:this.onCalendarFocusIn,onFocusout:this.onCalendarFocusOut},this.range&&this.renderPresets(),s("div",{class:"pds-datepicker__panel"},s("div",{class:"pds-datepicker__months"},r.map(((t,i)=>this.renderMonth(t,i,e)))),this.hasFooter&&this.renderFooter(),this.appliesOnPick&&s("span",{class:"visually-hidden","aria-live":"polite"},this.selectionText())))}render(){const e=this.resolvedLocale;return s(r,{key:"a761f0ca6eeedcac3e4bd90760aa9781cd37dcdc",class:{"pds-datepicker--range":this.range,"pds-datepicker--time":this.timePicker},"full-width":this.fullWidth?"true":null,onFocusin:this.onHostFocusIn,onFocusout:this.onHostFocusOut},s("pds-input",{key:"2eb04f9fd4e2f7a2437145d250c629c2cc8a0bf6",ref:e=>this.inputEl=e,componentId:this.baseId,label:this.label,hideLabel:this.hideLabel,helperMessage:this.helperMessage,errorMessage:this.errorMessage,invalid:this.invalid||!!this.textError||!!this.valueError(),disabled:this.disabled,readonly:this.readonly,required:this.required,placeholder:this.fieldPlaceholder,fullWidth:this.fullWidth,autocomplete:"off",value:this.text,onClick:this.onFieldClick,onPdsInput:this.onTextInput,onPdsChange:this.onTextChange,onPdsKeyDown:this.onTextKeyDown,onPdsFocus:this.stopInnerEvent,onPdsBlur:this.stopInnerEvent},this.clearable&&!!this.value&&this.isInteractive&&s("button",{key:"clear",slot:"suffix",type:"button",class:"pds-datepicker__clear",ref:e=>this.clearEl=e,"aria-label":this.label?`${this.clearLabel} ${this.label}`:this.clearLabel,tabindex:"-1",onMouseDown:this.onClearMouseDown,onClick:this.onClearClick},s("pds-icon",{key:"98c325fbba8ea78b2d409bc77099db3206738508",icon:f,"aria-hidden":"true"})),s("button",{key:"trigger",slot:"suffix",type:"button",class:"pds-datepicker__trigger",ref:e=>this.triggerEl=e,"aria-label":this.triggerAccessibleName(e),"aria-haspopup":"dialog","aria-expanded":this.isOpen?"true":"false",disabled:!this.isInteractive,onClick:this.onTriggerClick,onKeyDown:this.onTriggerKeyDown},s("pds-icon",{key:"cb8483febe1b485058b7bb4271b749981a7747a1",icon:g,"aria-hidden":"true"}))),this.isOpen&&this.renderCalendar(e))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}}static get style(){return':host{--pds-datepicker-day-size:var(--pine-dimension-500);--pds-datepicker-presets-width:200px;display:inline-block}:host([full-width]){display:block}pds-input{display:block}:host(.pds-datepicker--time) pds-input{min-width:220px}:host(.pds-datepicker--range) pds-input{min-width:260px}:host(.pds-datepicker--range.pds-datepicker--time) pds-input{min-width:min(380px, 100%)}.pds-datepicker__trigger,.pds-datepicker__clear{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-2xs)}.pds-datepicker__trigger:hover:not(:disabled),.pds-datepicker__clear:hover:not(:disabled){background:var(--pine-color-background-muted);color:var(--pine-color-text-strong)}.pds-datepicker__trigger:focus-visible,.pds-datepicker__clear:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__trigger:disabled,.pds-datepicker__clear:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__clear{-webkit-margin-end:var(--pine-dimension-2xs);margin-inline-end:var(--pine-dimension-2xs)}.pds-datepicker__nav{-ms-flex-align:center;align-items:center;background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;height:var(--pine-dimension-400);-ms-flex-pack:center;justify-content:center;padding:0;width:var(--pine-dimension-400)}.pds-datepicker__nav:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__nav:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__nav:disabled{border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__nav:dir(rtl) pds-icon{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.pds-datepicker__dialog:focus{outline:none}.pds-datepicker__dialog{background:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-150);-webkit-box-shadow:var(--pine-box-shadow-200);box-shadow:var(--pine-box-shadow-200);-webkit-box-sizing:border-box;box-sizing:border-box;left:0;max-height:calc(100vh - var(--pine-dimension-sm));max-height:calc(100dvh - var(--pine-dimension-sm));max-width:calc(100vw - var(--pine-dimension-sm));overflow:auto;-ms-scroll-chaining:none;overscroll-behavior:contain;padding:var(--pine-dimension-sm);pointer-events:auto;position:fixed;top:0;visibility:hidden;z-index:var(--pine-z-index-priority)}:host-context([data-theme=dark]) .pds-datepicker__dialog{border:var(--pine-border)}.pds-datepicker__header{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-sm);margin-block-end:var(--pine-dimension-sm)}.pds-datepicker__nav-spacer{-ms-flex:none;flex:none;width:var(--pine-dimension-400)}.pds-datepicker__heading{color:var(--pine-color-text);font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold)}.pds-datepicker__grid{border-collapse:collapse;border-spacing:0}.pds-datepicker__weekday{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm);height:var(--pds-datepicker-day-size);padding:0;text-align:center;width:var(--pds-datepicker-day-size)}.pds-datepicker__day{border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body);height:var(--pds-datepicker-day-size);padding:0;position:relative;text-align:center;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:var(--pds-datepicker-day-size)}.pds-datepicker__day:hover{background:var(--pine-color-background-muted)}.pds-datepicker__day:focus-visible{outline:var(--pine-outline-focus);outline-offset:calc(var(--pine-border-width-thick) * -1)}.pds-datepicker__day--empty{cursor:default;pointer-events:none}.pds-datepicker__day--today::after{background:var(--pine-color-primary);border-radius:var(--pine-border-radius-full);content:"";height:var(--pine-dimension-050);inset-block-end:var(--pine-dimension-050);inset-inline-start:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:var(--pine-dimension-050)}.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:var(--pine-color-primary);border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-primary)}.pds-datepicker__day--selected:focus-visible{outline-offset:var(--pine-border-width)}.pds-datepicker__day--range-start{border-end-end-radius:0;border-start-end-radius:0}.pds-datepicker__day--range-end{border-end-start-radius:0;border-start-start-radius:0}.pds-datepicker__day--range-start.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--range-end.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:var(--pine-color-text-primary)}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-muted);border-radius:0;color:var(--pine-color-text-secondary)}.pds-datepicker__day--row-start{border-end-start-radius:var(--pine-border-radius-full);border-start-start-radius:var(--pine-border-radius-full)}.pds-datepicker__day--row-end{border-end-end-radius:var(--pine-border-radius-full);border-start-end-radius:var(--pine-border-radius-full)}.pds-datepicker__day--disabled,.pds-datepicker__day--disabled:hover{background:transparent;color:var(--pine-color-text-disabled);cursor:not-allowed;text-decoration:line-through}.pds-datepicker__day--in-range:hover{background:var(--pine-color-background-inset)}.pds-datepicker__dialog--range{display:-ms-flexbox;display:flex;padding:0}.pds-datepicker__panel{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0}.pds-datepicker__dialog--range .pds-datepicker__panel{padding:var(--pine-dimension-sm)}.pds-datepicker__months{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-lg)}.pds-datepicker__presets-column{-webkit-border-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-inline-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-ms-flex:none;flex:none;position:relative;width:var(--pds-datepicker-presets-width)}.pds-datepicker__presets{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--pine-dimension-2xs);inset:0;list-style:none;margin:0;overflow-y:auto;padding:var(--pine-dimension-150);position:absolute}.pds-datepicker__preset{-ms-flex-align:center;align-items:center;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text-secondary);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-xs) var(--pine-dimension-sm);text-align:start;-webkit-transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);transition:background var(--pine-motion-duration-fast) var(--pine-motion-easing-in);width:100%}.pds-datepicker__preset:hover:not(:disabled){background:var(--pine-color-background-muted)}.pds-datepicker__preset:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__preset:disabled{color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-datepicker__preset--selected{background:var(--pine-color-background-muted);color:var(--pine-color-text-active)}.pds-datepicker__footer{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-overlay);-webkit-border-before:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-start:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-xs);inset-block-end:calc(var(--pine-dimension-sm) * -1);-ms-flex-pack:end;justify-content:flex-end;margin-block:var(--pine-dimension-sm) calc(var(--pine-dimension-sm) * -1);padding-block:var(--pine-dimension-sm);position:-webkit-sticky;position:sticky}.pds-datepicker__selection{color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);-webkit-margin-end:auto;margin-inline-end:auto}.pds-datepicker__dropdowns{display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-datepicker__select-wrap{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;position:relative}.pds-datepicker__heading-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-md);color:var(--pine-color-text);cursor:pointer;field-sizing:content;font:var(--pine-typography-heading-5);font-weight:var(--pine-font-weight-semi-bold);padding-block:var(--pine-dimension-2xs);padding-inline:var(--pine-dimension-xs) calc(var(--pine-dimension-xs) + var(--pine-dimension-sm))}.pds-datepicker__heading-select:hover{background:var(--pine-color-background-muted)}.pds-datepicker__heading-select:focus-visible{outline:var(--pine-outline-focus)}.pds-datepicker__select-caret{color:var(--pine-color-text-secondary);inset-inline-end:var(--pine-dimension-xs);pointer-events:none;position:absolute}.pds-datepicker__time{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-before:var(--pine-dimension-sm);margin-block-start:var(--pine-dimension-sm);padding-inline:var(--pine-dimension-xs)}.pds-datepicker__time-label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium)}.pds-datepicker__time-field{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-border-radius-md);display:-ms-inline-flexbox;display:inline-flex;min-height:var(--pine-dimension-400);padding-inline:var(--pine-dimension-2xs)}.pds-datepicker__time-field:hover{border-color:var(--pine-color-border-hover)}.pds-datepicker__time-field:focus-within{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__time-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-border-radius-sm);color:var(--pine-color-text-strong);cursor:pointer;font:var(--pine-typography-body);font-variant-numeric:tabular-nums;padding:var(--pine-dimension-2xs);text-align:center}.pds-datepicker__time-select:focus-visible{background:var(--pine-color-background-muted);outline:none}.pds-datepicker__time-select--period{-webkit-margin-start:var(--pine-dimension-2xs);margin-inline-start:var(--pine-dimension-2xs)}.pds-datepicker__time-separator{color:var(--pine-color-text-secondary)}:host-context([data-theme=dark]) select{color-scheme:dark}.pds-datepicker__action{background:var(--pine-color-secondary);border:var(--pine-border);border-radius:var(--pine-border-radius-full);color:var(--pine-color-text-secondary);cursor:pointer;font:var(--pine-typography-body-medium);padding:calc(var(--pine-dimension-xs) - var(--pine-border-width)) var(--pine-dimension-sm)}.pds-datepicker__action:hover:not(:disabled){background:var(--pine-color-secondary-hover);border-color:var(--pine-color-border-hover)}.pds-datepicker__action:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-datepicker__action:disabled{background:var(--pine-color-secondary-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-secondary-disabled);cursor:not-allowed}.pds-datepicker__action--primary{background:var(--pine-color-primary);border-color:var(--pine-color-primary);color:var(--pine-color-text-primary)}.pds-datepicker__action--primary:hover:not(:disabled){background:var(--pine-color-primary-hover);border-color:var(--pine-color-primary-hover)}.pds-datepicker__action--primary:disabled{background:var(--pine-color-primary-disabled);border-color:var(--pine-color-primary-disabled);color:var(--pine-color-text-primary-disabled)}@media (max-width: 600px){.pds-datepicker__dialog--range{-ms-flex-direction:column;flex-direction:column}.pds-datepicker__presets-column{-webkit-border-after:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);border-block-end:var(--pine-border-width-thin) solid var(--pine-color-border-subtle);-webkit-border-end:0;border-inline-end:0;width:auto}.pds-datepicker__presets{-ms-flex-direction:row;flex-direction:row;overflow-x:auto;position:static}.pds-datepicker__preset{white-space:nowrap}.pds-datepicker__selection{-ms-flex-preferred-size:100%;flex-basis:100%}}.pds-datepicker__trigger,.pds-datepicker__clear,.pds-datepicker__nav,.pds-datepicker__weekday,.pds-datepicker__day,.pds-datepicker__preset,.pds-datepicker__action{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (forced-colors: active){.pds-datepicker__day--selected,.pds-datepicker__day--selected:hover{background:Highlight;color:HighlightText;forced-color-adjust:none}.pds-datepicker__day--in-range,.pds-datepicker__day--in-range:hover{border-block:var(--pine-border-width-thin) solid Highlight}.pds-datepicker__day--today::after{background:CanvasText;forced-color-adjust:none}.pds-datepicker__day--selected.pds-datepicker__day--today::after{background:HighlightText}.pds-datepicker__day--disabled{color:GrayText}}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}'}},[65,"pds-datepicker",{applyLabel:[1,"apply-label"],autoApply:[4,"auto-apply"],cancelLabel:[1,"cancel-label"],clearable:[4],clearLabel:[1,"clear-label"],componentId:[1,"component-id"],customRangeLabel:[1,"custom-range-label"],disabled:[4],endTimeLabel:[1,"end-time-label"],errorMessage:[1,"error-message"],firstDayOfWeek:[2,"first-day-of-week"],format:[1],fullWidth:[4,"full-width"],helperMessage:[1,"helper-message"],hideLabel:[4,"hide-label"],hourLabel:[1,"hour-label"],invalid:[4],invalidDateMessage:[1,"invalid-date-message"],maxDateMessage:[1,"max-date-message"],minDateMessage:[1,"min-date-message"],label:[1],locale:[1],max:[1],min:[1],minuteIncrement:[2,"minute-increment"],minuteLabel:[1,"minute-label"],monthLabel:[1,"month-label"],name:[1],nextMonthLabel:[1,"next-month-label"],periodLabel:[1,"period-label"],placeholder:[1],placement:[1],presets:[1],presetsLabel:[1,"presets-label"],previousMonthLabel:[1,"previous-month-label"],range:[4],readonly:[4],required:[4],showDropdowns:[4,"show-dropdowns"],startTimeLabel:[1,"start-time-label"],timePicker:[4,"time-picker"],timeLabel:[1,"time-label"],triggerLabel:[1,"trigger-label"],value:[1025],yearLabel:[1,"year-label"],isOpen:[32],text:[32],textError:[32],activeDate:[32],viewMonth:[32],draftStart:[32],draftEnd:[32],startTime:[32],endTime:[32],previewDate:[32],open:[64],close:[64],setFocus:[64]},void 0,{value:[{valueChanged:0}],format:[{contextChanged:0}],locale:[{contextChanged:0}],timePicker:[{contextChanged:0}],range:[{contextChanged:0}],min:[{contextChanged:0}],max:[{contextChanged:0}],placement:[{placementChanged:0}],required:[{requiredChanged:0}],disabled:[{interactivityChanged:0}],readonly:[{interactivityChanged:0}]}]),_e=ke,ye=function(){"undefined"!=typeof customElements&&["pds-datepicker","pds-icon","pds-input"].forEach((e=>{switch(e){case"pds-datepicker":customElements.get(n(e))||customElements.define(n(e),ke);break;case"pds-icon":customElements.get(n(e))||w();break;case"pds-input":customElements.get(n(e))||D()}}))};export{_e as PdsDatepicker,ye as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as i,HTMLElement as d,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";const r=i(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.vertical=!1}get hasLabel(){var i;return!!(null===(i=this.label)||void 0===i?void 0:i.trim())&&!this.vertical}classNames(){const i=["pds-divider"];return this.vertical&&i.push("pds-divider--vertical"),this.hasLabel&&i.push("pds-divider--labeled"),this.offset&&i.push("pds-divider--offset-"+this.offset),i.join(" ")}render(){return e(s,{key:"c6f887ca1f68c8e572bd518c43d88f052f6d9dd1",id:this.componentId},this.hasLabel?e("div",{class:this.classNames(),role:"separator","aria-label":this.label},e("span",{class:"pds-divider__label",part:"label","aria-hidden":"true"},this.label)):e("hr",{class:this.classNames()}))}static get style(){return'.pds-divider{background:var(--pine-color-border);border:0;display:-ms-flexbox;display:flex;height:var(--pine-border-width);margin:0;width:100%}.pds-divider--vertical{height:100%;width:1px}.pds-divider--labeled{-ms-flex-align:center;align-items:center;background:none;color:var(--pine-color-text);font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-sm);height:auto;width:auto}.pds-divider--labeled::before,.pds-divider--labeled::after{background:var(--pine-color-border);content:"";-ms-flex:1;flex:1;height:var(--pine-border-width)}.pds-divider__label{text-align:center}.pds-divider--offset-xxs{margin:0 calc(var(--pine-dimension-2xs) * -1);padding:0 var(--pine-dimension-2xs)}.pds-divider--offset-xxs.pds-divider--vertical{margin:calc(var(--pine-dimension-2xs) * -1) 0;padding:var(--pine-dimension-2xs) 0}.pds-divider--offset-xxs.pds-divider--labeled{padding:0}.pds-divider--offset-xs{margin:0 calc(var(--pine-dimension-xs) * -1);padding:0 var(--pine-dimension-xs)}.pds-divider--offset-xs.pds-divider--vertical{margin:calc(var(--pine-dimension-xs) * -1) 0;padding:var(--pine-dimension-xs) 0}.pds-divider--offset-xs.pds-divider--labeled{padding:0}.pds-divider--offset-sm{margin:0 calc(var(--pine-dimension-sm) * -1);padding:0 var(--pine-dimension-sm)}.pds-divider--offset-sm.pds-divider--vertical{margin:calc(var(--pine-dimension-sm) * -1) 0;padding:var(--pine-dimension-sm) 0}.pds-divider--offset-sm.pds-divider--labeled{padding:0}.pds-divider--offset-md{margin:0 calc(var(--pine-dimension-md) * -1);padding:0 var(--pine-dimension-md)}.pds-divider--offset-md.pds-divider--vertical{margin:calc(var(--pine-dimension-md) * -1) 0;padding:var(--pine-dimension-md) 0}.pds-divider--offset-md.pds-divider--labeled{padding:0}.pds-divider--offset-lg{margin:0 calc(var(--pine-dimension-lg) * -1);padding:0 var(--pine-dimension-lg)}.pds-divider--offset-lg.pds-divider--vertical{margin:calc(var(--pine-dimension-lg) * -1) 0;padding:var(--pine-dimension-lg) 0}.pds-divider--offset-lg.pds-divider--labeled{padding:0}.pds-divider--offset-xl{margin:0 calc(var(--pine-dimension-xl) * -1);padding:0 var(--pine-dimension-xl)}.pds-divider--offset-xl.pds-divider--vertical{margin:calc(var(--pine-dimension-xl) * -1) 0;padding:var(--pine-dimension-xl) 0}.pds-divider--offset-xl.pds-divider--labeled{padding:0}.pds-divider--offset-xxl{margin:0 calc(var(--pine-dimension-2xl) * -1);padding:0 var(--pine-dimension-2xl)}.pds-divider--offset-xxl.pds-divider--vertical{margin:calc(var(--pine-dimension-2xl) * -1) 0;padding:var(--pine-dimension-2xl) 0}.pds-divider--offset-xxl.pds-divider--labeled{padding:0}@media (max-width: 767px){.pds-divider--vertical{display:none}}'}},[1,"pds-divider",{componentId:[1,"component-id"],label:[1],offset:[1],vertical:[4]}]),a=r,p=function(){"undefined"!=typeof customElements&&["pds-divider"].forEach((i=>{"pds-divider"===i&&(customElements.get(n(i))||customElements.define(n(i),r))}))};export{a as PdsDivider,p as defineCustomElement}
1
+ import{proxyCustomElement as i,HTMLElement as d,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";const r=i(class extends d{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.vertical=!1}get hasLabel(){var i;return!!(null===(i=this.label)||void 0===i?void 0:i.trim())&&!this.vertical}classNames(){const i=["pds-divider"];return this.vertical&&i.push("pds-divider--vertical"),this.hasLabel&&i.push("pds-divider--labeled"),this.offset&&i.push("pds-divider--offset-"+this.offset),i.join(" ")}render(){return e(s,{key:"072cc8552bd33c4a00d216f15a5a848cfc97fd92",id:this.componentId},this.hasLabel?e("div",{class:this.classNames(),role:"separator","aria-label":this.label},e("span",{class:"pds-divider__label",part:"label","aria-hidden":"true"},this.label)):e("hr",{class:this.classNames()}))}static get style(){return'.pds-divider{background:var(--pine-color-border);border:0;display:-ms-flexbox;display:flex;height:var(--pine-border-width);margin:0;width:100%}.pds-divider--vertical{height:100%;width:1px}.pds-divider--labeled{-ms-flex-align:center;align-items:center;background:none;color:var(--pine-color-text);font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-sm);height:auto;width:auto}.pds-divider--labeled::before,.pds-divider--labeled::after{background:var(--pine-color-border);content:"";-ms-flex:1;flex:1;height:var(--pine-border-width)}.pds-divider__label{text-align:center}.pds-divider--offset-xxs{margin:0 calc(var(--pine-dimension-2xs) * -1);padding:0 var(--pine-dimension-2xs)}.pds-divider--offset-xxs.pds-divider--vertical{margin:calc(var(--pine-dimension-2xs) * -1) 0;padding:var(--pine-dimension-2xs) 0}.pds-divider--offset-xxs.pds-divider--labeled{padding:0}.pds-divider--offset-xs{margin:0 calc(var(--pine-dimension-xs) * -1);padding:0 var(--pine-dimension-xs)}.pds-divider--offset-xs.pds-divider--vertical{margin:calc(var(--pine-dimension-xs) * -1) 0;padding:var(--pine-dimension-xs) 0}.pds-divider--offset-xs.pds-divider--labeled{padding:0}.pds-divider--offset-sm{margin:0 calc(var(--pine-dimension-sm) * -1);padding:0 var(--pine-dimension-sm)}.pds-divider--offset-sm.pds-divider--vertical{margin:calc(var(--pine-dimension-sm) * -1) 0;padding:var(--pine-dimension-sm) 0}.pds-divider--offset-sm.pds-divider--labeled{padding:0}.pds-divider--offset-md{margin:0 calc(var(--pine-dimension-md) * -1);padding:0 var(--pine-dimension-md)}.pds-divider--offset-md.pds-divider--vertical{margin:calc(var(--pine-dimension-md) * -1) 0;padding:var(--pine-dimension-md) 0}.pds-divider--offset-md.pds-divider--labeled{padding:0}.pds-divider--offset-lg{margin:0 calc(var(--pine-dimension-lg) * -1);padding:0 var(--pine-dimension-lg)}.pds-divider--offset-lg.pds-divider--vertical{margin:calc(var(--pine-dimension-lg) * -1) 0;padding:var(--pine-dimension-lg) 0}.pds-divider--offset-lg.pds-divider--labeled{padding:0}.pds-divider--offset-xl{margin:0 calc(var(--pine-dimension-xl) * -1);padding:0 var(--pine-dimension-xl)}.pds-divider--offset-xl.pds-divider--vertical{margin:calc(var(--pine-dimension-xl) * -1) 0;padding:var(--pine-dimension-xl) 0}.pds-divider--offset-xl.pds-divider--labeled{padding:0}.pds-divider--offset-xxl{margin:0 calc(var(--pine-dimension-2xl) * -1);padding:0 var(--pine-dimension-2xl)}.pds-divider--offset-xxl.pds-divider--vertical{margin:calc(var(--pine-dimension-2xl) * -1) 0;padding:var(--pine-dimension-2xl) 0}.pds-divider--offset-xxl.pds-divider--labeled{padding:0}@media (max-width: 767px){.pds-divider--vertical{display:none}}'}},[1,"pds-divider",{componentId:[1,"component-id"],label:[1],offset:[1],vertical:[4]}]),a=r,p=function(){"undefined"!=typeof customElements&&["pds-divider"].forEach((i=>{"pds-divider"===i&&(customElements.get(n(i))||customElements.define(n(i),r))}))};export{a as PdsDivider,p as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as n,transformTag as o}from"@stencil/core/internal/client";import{u as d}from"./reconnected-content.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){d(this.el.querySelector(".pds-drawer-content"),".pds-drawer-content")}render(){return n("div",{key:"432db626c93ab42365ec1af83562eec7ae1c4674",class:"pds-drawer-content"},n("slot",{key:"901ab074f31726023add709a4953bddb43842de2"}))}get el(){return this}static get style(){return"pds-drawer-content{display:block;-ms-flex:1 1 auto;flex:1 1 auto;min-height:0;width:100%}.pds-drawer-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:100%;padding:var(--pine-dimension-md);width:100%}.pds-modal--scrollable pds-drawer-content{overflow-y:auto}.pds-modal:not(.pds-modal--scrollable) pds-drawer-content{overflow-y:visible}"}},[260,"pds-drawer-content"]),s=r,c=function(){"undefined"!=typeof customElements&&["pds-drawer-content"].forEach((e=>{"pds-drawer-content"===e&&(customElements.get(o(e))||customElements.define(o(e),r))}))};export{s as PdsDrawerContent,c as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as n,transformTag as o}from"@stencil/core/internal/client";import{u as d}from"./reconnected-content.js";const r=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){d(this.el.querySelector(".pds-drawer-content"),".pds-drawer-content")}render(){return n("div",{key:"b4b41258eccaae8e0a9df90a75fb30d65a7ac9c4",class:"pds-drawer-content"},n("slot",{key:"ef90ed5b3f84b51a2938e1d8fd021b971c1c0de9"}))}get el(){return this}static get style(){return"pds-drawer-content{display:block;-ms-flex:1 1 auto;flex:1 1 auto;min-height:0;width:100%}.pds-drawer-content{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:100%;padding:var(--pine-dimension-md);width:100%}.pds-modal--scrollable pds-drawer-content{overflow-y:auto}.pds-modal:not(.pds-modal--scrollable) pds-drawer-content{overflow-y:visible}"}},[260,"pds-drawer-content"]),s=r,c=function(){"undefined"!=typeof customElements&&["pds-drawer-content"].forEach((e=>{"pds-drawer-content"===e&&(customElements.get(o(e))||customElements.define(o(e),r))}))};export{s as PdsDrawerContent,c as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as r,h as o,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const d=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__footer"),".pds-drawer__footer")}render(){return o("footer",{key:"71cb35f7b1ccba9e4187eb8942771741f13510dc",class:"pds-drawer__footer"},o("slot",{key:"28927c76ee8194c44f416ee5d4e9ea2e0376bf5a"}))}get el(){return this}static get style(){return"pds-drawer-footer{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__footer{-webkit-border-before:1px solid var(--pine-color-border-subtle);border-block-start:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-sm);-ms-flex-pack:end;justify-content:flex-end;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-footer"]),n=d,i=function(){"undefined"!=typeof customElements&&["pds-drawer-footer"].forEach((e=>{"pds-drawer-footer"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))};export{n as PdsDrawerFooter,i as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as r,h as o,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const d=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__footer"),".pds-drawer__footer")}render(){return o("footer",{key:"383f7cb7a95a71bd03b2e328cd4b41117e17c631",class:"pds-drawer__footer"},o("slot",{key:"e9e9b6c7fef502c8004223bc8611e8d798ecb966"}))}get el(){return this}static get style(){return"pds-drawer-footer{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__footer{-webkit-border-before:1px solid var(--pine-color-border-subtle);border-block-start:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-sm);-ms-flex-pack:end;justify-content:flex-end;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-footer"]),n=d,i=function(){"undefined"!=typeof customElements&&["pds-drawer-footer"].forEach((e=>{"pds-drawer-footer"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))};export{n as PdsDrawerFooter,i as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as r,h as d,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const o=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__header"),".pds-drawer__header")}render(){return d("header",{key:"48d0585e0e20c9d3142635f0fc0184c0803413b8",class:"pds-drawer__header"},d("slot",{key:"14d9d0bde0116c81892140b22a2b6e9a2b1d969f"}))}get el(){return this}static get style(){return"pds-drawer-header{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__header{-ms-flex-align:center;align-items:center;-webkit-border-after:1px solid var(--pine-color-border-subtle);border-block-end:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-header"]),n=o,a=function(){"undefined"!=typeof customElements&&["pds-drawer-header"].forEach((e=>{"pds-drawer-header"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))};export{n as PdsDrawerHeader,a as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as r,h as d,transformTag as t}from"@stencil/core/internal/client";import{u as s}from"./reconnected-content.js";const o=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost()}componentDidRender(){s(this.el.querySelector(".pds-drawer__header"),".pds-drawer__header")}render(){return d("header",{key:"5524b12af7c07d322ebd6726bd1a28320a838e77",class:"pds-drawer__header"},d("slot",{key:"8212060c5c48a53d05d320bb625ce2b6dce7c6c3"}))}get el(){return this}static get style(){return"pds-drawer-header{display:block;-ms-flex:0 0 auto;flex:0 0 auto;width:100%}.pds-drawer__header{-ms-flex-align:center;align-items:center;-webkit-border-after:1px solid var(--pine-color-border-subtle);border-block-end:1px solid var(--pine-color-border-subtle);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:var(--pine-dimension-md);width:100%}"}},[260,"pds-drawer-header"]),n=o,a=function(){"undefined"!=typeof customElements&&["pds-drawer-header"].forEach((e=>{"pds-drawer-header"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))};export{n as PdsDrawerHeader,a as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as d,HTMLElement as s,createEvent as e,h as r,Host as t,transformTag as a}from"@stencil/core/internal/client";import{u as o}from"./reconnected-content.js";import{d as p}from"./pds-modal2.js";const i=d(class extends s{constructor(d){super(),!1!==d&&this.__registerHost(),this.pdsDrawerOpen=e(this,"pdsDrawerOpen",7),this.pdsDrawerClose=e(this,"pdsDrawerClose",7),this.open=!1,this.side="end",this.size="md",this.scrollable=!0,this.lightDismiss=!0,this.initialFocus="auto"}componentDidRender(){o(this.el.querySelector("pds-modal.pds-drawer__modal .pds-modal"),"pds-modal.pds-drawer__modal",".pds-modal")}handleModalClose(d){d.target===this.modalEl&&(this.open=!1,this.pdsDrawerClose.emit())}handleModalOpen(d){d.target===this.modalEl&&this.pdsDrawerOpen.emit()}handleOutsidePointerDown(d){if(!this.lightDismiss||!this.open)return;const s=d.target;s&&(this.el.contains(s)||s.closest(".pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal")||s.closest("pds-modal")||(this.open=!1))}render(){return r(t,{key:"66e16ca7704243e8bb98002f042fa073ec43c38b",class:{"pds-drawer":!0,["pds-drawer--"+this.side]:!0,["pds-drawer--"+this.size]:!0}},r("pds-modal",{key:"b52b8cb1892d52113920ab27344d9a969e6365b6",class:"pds-drawer__modal",ref:d=>this.modalEl=d,componentId:this.componentId,open:this.open,scrollable:this.scrollable,disableTopLayer:!0,backdropDismiss:this.lightDismiss,disableInitialFocus:"none"===this.initialFocus},r("slot",{key:"c9ce43ca12a06c550bd130a0fa7572dec22c9c92"})))}get el(){return this}static get style(){return".pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch;background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}"}},[260,"pds-drawer",{componentId:[1,"component-id"],open:[1028],side:[1],size:[1],scrollable:[4],lightDismiss:[4,"light-dismiss"],initialFocus:[1,"initial-focus"]},[[0,"pdsModalClose","handleModalClose"],[0,"pdsModalOpen","handleModalOpen"],[5,"pointerdown","handleOutsidePointerDown"]]]),n=i,l=function(){"undefined"!=typeof customElements&&["pds-drawer","pds-modal"].forEach((d=>{switch(d){case"pds-drawer":customElements.get(a(d))||customElements.define(a(d),i);break;case"pds-modal":customElements.get(a(d))||p()}}))};export{n as PdsDrawer,l as defineCustomElement}
1
+ import{proxyCustomElement as d,HTMLElement as s,createEvent as e,h as r,Host as t,transformTag as a}from"@stencil/core/internal/client";import{c as o,a as p}from"./closest.js";import{u as i}from"./reconnected-content.js";import{d as n}from"./pds-modal2.js";const l=".pds-popover, .pds-tooltip, .pds-combobox-dropdown-portal",c=d(class extends s{constructor(d){super(),!1!==d&&this.__registerHost(),this.pdsDrawerOpen=e(this,"pdsDrawerOpen",7),this.pdsDrawerClose=e(this,"pdsDrawerClose",7),this.open=!1,this.side="end",this.size="md",this.scrollable=!0,this.lightDismiss=!0,this.initialFocus="auto"}componentDidRender(){i(this.el.querySelector("pds-modal.pds-drawer__modal .pds-modal"),"pds-modal.pds-drawer__modal",".pds-modal")}handleModalClose(d){d.target===this.modalEl&&(this.open=!1,this.pdsDrawerClose.emit())}handleModalOpen(d){d.target===this.modalEl&&this.pdsDrawerOpen.emit()}handleOutsidePointerDown(d){if(!this.lightDismiss||!this.open)return;const s=d.target;if(!s)return;if(this.el.contains(s))return;if(s.closest(l))return;const e=s.closest(".pds-datepicker-calendar-portal"),r=null==e?void 0:e.pdsDatepicker;r&&(o(this.el,r)||p(l,r))||s.closest("pds-modal")||(this.open=!1)}render(){return r(t,{key:"0ca6f9e5c49323c0b72c6338ecd172262afdd999",class:{"pds-drawer":!0,["pds-drawer--"+this.side]:!0,["pds-drawer--"+this.size]:!0}},r("pds-modal",{key:"5b87fdc3aaedaa7cc7efe43482314dae8621d8c6",class:"pds-drawer__modal",ref:d=>this.modalEl=d,componentId:this.componentId,open:this.open,scrollable:this.scrollable,disableTopLayer:!0,backdropDismiss:this.lightDismiss,disableInitialFocus:"none"===this.initialFocus},r("slot",{key:"dde3adec14308881defd57f75df9393bf9f9f48f"})))}get el(){return this}static get style(){return".pds-drawer__modal>.pds-modal__backdrop{-ms-flex-align:stretch;align-items:stretch;background-color:transparent;pointer-events:none}@supports ((-webkit-backdrop-filter: blur(3px)) or (backdrop-filter: blur(3px))){.pds-drawer__modal>.pds-modal__backdrop{-webkit-backdrop-filter:none;backdrop-filter:none}}.pds-drawer__modal>.pds-modal__backdrop[aria-modal]::before{content:none}.pds-drawer__modal>.pds-modal__backdrop>.pds-modal{border-radius:0;height:100%;margin:0;max-height:100%;max-width:100%;pointer-events:auto;width:var(--pds-drawer-width, 500px)}.pds-drawer{display:contents}.pds-drawer.pds-drawer--end .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:end;justify-content:flex-end}.pds-drawer.pds-drawer--start .pds-drawer__modal>.pds-modal__backdrop{-ms-flex-pack:start;justify-content:flex-start}.pds-drawer.pds-drawer--sm{--pds-drawer-width:360px}.pds-drawer.pds-drawer--md{--pds-drawer-width:500px}"}},[260,"pds-drawer",{componentId:[1,"component-id"],open:[1028],side:[1],size:[1],scrollable:[4],lightDismiss:[4,"light-dismiss"],initialFocus:[1,"initial-focus"]},[[0,"pdsModalClose","handleModalClose"],[0,"pdsModalOpen","handleModalOpen"],[5,"pointerdown","handleOutsidePointerDown"]]]),m=c,h=function(){"undefined"!=typeof customElements&&["pds-drawer","pds-modal"].forEach((d=>{switch(d){case"pds-drawer":customElements.get(a(d))||customElements.define(a(d),c);break;case"pds-modal":customElements.get(a(d))||n()}}))};export{m as PdsDrawer,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as o,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./pds-icon2.js";import{d}from"./pds-link2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsClick=n(this,"pdsClick",7),this.destructive=!1,this.disabled=!1,this.external=!1,this.hasFocus=!1,this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleKeyDown=e=>{this.disabled||"Enter"!==e.key||(this.href||e.preventDefault(),this.handleClick())}}async clickItem(){this.handleClick()}handleClick(){var e;const t=Array.from(this.host.parentNode.children).filter((e=>"pds-dropdown-menu-item"===e.tagName.toLowerCase())).indexOf(this.host),n=(null===(e=this.host.textContent)||void 0===e?void 0:e.trim())||"";this.pdsClick.emit({itemIndex:t,item:this.host,content:n})}renderElement(){return void 0!==this.href?o("pds-link",{download:this.download,href:this.disabled?null:this.href,external:this.external,target:this.target,class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":this.disabled?"true":null},o("slot",null)):o("button",{class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,type:"button",part:"button",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:this.disabled,"aria-disabled":this.disabled?"true":null},o("slot",null))}render(){return o(i,{key:"2fd3c925ba2f1ead6d0a23c44ac87449e8dad521",id:this.componentId,class:{"is-disabled":this.disabled,destructive:!this.disabled&&this.destructive},onClick:()=>!this.disabled&&this.handleClick(),role:"none",tabIndex:-1,"aria-disabled":this.disabled?"true":null},this.renderElement())}get host(){return this}static get style(){return":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}"}},[257,"pds-dropdown-menu-item",{componentId:[1,"component-id"],destructive:[4],disabled:[516],download:[1],href:[1],external:[516],target:[513],hasFocus:[32],clickItem:[64]}]),l=a,c=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-item","pds-icon","pds-link"].forEach((e=>{switch(e){case"pds-dropdown-menu-item":customElements.get(s(e))||customElements.define(s(e),a);break;case"pds-icon":customElements.get(s(e))||r();break;case"pds-link":customElements.get(s(e))||d()}}))};export{l as PdsDropdownMenuItem,c as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,createEvent as n,h as o,Host as i,transformTag as s}from"@stencil/core/internal/client";import{d as r}from"./pds-icon2.js";import{d}from"./pds-link2.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsClick=n(this,"pdsClick",7),this.destructive=!1,this.disabled=!1,this.external=!1,this.hasFocus=!1,this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleKeyDown=e=>{this.disabled||"Enter"!==e.key||(this.href||e.preventDefault(),this.handleClick())}}async clickItem(){this.handleClick()}handleClick(){var e;const t=Array.from(this.host.parentNode.children).filter((e=>"pds-dropdown-menu-item"===e.tagName.toLowerCase())).indexOf(this.host),n=(null===(e=this.host.textContent)||void 0===e?void 0:e.trim())||"";this.pdsClick.emit({itemIndex:t,item:this.host,content:n})}renderElement(){return void 0!==this.href?o("pds-link",{download:this.download,href:this.disabled?null:this.href,external:this.external,target:this.target,class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,"aria-disabled":this.disabled?"true":null},o("slot",null)):o("button",{class:{"pds-dropdown-menu-item__content":!0,"has-focus":this.hasFocus},tabIndex:this.disabled?-1:0,type:"button",part:"button",onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,disabled:this.disabled,"aria-disabled":this.disabled?"true":null},o("slot",null))}render(){return o(i,{key:"cf22f97df3869d59820ba0deff9a21bfee2628b8",id:this.componentId,class:{"is-disabled":this.disabled,destructive:!this.disabled&&this.destructive},onClick:()=>!this.disabled&&this.handleClick(),role:"none",tabIndex:-1,"aria-disabled":this.disabled?"true":null},this.renderElement())}get host(){return this}static get style(){return":host{cursor:pointer;display:-ms-flexbox;display:flex;width:100%;}:host(.is-disabled){cursor:not-allowed !important;opacity:0.5 !important}:host(.is-disabled) .pds-dropdown-menu-item__content{cursor:not-allowed !important;pointer-events:none !important}.pds-dropdown-menu-item__content{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs);color:var(--pine-color-text);display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium);gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px);padding:var(--pine-dimension-xs);text-align:start;width:100%;}.pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-background-muted);color:var(--pine-color-text-hover)}.pds-dropdown-menu-item__content{}.pds-dropdown-menu-item__content:focus,.pds-dropdown-menu-item__content:focus-visible,.pds-dropdown-menu-item__content.has-focus{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}:host(.destructive) .pds-dropdown-menu-item__content{--pds-context-link-color:var(--pine-color-danger);--pds-context-link-color-hover:var(--pine-color-danger-hover);-ms-flex-align:center;align-items:center;color:var(--pine-color-danger)}:host(.destructive) .pds-dropdown-menu-item__content:hover{background-color:var(--pine-color-danger-disabled);color:var(--pine-color-danger-hover)}:host(.destructive) .pds-dropdown-menu-item__content:focus,:host(.destructive) .pds-dropdown-menu-item__content:focus-visible,:host(.destructive) .pds-dropdown-menu-item__content.has-focus{background-color:var(--pine-color-danger-disabled);outline:var(--pine-outline-focus-danger);outline-offset:var(--pine-border-width)}pds-link::part(link):focus,pds-link::part(link):focus-visible{-webkit-box-shadow:none;box-shadow:none;outline:none}pds-link::part(link){-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);margin:calc(var(--pine-dimension-xs) * -1);padding:var(--pine-dimension-xs);text-decoration:none;width:calc(100% + var(--pine-dimension-xs) * 2)}"}},[257,"pds-dropdown-menu-item",{componentId:[1,"component-id"],destructive:[4],disabled:[516],download:[1],href:[1],external:[516],target:[513],hasFocus:[32],clickItem:[64]}]),l=a,c=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-item","pds-icon","pds-link"].forEach((e=>{switch(e){case"pds-dropdown-menu-item":customElements.get(s(e))||customElements.define(s(e),a);break;case"pds-icon":customElements.get(s(e))||r();break;case"pds-link":customElements.get(s(e))||d()}}))};export{l as PdsDropdownMenuItem,c as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as n,h as r,Host as o,transformTag as t}from"@stencil/core/internal/client";const s=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.disabled=!1}render(){return r(o,{key:"f55fc3b23a6ccb94a7ce865189e5d65abdd97d8c",id:this.componentId},r("hr",{key:"784a1480881a27aec69c0a2b0afd06f103912544"}))}static get style(){return":host hr{border:0;border-top:var(--pine-border-width-thin) solid var(--pine-color-border);height:0;margin-block:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1)}"}},[1,"pds-dropdown-menu-separator",{componentId:[1,"component-id"],disabled:[4]}]),d=s,i=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-separator"].forEach((e=>{"pds-dropdown-menu-separator"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))};export{d as PdsDropdownMenuSeparator,i as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as n,h as r,Host as d,transformTag as o}from"@stencil/core/internal/client";const t=e(class extends n{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.disabled=!1}render(){return r(d,{key:"63bd5fd3112b1030d1e86b331a659ab3a92dd387",id:this.componentId},r("hr",{key:"0a8504d34a9b91db03abdddd86ce918c00534410"}))}static get style(){return":host hr{border:0;border-top:var(--pine-border-width-thin) solid var(--pine-color-border);height:0;margin-block:var(--pine-dimension-xs);margin-inline:calc(var(--pine-dimension-xs) * -1)}"}},[1,"pds-dropdown-menu-separator",{componentId:[1,"component-id"],disabled:[4]}]),s=t,i=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu-separator"].forEach((e=>{"pds-dropdown-menu-separator"===e&&(customElements.get(o(e))||customElements.define(o(e),t))}))};export{s as PdsDropdownMenuSeparator,i as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as i,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";import{a as o,c as d,o as r,f as a,s as h}from"./floating-ui.dom.js";import{d as l}from"./pds-box2.js";const p=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isOpen=!1,this.menuItems=[],this.cleanupAutoUpdate=null,this.currentFocusIndex=-1,this.placement="bottom-start",this.handleTriggerSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements();this.triggerEl=i[0],this.triggerEl.onclick=this.handleClick,this.triggerEl.setAttribute("aria-haspopup","menu"),this.triggerEl.setAttribute("aria-expanded","false")},this.handleSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements(),e=["pds-dropdown-menu-item","pds-dropdown-menu-separator","a","button"],s=i.filter((t=>!e.includes(t.tagName.toLowerCase())));if(s.length>0){const t=s.map((t=>t.tagName.toLowerCase())).join(", ");console.warn(`pds-dropdown-menu: Unexpected element(s) found: ${t}. Expected: `+e.join(", "))}this.menuItems=i.filter((t=>{const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"a"===i||"button"===i}))},this.toggleDropdown=()=>{this.isOpen=!this.isOpen,this.isOpen?this.openDropdown():this.closeDropdown()},this.openDropdown=()=>{var t;const i=()=>{d(this.triggerEl,this.panelEl,{placement:this.placement,strategy:"fixed",middleware:[r(6),a(),h({padding:5})]}).then((({x:t,y:i})=>{Object.assign(this.panelEl.style,{left:t+"px",top:i+"px"})}))};i(),this.cleanupAutoUpdate=o(this.triggerEl,this.panelEl,i),null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.remove("is-hidden"),this.isOpen=!0,this.triggerEl.setAttribute("aria-expanded","true")},this.closeDropdown=()=>{var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.add("is-hidden"),this.isOpen=!1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.triggerEl.setAttribute("aria-expanded","false"),this.currentFocusIndex=-1,this.triggerEl.focus()},this.handleClick=()=>{this.toggleDropdown()}}componentDidRender(){var t;this.panelEl=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("pds-box")}disconnectedCallback(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}isItemDisabled(t){const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"button"===i?t.disabled:"a"===i&&"true"===t.getAttribute("aria-disabled")}getFocusedItemIndex(){const t=document.activeElement;return t?this.menuItems.findIndex((i=>{if(i===t)return!0;if("pds-dropdown-menu-item"===i.tagName.toLowerCase()){const e=i.shadowRoot;if(null==e?void 0:e.contains(t))return!0}return!1})):-1}focusItemByIndex(t){var i,e,s,n,o;if(t>=0&&t<this.menuItems.length){this.currentFocusIndex=t;const d=this.menuItems[t];if("pds-dropdown-menu-item"===d.tagName.toLowerCase()){const t=d,r=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("button"),a=(null===(n=null===(s=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("pds-link"))||void 0===s?void 0:s.shadowRoot)||void 0===n?void 0:n.querySelector("a"))||(null===(o=t.shadowRoot)||void 0===o?void 0:o.querySelector("a"));r?r.focus():a?a.focus():t.focus()}else d.focus()}}focusNextItem(){let t=(this.currentFocusIndex+1)%this.menuItems.length,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=(t+1)%this.menuItems.length,i++;i<e&&this.focusItemByIndex(t)}focusPreviousItem(){let t=this.currentFocusIndex<=0?this.menuItems.length-1:this.currentFocusIndex-1,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=t<=0?this.menuItems.length-1:t-1,i++;i<e&&this.focusItemByIndex(t)}handleKeyDown(t){if(this.isOpen)switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusNextItem();break;case"ArrowUp":t.preventDefault(),this.focusPreviousItem();break;case"Home":if(t.preventDefault(),this.menuItems.length>0){let t=0;for(;t<this.menuItems.length&&this.isItemDisabled(this.menuItems[t]);)t++;t<this.menuItems.length&&this.focusItemByIndex(t)}break;case"End":if(t.preventDefault(),this.menuItems.length>0){let t=this.menuItems.length-1;for(;t>=0&&this.isItemDisabled(this.menuItems[t]);)t--;t>=0&&this.focusItemByIndex(t)}break;case"Tab":if(t.shiftKey)this.getFocusedItemIndex()>0&&(t.preventDefault(),this.focusPreviousItem());else{const i=document.activeElement===this.triggerEl,e=this.getFocusedItemIndex();if(i&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else if(-1===e&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else-1!==e&&(t.preventDefault(),this.focusNextItem())}}}handleWindowClick(t){this.isOpen&&!this.host.contains(t.target)&&t.target!==this.triggerEl&&this.closeDropdown()}render(){return e(s,{key:"7907da6a04530d01bbbd0256f0b609fa53e0a774",id:this.componentId},e("slot",{key:"2bf060c4dec082d4175a7cde759221fd4b20d706",name:"trigger",onSlotchange:this.handleTriggerSlotChange}),e("pds-box",{key:"0d81eddee58fda631eb6a39cba0e7ad0d69c02d8","border-radius":"sm",display:"flex",direction:"column",class:"pds-dropdown-menu--panel is-hidden",shadow:"100",role:"menu","aria-orientation":"vertical",part:"menu-panel"},e("slot",{key:"831485d66af711edc9491078827455762795bb64",onSlotchange:this.handleSlotChange})))}get host(){return this}static get style(){return":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}::slotted(a),::slotted(button){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]),::slotted([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.5;pointer-events:none}"}},[257,"pds-dropdown-menu",{componentId:[1,"component-id"],placement:[1],currentFocusIndex:[32]},[[8,"keydown","handleKeyDown"],[8,"click","handleWindowClick"]]]),c=p,m=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu","pds-box"].forEach((t=>{switch(t){case"pds-dropdown-menu":customElements.get(n(t))||customElements.define(n(t),p);break;case"pds-box":customElements.get(n(t))||l()}}))};export{c as PdsDropdownMenu,m as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as i,h as e,Host as s,transformTag as n}from"@stencil/core/internal/client";import{a as o,c as d,o as r,f as a,s as h}from"./floating-ui.dom.js";import{d as l}from"./pds-box2.js";const p=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isOpen=!1,this.menuItems=[],this.cleanupAutoUpdate=null,this.currentFocusIndex=-1,this.placement="bottom-start",this.handleTriggerSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements();this.triggerEl=i[0],this.triggerEl.onclick=this.handleClick,this.triggerEl.setAttribute("aria-haspopup","menu"),this.triggerEl.setAttribute("aria-expanded","false")},this.handleSlotChange=t=>{this.slotEl=t.target;const i=this.slotEl.assignedElements(),e=["pds-dropdown-menu-item","pds-dropdown-menu-separator","a","button"],s=i.filter((t=>!e.includes(t.tagName.toLowerCase())));if(s.length>0){const t=s.map((t=>t.tagName.toLowerCase())).join(", ");console.warn(`pds-dropdown-menu: Unexpected element(s) found: ${t}. Expected: `+e.join(", "))}this.menuItems=i.filter((t=>{const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"a"===i||"button"===i}))},this.toggleDropdown=()=>{this.isOpen=!this.isOpen,this.isOpen?this.openDropdown():this.closeDropdown()},this.openDropdown=()=>{var t;const i=()=>{d(this.triggerEl,this.panelEl,{placement:this.placement,strategy:"fixed",middleware:[r(6),a(),h({padding:5})]}).then((({x:t,y:i})=>{Object.assign(this.panelEl.style,{left:t+"px",top:i+"px"})}))};i(),this.cleanupAutoUpdate=o(this.triggerEl,this.panelEl,i),null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.remove("is-hidden"),this.isOpen=!0,this.triggerEl.setAttribute("aria-expanded","true")},this.closeDropdown=()=>{var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelector("pds-box").classList.add("is-hidden"),this.isOpen=!1,this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null),this.triggerEl.setAttribute("aria-expanded","false"),this.currentFocusIndex=-1,this.isFocusInMenu()&&this.triggerEl.focus()},this.handleClick=()=>{this.toggleDropdown()}}componentDidRender(){var t;this.panelEl=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("pds-box")}disconnectedCallback(){this.cleanupAutoUpdate&&(this.cleanupAutoUpdate(),this.cleanupAutoUpdate=null)}isFocusInMenu(){const t=this.host.getRootNode().activeElement;return null!=t&&this.host.contains(t)}isItemDisabled(t){const i=t.tagName.toLowerCase();return"pds-dropdown-menu-item"===i||"button"===i?t.disabled:"a"===i&&"true"===t.getAttribute("aria-disabled")}getFocusedItemIndex(){const t=document.activeElement;return t?this.menuItems.findIndex((i=>{if(i===t)return!0;if("pds-dropdown-menu-item"===i.tagName.toLowerCase()){const e=i.shadowRoot;if(null==e?void 0:e.contains(t))return!0}return!1})):-1}focusItemByIndex(t){var i,e,s,n,o;if(t>=0&&t<this.menuItems.length){this.currentFocusIndex=t;const d=this.menuItems[t];if("pds-dropdown-menu-item"===d.tagName.toLowerCase()){const t=d,r=null===(i=t.shadowRoot)||void 0===i?void 0:i.querySelector("button"),a=(null===(n=null===(s=null===(e=t.shadowRoot)||void 0===e?void 0:e.querySelector("pds-link"))||void 0===s?void 0:s.shadowRoot)||void 0===n?void 0:n.querySelector("a"))||(null===(o=t.shadowRoot)||void 0===o?void 0:o.querySelector("a"));r?r.focus():a?a.focus():t.focus()}else d.focus()}}focusNextItem(){let t=(this.currentFocusIndex+1)%this.menuItems.length,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=(t+1)%this.menuItems.length,i++;i<e&&this.focusItemByIndex(t)}focusPreviousItem(){let t=this.currentFocusIndex<=0?this.menuItems.length-1:this.currentFocusIndex-1,i=0;const e=this.menuItems.length;for(;i<e&&this.isItemDisabled(this.menuItems[t]);)t=t<=0?this.menuItems.length-1:t-1,i++;i<e&&this.focusItemByIndex(t)}handleKeyDown(t){if(this.isOpen)switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusNextItem();break;case"ArrowUp":t.preventDefault(),this.focusPreviousItem();break;case"Home":if(t.preventDefault(),this.menuItems.length>0){let t=0;for(;t<this.menuItems.length&&this.isItemDisabled(this.menuItems[t]);)t++;t<this.menuItems.length&&this.focusItemByIndex(t)}break;case"End":if(t.preventDefault(),this.menuItems.length>0){let t=this.menuItems.length-1;for(;t>=0&&this.isItemDisabled(this.menuItems[t]);)t--;t>=0&&this.focusItemByIndex(t)}break;case"Tab":if(t.shiftKey)this.getFocusedItemIndex()>0&&(t.preventDefault(),this.focusPreviousItem());else{const i=document.activeElement===this.triggerEl,e=this.getFocusedItemIndex();if(i&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else if(-1===e&&this.menuItems.length>0){t.preventDefault();let i=0;for(;i<this.menuItems.length&&this.isItemDisabled(this.menuItems[i]);)i++;i<this.menuItems.length&&this.focusItemByIndex(i)}else-1!==e&&(t.preventDefault(),this.focusNextItem())}}}handleWindowClick(t){this.isOpen&&!this.host.contains(t.target)&&t.target!==this.triggerEl&&this.closeDropdown()}render(){return e(s,{key:"a49d859ea4b881c025620b3bad3157af8ceceb36",id:this.componentId},e("slot",{key:"2669398c6b6f0ad4037ba34695b0880afa4c69b9",name:"trigger",onSlotchange:this.handleTriggerSlotChange}),e("pds-box",{key:"e2a6d7892bfe4ead980df8f702e5387e62d6bd05","border-radius":"sm",display:"flex",direction:"column",class:"pds-dropdown-menu--panel is-hidden",shadow:"100",role:"menu","aria-orientation":"vertical",part:"menu-panel"},e("slot",{key:"70fa9b2ac96f528ae0ebd28486b5a934fb705413",onSlotchange:this.handleSlotChange})))}get host(){return this}static get style(){return":host{display:block}.is-hidden{display:none}.pds-dropdown-menu--panel{background-color:var(--pine-color-background-overlay);border-radius:var(--pine-dimension-xs);left:var(--pine-dimension-none);min-width:170px;padding:var(--pine-dimension-xs);position:fixed;z-index:var(--pine-z-index-overlay)}:host-context([data-theme=dark]) .pds-dropdown-menu--panel{border:var(--pine-border)}::slotted(a),::slotted(button){-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--pine-dimension-xs) !important;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text) !important;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font:var(--pine-typography-body-medium) !important;gap:var(--pine-dimension-xs);margin:calc(var(--pine-border-width) + 2px) !important;padding:var(--pine-dimension-xs) !important;text-align:start;text-decoration:none !important;width:calc(100% - (var(--pine-border-width) + 2px) * 2)}::slotted(.destructive){color:var(--pine-color-danger) !important}::slotted([aria-disabled=true]),::slotted([disabled]:not([disabled=false])){cursor:not-allowed;opacity:0.5;pointer-events:none}"}},[257,"pds-dropdown-menu",{componentId:[1,"component-id"],placement:[1],currentFocusIndex:[32]},[[8,"keydown","handleKeyDown"],[8,"click","handleWindowClick"]]]),c=p,u=function(){"undefined"!=typeof customElements&&["pds-dropdown-menu","pds-box"].forEach((t=>{switch(t){case"pds-dropdown-menu":customElements.get(n(t))||customElements.define(n(t),p);break;case"pds-box":customElements.get(n(t))||l()}}))};export{c as PdsDropdownMenu,u as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a as s}from"./scroll.js";import{t as a,g as l}from"./index2.js";import{d as p}from"./pds-icon2.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsFilterOpen=t(this,"pdsFilterOpen",7),this.pdsFilterClose=t(this,"pdsFilterClose",7),this.pdsFilterClear=t(this,"pdsFilterClear",7),this.scrollRAF=null,this.lastScrollTime=0,this.variant="default",this.isOpen=!1,this.handleNativePopoverToggle=e=>{const i=e.target;if(i&&i.id===this.componentId+"-popover"){let e=!1;try{e=i.matches(":popover-open")}catch(t){e="block"===i.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}},this.handleKeyDown=e=>{"clear"!==this.variant||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},this.handleClick=e=>{"clear"!==this.variant?(this.closeOtherPopovers(),i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")||(e&&e.preventDefault(),setTimeout((()=>{null!=this.popoverEl&&(this.isOpen=!this.isOpen,this.isOpen?(this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open"),this.adjustPopoverPosition(),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open"),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})))}),0))):this.pdsFilterClear.emit({componentId:this.componentId,text:this.text})}}disconnectedCallback(){if(this.scrollRAF&&(cancelAnimationFrame(this.scrollRAF),this.scrollRAF=null),this.lastScrollTime=0,this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.isOpen&&this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}componentDidRender(){this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&(this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.popoverEl.addEventListener("toggle",this.handleNativePopoverToggle))}handleWindowResize(){this.isOpen&&setTimeout((()=>this.adjustPopoverPosition()),16)}handleWindowScroll(){if(this.isOpen){const e="anchorName"in document.documentElement.style,i=performance.now();if(i-this.lastScrollTime<(e?66:33))return;this.lastScrollTime=i,this.scrollRAF&&cancelAnimationFrame(this.scrollRAF),this.scrollRAF=requestAnimationFrame((()=>{this.isOpen&&this.popoverEl&&this.el.isConnected&&this.adjustPopoverPosition(),this.scrollRAF=null}))}}closeOtherPopovers(){document.querySelectorAll("pds-filter").forEach((e=>{var i;if(e===this.el)return;const t=null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(".pds-filter__popover");if(t){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}if(e)try{t.hidePopover()}catch(e){t.style.display="none",t.classList.remove("is-open")}}}))}adjustPopoverPosition(){var e;if(!this.popoverEl||"clear"===this.variant)return;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".pds-filter__trigger");if(!i)return;const t=i.getBoundingClientRect(),r=window.innerWidth,o=window.innerHeight,n="anchorName"in document.documentElement.style,a=228,l=this.popoverEl.getBoundingClientRect().height||200,p=s(this.el),c=p?t.right-a-20<0:t.left+a+20>r,d=t.bottom+8+l+20>o;if(n)this.popoverEl.classList.remove("popover-flip-horizontal","popover-flip-vertical"),c&&this.popoverEl.classList.add("popover-flip-horizontal"),d&&this.popoverEl.classList.add("popover-flip-vertical");else{let e=p?t.right-a:t.left,i=t.bottom+8,r=p?"top right":"top left";if(c){const i=this.popoverEl.getBoundingClientRect().width||a;e=p?t.left:t.right-i,r=p?"top left":"top right"}d&&(i=t.top-l-8,r=r.replace("top","bottom")),this.popoverEl.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${i}px;\n z-index: var(--pine-z-index-overlay);\n transform-origin: ${r};\n `}}async showFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.showPopover()}catch(e){this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open")}}else console.warn("Clear variant does not support showFilter method")}async hideFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}else console.warn("Clear variant does not support hideFilter method")}handlePopoverToggle(e){const t=e.target;if((!i.prototype.showPopover||navigator.userAgent.includes("Firefox"))&&t&&t.id===this.componentId+"-popover"){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}}handleDocumentClick(e){!this.el.contains(e.target)&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}handleEscapeKey(e){"Escape"===e.key&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}getIcon(){return"clear"===this.variant?a:this.icon}getTriggerClasses(){const e=["pds-filter__trigger"];return e.push("pds-filter__trigger--"+this.variant),this.isOpen&&"clear"!==this.variant&&e.push("pds-filter__trigger--open"),e.join(" ")}renderIcon(){const e=this.getIcon();return null==e||""===e?null:r("pds-icon",{icon:e,size:"var(--pine-font-size-100)","aria-hidden":"true",part:"icon"})}renderDropdownIcon(){return"selected"===this.variant?r("pds-icon",{icon:l,size:"var(--pine-dimension-200)","aria-hidden":"true",class:"pds-filter__dropdown-icon",part:"icon"}):null}render(){return r(o,{key:"bd03de5e8461e3aba4d6f014e2d64d9aada0c0e1",id:this.componentId},r("button",{key:"f35cb4aec14b1ed3b61d33c412cbfc89ba19cba3",class:this.getTriggerClasses(),type:"button",popoverTarget:"clear"!==this.variant?this.componentId+"-popover":void 0,popoverTargetAction:"clear"!==this.variant?"toggle":void 0,onKeyDown:"clear"===this.variant?this.handleKeyDown:void 0,onClick:e=>this.handleClick(e),part:"button","aria-expanded":this.isOpen?"true":"false","aria-haspopup":"clear"!==this.variant?"true":void 0,"aria-controls":"clear"!==this.variant?this.componentId+"-popover":void 0},r("span",{key:"b3635542048ac52d290917260181d7313eddaff2",class:"pds-filter__button-content",part:"button-content"},this.renderIcon(),this.text&&r("span",{key:"0c5ef7f7655ddbee33a695703ce192f082b21bf1",class:"pds-filter__button-text",part:"button-text"},this.text),this.renderDropdownIcon())),"clear"!==this.variant&&r("div",{key:"e75c75d8e9e4596d7f0642e4e1f91deae3f2b9fa",ref:e=>this.popoverEl=e,id:this.componentId+"-popover",class:"pds-filter__popover",popover:"auto",part:"popover"},r("slot",{key:"bef66af716be823ed3ac36d39a4532785df07f6b"})))}get el(){return this}static get style(){return":host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:228px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}"}},[257,"pds-filter",{componentId:[1,"component-id"],variant:[1],icon:[1],text:[1],isOpen:[32],showFilter:[64],hideFilter:[64]},[[9,"resize","handleWindowResize"],[9,"scroll","handleWindowScroll"],[4,"toggle","handlePopoverToggle"],[4,"click","handleDocumentClick"],[4,"keydown","handleEscapeKey"]]]),d=c,h=function(){"undefined"!=typeof customElements&&["pds-filter","pds-icon"].forEach((e=>{switch(e){case"pds-filter":customElements.get(n(e))||customElements.define(n(e),c);break;case"pds-icon":customElements.get(n(e))||p()}}))};export{d as PdsFilter,h as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as i,createEvent as t,h as r,Host as o,transformTag as n}from"@stencil/core/internal/client";import{a as s}from"./scroll.js";import{t as l,g as a}from"./index2.js";import{d as p}from"./pds-icon2.js";const c=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsFilterOpen=t(this,"pdsFilterOpen",7),this.pdsFilterClose=t(this,"pdsFilterClose",7),this.pdsFilterClear=t(this,"pdsFilterClear",7),this.scrollRAF=null,this.lastScrollTime=0,this.variant="default",this.isOpen=!1,this.handleNativePopoverToggle=e=>{const i=e.target;if(i&&i.id===this.componentId+"-popover"){let e=!1;try{e=i.matches(":popover-open")}catch(t){e="block"===i.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}},this.handleKeyDown=e=>{"clear"!==this.variant||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick())},this.handleClick=e=>{"clear"!==this.variant?(this.closeOtherPopovers(),i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")||(e&&e.preventDefault(),setTimeout((()=>{null!=this.popoverEl&&(this.isOpen=!this.isOpen,this.isOpen?(this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open"),this.adjustPopoverPosition(),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open"),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})))}),0))):this.pdsFilterClear.emit({componentId:this.componentId,text:this.text})}}disconnectedCallback(){if(this.scrollRAF&&(cancelAnimationFrame(this.scrollRAF),this.scrollRAF=null),this.lastScrollTime=0,this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.isOpen&&this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}componentDidRender(){this.popoverEl&&i.prototype.showPopover&&!navigator.userAgent.includes("Firefox")&&(this.popoverEl.removeEventListener("toggle",this.handleNativePopoverToggle),this.popoverEl.addEventListener("toggle",this.handleNativePopoverToggle))}handleWindowResize(){this.isOpen&&setTimeout((()=>this.adjustPopoverPosition()),16)}handleWindowScroll(){if(this.isOpen){const e="anchorName"in document.documentElement.style,i=performance.now();if(i-this.lastScrollTime<(e?66:33))return;this.lastScrollTime=i,this.scrollRAF&&cancelAnimationFrame(this.scrollRAF),this.scrollRAF=requestAnimationFrame((()=>{this.isOpen&&this.popoverEl&&this.el.isConnected&&this.adjustPopoverPosition(),this.scrollRAF=null}))}}closeOtherPopovers(){document.querySelectorAll("pds-filter").forEach((e=>{var i;if(e===this.el)return;const t=null===(i=e.shadowRoot)||void 0===i?void 0:i.querySelector(".pds-filter__popover");if(t){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}if(e)try{t.hidePopover()}catch(e){t.style.display="none",t.classList.remove("is-open")}}}))}adjustPopoverPosition(){var e;if(!this.popoverEl||"clear"===this.variant)return;const i=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.querySelector(".pds-filter__trigger");if(!i)return;const t=i.getBoundingClientRect(),r=window.innerWidth,o=window.innerHeight,n="anchorName"in document.documentElement.style,l=228,a=this.popoverEl.getBoundingClientRect().height||200,p=s(this.el),c=p?t.right-l-20<0:t.left+l+20>r,d=t.bottom+8+a+20>o;if(n)this.popoverEl.classList.remove("popover-flip-horizontal","popover-flip-vertical"),c&&this.popoverEl.classList.add("popover-flip-horizontal"),d&&this.popoverEl.classList.add("popover-flip-vertical");else{let e=p?t.right-l:t.left,i=t.bottom+8,r=p?"top right":"top left";if(c){const i=this.popoverEl.getBoundingClientRect().width||l;e=p?t.left:t.right-i,r=p?"top left":"top right"}d&&(i=t.top-a-8,r=r.replace("top","bottom")),this.popoverEl.style.cssText=`\n position: fixed;\n left: ${e}px;\n top: ${i}px;\n z-index: var(--pine-z-index-overlay);\n transform-origin: ${r};\n `}}async showFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.showPopover()}catch(e){this.popoverEl.style.display="block",this.popoverEl.classList.add("is-open")}}else console.warn("Clear variant does not support showFilter method")}async hideFilter(){if("clear"!==this.variant){if(null!=this.popoverEl)try{this.popoverEl.hidePopover()}catch(e){this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")}}else console.warn("Clear variant does not support hideFilter method")}handlePopoverToggle(e){const t=e.target;if((!i.prototype.showPopover||navigator.userAgent.includes("Firefox"))&&t&&t.id===this.componentId+"-popover"){let e=!1;try{e=t.matches(":popover-open")}catch(i){e="block"===t.style.display}this.isOpen=e,this.isOpen?(setTimeout((()=>this.adjustPopoverPosition()),0),this.pdsFilterOpen.emit({componentId:this.componentId,variant:this.variant,text:this.text})):this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text})}}handleDocumentClick(e){!this.el.contains(e.target)&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}handleEscapeKey(e){"Escape"===e.key&&this.isOpen&&"clear"!==this.variant&&setTimeout((()=>{if(this.popoverEl&&this.isOpen){const e=i.prototype.showPopover&&!navigator.userAgent.includes("Firefox");let t=!1;if(e)try{t=!this.popoverEl.matches(":popover-open")}catch(e){t="block"!==this.popoverEl.style.display}else t=!0;t&&(this.isOpen=!1,e||(this.popoverEl.style.display="none",this.popoverEl.classList.remove("is-open")),this.pdsFilterClose.emit({componentId:this.componentId,variant:this.variant,text:this.text}))}}),0)}getIcon(){return"clear"===this.variant?l:this.icon}getTriggerClasses(){const e=["pds-filter__trigger"];return e.push("pds-filter__trigger--"+this.variant),this.isOpen&&"clear"!==this.variant&&e.push("pds-filter__trigger--open"),e.join(" ")}renderIcon(){const e=this.getIcon();return null==e||""===e?null:r("pds-icon",{icon:e,size:"var(--pine-font-size-100)","aria-hidden":"true",part:"icon"})}renderDropdownIcon(){return"selected"===this.variant?r("pds-icon",{icon:a,size:"var(--pine-dimension-200)","aria-hidden":"true",class:"pds-filter__dropdown-icon",part:"icon"}):null}render(){return r(o,{key:"4abb55453c9ab4cd49b21a23047aa5ee4ab70056",id:this.componentId},r("button",{key:"e6b6bd81ca3f9d23f490219cf8e81f0bdf511798",class:this.getTriggerClasses(),type:"button",popoverTarget:"clear"!==this.variant?this.componentId+"-popover":void 0,popoverTargetAction:"clear"!==this.variant?"toggle":void 0,onKeyDown:"clear"===this.variant?this.handleKeyDown:void 0,onClick:e=>this.handleClick(e),part:"button","aria-expanded":this.isOpen?"true":"false","aria-haspopup":"clear"!==this.variant?"true":void 0,"aria-controls":"clear"!==this.variant?this.componentId+"-popover":void 0},r("span",{key:"4cea081451f50508cef36e90d4c88cbd94933287",class:"pds-filter__button-content",part:"button-content"},this.renderIcon(),this.text&&r("span",{key:"479f84087e7969fa555475b240f5e70ce5bcf136",class:"pds-filter__button-text",part:"button-text"},this.text),this.renderDropdownIcon())),"clear"!==this.variant&&r("div",{key:"85aec3d5d7b33a0cfb3602412238830929902eb1",ref:e=>this.popoverEl=e,id:this.componentId+"-popover",class:"pds-filter__popover",popover:"auto",part:"popover"},r("slot",{key:"ede4c3866bfdce974e0d21c6e6a3ae22aee47d2c"})))}get el(){return this}static get style(){return":host{--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);display:inline-block;position:relative}.pds-filter__trigger{-ms-flex-align:center;align-items:center;anchor-name:--filter-trigger;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-050);box-shadow:var(--pine-box-shadow-050);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text-tertiary);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;font-family:var(--pine-font-family-inter);font-size:var(--pine-font-size-100);font-weight:var(--pine-font-weight-400);gap:var(--pine-dimension-050);letter-spacing:var(--pine-letter-spacing-114);line-height:var(--pine-line-height-150);padding:var(--pine-dimension-025) var(--pine-dimension-125);position:relative;-webkit-transition:all var(--pine-motion-duration-base) ease;transition:all var(--pine-motion-duration-base) ease}.pds-filter__trigger pds-icon{block-size:var(--pine-font-size-100);color:var(--pine-color-text-secondary);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-font-size-100)}.pds-filter__trigger:hover,.pds-filter__trigger.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger:hover pds-icon,.pds-filter__trigger.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger:disabled{cursor:not-allowed;opacity:0.5}.pds-filter__trigger--selected{background-color:var(--pine-color-purple-050);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover,.pds-filter__trigger--selected.pds-filter__trigger--open{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-500);color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:hover pds-icon,.pds-filter__trigger--selected.pds-filter__trigger--open pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--selected:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--more{background-color:var(--pine-color-background-container-hover);border:var(--pine-border-width-thin) dashed var(--pine-color-border);color:var(--pine-color-text-tertiary)}.pds-filter__trigger--more pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:hover,.pds-filter__trigger--more.pds-filter__trigger--open{background-color:var(--pine-color-background-subtle);border-color:var(--pine-color-border-hover);color:var(--pine-color-text-hover)}.pds-filter__trigger--more:hover pds-icon,.pds-filter__trigger--more.pds-filter__trigger--open pds-icon{color:var(--pine-color-text-secondary)}.pds-filter__trigger--more:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__trigger--clear{background:transparent;border:var(--pine-border-width-thin) solid transparent;border-radius:var(--pine-dimension-100);-webkit-box-shadow:none;box-shadow:none;color:var(--pine-color-purple-600)}.pds-filter__trigger--clear pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover{background-color:var(--pine-color-purple-100);border-color:var(--pine-color-purple-100);color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:hover pds-icon{color:var(--pine-color-purple-600)}.pds-filter__trigger--clear:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-filter__button-content{-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;gap:var(--pine-dimension-050);max-inline-size:148px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__button-text{line-height:var(--pine-line-height-150);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-filter__dropdown-icon{block-size:var(--pine-dimension-200);-ms-flex-negative:0;flex-shrink:0;inline-size:var(--pine-dimension-200)}.pds-filter__popover{background-color:var(--pine-color-background-overlay);border:0;border-radius:var(--pine-dimension-100);-webkit-box-shadow:var(--pine-box-shadow-100);box-shadow:var(--pine-box-shadow-100);display:none;inline-size:228px;inset:unset;padding:var(--pine-dimension-100);z-index:var(--pine-z-index-overlay);}.pds-filter__popover:popover-open,.pds-filter__popover.is-open{display:block}.pds-filter__popover{}@supports (anchor-name: --test){.pds-filter__popover{inset-block-start:calc(anchor(--filter-trigger bottom) + var(--pine-dimension-100));inset-inline-start:anchor(--filter-trigger start);position:fixed;position-anchor:--filter-trigger;}.pds-filter__popover.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover{}.pds-filter__popover.is-open.popover-flip-horizontal{inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto}.pds-filter__popover.is-open.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}.pds-filter__popover.is-open.popover-flip-horizontal.popover-flip-vertical{inset-block-start:anchor(--filter-trigger top);inset-inline-end:anchor(--filter-trigger end);inset-inline-start:auto;-webkit-transform:translateY(calc(-100% - var(--pine-dimension-100)));transform:translateY(calc(-100% - var(--pine-dimension-100)))}}"}},[257,"pds-filter",{componentId:[1,"component-id"],variant:[1],icon:[1],text:[1],isOpen:[32],showFilter:[64],hideFilter:[64]},[[9,"resize","handleWindowResize"],[9,"scroll","handleWindowScroll"],[4,"toggle","handlePopoverToggle"],[4,"click","handleDocumentClick"],[4,"keydown","handleEscapeKey"]]]),d=c,h=function(){"undefined"!=typeof customElements&&["pds-filter","pds-icon"].forEach((e=>{switch(e){case"pds-filter":customElements.get(n(e))||customElements.define(n(e),c);break;case"pds-icon":customElements.get(n(e))||p()}}))};export{d as PdsFilter,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as s,h as t,Host as i,transformTag as l}from"@stencil/core/internal/client";const a=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return t(i,{key:"492357b36ec8ca8552f76aea6a4e4baf01ee92d5",id:this.componentId},t("div",{key:"fbf56c5452b4b0627a95008a601ccd6ace59417c",class:"pds-filters"},t("slot",{key:"c0e1d6b7b86ff39425d26dc75bf950283a371f71"})))}static get style(){return":host{display:block}.pds-filters{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-100)}"}},[257,"pds-filters",{componentId:[1,"component-id"]}]),n=a,r=function(){"undefined"!=typeof customElements&&["pds-filters"].forEach((e=>{"pds-filters"===e&&(customElements.get(l(e))||customElements.define(l(e),a))}))};export{n as PdsFilters,r as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as s,h as t,Host as a,transformTag as i}from"@stencil/core/internal/client";const l=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return t(a,{key:"5587c41a5ca93cc48399d7c1af0762d4a3516b4d",id:this.componentId},t("div",{key:"43ee499b9c3f49b52cf18beee8ac5cf97b8ad49a",class:"pds-filters"},t("slot",{key:"79a452042d7aa7e0492d80fd773f71fb820c2211"})))}static get style(){return":host{display:block}.pds-filters{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:var(--pine-dimension-100)}"}},[257,"pds-filters",{componentId:[1,"component-id"]}]),c=l,n=function(){"undefined"!=typeof customElements&&["pds-filters"].forEach((e=>{"pds-filters"===e&&(customElements.get(i(e))||customElements.define(i(e),l))}))};export{c as PdsFilters,n as defineCustomElement}
@@ -1 +1 @@
1
- import{Build as t,proxyCustomElement as i,HTMLElement as e,h as n,Host as s,transformTag as o}from"@stencil/core/internal/client";let r,l=!1;const a=(t,i)=>(t||!i||u(i)||(t=i),m(t)&&(t=p(t)),m(t)&&""!==t.trim()?""!=t.replace(/[a-z]|-|\d/gi,"")?null:t:null),c=t=>m(t)&&(t=t.trim(),u(t))?t:null,h=i=>{let e=c(i.src);return e||(e=a(i.name,i.icon),e?(n=e,(()=>{if("undefined"==typeof window)return new Map;if(!r){const t=window;t.PdsIcons=t.PdsIcons||{},r=t.PdsIcons.map=t.PdsIcons.map||new Map}return r})().get(n)||(i=>{var e;const n=null===(e=document.head.querySelector("meta[data-pine-asset-path]"))||void 0===e?void 0:e.dataset.pineAssetPath,s=window.__PINE_ASSET_PATH__,o=t.isTesting?"/dist/pds-icons":n||s||"https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/";o.startsWith("https://cdn.jsdelivr.net/npm/")&&!l&&(l=!0,console.warn("\n Fetching Pine assets from jsDelivr CDN.\n\n It's recommended that you bundle Pine Assets with your application and set the path accordingly.\n\nFor more information, read the documentation: \nhttps://pine-design-system.netlify.app/?path=/docs/resources-assets--docs\n "));let r=i;return i.startsWith("./")&&(r=i.substring(2)),o.endsWith("/")||(r="/"+r),o+r})(`svg/${n}.svg`)):i.icon&&(e=c(i.icon),e)?e:null);var n},d=t=>t&&""!==t.dir?"rtl"===t.dir.toLowerCase():"rtl"===(null===document||void 0===document?void 0:document.dir.toLowerCase()),u=t=>t.length>0&&/(\/|\.)/.test(t),m=t=>"string"==typeof t,p=t=>t.toLowerCase(),f=["align-horizontal-bottom","align-horizontal-center","align-horizontal-top","align-left","align-right","align-vertical-left","align-vertical-right","arrow-corner","arrow-left","arrow-right","calendar-schedule","caret-left","caret-right","cart","cart-add","comment","comment-no","conversation","copy","copy-07","delete-key","delete-x","downsell","drawer-collapse","drawer-expand","duplicate","feedback","file-lock","file-search","form-field","form-filled","left-small","launch","list-bullet","list-numbers","margin-left","margin-right","move-left","move-right","newsletter-2","one-off-session","quote","redo","reset-password","right-small","send-message","share","super-admin","tablet-landscape","undo","user-star","user-star-filled","users","users-filled","users-tone"],g=t=>{if(1===t.nodeType){if("script"===t.nodeName.toLowerCase())return!1;for(let i=0;i<t.attributes.length;i++){const e=t.attributes[i].name;if(m(e)&&0===e.toLowerCase().indexOf("on"))return!1}for(let i=0;i<t.childNodes.length;i++)if(!g(t.childNodes[i]))return!1}return!0},w=new Map,v=new Map;let y;const b=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.didLoadIcon=!1,this.iconName=null,this.inheritedAttributes={},this.isVisible=!1,this.size="regular",this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&"true"===t.getAttribute("aria-hidden")}}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};return t[this.size]?t[this.size]:this.size}componentDidLoad(){this.setCSSVariables(),this.didLoadIcon||this.loadIcon(),setTimeout((()=>{this.svgContent||this.isVisible||(this.isVisible=!0,this.loadIcon())}),100),setTimeout((()=>{this.svgContent||this.isVisible||(this.isVisible=!0,this.loadIcon())}),500)}componentWillLoad(){this.inheritedAttributes=((t,i=[])=>{const e={};return i.forEach((i=>{t.hasAttribute(i)&&(null!==t.getAttribute(i)&&(e[i]=t.getAttribute(i)),t.removeAttribute(i))})),e})(this.el,["aria-label"]),this.setCSSVariables(),this.setupInitialAriaLabel()}setCSSVariables(){this.el.style.setProperty("--dimension-icon-height",this.iconSize()),this.el.style.setProperty("--dimension-icon-width",this.iconSize()),this.el.style.setProperty("--color-icon-fill",void 0!==this.color?this.color:"currentColor")}connectedCallback(){this.isVisible||this.svgContent||this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=!0,this.loadIcon()})),this.isElementInViewport(this.el)&&(this.isVisible=!0,this.loadIcon())}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0)}updateStyles(){this.setCSSVariables()}onIconPropertyChange(){this.loadIcon(),this.setupInitialAriaLabel()}loadIcon(){if(this.didLoadIcon=!1,this.svgContent=void 0,t.isBrowser&&this.isVisible){const t=h(this);t&&(w.has(t)?this.svgContent=w.get(t):((t,i=!1)=>{let e=v.get(t);if(!e){if("undefined"==typeof fetch||"undefined"==typeof document)return w.set(t,""),Promise.resolve();if((t=>t.startsWith("data:image/svg+xml"))(t)&&(t=>-1!==t.indexOf(";utf8,"))(t)){y||(y=new DOMParser);try{const i=y.parseFromString(t,"text/html").querySelector("svg");w.set(t,i?i.outerHTML:"")}catch(i){w.set(t,"")}return Promise.resolve()}e=fetch(t).then((e=>{if(e.ok)return e.text().then((e=>{if(e&&!1!==i)try{e=(t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--)"svg"!==i.childNodes[t].nodeName.toLowerCase()&&i.removeChild(i.childNodes[t]);const e=i.firstElementChild;if(e&&"svg"===e.nodeName.toLowerCase()){const t=e.getAttribute("class")||"";if(e.setAttribute("class",(t+" s-pds-icon").trim()),g(e))return i.innerHTML}return""})(e)}catch(t){e=""}w.set(t,e||"")}));throw new Error(`Failed to load SVG: ${e.status} ${e.statusText}`)})).catch((i=>{console.warn("Failed to load SVG:",t,i),w.set(t,"")})),v.set(t,e)}return e})(t).then((()=>{setTimeout((()=>{this.svgContent=w.get(t)}),0)})).catch((()=>{this.svgContent=""})),this.didLoadIcon=!0)}this.iconName=a(this.name,this.icon)}render(){const{ariaLabel:i,flipRtl:e,iconName:o,inheritedAttributes:r}=this,l=!!o&&(t=>d(this.el)&&f.includes(t))(o)&&!1!==e,a=e||l,c=r["aria-label"]||i;return n(s,Object.assign({key:"43aa73531314e6529a887468e69362430d006229","aria-label":void 0===c||this.hasAriaHidden()?null:c,alt:"",role:"img",class:Object.assign(Object.assign({},C(this.color)),{"flip-rtl":a,"icon-rtl":a&&d(this.el)})},r),n("div",t.isBrowser&&this.svgContent?{class:"icon-inner",innerHTML:this.svgContent}:{class:"icon-inner"}))}setupInitialAriaLabel(){if(!this.inheritedAttributes["aria-label"]){const t=a(this.name,this.icon);t&&(this.ariaLabel=t.replace(/\-/g," "))}}waitUntilVisible(i,e,n){if(t.isBrowser&&"undefined"!=typeof window&&window.IntersectionObserver){const t=this.io=new window.IntersectionObserver((i=>{i[0].isIntersecting&&(t.disconnect(),this.io=void 0,n())}),{rootMargin:e});t.observe(i),setTimeout((()=>{this.io&&!this.isVisible&&this.isElementInViewport(i)&&(this.io.disconnect(),this.io=void 0,n())}),1e3)}else n()}isElementInViewport(t){if(!t||!t.isConnected)return!1;const i=t.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return i.top>=0&&i.left>=0&&i.bottom<=e&&i.right<=n||i.top<e&&i.bottom>0&&i.left<n&&i.right>0}debugIconState(){var t;const i=h(this),e=this.el.getBoundingClientRect();console.log("PdsIcon Debug State:",{name:this.name,src:this.src,icon:this.icon,iconName:this.iconName,url:i,isVisible:this.isVisible,didLoadIcon:this.didLoadIcon,hasSvgContent:!!this.svgContent,svgContentLength:(null===(t=this.svgContent)||void 0===t?void 0:t.length)||0,isInCache:!!i&&w.has(i),cachedContent:i?w.get(i):null,element:this.el,isConnected:this.el.isConnected,isInViewport:this.isElementInViewport(this.el),hasIntersectionObserver:!!this.io,boundingClientRect:e,windowDimensions:{width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}})}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{size:[{updateStyles:0}],color:[{updateStyles:0}],name:[{onIconPropertyChange:0}],src:[{onIconPropertyChange:0}],icon:[{onIconPropertyChange:0}]}}static get style(){return":host{--dimension-icon-height:16px;--dimension-icon-width:16px;--color-icon-fill:currentColor;contain:strict;display:inline-block;fill:var(--color-icon-fill);-ms-flex-negative:0;flex-shrink:0;height:var(--dimension-icon-height);width:var(--dimension-icon-width)}:host .pdsicon{fill:var(--color-icon-fill)}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}:host(.flip-rtl):host-context([dir=rtl]) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}"}},[1,"pds-icon",{color:[1],flipRtl:[4,"flip-rtl"],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},void 0,{size:[{updateStyles:0}],color:[{updateStyles:0}],name:[{onIconPropertyChange:0}],src:[{onIconPropertyChange:0}],icon:[{onIconPropertyChange:0}]}]),C=t=>t?{"pds-color":!0,[`pds-color-${t}`]:!0}:null;function I(){"undefined"!=typeof customElements&&["pds-icon"].forEach((t=>{"pds-icon"===t&&(customElements.get(o(t))||customElements.define(o(t),b))}))}export{b as P,I as d}
1
+ import{Build as t,proxyCustomElement as i,HTMLElement as e,h as n,Host as s,transformTag as o}from"@stencil/core/internal/client";let r,l=!1;const a=(t,i)=>(t||!i||u(i)||(t=i),m(t)&&(t=p(t)),m(t)&&""!==t.trim()?""!=t.replace(/[a-z]|-|\d/gi,"")?null:t:null),c=t=>m(t)&&(t=t.trim(),u(t))?t:null,h=i=>{let e=c(i.src);return e||(e=a(i.name,i.icon),e?(n=e,(()=>{if("undefined"==typeof window)return new Map;if(!r){const t=window;t.PdsIcons=t.PdsIcons||{},r=t.PdsIcons.map=t.PdsIcons.map||new Map}return r})().get(n)||(i=>{var e;const n=null===(e=document.head.querySelector("meta[data-pine-asset-path]"))||void 0===e?void 0:e.dataset.pineAssetPath,s=window.__PINE_ASSET_PATH__,o=t.isTesting?"/dist/pds-icons":n||s||"https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/";o.startsWith("https://cdn.jsdelivr.net/npm/")&&!l&&(l=!0,console.warn("\n Fetching Pine assets from jsDelivr CDN.\n\n It's recommended that you bundle Pine Assets with your application and set the path accordingly.\n\nFor more information, read the documentation: \nhttps://pine-design-system.netlify.app/?path=/docs/guides-assets--docs\n "));let r=i;return i.startsWith("./")&&(r=i.substring(2)),o.endsWith("/")||(r="/"+r),o+r})(`svg/${n}.svg`)):i.icon&&(e=c(i.icon),e)?e:null);var n},d=t=>t&&""!==t.dir?"rtl"===t.dir.toLowerCase():"rtl"===(null===document||void 0===document?void 0:document.dir.toLowerCase()),u=t=>t.length>0&&/(\/|\.)/.test(t),m=t=>"string"==typeof t,p=t=>t.toLowerCase(),f=["align-horizontal-bottom","align-horizontal-center","align-horizontal-top","align-left","align-right","align-vertical-left","align-vertical-right","arrow-corner","arrow-left","arrow-right","calendar-schedule","caret-left","caret-right","cart","cart-add","comment","comment-no","conversation","copy","copy-07","delete-key","delete-x","downsell","drawer-collapse","drawer-expand","duplicate","feedback","file-lock","file-search","form-field","form-filled","left-small","launch","list-bullet","list-numbers","margin-left","margin-right","move-left","move-right","newsletter-2","one-off-session","quote","redo","reset-password","right-small","send-message","share","super-admin","tablet-landscape","undo","user-star","user-star-filled","users","users-filled","users-tone"],g=t=>{if(1===t.nodeType){if("script"===t.nodeName.toLowerCase())return!1;for(let i=0;i<t.attributes.length;i++){const e=t.attributes[i].name;if(m(e)&&0===e.toLowerCase().indexOf("on"))return!1}for(let i=0;i<t.childNodes.length;i++)if(!g(t.childNodes[i]))return!1}return!0},w=new Map,v=new Map;let y;const b=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.didLoadIcon=!1,this.iconName=null,this.inheritedAttributes={},this.isVisible=!1,this.size="regular",this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&"true"===t.getAttribute("aria-hidden")}}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};return t[this.size]?t[this.size]:this.size}componentDidLoad(){this.setCSSVariables(),this.didLoadIcon||this.loadIcon(),setTimeout((()=>{this.svgContent||this.isVisible||(this.isVisible=!0,this.loadIcon())}),100),setTimeout((()=>{this.svgContent||this.isVisible||(this.isVisible=!0,this.loadIcon())}),500)}componentWillLoad(){this.inheritedAttributes=((t,i=[])=>{const e={};return i.forEach((i=>{t.hasAttribute(i)&&(null!==t.getAttribute(i)&&(e[i]=t.getAttribute(i)),t.removeAttribute(i))})),e})(this.el,["aria-label"]),this.setCSSVariables(),this.setupInitialAriaLabel()}setCSSVariables(){this.el.style.setProperty("--dimension-icon-height",this.iconSize()),this.el.style.setProperty("--dimension-icon-width",this.iconSize()),this.el.style.setProperty("--color-icon-fill",void 0!==this.color?this.color:"currentColor")}connectedCallback(){this.isVisible||this.svgContent||this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=!0,this.loadIcon()})),this.isElementInViewport(this.el)&&(this.isVisible=!0,this.loadIcon())}disconnectedCallback(){this.io&&(this.io.disconnect(),this.io=void 0)}updateStyles(){this.setCSSVariables()}onIconPropertyChange(){this.loadIcon(),this.setupInitialAriaLabel()}loadIcon(){if(this.didLoadIcon=!1,this.svgContent=void 0,t.isBrowser&&this.isVisible){const t=h(this);t&&(w.has(t)?this.svgContent=w.get(t):((t,i=!1)=>{let e=v.get(t);if(!e){if("undefined"==typeof fetch||"undefined"==typeof document)return w.set(t,""),Promise.resolve();if((t=>t.startsWith("data:image/svg+xml"))(t)&&(t=>-1!==t.indexOf(";utf8,"))(t)){y||(y=new DOMParser);try{const i=y.parseFromString(t,"text/html").querySelector("svg");w.set(t,i?i.outerHTML:"")}catch(i){w.set(t,"")}return Promise.resolve()}e=fetch(t).then((e=>{if(e.ok)return e.text().then((e=>{if(e&&!1!==i)try{e=(t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--)"svg"!==i.childNodes[t].nodeName.toLowerCase()&&i.removeChild(i.childNodes[t]);const e=i.firstElementChild;if(e&&"svg"===e.nodeName.toLowerCase()){const t=e.getAttribute("class")||"";if(e.setAttribute("class",(t+" s-pds-icon").trim()),g(e))return i.innerHTML}return""})(e)}catch(t){e=""}w.set(t,e||"")}));throw new Error(`Failed to load SVG: ${e.status} ${e.statusText}`)})).catch((i=>{console.warn("Failed to load SVG:",t,i),w.set(t,"")})),v.set(t,e)}return e})(t).then((()=>{setTimeout((()=>{this.svgContent=w.get(t)}),0)})).catch((()=>{this.svgContent=""})),this.didLoadIcon=!0)}this.iconName=a(this.name,this.icon)}render(){const{ariaLabel:i,flipRtl:e,iconName:o,inheritedAttributes:r}=this,l=!!o&&(t=>d(this.el)&&f.includes(t))(o)&&!1!==e,a=e||l,c=r["aria-label"]||i;return n(s,Object.assign({key:"43aa73531314e6529a887468e69362430d006229","aria-label":void 0===c||this.hasAriaHidden()?null:c,alt:"",role:"img",class:Object.assign(Object.assign({},C(this.color)),{"flip-rtl":a,"icon-rtl":a&&d(this.el)})},r),n("div",t.isBrowser&&this.svgContent?{class:"icon-inner",innerHTML:this.svgContent}:{class:"icon-inner"}))}setupInitialAriaLabel(){if(!this.inheritedAttributes["aria-label"]){const t=a(this.name,this.icon);t&&(this.ariaLabel=t.replace(/\-/g," "))}}waitUntilVisible(i,e,n){if(t.isBrowser&&"undefined"!=typeof window&&window.IntersectionObserver){const t=this.io=new window.IntersectionObserver((i=>{i[0].isIntersecting&&(t.disconnect(),this.io=void 0,n())}),{rootMargin:e});t.observe(i),setTimeout((()=>{this.io&&!this.isVisible&&this.isElementInViewport(i)&&(this.io.disconnect(),this.io=void 0,n())}),1e3)}else n()}isElementInViewport(t){if(!t||!t.isConnected)return!1;const i=t.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return i.top>=0&&i.left>=0&&i.bottom<=e&&i.right<=n||i.top<e&&i.bottom>0&&i.left<n&&i.right>0}debugIconState(){var t;const i=h(this),e=this.el.getBoundingClientRect();console.log("PdsIcon Debug State:",{name:this.name,src:this.src,icon:this.icon,iconName:this.iconName,url:i,isVisible:this.isVisible,didLoadIcon:this.didLoadIcon,hasSvgContent:!!this.svgContent,svgContentLength:(null===(t=this.svgContent)||void 0===t?void 0:t.length)||0,isInCache:!!i&&w.has(i),cachedContent:i?w.get(i):null,element:this.el,isConnected:this.el.isConnected,isInViewport:this.isElementInViewport(this.el),hasIntersectionObserver:!!this.io,boundingClientRect:e,windowDimensions:{width:window.innerWidth||document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}})}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{size:[{updateStyles:0}],color:[{updateStyles:0}],name:[{onIconPropertyChange:0}],src:[{onIconPropertyChange:0}],icon:[{onIconPropertyChange:0}]}}static get style(){return":host{--dimension-icon-height:16px;--dimension-icon-width:16px;--color-icon-fill:currentColor;contain:strict;display:inline-block;fill:var(--color-icon-fill);-ms-flex-negative:0;flex-shrink:0;height:var(--dimension-icon-height);width:var(--dimension-icon-width)}:host .pdsicon{fill:var(--color-icon-fill)}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}:host(.flip-rtl):host-context([dir=rtl]) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}"}},[1,"pds-icon",{color:[1],flipRtl:[4,"flip-rtl"],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},void 0,{size:[{updateStyles:0}],color:[{updateStyles:0}],name:[{onIconPropertyChange:0}],src:[{onIconPropertyChange:0}],icon:[{onIconPropertyChange:0}]}]),C=t=>t?{"pds-color":!0,[`pds-color-${t}`]:!0}:null;function I(){"undefined"!=typeof customElements&&["pds-icon"].forEach((t=>{"pds-icon"===t&&(customElements.get(o(t))||customElements.define(o(t),b))}))}export{b as P,I as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,h as e,Host as i,transformTag as c}from"@stencil/core/internal/client";const a=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.alt="",this.loading="eager"}render(){return e(i,{key:"0c0f463a1b616ccc485b8086a0210c5d9d2b065c",class:{"pds-image":!0},id:this.componentId},e("img",{key:"2ac4ef66ebbb39d488ce68f06b590a5fad180811",alt:this.alt,height:this.height,loading:this.loading,sizes:this.sizes,src:this.src,srcset:this.srcset,width:this.width}))}static get style(){return":host{--dimension-aspect-ratio:auto;display:inline-block}img{aspect-ratio:var(--dimension-aspect-ratio);display:block;height:auto;max-width:100%}"}},[1,"pds-image",{alt:[1],componentId:[1,"component-id"],height:[2],loading:[1],sizes:[1],src:[1],srcset:[1],width:[2]}]),n=a,o=function(){"undefined"!=typeof customElements&&["pds-image"].forEach((t=>{"pds-image"===t&&(customElements.get(c(t))||customElements.define(c(t),a))}))};export{n as PdsImage,o as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,h as s,Host as i,transformTag as a}from"@stencil/core/internal/client";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.alt="",this.loading="eager"}render(){return s(i,{key:"fff1a796e59b8e666069e56390e174d7d2861f03",class:{"pds-image":!0},id:this.componentId},s("img",{key:"dbeda9da5adca51c58ec5a807cde673d6b479d0f",alt:this.alt,height:this.height,loading:this.loading,sizes:this.sizes,src:this.src,srcset:this.srcset,width:this.width}))}static get style(){return":host{--dimension-aspect-ratio:auto;display:inline-block}img{aspect-ratio:var(--dimension-aspect-ratio);display:block;height:auto;max-width:100%}"}},[1,"pds-image",{alt:[1],componentId:[1,"component-id"],height:[2],loading:[1],sizes:[1],src:[1],srcset:[1],width:[2]}]),n=d,c=function(){"undefined"!=typeof customElements&&["pds-image"].forEach((t=>{"pds-image"===t&&(customElements.get(a(t))||customElements.define(a(t),d))}))};export{n as PdsImage,c as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as r,createEvent as i,h as t,Host as n,transformTag as s}from"@stencil/core/internal/client";import{i as d,a as o,m as a}from"./form.js";import{i as p}from"./attributes.js";import{d as l}from"./utils.js";import{h as u}from"./index2.js";import{d as c}from"./pds-icon2.js";const h=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsChange=i(this,"pdsChange",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this.isComposing=!1,this.hasLoaded=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.hasPrepend=!1,this.hasAppend=!1,this.hasAction=!1,this.type="text",this.value="",this.hasFocus=!1,this.onInputEvent=e=>{const r=e.target;r&&(this.value=r.value||""),this.emitInputChange(e)},this.onChangeEvent=e=>{this.emitValueChange(e)},this.onBlurEvent=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocusEvent=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onCompositionStart=()=>{this.isComposing=!0},this.onCompositionEnd=()=>{this.isComposing=!1},this.onKeyDownEvent=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeInput&&this.nativeInput.focus()}observeAddonResize(){var e;"undefined"!=typeof ResizeObserver&&(null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=new ResizeObserver((()=>{this.updateAddonWidths()})),this.prefixEl&&this.resizeObserver.observe(this.prefixEl),this.suffixEl&&this.resizeObserver.observe(this.suffixEl))}updateAddonWidths(){requestAnimationFrame((()=>{this.prefixEl&&this.el.style.setProperty("--prefix-width",this.prefixEl.offsetWidth+"px"),this.suffixEl&&this.el.style.setProperty("--suffix-width",this.suffixEl.offsetWidth+"px")}))}renderPrefix(){return null!==this.el.querySelector('[slot="prefix"]')?t("div",{class:"pds-input__prefix",part:"prefix",ref:e=>this.prefixEl=e},t("slot",{name:"prefix",onSlotchange:()=>this.updateAddonWidths()})):null}renderSuffix(){return null!==this.el.querySelector('[slot="suffix"]')?t("div",{class:"pds-input__suffix",part:"suffix",ref:e=>this.suffixEl=e},t("slot",{name:"suffix",onSlotchange:()=>this.updateAddonWidths()})):null}renderPrepend(){return null!==this.el.querySelector('[slot="prepend"]')?t("div",{class:"pds-input__prepend",part:"prepend"},t("slot",{name:"prepend"})):null}renderAppend(){return null!==this.el.querySelector('[slot="append"]')?t("div",{class:"pds-input__append",part:"append"},t("slot",{name:"append"})):null}renderAction(){return null!==this.el.querySelector('[slot="action"]')?t("div",{class:"pds-input__action",part:"action"},t("slot",{name:"action"})):null}componentWillLoad(){this.inheritedAttributes=Object.assign({},p(this.el)),this.hasPrefix=null!==this.el.querySelector('[slot="prefix"]'),this.hasSuffix=null!==this.el.querySelector('[slot="suffix"]'),this.hasPrepend=null!==this.el.querySelector('[slot="prepend"]'),this.hasAppend=null!==this.el.querySelector('[slot="append"]'),this.hasAction=null!==this.el.querySelector('[slot="action"]'),this.originalPdsInput=this.pdsInput}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals()),this.hasLoaded&&!this.resizeObserver&&(this.updateAddonWidths(),this.observeAddonResize())}disconnectedCallback(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=void 0}componentDidLoad(){this.hasLoaded=!0,this.debounceChanged(),this.updateAddonWidths(),this.observeAddonResize(),this.updateFormValue()}debounceChanged(){const{pdsInput:e,debounce:r,originalPdsInput:i}=this;this.pdsInput=void 0===r?null!=i?i:e:l(e,r)}valueChanged(){const e=this.nativeInput,r=this.getValue();e&&e.value!==r&&!this.isComposing&&(e.value=r),this.updateFormValue()}getValue(){return"number"==typeof this.value?""+this.value:""+(this.value||"")}emitValueChange(e){const{value:r}=this,i=null==r?r:""+r;this.focusedValue=i,this.pdsChange.emit({value:i,event:e})}emitInputChange(e){const{value:r}=this;this.pdsInput.emit({value:null==r?r:""+r,event:e})}updateFormValue(){if(!d()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeInput&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeInput.validity,this.nativeInput.validationMessage,this.nativeInput)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const r=e.get(this.name);"string"==typeof r&&(this.value=r)}}render(){const{componentId:e,disabled:r,errorMessage:i,helperMessage:s,invalid:d=!1,label:p}=this,l=this.getValue(),c={"pds-input__field-wrapper":!0,"has-focus":this.hasFocus,"has-error":d||!!i,"is-disabled":r,"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"has-prepend":this.hasPrepend,"has-append":this.hasAppend};return t(n,{key:"b67b80853cbf1f1e84c3ce6d2ff7e63f480c5b8d","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-prefix":this.hasPrefix?"true":null,"has-suffix":this.hasSuffix?"true":null,"has-prepend":this.hasPrepend?"true":null,"has-append":this.hasAppend?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null,"full-width":this.fullWidth?"true":null},t("div",{key:"27a60a963cfa1a96391b55800eba27743a2527f4",class:"pds-input"},p&&t("div",{key:"3f8ce2b254feea4b6fe9ea74318f1e6c27a75927",class:{"pds-input__label-wrapper":!0,"visually-hidden":this.hideLabel}},t("label",{key:"1c290cde5a9100b11fe3059725866506d089e834",htmlFor:e,class:"pds-input__label"},t("span",{key:"2ebc8dafa48d6d855be5b8e1aa3bdd417d6250f3"},p,this.required&&t("span",{key:"73f7d22b13739daff6aa104c140208c5b1a86d10",class:"pds-input__required-indicator"}," *"))),!this.hideLabel&&this.renderAction()),t("div",{key:"4ea0b3335abbdf920ca064aa5866a060ef18c2ad",class:c},this.renderPrepend(),this.renderPrefix(),t("input",Object.assign({key:"4acf340fdcf40968e9c46b6a240f8a9008998c11",ref:e=>this.nativeInput=e,class:"pds-input__field","aria-describedby":o(e,d,s,i),"aria-invalid":d?"true":void 0,autocomplete:this.autocomplete,disabled:r,id:e,max:this.max,maxlength:this.maxlength,min:this.min,minlength:this.minlength,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,step:this.step,type:this.type,value:l,onInput:this.onInputEvent,onChange:this.onChangeEvent,onBlur:this.onBlurEvent,onFocus:this.onFocusEvent,onKeyDown:this.onKeyDownEvent,onCompositionstart:this.onCompositionStart,onCompositionend:this.onCompositionEnd},this.inheritedAttributes)),this.renderSuffix(),this.renderAppend()),s&&t("p",{key:"f1969fe3a5f3aba65f44fcdaddd5a12d90db7fb1",class:"pds-input__helper-message",id:a(e,"helper")},s),i&&t("p",{key:"d4df1ceff95d5db7f2d927e9fcb848444570f9a2",class:"pds-input__error-message",id:a(e,"error")},t("pds-icon",{key:"f69182919903aab42b7641d9a0082861f551a214","aria-hidden":"true",icon:u,size:"small"}),i)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}]}}static get style(){return":host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pds-input-background:var(--pine-color-background-container);--pds-input-border-color:var(--pine-color-border);--pds-input-border-color-hover:var(--pine-color-border-hover);--pds-input-border-color-disabled:var(--pine-color-border-disabled);--pds-input-border-radius:var(--pine-dimension-125);--pds-input-border-width:var(--pine-border-width-thin);--pds-input-padding-x:var(--pine-dimension-150);--pds-input-padding-y:calc(var(--pine-dimension-xs) - var(--pine-border-width));--pds-input-font:var(--pine-typography-body);--pds-input-text-color:var(--pine-color-text-strong);--pds-input-placeholder-color:var(--pine-color-text-placeholder);--pds-input-icon-color:var(--pine-color-text-secondary);--pds-input-disabled-background:var(--pine-color-background-container-disabled);--pds-input-disabled-text-color:var(--pine-color-text-disabled);--pds-input-error-color:var(--pine-color-text-message-danger);--pds-input-error-background:var(--pine-input-color-background-danger);--pds-input-error-border:var(--pine-color-border-danger);--pds-input-error-border-hover:var(--pine-color-border-danger-hover);--pds-input-addon-background:var(--pine-color-background-subtle);--pds-input-addon-color:var(--pine-color-text-secondary);--pds-input-field-min-height:var(--pine-dimension-450);--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring-danger);display:inline}:host pds-select::part(select){background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host::part(prefix),:host::part(suffix){-ms-flex-align:center;align-items:center;color:var(--pine-color-text-label-readonly);display:-ms-flexbox;display:flex;height:100%;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;z-index:calc(var(--pine-z-index-raised) - 1)}:host::part(prefix){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius);inset-inline-start:var(--pds-input-padding-x)}:host::part(suffix){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius);inset-inline-end:var(--pds-input-padding-x)}:host::part(prepend),:host::part(append){-ms-flex-align:center;align-items:center;background-color:var(--pds-input-addon-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);color:var(--pds-input-addon-color);display:-ms-flexbox;display:flex;overflow:visible}:host::part(prepend){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius)}:host::part(append){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius)}:host([has-prepend]) ::slotted(pds-button[slot=prepend]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-end:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pds-input-border-radius);--pds-button-border-radius-end-start:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-append]) ::slotted(pds-button[slot=append]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-start:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pds-input-border-radius);--pds-button-border-radius-end-end:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-prepend]) ::slotted(pds-select[slot=prepend]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pine-dimension-none);--pds-select-border-radius-end-start:var(--pds-input-border-radius);--pds-select-border-radius-start-end:var(--pine-dimension-none);--pds-select-border-radius-start-start:var(--pds-input-border-radius);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([has-append]) ::slotted(pds-select[slot=append]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pds-input-border-radius);--pds-select-border-radius-end-start:var(--pine-dimension-none);--pds-select-border-radius-start-end:var(--pds-input-border-radius);--pds-select-border-radius-start-start:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([aria-disabled=true])::part(prepend),:host([aria-disabled=true])::part(append){background-color:var(--pds-input-disabled-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color-disabled)}:host([full-width=true]){width:100%}:host([invalid=true])::part(prepend),:host([invalid=true])::part(append){background-color:var(--pds-input-error-background);border:var(--pds-input-border-width) solid var(--pds-input-error-border)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])){--pds-input-background:var(--pine-color-accent-disabled);--pds-input-border-color:var(--pine-color-accent);--pds-input-border-color-hover:var(--pine-color-accent-hover);--pds-input-text-color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(prefix),:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(suffix){color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])) .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-input__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label{color:var(--pine-color-text-strong);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label-wrapper .pds-input__label{-webkit-margin-after:0;margin-block-end:0}.pds-input__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-input__field-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-input__field-wrapper.has-prefix .pds-input__field{-webkit-padding-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em));padding-inline-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em))}.pds-input__field-wrapper.has-suffix .pds-input__field{-webkit-padding-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em));padding-inline-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em))}.pds-input__field-wrapper.has-prepend .pds-input__field{border-end-start-radius:var(--pine-dimension-none);border-start-start-radius:var(--pine-dimension-none)}.pds-input__field-wrapper.has-append .pds-input__field{border-end-end-radius:var(--pine-dimension-none);border-start-end-radius:var(--pine-dimension-none)}.pds-input__field{background:var(--pds-input-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);border-radius:var(--pds-input-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-input-text-color);-ms-flex:1;flex:1;font:var(--pds-input-font);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-input-field-min-height);min-width:var(--pine-dimension-none);padding:var(--pds-input-padding-y) var(--pds-input-padding-x);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-input__field:hover:not(:disabled){border-color:var(--pds-input-border-color-hover)}.pds-input__field:disabled{background:var(--pds-input-disabled-background);border-color:var(--pine-color-border-disabled);color:var(--pds-input-disabled-text-color);cursor:not-allowed}.pds-input__field:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.has-error .pds-input__field:hover:not(:disabled){border-color:var(--pds-input-error-border-hover)}:host-context([data-theme=dark]) .has-error .pds-input__field:hover:not(:disabled){border-color:var(--pine-color-red-950)}.pds-input__field:focus-visible:not(.has-error){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width);position:relative;z-index:1}:host([has-prepend]) .pds-input__field:focus-visible:not(.has-error),:host([has-append]) .pds-input__field:focus-visible:not(.has-error),:host([has-prefix]) .pds-input__field:focus-visible:not(.has-error),:host([has-suffix]) .pds-input__field:focus-visible:not(.has-error){outline-offset:var(--pine-dimension-none)}.pds-input__field::-webkit-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-moz-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-moz-placeholder-shown{text-overflow:ellipsis}.pds-input__field:-ms-input-placeholder{text-overflow:ellipsis}.pds-input__field:placeholder-shown{text-overflow:ellipsis}.has-error .pds-input__field{background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host-context([data-theme=dark]) .has-error .pds-input__field{background-color:var(--pine-color-red-950)}.has-error .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring-danger);position:relative;z-index:1}.pds-input__error-message,.pds-input__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-none);margin-block-end:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-input__error-message{color:var(--pds-input-error-color);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-input__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-input__field::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;background-color:var(--pds-input-placeholder-color);cursor:pointer;height:var(--pine-dimension-sm);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");-webkit-mask-size:contain;mask-size:contain;width:var(--pine-dimension-sm)}"}},[321,"pds-input",{autocomplete:[1],componentId:[1,"component-id"],debounce:[2],disabled:[4],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[4],label:[1],hideLabel:[4,"hide-label"],max:[1],maxlength:[1],min:[1],minlength:[1],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],step:[1],type:[1],value:[1032],fullWidth:[4,"full-width"],highlight:[516],hasPrefix:[32],hasSuffix:[32],hasPrepend:[32],hasAppend:[32],hasAction:[32],hasFocus:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}]}]),b=h,v=function(){"undefined"!=typeof customElements&&["pds-input","pds-icon"].forEach((e=>{switch(e){case"pds-input":customElements.get(s(e))||customElements.define(s(e),h);break;case"pds-icon":customElements.get(s(e))||c()}}))};export{b as PdsInput,v as defineCustomElement}
1
+ import{P as s,d as o}from"./pds-input2.js";const p=s,t=o;export{p as PdsInput,t as defineCustomElement}
@@ -0,0 +1 @@
1
+ import{proxyCustomElement as e,HTMLElement as r,createEvent as i,h as t,Host as s,transformTag as n}from"@stencil/core/internal/client";import{i as d,a as o,m as a}from"./form.js";import{i as p}from"./attributes.js";import{c as l,d as u,f as c}from"./utils.js";import{h}from"./index2.js";import{d as b}from"./pds-icon2.js";const v=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.pdsBlur=i(this,"pdsBlur",7),this.pdsChange=i(this,"pdsChange",7),this.pdsFocus=i(this,"pdsFocus",7),this.pdsInput=i(this,"pdsInput",7),this.pdsKeyDown=i(this,"pdsKeyDown",7),this.inheritedAttributes={},this.isComposing=!1,this.hasLoaded=!1,this.hasPrefix=!1,this.hasSuffix=!1,this.hasPrepend=!1,this.hasAppend=!1,this.hasAction=!1,this.type="text",this.value="",this.hasFocus=!1,this.onInputEvent=e=>{const r=e.target;r&&(this.value=r.value||""),this.emitInputChange(e)},this.onChangeEvent=e=>{this.emitValueChange(e)},this.onBlurEvent=e=>{this.hasFocus=!1,this.focusedValue!==this.value&&this.emitValueChange(e),this.pdsBlur.emit(e)},this.onFocusEvent=e=>{this.hasFocus=!0,this.focusedValue=this.value,this.pdsFocus.emit(e)},this.onCompositionStart=()=>{this.isComposing=!0},this.onCompositionEnd=()=>{this.isComposing=!1},this.onKeyDownEvent=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){this.nativeInput&&this.nativeInput.focus()}observeAddonResize(){var e;"undefined"!=typeof ResizeObserver&&(null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=new ResizeObserver((()=>{this.updateAddonWidths()})),this.prefixEl&&this.resizeObserver.observe(this.prefixEl),this.suffixEl&&this.resizeObserver.observe(this.suffixEl))}updateAddonWidths(){requestAnimationFrame((()=>{this.prefixEl&&this.el.style.setProperty("--prefix-width",`${this.prefixEl.offsetWidth}px`),this.suffixEl&&this.el.style.setProperty("--suffix-width",`${this.suffixEl.offsetWidth}px`)}))}renderPrefix(){return null!==this.el.querySelector('[slot="prefix"]')?t("div",{class:"pds-input__prefix",part:"prefix",ref:e=>this.prefixEl=e},t("slot",{name:"prefix",onSlotchange:()=>this.updateAddonWidths()})):null}renderSuffix(){return null!==this.el.querySelector('[slot="suffix"]')?t("div",{class:"pds-input__suffix",part:"suffix",ref:e=>this.suffixEl=e},t("slot",{name:"suffix",onSlotchange:()=>this.updateAddonWidths()})):null}renderPrepend(){return null!==this.el.querySelector('[slot="prepend"]')?t("div",{class:"pds-input__prepend",part:"prepend"},t("slot",{name:"prepend"})):null}renderAppend(){return null!==this.el.querySelector('[slot="append"]')?t("div",{class:"pds-input__append",part:"append"},t("slot",{name:"append"})):null}renderAction(){return null!==this.el.querySelector('[slot="action"]')?t("div",{class:"pds-input__action",part:"action"},t("slot",{name:"action"})):null}componentWillLoad(){this.inheritedAttributes=Object.assign({},p(this.el)),this.hasPrefix=null!==this.el.querySelector('[slot="prefix"]'),this.hasSuffix=null!==this.el.querySelector('[slot="suffix"]'),this.hasPrepend=null!==this.el.querySelector('[slot="prepend"]'),this.hasAppend=null!==this.el.querySelector('[slot="append"]'),this.hasAction=null!==this.el.querySelector('[slot="action"]'),this.originalPdsInput=this.pdsInput}connectedCallback(){this.el.attachInternals&&!this.internals&&(this.internals=this.el.attachInternals()),this.hasLoaded&&!this.resizeObserver&&(this.updateAddonWidths(),this.observeAddonResize())}disconnectedCallback(){var e;l(this.pdsInput),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.resizeObserver=void 0}componentDidLoad(){this.hasLoaded=!0,this.debounceChanged(),this.updateAddonWidths(),this.observeAddonResize(),this.updateFormValue()}debounceChanged(){const{pdsInput:e,debounce:r,originalPdsInput:i}=this;this.pdsInput=void 0===r?null!=i?i:e:u(e,r),c(e)}valueChanged(){const e=this.nativeInput,r=this.getValue();e&&e.value!==r&&!this.isComposing&&(e.value=r),this.updateFormValue()}getValue(){return"number"==typeof this.value?this.value.toString():(this.value||"").toString()}emitValueChange(e){const{value:r}=this,i=null==r?r:r.toString();this.focusedValue=i,this.pdsChange.emit({value:i,event:e})}emitInputChange(e){const{value:r}=this,i=null==r?r:r.toString();this.pdsInput.emit({value:i,event:e})}updateFormValue(){if(!d()&&this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null),this.nativeInput&&this.internals&&this.internals.setValidity&&this.internals.setValidity(this.nativeInput.validity,this.nativeInput.validationMessage,this.nativeInput)}}formResetCallback(){this.value="",this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if("string"==typeof e)this.value=e;else if(e instanceof FormData&&this.name){const r=e.get(this.name);"string"==typeof r&&(this.value=r)}}render(){const{componentId:e,disabled:r,errorMessage:i,helperMessage:n,invalid:d=!1,label:p}=this,l=this.getValue(),u={"pds-input__field-wrapper":!0,"has-focus":this.hasFocus,"has-error":d||!!i,"is-disabled":r,"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"has-prepend":this.hasPrepend,"has-append":this.hasAppend};return t(s,{key:"8c0829cc3502e5fa1fe52584d84b9345fcb0f3fd","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-prefix":this.hasPrefix?"true":null,"has-suffix":this.hasSuffix?"true":null,"has-prepend":this.hasPrepend?"true":null,"has-append":this.hasAppend?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null,"full-width":this.fullWidth?"true":null},t("div",{key:"cf754e6fc72d2cf900e541a469a8e0ba62851538",class:"pds-input"},p&&t("div",{key:"f55793898eb2840322ec9a79daed186420ef0d90",class:{"pds-input__label-wrapper":!0,"visually-hidden":this.hideLabel}},t("label",{key:"2a7deac2a9443b1a648133a799b69414b96314e3",htmlFor:e,class:"pds-input__label"},t("span",{key:"75dc7787e0132c4f62272307867a8066f9cf6ce2"},p,this.required&&t("span",{key:"c7c413addd2b3f275031596598b030c02f647969",class:"pds-input__required-indicator"}," *"))),!this.hideLabel&&this.renderAction()),t("div",{key:"eaf09d07c4fbc84ef835d2c7b4f00e252394f5ed",class:u},this.renderPrepend(),this.renderPrefix(),t("input",Object.assign({key:"dca2390b44e430f0ab1d29daa4ce630ac3b12881",ref:e=>this.nativeInput=e,class:"pds-input__field","aria-describedby":o(e,d,n,i),"aria-invalid":d?"true":void 0,autocomplete:this.autocomplete,disabled:r,id:e,max:this.max,maxlength:this.maxlength,min:this.min,minlength:this.minlength,name:this.name,pattern:this.pattern,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,step:this.step,type:this.type,value:l,onInput:this.onInputEvent,onChange:this.onChangeEvent,onBlur:this.onBlurEvent,onFocus:this.onFocusEvent,onKeyDown:this.onKeyDownEvent,onCompositionstart:this.onCompositionStart,onCompositionend:this.onCompositionEnd},this.inheritedAttributes)),this.renderSuffix(),this.renderAppend()),n&&t("p",{key:"0bd7859f44185ed0c1478833518cb5829ffea4ad",class:"pds-input__helper-message",id:a(e,"helper")},n),i&&t("p",{key:"c40016f5bb03e292e01430c2940aff0ebb98abb5",class:"pds-input__error-message",id:a(e,"error")},t("pds-icon",{key:"54985d775ddf951b50cae4796b7847e98de7434f","aria-hidden":"true",icon:h,size:"small"}),i)))}static get formAssociated(){return!0}get el(){return this}static get watchers(){return{debounce:[{debounceChanged:0}],value:[{valueChanged:0}]}}static get style(){return":host{--pine-input-color-background-danger:var(--pine-color-red-050)}:host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}:host{--pds-input-background:var(--pine-color-background-container);--pds-input-border-color:var(--pine-color-border);--pds-input-border-color-hover:var(--pine-color-border-hover);--pds-input-border-color-disabled:var(--pine-color-border-disabled);--pds-input-border-radius:var(--pine-dimension-125);--pds-input-border-width:var(--pine-border-width-thin);--pds-input-padding-x:var(--pine-dimension-150);--pds-input-padding-y:calc(var(--pine-dimension-xs) - var(--pine-border-width));--pds-input-font:var(--pine-typography-body);--pds-input-text-color:var(--pine-color-text-strong);--pds-input-placeholder-color:var(--pine-color-text-placeholder);--pds-input-icon-color:var(--pine-color-text-secondary);--pds-input-disabled-background:var(--pine-color-background-container-disabled);--pds-input-disabled-text-color:var(--pine-color-text-disabled);--pds-input-error-color:var(--pine-color-text-message-danger);--pds-input-error-background:var(--pine-input-color-background-danger);--pds-input-error-border:var(--pine-color-border-danger);--pds-input-error-border-hover:var(--pine-color-border-danger-hover);--pds-input-addon-background:var(--pine-color-background-subtle);--pds-input-addon-color:var(--pine-color-text-secondary);--pds-input-field-min-height:var(--pine-dimension-450);--box-shadow-focus:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring);--box-shadow-focus-error:0 0 0 1px var(--pine-color-background-container), 0 0 0 3px var(--pine-color-focus-ring-danger);display:inline}:host pds-select::part(select){background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host::part(prefix),:host::part(suffix){-ms-flex-align:center;align-items:center;color:var(--pine-color-text-label-readonly);display:-ms-flexbox;display:flex;height:100%;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);white-space:nowrap;z-index:calc(var(--pine-z-index-raised) - 1)}:host::part(prefix){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius);inset-inline-start:var(--pds-input-padding-x)}:host::part(suffix){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius);inset-inline-end:var(--pds-input-padding-x)}:host::part(prepend),:host::part(append){-ms-flex-align:center;align-items:center;background-color:var(--pds-input-addon-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);color:var(--pds-input-addon-color);display:-ms-flexbox;display:flex;overflow:visible}:host::part(prepend){border-end-start-radius:var(--pds-input-border-radius);-webkit-border-end:var(--pine-border-width-none);border-inline-end:var(--pine-border-width-none);border-start-start-radius:var(--pds-input-border-radius)}:host::part(append){border-end-end-radius:var(--pds-input-border-radius);-webkit-border-start:var(--pine-border-width-none);border-inline-start:var(--pine-border-width-none);border-start-end-radius:var(--pds-input-border-radius)}:host([has-prepend]) ::slotted(pds-button[slot=prepend]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-end:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pds-input-border-radius);--pds-button-border-radius-end-start:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-append]) ::slotted(pds-button[slot=append]){--pds-button-background:var(--pds-input-addon-background);--pds-button-border:var(--pine-border-width-none);--pds-button-border-radius:var(--pine-dimension-none);--pds-button-border-radius-end-start:var(--pine-dimension-none);--pds-button-border-radius-start-start:var(--pine-dimension-none);--pds-button-border-radius-start-end:var(--pds-input-border-radius);--pds-button-border-radius-end-end:var(--pds-input-border-radius);--pds-button-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)));--pds-button-box-shadow-focus:0 0 0 3px var(--pine-color-focus-ring);--pds-button-outline-focus:none}:host([has-prepend]) ::slotted(pds-select[slot=prepend]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pine-dimension-none);--pds-select-border-radius-end-start:var(--pds-input-border-radius);--pds-select-border-radius-start-end:var(--pine-dimension-none);--pds-select-border-radius-start-start:var(--pds-input-border-radius);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([has-append]) ::slotted(pds-select[slot=append]){--pds-select-background:var(--pds-input-addon-background);--pds-select-border:var(--pine-border-width-none);--pds-select-border-radius-end-end:var(--pds-input-border-radius);--pds-select-border-radius-end-start:var(--pine-dimension-none);--pds-select-border-radius-start-end:var(--pds-input-border-radius);--pds-select-border-radius-start-start:var(--pine-dimension-none);--pds-select-min-height:calc(var(--pine-dimension-450) - calc(2 * var(--pine-border-width)))}:host([aria-readonly=true]) input{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([aria-disabled=true])::part(prepend),:host([aria-disabled=true])::part(append){background-color:var(--pds-input-disabled-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color-disabled)}:host([full-width=true]){width:100%}:host([invalid=true])::part(prepend),:host([invalid=true])::part(append){background-color:var(--pds-input-error-background);border:var(--pds-input-border-width) solid var(--pds-input-error-border)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])){--pds-input-background:var(--pine-color-accent-disabled);--pds-input-border-color:var(--pine-color-accent);--pds-input-border-color-hover:var(--pine-color-accent-hover);--pds-input-text-color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(prefix),:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true]))::part(suffix){color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([invalid]):not([aria-readonly=true])) .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring)}.pds-input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-input__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label{color:var(--pine-color-text-strong);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-input__label-wrapper .pds-input__label{-webkit-margin-after:0;margin-block-end:0}.pds-input__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}.pds-input__field-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;position:relative;width:100%}.pds-input__field-wrapper.has-prefix .pds-input__field{-webkit-padding-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em));padding-inline-start:calc(2 * var(--pds-input-padding-x) + var(--prefix-width, 1em))}.pds-input__field-wrapper.has-suffix .pds-input__field{-webkit-padding-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em));padding-inline-end:calc(2 * var(--pds-input-padding-x) + var(--suffix-width, 1em))}.pds-input__field-wrapper.has-prepend .pds-input__field{border-end-start-radius:var(--pine-dimension-none);border-start-start-radius:var(--pine-dimension-none)}.pds-input__field-wrapper.has-append .pds-input__field{border-end-end-radius:var(--pine-dimension-none);border-start-end-radius:var(--pine-dimension-none)}.pds-input__field{background:var(--pds-input-background);border:var(--pds-input-border-width) solid var(--pds-input-border-color);border-radius:var(--pds-input-border-radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pds-input-text-color);-ms-flex:1;flex:1;font:var(--pds-input-font);letter-spacing:var(--pine-letter-spacing);min-height:var(--pds-input-field-min-height);min-width:var(--pine-dimension-none);padding:var(--pds-input-padding-y) var(--pds-input-padding-x);-webkit-transition:border-color var(--pine-motion-duration-base) ease;transition:border-color var(--pine-motion-duration-base) ease;width:100%}.pds-input__field:hover:not(:disabled){border-color:var(--pds-input-border-color-hover)}.pds-input__field:disabled{background:var(--pds-input-disabled-background);border-color:var(--pine-color-border-disabled);color:var(--pds-input-disabled-text-color);cursor:not-allowed}.pds-input__field:disabled::-webkit-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-moz-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled:-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::-ms-input-placeholder{color:var(--pine-color-text-placeholder-disabled)}.pds-input__field:disabled::placeholder{color:var(--pine-color-text-placeholder-disabled)}.has-error .pds-input__field:hover:not(:disabled){border-color:var(--pds-input-error-border-hover)}:host-context([data-theme=dark]) .has-error .pds-input__field:hover:not(:disabled){border-color:var(--pine-color-red-950)}.pds-input__field:focus-visible:not(.has-error){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width);position:relative;z-index:1}:host([has-prepend]) .pds-input__field:focus-visible:not(.has-error),:host([has-append]) .pds-input__field:focus-visible:not(.has-error),:host([has-prefix]) .pds-input__field:focus-visible:not(.has-error),:host([has-suffix]) .pds-input__field:focus-visible:not(.has-error){outline-offset:var(--pine-dimension-none)}.pds-input__field::-webkit-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-moz-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::-ms-input-placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field::placeholder{color:var(--pds-input-placeholder-color)}.pds-input__field:-moz-placeholder-shown{text-overflow:ellipsis}.pds-input__field:-ms-input-placeholder{text-overflow:ellipsis}.pds-input__field:placeholder-shown{text-overflow:ellipsis}.has-error .pds-input__field{background-color:var(--pds-input-error-background);border-color:var(--pds-input-error-border)}:host-context([data-theme=dark]) .has-error .pds-input__field{background-color:var(--pine-color-red-950)}.has-error .pds-input__field:focus-visible{outline-color:var(--pine-color-focus-ring-danger);position:relative;z-index:1}.pds-input__error-message,.pds-input__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-after:var(--pine-dimension-none);margin-block-end:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-input__error-message{color:var(--pds-input-error-color);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-2xs)}.pds-input__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pds-input__field::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;background-color:var(--pds-input-placeholder-color);cursor:pointer;height:var(--pine-dimension-sm);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.646 3.646a.5.5 0 0 1 .708 0L8 7.293l3.646-3.647a.5.5 0 0 1 .708.708L8.707 8l3.647 3.646a.5.5 0 0 1-.708.708L8 8.707l-3.646 3.647a.5.5 0 0 1-.708-.708L7.293 8 3.646 4.354a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E\");-webkit-mask-size:contain;mask-size:contain;width:var(--pine-dimension-sm)}"}},[321,"pds-input",{autocomplete:[1],componentId:[1,"component-id"],debounce:[2],disabled:[4],errorMessage:[1,"error-message"],helperMessage:[1,"helper-message"],invalid:[4],label:[1],hideLabel:[4,"hide-label"],max:[1],maxlength:[1],min:[1],minlength:[1],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],step:[1],type:[1],value:[1032],fullWidth:[4,"full-width"],highlight:[516],hasPrefix:[32],hasSuffix:[32],hasPrepend:[32],hasAppend:[32],hasAction:[32],hasFocus:[32],setFocus:[64]},void 0,{debounce:[{debounceChanged:0}],value:[{valueChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["pds-input","pds-icon"].forEach((e=>{switch(e){case"pds-input":customElements.get(n(e))||customElements.define(n(e),v);break;case"pds-icon":customElements.get(n(e))||b()}}))}export{v as P,f as d}