@woodger/antd 0.1.2 → 0.1.4

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 (538) hide show
  1. package/dist/affix/Affix.svelte +7 -2
  2. package/dist/affix/affix.types.d.ts +3 -2
  3. package/dist/alert/Alert.svelte +17 -12
  4. package/dist/alert/alert.types.d.ts +12 -11
  5. package/dist/anchor/AnchorLink.svelte +4 -1
  6. package/dist/anchor/anchor.types.d.ts +10 -9
  7. package/dist/app/App.svelte +2 -1
  8. package/dist/app/app.types.d.ts +3 -2
  9. package/dist/auto-complete/AutoComplete.svelte +280 -69
  10. package/dist/auto-complete/auto-complete.types.d.ts +34 -3
  11. package/dist/avatar/Avatar.svelte +43 -30
  12. package/dist/avatar/AvatarGroup.svelte +31 -10
  13. package/dist/avatar/AvatarGroupOverflow.svelte +27 -8
  14. package/dist/avatar/AvatarGroupOverflow.svelte.d.ts +2 -0
  15. package/dist/avatar/avatar-group-context.d.ts +10 -0
  16. package/dist/avatar/avatar-group-context.js +11 -0
  17. package/dist/avatar/avatar-group.engine.d.ts +13 -4
  18. package/dist/avatar/avatar-group.engine.js +18 -0
  19. package/dist/avatar/avatar-group.types.d.ts +11 -5
  20. package/dist/avatar/avatar.types.d.ts +6 -4
  21. package/dist/badge/Badge.svelte +34 -15
  22. package/dist/badge/BadgeRibbon.svelte +23 -19
  23. package/dist/badge/badge-ribbon.dom.d.ts +2 -4
  24. package/dist/badge/badge-ribbon.dom.js +14 -10
  25. package/dist/badge/badge-ribbon.types.d.ts +12 -11
  26. package/dist/badge/badge-style.dom.d.ts +2 -2
  27. package/dist/badge/badge-style.dom.js +9 -5
  28. package/dist/badge/badge-style.engine.d.ts +5 -0
  29. package/dist/badge/badge-style.engine.js +9 -2
  30. package/dist/badge/badge.engine.js +1 -1
  31. package/dist/badge/badge.types.d.ts +15 -11
  32. package/dist/border-beam/BorderBeam.svelte +4 -2
  33. package/dist/border-beam/border-beam.engine.d.ts +2 -2
  34. package/dist/border-beam/border-beam.engine.js +7 -12
  35. package/dist/border-beam/border-beam.types.d.ts +4 -3
  36. package/dist/breadcrumb/Breadcrumb.svelte +4 -1
  37. package/dist/breadcrumb/BreadcrumbEntry.svelte +6 -19
  38. package/dist/breadcrumb/breadcrumb.engine.d.ts +5 -2
  39. package/dist/breadcrumb/breadcrumb.engine.js +25 -2
  40. package/dist/breadcrumb/breadcrumb.types.d.ts +30 -18
  41. package/dist/button/Button.svelte +28 -6
  42. package/dist/button/ButtonLabel.svelte +23 -0
  43. package/dist/button/ButtonLabel.svelte.d.ts +13 -0
  44. package/dist/button/button.engine.d.ts +6 -0
  45. package/dist/button/button.engine.js +35 -0
  46. package/dist/button/button.types.d.ts +11 -8
  47. package/dist/calendar/CalendarCore.svelte +23 -17
  48. package/dist/calendar/calendar.types.d.ts +8 -7
  49. package/dist/card/Card.svelte +55 -16
  50. package/dist/card/CardGrid.svelte +4 -1
  51. package/dist/card/CardMeta.svelte +4 -1
  52. package/dist/card/card-semantic.engine.d.ts +1 -1
  53. package/dist/card/card-semantic.engine.js +2 -2
  54. package/dist/card/card.engine.d.ts +2 -0
  55. package/dist/card/card.engine.js +7 -0
  56. package/dist/card/card.types.d.ts +19 -19
  57. package/dist/carousel/Carousel.svelte +5 -2
  58. package/dist/carousel/carousel-settings.engine.d.ts +1 -1
  59. package/dist/carousel/carousel.types.d.ts +4 -3
  60. package/dist/cascader/Cascader.svelte +8 -3
  61. package/dist/cascader/Cascader.svelte.d.ts +13 -13
  62. package/dist/cascader/CascaderColumns.svelte +25 -27
  63. package/dist/cascader/CascaderColumns.svelte.d.ts +9 -7
  64. package/dist/cascader/CascaderCore.svelte +884 -145
  65. package/dist/cascader/CascaderCore.svelte.d.ts +14 -14
  66. package/dist/cascader/CascaderPanel.svelte +9 -3
  67. package/dist/cascader/CascaderPanel.svelte.d.ts +13 -13
  68. package/dist/cascader/cascader.component.d.ts +9 -3
  69. package/dist/cascader/cascader.dom.d.ts +1 -1
  70. package/dist/cascader/cascader.dom.js +2 -2
  71. package/dist/cascader/cascader.engine.d.ts +51 -24
  72. package/dist/cascader/cascader.engine.js +69 -6
  73. package/dist/cascader/cascader.types.d.ts +126 -45
  74. package/dist/checkbox/Checkbox.svelte +10 -6
  75. package/dist/checkbox/CheckboxGroup.svelte +8 -3
  76. package/dist/checkbox/checkbox-group.types.d.ts +5 -4
  77. package/dist/checkbox/checkbox.types.d.ts +15 -13
  78. package/dist/collapse/Collapse.svelte +39 -10
  79. package/dist/collapse/CollapseItemView.svelte +5 -4
  80. package/dist/collapse/CollapsePanel.svelte +35 -3
  81. package/dist/collapse/CollapsePanel.svelte.d.ts +3 -0
  82. package/dist/collapse/collapse-context.d.ts +5 -1
  83. package/dist/collapse/collapse.engine.d.ts +4 -4
  84. package/dist/collapse/collapse.types.d.ts +20 -14
  85. package/dist/color-picker/ColorPicker.svelte +165 -107
  86. package/dist/color-picker/ColorPickerPresets.svelte +4 -1
  87. package/dist/color-picker/color-picker-alignment.dom.d.ts +17 -0
  88. package/dist/color-picker/color-picker-alignment.dom.js +144 -0
  89. package/dist/color-picker/color-picker.types.d.ts +14 -13
  90. package/dist/component-refs.types.d.ts +1 -1
  91. package/dist/descriptions/Descriptions.svelte +16 -9
  92. package/dist/descriptions/DescriptionsCell.svelte +19 -19
  93. package/dist/descriptions/DescriptionsCell.svelte.d.ts +2 -1
  94. package/dist/descriptions/descriptions-semantic.engine.d.ts +2 -2
  95. package/dist/descriptions/descriptions-semantic.engine.js +2 -2
  96. package/dist/descriptions/descriptions.types.d.ts +13 -13
  97. package/dist/dialog/dialog-container.model.svelte.js +2 -2
  98. package/dist/divider/Divider.svelte +19 -12
  99. package/dist/divider/divider.types.d.ts +6 -5
  100. package/dist/drawer/Drawer.svelte +32 -17
  101. package/dist/drawer/DrawerPanel.svelte +8 -6
  102. package/dist/drawer/drawer-ancestor-clip.dom.d.ts +15 -0
  103. package/dist/drawer/drawer-ancestor-clip.dom.js +145 -0
  104. package/dist/drawer/drawer-clip-plane.dom.d.ts +22 -0
  105. package/dist/drawer/drawer-clip-plane.dom.js +100 -0
  106. package/dist/drawer/drawer-clip-shape.dom.d.ts +5 -0
  107. package/dist/drawer/drawer-clip-shape.dom.js +52 -0
  108. package/dist/drawer/drawer-clip-style.dom.d.ts +34 -0
  109. package/dist/drawer/drawer-clip-style.dom.js +190 -0
  110. package/dist/drawer/drawer-layout.dom.d.ts +6 -0
  111. package/dist/drawer/drawer-layout.dom.js +240 -0
  112. package/dist/drawer/drawer-overflow.dom.d.ts +9 -0
  113. package/dist/drawer/drawer-overflow.dom.js +249 -0
  114. package/dist/drawer/drawer-overflow.engine.d.ts +54 -0
  115. package/dist/drawer/drawer-overflow.engine.js +205 -0
  116. package/dist/drawer/drawer-panel.engine.d.ts +3 -2
  117. package/dist/drawer/drawer-panel.engine.js +4 -5
  118. package/dist/drawer/drawer-svg-clip.dom.d.ts +9 -0
  119. package/dist/drawer/drawer-svg-clip.dom.js +394 -0
  120. package/dist/drawer/drawer.dom.d.ts +2 -0
  121. package/dist/drawer/drawer.dom.js +16 -6
  122. package/dist/drawer/drawer.types.d.ts +22 -21
  123. package/dist/dropdown/Dropdown.svelte +122 -21
  124. package/dist/dropdown/dropdown-position.dom.d.ts +3 -1
  125. package/dist/dropdown/dropdown-position.dom.js +18 -7
  126. package/dist/dropdown/dropdown.engine.d.ts +10 -7
  127. package/dist/dropdown/dropdown.engine.js +29 -13
  128. package/dist/dropdown/dropdown.types.d.ts +7 -6
  129. package/dist/empty/Empty.svelte +12 -9
  130. package/dist/empty/empty.types.d.ts +9 -8
  131. package/dist/flex/Flex.svelte +21 -7
  132. package/dist/flex/flex.types.d.ts +2 -1
  133. package/dist/float-button/FloatButton.svelte +18 -10
  134. package/dist/float-button/FloatButtonBackTop.svelte +6 -6
  135. package/dist/float-button/FloatButtonGroup.svelte +20 -21
  136. package/dist/float-button/float-button-context.d.ts +2 -1
  137. package/dist/float-button/float-button.types.d.ts +10 -8
  138. package/dist/form/Form.svelte +6 -2
  139. package/dist/form/FormItem.svelte +39 -23
  140. package/dist/form/FormItem.svelte.d.ts +4 -2
  141. package/dist/form/FormItemTooltip.svelte +2 -2
  142. package/dist/form/form-internal.d.ts +1 -0
  143. package/dist/form/form.model.svelte.js +37 -13
  144. package/dist/form/form.types.d.ts +18 -13
  145. package/dist/grid/Col.svelte +14 -15
  146. package/dist/grid/Row.svelte +6 -11
  147. package/dist/grid/grid.engine.d.ts +4 -1
  148. package/dist/grid/grid.engine.js +15 -3
  149. package/dist/grid/grid.types.d.ts +5 -2
  150. package/dist/image/Image.svelte +9 -8
  151. package/dist/image/ImagePreview.svelte +15 -11
  152. package/dist/image/ImagePreview.svelte.d.ts +2 -1
  153. package/dist/image/ImageProgress.svelte +8 -5
  154. package/dist/image/ImageProgress.svelte.d.ts +2 -1
  155. package/dist/image/image-preview-group.types.d.ts +2 -1
  156. package/dist/image/image-semantic.engine.d.ts +14 -13
  157. package/dist/image/image-semantic.engine.js +5 -9
  158. package/dist/image/image.types.d.ts +23 -22
  159. package/dist/index.d.ts +12 -12
  160. package/dist/index.js +2 -2
  161. package/dist/input/Input.svelte +70 -52
  162. package/dist/input/InputOTP.svelte +9 -7
  163. package/dist/input/InputPassword.svelte +10 -26
  164. package/dist/input/InputSearch.svelte +39 -16
  165. package/dist/input/TextArea.svelte +116 -87
  166. package/dist/input/input-otp.types.d.ts +12 -9
  167. package/dist/input/input-password.types.d.ts +6 -6
  168. package/dist/input/input-search.types.d.ts +8 -8
  169. package/dist/input/input-value.svelte.d.ts +7 -0
  170. package/dist/input/input-value.svelte.js +21 -0
  171. package/dist/input/input.types.d.ts +13 -8
  172. package/dist/input/textarea-value.svelte.d.ts +14 -0
  173. package/dist/input/textarea-value.svelte.js +48 -0
  174. package/dist/input/textarea.dom.d.ts +2 -0
  175. package/dist/input/textarea.dom.js +17 -0
  176. package/dist/input/textarea.types.d.ts +12 -8
  177. package/dist/input-number/InputNumberAction.svelte +2 -2
  178. package/dist/input-number/InputNumberControl.svelte +31 -21
  179. package/dist/input-number/input-number.types.d.ts +16 -16
  180. package/dist/layout/Layout.svelte +2 -1
  181. package/dist/layout/LayoutPart.svelte +2 -1
  182. package/dist/layout/LayoutSider.svelte +22 -15
  183. package/dist/layout/layout.types.d.ts +6 -5
  184. package/dist/listy/Listy.svelte +17 -12
  185. package/dist/listy/ListyGroupHeader.svelte +8 -2
  186. package/dist/listy/ListyGroupHeader.svelte.d.ts +2 -1
  187. package/dist/listy/ListyRaw.svelte +7 -9
  188. package/dist/listy/ListyVirtual.svelte +5 -2
  189. package/dist/listy/listy.types.d.ts +13 -10
  190. package/dist/masonry/Masonry.svelte +27 -17
  191. package/dist/masonry/MasonryItem.svelte +0 -1
  192. package/dist/masonry/masonry.types.d.ts +8 -7
  193. package/dist/mentions/Mentions.svelte +112 -59
  194. package/dist/mentions/MentionsListbox.svelte +2 -1
  195. package/dist/mentions/mentions.dom.d.ts +0 -2
  196. package/dist/mentions/mentions.dom.js +0 -54
  197. package/dist/mentions/mentions.engine.d.ts +35 -0
  198. package/dist/mentions/mentions.engine.js +7 -0
  199. package/dist/mentions/mentions.types.d.ts +12 -8
  200. package/dist/menu/Menu.svelte +6 -4
  201. package/dist/menu/MenuItem.svelte +23 -14
  202. package/dist/menu/MenuItemTooltip.svelte +2 -1
  203. package/dist/menu/MenuList.svelte +7 -4
  204. package/dist/menu/MenuSubMenu.svelte +109 -32
  205. package/dist/menu/menu-motion.engine.js +3 -28
  206. package/dist/menu/menu-motion.svelte.d.ts +1 -7
  207. package/dist/menu/menu-motion.svelte.js +1 -33
  208. package/dist/menu/menu-popup-align.dom.d.ts +1 -1
  209. package/dist/menu/menu-popup-align.engine.d.ts +2 -2
  210. package/dist/menu/menu-popup-align.engine.js +1 -4
  211. package/dist/menu/menu-semantic.engine.d.ts +8 -8
  212. package/dist/menu/menu-semantic.engine.js +16 -6
  213. package/dist/menu/menu.engine.d.ts +5 -1
  214. package/dist/menu/menu.engine.js +15 -0
  215. package/dist/menu/menu.types.d.ts +25 -22
  216. package/dist/message/MessageHolder.svelte +6 -5
  217. package/dist/message/MessageNotice.svelte +12 -9
  218. package/dist/message/MessageNotice.svelte.d.ts +2 -1
  219. package/dist/message/message-semantic.engine.d.ts +1 -1
  220. package/dist/message/message.model.svelte.d.ts +2 -1
  221. package/dist/message/message.model.svelte.js +2 -1
  222. package/dist/message/message.types.d.ts +12 -10
  223. package/dist/modal/Modal.svelte +120 -46
  224. package/dist/modal/ModalConfirmation.svelte +9 -10
  225. package/dist/modal/modal-close.engine.d.ts +1 -1
  226. package/dist/modal/modal-semantic.engine.d.ts +7 -6
  227. package/dist/modal/modal-semantic.engine.js +2 -2
  228. package/dist/modal/modal.types.d.ts +25 -18
  229. package/dist/motion/collapse-motion.engine.d.ts +3 -0
  230. package/dist/motion/collapse-motion.engine.js +31 -0
  231. package/dist/motion/css-motion.svelte.d.ts +7 -0
  232. package/dist/motion/css-motion.svelte.js +35 -0
  233. package/dist/notice/notice-queue.model.svelte.js +4 -0
  234. package/dist/notice/notice-semantic.engine.d.ts +10 -7
  235. package/dist/notice/notice-semantic.engine.js +9 -4
  236. package/dist/notification/NotificationHolder.svelte +4 -4
  237. package/dist/notification/NotificationList.svelte +5 -2
  238. package/dist/notification/NotificationList.svelte.d.ts +2 -1
  239. package/dist/notification/NotificationNotice.svelte +16 -18
  240. package/dist/notification/NotificationNotice.svelte.d.ts +2 -1
  241. package/dist/notification/notification.model.svelte.d.ts +2 -1
  242. package/dist/notification/notification.types.d.ts +12 -9
  243. package/dist/pagination/Pagination.svelte +87 -16
  244. package/dist/pagination/PaginationControl.svelte +2 -0
  245. package/dist/pagination/pagination.types.d.ts +19 -14
  246. package/dist/picker/DatePicker.svelte +9 -1
  247. package/dist/picker/DatePicker.svelte.d.ts +3 -3
  248. package/dist/picker/DatePickerCalendar.svelte +15 -12
  249. package/dist/picker/DatePickerCalendar.svelte.d.ts +2 -2
  250. package/dist/picker/DatePickerTimePanel.svelte +5 -1
  251. package/dist/picker/DatePickerTimePanel.svelte.d.ts +2 -4
  252. package/dist/picker/PickerTimeColumn.svelte +27 -12
  253. package/dist/picker/PickerTimeColumn.svelte.d.ts +3 -0
  254. package/dist/picker/PickerTimePanel.svelte +16 -0
  255. package/dist/picker/PickerTimePanel.svelte.d.ts +3 -0
  256. package/dist/picker/RangePicker.svelte +5 -1
  257. package/dist/picker/RangePickerCore.svelte +1066 -418
  258. package/dist/picker/RangePickerCore.svelte.d.ts +1 -0
  259. package/dist/picker/SinglePicker.svelte +859 -372
  260. package/dist/picker/SinglePicker.svelte.d.ts +1 -0
  261. package/dist/picker/TimePicker.svelte +3 -1
  262. package/dist/picker/TimeRangePicker.svelte +2 -0
  263. package/dist/picker/date-picker-semantic.engine.d.ts +7 -6
  264. package/dist/picker/date-picker-semantic.engine.js +5 -4
  265. package/dist/picker/date-picker.types.d.ts +64 -30
  266. package/dist/picker/picker-adapter-props.engine.d.ts +2 -0
  267. package/dist/picker/picker-adapter-props.engine.js +4 -0
  268. package/dist/picker/picker-components.types.d.ts +2 -2
  269. package/dist/picker/picker-editor.model.svelte.d.ts +13 -0
  270. package/dist/picker/picker-editor.model.svelte.js +40 -0
  271. package/dist/picker/picker-mask-input.model.svelte.js +11 -6
  272. package/dist/picker/picker-panel-updates.d.ts +6 -0
  273. package/dist/picker/picker-panel-updates.js +33 -0
  274. package/dist/picker/picker-popup-portal.dom.d.ts +49 -0
  275. package/dist/picker/picker-popup-portal.dom.js +49 -0
  276. package/dist/picker/picker-popup.dom.d.ts +14 -2
  277. package/dist/picker/picker-popup.dom.js +155 -40
  278. package/dist/picker/picker-popup.model.svelte.d.ts +33 -7
  279. package/dist/picker/picker-popup.model.svelte.js +183 -20
  280. package/dist/picker/picker-prefix.engine.js +4 -1
  281. package/dist/picker/picker-style.engine.d.ts +27 -0
  282. package/dist/picker/picker-style.engine.js +64 -0
  283. package/dist/picker/picker-time-scroll.model.svelte.d.ts +16 -0
  284. package/dist/picker/picker-time-scroll.model.svelte.js +31 -0
  285. package/dist/picker/range-picker-interaction.engine.d.ts +3 -2
  286. package/dist/picker/range-picker-interaction.engine.js +10 -4
  287. package/dist/picker/range-picker-popup.dom.d.ts +2 -0
  288. package/dist/picker/range-picker-popup.dom.js +47 -0
  289. package/dist/picker/range-picker.types.d.ts +13 -6
  290. package/dist/picker/time-picker-column.dom.d.ts +6 -1
  291. package/dist/picker/time-picker-column.dom.js +27 -3
  292. package/dist/picker/time-picker-props.engine.js +3 -2
  293. package/dist/picker/time-picker-semantic.engine.d.ts +6 -2
  294. package/dist/picker/time-picker-semantic.engine.js +32 -18
  295. package/dist/picker/time-picker.component.d.ts +1 -1
  296. package/dist/picker/time-picker.types.d.ts +30 -25
  297. package/dist/picker/time-range-picker-semantic.engine.d.ts +2 -0
  298. package/dist/picker/time-range-picker-semantic.engine.js +6 -8
  299. package/dist/picker/time-range-picker.types.d.ts +5 -4
  300. package/dist/popconfirm/Popconfirm.svelte +42 -11
  301. package/dist/popconfirm/popconfirm.types.d.ts +15 -11
  302. package/dist/popover/Popover.svelte +34 -29
  303. package/dist/popover/popover.types.d.ts +17 -12
  304. package/dist/popup/PopupContentContext.svelte +14 -0
  305. package/dist/popup/PopupContentContext.svelte.d.ts +7 -0
  306. package/dist/popup/overlay-motion.css +86 -3
  307. package/dist/popup/overlay-portal-alignment.dom.d.ts +34 -0
  308. package/dist/popup/overlay-portal-alignment.dom.js +166 -0
  309. package/dist/popup/overlay-semantic.engine.d.ts +16 -15
  310. package/dist/popup/overlay-semantic.engine.js +5 -6
  311. package/dist/popup/popup-css-motion.dom.d.ts +24 -0
  312. package/dist/{tree-select/tree-select-motion.dom.js → popup/popup-css-motion.dom.js} +13 -3
  313. package/dist/popup/popup-css-motion.model.svelte.d.ts +25 -0
  314. package/dist/popup/popup-css-motion.model.svelte.js +73 -0
  315. package/dist/popup/popup-geometry.dom.d.ts +8 -0
  316. package/dist/popup/popup-geometry.dom.js +68 -0
  317. package/dist/popup/popup-plane.engine.d.ts +6 -0
  318. package/dist/popup/popup-plane.engine.js +18 -0
  319. package/dist/popup/popup-portal-fit.dom.d.ts +3 -0
  320. package/dist/popup/popup-portal-fit.dom.js +81 -0
  321. package/dist/popup/popup-portal-projection.dom.d.ts +52 -0
  322. package/dist/popup/popup-portal-projection.dom.js +208 -0
  323. package/dist/popup/popup-position.engine.d.ts +5 -3
  324. package/dist/popup/popup.dom.d.ts +4 -1
  325. package/dist/popup/popup.dom.js +66 -21
  326. package/dist/popup/select-popup-motion.engine.d.ts +4 -0
  327. package/dist/popup/select-popup-motion.engine.js +18 -0
  328. package/dist/progress/Progress.svelte +53 -26
  329. package/dist/progress/ProgressCircle.svelte +40 -22
  330. package/dist/progress/ProgressCircle.svelte.d.ts +2 -1
  331. package/dist/progress/progress.types.d.ts +6 -5
  332. package/dist/qr-code/QRCode.svelte +7 -5
  333. package/dist/qr-code/qrcode.types.d.ts +10 -9
  334. package/dist/radio/Radio.svelte +10 -6
  335. package/dist/radio/RadioGroup.svelte +8 -3
  336. package/dist/radio/radio.types.d.ts +20 -18
  337. package/dist/rate/Rate.svelte +5 -2
  338. package/dist/rate/rate.types.d.ts +5 -4
  339. package/dist/render-content.engine.d.ts +9 -0
  340. package/dist/render-content.engine.js +21 -0
  341. package/dist/result/Result.svelte +14 -11
  342. package/dist/result/result.types.d.ts +11 -10
  343. package/dist/segmented/Segmented.svelte +23 -13
  344. package/dist/segmented/segmented.engine.js +2 -1
  345. package/dist/segmented/segmented.types.d.ts +11 -11
  346. package/dist/select/Select.svelte +418 -111
  347. package/dist/select/select-editor-focus.dom.d.ts +14 -0
  348. package/dist/select/select-editor-focus.dom.js +51 -0
  349. package/dist/select/select-icons.engine.d.ts +2 -0
  350. package/dist/select/select-icons.engine.js +17 -8
  351. package/dist/select/select-mouse-boundary.dom.d.ts +7 -0
  352. package/dist/select/select-mouse-boundary.dom.js +57 -0
  353. package/dist/select/select-semantic.engine.d.ts +2 -2
  354. package/dist/select/select-style.engine.d.ts +2 -2
  355. package/dist/select/select-style.engine.js +24 -2
  356. package/dist/select/select-token.engine.d.ts +4 -0
  357. package/dist/select/select-token.engine.js +13 -0
  358. package/dist/select/select.types.d.ts +35 -12
  359. package/dist/skeleton/Skeleton.svelte +20 -13
  360. package/dist/skeleton/SkeletonElement.svelte +11 -6
  361. package/dist/skeleton/skeleton.types.d.ts +11 -10
  362. package/dist/slider/SliderRange.svelte +26 -12
  363. package/dist/slider/SliderSingle.svelte +47 -67
  364. package/dist/slider/SliderTooltip.svelte +111 -13
  365. package/dist/slider/SliderTooltip.svelte.d.ts +4 -3
  366. package/dist/slider/slider-handle.dom.d.ts +5 -0
  367. package/dist/slider/slider-handle.dom.js +60 -0
  368. package/dist/slider/slider-range.engine.d.ts +4 -2
  369. package/dist/slider/slider-range.engine.js +15 -0
  370. package/dist/slider/slider-range.types.d.ts +10 -8
  371. package/dist/slider/slider-semantic.engine.d.ts +1 -1
  372. package/dist/slider/slider-semantic.engine.js +2 -6
  373. package/dist/slider/slider.types.d.ts +5 -3
  374. package/dist/space/Space.svelte +29 -13
  375. package/dist/space/SpaceAddon.svelte +5 -2
  376. package/dist/space/SpaceCompact.svelte +3 -1
  377. package/dist/space/SpaceCompactItem.svelte +4 -1
  378. package/dist/space/space-compact.types.d.ts +6 -6
  379. package/dist/space/space.engine.d.ts +5 -1
  380. package/dist/space/space.engine.js +32 -7
  381. package/dist/space/space.types.d.ts +15 -12
  382. package/dist/spin/Spin.svelte +20 -12
  383. package/dist/spin/spin.types.d.ts +5 -3
  384. package/dist/splitter/Splitter.svelte +9 -11
  385. package/dist/splitter/SplitterBar.svelte +2 -1
  386. package/dist/splitter/SplitterPanel.svelte +14 -2
  387. package/dist/splitter/SplitterPanel.svelte.d.ts +2 -1
  388. package/dist/splitter/SplitterPanelDeclaration.svelte +20 -0
  389. package/dist/splitter/SplitterPanelDeclaration.svelte.d.ts +4 -0
  390. package/dist/splitter/SplitterPanelDeclarations.svelte +16 -0
  391. package/dist/splitter/SplitterPanelDeclarations.svelte.d.ts +10 -0
  392. package/dist/splitter/SplitterRoot.svelte +18 -0
  393. package/dist/splitter/SplitterRoot.svelte.d.ts +4 -0
  394. package/dist/splitter/splitter-panel-context.d.ts +10 -0
  395. package/dist/splitter/splitter-panel-context.js +11 -0
  396. package/dist/splitter/splitter.component.d.ts +7 -0
  397. package/dist/splitter/splitter.component.js +6 -0
  398. package/dist/splitter/splitter.engine.d.ts +6 -1
  399. package/dist/splitter/splitter.engine.js +18 -0
  400. package/dist/splitter/splitter.types.d.ts +13 -10
  401. package/dist/statistic/Statistic.svelte +20 -9
  402. package/dist/statistic/statistic.types.d.ts +6 -4
  403. package/dist/steps/StepIcon.svelte +4 -2
  404. package/dist/steps/StepIcon.svelte.d.ts +2 -1
  405. package/dist/steps/StepItem.svelte +12 -16
  406. package/dist/steps/Steps.svelte +4 -7
  407. package/dist/steps/steps-data.engine.d.ts +5 -4
  408. package/dist/steps/steps-expanded.types.d.ts +2 -1
  409. package/dist/steps/steps-icon-context.d.ts +2 -1
  410. package/dist/steps/steps.types.d.ts +4 -3
  411. package/dist/style/inline-style-layers.engine.d.ts +11 -0
  412. package/dist/style/inline-style-layers.engine.js +120 -0
  413. package/dist/style/inline-style.engine.d.ts +4 -0
  414. package/dist/style/inline-style.engine.js +17 -9
  415. package/dist/style/inline-style.types.d.ts +12 -0
  416. package/dist/style/inline-style.types.js +1 -0
  417. package/dist/style/semantic-style.engine.d.ts +18 -12
  418. package/dist/style/semantic-style.engine.js +15 -9
  419. package/dist/switch/Switch.svelte +12 -7
  420. package/dist/switch/switch.types.d.ts +14 -12
  421. package/dist/table/Table.svelte +27 -19
  422. package/dist/table/Table.svelte.d.ts +4 -2
  423. package/dist/table/TableColumn.svelte +20 -0
  424. package/dist/table/TableColumn.svelte.d.ts +25 -0
  425. package/dist/table/TableColumnDeclarations.svelte +18 -0
  426. package/dist/table/TableColumnDeclarations.svelte.d.ts +10 -0
  427. package/dist/table/TableColumnGroup.svelte +31 -0
  428. package/dist/table/TableColumnGroup.svelte.d.ts +25 -0
  429. package/dist/table/TableRoot.svelte +55 -0
  430. package/dist/table/TableRoot.svelte.d.ts +29 -0
  431. package/dist/table/table-cell.engine.d.ts +8 -8
  432. package/dist/table/table-column-declarations.svelte.d.ts +22 -0
  433. package/dist/table/table-column-declarations.svelte.js +45 -0
  434. package/dist/table/table-semantic.engine.d.ts +18 -6
  435. package/dist/table/table-semantic.engine.js +14 -14
  436. package/dist/table/table.component.d.ts +10 -2
  437. package/dist/table/table.component.js +4 -1
  438. package/dist/table/table.types.d.ts +53 -25
  439. package/dist/tabs/Tabs.svelte +29 -14
  440. package/dist/tabs/TabsNav.svelte +33 -18
  441. package/dist/tabs/TabsNav.svelte.d.ts +2 -1
  442. package/dist/tabs/TabsOverflow.svelte +98 -122
  443. package/dist/tabs/TabsOverflow.svelte.d.ts +2 -1
  444. package/dist/tabs/TabsPanel.svelte +10 -5
  445. package/dist/tabs/TabsPanel.svelte.d.ts +4 -3
  446. package/dist/tabs/tabs-more-alignment.dom.d.ts +32 -0
  447. package/dist/tabs/tabs-more-alignment.dom.js +158 -0
  448. package/dist/tabs/tabs-more.dom.d.ts +69 -13
  449. package/dist/tabs/tabs-more.dom.js +76 -65
  450. package/dist/tabs/tabs-motion.dom.d.ts +2 -1
  451. package/dist/tabs/tabs-motion.dom.js +2 -1
  452. package/dist/tabs/tabs-motion.types.d.ts +4 -3
  453. package/dist/tabs/tabs-nav.types.d.ts +6 -7
  454. package/dist/tabs/tabs-semantic.engine.d.ts +18 -12
  455. package/dist/tabs/tabs-semantic.engine.js +70 -19
  456. package/dist/tabs/tabs.types.d.ts +35 -29
  457. package/dist/tag/CheckableTag.svelte +5 -3
  458. package/dist/tag/CheckableTagGroup.svelte +39 -31
  459. package/dist/tag/CheckableTagGroup.svelte.d.ts +12 -12
  460. package/dist/tag/Tag.svelte +11 -19
  461. package/dist/tag/tag-style.dom.d.ts +3 -1
  462. package/dist/tag/tag-style.dom.js +19 -1
  463. package/dist/tag/tag.types.d.ts +30 -27
  464. package/dist/timeline/Timeline.svelte +8 -3
  465. package/dist/timeline/timeline.engine.js +3 -1
  466. package/dist/timeline/timeline.types.d.ts +7 -6
  467. package/dist/tooltip/Tooltip.svelte +2 -3
  468. package/dist/tooltip/TooltipPopup.svelte +22 -16
  469. package/dist/tooltip/TooltipUniqueContent.svelte +3 -6
  470. package/dist/tooltip/TooltipUniqueContent.svelte.d.ts +0 -1
  471. package/dist/tooltip/TooltipUniquePopup.svelte +1 -1
  472. package/dist/tooltip/tooltip.engine.d.ts +58 -2
  473. package/dist/tooltip/tooltip.engine.js +54 -27
  474. package/dist/tooltip/tooltip.types.d.ts +22 -13
  475. package/dist/tour/Tour.svelte +34 -13
  476. package/dist/tour/TourPanel.svelte +13 -12
  477. package/dist/tour/TourPanel.svelte.d.ts +2 -1
  478. package/dist/tour/tour.engine.d.ts +7 -2
  479. package/dist/tour/tour.engine.js +58 -11
  480. package/dist/tour/tour.types.d.ts +20 -19
  481. package/dist/transfer/Transfer.svelte +41 -35
  482. package/dist/transfer/TransferAction.svelte +6 -7
  483. package/dist/transfer/TransferAction.svelte.d.ts +3 -2
  484. package/dist/transfer/TransferCheckbox.svelte +6 -2
  485. package/dist/transfer/TransferCheckbox.svelte.d.ts +2 -1
  486. package/dist/transfer/TransferList.svelte +18 -0
  487. package/dist/transfer/TransferList.svelte.d.ts +45 -0
  488. package/dist/transfer/TransferOperation.svelte +43 -0
  489. package/dist/transfer/TransferOperation.svelte.d.ts +4 -0
  490. package/dist/transfer/TransferSearch.svelte +44 -0
  491. package/dist/transfer/TransferSearch.svelte.d.ts +4 -0
  492. package/dist/transfer/TransferSection.svelte +42 -30
  493. package/dist/transfer/TransferSection.svelte.d.ts +2 -4
  494. package/dist/transfer/transfer-style.engine.d.ts +7 -0
  495. package/dist/transfer/transfer-style.engine.js +33 -0
  496. package/dist/transfer/transfer.component.d.ts +12 -0
  497. package/dist/transfer/transfer.component.js +6 -0
  498. package/dist/transfer/transfer.types.d.ts +44 -4
  499. package/dist/tree/Tree.svelte +5 -3
  500. package/dist/tree/TreeMotion.svelte +5 -1
  501. package/dist/tree/tree-motion.dom.js +12 -3
  502. package/dist/tree/tree-motion.types.d.ts +4 -3
  503. package/dist/tree/tree-semantic.engine.d.ts +9 -2
  504. package/dist/tree/tree-semantic.engine.js +37 -3
  505. package/dist/tree/tree.types.d.ts +8 -6
  506. package/dist/tree-select/TreeSelectControl.svelte +303 -155
  507. package/dist/tree-select/tree-select-align.engine.d.ts +2 -6
  508. package/dist/tree-select/tree-select-align.engine.js +1 -18
  509. package/dist/tree-select/tree-select-motion-frame.dom.d.ts +2 -5
  510. package/dist/tree-select/tree-select-semantic.engine.d.ts +6 -6
  511. package/dist/tree-select/tree-select-semantic.engine.js +50 -25
  512. package/dist/tree-select/tree-select-token.engine.d.ts +1 -3
  513. package/dist/tree-select/tree-select-token.engine.js +1 -13
  514. package/dist/tree-select/tree-select.types.d.ts +9 -5
  515. package/dist/types.d.ts +3 -0
  516. package/dist/typography/TypographyEditable.svelte +6 -3
  517. package/dist/typography/TypographyEditable.svelte.d.ts +3 -2
  518. package/dist/typography/TypographyElement.svelte +7 -4
  519. package/dist/typography/TypographyElement.svelte.d.ts +3 -2
  520. package/dist/typography/typography-semantic.engine.d.ts +9 -2
  521. package/dist/typography/typography-semantic.engine.js +15 -4
  522. package/dist/typography/typography.types.d.ts +8 -7
  523. package/dist/utils/declaration-order.svelte.d.ts +12 -0
  524. package/dist/utils/declaration-order.svelte.js +53 -0
  525. package/dist/vendor/date-picker-prefix.css.js +2 -2
  526. package/dist/vendor/tree-select-popup-motion.css +112 -112
  527. package/dist/vendor/tree-select-popup-motion.css.js +2 -2
  528. package/dist/watermark/Watermark.svelte +8 -6
  529. package/dist/watermark/watermark.types.d.ts +3 -2
  530. package/package.json +1 -1
  531. package/readme.md +16 -16
  532. package/dist/picker/time-range-picker-popup.dom.d.ts +0 -2
  533. package/dist/picker/time-range-picker-popup.dom.js +0 -42
  534. package/dist/tree-select/tree-select-motion-css.engine.d.ts +0 -2
  535. package/dist/tree-select/tree-select-motion-css.engine.js +0 -11
  536. package/dist/tree-select/tree-select-motion.dom.d.ts +0 -18
  537. package/dist/tree-select/tree-select-motion.engine.d.ts +0 -2
  538. package/dist/tree-select/tree-select-motion.engine.js +0 -5
