@eightshift/frontend-libs-tailwind 1.4.0 → 1.4.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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/scripts/editor/tailwindcss.js +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ 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.1] - 2024-10-01
|
|
8
|
+
- `tailwindClasses` check will now work fine even if no `parts` are defined.
|
|
9
|
+
|
|
7
10
|
## [1.4.0] - 2024-09-30
|
|
8
11
|
- Introduced new, more flexible, and simpler to use `tailwindClasses` function. Replaces `getTwPart`, `getTwDynamicPart`, and `getTwClasses`.
|
|
9
12
|
- **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`.
|
|
@@ -60,6 +63,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
|
|
|
60
63
|
|
|
61
64
|
[Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
|
|
62
65
|
|
|
66
|
+
[1.4.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.0...1.4.1
|
|
63
67
|
[1.4.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.3...1.4.0
|
|
64
68
|
[1.3.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.2...1.3.3
|
|
65
69
|
[1.3.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.1...1.3.2
|
package/package.json
CHANGED
|
@@ -508,7 +508,12 @@ export const tailwindClasses = (part, attributes, manifest, ...custom) => {
|
|
|
508
508
|
|
|
509
509
|
let partName = 'base';
|
|
510
510
|
|
|
511
|
-
if (
|
|
511
|
+
if (
|
|
512
|
+
part !== 'base' &&
|
|
513
|
+
part?.length > 0 &&
|
|
514
|
+
typeof manifest?.tailwind?.parts?.[part] !== 'undefined' &&
|
|
515
|
+
allParts.includes(part)
|
|
516
|
+
) {
|
|
512
517
|
partName = part;
|
|
513
518
|
} else if (part !== 'base') {
|
|
514
519
|
throw new Error(`Part '${part}' is not defined in the manifest.`);
|