@eightshift/frontend-libs-tailwind 1.4.2 → 1.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/.husky/pre-commit CHANGED
File without changes
package/CHANGELOG.md CHANGED
@@ -1,72 +1,134 @@
1
-
2
1
  # Change Log for the Eightshift Frontend Libs Tailwind
2
+
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
5
  This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
6
6
 
7
- ## [1.4.2] - 2024-10-03
7
+ ---
8
+
9
+ ## [1.4.3]
10
+
11
+ ### Fixed
12
+
13
+ - Fixing Yoast SEO plugin helpers.
14
+
15
+ ## [1.4.2]
16
+
17
+ ### Fixed
18
+
8
19
  - Fixed bug with `combinations` output in `tailwindClasses` helper.
9
- - Fixed CSS `url()` imports for images not working because of Webpack config.
20
+ - Fixed CSS `url()` imports for images not working due to Webpack config.
21
+
22
+ ## [1.4.1]
23
+
24
+ ### Changed
25
+
26
+ - `tailwindClasses` check will now work even if no `parts` are defined.
10
27
 
11
- ## [1.4.1] - 2024-10-01
12
- - `tailwindClasses` check will now work fine even if no `parts` are defined.
28
+ ## [1.4.0]
13
29
 
14
- ## [1.4.0] - 2024-09-30
15
- - Introduced new, more flexible, and simpler to use `tailwindClasses` function. Replaces `getTwPart`, `getTwDynamicPart`, and `getTwClasses`.
16
- - **Potentially breaking**: `twClassesEditor` is now appended to `twClasses`. If you need editor-only classes, you can now use the `twClassesEditorOnly` key. Editor-only classes replace `twClasses`, but will also have classes from `twClassesEditor`.
17
- - **Potentially breaking**: `parts` key in manifest now supports specifying multiple parts just with a comma-separated string.
18
- - You can now apply classes to multiple parts within one option or combination! Also work with responsive options.
19
- - There are now (basic) warnings for misconfigurations of parts and options.
30
+ ### Added
31
+
32
+ - Introduced new, more flexible `tailwindClasses` function.
33
+ - Added basic warnings for misconfigurations of parts and options.
20
34
  - Updated block and component schemas with new Tailwind functionalities.
21
- - Updated dependencies.
22
35
  - Updated default blocks with new Tailwind functions.
36
+
37
+ ### Changed
38
+
39
+ - **Potentially breaking**: `twClassesEditor` is now appended to `twClasses`. Use `twClassesEditorOnly` for editor-only classes.
40
+ - **Potentially breaking**: The `parts` key in manifest now supports specifying multiple parts using a comma-separated string.
41
+ - Classes can now be applied to multiple parts in one option or combination, including responsive options.
23
42
  - Default Stylelint config will no longer report `@tailwind` rules.
43
+ - Updated dependencies.
44
+
45
+ ## [1.3.3]
46
+
47
+ ### Changed
24
48
 
25
- ## [1.3.3] - 2024-09-24
26
49
  - Updating schema.
27
50
 
28
- ## [1.3.2] - 2024-09-19
51
+ ## [1.3.2]
52
+
53
+ ### Fixed
54
+
29
55
  - Fixing theme options to use stringified JSON instead of an object.
30
56
 
31
- ## [1.3.1] - 2024-09-13
32
- - Helper `getFilteredAttributes` used on SSR components to filter out unwanted attributes and optimize the output.
57
+ ## [1.3.1]
58
+
59
+ ### Added
33
60
 
34
- ## [1.3.0] - 2024-08-08
35
- - `twClasses` and `twClassesEditor` can now be passed as an array
36
- - Updated schemas to account for the `twClasses`/`twClassesEditor` changes.
37
- - Tailwind output functions will now output the custom classes if no Tailwind classes are in the output.
61
+ - Helper `getFilteredAttributes` for SSR components to filter unwanted attributes and optimize output.
62
+
63
+ ## [1.3.0]
64
+
65
+ ### Added
66
+
67
+ - `twClasses` and `twClassesEditor` can now be passed as arrays.
68
+
69
+ ### Changed
70
+
71
+ - Updated schemas to support the changes in `twClasses`/`twClassesEditor`.
72
+ - Tailwind output functions now output custom classes if no Tailwind classes are detected.
38
73
  - Tweaked Prettier config.
39
74
  - Updated dependencies.
40
75
 
41
- ## [1.2.0] - 2024-08-08
76
+ ## [1.2.0]
77
+
78
+ ### Fixed
79
+
42
80
  - Fixed default `perPage` param in `wpSearchRoute`.
43
- - Updated image and file pickers with support for `hidden` prop and accepted types passthrough.
44
- - Fixed some reported bugs in a couple of built-in blocks.
81
+ - Fixed bugs in built-in blocks.
82
+
83
+ ### Added
84
+
85
+ - Added support for `hidden` prop and accepted types passthrough for image and file pickers.
86
+
87
+ ### Changed
88
+
45
89
  - Updated dependencies.
46
90
 
47
- ## [1.1.1] - 2024-07-11
91
+ ## [1.1.1]
92
+
93
+ ### Fixed
94
+
48
95
  - Fixed default global manifest.