@@ -0,0 +1,52 @@
1
+ import type { getPopupPosition, PopupSurfaceGeometry } from './popup-position.engine';
2
+ type Alignment = ReturnType<typeof getPopupPosition>;
3
+ interface PopupLayoutSize {
4
+ width: string;
5
+ height: string;
6
+ }
7
+ /** Supplies the intrinsic content dimensions before each read of the probe's box. */
8
+ export type PopupPortalFit = (probe: HTMLElement, readSize: () => PopupLayoutSize) => () => void;
9
+ /** Samples the portal's border-box plane without copying the popup contents. */
10
+ export declare function createPopupPortalProjection(popup: HTMLElement, getAuthoredStyle: () => string | undefined, referencePosition?: 'absolute', fitPopup?: PopupPortalFit): (style: CSSStyleDeclaration, zoom: number, align: (geometry: PopupSurfaceGeometry) => Alignment, untransformed?: boolean) => {
11
+ alignment: {
12
+ align: {
13
+ points: [string, string];
14
+ offset?: readonly import("./popup-position.engine").PopupOffset[];
15
+ targetOffset?: readonly import("./popup-position.engine").PopupOffset[];
16
+ dynamicInset?: boolean;
17
+ autoArrow?: boolean;
18
+ htmlRegion?: "visible" | "scroll" | "visibleFirst";
19
+ _experimental?: {
20
+ dynamicInset?: boolean;
21
+ [key: string]: unknown;
22
+ };
23
+ useCssRight?: boolean;
24
+ useCssBottom?: boolean;
25
+ useCssTransform?: boolean;
26
+ ignoreShake?: boolean;
27
+ overflow?: {
28
+ adjustX?: boolean | number;
29
+ adjustY?: boolean | number;
30
+ shiftX?: boolean | number;
31
+ shiftY?: boolean | number;
32
+ };
33
+ };
34
+ placement: string | undefined;
35
+ flips: {
36
+ bt?: boolean;
37
+ tb?: boolean;
38
+ rl?: boolean;
39
+ lr?: boolean;
40
+ };
41
+ x: number;
42
+ y: number;
43
+ right: number;
44
+ bottom: number;
45
+ arrowX: number;
46
+ arrowY: number;
47
+ };
48
+ bounds: DOMRect;
49
+ projection: readonly (readonly [string, string, ("" | "important" | undefined)?])[];
50
+ scaleX: number;
51
+ } | undefined;
52
+ export {};
@@ -0,0 +1,208 @@
1
+ // Measures the ordinary portal plane used by rc-trigger 3.10.1 (MIT, vendor/LICENSE.rc-trigger).
2
+ // The probe carries coordinates and intrinsic dimensions. The live surface stays in the top layer.
3
+ import { getPopupPlaneProjection } from './popup-plane.engine';
4
+ import { getPopupBoxEdges } from './popup-geometry.dom';
5
+ const sampleUnit = 100;
6
+ /** Samples the portal's border-box plane without copying the popup contents. */
7
+ export function createPopupPortalProjection(popup, getAuthoredStyle, referencePosition, fitPopup) {
8
+ const document = popup.ownerDocument;
9
+ // The probe is connected and measured only from the native popup's browser controller.
10
+ const view = document.defaultView;
11
+ const probe = document.createElement(popup.localName);
12
+ probe.inert = true;
13
+ probe.setAttribute('aria-hidden', 'true');
14
+ const origin = createMarker();
15
+ const rightEdge = createMarker();
16
+ const farCorner = createMarker();
17
+ const bottomEdge = createMarker();
18
+ probe.append(origin, rightEdge, farCorner, bottomEdge);
19
+ return measure;
20
+ /** Creates a zero-size marker in the popup's own CSS coordinate space. */
21
+ function createMarker() {
22
+ const node = document.createElement('i');
23
+ node.style.cssText = 'all:initial!important;'
24
+ + 'position:absolute!important;'
25
+ + 'width:0!important;'
26
+ + 'height:0!important;'
27
+ + 'visibility:hidden!important;'
28
+ + 'pointer-events:none!important;';
29
+ return node;
30
+ }
31
+ /** Copies sizing and semantic CSS while keeping the probe inert and out of view. */
32
+ function prepareProbe(style) {
33
+ probe.className = popup.className;
34
+ probe.dir = popup.dir;
35
+ for (const name of probe.getAttributeNames()) {
36
+ if (name.startsWith('data-') && !popup.hasAttribute(name)) {
37
+ probe.removeAttribute(name);
38
+ }
39
+ }
40
+ for (const attribute of popup.attributes) {
41
+ if (attribute.name.startsWith('data-')) {
42
+ probe.setAttribute(attribute.name, attribute.value);
43
+ }
44
+ }
45
+ probe.style.cssText = getAuthoredStyle() ?? '';
46
+ probe.style.setProperty('display', 'block', 'important');
47
+ probe.style.setProperty('visibility', 'hidden', 'important');
48
+ probe.style.setProperty('pointer-events', 'none', 'important');
49
+ probe.style.setProperty('animation', 'none', 'important');
50
+ probe.style.setProperty('transition', 'none', 'important');
51
+ if (!fitPopup) {
52
+ probe.style.setProperty('width', style.width, 'important');
53
+ probe.style.setProperty('height', style.height, 'important');
54
+ probe.style.setProperty('min-width', '0', 'important');
55
+ probe.style.setProperty('max-width', 'none', 'important');
56
+ probe.style.setProperty('min-height', '0', 'important');
57
+ probe.style.setProperty('max-height', 'none', 'important');
58
+ }
59
+ }
60
+ /** Measures the two inset origins that rc-trigger uses to resolve dynamic placement. */
61
+ function readGeometry(fit) {
62
+ probe.style.left = '0px';
63
+ probe.style.top = '0px';
64
+ probe.style.right = 'auto';
65
+ probe.style.bottom = 'auto';
66
+ probe.style.overflow = 'hidden';
67
+ fit?.();
68
+ const rect = probe.getBoundingClientRect();
69
+ const style = view.getComputedStyle(probe);
70
+ const scaleX = Math.round(rect.width / Number.parseFloat(style.width) * 1000) / 1000;
71
+ const scaleY = Math.round(rect.height / Number.parseFloat(style.height) * 1000) / 1000;
72
+ probe.style.left = 'auto';
73
+ probe.style.top = 'auto';
74
+ probe.style.right = '0px';
75
+ probe.style.bottom = '0px';
76
+ fit?.();
77
+ const mirror = probe.getBoundingClientRect();
78
+ return {
79
+ popup: rect,
80
+ mirror: { right: mirror.right, bottom: mirror.bottom },
81
+ scaleX,
82
+ scaleY
83
+ };
84
+ }
85
+ /** Applies source insets beneath any explicit semantic root style. */
86
+ function applyAlignment(result) {
87
+ const point = result.align.points?.[0];
88
+ const dynamicInset = result.align.dynamicInset || result.align._experimental?.dynamicInset;
89
+ const right = dynamicInset && point?.[1] === 'r';
90
+ const bottom = dynamicInset && point?.[0] === 'b';
91
+ probe.style.left ||= right ? 'auto' : `${result.x}px`;
92
+ probe.style.right ||= right ? `${result.right}px` : 'auto';
93
+ probe.style.top ||= bottom ? 'auto' : `${result.y}px`;
94
+ probe.style.bottom ||= bottom ? `${result.bottom}px` : 'auto';
95
+ if (!probe.style.getPropertyValue('--arrow-x')) {
96
+ probe.style.setProperty('--arrow-x', `${result.arrowX}px`);
97
+ }
98
+ if (!probe.style.getPropertyValue('--arrow-y')) {
99
+ probe.style.setProperty('--arrow-y', `${result.arrowY}px`);
100
+ }
101
+ }
102
+ /** Converts a physical marker to the native popover's unzoomed coordinate system. */
103
+ function readMarker(node, x, y, fixed, zoom) {
104
+ node.style.setProperty('left', `${x - probe.clientLeft}px`, 'important');
105
+ node.style.setProperty('top', `${y - probe.clientTop}px`, 'important');
106
+ const rect = node.getBoundingClientRect();
107
+ return {
108
+ x: (rect.x + (fixed ? 0 : view.scrollX)) / zoom,
109
+ y: (rect.y + (fixed ? 0 : view.scrollY)) / zoom
110
+ };
111
+ }
112
+ /** Composes built-in zoom and slide motion around the source origin in the sampled plane. */
113
+ function renderProjection(zoom, fixed, size) {
114
+ const css = view.getComputedStyle(probe);
115
+ const [sourceX, sourceY] = css.transformOrigin.split(' ');
116
+ const originX = `var(--ant-overlay-motion-origin-x, ${sourceX})`;
117
+ const originY = `var(--ant-overlay-motion-origin-y, ${sourceY})`;
118
+ const unit = Math.min(sampleUnit, probe.offsetWidth, probe.offsetHeight);
119
+ if (!unit) {
120
+ return;
121
+ }
122
+ const matrix = getPopupPlaneProjection([
123
+ readMarker(origin, 0, 0, fixed, zoom),
124
+ readMarker(rightEdge, unit, 0, fixed, zoom),
125
+ readMarker(farCorner, unit, unit, fixed, zoom),
126
+ readMarker(bottomEdge, 0, unit, fixed, zoom)
127
+ ], unit);
128
+ if (!matrix.every(Number.isFinite)) {
129
+ return;
130
+ }
131
+ const transform = `matrix3d(${matrix.join(',')}) translate(${originX}, ${originY})`
132
+ + ' scale(var(--ant-overlay-motion-scale, 1))'
133
+ + ' scaleX(var(--ant-overlay-motion-scale-x, 1))'
134
+ + ' scaleY(var(--ant-overlay-motion-scale-y, 1))'
135
+ + ` translate(calc(-1 * ${originX}), calc(-1 * ${originY}))`;
136
+ return [
137
+ ['position', fixed ? 'fixed' : 'absolute', 'important'],
138
+ ['left', '0px', 'important'],
139
+ ['top', '0px', 'important'],
140
+ ['right', 'auto', 'important'],
141
+ ['bottom', 'auto', 'important'],
142
+ ['margin', '0px', 'important'],
143
+ ['translate', 'none', 'important'],
144
+ ['rotate', 'none', 'important'],
145
+ ['scale', 'none', 'important'],
146
+ ['offset-path', 'none', 'important'],
147
+ ['transform-origin', '0px 0px', 'important'],
148
+ ['transform', transform, 'important'],
149
+ ...readProjectedSize(css, size)
150
+ ];
151
+ }
152
+ /** Locks in the used box from the portal before rendering against the top-layer viewport. */
153
+ function readProjectedSize(css, size) {
154
+ if (!size)
155
+ return [];
156
+ return [
157
+ ['width', size.width, 'important'],
158
+ ['height', size.height, 'important'],
159
+ ['min-width', css.minWidth.endsWith('px') ? css.minWidth : '0px', 'important'],
160
+ ['max-width', 'none', 'important'],
161
+ ['min-height', '0px', 'important'],
162
+ ['max-height', 'none', 'important']
163
+ ];
164
+ }
165
+ /** Reads a source alignment and its painted plane in one synchronous portal visit. */
166
+ function measure(style, zoom, align, untransformed = false) {
167
+ prepareProbe(style);
168
+ popup.before(probe);
169
+ try {
170
+ const fixed = view.getComputedStyle(probe).position === 'fixed';
171
+ if (referencePosition) {
172
+ probe.style.setProperty('--ant-overlay-position', referencePosition);
173
+ }
174
+ const fit = fitPopup?.(probe, readSize);
175
+ const baseStyle = probe.style.cssText;
176
+ const geometry = readGeometry(fit);
177
+ if (!(geometry.scaleX > 0 && geometry.scaleY > 0)
178
+ || !Number.isFinite(geometry.scaleX) || !Number.isFinite(geometry.scaleY)) {
179
+ return;
180
+ }
181
+ const alignment = align(geometry);
182
+ probe.style.cssText = baseStyle;
183
+ applyAlignment(alignment);
184
+ fit?.();
185
+ const bounds = probe.getBoundingClientRect();
186
+ const projection = renderProjection(zoom, fixed, fit ? readSize() : undefined);
187
+ return projection ? { alignment, bounds, projection, scaleX: geometry.scaleX } : undefined;
188
+ }
189
+ finally {
190
+ probe.remove();
191
+ }
192
+ /** Preserves fractional layout units without a round trip through CSSOM's px strings. */
193
+ function readSize() {
194
+ const css = view.getComputedStyle(probe);
195
+ if (!untransformed || css.transform !== 'none'
196
+ || css.scale !== 'none' || css.rotate !== 'none') {
197
+ return { width: css.width, height: css.height };
198
+ }
199
+ const box = probe.getBoundingClientRect();
200
+ if (css.boxSizing === 'border-box') {
201
+ return { width: `${box.width}px`, height: `${box.height}px` };
202
+ }
203
+ const width = Math.max(0, box.width - getPopupBoxEdges(css, 'width'));
204
+ const height = Math.max(0, box.height - getPopupBoxEdges(css, 'height'));
205
+ return { width: `${width}px`, height: `${height}px` };
206
+ }
207
+ }
208
+ }
@@ -50,16 +50,18 @@ export interface PopupFlipCache {
50
50
  lr?: boolean;
51
51
  }
