@lobehub/ui 6.0.0-beta.1 → 6.0.0-beta.11

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 (1043) hide show
  1. package/README.md +6 -4
  2. package/es/Accordion/Accordion.mjs +3 -3
  3. package/es/Accordion/Accordion.mjs.map +1 -1
  4. package/es/Accordion/atoms.mjs +2 -2
  5. package/es/Accordion/atoms.mjs.map +1 -1
  6. package/es/Accordion/style.d.mts +1 -1
  7. package/es/ActionIcon/ActionIcon.mjs +2 -2
  8. package/es/ActionIcon/ActionIcon.mjs.map +1 -1
  9. package/es/ActionIcon/style.mjs +1 -1
  10. package/es/ActionIcon/style.mjs.map +1 -1
  11. package/es/ActionIcon/type.d.mts +1 -0
  12. package/es/Alert/Alert.mjs +5 -5
  13. package/es/Alert/Alert.mjs.map +1 -1
  14. package/es/Alert/type.d.mts +1 -0
  15. package/es/Anchor/Anchor.mjs +2 -2
  16. package/es/Anchor/Anchor.mjs.map +1 -1
  17. package/es/AutoComplete/AutoComplete.mjs +5 -5
  18. package/es/AutoComplete/AutoComplete.mjs.map +1 -1
  19. package/es/AutoComplete/style.d.mts +1 -0
  20. package/es/AutoComplete/style.mjs +2 -2
  21. package/es/AutoComplete/style.mjs.map +1 -1
  22. package/es/AutoComplete/type.d.mts +1 -0
  23. package/es/Avatar/Avatar.mjs +2 -2
  24. package/es/Avatar/Avatar.mjs.map +1 -1
  25. package/es/Avatar/AvatarGroup/index.mjs +2 -2
  26. package/es/Avatar/AvatarGroup/index.mjs.map +1 -1
  27. package/es/Breadcrumb/Breadcrumb.mjs +2 -2
  28. package/es/Breadcrumb/Breadcrumb.mjs.map +1 -1
  29. package/es/Button/Button.mjs +1 -1
  30. package/es/Button/Button.mjs.map +1 -1
  31. package/es/Button/style.d.mts +8 -1
  32. package/es/Button/style.mjs +41 -18
  33. package/es/Button/style.mjs.map +1 -1
  34. package/es/Button/type.d.mts +1 -0
  35. package/es/Carousel/Carousel.mjs +1 -1
  36. package/es/Carousel/Carousel.mjs.map +1 -1
  37. package/es/Checkbox/Checkbox.mjs +3 -3
  38. package/es/Checkbox/Checkbox.mjs.map +1 -1
  39. package/es/Checkbox/type.d.mts +1 -0
  40. package/es/CodeDiff/CodeDiff.mjs.map +1 -1
  41. package/es/CodeDiff/DiffPanel.mjs +6 -6
  42. package/es/CodeDiff/DiffPanel.mjs.map +1 -1
  43. package/es/CodeDiff/PatchDiff.mjs.map +1 -1
  44. package/es/CodeDiff/theme.mjs.map +1 -1
  45. package/es/CodeDiff/type.d.mts +2 -2
  46. package/es/CodeEditor/CodeEditor.mjs +5 -5
  47. package/es/CodeEditor/CodeEditor.mjs.map +1 -1
  48. package/es/ColorPicker/ColorInputs.mjs +136 -0
  49. package/es/ColorPicker/ColorInputs.mjs.map +1 -0
  50. package/es/ColorPicker/ColorPanel.mjs +145 -0
  51. package/es/ColorPicker/ColorPanel.mjs.map +1 -0
  52. package/es/ColorPicker/ColorPicker.mjs +63 -200
  53. package/es/ColorPicker/ColorPicker.mjs.map +1 -1
  54. package/es/ColorPicker/SaturationArea.mjs +2 -1
  55. package/es/ColorPicker/SaturationArea.mjs.map +1 -1
  56. package/es/ColorPicker/Swatch.mjs +24 -0
  57. package/es/ColorPicker/Swatch.mjs.map +1 -0
  58. package/es/ColorPicker/Swatches.mjs +66 -0
  59. package/es/ColorPicker/Swatches.mjs.map +1 -0
  60. package/es/ColorPicker/Trigger.mjs +112 -0
  61. package/es/ColorPicker/Trigger.mjs.map +1 -0
  62. package/es/ColorPicker/color.mjs +25 -1
  63. package/es/ColorPicker/color.mjs.map +1 -1
  64. package/es/ColorPicker/recent.mjs +25 -0
  65. package/es/ColorPicker/recent.mjs.map +1 -0
  66. package/es/ColorPicker/style.mjs +269 -70
  67. package/es/ColorPicker/style.mjs.map +1 -1
  68. package/es/ColorPicker/type.d.mts +15 -0
  69. package/es/ColorSwatches/ColorSwatches.mjs +18 -23
  70. package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
  71. package/es/ColorSwatches/CustomPicker.mjs +101 -0
  72. package/es/ColorSwatches/CustomPicker.mjs.map +1 -0
  73. package/es/ColorSwatches/index.d.mts +2 -2
  74. package/es/ColorSwatches/marker.stylex.mjs +9 -0
  75. package/es/ColorSwatches/marker.stylex.mjs.map +1 -0
  76. package/es/ColorSwatches/style.mjs +36 -0
  77. package/es/ColorSwatches/style.mjs.map +1 -1
  78. package/es/ColorSwatches/type.d.mts +12 -2
  79. package/es/ConfigProvider/cdnAssets.mjs +6 -0
  80. package/es/ConfigProvider/cdnAssets.mjs.map +1 -0
  81. package/es/ConfigProvider/index.mjs +2 -1
  82. package/es/ConfigProvider/index.mjs.map +1 -1
  83. package/es/ContextMenu/ContextMenuHost.mjs +2 -2
  84. package/es/ContextMenu/ContextMenuHost.mjs.map +1 -1
  85. package/es/ContextMenu/ContextMenuTrigger.mjs +2 -2
  86. package/es/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
  87. package/es/ContextMenu/renderItems.mjs +3 -3
  88. package/es/ContextMenu/renderItems.mjs.map +1 -1
  89. package/es/ContextMenu/store.d.mts +0 -1
  90. package/es/ContextMenu/store.mjs.map +1 -1
  91. package/es/DatePicker/DatePicker.d.mts +9 -2
  92. package/es/DatePicker/DatePicker.mjs +15 -85
  93. package/es/DatePicker/DatePicker.mjs.map +1 -1
  94. package/es/DatePicker/DateRangePicker.d.mts +3 -2
  95. package/es/DatePicker/DateRangePicker.mjs +3 -125
  96. package/es/DatePicker/DateRangePicker.mjs.map +1 -1
  97. package/es/DatePicker/DayjsDatePicker.d.mts +12 -0
  98. package/es/DatePicker/DayjsDatePicker.mjs +19 -0
  99. package/es/DatePicker/DayjsDatePicker.mjs.map +1 -0
  100. package/es/DatePicker/DayjsDateRangePicker.d.mts +7 -0
  101. package/es/DatePicker/DayjsDateRangePicker.mjs +8 -0
  102. package/es/DatePicker/DayjsDateRangePicker.mjs.map +1 -0
  103. package/es/DatePicker/PurePanel.mjs +65 -0
  104. package/es/DatePicker/PurePanel.mjs.map +1 -0
  105. package/es/DatePicker/RangePicker.mjs +121 -0
  106. package/es/DatePicker/RangePicker.mjs.map +1 -0
  107. package/es/DatePicker/SinglePicker.mjs +134 -0
  108. package/es/DatePicker/SinglePicker.mjs.map +1 -0
  109. package/es/DatePicker/core/PickerInput/Popup/Footer.mjs +57 -0
  110. package/es/DatePicker/core/PickerInput/Popup/Footer.mjs.map +1 -0
  111. package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs +57 -0
  112. package/es/DatePicker/core/PickerInput/Popup/PopupPanel.mjs.map +1 -0
  113. package/es/DatePicker/core/PickerInput/Popup/PresetPanel.mjs +29 -0
  114. package/es/DatePicker/core/PickerInput/Popup/PresetPanel.mjs.map +1 -0
  115. package/es/DatePicker/core/PickerInput/Popup/index.mjs +133 -0
  116. package/es/DatePicker/core/PickerInput/Popup/index.mjs.map +1 -0
  117. package/es/DatePicker/core/PickerInput/RangePicker.d.mts +51 -0
  118. package/es/DatePicker/core/PickerInput/RangePicker.mjs +343 -0
  119. package/es/DatePicker/core/PickerInput/RangePicker.mjs.map +1 -0
  120. package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs +27 -0
  121. package/es/DatePicker/core/PickerInput/Selector/ClearIcon.mjs.map +1 -0
  122. package/es/DatePicker/core/PickerInput/Selector/Icon.mjs +19 -0
  123. package/es/DatePicker/core/PickerInput/Selector/Icon.mjs.map +1 -0
  124. package/es/DatePicker/core/PickerInput/Selector/Input.mjs +237 -0
  125. package/es/DatePicker/core/PickerInput/Selector/Input.mjs.map +1 -0
  126. package/es/DatePicker/core/PickerInput/Selector/MaskFormat.mjs +70 -0
  127. package/es/DatePicker/core/PickerInput/Selector/MaskFormat.mjs.map +1 -0
  128. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.d.mts +8 -0
  129. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs +136 -0
  130. package/es/DatePicker/core/PickerInput/Selector/RangeSelector.mjs.map +1 -0
  131. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs +28 -0
  132. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/HoverSelector.mjs.map +1 -0
  133. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/MultipleDates.mjs +69 -0
  134. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/MultipleDates.mjs.map +1 -0
  135. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs +111 -0
  136. package/es/DatePicker/core/PickerInput/Selector/SingleSelector/index.mjs.map +1 -0
  137. package/es/DatePicker/core/PickerInput/Selector/hooks/useClearIcon.mjs +18 -0
  138. package/es/DatePicker/core/PickerInput/Selector/hooks/useClearIcon.mjs.map +1 -0
  139. package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs +108 -0
  140. package/es/DatePicker/core/PickerInput/Selector/hooks/useInputProps.mjs.map +1 -0
  141. package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs +11 -0
  142. package/es/DatePicker/core/PickerInput/Selector/hooks/useRootProps.mjs.map +1 -0
  143. package/es/DatePicker/core/PickerInput/Selector/util.mjs +20 -0
  144. package/es/DatePicker/core/PickerInput/Selector/util.mjs.map +1 -0
  145. package/es/DatePicker/core/PickerInput/SinglePicker.d.mts +55 -0
  146. package/es/DatePicker/core/PickerInput/SinglePicker.mjs +318 -0
  147. package/es/DatePicker/core/PickerInput/SinglePicker.mjs.map +1 -0
  148. package/es/DatePicker/core/PickerInput/context.mjs +7 -0
  149. package/es/DatePicker/core/PickerInput/context.mjs.map +1 -0
  150. package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs +30 -0
  151. package/es/DatePicker/core/PickerInput/hooks/useCellRender.mjs.map +1 -0
  152. package/es/DatePicker/core/PickerInput/hooks/useDelayState.mjs +37 -0
  153. package/es/DatePicker/core/PickerInput/hooks/useDelayState.mjs.map +1 -0
  154. package/es/DatePicker/core/PickerInput/hooks/useDisabledBoundary.mjs +18 -0
  155. package/es/DatePicker/core/PickerInput/hooks/useDisabledBoundary.mjs.map +1 -0
  156. package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs +20 -0
  157. package/es/DatePicker/core/PickerInput/hooks/useFieldFormat.mjs.map +1 -0
  158. package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs +31 -0
  159. package/es/DatePicker/core/PickerInput/hooks/useFieldsInvalidate.mjs.map +1 -0
  160. package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs +98 -0
  161. package/es/DatePicker/core/PickerInput/hooks/useFilledProps.mjs.map +1 -0
  162. package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs +41 -0
  163. package/es/DatePicker/core/PickerInput/hooks/useFocusEvents.mjs.map +1 -0
  164. package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs +34 -0
  165. package/es/DatePicker/core/PickerInput/hooks/useFocusLock.mjs.map +1 -0
  166. package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs +35 -0
  167. package/es/DatePicker/core/PickerInput/hooks/useHoverStore.mjs.map +1 -0
  168. package/es/DatePicker/core/PickerInput/hooks/useInputReadOnly.mjs +9 -0
  169. package/es/DatePicker/core/PickerInput/hooks/useInputReadOnly.mjs.map +1 -0
  170. package/es/DatePicker/core/PickerInput/hooks/useInvalidate.mjs +36 -0
  171. package/es/DatePicker/core/PickerInput/hooks/useInvalidate.mjs.map +1 -0
  172. package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs +27 -0
  173. package/es/DatePicker/core/PickerInput/hooks/useLockEffect.mjs.map +1 -0
  174. package/es/DatePicker/core/PickerInput/hooks/useOpen.mjs +18 -0
  175. package/es/DatePicker/core/PickerInput/hooks/useOpen.mjs.map +1 -0
  176. package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs +19 -0
  177. package/es/DatePicker/core/PickerInput/hooks/usePickerRef.mjs.map +1 -0
  178. package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs +20 -0
  179. package/es/DatePicker/core/PickerInput/hooks/usePresets.mjs.map +1 -0
  180. package/es/DatePicker/core/PickerInput/hooks/useRangeDisabledDate.mjs +24 -0
  181. package/es/DatePicker/core/PickerInput/hooks/useRangeDisabledDate.mjs.map +1 -0
  182. package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs +107 -0
  183. package/es/DatePicker/core/PickerInput/hooks/useRangePickerValue.mjs.map +1 -0
  184. package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs +144 -0
  185. package/es/DatePicker/core/PickerInput/hooks/useRangeValue.mjs.map +1 -0
  186. package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs +219 -0
  187. package/es/DatePicker/core/PickerInput/hooks/useRangeValueChange.mjs.map +1 -0
  188. package/es/DatePicker/core/PickerInput/hooks/useShowNow.mjs +11 -0
  189. package/es/DatePicker/core/PickerInput/hooks/useShowNow.mjs.map +1 -0
  190. package/es/DatePicker/core/PickerPanel/DatePanel/index.mjs +131 -0
  191. package/es/DatePicker/core/PickerPanel/DatePanel/index.mjs.map +1 -0
  192. package/es/DatePicker/core/PickerPanel/DateTimePanel/index.mjs +35 -0
  193. package/es/DatePicker/core/PickerPanel/DateTimePanel/index.mjs.map +1 -0
  194. package/es/DatePicker/core/PickerPanel/DecadePanel/index.mjs +84 -0
  195. package/es/DatePicker/core/PickerPanel/DecadePanel/index.mjs.map +1 -0
  196. package/es/DatePicker/core/PickerPanel/MonthPanel/index.mjs +73 -0
  197. package/es/DatePicker/core/PickerPanel/MonthPanel/index.mjs.map +1 -0
  198. package/es/DatePicker/core/PickerPanel/PanelBody.mjs +95 -0
  199. package/es/DatePicker/core/PickerPanel/PanelBody.mjs.map +1 -0
  200. package/es/DatePicker/core/PickerPanel/PanelHeader.mjs +130 -0
  201. package/es/DatePicker/core/PickerPanel/PanelHeader.mjs.map +1 -0
  202. package/es/DatePicker/core/PickerPanel/QuarterPanel/index.mjs +64 -0
  203. package/es/DatePicker/core/PickerPanel/QuarterPanel/index.mjs.map +1 -0
  204. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs +108 -0
  205. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/ClockDial.mjs.map +1 -0
  206. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/geometry.mjs +44 -0
  207. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/geometry.mjs.map +1 -0
  208. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs +157 -0
  209. package/es/DatePicker/core/PickerPanel/TimePanel/TimeClock/index.mjs.map +1 -0
  210. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs +100 -0
  211. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/TimeColumn.mjs.map +1 -0
  212. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs +71 -0
  213. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/index.mjs.map +1 -0
  214. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs +62 -0
  215. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useScrollTo.mjs.map +1 -0
  216. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs +200 -0
  217. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/useTimeState.mjs.map +1 -0
  218. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/util.mjs +25 -0
  219. package/es/DatePicker/core/PickerPanel/TimePanel/TimePanelBody/util.mjs.map +1 -0
  220. package/es/DatePicker/core/PickerPanel/TimePanel/index.mjs +31 -0
  221. package/es/DatePicker/core/PickerPanel/TimePanel/index.mjs.map +1 -0
  222. package/es/DatePicker/core/PickerPanel/WeekPanel/index.mjs +34 -0
  223. package/es/DatePicker/core/PickerPanel/WeekPanel/index.mjs.map +1 -0
  224. package/es/DatePicker/core/PickerPanel/YearPanel/index.mjs +92 -0
  225. package/es/DatePicker/core/PickerPanel/YearPanel/index.mjs.map +1 -0
  226. package/es/DatePicker/core/PickerPanel/context.mjs +48 -0
  227. package/es/DatePicker/core/PickerPanel/context.mjs.map +1 -0
  228. package/es/DatePicker/core/PickerPanel/index.d.mts +1 -0
  229. package/es/DatePicker/core/PickerPanel/index.mjs +175 -0
  230. package/es/DatePicker/core/PickerPanel/index.mjs.map +1 -0
  231. package/es/DatePicker/core/PickerPopup.mjs +118 -0
  232. package/es/DatePicker/core/PickerPopup.mjs.map +1 -0
  233. package/es/DatePicker/core/generate/dayjs.mjs +109 -0
  234. package/es/DatePicker/core/generate/dayjs.mjs.map +1 -0
  235. package/es/DatePicker/core/generate/index.d.mts +40 -0
  236. package/es/DatePicker/core/hooks/react.mjs +58 -0
  237. package/es/DatePicker/core/hooks/react.mjs.map +1 -0
  238. package/es/DatePicker/core/hooks/useLocale.mjs +51 -0
  239. package/es/DatePicker/core/hooks/useLocale.mjs.map +1 -0
  240. package/es/DatePicker/core/hooks/useSemantic.mjs +20 -0
  241. package/es/DatePicker/core/hooks/useSemantic.mjs.map +1 -0
  242. package/es/DatePicker/core/hooks/useSyncState.mjs +25 -0
  243. package/es/DatePicker/core/hooks/useSyncState.mjs.map +1 -0
  244. package/es/DatePicker/core/hooks/useTimeConfig.mjs +173 -0
  245. package/es/DatePicker/core/hooks/useTimeConfig.mjs.map +1 -0
  246. package/es/DatePicker/core/hooks/useTimeInfo.mjs +110 -0
  247. package/es/DatePicker/core/hooks/useTimeInfo.mjs.map +1 -0
  248. package/es/DatePicker/core/hooks/useToggleDates.mjs +21 -0
  249. package/es/DatePicker/core/hooks/useToggleDates.mjs.map +1 -0
  250. package/es/DatePicker/core/index.d.mts +5 -0
  251. package/es/DatePicker/core/index.mjs +9 -0
  252. package/es/DatePicker/core/index.mjs.map +1 -0
  253. package/es/DatePicker/core/interface.d.mts +325 -0
  254. package/es/DatePicker/core/locale/common.mjs +11 -0
  255. package/es/DatePicker/core/locale/common.mjs.map +1 -0
  256. package/es/DatePicker/core/locale/en_US.mjs +39 -0
  257. package/es/DatePicker/core/locale/en_US.mjs.map +1 -0
  258. package/es/DatePicker/core/utils/common.mjs +73 -0
  259. package/es/DatePicker/core/utils/common.mjs.map +1 -0
  260. package/es/DatePicker/core/utils/dateUtil.mjs +106 -0
  261. package/es/DatePicker/core/utils/dateUtil.mjs.map +1 -0
  262. package/es/DatePicker/core/utils/miscUtil.mjs +46 -0
  263. package/es/DatePicker/core/utils/miscUtil.mjs.map +1 -0
  264. package/es/DatePicker/core/utils/uiUtil.mjs +9 -0
  265. package/es/DatePicker/core/utils/uiUtil.mjs.map +1 -0
  266. package/es/DatePicker/dateGenerateConfig.mjs +52 -0
  267. package/es/DatePicker/dateGenerateConfig.mjs.map +1 -0
  268. package/es/DatePicker/generateConfig.mjs +12 -0
  269. package/es/DatePicker/generateConfig.mjs.map +1 -0
  270. package/es/DatePicker/generatePicker.d.mts +12 -0
  271. package/es/DatePicker/generatePicker.mjs +22 -0
  272. package/es/DatePicker/generatePicker.mjs.map +1 -0
  273. package/es/DatePicker/index.d.mts +8 -3
  274. package/es/DatePicker/index.mjs +5 -1
  275. package/es/DatePicker/legacyDate.mjs +58 -0
  276. package/es/DatePicker/legacyDate.mjs.map +1 -0
  277. package/es/DatePicker/locale.d.mts +15 -0
  278. package/es/DatePicker/locale.mjs +143 -0
  279. package/es/DatePicker/locale.mjs.map +1 -0
  280. package/es/DatePicker/semantic.mjs +29 -0
  281. package/es/DatePicker/semantic.mjs.map +1 -0
  282. package/es/DatePicker/style.mjs +3 -155
  283. package/es/DatePicker/style.mjs.map +1 -1
  284. package/es/DatePicker/type.d.mts +294 -27
  285. package/es/DatePicker/usePanelKeyboard.mjs +230 -0
  286. package/es/DatePicker/usePanelKeyboard.mjs.map +1 -0
  287. package/es/DatePicker/usePickerShared.mjs +106 -0
  288. package/es/DatePicker/usePickerShared.mjs.map +1 -0
  289. package/es/DatePicker/usePresetActive.mjs +49 -0
  290. package/es/DatePicker/usePresetActive.mjs.map +1 -0
  291. package/es/DraggablePanel/atoms.mjs +6 -6
  292. package/es/DraggablePanel/atoms.mjs.map +1 -1
  293. package/es/DraggableSideNav/DraggableSideNav.mjs +5 -5
  294. package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
  295. package/es/Drawer/Drawer.mjs +2 -2
  296. package/es/Drawer/Drawer.mjs.map +1 -1
  297. package/es/Drawer/atoms.d.mts +1 -0
  298. package/es/Drawer/atoms.mjs +7 -7
  299. package/es/Drawer/atoms.mjs.map +1 -1
  300. package/es/Drawer/constants.d.mts +1 -0
  301. package/es/Drawer/style.mjs.map +1 -1
  302. package/es/DropdownMenu/atoms.mjs +23 -23
  303. package/es/DropdownMenu/atoms.mjs.map +1 -1
  304. package/es/DropdownMenu/sharedStyle.mjs +2 -2
  305. package/es/DropdownMenu/sharedStyle.mjs.map +1 -1
  306. package/es/EditableText/ControlInput.mjs +42 -29
  307. package/es/EditableText/ControlInput.mjs.map +1 -1
  308. package/es/EditableText/EditableText.mjs +2 -2
  309. package/es/EditableText/EditableText.mjs.map +1 -1
  310. package/es/EditorSlashMenu/atoms.mjs +12 -12
  311. package/es/EditorSlashMenu/atoms.mjs.map +1 -1
  312. package/es/EmojiPicker/EmojiPicker.mjs +10 -16
  313. package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
  314. package/es/EmojiPicker/loadEmojiData.mjs +6 -0
  315. package/es/EmojiPicker/loadEmojiData.mjs.map +1 -0
  316. package/es/EmojiPicker/useEmojiMartI18n.mjs +37 -0
  317. package/es/EmojiPicker/useEmojiMartI18n.mjs.map +1 -0
  318. package/es/FileTypeIcon/type.d.mts +1 -0
  319. package/es/FloatingPanel/FloatingPanel.mjs +2 -2
  320. package/es/FloatingPanel/FloatingPanel.mjs.map +1 -1
  321. package/es/FloatingPanel/style.mjs +3 -2
  322. package/es/FloatingPanel/style.mjs.map +1 -1
  323. package/es/Form/Form.mjs +6 -2
  324. package/es/Form/Form.mjs.map +1 -1
  325. package/es/Form/style.mjs +3 -3
  326. package/es/Form/style.mjs.map +1 -1
  327. package/es/Form/type.d.mts +8 -0
  328. package/es/FormKit/List.mjs +2 -2
  329. package/es/FormKit/List.mjs.map +1 -1
  330. package/es/FormKit/engine/tanstack.mjs +1 -1
  331. package/es/FormKit/engine/tanstack.mjs.map +1 -1
  332. package/es/Grid/style.mjs +1 -1
  333. package/es/Grid/style.mjs.map +1 -1
  334. package/es/GroupAvatar/type.d.mts +1 -0
  335. package/es/Highlighter/FullFeatured.mjs +2 -2
  336. package/es/Highlighter/FullFeatured.mjs.map +1 -1
  337. package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs +2 -2
  338. package/es/Highlighter/SyntaxHighlighter/StreamRenderer.mjs.map +1 -1
  339. package/es/Highlighter/SyntaxHighlighter/index.mjs +4 -4
  340. package/es/Highlighter/SyntaxHighlighter/index.mjs.map +1 -1
  341. package/es/Highlighter/const.d.mts +1 -0
  342. package/es/Highlighter/style.mjs +2 -2
  343. package/es/Highlighter/style.mjs.map +1 -1
  344. package/es/HotkeyInput/HotkeyInput.mjs +1 -1
  345. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  346. package/es/HtmlPreview/HtmlPreview.mjs +2 -2
  347. package/es/HtmlPreview/HtmlPreview.mjs.map +1 -1
  348. package/es/Icon/Icon.mjs +2 -2
  349. package/es/Icon/Icon.mjs.map +1 -1
  350. package/es/Image/type.d.mts +1 -0
  351. package/es/Image/viewer/ImageViewer.mjs +2 -1
  352. package/es/Image/viewer/ImageViewer.mjs.map +1 -1
  353. package/es/Image/viewer/Toolbar.mjs +19 -6
  354. package/es/Image/viewer/Toolbar.mjs.map +1 -1
  355. package/es/Image/viewer/ViewerChrome.mjs.map +1 -1
  356. package/es/ImageSelect/ImageSelect.mjs +1 -1
  357. package/es/ImageSelect/ImageSelect.mjs.map +1 -1
  358. package/es/Input/Input.mjs +7 -5
  359. package/es/Input/Input.mjs.map +1 -1
  360. package/es/Input/TextArea.mjs +1 -1
  361. package/es/Input/TextArea.mjs.map +1 -1
  362. package/es/Input/style.d.mts +1 -0
  363. package/es/Input/style.mjs +3 -3
  364. package/es/Input/style.mjs.map +1 -1
  365. package/es/Input/type.d.mts +1 -0
  366. package/es/List/ListRow.mjs +3 -3
  367. package/es/List/ListRow.mjs.map +1 -1
  368. package/es/Markdown/Markdown.mjs +2 -2
  369. package/es/Markdown/Markdown.mjs.map +1 -1
  370. package/es/Markdown/Typography.mjs +2 -2
  371. package/es/Markdown/Typography.mjs.map +1 -1
  372. package/es/Markdown/plugins/remarkColor.d.mts +1 -0
  373. package/es/Markdown/plugins/remarkGfmPlus.d.mts +1 -0
  374. package/es/Markdown/plugins/remarkVideo.d.mts +1 -0
  375. package/es/Mermaid/FullFeatured.mjs +2 -2
  376. package/es/Mermaid/FullFeatured.mjs.map +1 -1
  377. package/es/Mermaid/SyntaxMermaid/index.mjs +4 -4
  378. package/es/Mermaid/SyntaxMermaid/index.mjs.map +1 -1
  379. package/es/Mermaid/const.d.mts +1 -0
  380. package/es/Modal/atoms.d.mts +1 -0
  381. package/es/Modal/atoms.mjs +8 -8
  382. package/es/Modal/atoms.mjs.map +1 -1
  383. package/es/Modal/constants.d.mts +1 -0
  384. package/es/Modal/type.d.mts +1 -0
  385. package/es/Pagination/Pagination.mjs +182 -42
  386. package/es/Pagination/Pagination.mjs.map +1 -1
  387. package/es/Pagination/helpers.mjs +3 -3
  388. package/es/Pagination/helpers.mjs.map +1 -1
  389. package/es/Pagination/index.d.mts +2 -2
  390. package/es/Pagination/marker.stylex.mjs +9 -0
  391. package/es/Pagination/marker.stylex.mjs.map +1 -0
  392. package/es/Pagination/style.mjs +74 -4
  393. package/es/Pagination/style.mjs.map +1 -1
  394. package/es/Pagination/type.d.mts +41 -3
  395. package/es/Popover/PopoverInGroup.mjs +3 -3
  396. package/es/Popover/PopoverInGroup.mjs.map +1 -1
  397. package/es/Popover/atoms.mjs +7 -7
  398. package/es/Popover/atoms.mjs.map +1 -1
  399. package/es/Popover/style.mjs +1 -1
  400. package/es/Popover/style.mjs.map +1 -1
  401. package/es/ProTable/ProTable.d.mts +11 -0
  402. package/es/ProTable/ProTable.mjs +208 -0
  403. package/es/ProTable/ProTable.mjs.map +1 -0
  404. package/es/ProTable/hooks/useColumnRequest.mjs +55 -0
  405. package/es/ProTable/hooks/useColumnRequest.mjs.map +1 -0
  406. package/es/ProTable/hooks/useColumnsState.mjs +37 -0
  407. package/es/ProTable/hooks/useColumnsState.mjs.map +1 -0
  408. package/es/ProTable/hooks/useDelayedFlag.mjs +18 -0
  409. package/es/ProTable/hooks/useDelayedFlag.mjs.map +1 -0
  410. package/es/ProTable/hooks/useDensity.mjs +15 -0
  411. package/es/ProTable/hooks/useDensity.mjs.map +1 -0
  412. package/es/ProTable/hooks/useFetchData.mjs +97 -0
  413. package/es/ProTable/hooks/useFetchData.mjs.map +1 -0
  414. package/es/ProTable/hooks/useFullscreen.mjs +22 -0
  415. package/es/ProTable/hooks/useFullscreen.mjs.map +1 -0
  416. package/es/ProTable/hooks/usePageInfo.mjs +35 -0
  417. package/es/ProTable/hooks/usePageInfo.mjs.map +1 -0
  418. package/es/ProTable/hooks/useProColumns.mjs +123 -0
  419. package/es/ProTable/hooks/useProColumns.mjs.map +1 -0
  420. package/es/ProTable/hooks/useProLoading.mjs +19 -0
  421. package/es/ProTable/hooks/useProLoading.mjs.map +1 -0
  422. package/es/ProTable/hooks/useProLocale.mjs +22 -0
  423. package/es/ProTable/hooks/useProLocale.mjs.map +1 -0
  424. package/es/ProTable/hooks/useProRequest.mjs +137 -0
  425. package/es/ProTable/hooks/useProRequest.mjs.map +1 -0
  426. package/es/ProTable/hooks/useRowCache.mjs +11 -0
  427. package/es/ProTable/hooks/useRowCache.mjs.map +1 -0
  428. package/es/ProTable/hooks/useSearchForm.mjs +141 -0
  429. package/es/ProTable/hooks/useSearchForm.mjs.map +1 -0
  430. package/es/ProTable/hooks/useTableBindings.mjs +39 -0
  431. package/es/ProTable/hooks/useTableBindings.mjs.map +1 -0
  432. package/es/ProTable/hooks/useTableSelection.mjs +14 -0
  433. package/es/ProTable/hooks/useTableSelection.mjs.map +1 -0
  434. package/es/ProTable/index.d.mts +4 -0
  435. package/es/ProTable/index.d.ts +1 -0
  436. package/es/ProTable/index.js +1 -0
  437. package/es/ProTable/index.mjs +3 -0
  438. package/es/ProTable/locale.d.mts +15 -0
  439. package/es/ProTable/locale.mjs +66 -0
  440. package/es/ProTable/locale.mjs.map +1 -0
  441. package/es/ProTable/parts/ColumnSetting.mjs +155 -0
  442. package/es/ProTable/parts/ColumnSetting.mjs.map +1 -0
  443. package/es/ProTable/parts/FieldControl.mjs +134 -0
  444. package/es/ProTable/parts/FieldControl.mjs.map +1 -0
  445. package/es/ProTable/parts/KeywordInput.mjs +19 -0
  446. package/es/ProTable/parts/KeywordInput.mjs.map +1 -0
  447. package/es/ProTable/parts/LightFilter.mjs +70 -0
  448. package/es/ProTable/parts/LightFilter.mjs.map +1 -0
  449. package/es/ProTable/parts/OptionPopover.mjs +17 -0
  450. package/es/ProTable/parts/OptionPopover.mjs.map +1 -0
  451. package/es/ProTable/parts/SearchForm.mjs +180 -0
  452. package/es/ProTable/parts/SearchForm.mjs.map +1 -0
  453. package/es/ProTable/parts/SearchSection.mjs +33 -0
  454. package/es/ProTable/parts/SearchSection.mjs.map +1 -0
  455. package/es/ProTable/parts/TableAlert.mjs +38 -0
  456. package/es/ProTable/parts/TableAlert.mjs.map +1 -0
  457. package/es/ProTable/parts/Toolbar.mjs +50 -0
  458. package/es/ProTable/parts/Toolbar.mjs.map +1 -0
  459. package/es/ProTable/parts/ToolbarOptions.mjs +103 -0
  460. package/es/ProTable/parts/ToolbarOptions.mjs.map +1 -0
  461. package/es/ProTable/parts/renderValue.mjs +118 -0
  462. package/es/ProTable/parts/renderValue.mjs.map +1 -0
  463. package/es/ProTable/style.mjs +287 -0
  464. package/es/ProTable/style.mjs.map +1 -0
  465. package/es/ProTable/type.d.mts +400 -0
  466. package/es/ProTable/utils.mjs +152 -0
  467. package/es/ProTable/utils.mjs.map +1 -0
  468. package/es/Radio/Radio.mjs +3 -3
  469. package/es/Radio/Radio.mjs.map +1 -1
  470. package/es/Radio/type.d.mts +1 -0
  471. package/es/Rate/Rate.mjs +1 -1
  472. package/es/Rate/Rate.mjs.map +1 -1
  473. package/es/ScrollArea/atoms.mjs +4 -4
  474. package/es/ScrollArea/atoms.mjs.map +1 -1
  475. package/es/ScrollShadow/ScrollShadow.mjs +1 -1
  476. package/es/ScrollShadow/ScrollShadow.mjs.map +1 -1
  477. package/es/SearchBar/SearchBar.mjs +31 -25
  478. package/es/SearchBar/SearchBar.mjs.map +1 -1
  479. package/es/Segmented/Segmented.mjs +4 -4
  480. package/es/Segmented/Segmented.mjs.map +1 -1
  481. package/es/Segmented/atoms.d.mts +1 -0
  482. package/es/Segmented/atoms.mjs +2 -2
  483. package/es/Segmented/atoms.mjs.map +1 -1
  484. package/es/Select/Select.mjs +22 -13
  485. package/es/Select/Select.mjs.map +1 -1
  486. package/es/Select/atoms.mjs +5 -5
  487. package/es/Select/atoms.mjs.map +1 -1
  488. package/es/Select/helpers.mjs +8 -1
  489. package/es/Select/helpers.mjs.map +1 -1
  490. package/es/Select/hooks.mjs +8 -4
  491. package/es/Select/hooks.mjs.map +1 -1
  492. package/es/Select/renderOptions.mjs +2 -2
  493. package/es/Select/renderOptions.mjs.map +1 -1
  494. package/es/Select/type.d.mts +7 -0
  495. package/es/Slider/type.d.mts +1 -0
  496. package/es/Switch/Switch.mjs +9 -2
  497. package/es/Switch/Switch.mjs.map +1 -1
  498. package/es/Switch/atoms.d.mts +8 -1
  499. package/es/Switch/atoms.mjs +23 -7
  500. package/es/Switch/atoms.mjs.map +1 -1
  501. package/es/Switch/style.mjs +33 -2
  502. package/es/Switch/style.mjs.map +1 -1
  503. package/es/Table/Column.d.mts +8 -0
  504. package/es/Table/Column.mjs +6 -0
  505. package/es/Table/Column.mjs.map +1 -0
  506. package/es/Table/ColumnGroup.d.mts +11 -0
  507. package/es/Table/ColumnGroup.mjs +6 -0
  508. package/es/Table/ColumnGroup.mjs.map +1 -0
  509. package/es/Table/Table.d.mts +16 -2
  510. package/es/Table/Table.mjs +158 -118
  511. package/es/Table/Table.mjs.map +1 -1
  512. package/es/Table/atoms/cells.d.mts +42 -0
  513. package/es/Table/atoms/cells.mjs +72 -0
  514. package/es/Table/atoms/cells.mjs.map +1 -0
  515. package/es/Table/atoms/index.d.mts +3 -0
  516. package/es/Table/atoms/layout.d.mts +44 -0
  517. package/es/Table/atoms/layout.mjs +62 -0
  518. package/es/Table/atoms/layout.mjs.map +1 -0
  519. package/es/Table/constants.mjs +16 -0
  520. package/es/Table/constants.mjs.map +1 -0
  521. package/es/Table/engine/fixed.d.mts +1 -0
  522. package/es/Table/engine/fixed.mjs +53 -0
  523. package/es/Table/engine/fixed.mjs.map +1 -0
  524. package/es/Table/engine/types.d.mts +1 -0
  525. package/es/Table/engine/useTableEngine.mjs +180 -0
  526. package/es/Table/engine/useTableEngine.mjs.map +1 -0
  527. package/es/Table/index.d.mts +7 -2
  528. package/es/Table/index.mjs +4 -1
  529. package/es/Table/internal.d.mts +3 -0
  530. package/es/Table/pipeline/columnUtils.d.mts +5 -0
  531. package/es/Table/pipeline/columnUtils.mjs +58 -0
  532. package/es/Table/pipeline/columnUtils.mjs.map +1 -0
  533. package/es/Table/pipeline/convertChildrenToColumns.mjs +24 -0
  534. package/es/Table/pipeline/convertChildrenToColumns.mjs.map +1 -0
  535. package/es/Table/pipeline/normalizeColumns.mjs +140 -0
  536. package/es/Table/pipeline/normalizeColumns.mjs.map +1 -0
  537. package/es/Table/pipeline/selectionUtils.d.mts +9 -0
  538. package/es/Table/pipeline/selectionUtils.mjs +115 -0
  539. package/es/Table/pipeline/selectionUtils.mjs.map +1 -0
  540. package/es/Table/pipeline/useBreakpoint.mjs +36 -0
  541. package/es/Table/pipeline/useBreakpoint.mjs.map +1 -0
  542. package/es/Table/pipeline/useExpandable.mjs +45 -0
  543. package/es/Table/pipeline/useExpandable.mjs.map +1 -0
  544. package/es/Table/pipeline/useFilter.mjs +52 -0
  545. package/es/Table/pipeline/useFilter.mjs.map +1 -0
  546. package/es/Table/pipeline/useSelection.mjs +302 -0
  547. package/es/Table/pipeline/useSelection.mjs.map +1 -0
  548. package/es/Table/pipeline/useSorter.mjs +146 -0
  549. package/es/Table/pipeline/useSorter.mjs.map +1 -0
  550. package/es/Table/pipeline/useTableLocale.mjs +30 -0
  551. package/es/Table/pipeline/useTableLocale.mjs.map +1 -0
  552. package/es/Table/pipeline/useTableState.mjs +118 -0
  553. package/es/Table/pipeline/useTableState.mjs.map +1 -0
  554. package/es/Table/pipeline/useVirtualLayout.mjs +80 -0
  555. package/es/Table/pipeline/useVirtualLayout.mjs.map +1 -0
  556. package/es/Table/render/Body.mjs +150 -0
  557. package/es/Table/render/Body.mjs.map +1 -0
  558. package/es/Table/render/BodyCell.mjs +87 -0
  559. package/es/Table/render/BodyCell.mjs.map +1 -0
  560. package/es/Table/render/CellShell.mjs +84 -0
  561. package/es/Table/render/CellShell.mjs.map +1 -0
  562. package/es/Table/render/ExpandIcon.mjs +28 -0
  563. package/es/Table/render/ExpandIcon.mjs.map +1 -0
  564. package/es/Table/render/FilterDropdown.mjs +139 -0
  565. package/es/Table/render/FilterDropdown.mjs.map +1 -0
  566. package/es/Table/render/FilterPanel.mjs +152 -0
  567. package/es/Table/render/FilterPanel.mjs.map +1 -0
  568. package/es/Table/render/FixedFrost.mjs +122 -0
  569. package/es/Table/render/FixedFrost.mjs.map +1 -0
  570. package/es/Table/render/FixedHolder.mjs +51 -0
  571. package/es/Table/render/FixedHolder.mjs.map +1 -0
  572. package/es/Table/render/Header.mjs +184 -0
  573. package/es/Table/render/Header.mjs.map +1 -0
  574. package/es/Table/render/LoadingSkeleton.mjs +78 -0
  575. package/es/Table/render/LoadingSkeleton.mjs.map +1 -0
  576. package/es/Table/render/PaginationBar.mjs +71 -0
  577. package/es/Table/render/PaginationBar.mjs.map +1 -0
  578. package/es/Table/render/SelectionCells.mjs +111 -0
  579. package/es/Table/render/SelectionCells.mjs.map +1 -0
  580. package/es/Table/render/StickyScrollBar.mjs +99 -0
  581. package/es/Table/render/StickyScrollBar.mjs.map +1 -0
  582. package/es/Table/render/Summary.d.mts +16 -0
  583. package/es/Table/render/Summary.mjs +58 -0
  584. package/es/Table/render/Summary.mjs.map +1 -0
  585. package/es/Table/render/TableView.mjs +215 -0
  586. package/es/Table/render/TableView.mjs.map +1 -0
  587. package/es/Table/render/VirtualBody.mjs +101 -0
  588. package/es/Table/render/VirtualBody.mjs.map +1 -0
  589. package/es/Table/render/context.mjs +15 -0
  590. package/es/Table/render/context.mjs.map +1 -0
  591. package/es/Table/render/filterUtils.mjs +22 -0
  592. package/es/Table/render/filterUtils.mjs.map +1 -0
  593. package/es/Table/render/tableHelpers.mjs +27 -0
  594. package/es/Table/render/tableHelpers.mjs.map +1 -0
  595. package/es/Table/render/useColGroups.mjs +23 -0
  596. package/es/Table/render/useColGroups.mjs.map +1 -0
  597. package/es/Table/render/useScrollSync.mjs +104 -0
  598. package/es/Table/render/useScrollSync.mjs.map +1 -0
  599. package/es/Table/render/useViewContexts.mjs +134 -0
  600. package/es/Table/render/useViewContexts.mjs.map +1 -0
  601. package/es/Table/semantic.mjs +45 -0
  602. package/es/Table/semantic.mjs.map +1 -0
  603. package/es/Table/store/createTableStore.d.mts +1 -0
  604. package/es/Table/store/createTableStore.mjs +40 -0
  605. package/es/Table/store/createTableStore.mjs.map +1 -0
  606. package/es/Table/store/hooks.mjs +24 -0
  607. package/es/Table/store/hooks.mjs.map +1 -0
  608. package/es/Table/style.mjs +179 -90
  609. package/es/Table/style.mjs.map +1 -1
  610. package/es/Table/type.d.mts +467 -37
  611. package/es/Table/useTableController.mjs +293 -0
  612. package/es/Table/useTableController.mjs.map +1 -0
  613. package/es/Tabs/Tabs.mjs +37 -23
  614. package/es/Tabs/Tabs.mjs.map +1 -1
  615. package/es/Tabs/atoms.mjs +2 -2
  616. package/es/Tabs/atoms.mjs.map +1 -1
  617. package/es/Tabs/style.d.mts +1 -1
  618. package/es/Tag/Tag.mjs +2 -2
  619. package/es/Tag/Tag.mjs.map +1 -1
  620. package/es/Text/Text.mjs +2 -2
  621. package/es/Text/Text.mjs.map +1 -1
  622. package/es/Text/style.d.mts +1 -0
  623. package/es/Text/style.mjs +3 -3
  624. package/es/Text/style.mjs.map +1 -1
  625. package/es/Toast/dodge.mjs +0 -1
  626. package/es/Toast/dodge.mjs.map +1 -1
  627. package/es/Toast/dodge.stylex.mjs +1 -4
  628. package/es/Toast/dodge.stylex.mjs.map +1 -1
  629. package/es/Toast/style.mjs +1 -1
  630. package/es/Toast/style.mjs.map +1 -1
  631. package/es/ToggleGroup/ToggleGroup.mjs +4 -4
  632. package/es/ToggleGroup/ToggleGroup.mjs.map +1 -1
  633. package/es/ToggleGroup/atoms.d.mts +1 -0
  634. package/es/ToggleGroup/atoms.mjs +2 -2
  635. package/es/ToggleGroup/atoms.mjs.map +1 -1
  636. package/es/Tooltip/TooltipGroup.mjs +3 -3
  637. package/es/Tooltip/TooltipGroup.mjs.map +1 -1
  638. package/es/Tooltip/TooltipInGroup.mjs +1 -1
  639. package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
  640. package/es/Tooltip/TooltipStandalone.mjs +4 -4
  641. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  642. package/es/Tooltip/style.mjs +2 -2
  643. package/es/Tooltip/style.mjs.map +1 -1
  644. package/es/Tree/Tree.mjs +3 -3
  645. package/es/Tree/Tree.mjs.map +1 -1
  646. package/es/Tree/TreeNode.mjs +2 -2
  647. package/es/Tree/TreeNode.mjs.map +1 -1
  648. package/es/Video/Video.mjs +46 -0
  649. package/es/Video/Video.mjs.map +1 -0
  650. package/es/Video/context.mjs +14 -0
  651. package/es/Video/context.mjs.map +1 -0
  652. package/es/Video/index.d.mts +23 -39
  653. package/es/Video/index.mjs +21 -111
  654. package/es/Video/index.mjs.map +1 -1
  655. package/es/Video/parts/Caption.d.mts +9 -0
  656. package/es/Video/parts/Caption.mjs +37 -0
  657. package/es/Video/parts/Caption.mjs.map +1 -0
  658. package/es/Video/parts/CenterPlay.d.mts +8 -0
  659. package/es/Video/parts/CenterPlay.mjs +34 -0
  660. package/es/Video/parts/CenterPlay.mjs.map +1 -0
  661. package/es/Video/parts/Controls.d.mts +9 -0
  662. package/es/Video/parts/Controls.mjs +128 -0
  663. package/es/Video/parts/Controls.mjs.map +1 -0
  664. package/es/Video/parts/Frame.d.mts +9 -0
  665. package/es/Video/parts/Frame.mjs +101 -0
  666. package/es/Video/parts/Frame.mjs.map +1 -0
  667. package/es/Video/parts/HoverPreview.mjs +93 -0
  668. package/es/Video/parts/HoverPreview.mjs.map +1 -0
  669. package/es/Video/parts/LoadError.d.mts +8 -0
  670. package/es/Video/parts/LoadError.mjs +47 -0
  671. package/es/Video/parts/LoadError.mjs.map +1 -0
  672. package/es/Video/parts/PlayPauseIcon.mjs +48 -0
  673. package/es/Video/parts/PlayPauseIcon.mjs.map +1 -0
  674. package/es/Video/parts/RateMenu.mjs +48 -0
  675. package/es/Video/parts/RateMenu.mjs.map +1 -0
  676. package/es/Video/parts/Root.d.mts +9 -0
  677. package/es/Video/parts/Root.mjs +110 -0
  678. package/es/Video/parts/Root.mjs.map +1 -0
  679. package/es/Video/parts/SectionList.d.mts +9 -0
  680. package/es/Video/parts/SectionList.mjs +32 -0
  681. package/es/Video/parts/SectionList.mjs.map +1 -0
  682. package/es/Video/parts/SectionMenu.mjs +63 -0
  683. package/es/Video/parts/SectionMenu.mjs.map +1 -0
  684. package/es/Video/parts/Timeline.d.mts +9 -0
  685. package/es/Video/parts/Timeline.mjs +169 -0
  686. package/es/Video/parts/Timeline.mjs.map +1 -0
  687. package/es/Video/store.mjs +241 -0
  688. package/es/Video/store.mjs.map +1 -0
  689. package/es/Video/style.mjs +393 -23
  690. package/es/Video/style.mjs.map +1 -1
  691. package/es/Video/time.mjs +60 -0
  692. package/es/Video/time.mjs.map +1 -0
  693. package/es/Video/type.d.mts +125 -0
  694. package/es/Video/useControlsIdle.mjs +39 -0
  695. package/es/Video/useControlsIdle.mjs.map +1 -0
  696. package/es/Video/useFullscreen.mjs +17 -0
  697. package/es/Video/useFullscreen.mjs.map +1 -0
  698. package/es/Video/useKeyboard.mjs +60 -0
  699. package/es/Video/useKeyboard.mjs.map +1 -0
  700. package/es/Video/useVideo.d.mts +9 -0
  701. package/es/Video/useVideo.mjs +17 -0
  702. package/es/Video/useVideo.mjs.map +1 -0
  703. package/es/awesome/Features/FeatureItem.mjs +2 -2
  704. package/es/awesome/Features/FeatureItem.mjs.map +1 -1
  705. package/es/awesome/Giscus/style.mjs +9 -9
  706. package/es/awesome/Giscus/style.mjs.map +1 -1
  707. package/es/awesome/Grainient/Grainient.d.mts +11 -0
  708. package/es/awesome/Grainient/Grainient.mjs +314 -0
  709. package/es/awesome/Grainient/Grainient.mjs.map +1 -0
  710. package/es/awesome/Grainient/index.d.mts +3 -0
  711. package/es/awesome/Grainient/style.mjs +23 -0
  712. package/es/awesome/Grainient/style.mjs.map +1 -0
  713. package/es/awesome/Grainient/type.d.mts +121 -0
  714. package/es/awesome/GridBackground/GridBackground.mjs +1 -1
  715. package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
  716. package/es/awesome/GridBackground/GridShowcase.mjs +4 -4
  717. package/es/awesome/GridBackground/GridShowcase.mjs.map +1 -1
  718. package/es/awesome/Hero/Hero.mjs +3 -3
  719. package/es/awesome/Hero/Hero.mjs.map +1 -1
  720. package/es/awesome/InstallBanner/InstallBanner.mjs +2 -2
  721. package/es/awesome/InstallBanner/InstallBanner.mjs.map +1 -1
  722. package/es/awesome/LandingHero/LandingHero.mjs +3 -3
  723. package/es/awesome/LandingHero/LandingHero.mjs.map +1 -1
  724. package/es/awesome/LogoMarquee/LogoMarquee.mjs +2 -2
  725. package/es/awesome/LogoMarquee/LogoMarquee.mjs.map +1 -1
  726. package/es/awesome/Spline/ParentSize.mjs +1 -1
  727. package/es/awesome/Spline/ParentSize.mjs.map +1 -1
  728. package/es/awesome/TypewriterEffect/TypewriterEffect.mjs +4 -4
  729. package/es/awesome/TypewriterEffect/TypewriterEffect.mjs.map +1 -1
  730. package/es/awesome/index.d.mts +4 -1
  731. package/es/awesome/index.mjs +2 -1
  732. package/es/awesome/landingActions.mjs +2 -2
  733. package/es/awesome/landingActions.mjs.map +1 -1
  734. package/es/chat/BackBottom/BackBottom.mjs +1 -1
  735. package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
  736. package/es/chat/BackBottom/type.d.mts +2 -2
  737. package/es/chat/ChatItem/ChatItem.mjs +2 -2
  738. package/es/chat/ChatItem/ChatItem.mjs.map +1 -1
  739. package/es/chat/EditableMessage/EditableMessage.mjs +4 -4
  740. package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
  741. package/es/chat/EditableMessageList/EditableMessageList.mjs +2 -2
  742. package/es/chat/EditableMessageList/EditableMessageList.mjs.map +1 -1
  743. package/es/chat/EditableMessageList/messageReducer.mjs +30 -23
  744. package/es/chat/EditableMessageList/messageReducer.mjs.map +1 -1
  745. package/es/chat/MessageInput/MessageInput.mjs +3 -3
  746. package/es/chat/MessageInput/MessageInput.mjs.map +1 -1
  747. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  748. package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
  749. package/es/chat/TokenTag/TokenTag.mjs +2 -3
  750. package/es/chat/TokenTag/TokenTag.mjs.map +1 -1
  751. package/es/color/index.d.mts +2 -1
  752. package/es/color/index.mjs +2 -1
  753. package/es/color/status/error.mjs +67 -0
  754. package/es/color/status/error.mjs.map +1 -0
  755. package/es/color/status/index.d.mts +11 -0
  756. package/es/color/status/index.mjs +15 -0
  757. package/es/color/status/index.mjs.map +1 -0
  758. package/es/color/status/info.mjs +67 -0
  759. package/es/color/status/info.mjs.map +1 -0
  760. package/es/color/status/success.mjs +67 -0
  761. package/es/color/status/success.mjs.map +1 -0
  762. package/es/color/status/warning.mjs +67 -0
  763. package/es/color/status/warning.mjs.map +1 -0
  764. package/es/color/types.d.mts +1 -0
  765. package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
  766. package/es/dashboard/AuthLayout/Aside.mjs +31 -0
  767. package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
  768. package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
  769. package/es/dashboard/AuthLayout/AuthLayout.mjs +97 -37
  770. package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
  771. package/es/dashboard/AuthLayout/index.d.mts +3 -2
  772. package/es/dashboard/AuthLayout/style.mjs +109 -1
  773. package/es/dashboard/AuthLayout/style.mjs.map +1 -1
  774. package/es/dashboard/AuthLayout/type.d.mts +38 -2
  775. package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
  776. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +33 -0
  777. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
  778. package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
  779. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
  780. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
  781. package/es/dashboard/AuthTools/index.d.mts +4 -0
  782. package/es/dashboard/AuthTools/style.mjs +27 -0
  783. package/es/dashboard/AuthTools/style.mjs.map +1 -0
  784. package/es/dashboard/AuthTools/type.d.mts +29 -0
  785. package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
  786. package/es/dashboard/ChartGrid/ChartGrid.mjs +19 -0
  787. package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
  788. package/es/dashboard/ChartGrid/index.d.mts +3 -0
  789. package/es/dashboard/ChartGrid/style.mjs +18 -0
  790. package/es/dashboard/ChartGrid/style.mjs.map +1 -0
  791. package/es/dashboard/ChartGrid/type.d.mts +8 -0
  792. package/es/dashboard/ConsoleNav/ConsoleNav.mjs +3 -3
  793. package/es/dashboard/ConsoleNav/ConsoleNav.mjs.map +1 -1
  794. package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
  795. package/es/dashboard/ConsoleNav/Skeleton.mjs +82 -0
  796. package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
  797. package/es/dashboard/ConsoleNav/index.d.mts +3 -2
  798. package/es/dashboard/ConsoleNav/style.mjs +20 -2
  799. package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
  800. package/es/dashboard/ConsoleNav/type.d.mts +13 -0
  801. package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
  802. package/es/dashboard/ConsoleShell/ConsoleShell.mjs +26 -6
  803. package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
  804. package/es/dashboard/ConsoleShell/style.mjs +11 -1
  805. package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
  806. package/es/dashboard/ConsoleShell/type.d.mts +11 -0
  807. package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
  808. package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
  809. package/es/dashboard/FilterSidebar/style.mjs +2 -2
  810. package/es/dashboard/FilterSidebar/style.mjs.map +1 -1
  811. package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
  812. package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
  813. package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
  814. package/es/dashboard/FilterStrip/index.d.mts +3 -0
  815. package/es/dashboard/FilterStrip/style.mjs +78 -0
  816. package/es/dashboard/FilterStrip/style.mjs.map +1 -0
  817. package/es/dashboard/FilterStrip/type.d.mts +25 -0
  818. package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
  819. package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
  820. package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
  821. package/es/dashboard/LabelWithKey/index.d.mts +3 -0
  822. package/es/dashboard/LabelWithKey/type.d.mts +11 -0
  823. package/es/dashboard/MetricStrip/MetricCell.mjs +92 -0
  824. package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
  825. package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
  826. package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
  827. package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
  828. package/es/dashboard/MetricStrip/index.d.mts +3 -0
  829. package/es/dashboard/MetricStrip/style.mjs +169 -0
  830. package/es/dashboard/MetricStrip/style.mjs.map +1 -0
  831. package/es/dashboard/MetricStrip/type.d.mts +38 -0
  832. package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
  833. package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
  834. package/es/dashboard/PageSkeleton/style.mjs +2 -1
  835. package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
  836. package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
  837. package/es/dashboard/PageToolbar/PageToolbar.mjs +22 -0
  838. package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
  839. package/es/dashboard/PageToolbar/index.d.mts +3 -0
  840. package/es/dashboard/PageToolbar/style.mjs +36 -0
  841. package/es/dashboard/PageToolbar/style.mjs.map +1 -0
  842. package/es/dashboard/PageToolbar/type.d.mts +11 -0
  843. package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
  844. package/es/dashboard/PanelSurface/PanelSurface.mjs +40 -0
  845. package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
  846. package/es/dashboard/PanelSurface/index.d.mts +3 -0
  847. package/es/dashboard/PanelSurface/style.mjs +25 -0
  848. package/es/dashboard/PanelSurface/style.mjs.map +1 -0
  849. package/es/dashboard/PanelSurface/type.d.mts +17 -0
  850. package/es/dashboard/Section/Section.d.mts +10 -0
  851. package/es/dashboard/Section/Section.mjs +81 -0
  852. package/es/dashboard/Section/Section.mjs.map +1 -0
  853. package/es/dashboard/Section/index.d.mts +3 -0
  854. package/es/dashboard/Section/style.mjs +31 -0
  855. package/es/dashboard/Section/style.mjs.map +1 -0
  856. package/es/dashboard/Section/type.d.mts +23 -0
  857. package/es/dashboard/StatCard/StatCard.d.mts +2 -1
  858. package/es/dashboard/StatCard/StatCard.mjs +29 -91
  859. package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
  860. package/es/dashboard/StatCard/type.d.mts +18 -5
  861. package/es/dashboard/Surface/Surface.d.mts +4 -3
  862. package/es/dashboard/Surface/Surface.mjs +90 -8
  863. package/es/dashboard/Surface/Surface.mjs.map +1 -1
  864. package/es/dashboard/Surface/index.d.mts +3 -2
  865. package/es/dashboard/Surface/link.d.mts +16 -0
  866. package/es/dashboard/Surface/link.mjs +40 -0
  867. package/es/dashboard/Surface/link.mjs.map +1 -0
  868. package/es/dashboard/Surface/marker.stylex.mjs +9 -0
  869. package/es/dashboard/Surface/marker.stylex.mjs.map +1 -0
  870. package/es/dashboard/Surface/style.d.mts +2 -0
  871. package/es/dashboard/Surface/style.mjs +156 -14
  872. package/es/dashboard/Surface/style.mjs.map +1 -1
  873. package/es/dashboard/Surface/type.d.mts +29 -1
  874. package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
  875. package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
  876. package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
  877. package/es/dashboard/TableIconActions/index.d.mts +3 -0
  878. package/es/dashboard/TableIconActions/type.d.mts +17 -0
  879. package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
  880. package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
  881. package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
  882. package/es/dashboard/TitleWithTips/index.d.mts +3 -0
  883. package/es/dashboard/TitleWithTips/type.d.mts +10 -0
  884. package/es/dashboard/index.d.mts +38 -4
  885. package/es/dashboard/index.mjs +18 -4
  886. package/es/eslint/noBaseUiSubpath.mjs +2 -1
  887. package/es/eslint/noBaseUiSubpath.mjs.map +1 -1
  888. package/es/hooks/useControlledState.mjs +20 -0
  889. package/es/hooks/useControlledState.mjs.map +1 -0
  890. package/es/hooks/useHighlight.mjs +2 -2
  891. package/es/hooks/useHighlight.mjs.map +1 -1
  892. package/es/hooks/useHover.mjs +22 -0
  893. package/es/hooks/useHover.mjs.map +1 -0
  894. package/es/hooks/useMarkdown/utils.d.mts +1 -0
  895. package/es/hooks/useScroll.d.mts +8 -0
  896. package/es/hooks/useScroll.mjs +33 -0
  897. package/es/hooks/useScroll.mjs.map +1 -0
  898. package/es/hooks/useSize.mjs +26 -0
  899. package/es/hooks/useSize.mjs.map +1 -0
  900. package/es/i18n/resources/en/colorPicker.d.mts +5 -0
  901. package/es/i18n/resources/en/colorPicker.mjs +5 -0
  902. package/es/i18n/resources/en/colorPicker.mjs.map +1 -1
  903. package/es/i18n/resources/en/datePicker.d.mts +54 -0
  904. package/es/i18n/resources/en/datePicker.mjs +55 -1
  905. package/es/i18n/resources/en/datePicker.mjs.map +1 -1
  906. package/es/i18n/resources/en/index.d.mts +4 -2
  907. package/es/i18n/resources/en/index.mjs +6 -2
  908. package/es/i18n/resources/en/index.mjs.map +1 -1
  909. package/es/i18n/resources/en/table.d.mts +23 -0
  910. package/es/i18n/resources/en/table.mjs +24 -0
  911. package/es/i18n/resources/en/table.mjs.map +1 -0
  912. package/es/i18n/resources/en/video.d.mts +23 -0
  913. package/es/i18n/resources/en/video.mjs +24 -0
  914. package/es/i18n/resources/en/video.mjs.map +1 -0
  915. package/es/i18n/resources/zhCn/colorPicker.d.mts +5 -0
  916. package/es/i18n/resources/zhCn/colorPicker.mjs +5 -0
  917. package/es/i18n/resources/zhCn/colorPicker.mjs.map +1 -1
  918. package/es/i18n/resources/zhCn/datePicker.d.mts +54 -0
  919. package/es/i18n/resources/zhCn/datePicker.mjs +55 -1
  920. package/es/i18n/resources/zhCn/datePicker.mjs.map +1 -1
  921. package/es/i18n/resources/zhCn/index.d.mts +4 -2
  922. package/es/i18n/resources/zhCn/index.mjs +7 -3
  923. package/es/i18n/resources/zhCn/index.mjs.map +1 -1
  924. package/es/i18n/resources/zhCn/table.d.mts +23 -0
  925. package/es/i18n/resources/zhCn/table.mjs +24 -0
  926. package/es/i18n/resources/zhCn/table.mjs.map +1 -0
  927. package/es/i18n/resources/zhCn/video.d.mts +23 -0
  928. package/es/i18n/resources/zhCn/video.mjs +24 -0
  929. package/es/i18n/resources/zhCn/video.mjs.map +1 -0
  930. package/es/i18n/types.d.mts +4 -1
  931. package/es/index.d.mts +21 -8
  932. package/es/index.mjs +18 -9
  933. package/es/internal/menu/itemInterface.d.mts +1 -0
  934. package/es/internal/menu/renderUtils.d.mts +1 -0
  935. package/es/internal/overflow/OverflowList.mjs +71 -0
  936. package/es/internal/overflow/OverflowList.mjs.map +1 -0
  937. package/es/internal/virtual/VirtualScrollArea.mjs +1 -1
  938. package/es/internal/virtual/VirtualScrollArea.mjs.map +1 -1
  939. package/es/mdx/Callout/index.mjs +2 -2
  940. package/es/mdx/Callout/index.mjs.map +1 -1
  941. package/es/mdx/Cards/Card.mjs +2 -2
  942. package/es/mdx/Cards/Card.mjs.map +1 -1
  943. package/es/mdx/Cards/index.mjs +2 -2
  944. package/es/mdx/Cards/index.mjs.map +1 -1
  945. package/es/mdx/Mdx/index.mjs +2 -2
  946. package/es/mdx/Mdx/index.mjs.map +1 -1
  947. package/es/mdx/Steps/index.mjs +2 -2
  948. package/es/mdx/Steps/index.mjs.map +1 -1
  949. package/es/mdx/mdxComponents/Pre.mjs +5 -5
  950. package/es/mdx/mdxComponents/Pre.mjs.map +1 -1
  951. package/es/mdx/mdxComponents/Video.d.mts +2 -1
  952. package/es/mdx/mdxComponents/Video.mjs +5 -3
  953. package/es/mdx/mdxComponents/Video.mjs.map +1 -1
  954. package/es/mobile/ChatInputArea/ChatInputArea.mjs +1 -1
  955. package/es/mobile/ChatInputArea/ChatInputArea.mjs.map +1 -1
  956. package/es/mobile/TabBar/TabBar.mjs +1 -1
  957. package/es/mobile/TabBar/TabBar.mjs.map +1 -1
  958. package/es/node_modules/.pnpm/@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.mts +2 -46
  959. package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.mts +1 -1
  960. package/es/node_modules/.pnpm/@types_estree@1.0.9/node_modules/@types/estree/index.d.mts +1 -4
  961. package/es/node_modules/.pnpm/@types_mdx@2.0.14/node_modules/@types/mdx/types.d.mts +1 -0
  962. package/es/node_modules/.pnpm/eslint@10.12.0_jiti@2.6.1_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.mts +2 -1
  963. package/es/storybook/StoryBook/style.mjs +2 -0
  964. package/es/storybook/StoryBook/style.mjs.map +1 -1
  965. package/es/style.css +3643 -996
  966. package/es/styles/createGlobalStyle.d.mts +1 -0
  967. package/es/styles/createGlobalStyle.mjs +1 -1
  968. package/es/styles/index.d.mts +4 -2
  969. package/es/styles/index.mjs +6 -4
  970. package/es/styles/stylex/cssVar.stylex.mjs +3 -0
  971. package/es/styles/stylex/cssVar.stylex.mjs.map +1 -1
  972. package/es/styles/stylex/props.mjs +2 -2
  973. package/es/styles/stylex/props.mjs.map +1 -1
  974. package/es/styles/theme/createLobeToken.d.mts +12 -7
  975. package/es/styles/theme/createLobeToken.mjs +3 -2
  976. package/es/styles/theme/createLobeToken.mjs.map +1 -1
  977. package/es/styles/theme/customPalette.d.mts +6 -0
  978. package/es/styles/theme/customPalette.mjs +28 -0
  979. package/es/styles/theme/customPalette.mjs.map +1 -0
  980. package/es/styles/theme/customPrimary.d.mts +7 -0
  981. package/es/styles/theme/customPrimary.mjs +101 -0
  982. package/es/styles/theme/customPrimary.mjs.map +1 -0
  983. package/es/styles/theme/generateColorPalette.d.mts +1 -0
  984. package/es/styles/theme/scope.d.mts +9 -5
  985. package/es/styles/theme/scope.mjs +73 -18
  986. package/es/styles/theme/scope.mjs.map +1 -1
  987. package/es/styles/theme/themeCss.d.mts +3 -0
  988. package/es/styles/theme/themeCss.mjs +39 -2
  989. package/es/styles/theme/themeCss.mjs.map +1 -1
  990. package/es/styles/theme/token/legacy.mjs +12 -12
  991. package/es/styles/theme/token/legacy.mjs.map +1 -1
  992. package/es/styles/theme/token/neutral.mjs +17 -9
  993. package/es/styles/theme/token/neutral.mjs.map +1 -1
  994. package/es/styles/theme/token/neutralText.mjs +91 -0
  995. package/es/styles/theme/token/neutralText.mjs.map +1 -0
  996. package/es/styles/theme/token/palette.mjs +16 -41
  997. package/es/styles/theme/token/palette.mjs.map +1 -1
  998. package/es/styles/theme/token/primary.mjs +6 -2
  999. package/es/styles/theme/token/primary.mjs.map +1 -1
  1000. package/es/styles/theme/token/static.mjs +3 -0
  1001. package/es/styles/theme/token/static.mjs.map +1 -1
  1002. package/es/theme.css +301 -290
  1003. package/es/types/customToken.d.mts +1 -0
  1004. package/es/utils/colorMath.mjs +52 -0
  1005. package/es/utils/colorMath.mjs.map +1 -0
  1006. package/es/utils/formatNumber.mjs +7 -0
  1007. package/es/utils/formatNumber.mjs.map +1 -0
  1008. package/es/utils/genCdnUrl.mjs +6 -3
  1009. package/es/utils/genCdnUrl.mjs.map +1 -1
  1010. package/es/utils/hashString.mjs +19 -0
  1011. package/es/utils/hashString.mjs.map +1 -0
  1012. package/es/utils/mergeRefs.mjs +20 -0
  1013. package/es/utils/mergeRefs.mjs.map +1 -0
  1014. package/es/utils/placement.d.mts +5 -5
  1015. package/es/utils/placement.mjs.map +1 -1
  1016. package/package.json +25 -46
  1017. package/es/DatePicker/CalendarPanel.mjs +0 -189
  1018. package/es/DatePicker/CalendarPanel.mjs.map +0 -1
  1019. package/es/DatePicker/PickerShell.mjs +0 -43
  1020. package/es/DatePicker/PickerShell.mjs.map +0 -1
  1021. package/es/DatePicker/calendar.d.mts +0 -4
  1022. package/es/DatePicker/calendar.mjs +0 -46
  1023. package/es/DatePicker/calendar.mjs.map +0 -1
  1024. package/es/Table/FilterMenu.mjs +0 -45
  1025. package/es/Table/FilterMenu.mjs.map +0 -1
  1026. package/es/Table/TableBody.mjs +0 -67
  1027. package/es/Table/TableBody.mjs.map +0 -1
  1028. package/es/Table/TableHead.mjs +0 -58
  1029. package/es/Table/TableHead.mjs.map +0 -1
  1030. package/es/Table/features.mjs +0 -12
  1031. package/es/Table/features.mjs.map +0 -1
  1032. package/es/Table/fixedOffsets.mjs +0 -29
  1033. package/es/Table/fixedOffsets.mjs.map +0 -1
  1034. package/es/Table/marker.stylex.mjs +0 -9
  1035. package/es/Table/marker.stylex.mjs.map +0 -1
  1036. package/es/Table/toColumnDefs.mjs +0 -26
  1037. package/es/Table/toColumnDefs.mjs.map +0 -1
  1038. package/es/Table/useTableState.mjs +0 -99
  1039. package/es/Table/useTableState.mjs.map +0 -1
  1040. package/es/Video/marker.stylex.mjs +0 -9
  1041. package/es/Video/marker.stylex.mjs.map +0 -1
  1042. package/es/dashboard/StatCard/style.mjs +0 -105
  1043. package/es/dashboard/StatCard/style.mjs.map +0 -1
