@verbb/plugin-kit-web 2.0.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 (843) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +149 -0
  4. package/dist/a11y/active-elements.d.ts +6 -0
  5. package/dist/a11y/active-elements.d.ts.map +1 -0
  6. package/dist/a11y/dismissible-stack.d.ts +6 -0
  7. package/dist/a11y/dismissible-stack.d.ts.map +1 -0
  8. package/dist/a11y/focus.d.ts +20 -0
  9. package/dist/a11y/focus.d.ts.map +1 -0
  10. package/dist/a11y/index.d.ts +7 -0
  11. package/dist/a11y/index.d.ts.map +1 -0
  12. package/dist/a11y/offset.d.ts +9 -0
  13. package/dist/a11y/offset.d.ts.map +1 -0
  14. package/dist/a11y/scroll-lock.d.ts +23 -0
  15. package/dist/a11y/scroll-lock.d.ts.map +1 -0
  16. package/dist/base/checkbox-control.styles.d.ts +3 -0
  17. package/dist/base/checkbox-control.styles.d.ts.map +1 -0
  18. package/dist/base/component-id.d.ts +2 -0
  19. package/dist/base/component-id.d.ts.map +1 -0
  20. package/dist/base/form-control.styles.d.ts +3 -0
  21. package/dist/base/form-control.styles.d.ts.map +1 -0
  22. package/dist/base/icon.styles.d.ts +3 -0
  23. package/dist/base/icon.styles.d.ts.map +1 -0
  24. package/dist/base/markdown.styles.d.ts +3 -0
  25. package/dist/base/markdown.styles.d.ts.map +1 -0
  26. package/dist/base/pk-element.d.ts +28 -0
  27. package/dist/base/pk-element.d.ts.map +1 -0
  28. package/dist/base/pk-form-associated-element.d.ts +63 -0
  29. package/dist/base/pk-form-associated-element.d.ts.map +1 -0
  30. package/dist/base/shadow-reset.styles.d.ts +6 -0
  31. package/dist/base/shadow-reset.styles.d.ts.map +1 -0
  32. package/dist/base/styles.d.ts +9 -0
  33. package/dist/base/styles.d.ts.map +1 -0
  34. package/dist/chunks/active-elements-BwpXu8Lb.js +16 -0
  35. package/dist/chunks/active-elements-BwpXu8Lb.js.map +1 -0
  36. package/dist/chunks/animate-with-class-CsDwYnXL.js +42 -0
  37. package/dist/chunks/animate-with-class-CsDwYnXL.js.map +1 -0
  38. package/dist/chunks/autoloader-DzOTQqe6.js +177 -0
  39. package/dist/chunks/autoloader-DzOTQqe6.js.map +1 -0
  40. package/dist/chunks/button-group-item.styles-DYmBR28a.js +147 -0
  41. package/dist/chunks/button-group-item.styles-DYmBR28a.js.map +1 -0
  42. package/dist/chunks/component-registry-CpZiIDh4.js +130 -0
  43. package/dist/chunks/component-registry-CpZiIDh4.js.map +1 -0
  44. package/dist/chunks/control-aria-B2QMq4ji.js +69 -0
  45. package/dist/chunks/control-aria-B2QMq4ji.js.map +1 -0
  46. package/dist/chunks/decorate-W02hmVTt.js +149 -0
  47. package/dist/chunks/decorate-W02hmVTt.js.map +1 -0
  48. package/dist/chunks/dismissible-stack-XQUMfKO3.js +32 -0
  49. package/dist/chunks/dismissible-stack-XQUMfKO3.js.map +1 -0
  50. package/dist/chunks/field-labels-CoU9dnNq.js +14 -0
  51. package/dist/chunks/field-labels-CoU9dnNq.js.map +1 -0
  52. package/dist/chunks/focus-aa5dlv8k.js +122 -0
  53. package/dist/chunks/focus-aa5dlv8k.js.map +1 -0
  54. package/dist/chunks/form-control.styles-BQdimE5o.js +108 -0
  55. package/dist/chunks/form-control.styles-BQdimE5o.js.map +1 -0
  56. package/dist/chunks/has-slot-8BvCt_qo.js +74 -0
  57. package/dist/chunks/has-slot-8BvCt_qo.js.map +1 -0
  58. package/dist/chunks/icon.styles-BLTWLqYp.js +21 -0
  59. package/dist/chunks/icon.styles-BLTWLqYp.js.map +1 -0
  60. package/dist/chunks/icons-BR8JcQj2.js +52 -0
  61. package/dist/chunks/icons-BR8JcQj2.js.map +1 -0
  62. package/dist/chunks/mirror-validator-DCjNYrrx.js +32 -0
  63. package/dist/chunks/mirror-validator-DCjNYrrx.js.map +1 -0
  64. package/dist/chunks/overlay-lifecycle-D0pkTQyI.js +44 -0
  65. package/dist/chunks/overlay-lifecycle-D0pkTQyI.js.map +1 -0
  66. package/dist/chunks/pk-button-Cilu5WAT.js +840 -0
  67. package/dist/chunks/pk-button-Cilu5WAT.js.map +1 -0
  68. package/dist/chunks/pk-button-group-D9hqSfb_.js +422 -0
  69. package/dist/chunks/pk-button-group-D9hqSfb_.js.map +1 -0
  70. package/dist/chunks/pk-button-group-separator-DG0CYaqc.js +61 -0
  71. package/dist/chunks/pk-button-group-separator-DG0CYaqc.js.map +1 -0
  72. package/dist/chunks/pk-button-group-text-C5z4P7ur.js +49 -0
  73. package/dist/chunks/pk-button-group-text-C5z4P7ur.js.map +1 -0
  74. package/dist/chunks/pk-calendar-CcV-La-9.js +1410 -0
  75. package/dist/chunks/pk-calendar-CcV-La-9.js.map +1 -0
  76. package/dist/chunks/pk-checkbox-Bavq3-9C.js +360 -0
  77. package/dist/chunks/pk-checkbox-Bavq3-9C.js.map +1 -0
  78. package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js +221 -0
  79. package/dist/chunks/pk-checkbox-select-ZEJ6WIQn.js.map +1 -0
  80. package/dist/chunks/pk-clear--mPWZP7H.js +15 -0
  81. package/dist/chunks/pk-clear--mPWZP7H.js.map +1 -0
  82. package/dist/chunks/pk-code-editor-DSG6AwLV.js +213 -0
  83. package/dist/chunks/pk-code-editor-DSG6AwLV.js.map +1 -0
  84. package/dist/chunks/pk-color-input-D4L0DE5S.js +398 -0
  85. package/dist/chunks/pk-color-input-D4L0DE5S.js.map +1 -0
  86. package/dist/chunks/pk-combobox-Dd1ik0Ko.js +2015 -0
  87. package/dist/chunks/pk-combobox-Dd1ik0Ko.js.map +1 -0
  88. package/dist/chunks/pk-copy-button-DPh5TOF9.js +139 -0
  89. package/dist/chunks/pk-copy-button-DPh5TOF9.js.map +1 -0
  90. package/dist/chunks/pk-date-picker-CkwU4DzD.js +717 -0
  91. package/dist/chunks/pk-date-picker-CkwU4DzD.js.map +1 -0
  92. package/dist/chunks/pk-dialog-DZZd1Tzb.js +636 -0
  93. package/dist/chunks/pk-dialog-DZZd1Tzb.js.map +1 -0
  94. package/dist/chunks/pk-dropdown-item-BFyjtsL5.js +547 -0
  95. package/dist/chunks/pk-dropdown-item-BFyjtsL5.js.map +1 -0
  96. package/dist/chunks/pk-dropdown-label-DfACId-K.js +48 -0
  97. package/dist/chunks/pk-dropdown-label-DfACId-K.js.map +1 -0
  98. package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js +735 -0
  99. package/dist/chunks/pk-dropdown-menu-DWlxkDIs.js.map +1 -0
  100. package/dist/chunks/pk-editable-table-pBkD6izs.js +1528 -0
  101. package/dist/chunks/pk-editable-table-pBkD6izs.js.map +1 -0
  102. package/dist/chunks/pk-field-Buy_AtYF.js +485 -0
  103. package/dist/chunks/pk-field-Buy_AtYF.js.map +1 -0
  104. package/dist/chunks/pk-form-associated-element-DmZKgNPL.js +260 -0
  105. package/dist/chunks/pk-form-associated-element-DmZKgNPL.js.map +1 -0
  106. package/dist/chunks/pk-input-group-CGHQKrt8.js +238 -0
  107. package/dist/chunks/pk-input-group-CGHQKrt8.js.map +1 -0
  108. package/dist/chunks/pk-input-group-addon-DXbNbsfY.js +101 -0
  109. package/dist/chunks/pk-input-group-addon-DXbNbsfY.js.map +1 -0
  110. package/dist/chunks/pk-input-group-button-XOfVLqGO.js +55 -0
  111. package/dist/chunks/pk-input-group-button-XOfVLqGO.js.map +1 -0
  112. package/dist/chunks/pk-input-group-input-CSmR5vdY.js +136 -0
  113. package/dist/chunks/pk-input-group-input-CSmR5vdY.js.map +1 -0
  114. package/dist/chunks/pk-input-group-text-C6ekhtff.js +40 -0
  115. package/dist/chunks/pk-input-group-text-C6ekhtff.js.map +1 -0
  116. package/dist/chunks/pk-input-group-textarea-DALr3pdU.js +113 -0
  117. package/dist/chunks/pk-input-group-textarea-DALr3pdU.js.map +1 -0
  118. package/dist/chunks/pk-input-naIRPWGC.js +723 -0
  119. package/dist/chunks/pk-input-naIRPWGC.js.map +1 -0
  120. package/dist/chunks/pk-lightswitch-B-rLflNq.js +432 -0
  121. package/dist/chunks/pk-lightswitch-B-rLflNq.js.map +1 -0
  122. package/dist/chunks/pk-option-C3Zqmu3z.js +312 -0
  123. package/dist/chunks/pk-option-C3Zqmu3z.js.map +1 -0
  124. package/dist/chunks/pk-option-group-CbI56A3T.js +72 -0
  125. package/dist/chunks/pk-option-group-CbI56A3T.js.map +1 -0
  126. package/dist/chunks/pk-popover-XZZdJ4WI.js +377 -0
  127. package/dist/chunks/pk-popover-XZZdJ4WI.js.map +1 -0
  128. package/dist/chunks/pk-popup-CgiXok-U.js +538 -0
  129. package/dist/chunks/pk-popup-CgiXok-U.js.map +1 -0
  130. package/dist/chunks/pk-radio-Bg02ckzC.js +233 -0
  131. package/dist/chunks/pk-radio-Bg02ckzC.js.map +1 -0
  132. package/dist/chunks/pk-radio-group-B5rps9G4.js +253 -0
  133. package/dist/chunks/pk-radio-group-B5rps9G4.js.map +1 -0
  134. package/dist/chunks/pk-scroll-area-B0V4Dr2j.js +402 -0
  135. package/dist/chunks/pk-scroll-area-B0V4Dr2j.js.map +1 -0
  136. package/dist/chunks/pk-select-B17rV6BR.js +1129 -0
  137. package/dist/chunks/pk-select-B17rV6BR.js.map +1 -0
  138. package/dist/chunks/pk-separator-CLb9n0FK.js +89 -0
  139. package/dist/chunks/pk-separator-CLb9n0FK.js.map +1 -0
  140. package/dist/chunks/pk-spinner-Blxd3SIH.js +148 -0
  141. package/dist/chunks/pk-spinner-Blxd3SIH.js.map +1 -0
  142. package/dist/chunks/pk-status-7_5dEuw-.js +92 -0
  143. package/dist/chunks/pk-status-7_5dEuw-.js.map +1 -0
  144. package/dist/chunks/pk-tab-CzV7pOdp.js +259 -0
  145. package/dist/chunks/pk-tab-CzV7pOdp.js.map +1 -0
  146. package/dist/chunks/pk-tab-heading-BWAB85ua.js +50 -0
  147. package/dist/chunks/pk-tab-heading-BWAB85ua.js.map +1 -0
  148. package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js +86 -0
  149. package/dist/chunks/pk-tab-panel-Q3Pqyq-f.js.map +1 -0
  150. package/dist/chunks/pk-tabs-Cip4nbb7.js +622 -0
  151. package/dist/chunks/pk-tabs-Cip4nbb7.js.map +1 -0
  152. package/dist/chunks/pk-textarea-BEapC8Rk.js +342 -0
  153. package/dist/chunks/pk-textarea-BEapC8Rk.js.map +1 -0
  154. package/dist/chunks/pk-time-picker-DbW_hMs2.js +228 -0
  155. package/dist/chunks/pk-time-picker-DbW_hMs2.js.map +1 -0
  156. package/dist/chunks/pk-tiptap-content-DAtNbJYC.js +76 -0
  157. package/dist/chunks/pk-tiptap-content-DAtNbJYC.js.map +1 -0
  158. package/dist/chunks/pk-tiptap-editor-umIuEaXh.js +1084 -0
  159. package/dist/chunks/pk-tiptap-editor-umIuEaXh.js.map +1 -0
  160. package/dist/chunks/pk-tiptap-input-CXcYXbRa.js +250 -0
  161. package/dist/chunks/pk-tiptap-input-CXcYXbRa.js.map +1 -0
  162. package/dist/chunks/pk-toggle-5-GKVLye.js +256 -0
  163. package/dist/chunks/pk-toggle-5-GKVLye.js.map +1 -0
  164. package/dist/chunks/pk-toggle-group-CWDwYlgR.js +175 -0
  165. package/dist/chunks/pk-toggle-group-CWDwYlgR.js.map +1 -0
  166. package/dist/chunks/pk-tooltip-fcUbVGli.js +469 -0
  167. package/dist/chunks/pk-tooltip-fcUbVGli.js.map +1 -0
  168. package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js +117 -0
  169. package/dist/chunks/popup-content-animation.styles-Dc6d9quJ.js.map +1 -0
  170. package/dist/chunks/popup-placement-animation-WlEXnS85.js +60 -0
  171. package/dist/chunks/popup-placement-animation-WlEXnS85.js.map +1 -0
  172. package/dist/chunks/popup-pointer-C8lypj8V.js +21 -0
  173. package/dist/chunks/popup-pointer-C8lypj8V.js.map +1 -0
  174. package/dist/chunks/register-components-DNw6EYNo.js +15 -0
  175. package/dist/chunks/register-components-DNw6EYNo.js.map +1 -0
  176. package/dist/chunks/render-Dvc3MHQR.js +16 -0
  177. package/dist/chunks/render-Dvc3MHQR.js.map +1 -0
  178. package/dist/chunks/required-validator-CEg8dvjS.js +29 -0
  179. package/dist/chunks/required-validator-CEg8dvjS.js.map +1 -0
  180. package/dist/chunks/scroll-lock-B4o9vdzJ.js +193 -0
  181. package/dist/chunks/scroll-lock-B4o9vdzJ.js.map +1 -0
  182. package/dist/chunks/spinner-utils-CDfHypTv.js +15 -0
  183. package/dist/chunks/spinner-utils-CDfHypTv.js.map +1 -0
  184. package/dist/chunks/supports-popover-CUBsbHpS.js +7 -0
  185. package/dist/chunks/supports-popover-CUBsbHpS.js.map +1 -0
  186. package/dist/chunks/sync-listbox-separators-B1-V0oJi.js +149 -0
  187. package/dist/chunks/sync-listbox-separators-B1-V0oJi.js.map +1 -0
  188. package/dist/chunks/tiptap.styles-BytOpP0H.js +463 -0
  189. package/dist/chunks/tiptap.styles-BytOpP0H.js.map +1 -0
  190. package/dist/component-registry.d.ts +28 -0
  191. package/dist/component-registry.d.ts.map +1 -0
  192. package/dist/components/button/index.d.ts +2 -0
  193. package/dist/components/button/index.d.ts.map +1 -0
  194. package/dist/components/button/pk-button.d.ts +91 -0
  195. package/dist/components/button/pk-button.d.ts.map +1 -0
  196. package/dist/components/button/pk-button.js +2 -0
  197. package/dist/components/button/pk-button.styles.d.ts +2 -0
  198. package/dist/components/button/pk-button.styles.d.ts.map +1 -0
  199. package/dist/components/button-group/button-group-item.styles.d.ts +13 -0
  200. package/dist/components/button-group/button-group-item.styles.d.ts.map +1 -0
  201. package/dist/components/button-group/index.d.ts +4 -0
  202. package/dist/components/button-group/index.d.ts.map +1 -0
  203. package/dist/components/button-group/pk-button-group-separator.d.ts +18 -0
  204. package/dist/components/button-group/pk-button-group-separator.d.ts.map +1 -0
  205. package/dist/components/button-group/pk-button-group-separator.js +2 -0
  206. package/dist/components/button-group/pk-button-group-separator.styles.d.ts +2 -0
  207. package/dist/components/button-group/pk-button-group-separator.styles.d.ts.map +1 -0
  208. package/dist/components/button-group/pk-button-group-text.d.ts +18 -0
  209. package/dist/components/button-group/pk-button-group-text.d.ts.map +1 -0
  210. package/dist/components/button-group/pk-button-group-text.js +2 -0
  211. package/dist/components/button-group/pk-button-group-text.styles.d.ts +2 -0
  212. package/dist/components/button-group/pk-button-group-text.styles.d.ts.map +1 -0
  213. package/dist/components/button-group/pk-button-group.d.ts +40 -0
  214. package/dist/components/button-group/pk-button-group.d.ts.map +1 -0
  215. package/dist/components/button-group/pk-button-group.js +2 -0
  216. package/dist/components/button-group/pk-button-group.styles.d.ts +2 -0
  217. package/dist/components/button-group/pk-button-group.styles.d.ts.map +1 -0
  218. package/dist/components/button-group.d.ts +2 -0
  219. package/dist/components/button-group.js +4 -0
  220. package/dist/components/button.d.ts +2 -0
  221. package/dist/components/button.js +2 -0
  222. package/dist/components/calendar/index.d.ts +3 -0
  223. package/dist/components/calendar/index.d.ts.map +1 -0
  224. package/dist/components/calendar/pk-calendar.d.ts +117 -0
  225. package/dist/components/calendar/pk-calendar.d.ts.map +1 -0
  226. package/dist/components/calendar/pk-calendar.js +2 -0
  227. package/dist/components/calendar/pk-calendar.styles.d.ts +2 -0
  228. package/dist/components/calendar/pk-calendar.styles.d.ts.map +1 -0
  229. package/dist/components/calendar.d.ts +2 -0
  230. package/dist/components/calendar.js +2 -0
  231. package/dist/components/checkbox/index.d.ts +2 -0
  232. package/dist/components/checkbox/index.d.ts.map +1 -0
  233. package/dist/components/checkbox/pk-checkbox.d.ts +50 -0
  234. package/dist/components/checkbox/pk-checkbox.d.ts.map +1 -0
  235. package/dist/components/checkbox/pk-checkbox.js +2 -0
  236. package/dist/components/checkbox/pk-checkbox.styles.d.ts +2 -0
  237. package/dist/components/checkbox/pk-checkbox.styles.d.ts.map +1 -0
  238. package/dist/components/checkbox-select/index.d.ts +2 -0
  239. package/dist/components/checkbox-select/index.d.ts.map +1 -0
  240. package/dist/components/checkbox-select/pk-checkbox-select.d.ts +48 -0
  241. package/dist/components/checkbox-select/pk-checkbox-select.d.ts.map +1 -0
  242. package/dist/components/checkbox-select/pk-checkbox-select.js +2 -0
  243. package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts +2 -0
  244. package/dist/components/checkbox-select/pk-checkbox-select.styles.d.ts.map +1 -0
  245. package/dist/components/checkbox-select.d.ts +2 -0
  246. package/dist/components/checkbox-select.js +2 -0
  247. package/dist/components/checkbox.d.ts +2 -0
  248. package/dist/components/checkbox.js +2 -0
  249. package/dist/components/code-editor/index.d.ts +2 -0
  250. package/dist/components/code-editor/index.d.ts.map +1 -0
  251. package/dist/components/code-editor/pk-code-editor.d.ts +40 -0
  252. package/dist/components/code-editor/pk-code-editor.d.ts.map +1 -0
  253. package/dist/components/code-editor/pk-code-editor.js +2 -0
  254. package/dist/components/code-editor/pk-code-editor.styles.d.ts +2 -0
  255. package/dist/components/code-editor/pk-code-editor.styles.d.ts.map +1 -0
  256. package/dist/components/code-editor.d.ts +2 -0
  257. package/dist/components/code-editor.js +2 -0
  258. package/dist/components/color-input/index.d.ts +2 -0
  259. package/dist/components/color-input/index.d.ts.map +1 -0
  260. package/dist/components/color-input/pk-color-input.d.ts +41 -0
  261. package/dist/components/color-input/pk-color-input.d.ts.map +1 -0
  262. package/dist/components/color-input/pk-color-input.js +2 -0
  263. package/dist/components/color-input/pk-color-input.styles.d.ts +7 -0
  264. package/dist/components/color-input/pk-color-input.styles.d.ts.map +1 -0
  265. package/dist/components/color-input.d.ts +2 -0
  266. package/dist/components/color-input.js +2 -0
  267. package/dist/components/combobox/index.d.ts +2 -0
  268. package/dist/components/combobox/index.d.ts.map +1 -0
  269. package/dist/components/combobox/pk-combobox.d.ts +219 -0
  270. package/dist/components/combobox/pk-combobox.d.ts.map +1 -0
  271. package/dist/components/combobox/pk-combobox.js +2 -0
  272. package/dist/components/combobox/pk-combobox.styles.d.ts +2 -0
  273. package/dist/components/combobox/pk-combobox.styles.d.ts.map +1 -0
  274. package/dist/components/combobox.d.ts +2 -0
  275. package/dist/components/combobox.js +2 -0
  276. package/dist/components/copy-button/index.d.ts +2 -0
  277. package/dist/components/copy-button/index.d.ts.map +1 -0
  278. package/dist/components/copy-button/pk-copy-button.d.ts +37 -0
  279. package/dist/components/copy-button/pk-copy-button.d.ts.map +1 -0
  280. package/dist/components/copy-button/pk-copy-button.js +2 -0
  281. package/dist/components/copy-button/pk-copy-button.styles.d.ts +2 -0
  282. package/dist/components/copy-button/pk-copy-button.styles.d.ts.map +1 -0
  283. package/dist/components/copy-button.d.ts +2 -0
  284. package/dist/components/copy-button.js +2 -0
  285. package/dist/components/date-picker/index.d.ts +3 -0
  286. package/dist/components/date-picker/index.d.ts.map +1 -0
  287. package/dist/components/date-picker/pk-date-picker.d.ts +107 -0
  288. package/dist/components/date-picker/pk-date-picker.d.ts.map +1 -0
  289. package/dist/components/date-picker/pk-date-picker.js +2 -0
  290. package/dist/components/date-picker/pk-date-picker.styles.d.ts +2 -0
  291. package/dist/components/date-picker/pk-date-picker.styles.d.ts.map +1 -0
  292. package/dist/components/date-picker.d.ts +2 -0
  293. package/dist/components/date-picker.js +2 -0
  294. package/dist/components/dialog/index.d.ts +2 -0
  295. package/dist/components/dialog/index.d.ts.map +1 -0
  296. package/dist/components/dialog/pk-dialog.d.ts +87 -0
  297. package/dist/components/dialog/pk-dialog.d.ts.map +1 -0
  298. package/dist/components/dialog/pk-dialog.js +2 -0
  299. package/dist/components/dialog/pk-dialog.styles.d.ts +2 -0
  300. package/dist/components/dialog/pk-dialog.styles.d.ts.map +1 -0
  301. package/dist/components/dialog.d.ts +2 -0
  302. package/dist/components/dialog.js +2 -0
  303. package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts +11 -0
  304. package/dist/components/dropdown-menu/dropdown-menu-size.styles.d.ts.map +1 -0
  305. package/dist/components/dropdown-menu/index.d.ts +5 -0
  306. package/dist/components/dropdown-menu/index.d.ts.map +1 -0
  307. package/dist/components/dropdown-menu/pk-dropdown-item.d.ts +67 -0
  308. package/dist/components/dropdown-menu/pk-dropdown-item.d.ts.map +1 -0
  309. package/dist/components/dropdown-menu/pk-dropdown-item.js +2 -0
  310. package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts +2 -0
  311. package/dist/components/dropdown-menu/pk-dropdown-item.styles.d.ts.map +1 -0
  312. package/dist/components/dropdown-menu/pk-dropdown-label.d.ts +13 -0
  313. package/dist/components/dropdown-menu/pk-dropdown-label.d.ts.map +1 -0
  314. package/dist/components/dropdown-menu/pk-dropdown-label.js +2 -0
  315. package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts +2 -0
  316. package/dist/components/dropdown-menu/pk-dropdown-label.styles.d.ts.map +1 -0
  317. package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts +130 -0
  318. package/dist/components/dropdown-menu/pk-dropdown-menu.d.ts.map +1 -0
  319. package/dist/components/dropdown-menu/pk-dropdown-menu.js +2 -0
  320. package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts +6 -0
  321. package/dist/components/dropdown-menu/pk-dropdown-menu.styles.d.ts.map +1 -0
  322. package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts +13 -0
  323. package/dist/components/dropdown-menu/pk-dropdown-separator.d.ts.map +1 -0
  324. package/dist/components/dropdown-menu/pk-dropdown-separator.js +36 -0
  325. package/dist/components/dropdown-menu/pk-dropdown-separator.js.map +1 -0
  326. package/dist/components/dropdown-menu.d.ts +2 -0
  327. package/dist/components/dropdown-menu.js +5 -0
  328. package/dist/components/editable-table/editable-table-dnd.d.ts +64 -0
  329. package/dist/components/editable-table/editable-table-dnd.d.ts.map +1 -0
  330. package/dist/components/editable-table/editable-table-model.d.ts +93 -0
  331. package/dist/components/editable-table/editable-table-model.d.ts.map +1 -0
  332. package/dist/components/editable-table/index.d.ts +3 -0
  333. package/dist/components/editable-table/index.d.ts.map +1 -0
  334. package/dist/components/editable-table/pk-editable-table.d.ts +122 -0
  335. package/dist/components/editable-table/pk-editable-table.d.ts.map +1 -0
  336. package/dist/components/editable-table/pk-editable-table.js +2 -0
  337. package/dist/components/editable-table/pk-editable-table.styles.d.ts +2 -0
  338. package/dist/components/editable-table/pk-editable-table.styles.d.ts.map +1 -0
  339. package/dist/components/editable-table.d.ts +2 -0
  340. package/dist/components/editable-table.js +2 -0
  341. package/dist/components/field/index.d.ts +2 -0
  342. package/dist/components/field/index.d.ts.map +1 -0
  343. package/dist/components/field/pk-field.d.ts +69 -0
  344. package/dist/components/field/pk-field.d.ts.map +1 -0
  345. package/dist/components/field/pk-field.js +2 -0
  346. package/dist/components/field/pk-field.styles.d.ts +2 -0
  347. package/dist/components/field/pk-field.styles.d.ts.map +1 -0
  348. package/dist/components/field.d.ts +2 -0
  349. package/dist/components/field.js +2 -0
  350. package/dist/components/icon/index.d.ts +2 -0
  351. package/dist/components/icon/index.d.ts.map +1 -0
  352. package/dist/components/icon/pk-icon-loader.d.ts +1 -0
  353. package/dist/components/icon/pk-icon-loader.d.ts.map +1 -0
  354. package/dist/components/icon/pk-icon.d.ts +46 -0
  355. package/dist/components/icon/pk-icon.d.ts.map +1 -0
  356. package/dist/components/icon/pk-icon.js +47 -0
  357. package/dist/components/icon/pk-icon.js.map +1 -0
  358. package/dist/components/icon.d.ts +2 -0
  359. package/dist/components/icon.js +2 -0
  360. package/dist/components/input/index.d.ts +2 -0
  361. package/dist/components/input/index.d.ts.map +1 -0
  362. package/dist/components/input/pk-input.d.ts +83 -0
  363. package/dist/components/input/pk-input.d.ts.map +1 -0
  364. package/dist/components/input/pk-input.js +2 -0
  365. package/dist/components/input/pk-input.styles.d.ts +2 -0
  366. package/dist/components/input/pk-input.styles.d.ts.map +1 -0
  367. package/dist/components/input-group/index.d.ts +10 -0
  368. package/dist/components/input-group/index.d.ts.map +1 -0
  369. package/dist/components/input-group/pk-input-group-addon.d.ts +23 -0
  370. package/dist/components/input-group/pk-input-group-addon.d.ts.map +1 -0
  371. package/dist/components/input-group/pk-input-group-addon.js +2 -0
  372. package/dist/components/input-group/pk-input-group-addon.styles.d.ts +2 -0
  373. package/dist/components/input-group/pk-input-group-addon.styles.d.ts.map +1 -0
  374. package/dist/components/input-group/pk-input-group-button.d.ts +22 -0
  375. package/dist/components/input-group/pk-input-group-button.d.ts.map +1 -0
  376. package/dist/components/input-group/pk-input-group-button.js +2 -0
  377. package/dist/components/input-group/pk-input-group-button.styles.d.ts +2 -0
  378. package/dist/components/input-group/pk-input-group-button.styles.d.ts.map +1 -0
  379. package/dist/components/input-group/pk-input-group-input.d.ts +28 -0
  380. package/dist/components/input-group/pk-input-group-input.d.ts.map +1 -0
  381. package/dist/components/input-group/pk-input-group-input.js +2 -0
  382. package/dist/components/input-group/pk-input-group-input.styles.d.ts +2 -0
  383. package/dist/components/input-group/pk-input-group-input.styles.d.ts.map +1 -0
  384. package/dist/components/input-group/pk-input-group-text.d.ts +18 -0
  385. package/dist/components/input-group/pk-input-group-text.d.ts.map +1 -0
  386. package/dist/components/input-group/pk-input-group-text.js +2 -0
  387. package/dist/components/input-group/pk-input-group-text.styles.d.ts +2 -0
  388. package/dist/components/input-group/pk-input-group-text.styles.d.ts.map +1 -0
  389. package/dist/components/input-group/pk-input-group-textarea.d.ts +25 -0
  390. package/dist/components/input-group/pk-input-group-textarea.d.ts.map +1 -0
  391. package/dist/components/input-group/pk-input-group-textarea.js +2 -0
  392. package/dist/components/input-group/pk-input-group-textarea.styles.d.ts +2 -0
  393. package/dist/components/input-group/pk-input-group-textarea.styles.d.ts.map +1 -0
  394. package/dist/components/input-group/pk-input-group.d.ts +39 -0
  395. package/dist/components/input-group/pk-input-group.d.ts.map +1 -0
  396. package/dist/components/input-group/pk-input-group.js +2 -0
  397. package/dist/components/input-group/pk-input-group.styles.d.ts +2 -0
  398. package/dist/components/input-group/pk-input-group.styles.d.ts.map +1 -0
  399. package/dist/components/input-group.d.ts +2 -0
  400. package/dist/components/input-group.js +7 -0
  401. package/dist/components/input.d.ts +2 -0
  402. package/dist/components/input.js +2 -0
  403. package/dist/components/lightswitch/index.d.ts +2 -0
  404. package/dist/components/lightswitch/index.d.ts.map +1 -0
  405. package/dist/components/lightswitch/pk-lightswitch.d.ts +54 -0
  406. package/dist/components/lightswitch/pk-lightswitch.d.ts.map +1 -0
  407. package/dist/components/lightswitch/pk-lightswitch.js +2 -0
  408. package/dist/components/lightswitch/pk-lightswitch.styles.d.ts +2 -0
  409. package/dist/components/lightswitch/pk-lightswitch.styles.d.ts.map +1 -0
  410. package/dist/components/lightswitch.d.ts +2 -0
  411. package/dist/components/lightswitch.js +2 -0
  412. package/dist/components/popover/index.d.ts +2 -0
  413. package/dist/components/popover/index.d.ts.map +1 -0
  414. package/dist/components/popover/pk-popover.d.ts +90 -0
  415. package/dist/components/popover/pk-popover.d.ts.map +1 -0
  416. package/dist/components/popover/pk-popover.js +2 -0
  417. package/dist/components/popover/pk-popover.styles.d.ts +2 -0
  418. package/dist/components/popover/pk-popover.styles.d.ts.map +1 -0
  419. package/dist/components/popover.d.ts +2 -0
  420. package/dist/components/popover.js +2 -0
  421. package/dist/components/popup/index.d.ts +2 -0
  422. package/dist/components/popup/index.d.ts.map +1 -0
  423. package/dist/components/popup/pk-popup.d.ts +96 -0
  424. package/dist/components/popup/pk-popup.d.ts.map +1 -0
  425. package/dist/components/popup/pk-popup.js +2 -0
  426. package/dist/components/popup/pk-popup.styles.d.ts +2 -0
  427. package/dist/components/popup/pk-popup.styles.d.ts.map +1 -0
  428. package/dist/components/popup.d.ts +2 -0
  429. package/dist/components/popup.js +2 -0
  430. package/dist/components/radio-group/index.d.ts +3 -0
  431. package/dist/components/radio-group/index.d.ts.map +1 -0
  432. package/dist/components/radio-group/pk-radio-group.d.ts +58 -0
  433. package/dist/components/radio-group/pk-radio-group.d.ts.map +1 -0
  434. package/dist/components/radio-group/pk-radio-group.js +2 -0
  435. package/dist/components/radio-group/pk-radio-group.styles.d.ts +2 -0
  436. package/dist/components/radio-group/pk-radio-group.styles.d.ts.map +1 -0
  437. package/dist/components/radio-group/pk-radio.d.ts +37 -0
  438. package/dist/components/radio-group/pk-radio.d.ts.map +1 -0
  439. package/dist/components/radio-group/pk-radio.js +2 -0
  440. package/dist/components/radio-group/pk-radio.styles.d.ts +2 -0
  441. package/dist/components/radio-group/pk-radio.styles.d.ts.map +1 -0
  442. package/dist/components/radio-group.d.ts +2 -0
  443. package/dist/components/radio-group.js +3 -0
  444. package/dist/components/scroll-area/index.d.ts +2 -0
  445. package/dist/components/scroll-area/index.d.ts.map +1 -0
  446. package/dist/components/scroll-area/pk-scroll-area.d.ts +53 -0
  447. package/dist/components/scroll-area/pk-scroll-area.d.ts.map +1 -0
  448. package/dist/components/scroll-area/pk-scroll-area.js +2 -0
  449. package/dist/components/scroll-area/pk-scroll-area.styles.d.ts +2 -0
  450. package/dist/components/scroll-area/pk-scroll-area.styles.d.ts.map +1 -0
  451. package/dist/components/scroll-area.d.ts +2 -0
  452. package/dist/components/scroll-area.js +2 -0
  453. package/dist/components/select/index.d.ts +4 -0
  454. package/dist/components/select/index.d.ts.map +1 -0
  455. package/dist/components/select/pk-option-group.d.ts +22 -0
  456. package/dist/components/select/pk-option-group.d.ts.map +1 -0
  457. package/dist/components/select/pk-option-group.js +2 -0
  458. package/dist/components/select/pk-option-group.styles.d.ts +2 -0
  459. package/dist/components/select/pk-option-group.styles.d.ts.map +1 -0
  460. package/dist/components/select/pk-option.d.ts +55 -0
  461. package/dist/components/select/pk-option.d.ts.map +1 -0
  462. package/dist/components/select/pk-option.js +2 -0
  463. package/dist/components/select/pk-option.styles.d.ts +2 -0
  464. package/dist/components/select/pk-option.styles.d.ts.map +1 -0
  465. package/dist/components/select/pk-select.d.ts +132 -0
  466. package/dist/components/select/pk-select.d.ts.map +1 -0
  467. package/dist/components/select/pk-select.js +2 -0
  468. package/dist/components/select/pk-select.styles.d.ts +2 -0
  469. package/dist/components/select/pk-select.styles.d.ts.map +1 -0
  470. package/dist/components/select.d.ts +2 -0
  471. package/dist/components/select.js +4 -0
  472. package/dist/components/separator/index.d.ts +2 -0
  473. package/dist/components/separator/index.d.ts.map +1 -0
  474. package/dist/components/separator/pk-separator.d.ts +25 -0
  475. package/dist/components/separator/pk-separator.d.ts.map +1 -0
  476. package/dist/components/separator/pk-separator.js +2 -0
  477. package/dist/components/separator/pk-separator.styles.d.ts +9 -0
  478. package/dist/components/separator/pk-separator.styles.d.ts.map +1 -0
  479. package/dist/components/separator.d.ts +2 -0
  480. package/dist/components/separator.js +2 -0
  481. package/dist/components/spinner/index.d.ts +3 -0
  482. package/dist/components/spinner/index.d.ts.map +1 -0
  483. package/dist/components/spinner/pk-spinner.d.ts +23 -0
  484. package/dist/components/spinner/pk-spinner.d.ts.map +1 -0
  485. package/dist/components/spinner/pk-spinner.js +2 -0
  486. package/dist/components/spinner/pk-spinner.styles.d.ts +2 -0
  487. package/dist/components/spinner/pk-spinner.styles.d.ts.map +1 -0
  488. package/dist/components/spinner/spinner-utils.d.ts +7 -0
  489. package/dist/components/spinner/spinner-utils.d.ts.map +1 -0
  490. package/dist/components/spinner.d.ts +2 -0
  491. package/dist/components/spinner.js +3 -0
  492. package/dist/components/status/index.d.ts +2 -0
  493. package/dist/components/status/index.d.ts.map +1 -0
  494. package/dist/components/status/pk-status.d.ts +19 -0
  495. package/dist/components/status/pk-status.d.ts.map +1 -0
  496. package/dist/components/status/pk-status.js +2 -0
  497. package/dist/components/status/pk-status.styles.d.ts +2 -0
  498. package/dist/components/status/pk-status.styles.d.ts.map +1 -0
  499. package/dist/components/status.d.ts +2 -0
  500. package/dist/components/status.js +2 -0
  501. package/dist/components/tabs/index.d.ts +5 -0
  502. package/dist/components/tabs/index.d.ts.map +1 -0
  503. package/dist/components/tabs/pk-tab-base.d.ts +14 -0
  504. package/dist/components/tabs/pk-tab-base.d.ts.map +1 -0
  505. package/dist/components/tabs/pk-tab-heading.d.ts +20 -0
  506. package/dist/components/tabs/pk-tab-heading.d.ts.map +1 -0
  507. package/dist/components/tabs/pk-tab-heading.js +2 -0
  508. package/dist/components/tabs/pk-tab-heading.styles.d.ts +2 -0
  509. package/dist/components/tabs/pk-tab-heading.styles.d.ts.map +1 -0
  510. package/dist/components/tabs/pk-tab-panel-base.d.ts +9 -0
  511. package/dist/components/tabs/pk-tab-panel-base.d.ts.map +1 -0
  512. package/dist/components/tabs/pk-tab-panel.d.ts +18 -0
  513. package/dist/components/tabs/pk-tab-panel.d.ts.map +1 -0
  514. package/dist/components/tabs/pk-tab-panel.js +2 -0
  515. package/dist/components/tabs/pk-tab-panel.styles.d.ts +2 -0
  516. package/dist/components/tabs/pk-tab-panel.styles.d.ts.map +1 -0
  517. package/dist/components/tabs/pk-tab.d.ts +23 -0
  518. package/dist/components/tabs/pk-tab.d.ts.map +1 -0
  519. package/dist/components/tabs/pk-tab.js +2 -0
  520. package/dist/components/tabs/pk-tab.styles.d.ts +2 -0
  521. package/dist/components/tabs/pk-tab.styles.d.ts.map +1 -0
  522. package/dist/components/tabs/pk-tabs.d.ts +67 -0
  523. package/dist/components/tabs/pk-tabs.d.ts.map +1 -0
  524. package/dist/components/tabs/pk-tabs.js +2 -0
  525. package/dist/components/tabs/pk-tabs.styles.d.ts +6 -0
  526. package/dist/components/tabs/pk-tabs.styles.d.ts.map +1 -0
  527. package/dist/components/tabs.d.ts +2 -0
  528. package/dist/components/tabs.js +5 -0
  529. package/dist/components/textarea/index.d.ts +2 -0
  530. package/dist/components/textarea/index.d.ts.map +1 -0
  531. package/dist/components/textarea/pk-textarea.d.ts +60 -0
  532. package/dist/components/textarea/pk-textarea.d.ts.map +1 -0
  533. package/dist/components/textarea/pk-textarea.js +2 -0
  534. package/dist/components/textarea/pk-textarea.styles.d.ts +2 -0
  535. package/dist/components/textarea/pk-textarea.styles.d.ts.map +1 -0
  536. package/dist/components/textarea.d.ts +2 -0
  537. package/dist/components/textarea.js +2 -0
  538. package/dist/components/time-picker/index.d.ts +2 -0
  539. package/dist/components/time-picker/index.d.ts.map +1 -0
  540. package/dist/components/time-picker/pk-time-picker.d.ts +25 -0
  541. package/dist/components/time-picker/pk-time-picker.d.ts.map +1 -0
  542. package/dist/components/time-picker/pk-time-picker.js +2 -0
  543. package/dist/components/time-picker/pk-time-picker.styles.d.ts +2 -0
  544. package/dist/components/time-picker/pk-time-picker.styles.d.ts.map +1 -0
  545. package/dist/components/time-picker.d.ts +2 -0
  546. package/dist/components/time-picker.js +2 -0
  547. package/dist/components/tiptap/index.d.ts +4 -0
  548. package/dist/components/tiptap/index.d.ts.map +1 -0
  549. package/dist/components/tiptap/pk-tiptap-content.d.ts +25 -0
  550. package/dist/components/tiptap/pk-tiptap-content.d.ts.map +1 -0
  551. package/dist/components/tiptap/pk-tiptap-content.js +2 -0
  552. package/dist/components/tiptap/pk-tiptap-content.styles.d.ts +2 -0
  553. package/dist/components/tiptap/pk-tiptap-content.styles.d.ts.map +1 -0
  554. package/dist/components/tiptap/pk-tiptap-editor.d.ts +123 -0
  555. package/dist/components/tiptap/pk-tiptap-editor.d.ts.map +1 -0
  556. package/dist/components/tiptap/pk-tiptap-editor.js +2 -0
  557. package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts +2 -0
  558. package/dist/components/tiptap/pk-tiptap-editor.styles.d.ts.map +1 -0
  559. package/dist/components/tiptap/pk-tiptap-input.d.ts +54 -0
  560. package/dist/components/tiptap/pk-tiptap-input.d.ts.map +1 -0
  561. package/dist/components/tiptap/pk-tiptap-input.js +2 -0
  562. package/dist/components/tiptap/pk-tiptap-input.styles.d.ts +2 -0
  563. package/dist/components/tiptap/pk-tiptap-input.styles.d.ts.map +1 -0
  564. package/dist/components/tiptap/tiptap-editor-host.d.ts +28 -0
  565. package/dist/components/tiptap/tiptap-editor-host.d.ts.map +1 -0
  566. package/dist/components/tiptap/tiptap-toolbar.d.ts +7 -0
  567. package/dist/components/tiptap/tiptap-toolbar.d.ts.map +1 -0
  568. package/dist/components/tiptap/tiptap-utils.d.ts +13 -0
  569. package/dist/components/tiptap/tiptap-utils.d.ts.map +1 -0
  570. package/dist/components/tiptap/tiptap.styles.d.ts +12 -0
  571. package/dist/components/tiptap/tiptap.styles.d.ts.map +1 -0
  572. package/dist/components/tiptap/variable-tag-node-view.d.ts +17 -0
  573. package/dist/components/tiptap/variable-tag-node-view.d.ts.map +1 -0
  574. package/dist/components/tiptap-content.d.ts +2 -0
  575. package/dist/components/tiptap-content.js +2 -0
  576. package/dist/components/tiptap-editor.d.ts +2 -0
  577. package/dist/components/tiptap-editor.js +2 -0
  578. package/dist/components/tiptap-input.d.ts +2 -0
  579. package/dist/components/tiptap-input.js +2 -0
  580. package/dist/components/toggle/index.d.ts +2 -0
  581. package/dist/components/toggle/index.d.ts.map +1 -0
  582. package/dist/components/toggle/pk-toggle.d.ts +28 -0
  583. package/dist/components/toggle/pk-toggle.d.ts.map +1 -0
  584. package/dist/components/toggle/pk-toggle.js +2 -0
  585. package/dist/components/toggle/pk-toggle.styles.d.ts +2 -0
  586. package/dist/components/toggle/pk-toggle.styles.d.ts.map +1 -0
  587. package/dist/components/toggle-group/index.d.ts +2 -0
  588. package/dist/components/toggle-group/index.d.ts.map +1 -0
  589. package/dist/components/toggle-group/pk-toggle-group.d.ts +43 -0
  590. package/dist/components/toggle-group/pk-toggle-group.d.ts.map +1 -0
  591. package/dist/components/toggle-group/pk-toggle-group.js +2 -0
  592. package/dist/components/toggle-group/pk-toggle-group.styles.d.ts +2 -0
  593. package/dist/components/toggle-group/pk-toggle-group.styles.d.ts.map +1 -0
  594. package/dist/components/toggle-group.d.ts +2 -0
  595. package/dist/components/toggle-group.js +2 -0
  596. package/dist/components/toggle.d.ts +2 -0
  597. package/dist/components/toggle.js +2 -0
  598. package/dist/components/tooltip/index.d.ts +2 -0
  599. package/dist/components/tooltip/index.d.ts.map +1 -0
  600. package/dist/components/tooltip/pk-tooltip.d.ts +73 -0
  601. package/dist/components/tooltip/pk-tooltip.d.ts.map +1 -0
  602. package/dist/components/tooltip/pk-tooltip.js +2 -0
  603. package/dist/components/tooltip/pk-tooltip.styles.d.ts +2 -0
  604. package/dist/components/tooltip/pk-tooltip.styles.d.ts.map +1 -0
  605. package/dist/components/tooltip.d.ts +2 -0
  606. package/dist/components/tooltip.js +2 -0
  607. package/dist/create-register-components.d.ts +7 -0
  608. package/dist/create-register-components.d.ts.map +1 -0
  609. package/dist/events/overlay-lifecycle.d.ts +27 -0
  610. package/dist/events/overlay-lifecycle.d.ts.map +1 -0
  611. package/dist/events/pk-clear.d.ts +10 -0
  612. package/dist/events/pk-clear.d.ts.map +1 -0
  613. package/dist/events/pk-copy.d.ts +18 -0
  614. package/dist/events/pk-copy.d.ts.map +1 -0
  615. package/dist/events/pk-create.d.ts +11 -0
  616. package/dist/events/pk-create.d.ts.map +1 -0
  617. package/dist/events/pk-invalid.d.ts +10 -0
  618. package/dist/events/pk-invalid.d.ts.map +1 -0
  619. package/dist/events/pk-reposition.d.ts +10 -0
  620. package/dist/events/pk-reposition.d.ts.map +1 -0
  621. package/dist/icons/checkbox-indicators.d.ts +6 -0
  622. package/dist/icons/checkbox-indicators.d.ts.map +1 -0
  623. package/dist/icons/index.d.ts +4 -0
  624. package/dist/icons/index.d.ts.map +1 -0
  625. package/dist/icons/index.js +4 -0
  626. package/dist/icons/render.d.ts +7 -0
  627. package/dist/icons/render.d.ts.map +1 -0
  628. package/dist/icons/translation-icon.d.ts +2 -0
  629. package/dist/icons/translation-icon.d.ts.map +1 -0
  630. package/dist/index.d.ts +52 -0
  631. package/dist/index.d.ts.map +1 -0
  632. package/dist/index.js +218 -0
  633. package/dist/index.js.map +1 -0
  634. package/dist/internal/control-aria.d.ts +31 -0
  635. package/dist/internal/control-aria.d.ts.map +1 -0
  636. package/dist/internal/field-aria.d.ts +19 -0
  637. package/dist/internal/field-aria.d.ts.map +1 -0
  638. package/dist/internal/field-labels.d.ts +5 -0
  639. package/dist/internal/field-labels.d.ts.map +1 -0
  640. package/dist/internal/has-slot.d.ts +30 -0
  641. package/dist/internal/has-slot.d.ts.map +1 -0
  642. package/dist/internal/implicit-form-submit.d.ts +15 -0
  643. package/dist/internal/implicit-form-submit.d.ts.map +1 -0
  644. package/dist/internal/resolve-element-by-id.d.ts +3 -0
  645. package/dist/internal/resolve-element-by-id.d.ts.map +1 -0
  646. package/dist/internal/sync-listbox-separators.d.ts +3 -0
  647. package/dist/internal/sync-listbox-separators.d.ts.map +1 -0
  648. package/dist/plugin-kit.css +583 -0
  649. package/dist/plugin-kit.d.ts +9 -0
  650. package/dist/plugin-kit.d.ts.map +1 -0
  651. package/dist/plugin-kit.js +267 -0
  652. package/dist/plugin-kit.js.map +1 -0
  653. package/dist/plugin-kit.loader.d.ts +2 -0
  654. package/dist/plugin-kit.loader.d.ts.map +1 -0
  655. package/dist/register-components.d.ts +3 -0
  656. package/dist/register-components.d.ts.map +1 -0
  657. package/dist/register-components.js +2 -0
  658. package/dist/register-pk.generated.d.ts +103 -0
  659. package/dist/register-pk.generated.d.ts.map +1 -0
  660. package/dist/register.d.ts +85 -0
  661. package/dist/register.d.ts.map +1 -0
  662. package/dist/register.js +146 -0
  663. package/dist/register.js.map +1 -0
  664. package/dist/styles/overlay-content.css +64 -0
  665. package/dist/styles/popup-content-animation.styles.d.ts +9 -0
  666. package/dist/styles/popup-content-animation.styles.d.ts.map +1 -0
  667. package/dist/tokens.css +408 -0
  668. package/dist/utilities/autoloader.d.ts +8 -0
  669. package/dist/utilities/autoloader.d.ts.map +1 -0
  670. package/dist/utilities/base-path.d.ts +3 -0
  671. package/dist/utilities/base-path.d.ts.map +1 -0
  672. package/dist/utilities/defined.d.ts +17 -0
  673. package/dist/utilities/defined.d.ts.map +1 -0
  674. package/dist/utilities/fouce-strategy.d.ts +43 -0
  675. package/dist/utilities/fouce-strategy.d.ts.map +1 -0
  676. package/dist/utilities/fouce.css +108 -0
  677. package/dist/utils/animate-with-class.d.ts +7 -0
  678. package/dist/utils/animate-with-class.d.ts.map +1 -0
  679. package/dist/utils/config.d.ts +15 -0
  680. package/dist/utils/config.d.ts.map +1 -0
  681. package/dist/utils/copy-to-clipboard.d.ts +5 -0
  682. package/dist/utils/copy-to-clipboard.d.ts.map +1 -0
  683. package/dist/utils/craft-host-modal.d.ts +19 -0
  684. package/dist/utils/craft-host-modal.d.ts.map +1 -0
  685. package/dist/utils/date-matchers.d.ts +29 -0
  686. package/dist/utils/date-matchers.d.ts.map +1 -0
  687. package/dist/utils/date.d.ts +23 -0
  688. package/dist/utils/date.d.ts.map +1 -0
  689. package/dist/utils/documentScrollStability.d.ts +11 -0
  690. package/dist/utils/documentScrollStability.d.ts.map +1 -0
  691. package/dist/utils/floating-ui.d.ts +14 -0
  692. package/dist/utils/floating-ui.d.ts.map +1 -0
  693. package/dist/utils/highlight-text.d.ts +7 -0
  694. package/dist/utils/highlight-text.d.ts.map +1 -0
  695. package/dist/utils/host-date.d.ts +8 -0
  696. package/dist/utils/host-date.d.ts.map +1 -0
  697. package/dist/utils/inline-markdown.d.ts +6 -0
  698. package/dist/utils/inline-markdown.d.ts.map +1 -0
  699. package/dist/utils/listbox-keyboard.d.ts +25 -0
  700. package/dist/utils/listbox-keyboard.d.ts.map +1 -0
  701. package/dist/utils/menu-keyboard.d.ts +15 -0
  702. package/dist/utils/menu-keyboard.d.ts.map +1 -0
  703. package/dist/utils/mount-shadow-app.d.ts +31 -0
  704. package/dist/utils/mount-shadow-app.d.ts.map +1 -0
  705. package/dist/utils/overlay-recovery.d.ts +39 -0
  706. package/dist/utils/overlay-recovery.d.ts.map +1 -0
  707. package/dist/utils/popup-placement-animation.d.ts +26 -0
  708. package/dist/utils/popup-placement-animation.d.ts.map +1 -0
  709. package/dist/utils/popup-pointer.d.ts +15 -0
  710. package/dist/utils/popup-pointer.d.ts.map +1 -0
  711. package/dist/utils/portal.d.ts +16 -0
  712. package/dist/utils/portal.d.ts.map +1 -0
  713. package/dist/utils/supports-popover.d.ts +3 -0
  714. package/dist/utils/supports-popover.d.ts.map +1 -0
  715. package/dist/utils/time-options.d.ts +16 -0
  716. package/dist/utils/time-options.d.ts.map +1 -0
  717. package/dist/utils/top-layer.d.ts +34 -0
  718. package/dist/utils/top-layer.d.ts.map +1 -0
  719. package/dist/utils/week-info.d.ts +14 -0
  720. package/dist/utils/week-info.d.ts.map +1 -0
  721. package/dist/validators/custom-error-validator.d.ts +3 -0
  722. package/dist/validators/custom-error-validator.d.ts.map +1 -0
  723. package/dist/validators/index.d.ts +6 -0
  724. package/dist/validators/index.d.ts.map +1 -0
  725. package/dist/validators/mirror-validator.d.ts +4 -0
  726. package/dist/validators/mirror-validator.d.ts.map +1 -0
  727. package/dist/validators/required-validator.d.ts +7 -0
  728. package/dist/validators/required-validator.d.ts.map +1 -0
  729. package/dist/validators/types.d.ts +12 -0
  730. package/dist/validators/types.d.ts.map +1 -0
  731. package/dist-loader/chunks/animate-with-class-DT0jwaR_.js +40 -0
  732. package/dist-loader/chunks/button-group-item.styles-Dwakbyx5.js +145 -0
  733. package/dist-loader/chunks/codemirror-CSgOT0QM.js +23675 -0
  734. package/dist-loader/chunks/field-labels-D3lKQ2nq.js +12 -0
  735. package/dist-loader/chunks/floating-ui-87vslRWW.js +1220 -0
  736. package/dist-loader/chunks/has-slot-BGJeJdHr.js +72 -0
  737. package/dist-loader/chunks/icons-B1i-oRoD.js +429 -0
  738. package/dist-loader/chunks/lit-Dnn7gEi2.js +891 -0
  739. package/dist-loader/chunks/mirror-validator-C5XrXPaq.js +30 -0
  740. package/dist-loader/chunks/overlay-lifecycle-C3tSQ3UR.js +42 -0
  741. package/dist-loader/chunks/pk-a11y-Cx5RZvhu.js +274 -0
  742. package/dist-loader/chunks/pk-base-BlxAYXJD.js +705 -0
  743. package/dist-loader/chunks/pk-button-BlSs4e6V.js +846 -0
  744. package/dist-loader/chunks/pk-calendar-RXCDDhLI.js +1403 -0
  745. package/dist-loader/chunks/pk-checkbox-hJCj8In8.js +273 -0
  746. package/dist-loader/chunks/pk-clear-BMZUzwDt.js +13 -0
  747. package/dist-loader/chunks/pk-color-input-BfNtLznP.js +393 -0
  748. package/dist-loader/chunks/pk-combobox-1PJBcIrV.js +2006 -0
  749. package/dist-loader/chunks/pk-date-picker-D4vCtbw-.js +708 -0
  750. package/dist-loader/chunks/pk-dialog-D1RZjwQN.js +630 -0
  751. package/dist-loader/chunks/pk-dropdown-item-BJIhQ0Mw.js +543 -0
  752. package/dist-loader/chunks/pk-dropdown-menu-I1s3TBiA.js +731 -0
  753. package/dist-loader/chunks/pk-field-BnKPT_Kk.js +5842 -0
  754. package/dist-loader/chunks/pk-input-Oarjv7Vc.js +715 -0
  755. package/dist-loader/chunks/pk-lightswitch-D-UrNM3y.js +427 -0
  756. package/dist-loader/chunks/pk-option-CCZebfif.js +308 -0
  757. package/dist-loader/chunks/pk-popup-BNRyCsVX.js +553 -0
  758. package/dist-loader/chunks/pk-select-BcbtjIoP.js +1120 -0
  759. package/dist-loader/chunks/pk-spinner-Di9O69-m.js +145 -0
  760. package/dist-loader/chunks/pk-textarea-CC6WXpIu.js +334 -0
  761. package/dist-loader/chunks/pk-time-picker-BtGXo-KJ.js +225 -0
  762. package/dist-loader/chunks/pk-tooltip-JJRxVXYD.js +465 -0
  763. package/dist-loader/chunks/popup-content-animation.styles-S6CK-zPp.js +115 -0
  764. package/dist-loader/chunks/popup-placement-animation-WlEXnS85.js +58 -0
  765. package/dist-loader/chunks/popup-pointer-BC4n_sNb.js +19 -0
  766. package/dist-loader/chunks/registry-CmL0rH9r.js +55 -0
  767. package/dist-loader/chunks/render-DApFfV9S.js +14 -0
  768. package/dist-loader/chunks/required-validator-0XwZtX9k.js +27 -0
  769. package/dist-loader/chunks/rolldown-runtime-CzwdidQP.js +13 -0
  770. package/dist-loader/chunks/supports-popover-COjbi2RP.js +5 -0
  771. package/dist-loader/chunks/svg-Boar0Kf1.js +34 -0
  772. package/dist-loader/chunks/sync-listbox-separators-Bcja51HC.js +147 -0
  773. package/dist-loader/chunks/tiptap-Db7MTUH1.js +22888 -0
  774. package/dist-loader/chunks/tiptap.styles-DAH_90Fi.js +1628 -0
  775. package/dist-loader/components/button/button.js +2 -0
  776. package/dist-loader/components/button-group/button-group-separator.js +58 -0
  777. package/dist-loader/components/button-group/button-group-text.js +46 -0
  778. package/dist-loader/components/button-group/button-group.js +419 -0
  779. package/dist-loader/components/calendar/calendar.js +2 -0
  780. package/dist-loader/components/checkbox/checkbox.js +2 -0
  781. package/dist-loader/components/checkbox-select/checkbox-select.js +217 -0
  782. package/dist-loader/components/code-editor/code-editor.js +376 -0
  783. package/dist-loader/components/color-input/color-input.js +2 -0
  784. package/dist-loader/components/combobox/combobox.js +2 -0
  785. package/dist-loader/components/copy-button/copy-button.js +135 -0
  786. package/dist-loader/components/date-picker/date-picker.js +2 -0
  787. package/dist-loader/components/dialog/dialog.js +2 -0
  788. package/dist-loader/components/dropdown-menu/dropdown-item.js +2 -0
  789. package/dist-loader/components/dropdown-menu/dropdown-label.js +45 -0
  790. package/dist-loader/components/dropdown-menu/dropdown-menu.js +2 -0
  791. package/dist-loader/components/dropdown-menu/dropdown-separator.js +33 -0
  792. package/dist-loader/components/editable-table/editable-table.js +1522 -0
  793. package/dist-loader/components/field/field.js +2 -0
  794. package/dist-loader/components/icon/icon.js +17 -0
  795. package/dist-loader/components/input/input.js +2 -0
  796. package/dist-loader/components/input-group/input-group-addon.js +98 -0
  797. package/dist-loader/components/input-group/input-group-button.js +52 -0
  798. package/dist-loader/components/input-group/input-group-input.js +132 -0
  799. package/dist-loader/components/input-group/input-group-text.js +37 -0
  800. package/dist-loader/components/input-group/input-group-textarea.js +110 -0
  801. package/dist-loader/components/input-group/input-group.js +234 -0
  802. package/dist-loader/components/lightswitch/lightswitch.js +2 -0
  803. package/dist-loader/components/popover/popover.js +372 -0
  804. package/dist-loader/components/popup/popup.js +2 -0
  805. package/dist-loader/components/radio-group/radio-group.js +247 -0
  806. package/dist-loader/components/radio-group/radio.js +229 -0
  807. package/dist-loader/components/scroll-area/scroll-area.js +398 -0
  808. package/dist-loader/components/select/option-group.js +69 -0
  809. package/dist-loader/components/select/option.js +2 -0
  810. package/dist-loader/components/select/select.js +2 -0
  811. package/dist-loader/components/separator/separator.js +86 -0
  812. package/dist-loader/components/spinner/spinner.js +2 -0
  813. package/dist-loader/components/status/status.js +89 -0
  814. package/dist-loader/components/tabs/tab-heading.js +47 -0
  815. package/dist-loader/components/tabs/tab-panel.js +83 -0
  816. package/dist-loader/components/tabs/tab.js +256 -0
  817. package/dist-loader/components/tabs/tabs.js +619 -0
  818. package/dist-loader/components/textarea/textarea.js +2 -0
  819. package/dist-loader/components/time-picker/time-picker.js +2 -0
  820. package/dist-loader/components/tiptap/tiptap-content.js +72 -0
  821. package/dist-loader/components/tiptap/tiptap-editor.js +1078 -0
  822. package/dist-loader/components/tiptap/tiptap-input.js +244 -0
  823. package/dist-loader/components/toggle/toggle.js +253 -0
  824. package/dist-loader/components/toggle-group/toggle-group.js +172 -0
  825. package/dist-loader/components/tooltip/tooltip.js +2 -0
  826. package/dist-loader/plugin-kit.css +583 -0
  827. package/dist-loader/plugin-kit.d.ts +9 -0
  828. package/dist-loader/plugin-kit.d.ts.map +1 -0
  829. package/dist-loader/plugin-kit.loader.d.ts +2 -0
  830. package/dist-loader/plugin-kit.loader.d.ts.map +1 -0
  831. package/dist-loader/plugin-kit.loader.js +527 -0
  832. package/dist-loader/styles/overlay-content.css +64 -0
  833. package/dist-loader/tokens.css +408 -0
  834. package/dist-loader/utilities/autoloader.d.ts +8 -0
  835. package/dist-loader/utilities/autoloader.d.ts.map +1 -0
  836. package/dist-loader/utilities/base-path.d.ts +3 -0
  837. package/dist-loader/utilities/base-path.d.ts.map +1 -0
  838. package/dist-loader/utilities/defined.d.ts +17 -0
  839. package/dist-loader/utilities/defined.d.ts.map +1 -0
  840. package/dist-loader/utilities/fouce-strategy.d.ts +43 -0
  841. package/dist-loader/utilities/fouce-strategy.d.ts.map +1 -0
  842. package/dist-loader/utilities/fouce.css +108 -0
  843. package/package.json +961 -0
