@ltht-react/select 2.0.192 → 2.0.194

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/README.md CHANGED
@@ -1,15 +1,15 @@
1
- # Select
2
-
3
- <!-- STORY -->
4
-
5
- ### Import
6
-
7
- ```js
8
- import Select from '@ltht-react/select'
9
- ```
10
-
11
- ### Usage
12
-
13
- ```jsx
14
- <Select />
15
- ```
1
+ # Select
2
+
3
+ <!-- STORY -->
4
+
5
+ ### Import
6
+
7
+ ```js
8
+ import Select from '@ltht-react/select'
9
+ ```
10
+
11
+ ### Usage
12
+
13
+ ```jsx
14
+ <Select />
15
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltht-react/select",
3
- "version": "2.0.192",
3
+ "version": "2.0.194",
4
4
  "description": "ltht-react atoms Select component.",
5
5
  "author": "LTHT",
6
6
  "homepage": "",
@@ -28,11 +28,11 @@
28
28
  "dependencies": {
29
29
  "@emotion/react": "^11.0.0",
30
30
  "@emotion/styled": "^11.0.0",
31
- "@ltht-react/icon": "^2.0.192",
32
- "@ltht-react/styles": "^2.0.192",
33
- "@ltht-react/types": "^2.0.192",
34
- "@ltht-react/utils": "^2.0.192",
31
+ "@ltht-react/icon": "^2.0.194",
32
+ "@ltht-react/styles": "^2.0.194",
33
+ "@ltht-react/types": "^2.0.194",
34
+ "@ltht-react/utils": "^2.0.194",
35
35
  "react": "^18.2.0"
36
36
  },
37
- "gitHead": "d97c241ba79c5e28edb4dec124e156cda6e9af66"
37
+ "gitHead": "2eb4b88fa2bc19baa1be9433dbe29fe1a947dc62"
38
38
  }
package/src/index.tsx CHANGED
@@ -1,30 +1,30 @@
1
- import { FC, OptionHTMLAttributes, SelectHTMLAttributes } from 'react'
2
- import styled from '@emotion/styled'
3
- import { inputBaseStyles } from '@ltht-react/styles'
4
-
5
- const StyledSelect = styled.select`
6
- ${inputBaseStyles}
7
- height:100%;
8
- width: 100%;
9
- color: black;
10
-
11
- option:disabled {
12
- display: none;
13
- }
14
- `
15
-
16
- const Select: FC<ISelectProps> = ({ onChange, options, value, ...rest }) => (
17
- <StyledSelect onChange={(e) => onChange && onChange(e)} value={value} {...rest}>
18
- {options.map((item, key) => (
19
- <option key={key} value={item.value}>
20
- {item.label}
21
- </option>
22
- ))}
23
- </StyledSelect>
24
- )
25
-
26
- interface ISelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
27
- options: OptionHTMLAttributes<HTMLOptionElement>[]
28
- }
29
-
30
- export default Select
1
+ import { FC, OptionHTMLAttributes, SelectHTMLAttributes } from 'react'
2
+ import styled from '@emotion/styled'
3
+ import { inputBaseStyles } from '@ltht-react/styles'
4
+
5
+ const StyledSelect = styled.select`
6
+ ${inputBaseStyles}
7
+ height:100%;
8
+ width: 100%;
9
+ color: black;
10
+
11
+ option:disabled {
12
+ display: none;
13
+ }
14
+ `
15
+
16
+ const Select: FC<ISelectProps> = ({ onChange, options, value, ...rest }) => (
17
+ <StyledSelect onChange={(e) => onChange && onChange(e)} value={value} {...rest}>
18
+ {options.map((item, key) => (
19
+ <option key={key} value={item.value}>
20
+ {item.label}
21
+ </option>
22
+ ))}
23
+ </StyledSelect>
24
+ )
25
+
26
+ interface ISelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
27
+ options: OptionHTMLAttributes<HTMLOptionElement>[]
28
+ }
29
+
30
+ export default Select
package/lib/index.d.ts DELETED
@@ -1,6 +0,0 @@
1
- import { FC, OptionHTMLAttributes, SelectHTMLAttributes } from 'react';
2
- declare const Select: FC<ISelectProps>;
3
- interface ISelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
4
- options: OptionHTMLAttributes<HTMLOptionElement>[];
5
- }
6
- export default Select;
package/lib/index.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __rest = (this && this.__rest) || function (s, e) {
18
- var t = {};
19
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
- t[p] = s[p];
21
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
- t[p[i]] = s[p[i]];
25
- }
26
- return t;
27
- };
28
- var __importDefault = (this && this.__importDefault) || function (mod) {
29
- return (mod && mod.__esModule) ? mod : { "default": mod };
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- var jsx_runtime_1 = require("react/jsx-runtime");
33
- var styled_1 = __importDefault(require("@emotion/styled"));
34
- var styles_1 = require("@ltht-react/styles");
35
- var StyledSelect = styled_1.default.select(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n height:100%;\n width: 100%;\n color: black;\n\n option:disabled {\n display: none;\n }\n"], ["\n ", "\n height:100%;\n width: 100%;\n color: black;\n\n option:disabled {\n display: none;\n }\n"])), styles_1.inputBaseStyles);
36
- var Select = function (_a) {
37
- var onChange = _a.onChange, options = _a.options, value = _a.value, rest = __rest(_a, ["onChange", "options", "value"]);
38
- return ((0, jsx_runtime_1.jsx)(StyledSelect, __assign({ onChange: function (e) { return onChange && onChange(e); }, value: value }, rest, { children: options.map(function (item, key) { return ((0, jsx_runtime_1.jsx)("option", { value: item.value, children: item.label }, key)); }) })));
39
- };
40
- exports.default = Select;
41
- var templateObject_1;
42
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AACpC,6CAAoD;AAEpD,IAAM,YAAY,GAAG,gBAAM,CAAC,MAAM,gLAAA,MAC9B,EAAe,qGAQlB,KARG,wBAAe,CAQlB,CAAA;AAED,IAAM,MAAM,GAAqB,UAAC,EAAqC;IAAnC,IAAA,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,KAAK,WAAA,EAAK,IAAI,cAAnC,gCAAqC,CAAF;IAAO,OAAA,CAC1E,uBAAC,YAAY,aAAC,QAAQ,EAAE,UAAC,CAAC,IAAK,OAAA,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAvB,CAAuB,EAAE,KAAK,EAAE,KAAK,IAAM,IAAI,cAC3E,OAAO,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,GAAG,IAAK,OAAA,CAC1B,mCAAkB,KAAK,EAAE,IAAI,CAAC,KAAK,YAChC,IAAI,CAAC,KAAK,IADA,GAAG,CAEP,CACV,EAJ2B,CAI3B,CAAC,IACW,CAChB,CAAA;CAAA,CAAA;AAMD,kBAAe,MAAM,CAAA"}