@ltht-react/select 1.3.219 → 1.3.221

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/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
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;
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 CHANGED
@@ -1,42 +1,42 @@
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 (jsx_runtime_1.jsx(StyledSelect, __assign({ onChange: function (e) { return onChange && onChange(e); }, value: value }, rest, { children: options.map(function (item, key) { return (jsx_runtime_1.jsx("option", __assign({ value: item.value }, { children: item.label }), key)); }) }), void 0));
39
- };
40
- exports.default = Select;
41
- var templateObject_1;
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 (jsx_runtime_1.jsx(StyledSelect, __assign({ onChange: function (e) { return onChange && onChange(e); }, value: value }, rest, { children: options.map(function (item, key) { return (jsx_runtime_1.jsx("option", __assign({ value: item.value }, { children: item.label }), key)); }) }), void 0));
39
+ };
40
+ exports.default = Select;
41
+ var templateObject_1;
42
42
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ltht-react/select",
3
- "version": "1.3.219",
3
+ "version": "1.3.221",
4
4
  "description": "ltht-react atoms Select component.",
5
5
  "author": "LTHT",
6
6
  "homepage": "",
@@ -27,11 +27,11 @@
27
27
  "dependencies": {
28
28
  "@emotion/react": "^11.0.0",
29
29
  "@emotion/styled": "^11.0.0",
30
- "@ltht-react/icon": "^1.3.219",
31
- "@ltht-react/styles": "^1.3.211",
32
- "@ltht-react/types": "^1.0.215",
33
- "@ltht-react/utils": "^1.1.217",
30
+ "@ltht-react/icon": "^1.3.221",
31
+ "@ltht-react/styles": "^1.3.213",
32
+ "@ltht-react/types": "^1.0.217",
33
+ "@ltht-react/utils": "^1.1.219",
34
34
  "react": "^17.0.0"
35
35
  },
36
- "gitHead": "9ea62c47b16c6ec42d5694404744d8504009962a"
36
+ "gitHead": "5b4013b28e28064d336e859c561201fb8f31b8f8"
37
37
  }
@@ -1,6 +0,0 @@
1
- import { FC, HTMLAttributes } from 'react';
2
- declare const Option: FC<IProps>;
3
- export interface IProps extends HTMLAttributes<HTMLSpanElement> {
4
- active: boolean;
5
- }
6
- export default Option;
@@ -1,48 +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 StyledOption = styled_1.default.span(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n display: block;\n border: 1px solid black;\n border-top: 0;\n padding: 0.5rem 1rem;\n background: ", ";\n cursor: pointer;\n font-weight: ", ";\n transition: all 0.2s ease-in-out;\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n width: 100%;\n display: block;\n border: 1px solid black;\n border-top: 0;\n padding: 0.5rem 1rem;\n background: ", ";\n cursor: pointer;\n font-weight: ", ";\n transition: all 0.2s ease-in-out;\n\n &:hover {\n background-color: ", ";\n }\n"])), function (_a) {
36
- var active = _a.active;
37
- return (active ? "" + styles_1.SELECT_COLOURS.OPTION_SELECTED : 'white');
38
- }, function (_a) {
39
- var active = _a.active;
40
- return (active ? 'bold' : 'normal');
41
- }, styles_1.SELECT_COLOURS.OPTION_HOVER);
42
- var Option = function (_a) {
43
- var children = _a.children, _b = _a.active, active = _b === void 0 ? false : _b, rest = __rest(_a, ["children", "active"]);
44
- return (jsx_runtime_1.jsx(StyledOption, __assign({ active: active }, rest, { children: children }), void 0));
45
- };
46
- exports.default = Option;
47
- var templateObject_1;
48
- //# sourceMappingURL=option.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"option.js","sourceRoot":"","sources":["../../src/atoms/option.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAAoC;AACpC,6CAAmD;AAEnD,IAAM,YAAY,GAAG,gBAAM,CAAC,IAAI,sUAAe,4HAM/B,EAAwE,wCAEvE,EAA4C,+EAIrC,EAA2B,UAElD,KARe,UAAC,EAAU;QAAR,MAAM,YAAA;IAAO,OAAA,CAAC,MAAM,CAAC,CAAC,CAAC,KAAG,uBAAc,CAAC,eAAiB,CAAC,CAAC,CAAC,OAAO,CAAC;AAAxD,CAAwD,EAEvE,UAAC,EAAU;QAAR,MAAM,YAAA;IAAO,OAAA,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC;AAA5B,CAA4B,EAIrC,uBAAc,CAAC,YAAY,CAElD,CAAA;AAED,IAAM,MAAM,GAAe,UAAC,EAAqC;IAAnC,IAAA,QAAQ,cAAA,EAAE,cAAc,EAAd,MAAM,mBAAG,KAAK,KAAA,EAAK,IAAI,cAAnC,sBAAqC,CAAF;IAAO,OAAA,CACpE,kBAAC,YAAY,aAAC,MAAM,EAAE,MAAM,IAAM,IAAI,cACnC,QAAQ,YACI,CAChB,CAAA;CAAA,CAAA;AAUD,kBAAe,MAAM,CAAA"}