@@ -0,0 +1,1522 @@
1
+ import { c as r, f as A, i as e, l as n, m as i, o, p as b, t as c, u as t } from "../../chunks/lit-Dnn7gEi2.js";
2
+ import { c as __decorate, i as PkFormAssociatedElement } from "../../chunks/pk-base-BlxAYXJD.js";
3
+ import { R as plus, a as arrowDown, c as arrowUp, q as xmark, x as gear, y as ellipsis } from "../../chunks/icons-B1i-oRoD.js";
4
+ import { t as getIcon } from "../../chunks/registry-CmL0rH9r.js";
5
+ import { t as RequiredValidator } from "../../chunks/required-validator-0XwZtX9k.js";
6
+ import { n as renderIconHtml } from "../../chunks/render-DApFfV9S.js";
7
+ //#region src/components/editable-table/editable-table-dnd.ts
8
+ /**
9
+ * Table-native pointer drag for `<pk-editable-table>` rows.
10
+ *
11
+ * The live source `<tr>` becomes the floating overlay (same custom-element
12
+ * instances — no clone reflow / “shift”). A hidden placeholder clone stays in
13
+ * the tbody as the gap. Overlay motion is vertical-axis + tbody constrained.
14
+ * Gap steps when the probe enters ~30% of a neighbor (direction-aware).
15
+ * Drop commits by reading `data-row-id` order after seating — not index arithmetic.
16
+ */
17
+ var EditableTableDndController = class EditableTableDndController {
18
+ static {
19
+ this.SWAP_INSET = .3;
20
+ }
21
+ constructor(callbacks) {
22
+ this.callbacks = callbacks;
23
+ this.rows = [];
24
+ this.disabled = false;
25
+ this.handleCleanups = [];
26
+ this.dragSession = null;
27
+ }
28
+ get isActive() {
29
+ return this.handleCleanups.length > 0;
30
+ }
31
+ /** Lit must not reconcile tbody while pointer drag owns row order. */
32
+ get isSessionActive() {
33
+ return this.dragSession !== null;
34
+ }
35
+ sync(rows, disabled) {
36
+ if (this.dragSession) return;
37
+ this.destroyHandles();
38
+ this.rows = rows;
39
+ this.disabled = disabled;
40
+ for (const row of rows) {
41
+ if (!row.handle) continue;
42
+ const onPointerDown = (event) => {
43
+ this.handlePointerDown(event, row);
44
+ };
45
+ row.handle.addEventListener("pointerdown", onPointerDown);
46
+ this.handleCleanups.push(() => {
47
+ row.handle?.removeEventListener("pointerdown", onPointerDown);
48
+ });
49
+ }
50
+ }
51
+ destroy() {
52
+ this.cancelDrag();
53
+ this.destroyHandles();
54
+ this.rows = [];
55
+ }
56
+ handlePointerDown(event, row) {
57
+ if (this.disabled || this.dragSession || event.button !== 0 || !event.isPrimary) return;
58
+ const fromIndex = this.rows.findIndex((candidate) => candidate.id === row.id);
59
+ const tbody = row.element.parentElement;
60
+ const table = row.element.closest("table");
61
+ if (fromIndex < 0 || !(tbody instanceof HTMLTableSectionElement) || !(table instanceof HTMLTableElement)) return;
62
+ event.preventDefault();
63
+ const cellWidths = [...row.element.cells].map((cell) => cell.getBoundingClientRect().width);
64
+ const unfreezeColumns = this.freezeTableColumns(table, cellWidths);
65
+ const sourceRect = row.element.getBoundingClientRect();
66
+ const tbodyRect = tbody.getBoundingClientRect();
67
+ const pointerOffset = {
68
+ x: event.clientX - sourceRect.left,
69
+ y: event.clientY - sourceRect.top
70
+ };
71
+ const placeholder = this.createPlaceholder(row.element, cellWidths, sourceRect.height);
72
+ row.element.insertAdjacentElement("afterend", placeholder);
73
+ const fixedOrigin = this.liftRow(row.element, sourceRect, cellWidths);
74
+ const session = {
75
+ row,
76
+ fromIndex,
77
+ table,
78
+ tbody,
79
+ placeholder,
80
+ pointerId: event.pointerId,
81
+ pointerOffset,
82
+ startLeft: sourceRect.left,
83
+ rowHeight: sourceRect.height,
84
+ tbodyTop: tbodyRect.top,
85
+ tbodyBottom: tbodyRect.bottom,
86
+ fixedOrigin,
87
+ unfreezeColumns,
88
+ cleanup: [],
89
+ committed: false
90
+ };
91
+ const doc = row.element.ownerDocument;
92
+ const onPointerMove = (moveEvent) => {
93
+ if (moveEvent.pointerId !== session.pointerId || session.committed) return;
94
+ moveEvent.preventDefault();
95
+ const liveTbody = session.tbody.getBoundingClientRect();
96
+ session.tbodyTop = liveTbody.top;
97
+ session.tbodyBottom = liveTbody.bottom;
98
+ this.updateOverlay(session, moveEvent.clientY);
99
+ this.updateGap(session, moveEvent.clientY - session.pointerOffset.y + session.rowHeight / 2);
100
+ };
101
+ const onPointerUp = (upEvent) => {
102
+ if (upEvent.pointerId !== session.pointerId || session.committed) return;
103
+ upEvent.preventDefault();
104
+ this.commitDrag(session);
105
+ };
106
+ const onPointerCancel = (cancelEvent) => {
107
+ if (cancelEvent.pointerId !== session.pointerId || session.committed) return;
108
+ this.cancelDrag();
109
+ };
110
+ doc.addEventListener("pointermove", onPointerMove, { passive: false });
111
+ doc.addEventListener("pointerup", onPointerUp, { passive: false });
112
+ doc.addEventListener("pointercancel", onPointerCancel);
113
+ session.cleanup.push(() => {
114
+ doc.removeEventListener("pointermove", onPointerMove);
115
+ }, () => {
116
+ doc.removeEventListener("pointerup", onPointerUp);
117
+ }, () => {
118
+ doc.removeEventListener("pointercancel", onPointerCancel);
119
+ });
120
+ this.dragSession = session;
121
+ this.updateOverlay(session, event.clientY);
122
+ }
123
+ /** Vertical-axis + tbody-container constraints on the live floated row. */
124
+ updateOverlay(session, clientY) {
125
+ const rawTop = clientY - session.pointerOffset.y;
126
+ const minTop = session.tbodyTop;
127
+ const maxTop = Math.max(minTop, session.tbodyBottom - session.rowHeight);
128
+ const top = Math.min(maxTop, Math.max(minTop, rawTop));
129
+ const row = session.row.element;
130
+ row.style.top = `${top - session.fixedOrigin.y}px`;
131
+ row.style.left = `${session.startLeft - session.fixedOrigin.x}px`;
132
+ }
133
+ /**
134
+ * Project the gap from the probe against the full row list.
135
+ * Threshold is direction-aware so drag-up and drag-down feel the same.
136
+ */
137
+ updateGap(session, probeY) {
138
+ const placeholder = session.placeholder;
139
+ const source = session.row.element;
140
+ const rows = [...session.tbody.querySelectorAll("tr[data-row-id]")].filter((row) => row !== source && !row.hasAttribute("data-pk-dnd-placeholder"));
141
+ const placeholderRect = placeholder.getBoundingClientRect();
142
+ const movingUp = probeY < placeholderRect.top + placeholderRect.height / 2;
143
+ const inset = EditableTableDndController.SWAP_INSET;
144
+ let before = null;
145
+ for (const row of rows) {
146
+ const rect = row.getBoundingClientRect();
147
+ if (rect.height <= 0) continue;
148
+ if (probeY < (movingUp ? rect.top + rect.height * (1 - inset) : rect.top + rect.height * inset)) {
149
+ before = row;
150
+ break;
151
+ }
152
+ }
153
+ if (before) {
154
+ if (placeholder.nextElementSibling !== before) session.tbody.insertBefore(placeholder, before);
155
+ return;
156
+ }
157
+ if (session.tbody.lastElementChild !== placeholder) session.tbody.append(placeholder);
158
+ }
159
+ commitDrag(session) {
160
+ if (session.committed || this.dragSession !== session) return;
161
+ session.committed = true;
162
+ this.cleanupDrag(session);
163
+ this.dragSession = null;
164
+ const orderedIds = [...session.tbody.querySelectorAll("tr[data-row-id]")].map((row) => row.dataset.rowId ?? "").filter((id) => id !== "");
165
+ this.callbacks.onReorderTo(orderedIds);
166
+ }
167
+ cancelDrag() {
168
+ const session = this.dragSession;
169
+ if (!session || session.committed) return;
170
+ session.committed = true;
171
+ this.restorePlaceholderToOrigin(session);
172
+ this.cleanupDrag(session);
173
+ this.dragSession = null;
174
+ }
175
+ restorePlaceholderToOrigin(session) {
176
+ const others = [...session.tbody.querySelectorAll("tr[data-row-id]")].filter((row) => row !== session.row.element && !row.hasAttribute("data-pk-dnd-placeholder"));
177
+ if (session.fromIndex >= others.length) {
178
+ if (session.tbody.lastElementChild !== session.placeholder) session.tbody.append(session.placeholder);
179
+ return;
180
+ }
181
+ const before = others[session.fromIndex];
182
+ if (before && session.placeholder.nextElementSibling !== before) session.tbody.insertBefore(session.placeholder, before);
183
+ }
184
+ cleanupDrag(session) {
185
+ for (const cleanup of session.cleanup) cleanup();
186
+ const row = session.row.element;
187
+ session.placeholder.replaceWith(row);
188
+ this.unliftRow(row);
189
+ session.unfreezeColumns();
190
+ }
191
+ freezeTableColumns(table, widths) {
192
+ table.querySelector(":scope > colgroup[data-pk-dnd-cols]")?.remove();
193
+ const colgroup = table.ownerDocument.createElement("colgroup");
194
+ colgroup.setAttribute("data-pk-dnd-cols", "true");
195
+ for (const width of widths) {
196
+ const col = table.ownerDocument.createElement("col");
197
+ col.style.width = `${width}px`;
198
+ colgroup.append(col);
199
+ }
200
+ const previousLayout = table.style.tableLayout;
201
+ table.prepend(colgroup);
202
+ table.style.tableLayout = "fixed";
203
+ return () => {
204
+ colgroup.remove();
205
+ table.style.tableLayout = previousLayout;
206
+ };
207
+ }
208
+ createPlaceholder(row, cellWidths, height) {
209
+ const placeholder = row.cloneNode(true);
210
+ placeholder.setAttribute("data-pk-dnd-placeholder", "true");
211
+ placeholder.setAttribute("aria-hidden", "true");
212
+ placeholder.removeAttribute("data-row-id");
213
+ placeholder.style.visibility = "hidden";
214
+ placeholder.style.pointerEvents = "none";
215
+ placeholder.style.height = `${height}px`;
216
+ [...placeholder.cells].forEach((cell, index) => {
217
+ const width = cellWidths[index];
218
+ if (typeof width === "number") {
219
+ cell.style.width = `${width}px`;
220
+ cell.style.minWidth = `${width}px`;
221
+ cell.style.maxWidth = `${width}px`;
222
+ cell.style.boxSizing = "border-box";
223
+ }
224
+ cell.replaceChildren();
225
+ });
226
+ return placeholder;
227
+ }
228
+ /**
229
+ * Promote the live row to a fixed overlay. Same pattern dnd-kit Feedback uses
230
+ * for `<tr>`: pin cell widths, then position:fixed (raw TR rects go 0×0 otherwise).
231
+ *
232
+ * Returns the fixed-positioning origin in viewport coords. `position: fixed`
233
+ * is viewport-based only when no ancestor is a containing block; a transformed
234
+ * ancestor (pk-dialog panel animation, filters, contain) re-bases it, which
235
+ * silently threw the overlay outside the dialog and made the row "disappear".
236
+ */
237
+ liftRow(row, rect, cellWidths) {
238
+ row.classList.add("is-dragging");
239
+ [...row.cells].forEach((cell, index) => {
240
+ const width = cellWidths[index];
241
+ if (typeof width === "number") {
242
+ cell.style.width = `${width}px`;
243
+ cell.style.minWidth = `${width}px`;
244
+ cell.style.maxWidth = `${width}px`;
245
+ cell.style.boxSizing = "border-box";
246
+ }
247
+ });
248
+ row.style.position = "fixed";
249
+ row.style.top = "0px";
250
+ row.style.left = "0px";
251
+ row.style.width = `${rect.width}px`;
252
+ row.style.height = `${rect.height}px`;
253
+ row.style.margin = "0";
254
+ row.style.zIndex = "2147483647";
255
+ row.style.pointerEvents = "none";
256
+ row.style.boxShadow = "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)";
257
+ row.style.background = "var(--pk-color-white, #fff)";
258
+ row.style.opacity = "0.96";
259
+ const probe = row.getBoundingClientRect();
260
+ const fixedOrigin = {
261
+ x: probe.left,
262
+ y: probe.top
263
+ };
264
+ row.style.top = `${rect.top - fixedOrigin.y}px`;
265
+ row.style.left = `${rect.left - fixedOrigin.x}px`;
266
+ return fixedOrigin;
267
+ }
268
+ unliftRow(row) {
269
+ row.classList.remove("is-dragging");
270
+ row.style.position = "";
271
+ row.style.top = "";
272
+ row.style.left = "";
273
+ row.style.width = "";
274
+ row.style.height = "";
275
+ row.style.margin = "";
276
+ row.style.zIndex = "";
277
+ row.style.pointerEvents = "";
278
+ row.style.boxShadow = "";
279
+ row.style.background = "";
280
+ row.style.opacity = "";
281
+ for (const cell of row.cells) {
282
+ cell.style.width = "";
283
+ cell.style.minWidth = "";
284
+ cell.style.maxWidth = "";
285
+ cell.style.boxSizing = "";
286
+ }
287
+ }
288
+ destroyHandles() {
289
+ for (const cleanup of this.handleCleanups) cleanup();
290
+ this.handleCleanups = [];
291
+ }
292
+ };
293
+ //#endregion
294
+ //#region src/components/editable-table/pk-editable-table.styles.ts
295
+ var pkEditableTableStyles = i`
296
+ @layer pk-component {
297
+ :host {
298
+ display: block;
299
+ font-family: var(--pk-font-family);
300
+ /* Craft CP body text (~gray-700), not gray-900. */
301
+ color: var(--pk-color-gray-700);
302
+ /* Shell matches v1 Table: border-gray-200 + rounded-md (token md = 4px). */
303
+ --pk-et-border: 1px solid var(--pk-color-gray-200, #e5e7eb);
304
+ --pk-et-radius: var(--pk-radius-md, 4px);
305
+ --pk-et-gridline: var(--pk-color-gray-100, #f3f4f6);
306
+ /* Static row height — matches v1 TableCell h-[34px] (border-box). */
307
+ --pk-et-cell-height: 34px;
308
+ --pk-et-action-size: 24px;
309
+ --pk-et-action-icon: 12px;
310
+ /* Grip reads smaller than ellipsis/x at the same token — nudge up slightly. */
311
+ --pk-et-action-grip-icon: 14px;
312
+ }
313
+
314
+ /* v1 Table: shell scrolls horizontally; Add row sits outside so it stays full-width. */
315
+ .et-scroll {
316
+ width: 100%;
317
+ max-width: 100%;
318
+ overflow-x: auto;
319
+ overflow-y: hidden;
320
+ border: var(--pk-et-border);
321
+ border-radius: var(--pk-et-radius) var(--pk-et-radius) 0 0;
322
+ background: var(--pk-color-white, #fff);
323
+ }
324
+
325
+ .et {
326
+ /* v1 Table uses w-full: fill the shell, squish toward column width hints /
327
+ * content minima, then overflow-x on .et-scroll takes over. */
328
+ width: 100%;
329
+ border-collapse: separate;
330
+ border-spacing: 0;
331
+ background: var(--pk-color-white, #fff);
332
+ }
333
+
334
+ thead {
335
+ background: var(--pk-color-gray-50, #f8fafc);
336
+ }
337
+
338
+ thead th {
339
+ padding: 0.375rem 0.5rem;
340
+ text-align: left;
341
+ font-size: 12px;
342
+ font-weight: 500;
343
+ color: var(--pk-color-gray-700, #374151);
344
+ background: var(--pk-color-gray-50, #f8fafc);
345
+ /* v1 TableHead has no cell borders — body cells own the gridlines. */
346
+ border: 0;
347
+ white-space: nowrap;
348
+ }
349
+
350
+ tbody td + td {
351
+ border-inline-start: 1px solid var(--pk-et-gridline);
352
+ }
353
+
354
+ thead th.thin,
355
+ tbody td.thin {
356
+ width: 0.01%;
357
+ white-space: nowrap;
358
+ }
359
+
360
+ thead th.actions,
361
+ tbody td.actions {
362
+ width: 0.01%;
363
+ white-space: nowrap;
364
+ }
365
+
366
+ tbody td.actions {
367
+ padding-inline: 0.25rem;
368
+ /* v1 TableRow actions cell — soft cool wash so controls read as chrome, not data. */
369
+ background: #fbfcfe;
370
+ }
371
+
372
+ .required {
373
+ margin-left: 0.125rem;
374
+ color: var(--pk-color-rose-600, #e11d48);
375
+ }
376
+
377
+ tbody td {
378
+ box-sizing: border-box;
379
+ padding: 0;
380
+ height: var(--pk-et-cell-height);
381
+ background: var(--pk-color-white, #fff);
382
+ /* v1 TableCell: border-t gray-100 — also separates header once th borders are gone. */
383
+ border-top: 1px solid var(--pk-et-gridline);
384
+ vertical-align: middle;
385
+ /* Match v1 TableCell whitespace-nowrap — drives intrinsic mins before scroll. */
386
+ white-space: nowrap;
387
+ /* Let auto table layout compress past control preferred sizes. */
388
+ min-width: 0;
389
+ }
390
+
391
+ tbody tr.is-dragging {
392
+ opacity: 0.4;
393
+ }
394
+
395
+ /* Semantic row tones from modifyRow — host Tailwind cannot style shadow <tr>. */
396
+ tbody tr[data-tone='warning'] > td {
397
+ background: color-mix(in srgb, var(--pk-color-amber-50, #fffbeb) 80%, transparent);
398
+ }
399
+
400
+ tbody tr[data-tone='muted'] > td {
401
+ background: color-mix(in srgb, var(--pk-color-slate-100, #f1f5f9) 90%, transparent);
402
+ }
403
+
404
+ .cell-pk-control {
405
+ display: block;
406
+ width: 100%;
407
+ min-width: 0;
408
+ height: var(--pk-et-cell-height);
409
+ min-height: var(--pk-et-cell-height);
410
+ --pk-input-border-radius: 0;
411
+ --pk-select-border-radius: 0;
412
+ --pk-date-picker-border-radius: 0;
413
+ --pk-input-bg: var(--pk-color-white, #fff);
414
+ --pk-combobox-fill: var(--pk-color-white, #fff);
415
+ --pk-input-height: var(--pk-et-cell-height);
416
+ }
417
+
418
+ pk-input.cell-pk-control::part(base) {
419
+ padding-inline: 0.5rem;
420
+ background: var(--pk-color-white, #fff);
421
+ }
422
+
423
+ /* v1 EditableTable Input is text-sm (14px); size=xs would be 11px. */
424
+ pk-input.cell-pk-control:not([mono])::part(input) {
425
+ font-size: var(--pk-font-size-base, 14px);
426
+ }
427
+
428
+ /* v1 handle/value: font-mono text-[0.9em] — do not let the 14px cell
429
+ * override wipe pk-input[mono]'s optical scale. */
430
+ pk-input.cell-pk-control[mono]::part(input) {
431
+ font-size: calc(var(--pk-font-size-base, 14px) * 0.9);
432
+ line-height: var(--pk-line-height-mono, 1.5);
433
+ }
434
+
435
+ /* Select/combobox sit inset horizontally only (v1 TableCell px-2).
436
+ * No block padding — vertical inset comes from the size=xs chip itself. */
437
+ tbody td:has(> pk-select.cell-pk-control),
438
+ tbody td:has(> pk-combobox.cell-pk-control) {
439
+ padding: 0 0.5rem;
440
+ }
441
+
442
+ pk-select.cell-pk-control,
443
+ pk-combobox.cell-pk-control {
444
+ display: block;
445
+ width: 100%;
446
+ max-width: 100%;
447
+ min-width: 0;
448
+ /* Override shared .cell-pk-control height so the chip centers in the row. */
449
+ height: auto;
450
+ min-height: 0;
451
+ /* Don't inherit the 34px cell --pk-input-height into the trigger. */
452
+ --pk-input-height: auto;
453
+ --pk-select-item-min-height: 0;
454
+ }
455
+
456
+ pk-input.cell-pk-control {
457
+ /* Text-like cells fill the td. Inner input text keeps padding via ::part(base);
458
+ * invalid chrome should hit the gridlines, not sit inside an inset chip. */
459
+ height: var(--pk-et-cell-height);
460
+ min-height: var(--pk-et-cell-height);
461
+ }
462
+
463
+ /* Date/time fill the cell flush — no trigger chrome (v1 border-none + h/w-full).
464
+ * display:block so the inline-block host doesn't baseline-shift off center. */
465
+ pk-date-picker.cell-pk-control,
466
+ pk-time-picker.cell-pk-control {
467
+ display: block;
468
+ width: 100%;
469
+ min-width: 0;
470
+ height: var(--pk-et-cell-height);
471
+ --pk-date-picker-height: var(--pk-et-cell-height);
472
+ --pk-date-picker-min-width: 0;
473
+ --pk-select-item-min-height: var(--pk-et-cell-height);
474
+ --pk-select-trigger-border-width: 0;
475
+ }
476
+
477
+ /* The base trigger sizes to 100% of the host, but the shared form-control
478
+ * wrappers default to auto height, collapsing that chain and top-aligning
479
+ * the date. Stretch the wrappers so 100% resolves and align-items centers. */
480
+ pk-date-picker.cell-pk-control::part(form-control),
481
+ pk-date-picker.cell-pk-control::part(form-control-input) {
482
+ height: 100%;
483
+ }
484
+
485
+ pk-date-picker.cell-pk-control::part(base) {
486
+ width: 100%;
487
+ min-width: 0;
488
+ height: 100%;
489
+ min-height: 100%;
490
+ border: 0;
491
+ border-radius: 0;
492
+ background: transparent;
493
+ }
494
+
495
+ pk-date-picker.cell-pk-control::part(base):focus-visible {
496
+ box-shadow: inset 0 0 0 1px var(--pk-color-gray-200, #e5e7eb);
497
+ }
498
+
499
+ pk-time-picker.cell-pk-control::part(control) {
500
+ width: 100%;
501
+ min-width: 0;
502
+ height: 100% !important;
503
+ min-height: 100% !important;
504
+ border: 0 !important;
505
+ border-radius: 0 !important;
506
+ background: transparent !important;
507
+ background-color: transparent !important;
508
+ }
509
+
510
+ pk-time-picker.cell-pk-control::part(control):focus-visible {
511
+ box-shadow: inset 0 0 0 1px var(--pk-color-gray-200, #e5e7eb);
512
+ }
513
+
514
+ td.has-error .cell-pk-control {
515
+ --pk-input-border-color: var(--pk-color-rose-600, #e11d48);
516
+ }
517
+
518
+ /* Flush/borderless date/time only — select/combobox/color paint their own
519
+ * invalid chrome via ?invalid, so a host ring would double up. */
520
+ td.has-error pk-date-picker.cell-pk-control,
521
+ td.has-error pk-time-picker.cell-pk-control {
522
+ box-shadow: inset 0 0 0 1px var(--pk-color-rose-600, #e11d48);
523
+ }
524
+
525
+ .cell-static {
526
+ padding: 0.5rem;
527
+ font-size: var(--pk-font-size-base, 14px);
528
+ line-height: 1.4;
529
+ color: inherit;
530
+ }
531
+
532
+ /* Custom / slotted cells — fill the td; light-DOM content keeps host styles. */
533
+ .cell-slot {
534
+ display: block;
535
+ width: 100%;
536
+ min-width: 0;
537
+ min-height: var(--pk-et-cell-height);
538
+ height: 100%;
539
+ }
540
+
541
+ .cell-slot ::slotted(*) {
542
+ display: block;
543
+ width: 100%;
544
+ min-width: 0;
545
+ min-height: var(--pk-et-cell-height);
546
+ box-sizing: border-box;
547
+ }
548
+
549
+ .cell-heading {
550
+ font-weight: 600;
551
+ color: var(--pk-color-gray-800, #1f2937);
552
+ }
553
+
554
+ .cell-mono {
555
+ font-family: var(--pk-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
556
+ font-size: var(--pk-font-size-mono, 0.9em);
557
+ line-height: var(--pk-line-height-mono, 1.5);
558
+ }
559
+
560
+ .cell-check {
561
+ display: flex;
562
+ align-items: center;
563
+ justify-content: center;
564
+ height: var(--pk-et-cell-height);
565
+ min-width: 2.125rem;
566
+ }
567
+
568
+ .cell-check--switch {
569
+ min-width: 3rem;
570
+ }
571
+
572
+ pk-checkbox,
573
+ pk-radio,
574
+ pk-lightswitch {
575
+ display: inline-flex;
576
+ align-items: center;
577
+ justify-content: center;
578
+ }
579
+
580
+ .row-actions {
581
+ display: flex;
582
+ align-items: center;
583
+ justify-content: flex-end;
584
+ /* v1 packs 24px action buttons flush — no gap between hitboxes. */
585
+ gap: 0;
586
+ }
587
+
588
+ .row-actions pk-dropdown-menu {
589
+ display: inline-flex;
590
+ }
591
+
592
+ /* Action row buttons: fixed 24px hitbox (v1), variant=none, icon-only color hover. */
593
+ .row-actions pk-button.action-btn {
594
+ --pk-btn-height: var(--pk-et-action-size);
595
+ --pk-btn-icon-size: var(--pk-et-action-icon);
596
+ --pk-btn-padding-inline: 0;
597
+ color: var(--pk-color-gray-500, #6b7280);
598
+ width: var(--pk-et-action-size);
599
+ flex: 0 0 var(--pk-et-action-size);
600
+ }
601
+
602
+ .row-actions pk-button.action-btn::part(base) {
603
+ width: var(--pk-et-action-size);
604
+ height: var(--pk-et-action-size);
605
+ min-height: var(--pk-et-action-size);
606
+ padding: 0;
607
+ background: transparent;
608
+ }
609
+
610
+ .row-actions pk-button.action-btn::part(base):hover:not(:disabled) {
611
+ /* No hover fill — only the glyph color shifts (v1 hover:bg-transparent). */
612
+ background: transparent;
613
+ color: var(--pk-color-sky-600, #0284c7);
614
+ }
615
+
616
+ .row-actions pk-button.action-btn.action-delete::part(base):hover:not(:disabled) {
617
+ background: transparent;
618
+ color: var(--pk-color-rose-500, #f43f5e);
619
+ }
620
+
621
+ .row-actions pk-button.action-btn:disabled {
622
+ opacity: 0.4;
623
+ cursor: not-allowed;
624
+ }
625
+
626
+ /* Light-DOM handle wrapper (v1) — pointer drag binds here so shadow clicks don't interfere.
627
+ pk-button :host { cursor: pointer } wins over inherited span cursor — set it on the host. */
628
+ .row-actions .action-handle {
629
+ display: inline-flex;
630
+ cursor: move;
631
+ }
632
+
633
+ .row-actions .action-handle pk-button.action-btn {
634
+ cursor: move;
635
+ --pk-btn-icon-size: var(--pk-et-action-grip-icon);
636
+ }
637
+
638
+ .row-actions .action-handle:has(pk-button:disabled),
639
+ .row-actions .action-handle pk-button.action-btn[disabled] {
640
+ cursor: default;
641
+ }
642
+
643
+ /* Before deferred drag binding — grip visible but inactive (v1 faded controls). */
644
+ .row-actions .action-handle.is-pending {
645
+ opacity: 0.45;
646
+ }
647
+
648
+ /* Live row is floated as the overlay; placeholder clone holds the gap. */
649
+ tr.is-dragging {
650
+ display: table-row;
651
+ }
652
+
653
+ tr[data-pk-dnd-placeholder] {
654
+ visibility: hidden;
655
+ pointer-events: none;
656
+ }
657
+
658
+ /* Attach dashed add-row under the table shell (v1 Button variant=dashed). */
659
+ pk-button.add-row {
660
+ display: block;
661
+ width: 100%;
662
+ margin-top: -1px;
663
+ --pk-btn-radius: 0;
664
+ }
665
+
666
+ pk-button.add-row::part(base) {
667
+ width: 100%;
668
+ border-top: 0;
669
+ border-radius: 0 0 var(--pk-et-radius) var(--pk-et-radius);
670
+ }
671
+
672
+ :host([disabled]) pk-button.add-row {
673
+ opacity: 0.5;
674
+ pointer-events: none;
675
+ }
676
+
677
+ .empty {
678
+ padding: 0.75rem 0.625rem;
679
+ color: var(--pk-color-gray-500, #6b7280);
680
+ font-size: 13px;
681
+ }
682
+ }
683
+ `;
684
+ //#endregion
685
+ //#region src/components/editable-table/editable-table-model.ts
686
+ var GENERATED_CELL_MODE = {
687
+ EMPTY: "empty",
688
+ AUTO: "auto",
689
+ MANUAL: "manual",
690
+ SEEDED: "seeded"
691
+ };
692
+ var isGeneratedColumn = (column) => {
693
+ return (column.type === "handle" || column.type === "value") && Boolean(column.name) && Boolean(column.source);
694
+ };
695
+ var isThinColumn = (column) => {
696
+ return Boolean(column.thin || column.type === "checkbox" || column.type === "lightswitch" || column.type === "radio");
697
+ };
698
+ var isEmptyCellValue = (value) => {
699
+ return value === void 0 || value === null || value === "";
700
+ };
701
+ var getGeneratedCellKey = (rowId, columnName) => {
702
+ return `${rowId}:${columnName}`;
703
+ };
704
+ var normalizeOptions = (options) => {
705
+ if (!Array.isArray(options)) return [];
706
+ return options.map((option) => {
707
+ if (typeof option === "string") return {
708
+ label: option,
709
+ value: option
710
+ };
711
+ return {
712
+ label: String(option.label ?? option.value ?? ""),
713
+ value: String(option.value ?? "")
714
+ };
715
+ });
716
+ };
717
+ var defaultValueForColumn = (column) => {
718
+ if (column.type === "checkbox" || column.type === "lightswitch" || column.type === "radio") return false;
719
+ return "";
720
+ };
721
+ /**
722
+ * Craft-free handle slug for derived `handle` columns.
723
+ * Mirrors the camelCase path of `@verbb/plugin-kit-core` `generateHandle` without `window.Craft`.
724
+ */
725
+ var generateHandle = (sourceValue) => {
726
+ const words = sourceValue.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/['"'""[\](){}:]/g, "").split(/[^a-z0-9]+/).filter(Boolean);
727
+ if (words.length === 0) return "";
728
+ return words.map((word, index) => index === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1)).join("");
729
+ };
730
+ var rowIdCounter = 0;
731
+ var nextRowId = () => {
732
+ rowIdCounter += 1;
733
+ return `etr_${Date.now().toString(36)}_${rowIdCounter}`;
734
+ };
735
+ /** Named slot for a `type: 'custom'` cell — light-DOM projection into the `<td>`. */
736
+ var getCustomCellSlotName = (rowId, columnName) => {
737
+ return `cell:${rowId}:${columnName}`;
738
+ };
739
+ var BUILTIN_COLUMN_TYPES = new Set([
740
+ "text",
741
+ "textarea",
742
+ "number",
743
+ "email",
744
+ "url",
745
+ "select",
746
+ "combobox",
747
+ "checkbox",
748
+ "radio",
749
+ "lightswitch",
750
+ "color",
751
+ "date",
752
+ "time",
753
+ "heading",
754
+ "label",
755
+ "handle",
756
+ "value",
757
+ "custom"
758
+ ]);
759
+ var isCustomColumn = (column) => {
760
+ const type = column.type;
761
+ if (type === "custom") return true;
762
+ return typeof type === "string" && !BUILTIN_COLUMN_TYPES.has(type);
763
+ };
764
+ //#endregion
765
+ //#region src/components/editable-table/pk-editable-table.ts
766
+ /** Slotted start-icon markup for pk-button (bundled — no registry lookup). */
767
+ var START_GRIP_ICON = `
768
+ <svg slot="start" viewBox="0 0 448 512" focusable="false" aria-hidden="true">
769
+ <path fill="currentColor" d="M71.3 295.6c-21.9-21.9-21.9-57.3 0-79.2s57.3-21.9 79.2 0 21.9 57.3 0 79.2s-57.4 21.9-79.2 0zM184.4 182.5c-21.9-21.9-21.9-57.3 0-79.2s57.3-21.9 79.2 0 21.9 57.3 0 79.2-57.3 21.8-79.2 0zm0 147c21.9-21.9 57.3-21.9 79.2 0s21.9 57.3 0 79.2s-57.3 21.9-79.2 0c-21.9-21.8-21.9-57.3 0-79.2zM297.5 216.4c21.9-21.9 57.3-21.9 79.2 0s21.9 57.3 0 79.2s-57.3 21.9-79.2 0c-21.8-21.9-21.8-57.3 0-79.2z"></path>
770
+ </svg>
771
+ `;
772
+ var START_ELLIPSIS_ICON = renderIconHtml(ellipsis).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
773
+ var START_ARROW_UP_ICON = renderIconHtml(arrowUp).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
774
+ var START_ARROW_DOWN_ICON = renderIconHtml(arrowDown).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
775
+ var START_XMARK_ICON = renderIconHtml(xmark).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
776
+ var START_PLUS_ICON = renderIconHtml(plus).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
777
+ var START_GEAR_ICON = renderIconHtml(gear).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
778
+ var startIconHtml = (iconName) => {
779
+ if (!iconName) return "";
780
+ if (iconName === "gear") return START_GEAR_ICON;
781
+ const icon = getIcon(iconName);
782
+ if (!icon) return "";
783
+ return renderIconHtml(icon).replace("<svg", "<svg slot=\"start\" aria-hidden=\"true\"");
784
+ };
785
+ var PkEditableTable = class PkEditableTable extends PkFormAssociatedElement {
786
+ constructor(..._args) {
787
+ super(..._args);
788
+ this.columns = [];
789
+ this.rows = [];
790
+ this.allowAdd = true;
791
+ this.allowDelete = true;
792
+ this.allowReorder = true;
793
+ this.addRowLabel = "";
794
+ this.fieldName = "";
795
+ this.cellErrors = {};
796
+ this.newRowDefaults = {};
797
+ this.modifyColumn = null;
798
+ this.modifyRow = null;
799
+ this.getRowMenuItems = null;
800
+ this.internalRows = [];
801
+ this.dndReady = false;
802
+ this.generatedCellModes = /* @__PURE__ */ new Map();
803
+ this.dndController = new EditableTableDndController({ onReorderTo: (orderedIds) => {
804
+ this.commitReorderByIds(orderedIds);
805
+ } });
806
+ this.dndIdleId = null;
807
+ this.dndTimeoutId = null;
808
+ this.dndRowSignature = "";
809
+ }
810
+ static {
811
+ this.styles = pkEditableTableStyles;
812
+ }
813
+ static get validators() {
814
+ return [...super.validators, RequiredValidator()];
815
+ }
816
+ willUpdate(changed) {
817
+ if (changed.has("rows")) {
818
+ const incoming = Array.isArray(this.rows) ? this.rows : [];
819
+ const previous = this.internalRows;
820
+ this.internalRows = incoming.map((row, index) => {
821
+ const existingId = typeof row._id === "string" ? row._id : typeof previous[index]?._id === "string" ? String(previous[index]._id) : nextRowId();
822
+ return {
823
+ ...row,
824
+ _id: existingId
825
+ };
826
+ });
827
+ this.syncGeneratedModesFromRows();
828
+ this.syncFormValue();
829
+ }
830
+ if (changed.has("allowReorder") || changed.has("disabled")) this.scheduleDndHydration();
831
+ super.willUpdate(changed);
832
+ }
833
+ firstUpdated(changed) {
834
+ super.firstUpdated(changed);
835
+ this.scheduleDndHydration();
836
+ }
837
+ shouldUpdate(changed) {
838
+ if (this.dndController.isSessionActive) return false;
839
+ return super.shouldUpdate(changed);
840
+ }
841
+ updated(changed) {
842
+ super.updated(changed);
843
+ if (this.dndReady && this.allowReorder && !this.disabled) {
844
+ if (!this.dndController.isSessionActive) this.syncDndSortables();
845
+ } else if (this.dndController.isActive && (!this.allowReorder || this.disabled || !this.dndReady)) {
846
+ this.dndController.destroy();
847
+ this.dndRowSignature = "";
848
+ }
849
+ }
850
+ disconnectedCallback() {
851
+ this.cancelDndHydration();
852
+ this.dndController.destroy();
853
+ this.dndReady = false;
854
+ super.disconnectedCallback();
855
+ }
856
+ /** Serialized rows, used for form submission and required validation (empty when no rows). */
857
+ get value() {
858
+ return this.internalRows.length ? JSON.stringify(this.cleanRows()) : "";
859
+ }
860
+ get validColumns() {
861
+ return (Array.isArray(this.columns) ? this.columns : []).filter((column) => {
862
+ return typeof column?.name === "string" && column.name.trim() !== "";
863
+ });
864
+ }
865
+ get generatedColumns() {
866
+ return this.validColumns.filter(isGeneratedColumn);
867
+ }
868
+ get showActionsColumn() {
869
+ return this.allowReorder || this.allowDelete || Boolean(this.getRowMenuItems);
870
+ }
871
+ cleanRows() {
872
+ return this.internalRows.map((row) => {
873
+ const { _id, ...rest } = row;
874
+ return rest;
875
+ });
876
+ }
877
+ /**
878
+ * Public cell write path for slotted / framework-projected custom cells.
879
+ * Prefer this over mutating `rows` locally so generated columns + events stay in sync.
880
+ */
881
+ setCellValue(rowIndex, columnName, value) {
882
+ const row = this.internalRows[rowIndex];
883
+ if (!row) return;
884
+ const base = this.validColumns.find((column) => column.name === columnName);
885
+ if (!base) return;
886
+ this.updateCell(rowIndex, this.resolveColumn(row, base, rowIndex), value);
887
+ }
888
+ resolveColumn(row, column, rowIndex) {
889
+ const patch = this.modifyColumn?.(row, column.name, column, rowIndex);
890
+ if (!patch || typeof patch !== "object") return column;
891
+ return {
892
+ ...column,
893
+ ...patch,
894
+ name: column.name
895
+ };
896
+ }
897
+ resolveRowModifier(row, rowIndex) {
898
+ const patch = this.modifyRow?.(row, rowIndex);
899
+ if (!patch || typeof patch !== "object") return {};
900
+ return patch;
901
+ }
902
+ resolveRowMenuItems(row, rowIndex) {
903
+ const items = this.getRowMenuItems?.(row, rowIndex);
904
+ return Array.isArray(items) ? items.filter((item) => item && typeof item.label === "string") : [];
905
+ }
906
+ syncGeneratedModesFromRows() {
907
+ const generated = this.generatedColumns;
908
+ if (this.internalRows.length === 0 || generated.length === 0) {
909
+ this.generatedCellModes.clear();
910
+ return;
911
+ }
912
+ const validKeys = /* @__PURE__ */ new Set();
913
+ for (const row of this.internalRows) {
914
+ const rowId = String(row._id);
915
+ for (const column of generated) {
916
+ const key = getGeneratedCellKey(rowId, column.name);
917
+ validKeys.add(key);
918
+ if (this.generatedCellModes.has(key)) continue;
919
+ this.generatedCellModes.set(key, isEmptyCellValue(row[column.name]) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.SEEDED);
920
+ }
921
+ }
922
+ for (const key of [...this.generatedCellModes.keys()]) if (!validKeys.has(key)) this.generatedCellModes.delete(key);
923
+ }
924
+ syncFormValue() {
925
+ const serialized = JSON.stringify(this.cleanRows());
926
+ this.setFormValue(serialized, serialized);
927
+ }
928
+ restoreFormState(state) {
929
+ if (typeof state !== "string") return;
930
+ try {
931
+ const parsed = JSON.parse(state);
932
+ if (Array.isArray(parsed)) this.rows = parsed;
933
+ } catch {}
934
+ }
935
+ /**
936
+ * Inner cell controls (lightswitch, checkbox, select, pickers, inputs) all
937
+ * dispatch `pk-change`/`input`/`change` with `bubbles` + `composed`, so those
938
+ * events would otherwise escape this component's shadow root and masquerade as
939
+ * the table's own events. Consumers bind `pk-change` and read `detail.rows`; a
940
+ * leaked lightswitch `pk-change` carries `{ checked }` (no `rows`), which would
941
+ * reset `rows` to `undefined` and wipe every row. We stop them at the table
942
+ * wrapper — cell `@pk-change`/`@input` handlers already ran at their target, and
943
+ * the table re-dispatches its own `{ rows }` payload from the host in emitChange.
944
+ */
945
+ stopInnerControlEvent(event) {
946
+ if (event.target !== this) event.stopPropagation();
947
+ }
948
+ emitChange() {
949
+ const rows = this.internalRows.map((row) => ({ ...row }));
950
+ this.rows = rows;
951
+ this.syncFormValue();
952
+ this.dispatchEvent(new CustomEvent("pk-change", {
953
+ detail: { rows },
954
+ bubbles: true,
955
+ composed: true
956
+ }));
957
+ this.dispatchEvent(new Event("input", {
958
+ bubbles: true,
959
+ composed: true
960
+ }));
961
+ this.dispatchEvent(new Event("change", {
962
+ bubbles: true,
963
+ composed: true
964
+ }));
965
+ }
966
+ emitCellChange(rowIndex, columnName, value, row) {
967
+ this.dispatchEvent(new CustomEvent("pk-cell-change", {
968
+ detail: {
969
+ rowIndex,
970
+ columnName,
971
+ value,
972
+ row
973
+ },
974
+ bubbles: true,
975
+ composed: true
976
+ }));
977
+ }
978
+ commitRows(next, cellChanges = []) {
979
+ this.internalRows = next;
980
+ this.emitChange();
981
+ for (const change of cellChanges) this.emitCellChange(change.rowIndex, change.columnName, change.value, change.row);
982
+ }
983
+ updateCell(rowIndex, column, value) {
984
+ const row = this.internalRows[rowIndex];
985
+ if (!row) return;
986
+ if (column.type === "radio") {
987
+ const nextChecked = Boolean(value);
988
+ const allowUnselect = Boolean(column.allowUnselect);
989
+ const next = this.internalRows.map((item) => ({ ...item }));
990
+ const cellChanges = [];
991
+ if (nextChecked) next.forEach((item, index) => {
992
+ const target = index === rowIndex;
993
+ if (Boolean(item[column.name]) !== target) {
994
+ next[index] = {
995
+ ...item,
996
+ [column.name]: target
997
+ };
998
+ cellChanges.push({
999
+ rowIndex: index,
1000
+ columnName: column.name,
1001
+ value: target,
1002
+ row: this.internalRows[index]
1003
+ });
1004
+ }
1005
+ });
1006
+ else if (allowUnselect && Boolean(row[column.name])) {
1007
+ next[rowIndex] = {
1008
+ ...row,
1009
+ [column.name]: false
1010
+ };
1011
+ cellChanges.push({
1012
+ rowIndex,
1013
+ columnName: column.name,
1014
+ value: false,
1015
+ row
1016
+ });
1017
+ } else return;
1018
+ if (cellChanges.length === 0) return;
1019
+ this.commitRows(next, cellChanges);
1020
+ return;
1021
+ }
1022
+ if (isGeneratedColumn(column)) this.generatedCellModes.set(getGeneratedCellKey(String(row._id), column.name), isEmptyCellValue(value) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.MANUAL);
1023
+ const sourceUpdate = { [column.name]: value };
1024
+ const derivedUpdates = {};
1025
+ for (const targetColumn of this.generatedColumns) {
1026
+ if (targetColumn.source !== column.name) continue;
1027
+ const targetKey = getGeneratedCellKey(String(row._id), targetColumn.name);
1028
+ const currentTargetValue = row[targetColumn.name];
1029
+ const existingMode = this.generatedCellModes.get(targetKey) ?? (isEmptyCellValue(currentTargetValue) ? GENERATED_CELL_MODE.EMPTY : GENERATED_CELL_MODE.SEEDED);
1030
+ if (existingMode === GENERATED_CELL_MODE.MANUAL || existingMode === GENERATED_CELL_MODE.SEEDED) continue;
1031
+ if (targetColumn.type === "handle") {
1032
+ derivedUpdates[targetColumn.name] = generateHandle(String(value ?? ""));
1033
+ this.generatedCellModes.set(targetKey, GENERATED_CELL_MODE.AUTO);
1034
+ } else if (targetColumn.type === "value") {
1035
+ derivedUpdates[targetColumn.name] = value;
1036
+ this.generatedCellModes.set(targetKey, GENERATED_CELL_MODE.AUTO);
1037
+ }
1038
+ }
1039
+ const allUpdates = {
1040
+ ...sourceUpdate,
1041
+ ...derivedUpdates
1042
+ };
1043
+ if (!Object.entries(allUpdates).some(([key, nextValue]) => row[key] !== nextValue)) return;
1044
+ const next = this.internalRows.slice();
1045
+ next[rowIndex] = {
1046
+ ...row,
1047
+ ...allUpdates
1048
+ };
1049
+ const cellChanges = Object.entries(allUpdates).map(([columnName, nextValue]) => ({
1050
+ rowIndex,
1051
+ columnName,
1052
+ value: nextValue,
1053
+ row
1054
+ }));
1055
+ this.commitRows(next, cellChanges);
1056
+ }
1057
+ addRow() {
1058
+ if (this.disabled || !this.allowAdd) return;
1059
+ const row = {
1060
+ _id: nextRowId(),
1061
+ ...this.newRowDefaults && typeof this.newRowDefaults === "object" ? this.newRowDefaults : {}
1062
+ };
1063
+ for (const column of this.validColumns) if (!(column.name in row)) row[column.name] = defaultValueForColumn(column);
1064
+ this.internalRows = [...this.internalRows, row];
1065
+ this.syncGeneratedModesFromRows();
1066
+ this.emitChange();
1067
+ }
1068
+ removeRow(rowIndex) {
1069
+ if (this.disabled || !this.allowDelete) return;
1070
+ this.internalRows = this.internalRows.filter((_, index) => index !== rowIndex);
1071
+ this.syncGeneratedModesFromRows();
1072
+ this.emitChange();
1073
+ }
1074
+ moveRow(rowIndex, direction) {
1075
+ const target = rowIndex + direction;
1076
+ if (this.disabled || target < 0 || target >= this.internalRows.length) return;
1077
+ this.commitReorder(rowIndex, target);
1078
+ }
1079
+ commitReorder(fromIndex, toIndex) {
1080
+ if (this.disabled || fromIndex === toIndex || fromIndex < 0 || toIndex < 0 || fromIndex >= this.internalRows.length || toIndex >= this.internalRows.length) return;
1081
+ const next = this.internalRows.slice();
1082
+ const [moved] = next.splice(fromIndex, 1);
1083
+ next.splice(toIndex, 0, moved);
1084
+ this.internalRows = next;
1085
+ this.emitChange();
1086
+ }
1087
+ /**
1088
+ * Apply DOM-seated order after pointer drag. Uses stable `_id`s so a floated
1089
+ * source row left in the tbody can't skew from/to index arithmetic — and so a
1090
+ * cancelled drag that briefly moved the placeholder can't desync data vs DOM.
1091
+ */
1092
+ commitReorderByIds(orderedIds) {
1093
+ if (this.disabled || orderedIds.length === 0) return;
1094
+ const byId = new Map(this.internalRows.map((row) => [String(row._id), row]));
1095
+ if (orderedIds.length !== byId.size) return;
1096
+ const next = [];
1097
+ for (const id of orderedIds) {
1098
+ const row = byId.get(id);
1099
+ if (!row) return;
1100
+ next.push(row);
1101
+ }
1102
+ if (next.every((row, index) => row === this.internalRows[index])) return;
1103
+ this.internalRows = next;
1104
+ this.emitChange();
1105
+ }
1106
+ scheduleDndHydration() {
1107
+ this.cancelDndHydration();
1108
+ if (!this.allowReorder || this.disabled) {
1109
+ this.dndReady = false;
1110
+ this.dndController.destroy();
1111
+ return;
1112
+ }
1113
+ if (this.dndReady) return;
1114
+ const enableDnd = () => {
1115
+ this.dndIdleId = null;
1116
+ this.dndTimeoutId = null;
1117
+ this.dndReady = true;
1118
+ };
1119
+ if (typeof window !== "undefined" && typeof window.requestIdleCallback === "function") this.dndIdleId = window.requestIdleCallback(enableDnd, { timeout: 1200 });
1120
+ else this.dndTimeoutId = setTimeout(enableDnd, 250);
1121
+ }
1122
+ cancelDndHydration() {
1123
+ if (this.dndIdleId !== null && typeof window !== "undefined" && typeof window.cancelIdleCallback === "function") {
1124
+ window.cancelIdleCallback(this.dndIdleId);
1125
+ this.dndIdleId = null;
1126
+ }
1127
+ if (this.dndTimeoutId !== null) {
1128
+ clearTimeout(this.dndTimeoutId);
1129
+ this.dndTimeoutId = null;
1130
+ }
1131
+ }
1132
+ syncDndSortables() {
1133
+ if (this.dndController.isSessionActive) return;
1134
+ const signature = `${this.internalRows.map((row) => String(row._id)).join("\0")}|${this.disabled ? "1" : "0"}`;
1135
+ if (signature === this.dndRowSignature && this.dndController.isActive) return;
1136
+ const rows = [...this.renderRoot.querySelectorAll("tr[data-row-id]:not([data-pk-dnd-placeholder])")];
1137
+ this.dndController.sync(rows.map((row) => ({
1138
+ id: row.dataset.rowId ?? "",
1139
+ element: row,
1140
+ handle: row.querySelector(".action-handle") ?? void 0
1141
+ })).filter((row) => row.id !== ""), this.disabled);
1142
+ this.dndRowSignature = signature;
1143
+ }
1144
+ getCellErrors(rowIndex, columnName) {
1145
+ const errors = (this.fieldName ? this.cellErrors?.[`${this.fieldName}.${rowIndex}.${columnName}`] : void 0) ?? this.cellErrors?.[`${rowIndex}.${columnName}`];
1146
+ if (!errors) return [];
1147
+ return Array.isArray(errors) ? errors.map(String) : [String(errors)];
1148
+ }
1149
+ readValueFromEvent(event) {
1150
+ const detail = event.detail;
1151
+ if (detail && "value" in detail) return String(detail.value ?? "");
1152
+ return String(event.target.value ?? "");
1153
+ }
1154
+ readCheckedFromEvent(event) {
1155
+ const detail = event.detail;
1156
+ if (detail && "checked" in detail) return Boolean(detail.checked);
1157
+ return Boolean(event.target.checked);
1158
+ }
1159
+ renderOptionElements(column) {
1160
+ return normalizeOptions(column.options).map((option) => {
1161
+ return b`<pk-option value=${option.value}>${option.label}</pk-option>`;
1162
+ });
1163
+ }
1164
+ renderSelectLike(column, value, rowIndex, invalid, { combobox = false } = {}) {
1165
+ const current = String(value ?? "");
1166
+ if (combobox) return b`<pk-combobox
1167
+ class="cell-pk-control"
1168
+ size="sm"
1169
+ width="full"
1170
+ allow-custom-value
1171
+ .value=${current}
1172
+ placeholder=${column.placeholder ?? ""}
1173
+ ?disabled=${this.disabled}
1174
+ ?invalid=${invalid}
1175
+ aria-label=${column.label ?? column.name}
1176
+ @pk-change=${(event) => {
1177
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1178
+ }}
1179
+ >
1180
+ ${this.renderOptionElements(column)}
1181
+ </pk-combobox>`;
1182
+ return b`<pk-select
1183
+ class="cell-pk-control"
1184
+ size="xs"
1185
+ width="full"
1186
+ .value=${current}
1187
+ placeholder=${column.placeholder ?? ""}
1188
+ ?disabled=${this.disabled}
1189
+ ?invalid=${invalid}
1190
+ aria-label=${column.label ?? column.name}
1191
+ @pk-change=${(event) => {
1192
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1193
+ }}
1194
+ >
1195
+ ${this.renderOptionElements(column)}
1196
+ </pk-select>`;
1197
+ }
1198
+ renderCell(column, row, rowIndex, invalid) {
1199
+ const value = row[column.name];
1200
+ const type = column.type ?? "text";
1201
+ const onInput = (event) => {
1202
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1203
+ };
1204
+ if (isCustomColumn(column)) return b`<div class="cell-slot">
1205
+ <slot name=${getCustomCellSlotName(String(row._id), column.name)}></slot>
1206
+ </div>`;
1207
+ if (type === "heading") return b`<div class="cell-static cell-heading">${String(value ?? "")}</div>`;
1208
+ if (type === "label") return b`<div class="cell-static">${String(value ?? "")}</div>`;
1209
+ if (type === "textarea") return b`<pk-textarea
1210
+ class="cell-pk-control"
1211
+ fit-cell
1212
+ size="sm"
1213
+ rows="1"
1214
+ .value=${String(value ?? "")}
1215
+ placeholder=${column.placeholder ?? A}
1216
+ ?disabled=${this.disabled}
1217
+ ?invalid=${invalid}
1218
+ aria-label=${column.label ?? column.name}
1219
+ @input=${onInput}
1220
+ ></pk-textarea>`;
1221
+ if (type === "date") return b`<pk-date-picker
1222
+ class="cell-pk-control"
1223
+ size="sm"
1224
+ width="full"
1225
+ .value=${String(value ?? "")}
1226
+ placeholder=${column.placeholder ?? ""}
1227
+ ?disabled=${this.disabled}
1228
+ ?invalid=${invalid}
1229
+ aria-label=${column.label ?? column.name}
1230
+ @pk-change=${(event) => {
1231
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1232
+ }}
1233
+ ></pk-date-picker>`;
1234
+ if (type === "time") return b`<pk-time-picker
1235
+ class="cell-pk-control"
1236
+ size="sm"
1237
+ width="full"
1238
+ .value=${String(value ?? "")}
1239
+ placeholder=${column.placeholder ?? ""}
1240
+ ?disabled=${this.disabled}
1241
+ ?invalid=${invalid}
1242
+ aria-label=${column.label ?? column.name}
1243
+ @pk-change=${(event) => {
1244
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1245
+ }}
1246
+ ></pk-time-picker>`;
1247
+ if (type === "number" || type === "email" || type === "url") return b`<pk-input
1248
+ class="cell-pk-control"
1249
+ fit-cell
1250
+ size="xs"
1251
+ type=${type}
1252
+ .value=${String(value ?? "")}
1253
+ placeholder=${column.placeholder ?? A}
1254
+ ?disabled=${this.disabled}
1255
+ ?invalid=${invalid}
1256
+ aria-label=${column.label ?? column.name}
1257
+ @input=${onInput}
1258
+ ></pk-input>`;
1259
+ if (type === "select") return this.renderSelectLike(column, value, rowIndex, invalid);
1260
+ if (type === "combobox") return this.renderSelectLike(column, value, rowIndex, invalid, { combobox: true });
1261
+ if (type === "checkbox") return b`<div class="cell-check">
1262
+ <pk-checkbox
1263
+ aria-label=${column.label ?? column.name}
1264
+ .checked=${Boolean(value)}
1265
+ ?disabled=${this.disabled}
1266
+ ?invalid=${invalid}
1267
+ @pk-change=${(event) => {
1268
+ this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
1269
+ }}
1270
+ ></pk-checkbox>
1271
+ </div>`;
1272
+ if (type === "radio") return b`<div class="cell-check">
1273
+ <pk-checkbox
1274
+ aria-label=${column.label ?? column.name}
1275
+ .checked=${Boolean(value)}
1276
+ ?disabled=${this.disabled}
1277
+ ?invalid=${invalid}
1278
+ @pk-change=${(event) => {
1279
+ this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
1280
+ }}
1281
+ ></pk-checkbox>
1282
+ </div>`;
1283
+ if (type === "lightswitch") return b`<div class="cell-check cell-check--switch">
1284
+ <pk-lightswitch
1285
+ size="sm"
1286
+ aria-label=${column.label ?? column.name}
1287
+ .checked=${Boolean(value)}
1288
+ ?disabled=${this.disabled}
1289
+ ?invalid=${invalid}
1290
+ @pk-change=${(event) => {
1291
+ this.updateCell(rowIndex, column, this.readCheckedFromEvent(event));
1292
+ }}
1293
+ ></pk-lightswitch>
1294
+ </div>`;
1295
+ if (type === "color") return b`<pk-color-input
1296
+ class="cell-pk-control"
1297
+ fit-cell
1298
+ size="xs"
1299
+ .value=${String(value ?? "")}
1300
+ ?disabled=${this.disabled}
1301
+ ?invalid=${invalid}
1302
+ aria-label=${column.label ?? column.name}
1303
+ @pk-change=${(event) => {
1304
+ this.updateCell(rowIndex, column, this.readValueFromEvent(event));
1305
+ }}
1306
+ ></pk-color-input>`;
1307
+ return b`<pk-input
1308
+ class="cell-pk-control"
1309
+ fit-cell
1310
+ size="xs"
1311
+ type="text"
1312
+ ?mono=${type === "handle" || type === "value"}
1313
+ .value=${String(value ?? "")}
1314
+ placeholder=${column.placeholder ?? A}
1315
+ ?disabled=${this.disabled}
1316
+ ?invalid=${invalid}
1317
+ aria-label=${column.label ?? column.name}
1318
+ @input=${onInput}
1319
+ ></pk-input>`;
1320
+ }
1321
+ renderExtraMenuItems(row, rowIndex) {
1322
+ const items = this.resolveRowMenuItems(row, rowIndex);
1323
+ if (items.length === 0) return A;
1324
+ return b`${items.map((item) => {
1325
+ const iconHtml = startIconHtml(item.icon);
1326
+ return b`<pk-dropdown-item
1327
+ type=${item.type ?? "normal"}
1328
+ value=${item.value ?? item.action ?? ""}
1329
+ radio-group=${item.radioGroup ?? A}
1330
+ ?checked=${Boolean(item.checked)}
1331
+ ?disabled=${this.disabled || Boolean(item.disabled)}
1332
+ @click=${() => {
1333
+ if (this.disabled || item.disabled) return;
1334
+ this.dispatchEvent(new CustomEvent("pk-row-menu-select", {
1335
+ detail: {
1336
+ rowIndex,
1337
+ row,
1338
+ item,
1339
+ action: String(item.action ?? item.value ?? ""),
1340
+ value: String(item.value ?? "")
1341
+ },
1342
+ bubbles: true,
1343
+ composed: true
1344
+ }));
1345
+ }}
1346
+ >
1347
+ ${iconHtml ? o(iconHtml) : A}
1348
+ ${item.label}
1349
+ </pk-dropdown-item>`;
1350
+ })}`;
1351
+ }
1352
+ renderRow(row, rowIndex) {
1353
+ const columns = this.validColumns;
1354
+ const rowCount = this.internalRows.length;
1355
+ const rowId = String(row._id);
1356
+ const rowMod = this.resolveRowModifier(row, rowIndex);
1357
+ const extraMenuItems = this.resolveRowMenuItems(row, rowIndex);
1358
+ const showRowMenu = this.allowReorder || extraMenuItems.length > 0;
1359
+ return b`<tr
1360
+ data-row-id=${rowId}
1361
+ data-tone=${rowMod.tone || A}
1362
+ class=${rowMod.class ? e(Object.fromEntries(rowMod.class.split(/\s+/).filter(Boolean).map((token) => [token, true]))) : A}
1363
+ title=${rowMod.title || A}
1364
+ >
1365
+ ${columns.map((column) => {
1366
+ const resolved = this.resolveColumn(row, column, rowIndex);
1367
+ const errors = this.getCellErrors(rowIndex, column.name);
1368
+ const columnClass = resolved.class || column.class || "";
1369
+ return b`<td
1370
+ class=${e({
1371
+ thin: isThinColumn(resolved),
1372
+ "has-error": errors.length > 0,
1373
+ ...columnClass ? Object.fromEntries(columnClass.split(/\s+/).filter(Boolean).map((token) => [token, true])) : {}
1374
+ })}
1375
+ style=${resolved.width || column.width ? `width: ${resolved.width || column.width}` : A}
1376
+ title=${errors.length ? errors.join("\n") : A}
1377
+ >
1378
+ ${this.renderCell(resolved, row, rowIndex, errors.length > 0)}
1379
+ </td>`;
1380
+ })}
1381
+ ${this.showActionsColumn ? b`<td class="actions">
1382
+ <div class="row-actions">
1383
+ ${this.allowReorder ? b`
1384
+ <span
1385
+ class=${e({
1386
+ "action-handle": true,
1387
+ "is-pending": !this.dndReady
1388
+ })}
1389
+ >
1390
+ <pk-button
1391
+ type="button"
1392
+ class="action-btn"
1393
+ variant="none"
1394
+ size="xs"
1395
+ aria-label="Reorder row"
1396
+ ?disabled=${this.disabled || !this.dndReady}
1397
+ title=${!this.dndReady && !this.disabled ? "Preparing drag…" : A}
1398
+ >${o(START_GRIP_ICON)}</pk-button>
1399
+ </span>` : A}
1400
+ ${showRowMenu ? b`<pk-dropdown-menu size="sm" placement="bottom-end" side-offset="2">
1401
+ <pk-button
1402
+ slot="trigger"
1403
+ type="button"
1404
+ class="action-btn"
1405
+ variant="none"
1406
+ size="xs"
1407
+ aria-label="Row actions"
1408
+ ?disabled=${this.disabled}
1409
+ >${o(START_ELLIPSIS_ICON)}</pk-button>
1410
+ ${this.renderExtraMenuItems(row, rowIndex)}
1411
+ ${this.allowReorder ? b`
1412
+ <pk-dropdown-item
1413
+ ?disabled=${this.disabled || rowIndex === 0}
1414
+ @click=${() => {
1415
+ this.moveRow(rowIndex, -1);
1416
+ }}
1417
+ >
1418
+ ${o(START_ARROW_UP_ICON)}
1419
+ Move up
1420
+ </pk-dropdown-item>
1421
+ <pk-dropdown-item
1422
+ ?disabled=${this.disabled || rowIndex === rowCount - 1}
1423
+ @click=${() => {
1424
+ this.moveRow(rowIndex, 1);
1425
+ }}
1426
+ >
1427
+ ${o(START_ARROW_DOWN_ICON)}
1428
+ Move down
1429
+ </pk-dropdown-item>` : A}
1430
+ </pk-dropdown-menu>` : A}
1431
+ ${this.allowDelete ? b`<pk-button
1432
+ type="button"
1433
+ class="action-btn action-delete"
1434
+ variant="none"
1435
+ size="xs"
1436
+ aria-label="Delete row"
1437
+ ?disabled=${this.disabled}
1438
+ @click=${() => {
1439
+ this.removeRow(rowIndex);
1440
+ }}
1441
+ >${o(START_XMARK_ICON)}</pk-button>` : A}
1442
+ </div>
1443
+ </td>` : A}
1444
+ </tr>`;
1445
+ }
1446
+ render() {
1447
+ const columns = this.validColumns;
1448
+ return b`
1449
+ <div
1450
+ class="et-scroll"
1451
+ @pk-change=${this.stopInnerControlEvent}
1452
+ @input=${this.stopInnerControlEvent}
1453
+ @change=${this.stopInnerControlEvent}
1454
+ >
1455
+ <table class="et">
1456
+ <thead>
1457
+ <tr>
1458
+ ${columns.map((column) => {
1459
+ const columnClass = column.class || "";
1460
+ return b`<th
1461
+ class=${e({
1462
+ thin: isThinColumn(column),
1463
+ ...columnClass ? Object.fromEntries(columnClass.split(/\s+/).filter(Boolean).map((token) => [token, true])) : {}
1464
+ })}
1465
+ style=${column.width ? `width: ${column.width}` : A}
1466
+ >
1467
+ ${column.label ?? column.name}
1468
+ ${column.required ? b`<span class="required">*</span>` : A}
1469
+ </th>`;
1470
+ })}
1471
+ ${this.showActionsColumn ? b`<th class="actions"></th>` : A}
1472
+ </tr>
1473
+ </thead>
1474
+ <tbody>
1475
+ ${c(this.internalRows, (row) => String(row._id), (row, index) => this.renderRow(row, index))}
1476
+ </tbody>
1477
+ </table>
1478
+ </div>
1479
+ ${this.allowAdd ? b`<pk-button
1480
+ type="button"
1481
+ class="add-row"
1482
+ variant="dashed"
1483
+ ?disabled=${this.disabled}
1484
+ @click=${() => {
1485
+ this.addRow();
1486
+ }}
1487
+ >
1488
+ ${o(START_PLUS_ICON)}
1489
+ ${this.addRowLabel || "Add row"}
1490
+ </pk-button>` : A}
1491
+ `;
1492
+ }
1493
+ };
1494
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "columns", void 0);
1495
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "rows", void 0);
1496
+ __decorate([n({
1497
+ type: Boolean,
1498
+ reflect: true,
1499
+ attribute: "allow-add"
1500
+ })], PkEditableTable.prototype, "allowAdd", void 0);
1501
+ __decorate([n({
1502
+ type: Boolean,
1503
+ reflect: true,
1504
+ attribute: "allow-delete"
1505
+ })], PkEditableTable.prototype, "allowDelete", void 0);
1506
+ __decorate([n({
1507
+ type: Boolean,
1508
+ reflect: true,
1509
+ attribute: "allow-reorder"
1510
+ })], PkEditableTable.prototype, "allowReorder", void 0);
1511
+ __decorate([n({ attribute: "add-row-label" })], PkEditableTable.prototype, "addRowLabel", void 0);
1512
+ __decorate([n({ attribute: "field-name" })], PkEditableTable.prototype, "fieldName", void 0);
1513
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "cellErrors", void 0);
1514
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "newRowDefaults", void 0);
1515
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "modifyColumn", void 0);
1516
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "modifyRow", void 0);
1517
+ __decorate([n({ attribute: false })], PkEditableTable.prototype, "getRowMenuItems", void 0);
1518
+ __decorate([r()], PkEditableTable.prototype, "internalRows", void 0);
1519
+ __decorate([r()], PkEditableTable.prototype, "dndReady", void 0);
1520
+ PkEditableTable = __decorate([t("pk-editable-table")], PkEditableTable);
1521
+ //#endregion
1522
+ export { PkEditableTable, getCustomCellSlotName, isCustomColumn, nextRowId };