96
+
97
+ ### Removed
98
+
49
99
  - Removed erroneous styles.
50
100
 
51
- ## [1.1.0] - 2024-07-09
101
+ ## [1.1.0]
102
+
103
+ ### Added
104
+
105
+ - Added new options to the fetch script: `truncateTitle` and `labelProp`.
106
+ - Added `hidden` prop to `BlockInserter`.
107
+ - Added `PickerPlaceholder` component.
108
+ - Added dynamic parts option and `getTwDynamicPart` helper.
109
+
110
+ ### Changed
111
+
52
112
  - Updated dependencies.
53
113
  - Tweaked fetch script to use WP `apiFetch`.
54
- - Added new options to the fetch script: `truncateTitle` and `labelProp`
55
- - Removed `urlBase` option from fetch script, as it's no longer needed.
56
- - Updated some built-in blocks
57
- - Moved fonts from Google Fonts to built-in.
58
- - Removed `.gitignore` ESLint ignore.
114
+ - Updated some built-in blocks.
59
115
  - Tweaked ESLint config.
60
116
  - Updated base blocks.
61
- - Added `hidden` prop to `BlockInserter`.
62
- - Added `PickerPlaceholder` component.
63
- - Added option for dynamic parts and the `getTwDynamicPart` helper.
64
117
 
65
- ## [1.0.0] - 2024-06-17
118
+ ### Removed
119
+
120
+ - Removed `urlBase` option from fetch script.
121
+ - Moved fonts from Google Fonts to built-in.
122
+ - Removed `.gitignore` ESLint ignore.
123
+
124
+ ## [1.0.0]
125
+
126
+ ### Added
127
+
66
128
  - Initial release.
67
129
 
