@lobehub/ui 6.0.0-beta.4 → 6.0.0-beta.6

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 (286) hide show
  1. package/es/ActionIcon/style.mjs +1 -1
  2. package/es/ActionIcon/style.mjs.map +1 -1
  3. package/es/Anchor/Anchor.mjs +2 -2
  4. package/es/Anchor/Anchor.mjs.map +1 -1
  5. package/es/Carousel/Carousel.mjs +1 -1
  6. package/es/Carousel/Carousel.mjs.map +1 -1
  7. package/es/CodeDiff/CodeDiff.mjs.map +1 -1
  8. package/es/CodeDiff/PatchDiff.mjs.map +1 -1
  9. package/es/CodeDiff/theme.mjs.map +1 -1
  10. package/es/CodeDiff/type.d.mts +2 -2
  11. package/es/CodeEditor/CodeEditor.mjs +1 -1
  12. package/es/CodeEditor/CodeEditor.mjs.map +1 -1
  13. package/es/ColorPicker/ColorPicker.mjs +1 -1
  14. package/es/ColorPicker/ColorPicker.mjs.map +1 -1
  15. package/es/ColorSwatches/ColorSwatches.mjs +18 -23
  16. package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
  17. package/es/ColorSwatches/CustomPicker.mjs +101 -0
  18. package/es/ColorSwatches/CustomPicker.mjs.map +1 -0
  19. package/es/ColorSwatches/index.d.mts +2 -2
  20. package/es/ColorSwatches/marker.stylex.mjs +9 -0
  21. package/es/ColorSwatches/marker.stylex.mjs.map +1 -0
  22. package/es/ColorSwatches/style.mjs +36 -0
  23. package/es/ColorSwatches/style.mjs.map +1 -1
  24. package/es/ColorSwatches/type.d.mts +9 -0
  25. package/es/ConfigProvider/cdnAssets.mjs +6 -0
  26. package/es/ConfigProvider/cdnAssets.mjs.map +1 -0
  27. package/es/ConfigProvider/index.mjs +2 -1
  28. package/es/ConfigProvider/index.mjs.map +1 -1
  29. package/es/ContextMenu/store.d.mts +0 -1
  30. package/es/ContextMenu/store.mjs.map +1 -1
  31. package/es/DatePicker/DatePicker.mjs +1 -1
  32. package/es/DatePicker/DatePicker.mjs.map +1 -1
  33. package/es/DatePicker/DateRangePicker.mjs +1 -1
  34. package/es/DatePicker/DateRangePicker.mjs.map +1 -1
  35. package/es/DraggablePanel/atoms.mjs +1 -1
  36. package/es/DraggablePanel/atoms.mjs.map +1 -1
  37. package/es/DraggableSideNav/DraggableSideNav.mjs +2 -2
  38. package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
  39. package/es/Drawer/atoms.mjs +1 -1
  40. package/es/Drawer/atoms.mjs.map +1 -1
  41. package/es/DropdownMenu/atoms.mjs +1 -1
  42. package/es/DropdownMenu/atoms.mjs.map +1 -1
  43. package/es/EditableText/ControlInput.mjs +42 -29
  44. package/es/EditableText/ControlInput.mjs.map +1 -1
  45. package/es/EditableText/EditableText.mjs +1 -1
  46. package/es/EditableText/EditableText.mjs.map +1 -1
  47. package/es/EmojiPicker/EmojiPicker.mjs +3 -9
  48. package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
  49. package/es/EmojiPicker/useEmojiMartI18n.mjs +37 -0
  50. package/es/EmojiPicker/useEmojiMartI18n.mjs.map +1 -0
  51. package/es/FormKit/engine/tanstack.mjs +1 -1
  52. package/es/FormKit/engine/tanstack.mjs.map +1 -1
  53. package/es/Grid/style.mjs +1 -1
  54. package/es/Grid/style.mjs.map +1 -1
  55. package/es/HotkeyInput/HotkeyInput.mjs +1 -1
  56. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  57. package/es/Image/type.d.mts +1 -0
  58. package/es/Image/viewer/ImageViewer.mjs +2 -1
  59. package/es/Image/viewer/ImageViewer.mjs.map +1 -1
  60. package/es/Image/viewer/Toolbar.mjs +19 -6
  61. package/es/Image/viewer/Toolbar.mjs.map +1 -1
  62. package/es/Image/viewer/ViewerChrome.mjs.map +1 -1
  63. package/es/ImageSelect/ImageSelect.mjs +1 -1
  64. package/es/ImageSelect/ImageSelect.mjs.map +1 -1
  65. package/es/Input/Input.mjs +7 -5
  66. package/es/Input/Input.mjs.map +1 -1
  67. package/es/Input/TextArea.mjs +1 -1
  68. package/es/Input/TextArea.mjs.map +1 -1
  69. package/es/Input/style.mjs +3 -3
  70. package/es/Input/style.mjs.map +1 -1
  71. package/es/Modal/atoms.mjs +3 -3
  72. package/es/Modal/atoms.mjs.map +1 -1
  73. package/es/Pagination/Pagination.mjs +1 -1
  74. package/es/Pagination/Pagination.mjs.map +1 -1
  75. package/es/Popover/PopoverInGroup.mjs +1 -1
  76. package/es/Popover/PopoverInGroup.mjs.map +1 -1
  77. package/es/Popover/atoms.mjs +1 -1
  78. package/es/Popover/atoms.mjs.map +1 -1
  79. package/es/Rate/Rate.mjs +1 -1
  80. package/es/Rate/Rate.mjs.map +1 -1
  81. package/es/ScrollShadow/ScrollShadow.mjs +1 -1
  82. package/es/ScrollShadow/ScrollShadow.mjs.map +1 -1
  83. package/es/SearchBar/SearchBar.mjs +31 -25
  84. package/es/SearchBar/SearchBar.mjs.map +1 -1
  85. package/es/Segmented/Segmented.mjs +1 -1
  86. package/es/Segmented/Segmented.mjs.map +1 -1
  87. package/es/Select/atoms.mjs +1 -1
  88. package/es/Select/atoms.mjs.map +1 -1
  89. package/es/Switch/atoms.mjs +1 -1
  90. package/es/Switch/atoms.mjs.map +1 -1
  91. package/es/Tabs/Tabs.mjs +35 -21
  92. package/es/Tabs/Tabs.mjs.map +1 -1
  93. package/es/ToggleGroup/ToggleGroup.mjs +1 -1
  94. package/es/ToggleGroup/ToggleGroup.mjs.map +1 -1
  95. package/es/Tooltip/TooltipInGroup.mjs +1 -1
  96. package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
  97. package/es/Tooltip/TooltipStandalone.mjs +1 -1
  98. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  99. package/es/Tree/Tree.mjs +1 -1
  100. package/es/Tree/Tree.mjs.map +1 -1
  101. package/es/awesome/Giscus/style.mjs +9 -9
  102. package/es/awesome/Giscus/style.mjs.map +1 -1
  103. package/es/awesome/Grainient/Grainient.d.mts +11 -0
  104. package/es/awesome/Grainient/Grainient.mjs +314 -0
  105. package/es/awesome/Grainient/Grainient.mjs.map +1 -0
  106. package/es/awesome/Grainient/index.d.mts +3 -0
  107. package/es/awesome/Grainient/style.mjs +23 -0
  108. package/es/awesome/Grainient/style.mjs.map +1 -0
  109. package/es/awesome/Grainient/type.d.mts +121 -0
  110. package/es/awesome/GridBackground/GridBackground.mjs +1 -1
  111. package/es/awesome/GridBackground/GridBackground.mjs.map +1 -1
  112. package/es/awesome/GridBackground/GridShowcase.mjs +4 -4
  113. package/es/awesome/GridBackground/GridShowcase.mjs.map +1 -1
  114. package/es/awesome/Spline/ParentSize.mjs +1 -1
  115. package/es/awesome/Spline/ParentSize.mjs.map +1 -1
  116. package/es/awesome/index.d.mts +4 -1
  117. package/es/awesome/index.mjs +2 -1
  118. package/es/chat/BackBottom/BackBottom.mjs +1 -1
  119. package/es/chat/BackBottom/BackBottom.mjs.map +1 -1
  120. package/es/chat/BackBottom/type.d.mts +2 -2
  121. package/es/chat/EditableMessage/EditableMessage.mjs +1 -1
  122. package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
  123. package/es/chat/EditableMessageList/EditableMessageList.mjs +1 -1
  124. package/es/chat/EditableMessageList/EditableMessageList.mjs.map +1 -1
  125. package/es/chat/EditableMessageList/messageReducer.mjs +30 -23
  126. package/es/chat/EditableMessageList/messageReducer.mjs.map +1 -1
  127. package/es/chat/MessageModal/MessageModal.mjs +1 -1
  128. package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
  129. package/es/chat/TokenTag/TokenTag.mjs +2 -3
  130. package/es/chat/TokenTag/TokenTag.mjs.map +1 -1
  131. package/es/dashboard/AuthLayout/Aside.d.mts +10 -0
  132. package/es/dashboard/AuthLayout/Aside.mjs +31 -0
  133. package/es/dashboard/AuthLayout/Aside.mjs.map +1 -0
  134. package/es/dashboard/AuthLayout/AuthLayout.d.mts +3 -1
  135. package/es/dashboard/AuthLayout/AuthLayout.mjs +93 -37
  136. package/es/dashboard/AuthLayout/AuthLayout.mjs.map +1 -1
  137. package/es/dashboard/AuthLayout/index.d.mts +3 -2
  138. package/es/dashboard/AuthLayout/style.mjs +98 -1
  139. package/es/dashboard/AuthLayout/style.mjs.map +1 -1
  140. package/es/dashboard/AuthLayout/type.d.mts +38 -2
  141. package/es/dashboard/AuthTools/AuthLocaleSwitch.d.mts +10 -0
  142. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs +33 -0
  143. package/es/dashboard/AuthTools/AuthLocaleSwitch.mjs.map +1 -0
  144. package/es/dashboard/AuthTools/AuthThemeSwitch.d.mts +10 -0
  145. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs +59 -0
  146. package/es/dashboard/AuthTools/AuthThemeSwitch.mjs.map +1 -0
  147. package/es/dashboard/AuthTools/index.d.mts +4 -0
  148. package/es/dashboard/AuthTools/style.mjs +27 -0
  149. package/es/dashboard/AuthTools/style.mjs.map +1 -0
  150. package/es/dashboard/AuthTools/type.d.mts +29 -0
  151. package/es/dashboard/ChartGrid/ChartGrid.d.mts +10 -0
  152. package/es/dashboard/ChartGrid/ChartGrid.mjs +19 -0
  153. package/es/dashboard/ChartGrid/ChartGrid.mjs.map +1 -0
  154. package/es/dashboard/ChartGrid/index.d.mts +3 -0
  155. package/es/dashboard/ChartGrid/style.mjs +18 -0
  156. package/es/dashboard/ChartGrid/style.mjs.map +1 -0
  157. package/es/dashboard/ChartGrid/type.d.mts +8 -0
  158. package/es/dashboard/ConsoleNav/Skeleton.d.mts +15 -0
  159. package/es/dashboard/ConsoleNav/Skeleton.mjs +82 -0
  160. package/es/dashboard/ConsoleNav/Skeleton.mjs.map +1 -0
  161. package/es/dashboard/ConsoleNav/index.d.mts +3 -2
  162. package/es/dashboard/ConsoleNav/style.mjs +18 -0
  163. package/es/dashboard/ConsoleNav/style.mjs.map +1 -1
  164. package/es/dashboard/ConsoleNav/type.d.mts +13 -0
  165. package/es/dashboard/ConsoleShell/ConsoleShell.d.mts +1 -1
  166. package/es/dashboard/ConsoleShell/ConsoleShell.mjs +26 -6
  167. package/es/dashboard/ConsoleShell/ConsoleShell.mjs.map +1 -1
  168. package/es/dashboard/ConsoleShell/style.mjs +10 -0
  169. package/es/dashboard/ConsoleShell/style.mjs.map +1 -1
  170. package/es/dashboard/ConsoleShell/type.d.mts +11 -0
  171. package/es/dashboard/FilterSidebar/FilterSidebar.mjs +18 -17
  172. package/es/dashboard/FilterSidebar/FilterSidebar.mjs.map +1 -1
  173. package/es/dashboard/FilterStrip/FilterStrip.d.mts +11 -0
  174. package/es/dashboard/FilterStrip/FilterStrip.mjs +55 -0
  175. package/es/dashboard/FilterStrip/FilterStrip.mjs.map +1 -0
  176. package/es/dashboard/FilterStrip/index.d.mts +3 -0
  177. package/es/dashboard/FilterStrip/style.mjs +78 -0
  178. package/es/dashboard/FilterStrip/style.mjs.map +1 -0
  179. package/es/dashboard/FilterStrip/type.d.mts +25 -0
  180. package/es/dashboard/LabelWithKey/LabelWithKey.d.mts +10 -0
  181. package/es/dashboard/LabelWithKey/LabelWithKey.mjs +18 -0
  182. package/es/dashboard/LabelWithKey/LabelWithKey.mjs.map +1 -0
  183. package/es/dashboard/LabelWithKey/index.d.mts +3 -0
  184. package/es/dashboard/LabelWithKey/type.d.mts +11 -0
  185. package/es/dashboard/MetricStrip/MetricCell.mjs +81 -0
  186. package/es/dashboard/MetricStrip/MetricCell.mjs.map +1 -0
  187. package/es/dashboard/MetricStrip/MetricStrip.d.mts +13 -0
  188. package/es/dashboard/MetricStrip/MetricStrip.mjs +47 -0
  189. package/es/dashboard/MetricStrip/MetricStrip.mjs.map +1 -0
  190. package/es/dashboard/MetricStrip/index.d.mts +3 -0
  191. package/es/dashboard/MetricStrip/style.mjs +156 -0
  192. package/es/dashboard/MetricStrip/style.mjs.map +1 -0
  193. package/es/dashboard/MetricStrip/type.d.mts +36 -0
  194. package/es/dashboard/PageSkeleton/PageSkeleton.mjs +20 -18
  195. package/es/dashboard/PageSkeleton/PageSkeleton.mjs.map +1 -1
  196. package/es/dashboard/PageSkeleton/style.mjs +1 -1
  197. package/es/dashboard/PageSkeleton/style.mjs.map +1 -1
  198. package/es/dashboard/PageToolbar/PageToolbar.d.mts +10 -0
  199. package/es/dashboard/PageToolbar/PageToolbar.mjs +22 -0
  200. package/es/dashboard/PageToolbar/PageToolbar.mjs.map +1 -0
  201. package/es/dashboard/PageToolbar/index.d.mts +3 -0
  202. package/es/dashboard/PageToolbar/style.mjs +36 -0
  203. package/es/dashboard/PageToolbar/style.mjs.map +1 -0
  204. package/es/dashboard/PageToolbar/type.d.mts +11 -0
  205. package/es/dashboard/PanelSurface/PanelSurface.d.mts +10 -0
  206. package/es/dashboard/PanelSurface/PanelSurface.mjs +40 -0
  207. package/es/dashboard/PanelSurface/PanelSurface.mjs.map +1 -0
  208. package/es/dashboard/PanelSurface/index.d.mts +3 -0
  209. package/es/dashboard/PanelSurface/style.mjs +25 -0
  210. package/es/dashboard/PanelSurface/style.mjs.map +1 -0
  211. package/es/dashboard/PanelSurface/type.d.mts +17 -0
  212. package/es/dashboard/Section/Section.d.mts +10 -0
  213. package/es/dashboard/Section/Section.mjs +81 -0
  214. package/es/dashboard/Section/Section.mjs.map +1 -0
  215. package/es/dashboard/Section/index.d.mts +3 -0
  216. package/es/dashboard/Section/style.mjs +31 -0
  217. package/es/dashboard/Section/style.mjs.map +1 -0
  218. package/es/dashboard/Section/type.d.mts +23 -0
  219. package/es/dashboard/StatCard/StatCard.d.mts +2 -1
  220. package/es/dashboard/StatCard/StatCard.mjs +28 -91
  221. package/es/dashboard/StatCard/StatCard.mjs.map +1 -1
  222. package/es/dashboard/StatCard/type.d.mts +16 -5
  223. package/es/dashboard/Surface/Surface.d.mts +4 -3
  224. package/es/dashboard/Surface/Surface.mjs +91 -8
  225. package/es/dashboard/Surface/Surface.mjs.map +1 -1
  226. package/es/dashboard/Surface/index.d.mts +3 -2
  227. package/es/dashboard/Surface/link.d.mts +16 -0
  228. package/es/dashboard/Surface/link.mjs +40 -0
  229. package/es/dashboard/Surface/link.mjs.map +1 -0
  230. package/es/dashboard/Surface/marker.stylex.mjs +9 -0
  231. package/es/dashboard/Surface/marker.stylex.mjs.map +1 -0
  232. package/es/dashboard/Surface/style.d.mts +2 -0
  233. package/es/dashboard/Surface/style.mjs +155 -14
  234. package/es/dashboard/Surface/style.mjs.map +1 -1
  235. package/es/dashboard/Surface/type.d.mts +29 -1
  236. package/es/dashboard/TableIconActions/TableIconActions.d.mts +17 -0
  237. package/es/dashboard/TableIconActions/TableIconActions.mjs +39 -0
  238. package/es/dashboard/TableIconActions/TableIconActions.mjs.map +1 -0
  239. package/es/dashboard/TableIconActions/index.d.mts +3 -0
  240. package/es/dashboard/TableIconActions/type.d.mts +17 -0
  241. package/es/dashboard/TitleWithTips/TitleWithTips.d.mts +10 -0
  242. package/es/dashboard/TitleWithTips/TitleWithTips.mjs +28 -0
  243. package/es/dashboard/TitleWithTips/TitleWithTips.mjs.map +1 -0
  244. package/es/dashboard/TitleWithTips/index.d.mts +3 -0
  245. package/es/dashboard/TitleWithTips/type.d.mts +10 -0
  246. package/es/dashboard/index.d.mts +38 -4
  247. package/es/dashboard/index.mjs +17 -3
  248. package/es/hooks/useControlledState.mjs +20 -0
  249. package/es/hooks/useControlledState.mjs.map +1 -0
  250. package/es/hooks/useHighlight.mjs +2 -2
  251. package/es/hooks/useHighlight.mjs.map +1 -1
  252. package/es/hooks/useHover.mjs +22 -0
  253. package/es/hooks/useHover.mjs.map +1 -0
  254. package/es/hooks/useScroll.d.mts +8 -0
  255. package/es/hooks/useScroll.mjs +33 -0
  256. package/es/hooks/useScroll.mjs.map +1 -0
  257. package/es/hooks/useSize.mjs +26 -0
  258. package/es/hooks/useSize.mjs.map +1 -0
  259. package/es/internal/virtual/VirtualScrollArea.mjs +1 -1
  260. package/es/internal/virtual/VirtualScrollArea.mjs.map +1 -1
  261. package/es/mobile/ChatInputArea/ChatInputArea.mjs +1 -1
  262. package/es/mobile/ChatInputArea/ChatInputArea.mjs.map +1 -1
  263. package/es/mobile/TabBar/TabBar.mjs +1 -1
  264. package/es/mobile/TabBar/TabBar.mjs.map +1 -1
  265. package/es/node_modules/.pnpm/@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.mts +2 -46
  266. package/es/node_modules/.pnpm/@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.mts +1 -1
  267. package/es/node_modules/.pnpm/@types_estree@1.0.9/node_modules/@types/estree/index.d.mts +1 -4
  268. 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 +1 -1
  269. package/es/style.css +339 -32
  270. package/es/styles/theme/token/neutral.mjs +5 -5
  271. package/es/styles/theme/token/neutral.mjs.map +1 -1
  272. package/es/utils/colorMath.mjs +52 -0
  273. package/es/utils/colorMath.mjs.map +1 -0
  274. package/es/utils/formatNumber.mjs +7 -0
  275. package/es/utils/formatNumber.mjs.map +1 -0
  276. package/es/utils/genCdnUrl.mjs +6 -3
  277. package/es/utils/genCdnUrl.mjs.map +1 -1
  278. package/es/utils/hashString.mjs +19 -0
  279. package/es/utils/hashString.mjs.map +1 -0
  280. package/es/utils/mergeRefs.mjs +20 -0
  281. package/es/utils/mergeRefs.mjs.map +1 -0
  282. package/es/utils/placement.d.mts +5 -5
  283. package/es/utils/placement.mjs.map +1 -1
  284. package/package.json +16 -42
  285. package/es/dashboard/StatCard/style.mjs +0 -105
  286. package/es/dashboard/StatCard/style.mjs.map +0 -1
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { styleProps } from "../../styles/stylex/props.mjs";
3
3
  import FlexBasic_default from "../../Flex/FlexBasic.mjs";