52
52
  export declare function getPopupPlacements(pointAtCenter: boolean, arrowWidth?: number, offset?: number, radius?: number, autoAdjustOverflow?: boolean | PopupOverflowAdjust): Record<string, PopupAlign>;
53
- interface PopupAlignmentGeometry {
54
- target: PopupRect;
53
+ export interface PopupSurfaceGeometry {
55
54
  popup: PopupRect;
56
55
  mirror: {
57
56
  right: number;
58
57
  bottom: number;
59
58
  };
60
- visible: PopupArea;
61
59
  scaleX: number;
62
60
  scaleY: number;
61
+ }
62
+ interface PopupAlignmentGeometry extends PopupSurfaceGeometry {
63
+ target: PopupRect;
64
+ visible: PopupArea;
63
65
  flips?: PopupFlipCache;
64
66
  }
65
67
  export declare function getPopupAlignment(input: PopupAlignmentGeometry & {
@@ -2,6 +2,8 @@ import { type TooltipPosition, type TooltipRect, type TooltipSourcePlacement } f
2
2
  import type { PopupSourceAlign } from './popup-position.engine';
3
3
  import type { PopupPoint } from './popup-geometry.dom';
4
4
  import type { AdjustOverflow, TooltipPlacement } from '../tooltip/tooltip.types';
5
+ import type { InlineStyleLayer } from '../style/inline-style.engine';
6
+ import { type OverlayPortalOptions } from './overlay-portal-alignment.dom';
5
7
  /** Cleanup remains a called function; forceAlign uses the same position controller. */
6
8
  export interface PopupConnection {
7
9
  (retainSurface?: boolean): void;
@@ -48,6 +50,7 @@ export declare function connectPopup(popup: HTMLElement, anchor: Element, option
48
50
  measurePopup?: () => DOMRect;
49
51
  getPosition?: (anchor: DOMRect, popup: DOMRect, viewport: TooltipRect) => TooltipPosition | undefined;
50
52
  getAnchorRect?: (current: DOMRect, popup: DOMRect) => DOMRect;
51
- applyPosition?: (position: TooltipPosition) => void;
53
+ portalAlignment?: OverlayPortalOptions;
54
+ applyPosition?: (position: TooltipPosition, projection?: InlineStyleLayer) => void;
52
55
  onVisibilityChange?: (visible: boolean) => void;
53
56
  }): PopupConnection;
@@ -1,6 +1,7 @@
1
1
  // Connects the popover to and manages its position, visibility, and. Interaction stack belongs to
2
2
  // the document. Connection holder protects retarget.
3
3
  import { getTooltipPosition } from '../tooltip/tooltip.engine';
4
+ import { createOverlayPortalAlignment } from './overlay-portal-alignment.dom';
4
5
  const openPopups = new WeakMap();
5
6
  const popupConnections = new WeakMap();
6
7
  // Take into account the active node in ShadowRoot before the transition to the document.
@@ -35,6 +36,9 @@ export function connectPopup(popup, anchor, options) {
35
36
  const view = document.defaultView;
36
37
  const owner = { anchor };
37
38
  popupConnections.set(popup, owner);
39
+ const portal = options.portalAlignment && options.applyPosition
40
+ ? createOverlayPortalAlignment(popup, options.portalAlignment, options.applyPosition)
41
+ : undefined;
38
42
  let frame = 0;
39
43
  let shown = false;
40
44
  let disposed = false;
@@ -42,6 +46,17 @@ export function connectPopup(popup, anchor, options) {
42
46
  let lastPosition = '';
43
47
  let lastAlignment = '';
44
48
  let flips;
49
+ let stretchScaleX = 1;
50
+ // rc-trigger stretches to the physical anchor width converted to the portal's CSS plane.
51
+ function applyAnchorWidth(width, match, variable) {
52
+ const value = `${width / stretchScaleX}px`;
53
+ if (match && popup.style.minWidth !== value) {
54
+ popup.style.minWidth = value;
55
+ }
56
+ if (variable && popup.style.getPropertyValue(variable) !== value) {
57
+ popup.style.setProperty(variable, value);
58
+ }
59
+ }
45
60
  // Removes the popup from the interaction stack before notification and hiding.
46
61
  function hide() {
47
62
  const stack = openPopups.get(document);
@@ -94,14 +109,12 @@ export function connectPopup(popup, anchor, options) {
94
109
  ?? 'var(--ant-tooltip-max-width)'}, ${Math.max(0, viewport.width - 16)}px)`;
95
110
  }
96
111
  const { matchAnchorWidth, anchorWidthVariable } = options;
112
+ let stretchWidth;
97
113
  if (matchAnchorWidth || anchorWidthVariable) {
98
114
  const anchorWidth = options.getAnchorWidth?.() ?? rect.width;
99
- const width = `${options.constrainWidth === false ? anchorWidth
100
- : Math.min(anchorWidth, Math.max(0, viewport.width - 16))}px`;
101
- if (matchAnchorWidth)
102
- popup.style.minWidth = width;
103
- if (anchorWidthVariable && popup.style.getPropertyValue(anchorWidthVariable) !== width)
104
- popup.style.setProperty(anchorWidthVariable, width);
115
+ stretchWidth = options.constrainWidth === false ? anchorWidth
116
+ : Math.min(anchorWidth, Math.max(0, viewport.width - 16));
117
+ applyAnchorWidth(stretchWidth, matchAnchorWidth, anchorWidthVariable);
105
118
  }
106
119
  popup.hidden = false;
107
120
  if (!popup.matches(':popover-open')) {
@@ -119,19 +132,16 @@ export function connectPopup(popup, anchor, options) {
119
132
  const point = options.anchorPoint;
120
133
  const positionRect = point
121
134
  ? DOMRect.fromRect(point) : options.getAnchorRect?.(rect, bounds) ?? rect;
122
- const position = options.getPosition?.(positionRect, bounds, viewport) ?? getTooltipPosition(positionRect, bounds, viewport, options.placement, options.autoAdjustOverflow, options.align, typeof options.gap === 'function' ? options.gap() : options.gap, {
123
- flips,
124
- source: options.sourcePlacement,
125
- align: options.sourceAlign,
126
- builtinPlacements: options.builtinPlacements,
127
- alignPoint: options.alignPoint,
128
- scrollRegion: {
129
- x: -document.documentElement.scrollLeft,
130
- y: -document.documentElement.scrollTop,
131
- width: Math.max(document.documentElement.scrollWidth, bounds.width),
132
- height: Math.max(document.documentElement.scrollHeight, bounds.height)
133
- }
134
- });
135
+ let layout = resolvePosition(positionRect, bounds, viewport);
136
+ const scaleX = layout.scaleX ?? 1;
137
+ if (stretchWidth !== undefined && stretchScaleX !== scaleX) {
138
+ // The corrected minimum width can change the box before the first visible alignment.
139
+ stretchScaleX = scaleX;
140
+ applyAnchorWidth(stretchWidth, matchAnchorWidth, anchorWidthVariable);
141
+ const resized = options.measurePopup?.() ?? popup.getBoundingClientRect();
142
+ layout = resolvePosition(positionRect, resized, viewport);
143
+ }
144
+ const { position } = layout;
135
145
  flips = position.flips;
136
146
  if (disposed) {
137
147
  return;
@@ -144,13 +154,19 @@ export function connectPopup(popup, anchor, options) {
144
154
  .placement}:${JSON.stringify(position.sourceAlign)}:${position.alignedPlacement}`;
145
155
  const onAlign = options.onAlign;
146
156
  if (onAlign) {
147
- const geometry = `${signature}:${rect.x}:${rect.y}:${rect.width}:${rect.height}:${bounds.width}:${bounds.height}`;
157
+ const geometry = `${signature}:${rect.x}:${rect.y}:${rect.width}:${rect.height}`
158
+ + `:${layout.bounds.width}:${layout.bounds.height}`;
148
159
  if (manual || geometry !== lastAlignment) {
149
160
  onAlign(position);
150
161
  lastAlignment = geometry;
151
162
  }
152
163
  }
153
- options.applyPosition?.(position);
164
+ if (portal) {
165
+ portal.applyPosition(position, layout.projection);
166
+ }
167
+ else {
168
+ options.applyPosition?.(position);
169
+ }
154
170
  if (signature !== lastPosition) {
155
171
  if (!options.applyPosition) {
156
172
  popup.style.left = `${position.left}px`;
@@ -166,6 +182,34 @@ export function connectPopup(popup, anchor, options) {
166
182
  if (!wasShown)
167
183
  options.onVisibilityChange?.(true);
168
184
  }
185
+ // A custom portal can constrain the surface before the ordinary viewport solver runs.
186
+ function resolvePosition(anchor, bounds, viewport) {
187
+ const { placement, autoAdjustOverflow, align } = options;
188
+ const gap = typeof options.gap === 'function' ? options.gap() : options.gap;
189
+ const root = document.documentElement;
190
+ const context = {
191
+ flips,
192
+ source: options.sourcePlacement,
193
+ align: options.sourceAlign,
194
+ builtinPlacements: options.builtinPlacements,
195
+ alignPoint: options.alignPoint,
196
+ scrollRegion: {
197
+ x: -root.scrollLeft,
198
+ y: -root.scrollTop,
199
+ width: Math.max(root.scrollWidth, bounds.width),
200
+ height: Math.max(root.scrollHeight, bounds.height)
201
+ }
202
+ };
203
+ const measured = portal?.getPosition(anchor, bounds, viewport, { placement, autoAdjustOverflow, align, gap }, context, getNativePosition);
204
+ if (measured)
205
+ return measured;
206
+ return { position: getNativePosition(bounds), bounds };
207
+ // The unprojected box also feeds the owner solver after a live transform is removed.
208
+ function getNativePosition(nativeBounds) {
209
+ const custom = options.getPosition?.(anchor, nativeBounds, viewport);
210
+ return custom ?? getTooltipPosition(anchor, nativeBounds, viewport, placement, autoAdjustOverflow, align, gap, context);
211
+ }
212
+ }
169
213
  // Measures each frame, including movements anchor without changing dimensions.
170
214
  function tick() {
171
215
  update();
@@ -267,6 +311,7 @@ export function connectPopup(popup, anchor, options) {
267
311
  }
268
312
  popupConnections.delete(popup);
269
313
  hide();
314
+ portal?.clearProjection();
270
315
  };
271
316
  // Retargeting within one flush can temporarily unregister the trigger.
272
317
  if (retainSurface) {
@@ -0,0 +1,4 @@
1
+ /** Resolves the Ant Design 6.6.8 default and applies rc-select 1.10.1 precedence. */
2
+ export declare function selectPopupMotionName(animation: string | undefined, transitionName: string | undefined, selectPrefix: string, rootPrefix: string): string;
3
+ /** Uses the bundled stylesheet for the default namespace and scopes other prefixes to their owner. */
4
+ export declare function selectPopupMotionCss(selectPrefix: string, rootPrefix: string): string | undefined;
@@ -0,0 +1,18 @@
1
+ // Resolves rc-select popup motion names and scopes the pinned motion CSS to the same owner.
2
+ import template from '../vendor/tree-select-popup-motion.css.js';
3
+ /** Resolves the Ant Design 6.6.8 default and applies rc-select 1.10.1 precedence. */
4
+ export function selectPopupMotionName(animation, transitionName, selectPrefix, rootPrefix) {
5
+ return animation ? `${selectPrefix}-dropdown-${animation}`
6
+ : transitionName === undefined ? `${rootPrefix}-slide-up` : transitionName;
7
+ }
8
+ /** Uses the bundled stylesheet for the default namespace and scopes other prefixes to their owner. */
9
+ export function selectPopupMotionCss(selectPrefix, rootPrefix) {
10
+ if (selectPrefix === 'ant-select' && rootPrefix === 'ant') {
11
+ return undefined;
12
+ }
13
+ const owner = `:where([data-ant-select-prefix=${JSON.stringify(selectPrefix)}]`
14
+ + `[data-ant-select-root-prefix=${JSON.stringify(rootPrefix)}]`
15
+ + ':is([data-ant-tree-select-motion],[data-ant-cascader-motion],[data-ant-select-popup-motion]))';
16
+ return template.replace(/\.ant-select-dropdown([-\w]*)|\.ant-(slide|move)-/g, (_match, suffix, kind) => suffix !== undefined
17
+ ? `.${selectPrefix}-dropdown${suffix}${owner}` : `.${rootPrefix}-${kind}-`).replace(/<\/style/gi, '<\\/style');
18
+ }
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte';
3
+ import RenderContent from '../RenderContent.svelte';
3
4
  import ProgressCircle from './ProgressCircle.svelte';
4
5
  import { progressCircleIcons } from './progress-circle-icons';
5
6
  import { statusIcons } from '../icon/status-icons';
@@ -7,6 +8,8 @@
7
8
  import ThemeScopeStyle from '../theme/ThemeScopeStyle.svelte';
8
9
  import { useConfig } from '../config-provider/config-context';
9
10
  import { useComponentTheme } from '../theme/theme-component.svelte';
11
+ import { inlineStyleText, mergeInlineStyleLayers } from '../style/inline-style-layers.engine';
12
+ import type { CSSStyle } from '../style/inline-style.types';
10
13
  import { getProgressPrefixCss } from './progress-prefix.engine';
11
14
  import {
12
15
  getProgressCircleGeometry,
@@ -90,6 +93,7 @@
90
93
  let lineColor = $derived(Array.isArray(strokeColor) ? strokeColor[0] : strokeColor);
91
94
  let background = $derived(typeof lineColor === 'object'
92
95
  ? progressGradient(lineColor, config.direction === 'rtl') : lineColor);
96
+ let squareCorners = $derived(strokeLinecap !== 'round' ? 'border-radius: 0px;' : '');
93
97
  let bright = $derived(isProgressColorBright(strokeColor));
94
98
  let strings = $derived({ ...ruRU.progress, ...config.locale.progress });
95
99
  // The legacy single-parameter callback keeps the same invocation count and arguments.
@@ -145,16 +149,44 @@
145
149
  const localClasses = typeof classNames === 'function' ? classNames(semanticInfo) : classNames;
146
150
  const localStyles = typeof styles === 'function' ? styles(semanticInfo) : styles;
147
151
  const classes: ProgressSemanticSlots = {};
148
- const slots: ProgressSemanticSlots = {};
152
+ const slots: ProgressSemanticSlots<CSSStyle> = {};
149
153
 
150
154
  for (const slot of ['root', 'body', 'rail', 'track', 'indicator'] as const) {
151
155
  classes[slot] = [contextClasses?.[slot], localClasses?.[slot]].filter(Boolean).join(' ');
152
- slots[slot] = [contextStyles?.[slot], slot === 'root' && config.progress?.style,
153
- localStyles?.[slot], slot === 'root' && style].filter(Boolean).join(';');
156
+ slots[slot] = mergeInlineStyleLayers(
157
+ contextStyles?.[slot],
158
+ slot === 'root' ? config.progress?.style : undefined,
159
+ localStyles?.[slot],
160
+ slot === 'root' ? style : undefined
161
+ );
154
162
  }
155
163
  return { classes, styles: slots };
156
164
  });
157
165
 
166
+ let lineRailStyle = $derived(inlineStyleText(
167
+ `height: ${lineSize.height}px;`
168
+ + (railColor ? `background: ${railColor};` : '')
169
+ + squareCorners,
170
+ semantics.styles.rail
171
+ ));
172
+ let lineTrackStyle = $derived(inlineStyleText(
173
+ `width: ${value}%;`
174
+ + `height: ${lineSize.height}px;`
175
+ + (background
176
+ ? `background: ${background};`
177
+ + `--progress-line-stroke-color: ${background};`
178
+ : '')
179
+ + squareCorners,
180
+ semantics.styles.track
181
+ ));
182
+ let lineSuccessStyle = $derived(inlineStyleText(
183
+ `width: ${successValue}%;`
184
+ + `height: ${lineSize.height}px;`
185
+ + (success?.strokeColor ? `background-color: ${success.strokeColor};` : '')
186
+ + squareCorners,
187
+ semantics.styles.track
188
+ ));
189
+
158
190
  function stepColor(active: boolean, index: number): string {
159
191
  if (!active) {
160
192
  return railColor ?? '';
@@ -222,9 +254,11 @@
222
254
  semantics.classes.indicator
223
255
  ]} data-ant-progress-part="indicator" data-ant-progress-position={pureLine ? infoPosition : undefined}
224
256
  data-ant-progress-icon={Boolean(statusIcon) || undefined}
225
- style={semantics.styles.indicator}
226
- title={typeof text === 'function' ? undefined : valueText}
227
- dir={statusIcon || infoPosition === 'inner' || steps ? undefined : 'auto'}>{#if statusIcon}<span class="anticon" role="img" aria-label={statusIcon}><svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor" fill-rule={type === 'line' && resolvedStatus === 'exception' ? 'evenodd' : undefined} aria-hidden="true" focusable="false"><path d={type === 'line' ? statusIcons[resolvedStatus === 'success' ? 'check-circle-filled' : 'close-circle-filled'] : progressCircleIcons[resolvedStatus === 'success' ? 'success' : 'exception']} /></svg></span>{:else if typeof text === 'function'}{@render text()}{:else if typeof text !== 'boolean'}{text}{/if}</span>
257
+ style={inlineStyleText(semantics.styles.indicator)}
258
+ title={typeof text === 'function' || Array.isArray(text) ? undefined : valueText}
259
+ dir={statusIcon || infoPosition === 'inner' || steps ? undefined : 'auto'}>{#if statusIcon}<span class="anticon" role="img" aria-label={statusIcon}><svg viewBox="64 64 896 896" width="1em" height="1em" fill="currentColor" fill-rule={type === 'line' && resolvedStatus === 'exception' ? 'evenodd' : undefined} aria-hidden="true" focusable="false"><path d={type === 'line' ? statusIcons[resolvedStatus === 'success' ? 'check-circle-filled' : 'close-circle-filled'] : progressCircleIcons[resolvedStatus === 'success' ? 'success' : 'exception']} /></svg></span>{:else if typeof text === 'function'}{@render text()}
260
+ {:else if Array.isArray(text)}<RenderContent value={text} />
261
+ {:else if typeof text !== 'boolean'}{text}{/if}</span>
228
262
  {/snippet}
229
263
 
230
264
  {#if prefixCss}<ThemeScopeStyle css={prefixCss} scope={`progress-prefix:${prefix}`} />{/if}<div
@@ -247,7 +281,7 @@
247
281
  steps && `${prefix}-steps`, showInfo && `${prefix}-show-info`,
248
282
  size === 'small' && `${prefix}-small`, config.direction === 'rtl' && `${prefix}-rtl`,
249
283
  config.progress?.class, className, rootClassName, semantics.classes.root
250
- ]} style={[componentTheme.style, semantics.styles.root].filter(Boolean).join(';') || undefined}
284
+ ]} style={inlineStyleText(componentTheme.style, semantics.styles.root) || undefined}
251
285
  {...rest}>
252
286
  {#if type !== 'line'}
253
287
  <ProgressCircle {prefix} {type} percent={value} {diameter} strokeWidth={circle.strokeWidth}
@@ -255,42 +289,35 @@
255
289
  {gapDegree} {gapPlacement} classes={semantics.classes}
256
290
  styles={semantics.styles} indicator={showInfo ? indicator : undefined} />
257
291
  {:else if steps && stepLayout}
258
- <div class={[`${prefix}-steps-body`, semantics.classes.body]} style={semantics.styles.body}
292
+ <div class={[`${prefix}-steps-body`, semantics.classes.body]}
293
+ style={inlineStyleText(semantics.styles.body)}
259
294
  data-ant-progress-part="body">
260
295
  {#each stepLayout.items as active, index}
261
296
  <div class={[`${prefix}-steps-item`, active && `${prefix}-steps-item-active`,
262
297
  semantics.classes.track]} data-ant-progress-part="step"
263
- style={`background-color: ${stepColor(active, index)};`
264
- + `width: ${stepLayout.width}px;`
265
- + `height: ${stepLayout.height}px;${semantics.styles.track ?? ''}`}></div>
298
+ style={inlineStyleText(
299
+ `background-color: ${stepColor(active, index)};`
300
+ + `width: ${stepLayout.width}px;`
301
+ + `height: ${stepLayout.height}px;`,
302
+ semantics.styles.track
303
+ )}></div>
266
304
  {/each}
267
305
  {#if showInfo}{@render indicator()}{/if}
268
306
  </div>
269
307
  {:else}
270
308
  <div class={[`${prefix}-body`, infoAlign === 'center' && infoPosition === 'outer'
271
309
  && `${prefix}-body-layout-bottom`, semantics.classes.body]} data-ant-progress-part="body"
272
- style={`width: ${lineSize.width};${semantics.styles.body ?? ''}`}>
310
+ style={inlineStyleText(`width: ${lineSize.width};`, semantics.styles.body)}>
273
311
  <div class={[`${prefix}-rail`, semantics.classes.rail]} data-ant-progress-part="rail"
274
- style={`height: ${lineSize.height}px;`
275
- + `${railColor ? `background: ${railColor};` : ''}`
276
- + `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.rail ?? ''}`}>
312
+ style={lineRailStyle}>
277
313
  <div class={[`${prefix}-track`, semantics.classes.track]} data-ant-progress-part="track"
278
- style={`width: ${value}%;`
279
- + `height: ${lineSize.height}px;`
280
- + `${background
281
- ? `background: ${background};`
282
- + `--progress-line-stroke-color: ${background};`
283
- : ''}`
284
- + `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.track ?? ''}`}>
314
+ style={lineTrackStyle}>
285
315
  {#if showInfo && infoPosition === 'inner'}{@render indicator()}{/if}
286
316
  </div>
287
317
  {#if success?.percent !== undefined}
288
318
  <div class={[`${prefix}-track ${prefix}-track-success`, semantics.classes.track]}
289
319
  data-ant-progress-part="track"
290
- style={`width: ${successValue}%;`
291
- + `height: ${lineSize.height}px;`
292
- + `${success.strokeColor ? `background-color: ${success.strokeColor};` : ''}`
293
- + `${strokeLinecap !== 'round' ? 'border-radius: 0px;' : ''}${semantics.styles.track ?? ''}`}></div>
320
+ style={lineSuccessStyle}></div>
294
321
  {/if}
295
322
  </div>
296
323
  {#if showInfo && infoPosition === 'outer'}{@render indicator()}{/if}