@neumorphism-ui/react 1.0.0-next.2 → 1.0.0-next.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.
@@ -18,6 +18,7 @@ function textOf(node) {
18
18
  * fragments, arrays and plain elements (spec §8.4). A component other than the option wrapper may
19
19
  * render options the server cannot see, so meeting one returns no options at all: the select then
20
20
  * leaves its display empty for the client to fill rather than guessing from part of the list.
21
+ * Children with a `slot` (a rich label or help text) hold no options and are skipped.
21
22
  */
22
23
  function collectOptions(children, optionTag) {
23
24
  const options = [];
@@ -27,6 +28,8 @@ function collectOptions(children, optionTag) {
27
28
  if (!React.isValidElement(child))
28
29
  return;
29
30
  const props = child.props;
31
+ if (props.slot !== undefined && props.slot !== null)
32
+ return;
30
33
  const type = child.type;
31
34
  const isOption = type === optionTag || (typeof type !== 'string' && type?.displayName === optionTag);
32
35
  if (!isOption) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neumorphism-ui/react",
3
- "version": "1.0.0-next.2",
3
+ "version": "1.0.0-next.3",
4
4
  "description": "React wrappers for neumorphism-ui",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "provenance": true
26
26
  },
27
27
  "dependencies": {
28
- "@neumorphism-ui/elements": "1.0.0-next.2"
28
+ "@neumorphism-ui/elements": "1.0.0-next.3"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": "^18.3 || ^19",