@astral/ui 0.19.0 → 0.20.0

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.
@@ -23,6 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.Autocomplete = void 0;
26
+ var react_1 = require("react");
26
27
  var jsx_runtime_1 = require("react/jsx-runtime");
27
28
  var material_1 = require("@mui/material");
28
29
  var icons_1 = require("@astral/icons");
@@ -41,7 +42,9 @@ var Autocomplete = function (_a) {
41
42
  var renderInput = function (inputParams) { return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, __assign({}, inputParams, { placeholder: placeholder, label: label, success: success, error: error, helperText: helperText, size: size }), void 0)); };
42
43
  var renderOption = function (option) {
43
44
  var selected = Boolean(option['aria-selected']);
44
- return ((0, jsx_runtime_1.jsxs)(MenuItem_1.MenuItem, __assign({}, option, { children: [multiple && ((0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: selected }, void 0) }, void 0)), option.key] }), void 0));
45
+ return ((0, react_1.createElement)(MenuItem_1.MenuItem, __assign({}, option, { key: option.id }),
46
+ multiple && ((0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: selected }, void 0) }, void 0)),
47
+ option.key));
45
48
  };
46
49
  return ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, __assign({}, props, { size: size, multiple: multiple, getOptionLabel: getOptionLabel, disableCloseOnSelect: multiple, renderTags: renderTags, renderInput: renderInput, renderOption: renderOption, popupIcon: (0, jsx_runtime_1.jsx)(icons_1.ChevronDOutlineMd, {}, void 0), clearIcon: (0, jsx_runtime_1.jsx)(icons_1.CrossSmOutlineSm, {}, void 0), componentsProps: { clearIndicator: { disableRipple: true } }, noOptionsText: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }), void 0));
47
50
  };
@@ -20,7 +20,8 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
23
+ import { createElement as _createElement } from "react";
24
+ import { jsx as _jsx } from "react/jsx-runtime";
24
25
  import { ListItemIcon, Autocomplete as MuiAutocomplete, } from '@mui/material';
25
26
  import { ChevronDOutlineMd, CrossSmOutlineSm } from '@astral/icons';
26
27
  import { TextField } from '../TextField';
@@ -38,7 +39,9 @@ export var Autocomplete = function (_a) {
38
39
  var renderInput = function (inputParams) { return (_jsx(TextField, __assign({}, inputParams, { placeholder: placeholder, label: label, success: success, error: error, helperText: helperText, size: size }), void 0)); };
39
40
  var renderOption = function (option) {
40
41
  var selected = Boolean(option['aria-selected']);
41
- return (_jsxs(MenuItem, __assign({}, option, { children: [multiple && (_jsx(ListItemIcon, { children: _jsx(Checkbox, { checked: selected }, void 0) }, void 0)), option.key] }), void 0));
42
+ return (_createElement(MenuItem, __assign({}, option, { key: option.id }),
43
+ multiple && (_jsx(ListItemIcon, { children: _jsx(Checkbox, { checked: selected }, void 0) }, void 0)),
44
+ option.key));
42
45
  };
43
46
  return (_jsx(MuiAutocomplete, __assign({}, props, { size: size, multiple: multiple, getOptionLabel: getOptionLabel, disableCloseOnSelect: multiple, renderTags: renderTags, renderInput: renderInput, renderOption: renderOption, popupIcon: _jsx(ChevronDOutlineMd, {}, void 0), clearIcon: _jsx(CrossSmOutlineSm, {}, void 0), componentsProps: { clearIndicator: { disableRipple: true } }, noOptionsText: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }), void 0));
44
47
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "browser": "./src/index.ts",
5
5
  "jest": {
6
6
  "moduleNameMapper": {
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@astral/icons": "^0.19.0",
11
+ "@astral/icons": "^0.20.0",
12
12
  "@emotion/cache": "11.7.1",
13
13
  "@emotion/react": "11.8.1",
14
14
  "@emotion/server": "11.4.0",