@yamada-ui/native-select 0.0.0-dev-20230603042803

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Hirotomo Yamada
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @yamada-ui/native-select
2
+
3
+ ## Installation
4
+
5
+ ```sh
6
+ $ pnpm add @yamada-ui/native-select
7
+ ```
8
+
9
+ or
10
+
11
+ ```sh
12
+ $ yarn add @yamada-ui/native-select
13
+ ```
14
+
15
+ or
16
+
17
+ ```sh
18
+ $ npm install @yamada-ui/native-select
19
+ ```
20
+
21
+ ## Contribution
22
+
23
+ Wouldn't you like to contribute? That's amazing! We have prepared a [contribution guide](https://github.com/hirotomoyamada/yamada-ui/blob/main/CONTRIBUTING.md) to assist you.
24
+
25
+ ## Licence
26
+
27
+ This package is licensed under the terms of the
28
+ [MIT license](https://github.com/hirotomoyamada/yamada-ui/blob/main/LICENSE).
@@ -0,0 +1,131 @@
1
+ // src/native-select.tsx
2
+ import {
3
+ ui,
4
+ forwardRef,
5
+ useMultiComponentStyle,
6
+ omitThemeProps,
7
+ layoutStylesProperties
8
+ } from "@yamada-ui/core";
9
+ import {
10
+ useFormControlProps,
11
+ formControlProperties
12
+ } from "@yamada-ui/form-control";
13
+ import { ChevronIcon } from "@yamada-ui/icon";
14
+ import {
15
+ createContext,
16
+ cx,
17
+ splitObject,
18
+ getValidChildren,
19
+ isValidElement,
20
+ isUndefined,
21
+ isArray,
22
+ pickObject
23
+ } from "@yamada-ui/utils";
24
+ import { cloneElement } from "react";
25
+ import { jsx, jsxs } from "react/jsx-runtime";
26
+ var [NativeSelectProvider, useNativeSelect] = createContext({
27
+ name: "NativeSelectContext",
28
+ errorMessage: `useNativeSelect returned is 'undefined'. Seems you forgot to wrap the components in "<NativeSelect />"`
29
+ });
30
+ var NativeSelect = forwardRef((props, ref) => {
31
+ const [styles, mergedProps] = useMultiComponentStyle("Select", props);
32
+ let {
33
+ className,
34
+ children,
35
+ placeholderInOptions = true,
36
+ color,
37
+ h,
38
+ height,
39
+ minH,
40
+ minHeight,
41
+ data = [],
42
+ value,
43
+ placeholder,
44
+ isRequired,
45
+ containerProps,
46
+ iconProps,
47
+ ...rest
48
+ } = omitThemeProps(mergedProps);
49
+ rest = useFormControlProps({ ...rest, isRequired: isRequired != null ? isRequired : !isUndefined(placeholder) });
50
+ const formControlProps = pickObject(rest, formControlProperties);
51
+ const computedProps = splitObject(rest, layoutStylesProperties);
52
+ let computedChildren = [];
53
+ if (!children && data.length) {
54
+ computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
55
+ if (!isArray(value2)) {
56
+ return /* @__PURE__ */ jsx(NativeOption, { value: value2, ...props2, children: label }, i);
57
+ } else {
58
+ return /* @__PURE__ */ jsx(NativeOptionGroup, { label, ...props2, children: value2.map(
59
+ ({ label: label2, value: value3, ...props3 }, i2) => !isArray(value3) ? /* @__PURE__ */ jsx(NativeOption, { value: value3, ...props3, children: label2 }, i2) : null
60
+ ) }, i);
61
+ }
62
+ });
63
+ }
64
+ return /* @__PURE__ */ jsx(NativeSelectProvider, { value: styles, children: /* @__PURE__ */ jsxs(
65
+ ui.div,
66
+ {
67
+ className: "ui-native-select",
68
+ __css: {
69
+ position: "relative",
70
+ w: "100%",
71
+ h: "fit-content",
72
+ color,
73
+ ...styles.container
74
+ },
75
+ ...computedProps[0],
76
+ ...containerProps,
77
+ ...formControlProps,
78
+ children: [
79
+ /* @__PURE__ */ jsxs(
80
+ ui.select,
81
+ {
82
+ ref,
83
+ className: cx("ui-native-select-field", className),
84
+ value,
85
+ __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
86
+ ...computedProps[1],
87
+ children: [
88
+ placeholder ? /* @__PURE__ */ jsx(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
89
+ children != null ? children : computedChildren
90
+ ]
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsx(NativeSelectIcon, { ...iconProps, ...formControlProps })
94
+ ]
95
+ }
96
+ ) });
97
+ });
98
+ var NativeSelectIcon = ({ className, children, ...rest }) => {
99
+ const styles = useNativeSelect();
100
+ const css = {
101
+ position: "absolute",
102
+ display: "inline-flex",
103
+ alignItems: "center",
104
+ justifyContent: "center",
105
+ pointerEvents: "none",
106
+ top: "50%",
107
+ transform: "translateY(-50%)",
108
+ ...styles.icon
109
+ };
110
+ const validChildren = getValidChildren(children);
111
+ const cloneChildren = validChildren.map(
112
+ (child) => cloneElement(child, {
113
+ focusable: false,
114
+ "aria-hidden": true,
115
+ style: {
116
+ width: "1em",
117
+ height: "1em",
118
+ color: "currentColor"
119
+ }
120
+ })
121
+ );
122
+ return /* @__PURE__ */ jsx(ui.div, { className: cx("ui-native-select-icon", className), __css: css, ...rest, children: isValidElement(children) ? cloneChildren : /* @__PURE__ */ jsx(ChevronIcon, {}) });
123
+ };
124
+ var NativeOptionGroup = forwardRef((props, ref) => /* @__PURE__ */ jsx(ui.optgroup, { ref, ...props }));
125
+ var NativeOption = forwardRef((props, ref) => /* @__PURE__ */ jsx(ui.option, { ref, ...props }));
126
+
127
+ export {
128
+ NativeSelect,
129
+ NativeOptionGroup,
130
+ NativeOption
131
+ };
@@ -0,0 +1,4 @@
1
+ export { NativeOption, NativeOptionGroup, NativeOptionGroupProps, NativeOptionProps, NativeSelect, NativeSelectProps, UINativeOption } from './native-select.js';
2
+ import '@yamada-ui/core';
3
+ import '@yamada-ui/form-control';
4
+ import 'react';
package/dist/index.js ADDED
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ NativeOption: () => NativeOption,
24
+ NativeOptionGroup: () => NativeOptionGroup,
25
+ NativeSelect: () => NativeSelect
26
+ });
27
+ module.exports = __toCommonJS(src_exports);
28
+
29
+ // src/native-select.tsx
30
+ var import_core = require("@yamada-ui/core");
31
+ var import_form_control = require("@yamada-ui/form-control");
32
+ var import_icon = require("@yamada-ui/icon");
33
+ var import_utils = require("@yamada-ui/utils");
34
+ var import_react = require("react");
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var [NativeSelectProvider, useNativeSelect] = (0, import_utils.createContext)({
37
+ name: "NativeSelectContext",
38
+ errorMessage: `useNativeSelect returned is 'undefined'. Seems you forgot to wrap the components in "<NativeSelect />"`
39
+ });
40
+ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
41
+ const [styles, mergedProps] = (0, import_core.useMultiComponentStyle)("Select", props);
42
+ let {
43
+ className,
44
+ children,
45
+ placeholderInOptions = true,
46
+ color,
47
+ h,
48
+ height,
49
+ minH,
50
+ minHeight,
51
+ data = [],
52
+ value,
53
+ placeholder,
54
+ isRequired,
55
+ containerProps,
56
+ iconProps,
57
+ ...rest
58
+ } = (0, import_core.omitThemeProps)(mergedProps);
59
+ rest = (0, import_form_control.useFormControlProps)({ ...rest, isRequired: isRequired != null ? isRequired : !(0, import_utils.isUndefined)(placeholder) });
60
+ const formControlProps = (0, import_utils.pickObject)(rest, import_form_control.formControlProperties);
61
+ const computedProps = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
62
+ let computedChildren = [];
63
+ if (!children && data.length) {
64
+ computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
65
+ if (!(0, import_utils.isArray)(value2)) {
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: value2, ...props2, children: label }, i);
67
+ } else {
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOptionGroup, { label, ...props2, children: value2.map(
69
+ ({ label: label2, value: value3, ...props3 }, i2) => !(0, import_utils.isArray)(value3) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: value3, ...props3, children: label2 }, i2) : null
70
+ ) }, i);
71
+ }
72
+ });
73
+ }
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelectProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
75
+ import_core.ui.div,
76
+ {
77
+ className: "ui-native-select",
78
+ __css: {
79
+ position: "relative",
80
+ w: "100%",
81
+ h: "fit-content",
82
+ color,
83
+ ...styles.container
84
+ },
85
+ ...computedProps[0],
86
+ ...containerProps,
87
+ ...formControlProps,
88
+ children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
90
+ import_core.ui.select,
91
+ {
92
+ ref,
93
+ className: (0, import_utils.cx)("ui-native-select-field", className),
94
+ value,
95
+ __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
96
+ ...computedProps[1],
97
+ children: [
98
+ placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
99
+ children != null ? children : computedChildren
100
+ ]
101
+ }
102
+ ),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelectIcon, { ...iconProps, ...formControlProps })
104
+ ]
105
+ }
106
+ ) });
107
+ });
108
+ var NativeSelectIcon = ({ className, children, ...rest }) => {
109
+ const styles = useNativeSelect();
110
+ const css = {
111
+ position: "absolute",
112
+ display: "inline-flex",
113
+ alignItems: "center",
114
+ justifyContent: "center",
115
+ pointerEvents: "none",
116
+ top: "50%",
117
+ transform: "translateY(-50%)",
118
+ ...styles.icon
119
+ };
120
+ const validChildren = (0, import_utils.getValidChildren)(children);
121
+ const cloneChildren = validChildren.map(
122
+ (child) => (0, import_react.cloneElement)(child, {
123
+ focusable: false,
124
+ "aria-hidden": true,
125
+ style: {
126
+ width: "1em",
127
+ height: "1em",
128
+ color: "currentColor"
129
+ }
130
+ })
131
+ );
132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.div, { className: (0, import_utils.cx)("ui-native-select-icon", className), __css: css, ...rest, children: (0, import_utils.isValidElement)(children) ? cloneChildren : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, {}) });
133
+ };
134
+ var NativeOptionGroup = (0, import_core.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.optgroup, { ref, ...props }));
135
+ var NativeOption = (0, import_core.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.option, { ref, ...props }));
136
+ // Annotate the CommonJS export names for ESM import in node:
137
+ 0 && (module.exports = {
138
+ NativeOption,
139
+ NativeOptionGroup,
140
+ NativeSelect
141
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,10 @@
1
+ import {
2
+ NativeOption,
3
+ NativeOptionGroup,
4
+ NativeSelect
5
+ } from "./chunk-EV7VRRWM.mjs";
6
+ export {
7
+ NativeOption,
8
+ NativeOptionGroup,
9
+ NativeSelect
10
+ };
@@ -0,0 +1,29 @@
1
+ import * as _yamada_ui_core from '@yamada-ui/core';
2
+ import { HTMLUIProps, ThemeProps } from '@yamada-ui/core';
3
+ import { FormControlOptions } from '@yamada-ui/form-control';
4
+ import { DetailedHTMLProps, OptionHTMLAttributes } from 'react';
5
+
6
+ type Value = DetailedHTMLProps<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>['value'];
7
+ type UINativeOption = Omit<DetailedHTMLProps<OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, 'label' | 'children' | 'value'> & {
8
+ label?: string;
9
+ value?: Value | UINativeOption[];
10
+ };
11
+ type NativeSelectOptions = {
12
+ data?: UINativeOption[];
13
+ placeholder?: string;
14
+ placeholderInOptions?: boolean;
15
+ focusBorderColor?: string;
16
+ errorBorderColor?: string;
17
+ containerProps?: Omit<HTMLUIProps<'div'>, 'children'>;
18
+ iconProps?: HTMLUIProps<'div'>;
19
+ };
20
+ type NativeSelectProps = Omit<HTMLUIProps<'select'>, 'size'> & ThemeProps<'Select'> & NativeSelectOptions & FormControlOptions;
21
+ declare const NativeSelect: _yamada_ui_core.Component<"select", NativeSelectProps>;
22
+ type NativeOptionGroupProps = HTMLUIProps<'optgroup'>;
23
+ declare const NativeOptionGroup: _yamada_ui_core.Component<"optgroup", NativeOptionGroupProps>;
24
+ type NativeOptionProps = Omit<HTMLUIProps<'option'>, 'children'> & {
25
+ children?: string;
26
+ };
27
+ declare const NativeOption: _yamada_ui_core.Component<"option", NativeOptionProps>;
28
+
29
+ export { NativeOption, NativeOptionGroup, NativeOptionGroupProps, NativeOptionProps, NativeSelect, NativeSelectProps, UINativeOption };
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/native-select.tsx
21
+ var native_select_exports = {};
22
+ __export(native_select_exports, {
23
+ NativeOption: () => NativeOption,
24
+ NativeOptionGroup: () => NativeOptionGroup,
25
+ NativeSelect: () => NativeSelect
26
+ });
27
+ module.exports = __toCommonJS(native_select_exports);
28
+ var import_core = require("@yamada-ui/core");
29
+ var import_form_control = require("@yamada-ui/form-control");
30
+ var import_icon = require("@yamada-ui/icon");
31
+ var import_utils = require("@yamada-ui/utils");
32
+ var import_react = require("react");
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var [NativeSelectProvider, useNativeSelect] = (0, import_utils.createContext)({
35
+ name: "NativeSelectContext",
36
+ errorMessage: `useNativeSelect returned is 'undefined'. Seems you forgot to wrap the components in "<NativeSelect />"`
37
+ });
38
+ var NativeSelect = (0, import_core.forwardRef)((props, ref) => {
39
+ const [styles, mergedProps] = (0, import_core.useMultiComponentStyle)("Select", props);
40
+ let {
41
+ className,
42
+ children,
43
+ placeholderInOptions = true,
44
+ color,
45
+ h,
46
+ height,
47
+ minH,
48
+ minHeight,
49
+ data = [],
50
+ value,
51
+ placeholder,
52
+ isRequired,
53
+ containerProps,
54
+ iconProps,
55
+ ...rest
56
+ } = (0, import_core.omitThemeProps)(mergedProps);
57
+ rest = (0, import_form_control.useFormControlProps)({ ...rest, isRequired: isRequired != null ? isRequired : !(0, import_utils.isUndefined)(placeholder) });
58
+ const formControlProps = (0, import_utils.pickObject)(rest, import_form_control.formControlProperties);
59
+ const computedProps = (0, import_utils.splitObject)(rest, import_core.layoutStylesProperties);
60
+ let computedChildren = [];
61
+ if (!children && data.length) {
62
+ computedChildren = data.map(({ label, value: value2, ...props2 }, i) => {
63
+ if (!(0, import_utils.isArray)(value2)) {
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: value2, ...props2, children: label }, i);
65
+ } else {
66
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOptionGroup, { label, ...props2, children: value2.map(
67
+ ({ label: label2, value: value3, ...props3 }, i2) => !(0, import_utils.isArray)(value3) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: value3, ...props3, children: label2 }, i2) : null
68
+ ) }, i);
69
+ }
70
+ });
71
+ }
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelectProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
73
+ import_core.ui.div,
74
+ {
75
+ className: "ui-native-select",
76
+ __css: {
77
+ position: "relative",
78
+ w: "100%",
79
+ h: "fit-content",
80
+ color,
81
+ ...styles.container
82
+ },
83
+ ...computedProps[0],
84
+ ...containerProps,
85
+ ...formControlProps,
86
+ children: [
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
88
+ import_core.ui.select,
89
+ {
90
+ ref,
91
+ className: (0, import_utils.cx)("ui-native-select-field", className),
92
+ value,
93
+ __css: { paddingEnd: "2rem", h: h != null ? h : height, minH: minH != null ? minH : minHeight, ...styles.field },
94
+ ...computedProps[1],
95
+ children: [
96
+ placeholder ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeOption, { value: "", hidden: !placeholderInOptions, children: placeholder }) : null,
97
+ children != null ? children : computedChildren
98
+ ]
99
+ }
100
+ ),
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NativeSelectIcon, { ...iconProps, ...formControlProps })
102
+ ]
103
+ }
104
+ ) });
105
+ });
106
+ var NativeSelectIcon = ({ className, children, ...rest }) => {
107
+ const styles = useNativeSelect();
108
+ const css = {
109
+ position: "absolute",
110
+ display: "inline-flex",
111
+ alignItems: "center",
112
+ justifyContent: "center",
113
+ pointerEvents: "none",
114
+ top: "50%",
115
+ transform: "translateY(-50%)",
116
+ ...styles.icon
117
+ };
118
+ const validChildren = (0, import_utils.getValidChildren)(children);
119
+ const cloneChildren = validChildren.map(
120
+ (child) => (0, import_react.cloneElement)(child, {
121
+ focusable: false,
122
+ "aria-hidden": true,
123
+ style: {
124
+ width: "1em",
125
+ height: "1em",
126
+ color: "currentColor"
127
+ }
128
+ })
129
+ );
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.div, { className: (0, import_utils.cx)("ui-native-select-icon", className), __css: css, ...rest, children: (0, import_utils.isValidElement)(children) ? cloneChildren : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.ChevronIcon, {}) });
131
+ };
132
+ var NativeOptionGroup = (0, import_core.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.optgroup, { ref, ...props }));
133
+ var NativeOption = (0, import_core.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.ui.option, { ref, ...props }));
134
+ // Annotate the CommonJS export names for ESM import in node:
135
+ 0 && (module.exports = {
136
+ NativeOption,
137
+ NativeOptionGroup,
138
+ NativeSelect
139
+ });
@@ -0,0 +1,10 @@
1
+ import {
2
+ NativeOption,
3
+ NativeOptionGroup,
4
+ NativeSelect
5
+ } from "./chunk-EV7VRRWM.mjs";
6
+ export {
7
+ NativeOption,
8
+ NativeOptionGroup,
9
+ NativeSelect
10
+ };
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@yamada-ui/native-select",
3
+ "version": "0.0.0-dev-20230603042803",
4
+ "description": "Yamada UI native select component",
5
+ "keywords": [
6
+ "yamada",
7
+ "yamada ui",
8
+ "react",
9
+ "emotion",
10
+ "component",
11
+ "native-select",
12
+ "ui",
13
+ "uikit",
14
+ "styled",
15
+ "style-props",
16
+ "styled-component",
17
+ "css-in-js"
18
+ ],
19
+ "author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
20
+ "license": "MIT",
21
+ "main": "dist/index.js",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "sideEffects": false,
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/hirotomoyamada/yamada-ui",
32
+ "directory": "packages/components/native-select"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
+ },
37
+ "dependencies": {
38
+ "@yamada-ui/core": "0.0.0-dev-20230603042803",
39
+ "@yamada-ui/utils": "0.1.0",
40
+ "@yamada-ui/form-control": "0.0.0-dev-20230603042803",
41
+ "@yamada-ui/icon": "0.0.0-dev-20230603042803"
42
+ },
43
+ "devDependencies": {
44
+ "react": "^18.0.0",
45
+ "clean-package": "2.2.0"
46
+ },
47
+ "peerDependencies": {
48
+ "react": ">=18"
49
+ },
50
+ "clean-package": "../../../clean-package.config.json",
51
+ "tsup": {
52
+ "clean": true,
53
+ "target": "es2019",
54
+ "format": [
55
+ "cjs",
56
+ "esm"
57
+ ]
58
+ },
59
+ "module": "dist/index.mjs",
60
+ "types": "dist/index.d.ts",
61
+ "exports": {
62
+ ".": {
63
+ "types": "./dist/index.d.ts",
64
+ "import": "./dist/index.mjs",
65
+ "require": "./dist/index.js"
66
+ },
67
+ "./package.json": "./package.json"
68
+ },
69
+ "scripts": {
70
+ "dev": "pnpm build:fast -- --watch",
71
+ "build": "tsup src --dts",
72
+ "build:fast": "tsup src",
73
+ "clean": "rimraf dist .turbo",
74
+ "typecheck": "tsc --noEmit",
75
+ "gen:docs": "tsx ../../../scripts/generate-docs"
76
+ }
77
+ }