sti-antd-package 0.0.20 → 0.0.22
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/dist/components/NumberFormat/types.d.ts +2 -1
- package/dist/components/Table/Async/Search/types.d.ts +11 -3
- package/dist/components/Tabs/types.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/index.d.ts +14 -5
- package/dist/index.esm.js +59 -87
- package/dist/index.js +59 -87
- package/package.json +3 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
1
2
|
import { formColLayout } from "../../constants";
|
|
2
3
|
import { valueType } from "antd/es/statistic/utils";
|
|
3
4
|
import { ShouldUpdate } from "rc-field-form/lib/Field";
|
|
@@ -11,7 +12,7 @@ export interface NumberFormatComponentRef {
|
|
|
11
12
|
export interface NumberFormatComponentProps {
|
|
12
13
|
noItem?: boolean;
|
|
13
14
|
text?: boolean;
|
|
14
|
-
size?:
|
|
15
|
+
size?: SizeType;
|
|
15
16
|
align?: 'right';
|
|
16
17
|
classNames?: string[];
|
|
17
18
|
variant?: 'borderless' | 'underlined';
|
|
@@ -15,10 +15,18 @@ export type TableAsyncSearchText = BaseAsyncSearchItem & {
|
|
|
15
15
|
type: "text";
|
|
16
16
|
initValue?: string;
|
|
17
17
|
};
|
|
18
|
-
export type
|
|
18
|
+
export type TableAsyncSearchSelectLocal = BaseAsyncSearchItem & {
|
|
19
19
|
type: "select";
|
|
20
|
-
|
|
20
|
+
static: true;
|
|
21
|
+
options: SelectOption[];
|
|
22
|
+
initValue?: valueType;
|
|
23
|
+
ruleType?: RuleObject['type'];
|
|
24
|
+
};
|
|
25
|
+
export type TableAsyncSearchSelectFetch = BaseAsyncSearchItem & {
|
|
26
|
+
type: "select";
|
|
27
|
+
static?: false;
|
|
21
28
|
initValue?: valueType;
|
|
29
|
+
fetchOptions?: ((search: string) => Promise<any[]>);
|
|
22
30
|
ruleType?: RuleObject['type'];
|
|
23
31
|
};
|
|
24
32
|
export type TableAsyncSearchLocalSelectMultiple = BaseAsyncSearchItem & {
|
|
@@ -55,7 +63,7 @@ export type TableAsyncSearchDateRange = BaseAsyncSearchItem & {
|
|
|
55
63
|
format?: DatePickerFormatType;
|
|
56
64
|
initValue?: [Dayjs, Dayjs];
|
|
57
65
|
};
|
|
58
|
-
export type TableAsyncSearchItem = TableAsyncSearchText |
|
|
66
|
+
export type TableAsyncSearchItem = TableAsyncSearchText | TableAsyncSearchSelectLocal | TableAsyncSearchSelectFetch | TableAsyncSearchSelectMultiple | TableAsyncSearchSwitch | TableAsyncSearchCheckbox | TableAsyncSearchDate | TableAsyncSearchDateRange;
|
|
59
67
|
export interface TableAsyncSearchComponentProps {
|
|
60
68
|
noInitSubmit?: boolean;
|
|
61
69
|
noButton?: boolean;
|
|
@@ -43,7 +43,7 @@ export { default as TableComponent } from "./Table";
|
|
|
43
43
|
export type { TableButtonMiddle, TableComponentProps } from "./Table";
|
|
44
44
|
export { default as TableAsyncComponent } from "./Table/Async";
|
|
45
45
|
export type { DefaultColumn, DefaultParams, TableAsyncComponentProps, TableAsyncComponentRef, TableButtonMiddleAsync, TableParams, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams } from "./Table/Async";
|
|
46
|
-
export type { TableAsyncSearchCheckbox, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple,
|
|
46
|
+
export type { TableAsyncSearchCheckbox, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchSelectFetch, TableAsyncSearchSelectLocal, TableAsyncSearchSelectMultiple, TableAsyncSearchSwitch, TableAsyncSearchText } from "./Table/Async/Search";
|
|
47
47
|
export { default as TableCellEditableComponent } from "./Table/CellEditable";
|
|
48
48
|
export type { TableCellEditableProps } from "./Table/CellEditable";
|
|
49
49
|
export { default as TabsComponent } from "./Tabs";
|
package/dist/index.d.ts
CHANGED
|
@@ -549,7 +549,7 @@ interface NumberFormatComponentRef {
|
|
|
549
549
|
interface NumberFormatComponentProps {
|
|
550
550
|
noItem?: boolean;
|
|
551
551
|
text?: boolean;
|
|
552
|
-
size?:
|
|
552
|
+
size?: SizeType;
|
|
553
553
|
align?: 'right';
|
|
554
554
|
classNames?: string[];
|
|
555
555
|
variant?: 'borderless' | 'underlined';
|
|
@@ -866,10 +866,18 @@ type TableAsyncSearchText = BaseAsyncSearchItem & {
|
|
|
866
866
|
type: "text";
|
|
867
867
|
initValue?: string;
|
|
868
868
|
};
|
|
869
|
-
type
|
|
869
|
+
type TableAsyncSearchSelectLocal = BaseAsyncSearchItem & {
|
|
870
870
|
type: "select";
|
|
871
|
-
|
|
871
|
+
static: true;
|
|
872
|
+
options: SelectOption[];
|
|
873
|
+
initValue?: valueType;
|
|
874
|
+
ruleType?: RuleObject$1['type'];
|
|
875
|
+
};
|
|
876
|
+
type TableAsyncSearchSelectFetch = BaseAsyncSearchItem & {
|
|
877
|
+
type: "select";
|
|
878
|
+
static?: false;
|
|
872
879
|
initValue?: valueType;
|
|
880
|
+
fetchOptions?: ((search: string) => Promise<any[]>);
|
|
873
881
|
ruleType?: RuleObject$1['type'];
|
|
874
882
|
};
|
|
875
883
|
type TableAsyncSearchLocalSelectMultiple = BaseAsyncSearchItem & {
|
|
@@ -906,7 +914,7 @@ type TableAsyncSearchDateRange = BaseAsyncSearchItem & {
|
|
|
906
914
|
format?: DatePickerFormatType;
|
|
907
915
|
initValue?: [Dayjs, Dayjs];
|
|
908
916
|
};
|
|
909
|
-
type TableAsyncSearchItem = TableAsyncSearchText |
|
|
917
|
+
type TableAsyncSearchItem = TableAsyncSearchText | TableAsyncSearchSelectLocal | TableAsyncSearchSelectFetch | TableAsyncSearchSelectMultiple | TableAsyncSearchSwitch | TableAsyncSearchCheckbox | TableAsyncSearchDate | TableAsyncSearchDateRange;
|
|
910
918
|
|
|
911
919
|
type DefaultColumn = (ColumnType | ColumnGroupType);
|
|
912
920
|
interface DefaultParams {
|
|
@@ -1007,6 +1015,7 @@ interface TabsComponentProps {
|
|
|
1007
1015
|
tabBarExtraContent?: TabsProps['tabBarExtraContent'];
|
|
1008
1016
|
tabBarGutter?: number;
|
|
1009
1017
|
tabs: {
|
|
1018
|
+
key: string;
|
|
1010
1019
|
name: string;
|
|
1011
1020
|
icon?: React.ReactNode;
|
|
1012
1021
|
content: React.ReactNode;
|
|
@@ -1072,4 +1081,4 @@ declare const useRemoveError: (setInputErrors: React.Dispatch<React.SetStateActi
|
|
|
1072
1081
|
}>>) => (name?: string) => void;
|
|
1073
1082
|
|
|
1074
1083
|
export { BaseModel, ButtonComponent, ButtonGroupAddComponent, ButtonGroupEditComponent, CardComponent, CascaderComponent, CheckboxComponent$1 as CheckboxComponent, CheckboxComponent as CheckboxGroupComponent, ConfigProvider, DataGridComponent, DateFormat, DatePickerComponent, DateRangePickerComponent, DropdownButtonComponent, FeedbackProvider, FormItemComponent, IconCheckOrClose, InputComponent, LinkComponent, NumberFormatComponent, RadioComponent, SelectAsyncComponent, SelectComponent, SwitchComponent, TableAsyncComponent, TableCellEditableComponent, TableComponent, TableRowProvider, TabsComponent, TagComponent, TextAreaComponent, TransformBoolean, TransformDayjs, TransformNumber, colInline, colLayout, datePickerFormat, _default as formColLayout, getTableAsyncName, getTableFilterStorage, selectAsync, styleCSS, toCamel, useConfig, useDataGrid, useFeedback, useRemoveError, useTableAsyncSearch, useTableRow };
|
|
1075
|
-
export type { ButtonComponentProps, ButtonComponentRef, ButtonGroupAddComponentProps, ButtonGroupEditComponentProps, CardComponentProps, CascaderComponentProps, CascaderComponentRef, CheckboxComponentProps, CheckboxComponentRef, CheckboxGroupComponentProps, CheckboxGroupComponentRef, ConfigContextType, ConfigProviderProps, DataGridColumn, DataGridColumnType, DataGridComponentProps, DataGridComponentRef, DataGridContextType, DataGridFilter, DataGridFilterColumn, DataGridRow, DatePickerComponentProps, DatePickerComponentRef, DatePickerFormat, DatePickerFormatType, DateRangePickerComponentProps, DateRangePickerComponentRef, DefaultColumn, DefaultParams, DropdownButtonComponentProps, DropdownButtonMenuItem, FeedbackContextType, FormColLayout, FormColSizeSpan, FormItemComponentProps, IconCheckOrCloseProps, InputComponentProps, InputComponentRef, LinkComponentProps, LinkType, NumberFormatComponentProps, NumberFormatComponentRef, RadioComponentProps, SelectAsyncComponentProps, SelectAsyncComponentRef, SelectAsyncFormat, SelectAsyncProps, SelectComponentProps, SelectOption, SwitchComponentProps, TableAsyncComponentProps, TableAsyncComponentRef, TableAsyncSearchCheckbox, TableAsyncSearchContextType, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchProviderProps,
|
|
1084
|
+
export type { ButtonComponentProps, ButtonComponentRef, ButtonGroupAddComponentProps, ButtonGroupEditComponentProps, CardComponentProps, CascaderComponentProps, CascaderComponentRef, CheckboxComponentProps, CheckboxComponentRef, CheckboxGroupComponentProps, CheckboxGroupComponentRef, ConfigContextType, ConfigProviderProps, DataGridColumn, DataGridColumnType, DataGridComponentProps, DataGridComponentRef, DataGridContextType, DataGridFilter, DataGridFilterColumn, DataGridRow, DatePickerComponentProps, DatePickerComponentRef, DatePickerFormat, DatePickerFormatType, DateRangePickerComponentProps, DateRangePickerComponentRef, DefaultColumn, DefaultParams, DropdownButtonComponentProps, DropdownButtonMenuItem, FeedbackContextType, FormColLayout, FormColSizeSpan, FormItemComponentProps, IconCheckOrCloseProps, InputComponentProps, InputComponentRef, LinkComponentProps, LinkType, NumberFormatComponentProps, NumberFormatComponentRef, RadioComponentProps, SelectAsyncComponentProps, SelectAsyncComponentRef, SelectAsyncFormat, SelectAsyncProps, SelectComponentProps, SelectOption, SwitchComponentProps, TableAsyncComponentProps, TableAsyncComponentRef, TableAsyncSearchCheckbox, TableAsyncSearchContextType, TableAsyncSearchDate, TableAsyncSearchDateRange, TableAsyncSearchFetchSelectMultiple, TableAsyncSearchItem, TableAsyncSearchItemType, TableAsyncSearchLocalSelectMultiple, TableAsyncSearchProviderProps, TableAsyncSearchSelectFetch, TableAsyncSearchSelectLocal, TableAsyncSearchSelectMultiple, TableAsyncSearchSwitch, TableAsyncSearchText, TableAsyncType, TableButtonMiddle, TableButtonMiddleAsync, TableCellEditableProps, TableComponentProps, TableParams, TableParamsFormatter, TableRowContextType, TableRowProviderProps, TabsComponentProps, TagComponentProps, TextAreaComponentProps, TextAreaComponentRef, YajraColumn, YajraColumnParams, YajraOrderParams, YajraParams, YajraSearchParams };
|
package/dist/index.esm.js
CHANGED
|
@@ -5328,8 +5328,8 @@ const TableRowProvider = (props) => {
|
|
|
5328
5328
|
return (jsxRuntimeExports.jsx(Form$2, { form: form, component: false, children: jsxRuntimeExports.jsx(TableRowContext.Provider, { value: contextValue, children: jsxRuntimeExports.jsx("tr", Object.assign({}, props, { ref: setNodeRef, style: style }, attributes)) }) }));
|
|
5329
5329
|
};
|
|
5330
5330
|
|
|
5331
|
-
var css_248z$8 = ".style-module_number-
|
|
5332
|
-
var styleNumberFormat = {"number-format
|
|
5331
|
+
var css_248z$8 = ".style-module_number-format-align-right__qOFmQ {\n text-align: right;\n}";
|
|
5332
|
+
var styleNumberFormat = {"number-format-align-right":"style-module_number-format-align-right__qOFmQ"};
|
|
5333
5333
|
styleInject(css_248z$8);
|
|
5334
5334
|
|
|
5335
5335
|
const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, onChange, removeError, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
@@ -5342,19 +5342,13 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5342
5342
|
}));
|
|
5343
5343
|
const classNumberFormat = useMemo$1(() => {
|
|
5344
5344
|
const classNumberFormat = [];
|
|
5345
|
-
classNames && classNumberFormat.push(...classNames);
|
|
5346
|
-
!text && classNumberFormat.push(styleNumberFormat['number-format']);
|
|
5347
|
-
size === 'small' && classNumberFormat.push(styleNumberFormat['number-format-sm']);
|
|
5348
|
-
if (validateStatus === 'error' || status === 'error')
|
|
5349
|
-
classNumberFormat.push(styleNumberFormat['number-format-error']);
|
|
5350
|
-
variant === 'borderless' && classNumberFormat.push(styleNumberFormat['number-format-borderless']);
|
|
5351
|
-
variant === 'underlined' && classNumberFormat.push(styleNumberFormat['number-format-underlined']);
|
|
5352
5345
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5346
|
+
classNames && classNumberFormat.push(...classNames);
|
|
5353
5347
|
return classNumberFormat;
|
|
5354
5348
|
}, [classNames, text, size, validateStatus, status, variant, align]);
|
|
5355
5349
|
return (jsxRuntimeExports.jsx("div", Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onClick: onClick }, text && align === 'right' && {
|
|
5356
5350
|
style: { textAlign: 'right' }
|
|
5357
|
-
}, { children: jsxRuntimeExports.jsx(NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing,
|
|
5351
|
+
}, { children: jsxRuntimeExports.jsx(NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput: Input$2, size: size, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing, min: ruleMin, max: ruleMax, value: value !== null && value !== void 0 ? value : valueNumberFormat, onChange: event => {
|
|
5358
5352
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
5359
5353
|
setValueNumberFormat(event.target.value);
|
|
5360
5354
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
@@ -5362,7 +5356,9 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5362
5356
|
};
|
|
5363
5357
|
const NumberFormatComponent = props => {
|
|
5364
5358
|
const numberFormat = jsxRuntimeExports.jsx(NumberFormat, Object.assign({}, props));
|
|
5365
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, required: props.required, ruleType: "number",
|
|
5359
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, required: props.required, ruleType: "number",
|
|
5360
|
+
// ruleTransform={value => Number(value)}
|
|
5361
|
+
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, children: numberFormat })))
|
|
5366
5362
|
: numberFormat }));
|
|
5367
5363
|
};
|
|
5368
5364
|
|
|
@@ -7595,12 +7591,12 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, size, suffixIcon,
|
|
|
7595
7591
|
var _a, _b;
|
|
7596
7592
|
return (jsxRuntimeExports.jsxs(Space, { children: [jsxRuntimeExports.jsx("span", { children: option.data.emoji }), (_b = (_a = option.data.text) !== null && _a !== void 0 ? _a : option.data.label) !== null && _b !== void 0 ? _b : option.data.value] }));
|
|
7597
7593
|
};
|
|
7598
|
-
const
|
|
7594
|
+
const popupRender = menu => (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [menu, addItem &&
|
|
7599
7595
|
jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(Divider, { className: styleSelect['add-item-divider'] }), jsxRuntimeExports.jsxs(Space, { align: "center", className: styleSelect['add-item-space'], children: [jsxRuntimeExports.jsx(Input$2, { placeholder: "Please enter item", value: addItemValue, onChange: event => setAddItemValue(event.target.value) }), jsxRuntimeExports.jsxs(Link, { className: styleSelect['add-item-link'], onClick: handleAddItem, children: [jsxRuntimeExports.jsx(RefIcon$5, {}), " Add item"] })] })] })] }));
|
|
7600
7596
|
const select = !loading ? (jsxRuntimeExports.jsx(Select, { mode: mode, showSearch: showSearch, variant: variant, allowClear: !required, size: size, suffixIcon: suffixIcon, className: classNameSelect.join(' '), disabled: disabled, open: open, filterOption: filterOption, placeholder: placeholder, value: value, defaultValue: defaultValue, onChange: (value, event) => {
|
|
7601
7597
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
7602
7598
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
7603
|
-
}, onKeyDown: onKeyDown, onSearch: onSearch, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender,
|
|
7599
|
+
}, onKeyDown: onKeyDown, onSearch: onSearch, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender, popupRender: popupRender, style: style })) : jsxRuntimeExports.jsx(Skeleton.Input, { block: true, active: true });
|
|
7604
7600
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: select })))
|
|
7605
7601
|
: select }));
|
|
7606
7602
|
};
|
|
@@ -8499,10 +8495,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8499
8495
|
}, { children: jsxRuntimeExports.jsx(Form$2, Object.assign({}, formColLayout.notInline, { form: form, layout: "vertical", onFinish: handleSubmit, initialValues: setInitialValue(), children: jsxRuntimeExports.jsx(Row, Object.assign({}, styleProps.row, { children: items === null || items === void 0 ? void 0 : items.map(item => {
|
|
8500
8496
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8501
8497
|
switch (item.type) {
|
|
8502
|
-
case 'text': return (jsxRuntimeExports.jsx(Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_a = item.space) !== null && _a !== void 0 ? _a : 1}`], { children: jsxRuntimeExports.jsx(InputComponent, { name: item.name, label: item.label,
|
|
8503
|
-
|
|
8504
|
-
disabled: loading }) }), `col-${item.name}`));
|
|
8505
|
-
case 'select': return (jsxRuntimeExports.jsx(Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_b = item.space) !== null && _b !== void 0 ? _b : 1}`], { children: jsxRuntimeExports.jsx(SelectComponent, { options: item.options, name: item.name, label: item.label, disabled: loading, ruleType: item.ruleType }) }), `col-${item.name}`));
|
|
8498
|
+
case 'text': return (jsxRuntimeExports.jsx(Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_a = item.space) !== null && _a !== void 0 ? _a : 1}`], { children: jsxRuntimeExports.jsx(InputComponent, { name: item.name, label: item.label, disabled: loading }) }), `col-${item.name}`));
|
|
8499
|
+
case 'select': return (jsxRuntimeExports.jsx(Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_b = item.space) !== null && _b !== void 0 ? _b : 1}`], { children: item.static ? (jsxRuntimeExports.jsx(SelectComponent, { options: item.options, name: item.name, label: item.label, disabled: loading, ruleType: item.ruleType })) : (jsxRuntimeExports.jsx(SelectAsyncComponent, { name: item.name, label: item.label, disabled: loading, fetchOptions: item.fetchOptions, ruleType: item.ruleType })) }), `col-${item.name}`));
|
|
8506
8500
|
case 'select-multiple': return (jsxRuntimeExports.jsx(Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_c = item.space) !== null && _c !== void 0 ? _c : 1}`], { children: item.static ? (jsxRuntimeExports.jsx(SelectComponent, { mode: "multiple", label: item.label, name: item.name, disabled: loading, options: item.options, onChange: (value, options) => {
|
|
8507
8501
|
item.name
|
|
8508
8502
|
&& Array.isArray(options)
|
|
@@ -8656,8 +8650,8 @@ const TableCellEditableComponent = (_a) => {
|
|
|
8656
8650
|
|
|
8657
8651
|
const TabsComponent = ({ centered, type, tabPosition, tabBarExtraContent, tabBarGutter, tabs, }) => {
|
|
8658
8652
|
var _a;
|
|
8659
|
-
return (jsxRuntimeExports.jsx(Tabs, { centered: centered, type: type, tabPosition: tabPosition, tabBarExtraContent: tabBarExtraContent, tabBarGutter: tabBarGutter, items: (_a = tabs === null || tabs === void 0 ? void 0 : tabs.map) === null || _a === void 0 ? void 0 : _a.call(tabs,
|
|
8660
|
-
key:
|
|
8653
|
+
return (jsxRuntimeExports.jsx(Tabs, { centered: centered, type: type, tabPosition: tabPosition, tabBarExtraContent: tabBarExtraContent, tabBarGutter: tabBarGutter, items: (_a = tabs === null || tabs === void 0 ? void 0 : tabs.map) === null || _a === void 0 ? void 0 : _a.call(tabs, tab => ({
|
|
8654
|
+
key: tab.key,
|
|
8661
8655
|
label: tab.name,
|
|
8662
8656
|
children: tab.content,
|
|
8663
8657
|
icon: tab.icon,
|
|
@@ -12675,11 +12669,10 @@ function useComponentConfig(propName) {
|
|
|
12675
12669
|
}
|
|
12676
12670
|
|
|
12677
12671
|
const DisabledContext = /*#__PURE__*/React.createContext(false);
|
|
12678
|
-
const DisabledContextProvider =
|
|
12679
|
-
|
|
12680
|
-
|
|
12681
|
-
|
|
12682
|
-
} = _ref;
|
|
12672
|
+
const DisabledContextProvider = ({
|
|
12673
|
+
children,
|
|
12674
|
+
disabled
|
|
12675
|
+
}) => {
|
|
12683
12676
|
const originDisabled = React.useContext(DisabledContext);
|
|
12684
12677
|
return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
|
|
12685
12678
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
@@ -15477,7 +15470,7 @@ function getFontSizes(base) {
|
|
|
15477
15470
|
}));
|
|
15478
15471
|
}
|
|
15479
15472
|
|
|
15480
|
-
var version = '5.
|
|
15473
|
+
var version = '5.25.4';
|
|
15481
15474
|
|
|
15482
15475
|
const defaultPresetColors = {
|
|
15483
15476
|
blue: '#1677FF',
|
|
@@ -15546,11 +15539,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
15546
15539
|
motion: true
|
|
15547
15540
|
});
|
|
15548
15541
|
|
|
15549
|
-
function genColorMapToken(seed,
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
} = _ref;
|
|
15542
|
+
function genColorMapToken(seed, {
|
|
15543
|
+
generateColorPalettes,
|
|
15544
|
+
generateNeutralColorPalettes
|
|
15545
|
+
}) {
|
|
15554
15546
|
const {
|
|
15555
15547
|
colorSuccess: colorSuccessBase,
|
|
15556
15548
|
colorWarning: colorWarningBase,
|
|
@@ -16138,8 +16130,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
|
|
|
16138
16130
|
// Format if needed
|
|
16139
16131
|
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
|
16140
16132
|
if (components) {
|
|
16141
|
-
Object.entries(components).forEach(
|
|
16142
|
-
let [key, value] = _ref;
|
|
16133
|
+
Object.entries(components).forEach(([key, value]) => {
|
|
16143
16134
|
const {
|
|
16144
16135
|
theme: componentTheme
|
|
16145
16136
|
} = value,
|
|
@@ -16184,21 +16175,18 @@ function useToken() {
|
|
|
16184
16175
|
return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
|
|
16185
16176
|
}
|
|
16186
16177
|
|
|
16187
|
-
const resetComponent =
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16200
|
-
};
|
|
16201
|
-
};
|
|
16178
|
+
const resetComponent = (token, needInheritFontFamily = false) => ({
|
|
16179
|
+
boxSizing: 'border-box',
|
|
16180
|
+
margin: 0,
|
|
16181
|
+
padding: 0,
|
|
16182
|
+
color: token.colorText,
|
|
16183
|
+
fontSize: token.fontSize,
|
|
16184
|
+
// font-variant: @font-variant-base;
|
|
16185
|
+
lineHeight: token.lineHeight,
|
|
16186
|
+
listStyle: 'none',
|
|
16187
|
+
// font-feature-settings: @font-feature-settings-base;
|
|
16188
|
+
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16189
|
+
});
|
|
16202
16190
|
const resetIcon = () => ({
|
|
16203
16191
|
display: 'inline-flex',
|
|
16204
16192
|
alignItems: 'center',
|
|
@@ -16359,11 +16347,10 @@ const useCSSVarCls = prefixCls => {
|
|
|
16359
16347
|
};
|
|
16360
16348
|
|
|
16361
16349
|
const SizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
16362
|
-
const SizeContextProvider =
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
} = _ref;
|
|
16350
|
+
const SizeContextProvider = ({
|
|
16351
|
+
children,
|
|
16352
|
+
size
|
|
16353
|
+
}) => {
|
|
16367
16354
|
const originSize = React.useContext(SizeContext);
|
|
16368
16355
|
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
|
|
16369
16356
|
value: size || originSize
|
|
@@ -20344,12 +20331,11 @@ const FormItemInputContext = /*#__PURE__*/React.createContext({});
|
|
|
20344
20331
|
if (process.env.NODE_ENV !== 'production') {
|
|
20345
20332
|
FormItemInputContext.displayName = 'FormItemInputContext';
|
|
20346
20333
|
}
|
|
20347
|
-
const NoFormStyle =
|
|
20348
|
-
|
|
20349
|
-
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
} = _ref;
|
|
20334
|
+
const NoFormStyle = ({
|
|
20335
|
+
children,
|
|
20336
|
+
status,
|
|
20337
|
+
override
|
|
20338
|
+
}) => {
|
|
20353
20339
|
const formItemInputContext = React.useContext(FormItemInputContext);
|
|
20354
20340
|
const newFormItemInputContext = React.useMemo(() => {
|
|
20355
20341
|
const newContext = Object.assign({}, formItemInputContext);
|
|
@@ -21460,10 +21446,9 @@ function MotionWrapper(props) {
|
|
|
21460
21446
|
* Warning for ConfigProviderProps.
|
|
21461
21447
|
* This will be empty function in production.
|
|
21462
21448
|
*/
|
|
21463
|
-
const PropWarning = /*#__PURE__*/React.memo(
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
} = _ref;
|
|
21449
|
+
const PropWarning = /*#__PURE__*/React.memo(({
|
|
21450
|
+
dropdownMatchSelectWidth
|
|
21451
|
+
}) => {
|
|
21467
21452
|
const warning = devUseWarning('ConfigProvider');
|
|
21468
21453
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
21469
21454
|
return null;
|
|
@@ -21773,8 +21758,7 @@ const ProviderChildren = props => {
|
|
|
21773
21758
|
rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
21774
21759
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
21775
21760
|
const parsedComponents = {};
|
|
21776
|
-
Object.entries(components || {}).forEach(
|
|
21777
|
-
let [componentName, componentToken] = _ref;
|
|
21761
|
+
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
21778
21762
|
const parsedToken = Object.assign({}, componentToken);
|
|
21779
21763
|
if ('algorithm' in parsedToken) {
|
|
21780
21764
|
if (parsedToken.algorithm === true) {
|
|
@@ -21843,8 +21827,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21843
21827
|
/**
|
|
21844
21828
|
* Compatible for legacy `bordered` prop.
|
|
21845
21829
|
*/
|
|
21846
|
-
const useVariant =
|
|
21847
|
-
let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
21830
|
+
const useVariant = (component, variant, legacyBordered = undefined) => {
|
|
21848
21831
|
var _a, _b;
|
|
21849
21832
|
const {
|
|
21850
21833
|
variant: configVariant,
|
|
@@ -22004,10 +21987,9 @@ function compactItemBorderRadius(prefixCls, parentCls, options) {
|
|
|
22004
21987
|
}
|
|
22005
21988
|
};
|
|
22006
21989
|
}
|
|
22007
|
-
function genCompactItemStyle(token
|
|
22008
|
-
|
|
22009
|
-
|
|
22010
|
-
};
|
|
21990
|
+
function genCompactItemStyle(token, options = {
|
|
21991
|
+
focus: true
|
|
21992
|
+
}) {
|
|
22011
21993
|
const {
|
|
22012
21994
|
componentCls
|
|
22013
21995
|
} = token;
|
|
@@ -22272,17 +22254,10 @@ const genFilledGroupStatusStyle = (token, options) => ({
|
|
|
22272
22254
|
});
|
|
22273
22255
|
const genFilledGroupStyle = token => ({
|
|
22274
22256
|
'&-filled': Object.assign(Object.assign(Object.assign({
|
|
22275
|
-
[`${token.componentCls}-group`]: {
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
[`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {
|
|
22280
|
-
'&:not(:first-child)': {
|
|
22281
|
-
borderInlineStart: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22282
|
-
},
|
|
22283
|
-
'&:not(:last-child)': {
|
|
22284
|
-
borderInlineEnd: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22285
|
-
}
|
|
22257
|
+
[`${token.componentCls}-group-addon`]: {
|
|
22258
|
+
background: token.colorFillTertiary,
|
|
22259
|
+
'&:last-child': {
|
|
22260
|
+
position: 'static'
|
|
22286
22261
|
}
|
|
22287
22262
|
}
|
|
22288
22263
|
}, genFilledGroupStatusStyle(token, {
|
|
@@ -22908,7 +22883,7 @@ const genSearchInputStyle = token => {
|
|
|
22908
22883
|
[searchPrefixCls]: {
|
|
22909
22884
|
[componentCls]: {
|
|
22910
22885
|
'&:hover, &:focus': {
|
|
22911
|
-
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22886
|
+
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-color-primary):not(${antCls}-btn-variant-text)`]: {
|
|
22912
22887
|
borderInlineStartColor: token.colorPrimaryHover
|
|
22913
22888
|
}
|
|
22914
22889
|
}
|
|
@@ -22934,7 +22909,7 @@ const genSearchInputStyle = token => {
|
|
|
22934
22909
|
borderEndStartRadius: 0,
|
|
22935
22910
|
boxShadow: 'none'
|
|
22936
22911
|
},
|
|
22937
|
-
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22912
|
+
[`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
|
|
22938
22913
|
color: token.colorTextDescription,
|
|
22939
22914
|
'&:hover': {
|
|
22940
22915
|
color: token.colorPrimaryHover
|
|
@@ -22943,10 +22918,7 @@ const genSearchInputStyle = token => {
|
|
|
22943
22918
|
color: token.colorPrimaryActive
|
|
22944
22919
|
},
|
|
22945
22920
|
[`&${antCls}-btn-loading::before`]: {
|
|
22946
|
-
|
|
22947
|
-
insetInlineEnd: 0,
|
|
22948
|
-
insetBlockStart: 0,
|
|
22949
|
-
insetBlockEnd: 0
|
|
22921
|
+
inset: 0
|
|
22950
22922
|
}
|
|
22951
22923
|
}
|
|
22952
22924
|
}
|
package/dist/index.js
CHANGED
|
@@ -5347,8 +5347,8 @@ const TableRowProvider = (props) => {
|
|
|
5347
5347
|
return (jsxRuntimeExports.jsx(antd.Form, { form: form, component: false, children: jsxRuntimeExports.jsx(TableRowContext.Provider, { value: contextValue, children: jsxRuntimeExports.jsx("tr", Object.assign({}, props, { ref: setNodeRef, style: style }, attributes)) }) }));
|
|
5348
5348
|
};
|
|
5349
5349
|
|
|
5350
|
-
var css_248z$8 = ".style-module_number-
|
|
5351
|
-
var styleNumberFormat = {"number-format
|
|
5350
|
+
var css_248z$8 = ".style-module_number-format-align-right__qOFmQ {\n text-align: right;\n}";
|
|
5351
|
+
var styleNumberFormat = {"number-format-align-right":"style-module_number-format-align-right__qOFmQ"};
|
|
5352
5352
|
styleInject(css_248z$8);
|
|
5353
5353
|
|
|
5354
5354
|
const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing: trailingProps, prefix, suffix, placeholder, disabled, readOnly, allowNegative, value, defaultValue, onValueChange, onChange, removeError, style, onBlur, onKeyDown, onMouseEnter, onMouseLeave, onFocus, onClick, formColLayout, name, label, required, rules, ruleMessage, ruleMin, ruleMax, validateStatus, help, shouldUpdate, ref, }) => {
|
|
@@ -5361,19 +5361,13 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5361
5361
|
}));
|
|
5362
5362
|
const classNumberFormat = React.useMemo(() => {
|
|
5363
5363
|
const classNumberFormat = [];
|
|
5364
|
-
classNames && classNumberFormat.push(...classNames);
|
|
5365
|
-
!text && classNumberFormat.push(styleNumberFormat['number-format']);
|
|
5366
|
-
size === 'small' && classNumberFormat.push(styleNumberFormat['number-format-sm']);
|
|
5367
|
-
if (validateStatus === 'error' || status === 'error')
|
|
5368
|
-
classNumberFormat.push(styleNumberFormat['number-format-error']);
|
|
5369
|
-
variant === 'borderless' && classNumberFormat.push(styleNumberFormat['number-format-borderless']);
|
|
5370
|
-
variant === 'underlined' && classNumberFormat.push(styleNumberFormat['number-format-underlined']);
|
|
5371
5364
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5365
|
+
classNames && classNumberFormat.push(...classNames);
|
|
5372
5366
|
return classNumberFormat;
|
|
5373
5367
|
}, [classNames, text, size, validateStatus, status, variant, align]);
|
|
5374
5368
|
return (jsxRuntimeExports.jsx("div", Object.assign({ onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onClick: onClick }, text && align === 'right' && {
|
|
5375
5369
|
style: { textAlign: 'right' }
|
|
5376
|
-
}, { children: jsxRuntimeExports.jsx(reactNumberFormat.NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing,
|
|
5370
|
+
}, { children: jsxRuntimeExports.jsx(reactNumberFormat.NumericFormat, { thousandSeparator: true, fixedDecimalScale: true, customInput: antd.Input, size: size, className: classNumberFormat.join(' '), disabled: disabled, readOnly: readOnly, required: required, allowNegative: allowNegative, displayType: text ? 'text' : undefined, prefix: prefix, suffix: suffix, placeholder: placeholder, decimalScale: trailingProps !== null && trailingProps !== void 0 ? trailingProps : trailing, min: ruleMin, max: ruleMax, value: value !== null && value !== void 0 ? value : valueNumberFormat, onChange: event => {
|
|
5377
5371
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
5378
5372
|
setValueNumberFormat(event.target.value);
|
|
5379
5373
|
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
@@ -5381,7 +5375,9 @@ const NumberFormat = ({ noItem, text, size, align, classNames, variant, trailing
|
|
|
5381
5375
|
};
|
|
5382
5376
|
const NumberFormatComponent = props => {
|
|
5383
5377
|
const numberFormat = jsxRuntimeExports.jsx(NumberFormat, Object.assign({}, props));
|
|
5384
|
-
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, required: props.required, ruleType: "number",
|
|
5378
|
+
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !props.noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, props.formColLayout, { name: props.name, label: props.label, required: props.required, ruleType: "number",
|
|
5379
|
+
// ruleTransform={value => Number(value)}
|
|
5380
|
+
ruleMessage: props.ruleMessage, ruleMax: props.ruleMax, ruleMin: props.ruleMin, rules: props.rules, trigger: "onValueChange", normalize: (values) => values.floatValue, validateStatus: props.validateStatus, help: props.help, shouldUpdate: props.shouldUpdate, children: numberFormat })))
|
|
5385
5381
|
: numberFormat }));
|
|
5386
5382
|
};
|
|
5387
5383
|
|
|
@@ -7614,12 +7610,12 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, size, suffixIcon,
|
|
|
7614
7610
|
var _a, _b;
|
|
7615
7611
|
return (jsxRuntimeExports.jsxs(antd.Space, { children: [jsxRuntimeExports.jsx("span", { children: option.data.emoji }), (_b = (_a = option.data.text) !== null && _a !== void 0 ? _a : option.data.label) !== null && _b !== void 0 ? _b : option.data.value] }));
|
|
7616
7612
|
};
|
|
7617
|
-
const
|
|
7613
|
+
const popupRender = menu => (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [menu, addItem &&
|
|
7618
7614
|
jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(antd.Divider, { className: styleSelect['add-item-divider'] }), jsxRuntimeExports.jsxs(antd.Space, { align: "center", className: styleSelect['add-item-space'], children: [jsxRuntimeExports.jsx(antd.Input, { placeholder: "Please enter item", value: addItemValue, onChange: event => setAddItemValue(event.target.value) }), jsxRuntimeExports.jsxs(Link, { className: styleSelect['add-item-link'], onClick: handleAddItem, children: [jsxRuntimeExports.jsx(RefIcon$5, {}), " Add item"] })] })] })] }));
|
|
7619
7615
|
const select = !loading ? (jsxRuntimeExports.jsx(antd.Select, { mode: mode, showSearch: showSearch, variant: variant, allowClear: !required, size: size, suffixIcon: suffixIcon, className: classNameSelect.join(' '), disabled: disabled, open: open, filterOption: filterOption, placeholder: placeholder, value: value, defaultValue: defaultValue, onChange: (value, event) => {
|
|
7620
7616
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
7621
7617
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
7622
|
-
}, onKeyDown: onKeyDown, onSearch: onSearch, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender,
|
|
7618
|
+
}, onKeyDown: onKeyDown, onSearch: onSearch, onFocus: onFocus, notFoundContent: notFoundContent, tokenSeparators: tokenSeparators, options: options === null || options === void 0 ? void 0 : options.filter(option => option.value !== undefined), optionLabelProp: "label", optionRender: optionRender, popupRender: popupRender, style: style })) : jsxRuntimeExports.jsx(antd.Skeleton.Input, { block: true, active: true });
|
|
7623
7619
|
return (jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: !noItem ? (jsxRuntimeExports.jsx(FormItemComponent, Object.assign({}, formColLayout, { name: name, label: label, required: required, ruleType: ruleType, ruleMessage: ruleMessage, rules: rules, validateStatus: validateStatus, help: help, children: select })))
|
|
7624
7620
|
: select }));
|
|
7625
7621
|
};
|
|
@@ -8518,10 +8514,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8518
8514
|
}, { children: jsxRuntimeExports.jsx(antd.Form, Object.assign({}, formColLayout.notInline, { form: form, layout: "vertical", onFinish: handleSubmit, initialValues: setInitialValue(), children: jsxRuntimeExports.jsx(antd.Row, Object.assign({}, styleProps.row, { children: items === null || items === void 0 ? void 0 : items.map(item => {
|
|
8519
8515
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8520
8516
|
switch (item.type) {
|
|
8521
|
-
case 'text': return (jsxRuntimeExports.jsx(antd.Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_a = item.space) !== null && _a !== void 0 ? _a : 1}`], { children: jsxRuntimeExports.jsx(InputComponent, { name: item.name, label: item.label,
|
|
8522
|
-
|
|
8523
|
-
disabled: loading }) }), `col-${item.name}`));
|
|
8524
|
-
case 'select': return (jsxRuntimeExports.jsx(antd.Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_b = item.space) !== null && _b !== void 0 ? _b : 1}`], { children: jsxRuntimeExports.jsx(SelectComponent, { options: item.options, name: item.name, label: item.label, disabled: loading, ruleType: item.ruleType }) }), `col-${item.name}`));
|
|
8517
|
+
case 'text': return (jsxRuntimeExports.jsx(antd.Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_a = item.space) !== null && _a !== void 0 ? _a : 1}`], { children: jsxRuntimeExports.jsx(InputComponent, { name: item.name, label: item.label, disabled: loading }) }), `col-${item.name}`));
|
|
8518
|
+
case 'select': return (jsxRuntimeExports.jsx(antd.Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_b = item.space) !== null && _b !== void 0 ? _b : 1}`], { children: item.static ? (jsxRuntimeExports.jsx(SelectComponent, { options: item.options, name: item.name, label: item.label, disabled: loading, ruleType: item.ruleType })) : (jsxRuntimeExports.jsx(SelectAsyncComponent, { name: item.name, label: item.label, disabled: loading, fetchOptions: item.fetchOptions, ruleType: item.ruleType })) }), `col-${item.name}`));
|
|
8525
8519
|
case 'select-multiple': return (jsxRuntimeExports.jsx(antd.Col, Object.assign({ className: "gutter-row" }, styleProps[`col${(_c = item.space) !== null && _c !== void 0 ? _c : 1}`], { children: item.static ? (jsxRuntimeExports.jsx(SelectComponent, { mode: "multiple", label: item.label, name: item.name, disabled: loading, options: item.options, onChange: (value, options) => {
|
|
8526
8520
|
item.name
|
|
8527
8521
|
&& Array.isArray(options)
|
|
@@ -8675,8 +8669,8 @@ const TableCellEditableComponent = (_a) => {
|
|
|
8675
8669
|
|
|
8676
8670
|
const TabsComponent = ({ centered, type, tabPosition, tabBarExtraContent, tabBarGutter, tabs, }) => {
|
|
8677
8671
|
var _a;
|
|
8678
|
-
return (jsxRuntimeExports.jsx(antd.Tabs, { centered: centered, type: type, tabPosition: tabPosition, tabBarExtraContent: tabBarExtraContent, tabBarGutter: tabBarGutter, items: (_a = tabs === null || tabs === void 0 ? void 0 : tabs.map) === null || _a === void 0 ? void 0 : _a.call(tabs,
|
|
8679
|
-
key:
|
|
8672
|
+
return (jsxRuntimeExports.jsx(antd.Tabs, { centered: centered, type: type, tabPosition: tabPosition, tabBarExtraContent: tabBarExtraContent, tabBarGutter: tabBarGutter, items: (_a = tabs === null || tabs === void 0 ? void 0 : tabs.map) === null || _a === void 0 ? void 0 : _a.call(tabs, tab => ({
|
|
8673
|
+
key: tab.key,
|
|
8680
8674
|
label: tab.name,
|
|
8681
8675
|
children: tab.content,
|
|
8682
8676
|
icon: tab.icon,
|
|
@@ -12694,11 +12688,10 @@ function useComponentConfig(propName) {
|
|
|
12694
12688
|
}
|
|
12695
12689
|
|
|
12696
12690
|
const DisabledContext = /*#__PURE__*/React__namespace.createContext(false);
|
|
12697
|
-
const DisabledContextProvider =
|
|
12698
|
-
|
|
12699
|
-
|
|
12700
|
-
|
|
12701
|
-
} = _ref;
|
|
12691
|
+
const DisabledContextProvider = ({
|
|
12692
|
+
children,
|
|
12693
|
+
disabled
|
|
12694
|
+
}) => {
|
|
12702
12695
|
const originDisabled = React__namespace.useContext(DisabledContext);
|
|
12703
12696
|
return /*#__PURE__*/React__namespace.createElement(DisabledContext.Provider, {
|
|
12704
12697
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
@@ -15496,7 +15489,7 @@ function getFontSizes(base) {
|
|
|
15496
15489
|
}));
|
|
15497
15490
|
}
|
|
15498
15491
|
|
|
15499
|
-
var version = '5.
|
|
15492
|
+
var version = '5.25.4';
|
|
15500
15493
|
|
|
15501
15494
|
const defaultPresetColors = {
|
|
15502
15495
|
blue: '#1677FF',
|
|
@@ -15565,11 +15558,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
15565
15558
|
motion: true
|
|
15566
15559
|
});
|
|
15567
15560
|
|
|
15568
|
-
function genColorMapToken(seed,
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
} = _ref;
|
|
15561
|
+
function genColorMapToken(seed, {
|
|
15562
|
+
generateColorPalettes,
|
|
15563
|
+
generateNeutralColorPalettes
|
|
15564
|
+
}) {
|
|
15573
15565
|
const {
|
|
15574
15566
|
colorSuccess: colorSuccessBase,
|
|
15575
15567
|
colorWarning: colorWarningBase,
|
|
@@ -16157,8 +16149,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
|
|
|
16157
16149
|
// Format if needed
|
|
16158
16150
|
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
|
16159
16151
|
if (components) {
|
|
16160
|
-
Object.entries(components).forEach(
|
|
16161
|
-
let [key, value] = _ref;
|
|
16152
|
+
Object.entries(components).forEach(([key, value]) => {
|
|
16162
16153
|
const {
|
|
16163
16154
|
theme: componentTheme
|
|
16164
16155
|
} = value,
|
|
@@ -16203,21 +16194,18 @@ function useToken() {
|
|
|
16203
16194
|
return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
|
|
16204
16195
|
}
|
|
16205
16196
|
|
|
16206
|
-
const resetComponent =
|
|
16207
|
-
|
|
16208
|
-
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16219
|
-
};
|
|
16220
|
-
};
|
|
16197
|
+
const resetComponent = (token, needInheritFontFamily = false) => ({
|
|
16198
|
+
boxSizing: 'border-box',
|
|
16199
|
+
margin: 0,
|
|
16200
|
+
padding: 0,
|
|
16201
|
+
color: token.colorText,
|
|
16202
|
+
fontSize: token.fontSize,
|
|
16203
|
+
// font-variant: @font-variant-base;
|
|
16204
|
+
lineHeight: token.lineHeight,
|
|
16205
|
+
listStyle: 'none',
|
|
16206
|
+
// font-feature-settings: @font-feature-settings-base;
|
|
16207
|
+
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16208
|
+
});
|
|
16221
16209
|
const resetIcon = () => ({
|
|
16222
16210
|
display: 'inline-flex',
|
|
16223
16211
|
alignItems: 'center',
|
|
@@ -16378,11 +16366,10 @@ const useCSSVarCls = prefixCls => {
|
|
|
16378
16366
|
};
|
|
16379
16367
|
|
|
16380
16368
|
const SizeContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
16381
|
-
const SizeContextProvider =
|
|
16382
|
-
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
} = _ref;
|
|
16369
|
+
const SizeContextProvider = ({
|
|
16370
|
+
children,
|
|
16371
|
+
size
|
|
16372
|
+
}) => {
|
|
16386
16373
|
const originSize = React__namespace.useContext(SizeContext);
|
|
16387
16374
|
return /*#__PURE__*/React__namespace.createElement(SizeContext.Provider, {
|
|
16388
16375
|
value: size || originSize
|
|
@@ -20363,12 +20350,11 @@ const FormItemInputContext = /*#__PURE__*/React__namespace.createContext({});
|
|
|
20363
20350
|
if (process.env.NODE_ENV !== 'production') {
|
|
20364
20351
|
FormItemInputContext.displayName = 'FormItemInputContext';
|
|
20365
20352
|
}
|
|
20366
|
-
const NoFormStyle =
|
|
20367
|
-
|
|
20368
|
-
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
} = _ref;
|
|
20353
|
+
const NoFormStyle = ({
|
|
20354
|
+
children,
|
|
20355
|
+
status,
|
|
20356
|
+
override
|
|
20357
|
+
}) => {
|
|
20372
20358
|
const formItemInputContext = React__namespace.useContext(FormItemInputContext);
|
|
20373
20359
|
const newFormItemInputContext = React__namespace.useMemo(() => {
|
|
20374
20360
|
const newContext = Object.assign({}, formItemInputContext);
|
|
@@ -21479,10 +21465,9 @@ function MotionWrapper(props) {
|
|
|
21479
21465
|
* Warning for ConfigProviderProps.
|
|
21480
21466
|
* This will be empty function in production.
|
|
21481
21467
|
*/
|
|
21482
|
-
const PropWarning = /*#__PURE__*/React__namespace.memo(
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
} = _ref;
|
|
21468
|
+
const PropWarning = /*#__PURE__*/React__namespace.memo(({
|
|
21469
|
+
dropdownMatchSelectWidth
|
|
21470
|
+
}) => {
|
|
21486
21471
|
const warning = devUseWarning('ConfigProvider');
|
|
21487
21472
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
21488
21473
|
return null;
|
|
@@ -21792,8 +21777,7 @@ const ProviderChildren = props => {
|
|
|
21792
21777
|
rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
21793
21778
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
21794
21779
|
const parsedComponents = {};
|
|
21795
|
-
Object.entries(components || {}).forEach(
|
|
21796
|
-
let [componentName, componentToken] = _ref;
|
|
21780
|
+
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
21797
21781
|
const parsedToken = Object.assign({}, componentToken);
|
|
21798
21782
|
if ('algorithm' in parsedToken) {
|
|
21799
21783
|
if (parsedToken.algorithm === true) {
|
|
@@ -21862,8 +21846,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21862
21846
|
/**
|
|
21863
21847
|
* Compatible for legacy `bordered` prop.
|
|
21864
21848
|
*/
|
|
21865
|
-
const useVariant =
|
|
21866
|
-
let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
21849
|
+
const useVariant = (component, variant, legacyBordered = undefined) => {
|
|
21867
21850
|
var _a, _b;
|
|
21868
21851
|
const {
|
|
21869
21852
|
variant: configVariant,
|
|
@@ -22023,10 +22006,9 @@ function compactItemBorderRadius(prefixCls, parentCls, options) {
|
|
|
22023
22006
|
}
|
|
22024
22007
|
};
|
|
22025
22008
|
}
|
|
22026
|
-
function genCompactItemStyle(token
|
|
22027
|
-
|
|
22028
|
-
|
|
22029
|
-
};
|
|
22009
|
+
function genCompactItemStyle(token, options = {
|
|
22010
|
+
focus: true
|
|
22011
|
+
}) {
|
|
22030
22012
|
const {
|
|
22031
22013
|
componentCls
|
|
22032
22014
|
} = token;
|
|
@@ -22291,17 +22273,10 @@ const genFilledGroupStatusStyle = (token, options) => ({
|
|
|
22291
22273
|
});
|
|
22292
22274
|
const genFilledGroupStyle = token => ({
|
|
22293
22275
|
'&-filled': Object.assign(Object.assign(Object.assign({
|
|
22294
|
-
[`${token.componentCls}-group`]: {
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
[`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {
|
|
22299
|
-
'&:not(:first-child)': {
|
|
22300
|
-
borderInlineStart: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22301
|
-
},
|
|
22302
|
-
'&:not(:last-child)': {
|
|
22303
|
-
borderInlineEnd: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22304
|
-
}
|
|
22276
|
+
[`${token.componentCls}-group-addon`]: {
|
|
22277
|
+
background: token.colorFillTertiary,
|
|
22278
|
+
'&:last-child': {
|
|
22279
|
+
position: 'static'
|
|
22305
22280
|
}
|
|
22306
22281
|
}
|
|
22307
22282
|
}, genFilledGroupStatusStyle(token, {
|
|
@@ -22927,7 +22902,7 @@ const genSearchInputStyle = token => {
|
|
|
22927
22902
|
[searchPrefixCls]: {
|
|
22928
22903
|
[componentCls]: {
|
|
22929
22904
|
'&:hover, &:focus': {
|
|
22930
|
-
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22905
|
+
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-color-primary):not(${antCls}-btn-variant-text)`]: {
|
|
22931
22906
|
borderInlineStartColor: token.colorPrimaryHover
|
|
22932
22907
|
}
|
|
22933
22908
|
}
|
|
@@ -22953,7 +22928,7 @@ const genSearchInputStyle = token => {
|
|
|
22953
22928
|
borderEndStartRadius: 0,
|
|
22954
22929
|
boxShadow: 'none'
|
|
22955
22930
|
},
|
|
22956
|
-
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22931
|
+
[`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
|
|
22957
22932
|
color: token.colorTextDescription,
|
|
22958
22933
|
'&:hover': {
|
|
22959
22934
|
color: token.colorPrimaryHover
|
|
@@ -22962,10 +22937,7 @@ const genSearchInputStyle = token => {
|
|
|
22962
22937
|
color: token.colorPrimaryActive
|
|
22963
22938
|
},
|
|
22964
22939
|
[`&${antCls}-btn-loading::before`]: {
|
|
22965
|
-
|
|
22966
|
-
insetInlineEnd: 0,
|
|
22967
|
-
insetBlockStart: 0,
|
|
22968
|
-
insetBlockEnd: 0
|
|
22940
|
+
inset: 0
|
|
22969
22941
|
}
|
|
22970
22942
|
}
|
|
22971
22943
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sti-antd-package",
|
|
3
3
|
"description": "STI ANT Design",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.22",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/stevan-iskandar/sti-antd-package#readme",
|
|
34
34
|
"bundleDependencies": [
|
|
35
|
-
"@ant-design/icons"
|
|
36
|
-
"antd"
|
|
35
|
+
"@ant-design/icons"
|
|
37
36
|
],
|
|
38
37
|
"peerDependencies": {
|
|
39
38
|
"@ant-design/icons": "^6.0.0",
|
|
@@ -44,7 +43,6 @@
|
|
|
44
43
|
"@types/lodash": "^4.17.16",
|
|
45
44
|
"@types/react": "^19.0.12",
|
|
46
45
|
"@types/react-dom": "^19.0.4",
|
|
47
|
-
"antd": "^5.24.9",
|
|
48
46
|
"axios": "^1.8.4",
|
|
49
47
|
"lodash": "^4.17.21",
|
|
50
48
|
"react": "^19.0.0",
|
|
@@ -72,6 +70,7 @@
|
|
|
72
70
|
},
|
|
73
71
|
"dependencies": {
|
|
74
72
|
"@inertiajs/react": "^2.0.5",
|
|
73
|
+
"antd": "^5.25.4",
|
|
75
74
|
"browserslist": "^4.24.4",
|
|
76
75
|
"caniuse-lite": "^1.0.30001706",
|
|
77
76
|
"classnames": "^2.5.1",
|