@mittwald/flow-react-components 0.2.0-alpha.160 → 0.2.0-alpha.162
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 +10 -0
- package/dist/js/components/src/lib/react/areChildrenEmpty.mjs +1 -9
- package/dist/js/components/src/lib/react/areChildrenEmpty.mjs.map +1 -1
- package/dist/types/lib/react/areChildrenEmpty.d.ts +0 -1
- package/dist/types/lib/react/areChildrenEmpty.d.ts.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.2.0-alpha.162](https://github.com/mittwald/flow/compare/0.2.0-alpha.161...0.2.0-alpha.162) (2025-04-26)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @mittwald/flow-react-components
|
|
9
|
+
|
|
10
|
+
# [0.2.0-alpha.161](https://github.com/mittwald/flow/compare/0.2.0-alpha.160...0.2.0-alpha.161) (2025-04-25)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* less strict children empty check ([cff5a23](https://github.com/mittwald/flow/commit/cff5a2344048383e99f494ce43a2009c967829b2))
|
|
15
|
+
|
|
6
16
|
# [0.2.0-alpha.160](https://github.com/mittwald/flow/compare/0.2.0-alpha.159...0.2.0-alpha.160) (2025-04-25)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import React from 'react';
|
|
4
|
-
|
|
5
3
|
const isNullish = (children) => children === null || children === void 0 || children === false;
|
|
6
4
|
const areChildrenEmpty = (children) => {
|
|
7
5
|
if (isNullish(children)) {
|
|
@@ -10,13 +8,7 @@ const areChildrenEmpty = (children) => {
|
|
|
10
8
|
if (Array.isArray(children)) {
|
|
11
9
|
return children.length === 0 || children.every(isNullish);
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
if (React.isValidElement(children)) {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
return true;
|
|
11
|
+
return false;
|
|
20
12
|
};
|
|
21
13
|
|
|
22
14
|
export { areChildrenEmpty };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areChildrenEmpty.mjs","sources":["../../../../../../src/lib/react/areChildrenEmpty.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"areChildrenEmpty.mjs","sources":["../../../../../../src/lib/react/areChildrenEmpty.ts"],"sourcesContent":["const isNullish = (children: React.ReactNode) =>\n children === null || children === undefined || children === false;\n\nexport const areChildrenEmpty = (children: React.ReactNode): boolean => {\n if (isNullish(children)) {\n return true;\n }\n\n if (Array.isArray(children)) {\n return children.length === 0 || children.every(isNullish);\n }\n\n return false;\n};\n"],"names":[],"mappings":"AAAA,MAAM,YAAY,CAAC,QAAA,KACjB,aAAa,IAAQ,IAAA,QAAA,KAAa,UAAa,QAAa,KAAA,KAAA;AAEjD,MAAA,gBAAA,GAAmB,CAAC,QAAuC,KAAA;AACtE,EAAI,IAAA,SAAA,CAAU,QAAQ,CAAG,EAAA;AACvB,IAAO,OAAA,IAAA;AAAA;AAGT,EAAI,IAAA,KAAA,CAAM,OAAQ,CAAA,QAAQ,CAAG,EAAA;AAC3B,IAAA,OAAO,QAAS,CAAA,MAAA,KAAW,CAAK,IAAA,QAAA,CAAS,MAAM,SAAS,CAAA;AAAA;AAG1D,EAAO,OAAA,KAAA;AACT;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"areChildrenEmpty.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/areChildrenEmpty.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"areChildrenEmpty.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/areChildrenEmpty.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,GAAI,UAAU,KAAK,CAAC,SAAS,KAAG,OAU5D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.162",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@chakra-ui/live-region": "^2.1.0",
|
|
55
55
|
"@internationalized/string-compiler": "^3.2.6",
|
|
56
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
56
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.162",
|
|
57
57
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
58
58
|
"@react-aria/form": "^3.0.14",
|
|
59
59
|
"@react-aria/utils": "^3.28.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@faker-js/faker": "^9.6.0",
|
|
94
94
|
"@internationalized/date": "^3.7.0",
|
|
95
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
95
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.162",
|
|
96
96
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
97
97
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
98
98
|
"@mittwald/typescript-config": "",
|
|
@@ -173,5 +173,5 @@
|
|
|
173
173
|
"optional": true
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
|
-
"gitHead": "
|
|
176
|
+
"gitHead": "0dd42e56678baad71cfcdc6bb127ef98b338acfb"
|
|
177
177
|
}
|