68
130
  [Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
69
-
131
+ [1.4.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.2...1.4.3
70
132
  [1.4.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.1...1.4.2
71
133
  [1.4.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.0...1.4.1
72
134
  [1.4.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.3...1.4.0
@@ -569,7 +569,7 @@
569
569
  },
570
570
  "columnGradientDirection": {
571
571
  "twClasses": {
572
- "to-t": "bg-gradient-to-r",
572
+ "to-t": "bg-gradient-to-t",
573
573
  "to-tr": "bg-gradient-to-tr",
574
574
  "to-r": "bg-gradient-to-r",
575
575
  "to-br": "bg-gradient-to-br",
package/bun.lockb CHANGED
File without changes
package/package.json CHANGED
@@ -1,91 +1,92 @@
1
1
  {
2
- "name": "@eightshift/frontend-libs-tailwind",
3
- "version": "1.4.2",
4
- "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
- "author": {
6
- "name": "Eightshift team",
7
- "email": "team@eightshift.com",
8
- "url": "https://eightshift.com/"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/infinum/eightshift-frontend-libs-tailwind.git"
13
- },
14
- "keywords": [
15
- "frontend",
16
- "css",
17
- "mixin",
18
- "js",
19
- "utility",
20
- "module",
21
- "WordPress",
22
- "tailwind",
23
- "TailwindCSS"
24
- ],
25
- "bugs": {
26
- "url": "https://github.com/infinum/eightshift-frontend-libs-tailwind/issues"
27
- },
28
- "homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
29
- "license": "MIT",
30
- "dependencies": {
31
- "@eightshift/ui-components": "^1.6.1",
32
- "@stylistic/eslint-plugin-js": "^2.8.0",
33
- "@stylistic/stylelint-plugin": "^3.1.0",
34
- "@swc/core": "^1.7.26",
35
- "@wordpress/api-fetch": "^7.8.0",
36
- "@wordpress/block-editor": "^14.3.0",
37
- "@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
38
- "@wordpress/dom-ready": "^4.8.0",
39
- "@wordpress/server-side-render": "^5.8.0",
40
- "browserslist": "^4.24.0",
41
- "css-loader": "^7.1.2",
42
- "css-minimizer-webpack-plugin": "^7.0.0",
43
- "eslint": "^9.11.1",
44
- "eslint-config-prettier": "^9.1.0",
45
- "eslint-plugin-prettier": "^5.2.1",
46
- "globals": "^15.9.0",
47
- "husky": "^9.1.6",
48
- "lightningcss": "^1.27.0",
49
- "mini-css-extract-plugin": "^2.9.1",
50
- "postcss": "^8.4.47",
51
- "postcss-loader": "^8.1.1",
52
- "prettier": "^3.3.3",
53
- "prettier-plugin-tailwindcss": "^0.6.8",
54
- "sonner": "^1.5.0",
55
- "stylelint": "^16.9.0",
56
- "stylelint-config-standard": "^36.0.1",
57
- "swc-loader": "^0.2.6",
58
- "terser-webpack-plugin": "^5.3.10",
59
- "webpack": "^5.95.0",
60
- "webpack-cli": "^5.1.4",
61
- "webpack-manifest-plugin": "^5.0.0",
62
- "webpack-merge": "^6.0.1"
63
- },
64
- "devDependencies": {
65
- "embla-carousel": "^8.3.0",
66
- "fluid-tailwind": "^1.0.3",
67
- "lint-staged": "^15.2.10",
68
- "micromodal": "^0.4.10",
69
- "ol": "^10.2.1",
70
- "ol-mapbox-style": "^12.3.5",
71
- "tailwindcss": "^3.4.13",
72
- "tailwindcss-animate": "^1.0.7"
73
- },
74
- "sideEffects": false,
75
- "lint-staged": {
76
- "*.css": [
77
- "npm run lintStyle"
78
- ],
79
- "*.js": [
80
- "npm run lintJs"
81
- ],
82
- "*.php": [
83
- "composer test"
84
- ]
85
- },
86
- "scripts": {
87
- "lintStyle": "stylelint **/*.css",
88
- "lintJs": "npx eslint",
89
- "lint": "npm run lintJs && npm run lintStyle"
90
- }
91
- }
2
+ "name": "@eightshift/frontend-libs-tailwind",
3
+ "version": "1.4.3",
4
+ "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
+ "author": {
6
+ "name": "Eightshift team",
7
+ "email": "team@eightshift.com",
8
+ "url": "https://eightshift.com/"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/infinum/eightshift-frontend-libs-tailwind.git"
13
+ },
14
+ "keywords": [
15
+ "frontend",
16
+ "css",
17
+ "mixin",
18
+ "js",
19
+ "utility",
20
+ "module",
21
+ "WordPress",
22
+ "tailwind",
23
+ "TailwindCSS"
24
+ ],
25
+ "bugs": {
26
+ "url": "https://github.com/infinum/eightshift-frontend-libs-tailwind/issues"
27
+ },
28
+ "scripts": {
29
+ "lintStyle": "stylelint **/*.css",
30
+ "lintJs": "npx eslint",
31
+ "lint": "npm run lintJs && npm run lintStyle",
32
+ "prepare": "husky"
33
+ },
34
+ "homepage": "https://github.com/infinum/eightshift-frontend-libs-tailwind#readme",
35
+ "license": "MIT",
36
+ "dependencies": {
37
+ "@eightshift/ui-components": "^1.6.1",
38
+ "@stylistic/eslint-plugin-js": "^2.8.0",
39
+ "@stylistic/stylelint-plugin": "^3.1.0",
40
+ "@swc/core": "^1.7.26",
41
+ "@wordpress/api-fetch": "^7.8.0",
42
+ "@wordpress/block-editor": "^14.3.0",
43
+ "@wordpress/dependency-extraction-webpack-plugin": "^5.9.0",
44
+ "@wordpress/dom-ready": "^4.8.0",
45
+ "@wordpress/server-side-render": "^5.8.0",
46
+ "browserslist": "^4.24.0",
47
+ "css-loader": "^7.1.2",
48
+ "css-minimizer-webpack-plugin": "^7.0.0",
49
+ "eslint": "^9.11.1",
50
+ "eslint-config-prettier": "^9.1.0",
51
+ "eslint-plugin-prettier": "^5.2.1",
52
+ "globals": "^15.9.0",
53
+ "husky": "^9.1.6",
54
+ "lightningcss": "^1.27.0",
55
+ "mini-css-extract-plugin": "^2.9.1",
56
+ "postcss": "^8.4.47",
57
+ "postcss-loader": "^8.1.1",
58
+ "prettier": "^3.3.3",
59
+ "prettier-plugin-tailwindcss": "^0.6.8",
60
+ "sonner": "^1.5.0",
61
+ "stylelint": "^16.9.0",
62
+ "stylelint-config-standard": "^36.0.1",
63
+ "swc-loader": "^0.2.6",
64
+ "terser-webpack-plugin": "^5.3.10",
65
+ "webpack": "^5.95.0",
66
+ "webpack-cli": "^5.1.4",
67
+ "webpack-manifest-plugin": "^5.0.0",
68
+ "webpack-merge": "^6.0.1"
69
+ },
70
+ "devDependencies": {
71
+ "embla-carousel": "^8.3.0",
72
+ "fluid-tailwind": "^1.0.3",
73
+ "lint-staged": "^15.2.10",
74
+ "micromodal": "^0.4.10",
75
+ "ol": "^10.2.1",
76
+ "ol-mapbox-style": "^12.3.5",
77
+ "tailwindcss": "^3.4.13",
78
+ "tailwindcss-animate": "^1.0.7"
79
+ },
80
+ "sideEffects": false,
81
+ "lint-staged": {
82
+ "*.css": [
83
+ "npm run lintStyle"
84
+ ],
85
+ "*.js": [
86
+ "npm run lintJs"
87
+ ],
88
+ "*.php": [
89
+ "composer test"
90
+ ]
91
+ }
92
+ }
@@ -1,7 +1,7 @@
1
1
  import domReady from '@wordpress/dom-ready';
2
2
  import apiFetch from '@wordpress/api-fetch';
3
3
  import { subscribe, select } from '@wordpress/data';
4
- import { debounce, isEmpty } from '../helpers';
4
+ import { debounce, isEmpty } from '@eightshift/ui-components/utilities';
5
5
 
6
6
  /* global YoastSEO */
7
7