@okshaun/components 0.4.2 → 0.4.3

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/dist/index.js CHANGED
@@ -1248,6 +1248,24 @@ const textinput = /* @__PURE__ */ Object.assign(memo(textinputFn.recipeFn), {
1248
1248
  },
1249
1249
  getVariantProps: textinputFn.getVariantProps
1250
1250
  });
1251
+ const themeSwitcherFn = /* @__PURE__ */ createRecipe("themeSwitcher", {}, []);
1252
+ const themeSwitcherVariantMap = {};
1253
+ const themeSwitcherVariantKeys = Object.keys(themeSwitcherVariantMap);
1254
+ const themeSwitcher = /* @__PURE__ */ Object.assign(memo(themeSwitcherFn.recipeFn), {
1255
+ __recipe__: true,
1256
+ __name__: "themeSwitcher",
1257
+ __getCompoundVariantCss__: themeSwitcherFn.__getCompoundVariantCss__,
1258
+ raw: (props) => props,
1259
+ variantKeys: themeSwitcherVariantKeys,
1260
+ variantMap: themeSwitcherVariantMap,
1261
+ merge(recipe) {
1262
+ return mergeRecipes(this, recipe);
1263
+ },
1264
+ splitVariantProps(props) {
1265
+ return splitProps$1(props, themeSwitcherVariantKeys);
1266
+ },
1267
+ getVariantProps: themeSwitcherFn.getVariantProps
1268
+ });
1251
1269
  const toggleInputFn = /* @__PURE__ */ createRecipe("toggle-input", {}, []);
1252
1270
  const toggleInputVariantMap = {};
1253
1271
  const toggleInputVariantKeys = Object.keys(toggleInputVariantMap);
@@ -8213,46 +8231,6 @@ function useTheme() {
8213
8231
  }
8214
8232
  return context2;
8215
8233
  }
8216
- const themeSwitchStyles = css({
8217
- position: "relative",
8218
- borderWidth: "2",
8219
- borderStyle: "solid",
8220
- borderColor: "border",
8221
- color: "transparent",
8222
- margin: "8",
8223
- borderRadius: "100",
8224
- cursor: "pointer",
8225
- display: "grid",
8226
- lineHeight: "none",
8227
- width: "14",
8228
- height: "14",
8229
- minWidth: "14",
8230
- minHeight: "14",
8231
- aspectRatio: "square",
8232
- transition: "all",
8233
- "&:before": {
8234
- content: '""',
8235
- position: "absolute",
8236
- inset: "0",
8237
- opacity: 0,
8238
- display: "block",
8239
- borderRadius: "100",
8240
- bg: "bg.neutral.bold",
8241
- transition: "all",
8242
- transitionTimingFunction: "default",
8243
- transitionDuration: "normal"
8244
- },
8245
- _hover: {
8246
- cursor: "pointer",
8247
- bg: { base: "darkNeutral.0", _dark: "neutral.0" },
8248
- borderColor: "bg.neutral.bold",
8249
- "&:before": {
8250
- inset: "-8",
8251
- bg: { base: "darkNeutral.0", _dark: "neutral.0" },
8252
- opacity: 0.25
8253
- }
8254
- }
8255
- });
8256
8234
  function ThemeSwitcher() {
8257
8235
  const { theme, setTheme } = useTheme();
8258
8236
  const toggleTheme = () => {
@@ -8261,10 +8239,10 @@ function ThemeSwitcher() {
8261
8239
  return /* @__PURE__ */ jsx(
8262
8240
  "button",
8263
8241
  {
8264
- className: themeSwitchStyles,
8242
+ className: themeSwitcher(),
8265
8243
  onClick: toggleTheme,
8266
8244
  "aria-label": `Switch to ${theme === "light" ? "dark" : "light"} theme`,
8267
- children: /* @__PURE__ */ jsx("span", {})
8245
+ children: /* @__PURE__ */ jsx("span", { children: "0" })
8268
8246
  }
8269
8247
  );
8270
8248
  }