@astral/ui 1.27.1 → 1.28.2
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/ButtonBase/styles.js +1 -1
- package/DatePicker/DatePicker.d.ts +2 -0
- package/DatePicker/DatePicker.js +6 -4
- package/Select/Select.d.ts +11 -2
- package/Select/Select.js +6 -7
- package/Select/index.d.ts +0 -1
- package/Select/index.js +0 -1
- package/Select/{styled.d.ts → styles.d.ts} +3 -3
- package/Select/{styled.js → styles.js} +4 -4
- package/esm/ButtonBase/styles.js +1 -1
- package/esm/DatePicker/DatePicker.d.ts +2 -0
- package/esm/DatePicker/DatePicker.js +6 -4
- package/esm/Select/Select.d.ts +11 -2
- package/esm/Select/Select.js +6 -7
- package/esm/Select/index.d.ts +0 -1
- package/esm/Select/index.js +0 -1
- package/esm/Select/{styled.d.ts → styles.d.ts} +3 -3
- package/esm/Select/{styled.js → styles.js} +3 -3
- package/package.json +2 -2
- package/Select/types.d.ts +0 -7
- package/Select/types.js +0 -2
- package/esm/Select/types.d.ts +0 -7
- package/esm/Select/types.js +0 -1
package/ButtonBase/styles.js
CHANGED
|
@@ -209,7 +209,7 @@ const getButtonPaddingMobile = ({ size, theme, variant, }) => {
|
|
|
209
209
|
exports.getButtonPaddingMobile = getButtonPaddingMobile;
|
|
210
210
|
const getButtonHeightMobile = ({ size, }) => {
|
|
211
211
|
if (size === enums_1.ButtonSizes.Small) {
|
|
212
|
-
return '
|
|
212
|
+
return '36px';
|
|
213
213
|
}
|
|
214
214
|
return '48px';
|
|
215
215
|
};
|
|
@@ -11,6 +11,7 @@ export declare type DatePickerProps = MondayFirst & Partial<MinMaxDate> & {
|
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
inputProps?: Omit<TextFieldProps, 'ref' | 'value' | 'onChange'>;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
value?: Date;
|
|
14
15
|
};
|
|
15
16
|
export declare const DatePicker: import("react").ForwardRefExoticComponent<MondayFirst & Partial<MinMaxDate> & {
|
|
16
17
|
mask?: string | undefined;
|
|
@@ -20,4 +21,5 @@ export declare const DatePicker: import("react").ForwardRefExoticComponent<Monda
|
|
|
20
21
|
onClose?: (() => void) | undefined;
|
|
21
22
|
inputProps?: Omit<TextFieldProps, "ref" | "value" | "onChange"> | undefined;
|
|
22
23
|
disabled?: boolean | undefined;
|
|
24
|
+
value?: Date | undefined;
|
|
23
25
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
package/DatePicker/DatePicker.js
CHANGED
|
@@ -24,20 +24,21 @@ const MinMaxDateContext_1 = require("./MinMaxDateContext");
|
|
|
24
24
|
const YearMonthDayPicker_1 = require("./YearMonthDayPicker");
|
|
25
25
|
const useBaseDateInRange_1 = require("./hooks/useBaseDateInRange");
|
|
26
26
|
const useSelectedBaseDate_1 = require("./hooks/useSelectedBaseDate");
|
|
27
|
-
const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, }, forwardedRef) => {
|
|
27
|
+
const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, value: parentValue, }, forwardedRef) => {
|
|
28
28
|
const { maxDate, minDate } = (0, react_1.useContext)(MinMaxDateContext_1.MinMaxDateContext);
|
|
29
29
|
const ref = (0, useForwardedRef_1.useForwardedRef)(forwardedRef);
|
|
30
30
|
const [isActive, openPopper, closePopper] = (0, useToggle_1.useToggle)({
|
|
31
31
|
onActive: onOpen,
|
|
32
32
|
onInactive: onClose,
|
|
33
33
|
});
|
|
34
|
-
const [selectedDate, setSelectedDate] = (0, react_1.useState)();
|
|
34
|
+
const [selectedDate, setSelectedDate] = (0, react_1.useState)(parentValue);
|
|
35
35
|
const [maskedDate, setMaskedDate] = (0, react_1.useState)('');
|
|
36
36
|
const baseDate = (0, useBaseDateInRange_1.useBaseDateInRange)({ minDate, maxDate });
|
|
37
37
|
const selectedBaseDate = (0, useSelectedBaseDate_1.useSelectedBaseDate)(selectedDate);
|
|
38
38
|
const checkValue = (0, react_1.useCallback)((value) => {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
const isString = typeof value === 'string';
|
|
40
|
+
setMaskedDate(isString ? value : (0, date_1.formatDate)(value, mask));
|
|
41
|
+
const date = isString ? (0, date_1.parseDate)(value, mask) : value;
|
|
41
42
|
if (value === '' || !(0, date_1.isDate)(date)) {
|
|
42
43
|
setSelectedDate(null);
|
|
43
44
|
}
|
|
@@ -51,6 +52,7 @@ const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onC
|
|
|
51
52
|
closePopper();
|
|
52
53
|
};
|
|
53
54
|
(0, react_1.useEffect)(() => onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate), [selectedDate, maskedDate]);
|
|
55
|
+
(0, react_1.useEffect)(() => checkValue(parentValue || ''), [parentValue]);
|
|
54
56
|
const blurHandler = (e) => {
|
|
55
57
|
checkValue(e.target.value);
|
|
56
58
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
package/Select/Select.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SelectProps } from '
|
|
3
|
-
export declare
|
|
2
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
|
+
export declare type SelectProps<Value> = MuiSelectProps<Value> & {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
getOptionLabel?: (value: string | number) => string | number;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Select: <Value>({ getOptionLabel, placeholder, helperText, loading, success, children, error, label, ...props }: SelectProps<Value>) => JSX.Element;
|
package/Select/Select.js
CHANGED
|
@@ -16,19 +16,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Select = void 0;
|
|
18
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const material_1 = require("@mui/material");
|
|
19
20
|
const react_1 = __importDefault(require("react"));
|
|
20
21
|
const icons_1 = require("@astral/icons");
|
|
21
|
-
const TextField_1 = require("../TextField");
|
|
22
22
|
const Tag_1 = require("../Tag");
|
|
23
|
+
const FormHelperText_1 = require("../FormHelperText");
|
|
23
24
|
const CircularProgress_1 = require("../CircularProgress");
|
|
24
25
|
const MenuItem_1 = require("../MenuItem");
|
|
25
|
-
const
|
|
26
|
+
const styles_1 = require("./styles");
|
|
26
27
|
const Select = (_a) => {
|
|
27
|
-
var {
|
|
28
|
-
// unknown, т.к. ts ругается на несоответствие типов. По-умолчанию в selectedOptions string или string[].
|
|
28
|
+
var { getOptionLabel = (value) => value, placeholder, helperText, loading, success, children, error, label } = _a, props = __rest(_a, ["getOptionLabel", "placeholder", "helperText", "loading", "success", "children", "error", "label"]);
|
|
29
29
|
const renderValue = (selectedOptions) => {
|
|
30
30
|
if (Array.isArray(selectedOptions) && selectedOptions.length) {
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.SelectTagsWrapper, { children: selectedOptions.map((option) => {
|
|
32
32
|
const optionLabel = getOptionLabel(option);
|
|
33
33
|
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { color: "grey", label: optionLabel }, option);
|
|
34
34
|
}) }));
|
|
@@ -40,7 +40,6 @@ const Select = (_a) => {
|
|
|
40
40
|
return getOptionLabel(selectedOptions);
|
|
41
41
|
};
|
|
42
42
|
const isNoData = !Boolean(react_1.default.Children.count(children));
|
|
43
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
44
|
-
renderValue, displayEmpty: true, IconComponent: icons_1.ChevronDOutlineMd }) }, { children: [(0, jsx_runtime_1.jsx)(styled_1.Placeholder, Object.assign({ value: "" }, { children: "placeholder" })), loading && ((0, jsx_runtime_1.jsx)(styled_1.ProgressWrapper, { children: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: "primary" }) })), !loading && children, !loading && isNoData && (0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, Object.assign({ disabled: true }, { children: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }))] })));
|
|
43
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ error: error }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, Object.assign({ htmlFor: "grouped-select" }, { children: label })), (0, jsx_runtime_1.jsxs)(material_1.Select, Object.assign({}, props, { label: label, renderValue: renderValue, IconComponent: icons_1.ChevronDOutlineMd, displayEmpty: true }, { children: [(0, jsx_runtime_1.jsx)(styles_1.SelectPlaceholder, Object.assign({ value: "" }, { children: placeholder })), loading && ((0, jsx_runtime_1.jsx)(styles_1.SelectProgressWrapper, { children: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: "primary" }) })), !loading && children, !loading && isNoData && (0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, Object.assign({ disabled: true }, { children: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }))] })), (0, jsx_runtime_1.jsx)(FormHelperText_1.FormHelperText, Object.assign({ error: error, success: success }, { children: helperText }))] })));
|
|
45
44
|
};
|
|
46
45
|
exports.Select = Select;
|
package/Select/index.d.ts
CHANGED
package/Select/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SelectTagsWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SelectProgressWrapper: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const SelectPlaceholder: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
autoFocus?: boolean | undefined;
|
|
12
12
|
classes?: Partial<import("@mui/material").MenuItemClasses> | undefined;
|
|
13
13
|
dense?: boolean | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SelectPlaceholder = exports.SelectProgressWrapper = exports.SelectTagsWrapper = void 0;
|
|
4
4
|
const styles_1 = require("../styles");
|
|
5
5
|
const MenuItem_1 = require("../MenuItem");
|
|
6
|
-
exports.
|
|
6
|
+
exports.SelectTagsWrapper = styles_1.styled.div `
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-wrap: wrap;
|
|
9
9
|
margin-bottom: -${({ theme }) => theme.spacing(1)};
|
|
@@ -22,7 +22,7 @@ exports.TagsWrapper = styles_1.styled.div `
|
|
|
22
22
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
23
23
|
}
|
|
24
24
|
`;
|
|
25
|
-
exports.
|
|
25
|
+
exports.SelectProgressWrapper = styles_1.styled.div `
|
|
26
26
|
display: flex;
|
|
27
27
|
flex-direction: column;
|
|
28
28
|
align-items: center;
|
|
@@ -34,6 +34,6 @@ exports.ProgressWrapper = styles_1.styled.div `
|
|
|
34
34
|
color: ${({ theme }) => theme.palette.grey['900']};
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
exports.
|
|
37
|
+
exports.SelectPlaceholder = (0, styles_1.styled)(MenuItem_1.MenuItem) `
|
|
38
38
|
display: none;
|
|
39
39
|
`;
|
package/esm/ButtonBase/styles.js
CHANGED
|
@@ -11,6 +11,7 @@ export declare type DatePickerProps = MondayFirst & Partial<MinMaxDate> & {
|
|
|
11
11
|
onClose?: () => void;
|
|
12
12
|
inputProps?: Omit<TextFieldProps, 'ref' | 'value' | 'onChange'>;
|
|
13
13
|
disabled?: boolean;
|
|
14
|
+
value?: Date;
|
|
14
15
|
};
|
|
15
16
|
export declare const DatePicker: import("react").ForwardRefExoticComponent<MondayFirst & Partial<MinMaxDate> & {
|
|
16
17
|
mask?: string | undefined;
|
|
@@ -20,4 +21,5 @@ export declare const DatePicker: import("react").ForwardRefExoticComponent<Monda
|
|
|
20
21
|
onClose?: (() => void) | undefined;
|
|
21
22
|
inputProps?: Omit<TextFieldProps, "ref" | "value" | "onChange"> | undefined;
|
|
22
23
|
disabled?: boolean | undefined;
|
|
24
|
+
value?: Date | undefined;
|
|
23
25
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -21,20 +21,21 @@ import { MinMaxDateContext, MinMaxDateContextProvider, } from './MinMaxDateConte
|
|
|
21
21
|
import { YearMonthDayPicker } from './YearMonthDayPicker';
|
|
22
22
|
import { useBaseDateInRange } from './hooks/useBaseDateInRange';
|
|
23
23
|
import { useSelectedBaseDate } from './hooks/useSelectedBaseDate';
|
|
24
|
-
const DatePickerInner = forwardRef(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, }, forwardedRef) => {
|
|
24
|
+
const DatePickerInner = forwardRef(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, value: parentValue, }, forwardedRef) => {
|
|
25
25
|
const { maxDate, minDate } = useContext(MinMaxDateContext);
|
|
26
26
|
const ref = useForwardedRef(forwardedRef);
|
|
27
27
|
const [isActive, openPopper, closePopper] = useToggle({
|
|
28
28
|
onActive: onOpen,
|
|
29
29
|
onInactive: onClose,
|
|
30
30
|
});
|
|
31
|
-
const [selectedDate, setSelectedDate] = useState();
|
|
31
|
+
const [selectedDate, setSelectedDate] = useState(parentValue);
|
|
32
32
|
const [maskedDate, setMaskedDate] = useState('');
|
|
33
33
|
const baseDate = useBaseDateInRange({ minDate, maxDate });
|
|
34
34
|
const selectedBaseDate = useSelectedBaseDate(selectedDate);
|
|
35
35
|
const checkValue = useCallback((value) => {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const isString = typeof value === 'string';
|
|
37
|
+
setMaskedDate(isString ? value : formatDate(value, mask));
|
|
38
|
+
const date = isString ? parseDate(value, mask) : value;
|
|
38
39
|
if (value === '' || !isDate(date)) {
|
|
39
40
|
setSelectedDate(null);
|
|
40
41
|
}
|
|
@@ -48,6 +49,7 @@ const DatePickerInner = forwardRef(({ onChange, onOpen, onBlur, onClose, mask =
|
|
|
48
49
|
closePopper();
|
|
49
50
|
};
|
|
50
51
|
useEffect(() => onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate), [selectedDate, maskedDate]);
|
|
52
|
+
useEffect(() => checkValue(parentValue || ''), [parentValue]);
|
|
51
53
|
const blurHandler = (e) => {
|
|
52
54
|
checkValue(e.target.value);
|
|
53
55
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
package/esm/Select/Select.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { SelectProps } from '
|
|
3
|
-
export declare
|
|
2
|
+
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
3
|
+
export declare type SelectProps<Value> = MuiSelectProps<Value> & {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
getOptionLabel?: (value: string | number) => string | number;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
success?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const Select: <Value>({ getOptionLabel, placeholder, helperText, loading, success, children, error, label, ...props }: SelectProps<Value>) => JSX.Element;
|
package/esm/Select/Select.js
CHANGED
|
@@ -10,19 +10,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { FormControl, InputLabel, Select as MuiSelect, } from '@mui/material';
|
|
13
14
|
import React from 'react';
|
|
14
15
|
import { ChevronDOutlineMd } from '@astral/icons';
|
|
15
|
-
import { TextField } from '../TextField';
|
|
16
16
|
import { Tag } from '../Tag';
|
|
17
|
+
import { FormHelperText } from '../FormHelperText';
|
|
17
18
|
import { CircularProgress } from '../CircularProgress';
|
|
18
19
|
import { MenuItem } from '../MenuItem';
|
|
19
|
-
import {
|
|
20
|
+
import { SelectPlaceholder, SelectProgressWrapper, SelectTagsWrapper, } from './styles';
|
|
20
21
|
export const Select = (_a) => {
|
|
21
|
-
var {
|
|
22
|
-
// unknown, т.к. ts ругается на несоответствие типов. По-умолчанию в selectedOptions string или string[].
|
|
22
|
+
var { getOptionLabel = (value) => value, placeholder, helperText, loading, success, children, error, label } = _a, props = __rest(_a, ["getOptionLabel", "placeholder", "helperText", "loading", "success", "children", "error", "label"]);
|
|
23
23
|
const renderValue = (selectedOptions) => {
|
|
24
24
|
if (Array.isArray(selectedOptions) && selectedOptions.length) {
|
|
25
|
-
return (_jsx(
|
|
25
|
+
return (_jsx(SelectTagsWrapper, { children: selectedOptions.map((option) => {
|
|
26
26
|
const optionLabel = getOptionLabel(option);
|
|
27
27
|
return _jsx(Tag, { color: "grey", label: optionLabel }, option);
|
|
28
28
|
}) }));
|
|
@@ -34,6 +34,5 @@ export const Select = (_a) => {
|
|
|
34
34
|
return getOptionLabel(selectedOptions);
|
|
35
35
|
};
|
|
36
36
|
const isNoData = !Boolean(React.Children.count(children));
|
|
37
|
-
return (_jsxs(
|
|
38
|
-
renderValue, displayEmpty: true, IconComponent: ChevronDOutlineMd }) }, { children: [_jsx(Placeholder, Object.assign({ value: "" }, { children: "placeholder" })), loading && (_jsx(ProgressWrapper, { children: _jsx(CircularProgress, { color: "primary" }) })), !loading && children, !loading && isNoData && _jsx(MenuItem, Object.assign({ disabled: true }, { children: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }))] })));
|
|
37
|
+
return (_jsxs(FormControl, Object.assign({ error: error }, { children: [_jsx(InputLabel, Object.assign({ htmlFor: "grouped-select" }, { children: label })), _jsxs(MuiSelect, Object.assign({}, props, { label: label, renderValue: renderValue, IconComponent: ChevronDOutlineMd, displayEmpty: true }, { children: [_jsx(SelectPlaceholder, Object.assign({ value: "" }, { children: placeholder })), loading && (_jsx(SelectProgressWrapper, { children: _jsx(CircularProgress, { color: "primary" }) })), !loading && children, !loading && isNoData && _jsx(MenuItem, Object.assign({ disabled: true }, { children: "\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445" }))] })), _jsx(FormHelperText, Object.assign({ error: error, success: success }, { children: helperText }))] })));
|
|
39
38
|
};
|
package/esm/Select/index.d.ts
CHANGED
package/esm/Select/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SelectTagsWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any> | undefined;
|
|
5
5
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const
|
|
6
|
+
export declare const SelectProgressWrapper: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
8
|
as?: import("react").ElementType<any> | undefined;
|
|
9
9
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const SelectPlaceholder: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
autoFocus?: boolean | undefined;
|
|
12
12
|
classes?: Partial<import("@mui/material").MenuItemClasses> | undefined;
|
|
13
13
|
dense?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { styled } from '../styles';
|
|
2
2
|
import { MenuItem } from '../MenuItem';
|
|
3
|
-
export const
|
|
3
|
+
export const SelectTagsWrapper = styled.div `
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
margin-bottom: -${({ theme }) => theme.spacing(1)};
|
|
@@ -19,7 +19,7 @@ export const TagsWrapper = styled.div `
|
|
|
19
19
|
margin-right: ${({ theme }) => theme.spacing(1)};
|
|
20
20
|
}
|
|
21
21
|
`;
|
|
22
|
-
export const
|
|
22
|
+
export const SelectProgressWrapper = styled.div `
|
|
23
23
|
display: flex;
|
|
24
24
|
flex-direction: column;
|
|
25
25
|
align-items: center;
|
|
@@ -31,6 +31,6 @@ export const ProgressWrapper = styled.div `
|
|
|
31
31
|
color: ${({ theme }) => theme.palette.grey['900']};
|
|
32
32
|
}
|
|
33
33
|
`;
|
|
34
|
-
export const
|
|
34
|
+
export const SelectPlaceholder = styled(MenuItem) `
|
|
35
35
|
display: none;
|
|
36
36
|
`;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astral/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.2",
|
|
4
4
|
"browser": "./esm/index.js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@astral/icons": "^1.
|
|
7
|
+
"@astral/icons": "^1.28.2",
|
|
8
8
|
"@emotion/cache": "11.7.1",
|
|
9
9
|
"@emotion/react": "11.9.0",
|
|
10
10
|
"@emotion/server": "11.4.0",
|
package/Select/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
2
|
-
import { TextFieldProps } from '../TextField';
|
|
3
|
-
export declare type SelectProps = MuiSelectProps & Pick<TextFieldProps, 'error' | 'success' | 'SelectProps' | 'helperText' | 'label'> & {
|
|
4
|
-
loading?: boolean;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
getOptionLabel?: (value: string | number) => string | number;
|
|
7
|
-
};
|
package/Select/types.js
DELETED
package/esm/Select/types.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SelectProps as MuiSelectProps } from '@mui/material';
|
|
2
|
-
import { TextFieldProps } from '../TextField';
|
|
3
|
-
export declare type SelectProps = MuiSelectProps & Pick<TextFieldProps, 'error' | 'success' | 'SelectProps' | 'helperText' | 'label'> & {
|
|
4
|
-
loading?: boolean;
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
getOptionLabel?: (value: string | number) => string | number;
|
|
7
|
-
};
|
package/esm/Select/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|