@editora/ui-react 0.1.20 → 0.1.21

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 (369) hide show
  1. package/dist/Accordion.cjs.js +1 -1
  2. package/dist/Accordion.esm.js +48 -50
  3. package/dist/Alert.cjs.js +1 -1
  4. package/dist/Alert.esm.js +18 -18
  5. package/dist/AlertDialog.cjs.js +1 -1
  6. package/dist/AlertDialog.esm.js +53 -54
  7. package/dist/AlertDialogProvider.cjs.js +1 -1
  8. package/dist/AlertDialogProvider.esm.js +33 -47
  9. package/dist/AnimatedBeam.cjs.js +1 -1
  10. package/dist/AnimatedBeam.esm.js +4 -7
  11. package/dist/AnimatedList.cjs.js +1 -1
  12. package/dist/AnimatedList.esm.js +4 -7
  13. package/dist/AnimatedNumber.cjs.js +1 -1
  14. package/dist/AnimatedNumber.esm.js +81 -80
  15. package/dist/AnimatedText.cjs.js +1 -1
  16. package/dist/AnimatedText.esm.js +4 -7
  17. package/dist/AppHeader.esm.js +2 -4
  18. package/dist/AspectRatio.esm.js +1 -2
  19. package/dist/Avatar.cjs.js +1 -1
  20. package/dist/Avatar.esm.js +53 -53
  21. package/dist/Badge.cjs.js +1 -1
  22. package/dist/Badge.esm.js +23 -23
  23. package/dist/BlockControls.cjs.js +1 -1
  24. package/dist/BlockControls.esm.js +2 -3
  25. package/dist/Breadcrumb.cjs.js +1 -1
  26. package/dist/Breadcrumb.esm.js +34 -34
  27. package/dist/Button.cjs.js +1 -1
  28. package/dist/Button.esm.js +3 -5
  29. package/dist/Calendar.cjs.js +1 -1
  30. package/dist/Calendar.esm.js +84 -84
  31. package/dist/Card.cjs.js +1 -1
  32. package/dist/Card.esm.js +2 -3
  33. package/dist/Carousel.cjs.js +1 -1
  34. package/dist/Carousel.esm.js +172 -186
  35. package/dist/Chart.cjs.js +1 -1
  36. package/dist/Chart.esm.js +3 -5
  37. package/dist/Checkbox.cjs.js +1 -1
  38. package/dist/Checkbox.esm.js +48 -48
  39. package/dist/Collapsible.cjs.js +1 -1
  40. package/dist/Collapsible.esm.js +71 -71
  41. package/dist/Collection.cjs.js +1 -1
  42. package/dist/Collection.esm.js +13 -14
  43. package/dist/ColorPicker.cjs.js +1 -1
  44. package/dist/ColorPicker.esm.js +73 -73
  45. package/dist/Combobox.cjs.js +1 -1
  46. package/dist/Combobox.esm.js +95 -100
  47. package/dist/Command.cjs.js +1 -1
  48. package/dist/Command.esm.js +38 -40
  49. package/dist/CommandPalette.cjs.js +1 -1
  50. package/dist/CommandPalette.esm.js +47 -50
  51. package/dist/ContextMenu.cjs.js +1 -1
  52. package/dist/ContextMenu.esm.js +109 -117
  53. package/dist/CopyButton.cjs.js +1 -1
  54. package/dist/CopyButton.esm.js +30 -35
  55. package/dist/DataTable.cjs.js +1 -1
  56. package/dist/DataTable.esm.js +105 -106
  57. package/dist/DataViewToolbar.cjs.js +1 -1
  58. package/dist/DataViewToolbar.esm.js +7 -14
  59. package/dist/DateField.cjs.js +1 -1
  60. package/dist/DateField.esm.js +23 -23
  61. package/dist/DatePicker.cjs.js +1 -1
  62. package/dist/DatePicker.esm.js +89 -89
  63. package/dist/DateRangePicker.cjs.js +1 -1
  64. package/dist/DateRangePicker.esm.js +79 -79
  65. package/dist/DateRangeTimePicker.cjs.js +1 -1
  66. package/dist/DateRangeTimePicker.esm.js +76 -76
  67. package/dist/DateTimePicker.cjs.js +1 -1
  68. package/dist/DateTimePicker.esm.js +77 -77
  69. package/dist/Dialog.cjs.js +1 -1
  70. package/dist/Dialog.esm.js +85 -85
  71. package/dist/DialogProvider.cjs.js +1 -1
  72. package/dist/DialogProvider.esm.js +27 -37
  73. package/dist/DismissableLayer.cjs.js +1 -1
  74. package/dist/DismissableLayer.esm.js +30 -31
  75. package/dist/Dock.cjs.js +1 -1
  76. package/dist/Dock.esm.js +4 -7
  77. package/dist/Drawer.cjs.js +1 -1
  78. package/dist/Drawer.esm.js +71 -73
  79. package/dist/Dropdown.cjs.js +1 -1
  80. package/dist/Dropdown.esm.js +83 -85
  81. package/dist/EmptyState.cjs.js +1 -1
  82. package/dist/EmptyState.esm.js +15 -15
  83. package/dist/FieldSemantics.esm.js +2 -4
  84. package/dist/FileUpload.cjs.js +1 -1
  85. package/dist/FileUpload.esm.js +46 -48
  86. package/dist/FiltersBar.cjs.js +1 -1
  87. package/dist/FiltersBar.esm.js +47 -51
  88. package/dist/FloatingToolbar.cjs.js +1 -1
  89. package/dist/FloatingToolbar.esm.js +74 -77
  90. package/dist/FocusScope.cjs.js +1 -1
  91. package/dist/FocusScope.esm.js +13 -14
  92. package/dist/Form.cjs.js +1 -1
  93. package/dist/Form.esm.js +81 -82
  94. package/dist/Gantt.cjs.js +1 -1
  95. package/dist/Gantt.esm.js +65 -70
  96. package/dist/HoverCard.cjs.js +1 -1
  97. package/dist/HoverCard.esm.js +43 -44
  98. package/dist/IconCloud.cjs.js +1 -1
  99. package/dist/IconCloud.esm.js +4 -7
  100. package/dist/InlineEdit.cjs.js +1 -1
  101. package/dist/InlineEdit.esm.js +22 -24
  102. package/dist/Input.cjs.js +1 -1
  103. package/dist/Input.esm.js +71 -71
  104. package/dist/Kbd.cjs.js +1 -1
  105. package/dist/Kbd.esm.js +14 -14
  106. package/dist/Layout.cjs.js +1 -1
  107. package/dist/Layout.esm.js +22 -23
  108. package/dist/Listbox.cjs.js +1 -1
  109. package/dist/Listbox.esm.js +13 -14
  110. package/dist/Marquee.cjs.js +1 -1
  111. package/dist/Marquee.esm.js +2 -3
  112. package/dist/MasonryGrid.cjs.js +1 -1
  113. package/dist/MasonryGrid.esm.js +1 -1
  114. package/dist/Menu.cjs.js +1 -1
  115. package/dist/Menu.esm.js +74 -76
  116. package/dist/Menubar.cjs.js +1 -1
  117. package/dist/Menubar.esm.js +63 -63
  118. package/dist/Meter.cjs.js +1 -1
  119. package/dist/Meter.esm.js +28 -28
  120. package/dist/MultiSelect.cjs.js +1 -1
  121. package/dist/MultiSelect.esm.js +67 -69
  122. package/dist/NavigationMenu.cjs.js +1 -1
  123. package/dist/NavigationMenu.esm.js +56 -58
  124. package/dist/NumberField.cjs.js +1 -1
  125. package/dist/NumberField.esm.js +65 -65
  126. package/dist/NumberTicker.cjs.js +1 -1
  127. package/dist/NumberTicker.esm.js +4 -7
  128. package/dist/Orbiter.cjs.js +1 -1
  129. package/dist/Orbiter.esm.js +4 -7
  130. package/dist/PageHeader.cjs.js +1 -1
  131. package/dist/PageHeader.esm.js +9 -12
  132. package/dist/PageToolbar.cjs.js +1 -1
  133. package/dist/PageToolbar.esm.js +21 -26
  134. package/dist/Pagination.cjs.js +1 -1
  135. package/dist/Pagination.esm.js +52 -54
  136. package/dist/PanelGroup.cjs.js +1 -1
  137. package/dist/PanelGroup.esm.js +36 -38
  138. package/dist/PasswordField.cjs.js +1 -1
  139. package/dist/PasswordField.esm.js +89 -89
  140. package/dist/PinInput.cjs.js +1 -1
  141. package/dist/PinInput.esm.js +41 -43
  142. package/dist/PlacementGrid.cjs.js +1 -1
  143. package/dist/PlacementGrid.esm.js +1 -1
  144. package/dist/PluginPanel.cjs.js +1 -1
  145. package/dist/PluginPanel.esm.js +27 -30
  146. package/dist/Popover.cjs.js +1 -1
  147. package/dist/Popover.esm.js +36 -39
  148. package/dist/Portal.cjs.js +1 -1
  149. package/dist/Portal.esm.js +16 -17
  150. package/dist/Positioner.cjs.js +1 -1
  151. package/dist/Positioner.esm.js +25 -26
  152. package/dist/Presence.cjs.js +1 -1
  153. package/dist/Presence.esm.js +33 -37
  154. package/dist/Progress.cjs.js +1 -1
  155. package/dist/Progress.esm.js +34 -34
  156. package/dist/QuickActions.cjs.js +1 -1
  157. package/dist/QuickActions.esm.js +45 -47
  158. package/dist/Radio.cjs.js +1 -1
  159. package/dist/Radio.esm.js +50 -50
  160. package/dist/RadioGroup.cjs.js +1 -1
  161. package/dist/RadioGroup.esm.js +24 -24
  162. package/dist/Rating.cjs.js +1 -1
  163. package/dist/Rating.esm.js +52 -54
  164. package/dist/RecordHeader.cjs.js +1 -1
  165. package/dist/RecordHeader.esm.js +14 -19
  166. package/dist/RovingFocusGroup.cjs.js +1 -1
  167. package/dist/RovingFocusGroup.esm.js +18 -19
  168. package/dist/ScrollArea.cjs.js +1 -1
  169. package/dist/ScrollArea.esm.js +40 -42
  170. package/dist/Select.cjs.js +1 -1
  171. package/dist/Select.esm.js +99 -102
  172. package/dist/SelectionPopup.cjs.js +1 -1
  173. package/dist/SelectionPopup.esm.js +59 -62
  174. package/dist/Sidebar.cjs.js +1 -1
  175. package/dist/Sidebar.esm.js +198 -216
  176. package/dist/Skeleton.cjs.js +1 -1
  177. package/dist/Skeleton.esm.js +1 -1
  178. package/dist/Slider.cjs.js +1 -1
  179. package/dist/Slider.esm.js +63 -63
  180. package/dist/Slot.cjs.js +1 -1
  181. package/dist/Slot.esm.js +40 -42
  182. package/dist/Sortable.cjs.js +1 -1
  183. package/dist/Sortable.esm.js +152 -167
  184. package/dist/SpinningText.cjs.js +1 -1
  185. package/dist/SpinningText.esm.js +4 -7
  186. package/dist/SplitButton.cjs.js +2 -2
  187. package/dist/SplitButton.esm.js +144 -156
  188. package/dist/Stepper.cjs.js +1 -1
  189. package/dist/Stepper.esm.js +32 -32
  190. package/dist/Switch.cjs.js +1 -1
  191. package/dist/Switch.esm.js +42 -42
  192. package/dist/Table.cjs.js +1 -1
  193. package/dist/Table.esm.js +36 -37
  194. package/dist/Tabs.cjs.js +1 -1
  195. package/dist/Tabs.esm.js +59 -61
  196. package/dist/TagsInput.cjs.js +1 -1
  197. package/dist/TagsInput.esm.js +45 -45
  198. package/dist/Textarea.cjs.js +1 -1
  199. package/dist/Textarea.esm.js +87 -87
  200. package/dist/ThemeProvider.cjs.js +1 -1
  201. package/dist/ThemeProvider.esm.js +61 -63
  202. package/dist/TimePicker.cjs.js +1 -1
  203. package/dist/TimePicker.esm.js +70 -70
  204. package/dist/Timeline.esm.js +1 -2
  205. package/dist/Toast.cjs.js +1 -1
  206. package/dist/Toast.esm.js +37 -40
  207. package/dist/ToastAPI.esm.js +1 -2
  208. package/dist/Toggle.cjs.js +1 -1
  209. package/dist/Toggle.esm.js +39 -39
  210. package/dist/ToggleGroup.cjs.js +1 -1
  211. package/dist/ToggleGroup.esm.js +53 -57
  212. package/dist/Toolbar.esm.js +1 -2
  213. package/dist/Tooltip.cjs.js +1 -1
  214. package/dist/Tooltip.esm.js +48 -50
  215. package/dist/TransferList.cjs.js +1 -1
  216. package/dist/TransferList.esm.js +67 -69
  217. package/dist/Tree.cjs.js +1 -1
  218. package/dist/Tree.esm.js +36 -37
  219. package/dist/Wizard.cjs.js +1 -1
  220. package/dist/Wizard.esm.js +104 -109
  221. package/dist/{_internals-68620b0c.mjs → _internals-pNJ1oPIS.mjs} +7 -13
  222. package/dist/client.cjs.js +1 -1
  223. package/dist/client.esm.js +127 -172
  224. package/dist/components/Accordion.cjs.js +1 -1
  225. package/dist/components/Accordion.esm.js +1 -1
  226. package/dist/components/Alert.cjs.js +1 -1
  227. package/dist/components/Alert.esm.js +1 -1
  228. package/dist/components/AnimatedBeam.cjs.js +1 -1
  229. package/dist/components/AnimatedBeam.esm.js +1 -1
  230. package/dist/components/AnimatedList.cjs.js +1 -1
  231. package/dist/components/AnimatedList.esm.js +1 -1
  232. package/dist/components/AnimatedNumber.cjs.js +1 -1
  233. package/dist/components/AnimatedNumber.d.ts +1 -0
  234. package/dist/components/AnimatedNumber.d.ts.map +1 -1
  235. package/dist/components/AnimatedNumber.esm.js +7 -6
  236. package/dist/components/AnimatedText.cjs.js +1 -1
  237. package/dist/components/AnimatedText.esm.js +1 -1
  238. package/dist/components/Avatar.cjs.js +1 -1
  239. package/dist/components/Avatar.esm.js +1 -1
  240. package/dist/components/Badge.cjs.js +1 -1
  241. package/dist/components/Badge.esm.js +1 -1
  242. package/dist/components/BlockControls.cjs.js +1 -1
  243. package/dist/components/BlockControls.esm.js +1 -1
  244. package/dist/components/Breadcrumb.cjs.js +1 -1
  245. package/dist/components/Breadcrumb.esm.js +1 -1
  246. package/dist/components/Button.cjs.js +1 -1
  247. package/dist/components/Button.esm.js +1 -1
  248. package/dist/components/Calendar.cjs.js +1 -1
  249. package/dist/components/Calendar.esm.js +1 -1
  250. package/dist/components/Card.cjs.js +1 -1
  251. package/dist/components/Card.esm.js +1 -1
  252. package/dist/components/Carousel.cjs.js +1 -1
  253. package/dist/components/Carousel.esm.js +3 -5
  254. package/dist/components/Chart.cjs.js +1 -1
  255. package/dist/components/Chart.esm.js +1 -1
  256. package/dist/components/Checkbox.cjs.js +1 -1
  257. package/dist/components/Checkbox.esm.js +1 -1
  258. package/dist/components/Collapsible.cjs.js +1 -1
  259. package/dist/components/Collapsible.esm.js +1 -1
  260. package/dist/components/ColorPicker.cjs.js +1 -1
  261. package/dist/components/ColorPicker.esm.js +1 -1
  262. package/dist/components/Command.cjs.js +1 -1
  263. package/dist/components/Command.esm.js +1 -1
  264. package/dist/components/CommandPalette.cjs.js +1 -1
  265. package/dist/components/CommandPalette.esm.js +1 -1
  266. package/dist/components/CopyButton.cjs.js +1 -1
  267. package/dist/components/CopyButton.esm.js +3 -5
  268. package/dist/components/DataViewToolbar.cjs.js +1 -1
  269. package/dist/components/DataViewToolbar.esm.js +3 -10
  270. package/dist/components/DateField.cjs.js +1 -1
  271. package/dist/components/DateField.esm.js +1 -1
  272. package/dist/components/DatePicker.cjs.js +1 -1
  273. package/dist/components/DatePicker.esm.js +1 -1
  274. package/dist/components/DateRangePicker.cjs.js +1 -1
  275. package/dist/components/DateRangePicker.esm.js +1 -1
  276. package/dist/components/DateRangeTimePicker.cjs.js +1 -1
  277. package/dist/components/DateRangeTimePicker.esm.js +1 -1
  278. package/dist/components/DateTimePicker.cjs.js +1 -1
  279. package/dist/components/DateTimePicker.esm.js +1 -1
  280. package/dist/components/Dialog.cjs.js +1 -1
  281. package/dist/components/Dialog.esm.js +1 -1
  282. package/dist/components/Dock.cjs.js +1 -1
  283. package/dist/components/Dock.esm.js +1 -1
  284. package/dist/components/EmptyState.cjs.js +1 -1
  285. package/dist/components/EmptyState.esm.js +1 -1
  286. package/dist/components/FiltersBar.cjs.js +1 -1
  287. package/dist/components/FiltersBar.esm.js +3 -7
  288. package/dist/components/FloatingToolbar.cjs.js +1 -1
  289. package/dist/components/FloatingToolbar.esm.js +1 -1
  290. package/dist/components/HoverCard.cjs.js +1 -1
  291. package/dist/components/HoverCard.esm.js +1 -1
  292. package/dist/components/IconCloud.cjs.js +1 -1
  293. package/dist/components/IconCloud.esm.js +1 -1
  294. package/dist/components/Input.cjs.js +1 -1
  295. package/dist/components/Input.esm.js +1 -1
  296. package/dist/components/Marquee.cjs.js +1 -1
  297. package/dist/components/Marquee.esm.js +1 -1
  298. package/dist/components/MasonryGrid.cjs.js +1 -1
  299. package/dist/components/MasonryGrid.esm.js +1 -1
  300. package/dist/components/Menubar.cjs.js +1 -1
  301. package/dist/components/Menubar.esm.js +1 -1
  302. package/dist/components/Meter.cjs.js +1 -1
  303. package/dist/components/Meter.esm.js +1 -1
  304. package/dist/components/NumberField.cjs.js +1 -1
  305. package/dist/components/NumberField.esm.js +1 -1
  306. package/dist/components/NumberTicker.cjs.js +1 -1
  307. package/dist/components/NumberTicker.esm.js +1 -1
  308. package/dist/components/Orbiter.cjs.js +1 -1
  309. package/dist/components/Orbiter.esm.js +1 -1
  310. package/dist/components/PageHeader.cjs.js +1 -1
  311. package/dist/components/PageHeader.esm.js +3 -6
  312. package/dist/components/PageToolbar.cjs.js +1 -1
  313. package/dist/components/PageToolbar.esm.js +3 -8
  314. package/dist/components/PasswordField.cjs.js +1 -1
  315. package/dist/components/PasswordField.esm.js +1 -1
  316. package/dist/components/PinInput.cjs.js +1 -1
  317. package/dist/components/PinInput.esm.js +1 -1
  318. package/dist/components/PlacementGrid.cjs.js +1 -1
  319. package/dist/components/PlacementGrid.esm.js +1 -1
  320. package/dist/components/PluginPanel.cjs.js +1 -1
  321. package/dist/components/PluginPanel.esm.js +1 -1
  322. package/dist/components/Popover.cjs.js +1 -1
  323. package/dist/components/Popover.esm.js +1 -1
  324. package/dist/components/Progress.cjs.js +1 -1
  325. package/dist/components/Progress.esm.js +1 -1
  326. package/dist/components/QuickActions.cjs.js +1 -1
  327. package/dist/components/QuickActions.esm.js +1 -1
  328. package/dist/components/Radio.cjs.js +1 -1
  329. package/dist/components/Radio.esm.js +1 -1
  330. package/dist/components/RadioGroup.cjs.js +1 -1
  331. package/dist/components/RadioGroup.esm.js +1 -1
  332. package/dist/components/RecordHeader.cjs.js +1 -1
  333. package/dist/components/RecordHeader.esm.js +3 -8
  334. package/dist/components/Select.cjs.js +1 -1
  335. package/dist/components/Select.esm.js +1 -1
  336. package/dist/components/SelectionPopup.cjs.js +1 -1
  337. package/dist/components/SelectionPopup.esm.js +1 -1
  338. package/dist/components/Skeleton.cjs.js +1 -1
  339. package/dist/components/Skeleton.esm.js +1 -1
  340. package/dist/components/Slider.cjs.js +1 -1
  341. package/dist/components/Slider.esm.js +1 -1
  342. package/dist/components/Sortable.cjs.js +1 -1
  343. package/dist/components/Sortable.esm.js +1 -1
  344. package/dist/components/SpinningText.cjs.js +1 -1
  345. package/dist/components/SpinningText.esm.js +1 -1
  346. package/dist/components/Stepper.cjs.js +1 -1
  347. package/dist/components/Stepper.esm.js +1 -1
  348. package/dist/components/Switch.cjs.js +1 -1
  349. package/dist/components/Switch.esm.js +1 -1
  350. package/dist/components/TagsInput.cjs.js +1 -1
  351. package/dist/components/TagsInput.esm.js +1 -1
  352. package/dist/components/Textarea.cjs.js +1 -1
  353. package/dist/components/Textarea.esm.js +1 -1
  354. package/dist/components/TimePicker.cjs.js +1 -1
  355. package/dist/components/TimePicker.esm.js +1 -1
  356. package/dist/components/Toggle.cjs.js +1 -1
  357. package/dist/components/Toggle.esm.js +1 -1
  358. package/dist/components/ToggleGroup.cjs.js +1 -1
  359. package/dist/components/ToggleGroup.esm.js +2 -4
  360. package/dist/components/TransferList.cjs.js +1 -1
  361. package/dist/components/TransferList.esm.js +1 -1
  362. package/dist/index.cjs.js +1 -1
  363. package/dist/index.esm.js +1109 -1286
  364. package/dist/server.cjs.js +1 -1
  365. package/dist/server.esm.js +38 -52
  366. package/dist/ui-react.css +1 -0
  367. package/package.json +3 -3
  368. package/dist/style.css +0 -1
  369. /package/dist/{_internals-a238f8ce.js → _internals-C0zzLj8J.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react");require("@editora/ui-core/animated-list");const H=require("./_internals-a238f8ce.js"),P=t=>t&&t.__esModule?t:{default:t},l=P(O),k=typeof window<"u"?l.default.useLayoutEffect:l.default.useEffect;function j(t){if(t==null||t==="")return null;if(typeof t=="number")return`${t}px`;const u=t.split(/\s+/).filter(Boolean);return u.length?u.map(n=>/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n).join(" "):null}function L(t){return t==null||t===""?null:typeof t=="number"?`${t}ms`:/^-?\d+(\.\d+)?$/.test(t)?`${t}ms`:t}const q=l.default.forwardRef(function({effect:u,animation:n,trigger:s,duration:c,stagger:a,delay:_,loop:E,loopDelay:I,paused:R,threshold:m,variant:f,tone:A,size:d,radius:b,elevation:p,padding:g,gap:w,children:T,...h},B){const y=l.default.useRef(null);return l.default.useImperativeHandle(B,()=>y.current),l.default.useEffect(()=>{H.warnIfElementNotRegistered("ui-animated-list","AnimatedList")},[]),k(()=>{const r=y.current;if(!r)return;const e=(i,o)=>{const S=r.getAttribute(i);if(o==null){S!=null&&r.removeAttribute(i);return}S!==o&&r.setAttribute(i,o)},$=(i,o)=>{o?r.hasAttribute(i)||r.setAttribute(i,""):r.hasAttribute(i)&&r.removeAttribute(i)};e("effect",u&&u!=="fade-up"?u:null),e("animation",n&&n!=="smooth"?n:null),e("trigger",s&&s!=="load"?s:null),e("duration",L(c)),e("stagger",L(a)),e("delay",L(_)),$("loop",E),e("loop-delay",L(I)),$("paused",R),e("threshold",m==null||m===""?null:String(m)),e("variant",f&&f!=="default"&&f!=="surface"?f:null),e("tone",A&&A!=="brand"?A:null),e("size",d&&d!=="md"&&d!=="2"?d:null),e("radius",b==null||b===""?null:String(b)),e("elevation",p&&p!=="low"?p:null),e("padding",j(g)),e("gap",j(w))},[u,n,s,c,a,_,E,I,R,m,f,A,d,b,p,g,w]),l.default.createElement("ui-animated-list",{ref:y,...h},T)});q.displayName="AnimatedList";const M=l.default.forwardRef(function({as:u,children:n,...s},c){const a=u||"div";return l.default.createElement(a,{ref:c,"data-ui-animated-list-item":"",...s},n)});M.displayName="AnimatedList.Item";const N=Object.assign(q,{Item:M});exports.AnimatedList=N;exports.default=N;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react");require("@editora/ui-core/animated-list");const H=require("./_internals-C0zzLj8J.js"),P=t=>t&&t.__esModule?t:{default:t},l=P(O),k=typeof window<"u"?l.default.useLayoutEffect:l.default.useEffect;function j(t){if(t==null||t==="")return null;if(typeof t=="number")return`${t}px`;const u=t.split(/\s+/).filter(Boolean);return u.length?u.map(n=>/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n).join(" "):null}function L(t){return t==null||t===""?null:typeof t=="number"?`${t}ms`:/^-?\d+(\.\d+)?$/.test(t)?`${t}ms`:t}const q=l.default.forwardRef(function({effect:u,animation:n,trigger:s,duration:c,stagger:a,delay:_,loop:E,loopDelay:I,paused:R,threshold:m,variant:f,tone:A,size:d,radius:b,elevation:p,padding:g,gap:w,children:T,...h},B){const y=l.default.useRef(null);return l.default.useImperativeHandle(B,()=>y.current),l.default.useEffect(()=>{H.warnIfElementNotRegistered("ui-animated-list","AnimatedList")},[]),k(()=>{const r=y.current;if(!r)return;const e=(i,o)=>{const S=r.getAttribute(i);if(o==null){S!=null&&r.removeAttribute(i);return}S!==o&&r.setAttribute(i,o)},$=(i,o)=>{o?r.hasAttribute(i)||r.setAttribute(i,""):r.hasAttribute(i)&&r.removeAttribute(i)};e("effect",u&&u!=="fade-up"?u:null),e("animation",n&&n!=="smooth"?n:null),e("trigger",s&&s!=="load"?s:null),e("duration",L(c)),e("stagger",L(a)),e("delay",L(_)),$("loop",E),e("loop-delay",L(I)),$("paused",R),e("threshold",m==null||m===""?null:String(m)),e("variant",f&&f!=="default"&&f!=="surface"?f:null),e("tone",A&&A!=="brand"?A:null),e("size",d&&d!=="md"&&d!=="2"?d:null),e("radius",b==null||b===""?null:String(b)),e("elevation",p&&p!=="low"?p:null),e("padding",j(g)),e("gap",j(w))},[u,n,s,c,a,_,E,I,R,m,f,A,d,b,p,g,w]),l.default.createElement("ui-animated-list",{ref:y,...h},T)});q.displayName="AnimatedList";const M=l.default.forwardRef(function({as:u,children:n,...s},c){const a=u||"div";return l.default.createElement(a,{ref:c,"data-ui-animated-list-item":"",...s},n)});M.displayName="AnimatedList.Item";const N=Object.assign(q,{Item:M});exports.AnimatedList=N;exports.default=N;
