@eightshift/frontend-libs-tailwind 2.2.0 → 2.4.0

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.
@@ -1,6 +1,6 @@
1
- // import react from 'eslint-plugin-react';
2
- // import reactHooks from 'eslint-plugin-react-hooks';
3
- import stylistic from '@stylistic/eslint-plugin-js';
1
+ import react from 'eslint-plugin-react';
2
+ import reactHooks from 'eslint-plugin-react-hooks';
3
+ import stylistic from '@stylistic/eslint-plugin';
4
4
  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
5
5
  import globals from 'globals';
6
6
 
@@ -23,9 +23,9 @@ export default [
23
23
  },
24
24
  },
25
25
  plugins: {
26
- // react,
27
- // 'react-hooks': reactHooks,
28
- '@stylistic/js': stylistic,
26
+ react,
27
+ 'react-hooks': reactHooks,
28
+ '@stylistic': stylistic,
29
29
  },
30
30
  rules: {
31
31
  'newline-before-return': 'error',
@@ -35,7 +35,7 @@ export default [
35
35
  'no-nested-ternary': 'error',
36
36
  'no-underscore-dangle': ['error', { allowAfterThis: true }],
37
37
  'no-void': 'error',
38
- '@stylistic/js/semi': 'error',
38
+ '@stylistic/semi': 'error',
39
39
  'max-len': [
40
40
  'error',
41
41
  {
@@ -61,21 +61,20 @@ export default [
61
61
  },
62
62
  ],
63
63
  // React-specific.
64
- // Note: React rules are temporarily disabled until the plugin gets full compatibility with ESLint 9.
65
- // 'consistent-return': 'warn',
66
- // 'no-param-reassign': 'warn',
67
- // 'react-hooks/rules-of-hooks': 'error',
68
- // // 'react-hooks/exhaustive-deps': ['error', { additionalHooks: '(useSafeLayoutEffect|useUpdateEffect)' }],
69
- // 'react/prop-types': ['error', { skipUndeclared: true }],
70
- // 'react/react-in-jsx-scope': 'off',
71
- // 'react/self-closing-comp': ['warn', { component: true, html: true }],
72
- // 'react/no-unknown-property': ['error', { ignore: ['css'] }],
64
+ 'consistent-return': 'warn',
65
+ 'no-param-reassign': 'warn',
66
+ 'react-hooks/rules-of-hooks': 'error',
67
+ 'react-hooks/exhaustive-deps': ['warn', { additionalHooks: '(useSafeLayoutEffect|useUpdateEffect)' }],
68
+ 'react/prop-types': ['error', { skipUndeclared: true }],
69
+ 'react/react-in-jsx-scope': 'off',
70
+ 'react/self-closing-comp': ['warn', { component: true, html: true }],
71
+ 'react/no-unknown-property': ['error', { ignore: ['css'] }],
72
+ },
73
+ settings: {
74
+ react: {
75
+ version: '18',
76
+ },
73
77
  },
74
- // settings: {
75
- // react: {
76
- // version: '18',
77
- // },
78
- // },
79
78
  },
80
79
  eslintPluginPrettierRecommended,
81
80
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/frontend-libs-tailwind",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "Eightshift team",
@@ -34,40 +34,42 @@
34
34
  "homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
- "@stylistic/eslint-plugin-js": "^4.4.1",
38
- "@stylistic/stylelint-plugin": "^4.0.0",
39
- "@swc/core": "^1.13.5",
40
- "@wordpress/dependency-extraction-webpack-plugin": "^6.33.0",
41
- "browserslist": "^4.26.3",
42
- "css-loader": "^7.1.2",
43
- "css-minimizer-webpack-plugin": "^7.0.2",
44
- "eslint": "^9.38.0",
37
+ "@stylistic/eslint-plugin": "^5.8.0",
38
+ "@stylistic/stylelint-plugin": "^4.0.1",
39
+ "@swc/core": "^1.15.11",
40
+ "@wordpress/dependency-extraction-webpack-plugin": "^6.39.0",
41
+ "browserslist": "^4.28.1",
42
+ "css-loader": "^7.1.4",
43
+ "css-minimizer-webpack-plugin": "^7.0.4",
44
+ "eslint": "^9.39.2",
45
45
  "eslint-config-prettier": "^10.1.8",
46
- "eslint-plugin-prettier": "^5.5.4",
47
- "globals": "^16.4.0",
46
+ "eslint-plugin-prettier": "^5.5.5",
47
+ "globals": "^16.5.0",
48
48
  "husky": "^9.1.7",
49
- "lightningcss": "^1.30.2",
50
- "mini-css-extract-plugin": "^2.9.4",
49
+ "lightningcss": "^1.31.1",
50
+ "mini-css-extract-plugin": "^2.10.0",
51
51
  "postcss": "^8.5.6",
52
- "postcss-loader": "^8.2.0",
53
- "prettier": "^3.6.2",
54
- "prettier-plugin-tailwindcss": "^0.7.1",
52
+ "postcss-loader": "^8.2.1",
53
+ "prettier": "^3.8.1",
54
+ "prettier-plugin-tailwindcss": "^0.7.2",
55
55
  "sonner": "^2.0.7",
56
- "stylelint": "^16.25.0",
56
+ "stylelint": "^16.26.1",
57
57
  "stylelint-config-standard": "^39.0.1",
58
- "swc-loader": "^0.2.6",
59
- "terser-webpack-plugin": "^5.3.14",
60
- "webpack": "^5.102.1",
58
+ "swc-loader": "^0.2.7",
59
+ "terser-webpack-plugin": "^5.3.16",
60
+ "webpack": "^5.105.2",
61
61
  "webpack-cli": "^6.0.1",
62
- "webpack-manifest-plugin": "^5.0.1",
63
- "webpack-merge": "^6.0.1"
62
+ "webpack-manifest-plugin": "^6.0.1",
63
+ "webpack-merge": "^6.0.1",
64
+ "eslint-plugin-react": "^7.37.5",
65
+ "eslint-plugin-react-hooks": "^7.0.1"
64
66
  },
