@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.
- package/ai/catalog.json +1650 -0
- package/ai/catalog.seed.json +411 -0
- package/ai/components/Accordion.json +136 -0
- package/ai/components/AccordionGroup.json +128 -0
- package/ai/components/Animation.json +146 -0
- package/ai/components/Arrow.json +128 -0
- package/ai/components/AutoScroll.json +130 -0
- package/ai/components/Avatar.json +133 -0
- package/ai/components/AvatarGroup.json +129 -0
- package/ai/components/Background.json +131 -0
- package/ai/components/Badge.json +132 -0
- package/ai/components/Banner.json +122 -0
- package/ai/components/BarChart.json +123 -0
- package/ai/components/BlobFx.json +125 -0
- package/ai/components/BlockQuote.json +132 -0
- package/ai/components/Button.json +26 -0
- package/ai/components/Card.json +129 -0
- package/ai/components/Carousel.json +134 -0
- package/ai/components/CelebrationFx.json +132 -0
- package/ai/components/ChartHeader.json +130 -0
- package/ai/components/ChartStatus.json +12 -0
- package/ai/components/Checkbox.json +13 -0
- package/ai/components/Chip.json +132 -0
- package/ai/components/CodeBlock.json +122 -0
- package/ai/components/ColorInput.json +13 -0
- package/ai/components/Column.json +128 -0
- package/ai/components/CompareImage.json +126 -0
- package/ai/components/ContextMenu.json +22 -0
- package/ai/components/CountFx.json +82 -0
- package/ai/components/CountdownFx.json +11 -0
- package/ai/components/Cursor.json +9 -0
- package/ai/components/CursorCard.json +128 -0
- package/ai/components/DataTooltip.json +15 -0
- package/ai/components/DateInput.json +21 -0
- package/ai/components/DatePicker.json +143 -0
- package/ai/components/DateRangeInput.json +18 -0
- package/ai/components/DateRangePicker.json +129 -0
- package/ai/components/Dialog.json +134 -0
- package/ai/components/DialogProvider.json +8 -0
- package/ai/components/Dropdown.json +128 -0
- package/ai/components/DropdownWrapper.json +28 -0
- package/ai/components/EmojiPicker.json +129 -0
- package/ai/components/EmojiPickerDropdown.json +13 -0
- package/ai/components/Fade.json +130 -0
- package/ai/components/FadingLettersFx.json +77 -0
- package/ai/components/Feedback.json +132 -0
- package/ai/components/Flex.json +125 -0
- package/ai/components/FlipFx.json +133 -0
- package/ai/components/GlitchFx.json +128 -0
- package/ai/components/Grid.json +121 -0
- package/ai/components/Heading.json +75 -0
- package/ai/components/HeadingLink.json +127 -0
- package/ai/components/HeadingNav.json +124 -0
- package/ai/components/HoloFx.json +128 -0
- package/ai/components/Hover.json +130 -0
- package/ai/components/HoverCard.json +122 -0
- package/ai/components/Icon.json +132 -0
- package/ai/components/IconButton.json +22 -0
- package/ai/components/InfiniteScroll.json +130 -0
- package/ai/components/InlineCode.json +126 -0
- package/ai/components/Input.json +24 -0
- package/ai/components/InteractiveDetails.json +14 -0
- package/ai/components/Kbar.json +10 -0
- package/ai/components/Kbd.json +127 -0
- package/ai/components/Legend.json +14 -0
- package/ai/components/LetterFx.json +14 -0
- package/ai/components/Line.json +125 -0
- package/ai/components/LineBarChart.json +123 -0
- package/ai/components/LineChart.json +123 -0
- package/ai/components/LinearGauge.json +130 -0
- package/ai/components/LinearGradient.json +15 -0
- package/ai/components/List.json +127 -0
- package/ai/components/ListItem.json +77 -0
- package/ai/components/Logo.json +16 -0
- package/ai/components/LogoCloud.json +124 -0
- package/ai/components/Mask.json +131 -0
- package/ai/components/MasonryGrid.json +132 -0
- package/ai/components/MatrixFx.json +135 -0
- package/ai/components/Media.json +142 -0
- package/ai/components/MediaUpload.json +122 -0
- package/ai/components/MegaMenu.json +125 -0
- package/ai/components/MobileMegaMenu.json +125 -0
- package/ai/components/Modal.json +12 -0
- package/ai/components/NavIcon.json +127 -0
- package/ai/components/NumberInput.json +16 -0
- package/ai/components/OTPInput.json +13 -0
- package/ai/components/OgCard.json +135 -0
- package/ai/components/Option.json +137 -0
- package/ai/components/Particle.json +135 -0
- package/ai/components/PasswordInput.json +8 -0
- package/ai/components/PieChart.json +123 -0
- package/ai/components/ProgressBar.json +131 -0
- package/ai/components/Pulse.json +129 -0
- package/ai/components/RadialGauge.json +134 -0
- package/ai/components/RadialGradient.json +16 -0
- package/ai/components/RadioButton.json +17 -0
- package/ai/components/RevealFx.json +131 -0
- package/ai/components/Row.json +128 -0
- package/ai/components/Schema.json +17 -0
- package/ai/components/ScrollContainer.json +126 -0
- package/ai/components/ScrollToTop.json +124 -0
- package/ai/components/Scroller.json +128 -0
- package/ai/components/SegmentedControl.json +132 -0
- package/ai/components/Select.json +21 -0
- package/ai/components/ShineFx.json +80 -0
- package/ai/components/Skeleton.json +129 -0
- package/ai/components/Slider.json +17 -0
- package/ai/components/SmartLink.json +17 -0
- package/ai/components/Spinner.json +127 -0
- package/ai/components/SplitView.json +129 -0
- package/ai/components/StatusIndicator.json +128 -0
- package/ai/components/StyleOverlay.json +126 -0
- package/ai/components/StylePanel.json +125 -0
- package/ai/components/Swiper.json +130 -0
- package/ai/components/Switch.json +20 -0
- package/ai/components/Table.json +125 -0
- package/ai/components/Tag.json +129 -0
- package/ai/components/TagInput.json +12 -0
- package/ai/components/Text.json +72 -0
- package/ai/components/Textarea.json +24 -0
- package/ai/components/ThemeSwitcher.json +122 -0
- package/ai/components/TiltFx.json +126 -0
- package/ai/components/Timeline.json +126 -0
- package/ai/components/Toast.json +13 -0
- package/ai/components/Toaster.json +14 -0
- package/ai/components/ToggleButton.json +24 -0
- package/ai/components/Tooltip.json +129 -0
- package/ai/components/TypeFx.json +15 -0
- package/ai/components/User.json +15 -0
- package/ai/components/UserMenu.json +16 -0
- package/ai/components/WeatherFx.json +133 -0
- package/ai/examples/auth.tsx +105 -0
- package/ai/examples/blocks/Background6.tsx +25 -0
- package/ai/examples/blocks/Chat1.tsx +70 -0
- package/ai/examples/blocks/Dashboard1.tsx +404 -0
- package/ai/examples/blocks/Feed3.tsx +151 -0
- package/ai/examples/blocks/Footer1.tsx +30 -0
- package/ai/examples/blocks/Footer2.tsx +96 -0
- package/ai/examples/blocks/Footer3.tsx +127 -0
- package/ai/examples/blocks/Footer4.tsx +406 -0
- package/ai/examples/blocks/Header1.tsx +370 -0
- package/ai/examples/blocks/Header2.tsx +98 -0
- package/ai/examples/blocks/Header3.tsx +133 -0
- package/ai/examples/blocks/Header4.tsx +123 -0
- package/ai/examples/blocks/Productivity1.tsx +318 -0
- package/ai/examples/blocks/Roadmap1.tsx +133 -0
- package/ai/examples/blocks/Sidebar1.tsx +34 -0
- package/ai/examples/blocks/Sidebar2.tsx +17 -0
- package/ai/examples/blocks/Sidebar4.tsx +92 -0
- package/ai/examples/blocks/Sidebar5.tsx +73 -0
- package/ai/examples/blocks/Streaming1.tsx +353 -0
- package/ai/examples/blocks/Table1.tsx +303 -0
- package/ai/examples/blocks/Waitlist1.tsx +141 -0
- package/ai/examples/blocks/content/chat1content.ts +65 -0
- package/ai/examples/blocks/content/resources.ts +5 -0
- package/ai/examples/blocks/content/roadmap1content.ts +51 -0
- package/ai/examples/blocks/manifest.json +191 -0
- package/ai/examples/dashboard.tsx +150 -0
- package/ai/examples/marketing-hero.tsx +152 -0
- package/ai/examples/pricing.tsx +219 -0
- package/ai/examples/settings.tsx +140 -0
- package/ai/gotchas.json +85 -0
- package/ai/manifest.json +21 -0
- package/ai/rules.compact.md +73 -0
- package/ai/spec.json +2679 -2701
- package/ai/tasks/auth.json +23 -0
- package/ai/tasks/chat.json +28 -0
- package/ai/tasks/dashboard.json +39 -0
- package/ai/tasks/index.json +12 -0
- package/ai/tasks/marketing-hero.json +38 -0
- package/ai/tasks/pricing.json +42 -0
- package/ai/tasks/roadmap.json +22 -0
- package/ai/tasks/settings.json +34 -0
- package/dist/ai/catalog.json +1650 -0
- package/dist/ai/catalog.seed.json +411 -0
- package/dist/ai/components/Accordion.json +136 -0
- package/dist/ai/components/AccordionGroup.json +128 -0
- package/dist/ai/components/Animation.json +146 -0
- package/dist/ai/components/Arrow.json +128 -0
- package/dist/ai/components/AutoScroll.json +130 -0
- package/dist/ai/components/Avatar.json +133 -0
- package/dist/ai/components/AvatarGroup.json +129 -0
- package/dist/ai/components/Background.json +131 -0
- package/dist/ai/components/Badge.json +132 -0
- package/dist/ai/components/Banner.json +122 -0
- package/dist/ai/components/BarChart.json +123 -0
- package/dist/ai/components/BlobFx.json +125 -0
- package/dist/ai/components/BlockQuote.json +132 -0
- package/dist/ai/components/Button.json +26 -0
- package/dist/ai/components/Card.json +129 -0
- package/dist/ai/components/Carousel.json +134 -0
- package/dist/ai/components/CelebrationFx.json +132 -0
- package/dist/ai/components/ChartHeader.json +130 -0
- package/dist/ai/components/ChartStatus.json +12 -0
- package/dist/ai/components/Checkbox.json +13 -0
- package/dist/ai/components/Chip.json +132 -0
- package/dist/ai/components/CodeBlock.json +122 -0
- package/dist/ai/components/ColorInput.json +13 -0
- package/dist/ai/components/Column.json +128 -0
- package/dist/ai/components/CompareImage.json +126 -0
- package/dist/ai/components/ContextMenu.json +22 -0
- package/dist/ai/components/CountFx.json +82 -0
- package/dist/ai/components/CountdownFx.json +11 -0
- package/dist/ai/components/Cursor.json +9 -0
- package/dist/ai/components/CursorCard.json +128 -0
- package/dist/ai/components/DataTooltip.json +15 -0
- package/dist/ai/components/DateInput.json +21 -0
- package/dist/ai/components/DatePicker.json +143 -0
- package/dist/ai/components/DateRangeInput.json +18 -0
- package/dist/ai/components/DateRangePicker.json +129 -0
- package/dist/ai/components/Dialog.json +134 -0
- package/dist/ai/components/DialogProvider.json +8 -0
- package/dist/ai/components/Dropdown.json +128 -0
- package/dist/ai/components/DropdownWrapper.json +28 -0
- package/dist/ai/components/EmojiPicker.json +129 -0
- package/dist/ai/components/EmojiPickerDropdown.json +13 -0
- package/dist/ai/components/Fade.json +130 -0
- package/dist/ai/components/FadingLettersFx.json +77 -0
- package/dist/ai/components/Feedback.json +132 -0
- package/dist/ai/components/Flex.json +125 -0
- package/dist/ai/components/FlipFx.json +133 -0
- package/dist/ai/components/GlitchFx.json +128 -0
- package/dist/ai/components/Grid.json +121 -0
- package/dist/ai/components/Heading.json +75 -0
- package/dist/ai/components/HeadingLink.json +127 -0
- package/dist/ai/components/HeadingNav.json +124 -0
- package/dist/ai/components/HoloFx.json +128 -0
- package/dist/ai/components/Hover.json +130 -0
- package/dist/ai/components/HoverCard.json +122 -0
- package/dist/ai/components/Icon.json +132 -0
- package/dist/ai/components/IconButton.json +22 -0
- package/dist/ai/components/InfiniteScroll.json +130 -0
- package/dist/ai/components/InlineCode.json +126 -0
- package/dist/ai/components/Input.json +24 -0
- package/dist/ai/components/InteractiveDetails.json +14 -0
- package/dist/ai/components/Kbar.json +10 -0
- package/dist/ai/components/Kbd.json +127 -0
- package/dist/ai/components/Legend.json +14 -0
- package/dist/ai/components/LetterFx.json +14 -0
- package/dist/ai/components/Line.json +125 -0
- package/dist/ai/components/LineBarChart.json +123 -0
- package/dist/ai/components/LineChart.json +123 -0
- package/dist/ai/components/LinearGauge.json +130 -0
- package/dist/ai/components/LinearGradient.json +15 -0
- package/dist/ai/components/List.json +127 -0
- package/dist/ai/components/ListItem.json +77 -0
- package/dist/ai/components/Logo.json +16 -0
- package/dist/ai/components/LogoCloud.json +124 -0
- package/dist/ai/components/Mask.json +131 -0
- package/dist/ai/components/MasonryGrid.json +132 -0
- package/dist/ai/components/MatrixFx.json +135 -0
- package/dist/ai/components/Media.json +142 -0
- package/dist/ai/components/MediaUpload.json +122 -0
- package/dist/ai/components/MegaMenu.json +125 -0
- package/dist/ai/components/MobileMegaMenu.json +125 -0
- package/dist/ai/components/Modal.json +12 -0
- package/dist/ai/components/NavIcon.json +127 -0
- package/dist/ai/components/NumberInput.json +16 -0
- package/dist/ai/components/OTPInput.json +13 -0
- package/dist/ai/components/OgCard.json +135 -0
- package/dist/ai/components/Option.json +137 -0
- package/dist/ai/components/Particle.json +135 -0
- package/dist/ai/components/PasswordInput.json +8 -0
- package/dist/ai/components/PieChart.json +123 -0
- package/dist/ai/components/ProgressBar.json +131 -0
- package/dist/ai/components/Pulse.json +129 -0
- package/dist/ai/components/RadialGauge.json +134 -0
- package/dist/ai/components/RadialGradient.json +16 -0
- package/dist/ai/components/RadioButton.json +17 -0
- package/dist/ai/components/RevealFx.json +131 -0
- package/dist/ai/components/Row.json +128 -0
- package/dist/ai/components/Schema.json +17 -0
- package/dist/ai/components/ScrollContainer.json +126 -0
- package/dist/ai/components/ScrollToTop.json +124 -0
- package/dist/ai/components/Scroller.json +128 -0
- package/dist/ai/components/SegmentedControl.json +132 -0
- package/dist/ai/components/Select.json +21 -0
- package/dist/ai/components/ShineFx.json +80 -0
- package/dist/ai/components/Skeleton.json +129 -0
- package/dist/ai/components/Slider.json +17 -0
- package/dist/ai/components/SmartLink.json +17 -0
- package/dist/ai/components/Spinner.json +127 -0
- package/dist/ai/components/SplitView.json +129 -0
- package/dist/ai/components/StatusIndicator.json +128 -0
- package/dist/ai/components/StyleOverlay.json +126 -0
- package/dist/ai/components/StylePanel.json +125 -0
- package/dist/ai/components/Swiper.json +130 -0
- package/dist/ai/components/Switch.json +20 -0
- package/dist/ai/components/Table.json +125 -0
- package/dist/ai/components/Tag.json +129 -0
- package/dist/ai/components/TagInput.json +12 -0
- package/dist/ai/components/Text.json +72 -0
- package/dist/ai/components/Textarea.json +24 -0
- package/dist/ai/components/ThemeSwitcher.json +122 -0
- package/dist/ai/components/TiltFx.json +126 -0
- package/dist/ai/components/Timeline.json +126 -0
- package/dist/ai/components/Toast.json +13 -0
- package/dist/ai/components/Toaster.json +14 -0
- package/dist/ai/components/ToggleButton.json +24 -0
- package/dist/ai/components/Tooltip.json +129 -0
- package/dist/ai/components/TypeFx.json +15 -0
- package/dist/ai/components/User.json +15 -0
- package/dist/ai/components/UserMenu.json +16 -0
- package/dist/ai/components/WeatherFx.json +133 -0
- package/dist/ai/eval-tasks.md +71 -0
- package/dist/ai/examples/blocks/manifest.json +191 -0
- package/dist/ai/gotchas.json +85 -0
- package/dist/ai/manifest.json +21 -0
- package/dist/ai/recipes.md +149 -0
- package/dist/ai/rules.compact.md +73 -0
- package/dist/ai/rules.md +217 -0
- package/dist/ai/spec.json +2680 -0
- package/dist/ai/tasks/auth.json +23 -0
- package/dist/ai/tasks/chat.json +28 -0
- package/dist/ai/tasks/dashboard.json +39 -0
- package/dist/ai/tasks/index.json +12 -0
- package/dist/ai/tasks/marketing-hero.json +38 -0
- package/dist/ai/tasks/pricing.json +42 -0
- package/dist/ai/tasks/roadmap.json +22 -0
- package/dist/ai/tasks/settings.json +34 -0
- package/dist/data/emoji-data.json +0 -18
- package/dist/package.json +13 -2
- package/package.json +139 -127
- package/LICENSE.md +0 -21
- package/next-env.d.ts +0 -5
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Avatar, Button, Column, EmojiPickerDropdown, IconButton, Media, OgCard, Row, Text, Textarea } from "@once-ui-system/core";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { chatMessages } from "./content/chat1content";
|
|
6
|
+
|
|
7
|
+
export const Feed3: React.FC<React.ComponentProps<typeof Column>> = ({ ...flex }) => {
|
|
8
|
+
const [message, setMessage] = useState("");
|
|
9
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
10
|
+
const [submitError, setSubmitError] = useState<string | null>(null);
|
|
11
|
+
|
|
12
|
+
const formatTime = (date: Date) => {
|
|
13
|
+
const d = new Date(date);
|
|
14
|
+
return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const handleSubmitMessage = async () => {
|
|
18
|
+
if (!message.trim()) return;
|
|
19
|
+
|
|
20
|
+
setIsSubmitting(true);
|
|
21
|
+
setSubmitError(null);
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
await new Promise(resolve => setTimeout(resolve, 500));
|
|
25
|
+
|
|
26
|
+
setMessage("");
|
|
27
|
+
} catch (err: any) {
|
|
28
|
+
setSubmitError(err.message || "An error occurred while submitting your message");
|
|
29
|
+
} finally {
|
|
30
|
+
setIsSubmitting(false);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Column fill {...flex}>
|
|
36
|
+
<Row fillWidth paddingX="24" paddingY="8" background="surface" borderBottom="neutral-alpha-weak" vertical="center" gap="12">
|
|
37
|
+
<Text variant="label-default-s">👋 | intro</Text>
|
|
38
|
+
<Row minWidth="4" minHeight="4" background="neutral-strong" radius="full"/>
|
|
39
|
+
<Text variant="body-default-xs" onBackground="neutral-weak">Let us know a bit about you!</Text>
|
|
40
|
+
</Row>
|
|
41
|
+
<Column fill vertical="end">
|
|
42
|
+
<Column fill padding="16" gap="24" overflowY="auto">
|
|
43
|
+
{chatMessages.map((messages, index) => (
|
|
44
|
+
<Row key={index} fillWidth fitHeight gap="16">
|
|
45
|
+
<Avatar src={messages.author.avatar} />
|
|
46
|
+
<Column fillWidth gap="4">
|
|
47
|
+
<Row fillWidth gap="8" vertical="center">
|
|
48
|
+
<Text variant="label-strong-s" onBackground="brand-medium">{messages.author.name}</Text>
|
|
49
|
+
<Text variant="body-default-xs" onBackground="neutral-weak">{formatTime(messages.postedAt)}</Text>
|
|
50
|
+
</Row>
|
|
51
|
+
{messages.message && (
|
|
52
|
+
<Text variant="body-default-s">{messages.message}</Text>
|
|
53
|
+
)}
|
|
54
|
+
|
|
55
|
+
{/* Attachments */}
|
|
56
|
+
{messages.attachments && messages.attachments.length > 0 && (
|
|
57
|
+
<Column>
|
|
58
|
+
{/* If multiple media, show as a grid-like row, else handle individually */}
|
|
59
|
+
{messages.attachments.length > 1 ? (
|
|
60
|
+
<Row maxWidth={48} marginTop="16" gap="8" wrap>
|
|
61
|
+
{messages.attachments.map((att, aIdx) => (
|
|
62
|
+
att?.media ? (
|
|
63
|
+
<Media
|
|
64
|
+
key={aIdx}
|
|
65
|
+
maxWidth={20}
|
|
66
|
+
src={att.media}
|
|
67
|
+
border="neutral-alpha-weak"
|
|
68
|
+
radius="l"
|
|
69
|
+
sizes="320px"
|
|
70
|
+
/>
|
|
71
|
+
) : null
|
|
72
|
+
))}
|
|
73
|
+
</Row>
|
|
74
|
+
) : (
|
|
75
|
+
messages.attachments[0]?.media && (
|
|
76
|
+
messages.attachments[0].media.includes("youtube.com") || messages.attachments[0].media.includes("youtu.be") ? (
|
|
77
|
+
<Media maxWidth={32} border="neutral-alpha-weak" aspectRatio="16/9" marginTop="16" src={messages.attachments[0].media} radius="l" sizes="320px"/>
|
|
78
|
+
) : (messages.attachments[0].media.match(/\.(png|jpg|jpeg|gif|webp)$/i)) ? (
|
|
79
|
+
<Media maxWidth={32} border="neutral-alpha-weak" marginTop="16" src={messages.attachments[0].media} radius="l" sizes="320px"/>
|
|
80
|
+
) : (
|
|
81
|
+
<Row maxWidth={24} marginTop="16">
|
|
82
|
+
<OgCard url={messages.attachments[0].media} description={false} />
|
|
83
|
+
</Row>
|
|
84
|
+
)
|
|
85
|
+
)
|
|
86
|
+
)}
|
|
87
|
+
</Column>
|
|
88
|
+
)}
|
|
89
|
+
|
|
90
|
+
{/* Reactions */}
|
|
91
|
+
{messages.reactions && messages.reactions.length > 0 && (
|
|
92
|
+
<Row gap="4" marginTop="8">
|
|
93
|
+
{messages.reactions.map((reaction, index) => (
|
|
94
|
+
reaction.reacted ? (
|
|
95
|
+
<Row key={index} background="brand-alpha-medium" radius="m">
|
|
96
|
+
<Button size="s" data-scaling="90" variant="secondary">
|
|
97
|
+
<Text marginRight="4">{reaction.emoji} {reaction.count}</Text>
|
|
98
|
+
</Button>
|
|
99
|
+
</Row>
|
|
100
|
+
) : (
|
|
101
|
+
<Button key={index} size="s" data-scaling="90" variant="secondary">
|
|
102
|
+
<Text marginRight="2">{reaction.emoji} {reaction.count}</Text>
|
|
103
|
+
</Button>
|
|
104
|
+
)
|
|
105
|
+
))}
|
|
106
|
+
</Row>
|
|
107
|
+
)}
|
|
108
|
+
</Column>
|
|
109
|
+
</Row>
|
|
110
|
+
))}
|
|
111
|
+
</Column>
|
|
112
|
+
<Row fillWidth paddingX="8" paddingBottom="12">
|
|
113
|
+
<Textarea
|
|
114
|
+
id="comment-input"
|
|
115
|
+
placeholder="Message 👋 | intro"
|
|
116
|
+
style={{padding: "0.75rem"}}
|
|
117
|
+
lines="auto"
|
|
118
|
+
value={message}
|
|
119
|
+
hasPrefix={
|
|
120
|
+
<EmojiPickerDropdown
|
|
121
|
+
onSelect={(emoji) => setMessage(message + emoji)}
|
|
122
|
+
trigger={
|
|
123
|
+
<Row fillWidth data-border="rounded" style={{marginLeft: "-0.25rem"}}>
|
|
124
|
+
<IconButton icon="smiley" size="m" variant="tertiary" />
|
|
125
|
+
</Row>
|
|
126
|
+
}
|
|
127
|
+
/>
|
|
128
|
+
}
|
|
129
|
+
hasSuffix={
|
|
130
|
+
<Row
|
|
131
|
+
style={{ opacity: message.length > 0 ? 1 : 0, marginRight: "-0.25rem" }}
|
|
132
|
+
transition="micro-medium">
|
|
133
|
+
<IconButton
|
|
134
|
+
icon={isSubmitting ? "loading" : "send"}
|
|
135
|
+
size="m"
|
|
136
|
+
onClick={handleSubmitMessage}
|
|
137
|
+
disabled={!message || isSubmitting}
|
|
138
|
+
/>
|
|
139
|
+
</Row>
|
|
140
|
+
}
|
|
141
|
+
onChange={(e) => setMessage(e.target.value)}
|
|
142
|
+
disabled={isSubmitting}
|
|
143
|
+
error={!!submitError}
|
|
144
|
+
errorMessage={submitError}
|
|
145
|
+
>
|
|
146
|
+
</Textarea>
|
|
147
|
+
</Row>
|
|
148
|
+
</Column>
|
|
149
|
+
</Column>
|
|
150
|
+
)
|
|
151
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Row, IconButton, Text } from "@once-ui-system/core";
|
|
2
|
+
|
|
3
|
+
export const Footer1: React.FC<React.ComponentProps<typeof Row>> = ({ ...flex }) => {
|
|
4
|
+
const currentYear = new Date().getFullYear();
|
|
5
|
+
|
|
6
|
+
return (
|
|
7
|
+
<Row as="footer" fillWidth padding="8" horizontal="center" s={{direction: "column"}} {...flex}>
|
|
8
|
+
<Row
|
|
9
|
+
maxWidth="m"
|
|
10
|
+
paddingY="8"
|
|
11
|
+
paddingX="16"
|
|
12
|
+
gap="16"
|
|
13
|
+
horizontal="between"
|
|
14
|
+
vertical="center"
|
|
15
|
+
>
|
|
16
|
+
<Text variant="body-default-s" onBackground="neutral-strong">
|
|
17
|
+
<Text onBackground="neutral-weak">© {currentYear} /</Text>
|
|
18
|
+
<Text paddingX="4">Once UI</Text>
|
|
19
|
+
<Text onBackground="neutral-weak">/ All rights reserved</Text>
|
|
20
|
+
</Text>
|
|
21
|
+
<Row gap="16">
|
|
22
|
+
<IconButton size="s" variant="ghost" href="#" icon="github" tooltip="GitHub" />
|
|
23
|
+
<IconButton size="s" variant="ghost" href="#" icon="linkedin" tooltip="LinkedIn" />
|
|
24
|
+
<IconButton size="s" variant="ghost" href="#" icon="threads" tooltip="Threads" />
|
|
25
|
+
</Row>
|
|
26
|
+
</Row>
|
|
27
|
+
<Row hide height="80" s={{hide: false}}/>
|
|
28
|
+
</Row>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button,
|
|
3
|
+
Column,
|
|
4
|
+
Icon,
|
|
5
|
+
Logo,
|
|
6
|
+
Row,
|
|
7
|
+
SmartLink,
|
|
8
|
+
Text,
|
|
9
|
+
} from "@once-ui-system/core";
|
|
10
|
+
|
|
11
|
+
export const Footer2: React.FC<React.ComponentProps<typeof Row>> = ({ ...flex }) => {
|
|
12
|
+
return (
|
|
13
|
+
<Column gap="40" fillWidth paddingY="l" paddingX="24" {...flex}>
|
|
14
|
+
<Row fillWidth gap="12" textVariant="label-default-m" vertical="center">
|
|
15
|
+
<Logo href="#" dark icon="/trademarks/icon-dark.svg" size="m" />
|
|
16
|
+
<Logo href="#" light icon="/trademarks/icon-light.svg" size="m" />
|
|
17
|
+
<Button
|
|
18
|
+
data-border="rounded"
|
|
19
|
+
size="s"
|
|
20
|
+
weight="default"
|
|
21
|
+
variant="tertiary"
|
|
22
|
+
href="https://once-ui.com/products"
|
|
23
|
+
>
|
|
24
|
+
<Row gap="12" vertical="center">
|
|
25
|
+
Launch your app now
|
|
26
|
+
<Icon size="xs" name="arrowUpRight" onBackground="brand-medium" />
|
|
27
|
+
</Row>
|
|
28
|
+
</Button>
|
|
29
|
+
</Row>
|
|
30
|
+
<Row fillWidth horizontal="between" gap="40" wrap paddingX="2">
|
|
31
|
+
<Column gap="12" textVariant="label-default-m">
|
|
32
|
+
<Row paddingX="4" marginBottom="8">
|
|
33
|
+
Product
|
|
34
|
+
</Row>
|
|
35
|
+
<Row>
|
|
36
|
+
<SmartLink href="#">Solutions</SmartLink>
|
|
37
|
+
</Row>
|
|
38
|
+
<Row>
|
|
39
|
+
<SmartLink href="#">Components</SmartLink>
|
|
40
|
+
</Row>
|
|
41
|
+
<Row>
|
|
42
|
+
<SmartLink href="#">Templates</SmartLink>
|
|
43
|
+
</Row>
|
|
44
|
+
<Row>
|
|
45
|
+
<SmartLink href="#">Studio</SmartLink>
|
|
46
|
+
</Row>
|
|
47
|
+
</Column>
|
|
48
|
+
<Column gap="12" textVariant="label-default-m">
|
|
49
|
+
<Row paddingX="4" marginBottom="8">
|
|
50
|
+
Company
|
|
51
|
+
</Row>
|
|
52
|
+
<Row>
|
|
53
|
+
<SmartLink href="#">About</SmartLink>
|
|
54
|
+
</Row>
|
|
55
|
+
<Row>
|
|
56
|
+
<SmartLink href="#">Contact</SmartLink>
|
|
57
|
+
</Row>
|
|
58
|
+
<Row vertical="center" gap="8">
|
|
59
|
+
<SmartLink href="#">Join</SmartLink>
|
|
60
|
+
<Row textVariant="body-default-xs" onBackground="brand-weak" background="brand-alpha-weak" border="brand-alpha-medium" radius="s" padding="1" paddingX="8" center>
|
|
61
|
+
Hiring!
|
|
62
|
+
</Row>
|
|
63
|
+
</Row>
|
|
64
|
+
</Column>
|
|
65
|
+
<Column gap="12" textVariant="label-default-m">
|
|
66
|
+
<Row paddingX="4" marginBottom="8">
|
|
67
|
+
Resources
|
|
68
|
+
</Row>
|
|
69
|
+
<Row>
|
|
70
|
+
<SmartLink href="#">Terms of Use</SmartLink>
|
|
71
|
+
</Row>
|
|
72
|
+
<Row>
|
|
73
|
+
<SmartLink href="#">Privacy Policy</SmartLink>
|
|
74
|
+
</Row>
|
|
75
|
+
<Row>
|
|
76
|
+
<SmartLink href="#">Code of Conduct</SmartLink>
|
|
77
|
+
</Row>
|
|
78
|
+
<Row>
|
|
79
|
+
<SmartLink href="#">Contribution Guide</SmartLink>
|
|
80
|
+
</Row>
|
|
81
|
+
</Column>
|
|
82
|
+
<Column data-border="rounded" gap="12" textVariant="label-default-m">
|
|
83
|
+
<Row paddingX="4" marginBottom="8">
|
|
84
|
+
Social
|
|
85
|
+
</Row>
|
|
86
|
+
<Button href="#" size="s" variant="secondary" weight="default" prefixIcon="github" label="GitHub" />
|
|
87
|
+
<Button href="#" size="s" variant="secondary" weight="default" prefixIcon="linkedin" label="LinkedIn" />
|
|
88
|
+
<Button href="#" size="s" variant="secondary" weight="default" prefixIcon="threads" label="Threads" />
|
|
89
|
+
</Column>
|
|
90
|
+
</Row>
|
|
91
|
+
<Row fillWidth textVariant="label-default-s" gap="12">
|
|
92
|
+
{new Date().getFullYear()} <Text>•</Text> Once UI <Text onBackground="neutral-weak">// All rights reserved</Text>
|
|
93
|
+
</Row>
|
|
94
|
+
</Column>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { social } from "./content/resources";
|
|
2
|
+
import { Column, Grid, IconButton, Logo, Row, SmartLink, Tag, Text } from "@once-ui-system/core";
|
|
3
|
+
|
|
4
|
+
const navigation = [
|
|
5
|
+
{
|
|
6
|
+
title: "Free",
|
|
7
|
+
items: [
|
|
8
|
+
{ label: "All Products", href: "#" },
|
|
9
|
+
{ label: "Once UI Core", href: "#" },
|
|
10
|
+
{ label: "Magic Portfolio", href: "#" },
|
|
11
|
+
{ label: "Magic Docs", href: "#" },
|
|
12
|
+
{ label: "Magic Bio", href: "#" },
|
|
13
|
+
{ label: "Once UI Figma", href: "#" },
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: "Pro",
|
|
18
|
+
items: [
|
|
19
|
+
{ label: "Supa Social", href: "#", tag: "New" },
|
|
20
|
+
{ label: "Magic Studio", href: "#", tag: "New" },
|
|
21
|
+
{ label: "Supabase Starter", href: "#" },
|
|
22
|
+
{ label: "Magic Convert", href: "#" },
|
|
23
|
+
{ label: "Magic Spotlight", href: "#" },
|
|
24
|
+
{ label: "Magic Journal", href: "#", tag: "New" },
|
|
25
|
+
{ label: "Magic Store", href: "#" },
|
|
26
|
+
{ label: "Magic Agent", href: "#" },
|
|
27
|
+
{ label: "Once UI Blocks", href: "#" },
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: "Learn",
|
|
32
|
+
items: [
|
|
33
|
+
{ label: "Pricing", href: "#" },
|
|
34
|
+
{ label: "Services", href: "#", tag: "New" },
|
|
35
|
+
{ label: "Canvas", href: "#", tag: "New" },
|
|
36
|
+
{ label: "Documentation", href: "#" },
|
|
37
|
+
{ label: "Roadmap", href: "#" },
|
|
38
|
+
{ label: "Changelog", href: "#" },
|
|
39
|
+
{ label: "Handbook", href: "#", tag: "New" },
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
title: "Resources",
|
|
44
|
+
items: [
|
|
45
|
+
{ label: "Blog", href: "#" },
|
|
46
|
+
{ label: "About us", href: "#" },
|
|
47
|
+
{ label: "Contact us", href: "#" },
|
|
48
|
+
{ label: "Sponsor us", href: "#" },
|
|
49
|
+
{ label: "Merch store", href: "#" },
|
|
50
|
+
{ label: "Brand assets", href: "#" },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
title: "Legal",
|
|
55
|
+
items: [
|
|
56
|
+
{ label: "Terms of Use", href: "#" },
|
|
57
|
+
{ label: "Privacy Policy", href: "#" },
|
|
58
|
+
{ label: "License Agreement", href: "#" },
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
export const Footer3 = (flex: React.ComponentProps<typeof Column>) => {
|
|
64
|
+
return (
|
|
65
|
+
<Column fillWidth horizontal="center" paddingTop="80" paddingBottom="16" {...flex}>
|
|
66
|
+
<Column maxWidth="xl" paddingX="l" horizontal="center" gap="48">
|
|
67
|
+
<Grid
|
|
68
|
+
fillWidth
|
|
69
|
+
columns={5}
|
|
70
|
+
m={{columns: 3}}
|
|
71
|
+
s={{columns: 2}}
|
|
72
|
+
gap="32">
|
|
73
|
+
{navigation.map((section) => (
|
|
74
|
+
<Column key={section.title} gap="24" paddingY="8">
|
|
75
|
+
<Text variant="label-default-s">
|
|
76
|
+
{section.title}
|
|
77
|
+
</Text>
|
|
78
|
+
<Row fillWidth s={{direction: "column"}} gap="24">
|
|
79
|
+
<Column fillWidth key={`${section.title}-${section.title}`} gap="16">
|
|
80
|
+
{section.items.map((item: any) => (
|
|
81
|
+
<SmartLink key={`${item.label}-${item.href}`} href={item.href} unstyled>
|
|
82
|
+
<Text variant="body-default-s" onBackground="neutral-weak">
|
|
83
|
+
{item.label}
|
|
84
|
+
</Text>
|
|
85
|
+
{item.tag && (
|
|
86
|
+
<Tag style={{ transform: "scale(0.9)" }} variant="brand" size="s">
|
|
87
|
+
{item.tag}
|
|
88
|
+
</Tag>
|
|
89
|
+
)}
|
|
90
|
+
</SmartLink>
|
|
91
|
+
))}
|
|
92
|
+
</Column>
|
|
93
|
+
</Row>
|
|
94
|
+
</Column>
|
|
95
|
+
))}
|
|
96
|
+
</Grid>
|
|
97
|
+
<Row fillWidth inline gap="8" vertical="center" textVariant="label-default-s" onBackground="neutral-weak" s={{direction: "column", horizontal: "start"}}>
|
|
98
|
+
<Row paddingRight="8">
|
|
99
|
+
<Logo size="s" href="/" dark icon="/trademarks/icon-dark.svg" />
|
|
100
|
+
<Logo size="s" href="/" light icon="/trademarks/icon-light.svg" />
|
|
101
|
+
</Row>
|
|
102
|
+
<Row wrap fillWidth gap="4">
|
|
103
|
+
Built with curiosity by{" "}
|
|
104
|
+
<SmartLink href="#" unstyled>
|
|
105
|
+
Lorant One
|
|
106
|
+
</SmartLink> and the{" "}
|
|
107
|
+
<SmartLink href="#" unstyled>
|
|
108
|
+
Design Engineers Club
|
|
109
|
+
</SmartLink>
|
|
110
|
+
</Row>
|
|
111
|
+
<Row gap="8">
|
|
112
|
+
{social.map((item, index) => (
|
|
113
|
+
<IconButton
|
|
114
|
+
data-border="rounded"
|
|
115
|
+
icon={item.icon}
|
|
116
|
+
variant="tertiary"
|
|
117
|
+
size="l"
|
|
118
|
+
key={index}
|
|
119
|
+
href={item.href}
|
|
120
|
+
/>
|
|
121
|
+
))}
|
|
122
|
+
</Row>
|
|
123
|
+
</Row>
|
|
124
|
+
</Column>
|
|
125
|
+
</Column>
|
|
126
|
+
);
|
|
127
|
+
};
|