@once-ui-system/core 1.7.11 → 1.7.12

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 (325) hide show
  1. package/ai/catalog.json +1650 -0
  2. package/ai/catalog.seed.json +411 -0
  3. package/ai/components/Accordion.json +136 -0
  4. package/ai/components/AccordionGroup.json +128 -0
  5. package/ai/components/Animation.json +146 -0
  6. package/ai/components/Arrow.json +128 -0
  7. package/ai/components/AutoScroll.json +130 -0
  8. package/ai/components/Avatar.json +133 -0
  9. package/ai/components/AvatarGroup.json +129 -0
  10. package/ai/components/Background.json +131 -0
  11. package/ai/components/Badge.json +132 -0
  12. package/ai/components/Banner.json +122 -0
  13. package/ai/components/BarChart.json +123 -0
  14. package/ai/components/BlobFx.json +125 -0
  15. package/ai/components/BlockQuote.json +132 -0
  16. package/ai/components/Button.json +26 -0
  17. package/ai/components/Card.json +129 -0
  18. package/ai/components/Carousel.json +134 -0
  19. package/ai/components/CelebrationFx.json +132 -0
  20. package/ai/components/ChartHeader.json +130 -0
  21. package/ai/components/ChartStatus.json +12 -0
  22. package/ai/components/Checkbox.json +13 -0
  23. package/ai/components/Chip.json +132 -0
  24. package/ai/components/CodeBlock.json +122 -0
  25. package/ai/components/ColorInput.json +13 -0
  26. package/ai/components/Column.json +128 -0
  27. package/ai/components/CompareImage.json +126 -0
  28. package/ai/components/ContextMenu.json +22 -0
  29. package/ai/components/CountFx.json +82 -0
  30. package/ai/components/CountdownFx.json +11 -0
  31. package/ai/components/Cursor.json +9 -0
  32. package/ai/components/CursorCard.json +128 -0
  33. package/ai/components/DataTooltip.json +15 -0
  34. package/ai/components/DateInput.json +21 -0
  35. package/ai/components/DatePicker.json +143 -0
  36. package/ai/components/DateRangeInput.json +18 -0
  37. package/ai/components/DateRangePicker.json +129 -0
  38. package/ai/components/Dialog.json +134 -0
  39. package/ai/components/DialogProvider.json +8 -0
  40. package/ai/components/Dropdown.json +128 -0
  41. package/ai/components/DropdownWrapper.json +28 -0
  42. package/ai/components/EmojiPicker.json +129 -0
  43. package/ai/components/EmojiPickerDropdown.json +13 -0
  44. package/ai/components/Fade.json +130 -0
  45. package/ai/components/FadingLettersFx.json +77 -0
  46. package/ai/components/Feedback.json +132 -0
  47. package/ai/components/Flex.json +125 -0
  48. package/ai/components/FlipFx.json +133 -0
  49. package/ai/components/GlitchFx.json +128 -0
  50. package/ai/components/Grid.json +121 -0
  51. package/ai/components/Heading.json +75 -0
  52. package/ai/components/HeadingLink.json +127 -0
  53. package/ai/components/HeadingNav.json +124 -0
  54. package/ai/components/HoloFx.json +128 -0
  55. package/ai/components/Hover.json +130 -0
  56. package/ai/components/HoverCard.json +122 -0
  57. package/ai/components/Icon.json +132 -0
  58. package/ai/components/IconButton.json +22 -0
  59. package/ai/components/InfiniteScroll.json +130 -0
  60. package/ai/components/InlineCode.json +126 -0
  61. package/ai/components/Input.json +24 -0
  62. package/ai/components/InteractiveDetails.json +14 -0
  63. package/ai/components/Kbar.json +10 -0
  64. package/ai/components/Kbd.json +127 -0
  65. package/ai/components/Legend.json +14 -0
  66. package/ai/components/LetterFx.json +14 -0
  67. package/ai/components/Line.json +125 -0
  68. package/ai/components/LineBarChart.json +123 -0
  69. package/ai/components/LineChart.json +123 -0
  70. package/ai/components/LinearGauge.json +130 -0
  71. package/ai/components/LinearGradient.json +15 -0
  72. package/ai/components/List.json +127 -0
  73. package/ai/components/ListItem.json +77 -0
  74. package/ai/components/Logo.json +16 -0
  75. package/ai/components/LogoCloud.json +124 -0
  76. package/ai/components/Mask.json +131 -0
  77. package/ai/components/MasonryGrid.json +132 -0
  78. package/ai/components/MatrixFx.json +135 -0
  79. package/ai/components/Media.json +142 -0
  80. package/ai/components/MediaUpload.json +122 -0
  81. package/ai/components/MegaMenu.json +125 -0
  82. package/ai/components/MobileMegaMenu.json +125 -0
  83. package/ai/components/Modal.json +12 -0
  84. package/ai/components/NavIcon.json +127 -0
  85. package/ai/components/NumberInput.json +16 -0
  86. package/ai/components/OTPInput.json +13 -0
  87. package/ai/components/OgCard.json +135 -0
  88. package/ai/components/Option.json +137 -0
  89. package/ai/components/Particle.json +135 -0
  90. package/ai/components/PasswordInput.json +8 -0
  91. package/ai/components/PieChart.json +123 -0
  92. package/ai/components/ProgressBar.json +131 -0
  93. package/ai/components/Pulse.json +129 -0
  94. package/ai/components/RadialGauge.json +134 -0
  95. package/ai/components/RadialGradient.json +16 -0
  96. package/ai/components/RadioButton.json +17 -0
  97. package/ai/components/RevealFx.json +131 -0
  98. package/ai/components/Row.json +128 -0
  99. package/ai/components/Schema.json +17 -0
  100. package/ai/components/ScrollContainer.json +126 -0
  101. package/ai/components/ScrollToTop.json +124 -0
  102. package/ai/components/Scroller.json +128 -0
  103. package/ai/components/SegmentedControl.json +132 -0
  104. package/ai/components/Select.json +21 -0
  105. package/ai/components/ShineFx.json +80 -0
  106. package/ai/components/Skeleton.json +129 -0
  107. package/ai/components/Slider.json +17 -0
  108. package/ai/components/SmartLink.json +17 -0
  109. package/ai/components/Spinner.json +127 -0
  110. package/ai/components/SplitView.json +129 -0
  111. package/ai/components/StatusIndicator.json +128 -0
  112. package/ai/components/StyleOverlay.json +126 -0
  113. package/ai/components/StylePanel.json +125 -0
  114. package/ai/components/Swiper.json +130 -0
  115. package/ai/components/Switch.json +20 -0
  116. package/ai/components/Table.json +125 -0
  117. package/ai/components/Tag.json +129 -0
  118. package/ai/components/TagInput.json +12 -0
  119. package/ai/components/Text.json +72 -0
  120. package/ai/components/Textarea.json +24 -0
  121. package/ai/components/ThemeSwitcher.json +122 -0
  122. package/ai/components/TiltFx.json +126 -0
  123. package/ai/components/Timeline.json +126 -0
  124. package/ai/components/Toast.json +13 -0
  125. package/ai/components/Toaster.json +14 -0
  126. package/ai/components/ToggleButton.json +24 -0
  127. package/ai/components/Tooltip.json +129 -0
  128. package/ai/components/TypeFx.json +15 -0
  129. package/ai/components/User.json +15 -0
  130. package/ai/components/UserMenu.json +16 -0
  131. package/ai/components/WeatherFx.json +133 -0
  132. package/ai/examples/auth.tsx +105 -0
  133. package/ai/examples/blocks/Background6.tsx +25 -0
  134. package/ai/examples/blocks/Chat1.tsx +70 -0
  135. package/ai/examples/blocks/Dashboard1.tsx +404 -0
  136. package/ai/examples/blocks/Feed3.tsx +151 -0
  137. package/ai/examples/blocks/Footer1.tsx +30 -0
  138. package/ai/examples/blocks/Footer2.tsx +96 -0
  139. package/ai/examples/blocks/Footer3.tsx +127 -0
  140. package/ai/examples/blocks/Footer4.tsx +406 -0
  141. package/ai/examples/blocks/Header1.tsx +370 -0
  142. package/ai/examples/blocks/Header2.tsx +98 -0
  143. package/ai/examples/blocks/Header3.tsx +133 -0
  144. package/ai/examples/blocks/Header4.tsx +123 -0
  145. package/ai/examples/blocks/Productivity1.tsx +318 -0
  146. package/ai/examples/blocks/Roadmap1.tsx +133 -0
  147. package/ai/examples/blocks/Sidebar1.tsx +34 -0
  148. package/ai/examples/blocks/Sidebar2.tsx +17 -0
  149. package/ai/examples/blocks/Sidebar4.tsx +92 -0
  150. package/ai/examples/blocks/Sidebar5.tsx +73 -0
  151. package/ai/examples/blocks/Streaming1.tsx +353 -0
  152. package/ai/examples/blocks/Table1.tsx +303 -0
  153. package/ai/examples/blocks/Waitlist1.tsx +141 -0
  154. package/ai/examples/blocks/content/chat1content.ts +65 -0
  155. package/ai/examples/blocks/content/resources.ts +5 -0
  156. package/ai/examples/blocks/content/roadmap1content.ts +51 -0
  157. package/ai/examples/blocks/manifest.json +191 -0
  158. package/ai/examples/dashboard.tsx +150 -0
  159. package/ai/examples/marketing-hero.tsx +152 -0
  160. package/ai/examples/pricing.tsx +219 -0
  161. package/ai/examples/settings.tsx +140 -0
  162. package/ai/gotchas.json +85 -0
  163. package/ai/manifest.json +21 -0
  164. package/ai/rules.compact.md +73 -0
  165. package/ai/spec.json +2679 -2701
  166. package/ai/tasks/auth.json +23 -0
  167. package/ai/tasks/chat.json +28 -0
  168. package/ai/tasks/dashboard.json +39 -0
  169. package/ai/tasks/index.json +12 -0
  170. package/ai/tasks/marketing-hero.json +38 -0
  171. package/ai/tasks/pricing.json +42 -0
  172. package/ai/tasks/roadmap.json +22 -0
  173. package/ai/tasks/settings.json +34 -0
  174. package/dist/ai/catalog.json +1650 -0
  175. package/dist/ai/catalog.seed.json +411 -0
  176. package/dist/ai/components/Accordion.json +136 -0
  177. package/dist/ai/components/AccordionGroup.json +128 -0
  178. package/dist/ai/components/Animation.json +146 -0
  179. package/dist/ai/components/Arrow.json +128 -0
  180. package/dist/ai/components/AutoScroll.json +130 -0
  181. package/dist/ai/components/Avatar.json +133 -0
  182. package/dist/ai/components/AvatarGroup.json +129 -0
  183. package/dist/ai/components/Background.json +131 -0
  184. package/dist/ai/components/Badge.json +132 -0
  185. package/dist/ai/components/Banner.json +122 -0
  186. package/dist/ai/components/BarChart.json +123 -0
  187. package/dist/ai/components/BlobFx.json +125 -0
  188. package/dist/ai/components/BlockQuote.json +132 -0
  189. package/dist/ai/components/Button.json +26 -0
  190. package/dist/ai/components/Card.json +129 -0
  191. package/dist/ai/components/Carousel.json +134 -0
  192. package/dist/ai/components/CelebrationFx.json +132 -0
  193. package/dist/ai/components/ChartHeader.json +130 -0
  194. package/dist/ai/components/ChartStatus.json +12 -0
  195. package/dist/ai/components/Checkbox.json +13 -0
  196. package/dist/ai/components/Chip.json +132 -0
  197. package/dist/ai/components/CodeBlock.json +122 -0
  198. package/dist/ai/components/ColorInput.json +13 -0
  199. package/dist/ai/components/Column.json +128 -0
  200. package/dist/ai/components/CompareImage.json +126 -0
  201. package/dist/ai/components/ContextMenu.json +22 -0
  202. package/dist/ai/components/CountFx.json +82 -0
  203. package/dist/ai/components/CountdownFx.json +11 -0
  204. package/dist/ai/components/Cursor.json +9 -0
  205. package/dist/ai/components/CursorCard.json +128 -0
  206. package/dist/ai/components/DataTooltip.json +15 -0
  207. package/dist/ai/components/DateInput.json +21 -0
  208. package/dist/ai/components/DatePicker.json +143 -0
  209. package/dist/ai/components/DateRangeInput.json +18 -0
  210. package/dist/ai/components/DateRangePicker.json +129 -0
  211. package/dist/ai/components/Dialog.json +134 -0
  212. package/dist/ai/components/DialogProvider.json +8 -0
  213. package/dist/ai/components/Dropdown.json +128 -0
  214. package/dist/ai/components/DropdownWrapper.json +28 -0
  215. package/dist/ai/components/EmojiPicker.json +129 -0
  216. package/dist/ai/components/EmojiPickerDropdown.json +13 -0
  217. package/dist/ai/components/Fade.json +130 -0
  218. package/dist/ai/components/FadingLettersFx.json +77 -0
  219. package/dist/ai/components/Feedback.json +132 -0
  220. package/dist/ai/components/Flex.json +125 -0
  221. package/dist/ai/components/FlipFx.json +133 -0
  222. package/dist/ai/components/GlitchFx.json +128 -0
  223. package/dist/ai/components/Grid.json +121 -0
  224. package/dist/ai/components/Heading.json +75 -0
  225. package/dist/ai/components/HeadingLink.json +127 -0
  226. package/dist/ai/components/HeadingNav.json +124 -0
  227. package/dist/ai/components/HoloFx.json +128 -0
  228. package/dist/ai/components/Hover.json +130 -0
  229. package/dist/ai/components/HoverCard.json +122 -0
  230. package/dist/ai/components/Icon.json +132 -0
  231. package/dist/ai/components/IconButton.json +22 -0
  232. package/dist/ai/components/InfiniteScroll.json +130 -0
  233. package/dist/ai/components/InlineCode.json +126 -0
  234. package/dist/ai/components/Input.json +24 -0
  235. package/dist/ai/components/InteractiveDetails.json +14 -0
  236. package/dist/ai/components/Kbar.json +10 -0
  237. package/dist/ai/components/Kbd.json +127 -0
  238. package/dist/ai/components/Legend.json +14 -0
  239. package/dist/ai/components/LetterFx.json +14 -0
  240. package/dist/ai/components/Line.json +125 -0
  241. package/dist/ai/components/LineBarChart.json +123 -0
  242. package/dist/ai/components/LineChart.json +123 -0
  243. package/dist/ai/components/LinearGauge.json +130 -0
  244. package/dist/ai/components/LinearGradient.json +15 -0
  245. package/dist/ai/components/List.json +127 -0
  246. package/dist/ai/components/ListItem.json +77 -0
  247. package/dist/ai/components/Logo.json +16 -0
  248. package/dist/ai/components/LogoCloud.json +124 -0
  249. package/dist/ai/components/Mask.json +131 -0
  250. package/dist/ai/components/MasonryGrid.json +132 -0
  251. package/dist/ai/components/MatrixFx.json +135 -0
  252. package/dist/ai/components/Media.json +142 -0
  253. package/dist/ai/components/MediaUpload.json +122 -0
  254. package/dist/ai/components/MegaMenu.json +125 -0
  255. package/dist/ai/components/MobileMegaMenu.json +125 -0
  256. package/dist/ai/components/Modal.json +12 -0
  257. package/dist/ai/components/NavIcon.json +127 -0
  258. package/dist/ai/components/NumberInput.json +16 -0
  259. package/dist/ai/components/OTPInput.json +13 -0
  260. package/dist/ai/components/OgCard.json +135 -0
  261. package/dist/ai/components/Option.json +137 -0
  262. package/dist/ai/components/Particle.json +135 -0
  263. package/dist/ai/components/PasswordInput.json +8 -0
  264. package/dist/ai/components/PieChart.json +123 -0
  265. package/dist/ai/components/ProgressBar.json +131 -0
  266. package/dist/ai/components/Pulse.json +129 -0
  267. package/dist/ai/components/RadialGauge.json +134 -0
  268. package/dist/ai/components/RadialGradient.json +16 -0
  269. package/dist/ai/components/RadioButton.json +17 -0
  270. package/dist/ai/components/RevealFx.json +131 -0
  271. package/dist/ai/components/Row.json +128 -0
  272. package/dist/ai/components/Schema.json +17 -0
  273. package/dist/ai/components/ScrollContainer.json +126 -0
  274. package/dist/ai/components/ScrollToTop.json +124 -0
  275. package/dist/ai/components/Scroller.json +128 -0
  276. package/dist/ai/components/SegmentedControl.json +132 -0
  277. package/dist/ai/components/Select.json +21 -0
  278. package/dist/ai/components/ShineFx.json +80 -0
  279. package/dist/ai/components/Skeleton.json +129 -0
  280. package/dist/ai/components/Slider.json +17 -0
  281. package/dist/ai/components/SmartLink.json +17 -0
  282. package/dist/ai/components/Spinner.json +127 -0
  283. package/dist/ai/components/SplitView.json +129 -0
  284. package/dist/ai/components/StatusIndicator.json +128 -0
  285. package/dist/ai/components/StyleOverlay.json +126 -0
  286. package/dist/ai/components/StylePanel.json +125 -0
  287. package/dist/ai/components/Swiper.json +130 -0
  288. package/dist/ai/components/Switch.json +20 -0
  289. package/dist/ai/components/Table.json +125 -0
  290. package/dist/ai/components/Tag.json +129 -0
  291. package/dist/ai/components/TagInput.json +12 -0
  292. package/dist/ai/components/Text.json +72 -0
  293. package/dist/ai/components/Textarea.json +24 -0
  294. package/dist/ai/components/ThemeSwitcher.json +122 -0
  295. package/dist/ai/components/TiltFx.json +126 -0
  296. package/dist/ai/components/Timeline.json +126 -0
  297. package/dist/ai/components/Toast.json +13 -0
  298. package/dist/ai/components/Toaster.json +14 -0
  299. package/dist/ai/components/ToggleButton.json +24 -0
  300. package/dist/ai/components/Tooltip.json +129 -0
  301. package/dist/ai/components/TypeFx.json +15 -0
  302. package/dist/ai/components/User.json +15 -0
  303. package/dist/ai/components/UserMenu.json +16 -0
  304. package/dist/ai/components/WeatherFx.json +133 -0
  305. package/dist/ai/eval-tasks.md +71 -0
  306. package/dist/ai/examples/blocks/manifest.json +191 -0
  307. package/dist/ai/gotchas.json +85 -0
  308. package/dist/ai/manifest.json +21 -0
  309. package/dist/ai/recipes.md +149 -0
  310. package/dist/ai/rules.compact.md +73 -0
  311. package/dist/ai/rules.md +217 -0
  312. package/dist/ai/spec.json +2680 -0
  313. package/dist/ai/tasks/auth.json +23 -0
  314. package/dist/ai/tasks/chat.json +28 -0
  315. package/dist/ai/tasks/dashboard.json +39 -0
  316. package/dist/ai/tasks/index.json +12 -0
  317. package/dist/ai/tasks/marketing-hero.json +38 -0
  318. package/dist/ai/tasks/pricing.json +42 -0
  319. package/dist/ai/tasks/roadmap.json +22 -0
  320. package/dist/ai/tasks/settings.json +34 -0
  321. package/dist/data/emoji-data.json +0 -18
  322. package/dist/package.json +13 -2
  323. package/package.json +139 -127
  324. package/LICENSE.md +0 -21
  325. package/next-env.d.ts +0 -5