@@ -4,24 +4,24 @@ import { useAppElement } from "../ConfigProvider/AppElementContext.mjs";
4
4
  import { styleProps } from "../styles/stylex/props.mjs";
5
5
  import { focusRing } from "../styles/stylex/focusRing.mjs";
6
6
  import { useNativeButton } from "../hooks/useNativeButton.mjs";
7
+ import { mergeRefs, useMergeRefs } from "../utils/mergeRefs.mjs";
7
8
  import { useLayerZIndex } from "../internal/zIndex/useLayerZIndex.mjs";
8
9
  import { drawerBackdropTransition, getDrawerMotionConfig, pushAxis } from "./constants.mjs";
9
10
  import { DrawerLayerProvider, useDrawerLayer } from "./DrawerLayerContext.mjs";
10
11
  import { styles } from "./style.mjs";
11
12
  import { cloneElement, createContext, createElement, isValidElement, use, useCallback, useEffect, useMemo, useRef, useState } from "react";
12
13
  import { jsx } from "react/jsx-runtime";
13
- import clsx from "clsx";
14
+ import clsx$1 from "clsx";
14
15
  import * as stylex from "@stylexjs/stylex";
15
16
  import { X } from "lucide-react";
16
17
  import { mergeProps } from "@base-ui/react/merge-props";
