@adapttable/naive-ui 0.0.0-stage → 0.1.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 (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +288 -2
  3. package/dist/NaiveFilterSurface-DFoXPlGU.cjs +371 -0
  4. package/dist/NaiveFilterSurface-DFoXPlGU.cjs.map +1 -0
  5. package/dist/NaiveFilterSurface-DZKgJ6G_.js +348 -0
  6. package/dist/NaiveFilterSurface-DZKgJ6G_.js.map +1 -0
  7. package/dist/NaiveManagedPopover-BScsoUHh.cjs +131 -0
  8. package/dist/NaiveManagedPopover-BScsoUHh.cjs.map +1 -0
  9. package/dist/NaiveManagedPopover-DqSDYnef.js +126 -0
  10. package/dist/NaiveManagedPopover-DqSDYnef.js.map +1 -0
  11. package/dist/NaiveRowActions-BhgFAnM3.cjs +79 -0
  12. package/dist/NaiveRowActions-BhgFAnM3.cjs.map +1 -0
  13. package/dist/NaiveRowActions-BxDGoOKe.js +74 -0
  14. package/dist/NaiveRowActions-BxDGoOKe.js.map +1 -0
  15. package/dist/assistant.cjs +355 -0
  16. package/dist/assistant.cjs.map +1 -0
  17. package/dist/assistant.d.cts +10 -0
  18. package/dist/assistant.d.cts.map +1 -0
  19. package/dist/assistant.d.ts +10 -0
  20. package/dist/assistant.d.ts.map +1 -0
  21. package/dist/assistant.js +351 -0
  22. package/dist/assistant.js.map +1 -0
  23. package/dist/batch-editing.cjs +4 -0
  24. package/dist/batch-editing.d.cts +2 -0
  25. package/dist/batch-editing.d.ts +2 -0
  26. package/dist/batch-editing.js +2 -0
  27. package/dist/bulk-actions.cjs +17 -0
  28. package/dist/bulk-actions.cjs.map +1 -0
  29. package/dist/bulk-actions.d.cts +7 -0
  30. package/dist/bulk-actions.d.cts.map +1 -0
  31. package/dist/bulk-actions.d.ts +7 -0
  32. package/dist/bulk-actions.d.ts.map +1 -0
  33. package/dist/bulk-actions.js +16 -0
  34. package/dist/bulk-actions.js.map +1 -0
  35. package/dist/button-CVOchGam.cjs +98 -0
  36. package/dist/button-CVOchGam.cjs.map +1 -0
  37. package/dist/button-Cf1lslmX.js +69 -0
  38. package/dist/button-Cf1lslmX.js.map +1 -0
  39. package/dist/cell-navigation.cjs +18 -0
  40. package/dist/cell-navigation.cjs.map +1 -0
  41. package/dist/cell-navigation.d.cts +9 -0
  42. package/dist/cell-navigation.d.cts.map +1 -0
  43. package/dist/cell-navigation.d.ts +9 -0
  44. package/dist/cell-navigation.d.ts.map +1 -0
  45. package/dist/cell-navigation.js +16 -0
  46. package/dist/cell-navigation.js.map +1 -0
  47. package/dist/cell-span.cjs +8 -0
  48. package/dist/cell-span.d.cts +2 -0
  49. package/dist/cell-span.d.ts +2 -0
  50. package/dist/cell-span.js +2 -0
  51. package/dist/checkbox-Bu4Tl5TQ.cjs +26 -0
  52. package/dist/checkbox-Bu4Tl5TQ.cjs.map +1 -0
  53. package/dist/checkbox-CcYT0Q-6.js +21 -0
  54. package/dist/checkbox-CcYT0Q-6.js.map +1 -0
  55. package/dist/classNames-2CRJjDRZ.js +11 -0
  56. package/dist/classNames-2CRJjDRZ.js.map +1 -0
  57. package/dist/classNames-CR71pIAv.cjs +16 -0
  58. package/dist/classNames-CR71pIAv.cjs.map +1 -0
  59. package/dist/column-groups.cjs +8 -0
  60. package/dist/column-groups.d.cts +2 -0
  61. package/dist/column-groups.d.ts +2 -0
  62. package/dist/column-groups.js +2 -0
  63. package/dist/column-menu-B5xm8hhB.js +74 -0
  64. package/dist/column-menu-B5xm8hhB.js.map +1 -0
  65. package/dist/column-menu-Cd8Fm695.cjs +85 -0
  66. package/dist/column-menu-Cd8Fm695.cjs.map +1 -0
  67. package/dist/column-menu.cjs +4 -0
  68. package/dist/column-menu.d.cts +23 -0
  69. package/dist/column-menu.d.cts.map +1 -0
  70. package/dist/column-menu.d.ts +23 -0
  71. package/dist/column-menu.d.ts.map +1 -0
  72. package/dist/column-menu.js +2 -0
  73. package/dist/column-selection.cjs +3 -0
  74. package/dist/column-selection.d.cts +2 -0
  75. package/dist/column-selection.d.ts +2 -0
  76. package/dist/column-selection.js +2 -0
  77. package/dist/command-palette.cjs +113 -0
  78. package/dist/command-palette.cjs.map +1 -0
  79. package/dist/command-palette.d.cts +7 -0
  80. package/dist/command-palette.d.cts.map +1 -0
  81. package/dist/command-palette.d.ts +7 -0
  82. package/dist/command-palette.d.ts.map +1 -0
  83. package/dist/command-palette.js +112 -0
  84. package/dist/command-palette.js.map +1 -0
  85. package/dist/context-menu.cjs +141 -0
  86. package/dist/context-menu.cjs.map +1 -0
  87. package/dist/context-menu.d.cts +7 -0
  88. package/dist/context-menu.d.cts.map +1 -0
  89. package/dist/context-menu.d.ts +7 -0
  90. package/dist/context-menu.d.ts.map +1 -0
  91. package/dist/context-menu.js +140 -0
  92. package/dist/context-menu.js.map +1 -0
  93. package/dist/controls-D193740P.cjs +86 -0
  94. package/dist/controls-D193740P.cjs.map +1 -0
  95. package/dist/controls-Dj3k83WJ.cjs +169 -0
  96. package/dist/controls-Dj3k83WJ.cjs.map +1 -0
  97. package/dist/controls-Dp-hPfD4.js +75 -0
  98. package/dist/controls-Dp-hPfD4.js.map +1 -0
  99. package/dist/controls-ZeT4wgJ-.js +146 -0
  100. package/dist/controls-ZeT4wgJ-.js.map +1 -0
  101. package/dist/density-C7K5aGdQ.js +40 -0
  102. package/dist/density-C7K5aGdQ.js.map +1 -0
  103. package/dist/density-CUp3mMNH.cjs +45 -0
  104. package/dist/density-CUp3mMNH.cjs.map +1 -0
  105. package/dist/density.cjs +3 -0
  106. package/dist/density.d.cts +7 -0
  107. package/dist/density.d.cts.map +1 -0
  108. package/dist/density.d.ts +7 -0
  109. package/dist/density.d.ts.map +1 -0
  110. package/dist/density.js +2 -0
  111. package/dist/editing-BKNxRBEo.cjs +409 -0
  112. package/dist/editing-BKNxRBEo.cjs.map +1 -0
  113. package/dist/editing-BsaH2gDF.js +368 -0
  114. package/dist/editing-BsaH2gDF.js.map +1 -0
  115. package/dist/editing-CdIoFGiK.d.cts +60 -0
  116. package/dist/editing-CdIoFGiK.d.cts.map +1 -0
  117. package/dist/editing-Dho3Y2RK.d.ts +60 -0
  118. package/dist/editing-Dho3Y2RK.d.ts.map +1 -0
  119. package/dist/editing.cjs +22 -0
  120. package/dist/editing.d.cts +2 -0
  121. package/dist/editing.d.ts +2 -0
  122. package/dist/editing.js +2 -0
  123. package/dist/export.cjs +16 -0
  124. package/dist/export.cjs.map +1 -0
  125. package/dist/export.d.cts +9 -0
  126. package/dist/export.d.cts.map +1 -0
  127. package/dist/export.d.ts +9 -0
  128. package/dist/export.d.ts.map +1 -0
  129. package/dist/export.js +15 -0
  130. package/dist/export.js.map +1 -0
  131. package/dist/extra-rows.cjs +8 -0
  132. package/dist/extra-rows.d.cts +2 -0
  133. package/dist/extra-rows.d.ts +2 -0
  134. package/dist/extra-rows.js +2 -0
  135. package/dist/filters-BqymR1RY.cjs +214 -0
  136. package/dist/filters-BqymR1RY.cjs.map +1 -0
  137. package/dist/filters-i_dmiQO_.js +203 -0
  138. package/dist/filters-i_dmiQO_.js.map +1 -0
  139. package/dist/filters.cjs +14 -0
  140. package/dist/filters.d.cts +66 -0
  141. package/dist/filters.d.cts.map +1 -0
  142. package/dist/filters.d.ts +66 -0
  143. package/dist/filters.d.ts.map +1 -0
  144. package/dist/filters.js +3 -0
  145. package/dist/find-in-table.cjs +21 -0
  146. package/dist/find-in-table.cjs.map +1 -0
  147. package/dist/find-in-table.d.cts +8 -0
  148. package/dist/find-in-table.d.cts.map +1 -0
  149. package/dist/find-in-table.d.ts +8 -0
  150. package/dist/find-in-table.d.ts.map +1 -0
  151. package/dist/find-in-table.js +20 -0
  152. package/dist/find-in-table.js.map +1 -0
  153. package/dist/fit-columns.cjs +8 -0
  154. package/dist/fit-columns.d.cts +2 -0
  155. package/dist/fit-columns.d.ts +2 -0
  156. package/dist/fit-columns.js +2 -0
  157. package/dist/fullscreen.cjs +16 -0
  158. package/dist/fullscreen.cjs.map +1 -0
  159. package/dist/fullscreen.d.cts +7 -0
  160. package/dist/fullscreen.d.cts.map +1 -0
  161. package/dist/fullscreen.d.ts +7 -0
  162. package/dist/fullscreen.d.ts.map +1 -0
  163. package/dist/fullscreen.js +15 -0
  164. package/dist/fullscreen.js.map +1 -0
  165. package/dist/grouping-panel.cjs +144 -0
  166. package/dist/grouping-panel.cjs.map +1 -0
  167. package/dist/grouping-panel.d.cts +8 -0
  168. package/dist/grouping-panel.d.cts.map +1 -0
  169. package/dist/grouping-panel.d.ts +8 -0
  170. package/dist/grouping-panel.d.ts.map +1 -0
  171. package/dist/grouping-panel.js +143 -0
  172. package/dist/grouping-panel.js.map +1 -0
  173. package/dist/grouping.cjs +40 -0
  174. package/dist/grouping.cjs.map +1 -0
  175. package/dist/grouping.d.cts +10 -0
  176. package/dist/grouping.d.cts.map +1 -0
  177. package/dist/grouping.d.ts +10 -0
  178. package/dist/grouping.d.ts.map +1 -0
  179. package/dist/grouping.js +21 -0
  180. package/dist/grouping.js.map +1 -0
  181. package/dist/header-filters-C6K_Y6Sa.js +250 -0
  182. package/dist/header-filters-C6K_Y6Sa.js.map +1 -0
  183. package/dist/header-filters-WYusPMig.cjs +273 -0
  184. package/dist/header-filters-WYusPMig.cjs.map +1 -0
  185. package/dist/header-filters.cjs +6 -0
  186. package/dist/header-filters.d.cts +52 -0
  187. package/dist/header-filters.d.cts.map +1 -0
  188. package/dist/header-filters.d.ts +52 -0
  189. package/dist/header-filters.d.ts.map +1 -0
  190. package/dist/header-filters.js +2 -0
  191. package/dist/index.cjs +304 -0
  192. package/dist/index.cjs.map +1 -0
  193. package/dist/index.d.cts +24 -0
  194. package/dist/index.d.cts.map +1 -0
  195. package/dist/index.d.ts +24 -0
  196. package/dist/index.d.ts.map +1 -0
  197. package/dist/index.js +303 -0
  198. package/dist/index.js.map +1 -0
  199. package/dist/input-Cgm2r2YC.cjs +57 -0
  200. package/dist/input-Cgm2r2YC.cjs.map +1 -0
  201. package/dist/input-l5DTkb1E.js +52 -0
  202. package/dist/input-l5DTkb1E.js.map +1 -0
  203. package/dist/mobile-298ixM-b.js +419 -0
  204. package/dist/mobile-298ixM-b.js.map +1 -0
  205. package/dist/mobile-52C0B3aN.cjs +436 -0
  206. package/dist/mobile-52C0B3aN.cjs.map +1 -0
  207. package/dist/modalEscape-CP6_uqjE.js +28 -0
  208. package/dist/modalEscape-CP6_uqjE.js.map +1 -0
  209. package/dist/modalEscape-aYoIK8OW.cjs +33 -0
  210. package/dist/modalEscape-aYoIK8OW.cjs.map +1 -0
  211. package/dist/multi-sort.cjs +8 -0
  212. package/dist/multi-sort.d.cts +2 -0
  213. package/dist/multi-sort.d.ts +2 -0
  214. package/dist/multi-sort.js +2 -0
  215. package/dist/nested-table.cjs +8 -0
  216. package/dist/nested-table.d.cts +2 -0
  217. package/dist/nested-table.d.ts +2 -0
  218. package/dist/nested-table.js +2 -0
  219. package/dist/pinned-summary-rows.cjs +8 -0
  220. package/dist/pinned-summary-rows.d.cts +2 -0
  221. package/dist/pinned-summary-rows.d.ts +2 -0
  222. package/dist/pinned-summary-rows.js +2 -0
  223. package/dist/pivot.cjs +81 -0
  224. package/dist/pivot.cjs.map +1 -0
  225. package/dist/pivot.d.cts +11 -0
  226. package/dist/pivot.d.cts.map +1 -0
  227. package/dist/pivot.d.ts +11 -0
  228. package/dist/pivot.d.ts.map +1 -0
  229. package/dist/pivot.js +80 -0
  230. package/dist/pivot.js.map +1 -0
  231. package/dist/preset.cjs +40 -0
  232. package/dist/preset.cjs.map +1 -0
  233. package/dist/preset.d.cts +21 -0
  234. package/dist/preset.d.cts.map +1 -0
  235. package/dist/preset.d.ts +21 -0
  236. package/dist/preset.d.ts.map +1 -0
  237. package/dist/preset.js +38 -0
  238. package/dist/preset.js.map +1 -0
  239. package/dist/print.cjs +17 -0
  240. package/dist/print.cjs.map +1 -0
  241. package/dist/print.d.cts +6 -0
  242. package/dist/print.d.cts.map +1 -0
  243. package/dist/print.d.ts +6 -0
  244. package/dist/print.d.ts.map +1 -0
  245. package/dist/print.js +16 -0
  246. package/dist/print.js.map +1 -0
  247. package/dist/renderers.cjs +5 -0
  248. package/dist/renderers.d.cts +33 -0
  249. package/dist/renderers.d.cts.map +1 -0
  250. package/dist/renderers.d.ts +33 -0
  251. package/dist/renderers.d.ts.map +1 -0
  252. package/dist/renderers.js +2 -0
  253. package/dist/resizable-columns.cjs +8 -0
  254. package/dist/resizable-columns.d.cts +2 -0
  255. package/dist/resizable-columns.d.ts +2 -0
  256. package/dist/resizable-columns.js +2 -0
  257. package/dist/row-actions.cjs +15 -0
  258. package/dist/row-actions.cjs.map +1 -0
  259. package/dist/row-actions.d.cts +7 -0
  260. package/dist/row-actions.d.cts.map +1 -0
  261. package/dist/row-actions.d.ts +7 -0
  262. package/dist/row-actions.d.ts.map +1 -0
  263. package/dist/row-actions.js +14 -0
  264. package/dist/row-actions.js.map +1 -0
  265. package/dist/row-appearance.cjs +8 -0
  266. package/dist/row-appearance.d.cts +2 -0
  267. package/dist/row-appearance.d.ts +2 -0
  268. package/dist/row-appearance.js +2 -0
  269. package/dist/row-detail.cjs +28 -0
  270. package/dist/row-detail.d.cts +4 -0
  271. package/dist/row-detail.d.ts +4 -0
  272. package/dist/row-detail.js +4 -0
  273. package/dist/row-pinning.cjs +15 -0
  274. package/dist/row-pinning.cjs.map +1 -0
  275. package/dist/row-pinning.d.cts +8 -0
  276. package/dist/row-pinning.d.cts.map +1 -0
  277. package/dist/row-pinning.d.ts +8 -0
  278. package/dist/row-pinning.d.ts.map +1 -0
  279. package/dist/row-pinning.js +14 -0
  280. package/dist/row-pinning.js.map +1 -0
  281. package/dist/row-reorder.cjs +193 -0
  282. package/dist/row-reorder.cjs.map +1 -0
  283. package/dist/row-reorder.d.cts +6 -0
  284. package/dist/row-reorder.d.cts.map +1 -0
  285. package/dist/row-reorder.d.ts +6 -0
  286. package/dist/row-reorder.d.ts.map +1 -0
  287. package/dist/row-reorder.js +186 -0
  288. package/dist/row-reorder.js.map +1 -0
  289. package/dist/rowActionsSlot-B48S_yZD.cjs +21 -0
  290. package/dist/rowActionsSlot-B48S_yZD.cjs.map +1 -0
  291. package/dist/rowActionsSlot-YWkCOo5W.js +11 -0
  292. package/dist/rowActionsSlot-YWkCOo5W.js.map +1 -0
  293. package/dist/saved-views-BO5_w40C.js +132 -0
  294. package/dist/saved-views-BO5_w40C.js.map +1 -0
  295. package/dist/saved-views-CRyxrATI.cjs +143 -0
  296. package/dist/saved-views-CRyxrATI.cjs.map +1 -0
  297. package/dist/saved-views.cjs +4 -0
  298. package/dist/saved-views.d.cts +15 -0
  299. package/dist/saved-views.d.cts.map +1 -0
  300. package/dist/saved-views.d.ts +15 -0
  301. package/dist/saved-views.d.ts.map +1 -0
  302. package/dist/saved-views.js +2 -0
  303. package/dist/select-BSo8XTMg.js +92 -0
  304. package/dist/select-BSo8XTMg.js.map +1 -0
  305. package/dist/select-ChoLy-Ja.cjs +97 -0
  306. package/dist/select-ChoLy-Ja.cjs.map +1 -0
  307. package/dist/selection-stats.cjs +3 -0
  308. package/dist/selection-stats.d.cts +2 -0
  309. package/dist/selection-stats.d.ts +2 -0
  310. package/dist/selection-stats.js +2 -0
  311. package/dist/side-panel.cjs +60 -0
  312. package/dist/side-panel.cjs.map +1 -0
  313. package/dist/side-panel.d.cts +7 -0
  314. package/dist/side-panel.d.cts.map +1 -0
  315. package/dist/side-panel.d.ts +7 -0
  316. package/dist/side-panel.d.ts.map +1 -0
  317. package/dist/side-panel.js +59 -0
  318. package/dist/side-panel.js.map +1 -0
  319. package/dist/status-bar.cjs +19 -0
  320. package/dist/status-bar.cjs.map +1 -0
  321. package/dist/status-bar.d.cts +7 -0
  322. package/dist/status-bar.d.cts.map +1 -0
  323. package/dist/status-bar.d.ts +7 -0
  324. package/dist/status-bar.d.ts.map +1 -0
  325. package/dist/status-bar.js +17 -0
  326. package/dist/status-bar.js.map +1 -0
  327. package/dist/styles.css +218 -0
  328. package/dist/tree.cjs +21 -0
  329. package/dist/tree.d.cts +3 -0
  330. package/dist/tree.d.ts +3 -0
  331. package/dist/tree.js +3 -0
  332. package/dist/types-oiTfSnx3.d.cts +13 -0
  333. package/dist/types-oiTfSnx3.d.cts.map +1 -0
  334. package/dist/types-oiTfSnx3.d.ts +13 -0
  335. package/dist/types-oiTfSnx3.d.ts.map +1 -0
  336. package/dist/virtualize.cjs +8 -0
  337. package/dist/virtualize.d.cts +2 -0
  338. package/dist/virtualize.d.ts +2 -0
  339. package/dist/virtualize.js +2 -0
  340. package/package.json +464 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Orwa Mahmoud
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,289 @@
1
- # Temporary Holding Version
1
+ # @adapttable/naive-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Requires Node.js **22.12.0 or newer**; packed releases are tested on Node 22.12 and Node 24.
4
+
5
+ Naive UI controls for the AdaptTable Vue binding. AdaptTable owns table state,
6
+ feature composition and semantic table structure. Naive UI supplies the visible
7
+ controls and their styling.
8
+
9
+ Import the adapter stylesheet alongside the component:
10
+
11
+ ```ts
12
+ import { DataTable } from "@adapttable/naive-ui";
13
+ import "@adapttable/naive-ui/styles.css";
14
+ ```
15
+
16
+ ## Features
17
+
18
+ - Feature composition with 41 canonical factories and focused, opt-in imports.
19
+ - Sorting, multi-sort, pagination, global search, selection and selection
20
+ statistics, with host-controlled state.
21
+ - Filtering, custom filter types, the AND/OR filter tree and header filters.
22
+ - Cell editing, row and batch editing, dirty indicators, undo/redo and
23
+ host-owned save callbacks.
24
+ - Column management, column groups, resizing and fit-to-width.
25
+ - Grouping and aggregation, tree data, row expansion and nested tables.
26
+ - Row reordering, row pinning, pinned summary rows, row and column spanning,
27
+ full-width separator rows, row styling and virtualization.
28
+ - Keyboard navigation, cell ranges, Find, saved views, row actions, bulk actions,
29
+ a command palette, context menus and side-panel view controls.
30
+ - Optional assistant and approval surfaces with host-owned transport and
31
+ decisions.
32
+ - CSV export and host-owned print layout; PDF export and XLSX use optional
33
+ writers supplied to the export feature.
34
+ - Pivot data, a spreadsheet formula engine and sparklines through the shared
35
+ Vue binding's opt-in entries.
36
+ - Mobile card layouts, localized labels, RTL and server-side rendering (SSR)
37
+ with the host setup described below.
38
+
39
+ Import `pdfWriter` from `@adapttable/vue/pdf` or `xlsxWriter` from
40
+ `@adapttable/vue/xlsx` and pass it as the `writer` option to this adapter's
41
+ `exportCsv` factory. The adapter retains its own export controls.
42
+
43
+ For pivot data, import `pivot` and `pivotTableModel` from
44
+ `@adapttable/vue/pivot` and render the prepared rows and columns with this
45
+ adapter; the `pivot` entry's `PivotPanel` edits the axes and measures with
46
+ Naive UI controls. Formula columns come from
47
+ `buildFormulaColumns` in `@adapttable/vue/formula`, and SVG sparkline columns
48
+ from `sparklineColumn` in `@adapttable/vue/sparkline`.
49
+
50
+ ## Table rendering
51
+
52
+ The desktop renderer uses Naive UI's `NTable`, `NThead`, `NTbody`, `NTr`, `NTh`
53
+ and `NTd` primitives. The mobile renderer uses `NCard`. Their public slots keep
54
+ attributes, native element refs, ARIA metadata and prepared cell spans on the
55
+ actual semantic targets. Naive UI supplies the table/card theme and controls.
56
+
57
+ The renderer consumes the Vue binding's prepared models. It does not ask
58
+ `NDataTable` to sort, filter, paginate, select, expand or virtualize rows again.
59
+ `NDataTable`'s `remote`, `rowProps` and `cellProps` APIs do not expose its private
60
+ table, header-row or header-cell targets, and its virtual modes restrict spans.
61
+ The semantic primitives avoid those limitations without private DOM changes.
62
+
63
+ `DataTable` uses the binding's optional outer layout for search, status, loading
64
+ and pagination. Applications composing a custom shell can use the desktop and
65
+ mobile renderers directly, or use the headless Vue binding with their own
66
+ presentation.
67
+
68
+ The adapter uses the following public Naive UI APIs:
69
+
70
+ - `NButton` renders action controls. Its `attrType` forwards native button types.
71
+ - `NCheckbox` exposes its focusable `role="checkbox"` root. Controlled `checked`
72
+ and `indeterminate` values come from AdaptTable; one `update:checked` event
73
+ requests one selection toggle.
74
+ - `NInput.inputProps` sends IDs, accessible names, part markers and classes to
75
+ the actual input. Value changes use `update:value`.
76
+ - `NSelect` is a compound control. Its part marker and class are on the component
77
+ host; `inputProps` supplies the accessible name of its filtering input. Its
78
+ menu stays inside the table with `to=false`, including in fullscreen mode.
79
+
80
+ The density and fullscreen features are separate imports:
81
+
82
+ ```ts
83
+ import { densityChooser } from "@adapttable/naive-ui/density";
84
+ import { fullscreen } from "@adapttable/naive-ui/fullscreen";
85
+
86
+ const features = [densityChooser(), fullscreen()];
87
+ ```
88
+
89
+ ## Filtering
90
+
91
+ Import filter contributions only where they are used:
92
+
93
+ ```ts
94
+ import { filters } from "@adapttable/naive-ui/filters";
95
+ import { headerFilters } from "@adapttable/naive-ui/header-filters";
96
+
97
+ interface Person {
98
+ name: string;
99
+ }
100
+ const features = [
101
+ filters<Person>([{ key: "name", type: "text" }], { tree: true }),
102
+ headerFilters(),
103
+ ];
104
+ ```
105
+
106
+ Filter fields use Naive inputs, selects and checkboxes. The advanced builder
107
+ uses a controlled Naive collapse with a native Naive button as its keyboard
108
+ trigger. Filter values, option loading, checklist windows and recursive writes
109
+ remain owned by the Vue binding. Standalone `ChecklistFilter`,
110
+ `FilterTreeBuilder`, `FilterHeaderControl` and `FilterHeaderRow` components use
111
+ the same generic row contracts.
112
+
113
+ The popover uses Naive's public manual coordinates, placement, portal and
114
+ outside-click APIs. Drawer mode retains Naive's mask, focus trap and scroll
115
+ lock. Escape first dismisses an open nested select, then the filter surface.
116
+ The drawer mask boundary below also applies to filtering.
117
+
118
+ ## Editing and grouping
119
+
120
+ The proposed `editing`, `batch-editing` and `grouping` subpaths add opt-in
121
+ controls. Cell, row and batch editing use `NInput`, `NInputNumber`, `NCheckbox`
122
+ and `NSelect`; Save, Cancel, conflict resolution, rollback, Undo and Redo use
123
+ `NButton`. Group collapse, paging and selection fill the shared group chrome
124
+ with Naive buttons and checkboxes on desktop and cards.
125
+
126
+ ```ts
127
+ import {
128
+ editing,
129
+ editHistory,
130
+ dirtyIndicators,
131
+ undoRedoButtons,
132
+ } from "@adapttable/naive-ui/editing";
133
+
134
+ const features = [
135
+ editing<Person>((row, columnKey, value) => {
136
+ // Update your authoritative data here.
137
+ }),
138
+ editHistory(),
139
+ dirtyIndicators(),
140
+ undoRedoButtons(),
141
+ ];
142
+ ```
143
+
144
+ Validation, raw drafts, pending saves, conflicts, history and stale callback
145
+ ownership remain in the Vue binding. Row editing saves through Save or Enter;
146
+ batch editing requires its explicit Save. Blur keeps staged drafts. History with
147
+ row or batch editing also needs an `editing()` callback to
148
+ replay values. Custom editors receive the binding's existing editor contract.
149
+
150
+ Numeric inputs use the public `inputProps` and `format` APIs so the binding's
151
+ raw draft survives vendor blur formatting. Numeric and choice editor refs
152
+ resolve `input[role="spinbutton"]` and `input[role="combobox"]` beneath Vue's
153
+ public `$el`; the roles are supplied through `inputProps`. Editing part markers,
154
+ validation ARIA attributes and class hooks land on these native inputs. This
155
+ editing select differs from the general compound-select host contract above.
156
+ An open select owns its navigation, selection and first Escape; a second Escape
157
+ cancels the edit and restores the activation button's focus.
158
+
159
+ ## Compatibility
160
+
161
+ This package targets Vue 3.5 and Naive UI 2.45.3. The package is prepared for an
162
+ initial 0.1.0 release. Registry publication is a separate release step.
163
+
164
+ ## Native control refs
165
+
166
+ Button, checkbox, table and card refs resolve their semantic root through Vue's
167
+ public `$el`. Adding or removing a callback keeps the same native element and
168
+ its focus. A public component option that replaces the root, such as
169
+ `NButton.tag`, releases the old target before supplying its replacement.
170
+
171
+ Input refs use the `inputElRef` and `textareaElRef` fields in Naive UI 2.45.3's
172
+ exported `InputInst` type. These return the actual input or textarea, including
173
+ when the control changes between those two shapes.
174
+
175
+ Naive UI's exported `SelectInst` exposes focus methods but no native-element
176
+ ref. Its `inputProps.ref` is replaced by its own internal template ref. The
177
+ adapter therefore performs a read-only lookup beneath Vue's public `$el` host
178
+ for `input[role="combobox"]`; that role reaches the actual filtering input
179
+ through the public `inputProps` API. This is a tested DOM-target bridge for
180
+ Naive UI 2.45.3, not an exposed `SelectInst` native-ref API. It does not read
181
+ private component state or change rendered attributes.
182
+
183
+ Replacing a callback, replacing its native target, removing the callback, or
184
+ unmounting the control releases the previous target with `null` before handing
185
+ over the next target. The select's part marker and classes remain on its
186
+ compound host.
187
+
188
+ ## Server rendering
189
+
190
+ Use Naive UI's CSS-render SSR integration on the server. Install
191
+ `@css-render/vue3-ssr` and collect the component styles after rendering:
192
+
193
+ ```ts
194
+ import { setup } from "@css-render/vue3-ssr";
195
+ import { createSSRApp } from "vue";
196
+ import { renderToString } from "vue/server-renderer";
197
+
198
+ const app = createSSRApp(App);
199
+ const { collect } = setup(app);
200
+ const html = await renderToString(app);
201
+ const styles = collect();
202
+ ```
203
+
204
+ Include `styles` in the document head and hydrate `html` with the matching
205
+ client app. This is required by Naive UI's floating controls as well as its
206
+ stylesheet collection.
207
+
208
+ ## Naive UI drawer mask boundary
209
+
210
+ Naive UI 2.45.3 keeps its decorative drawer mask internal. It exposes no public
211
+ mask attribute, class or theme-color hook. The vendor focus trap requires this
212
+ mask to remain enabled. Consequently, the mask cannot receive the shared
213
+ `data-adapttable-part="filters-backdrop"` marker or `filtersBackdrop` class hook
214
+ through supported Naive UI APIs. The public dialog and content targets remain
215
+ customizable.
216
+
217
+ ## Component documentation
218
+
219
+ - [Naive UI table primitives](https://www.naiveui.com/en-US/os-theme/components/table)
220
+ - [Naive UI button](https://www.naiveui.com/en-US/os-theme/components/button)
221
+ - [Naive UI checkbox](https://www.naiveui.com/en-US/os-theme/components/checkbox)
222
+ - [Naive UI input](https://www.naiveui.com/en-US/os-theme/components/input)
223
+ - [Naive UI select](https://www.naiveui.com/en-US/os-theme/components/select)
224
+ - [Naive UI license](https://github.com/tusen-ai/naive-ui/blob/main/LICENSE)
225
+
226
+ ## License
227
+
228
+ MIT.
229
+
230
+ ## Navigation and utility controls
231
+
232
+ Opt in through `bulk-actions`, `cell-navigation`, `export`, `find-in-table`,
233
+ `print`, `selection-stats`, and `status-bar`. The `cell-navigation` entry also
234
+ exports `columnSelectionCheckbox`; `status-bar` also exports `selectionStats`.
235
+
236
+ Naive buttons, checkboxes, inputs, text, cards and progress indicators render
237
+ the controls. The Vue binding owns selection ranges, find matches, action
238
+ requests and export jobs. Printing and data changes remain host callbacks.
239
+ Find and utility controls work in mobile cards; cell ranges and fill handles
240
+ are desktop-grid features.
241
+
242
+ ## Command and context surfaces
243
+
244
+ Import `commandPalette` from `command-palette` and `contextMenu` from
245
+ `context-menu`. The command palette uses native Naive inputs and buttons
246
+ inside an `NModal` and `NCard`; native modal focus and dismissal are guarded
247
+ against nested or already-handled Escape events.
248
+
249
+ The context menu uses `NPopover`, `NCard`, and real `NButton` menu items. The
250
+ shared binding's menu controller owns wrapped navigation, disabled-item
251
+ skipping, and prefix typeahead. Tab and Shift+Tab dismiss without cancelling
252
+ native traversal. Both surfaces retain the binding's lifecycle and fullscreen
253
+ container contracts.
254
+
255
+ ## Grouping panel and row movement
256
+
257
+ Import `groupingPanel` from `grouping-panel` and `rowReorder` from
258
+ `row-reorder`. Naive grouping choices, buttons, checkboxes and tags fill the
259
+ shared grouping controller. Group ordering, aggregation capabilities, defaults,
260
+ and announcements stay in the binding. Declare numeric aggregation operations
261
+ explicitly, or supply a numeric column filter/editor for implied operations.
262
+
263
+ Row handles and mobile move buttons issue host requests. Cross-group destination
264
+ choices use `NSelect`, retain disabled choices and their reasons, and keep the
265
+ selector within the table. The optional native confirmation modal starts on
266
+ Cancel and restores the real destination input. Confirmation and stale-session
267
+ decisions stay with the shared row model.
268
+
269
+ ## Saved views and side panels
270
+
271
+ Import `savedViews` and `SavedViewsPanel` from `saved-views`, and `sidePanel`
272
+ from `side-panel`. Native Naive buttons, inputs, cards and tags render the
273
+ binding's saved-view disclosure and management controls. Read-only views,
274
+ renaming, ordering and persistence remain owned by the shared controller.
275
+
276
+ Side panels use native card and button presentation over the shared tab,
277
+ selection, identity and lifecycle contract. Host-controlled open state stays
278
+ authoritative. Managed saved-view popovers use the table's fullscreen container
279
+ and semantic trigger/input refs.
280
+
281
+ ### Optional assistant and pivot controls
282
+
283
+ The `assistant` entry provides `TableAssistant`, `AgentApproval`,
284
+ `tableAssistant()`, and `agentApproval()` using the binding's conversation and
285
+ approval contracts. Its sheet is an `NDrawer`, examples use an `NPopover` menu,
286
+ the composer is an `NInput` textarea, and speech language choices use
287
+ `NSelect`. It does not import an AI transport or own approval decisions. The
288
+ `pivot` entry provides a controlled `PivotPanel` with `NSelect` and `NButton`
289
+ controls.
@@ -0,0 +1,371 @@
1
+ const require_button = require("./button-CVOchGam.cjs");
2
+ const require_input = require("./input-Cgm2r2YC.cjs");
3
+ const require_classNames = require("./classNames-CR71pIAv.cjs");
4
+ const require_select = require("./select-ChoLy-Ja.cjs");
5
+ let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
6
+ let vue = require("vue");
7
+ let naive_ui = require("naive-ui");
8
+ //#region src/filters/controls.ts
9
+ /** The kit owns checkbox paint and its value event; the filter model owns writes. */
10
+ function naiveFilterCheckbox(control, content = control.label) {
11
+ return require_button.naiveElement(naive_ui.NCheckbox, {
12
+ ...control.attrs,
13
+ checked: control.checked,
14
+ "aria-label": control.label,
15
+ "aria-labelledby": control.attrs["aria-labelledby"] ?? void 0,
16
+ "onUpdate:checked": (checked) => control.onChange(checked)
17
+ }, () => content);
18
+ }
19
+ function naiveFilterControls(names) {
20
+ return {
21
+ Input: (control) => require_input.naiveInput({
22
+ ...control,
23
+ attrs: {
24
+ ...control.attrs,
25
+ class: names().filterInput
26
+ }
27
+ }),
28
+ Select: (control) => require_select.naiveSelect({
29
+ ...control,
30
+ attrs: {
31
+ ...control.attrs,
32
+ class: control.attrs["data-adapttable-part"] === "filter-operator" ? names().filterOperator : names().filterSelect
33
+ }
34
+ }),
35
+ Checkbox: (control) => naiveFilterCheckbox({
36
+ ...control,
37
+ attrs: {
38
+ ...control.attrs,
39
+ class: names().filterCheckbox
40
+ }
41
+ })
42
+ };
43
+ }
44
+ //#endregion
45
+ //#region src/filters/NaiveBasicFilterField.vue
46
+ const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
47
+ name: "NaiveBasicFilterField",
48
+ __name: "NaiveBasicFilterField",
49
+ props: {
50
+ id: {},
51
+ def: {},
52
+ source: {},
53
+ labels: {},
54
+ registry: {}
55
+ },
56
+ setup(__props) {
57
+ const props = __props;
58
+ const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
59
+ const model = (0, _adapttable_vue_adapter.useFilterField)(() => props);
60
+ const controls = naiveFilterControls(() => names.value);
61
+ const Render = () => (0, _adapttable_vue_adapter.FilterFieldChrome)({
62
+ model: model.value,
63
+ controls,
64
+ classNames: names.value
65
+ });
66
+ Render.props = [];
67
+ return (_ctx, _cache) => {
68
+ return (0, vue.openBlock)(), (0, vue.createBlock)(Render);
69
+ };
70
+ }
71
+ });
72
+ //#endregion
73
+ //#region src/filters/NaiveChecklistFilter.vue
74
+ const _sfc_main$1 = /*@__PURE__*/ (0, vue.defineComponent)({
75
+ name: "NaiveChecklistFilter",
76
+ __name: "NaiveChecklistFilter",
77
+ props: {
78
+ def: {},
79
+ source: {},
80
+ labels: {},
81
+ classNames: {}
82
+ },
83
+ setup(__props) {
84
+ const props = __props;
85
+ const model = (0, _adapttable_vue_adapter.useChecklistModel)(() => props);
86
+ const controls = {
87
+ Search: (control) => require_input.naiveInput({
88
+ value: control.value,
89
+ onChange: control.onChange,
90
+ attrs: {
91
+ type: "search",
92
+ "aria-label": control.label,
93
+ "data-adapttable-part": "filter-checklist-search",
94
+ class: control.className
95
+ }
96
+ }),
97
+ Button: (control) => require_button.naiveButton({ onClick: control.onClick }, control.label),
98
+ Checkbox: (control) => naiveFilterCheckbox({
99
+ ...control,
100
+ attrs: {
101
+ "data-adapttable-part": "filter-checkbox",
102
+ class: control.className
103
+ }
104
+ }, [control.label, (0, vue.h)("span", {
105
+ "data-adapttable-part": "filter-checklist-count",
106
+ class: control.countClassName
107
+ }, control.count)])
108
+ };
109
+ const Render = () => (0, _adapttable_vue_adapter.ChecklistChrome)({
110
+ model: model.value,
111
+ controls
112
+ });
113
+ Render.props = [];
114
+ return (_ctx, _cache) => {
115
+ return (0, vue.openBlock)(), (0, vue.createBlock)(Render);
116
+ };
117
+ }
118
+ });
119
+ //#endregion
120
+ //#region src/filters/NaiveFilterField.vue
121
+ const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
122
+ name: "NaiveFilterField",
123
+ __name: "NaiveFilterField",
124
+ props: {
125
+ id: {},
126
+ def: {},
127
+ source: {},
128
+ labels: {},
129
+ registry: {}
130
+ },
131
+ setup(__props) {
132
+ const props = __props;
133
+ const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
134
+ const Render = () => {
135
+ if ((0, _adapttable_vue_adapter.filterWidgetKind)(props.def, props.registry ?? _adapttable_vue_adapter.defaultFilterRegistry) !== "checklist") return (0, vue.h)(_sfc_main$2, { ...props });
136
+ return (0, vue.h)("fieldset", {
137
+ "data-adapttable-part": "filter-field",
138
+ class: names.value.filterField
139
+ }, [(0, vue.h)("legend", {
140
+ "data-adapttable-part": "filter-label",
141
+ class: names.value.filterLabel
142
+ }, (0, _adapttable_vue_adapter.filterLabel)(props.def)), (0, vue.h)(_sfc_main$1, {
143
+ def: props.def,
144
+ source: props.source,
145
+ labels: props.labels,
146
+ classNames: names.value
147
+ })]);
148
+ };
149
+ Render.props = [];
150
+ return (_ctx, _cache) => {
151
+ return (0, vue.openBlock)(), (0, vue.createBlock)(Render);
152
+ };
153
+ }
154
+ });
155
+ //#endregion
156
+ //#region src/filters/NaiveFilterSurface.ts
157
+ /** Public vendor surfaces own their mask, trap, scroll lock and portal. */
158
+ const NaiveFilterSurface = (0, vue.defineComponent)((props) => {
159
+ const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
160
+ const active = (0, _adapttable_vue_adapter.useScopeActivity)();
161
+ const mounted = (0, vue.shallowRef)(false);
162
+ const content = (0, vue.shallowRef)(null);
163
+ const position = (0, vue.shallowRef)();
164
+ let lifetime = 0;
165
+ let reason;
166
+ const dismiss = (why, ticket, owner) => {
167
+ if (ticket !== lifetime || !active.value || !props.open || owner !== props.onClose) return;
168
+ reason = why;
169
+ owner(why);
170
+ };
171
+ (0, vue.onMounted)(() => {
172
+ mounted.value = true;
173
+ });
174
+ (0, vue.watch)([
175
+ active,
176
+ () => props.open,
177
+ () => props.anchor,
178
+ () => props.modal,
179
+ () => props.onClose
180
+ ], ([enabled, open, anchor, modal], previous) => {
181
+ const ticket = ++lifetime;
182
+ const surface = content.value;
183
+ const focused = surface?.ownerDocument.activeElement;
184
+ if (!modal && enabled && !open && previous[1] && reason !== "outside" && surface && focused && surface.contains(focused) && anchor?.isConnected) (0, vue.nextTick)(() => {
185
+ const current = anchor.ownerDocument.activeElement;
186
+ if (ticket === lifetime && active.value && !props.open && props.anchor === anchor && anchor.isConnected && (current === focused || current === anchor.ownerDocument.body)) anchor.focus();
187
+ });
188
+ reason = void 0;
189
+ }, { flush: "sync" });
190
+ (0, vue.watch)([
191
+ mounted,
192
+ active,
193
+ () => props.open,
194
+ () => props.anchor,
195
+ () => props.dir,
196
+ () => props.modal,
197
+ () => props.onClose
198
+ ], ([ready, enabled, open, anchor, dir, modal], _previous, cleanup) => {
199
+ if (!ready || !enabled || !open || !anchor || modal) return;
200
+ const view = anchor.ownerDocument.defaultView;
201
+ if (!view) return;
202
+ const place = () => {
203
+ const rect = anchor.getBoundingClientRect();
204
+ const root = anchor.ownerDocument.documentElement;
205
+ const viewport = root.clientWidth;
206
+ const rem = Number.parseFloat(view.getComputedStyle(root).fontSize);
207
+ const width = Math.min(22 * (rem || 16), viewport - 16);
208
+ position.value = {
209
+ x: dir === "rtl" ? Math.min(viewport - 8, Math.max(rect.right, width + 8)) : Math.max(8, Math.min(rect.left, viewport - 8 - width)),
210
+ maxWidth: viewport - 16,
211
+ y: rect.bottom,
212
+ maxHeight: Math.max(0, Math.min(560, Math.max(rect.top, view.innerHeight - rect.bottom) - 8))
213
+ };
214
+ };
215
+ place();
216
+ const ticket = lifetime;
217
+ const owner = props.onClose;
218
+ const keydown = (event) => {
219
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
220
+ const target = event.target;
221
+ const dialog = target instanceof Element ? target.closest("[role=\"dialog\"]") : null;
222
+ if (dialog && dialog !== content.value?.closest("[role=\"dialog\"]")) return;
223
+ event.preventDefault();
224
+ dismiss("escape", ticket, owner);
225
+ };
226
+ anchor.ownerDocument.addEventListener("keydown", keydown);
227
+ view.addEventListener("resize", place);
228
+ view.addEventListener("scroll", place, true);
229
+ const observer = view.ResizeObserver ? new view.ResizeObserver(place) : void 0;
230
+ observer?.observe(anchor);
231
+ cleanup(() => {
232
+ anchor.ownerDocument.removeEventListener("keydown", keydown);
233
+ view.removeEventListener("resize", place);
234
+ view.removeEventListener("scroll", place, true);
235
+ observer?.disconnect();
236
+ });
237
+ }, { flush: "post" });
238
+ (0, vue.watch)([
239
+ content,
240
+ active,
241
+ () => props.open,
242
+ () => props.modal
243
+ ], ([element, enabled, open, modal]) => {
244
+ if (!element || !enabled || !open || modal || element.contains(element.ownerDocument.activeElement)) return;
245
+ ([...element.querySelectorAll("input:not([type='hidden']), select, button, [tabindex='0']")].find((node) => !node.matches(":disabled") && node.getAttribute("aria-disabled") !== "true" && !node.closest("[hidden], [inert]")) ?? element).focus({ preventScroll: true });
246
+ }, { flush: "post" });
247
+ return () => {
248
+ const classes = require_classNames.naiveClassNames(names.value);
249
+ const ticket = lifetime;
250
+ const requestClose = props.onClose;
251
+ const current = () => ticket === lifetime && active.value && props.open;
252
+ const close = (why) => {
253
+ dismiss(why, ticket, requestClose);
254
+ };
255
+ const open = mounted.value && active.value && props.open;
256
+ const children = () => (0, vue.h)("div", {
257
+ ref: content,
258
+ tabindex: -1
259
+ }, [props.children]);
260
+ const keydown = (event) => {
261
+ if (event.key !== "Escape" || event.defaultPrevented || event.isComposing || !current()) return;
262
+ if (props.modal) {
263
+ reason = "escape";
264
+ (0, vue.nextTick)(() => {
265
+ if (ticket === lifetime) reason = void 0;
266
+ });
267
+ } else {
268
+ event.preventDefault();
269
+ event.stopPropagation();
270
+ close("escape");
271
+ }
272
+ };
273
+ const attrs = {
274
+ dir: props.dir,
275
+ role: "dialog",
276
+ "aria-label": props.label,
277
+ "data-adapttable-part": props.part ?? (props.modal ? "filters-panel" : "filters-popover"),
278
+ class: ["adapttable-naive-filter-surface", props.className ?? (props.modal ? classes.filtersPanel : classes.filtersPopover)],
279
+ onKeydown: keydown
280
+ };
281
+ if (props.modal) return (0, vue.h)(naive_ui.NDrawer, {
282
+ ...attrs,
283
+ class: [attrs.class, classes.filtersDrawer],
284
+ show: open,
285
+ to: props.container ?? void 0,
286
+ placement: props.dir === "rtl" ? "left" : "right",
287
+ width: "min(24rem, calc(100vw - 16px))",
288
+ "onUpdate:show": (show) => {
289
+ if (!show) close(reason ?? "outside");
290
+ }
291
+ }, { default: () => (0, vue.h)(naive_ui.NDrawerContent, {}, { default: children }) });
292
+ if (!mounted.value || !props.anchor || !position.value) return null;
293
+ return (0, vue.h)(naive_ui.NPopover, {
294
+ ...attrs,
295
+ trigger: "manual",
296
+ show: open && !!props.anchor && !!position.value,
297
+ x: position.value?.x,
298
+ y: position.value?.y,
299
+ to: props.container ?? void 0,
300
+ placement: props.dir === "rtl" ? "bottom-end" : "bottom-start",
301
+ showArrow: false,
302
+ style: {
303
+ boxSizing: "border-box",
304
+ width: "22rem",
305
+ maxWidth: `${position.value.maxWidth}px`,
306
+ maxHeight: `${position.value.maxHeight}px`,
307
+ overflow: "auto"
308
+ },
309
+ onClickoutside: (event) => {
310
+ const target = event.target;
311
+ if (!(target instanceof Node) || !props.anchor?.contains(target)) close("outside");
312
+ }
313
+ }, { default: children });
314
+ };
315
+ }, {
316
+ name: "NaiveFilterSurface",
317
+ props: {
318
+ open: {
319
+ type: Boolean,
320
+ default: void 0
321
+ },
322
+ label: { type: String },
323
+ dir: { type: String },
324
+ anchor: { type: Object },
325
+ container: { type: Object },
326
+ children: {
327
+ type: [
328
+ String,
329
+ Number,
330
+ Boolean,
331
+ Array,
332
+ Object
333
+ ],
334
+ default: void 0
335
+ },
336
+ onClose: { type: Function },
337
+ className: { type: String },
338
+ modal: {
339
+ type: Boolean,
340
+ default: void 0
341
+ },
342
+ part: { type: String }
343
+ }
344
+ });
345
+ //#endregion
346
+ Object.defineProperty(exports, "NaiveFilterSurface", {
347
+ enumerable: true,
348
+ get: function() {
349
+ return NaiveFilterSurface;
350
+ }
351
+ });
352
+ Object.defineProperty(exports, "_sfc_main", {
353
+ enumerable: true,
354
+ get: function() {
355
+ return _sfc_main;
356
+ }
357
+ });
358
+ Object.defineProperty(exports, "_sfc_main$1", {
359
+ enumerable: true,
360
+ get: function() {
361
+ return _sfc_main$1;
362
+ }
363
+ });
364
+ Object.defineProperty(exports, "naiveFilterCheckbox", {
365
+ enumerable: true,
366
+ get: function() {
367
+ return naiveFilterCheckbox;
368
+ }
369
+ });
370
+
371
+ //# sourceMappingURL=NaiveFilterSurface-DFoXPlGU.cjs.map