4
+ import { useControlledState } from "../../hooks/useControlledState.mjs";
4
5
  import SafeArea from "../SafeArea/SafeArea.mjs";
5
6
  import { styles } from "./style.mjs";
6
7
  import { memo } from "react";
7
8
  import { jsx, jsxs } from "react/jsx-runtime";
8
9
  import * as stylex from "@stylexjs/stylex";
9
- import useControlledState from "use-merge-value";
10
10
  //#region src/mobile/TabBar/TabBar.tsx
11
11
  const TabBar = memo(({ ref, className, safeArea, items, activeKey, defaultActiveKey, onChange, ...rest }) => {
12
12
  const [currentActive, setCurrentActive] = useControlledState(defaultActiveKey || items[0].key, {
@@ -1 +1 @@
1
- {"version":3,"file":"TabBar.mjs","names":["useMergeState","Flexbox"],"sources":["../../../src/mobile/TabBar/TabBar.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\nimport useMergeState from 'use-merge-value';\n\nimport { Flexbox } from '@/Flex';\nimport SafeArea from '@/mobile/SafeArea';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { styles } from './style';\nimport type { TabBarProps } from './type';\n\nconst TabBar = memo<TabBarProps>(\n ({ ref, className, safeArea, items, activeKey, defaultActiveKey, onChange, ...rest }) => {\n const [currentActive, setCurrentActive] = useMergeState<string>(\n defaultActiveKey || items[0].key,\n {\n defaultValue: defaultActiveKey,\n onChange,\n value: activeKey,\n },\n );\n\n return (\n <Flexbox\n as={'footer'}\n flex={'none'}\n ref={ref}\n width={'100vw'}\n {...styleProps(styles.container, className)}\n {...rest}\n >\n <Flexbox\n horizontal\n align={'center'}\n height={48}\n justify={'space-around'}\n {...styleProps(styles.inner, className)}\n >\n {items.map((item) => {\n const active = item.key === currentActive;\n return (\n <Flexbox\n align={'center'}\n gap={4}\n height={48}\n justify={'center'}\n key={item.key}\n width={48}\n {...stylex.props(styles.tab, active && styles.active)}\n onClick={() => {\n setCurrentActive(item.key);\n item?.onClick?.();\n }}\n >\n <Flexbox\n align={'center'}\n height={24}\n justify={'center'}\n width={24}\n {...stylex.props(styles.icon)}\n >\n {typeof item.icon === 'function' ? item.icon(active) : item.icon}\n </Flexbox>\n <div {...stylex.props(styles.title)}>\n {typeof item.title === 'function' ? item.title(active) : item.title}\n </div>\n </Flexbox>\n );\n })}\n </Flexbox>\n {safeArea && <SafeArea position={'bottom'} />}\n </Flexbox>\n );\n },\n);\n\nTabBar.displayName = 'MobileTabBar';\n\nexport default TabBar;\n"],"mappings":";;;;;;;;;;AAUA,MAAM,SAAS,MAAmB,EAChC,KACA,WACA,UACA,OACA,WACA,kBACA,UACA,GAAG,WACC;CACJ,MAAM,CAAC,eAAe,oBAAoBA,mBAAsB,oBAAoB,MAAM,EAAE,CAAC,KAAK;EAChG,cAAc;EACd;EACA,OAAO;CACT,CAAC;CACD,OAAO,qBAACC,mBAAD;EAAS,IAAI;EAAU,MAAM;EAAa;EAAK,OAAO;EAAS,GAAI,WAAW,OAAO,WAAW,SAAS;EAAG,GAAI;EAAhH,UAAA,CACD,oBAACA,mBAAD;GAAS,YAAA;GAAW,OAAO;GAAU,QAAQ;GAAI,SAAS;GAAgB,GAAI,WAAW,OAAO,OAAO,SAAS;GAC7G,UAAA,MAAM,KAAI,SAAQ;IACrB,MAAM,SAAS,KAAK,QAAQ;IAC5B,OAAO,qBAACA,mBAAD;KAAS,OAAO;KAAU,KAAK;KAAG,QAAQ;KAAI,SAAS;KAAyB,OAAO;KAAI,GAAI,OAAO,MAAM,OAAO,KAAK,UAAU,OAAO,MAAM;KAAG,eAAe;MACtK,iBAAiB,KAAK,GAAG;MACzB,MAAM,UAAU;KAClB;KAHO,UAAA,CAIC,oBAACA,mBAAD;MAAS,OAAO;MAAU,QAAQ;MAAI,SAAS;MAAU,OAAO;MAAI,GAAI,OAAO,MAAM,OAAO,IAAI;MAC7F,UAAA,OAAO,KAAK,SAAS,aAAa,KAAK,KAAK,MAAM,IAAI,KAAK;KACrD,CAAA,GACT,oBAAC,OAAD;MAAK,GAAI,OAAO,MAAM,OAAO,KAAK;MAC/B,UAAA,OAAO,KAAK,UAAU,aAAa,KAAK,MAAM,MAAM,IAAI,KAAK;KAC3D,CAAA,CACE;IAV8D,GAAA,KAAK,GAUnE;GACjB,CAAC;EACU,CAAA,GACR,YAAY,oBAAC,UAAD,EAAU,UAAU,SAAW,CAAA,CACrC;;AACf,CAAC;AACD,OAAO,cAAc"}
1
+ {"version":3,"file":"TabBar.mjs","names":["Flexbox"],"sources":["../../../src/mobile/TabBar/TabBar.tsx"],"sourcesContent":["'use client';\n\nimport * as stylex from '@stylexjs/stylex';\nimport { memo } from 'react';\n\nimport { Flexbox } from '@/Flex';\nimport { useControlledState } from '@/hooks/useControlledState';\nimport SafeArea from '@/mobile/SafeArea';\nimport { styleProps } from '@/styles/stylex/props';\n\nimport { styles } from './style';\nimport type { TabBarProps } from './type';\n\nconst TabBar = memo<TabBarProps>(\n ({ ref, className, safeArea, items, activeKey, defaultActiveKey, onChange, ...rest }) => {\n const [currentActive, setCurrentActive] = useControlledState<string>(\n defaultActiveKey || items[0].key,\n {\n defaultValue: defaultActiveKey,\n onChange,\n value: activeKey,\n },\n );\n\n return (\n <Flexbox\n as={'footer'}\n flex={'none'}\n ref={ref}\n width={'100vw'}\n {...styleProps(styles.container, className)}\n {...rest}\n >\n <Flexbox\n horizontal\n align={'center'}\n height={48}\n justify={'space-around'}\n {...styleProps(styles.inner, className)}\n >\n {items.map((item) => {\n const active = item.key === currentActive;\n return (\n <Flexbox\n align={'center'}\n gap={4}\n height={48}\n justify={'center'}\n key={item.key}\n width={48}\n {...stylex.props(styles.tab, active && styles.active)}\n onClick={() => {\n setCurrentActive(item.key);\n item?.onClick?.();\n }}\n >\n <Flexbox\n align={'center'}\n height={24}\n justify={'center'}\n width={24}\n {...stylex.props(styles.icon)}\n >\n {typeof item.icon === 'function' ? item.icon(active) : item.icon}\n </Flexbox>\n <div {...stylex.props(styles.title)}>\n {typeof item.title === 'function' ? item.title(active) : item.title}\n </div>\n </Flexbox>\n );\n })}\n </Flexbox>\n {safeArea && <SafeArea position={'bottom'} />}\n </Flexbox>\n );\n },\n);\n\nTabBar.displayName = 'MobileTabBar';\n\nexport default TabBar;\n"],"mappings":";;;;;;;;;;AAUA,MAAM,SAAS,MAAmB,EAChC,KACA,WACA,UACA,OACA,WACA,kBACA,UACA,GAAG,WACC;CACJ,MAAM,CAAC,eAAe,oBAAoB,mBAA2B,oBAAoB,MAAM,EAAE,CAAC,KAAK;EACrG,cAAc;EACd;EACA,OAAO;CACT,CAAC;CACD,OAAO,qBAACA,mBAAD;EAAS,IAAI;EAAU,MAAM;EAAa;EAAK,OAAO;EAAS,GAAI,WAAW,OAAO,WAAW,SAAS;EAAG,GAAI;EAAhH,UAAA,CACD,oBAACA,mBAAD;GAAS,YAAA;GAAW,OAAO;GAAU,QAAQ;GAAI,SAAS;GAAgB,GAAI,WAAW,OAAO,OAAO,SAAS;GAC7G,UAAA,MAAM,KAAI,SAAQ;IACrB,MAAM,SAAS,KAAK,QAAQ;IAC5B,OAAO,qBAACA,mBAAD;KAAS,OAAO;KAAU,KAAK;KAAG,QAAQ;KAAI,SAAS;KAAyB,OAAO;KAAI,GAAI,OAAO,MAAM,OAAO,KAAK,UAAU,OAAO,MAAM;KAAG,eAAe;MACtK,iBAAiB,KAAK,GAAG;MACzB,MAAM,UAAU;KAClB;KAHO,UAAA,CAIC,oBAACA,mBAAD;MAAS,OAAO;MAAU,QAAQ;MAAI,SAAS;MAAU,OAAO;MAAI,GAAI,OAAO,MAAM,OAAO,IAAI;MAC7F,UAAA,OAAO,KAAK,SAAS,aAAa,KAAK,KAAK,MAAM,IAAI,KAAK;KACrD,CAAA,GACT,oBAAC,OAAD;MAAK,GAAI,OAAO,MAAM,OAAO,KAAK;MAC/B,UAAA,OAAO,KAAK,UAAU,aAAa,KAAK,MAAM,MAAM,IAAI,KAAK;KAC3D,CAAA,CACE;IAV8D,GAAA,KAAK,GAUnE;GACjB,CAAC;EACU,CAAA,GACR,YAAY,oBAAC,UAAD,EAAU,UAAU,SAAW,CAAA,CACrC;;AACf,CAAC;AACD,OAAO,cAAc"}
@@ -1,7 +1,5 @@
1
1
  import { JSONSchema4 } from "../../../../../../@types_json-schema@7.0.15/node_modules/@types/json-schema/index.mjs";
2
- declare namespace types_d_exports {
3
- export { BaseConfig, BinarySourceCode, CallTraversalStep, ConfigObject, ConfigOverride, CustomRuleDefinitionType, CustomRuleTypeDefinitions, DeprecatedInfo, Directive, DirectiveType, EcmaVersion, EnvironmentConfig, ExternalSpecifier, File, FileError, FileProblem, GlobalAccess, GlobalsConfig, HasRules, JavaScriptParserOptionsConfig, JavaScriptSourceType, Language, LanguageContext, LanguageOptions, LanguageTypeOptions, LegacyConfigObject, LintMessage, LintSuggestion, LinterOptionsConfig, MessagePlaceholderData, NotOkParseResult, ObjectMetaProperties, OkParseResult, ParseResult, Plugin, Position, PositionWithOffset, Processor, ProcessorFile, ReplacedByInfo, RuleConfig, RuleContext, RuleContextTypeOptions, RuleDefinition, RuleDefinitionTypeOptions, RuleFixType, RuleFixer, RuleTextEdit, RuleTextEditor, RuleType, RuleVisitor, RulesConfig, RulesMeta, RulesMetaDocs, SettingsConfig, Severity, SeverityLevel, SeverityName, SourceCode, SourceCodeBaseTypeOptions, SourceLocation, SourceLocationWithOffset, SourceRange, SuggestedEdit, SuggestedEditBase, SuggestionMessage, TextSourceCode, TraversalStep, ViolationLocation, ViolationMessage, ViolationReport, ViolationReportBase, VisitTraversalStep };
4
- }
2
+ //#region node_modules/.pnpm/@eslint+core@1.2.1/node_modules/@eslint/core/dist/esm/types.d.ts
5
3
  /**
6
4
  * Represents an error inside of a file.
7
5
  */
@@ -27,13 +25,6 @@ export interface SourceLocation {
27
25
  start: Position;
28
26
  end: Position;
29
27
  }
30
- /**
31
- * Represents the start and end coordinates of a node inside the source with an offset.
32
- */
33
- export interface SourceLocationWithOffset {
34
- start: PositionWithOffset;
35
- end: PositionWithOffset;
36
- }
37
28
  /**
38
29
  * Represents a location coordinate inside the source. ESLint-style formats
39
30
  * have just `line` and `column` while others may have `offset` as well.
@@ -42,12 +33,6 @@ export interface Position {
42
33
  line: number;
43
34
  column: number;
44
35
  }
45
- /**
46
- * Represents a location coordinate inside the source with an offset.
47
- */
48
- export interface PositionWithOffset extends Position {
49
- offset: number;
50
- }
51
36
  /**
52
37
  * Represents a range of characters in the source.
53
38
  */
@@ -472,35 +457,6 @@ export interface RuleDefinition<Options extends RuleDefinitionTypeOptions = Rule
472
457
  MessageIds: Options["MessageIds"];
473
458
  }>): Options["Visitor"];
474
459
  }
475
- /**
476
- * Defaults for non-language-related `RuleDefinition` options.
477
- * @deprecated Use the same type from `@eslint/plugin-kit` instead.
478
- */
479
- export interface CustomRuleTypeDefinitions {
480
- RuleOptions: unknown[];
481
- MessageIds: string;
482
- ExtRuleDocs: Record<string, unknown>;
483
- }
484
- /**
485
- * A helper type to define language specific specializations of the `RuleDefinition` type.
486
- * @deprecated Use the same type from `@eslint/plugin-kit` instead.
487
- *
488
- * @example
489
- * ```ts
490
- * type YourRuleDefinition<
491
- * Options extends Partial<CustomRuleTypeDefinitions> = {},
492
- * > = CustomRuleDefinitionType<
493
- * {
494
- * LangOptions: YourLanguageOptions;
495
- * Code: YourSourceCode;
496
- * Visitor: YourRuleVisitor;
497
- * Node: YourNode;
498
- * },
499
- * Options
500
- * >;
501
- * ```
502
- */
503
- export type CustomRuleDefinitionType<LanguageSpecificOptions extends Omit<RuleDefinitionTypeOptions, keyof CustomRuleTypeDefinitions>, Options extends Partial<CustomRuleTypeDefinitions>> = RuleDefinition<LanguageSpecificOptions & Required<Options & Omit<CustomRuleTypeDefinitions, keyof Options>>>;
504
460
  /**
505
461
  * The human readable severity level used in a configuration.
506
462
  */
@@ -1157,5 +1113,5 @@ export interface Directive {
1157
1113
  justification?: string;
1158
1114
  }
1159
1115
  //#endregion
1160
- export { types_d_exports };
1116
+ export {};
1161
1117
  //# sourceMappingURL=types.d.mts.map
@@ -1,4 +1,4 @@
1
- import { RuleVisitor as RuleVisitor$1, types_d_exports } from "../../../../../../@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.mjs";
1
+ import { RuleVisitor as RuleVisitor$1 } from "../../../../../../@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.mjs";
2
2
  import { CustomRuleVisitorWithExit as CustomRuleVisitorWithExit$1 } from "./types.mjs";
3
3
  //#region node_modules/.pnpm/@eslint+plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts
4
4
  export type RuleVisitor = RuleVisitor$1;
@@ -1,6 +1,4 @@
1
- declare namespace index_d_exports {
2
- export { ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentOperator, AssignmentPattern, AssignmentProperty, AwaitExpression, BaseCallExpression, BaseClass, BaseDeclaration, BaseExpression, BaseForXStatement, BaseFunction, BaseModuleDeclaration, BaseModuleSpecifier, BaseNode, BaseNodeWithoutComments, BasePattern, BaseStatement, BigIntLiteral, BinaryExpression, BinaryOperator, BlockStatement, BreakStatement, CallExpression, CatchClause, ChainElement, ChainExpression, Class, ClassBody, ClassDeclaration, ClassExpression, Comment, ConditionalExpression, ContinueStatement, DebuggerStatement, Declaration, Directive, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, ExportSpecifier, Expression, ExpressionMap, ExpressionStatement, ForInStatement, ForOfStatement, ForStatement, Function, FunctionDeclaration, FunctionExpression, Identifier, IfStatement, ImportAttribute, ImportDeclaration, ImportDefaultSpecifier, ImportExpression, ImportNamespaceSpecifier, ImportSpecifier, LabeledStatement, Literal, LogicalExpression, LogicalOperator, MaybeNamedClassDeclaration, MaybeNamedFunctionDeclaration, MemberExpression, MetaProperty, MethodDefinition, ModuleDeclaration, ModuleSpecifier, NewExpression, Node, NodeMap, ObjectExpression, ObjectPattern, Pattern, Position, PrivateIdentifier, Program, Property, PropertyDefinition, RegExpLiteral, RestElement, ReturnStatement, SequenceExpression, SimpleCallExpression, SimpleLiteral, SourceLocation, SpreadElement, Statement, StaticBlock, Super, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateElement, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, UnaryExpression, UnaryOperator, UpdateExpression, UpdateOperator, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression };
3
- }
1
+ //#region node_modules/.pnpm/@types+estree@1.0.9/node_modules/@types/estree/index.d.ts
4
2
  // This definition file follows a somewhat unusual format. ESTree allows
5
3
  // runtime type checks based on the `type` parameter. In order to explain this
6
4
  // to typescript we want to use discriminated union types:
@@ -526,5 +524,4 @@ export interface AwaitExpression extends BaseExpression {
526
524
  argument: Expression;
527
525
  }
528
526
  //#endregion
529
- export { index_d_exports };
530
527
  //# sourceMappingURL=index.d.mts.map
@@ -1,4 +1,4 @@
1
- import { ArrowFunctionExpression, AssignmentExpression, BaseNode, CatchClause, ClassDeclaration, ClassExpression, Comment, Expression, ForInStatement, ForOfStatement, FunctionDeclaration, FunctionExpression, Identifier, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, Node as Node$1, Position, Program, SourceLocation as SourceLocation$1, VariableDeclaration, VariableDeclarator, index_d_exports } from "../../../../../@types_estree@1.0.9/node_modules/@types/estree/index.mjs";
1
+ import { ArrowFunctionExpression, AssignmentExpression, BaseNode, CatchClause, ClassDeclaration, ClassExpression, Comment, Expression, ForInStatement, ForOfStatement, FunctionDeclaration, FunctionExpression, Identifier, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, Node as Node$1, Position, Program, SourceLocation as SourceLocation$1, VariableDeclaration, VariableDeclarator } from "../../../../../@types_estree@1.0.9/node_modules/@types/estree/index.mjs";
2
2
  import { BaseConfig, ConfigObject, ConfigOverride, DeprecatedInfo, EcmaVersion as EcmaVersion$1, EnvironmentConfig, GlobalAccess, GlobalsConfig, HasRules, JavaScriptSourceType, LanguageOptions, LegacyConfigObject, LintMessage as LintMessage$1, LintSuggestion, LinterOptionsConfig, ObjectMetaProperties, Plugin as Plugin$1, Processor, ProcessorFile as ProcessorFile$1, RuleConfig, RuleContext as RuleContext$1, RuleDefinition, RuleFixer, RuleTextEdit, RuleTextEditor, RulesConfig, RulesMeta, Severity, SeverityLevel, SeverityName, SourceRange, SuggestedEdit, SuggestedEditBase, SuggestionMessage, TextSourceCode, TraversalStep, ViolationLocation, ViolationMessage, ViolationReport, ViolationReportBase } from "../../../../../@eslint_core@1.2.1/node_modules/@eslint/core/dist/esm/types.mjs";
3
3
  import { CustomRuleVisitorWithExit } from "../../../../../@eslint_plugin-kit@0.7.3/node_modules/@eslint/plugin-kit/dist/cjs/index.mjs";
4
4
  //#region node_modules/.pnpm/eslint@10.12.0_jiti@2.6.1_supports-color@10.2.2/node_modules/eslint/lib/types/index.d.ts