Skip to content

Commit

Permalink
fix: deps
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Mar 16, 2024
1 parent 56b013b commit 42254da
Show file tree
Hide file tree
Showing 8 changed files with 665 additions and 548 deletions.
71 changes: 51 additions & 20 deletions demo/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import "@/styles/globals.css"

import { Metadata } from "next"
import { clsxm } from "~/lib/helper"
import { MobileDetector } from "rc-modal-sheet/mobile-detector"
import { ModalStackContainer } from "rc-modal-sheet/motion"

import "./index.css"

import type { SVGProps } from "react"
import Script from "next/script"
import { PresentSheet } from "rc-modal-sheet"

import { siteConfig } from "@/config/site"
import { LeftAside } from "@/components/layout/sidebar"
Expand Down Expand Up @@ -71,35 +77,60 @@ export default function RootLayout({ children }: RootLayoutProps) {
<ThemeProvider>
<div className="relative flex min-h-screen flex-col">
<SiteHeader />

<div className="flex-1">
<Hero />
<div className="m-auto mt-24">
<div
className={clsxm(
"relative mx-auto grid min-h-[calc(100vh-3rem-10rem)] max-w-full",
"gap-4 md:grid-cols-1 xl:max-w-[calc(60rem+400px)] xl:grid-cols-[1fr_minmax(auto,60rem)_1fr]",
"mt-12",
"md:mt-6 print:!block print:!max-w-full"
)}
>
<ModalStackContainer clickOutsideToDismiss>
<MobileDetector />
<div className="flex-1">
<Hero />
<div className="m-auto mt-24">
<div
className="relative mr-4 hidden min-w-0 xl:block"
data-hide-print
className={clsxm(
"relative mx-auto grid min-h-[calc(100vh-3rem-10rem)] max-w-full",
"gap-4 md:grid-cols-1 xl:max-w-[calc(60rem+400px)] xl:grid-cols-[1fr_minmax(auto,60rem)_1fr]",
"mt-12",
"md:mt-6 print:!block print:!max-w-full"
)}
>
<LeftAside />
</div>
<div
className="relative mr-4 hidden min-w-0 xl:block"
data-hide-print
>
<LeftAside />
</div>

<main className="min-w-0 px-4 py-14 xl:px-2">
{children}
</main>

<main className="min-w-0 px-4 py-14 lg:px-2">
{children}
</main>
<PresentSheet content={<LeftAside asWeight />}>
<button className="fixed bottom-4 right-4 z-10 block rounded-full border border-zinc-200 bg-white p-2 text-black shadow xl:hidden dark:border-zinc-800 dark:bg-gray-950 dark:text-white">
<MaterialSymbolsMenuBookOutlineRounded />
</button>
</PresentSheet>
</div>
</div>
</div>
</div>
</ModalStackContainer>
</div>
</ThemeProvider>
</body>
</html>
</>
)
}

function MaterialSymbolsMenuBookOutlineRounded(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
{...props}
>
<path
fill="currentColor"
d="M6.5 16q1.175 0 2.288.263T11 17.05V7.2q-1.025-.6-2.175-.9T6.5 6q-.9 0-1.788.175T3 6.7v9.9q.875-.3 1.738-.45T6.5 16m6.5 1.05q1.1-.525 2.213-.787T17.5 16q.9 0 1.763.15T21 16.6V6.7q-.825-.35-1.713-.525T17.5 6q-1.175 0-2.325.3T13 7.2zm-1 2.425q-.35 0-.663-.087t-.587-.238q-.975-.575-2.05-.862T6.5 18q-1.05 0-2.062.275T2.5 19.05q-.525.275-1.012-.025T1 18.15V6.1q0-.275.138-.525T1.55 5.2q1.15-.6 2.4-.9T6.5 4q1.45 0 2.838.375T12 5.5q1.275-.75 2.663-1.125T17.5 4q1.3 0 2.55.3t2.4.9q.275.125.413.375T23 6.1v12.05q0 .575-.487.875t-1.013.025q-.925-.5-1.937-.775T17.5 18q-1.125 0-2.2.288t-2.05.862q-.275.15-.587.238t-.663.087m2-10.7q0-.225.163-.462T14.525 8q.725-.25 1.45-.375T17.5 7.5q.5 0 .988.063t.962.162q.225.05.388.25t.162.45q0 .425-.275.625t-.7.1q-.35-.075-.737-.112T17.5 9q-.65 0-1.275.125t-1.2.325q-.45.175-.737-.025T14 8.775m0 5.5q0-.225.163-.462t.362-.313q.725-.25 1.45-.375T17.5 13q.5 0 .988.063t.962.162q.225.05.388.25t.162.45q0 .425-.275.625t-.7.1q-.35-.075-.737-.112T17.5 14.5q-.65 0-1.275.113t-1.2.312q-.45.175-.737-.012T14 14.275m0-2.75q0-.225.163-.462t.362-.313q.725-.25 1.45-.375t1.525-.125q.5 0 .988.063t.962.162q.225.05.388.25t.162.45q0 .425-.275.625t-.7.1q-.35-.075-.737-.112t-.788-.038q-.65 0-1.275.125t-1.2.325q-.45.175-.737-.025t-.288-.65"
></path>
</svg>
)
}
1 change: 0 additions & 1 deletion demo/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import remarkMdxFrontmatter from "remark-mdx-frontmatter"
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
transpilePackages: ["rc-modal-sheet"],
pageExtensions: ["js", "jsx", "mdx", "ts", "tsx"],
}

