Skip to content

Commit 0ce372b

Browse files
lorant-onezsofiakmdiwashbhattarai999JExcellencebenbarnett02
authored
release: v0.6 - SEO, Navigation, No-code components (#41)
* Update Background.tsx * Add InputOTP component Based on PR from light * Update InputOTP component * Rename InputOTP to OTPInput * Update OTPInput.module.scss * feat(icon-library): improve type safety for icons * Squashed commit of the following: commit da99ad1 Author: Zsofia <[email protected]> Date: Mon Mar 17 19:53:50 2025 +0100 add support for ReactNode commit 8f6be16 Author: Zsofia <[email protected]> Date: Mon Mar 17 19:36:21 2025 +0100 refact: add native solution commit 71a94ca Author: AX200M <[email protected]> Date: Wed Mar 5 16:51:55 2025 +0000 Package update commit 745b9d0 Author: AX200M <[email protected]> Date: Wed Mar 5 16:44:16 2025 +0000 Updated package.json commit d890dbf Author: AX200M <[email protected]> Date: Wed Mar 5 16:39:35 2025 +0000 Added Compare Image Slider * update font to Geist * update license year * Added ScrollToTopButton Component - allowing users to simply implement it to get back to the top of their page through one simple button/icon click. * docs: add CompareImage demo * Feat: Added component: DateRangeInput DateRangeInput provides similar behaviour to the DateInput component for date ranges, displaying a DateRangePicker in a DropdownWrapper on click of an Input box. * Fix: DateRangeInput now allows for a unique label on both start and end dates. * refact: move config from once-ui to app * ui: fine tune font weights * deps: update next version + add biome write command * ui: minor adjustments to tokens + styles * feat: CodeBlock line numbers + UI * refact: extend types and interfaces * refact: improve existing components * feat: add 0.6 components * docs: demo updates * feat: merge + rework ScrollToTop * fix: update ThemeProvider to work with Next 15.2.3 * docs: update version --------- Co-authored-by: Zsofia <[email protected]> Co-authored-by: Diwash Bhattarai <[email protected]> Co-authored-by: Justin Eiletz <[email protected]> Co-authored-by: benbarnett02 <[email protected]>
1 parent 4d39a72 commit 0ce372b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+2832
-509
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Once UI
3+
Copyright (c) 2024-2025 Once UI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "@once-ui-system/nextjs-starter",
3-
"version": "0.5",
3+
"version": "0.6",
44
"scripts": {
55
"dev": "next dev --turbopack",
66
"export": "next export",
77
"build": "next build",
88
"start": "next start",
9+
"biome-write": "npx @biomejs/biome format --write .",
910
"lint": "next lint"
1011
},
1112
"dependencies": {
1213
"@floating-ui/react-dom": "^2.1.1",
1314
"classnames": "^2.5.1",
1415
"compressorjs": "^1.2.1",
15-
"next": "15.1.4",
16+
"next": "15.2.3",
1617
"postcss": "^8.4.39",
1718
"postcss-preset-env": "^9.5.15",
1819
"prismjs": "^1.29.0",

public/images/1.jpg

216 KB
Loading

public/images/2.jpg

151 KB
Loading

src/app/layout.tsx

Lines changed: 70 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import classNames from "classnames";
55
import { headers } from "next/headers";
66
import { Metadata } from "next";
77

8-
import { baseURL, style, meta, og, schema, social } from "@/once-ui/resources/config";
9-
import { Background, Column, Flex, ToastProvider } from "@/once-ui/components";
8+
import { baseURL, style, meta, og, schema, social } from "@/app/resources/config";
9+
import { Background, Column, Flex, ToastProvider, ThemeProvider } from "@/once-ui/components";
1010

11-
import { Inter } from "next/font/google";
12-
import { Roboto_Mono } from "next/font/google";
11+
import { Geist } from "next/font/google";
12+
import { Geist_Mono } from "next/font/google";
1313

14-
const primary = Inter({
14+
const primary = Geist({
1515
variable: "--font-primary",
1616
subsets: ["latin"],
1717
display: "swap",
1818
});
1919

20-
const code = Roboto_Mono({
20+
const code = Geist_Mono({
2121
variable: "--font-code",
2222
subsets: ["latin"],
2323
display: "swap",
@@ -48,11 +48,11 @@ export async function generateMetadata(): Promise<Metadata> {
4848
description: og.description,
4949
url: "https://" + baseURL,
5050
images: [
51-
{
52-
url: og.image,
53-
alt: og.title,
54-
},
55-
],
51+
{
52+
url: og.image,
53+
alt: og.title,
54+
},
55+
],
5656
type: og.type as
5757
| "website"
5858
| "article"
@@ -68,11 +68,11 @@ export async function generateMetadata(): Promise<Metadata> {
6868
| "video.other",
6969
},
7070
twitter: {
71-
card: 'summary_large_image',
72-
title: og.title,
73-
description: og.description,
74-
images: [og.image],
75-
},
71+
card: "summary_large_image",
72+
title: og.title,
73+
description: og.description,
74+
images: [og.image],
75+
},
7676
metadataBase,
7777
};
7878
}
@@ -95,6 +95,7 @@ export default function RootLayout({
9595
}>) {
9696
return (
9797
<Flex
98+
suppressHydrationWarning
9899
as="html"
99100
lang="en"
100101
fillHeight
@@ -103,7 +104,6 @@ export default function RootLayout({
103104
data-brand={style.brand}
104105
data-accent={style.accent}
105106
data-border={style.border}
106-
data-theme={style.theme}
107107
data-solid={style.solid}
108108
data-solid-style={style.solidStyle}
109109
data-surface={style.surface}
@@ -123,38 +123,60 @@ export default function RootLayout({
123123
__html: JSON.stringify(schemaData),
124124
}}
125125
/>
126+
<script
127+
dangerouslySetInnerHTML={{
128+
__html: `
129+
(function() {
130+
try {
131+
const theme = localStorage.getItem('theme') || 'system';
132+
const root = document.documentElement;
133+
if (theme === 'system') {
134+
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
135+
root.setAttribute('data-theme', isDark ? 'dark' : 'light');
136+
} else {
137+
root.setAttribute('data-theme', theme);
138+
}
139+
} catch (e) {
140+
document.documentElement.setAttribute('data-theme', 'dark');
141+
}
142+
})();
143+
`,
144+
}}
145+
/>
126146
</head>
127-
<ToastProvider>
128-
<Column as="body" fillWidth margin="0" padding="0">
129-
<Background
130-
position="absolute"
131-
mask={{
132-
x: 100,
133-
y: 0,
134-
radius: 100,
135-
}}
136-
gradient={{
137-
display: true,
138-
x: 100,
139-
y: 60,
140-
width: 70,
141-
height: 50,
142-
tilt: -40,
143-
opacity: 90,
144-
colorStart: "accent-background-strong",
145-
colorEnd: "page-background",
146-
}}
147-
grid={{
148-
display: true,
149-
opacity: 100,
150-
width: "0.25rem",
151-
color: "neutral-alpha-medium",
152-
height: "0.25rem",
153-
}}
154-
/>
155-
{children}
156-
</Column>
157-
</ToastProvider>
147+
<ThemeProvider>
148+
<ToastProvider>
149+
<Column as="body" fillWidth margin="0" padding="0">
150+
<Background
151+
position="absolute"
152+
mask={{
153+
x: 100,
154+
y: 0,
155+
radius: 100,
156+
}}
157+
gradient={{
158+
display: true,
159+
x: 100,
160+
y: 60,
161+
width: 70,
162+
height: 50,
163+
tilt: -40,
164+
opacity: 90,
165+
colorStart: "accent-background-strong",
166+
colorEnd: "page-background",
167+
}}
168+
grid={{
169+
display: true,
170+
opacity: 100,
171+
width: "0.25rem",
172+
color: "neutral-alpha-medium",
173+
height: "0.25rem",
174+
}}
175+
/>
176+
{children}
177+
</Column>
178+
</ToastProvider>
179+
</ThemeProvider>
158180
</Flex>
159181
);
160182
}

0 commit comments

Comments
 (0)