@@ -0,0 +1,105 @@
1
+ "use client";
2
+
3
+ /**
4
+ * Gold example: auth
5
+ * Target: split sign-up — media hero left, form right, social auth buttons
6
+ */
7
+ import {
8
+ Button,
9
+ Column,
10
+ Grid,
11
+ Heading,
12
+ Input,
13
+ Line,
14
+ Media,
15
+ PasswordInput,
16
+ Row,
17
+ SmartLink,
18
+ Text,
19
+ } from "@once-ui-system/core";
20
+
21
+ export function AuthExample() {
22
+ return (
23
+ <Column as="main" fillWidth center padding="24" minHeight="100vh">
24
+ <Grid
25
+ fillWidth
26
+ maxWidth="l"
27
+ columns="2"
28
+ radius="xl"
29
+ border="neutral-alpha-weak"
30
+ overflow="hidden"
31
+ background="surface"
32
+ s={{ columns: 1 }}
33
+ >
34
+ <Column minHeight={40} s={{ hide: true }}>
35
+ <Media
36
+ fill
37
+ fillHeight
38
+ aspectRatio="4 / 5"
39
+ src="/images/cover.jpg"
40
+ alt=""
41
+ radius="none"
42
+ />
43
+ <Column
44
+ position="absolute"
45
+ bottom="0"
46
+ left="0"
47
+ fillWidth
48
+ padding="32"
49
+ gap="8"
50
+ background="overlay"
51
+ >
52
+ <Heading as="h2" variant="display-strong-xs" onBackground="neutral-strong">
53
+ Explore new dimensions. Code with curiosity.
54
+ </Heading>
55
+ </Column>
56
+ </Column>
57
+
58
+ <Column padding="48" gap="32" center>
59
+ <Column fillWidth gap="8" horizontal="center">
60
+ <Heading as="h1" variant="display-strong-xs" align="center">
61
+ Create your account
62
+ </Heading>
63
+ <Text variant="body-default-s" onBackground="neutral-weak" align="center">
64
+ Already have an account?{" "}
65
+ <SmartLink href="/login">Sign in</SmartLink>
66
+ </Text>
67
+ </Column>
68
+
69
+ <Column fillWidth gap="12">
70
+ <Button fillWidth>
71
+ Continue with GitHub
72
+ </Button>
73
+ <Button fillWidth variant="secondary">
74
+ Continue with Google
75
+ </Button>
76
+ </Column>
77
+
78
+ <Row fillWidth vertical="center" gap="16">
79
+ <Line fill />
80
+ <Text variant="label-default-s" onBackground="neutral-weak">
81
+ or
82
+ </Text>
83
+ <Line fill />
84
+ </Row>
85
+
86
+ <Column fillWidth gap="16">
87
+ <Input id="email" label="Email" placeholder="you@company.com" />
88
+ <PasswordInput id="password" label="Password" placeholder="••••••••" />
89
+ <Row fillWidth horizontal="end">
90
+ <SmartLink href="/forgot">Forgot password?</SmartLink>
91
+ </Row>
92
+ <Button fillWidth arrowIcon>
93
+ Sign up
94
+ </Button>
95
+ </Column>
96
+
97
+ <Row gap="16" wrap horizontal="center">
98
+ <SmartLink href="/privacy">Privacy policy</SmartLink>
99
+ <SmartLink href="/terms">Terms of use</SmartLink>
100
+ </Row>
101
+ </Column>
102
+ </Grid>
103
+ </Column>
104
+ );
105
+ }
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ import { Background } from "@once-ui-system/core";
4
+
5
+ /** Ambient hero background — glow + dots (Waitlist1 pattern) */
6
+ export const Background6 = () => (
7
+ <Background
8
+ position="absolute"
9
+ top="0"
10
+ left="0"
11
+ fill
12
+ pointerEvents="none"
13
+ gradient={{
14
+ display: true,
15
+ colorStart: "brand-alpha-medium",
16
+ colorEnd: "static-transparent",
17
+ x: 50,
18
+ y: 0,
19
+ width: 150,
20
+ height: 80,
21
+ opacity: 60,
22
+ }}
23
+ dots={{ display: true, color: "neutral-alpha-weak", size: "2", opacity: 40 }}
24
+ />
25
+ );
@@ -0,0 +1,70 @@
1
+ "use client";
2
+
3
+ import { Row, Avatar, Text, Column } from "@once-ui-system/core";
4
+ import { Feed3 } from "./Feed3";
5
+ import { Sidebar4 } from "./Sidebar4";
6
+ import { Sidebar5 } from "./Sidebar5";
7
+ import { Table1 } from "./Table1";
8
+ import { chatMembers } from "./content/chat1content";
9
+ import { useState } from "react";
10
+
11
+ export const Chat1 = () => {
12
+ const [activeItem, setActiveItem] = useState<string | undefined>(undefined);
13
+
14
+ const membersData = chatMembers.flatMap((section) =>
15
+ (section.members ?? []).map((m) => ({
16
+ ...m,
17
+ group: section.title,
18
+ }))
19
+ );
20
+
21
+ const membersColumns = [
22
+ {
23
+ key: "member",
24
+ title: <Text variant="label-default-s">Member</Text>,
25
+ render: (item: any) => (
26
+ <Row fillWidth gap="12" vertical="center">
27
+ <Avatar src={item.avatar || undefined} />
28
+ <Column fillWidth>
29
+ <Text variant="label-default-s">{item.name}</Text>
30
+ <Text variant="body-default-xs" onBackground="neutral-weak" truncate>{item.status}</Text>
31
+ </Column>
32
+ </Row>
33
+ ),
34
+ },
35
+ {
36
+ key: "group",
37
+ title: <Text variant="label-default-s">Role</Text>,
38
+ render: (item: any) => <Text variant="label-default-s" onBackground="neutral-weak">{item.group}</Text>,
39
+ },
40
+ {
41
+ key: "status",
42
+ title: <Text variant="label-default-s">Bio</Text>,
43
+ render: (item: any) => <Text variant="label-default-s" onBackground="neutral-weak" truncate>{item.bio || "—"}</Text>,
44
+ },
45
+ ];
46
+
47
+ return (
48
+ <Row fill>
49
+ <Sidebar4 activeItem={activeItem} onSelectItem={setActiveItem}/>
50
+ {activeItem === "Members" ? (
51
+ <Row fillWidth padding="24">
52
+ <Table1
53
+ fitHeight
54
+ background="surface"
55
+ data={membersData}
56
+ columns={membersColumns}
57
+ selectable
58
+ getId={(i: any) => i.name}
59
+ heading={<Text variant="label-default-m">Members</Text>}
60
+ showSearch
61
+ filterFn={(item: any, q: string) => [item.name, item.status, item.bio, item.group].filter(Boolean).some((v: string) => v.toLowerCase().includes(q))}
62
+ />
63
+ </Row>
64
+ ) : (
65
+ <Feed3/>
66
+ )}
67
+ <Sidebar5/>
68
+ </Row>
69
+ )
70
+ }
@@ -0,0 +1,404 @@
1
+ "use client";
2
+
3
+ import React from "react";
4
+ import {
5
+ Column,
6
+ Row,
7
+ Card,
8
+ Heading,
9
+ Text,
10
+ Grid,
11
+ Avatar,
12
+ Button,
13
+ Scroller,
14
+ StatusIndicator,
15
+ Icon,
16
+ LineChart
17
+ } from "@once-ui-system/core";
18
+ import { Sidebar1 } from "./Sidebar1";
19
+ import { Header1 } from "./Header1";
20
+ import { Table1 } from "./Table1";
21
+ import type { TableColumn } from "./Table1";
22
+ import { useMemo } from "react";
23
+
24
+ interface StatCardProps {
25
+ title: string;
26
+ value: string;
27
+ change: string;
28
+ positive?: boolean;
29
+ href?: string;
30
+ }
31
+
32
+ const StatCard: React.FC<StatCardProps> = ({ title, value, change, positive = true, href }) => {
33
+ const sparkData = useMemo(() => {
34
+ const dates = [
35
+ "2025-01-01",
36
+ "2025-01-02",
37
+ "2025-01-03",
38
+ "2025-01-04",
39
+ "2025-01-05",
40
+ "2025-01-06",
41
+ "2025-01-07",
42
+ ];
43
+ const rand = (min: number, max: number) => Math.floor(Math.random() * (max - min + 1)) + min;
44
+ return dates.map((date) => ({
45
+ date,
46
+ "Current period": rand(0, 1500),
47
+ } as { date: string; "Current period": number }));
48
+ }, [positive]);
49
+
50
+ return (
51
+ <Card minWidth={12} href={href} paddingX="20" paddingTop="20" paddingBottom="80" radius="l" fillWidth direction="column" border="neutral-alpha-weak" background="transparent">
52
+ <LineChart
53
+ pointerEvents="none"
54
+ position="absolute"
55
+ opacity={30}
56
+ left="0"
57
+ bottom="0"
58
+ height={6}
59
+ border="transparent"
60
+ axis="none"
61
+ tooltip={false}
62
+ legend={{display: false}}
63
+ grid="none"
64
+ series={[
65
+ { key: "Current period", color: positive ? "green" : "red" },
66
+ ]}
67
+ data={sparkData}
68
+ />
69
+ <Column fillWidth gap="12">
70
+ <Row vertical="center" gap="12">
71
+ <Row fillWidth textVariant="label-default-s" onBackground="neutral-medium">
72
+ {title}
73
+ </Row>
74
+ <Row gap="8" vertical="center" onBackground={positive ? "success-weak" : "danger-weak"}>
75
+ <Icon size="xs" name={positive ? "trendUp" : "trendDown"}/>
76
+ <Text variant="body-default-xs">{change}</Text>
77
+ </Row>
78
+ </Row>
79
+ <Heading variant="display-strong-xs">
80
+ {value}
81
+ </Heading>
82
+ </Column>
83
+ </Card>
84
+ );
85
+ };
86
+
87
+ interface ActivityItemProps {
88
+ avatar: string;
89
+ action: string;
90
+ time: string;
91
+ href?: string;
92
+ icon: string;
93
+ }
94
+
95
+ const ActivityItem: React.FC<ActivityItemProps> = ({ avatar, action, time, href, icon }) => (
96
+ <Row fillWidth borderBottom="neutral-alpha-weak">
97
+ <Card direction="column" fitHeight href={href} background="transparent" border="transparent" fillWidth>
98
+ <Row fillWidth horizontal="between" paddingX="24" height="64" vertical="center">
99
+ <Column fillWidth gap="8">
100
+ <Text variant="body-default-s">
101
+ {action}
102
+ </Text>
103
+ <Row vertical="center" gap="12" data-scaling="90">
104
+ <Avatar size="xs" src={avatar} />
105
+ <Text variant="label-default-s" onBackground="neutral-weak">
106
+ {time}
107
+ </Text>
108
+ </Row>
109
+ </Column>
110
+ <Icon name={icon} size="xs" onBackground="neutral-weak"/>
111
+ </Row>
112
+ </Card>
113
+ </Row>
114
+ );
115
+
116
+ interface StatusItemProps {
117
+ name: string;
118
+ status: string;
119
+ href?: string;
120
+ icon: string;
121
+ }
122
+
123
+ const StatusItem: React.FC<StatusItemProps> = ({ name, status, icon, href = "#" }) => (
124
+ <Row fillWidth borderBottom="neutral-alpha-weak">
125
+ <Card direction="column" background="transparent" href={href} border="transparent" fillWidth>
126
+ <Row fillWidth horizontal="between" height="64" vertical="center" paddingX="24">
127
+ <Row vertical="center" gap="12">
128
+ <Icon name={icon} size="xs" onBackground="neutral-weak"/>
129
+ <Text variant="body-default-s">
130
+ {name}
131
+ </Text>
132
+ </Row>
133
+ <Row vertical="center" gap="12">
134
+ <Text variant="body-default-xs" onBackground="neutral-weak">{status}</Text>
135
+ <StatusIndicator color={getStatusVariant(status)}/>
136
+ </Row>
137
+ </Row>
138
+ </Card>
139
+ </Row>
140
+ );
141
+
142
+ const getStatusVariant = (status: string): "green" | "yellow" | "red" | "gray" => {
143
+ switch (status.toLowerCase()) {
144
+ case "on track":
145
+ return "green";
146
+ case "at risk":
147
+ return "red";
148
+ case "delayed":
149
+ return "gray";
150
+ default:
151
+ return "gray";
152
+ }
153
+ };
154
+
155
+ export const Dashboard1: React.FC = () => {
156
+ const ordersData = [
157
+ { id: "#1024", customer: { name: "Lorant", avatar: "/images/creators/lorant.jpg" }, date: "2025-01-18", total: "$129.00", shipping: "Shipped", method: "UPS Ground" },
158
+ { id: "#1023", customer: { name: "Divyanshu", avatar: "/images/creators/div.jpg" }, date: "2025-01-17", total: "$349.00", shipping: "Processing", method: "DHL Express" },
159
+ { id: "#1022", customer: { name: "Justin", avatar: "/images/creators/justin.jpg" }, date: "2025-01-16", total: "$79.00", shipping: "Delivered", method: "USPS" },
160
+ { id: "#1021", customer: { name: "Vincent", avatar: "/images/creators/vincent.jpg" }, date: "2025-01-15", total: "$559.00", shipping: "Cancelled", method: "—" },
161
+ { id: "#1020", customer: { name: "Texz", avatar: "/images/creators/texz.jpg" }, date: "2025-01-14", total: "$219.00", shipping: "Pending", method: "FedEx" },
162
+ ];
163
+
164
+ const orderColumns: TableColumn<any>[] = [
165
+ {
166
+ key: "order",
167
+ title: <Text variant="label-default-s">Order</Text>,
168
+ render: (item: any) => (
169
+ <Row gap="12" vertical="center">
170
+ <Text variant="label-default-s">{item.id}</Text>
171
+ </Row>
172
+ ),
173
+ },
174
+ {
175
+ key: "customer",
176
+ title: <Text variant="label-default-s">Customer</Text>,
177
+ render: (item: any) => (
178
+ <Row gap="12" vertical="center">
179
+ <Avatar size="xs" src={item.customer?.avatar} />
180
+ <Text variant="label-default-s">{item.customer?.name}</Text>
181
+ </Row>
182
+ ),
183
+ },
184
+ {
185
+ key: "date",
186
+ title: <Text variant="label-default-s">Date</Text>,
187
+ render: (item: any) => <Text variant="label-default-s" onBackground="neutral-weak">{item.date}</Text>,
188
+ },
189
+ {
190
+ key: "shipping",
191
+ title: <Text variant="label-default-s">Shipping</Text>,
192
+ render: (item: any) => (
193
+ <Row gap="8" vertical="center">
194
+ <Text variant="label-default-s">{item.shipping}</Text>
195
+ <Text variant="body-default-xs" onBackground="neutral-weak">{item.method}</Text>
196
+ </Row>
197
+ ),
198
+ },
199
+ {
200
+ key: "total",
201
+ title: <Text variant="label-default-s">Total</Text>,
202
+ align: "end",
203
+ render: (item: any) => <Text variant="label-default-s">{item.total}</Text>,
204
+ },
205
+ ];
206
+
207
+ return (
208
+ <Column fill>
209
+ <Header1 authenticated avatar="/images/creators/lorant.jpg" borderBottom="transparent"/>
210
+ <Row fill>
211
+ <Row m={{hide: true}} maxWidth={16} horizontal="center">
212
+ <Sidebar1 background="transparent" radius={undefined} fitHeight />
213
+ </Row>
214
+ <Row fill padding="8">
215
+ <Row fill radius="l" overflow="hidden">
216
+ <Row fill overflowY="auto" horizontal="center" paddingX="l" paddingBottom="l" background="surface">
217
+ <Column fitHeight gap="m" maxWidth="xl">
218
+ <Column fillWidth gap="4" paddingTop="l" paddingX="16">
219
+ <Row vertical="center" fillWidth horizontal="between" gap="8" wrap>
220
+ <Heading variant="display-strong-s">
221
+ Dashboard
222
+ </Heading>
223
+ <Button prefixIcon="plus" size="s" data-border="rounded">
224
+ New <Row s={{hide: true}} marginLeft="4">Project</Row>
225
+ </Button>
226
+ </Row>
227
+ <Text variant="body-default-m" onBackground="neutral-medium">
228
+ Welcome back, Alex! Here's what's happening today.
229
+ </Text>
230
+ </Column>
231
+
232
+ <Scroller fadeColor="surface">
233
+ <Row fitWidth flex={1} gap="8">
234
+ {[
235
+ { title: "Revenue", value: "$24,345", change: "12.5%", positive: true },
236
+ { title: "Visitors", value: "2,345", change: "8.3%", positive: true },
237
+ { title: "Conversion", value: "3.2%", change: "1.8%", positive: false },
238
+ { title: "Session", value: "4m 32s", change: "10.3%", positive: true },
239
+ ].map((stat, index) => (
240
+ <StatCard
241
+ key={index}
242
+ title={stat.title}
243
+ value={stat.value}
244
+ change={stat.change}
245
+ positive={stat.positive}
246
+ href="#"
247
+ />
248
+ ))}
249
+ </Row>
250
+ </Scroller>
251
+
252
+ <LineChart
253
+ minHeight={20}
254
+ border="neutral-alpha-weak"
255
+ axis="x"
256
+ grid="y"
257
+ title="Revenue growth"
258
+ description="January 2025"
259
+ date={{
260
+ start: new Date("2024-12-31"),
261
+ end: new Date("2025-01-31"),
262
+ format: "MMM dd"
263
+ }}
264
+ series={[
265
+ { key: "Current period", color: "blue" },
266
+ { key: "Previous period", color: "gray" }
267
+ ]}
268
+ data={[
269
+ { date: "2025-01-01", "Current period": 4654, "Previous period": 1365 },
270
+ { date: "2025-01-02", "Current period": 1575, "Previous period": 3457 },
271
+ { date: "2025-01-03", "Current period": 5557, "Previous period": 4355 },
272
+ { date: "2025-01-04", "Current period": 6525, "Previous period": 5252 },
273
+ { date: "2025-01-05", "Current period": 5534, "Previous period": 6453 },
274
+ { date: "2025-01-06", "Current period": 4375, "Previous period": 3347 },
275
+ { date: "2025-01-07", "Current period": 5456, "Previous period": 2245 },
276
+ { date: "2025-01-08", "Current period": 5425, "Previous period": 2142 },
277
+ { date: "2025-01-09", "Current period": 2412, "Previous period": 1041 },
278
+ { date: "2025-01-10", "Current period": 4375, "Previous period": 1137 },
279
+ { date: "2025-01-11", "Current period": 3345, "Previous period": 7234 },
280
+ { date: "2025-01-12", "Current period": 5123, "Previous period": 1312 },
281
+ { date: "2025-01-13", "Current period": 6912, "Previous period": 4291 },
282
+ { date: "2025-01-14", "Current period": 8654, "Previous period": 3165 },
283
+ { date: "2025-01-15", "Current period": 4234, "Previous period": 2023 },
284
+ { date: "2025-01-16", "Current period": 3423, "Previous period": 1142 },
285
+ { date: "2025-01-17", "Current period": 2312, "Previous period": 231 },
286
+ { date: "2025-01-18", "Current period": 1234, "Previous period": 3423 }
287
+ ]}
288
+ />
289
+
290
+ <Grid columns="2" m={{columns: 1}} gap="m" fillWidth>
291
+ <Column fillWidth border="neutral-alpha-weak" radius="l" overflow="hidden" height={20}>
292
+ <Row vertical="center" horizontal="between" fillWidth paddingLeft="24" paddingRight="12" paddingY="12" gap="m" wrap>
293
+ <Heading wrap="nowrap" variant="heading-strong-s">
294
+ Project status
295
+ </Heading>
296
+ <Row gap="4">
297
+ <Button weight="default" variant="secondary" size="s">
298
+ Weekly
299
+ </Button>
300
+ <Button weight="default" size="s">
301
+ Monthly
302
+ </Button>
303
+ <Button weight="default" variant="secondary" size="s">
304
+ Yearly
305
+ </Button>
306
+ </Row>
307
+ </Row>
308
+
309
+ <Column fillWidth border="neutral-alpha-weak" topRadius="l" overflowY="auto">
310
+ {[
311
+ { name: "Mobile App Development", status: "At Risk", icon: "code" },
312
+ { name: "Marketing Campaign", status: "On Track", icon: "sparkle" },
313
+ { name: "Database Migration", status: "On Track", icon: "code" },
314
+ { name: "Website Redesign", status: "On Track", icon: "sparkle" },
315
+ { name: "Product Launch", status: "Delayed", icon: "sparkle" },
316
+ { name: "Server Upgrade", status: "Delayed", icon: "code" },
317
+ ].map((project, index) => (
318
+ <StatusItem
319
+ key={index}
320
+ name={project.name}
321
+ status={project.status}
322
+ icon={project.icon}
323
+ />
324
+ ))}
325
+ </Column>
326
+ </Column>
327
+
328
+ <Column border="neutral-alpha-weak" radius="l" fillWidth overflow="hidden" height={20}>
329
+ <Row fillWidth vertical="center" horizontal="between" paddingLeft="24" paddingRight="12" paddingY="12" gap="16" wrap>
330
+ <Heading wrap="nowrap" variant="heading-strong-s">
331
+ Recent activity
332
+ </Heading>
333
+ <Button size="s" weight="default" variant="secondary" suffixIcon="chevronRight">
334
+ View all
335
+ </Button>
336
+ </Row>
337
+ <Column fillWidth border="neutral-alpha-weak" topRadius="l" overflowY="auto">
338
+ {[
339
+ {
340
+ avatar: "/images/creators/lorant.jpg",
341
+ action: "Completed the Website Redesign task",
342
+ time: "2 hours ago",
343
+ icon: "check"
344
+ },
345
+ {
346
+ avatar: "/images/creators/vincent.jpg",
347
+ action: "Commented on Mobile App Development",
348
+ time: "4 hours ago",
349
+ icon: "chat"
350
+ },
351
+ {
352
+ avatar: "/images/creators/zsofia.jpg",
353
+ action: "Created a new task in Marketing Campaign",
354
+ time: "Yesterday",
355
+ icon: "plus"
356
+ },
357
+ {
358
+ avatar: "/images/creators/texz.jpg",
359
+ action: "Completed 3 tasks in Product Launch",
360
+ time: "Yesterday",
361
+ icon: "check"
362
+ },
363
+ {
364
+ avatar: "/images/creators/justin.jpg",
365
+ action: "Created a new task in Marketing Campaign",
366
+ time: "2 days ago",
367
+ icon: "plus"
368
+ },
369
+ {
370
+ avatar: "/images/creators/zsofia.jpg",
371
+ action: "Completed 3 tasks in Product Launch",
372
+ time: "4 days ago",
373
+ icon: "check"
374
+ }
375
+ ].map((activity, index) => (
376
+ <ActivityItem
377
+ key={index}
378
+ avatar={activity.avatar}
379
+ action={activity.action}
380
+ time={activity.time}
381
+ icon={activity.icon}
382
+ />
383
+ ))}
384
+ </Column>
385
+ </Column>
386
+ </Grid>
387
+ <Table1
388
+ background="surface"
389
+ heading={<Text variant="label-default-m">Orders & Shipping</Text>}
390
+ data={ordersData}
391
+ columns={orderColumns}
392
+ selectable
393
+ getId={(i: any) => i.id}
394
+ showSearch
395
+ filterFn={(item: any, q: string) => [item.id, item.customer?.name, item.date, item.total, item.shipping, item.method].filter(Boolean).some((v: string) => v.toLowerCase().includes(q))}
396
+ />
397
+ </Column>
398
+ </Row>
399
+ </Row>
400
+ </Row>
401
+ </Row>
402
+ </Column>
403
+ );
404
+ };