Expand Down
33 changes: 17 additions & 16 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,43 @@
"@radix-ui/react-dialog": "^1",
"@radix-ui/react-slot": "^1.0.2",
"@types/mdx": "2.0.11",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
"framer-motion": "^11",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"framer-motion": "^11.0.14",
"js-yaml": "4.1.0",
"lucide-react": "0.105.0-alpha.4",
"lucide-react": "0.358.0",
"next": "^14",
"next-themes": "^0.2.1",
"next-themes": "^0.3.0",
"rc-modal-sheet": "0.2.0-alpha.2",
"rc-template": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-frontmatter": "5.0.0",
"remark-mdx-frontmatter": "4.0.0",
"sharp": "^0.31.3",
"tailwind-merge": "^1.13.2",
"sharp": "^0.33.2",
"tailwind-merge": "^2.2.1",
"tailwindcss-animate": "^1.0.6",
"vaul": "^0.9.0"
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^3.7.2",
"@ianvs/prettier-plugin-sort-imports": "^4.2.0",
"@tailwindcss/typography": "0.5.10",
"@types/node": "^17.0.45",
"@types/react": "^18.2.14",
"@types/node": "^20.11.28",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.6",
"@typescript-eslint/parser": "^5.61.0",
"@typescript-eslint/parser": "^7.2.0",
"autoprefixer": "^10.4.14",
"eslint": "^8.44.0",
"eslint-config-next": "13.0.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-react": "^7.32.2",
"eslint-config-next": "14.1.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-tailwindcss": "^3.13.0",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"prettier": "^3.2.5",
"remark-gfm": "4.0.0",
"remark-parse": "11.0.0",
"tailwindcss": "^3.3.2",
"typescript": "^4.9.5",
"typescript": "^5.4.2",
"unified": "11.0.4",
"unist-util-visit": "5.0.0"
}
Expand Down
2 changes: 1 addition & 1 deletion demo/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
--radius: 0.5rem;
}

.dark {
[data-theme="dark"] {
--background: 224 71% 4%;
--foreground: 213 31% 91%;

Expand Down
2 changes: 1 addition & 1 deletion demo/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
content: [
"app/**/*.{ts,tsx}",
"components/**/*.{ts,tsx}",
"./node_modules/rc-modal-sheet/src/**/*.{ts,tsx}",
"./node_modules/rc-modal-sheet/**/*.js",
],
theme: {
container: {
Expand Down
4 changes: 2 additions & 2 deletions demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
Expand Down Expand Up @@ -45,4 +45,4 @@
"exclude": [
"node_modules"
]
}
}
28 changes: 19 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,28 @@
"publishConfig": {
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "types/index.d.ts",
"types": "dist/index.d.ts",
"exports": {
".": {
"type": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./helper": {
"type": "./dist/helper.d.ts",
"import": "./dist/helper.js",
"require": "./dist/helper.cjs"
}
},
"./*": [
"./*",
"./*.d.ts"
]
}
},
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./*"
]
}
},
"husky": {
Expand Down Expand Up @@ -70,8 +80,8 @@
"@innei/eslint-config-react-ts": "0.12.4",
"@innei/eslint-config-ts": "0.12.4",
"@innei/prettier": "0.12.4",
"@types/node": "20.11.27",
"@types/react": "18.2.65",
"@types/node": "20.11.28",
"@types/react": "18.2.66",
"@vitejs/plugin-react": "4.2.1",
"husky": "9.0.11",
"lint-staged": "15.2.2",
Expand All @@ -86,14 +96,14 @@
"vite": "5.1.6",
"vite-plugin-dts": "3.7.3",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.3.1"
"vitest": "1.4.0"
},
"peerDependencies": {
"clsx": "*",
"tailwind-merge": "^2"
},
"dependencies": {
"clsx": "*",
"tailwind-merge": "^2"
"clsx": "^2.1.0",
"tailwind-merge": "^2.2.1"
}
}
Loading

0 comments on commit 42254da

Please sign in to comment.