sti-antd-package 0.0.21 → 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 +55 -85
- package/dist/index.js +55 -85
- 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
|
-
!text && classNumberFormat.push(styleNumberFormat['number-format']);
|
|
5346
|
-
// size === 'small' && classNumberFormat.push(styleNumberFormat['number-format-sm'])
|
|
5347
|
-
// if (validateStatus === 'error' || status === 'error')
|
|
5348
|
-
// classNumberFormat.push(styleNumberFormat['number-format-error'])
|
|
5349
|
-
// variant === 'borderless' && classNumberFormat.push(styleNumberFormat['number-format-borderless'])
|
|
5350
|
-
// variant === 'underlined' && classNumberFormat.push(styleNumberFormat['number-format-underlined'])
|
|
5351
5345
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5352
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);
|
|
@@ -7597,12 +7591,12 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, size, suffixIcon,
|
|
|
7597
7591
|
var _a, _b;
|
|
7598
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] }));
|
|
7599
7593
|
};
|
|
7600
|
-
const
|
|
7594
|
+
const popupRender = menu => (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [menu, addItem &&
|
|
7601
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"] })] })] })] }));
|
|
7602
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) => {
|
|
7603
7597
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
7604
7598
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
7605
|
-
}, 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 });
|
|
7606
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 })))
|
|
7607
7601
|
: select }));
|
|
7608
7602
|
};
|
|
@@ -8501,10 +8495,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8501
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 => {
|
|
8502
8496
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8503
8497
|
switch (item.type) {
|
|
8504
|
-
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,
|
|
8505
|
-
|
|
8506
|
-
disabled: loading }) }), `col-${item.name}`));
|
|
8507
|
-
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}`));
|
|
8508
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) => {
|
|
8509
8501
|
item.name
|
|
8510
8502
|
&& Array.isArray(options)
|
|
@@ -8658,8 +8650,8 @@ const TableCellEditableComponent = (_a) => {
|
|
|
8658
8650
|
|
|
8659
8651
|
const TabsComponent = ({ centered, type, tabPosition, tabBarExtraContent, tabBarGutter, tabs, }) => {
|
|
8660
8652
|
var _a;
|
|
8661
|
-
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,
|
|
8662
|
-
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,
|
|
8663
8655
|
label: tab.name,
|
|
8664
8656
|
children: tab.content,
|
|
8665
8657
|
icon: tab.icon,
|
|
@@ -12677,11 +12669,10 @@ function useComponentConfig(propName) {
|
|
|
12677
12669
|
}
|
|
12678
12670
|
|
|
12679
12671
|
const DisabledContext = /*#__PURE__*/React.createContext(false);
|
|
12680
|
-
const DisabledContextProvider =
|
|
12681
|
-
|
|
12682
|
-
|
|
12683
|
-
|
|
12684
|
-
} = _ref;
|
|
12672
|
+
const DisabledContextProvider = ({
|
|
12673
|
+
children,
|
|
12674
|
+
disabled
|
|
12675
|
+
}) => {
|
|
12685
12676
|
const originDisabled = React.useContext(DisabledContext);
|
|
12686
12677
|
return /*#__PURE__*/React.createElement(DisabledContext.Provider, {
|
|
12687
12678
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
@@ -15479,7 +15470,7 @@ function getFontSizes(base) {
|
|
|
15479
15470
|
}));
|
|
15480
15471
|
}
|
|
15481
15472
|
|
|
15482
|
-
var version = '5.
|
|
15473
|
+
var version = '5.25.4';
|
|
15483
15474
|
|
|
15484
15475
|
const defaultPresetColors = {
|
|
15485
15476
|
blue: '#1677FF',
|
|
@@ -15548,11 +15539,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
15548
15539
|
motion: true
|
|
15549
15540
|
});
|
|
15550
15541
|
|
|
15551
|
-
function genColorMapToken(seed,
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
} = _ref;
|
|
15542
|
+
function genColorMapToken(seed, {
|
|
15543
|
+
generateColorPalettes,
|
|
15544
|
+
generateNeutralColorPalettes
|
|
15545
|
+
}) {
|
|
15556
15546
|
const {
|
|
15557
15547
|
colorSuccess: colorSuccessBase,
|
|
15558
15548
|
colorWarning: colorWarningBase,
|
|
@@ -16140,8 +16130,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
|
|
|
16140
16130
|
// Format if needed
|
|
16141
16131
|
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
|
16142
16132
|
if (components) {
|
|
16143
|
-
Object.entries(components).forEach(
|
|
16144
|
-
let [key, value] = _ref;
|
|
16133
|
+
Object.entries(components).forEach(([key, value]) => {
|
|
16145
16134
|
const {
|
|
16146
16135
|
theme: componentTheme
|
|
16147
16136
|
} = value,
|
|
@@ -16186,21 +16175,18 @@ function useToken() {
|
|
|
16186
16175
|
return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
|
|
16187
16176
|
}
|
|
16188
16177
|
|
|
16189
|
-
const resetComponent =
|
|
16190
|
-
|
|
16191
|
-
|
|
16192
|
-
|
|
16193
|
-
|
|
16194
|
-
|
|
16195
|
-
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
|
|
16200
|
-
|
|
16201
|
-
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16202
|
-
};
|
|
16203
|
-
};
|
|
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
|
+
});
|
|
16204
16190
|
const resetIcon = () => ({
|
|
16205
16191
|
display: 'inline-flex',
|
|
16206
16192
|
alignItems: 'center',
|
|
@@ -16361,11 +16347,10 @@ const useCSSVarCls = prefixCls => {
|
|
|
16361
16347
|
};
|
|
16362
16348
|
|
|
16363
16349
|
const SizeContext = /*#__PURE__*/React.createContext(undefined);
|
|
16364
|
-
const SizeContextProvider =
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
} = _ref;
|
|
16350
|
+
const SizeContextProvider = ({
|
|
16351
|
+
children,
|
|
16352
|
+
size
|
|
16353
|
+
}) => {
|
|
16369
16354
|
const originSize = React.useContext(SizeContext);
|
|
16370
16355
|
return /*#__PURE__*/React.createElement(SizeContext.Provider, {
|
|
16371
16356
|
value: size || originSize
|
|
@@ -20346,12 +20331,11 @@ const FormItemInputContext = /*#__PURE__*/React.createContext({});
|
|
|
20346
20331
|
if (process.env.NODE_ENV !== 'production') {
|
|
20347
20332
|
FormItemInputContext.displayName = 'FormItemInputContext';
|
|
20348
20333
|
}
|
|
20349
|
-
const NoFormStyle =
|
|
20350
|
-
|
|
20351
|
-
|
|
20352
|
-
|
|
20353
|
-
|
|
20354
|
-
} = _ref;
|
|
20334
|
+
const NoFormStyle = ({
|
|
20335
|
+
children,
|
|
20336
|
+
status,
|
|
20337
|
+
override
|
|
20338
|
+
}) => {
|
|
20355
20339
|
const formItemInputContext = React.useContext(FormItemInputContext);
|
|
20356
20340
|
const newFormItemInputContext = React.useMemo(() => {
|
|
20357
20341
|
const newContext = Object.assign({}, formItemInputContext);
|
|
@@ -21462,10 +21446,9 @@ function MotionWrapper(props) {
|
|
|
21462
21446
|
* Warning for ConfigProviderProps.
|
|
21463
21447
|
* This will be empty function in production.
|
|
21464
21448
|
*/
|
|
21465
|
-
const PropWarning = /*#__PURE__*/React.memo(
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
} = _ref;
|
|
21449
|
+
const PropWarning = /*#__PURE__*/React.memo(({
|
|
21450
|
+
dropdownMatchSelectWidth
|
|
21451
|
+
}) => {
|
|
21469
21452
|
const warning = devUseWarning('ConfigProvider');
|
|
21470
21453
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
21471
21454
|
return null;
|
|
@@ -21775,8 +21758,7 @@ const ProviderChildren = props => {
|
|
|
21775
21758
|
rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
21776
21759
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
21777
21760
|
const parsedComponents = {};
|
|
21778
|
-
Object.entries(components || {}).forEach(
|
|
21779
|
-
let [componentName, componentToken] = _ref;
|
|
21761
|
+
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
21780
21762
|
const parsedToken = Object.assign({}, componentToken);
|
|
21781
21763
|
if ('algorithm' in parsedToken) {
|
|
21782
21764
|
if (parsedToken.algorithm === true) {
|
|
@@ -21845,8 +21827,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21845
21827
|
/**
|
|
21846
21828
|
* Compatible for legacy `bordered` prop.
|
|
21847
21829
|
*/
|
|
21848
|
-
const useVariant =
|
|
21849
|
-
let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
21830
|
+
const useVariant = (component, variant, legacyBordered = undefined) => {
|
|
21850
21831
|
var _a, _b;
|
|
21851
21832
|
const {
|
|
21852
21833
|
variant: configVariant,
|
|
@@ -22006,10 +21987,9 @@ function compactItemBorderRadius(prefixCls, parentCls, options) {
|
|
|
22006
21987
|
}
|
|
22007
21988
|
};
|
|
22008
21989
|
}
|
|
22009
|
-
function genCompactItemStyle(token
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
};
|
|
21990
|
+
function genCompactItemStyle(token, options = {
|
|
21991
|
+
focus: true
|
|
21992
|
+
}) {
|
|
22013
21993
|
const {
|
|
22014
21994
|
componentCls
|
|
22015
21995
|
} = token;
|
|
@@ -22274,17 +22254,10 @@ const genFilledGroupStatusStyle = (token, options) => ({
|
|
|
22274
22254
|
});
|
|
22275
22255
|
const genFilledGroupStyle = token => ({
|
|
22276
22256
|
'&-filled': Object.assign(Object.assign(Object.assign({
|
|
22277
|
-
[`${token.componentCls}-group`]: {
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
[`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {
|
|
22282
|
-
'&:not(:first-child)': {
|
|
22283
|
-
borderInlineStart: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22284
|
-
},
|
|
22285
|
-
'&:not(:last-child)': {
|
|
22286
|
-
borderInlineEnd: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22287
|
-
}
|
|
22257
|
+
[`${token.componentCls}-group-addon`]: {
|
|
22258
|
+
background: token.colorFillTertiary,
|
|
22259
|
+
'&:last-child': {
|
|
22260
|
+
position: 'static'
|
|
22288
22261
|
}
|
|
22289
22262
|
}
|
|
22290
22263
|
}, genFilledGroupStatusStyle(token, {
|
|
@@ -22910,7 +22883,7 @@ const genSearchInputStyle = token => {
|
|
|
22910
22883
|
[searchPrefixCls]: {
|
|
22911
22884
|
[componentCls]: {
|
|
22912
22885
|
'&:hover, &:focus': {
|
|
22913
|
-
[`+ ${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)`]: {
|
|
22914
22887
|
borderInlineStartColor: token.colorPrimaryHover
|
|
22915
22888
|
}
|
|
22916
22889
|
}
|
|
@@ -22936,7 +22909,7 @@ const genSearchInputStyle = token => {
|
|
|
22936
22909
|
borderEndStartRadius: 0,
|
|
22937
22910
|
boxShadow: 'none'
|
|
22938
22911
|
},
|
|
22939
|
-
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22912
|
+
[`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
|
|
22940
22913
|
color: token.colorTextDescription,
|
|
22941
22914
|
'&:hover': {
|
|
22942
22915
|
color: token.colorPrimaryHover
|
|
@@ -22945,10 +22918,7 @@ const genSearchInputStyle = token => {
|
|
|
22945
22918
|
color: token.colorPrimaryActive
|
|
22946
22919
|
},
|
|
22947
22920
|
[`&${antCls}-btn-loading::before`]: {
|
|
22948
|
-
|
|
22949
|
-
insetInlineEnd: 0,
|
|
22950
|
-
insetBlockStart: 0,
|
|
22951
|
-
insetBlockEnd: 0
|
|
22921
|
+
inset: 0
|
|
22952
22922
|
}
|
|
22953
22923
|
}
|
|
22954
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
|
-
!text && classNumberFormat.push(styleNumberFormat['number-format']);
|
|
5365
|
-
// size === 'small' && classNumberFormat.push(styleNumberFormat['number-format-sm'])
|
|
5366
|
-
// if (validateStatus === 'error' || status === 'error')
|
|
5367
|
-
// classNumberFormat.push(styleNumberFormat['number-format-error'])
|
|
5368
|
-
// variant === 'borderless' && classNumberFormat.push(styleNumberFormat['number-format-borderless'])
|
|
5369
|
-
// variant === 'underlined' && classNumberFormat.push(styleNumberFormat['number-format-underlined'])
|
|
5370
5364
|
!text && align === 'right' && classNumberFormat.push(styleNumberFormat['number-format-align-right']);
|
|
5371
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);
|
|
@@ -7616,12 +7610,12 @@ const SelectComponent = ({ noItem, showSearch, mode, variant, size, suffixIcon,
|
|
|
7616
7610
|
var _a, _b;
|
|
7617
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] }));
|
|
7618
7612
|
};
|
|
7619
|
-
const
|
|
7613
|
+
const popupRender = menu => (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [menu, addItem &&
|
|
7620
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"] })] })] })] }));
|
|
7621
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) => {
|
|
7622
7616
|
removeError === null || removeError === void 0 ? void 0 : removeError(name);
|
|
7623
7617
|
onChange === null || onChange === void 0 ? void 0 : onChange(value, event);
|
|
7624
|
-
}, 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 });
|
|
7625
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 })))
|
|
7626
7620
|
: select }));
|
|
7627
7621
|
};
|
|
@@ -8520,10 +8514,8 @@ const TableAsyncSearchComponent = ({ noInitSubmit, noButton, name, items, header
|
|
|
8520
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 => {
|
|
8521
8515
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
8522
8516
|
switch (item.type) {
|
|
8523
|
-
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,
|
|
8524
|
-
|
|
8525
|
-
disabled: loading }) }), `col-${item.name}`));
|
|
8526
|
-
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}`));
|
|
8527
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) => {
|
|
8528
8520
|
item.name
|
|
8529
8521
|
&& Array.isArray(options)
|
|
@@ -8677,8 +8669,8 @@ const TableCellEditableComponent = (_a) => {
|
|
|
8677
8669
|
|
|
8678
8670
|
const TabsComponent = ({ centered, type, tabPosition, tabBarExtraContent, tabBarGutter, tabs, }) => {
|
|
8679
8671
|
var _a;
|
|
8680
|
-
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,
|
|
8681
|
-
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,
|
|
8682
8674
|
label: tab.name,
|
|
8683
8675
|
children: tab.content,
|
|
8684
8676
|
icon: tab.icon,
|
|
@@ -12696,11 +12688,10 @@ function useComponentConfig(propName) {
|
|
|
12696
12688
|
}
|
|
12697
12689
|
|
|
12698
12690
|
const DisabledContext = /*#__PURE__*/React__namespace.createContext(false);
|
|
12699
|
-
const DisabledContextProvider =
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
} = _ref;
|
|
12691
|
+
const DisabledContextProvider = ({
|
|
12692
|
+
children,
|
|
12693
|
+
disabled
|
|
12694
|
+
}) => {
|
|
12704
12695
|
const originDisabled = React__namespace.useContext(DisabledContext);
|
|
12705
12696
|
return /*#__PURE__*/React__namespace.createElement(DisabledContext.Provider, {
|
|
12706
12697
|
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
|
|
@@ -15498,7 +15489,7 @@ function getFontSizes(base) {
|
|
|
15498
15489
|
}));
|
|
15499
15490
|
}
|
|
15500
15491
|
|
|
15501
|
-
var version = '5.
|
|
15492
|
+
var version = '5.25.4';
|
|
15502
15493
|
|
|
15503
15494
|
const defaultPresetColors = {
|
|
15504
15495
|
blue: '#1677FF',
|
|
@@ -15567,11 +15558,10 @@ const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
|
|
|
15567
15558
|
motion: true
|
|
15568
15559
|
});
|
|
15569
15560
|
|
|
15570
|
-
function genColorMapToken(seed,
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
} = _ref;
|
|
15561
|
+
function genColorMapToken(seed, {
|
|
15562
|
+
generateColorPalettes,
|
|
15563
|
+
generateNeutralColorPalettes
|
|
15564
|
+
}) {
|
|
15575
15565
|
const {
|
|
15576
15566
|
colorSuccess: colorSuccessBase,
|
|
15577
15567
|
colorWarning: colorWarningBase,
|
|
@@ -16159,8 +16149,7 @@ const getComputedToken = (originToken, overrideToken, theme) => {
|
|
|
16159
16149
|
// Format if needed
|
|
16160
16150
|
mergedDerivativeToken = formatToken(mergedDerivativeToken);
|
|
16161
16151
|
if (components) {
|
|
16162
|
-
Object.entries(components).forEach(
|
|
16163
|
-
let [key, value] = _ref;
|
|
16152
|
+
Object.entries(components).forEach(([key, value]) => {
|
|
16164
16153
|
const {
|
|
16165
16154
|
theme: componentTheme
|
|
16166
16155
|
} = value,
|
|
@@ -16205,21 +16194,18 @@ function useToken() {
|
|
|
16205
16194
|
return [mergedTheme, realToken, hashed ? hashId : '', token, cssVar];
|
|
16206
16195
|
}
|
|
16207
16196
|
|
|
16208
|
-
const resetComponent =
|
|
16209
|
-
|
|
16210
|
-
|
|
16211
|
-
|
|
16212
|
-
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
fontFamily: needInheritFontFamily ? 'inherit' : token.fontFamily
|
|
16221
|
-
};
|
|
16222
|
-
};
|
|
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
|
+
});
|
|
16223
16209
|
const resetIcon = () => ({
|
|
16224
16210
|
display: 'inline-flex',
|
|
16225
16211
|
alignItems: 'center',
|
|
@@ -16380,11 +16366,10 @@ const useCSSVarCls = prefixCls => {
|
|
|
16380
16366
|
};
|
|
16381
16367
|
|
|
16382
16368
|
const SizeContext = /*#__PURE__*/React__namespace.createContext(undefined);
|
|
16383
|
-
const SizeContextProvider =
|
|
16384
|
-
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
} = _ref;
|
|
16369
|
+
const SizeContextProvider = ({
|
|
16370
|
+
children,
|
|
16371
|
+
size
|
|
16372
|
+
}) => {
|
|
16388
16373
|
const originSize = React__namespace.useContext(SizeContext);
|
|
16389
16374
|
return /*#__PURE__*/React__namespace.createElement(SizeContext.Provider, {
|
|
16390
16375
|
value: size || originSize
|
|
@@ -20365,12 +20350,11 @@ const FormItemInputContext = /*#__PURE__*/React__namespace.createContext({});
|
|
|
20365
20350
|
if (process.env.NODE_ENV !== 'production') {
|
|
20366
20351
|
FormItemInputContext.displayName = 'FormItemInputContext';
|
|
20367
20352
|
}
|
|
20368
|
-
const NoFormStyle =
|
|
20369
|
-
|
|
20370
|
-
|
|
20371
|
-
|
|
20372
|
-
|
|
20373
|
-
} = _ref;
|
|
20353
|
+
const NoFormStyle = ({
|
|
20354
|
+
children,
|
|
20355
|
+
status,
|
|
20356
|
+
override
|
|
20357
|
+
}) => {
|
|
20374
20358
|
const formItemInputContext = React__namespace.useContext(FormItemInputContext);
|
|
20375
20359
|
const newFormItemInputContext = React__namespace.useMemo(() => {
|
|
20376
20360
|
const newContext = Object.assign({}, formItemInputContext);
|
|
@@ -21481,10 +21465,9 @@ function MotionWrapper(props) {
|
|
|
21481
21465
|
* Warning for ConfigProviderProps.
|
|
21482
21466
|
* This will be empty function in production.
|
|
21483
21467
|
*/
|
|
21484
|
-
const PropWarning = /*#__PURE__*/React__namespace.memo(
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
} = _ref;
|
|
21468
|
+
const PropWarning = /*#__PURE__*/React__namespace.memo(({
|
|
21469
|
+
dropdownMatchSelectWidth
|
|
21470
|
+
}) => {
|
|
21488
21471
|
const warning = devUseWarning('ConfigProvider');
|
|
21489
21472
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
21490
21473
|
return null;
|
|
@@ -21794,8 +21777,7 @@ const ProviderChildren = props => {
|
|
|
21794
21777
|
rest = __rest$2(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
21795
21778
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
21796
21779
|
const parsedComponents = {};
|
|
21797
|
-
Object.entries(components || {}).forEach(
|
|
21798
|
-
let [componentName, componentToken] = _ref;
|
|
21780
|
+
Object.entries(components || {}).forEach(([componentName, componentToken]) => {
|
|
21799
21781
|
const parsedToken = Object.assign({}, componentToken);
|
|
21800
21782
|
if ('algorithm' in parsedToken) {
|
|
21801
21783
|
if (parsedToken.algorithm === true) {
|
|
@@ -21864,8 +21846,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
21864
21846
|
/**
|
|
21865
21847
|
* Compatible for legacy `bordered` prop.
|
|
21866
21848
|
*/
|
|
21867
|
-
const useVariant =
|
|
21868
|
-
let legacyBordered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
21849
|
+
const useVariant = (component, variant, legacyBordered = undefined) => {
|
|
21869
21850
|
var _a, _b;
|
|
21870
21851
|
const {
|
|
21871
21852
|
variant: configVariant,
|
|
@@ -22025,10 +22006,9 @@ function compactItemBorderRadius(prefixCls, parentCls, options) {
|
|
|
22025
22006
|
}
|
|
22026
22007
|
};
|
|
22027
22008
|
}
|
|
22028
|
-
function genCompactItemStyle(token
|
|
22029
|
-
|
|
22030
|
-
|
|
22031
|
-
};
|
|
22009
|
+
function genCompactItemStyle(token, options = {
|
|
22010
|
+
focus: true
|
|
22011
|
+
}) {
|
|
22032
22012
|
const {
|
|
22033
22013
|
componentCls
|
|
22034
22014
|
} = token;
|
|
@@ -22293,17 +22273,10 @@ const genFilledGroupStatusStyle = (token, options) => ({
|
|
|
22293
22273
|
});
|
|
22294
22274
|
const genFilledGroupStyle = token => ({
|
|
22295
22275
|
'&-filled': Object.assign(Object.assign(Object.assign({
|
|
22296
|
-
[`${token.componentCls}-group`]: {
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
[`${token.componentCls}-filled:not(:focus):not(:focus-within)`]: {
|
|
22301
|
-
'&:not(:first-child)': {
|
|
22302
|
-
borderInlineStart: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22303
|
-
},
|
|
22304
|
-
'&:not(:last-child)': {
|
|
22305
|
-
borderInlineEnd: `${unit$1(token.lineWidth)} ${token.lineType} ${token.colorSplit}`
|
|
22306
|
-
}
|
|
22276
|
+
[`${token.componentCls}-group-addon`]: {
|
|
22277
|
+
background: token.colorFillTertiary,
|
|
22278
|
+
'&:last-child': {
|
|
22279
|
+
position: 'static'
|
|
22307
22280
|
}
|
|
22308
22281
|
}
|
|
22309
22282
|
}, genFilledGroupStatusStyle(token, {
|
|
@@ -22929,7 +22902,7 @@ const genSearchInputStyle = token => {
|
|
|
22929
22902
|
[searchPrefixCls]: {
|
|
22930
22903
|
[componentCls]: {
|
|
22931
22904
|
'&:hover, &:focus': {
|
|
22932
|
-
[`+ ${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)`]: {
|
|
22933
22906
|
borderInlineStartColor: token.colorPrimaryHover
|
|
22934
22907
|
}
|
|
22935
22908
|
}
|
|
@@ -22955,7 +22928,7 @@ const genSearchInputStyle = token => {
|
|
|
22955
22928
|
borderEndStartRadius: 0,
|
|
22956
22929
|
boxShadow: 'none'
|
|
22957
22930
|
},
|
|
22958
|
-
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
|
|
22931
|
+
[`${searchPrefixCls}-button:not(${antCls}-btn-color-primary)`]: {
|
|
22959
22932
|
color: token.colorTextDescription,
|
|
22960
22933
|
'&:hover': {
|
|
22961
22934
|
color: token.colorPrimaryHover
|
|
@@ -22964,10 +22937,7 @@ const genSearchInputStyle = token => {
|
|
|
22964
22937
|
color: token.colorPrimaryActive
|
|
22965
22938
|
},
|
|
22966
22939
|
[`&${antCls}-btn-loading::before`]: {
|
|
22967
|
-
|
|
22968
|
-
insetInlineEnd: 0,
|
|
22969
|
-
insetBlockStart: 0,
|
|
22970
|
-
insetBlockEnd: 0
|
|
22940
|
+
inset: 0
|
|
22971
22941
|
}
|
|
22972
22942
|
}
|
|
22973
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",
|