@marigold/system 6.1.0 → 6.2.1

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
@@ -71,8 +71,8 @@ var import_react = __toESM(require("react"));
71
71
 
72
72
  // src/utils.ts
73
73
  var import_class_variance_authority = require("class-variance-authority");
74
- var import_tailwind_merge = require("tailwind-merge");
75
74
  var import_class_variance_authority2 = require("class-variance-authority");
75
+ var import_tailwind_merge = require("tailwind-merge");
76
76
  var cva = (base, config) => {
77
77
  function styles(props) {
78
78
  return (0, import_tailwind_merge.twMerge)((0, import_class_variance_authority2.cva)(base, config)(props));
@@ -195,6 +195,8 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
195
195
  }
196
196
  const [index, setIndex] = (0, import_react3.useState)(defaultIndex);
197
197
  (0, import_react3.useEffect)(() => {
198
+ if (typeof window == "undefined")
199
+ return;
198
200
  const getIndex = () => Object.values(screens).filter(
199
201
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
200
202
  ).length;
package/dist/index.mjs CHANGED
@@ -3,8 +3,8 @@ import React, { forwardRef } from "react";
3
3
 
4
4
  // src/utils.ts
5
5
  import { cx } from "class-variance-authority";
6
- import { twMerge } from "tailwind-merge";
7
6
  import { cva as _cva } from "class-variance-authority";
7
+ import { twMerge } from "tailwind-merge";
8
8
  var cva = (base, config) => {
9
9
  function styles(props) {
10
10
  return twMerge(_cva(base, config)(props));
@@ -127,6 +127,8 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
127
127
  }
128
128
  const [index, setIndex] = useState(defaultIndex);
129
129
  useEffect(() => {
130
+ if (typeof window == "undefined")
131
+ return;
130
132
  const getIndex = () => Object.values(screens).filter(
131
133
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
132
134
  ).length;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/system",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "description": "Marigold System Library",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "class-variance-authority": "0.6.1",
28
28
  "deepmerge": "^4.2.2",
29
29
  "react-fast-compare": "^3.2.0",
30
- "tailwind-merge": "1.13.2",
30
+ "tailwind-merge": "1.14.0",
31
31
  "@marigold/types": "1.0.1"
32
32
  },
33
33
  "peerDependencies": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@babel/core": "7.21.8",
39
- "postcss": "8.4.26",
39
+ "postcss": "8.4.28",
40
40
  "react": "18.2.0",
41
41
  "tailwindcss": "3.3.3",
42
42
  "tsup": "6.7.0",