From a35fb28a1b7bfce0ec2bc5d9247d07550d4e25a4 Mon Sep 17 00:00:00 2001 From: Siddhartha Gudipati Date: Sun, 22 Dec 2024 15:36:39 -0800 Subject: [PATCH] refactor(Callout): replace SCSS with tailwind-variants, adjust theming --- lib/Callout/Callout.module.scss | 91 ---------------- lib/Callout/Callout.tsx | 66 ++++++++++-- package.json | 3 +- src/components/SideNav.tsx | 28 ++++- src/components/Theme.tsx | 41 ++++++++ src/main.tsx | 43 ++++---- tailwind.config.ts | 1 + yarn.lock | 178 ++------------------------------ 8 files changed, 161 insertions(+), 290 deletions(-) delete mode 100644 lib/Callout/Callout.module.scss create mode 100644 src/components/Theme.tsx diff --git a/lib/Callout/Callout.module.scss b/lib/Callout/Callout.module.scss deleted file mode 100644 index d904f40..0000000 --- a/lib/Callout/Callout.module.scss +++ /dev/null @@ -1,91 +0,0 @@ -.callout { - @apply mt-6 overflow-hidden rounded-xl border px-5 py-4 flex items-start space-x-3; - - .calloutIcon { - @apply mt-0.5 h-5 w-5; - } - - .calloutContent { - @apply flex-1 overflow-x-auto; - - :first-child { - margin-top: 0; - } - - :last-child { - margin-bottom: 0; - } - } - - &.info { - @apply border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10; - - .calloutIcon { - @apply text-zinc-500; - } - - .calloutContent { - @apply text-zinc-900 dark:text-zinc-200; - } - } - - &.tip { - @apply border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10; - - .calloutIcon { - @apply text-emerald-600; - } - - .calloutContent { - @apply text-emerald-900 dark:text-emerald-200; - } - } - - &.warning { - @apply border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10; - - .calloutIcon { - @apply text-amber-600; - } - - .calloutContent { - @apply text-amber-900 dark:text-amber-200; - } - } - - &.success { - @apply border-green-500/20 bg-green-50/50 dark:border-green-500/30 dark:bg-green-500/10; - - .calloutIcon { - @apply text-green-600; - } - - .calloutContent { - @apply text-green-900 dark:text-green-200; - } - } - - &.error { - @apply border-red-500/20 bg-red-50/50 dark:border-red-500/30 dark:bg-red-500/10; - - .calloutIcon { - @apply text-red-600; - } - - .calloutContent { - @apply text-red-900 dark:text-red-200; - } - } - - &.note { - @apply border-sky-500/20 bg-sky-50/50 dark:border-sky-500/30 dark:bg-sky-500/10; - - .calloutIcon { - @apply text-sky-600; - } - - .calloutContent { - @apply text-sky-900 dark:text-sky-200; - } - } -} diff --git a/lib/Callout/Callout.tsx b/lib/Callout/Callout.tsx index c1a03c8..cc69e89 100644 --- a/lib/Callout/Callout.tsx +++ b/lib/Callout/Callout.tsx @@ -1,4 +1,4 @@ -import clsx from 'clsx'; +import { tv } from 'tailwind-variants'; import { CheckIcon, CircleXIcon, @@ -7,10 +7,56 @@ import { LightbulbIcon, TriangleAlertIcon, } from 'lucide-react'; -import styles from './Callout.module.scss'; +import type { VariantProps } from 'tailwind-variants'; -interface CalloutProps { - variant?: 'info' | 'tip' | 'warning' | 'success' | 'error' | 'note'; +const callout = tv({ + slots: { + base: 'mt-6 overflow-hidden rounded-xl border px-5 py-4 flex items-start space-x-3', + icon: 'mt-0.5 h-5 w-5', + content: 'flex-1 overflow-x-auto first:mt-0 last:mb-0', + }, + variants: { + variant: { + info: { + base: 'border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10', + icon: 'text-zinc-500', + content: 'text-zinc-900 dark:text-zinc-200', + }, + tip: { + base: 'border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10', + icon: 'text-emerald-600', + content: 'text-emerald-900 dark:text-emerald-200', + }, + warning: { + base: 'border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10', + icon: 'text-amber-600', + content: 'text-amber-900 dark:text-amber-200', + }, + success: { + base: 'border-green-500/20 bg-green-50/50 dark:border-green-500/30 dark:bg-green-500/10', + icon: 'text-green-600', + content: 'text-green-900 dark:text-green-200', + }, + error: { + base: 'border-red-500/20 bg-red-50/50 dark:border-red-500/30 dark:bg-red-500/10', + icon: 'text-red-600', + content: 'text-red-900 dark:text-red-200', + }, + note: { + base: 'border-sky-500/20 bg-sky-50/50 dark:border-sky-500/30 dark:bg-sky-500/10', + icon: 'text-sky-600', + content: 'text-sky-900 dark:text-sky-200', + }, + }, + }, + defaultVariants: { + variant: 'info', + }, +}); + +type CalloutVariant = VariantProps; + +interface CalloutProps extends CalloutVariant { className?: string; children: React.ReactNode | React.ReactNode[]; } @@ -36,16 +82,20 @@ const variants = { }, } as const; -const Callout = ({ variant = 'info', className, children }: CalloutProps) => { +const Callout = ({ variant = 'info', children }: CalloutProps) => { const Icon = variants[variant].icon; + const { base, icon, content } = callout({ + variant: variant, + }); + return ( -
+
-
{children}
+
{children}
); }; diff --git a/package.json b/package.json index f54dde9..bc4e3f3 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,8 @@ "react-medium-image-zoom": "^5.2.12", "react-router": "^7.0.2", "remark-gfm": "^4.0.0", - "slugify": "^1.6.6" + "slugify": "^1.6.6", + "tailwind-variants": "^0.3.0" }, "publishConfig": { "access": "public" diff --git a/src/components/SideNav.tsx b/src/components/SideNav.tsx index dd49d19..be91098 100644 --- a/src/components/SideNav.tsx +++ b/src/components/SideNav.tsx @@ -1,4 +1,5 @@ import { NavLink } from 'react-router'; +import { useTheme } from './Theme'; export const components = [ { @@ -46,6 +47,11 @@ export const components = [ }[]; export const SideNav = () => { + const theme = useTheme(); + const setTheme = (themeString: 'dark' | 'light') => { + theme.toggleTheme(themeString); + }; + return (
@@ -57,14 +63,32 @@ export const SideNav = () => { key={component.name} className={({ isActive }) => { const classNames = - 'text-gray-700 hover:text-gray-900 px-4 py-1.5 hover:bg-slate-100 -ml-4 rounded-full'; - return isActive ? `${classNames} bg-slate-100 font-medium` : classNames; + 'text-gray-700 dark:text-gray-200 dark:hover:text-gray-800 hover:text-gray-900 px-4 py-1.5 hover:bg-slate-100 -ml-4 rounded-full'; + return isActive + ? `${classNames} bg-slate-100 dark:text-gray-700 font-medium` + : classNames; }} > {component.name} ))}
+ +
+ {' '} + |{' '} + +
); diff --git a/src/components/Theme.tsx b/src/components/Theme.tsx new file mode 100644 index 0000000..37d648b --- /dev/null +++ b/src/components/Theme.tsx @@ -0,0 +1,41 @@ +import { createContext, useContext, ReactNode, useState, useEffect } from 'react'; + +type Theme = 'light' | 'dark'; + +interface ThemeContextProps { + theme: Theme; + toggleTheme: (_theme: Theme) => void; +} + +const ThemeContext = createContext(undefined); + +export const ThemeProvider = ({ children }: { children: ReactNode }) => { + const localTheme = localStorage.getItem('theme') as Theme; + const [theme, setTheme] = useState(localTheme ?? 'light'); + + useEffect(() => { + if (localTheme) { + setTheme(localTheme); + toggleTheme(localTheme); + } + }, []); + + const toggleTheme = (_theme: 'dark' | 'light') => { + localStorage.setItem('theme', _theme); + setTheme(_theme); + + document.documentElement.classList.add(_theme); + document.documentElement.classList.remove(_theme === 'dark' ? 'light' : 'dark'); + document.documentElement.style.colorScheme = _theme; + }; + + return {children}; +}; + +export const useTheme = () => { + const context = useContext(ThemeContext); + if (!context) { + throw new Error('useTheme must be used within a ThemeProvider'); + } + return context; +}; diff --git a/src/main.tsx b/src/main.tsx index e6d15fa..7507af5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -10,6 +10,7 @@ import { StepSamples } from './pages/StepSamples.tsx'; import { TypographySamples } from './pages/TypographySamples.tsx'; import { ImageSamples } from './pages/ImageSamples.tsx'; import { CodeSamples } from './pages/CodeSamples.tsx'; +import { ThemeProvider } from './components/Theme.tsx'; const components: { [key: string]: React.ReactElement } = { accordion: , @@ -23,26 +24,28 @@ const components: { [key: string]: React.ReactElement } = { createRoot(document.getElementById('root')!).render( - - } - /> + + + } + /> - } - > - {Object.keys(components).map((key) => { - return ( - - ); - })} - - + } + > + {Object.keys(components).map((key) => { + return ( + + ); + })} + + + , ); diff --git a/tailwind.config.ts b/tailwind.config.ts index ff522a2..1b62390 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -3,6 +3,7 @@ import tailwindTypography from '@tailwindcss/typography'; /** @type {import('tailwindcss').Config} */ export default { content: ['./lib/**/*.tsx', './src/**/*.tsx'], + darkMode: 'class', theme: { extend: {}, }, diff --git a/yarn.lock b/yarn.lock index 21edc9a..6071059 100644 --- a/yarn.lock +++ b/yarn.lock @@ -223,13 +223,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.25.7" -"@babel/runtime@^7.3.1": - version "7.26.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" - integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== - dependencies: - regenerator-runtime "^0.14.0" - "@babel/template@^7.25.7": version "7.25.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.7.tgz#27f69ce382855d915b14ab0fe5fb4cbf88fa0769" @@ -1459,13 +1452,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== -"@types/hast@^2.0.0": - version "2.3.10" - resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.10.tgz#5c9d9e0b304bbb8879b857225c5ebab2d81d7643" - integrity sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw== - dependencies: - "@types/unist" "^2" - "@types/hast@^3.0.0", "@types/hast@^3.0.4": version "3.0.4" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-3.0.4.tgz#1d6b39993b82cea6ad783945b0508c25903e15aa" @@ -1537,7 +1523,7 @@ resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" integrity sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q== -"@types/unist@^2", "@types/unist@^2.0.0": +"@types/unist@^2.0.0": version "2.0.11" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.11.tgz#11af57b127e32487774841f7a4e54eab166d03c4" integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== @@ -1981,31 +1967,16 @@ character-entities-html4@^2.0.0: resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-2.1.0.tgz#1f1adb940c971a4b22ba39ddca6b618dc6e56b2b" integrity sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA== -character-entities-legacy@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz#94bc1845dce70a5bb9d2ecc748725661293d8fc1" - integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== - character-entities-legacy@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz#76bc83a90738901d7bc223a9e93759fdd560125b" integrity sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ== -character-entities@^1.0.0: - version "1.2.4" - resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.4.tgz#e12c3939b7eaf4e5b15e7ad4c5e28e1d48c5b16b" - integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== - character-entities@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22" integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ== -character-reference-invalid@^1.0.0: - version "1.1.4" - resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" - integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== - character-reference-invalid@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz#85c66b041e43b47210faf401278abf808ac45cb9" @@ -2055,13 +2026,6 @@ cidr-regex@^4.1.1: dependencies: ip-regex "^5.0.0" -class-variance-authority@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/class-variance-authority/-/class-variance-authority-0.7.1.tgz#4008a798a0e4553a781a57ac5177c9fb5d043787" - integrity sha512-Ka+9Trutv7G8M6WT6SeiRWz792K5qEqIGEGzXKhAE6xOWAY6pPH8U+9IY3oCMv6kqTmLsv7Xh/2w2RigkePMsg== - dependencies: - clsx "^2.1.1" - clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" @@ -2160,11 +2124,6 @@ color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -comma-separated-tokens@^1.0.0: - version "1.0.8" - resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz#632b80b6117867a158f1080ad498b2fbe7e3f5ea" - integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== - comma-separated-tokens@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz#4e89c9458acb61bc8fef19f4529973b2392839ee" @@ -2650,13 +2609,6 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fault@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13" - integrity sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA== - dependencies: - format "^0.2.0" - figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -2706,11 +2658,6 @@ foreground-child@^3.1.0: cross-spawn "^7.0.0" signal-exit "^4.0.1" -format@^0.2.0: - version "0.2.2" - resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b" - integrity sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww== - fraction.js@^4.3.7: version "4.3.7" resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.3.7.tgz#06ca0085157e42fda7f9e726e79fefc4068840f7" @@ -2903,11 +2850,6 @@ hasown@^2.0.2: dependencies: function-bind "^1.1.2" -hast-util-parse-selector@^2.0.0: - version "2.2.5" - resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz#d57c23f4da16ae3c63b3b6ca4616683313499c3a" - integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ== - hast-util-to-estree@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/hast-util-to-estree/-/hast-util-to-estree-3.1.0.tgz#f2afe5e869ddf0cf690c75f9fc699f3180b51b19" @@ -2975,32 +2917,16 @@ hast-util-whitespace@^3.0.0: dependencies: "@types/hast" "^3.0.0" -hastscript@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-6.0.0.tgz#e8768d7eac56c3fdeac8a92830d58e811e5bf640" - integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w== - dependencies: - "@types/hast" "^2.0.0" - comma-separated-tokens "^1.0.0" - hast-util-parse-selector "^2.0.0" - property-information "^5.0.0" - space-separated-tokens "^1.0.0" - he@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== -highlight.js@^10.4.1, highlight.js@^10.7.1, highlight.js@~10.7.0: +highlight.js@^10.7.1: version "10.7.3" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A== -highlightjs-vue@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz#fdfe97fbea6354e70ee44e3a955875e114db086d" - integrity sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA== - hook-std@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-3.0.0.tgz#47038a01981e07ce9d83a6a3b2eb98cad0f7bd58" @@ -3185,24 +3111,11 @@ ip-regex@^5.0.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-5.0.0.tgz#cd313b2ae9c80c07bd3851e12bf4fa4dc5480632" integrity sha512-fOCG6lhoKKakwv+C6KdsOnGvgXnmgfmp0myi3bcNwj3qfwPAxRKWEuFhvEFF7ceYIz6+1jRZ+yguLFAmUNPEfw== -is-alphabetical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.4.tgz#9e7d6b94916be22153745d184c298cbf986a686d" - integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== - is-alphabetical@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-2.0.1.tgz#01072053ea7c1036df3c7d19a6daaec7f19e789b" integrity sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ== -is-alphanumerical@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz#7eb9a2431f855f6b1ef1a78e326df515696c4dbf" - integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== - dependencies: - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-alphanumerical@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz#7c03fbe96e3e931113e57f964b0a368cc2dfd875" @@ -3237,11 +3150,6 @@ is-core-module@^2.13.0: dependencies: hasown "^2.0.2" -is-decimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.4.tgz#65a3a5958a1c5b63a706e1b333d7cd9f630d3fa5" - integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== - is-decimal@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-2.0.1.tgz#9469d2dc190d0214fd87d78b78caecc0cc14eef7" @@ -3264,11 +3172,6 @@ is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" -is-hexadecimal@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" - integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== - is-hexadecimal@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027" @@ -3649,14 +3552,6 @@ longest-streak@^3.0.0: resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-3.1.0.tgz#62fa67cd958742a1574af9f39866364102d90cd4" integrity sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g== -lowlight@^1.17.0: - version "1.20.0" - resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.20.0.tgz#ddb197d33462ad0d93bf19d17b6c301aa3941888" - integrity sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw== - dependencies: - fault "^1.0.0" - highlight.js "~10.7.0" - lru-cache@^10.0.1, lru-cache@^10.2.0, lru-cache@^10.2.2: version "10.4.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119" @@ -4917,18 +4812,6 @@ parse-conflict-json@^4.0.0: just-diff "^6.0.0" just-diff-apply "^5.2.0" -parse-entities@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-2.0.0.tgz#53c6eb5b9314a1f4ec99fa0fdf7ce01ecda0cbe8" - integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - parse-entities@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-4.0.2.tgz#61d46f5ed28e4ee62e9ddc43d6b010188443f159" @@ -5154,16 +5037,6 @@ pretty-ms@^9.0.0: dependencies: parse-ms "^4.0.0" -prismjs@^1.27.0: - version "1.29.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.29.0.tgz#f113555a8fa9b57c35e637bba27509dcf802dd12" - integrity sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q== - -prismjs@~1.27.0: - version "1.27.0" - resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" - integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== - proc-log@^4.1.0, proc-log@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-4.2.0.tgz#b6f461e4026e75fdfe228b265e9f7a00779d7034" @@ -5214,13 +5087,6 @@ promzard@^2.0.0: dependencies: read "^4.0.0" -property-information@^5.0.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.6.0.tgz#61675545fb23002f245c6540ec46077d4da3ed69" - integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA== - dependencies: - xtend "^4.0.0" - property-information@^6.0.0: version "6.5.0" resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.5.0.tgz#6212fbb52ba757e92ef4fb9d657563b933b7ffec" @@ -5283,18 +5149,6 @@ react-router@^7.0.2: set-cookie-parser "^2.6.0" turbo-stream "2.4.0" -react-syntax-highlighter@^15.6.1: - version "15.6.1" - resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-15.6.1.tgz#fa567cb0a9f96be7bbccf2c13a3c4b5657d9543e" - integrity sha512-OqJ2/vL7lEeV5zTJyG7kmARppUjiB9h9udl4qHQjjgEos66z00Ia0OckwYfRxCSFrW8RJIBnsBwQsHZbVPspqg== - dependencies: - "@babel/runtime" "^7.3.1" - highlight.js "^10.4.1" - highlightjs-vue "^1.0.0" - lowlight "^1.17.0" - prismjs "^1.27.0" - refractor "^3.6.0" - react@^19.0.0: version "19.0.0" resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" @@ -5412,20 +5266,6 @@ recma-stringify@^1.0.0: unified "^11.0.0" vfile "^6.0.0" -refractor@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/refractor/-/refractor-3.6.0.tgz#ac318f5a0715ead790fcfb0c71f4dd83d977935a" - integrity sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA== - dependencies: - hastscript "^6.0.0" - parse-entities "^2.0.0" - prismjs "~1.27.0" - -regenerator-runtime@^0.14.0: - version "0.14.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" - integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== - regex-recursion@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/regex-recursion/-/regex-recursion-5.0.0.tgz#330c14e9e448394210dfd063c6a757d7a293e9bb" @@ -5799,11 +5639,6 @@ source-map@^0.7.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== -space-separated-tokens@^1.0.0: - version "1.1.5" - resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz#85f32c3d10d9682007e917414ddc5c26d1aa6899" - integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== - space-separated-tokens@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f" @@ -6059,6 +5894,13 @@ tailwind-merge@^2.5.4: resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-2.5.4.tgz#4bf574e81fa061adeceba099ae4df56edcee78d1" integrity sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q== +tailwind-variants@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tailwind-variants/-/tailwind-variants-0.3.0.tgz#481f53031cd4e91f92e0c078bbfd9fe453162e0b" + integrity sha512-ho2k5kn+LB1fT5XdNS3Clb96zieWxbStE9wNLK7D0AV64kdZMaYzAKo0fWl6fXLPY99ffF9oBJnIj5escEl/8A== + dependencies: + tailwind-merge "^2.5.4" + tailwindcss@^3.4.14: version "3.4.14" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.14.tgz#6dd23a7f54ec197b19159e91e3bb1e55e7aa73ac" @@ -6580,7 +6422,7 @@ write-file-atomic@^6.0.0: imurmurhash "^0.1.4" signal-exit "^4.0.1" -xtend@^4.0.0, xtend@~4.0.1: +xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==