17
- import { mergeRefs, useMergeRefs } from "react-merge-refs";
18
18
  import { Dialog } from "@base-ui/react/dialog";
19
19
  import { AnimatePresence } from "motion/react";
20
20
  //#region src/Drawer/atoms.tsx
21
21
  const mergeStateClassName = (xstyle, className) => {
22
22
  const base = stylex.props(xstyle).className;
23
- if (typeof className === "function") return (state) => clsx(base, className(state));
24
- return clsx(base, className);
23
+ if (typeof className === "function") return (state) => clsx$1(base, className(state));
24
+ return clsx$1(base, className);
25
25
  };
26
26
  const popupPlacementClass = {
27
27
  bottom: styles.popupBottom,
@@ -114,7 +114,7 @@ const DrawerBackdrop = ({ className, style, ...rest }) => {
114
114
  const layerStyle = layer?.zIndex !== void 0 ? { zIndex: layer.zIndex } : void 0;
115
115
  if (open !== null) return /* @__PURE__ */ jsx(Dialog.Backdrop, {
116
116
  ...rest,
117
- className: clsx(stylex.props(styles.backdrop).className, className),
117
+ className: clsx$1(stylex.props(styles.backdrop).className, className),
118
118
  style: {
119
119
  ...layerStyle,
120
120
  ...style,
@@ -159,12 +159,12 @@ const DrawerPopupImpl = ({ className, children, placement: placementProp = "righ
159
159
  ...popupStyle
160
160
  };
161
161
  const popupXstyle = [styles.popup, popupPlacementClass[placement]];
162
- const resolvedPanelClassName = clsx(stylex.props(styles.panel, panelPlacementClass[placement], flush ? styles.panelFlush : panelRoundedClass[placement], panelXstyle).className, panelClassName);
162
+ const resolvedPanelClassName = clsx$1(stylex.props(styles.panel, panelPlacementClass[placement], flush ? styles.panelFlush : panelRoundedClass[placement], panelXstyle).className, panelClassName);
163
163
  if (open !== null && actions) {
164
164
  const motionConfig = getDrawerMotionConfig(placement, pushOffset);
165
165
  return /* @__PURE__ */ jsx(Dialog.Popup, {
166
166
  ...rest,
167
- className: clsx(stylex.props(popupXstyle).className, className),
167
+ className: clsx$1(stylex.props(popupXstyle).className, className),
168
168
  "data-drawer-anchor": placement,
169
169
  ref: composedRef,
170
170
  style: resolvedPopupStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.mjs","names":[],"sources":["../../src/Drawer/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Dialog } from '@base-ui/react/dialog';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\nimport { AnimatePresence } from 'motion/react';\nimport type React from 'react';\nimport {\n cloneElement,\n createContext,\n isValidElement,\n use,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { mergeRefs, useMergeRefs } from 'react-merge-refs';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { useMotionComponent } from '@/MotionProvider';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { drawerBackdropTransition, getDrawerMotionConfig, pushAxis } from './constants';\nimport { DrawerLayerProvider, useDrawerLayer } from './DrawerLayerContext';\nimport { styles } from './style';\nimport type { DrawerPlacement } from './type';\n\ntype XStyle = Parameters<typeof styleProps>[0];\n\nconst mergeStateClassName = <TState,>(\n xstyle: XStyle,\n className: string | ((state: TState) => string | undefined) | undefined,\n) => {\n const base = stylex.props(xstyle).className;\n if (typeof className === 'function') return (state: TState) => clsx(base, className(state));\n return clsx(base, className);\n};\n\nconst popupPlacementClass = {\n bottom: styles.popupBottom,\n left: styles.popupLeft,\n right: styles.popupRight,\n top: styles.popupTop,\n};\n\nconst panelPlacementClass = {\n bottom: styles.panelBottom,\n left: styles.panelLeft,\n right: styles.panelRight,\n top: styles.panelTop,\n};\n\nconst panelRoundedClass = {\n bottom: styles.panelRoundedBottom,\n left: styles.panelRoundedLeft,\n right: styles.panelRoundedRight,\n top: styles.panelRoundedTop,\n};\n\nconst DrawerOpenContext = createContext<boolean | null>(null);\n\ninterface DrawerAnimationActions {\n onExitComplete: () => void;\n}\nconst DrawerActionsContext = createContext<DrawerAnimationActions | null>(null);\n\nexport const useDrawerOpen = () => use(DrawerOpenContext);\nexport const useDrawerActions = () => use(DrawerActionsContext);\n\nexport type DrawerRootProps = Dialog.Root.Props & {\n onExitComplete?: () => void;\n zIndex?: number;\n};\n\nconst AnimatedDrawerRoot = ({\n open,\n children,\n onExitComplete: onExitCompleteProp,\n zIndex: explicitZIndex,\n ...rest\n}: Omit<DrawerRootProps, 'open'> & { open: boolean }) => {\n const [isPresent, setIsPresent] = useState(!!open);\n\n useEffect(() => {\n if (open) setIsPresent(true);\n }, [open]);\n\n const handleExitComplete = useCallback(() => {\n setIsPresent(false);\n onExitCompleteProp?.();\n }, [onExitCompleteProp]);\n\n const actions = useMemo(() => ({ onExitComplete: handleExitComplete }), [handleExitComplete]);\n\n const { zIndex, ref: popupRef } = useLayerZIndex<HTMLDivElement>('modal', explicitZIndex);\n const layer = useMemo(\n () => ({ popupRef: popupRef as (node: HTMLElement | null) => void, zIndex }),\n [zIndex, popupRef],\n );\n\n if (!isPresent) return null;\n\n return (\n <DrawerOpenContext value={open}>\n <DrawerActionsContext value={actions}>\n <DrawerLayerProvider value={layer}>\n <Dialog.Root modal open {...rest}>\n {children}\n </Dialog.Root>\n </DrawerLayerProvider>\n </DrawerActionsContext>\n </DrawerOpenContext>\n );\n};\n\nconst NonAnimatedDrawerRoot = ({ zIndex: explicitZIndex, children, ...rest }: DrawerRootProps) => {\n const { zIndex, ref: popupRef } = useLayerZIndex<HTMLDivElement>('modal', explicitZIndex);\n const layer = useMemo(\n () => ({ popupRef: popupRef as (node: HTMLElement | null) => void, zIndex }),\n [zIndex, popupRef],\n );\n\n return (\n <DrawerLayerProvider value={layer}>\n <Dialog.Root modal {...rest}>\n {children}\n </Dialog.Root>\n </DrawerLayerProvider>\n );\n};\n\nexport const DrawerRoot = ({ open, onExitComplete, ...rest }: DrawerRootProps) => {\n if (open !== undefined) {\n return <AnimatedDrawerRoot open={open} onExitComplete={onExitComplete} {...rest} />;\n }\n return <NonAnimatedDrawerRoot {...rest} />;\n};\n\nexport type DrawerPortalProps = React.ComponentProps<typeof Dialog.Portal> & {\n container?: HTMLElement | null;\n};\nexport const DrawerPortal = ({ container, ...rest }: DrawerPortalProps) => {\n const appElement = useAppElement();\n return <Dialog.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nexport type DrawerBackdropProps = React.ComponentProps<typeof Dialog.Backdrop>;\nexport const DrawerBackdrop = ({ className, style, ...rest }: DrawerBackdropProps) => {\n const open = useDrawerOpen();\n const layer = useDrawerLayer();\n const Motion = useMotionComponent();\n const layerStyle = layer?.zIndex !== undefined ? { zIndex: layer.zIndex } : undefined;\n\n if (open !== null) {\n return (\n <Dialog.Backdrop\n {...rest}\n className={clsx(stylex.props(styles.backdrop).className, className as string)}\n style={{ ...layerStyle, ...style, transition: 'none' }}\n render={\n <Motion.div\n animate={{ opacity: open ? 1 : 0 }}\n initial={{ opacity: 0 }}\n transition={drawerBackdropTransition}\n />\n }\n />\n );\n }\n\n return (\n <Dialog.Backdrop\n {...rest}\n className={mergeStateClassName(styles.backdrop, className as any) as any}\n style={{ ...layerStyle, ...style }}\n />\n );\n};\n\nexport type DrawerPopupProps = React.ComponentProps<typeof Dialog.Popup> & {\n flush?: boolean;\n height?: number | string;\n motionProps?: Record<string, any>;\n panelClassName?: string;\n panelStyle?: React.CSSProperties;\n placement?: DrawerPlacement;\n popupStyle?: React.CSSProperties;\n pushOffset?: number;\n width?: number | string;\n};\n\nexport const DrawerPopupImpl = ({\n className,\n children,\n placement: placementProp = 'right',\n width: widthProp,\n height: heightProp,\n flush,\n pushOffset = 0,\n motionProps,\n panelClassName,\n panelStyle,\n panelXstyle,\n popupStyle,\n ref: forwardedRef,\n ...rest\n}: DrawerPopupProps & { panelXstyle?: XStyle }) => {\n const open = useDrawerOpen();\n const actions = useDrawerActions();\n const layer = useDrawerLayer();\n const Motion = useMotionComponent();\n const composedRef = useMergeRefs([forwardedRef, layer?.popupRef]);\n\n // The exiting panel lives inside AnimatePresence and keeps the props it had while open,\n // but this popup re-renders with whatever the consumer passes now. Freezing the geometry\n // during exit keeps the two in sync — otherwise a placement change on close teleports the\n // popup to the new edge while the panel animates out along the old axis.\n const openGeometryRef = useRef({\n height: heightProp,\n placement: placementProp,\n width: widthProp,\n });\n if (open !== false) {\n openGeometryRef.current = { height: heightProp, placement: placementProp, width: widthProp };\n }\n const { height, placement, width } = openGeometryRef.current;\n\n const isHorizontal = placement === 'left' || placement === 'right';\n const sizeStyle: React.CSSProperties = isHorizontal ? { width } : { height };\n const resolvedPopupStyle: React.CSSProperties = {\n ...(layer?.zIndex === undefined ? undefined : { zIndex: layer.zIndex + 1 }),\n ...sizeStyle,\n ...popupStyle,\n };\n const popupXstyle = [styles.popup, popupPlacementClass[placement]];\n const resolvedPanelClassName = clsx(\n stylex.props(\n styles.panel,\n panelPlacementClass[placement],\n flush ? styles.panelFlush : panelRoundedClass[placement],\n panelXstyle,\n ).className,\n panelClassName,\n );\n\n if (open !== null && actions) {\n const motionConfig = getDrawerMotionConfig(placement, pushOffset);\n return (\n <Dialog.Popup\n {...rest}\n className={clsx(stylex.props(popupXstyle).className, className as string)}\n data-drawer-anchor={placement}\n ref={composedRef as any}\n style={resolvedPopupStyle}\n >\n <AnimatePresence onExitComplete={actions.onExitComplete}>\n {open ? (\n <Motion.div\n {...motionConfig}\n {...motionProps}\n className={resolvedPanelClassName}\n data-drawer-placement={placement}\n key=\"drawer-popup-panel\"\n style={{ transition: 'none', ...panelStyle }}\n >\n {children}\n </Motion.div>\n ) : null}\n </AnimatePresence>\n </Dialog.Popup>\n );\n }\n\n const { axis, sign } = pushAxis[placement];\n const pushVars = {\n [axis === 'x' ? '--drawer-push-x' : '--drawer-push-y']: `${pushOffset * sign}px`,\n } as React.CSSProperties;\n\n return (\n <Dialog.Popup\n {...rest}\n className={mergeStateClassName(popupXstyle, className as any) as any}\n data-drawer-anchor={placement}\n ref={composedRef as any}\n style={resolvedPopupStyle}\n >\n <div\n className={resolvedPanelClassName}\n data-drawer-placement={placement}\n style={{ ...pushVars, ...panelStyle }}\n >\n {children}\n </div>\n </Dialog.Popup>\n );\n};\n\nexport const DrawerPopup: React.FC<DrawerPopupProps> = DrawerPopupImpl;\n\nexport type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerHeader = ({ className, style, ...rest }: DrawerHeaderProps) => (\n <div {...rest} {...styleProps(styles.header, className, style)} />\n);\n\nexport type DrawerTitleProps = React.ComponentProps<typeof Dialog.Title>;\nexport const DrawerTitle = ({ className, ...rest }: DrawerTitleProps) => (\n <Dialog.Title {...rest} className={mergeStateClassName(styles.title, className as any) as any} />\n);\n\nexport type DrawerDescriptionProps = React.ComponentProps<typeof Dialog.Description>;\nexport const DrawerDescription: React.FC<DrawerDescriptionProps> = Dialog.Description;\n\nexport type DrawerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerContentImpl = ({\n className,\n style,\n xstyle,\n ...rest\n}: DrawerContentProps & { xstyle?: XStyle }) => (\n <div {...rest} {...styleProps([styles.content, xstyle], className, style)} />\n);\nexport const DrawerContent: React.FC<DrawerContentProps> = DrawerContentImpl;\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerFooter = ({ className, style, ...rest }: DrawerFooterProps) => (\n <div {...rest} {...styleProps(styles.footer, className, style)} />\n);\n\nexport type DrawerCloseProps = React.ComponentProps<typeof Dialog.Close>;\nexport const DrawerClose = ({ className, children, ...rest }: DrawerCloseProps) => (\n <Dialog.Close\n {...rest}\n className={mergeStateClassName([styles.close, focusRing.info], className as any) as any}\n >\n {children ?? <X size={16} />}\n </Dialog.Close>\n);\n\nexport type DrawerTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof Dialog.Trigger>,\n 'children' | 'render'\n> & {\n children?: React.ReactNode;\n nativeButton?: boolean;\n};\n\nexport const DrawerTrigger = ({\n children,\n className,\n nativeButton,\n ref: refProp,\n ...rest\n}: DrawerTriggerProps) => {\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n const renderer = (props: any) => {\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n return cloneElement(children as any, {\n ...mergedProps,\n ref: mergeRefs([(children as any).ref, (props as any).ref, refProp]),\n });\n };\n\n if (isValidElement(children)) {\n return (\n <Dialog.Trigger\n {...rest}\n className={className}\n nativeButton={resolvedNativeButton}\n render={renderer as any}\n />\n );\n }\n\n return (\n <Dialog.Trigger\n {...rest}\n className={className}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Dialog.Trigger>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,uBAAgC,QAAgB,cAA4E;CAChI,MAAM,OAAO,OAAO,MAAM,MAAM,CAAC,CAAC;CAClC,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkB,KAAK,MAAM,UAAU,KAAK,CAAC;CAC1F,OAAO,KAAK,MAAM,SAAS;AAC7B;AACA,MAAM,sBAAsB;CAC1B,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,OAAO,OAAO;CACd,KAAK,OAAO;AACd;AACA,MAAM,sBAAsB;CAC1B,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,OAAO,OAAO;CACd,KAAK,OAAO;AACd;AACA,MAAM,oBAAoB;CACxB,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,OAAO,OAAO;CACd,KAAK,OAAO;AACd;AACA,MAAM,oBAAoB,cAA8B,IAAI;AAI5D,MAAM,uBAAuB,cAA6C,IAAI;AAC9E,MAAa,sBAAsB,IAAI,iBAAiB;AACxD,MAAa,yBAAyB,IAAI,oBAAoB;AAK9D,MAAM,sBAA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GACnC,GAAG;GACH,KAAK,UAAU;IAAE,SAAiB;IAAM,MAAc;IAAK;GAAO,CAAC;EACrE,CAAC;CACH;CACA,IAAI,eAAe,QAAQ,GACzB,OAAO,oBAAC,OAAO,SAAR;EAAgB,GAAI;EAAiB;EAAW,cAAc;EAAsB,QAAQ;CAAkB,CAAA;CAEvH,OAAO,oBAAC,OAAO,SAAR;EAAgB,GAAI;EAAiB;EAAW,cAAc;EAAsB,KAAK;EAC3F;CACa,CAAA;AACpB"}
1
+ {"version":3,"file":"atoms.mjs","names":["clsx"],"sources":["../../src/Drawer/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Dialog } from '@base-ui/react/dialog';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport { X } from 'lucide-react';\nimport { AnimatePresence } from 'motion/react';\nimport type React from 'react';\nimport {\n cloneElement,\n createContext,\n isValidElement,\n use,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { useMotionComponent } from '@/MotionProvider';\nimport { focusRing } from '@/styles/stylex/focusRing';\nimport { styleProps } from '@/styles/stylex/props';\nimport { mergeRefs, useMergeRefs } from '@/utils/mergeRefs';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { drawerBackdropTransition, getDrawerMotionConfig, pushAxis } from './constants';\nimport { DrawerLayerProvider, useDrawerLayer } from './DrawerLayerContext';\nimport { styles } from './style';\nimport type { DrawerPlacement } from './type';\n\ntype XStyle = Parameters<typeof styleProps>[0];\n\nconst mergeStateClassName = <TState,>(\n xstyle: XStyle,\n className: string | ((state: TState) => string | undefined) | undefined,\n) => {\n const base = stylex.props(xstyle).className;\n if (typeof className === 'function') return (state: TState) => clsx(base, className(state));\n return clsx(base, className);\n};\n\nconst popupPlacementClass = {\n bottom: styles.popupBottom,\n left: styles.popupLeft,\n right: styles.popupRight,\n top: styles.popupTop,\n};\n\nconst panelPlacementClass = {\n bottom: styles.panelBottom,\n left: styles.panelLeft,\n right: styles.panelRight,\n top: styles.panelTop,\n};\n\nconst panelRoundedClass = {\n bottom: styles.panelRoundedBottom,\n left: styles.panelRoundedLeft,\n right: styles.panelRoundedRight,\n top: styles.panelRoundedTop,\n};\n\nconst DrawerOpenContext = createContext<boolean | null>(null);\n\ninterface DrawerAnimationActions {\n onExitComplete: () => void;\n}\nconst DrawerActionsContext = createContext<DrawerAnimationActions | null>(null);\n\nexport const useDrawerOpen = () => use(DrawerOpenContext);\nexport const useDrawerActions = () => use(DrawerActionsContext);\n\nexport type DrawerRootProps = Dialog.Root.Props & {\n onExitComplete?: () => void;\n zIndex?: number;\n};\n\nconst AnimatedDrawerRoot = ({\n open,\n children,\n onExitComplete: onExitCompleteProp,\n zIndex: explicitZIndex,\n ...rest\n}: Omit<DrawerRootProps, 'open'> & { open: boolean }) => {\n const [isPresent, setIsPresent] = useState(!!open);\n\n useEffect(() => {\n if (open) setIsPresent(true);\n }, [open]);\n\n const handleExitComplete = useCallback(() => {\n setIsPresent(false);\n onExitCompleteProp?.();\n }, [onExitCompleteProp]);\n\n const actions = useMemo(() => ({ onExitComplete: handleExitComplete }), [handleExitComplete]);\n\n const { zIndex, ref: popupRef } = useLayerZIndex<HTMLDivElement>('modal', explicitZIndex);\n const layer = useMemo(\n () => ({ popupRef: popupRef as (node: HTMLElement | null) => void, zIndex }),\n [zIndex, popupRef],\n );\n\n if (!isPresent) return null;\n\n return (\n <DrawerOpenContext value={open}>\n <DrawerActionsContext value={actions}>\n <DrawerLayerProvider value={layer}>\n <Dialog.Root modal open {...rest}>\n {children}\n </Dialog.Root>\n </DrawerLayerProvider>\n </DrawerActionsContext>\n </DrawerOpenContext>\n );\n};\n\nconst NonAnimatedDrawerRoot = ({ zIndex: explicitZIndex, children, ...rest }: DrawerRootProps) => {\n const { zIndex, ref: popupRef } = useLayerZIndex<HTMLDivElement>('modal', explicitZIndex);\n const layer = useMemo(\n () => ({ popupRef: popupRef as (node: HTMLElement | null) => void, zIndex }),\n [zIndex, popupRef],\n );\n\n return (\n <DrawerLayerProvider value={layer}>\n <Dialog.Root modal {...rest}>\n {children}\n </Dialog.Root>\n </DrawerLayerProvider>\n );\n};\n\nexport const DrawerRoot = ({ open, onExitComplete, ...rest }: DrawerRootProps) => {\n if (open !== undefined) {\n return <AnimatedDrawerRoot open={open} onExitComplete={onExitComplete} {...rest} />;\n }\n return <NonAnimatedDrawerRoot {...rest} />;\n};\n\nexport type DrawerPortalProps = React.ComponentProps<typeof Dialog.Portal> & {\n container?: HTMLElement | null;\n};\nexport const DrawerPortal = ({ container, ...rest }: DrawerPortalProps) => {\n const appElement = useAppElement();\n return <Dialog.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nexport type DrawerBackdropProps = React.ComponentProps<typeof Dialog.Backdrop>;\nexport const DrawerBackdrop = ({ className, style, ...rest }: DrawerBackdropProps) => {\n const open = useDrawerOpen();\n const layer = useDrawerLayer();\n const Motion = useMotionComponent();\n const layerStyle = layer?.zIndex !== undefined ? { zIndex: layer.zIndex } : undefined;\n\n if (open !== null) {\n return (\n <Dialog.Backdrop\n {...rest}\n className={clsx(stylex.props(styles.backdrop).className, className as string)}\n style={{ ...layerStyle, ...style, transition: 'none' }}\n render={\n <Motion.div\n animate={{ opacity: open ? 1 : 0 }}\n initial={{ opacity: 0 }}\n transition={drawerBackdropTransition}\n />\n }\n />\n );\n }\n\n return (\n <Dialog.Backdrop\n {...rest}\n className={mergeStateClassName(styles.backdrop, className as any) as any}\n style={{ ...layerStyle, ...style }}\n />\n );\n};\n\nexport type DrawerPopupProps = React.ComponentProps<typeof Dialog.Popup> & {\n flush?: boolean;\n height?: number | string;\n motionProps?: Record<string, any>;\n panelClassName?: string;\n panelStyle?: React.CSSProperties;\n placement?: DrawerPlacement;\n popupStyle?: React.CSSProperties;\n pushOffset?: number;\n width?: number | string;\n};\n\nexport const DrawerPopupImpl = ({\n className,\n children,\n placement: placementProp = 'right',\n width: widthProp,\n height: heightProp,\n flush,\n pushOffset = 0,\n motionProps,\n panelClassName,\n panelStyle,\n panelXstyle,\n popupStyle,\n ref: forwardedRef,\n ...rest\n}: DrawerPopupProps & { panelXstyle?: XStyle }) => {\n const open = useDrawerOpen();\n const actions = useDrawerActions();\n const layer = useDrawerLayer();\n const Motion = useMotionComponent();\n const composedRef = useMergeRefs([forwardedRef, layer?.popupRef]);\n\n // The exiting panel lives inside AnimatePresence and keeps the props it had while open,\n // but this popup re-renders with whatever the consumer passes now. Freezing the geometry\n // during exit keeps the two in sync — otherwise a placement change on close teleports the\n // popup to the new edge while the panel animates out along the old axis.\n const openGeometryRef = useRef({\n height: heightProp,\n placement: placementProp,\n width: widthProp,\n });\n if (open !== false) {\n openGeometryRef.current = { height: heightProp, placement: placementProp, width: widthProp };\n }\n const { height, placement, width } = openGeometryRef.current;\n\n const isHorizontal = placement === 'left' || placement === 'right';\n const sizeStyle: React.CSSProperties = isHorizontal ? { width } : { height };\n const resolvedPopupStyle: React.CSSProperties = {\n ...(layer?.zIndex === undefined ? undefined : { zIndex: layer.zIndex + 1 }),\n ...sizeStyle,\n ...popupStyle,\n };\n const popupXstyle = [styles.popup, popupPlacementClass[placement]];\n const resolvedPanelClassName = clsx(\n stylex.props(\n styles.panel,\n panelPlacementClass[placement],\n flush ? styles.panelFlush : panelRoundedClass[placement],\n panelXstyle,\n ).className,\n panelClassName,\n );\n\n if (open !== null && actions) {\n const motionConfig = getDrawerMotionConfig(placement, pushOffset);\n return (\n <Dialog.Popup\n {...rest}\n className={clsx(stylex.props(popupXstyle).className, className as string)}\n data-drawer-anchor={placement}\n ref={composedRef as any}\n style={resolvedPopupStyle}\n >\n <AnimatePresence onExitComplete={actions.onExitComplete}>\n {open ? (\n <Motion.div\n {...motionConfig}\n {...motionProps}\n className={resolvedPanelClassName}\n data-drawer-placement={placement}\n key=\"drawer-popup-panel\"\n style={{ transition: 'none', ...panelStyle }}\n >\n {children}\n </Motion.div>\n ) : null}\n </AnimatePresence>\n </Dialog.Popup>\n );\n }\n\n const { axis, sign } = pushAxis[placement];\n const pushVars = {\n [axis === 'x' ? '--drawer-push-x' : '--drawer-push-y']: `${pushOffset * sign}px`,\n } as React.CSSProperties;\n\n return (\n <Dialog.Popup\n {...rest}\n className={mergeStateClassName(popupXstyle, className as any) as any}\n data-drawer-anchor={placement}\n ref={composedRef as any}\n style={resolvedPopupStyle}\n >\n <div\n className={resolvedPanelClassName}\n data-drawer-placement={placement}\n style={{ ...pushVars, ...panelStyle }}\n >\n {children}\n </div>\n </Dialog.Popup>\n );\n};\n\nexport const DrawerPopup: React.FC<DrawerPopupProps> = DrawerPopupImpl;\n\nexport type DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerHeader = ({ className, style, ...rest }: DrawerHeaderProps) => (\n <div {...rest} {...styleProps(styles.header, className, style)} />\n);\n\nexport type DrawerTitleProps = React.ComponentProps<typeof Dialog.Title>;\nexport const DrawerTitle = ({ className, ...rest }: DrawerTitleProps) => (\n <Dialog.Title {...rest} className={mergeStateClassName(styles.title, className as any) as any} />\n);\n\nexport type DrawerDescriptionProps = React.ComponentProps<typeof Dialog.Description>;\nexport const DrawerDescription: React.FC<DrawerDescriptionProps> = Dialog.Description;\n\nexport type DrawerContentProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerContentImpl = ({\n className,\n style,\n xstyle,\n ...rest\n}: DrawerContentProps & { xstyle?: XStyle }) => (\n <div {...rest} {...styleProps([styles.content, xstyle], className, style)} />\n);\nexport const DrawerContent: React.FC<DrawerContentProps> = DrawerContentImpl;\n\nexport type DrawerFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n ref?: React.Ref<HTMLDivElement>;\n};\nexport const DrawerFooter = ({ className, style, ...rest }: DrawerFooterProps) => (\n <div {...rest} {...styleProps(styles.footer, className, style)} />\n);\n\nexport type DrawerCloseProps = React.ComponentProps<typeof Dialog.Close>;\nexport const DrawerClose = ({ className, children, ...rest }: DrawerCloseProps) => (\n <Dialog.Close\n {...rest}\n className={mergeStateClassName([styles.close, focusRing.info], className as any) as any}\n >\n {children ?? <X size={16} />}\n </Dialog.Close>\n);\n\nexport type DrawerTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof Dialog.Trigger>,\n 'children' | 'render'\n> & {\n children?: React.ReactNode;\n nativeButton?: boolean;\n};\n\nexport const DrawerTrigger = ({\n children,\n className,\n nativeButton,\n ref: refProp,\n ...rest\n}: DrawerTriggerProps) => {\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n const renderer = (props: any) => {\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n return cloneElement(children as any, {\n ...mergedProps,\n ref: mergeRefs([(children as any).ref, (props as any).ref, refProp]),\n });\n };\n\n if (isValidElement(children)) {\n return (\n <Dialog.Trigger\n {...rest}\n className={className}\n nativeButton={resolvedNativeButton}\n render={renderer as any}\n />\n );\n }\n\n return (\n <Dialog.Trigger\n {...rest}\n className={className}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Dialog.Trigger>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,uBAAgC,QAAgB,cAA4E;CAChI,MAAM,OAAO,OAAO,MAAM,MAAM,CAAC,CAAC;CAClC,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkBA,OAAK,MAAM,UAAU,KAAK,CAAC;CAC1F,OAAOA,OAAK,MAAM,SAAS;AAC7B;AACA,MAAM,sBAAsB;CAC1B,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,OAAO,OAAO;CACd,KAAK,OAA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AM,GAAK,CAAA;AACf,CAAA;AAKhB,MAAa,iBAAiB,EAC5B,UACA,WACA,cACA,KAAK,SACL,GAAG,WACqB;CACxB,MAAM,EACJ,8BACA,yBACE,gBAAgB;EAClB;EACA;CACF,CAAC;CACD,MAAM,YAAY,UAAe;EAC/B,MAAM,uBAAuB;GAC3B,IAAI,8BAA8B,OAAO;GAEzC,MAAM,EACJ,MACA,GAAG,cACD;GACJ,OAAO;EACT,EAAA,CAAG;EACH,MAAM,cAAc,WAAY,SAAiB,OAAO,aAAa;EACrE,OAAO,aAAa,UAAiB;GACnC,GAAG;GACH,KAAK,UAAU;IAAE,SAAiB;IAAM,MAAc;IAAK;GAAO,CAAC;EACrE,CAAC;CACH;CACA,IAAI,eAAe,QAAQ,GACzB,OAAO,oBAAC,OAAO,SAAR;EAAgB,GAAI;EAAiB;EAAW,cAAc;EAAsB,QAAQ;CAAkB,CAAA;CAEvH,OAAO,oBAAC,OAAO,SAAR;EAAgB,GAAI;EAAiB;EAAW,cAAc;EAAsB,KAAK;EAC3F;CACa,CAAA;AACpB"}
@@ -13,4 +13,5 @@ export declare const drawerBackdropTransition: {
13
13
  ease: CubicBezier;
14
14
  };
15
15
  //#endregion
16
+ export {};
16
17
  //# sourceMappingURL=constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../src/Drawer/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nconst softEase = 'cubic-bezier(0.32, 0.72, 0, 1)';\nconst startingOrEnding = ':is([data-starting-style], [data-ending-style])';\nconst pushTransform = 'translate(var(--drawer-push-x, 0), var(--drawer-push-y, 0))';\nconst edge = `var(--drawer-edge-width, 1px)`;\n\n/* antd's boxShadowDrawer{Left,Right,Up,Down} geometry and alphas, scaled against colorShadow's own\n alpha (opaque black in light, rgba(255,255,255,0.2) in dark). Direction styles set the cast sign\n and weight styles scale the alpha, so the two compose without a style per combination. */\nconst castShadow = (x: number, y: number, blur: number, spread: number, alpha: number) =>\n `calc(var(--drawer-cast-x, 0) * ${x}px) calc(var(--drawer-cast-y, 0) * ${y}px) ${blur}px ${spread}px color-mix(in srgb, var(--lobe-color-shadow, #000) calc(${alpha}% * var(--drawer-cast-alpha, 1)), transparent)`;\n\nconst panelShadow = `${castShadow(6, 6, 16, 0, 8)}, ${castShadow(3, 3, 6, -4, 12)}, ${castShadow(9, 9, 28, 8, 5)}`;\n\nexport const styles = stylex.create({\n backdrop: {\n inset: 0,\n transition: `opacity 180ms ${softEase}`,\n backgroundColor: cssVar.colorBgMask,\n opacity: { default: null, [startingOrEnding]: 0 },\n position: 'fixed',\n zIndex: 1200,\n },\n\n popup: {\n display: 'flex',\n pointerEvents: 'none',\n position: 'fixed',\n zIndex: 1201,\n /* Clamped here rather than on the panel, so an oversized size prop shrinks the box instead of\n detaching the panel from its anchored edge. */\n maxHeight: '100dvh',\n maxWidth: '100dvw',\n },\n\n popupLeft: {\n insetBlock: 0,\n insetInlineStart: 0,\n },\n\n popupRight: {\n insetBlock: 0,\n insetInlineEnd: 0,\n },\n\n popupTop: {\n insetInline: 0,\n insetBlockStart: 0,\n },\n\n popupBottom: {\n insetInline: 0,\n insetBlockEnd: 0,\n },\n\n panel: {\n flex: '1',\n overflow: 'hidden',\n transition: `transform 300ms ${softEase}`,\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: panelShadow,\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n pointerEvents: 'auto',\n position: 'relative',\n transform: pushTransform,\n minHeight: 0,\n minWidth: 0,\n },\n\n panelLeft: {\n '--drawer-cast-x': '1',\n 'borderInlineEndColor': cssVar.colorBorder,\n 'borderInlineEndStyle': 'solid',\n 'borderInlineEndWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateX(-100%)' },\n },\n\n panelRight: {\n '--drawer-cast-x': '-1',\n 'borderInlineStartColor': cssVar.colorBorder,\n 'borderInlineStartStyle': 'solid',\n 'borderInlineStartWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateX(100%)' },\n },\n\n panelTop: {\n '--drawer-cast-y': '1',\n 'borderBlockEndColor': cssVar.colorBorder,\n 'borderBlockEndStyle': 'solid',\n 'borderBlockEndWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateY(-100%)' },\n },\n\n panelBottom: {\n '--drawer-cast-y': '-1',\n 'borderBlockStartColor': cssVar.colorBorder,\n 'borderBlockStartStyle': 'solid',\n 'borderBlockStartWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateY(100%)' },\n },\n\n panelRoundedLeft: {\n borderEndEndRadius: 12,\n borderStartEndRadius: 12,\n },\n\n panelRoundedRight: {\n borderEndStartRadius: 12,\n borderStartStartRadius: 12,\n },\n\n panelRoundedTop: {\n borderEndEndRadius: 12,\n borderEndStartRadius: 12,\n },\n\n panelRoundedBottom: {\n borderStartEndRadius: 12,\n borderStartStartRadius: 12,\n },\n\n panelFlush: {\n '--drawer-cast-alpha': '0',\n '--drawer-edge-width': '0',\n },\n\n panelBoosted: {\n '--drawer-cast-alpha': '1.75',\n },\n\n panelRecessed: {\n '--drawer-cast-alpha': '0.5',\n },\n\n header: {\n flex: 'none',\n gap: 8,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockEndColor: cssVar.colorSplit,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n display: 'flex',\n justifyContent: 'space-between',\n minHeight: 56,\n },\n\n containerInner: {\n flex: '1',\n gap: 8,\n marginInline: 'auto',\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n },\n\n containerInnerFooter: {\n justifyContent: 'flex-end',\n },\n\n title: {\n margin: 0,\n color: cssVar.colorText,\n fontSize: 17,\n fontWeight: 600,\n letterSpacing: '-0.005em',\n lineHeight: 1.4,\n },\n\n extra: {\n flex: 'none',\n gap: 4,\n alignItems: 'center',\n display: 'flex',\n marginInlineEnd: -4,\n },\n\n extraFloating: {\n insetBlockStart: 12,\n insetInlineEnd: 12,\n marginInlineEnd: 0,\n position: 'absolute',\n zIndex: 1,\n },\n\n close: {\n 'padding': 0,\n 'borderColor': 'currentcolor',\n 'borderRadius': 8,\n 'borderStyle': 'none',\n 'borderWidth': 'medium',\n 'transition': `color 160ms ${softEase}, background 160ms ${softEase}, transform 160ms ${softEase}`,\n 'alignItems': 'center',\n 'backgroundColor': { default: 'transparent', ':hover': cssVar.colorFillSecondary },\n 'color': { default: cssVar.colorTextTertiary, ':hover': cssVar.colorText },\n 'cursor': 'pointer',\n 'display': 'flex',\n 'justifyContent': 'center',\n 'position': 'relative',\n 'transform': {\n default: null,\n ':hover:not(:active)': 'scale(1.04)',\n ':active': 'scale(0.96)',\n },\n 'height': 32,\n 'width': 32,\n '::after': {\n inset: -4,\n content: '\"\"',\n position: 'absolute',\n },\n },\n\n content: {\n flex: '1',\n display: 'flex',\n minHeight: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n bodyContent: {\n marginInline: 'auto',\n paddingBlock: 12,\n paddingInline: 16,\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n width: '100%',\n },\n\n contentSidebar: {\n overflowX: 'hidden',\n overflowY: 'hidden',\n },\n\n bodyContentSidebar: {\n paddingBlock: 0,\n paddingInline: 0,\n flexDirection: 'row',\n height: '100%',\n minHeight: 0,\n },\n\n sidebar: {\n flex: 'none',\n paddingBlock: 12,\n paddingInline: 16,\n backgroundColor: cssVar.colorBgLayout,\n borderInlineEndColor: cssVar.colorBorderSecondary,\n borderInlineEndStyle: 'solid',\n borderInlineEndWidth: 1,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n sidebarContent: {\n flex: '1',\n paddingBlock: 12,\n paddingInline: 16,\n minWidth: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n footer: {\n flex: 'none',\n gap: 8,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockStartColor: cssVar.colorSplit,\n borderBlockStartStyle: 'solid',\n borderBlockStartWidth: 1,\n display: 'flex',\n justifyContent: 'flex-end',\n },\n});\n"],"mappings":";AAWA,MAAM,cAAc,GAAW,GAAW,MAAc,QAAgB,UAAkB,kCAAkC,EAAE,qCAAqC,EAAE,MAAM,KAAK,KAAK,OAAO,4DAA4D,MAAM;AAC1O,GAAG,WAAW,GAAG,GAAG,IAAI,GAAG,CAAC,IAAM,WAAW,GAAG,GAAG,GAAG,IAAI,EAAE,IAAM,WAAW,GAAG,GAAG,IAAI,GAAG,CAAC;AAC/G,MAAa,SAAS;CACpB,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,OAAO;EACL,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,WAAW;EACT,mBAAmB;EACnB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,YAAY;EACV,mBAAmB;EACnB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,UAAU;EACR,mBAAmB;EACnB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO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QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,oBAAoB;EAClB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../src/Drawer/style.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\n\nimport { cssVar } from '@/styles/stylex/cssVar.stylex';\n\nconst softEase = 'cubic-bezier(0.32, 0.72, 0, 1)';\nconst startingOrEnding = ':is([data-starting-style], [data-ending-style])';\nconst pushTransform = 'translate(var(--drawer-push-x, 0), var(--drawer-push-y, 0))';\nconst edge = `var(--drawer-edge-width, 1px)`;\n\n/* antd's boxShadowDrawer{Left,Right,Up,Down} geometry and alphas, mixed against colorShadow.\n Direction styles set the cast sign and weight styles scale the alpha, so the two compose without\n a style per combination. */\nconst castShadow = (x: number, y: number, blur: number, spread: number, alpha: number) =>\n `calc(var(--drawer-cast-x, 0) * ${x}px) calc(var(--drawer-cast-y, 0) * ${y}px) ${blur}px ${spread}px color-mix(in srgb, var(--lobe-color-shadow, #000) calc(${alpha}% * var(--drawer-cast-alpha, 1)), transparent)`;\n\nconst panelShadow = `${castShadow(6, 6, 16, 0, 8)}, ${castShadow(3, 3, 6, -4, 12)}, ${castShadow(9, 9, 28, 8, 5)}`;\n\nexport const styles = stylex.create({\n backdrop: {\n inset: 0,\n transition: `opacity 180ms ${softEase}`,\n backgroundColor: cssVar.colorBgMask,\n opacity: { default: null, [startingOrEnding]: 0 },\n position: 'fixed',\n zIndex: 1200,\n },\n\n popup: {\n display: 'flex',\n pointerEvents: 'none',\n position: 'fixed',\n zIndex: 1201,\n /* Clamped here rather than on the panel, so an oversized size prop shrinks the box instead of\n detaching the panel from its anchored edge. */\n maxHeight: '100dvh',\n maxWidth: '100dvw',\n },\n\n popupLeft: {\n insetBlock: 0,\n insetInlineStart: 0,\n },\n\n popupRight: {\n insetBlock: 0,\n insetInlineEnd: 0,\n },\n\n popupTop: {\n insetInline: 0,\n insetBlockStart: 0,\n },\n\n popupBottom: {\n insetInline: 0,\n insetBlockEnd: 0,\n },\n\n panel: {\n flex: '1',\n overflow: 'hidden',\n transition: `transform 300ms ${softEase}`,\n backgroundColor: cssVar.colorBgContainer,\n boxShadow: panelShadow,\n boxSizing: 'border-box',\n display: 'flex',\n flexDirection: 'column',\n pointerEvents: 'auto',\n position: 'relative',\n transform: pushTransform,\n minHeight: 0,\n minWidth: 0,\n },\n\n panelLeft: {\n '--drawer-cast-x': '1',\n 'borderInlineEndColor': cssVar.colorBorder,\n 'borderInlineEndStyle': 'solid',\n 'borderInlineEndWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateX(-100%)' },\n },\n\n panelRight: {\n '--drawer-cast-x': '-1',\n 'borderInlineStartColor': cssVar.colorBorder,\n 'borderInlineStartStyle': 'solid',\n 'borderInlineStartWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateX(100%)' },\n },\n\n panelTop: {\n '--drawer-cast-y': '1',\n 'borderBlockEndColor': cssVar.colorBorder,\n 'borderBlockEndStyle': 'solid',\n 'borderBlockEndWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateY(-100%)' },\n },\n\n panelBottom: {\n '--drawer-cast-y': '-1',\n 'borderBlockStartColor': cssVar.colorBorder,\n 'borderBlockStartStyle': 'solid',\n 'borderBlockStartWidth': edge,\n 'transform': { default: pushTransform, [startingOrEnding]: 'translateY(100%)' },\n },\n\n panelRoundedLeft: {\n borderEndEndRadius: 12,\n borderStartEndRadius: 12,\n },\n\n panelRoundedRight: {\n borderEndStartRadius: 12,\n borderStartStartRadius: 12,\n },\n\n panelRoundedTop: {\n borderEndEndRadius: 12,\n borderEndStartRadius: 12,\n },\n\n panelRoundedBottom: {\n borderStartEndRadius: 12,\n borderStartStartRadius: 12,\n },\n\n panelFlush: {\n '--drawer-cast-alpha': '0',\n '--drawer-edge-width': '0',\n },\n\n panelBoosted: {\n '--drawer-cast-alpha': '1.75',\n },\n\n panelRecessed: {\n '--drawer-cast-alpha': '0.5',\n },\n\n header: {\n flex: 'none',\n gap: 8,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockEndColor: cssVar.colorSplit,\n borderBlockEndStyle: 'solid',\n borderBlockEndWidth: 1,\n display: 'flex',\n justifyContent: 'space-between',\n minHeight: 56,\n },\n\n containerInner: {\n flex: '1',\n gap: 8,\n marginInline: 'auto',\n alignItems: 'center',\n display: 'flex',\n justifyContent: 'space-between',\n width: '100%',\n },\n\n containerInnerFooter: {\n justifyContent: 'flex-end',\n },\n\n title: {\n margin: 0,\n color: cssVar.colorText,\n fontSize: 17,\n fontWeight: 600,\n letterSpacing: '-0.005em',\n lineHeight: 1.4,\n },\n\n extra: {\n flex: 'none',\n gap: 4,\n alignItems: 'center',\n display: 'flex',\n marginInlineEnd: -4,\n },\n\n extraFloating: {\n insetBlockStart: 12,\n insetInlineEnd: 12,\n marginInlineEnd: 0,\n position: 'absolute',\n zIndex: 1,\n },\n\n close: {\n 'padding': 0,\n 'borderColor': 'currentcolor',\n 'borderRadius': 8,\n 'borderStyle': 'none',\n 'borderWidth': 'medium',\n 'transition': `color 160ms ${softEase}, background 160ms ${softEase}, transform 160ms ${softEase}`,\n 'alignItems': 'center',\n 'backgroundColor': { 'default': 'transparent', ':hover': cssVar.colorFillSecondary },\n 'color': { 'default': cssVar.colorTextTertiary, ':hover': cssVar.colorText },\n 'cursor': 'pointer',\n 'display': 'flex',\n 'justifyContent': 'center',\n 'position': 'relative',\n 'transform': {\n 'default': null,\n ':hover:not(:active)': 'scale(1.04)',\n ':active': 'scale(0.96)',\n },\n 'height': 32,\n 'width': 32,\n '::after': {\n inset: -4,\n content: '\"\"',\n position: 'absolute',\n },\n },\n\n content: {\n flex: '1',\n display: 'flex',\n minHeight: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n bodyContent: {\n marginInline: 'auto',\n paddingBlock: 12,\n paddingInline: 16,\n display: 'flex',\n flexDirection: 'column',\n minHeight: '100%',\n width: '100%',\n },\n\n contentSidebar: {\n overflowX: 'hidden',\n overflowY: 'hidden',\n },\n\n bodyContentSidebar: {\n paddingBlock: 0,\n paddingInline: 0,\n flexDirection: 'row',\n height: '100%',\n minHeight: 0,\n },\n\n sidebar: {\n flex: 'none',\n paddingBlock: 12,\n paddingInline: 16,\n backgroundColor: cssVar.colorBgLayout,\n borderInlineEndColor: cssVar.colorBorderSecondary,\n borderInlineEndStyle: 'solid',\n borderInlineEndWidth: 1,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n sidebarContent: {\n flex: '1',\n paddingBlock: 12,\n paddingInline: 16,\n minWidth: 0,\n overflowX: 'hidden',\n overflowY: 'auto',\n },\n\n footer: {\n flex: 'none',\n gap: 8,\n paddingBlock: 12,\n paddingInline: 16,\n alignItems: 'center',\n borderBlockStartColor: cssVar.colorSplit,\n borderBlockSt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AQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,aAAa;EACX,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,oBAAoB;EAClB,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,SAAS;EACP,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,gBAAgB;EACd,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;CACA,QAAQ;EACN,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,OAAO;CACT;AACF"}
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { useAppElement } from "../ConfigProvider/AppElementContext.mjs";
3
3
  import { useNativeButton } from "../hooks/useNativeButton.mjs";
4
+ import { mergeRefs, useMergeRefs } from "../utils/mergeRefs.mjs";
4
5
  import { FloatingLayerProvider } from "../hooks/useFloatingLayer.mjs";
5
6
  import { getFloatingCollisionPadding } from "../internal/floating/collisionPadding.mjs";
6
7
  import { placementMap } from "../utils/placement.mjs";
@@ -11,10 +12,9 @@ import { useLayerZIndex } from "../internal/zIndex/useLayerZIndex.mjs";
11
12
  import { menuClassNames, menuStyles } from "./style.mjs";
12
13
  import { cloneElement, isValidElement, useCallback, useState } from "react";
13
14
  import { jsx, jsxs } from "react/jsx-runtime";
14
- import clsx from "clsx";
15
+ import clsx$1 from "clsx";
15
16
  import * as stylex from "@stylexjs/stylex";
16
17
  import { mergeProps } from "@base-ui/react/merge-props";
17
- import { mergeRefs, useMergeRefs } from "react-merge-refs";
18
18
  import { Menu } from "@base-ui/react/menu";
19
19
  //#region src/DropdownMenu/atoms.tsx
20
20
  const DropdownMenuRoot = (props) => /* @__PURE__ */ jsx(Menu.Root, {
@@ -24,10 +24,10 @@ const DropdownMenuRoot = (props) => /* @__PURE__ */ jsx(Menu.Root, {
24
24
  const DropdownMenuSubmenuRoot = Menu.SubmenuRoot;
25
25
  const DropdownMenuCheckboxItemIndicator = Menu.CheckboxItemIndicator;
26
26
  const mergeStateClassName = (base, className) => {
27
- if (typeof className === "function") return (state) => clsx(base, className(state));
28
- return clsx(base, className);
27
+ if (typeof className === "function") return (state) => clsx$1(base, className(state));
28
+ return clsx$1(base, className);
29
29
  };
30
- const sx = (styles, stableClassName) => clsx(stylex.props(styles).className, stableClassName);
30
+ const sx = (styles, stableClassName) => clsx$1(stylex.props(styles).className, stableClassName);
31
31
  const itemClassName = (danger) => sx([menuStyles.item, danger && menuStyles.danger]);
32
32
  const DropdownMenuTrigger = ({ children, className, nativeButton, ref: refProp, ...rest }) => {
33
33
  const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({
@@ -43,7 +43,7 @@ const DropdownMenuTrigger = ({ children, className, nativeButton, ref: refProp,
43
43
  const mergedProps = mergeProps(children.props, resolvedProps);
44
44
  return cloneElement(children, {
45
45
  ...mergedProps,
46
- className: clsx(CLASSNAMES.DropdownMenuTrigger, className, mergedProps.className),
46
+ className: clsx$1(CLASSNAMES.DropdownMenuTrigger, className, mergedProps.className),
47
47
  ref: mergeRefs([
48
48
  children.ref,
49
49
  props.ref,
@@ -58,7 +58,7 @@ const DropdownMenuTrigger = ({ children, className, nativeButton, ref: refProp,
58
58
  });
59
59
  return /* @__PURE__ */ jsx(Menu.Trigger, {
60
60
  ...rest,
61
- className: clsx(CLASSNAMES.DropdownMenuTrigger, className),
61
+ className: clsx$1(CLASSNAMES.DropdownMenuTrigger, className),
62
62
  nativeButton: resolvedNativeButton,
63
63
  ref: refProp,
64
64
  children
@@ -115,7 +115,7 @@ DropdownMenuPopup.displayName = "DropdownMenuPopup";
115
115
  const DropdownMenuHeader = ({ className, ...rest }) => {
116
116
  return /* @__PURE__ */ jsx("div", {
117
117
  ...rest,
118
- className: clsx(sx(menuStyles.header), className),
118
+ className: clsx$1(sx(menuStyles.header), className),
119
119
  "data-slot": "header"
120
120
  });
121
121
  };
@@ -123,7 +123,7 @@ DropdownMenuHeader.displayName = "DropdownMenuHeader";
123
123
  const DropdownMenuFooter = ({ className, ...rest }) => {
124
124
  return /* @__PURE__ */ jsx("div", {
125
125
  ...rest,
126
- className: clsx(sx(menuStyles.footer), className),
126
+ className: clsx$1(sx(menuStyles.footer), className),
127
127
  "data-slot": "footer"
128
128
  });
129
129
  };
@@ -131,7 +131,7 @@ DropdownMenuFooter.displayName = "DropdownMenuFooter";
131
131
  const DropdownMenuScrollViewport = ({ children, className, getItemLabel, keepMounted, listItemHeight, virtual, ...rest }) => {
132
132
  if (!virtual) return /* @__PURE__ */ jsx("div", {
133
133
  ...rest,
134
- className: clsx(sx(menuStyles.slotViewport), className),
134
+ className: clsx$1(sx(menuStyles.slotViewport), className),
135
135
  children
136
136
  });
137
137
  return /* @__PURE__ */ jsx(MenuVirtualList, {
@@ -147,21 +147,21 @@ DropdownMenuScrollViewport.displayName = "DropdownMenuScrollViewport";
147
147
  const DropdownMenuItem = ({ className, danger, ...rest }) => {
148
148
  return /* @__PURE__ */ jsx(Menu.Item, {
149
149
  ...rest,
150
- className: (state) => clsx(itemClassName(danger), typeof className === "function" ? className(state) : className)
150
+ className: (state) => clsx$1(itemClassName(danger), typeof className === "function" ? className(state) : className)
151
151
  });
152
152
  };
153
153
  DropdownMenuItem.displayName = "DropdownMenuItem";
154
154
  const DropdownMenuCheckboxItemPrimitive = ({ className, danger, ...rest }) => {
155
155
  return /* @__PURE__ */ jsx(Menu.CheckboxItem, {
156
156
  ...rest,
157
- className: (state) => clsx(itemClassName(danger), typeof className === "function" ? className(state) : className)
157
+ className: (state) => clsx$1(itemClassName(danger), typeof className === "function" ? className(state) : className)
158
158
  });
159
159
  };
160
160
  DropdownMenuCheckboxItemPrimitive.displayName = "DropdownMenuCheckboxItemPrimitive";
161
161
  const DropdownMenuSeparator = ({ className, ...rest }) => {
162
162
  return /* @__PURE__ */ jsx(Menu.Separator, {
163
163
  ...rest,
164
- className: (state) => clsx(sx(menuStyles.separator), typeof className === "function" ? className(state) : className)
164
+ className: (state) => clsx$1(sx(menuStyles.separator), typeof className === "function" ? className(state) : className)
165
165
  });
166
166
  };
167
167
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
@@ -169,21 +169,21 @@ const DropdownMenuGroup = Menu.Group;
169
169
  const DropdownMenuGroupLabel = ({ className, ...rest }) => {
170
170
  return /* @__PURE__ */ jsx(Menu.GroupLabel, {
171
171
  ...rest,
172
- className: (state) => clsx(sx(menuStyles.groupLabel), typeof className === "function" ? className(state) : className)
172
+ className: (state) => clsx$1(sx(menuStyles.groupLabel), typeof className === "function" ? className(state) : className)
173
173
  });
174
174
  };
175
175
  DropdownMenuGroupLabel.displayName = "DropdownMenuGroupLabel";
176
176
  const DropdownMenuSubmenuTrigger = ({ className, danger, ...rest }) => {
177
177
  return /* @__PURE__ */ jsx(Menu.SubmenuTrigger, {
178
178
  ...rest,
179
- className: (state) => clsx(itemClassName(danger), typeof className === "function" ? className(state) : className)
179
+ className: (state) => clsx$1(itemClassName(danger), typeof className === "function" ? className(state) : className)
180
180
  });
181
181
  };
182
182
  DropdownMenuSubmenuTrigger.displayName = "DropdownMenuSubmenuTrigger";
183
183
  const DropdownMenuItemContentImpl = ({ className, xstyle, ...rest }) => {
184
184
  return /* @__PURE__ */ jsx("div", {
185
185
  ...rest,
186
- className: clsx(sx([menuStyles.itemContent, xstyle]), className)
186
+ className: clsx$1(sx([menuStyles.itemContent, xstyle]), className)
187
187
  });
188
188
  };
189
189
  const DropdownMenuItemContent = (props) => /* @__PURE__ */ jsx(DropdownMenuItemContentImpl, { ...props });
@@ -191,7 +191,7 @@ DropdownMenuItemContent.displayName = "DropdownMenuItemContent";
191
191
  const DropdownMenuItemIconImpl = ({ className, xstyle, ...rest }) => {
192
192
  return /* @__PURE__ */ jsx("span", {
193
193
  ...rest,
194
- className: clsx(sx([menuStyles.icon, xstyle], menuClassNames.icon), className)
194
+ className: clsx$1(sx([menuStyles.icon, xstyle], menuClassNames.icon), className)
195
195
  });
196
196
  };
197
197
  const DropdownMenuItemIcon = (props) => /* @__PURE__ */ jsx(DropdownMenuItemIconImpl, { ...props });
@@ -199,35 +199,35 @@ DropdownMenuItemIcon.displayName = "DropdownMenuItemIcon";
199
199
  const DropdownMenuItemLabelGroup = ({ className, ...rest }) => {
200
200
  return /* @__PURE__ */ jsx("div", {
201
201
  ...rest,
202
- className: clsx(sx(menuStyles.labelGroup), className)
202
+ className: clsx$1(sx(menuStyles.labelGroup), className)
203
203
  });
204
204
  };
205
205
  DropdownMenuItemLabelGroup.displayName = "DropdownMenuItemLabelGroup";
206
206
  const DropdownMenuItemLabel = ({ className, ...rest }) => {
207
207
  return /* @__PURE__ */ jsx("span", {
208
208
  ...rest,
209
- className: clsx(sx(menuStyles.label, menuClassNames.label), className)
209
+ className: clsx$1(sx(menuStyles.label, menuClassNames.label), className)
210
210
  });
211
211
  };
212
212
  DropdownMenuItemLabel.displayName = "DropdownMenuItemLabel";
213
213
  const DropdownMenuItemDesc = ({ className, ...rest }) => {
214
214
  return /* @__PURE__ */ jsx("span", {
215
215
  ...rest,
216
- className: clsx(sx(menuStyles.desc), className)
216
+ className: clsx$1(sx(menuStyles.desc), className)
217
217
  });
218
218
  };
219
219
  DropdownMenuItemDesc.displayName = "DropdownMenuItemDesc";
220
220
  const DropdownMenuItemExtra = ({ className, ...rest }) => {
221
221
  return /* @__PURE__ */ jsx("span", {
222
222
  ...rest,
223
- className: clsx(sx(menuStyles.extra), className)
223
+ className: clsx$1(sx(menuStyles.extra), className)
224
224
  });
225
225
  };
226
226
  DropdownMenuItemExtra.displayName = "DropdownMenuItemExtra";
227
227
  const DropdownMenuSubmenuArrow = ({ className, ...rest }) => {
228
228
  return /* @__PURE__ */ jsx("span", {
229
229
  ...rest,
230
- className: clsx(sx(menuStyles.submenuArrow, menuClassNames.submenuArrow), className)
230
+ className: clsx$1(sx(menuStyles.submenuArrow, menuClassNames.submenuArrow), className)
231
231
  });
232
232
  };
233
233
  DropdownMenuSubmenuArrow.displayName = "DropdownMenuSubmenuArrow";
@@ -243,7 +243,7 @@ const DropdownMenuSwitchItem = ({ checked: checkedProp, className, closeOnClick
243
243
  ...rest,
244
244
  closeOnClick,
245
245
  disabled,
246
- className: (state) => clsx(itemClassName(danger), typeof className === "function" ? className(state) : className),
246
+ className: (state) => clsx$1(itemClassName(danger), typeof className === "function" ? className(state) : className),
247
247
  onClick: (e) => {
248
248
  e.preventDefault();
249
249
  if (!disabled) handleCheckedChange(!checked);
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.mjs","names":[],"sources":["../../src/DropdownMenu/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Menu } from '@base-ui/react/menu';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport type React from 'react';\nimport { cloneElement, isValidElement, useCallback, useState } from 'react';\nimport { mergeRefs, useMergeRefs } from 'react-merge-refs';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { FloatingLayerProvider } from '@/hooks/useFloatingLayer';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { MenuVirtualList, type VirtualListProps } from '@/internal/virtual';\nimport { CLASSNAMES } from '@/styles/classNames';\nimport { type styleProps } from '@/styles/stylex/props';\nimport Switch from '@/Switch';\nimport { placementMap } from '@/utils/placement';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { menuClassNames, menuStyles } from './style';\nimport { type DropdownMenuPlacement } from './type';\n\nexport const DropdownMenuRoot: typeof Menu.Root = (props) => <Menu.Root modal={false} {...props} />;\nexport const DropdownMenuSubmenuRoot = Menu.SubmenuRoot;\nexport const DropdownMenuCheckboxItemIndicator = Menu.CheckboxItemIndicator;\n\ntype XStyle = Parameters<typeof styleProps>[0];\n\nconst mergeStateClassName = <TState,>(\n base: string,\n className: string | ((state: TState) => string | undefined) | undefined,\n) => {\n if (typeof className === 'function') return (state: TState) => clsx(base, className(state));\n return clsx(base, className);\n};\n\nconst sx = (styles: XStyle, stableClassName?: string) =>\n clsx(stylex.props(styles).className, stableClassName);\n\nconst itemClassName = (danger: boolean | undefined) =>\n sx([menuStyles.item, danger && menuStyles.danger]);\n\nexport type DropdownMenuTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof Menu.Trigger>,\n 'children' | 'render'\n> & {\n children: React.ReactNode;\n};\n\nexport const DropdownMenuTrigger = ({\n children,\n className,\n nativeButton,\n ref: refProp,\n ...rest\n}: DropdownMenuTriggerProps) => {\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n const renderer = (props: any) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n return cloneElement(children as any, {\n ...mergedProps,\n className: clsx(CLASSNAMES.DropdownMenuTrigger, className, mergedProps.className),\n ref: mergeRefs([(children as any).ref, (props as any).ref, refProp]),\n });\n };\n\n if (isValidElement(children)) {\n return <Menu.Trigger {...rest} nativeButton={resolvedNativeButton} render={renderer as any} />;\n }\n\n return (\n <Menu.Trigger\n {...rest}\n className={clsx(CLASSNAMES.DropdownMenuTrigger, className)}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Menu.Trigger>\n );\n};\n\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal> & {\n /**\n * When `container` is not provided, it uses a shared container created by `usePortalContainer`.\n */\n container?: HTMLElement | null;\n};\n\nexport const DropdownMenuPortal = ({ container, ...rest }: DropdownMenuPortalProps) => {\n const appElement = useAppElement();\n return <Menu.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nDropdownMenuPortal.displayName = 'DropdownMenuPortal';\n\nexport type DropdownMenuPositionerProps = React.ComponentProps<typeof Menu.Positioner> & {\n hoverTrigger?: boolean;\n placement?: DropdownMenuPlacement;\n};\n\nexport const DropdownMenuPositioner = ({\n className,\n collisionPadding,\n placement,\n hoverTrigger,\n align,\n side,\n sideOffset,\n children,\n style,\n ...rest\n}: DropdownMenuPositionerProps) => {\n const placementConfig = placement ? placementMap[placement] : undefined;\n const [positionerNode, setPositionerNode] = useState<HTMLDivElement | null>(null);\n\n const explicitZIndex =\n typeof style !== 'function' && style?.zIndex != null && typeof style.zIndex === 'number'\n ? style.zIndex\n : undefined;\n const { zIndex, ref: zRef } = useLayerZIndex<HTMLDivElement>('floating', explicitZIndex);\n const composedRef = useMergeRefs([setPositionerNode, zRef]);\n\n const resolvedStyle =\n typeof style === 'function'\n ? (state: any) => ({ zIndex, ...style(state) })\n : { zIndex, ...style };\n\n return (\n <Menu.Positioner\n {...rest}\n align={align ?? placementConfig?.align}\n collisionPadding={collisionPadding ?? getFloatingCollisionPadding()}\n data-hover-trigger={hoverTrigger || undefined}\n data-placement={placement}\n ref={composedRef as any}\n side={side ?? placementConfig?.side}\n sideOffset={sideOffset ?? (placementConfig ? 6 : undefined)}\n style={resolvedStyle}\n className={\n mergeStateClassName(\n sx(menuStyles.positioner, menuClassNames.positioner),\n className as any,\n ) as any\n }\n >\n <FloatingLayerProvider value={positionerNode}>{children}</FloatingLayerProvider>\n </Menu.Positioner>\n );\n};\n\nDropdownMenuPositioner.displayName = 'DropdownMenuPositioner';\n\nexport type DropdownMenuPopupProps = React.ComponentProps<typeof Menu.Popup>;\n\nexport const DropdownMenuPopupImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuPopupProps & { xstyle?: XStyle }) => {\n return (\n <Menu.Popup\n {...rest}\n className={\n mergeStateClassName(\n sx([menuStyles.popup, xstyle], menuClassNames.popup),\n className as any,\n ) as any\n }\n />\n );\n};\n\nexport const DropdownMenuPopup = (props: DropdownMenuPopupProps) => (\n <DropdownMenuPopupImpl {...props} />\n);\n\nDropdownMenuPopup.displayName = 'DropdownMenuPopup';\n\nexport type DropdownMenuHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuHeader = ({ className, ...rest }: DropdownMenuHeaderProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.header), className)} data-slot=\"header\" />;\n};\n\nDropdownMenuHeader.displayName = 'DropdownMenuHeader';\n\nexport type DropdownMenuFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuFooter = ({ className, ...rest }: DropdownMenuFooterProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.footer), className)} data-slot=\"footer\" />;\n};\n\nDropdownMenuFooter.displayName = 'DropdownMenuFooter';\n\nexport type DropdownMenuScrollViewportProps = React.HTMLAttributes<HTMLDivElement> &\n VirtualListProps;\n\nexport const DropdownMenuScrollViewport = ({\n children,\n className,\n getItemLabel,\n keepMounted,\n listItemHeight,\n virtual,\n ...rest\n}: DropdownMenuScrollViewportProps) => {\n if (!virtual) {\n return (\n <div {...rest} className={clsx(sx(menuStyles.slotViewport), className)}>\n {children}\n </div>\n );\n }\n\n return (\n <MenuVirtualList\n {...rest}\n className={className}\n getItemLabel={getItemLabel}\n itemSize={listItemHeight}\n keepMounted={keepMounted}\n >\n {children}\n </MenuVirtualList>\n );\n};\n\nDropdownMenuScrollViewport.displayName = 'DropdownMenuScrollViewport';\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & { danger?: boolean };\n\nexport const DropdownMenuItem = ({ className, danger, ...rest }: DropdownMenuItemProps) => {\n return (\n <Menu.Item\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof Menu.CheckboxItem> & {\n danger?: boolean;\n};\n\nexport const DropdownMenuCheckboxItemPrimitive = ({\n className,\n danger,\n ...rest\n}: DropdownMenuCheckboxItemProps) => {\n return (\n <Menu.CheckboxItem\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuCheckboxItemPrimitive.displayName = 'DropdownMenuCheckboxItemPrimitive';\n\nexport type DropdownMenuSeparatorProps = React.ComponentProps<typeof Menu.Separator>;\n\nexport const DropdownMenuSeparator = ({ className, ...rest }: DropdownMenuSeparatorProps) => {\n return (\n <Menu.Separator\n {...rest}\n className={(state) =>\n clsx(\n sx(menuStyles.separator),\n typeof className === 'function' ? className(state) : className,\n )\n }\n />\n );\n};\n\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\nexport const DropdownMenuGroup = Menu.Group;\n\nexport type DropdownMenuGroupLabelProps = React.ComponentProps<typeof Menu.GroupLabel>;\n\nexport const DropdownMenuGroupLabel = ({ className, ...rest }: DropdownMenuGroupLabelProps) => {\n return (\n <Menu.GroupLabel\n {...rest}\n className={(state) =>\n clsx(\n sx(menuStyles.groupLabel),\n typeof className === 'function' ? className(state) : className,\n )\n }\n />\n );\n};\n\nDropdownMenuGroupLabel.displayName = 'DropdownMenuGroupLabel';\n\nexport type DropdownMenuSubmenuTriggerProps = React.ComponentProps<typeof Menu.SubmenuTrigger> & {\n danger?: boolean;\n};\n\nexport const DropdownMenuSubmenuTrigger = ({\n className,\n danger,\n ...rest\n}: DropdownMenuSubmenuTriggerProps) => {\n return (\n <Menu.SubmenuTrigger\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuSubmenuTrigger.displayName = 'DropdownMenuSubmenuTrigger';\n\nexport type DropdownMenuItemContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuItemContentImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuItemContentProps & { xstyle?: XStyle }) => {\n return <div {...rest} className={clsx(sx([menuStyles.itemContent, xstyle]), className)} />;\n};\n\nexport const DropdownMenuItemContent = (props: DropdownMenuItemContentProps) => (\n <DropdownMenuItemContentImpl {...props} />\n);\n\nDropdownMenuItemContent.displayName = 'DropdownMenuItemContent';\n\nexport type DropdownMenuItemIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemIconImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuItemIconProps & { xstyle?: XStyle }) => {\n return (\n <span\n {...rest}\n className={clsx(sx([menuStyles.icon, xstyle], menuClassNames.icon), className)}\n />\n );\n};\n\nexport const DropdownMenuItemIcon = (props: DropdownMenuItemIconProps) => (\n <DropdownMenuItemIconImpl {...props} />\n);\n\nDropdownMenuItemIcon.displayName = 'DropdownMenuItemIcon';\n\nexport type DropdownMenuItemLabelGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuItemLabelGroup = ({\n className,\n ...rest\n}: DropdownMenuItemLabelGroupProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.labelGroup), className)} />;\n};\n\nDropdownMenuItemLabelGroup.displayName = 'DropdownMenuItemLabelGroup';\n\nexport type DropdownMenuItemLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemLabel = ({ className, ...rest }: DropdownMenuItemLabelProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.label, menuClassNames.label), className)} />;\n};\n\nDropdownMenuItemLabel.displayName = 'DropdownMenuItemLabel';\n\nexport type DropdownMenuItemDescProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemDesc = ({ className, ...rest }: DropdownMenuItemDescProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.desc), className)} />;\n};\n\nDropdownMenuItemDesc.displayName = 'DropdownMenuItemDesc';\n\nexport type DropdownMenuItemExtraProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemExtra = ({ className, ...rest }: DropdownMenuItemExtraProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.extra), className)} />;\n};\n\nDropdownMenuItemExtra.displayName = 'DropdownMenuItemExtra';\n\nexport type DropdownMenuSubmenuArrowProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuSubmenuArrow = ({ className, ...rest }: DropdownMenuSubmenuArrowProps) => {\n return (\n <span\n {...rest}\n className={clsx(sx(menuStyles.submenuArrow, menuClassNames.submenuArrow), className)}\n />\n );\n};\n\nDropdownMenuSubmenuArrow.displayName = 'DropdownMenuSubmenuArrow';\n\nexport type DropdownMenuSwitchItemProps = Omit<\n React.ComponentProps<typeof Menu.Item>,\n 'onClick'\n> & {\n checked?: boolean;\n closeOnClick?: boolean;\n danger?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n};\n\nexport const DropdownMenuSwitchItem = ({\n checked: checkedProp,\n className,\n closeOnClick = false,\n danger,\n defaultChecked,\n disabled,\n onCheckedChange,\n children,\n ...rest\n}: DropdownMenuSwitchItemProps) => {\n const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n const handleCheckedChange = useCallback(\n (newChecked: boolean) => {\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n onCheckedChange?.(newChecked);\n },\n [isControlled, onCheckedChange],\n );\n\n return (\n <Menu.Item\n {...rest}\n closeOnClick={closeOnClick}\n disabled={disabled}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n onClick={(e) => {\n e.preventDefault();\n if (!disabled) {\n handleCheckedChange(!checked);\n }\n }}\n >\n {children}\n <span\n style={{ display: 'inline-flex', marginInlineStart: 16 }}\n onFocus={(e) => e.stopPropagation()}\n >\n <Switch\n checked={checked}\n disabled={disabled}\n size=\"small\"\n tabIndex={-1}\n onChange={handleCheckedChange}\n onClick={(_, e) => e.stopPropagation()}\n />\n </span>\n </Menu.Item>\n );\n};\n\nDropdownMenuSwitchItem.displayName = 'DropdownMenuSwitchItem';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAqC,UAAS,oBAAC,KAAK,MAAN;CAAW,OAAO;CAAO,GAAI;AAAQ,CAAA;AAChG,MAAa,0BAA0B,KAAK;AAC5C,MAAa,oCAAoC,KAAK;AAEtD,MAAM,uBAAgC,MAAc,cAA4E;CAC9H,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkB,KAAK,MAAM,UAAU,KAAK,CAAC;CAC1F,OAAO,KAAK,MAAM,SAAS;AAC7B;AACA,MAAM,MAAM,QAAgB,oBAA6B,KAAK,OAAO,MAAM,MAAM,CAAC,CAAC,WAAW,eAAe;AAC7G,MAAM,iBAAiB,WAAgC,GAAG,CAAC,WAAW,MAAM,UAAU,WAAW,MAAM,CAAC;AAIxG,MAAa,uBAAuB,EAClC,UACA,WACA,cACA,KAAK,SACL,GAAG,WAC2B;CAC9B,MAAM,EACJ,8BACA,yBACE,gBAAgB;EAClB;EACA;CACF,CAAC;CACD,MAAM,YAAY,UAAe;EAG/B,MAAM,uBAAuB;GAC3B,IAAI,8BAA8B,OAAO;GAEzC,MAAM,EACJ,MACA,GAAG,cACD;GACJ,OAAO;EACT,EAAA,CAAG;EACH,MAAM,cAAc,WAAY,SAAiB,OAAO,aAAa;EACrE,OAAO,aAAa,UAAiB;GACnC,GAAG;GACH,WAAW,KAAK,WAAW,qBAAqB,WA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,WACA,eAAe,OACf,QACA,gBACA,UACA,iBACA,UACA,GAAG,WAC8B;CACjC,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,kBAAkB,KAAK;CAC9E,MAAM,eAAe,gBAAgB,KAAA;CACrC,MAAM,UAAU,eAAe,cAAc;CAC7C,MAAM,sBAAsB,aAAa,eAAwB;EAC/D,IAAI,CAAC,cACH,mBAAmB,UAAU;EAE/B,kBAAkB,UAAU;CAC9B,GAAG,CAAC,cAAc,eAAe,CAAC;CAClC,OAAO,qBAAC,KAAK,MAAN;EAAW,GAAI;EAAoB;EAAwB;EAAU,YAAW,UAAS,KAAK,cAAc,MAAM,GAAG,OAAO,cAAc,aAAa,UAAU,KAAK,IAAI,SAAS;EAAG,UAAS,MAAK;GACzM,EAAE,eAAe;GACjB,IAAI,CAAC,UACH,oBAAoB,CAAC,OAAO;EAEhC;EALO,UAAA,CAMF,UACD,oBAAC,QAAD;GAAM,OAAO;IACb,SAAS;IACT,mBAAmB;GACrB;GAAG,UAAS,MAAK,EAAE,gBAAgB;GAC/B,UAAA,oBAAC,QAAD;IAAiB;IAAmB;IAAU,MAAK;IAAQ,UAAU;IAAI,UAAU;IAAqB,UAAU,GAAG,MAAM,EAAE,gBAAgB;GAAI,CAAA;EAC7I,CAAA,CACG;;AACf;AACA,uBAAuB,cAAc"}
1
+ {"version":3,"file":"atoms.mjs","names":["clsx"],"sources":["../../src/DropdownMenu/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { Menu } from '@base-ui/react/menu';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport type React from 'react';\nimport { cloneElement, isValidElement, useCallback, useState } from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { FloatingLayerProvider } from '@/hooks/useFloatingLayer';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { MenuVirtualList, type VirtualListProps } from '@/internal/virtual';\nimport { CLASSNAMES } from '@/styles/classNames';\nimport { type styleProps } from '@/styles/stylex/props';\nimport Switch from '@/Switch';\nimport { mergeRefs, useMergeRefs } from '@/utils/mergeRefs';\nimport { placementMap } from '@/utils/placement';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { menuClassNames, menuStyles } from './style';\nimport { type DropdownMenuPlacement } from './type';\n\nexport const DropdownMenuRoot: typeof Menu.Root = (props) => <Menu.Root modal={false} {...props} />;\nexport const DropdownMenuSubmenuRoot = Menu.SubmenuRoot;\nexport const DropdownMenuCheckboxItemIndicator = Menu.CheckboxItemIndicator;\n\ntype XStyle = Parameters<typeof styleProps>[0];\n\nconst mergeStateClassName = <TState,>(\n base: string,\n className: string | ((state: TState) => string | undefined) | undefined,\n) => {\n if (typeof className === 'function') return (state: TState) => clsx(base, className(state));\n return clsx(base, className);\n};\n\nconst sx = (styles: XStyle, stableClassName?: string) =>\n clsx(stylex.props(styles).className, stableClassName);\n\nconst itemClassName = (danger: boolean | undefined) =>\n sx([menuStyles.item, danger && menuStyles.danger]);\n\nexport type DropdownMenuTriggerProps = Omit<\n React.ComponentPropsWithRef<typeof Menu.Trigger>,\n 'children' | 'render'\n> & {\n children: React.ReactNode;\n};\n\nexport const DropdownMenuTrigger = ({\n children,\n className,\n nativeButton,\n ref: refProp,\n ...rest\n}: DropdownMenuTriggerProps) => {\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n const renderer = (props: any) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n return cloneElement(children as any, {\n ...mergedProps,\n className: clsx(CLASSNAMES.DropdownMenuTrigger, className, mergedProps.className),\n ref: mergeRefs([(children as any).ref, (props as any).ref, refProp]),\n });\n };\n\n if (isValidElement(children)) {\n return <Menu.Trigger {...rest} nativeButton={resolvedNativeButton} render={renderer as any} />;\n }\n\n return (\n <Menu.Trigger\n {...rest}\n className={clsx(CLASSNAMES.DropdownMenuTrigger, className)}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Menu.Trigger>\n );\n};\n\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\nexport type DropdownMenuPortalProps = React.ComponentProps<typeof Menu.Portal> & {\n /**\n * When `container` is not provided, it uses a shared container created by `usePortalContainer`.\n */\n container?: HTMLElement | null;\n};\n\nexport const DropdownMenuPortal = ({ container, ...rest }: DropdownMenuPortalProps) => {\n const appElement = useAppElement();\n return <Menu.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nDropdownMenuPortal.displayName = 'DropdownMenuPortal';\n\nexport type DropdownMenuPositionerProps = React.ComponentProps<typeof Menu.Positioner> & {\n hoverTrigger?: boolean;\n placement?: DropdownMenuPlacement;\n};\n\nexport const DropdownMenuPositioner = ({\n className,\n collisionPadding,\n placement,\n hoverTrigger,\n align,\n side,\n sideOffset,\n children,\n style,\n ...rest\n}: DropdownMenuPositionerProps) => {\n const placementConfig = placement ? placementMap[placement] : undefined;\n const [positionerNode, setPositionerNode] = useState<HTMLDivElement | null>(null);\n\n const explicitZIndex =\n typeof style !== 'function' && style?.zIndex != null && typeof style.zIndex === 'number'\n ? style.zIndex\n : undefined;\n const { zIndex, ref: zRef } = useLayerZIndex<HTMLDivElement>('floating', explicitZIndex);\n const composedRef = useMergeRefs([setPositionerNode, zRef]);\n\n const resolvedStyle =\n typeof style === 'function'\n ? (state: any) => ({ zIndex, ...style(state) })\n : { zIndex, ...style };\n\n return (\n <Menu.Positioner\n {...rest}\n align={align ?? placementConfig?.align}\n collisionPadding={collisionPadding ?? getFloatingCollisionPadding()}\n data-hover-trigger={hoverTrigger || undefined}\n data-placement={placement}\n ref={composedRef as any}\n side={side ?? placementConfig?.side}\n sideOffset={sideOffset ?? (placementConfig ? 6 : undefined)}\n style={resolvedStyle}\n className={\n mergeStateClassName(\n sx(menuStyles.positioner, menuClassNames.positioner),\n className as any,\n ) as any\n }\n >\n <FloatingLayerProvider value={positionerNode}>{children}</FloatingLayerProvider>\n </Menu.Positioner>\n );\n};\n\nDropdownMenuPositioner.displayName = 'DropdownMenuPositioner';\n\nexport type DropdownMenuPopupProps = React.ComponentProps<typeof Menu.Popup>;\n\nexport const DropdownMenuPopupImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuPopupProps & { xstyle?: XStyle }) => {\n return (\n <Menu.Popup\n {...rest}\n className={\n mergeStateClassName(\n sx([menuStyles.popup, xstyle], menuClassNames.popup),\n className as any,\n ) as any\n }\n />\n );\n};\n\nexport const DropdownMenuPopup = (props: DropdownMenuPopupProps) => (\n <DropdownMenuPopupImpl {...props} />\n);\n\nDropdownMenuPopup.displayName = 'DropdownMenuPopup';\n\nexport type DropdownMenuHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuHeader = ({ className, ...rest }: DropdownMenuHeaderProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.header), className)} data-slot=\"header\" />;\n};\n\nDropdownMenuHeader.displayName = 'DropdownMenuHeader';\n\nexport type DropdownMenuFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuFooter = ({ className, ...rest }: DropdownMenuFooterProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.footer), className)} data-slot=\"footer\" />;\n};\n\nDropdownMenuFooter.displayName = 'DropdownMenuFooter';\n\nexport type DropdownMenuScrollViewportProps = React.HTMLAttributes<HTMLDivElement> &\n VirtualListProps;\n\nexport const DropdownMenuScrollViewport = ({\n children,\n className,\n getItemLabel,\n keepMounted,\n listItemHeight,\n virtual,\n ...rest\n}: DropdownMenuScrollViewportProps) => {\n if (!virtual) {\n return (\n <div {...rest} className={clsx(sx(menuStyles.slotViewport), className)}>\n {children}\n </div>\n );\n }\n\n return (\n <MenuVirtualList\n {...rest}\n className={className}\n getItemLabel={getItemLabel}\n itemSize={listItemHeight}\n keepMounted={keepMounted}\n >\n {children}\n </MenuVirtualList>\n );\n};\n\nDropdownMenuScrollViewport.displayName = 'DropdownMenuScrollViewport';\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof Menu.Item> & { danger?: boolean };\n\nexport const DropdownMenuItem = ({ className, danger, ...rest }: DropdownMenuItemProps) => {\n return (\n <Menu.Item\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\nexport type DropdownMenuCheckboxItemProps = React.ComponentProps<typeof Menu.CheckboxItem> & {\n danger?: boolean;\n};\n\nexport const DropdownMenuCheckboxItemPrimitive = ({\n className,\n danger,\n ...rest\n}: DropdownMenuCheckboxItemProps) => {\n return (\n <Menu.CheckboxItem\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuCheckboxItemPrimitive.displayName = 'DropdownMenuCheckboxItemPrimitive';\n\nexport type DropdownMenuSeparatorProps = React.ComponentProps<typeof Menu.Separator>;\n\nexport const DropdownMenuSeparator = ({ className, ...rest }: DropdownMenuSeparatorProps) => {\n return (\n <Menu.Separator\n {...rest}\n className={(state) =>\n clsx(\n sx(menuStyles.separator),\n typeof className === 'function' ? className(state) : className,\n )\n }\n />\n );\n};\n\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\nexport const DropdownMenuGroup = Menu.Group;\n\nexport type DropdownMenuGroupLabelProps = React.ComponentProps<typeof Menu.GroupLabel>;\n\nexport const DropdownMenuGroupLabel = ({ className, ...rest }: DropdownMenuGroupLabelProps) => {\n return (\n <Menu.GroupLabel\n {...rest}\n className={(state) =>\n clsx(\n sx(menuStyles.groupLabel),\n typeof className === 'function' ? className(state) : className,\n )\n }\n />\n );\n};\n\nDropdownMenuGroupLabel.displayName = 'DropdownMenuGroupLabel';\n\nexport type DropdownMenuSubmenuTriggerProps = React.ComponentProps<typeof Menu.SubmenuTrigger> & {\n danger?: boolean;\n};\n\nexport const DropdownMenuSubmenuTrigger = ({\n className,\n danger,\n ...rest\n}: DropdownMenuSubmenuTriggerProps) => {\n return (\n <Menu.SubmenuTrigger\n {...rest}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n />\n );\n};\n\nDropdownMenuSubmenuTrigger.displayName = 'DropdownMenuSubmenuTrigger';\n\nexport type DropdownMenuItemContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuItemContentImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuItemContentProps & { xstyle?: XStyle }) => {\n return <div {...rest} className={clsx(sx([menuStyles.itemContent, xstyle]), className)} />;\n};\n\nexport const DropdownMenuItemContent = (props: DropdownMenuItemContentProps) => (\n <DropdownMenuItemContentImpl {...props} />\n);\n\nDropdownMenuItemContent.displayName = 'DropdownMenuItemContent';\n\nexport type DropdownMenuItemIconProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemIconImpl = ({\n className,\n xstyle,\n ...rest\n}: DropdownMenuItemIconProps & { xstyle?: XStyle }) => {\n return (\n <span\n {...rest}\n className={clsx(sx([menuStyles.icon, xstyle], menuClassNames.icon), className)}\n />\n );\n};\n\nexport const DropdownMenuItemIcon = (props: DropdownMenuItemIconProps) => (\n <DropdownMenuItemIconImpl {...props} />\n);\n\nDropdownMenuItemIcon.displayName = 'DropdownMenuItemIcon';\n\nexport type DropdownMenuItemLabelGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const DropdownMenuItemLabelGroup = ({\n className,\n ...rest\n}: DropdownMenuItemLabelGroupProps) => {\n return <div {...rest} className={clsx(sx(menuStyles.labelGroup), className)} />;\n};\n\nDropdownMenuItemLabelGroup.displayName = 'DropdownMenuItemLabelGroup';\n\nexport type DropdownMenuItemLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemLabel = ({ className, ...rest }: DropdownMenuItemLabelProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.label, menuClassNames.label), className)} />;\n};\n\nDropdownMenuItemLabel.displayName = 'DropdownMenuItemLabel';\n\nexport type DropdownMenuItemDescProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemDesc = ({ className, ...rest }: DropdownMenuItemDescProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.desc), className)} />;\n};\n\nDropdownMenuItemDesc.displayName = 'DropdownMenuItemDesc';\n\nexport type DropdownMenuItemExtraProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuItemExtra = ({ className, ...rest }: DropdownMenuItemExtraProps) => {\n return <span {...rest} className={clsx(sx(menuStyles.extra), className)} />;\n};\n\nDropdownMenuItemExtra.displayName = 'DropdownMenuItemExtra';\n\nexport type DropdownMenuSubmenuArrowProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const DropdownMenuSubmenuArrow = ({ className, ...rest }: DropdownMenuSubmenuArrowProps) => {\n return (\n <span\n {...rest}\n className={clsx(sx(menuStyles.submenuArrow, menuClassNames.submenuArrow), className)}\n />\n );\n};\n\nDropdownMenuSubmenuArrow.displayName = 'DropdownMenuSubmenuArrow';\n\nexport type DropdownMenuSwitchItemProps = Omit<\n React.ComponentProps<typeof Menu.Item>,\n 'onClick'\n> & {\n checked?: boolean;\n closeOnClick?: boolean;\n danger?: boolean;\n defaultChecked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n};\n\nexport const DropdownMenuSwitchItem = ({\n checked: checkedProp,\n className,\n closeOnClick = false,\n danger,\n defaultChecked,\n disabled,\n onCheckedChange,\n children,\n ...rest\n}: DropdownMenuSwitchItemProps) => {\n const [internalChecked, setInternalChecked] = useState(defaultChecked ?? false);\n const isControlled = checkedProp !== undefined;\n const checked = isControlled ? checkedProp : internalChecked;\n\n const handleCheckedChange = useCallback(\n (newChecked: boolean) => {\n if (!isControlled) {\n setInternalChecked(newChecked);\n }\n onCheckedChange?.(newChecked);\n },\n [isControlled, onCheckedChange],\n );\n\n return (\n <Menu.Item\n {...rest}\n closeOnClick={closeOnClick}\n disabled={disabled}\n className={(state) =>\n clsx(itemClassName(danger), typeof className === 'function' ? className(state) : className)\n }\n onClick={(e) => {\n e.preventDefault();\n if (!disabled) {\n handleCheckedChange(!checked);\n }\n }}\n >\n {children}\n <span\n style={{ display: 'inline-flex', marginInlineStart: 16 }}\n onFocus={(e) => e.stopPropagation()}\n >\n <Switch\n checked={checked}\n disabled={disabled}\n size=\"small\"\n tabIndex={-1}\n onChange={handleCheckedChange}\n onClick={(_, e) => e.stopPropagation()}\n />\n </span>\n </Menu.Item>\n );\n};\n\nDropdownMenuSwitchItem.displayName = 'DropdownMenuSwitchItem';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,MAAa,oBAAqC,UAAS,oBAAC,KAAK,MAAN;CAAW,OAAO;CAAO,GAAI;AAAQ,CAAA;AAChG,MAAa,0BAA0B,KAAK;AAC5C,MAAa,oCAAoC,KAAK;AAEtD,MAAM,uBAAgC,MAAc,cAA4E;CAC9H,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkBA,OAAK,MAAM,UAAU,KAAK,CAAC;CAC1F,OAAOA,OAAK,MAAM,SAAS;AAC7B;AACA,MAAM,MAAM,QAAgB,oBAA6BA,OAAK,OAAO,MAAM,MAAM,CAAC,CAAC,WAAW,eAAe;AAC7G,MAAM,iBAAiB,WAAgC,GAAG,CAAC,WAAW,MAAM,UAAU,WAAW,MAAM,CAAC;AAIxG,MAAa,uBAAuB,EAClC,UACA,WACA,cACA,KAAK,SACL,GAAG,WAC2B;CAC9B,MAAM,EACJ,8BACA,yBACE,gBAAgB;EAClB;EACA;CACF,CAAC;CACD,MAAM,YAAY,UAAe;EAG/B,MAAM,uBAAuB;GAC3B,IAAI,8BAA8B,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,EACvC,WACA,GAAG,WACgC;CACnC,OAAO,oBAAC,QAAD;EAAM,GAAI;EAAM,WAAWA,OAAK,GAAG,WAAW,cAAc,eAAe,YAAY,GAAG,SAAS;CAAI,CAAA;AAChH;AACA,yBAAyB,cAAc;AAQvC,MAAa,0BAA0B,EACrC,SAAS,aACT,WACA,eAAe,OACf,QACA,gBACA,UACA,iBACA,UACA,GAAG,WAC8B;CACjC,MAAM,CAAC,iBAAiB,sBAAsB,SAAS,kBAAkB,KAAK;CAC9E,MAAM,eAAe,gBAAgB,KAAA;CACrC,MAAM,UAAU,eAAe,cAAc;CAC7C,MAAM,sBAAsB,aAAa,eAAwB;EAC/D,IAAI,CAAC,cACH,mBAAmB,UAAU;EAE/B,kBAAkB,UAAU;CAC9B,GAAG,CAAC,cAAc,eAAe,CAAC;CAClC,OAAO,qBAAC,KAAK,MAAN;EAAW,GAAI;EAAoB;EAAwB;EAAU,YAAW,UAASA,OAAK,cAAc,MAAM,GAAG,OAAO,cAAc,aAAa,UAAU,KAAK,IAAI,SAAS;EAAG,UAAS,MAAK;GACzM,EAAE,eAAe;GACjB,IAAI,CAAC,UACH,oBAAoB,CAAC,OAAO;EAEhC;EALO,UAAA,CAMF,UACD,oBAAC,QAAD;GAAM,OAAO;IACb,SAAS;IACT,mBAAmB;GACrB;GAAG,UAAS,MAAK,EAAE,gBAAgB;GAC/B,UAAA,oBAAC,QAAD;IAAiB;IAAmB;IAAU,MAAK;IAAQ,UAAU;IAAI,UAAU;IAAqB,UAAU,GAAG,MAAM,EAAE,gBAAgB;GAAI,CAAA;EAC7I,CAAA,CACG;;AACf;AACA,uBAAuB,cAAc"}
@@ -1,8 +1,8 @@
1
1
  import { menuClassNames, menuStyles } from "./style.mjs";
2
- import clsx from "clsx";
2
+ import clsx$1 from "clsx";
3
3
  import * as stylex from "@stylexjs/stylex";
4
4
  //#region src/DropdownMenu/sharedStyle.ts
5
- const styles = Object.fromEntries(Object.entries(menuStyles).map(([key, value]) => [key, clsx(stylex.props(value).className, menuClassNames[key])]));
5
+ const styles = Object.fromEntries(Object.entries(menuStyles).map(([key, value]) => [key, clsx$1(stylex.props(value).className, menuClassNames[key])]));
6
6
  //#endregion
7
7
  export { menuClassNames, menuStyles, styles };
8
8
 
@@ -1 +1 @@
1
- {"version":3,"file":"sharedStyle.mjs","names":[],"sources":["../../src/DropdownMenu/sharedStyle.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\n\nimport { menuClassNames, menuStyles } from './style';\n\nexport { menuClassNames, menuStyles } from './style';\n\nexport const styles = Object.fromEntries(\n Object.entries(menuStyles).map(([key, value]) => [\n key,\n clsx(stylex.props(value).className, menuClassNames[key as keyof typeof menuClassNames]),\n ]),\n) as Record<keyof typeof menuStyles, string>;\n"],"mappings":";;;;AAIA,MAAa,SAAS,OAAO,YAAY,OAAO,QAAQ,UAAU,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,KAAK,OAAO,MAAM,KAAK,CAAC,CAAC,WAAW,eAAe,IAAmC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"sharedStyle.mjs","names":["clsx"],"sources":["../../src/DropdownMenu/sharedStyle.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\n\nimport { menuClassNames, menuStyles } from './style';\n\nexport { menuClassNames, menuStyles } from './style';\n\nexport const styles = Object.fromEntries(\n Object.entries(menuStyles).map(([key, value]) => [\n key,\n clsx(stylex.props(value).className, menuClassNames[key as keyof typeof menuClassNames]),\n ]),\n) as Record<keyof typeof menuStyles, string>;\n"],"mappings":";;;;AAIA,MAAa,SAAS,OAAO,YAAY,OAAO,QAAQ,UAAU,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAKA,OAAK,OAAO,MAAM,KAAK,CAAC,CAAC,WAAW,eAAe,IAAmC,CAAC,CAAC,CAAC"}
@@ -1,8 +1,9 @@
1
1
  "use client";
2
2
  import FlexBasic_default from "../Flex/FlexBasic.mjs";
3
3
  import ActionIcon from "../ActionIcon/ActionIcon.mjs";
4
+ import { useEventCallback } from "../hooks/useEventCallback.mjs";
4
5
  import Input_default from "../Input/Input.mjs";
5
- import { memo, useEffect, useRef, useState } from "react";
6
+ import { memo, useEffect, useMemo, useRef, useState } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { RotateCcw, Save } from "lucide-react";
8
9
  //#region src/EditableText/ControlInput.tsx
@@ -13,45 +14,57 @@ const ControlInput = memo(({ value, onChange, onValueChanging, onChangeEnd, onCo
13
14
  useEffect(() => {
14
15
  if (value !== void 0) setInput(value);
15
16
  }, [value]);
16
- const handleUpload = () => {
17
+ const handleUpload = useEventCallback(() => {
17
18
  onChange?.(input);
18
19
  ref?.current?.blur();
19
20
  onChangeEnd?.(input);
20
- };
21
+ });
22
+ const handleReset = useEventCallback(() => setInput(value || ""));
23
+ const dirty = value !== input;
24
+ const resetText = texts?.reset || "Reset";
25
+ const submitText = texts?.submit || "Submit";
26
+ const suffix = useMemo(() => dirty ? /* @__PURE__ */ jsxs(FlexBasic_default, {
27
+ horizontal: true,
28
+ gap: 2,
29
+ style: {
30
+ marginRight: -4,
31
+ zIndex: 1
32
+ },
33
+ children: [/* @__PURE__ */ jsx(ActionIcon, {
34
+ icon: RotateCcw,
35
+ size: "small",
36
+ title: resetText,
37
+ onClick: (e) => {
38
+ e.preventDefault();
39
+ handleReset();
40
+ }
41
+ }), /* @__PURE__ */ jsx(ActionIcon, {
42
+ icon: submitIcon || Save,
43
+ size: "small",
44
+ title: submitText,
45
+ variant: "filled",
46
+ onClick: (e) => {
47
+ e.preventDefault();
48
+ handleUpload();
49
+ }
50
+ })]
51
+ }) : /* @__PURE__ */ jsx("span", {}), [
52
+ dirty,
53
+ handleReset,
54
+ handleUpload,
55
+ resetText,
56
+ submitIcon,
57
+ submitText
58
+ ]);
21
59
  return /* @__PURE__ */ jsx(Input_default, {
22
60
  autoFocus: true,
23
61
  ref,
62
+ suffix,
24
63
  value: input,
25
64
  style: {
26
65
  width: "100%",
27
66
  ...style
28
67
  },
29
- suffix: value === input ? /* @__PURE__ */ jsx("span", {}) : /* @__PURE__ */ jsxs(FlexBasic_default, {
30
- horizontal: true,
31
- gap: 2,
32
- style: {
33
- marginRight: -4,
34
- zIndex: 1
35
- },
36
- children: [/* @__PURE__ */ jsx(ActionIcon, {
37
- icon: RotateCcw,
38
- size: "small",
39
- title: texts?.reset || "Reset",
40
- onClick: (e) => {
41
- e.preventDefault();
42
- setInput(value || "");
43
- }
44
- }), /* @__PURE__ */ jsx(ActionIcon, {
45
- icon: submitIcon || Save,
46
- size: "small",
47
- title: texts?.submit || "Submit",
48
- variant: "filled",
49
- onClick: (e) => {
50
- e.preventDefault();
51
- handleUpload();
52
- }
53
- })]
54
- }),
55
68
  onFocus,
56
69
  onChange: (e) => {
57
70
  setInput(e.target.value);