From 3a76aed09be1b81198ab230dd12be64e6ef67171 Mon Sep 17 00:00:00 2001 From: Mattrixwv Date: Mon, 11 Aug 2025 22:09:37 -0400 Subject: [PATCH] Update component definitions --- lib/component/input/switch/DangerSwitch.tsx | 2 ++ lib/component/input/switch/DarkSwitch.tsx | 2 ++ lib/component/input/switch/LightSwitch.tsx | 2 ++ lib/component/input/switch/PrimarySwitch.tsx | 2 ++ lib/component/input/switch/SecondarySwitch.tsx | 2 ++ lib/component/input/switch/SuccessDangerSwitch.tsx | 2 ++ lib/component/input/switch/SuccessSwitch.tsx | 2 ++ lib/component/input/switch/TertiarySwitch.tsx | 2 ++ lib/component/input/switch/WarningSwitch.tsx | 2 ++ lib/component/theme.ts | 6 ++++-- lib/component/toaster.ts | 8 ++++++-- package.json | 2 +- 12 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lib/component/input/switch/DangerSwitch.tsx b/lib/component/input/switch/DangerSwitch.tsx index 33f1849..121c959 100644 --- a/lib/component/input/switch/DangerSwitch.tsx +++ b/lib/component/input/switch/DangerSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function DangerSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function DangerSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-300": disabled diff --git a/lib/component/input/switch/DarkSwitch.tsx b/lib/component/input/switch/DarkSwitch.tsx index 4298039..e4a93e8 100644 --- a/lib/component/input/switch/DarkSwitch.tsx +++ b/lib/component/input/switch/DarkSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function DarkSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function DarkSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-300": disabled diff --git a/lib/component/input/switch/LightSwitch.tsx b/lib/component/input/switch/LightSwitch.tsx index c533297..4b230b2 100644 --- a/lib/component/input/switch/LightSwitch.tsx +++ b/lib/component/input/switch/LightSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function LightSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function LightSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-black": !disabled, "bg-neutral-800": disabled diff --git a/lib/component/input/switch/PrimarySwitch.tsx b/lib/component/input/switch/PrimarySwitch.tsx index f9d324e..10a21b0 100644 --- a/lib/component/input/switch/PrimarySwitch.tsx +++ b/lib/component/input/switch/PrimarySwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function PrimarySwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function PrimarySwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-200": disabled diff --git a/lib/component/input/switch/SecondarySwitch.tsx b/lib/component/input/switch/SecondarySwitch.tsx index d0f5c07..6a0f326 100644 --- a/lib/component/input/switch/SecondarySwitch.tsx +++ b/lib/component/input/switch/SecondarySwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function SecondarySwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function SecondarySwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-200": disabled diff --git a/lib/component/input/switch/SuccessDangerSwitch.tsx b/lib/component/input/switch/SuccessDangerSwitch.tsx index 11380d0..f5d8b83 100644 --- a/lib/component/input/switch/SuccessDangerSwitch.tsx +++ b/lib/component/input/switch/SuccessDangerSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function SuccessDangerSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -19,6 +20,7 @@ export default function SuccessDangerSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-200": disabled diff --git a/lib/component/input/switch/SuccessSwitch.tsx b/lib/component/input/switch/SuccessSwitch.tsx index bbbae08..9f33483 100644 --- a/lib/component/input/switch/SuccessSwitch.tsx +++ b/lib/component/input/switch/SuccessSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function SuccessSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function SuccessSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-200": disabled diff --git a/lib/component/input/switch/TertiarySwitch.tsx b/lib/component/input/switch/TertiarySwitch.tsx index 2d7ee51..13f52fb 100644 --- a/lib/component/input/switch/TertiarySwitch.tsx +++ b/lib/component/input/switch/TertiarySwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function TertiarySwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function TertiarySwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-200": disabled diff --git a/lib/component/input/switch/WarningSwitch.tsx b/lib/component/input/switch/WarningSwitch.tsx index 958ed57..8da2ed4 100644 --- a/lib/component/input/switch/WarningSwitch.tsx +++ b/lib/component/input/switch/WarningSwitch.tsx @@ -5,6 +5,7 @@ import MattrixwvSwitch from "./MattrixwvSwitch"; export default function WarningSwitch({ className, + knobClassName, disabled, ...props }: MattrixwvSwitchProps){ @@ -20,6 +21,7 @@ export default function WarningSwitch({ } )} knobClassName={clsx( + knobClassName, { "bg-white": !disabled, "bg-gray-300": disabled diff --git a/lib/component/theme.ts b/lib/component/theme.ts index abeab69..3c00820 100644 --- a/lib/component/theme.ts +++ b/lib/component/theme.ts @@ -1,6 +1,8 @@ -import ThemeProvider from "$/providers/theme/ThemeProvider"; +import ThemeProvider, { useTheme } from "$/providers/theme/ThemeProvider"; export { - ThemeProvider + ThemeProvider, + useTheme }; + diff --git a/lib/component/toaster.ts b/lib/component/toaster.ts index 7cf21a3..77bfe09 100644 --- a/lib/component/toaster.ts +++ b/lib/component/toaster.ts @@ -1,6 +1,10 @@ -import ToasterProvider from "$/providers/toaster/ToasterProvider"; +import Toaster from "$/component/toaster/Toaster"; +import ToasterProvider, { useToaster } from "$/providers/toaster/ToasterProvider"; export { - ToasterProvider + Toaster, + ToasterProvider, + useToaster }; + diff --git a/package.json b/package.json index a6a5435..b70e7f3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mattrixwv-components", "private": false, - "version": "0.0.5", + "version": "0.0.6", "type": "module", "scripts": { "dev": "vite",