@@ -1,13 +1,11 @@
1
1
  'use client';
2
2
  import i from "react";
3
3
  import "@editora/ui-core/animated-list";
4
- import { w as H } from "./_internals-68620b0c.mjs";
4
+ import { w as H } from "./_internals-pNJ1oPIS.mjs";
5
5
  const O = typeof window < "u" ? i.useLayoutEffect : i.useEffect;
6
6
  function j(t) {
7
- if (t == null || t === "")
8
- return null;
9
- if (typeof t == "number")
10
- return `${t}px`;
7
+ if (t == null || t === "") return null;
8
+ if (typeof t == "number") return `${t}px`;
11
9
  const r = t.split(/\s+/).filter(Boolean);
12
10
  return r.length ? r.map((n) => /^-?\d+(\.\d+)?$/.test(n) ? `${n}px` : n).join(" ") : null;
13
11
  }
@@ -40,8 +38,7 @@ const B = i.forwardRef(function({
40
38
  H("ui-animated-list", "AnimatedList");
41
39
  }, []), O(() => {
42
40
  const u = y.current;
43
- if (!u)
44
- return;
41
+ if (!u) return;
45
42
  const e = (l, m) => {
46
43
  const h = u.getAttribute(l);
47
44
  if (m == null) {
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react"),t=require("./_internals-a238f8ce.js"),H=d=>d&&d.__esModule?d:{default:d},B=H(n),w=B.default.forwardRef(function({value:l=0,onComplete:a,variant:g="inline",size:S,tone:m,theme:o,format:s="decimal",locale:v,currency:i,notation:u="standard",fractionDigits:b,minimumFractionDigits:N,maximumFractionDigits:r,decimals:f,duration:F,animation:k="spring",direction:A="auto",prefix:V,suffix:R,decimalSeparator:M,groupSeparator:c,animate:y,animateOnMount:C,countUp:E,min:_,max:p,label:x,className:T,...h},j){const q=t.useForwardedHostRef(j),D=C??E,I=N??b??f,O=r??b??f;n.useEffect(()=>{t.warnIfElementNotRegistered("ui-odometer","AnimatedNumber")},[]);const P=B.default.useCallback(e=>{a==null||a(e)},[a]);return t.useElementEventListeners(q,[{type:"complete",listener:P}],[P]),t.useElementAttributes(q,e=>{t.syncNumberAttribute(e,"value",l),t.syncNumberAttribute(e,"duration",F),t.syncNumberAttribute(e,"min",_),t.syncNumberAttribute(e,"max",p),t.syncNumberAttribute(e,"minimum-fraction-digits",I),t.syncNumberAttribute(e,"maximum-fraction-digits",O),t.syncStringAttribute(e,"variant",g),t.syncStringAttribute(e,"size",S??null),t.syncStringAttribute(e,"tone",m&&m!=="default"?m:null),t.syncStringAttribute(e,"theme",o&&o!=="default"?o:null),t.syncStringAttribute(e,"format",s&&s!=="decimal"?s:null),t.syncStringAttribute(e,"locale",v??null),t.syncStringAttribute(e,"currency",i??null),t.syncStringAttribute(e,"notation",u&&u!=="standard"?u:null),t.syncStringAttribute(e,"animation",k??null),t.syncStringAttribute(e,"direction",A&&A!=="auto"?A:null),t.syncStringAttribute(e,"prefix",V??null),t.syncStringAttribute(e,"suffix",R??null),t.syncStringAttribute(e,"decimal-separator",M??null),t.syncStringAttribute(e,"group-separator",c??null),t.syncStringAttribute(e,"label",x??null),t.syncNumberAttribute(e,"decimals",f),t.syncBooleanAttribute(e,"animate",y),t.syncBooleanAttribute(e,"animate-on-mount",D),t.syncBooleanAttribute(e,"count-up",E)},[l,g,S,m,o,s,v,i,u,F,k,A,V,R,M,c,y,D,E,_,p,x,f,I,O]),B.default.createElement("ui-odometer",{ref:q,class:T,...h})});w.displayName="AnimatedNumber";function L(d){const{start:l=0,end:a,duration:g=800,easing:S,autoStart:m=!1}=d,[o,s]=n.useState(l),[v,i]=n.useState(!1),u=n.useRef(null),b=n.useRef(null),N=n.useRef(l),r=n.useRef(a),f=n.useRef(l),F=n.useCallback(c=>1-Math.pow(1-c,3),[]),k=S||F,A=n.useCallback(()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null),b.current=null,i(!1)},[]);n.useEffect(()=>{f.current=o},[o]);const V=n.useCallback(()=>{const c=y=>{b.current===null&&(b.current=y);const C=y-b.current,E=Math.min(C/g,1),_=k(E),p=N.current+(r.current-N.current)*_;if(s(p),E<1){u.current=requestAnimationFrame(c);return}s(r.current),u.current=null,b.current=null,i(!1)};u.current=requestAnimationFrame(c),i(!0)},[k,g]),R=n.useCallback(c=>{A(),c!==void 0&&(r.current=c),N.current=f.current,V()},[V,A]),M=n.useCallback(c=>{A();const y=c!==void 0?c:l;N.current=y,r.current=y,s(y)},[l,A]);return n.useEffect(()=>{r.current=a},[a]),n.useEffect(()=>(m&&R(a),()=>{u.current!==null&&cancelAnimationFrame(u.current)}),[m,a,R]),{value:o,isAnimating:v,start:R,reset:M,stop:A}}function z(d={}){const{initialValue:l=0,duration:a=800,animation:g="spring",format:S="decimal",variant:m="inline"}=d,o=n.useRef(null),[s,v]=n.useState(l);n.useEffect(()=>{const r=o.current;r&&(r.setAttribute("duration",String(a)),r.setAttribute("variant",m),g!=="spring"?r.setAttribute("animation",g):r.removeAttribute("animation"),S!=="decimal"?r.setAttribute("format",S):r.removeAttribute("format"))},[g,a,S,m]);const i=n.useCallback(r=>{const f=o.current;v(r),f&&f.setAttribute("value",String(r))},[]),u=n.useCallback((r=1)=>{i(s+r)},[i,s]),b=n.useCallback((r=1)=>{i(s-r)},[i,s]),N=n.useCallback(()=>{i(l)},[l,i]);return{ref:o,value:s,setValue:i,increment:u,decrement:b,reset:N}}exports.AnimatedNumber=w;exports.default=w;exports.useAnimatedNumber=z;exports.useAnimatedNumberValue=L;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react");require("@editora/ui-core/odometer");const t=require("./_internals-C0zzLj8J.js"),H=d=>d&&d.__esModule?d:{default:d},B=H(n),w=B.default.forwardRef(function({value:c=0,onComplete:o,variant:g="inline",size:S,tone:m,theme:l,format:s="decimal",locale:v,currency:i,notation:u="standard",fractionDigits:b,minimumFractionDigits:N,maximumFractionDigits:r,decimals:f,duration:C,animation:k="spring",direction:A="auto",prefix:p,suffix:R,decimalSeparator:V,groupSeparator:a,animate:y,animateOnMount:_,countUp:E,min:F,max:M,label:x,className:T,...h},j){const q=t.useForwardedHostRef(j),D=_??E,I=N??b??f,O=r??b??f;n.useEffect(()=>{t.warnIfElementNotRegistered("ui-odometer","AnimatedNumber")},[]);const P=B.default.useCallback(e=>{o?.(e)},[o]);return t.useElementEventListeners(q,[{type:"complete",listener:P}],[P]),t.useElementAttributes(q,e=>{t.syncNumberAttribute(e,"value",c),t.syncNumberAttribute(e,"duration",C),t.syncNumberAttribute(e,"min",F),t.syncNumberAttribute(e,"max",M),t.syncNumberAttribute(e,"minimum-fraction-digits",I),t.syncNumberAttribute(e,"maximum-fraction-digits",O),t.syncStringAttribute(e,"variant",g),t.syncStringAttribute(e,"size",S??null),t.syncStringAttribute(e,"tone",m&&m!=="default"?m:null),t.syncStringAttribute(e,"theme",l&&l!=="default"?l:null),t.syncStringAttribute(e,"format",s&&s!=="decimal"?s:null),t.syncStringAttribute(e,"locale",v??null),t.syncStringAttribute(e,"currency",i??null),t.syncStringAttribute(e,"notation",u&&u!=="standard"?u:null),t.syncStringAttribute(e,"animation",k??null),t.syncStringAttribute(e,"direction",A&&A!=="auto"?A:null),t.syncStringAttribute(e,"prefix",p??null),t.syncStringAttribute(e,"suffix",R??null),t.syncStringAttribute(e,"decimal-separator",V??null),t.syncStringAttribute(e,"group-separator",a??null),t.syncStringAttribute(e,"label",x??null),t.syncNumberAttribute(e,"decimals",f),t.syncBooleanAttribute(e,"animate",y),t.syncBooleanAttribute(e,"animate-on-mount",D),t.syncBooleanAttribute(e,"count-up",E)},[c,g,S,m,l,s,v,i,u,C,k,A,p,R,V,a,y,D,E,F,M,x,f,I,O]),B.default.createElement("ui-odometer",{ref:q,class:T,...h})});w.displayName="AnimatedNumber";function L(d){const{start:c=0,end:o,duration:g=800,easing:S,autoStart:m=!1}=d,[l,s]=n.useState(c),[v,i]=n.useState(!1),u=n.useRef(null),b=n.useRef(null),N=n.useRef(c),r=n.useRef(o),f=n.useRef(c),C=n.useCallback(a=>1-Math.pow(1-a,3),[]),k=S||C,A=n.useCallback(()=>{u.current!==null&&(cancelAnimationFrame(u.current),u.current=null),b.current=null,i(!1)},[]);n.useEffect(()=>{f.current=l},[l]);const p=n.useCallback(()=>{const a=y=>{b.current===null&&(b.current=y);const _=y-b.current,E=Math.min(_/g,1),F=k(E),M=N.current+(r.current-N.current)*F;if(s(M),E<1){u.current=requestAnimationFrame(a);return}s(r.current),u.current=null,b.current=null,i(!1)};u.current=requestAnimationFrame(a),i(!0)},[k,g]),R=n.useCallback(a=>{A(),a!==void 0&&(r.current=a),N.current=f.current,p()},[p,A]),V=n.useCallback(a=>{A();const y=a!==void 0?a:c;N.current=y,r.current=y,s(y)},[c,A]);return n.useEffect(()=>{r.current=o},[o]),n.useEffect(()=>(m&&R(o),()=>{u.current!==null&&cancelAnimationFrame(u.current)}),[m,o,R]),{value:l,isAnimating:v,start:R,reset:V,stop:A}}function z(d={}){const{initialValue:c=0,duration:o=800,animation:g="spring",format:S="decimal",variant:m="inline"}=d,l=n.useRef(null),[s,v]=n.useState(c);n.useEffect(()=>{const r=l.current;r&&(r.setAttribute("duration",String(o)),r.setAttribute("variant",m),g!=="spring"?r.setAttribute("animation",g):r.removeAttribute("animation"),S!=="decimal"?r.setAttribute("format",S):r.removeAttribute("format"))},[g,o,S,m]);const i=n.useCallback(r=>{const f=l.current;v(r),f&&f.setAttribute("value",String(r))},[]),u=n.useCallback((r=1)=>{i(s+r)},[i,s]),b=n.useCallback((r=1)=>{i(s-r)},[i,s]),N=n.useCallback(()=>{i(c)},[c,i]);return{ref:l,value:s,setValue:i,increment:u,decrement:b,reset:N}}exports.AnimatedNumber=w;exports.default=w;exports.useAnimatedNumber=z;exports.useAnimatedNumberValue=L;
@@ -1,133 +1,134 @@
1
1
  'use client';
2
- import B, { useEffect as w, useState as H, useRef as p, useCallback as g } from "react";
3
- import { c as K, w as Q, u as W, a as X, d as R, s as r, b as D } from "./_internals-68620b0c.mjs";
4
- const Y = B.forwardRef(function({
5
- value: c = 0,
6
- onComplete: a,
2
+ import h, { useEffect as w, useRef as V, useState as D, useCallback as g } from "react";
3
+ import "@editora/ui-core/odometer";
4
+ import { c as J, w as K, u as Q, a as W, d as N, s as r, b as B } from "./_internals-pNJ1oPIS.mjs";
5
+ const X = h.forwardRef(function({
6
+ value: i = 0,
7
+ onComplete: o,
7
8
  variant: A = "inline",
8
9
  size: v,
9
- tone: o,
10
- theme: l,
10
+ tone: l,
11
+ theme: c,
11
12
  format: u = "decimal",
12
- locale: E,
13
+ locale: R,
13
14
  currency: s,
14
15
  notation: e = "standard",
15
16
  fractionDigits: m,
16
- minimumFractionDigits: N,
17
+ minimumFractionDigits: p,
17
18
  maximumFractionDigits: n,
18
19
  decimals: d,
19
20
  duration: k,
20
21
  animation: y = "spring",
21
22
  direction: f = "auto",
22
23
  prefix: M,
23
- suffix: F,
24
+ suffix: E,
24
25
  decimalSeparator: q,
25
- groupSeparator: i,
26
+ groupSeparator: a,
26
27
  animate: b,
27
- animateOnMount: _,
28
- countUp: V,
29
- min: I,
30
- max: S,
31
- label: L,
32
- className: z,
33
- ...G
34
- }, J) {
35
- const h = K(J), O = _ ?? V, P = N ?? m ?? d, T = n ?? m ?? d;
28
+ animateOnMount: S,
29
+ countUp: F,
30
+ min: C,
31
+ max: I,
32
+ label: H,
33
+ className: j,
34
+ ...z
35
+ }, G) {
36
+ const _ = J(G), L = S ?? F, O = p ?? m ?? d, P = n ?? m ?? d;
36
37
  w(() => {
37
- Q("ui-odometer", "AnimatedNumber");
38
+ K("ui-odometer", "AnimatedNumber");
38
39
  }, []);
39
- const j = B.useCallback((t) => {
40
- a == null || a(t);
41
- }, [a]);
42
- return W(h, [{ type: "complete", listener: j }], [j]), X(h, (t) => {
43
- R(t, "value", c), R(t, "duration", k), R(t, "min", I), R(t, "max", S), R(t, "minimum-fraction-digits", P), R(t, "maximum-fraction-digits", T), r(t, "variant", A), r(t, "size", v ?? null), r(t, "tone", o && o !== "default" ? o : null), r(t, "theme", l && l !== "default" ? l : null), r(t, "format", u && u !== "decimal" ? u : null), r(t, "locale", E ?? null), r(t, "currency", s ?? null), r(t, "notation", e && e !== "standard" ? e : null), r(t, "animation", y ?? null), r(t, "direction", f && f !== "auto" ? f : null), r(t, "prefix", M ?? null), r(t, "suffix", F ?? null), r(t, "decimal-separator", q ?? null), r(t, "group-separator", i ?? null), r(t, "label", L ?? null), R(t, "decimals", d), D(t, "animate", b), D(t, "animate-on-mount", O), D(t, "count-up", V);
40
+ const T = h.useCallback((t) => {
41
+ o?.(t);
42
+ }, [o]);
43
+ return Q(_, [{ type: "complete", listener: T }], [T]), W(_, (t) => {
44
+ N(t, "value", i), N(t, "duration", k), N(t, "min", C), N(t, "max", I), N(t, "minimum-fraction-digits", O), N(t, "maximum-fraction-digits", P), r(t, "variant", A), r(t, "size", v ?? null), r(t, "tone", l && l !== "default" ? l : null), r(t, "theme", c && c !== "default" ? c : null), r(t, "format", u && u !== "decimal" ? u : null), r(t, "locale", R ?? null), r(t, "currency", s ?? null), r(t, "notation", e && e !== "standard" ? e : null), r(t, "animation", y ?? null), r(t, "direction", f && f !== "auto" ? f : null), r(t, "prefix", M ?? null), r(t, "suffix", E ?? null), r(t, "decimal-separator", q ?? null), r(t, "group-separator", a ?? null), r(t, "label", H ?? null), N(t, "decimals", d), B(t, "animate", b), B(t, "animate-on-mount", L), B(t, "count-up", F);
44
45
  }, [
45
- c,
46
+ i,
46
47
  A,
47
48
  v,
48
- o,
49
49
  l,
50
+ c,
50
51
  u,
51
- E,
52
+ R,
52
53
  s,
53
54
  e,
54
55
  k,
55
56
  y,
56
57
  f,
57
58
  M,
58
- F,
59
+ E,
59
60
  q,
60
- i,
61
+ a,
61
62
  b,
62
- O,
63
- V,
64
- I,
65
- S,
66
63
  L,
64
+ F,
65
+ C,
66
+ I,
67
+ H,
67
68
  d,
68
- P,
69
- T
70
- ]), B.createElement("ui-odometer", { ref: h, class: z, ...G });
69
+ O,
70
+ P
71
+ ]), h.createElement("ui-odometer", { ref: _, class: j, ...z });
71
72
  });
72
- Y.displayName = "AnimatedNumber";
73
- function C(x) {
74
- const { start: c = 0, end: a, duration: A = 800, easing: v, autoStart: o = !1 } = x, [l, u] = H(c), [E, s] = H(!1), e = p(null), m = p(null), N = p(c), n = p(a), d = p(c), k = g((i) => 1 - Math.pow(1 - i, 3), []), y = v || k, f = g(() => {
73
+ X.displayName = "AnimatedNumber";
74
+ function U(x) {
75
+ const { start: i = 0, end: o, duration: A = 800, easing: v, autoStart: l = !1 } = x, [c, u] = D(i), [R, s] = D(!1), e = V(null), m = V(null), p = V(i), n = V(o), d = V(i), k = g((a) => 1 - Math.pow(1 - a, 3), []), y = v || k, f = g(() => {
75
76
  e.current !== null && (cancelAnimationFrame(e.current), e.current = null), m.current = null, s(!1);
76
77
  }, []);
77
78
  w(() => {
78
- d.current = l;
79
- }, [l]);
79
+ d.current = c;
80
+ }, [c]);
80
81
  const M = g(() => {
81
- const i = (b) => {
82
+ const a = (b) => {
82
83
  m.current === null && (m.current = b);
83
- const _ = b - m.current, V = Math.min(_ / A, 1), I = y(V), S = N.current + (n.current - N.current) * I;
84
- if (u(S), V < 1) {
85
- e.current = requestAnimationFrame(i);
84
+ const S = b - m.current, F = Math.min(S / A, 1), C = y(F), I = p.current + (n.current - p.current) * C;
85
+ if (u(I), F < 1) {
86
+ e.current = requestAnimationFrame(a);
86
87
  return;
87
88
  }
88
89
  u(n.current), e.current = null, m.current = null, s(!1);
89
90
  };
90
- e.current = requestAnimationFrame(i), s(!0);
91
- }, [y, A]), F = g(
92
- (i) => {
93
- f(), i !== void 0 && (n.current = i), N.current = d.current, M();
91
+ e.current = requestAnimationFrame(a), s(!0);
92
+ }, [y, A]), E = g(
93
+ (a) => {
94
+ f(), a !== void 0 && (n.current = a), p.current = d.current, M();
94
95
  },
95
96
  [M, f]
96
97
  ), q = g(
97
- (i) => {
98
+ (a) => {
98
99
  f();
99
- const b = i !== void 0 ? i : c;
100
- N.current = b, n.current = b, u(b);
100
+ const b = a !== void 0 ? a : i;
101
+ p.current = b, n.current = b, u(b);
101
102
  },
102
- [c, f]
103
+ [i, f]
103
104
  );
104
105
  return w(() => {
105
- n.current = a;
106
- }, [a]), w(() => (o && F(a), () => {
106
+ n.current = o;
107
+ }, [o]), w(() => (l && E(o), () => {
107
108
  e.current !== null && cancelAnimationFrame(e.current);
108
- }), [o, a, F]), {
109
- value: l,
110
- isAnimating: E,
111
- start: F,
109
+ }), [l, o, E]), {
110
+ value: c,
111
+ isAnimating: R,
112
+ start: E,
112
113
  reset: q,
113
114
  stop: f
114
115
  };
115
116
  }
116
- function U(x = {}) {
117
+ function tt(x = {}) {
117
118
  const {
118
- initialValue: c = 0,
119
- duration: a = 800,
119
+ initialValue: i = 0,
120
+ duration: o = 800,
120
121
  animation: A = "spring",
121
122
  format: v = "decimal",
122
- variant: o = "inline"
123
- } = x, l = p(null), [u, E] = H(c);
123
+ variant: l = "inline"
124
+ } = x, c = V(null), [u, R] = D(i);
124
125
  w(() => {
125
- const n = l.current;
126
- n && (n.setAttribute("duration", String(a)), n.setAttribute("variant", o), A !== "spring" ? n.setAttribute("animation", A) : n.removeAttribute("animation"), v !== "decimal" ? n.setAttribute("format", v) : n.removeAttribute("format"));
127
- }, [A, a, v, o]);
126
+ const n = c.current;
127
+ n && (n.setAttribute("duration", String(o)), n.setAttribute("variant", l), A !== "spring" ? n.setAttribute("animation", A) : n.removeAttribute("animation"), v !== "decimal" ? n.setAttribute("format", v) : n.removeAttribute("format"));
128
+ }, [A, o, v, l]);
128
129
  const s = g((n) => {
129
- const d = l.current;
130
- E(n), d && d.setAttribute("value", String(n));
130
+ const d = c.current;
131
+ R(n), d && d.setAttribute("value", String(n));
131
132
  }, []), e = g(
132
133
  (n = 1) => {
133
134
  s(u + n);
@@ -138,21 +139,21 @@ function U(x = {}) {
138
139
  s(u - n);
139
140
  },
140
141
  [s, u]
141
- ), N = g(() => {
142
- s(c);
143
- }, [c, s]);
142
+ ), p = g(() => {
143
+ s(i);
144
+ }, [i, s]);
144
145
  return {
145
- ref: l,
146
+ ref: c,
146
147
  value: u,
147
148
  setValue: s,
148
149
  increment: e,
149
150
  decrement: m,
150
- reset: N
151
+ reset: p
151
152
  };
152
153
  }
153
154
  export {
154
- Y as AnimatedNumber,
155
- Y as default,
156
- U as useAnimatedNumber,
157
- C as useAnimatedNumberValue
155
+ X as AnimatedNumber,
156
+ X as default,
157
+ tt as useAnimatedNumber,
158
+ U as useAnimatedNumberValue
158
159
  };
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react");require("@editora/ui-core/animated-text");const G=require("./_internals-a238f8ce.js"),I=e=>e&&e.__esModule?e:{default:e},f=I(k),J=typeof window<"u"?f.default.useLayoutEffect:f.default.useEffect;function K(e){if(e==null||e==="")return null;if(typeof e=="number")return`${e}px`;const l=e.split(/\s+/).filter(Boolean);return l.length?l.map(n=>/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n).join(" "):null}function y(e){return e==null||e===""?null:typeof e=="number"?`${e}ms`:/^-?\d+(\.\d+)?$/.test(e)?`${e}ms`:e}const M=f.default.forwardRef(function({text:l,effect:n,split:o,trigger:s,duration:T,stagger:w,delay:R,loop:$,loopDelay:h,paused:x,customEffect:E,effectTimingFunction:S,effectDirection:q,effectIterationCount:c,effectFillMode:L,variant:m,tone:a,size:d,radius:A,elevation:b,padding:g,align:p,children:H,...O},P){const _=f.default.useRef(null);return f.default.useImperativeHandle(P,()=>_.current),f.default.useEffect(()=>{G.warnIfElementNotRegistered("ui-animated-text","AnimatedText")},[]),J(()=>{const u=_.current;if(!u)return;const t=(r,i)=>{const B=u.getAttribute(r);if(i==null){B!=null&&u.removeAttribute(r);return}B!==i&&u.setAttribute(r,i)},j=(r,i)=>{i?u.hasAttribute(r)||u.setAttribute(r,""):u.hasAttribute(r)&&u.removeAttribute(r)};t("text",l!=null&&l!==""?l:null),t("effect",n&&n!=="fade-up"?n:null),t("split",o&&o!=="words"?o:null),t("trigger",s&&s!=="load"?s:null),t("duration",y(T)),t("stagger",y(w)),t("delay",y(R)),j("loop",$),t("loop-delay",y(h)),j("paused",x),t("custom-effect",E||null),t("effect-timing",S||null),t("effect-direction",q||null),t("effect-iteration-count",c==null||c===""?null:String(c)),t("effect-fill-mode",L||null),t("variant",m&&m!=="default"?m:null),t("tone",a&&a!=="brand"?a:null),t("size",d&&d!=="md"&&d!=="2"?d:null),t("radius",A==null||A===""?null:String(A)),t("elevation",b&&b!=="low"?b:null),t("padding",K(g)),t("align",p&&p!=="start"?p:null)},[l,n,o,s,T,w,R,$,h,x,E,S,q,c,L,m,a,d,A,b,g,p]),f.default.createElement("ui-animated-text",{ref:_,...O},l==null?H:null)});M.displayName="AnimatedText";const N=M;exports.AnimatedText=N;exports.default=N;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react");require("@editora/ui-core/animated-text");const G=require("./_internals-C0zzLj8J.js"),I=e=>e&&e.__esModule?e:{default:e},f=I(k),J=typeof window<"u"?f.default.useLayoutEffect:f.default.useEffect;function K(e){if(e==null||e==="")return null;if(typeof e=="number")return`${e}px`;const l=e.split(/\s+/).filter(Boolean);return l.length?l.map(n=>/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n).join(" "):null}function y(e){return e==null||e===""?null:typeof e=="number"?`${e}ms`:/^-?\d+(\.\d+)?$/.test(e)?`${e}ms`:e}const M=f.default.forwardRef(function({text:l,effect:n,split:o,trigger:s,duration:T,stagger:w,delay:R,loop:$,loopDelay:h,paused:x,customEffect:E,effectTimingFunction:S,effectDirection:q,effectIterationCount:c,effectFillMode:L,variant:m,tone:a,size:d,radius:A,elevation:b,padding:g,align:p,children:H,...O},P){const _=f.default.useRef(null);return f.default.useImperativeHandle(P,()=>_.current),f.default.useEffect(()=>{G.warnIfElementNotRegistered("ui-animated-text","AnimatedText")},[]),J(()=>{const u=_.current;if(!u)return;const t=(r,i)=>{const B=u.getAttribute(r);if(i==null){B!=null&&u.removeAttribute(r);return}B!==i&&u.setAttribute(r,i)},j=(r,i)=>{i?u.hasAttribute(r)||u.setAttribute(r,""):u.hasAttribute(r)&&u.removeAttribute(r)};t("text",l!=null&&l!==""?l:null),t("effect",n&&n!=="fade-up"?n:null),t("split",o&&o!=="words"?o:null),t("trigger",s&&s!=="load"?s:null),t("duration",y(T)),t("stagger",y(w)),t("delay",y(R)),j("loop",$),t("loop-delay",y(h)),j("paused",x),t("custom-effect",E||null),t("effect-timing",S||null),t("effect-direction",q||null),t("effect-iteration-count",c==null||c===""?null:String(c)),t("effect-fill-mode",L||null),t("variant",m&&m!=="default"?m:null),t("tone",a&&a!=="brand"?a:null),t("size",d&&d!=="md"&&d!=="2"?d:null),t("radius",A==null||A===""?null:String(A)),t("elevation",b&&b!=="low"?b:null),t("padding",K(g)),t("align",p&&p!=="start"?p:null)},[l,n,o,s,T,w,R,$,h,x,E,S,q,c,L,m,a,d,A,b,g,p]),f.default.createElement("ui-animated-text",{ref:_,...O},l==null?H:null)});M.displayName="AnimatedText";const N=M;exports.AnimatedText=N;exports.default=N;
@@ -1,13 +1,11 @@
1
1
  'use client';
2
2
  import f from "react";
3
3
  import "@editora/ui-core/animated-text";
4
- import { w as I } from "./_internals-68620b0c.mjs";
4
+ import { w as I } from "./_internals-pNJ1oPIS.mjs";
5
5
  const J = typeof window < "u" ? f.useLayoutEffect : f.useEffect;
6
6
  function K(n) {
7
- if (n == null || n === "")
8
- return null;
9
- if (typeof n == "number")
10
- return `${n}px`;
7
+ if (n == null || n === "") return null;
8
+ if (typeof n == "number") return `${n}px`;
11
9
  const l = n.split(/\s+/).filter(Boolean);
12
10
  return l.length ? l.map((e) => /^-?\d+(\.\d+)?$/.test(e) ? `${e}px` : e).join(" ") : null;
13
11
  }
@@ -45,8 +43,7 @@ const g = f.forwardRef(function({
45
43
  I("ui-animated-text", "AnimatedText");
46
44
  }, []), J(() => {
47
45
  const u = w.current;
48
- if (!u)
49
- return;
46
+ if (!u) return;
50
47
  const t = (r, i) => {
51
48
  const H = u.getAttribute(r);
52
49
  if (i == null) {
@@ -3,8 +3,7 @@ import p from "react";
3
3
  import "@editora/ui-core/app-header";
4
4
  const y = "editora-ui-react-app-header-runtime-styles";
5
5
  function w() {
6
- if (typeof document > "u" || document.getElementById(y))
7
- return;
6
+ if (typeof document > "u" || document.getElementById(y)) return;
8
7
  const t = document.createElement("style");
9
8
  t.id = y, t.textContent = `
10
9
  ui-app-header [data-ui-app-header-start],
@@ -66,8 +65,7 @@ const x = p.forwardRef(function({
66
65
  w();
67
66
  }, []), p.useEffect(() => {
68
67
  const e = A.current;
69
- if (!e || !E)
70
- return;
68
+ if (!e || !E) return;
71
69
  const b = () => E();
72
70
  return e.addEventListener("menu-trigger", b), () => e.removeEventListener("menu-trigger", b);
73
71
  }, [E]), p.useLayoutEffect(() => {
@@ -2,8 +2,7 @@ import * as s from "react";
2
2
  import "@editora/ui-core/aspect-ratio";
3
3
  function b(t) {
4
4
  if (t != null) {
5
- if (typeof t == "string")
6
- return t;
5
+ if (typeof t == "string") return t;
7
6
  if (!(!Number.isFinite(t) || t <= 0))
8
7
  return Math.abs(t - 16 / 9) < 0.01 ? "16/9" : Math.abs(t - 4 / 3) < 0.01 ? "4/3" : Math.abs(t - 1) < 0.01 ? "1/1" : `${t}/1`;
9
8
  }
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const F=require("react");require("@editora/ui-core/avatar");const t=require("./_internals-a238f8ce.js");function I(n){if(n&&n.__esModule)return n;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(u,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return u.default=n,Object.freeze(u)}const s=I(F);function D(n){const u=n.trim().split(/\s+/).filter(Boolean);return u.length===0?"?":u.length===1?u[0].slice(0,2).toUpperCase():`${u[0][0]||""}${u[1][0]||""}`.toUpperCase()}function T(n){if(n!=null)return n==="lazy"||n==="eager"?n:n?"eager":"lazy"}function $(n,u,e){return n&&n.trim()?n.trim().slice(0,2).toUpperCase():u&&u.trim()?D(u):typeof e=="string"&&e.trim()?D(e):"?"}const N=s.forwardRef(function({src:u,alt:e,initials:i,size:y,bg:A,color:_,radius:S,fontWeight:p,shape:w,tone:c,variant:o,elevation:g,status:C,state:f,badge:O,ring:j,interactive:k,disabled:M,loading:R,onAvatarLoad:b,onAvatarError:a,children:B,...P},U){const d=t.useForwardedHostRef(U),z=s.useMemo(()=>$(i,e,B),[i,e,B]);s.useEffect(()=>{t.warnIfElementNotRegistered("ui-avatar","Avatar")},[]);const E=s.useCallback(r=>{const l=t.getCustomEventDetail(r);l&&(b==null||b(l))},[b]),q=s.useCallback(r=>{const l=t.getCustomEventDetail(r);l&&(a==null||a(l))},[a]);return t.useElementEventListeners(d,[{type:"avatar-load",listener:E},{type:"avatar-error",listener:q}],[E,q]),t.useElementAttributes(d,r=>{t.syncStringAttribute(r,"src",u??null),t.syncStringAttribute(r,"alt",e??null),t.syncStringAttribute(r,"initials",i??null),t.syncStringAttribute(r,"size",y!=null?String(y):null),t.syncStringAttribute(r,"bg",A??null),t.syncStringAttribute(r,"color",_??null),t.syncStringAttribute(r,"radius",S!=null?String(S):null),t.syncStringAttribute(r,"fontweight",p!=null?String(p):null),t.syncStringAttribute(r,"shape",w??null),t.syncStringAttribute(r,"tone",c&&c!=="neutral"?c:null),t.syncStringAttribute(r,"variant",o&&o!=="surface"?o:null),t.syncStringAttribute(r,"elevation",g&&g!=="low"?g:null),t.syncStringAttribute(r,"status",C??null),t.syncStringAttribute(r,"state",f&&f!=="idle"?f:null),t.syncStringAttribute(r,"badge",O??null),t.syncBooleanAttribute(r,"ring",j),t.syncBooleanAttribute(r,"interactive",k),t.syncBooleanAttribute(r,"disabled",M),t.syncStringAttribute(r,"loading",T(R)??null)},[u,e,i,y,A,_,S,p,w,c,o,g,C,f,O,j,k,M,R]),s.createElement("ui-avatar",{ref:d,...P},z)});N.displayName="Avatar";exports.Avatar=N;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=require("react");require("@editora/ui-core/avatar");const t=require("./_internals-C0zzLj8J.js");function F(n){if(n&&n.__esModule)return n;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(u,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return u.default=n,Object.freeze(u)}const s=F(z);function q(n){const u=n.trim().split(/\s+/).filter(Boolean);return u.length===0?"?":u.length===1?u[0].slice(0,2).toUpperCase():`${u[0][0]||""}${u[1][0]||""}`.toUpperCase()}function I(n){if(n!=null)return n==="lazy"||n==="eager"?n:n?"eager":"lazy"}function L(n,u,e){return n&&n.trim()?n.trim().slice(0,2).toUpperCase():u&&u.trim()?q(u):typeof e=="string"&&e.trim()?q(e):"?"}const D=s.forwardRef(function({src:u,alt:e,initials:i,size:f,bg:S,color:d,radius:b,fontWeight:y,shape:p,tone:c,variant:o,elevation:a,status:E,state:g,badge:_,ring:v,interactive:w,disabled:C,loading:O,onAvatarLoad:j,onAvatarError:k,children:M,...N},P){const A=t.useForwardedHostRef(P),U=s.useMemo(()=>L(i,e,M),[i,e,M]);s.useEffect(()=>{t.warnIfElementNotRegistered("ui-avatar","Avatar")},[]);const R=s.useCallback(r=>{const l=t.getCustomEventDetail(r);l&&j?.(l)},[j]),B=s.useCallback(r=>{const l=t.getCustomEventDetail(r);l&&k?.(l)},[k]);return t.useElementEventListeners(A,[{type:"avatar-load",listener:R},{type:"avatar-error",listener:B}],[R,B]),t.useElementAttributes(A,r=>{t.syncStringAttribute(r,"src",u??null),t.syncStringAttribute(r,"alt",e??null),t.syncStringAttribute(r,"initials",i??null),t.syncStringAttribute(r,"size",f!=null?String(f):null),t.syncStringAttribute(r,"bg",S??null),t.syncStringAttribute(r,"color",d??null),t.syncStringAttribute(r,"radius",b!=null?String(b):null),t.syncStringAttribute(r,"fontweight",y!=null?String(y):null),t.syncStringAttribute(r,"shape",p??null),t.syncStringAttribute(r,"tone",c&&c!=="neutral"?c:null),t.syncStringAttribute(r,"variant",o&&o!=="surface"?o:null),t.syncStringAttribute(r,"elevation",a&&a!=="low"?a:null),t.syncStringAttribute(r,"status",E??null),t.syncStringAttribute(r,"state",g&&g!=="idle"?g:null),t.syncStringAttribute(r,"badge",_??null),t.syncBooleanAttribute(r,"ring",v),t.syncBooleanAttribute(r,"interactive",w),t.syncBooleanAttribute(r,"disabled",C),t.syncStringAttribute(r,"loading",I(O)??null)},[u,e,i,f,S,d,b,y,p,c,o,a,E,g,_,v,w,C,O]),s.createElement("ui-avatar",{ref:A,...N},U)});D.displayName="Avatar";exports.Avatar=D;
@@ -1,66 +1,66 @@
1
1
  'use client';
2
- import * as n from "react";
2
+ import * as a from "react";
3
3
  import "@editora/ui-core/avatar";
4
- import { c as q, w as G, g as D, u as J, a as K, s as r, b as C } from "./_internals-68620b0c.mjs";
5
- function H(l) {
6
- const t = l.trim().split(/\s+/).filter(Boolean);
7
- return t.length === 0 ? "?" : t.length === 1 ? t[0].slice(0, 2).toUpperCase() : `${t[0][0] || ""}${t[1][0] || ""}`.toUpperCase();
4
+ import { c as M, w as h, g as $, u as j, a as q, s as t, b as y } from "./_internals-pNJ1oPIS.mjs";
5
+ function x(u) {
6
+ const l = u.trim().split(/\s+/).filter(Boolean);
7
+ return l.length === 0 ? "?" : l.length === 1 ? l[0].slice(0, 2).toUpperCase() : `${l[0][0] || ""}${l[1][0] || ""}`.toUpperCase();
8
8
  }
9
- function O(l) {
10
- if (l != null)
11
- return l === "lazy" || l === "eager" ? l : l ? "eager" : "lazy";
9
+ function G(u) {
10
+ if (u != null)
11
+ return u === "lazy" || u === "eager" ? u : u ? "eager" : "lazy";
12
12
  }
13
- function P(l, t, s) {
14
- return l && l.trim() ? l.trim().slice(0, 2).toUpperCase() : t && t.trim() ? H(t) : typeof s == "string" && s.trim() ? H(s) : "?";
13
+ function J(u, l, n) {
14
+ return u && u.trim() ? u.trim().slice(0, 2).toUpperCase() : l && l.trim() ? x(l) : typeof n == "string" && n.trim() ? x(n) : "?";
15
15
  }
16
- const Q = n.forwardRef(function({
17
- src: t,
18
- alt: s,
19
- initials: f,
20
- size: b,
21
- bg: k,
22
- color: R,
23
- radius: y,
16
+ const K = a.forwardRef(function({
17
+ src: l,
18
+ alt: n,
19
+ initials: o,
20
+ size: e,
21
+ bg: w,
22
+ color: E,
23
+ radius: g,
24
24
  fontWeight: d,
25
- shape: S,
26
- tone: c,
27
- variant: a,
28
- elevation: o,
29
- status: E,
25
+ shape: C,
26
+ tone: i,
27
+ variant: f,
28
+ elevation: c,
29
+ status: A,
30
30
  state: p,
31
- badge: U,
32
- ring: B,
33
- interactive: F,
34
- disabled: I,
35
- loading: N,
36
- onAvatarLoad: e,
37
- onAvatarError: g,
38
- children: $,
39
- ...M
40
- }, h) {
41
- const w = q(h), j = n.useMemo(() => P(f, s, $), [f, s, $]);
42
- n.useEffect(() => {
43
- G("ui-avatar", "Avatar");
31
+ badge: k,
32
+ ring: R,
33
+ interactive: S,
34
+ disabled: U,
35
+ loading: v,
36
+ onAvatarLoad: B,
37
+ onAvatarError: F,
38
+ children: I,
39
+ ...z
40
+ }, D) {
41
+ const b = M(D), H = a.useMemo(() => J(o, n, I), [o, n, I]);
42
+ a.useEffect(() => {
43
+ h("ui-avatar", "Avatar");
44
44
  }, []);
45
- const x = n.useCallback((u) => {
46
- const i = D(u);
47
- i && (e == null || e(i));
48
- }, [e]), z = n.useCallback((u) => {
49
- const i = D(u);
50
- i && (g == null || g(i));
51
- }, [g]);
52
- return J(
53
- w,
45
+ const L = a.useCallback((r) => {
46
+ const s = $(r);
47
+ s && B?.(s);
48
+ }, [B]), N = a.useCallback((r) => {
49
+ const s = $(r);
50
+ s && F?.(s);
51
+ }, [F]);
52
+ return j(
53
+ b,
54
54
  [
55
- { type: "avatar-load", listener: x },
56
- { type: "avatar-error", listener: z }
55
+ { type: "avatar-load", listener: L },
56
+ { type: "avatar-error", listener: N }
57
57
  ],
58
- [x, z]
59
- ), K(w, (u) => {
60
- r(u, "src", t ?? null), r(u, "alt", s ?? null), r(u, "initials", f ?? null), r(u, "size", b != null ? String(b) : null), r(u, "bg", k ?? null), r(u, "color", R ?? null), r(u, "radius", y != null ? String(y) : null), r(u, "fontweight", d != null ? String(d) : null), r(u, "shape", S ?? null), r(u, "tone", c && c !== "neutral" ? c : null), r(u, "variant", a && a !== "surface" ? a : null), r(u, "elevation", o && o !== "low" ? o : null), r(u, "status", E ?? null), r(u, "state", p && p !== "idle" ? p : null), r(u, "badge", U ?? null), C(u, "ring", B), C(u, "interactive", F), C(u, "disabled", I), r(u, "loading", O(N) ?? null);
61
- }, [t, s, f, b, k, R, y, d, S, c, a, o, E, p, U, B, F, I, N]), n.createElement("ui-avatar", { ref: w, ...M }, j);
58
+ [L, N]
59
+ ), q(b, (r) => {
60
+ t(r, "src", l ?? null), t(r, "alt", n ?? null), t(r, "initials", o ?? null), t(r, "size", e != null ? String(e) : null), t(r, "bg", w ?? null), t(r, "color", E ?? null), t(r, "radius", g != null ? String(g) : null), t(r, "fontweight", d != null ? String(d) : null), t(r, "shape", C ?? null), t(r, "tone", i && i !== "neutral" ? i : null), t(r, "variant", f && f !== "surface" ? f : null), t(r, "elevation", c && c !== "low" ? c : null), t(r, "status", A ?? null), t(r, "state", p && p !== "idle" ? p : null), t(r, "badge", k ?? null), y(r, "ring", R), y(r, "interactive", S), y(r, "disabled", U), t(r, "loading", G(v) ?? null);
61
+ }, [l, n, o, e, w, E, g, d, C, i, f, c, A, p, k, R, S, U, v]), a.createElement("ui-avatar", { ref: b, ...z }, H);
62
62
  });
63
- Q.displayName = "Avatar";
63
+ K.displayName = "Avatar";
64
64
  export {
65
- Q as Avatar
65
+ K as Avatar
66
66
  };
package/dist/Badge.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react");require("@editora/ui-core/badge");const t=require("./_internals-a238f8ce.js"),M=n=>n&&n.__esModule?n:{default:n},c=M(q);function x(n){const{text:d,tone:b,variant:r,size:i,radius:o,elevation:u,state:a,pill:y,dot:A,interactive:g,truncate:v,maxWidth:f,removable:m,autoRemove:S,iconOnly:B,disabled:_,onRemove:l,children:R,...h}=n,s=c.default.useRef(null),p=c.default.useCallback(e=>{const E=t.getCustomEventDetail(e);E&&(l==null||l(E))},[l]);return t.useElementEventListeners(s,[{type:"remove",listener:p}],[p]),t.useElementAttributes(s,e=>{t.syncStringAttribute(e,"text",d??null),t.syncStringAttribute(e,"tone",b??null),t.syncStringAttribute(e,"variant",r&&r!=="surface"?r:null),t.syncStringAttribute(e,"size",i&&i!=="md"&&i!=="2"?i:null),t.syncStringAttribute(e,"radius",o!=null?String(o):null),t.syncStringAttribute(e,"elevation",u&&u!=="none"?u:null),t.syncStringAttribute(e,"state",a&&a!=="idle"?a:null),t.syncBooleanAttribute(e,"pill",y),t.syncBooleanAttribute(e,"dot",A),t.syncBooleanAttribute(e,"interactive",g),t.syncBooleanAttribute(e,"truncate",v),t.syncStringAttribute(e,"max-width",f??null),t.syncBooleanAttribute(e,"removable",m),t.syncBooleanAttribute(e,"auto-remove",S),t.syncBooleanAttribute(e,"icon-only",B),t.syncBooleanAttribute(e,"disabled",_)},[d,b,r,i,o,u,a,y,A,g,v,f,m,S,B,_]),c.default.createElement("ui-badge",{ref:s,...h},R)}exports.Badge=x;exports.default=x;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const q=require("react");require("@editora/ui-core/badge");const t=require("./_internals-C0zzLj8J.js"),M=n=>n&&n.__esModule?n:{default:n},s=M(q);function E(n){const{text:c,tone:d,variant:r,size:i,radius:a,elevation:u,state:o,pill:b,dot:y,interactive:v,truncate:A,maxWidth:g,removable:m,autoRemove:f,iconOnly:S,disabled:B,onRemove:_,children:x,...h}=n,l=s.default.useRef(null),R=s.default.useCallback(e=>{const p=t.getCustomEventDetail(e);p&&_?.(p)},[_]);return t.useElementEventListeners(l,[{type:"remove",listener:R}],[R]),t.useElementAttributes(l,e=>{t.syncStringAttribute(e,"text",c??null),t.syncStringAttribute(e,"tone",d??null),t.syncStringAttribute(e,"variant",r&&r!=="surface"?r:null),t.syncStringAttribute(e,"size",i&&i!=="md"&&i!=="2"?i:null),t.syncStringAttribute(e,"radius",a!=null?String(a):null),t.syncStringAttribute(e,"elevation",u&&u!=="none"?u:null),t.syncStringAttribute(e,"state",o&&o!=="idle"?o:null),t.syncBooleanAttribute(e,"pill",b),t.syncBooleanAttribute(e,"dot",y),t.syncBooleanAttribute(e,"interactive",v),t.syncBooleanAttribute(e,"truncate",A),t.syncStringAttribute(e,"max-width",g??null),t.syncBooleanAttribute(e,"removable",m),t.syncBooleanAttribute(e,"auto-remove",f),t.syncBooleanAttribute(e,"icon-only",S),t.syncBooleanAttribute(e,"disabled",B)},[c,d,r,i,a,u,o,b,y,v,A,g,m,f,S,B]),s.default.createElement("ui-badge",{ref:l,...h},x)}exports.Badge=E;exports.default=E;
package/dist/Badge.esm.js CHANGED
@@ -1,35 +1,35 @@
1
1
  'use client';
2
- import d from "react";
2
+ import u from "react";
3
3
  import "@editora/ui-core/badge";
4
- import { g as S, u as _, a as k, s as e, b as n } from "./_internals-68620b0c.mjs";
4
+ import { g as S, u as _, a as k, s as e, b as n } from "./_internals-pNJ1oPIS.mjs";
5
5
  function L(z) {
6
6
  const {
7
- text: c,
7
+ text: d,
8
8
  tone: m,
9
9
  variant: i,
10
10
  size: a,
11
- radius: o,
12
- elevation: r,
13
- state: s,
14
- pill: v,
15
- dot: b,
16
- interactive: f,
17
- truncate: p,
18
- maxWidth: g,
19
- removable: x,
20
- autoRemove: y,
21
- iconOnly: E,
22
- disabled: h,
23
- onRemove: l,
11
+ radius: s,
12
+ elevation: o,
13
+ state: r,
14
+ pill: c,
15
+ dot: v,
16
+ interactive: b,
17
+ truncate: f,
18
+ maxWidth: p,
19
+ removable: g,
20
+ autoRemove: x,
21
+ iconOnly: y,
22
+ disabled: E,
23
+ onRemove: R,
24
24
  children: B,
25
25
  ...C
26
- } = z, u = d.useRef(null), A = d.useCallback((t) => {
27
- const R = S(t);
28
- R && (l == null || l(R));
29
- }, [l]);
30
- return _(u, [{ type: "remove", listener: A }], [A]), k(u, (t) => {
31
- e(t, "text", c ?? null), e(t, "tone", m ?? null), e(t, "variant", i && i !== "surface" ? i : null), e(t, "size", a && a !== "md" && a !== "2" ? a : null), e(t, "radius", o != null ? String(o) : null), e(t, "elevation", r && r !== "none" ? r : null), e(t, "state", s && s !== "idle" ? s : null), n(t, "pill", v), n(t, "dot", b), n(t, "interactive", f), n(t, "truncate", p), e(t, "max-width", g ?? null), n(t, "removable", x), n(t, "auto-remove", y), n(t, "icon-only", E), n(t, "disabled", h);
32
- }, [c, m, i, a, o, r, s, v, b, f, p, g, x, y, E, h]), d.createElement("ui-badge", { ref: u, ...C }, B);
26
+ } = z, l = u.useRef(null), h = u.useCallback((t) => {
27
+ const A = S(t);
28
+ A && R?.(A);
29
+ }, [R]);
30
+ return _(l, [{ type: "remove", listener: h }], [h]), k(l, (t) => {
31
+ e(t, "text", d ?? null), e(t, "tone", m ?? null), e(t, "variant", i && i !== "surface" ? i : null), e(t, "size", a && a !== "md" && a !== "2" ? a : null), e(t, "radius", s != null ? String(s) : null), e(t, "elevation", o && o !== "none" ? o : null), e(t, "state", r && r !== "idle" ? r : null), n(t, "pill", c), n(t, "dot", v), n(t, "interactive", b), n(t, "truncate", f), e(t, "max-width", p ?? null), n(t, "removable", g), n(t, "auto-remove", x), n(t, "icon-only", y), n(t, "disabled", E);
32
+ }, [d, m, i, a, s, o, r, c, v, b, f, p, g, x, y, E]), u.createElement("ui-badge", { ref: l, ...C }, B);
33
33
  }
34
34
  export {
35
35
  L as Badge,
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react");require("@editora/ui-core/block-controls");const S=require("./_internals-a238f8ce.js");function j(t){if(t&&t.__esModule)return t;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(u,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return u.default=t,Object.freeze(u)}const o=j(O),B=typeof window<"u"?o.useLayoutEffect:o.useEffect,y=o.forwardRef(function({children:u,orientation:r,variant:i,tone:n,state:f,elevation:l,size:s,radius:m,density:A,wrap:a,loop:d,disabled:v,activeIndex:b,ariaLabel:p,onNavigate:g,...k},_){const c=o.useRef(null);return o.useImperativeHandle(_,()=>c.current),o.useEffect(()=>{S.warnIfElementNotRegistered("ui-block-controls","BlockControls")},[]),o.useEffect(()=>{const e=c.current;if(!e||!g)return;const E=w=>g(w.detail);return e.addEventListener("ui-navigate",E),()=>e.removeEventListener("ui-navigate",E)},[g]),B(()=>{const e=c.current;e&&(r?e.setAttribute("orientation",r):e.removeAttribute("orientation"),i&&i!=="surface"&&i!=="floating"?e.setAttribute("variant",i):e.removeAttribute("variant"),n&&n!=="neutral"?e.setAttribute("tone",n):e.removeAttribute("tone"),f&&f!=="idle"?e.setAttribute("state",f):e.removeAttribute("state"),l&&l!=="low"&&l!=="md"?e.setAttribute("elevation",l):e.removeAttribute("elevation"),s&&s!=="md"&&s!=="2"?e.setAttribute("size",s):e.removeAttribute("size"),m!=null?e.setAttribute("radius",String(m)):e.removeAttribute("radius"),A?e.setAttribute("density",A):e.removeAttribute("density"),a==null?e.removeAttribute("wrap"):a?e.setAttribute("wrap",""):e.removeAttribute("wrap"),d==null?(e.removeAttribute("loop"),e.removeAttribute("no-loop")):d?(e.setAttribute("loop",""),e.removeAttribute("no-loop")):(e.removeAttribute("loop"),e.setAttribute("no-loop","")),v==null?e.removeAttribute("disabled"):v?e.setAttribute("disabled",""):e.removeAttribute("disabled"),typeof b=="number"&&Number.isFinite(b)?e.setAttribute("active-index",String(b)):e.removeAttribute("active-index"),p?e.setAttribute("aria-label",p):e.removeAttribute("aria-label"))},[r,i,n,f,l,s,m,A,a,d,v,b,p]),o.createElement("ui-block-controls",{ref:c,...k},u)});y.displayName="BlockControls";exports.BlockControls=y;exports.default=y;
2
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("react");require("@editora/ui-core/block-controls");const S=require("./_internals-C0zzLj8J.js");function j(t){if(t&&t.__esModule)return t;const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(u,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return u.default=t,Object.freeze(u)}const o=j(O),B=typeof window<"u"?o.useLayoutEffect:o.useEffect,y=o.forwardRef(function({children:u,orientation:r,variant:i,tone:n,state:f,elevation:l,size:s,radius:m,density:A,wrap:a,loop:d,disabled:v,activeIndex:b,ariaLabel:p,onNavigate:g,...k},_){const c=o.useRef(null);return o.useImperativeHandle(_,()=>c.current),o.useEffect(()=>{S.warnIfElementNotRegistered("ui-block-controls","BlockControls")},[]),o.useEffect(()=>{const e=c.current;if(!e||!g)return;const E=w=>g(w.detail);return e.addEventListener("ui-navigate",E),()=>e.removeEventListener("ui-navigate",E)},[g]),B(()=>{const e=c.current;e&&(r?e.setAttribute("orientation",r):e.removeAttribute("orientation"),i&&i!=="surface"&&i!=="floating"?e.setAttribute("variant",i):e.removeAttribute("variant"),n&&n!=="neutral"?e.setAttribute("tone",n):e.removeAttribute("tone"),f&&f!=="idle"?e.setAttribute("state",f):e.removeAttribute("state"),l&&l!=="low"&&l!=="md"?e.setAttribute("elevation",l):e.removeAttribute("elevation"),s&&s!=="md"&&s!=="2"?e.setAttribute("size",s):e.removeAttribute("size"),m!=null?e.setAttribute("radius",String(m)):e.removeAttribute("radius"),A?e.setAttribute("density",A):e.removeAttribute("density"),a==null?e.removeAttribute("wrap"):a?e.setAttribute("wrap",""):e.removeAttribute("wrap"),d==null?(e.removeAttribute("loop"),e.removeAttribute("no-loop")):d?(e.setAttribute("loop",""),e.removeAttribute("no-loop")):(e.removeAttribute("loop"),e.setAttribute("no-loop","")),v==null?e.removeAttribute("disabled"):v?e.setAttribute("disabled",""):e.removeAttribute("disabled"),typeof b=="number"&&Number.isFinite(b)?e.setAttribute("active-index",String(b)):e.removeAttribute("active-index"),p?e.setAttribute("aria-label",p):e.removeAttribute("aria-label"))},[r,i,n,f,l,s,m,A,a,d,v,b,p]),o.createElement("ui-block-controls",{ref:c,...k},u)});y.displayName="BlockControls";exports.BlockControls=y;exports.default=y;