65
67
  "devDependencies": {
66
- "lint-staged": "^16.2.5",
67
- "@wordpress/api-fetch": "^7.33.0"
68
+ "lint-staged": "^16.2.7",
69
+ "@wordpress/api-fetch": "^7.39.0"
68
70
  },
69
71
  "peerDependencies": {
70
- "@eightshift/ui-components": "^5.6.1"
72
+ "@eightshift/ui-components": "^6.1.0"
71
73
  },
72
74
  "sideEffects": false,
73
75
  "lint-staged": {
@@ -24,6 +24,7 @@ const MediaButton = (props) => {
24
24
  * @param {boolean} [props.hidden] - If `true`, the component will be hidden.
25
25
  * @param {string[]} [props.allowedTypes=['image']] - Determines types of files which are allowed to be uploaded.
26
26
  * @param {string} [props.className] - Classes to add to the button wrapper.
27
+ * @param {boolean} [props.__useSmartImageNext] - If `true`, the component will use the `__SmartImageNext` for image preview and processing.
27
28
  *
28
29
  * @returns {JSX.Element} The MediaPicker component.
29
30
  *
@@ -37,7 +38,17 @@ const MediaButton = (props) => {
37
38
  *
38
39
  */
39
40
  export const MediaPicker = (props) => {
40
- const { onChange, imageId, imageUrl, noDelete, noUpload, hidden, allowedTypes = ['image'], className } = props;
41
+ const {
42
+ onChange,
43
+ imageId,
44
+ imageUrl,
45
+ noDelete,
46
+ noUpload,
47
+ hidden,
48
+ allowedTypes = ['image'],
49
+ className,
50
+ __useSmartImageNext,
51
+ } = props;
41
52
 
42
53
  if (hidden) {
43
54
  return null;
@@ -63,6 +74,7 @@ export const MediaPicker = (props) => {
63
74
  </>
64
75
  }
65
76
  className={className}
77
+ __useSmartImageNext={__useSmartImageNext}
66
78
  >
67
79
  {({ isDark, isTransparent }) => {
68
80
  let buttonType = 'default';