@yamada-ui/native-select 0.1.9 → 0.1.10

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.
@@ -17,7 +17,6 @@ import {
17
17
  splitObject,
18
18
  getValidChildren,
19
19
  isValidElement,
20
- isUndefined,
21
20
  isArray,
22
21
  pickObject
23
22
  } from "@yamada-ui/utils";
@@ -46,9 +45,9 @@ var NativeSelect = forwardRef((props, ref) => {
46
45
  iconProps,
47
46
  ...rest
48
47
  } = omitThemeProps(mergedProps);
49
- rest = useFormControlProps({ ...rest, isRequired: isRequired != null ? isRequired : !isUndefined(placeholder) });
48
+ rest = useFormControlProps(rest);
50
49
  const formControlProps = pickObject(rest, formControlProperties);
51
- const computedProps = splitObject(rest, layoutStylesProperties);
50
+ const [layoutProps, selectPorps] = splitObject(rest, layoutStylesProperties);
52
51
  let computedChildren = [];
53
52
  if (!children && data.length) {
54
53
  computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
@@ -72,7 +71,7 @@ var NativeSelect = forwardRef((props, ref) => {
72
71
  color,
73
72
  ...styles.container
74
73
  },
75
- ...computedProps[0],
74
+ ...layoutProps,
76
75
  ...containerProps,
77
76
  ...formControlProps,
78
77
  children: [
@@ -83,7 +82,7 @@ var NativeSelect = forwardRef((props, ref) => {
83
82
  className: cx("ui-native-select-field", className),
84
83
  value,
85
84
  __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
86
- ...computedProps[1],
85
+ ...selectPorps,
87
86
  children: [
88
87
  placeholder ? /* @__PURE__ */ jsx(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
89
88
  children != null ? children : computedChildren
package/dist/index.js CHANGED
@@ -56,9 +56,9 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
56
56
  iconProps,
57
57
  ...rest
58
58
  } = (0, import_core.omitThemeProps)(mergedProps);
59
- rest = (0, import_form_control.useFormControlProps)({ ...rest, isRequired: isRequired != null ? isRequired : !(0, import_utils.isUndefined)(placeholder) });
59
+ rest = (0, import_form_control.useFormControlProps)(rest);
60
60
  const formControlProps = (0, import_utils.pickObject)(rest, import_form_control.formControlProperties);
61
- const computedProps = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
61
+ const [layoutProps, selectPorps] = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
62
62
  let computedChildren = [];
63
63
  if (!children && data.length) {
64
64
  computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
@@ -82,7 +82,7 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
82
82
  color,
83
83
  ...styles.container
84
84
  },
85
- ...computedProps[0],
85
+ ...layoutProps,
86
86
  ...containerProps,
87
87
  ...formControlProps,
88
88
  children: [
@@ -93,7 +93,7 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
93
93
  className: (0, import_utils.cx)("ui-native-select-field", className),
94
94
  value,
95
95
  __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
96
- ...computedProps[1],
96
+ ...selectPorps,
97
97
  children: [
98
98
  placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
99
99
  children != null ? children : computedChildren
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  NativeOption,
3
3
  NativeOptionGroup,
4
4
  NativeSelect
5
- } from "./chunk-EV7VRRWM.mjs";
5
+ } from "./chunk-FMWYA2BA.mjs";
6
6
  export {
7
7
  NativeOption,
8
8
  NativeOptionGroup,
@@ -54,9 +54,9 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
54
54
  iconProps,
55
55
  ...rest
56
56
  } = (0, import_core.omitThemeProps)(mergedProps);
57
- rest = (0, import_form_control.useFormControlProps)({ ...rest, isRequired: isRequired != null ? isRequired : !(0, import_utils.isUndefined)(placeholder) });
57
+ rest = (0, import_form_control.useFormControlProps)(rest);
58
58
  const formControlProps = (0, import_utils.pickObject)(rest, import_form_control.formControlProperties);
59
- const computedProps = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
59
+ const [layoutProps, selectPorps] = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
60
60
  let computedChildren = [];
61
61
  if (!children && data.length) {
62
62
  computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
@@ -80,7 +80,7 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
80
80
  color,
81
81
  ...styles.container
82
82
  },
83
- ...computedProps[0],
83
+ ...layoutProps,
84
84
  ...containerProps,
85
85
  ...formControlProps,
86
86
  children: [
@@ -91,7 +91,7 @@ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
91
91
  className: (0, import_utils.cx)("ui-native-select-field", className),
92
92
  value,
93
93
  __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
94
- ...computedProps[1],
94
+ ...selectPorps,
95
95
  children: [
96
96
  placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
97
97
  children != null ? children : computedChildren
@@ -2,7 +2,7 @@ import {
2
2
  NativeOption,
3
3
  NativeOptionGroup,
4
4
  NativeSelect
5
- } from "./chunk-EV7VRRWM.mjs";
5
+ } from "./chunk-FMWYA2BA.mjs";
6
6
  export {
7
7
  NativeOption,
8
8
  NativeOptionGroup,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/native-select",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Yamada UI native select component",
5
5
  "keywords": [
6
6
  "yamada",