gm-antd 1.3.3-beta.11 → 1.3.3-beta.13
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/compat/Drawer.d.ts +1 -1
- package/dist/compat/Dropdown.d.ts +1 -1
- package/dist/compat/Input.d.ts +1 -8
- package/dist/compat/Input.d.ts.map +1 -1
- package/dist/compat/Menu.d.ts +1 -8
- package/dist/compat/Menu.d.ts.map +1 -1
- package/dist/compat/Modal.d.ts +1 -1
- package/dist/compat/Popconfirm.d.ts +1 -1
- package/dist/compat/Popover.d.ts +1 -1
- package/dist/compat/Select.d.ts +2 -11
- package/dist/compat/Select.d.ts.map +1 -1
- package/dist/compat/Tabs.d.ts +1 -5
- package/dist/compat/Tabs.d.ts.map +1 -1
- package/dist/compat/Tooltip.d.ts +1 -1
- package/dist/compat/withCompat.d.ts +1 -1
- package/dist/compat/withCompat.d.ts.map +1 -1
- package/dist/index.css +12 -4
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +375 -54
- package/dist/index.js.map +1 -1
- package/dist/select/DropdownRender.d.ts +2 -1
- package/dist/select/DropdownRender.d.ts.map +1 -1
- package/dist/select/styles.d.ts.map +1 -1
- package/dist/styles/global.d.ts +2 -2
- package/dist/styles/global.d.ts.map +1 -1
- package/dist/styles/theme.d.ts +56 -9
- package/dist/styles/theme.d.ts.map +1 -1
- package/dist/table-filter/index.d.ts.map +1 -1
- package/es/checkbox/Group.d.ts +2 -1
- package/es/checkbox/Group.js +1 -0
- package/es/collapse/CollapsePanel.d.ts +2 -1
- package/es/collapse/CollapsePanel.js +1 -0
- package/es/date-picker/locale/zh_CN.d.ts +2 -0
- package/es/date-picker/locale/zh_CN.js +2 -0
- package/es/form/Form.d.ts +9 -0
- package/es/form/Form.js +9 -0
- package/es/form/FormItem.d.ts +2 -1
- package/es/form/FormItem.js +1 -0
- package/es/form/FormList.d.ts +2 -1
- package/es/form/FormList.js +1 -0
- package/es/form/FormProvider.d.ts +2 -1
- package/es/form/FormProvider.js +1 -0
- package/es/form/hooks/useFormInstance.d.ts +4 -2
- package/es/form/hooks/useFormInstance.js +3 -2
- package/es/input/Password.d.ts +2 -1
- package/es/input/Password.js +1 -0
- package/es/input/Search.d.ts +2 -1
- package/es/input/Search.js +1 -0
- package/es/input/TextArea.d.ts +2 -1
- package/es/input/TextArea.js +1 -0
- package/es/layout/layout.d.ts +5 -1
- package/es/layout/layout.js +5 -1
- package/es/locale/zh_CN.d.ts +1 -0
- package/es/locale/zh_CN.js +1 -0
- package/es/modal.d.ts +5 -0
- package/es/modal.js +5 -0
- package/es/style/reset_component.less +1 -0
- package/es/style/reset_theme.less +1 -0
- package/es/table/Table.d.ts +1 -0
- package/es/table/Table.js +1 -0
- package/es/table/hooks/useTableDIY.d.ts +4 -2
- package/es/table/hooks/useTableDIY.js +3 -2
- package/es/table/hooks/useTableExpandable.d.ts +4 -2
- package/es/table/hooks/useTableExpandable.js +3 -2
- package/es/table/hooks/useTableResizable.d.ts +4 -2
- package/es/table/hooks/useTableResizable.js +3 -2
- package/es/table/hooks/useTableSelection/BatchActions.d.ts +5 -0
- package/es/table/hooks/useTableSelection/BatchActions.js +5 -0
- package/es/table/hooks/useTableSelection.d.ts +4 -2
- package/es/table/hooks/useTableSelection.js +3 -2
- package/es/table/hooks/useTableTheme.d.ts +4 -2
- package/es/table/hooks/useTableTheme.js +3 -2
- package/es/table/hooks/useTableVirtual.d.ts +4 -2
- package/es/table/hooks/useTableVirtual.js +3 -2
- package/es/typography/Link.d.ts +2 -1
- package/es/typography/Link.js +1 -0
- package/es/typography/Paragraph.d.ts +2 -1
- package/es/typography/Paragraph.js +1 -0
- package/es/typography/Text.d.ts +2 -1
- package/es/typography/Text.js +1 -0
- package/es/typography/Title.d.ts +2 -1
- package/es/typography/Title.js +1 -0
- package/es/upload/Dragger.d.ts +2 -1
- package/es/upload/Dragger.js +1 -0
- package/lib/checkbox/Group.d.ts +2 -1
- package/lib/checkbox/Group.js +1 -1
- package/lib/collapse/CollapsePanel.d.ts +2 -1
- package/lib/collapse/CollapsePanel.js +1 -1
- package/lib/date-picker/locale/zh_CN.d.ts +2 -0
- package/lib/date-picker/locale/zh_CN.js +5 -0
- package/lib/form/Form.d.ts +9 -0
- package/lib/form/Form.js +11 -0
- package/lib/form/FormItem.d.ts +2 -1
- package/lib/form/FormItem.js +1 -1
- package/lib/form/FormList.d.ts +2 -1
- package/lib/form/FormList.js +1 -1
- package/lib/form/FormProvider.d.ts +2 -1
- package/lib/form/FormProvider.js +1 -1
- package/lib/form/hooks/useFormInstance.d.ts +4 -2
- package/lib/form/hooks/useFormInstance.js +5 -2
- package/lib/input/Password.d.ts +2 -1
- package/lib/input/Password.js +1 -1
- package/lib/input/Search.d.ts +2 -1
- package/lib/input/Search.js +1 -1
- package/lib/input/TextArea.d.ts +2 -1
- package/lib/input/TextArea.js +1 -1
- package/lib/layout/layout.d.ts +5 -1
- package/lib/layout/layout.js +5 -2
- package/lib/locale/zh_CN.d.ts +1 -0
- package/lib/locale/zh_CN.js +1 -1
- package/lib/modal.d.ts +5 -0
- package/lib/modal.js +7 -0
- package/lib/style/reset_component.less +1 -0
- package/lib/style/reset_theme.less +1 -0
- package/lib/table/Table.d.ts +1 -0
- package/lib/table/Table.js +1 -1
- package/lib/table/hooks/useTableDIY.d.ts +4 -2
- package/lib/table/hooks/useTableDIY.js +5 -2
- package/lib/table/hooks/useTableExpandable.d.ts +4 -2
- package/lib/table/hooks/useTableExpandable.js +5 -2
- package/lib/table/hooks/useTableResizable.d.ts +4 -2
- package/lib/table/hooks/useTableResizable.js +5 -2
- package/lib/table/hooks/useTableSelection/BatchActions.d.ts +5 -0
- package/lib/table/hooks/useTableSelection/BatchActions.js +7 -0
- package/lib/table/hooks/useTableSelection.d.ts +4 -2
- package/lib/table/hooks/useTableSelection.js +5 -2
- package/lib/table/hooks/useTableTheme.d.ts +4 -2
- package/lib/table/hooks/useTableTheme.js +5 -2
- package/lib/table/hooks/useTableVirtual.d.ts +4 -2
- package/lib/table/hooks/useTableVirtual.js +5 -2
- package/lib/typography/Link.d.ts +2 -1
- package/lib/typography/Link.js +1 -1
- package/lib/typography/Paragraph.d.ts +2 -1
- package/lib/typography/Paragraph.js +1 -1
- package/lib/typography/Text.d.ts +2 -1
- package/lib/typography/Text.js +1 -1
- package/lib/typography/Title.d.ts +2 -1
- package/lib/typography/Title.js +1 -1
- package/lib/upload/Dragger.d.ts +2 -1
- package/lib/upload/Dragger.js +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -105,6 +105,7 @@ function withCompat(Component4, options) {
|
|
|
105
105
|
const compatProps = applyCompatProps(props, options);
|
|
106
106
|
return React28__default.default.createElement(Component4, __spreadProps(__spreadValues({}, compatProps), { ref }));
|
|
107
107
|
});
|
|
108
|
+
Object.assign(Wrapped, Component4);
|
|
108
109
|
Wrapped.displayName = `withCompat(${Component4.displayName || Component4.name || "Component"})`;
|
|
109
110
|
return Wrapped;
|
|
110
111
|
}
|
|
@@ -184,11 +185,19 @@ function withBaseSelectCompat(Component4) {
|
|
|
184
185
|
|
|
185
186
|
// src/compat/Input.tsx
|
|
186
187
|
var Input = React28__default.default.forwardRef((props, ref) => /* @__PURE__ */ React28__default.default.createElement(antd.Input, __spreadValues({ ref }, applyCompatProps(props, { transform: transformBordered }))));
|
|
188
|
+
var Compact = antd.Space.Compact;
|
|
187
189
|
Input.displayName = "GmInput";
|
|
188
190
|
Input.TextArea = antd.Input.TextArea;
|
|
189
191
|
Input.Search = antd.Input.Search;
|
|
190
192
|
Input.Password = antd.Input.Password;
|
|
191
|
-
|
|
193
|
+
var Group = React28__default.default.forwardRef(
|
|
194
|
+
(_a, ref) => {
|
|
195
|
+
var _b = _a, { compact } = _b, rest = __objRest(_b, ["compact"]);
|
|
196
|
+
return /* @__PURE__ */ React28__default.default.createElement(Compact, __spreadValues({ ref }, rest));
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
Group.displayName = "Group";
|
|
200
|
+
Input.Group = Group;
|
|
192
201
|
var Input_default = Input;
|
|
193
202
|
var InputNumber = React28__default.default.forwardRef((props, ref) => /* @__PURE__ */ React28__default.default.createElement(antd.InputNumber, __spreadValues({ ref }, applyCompatProps(props, { transform: transformBordered }))));
|
|
194
203
|
InputNumber.displayName = "GmInputNumber";
|
|
@@ -219,16 +228,16 @@ function useSelectAll({
|
|
|
219
228
|
const flattenOptions = React28.useMemo(() => {
|
|
220
229
|
const result = [];
|
|
221
230
|
if (!options) return result;
|
|
222
|
-
const
|
|
231
|
+
const process = (opts) => {
|
|
223
232
|
for (const opt of opts) {
|
|
224
233
|
if (opt[optionsFieldName] && Array.isArray(opt[optionsFieldName])) {
|
|
225
|
-
|
|
234
|
+
process(opt[optionsFieldName]);
|
|
226
235
|
} else if (opt[valueFieldName] !== void 0) {
|
|
227
236
|
result.push(opt);
|
|
228
237
|
}
|
|
229
238
|
}
|
|
230
239
|
};
|
|
231
|
-
|
|
240
|
+
process(options);
|
|
232
241
|
return result;
|
|
233
242
|
}, [options, optionsFieldName, valueFieldName]);
|
|
234
243
|
const availableValues = React28.useMemo(
|
|
@@ -349,7 +358,9 @@ var dropdownItemStyle = (isSelected, isDisabled) => __spreadValues(__spreadValue
|
|
|
349
358
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
350
359
|
borderRadius: 4,
|
|
351
360
|
transition: "background-color 0.2s"
|
|
352
|
-
}, isSelected && {
|
|
361
|
+
}, isSelected && {
|
|
362
|
+
color: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))"
|
|
363
|
+
}), isDisabled && { opacity: 0.5 });
|
|
353
364
|
var dropdownItemLabelStyle = {
|
|
354
365
|
flex: 1,
|
|
355
366
|
fontSize: 14,
|
|
@@ -358,7 +369,7 @@ var dropdownItemLabelStyle = {
|
|
|
358
369
|
textOverflow: "ellipsis"
|
|
359
370
|
};
|
|
360
371
|
var checkIconStyle = {
|
|
361
|
-
color: "var(--ant-color-primary)",
|
|
372
|
+
color: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))",
|
|
362
373
|
fontSize: 14,
|
|
363
374
|
marginRight: 8
|
|
364
375
|
};
|
|
@@ -379,13 +390,14 @@ function DropdownRender({
|
|
|
379
390
|
options,
|
|
380
391
|
mode,
|
|
381
392
|
fieldNames,
|
|
393
|
+
searchValue = "",
|
|
382
394
|
isRenderDefaultBottom = true,
|
|
383
395
|
isShowCheckedAll = true,
|
|
384
396
|
isShowDeletedSwitch = false,
|
|
385
397
|
children,
|
|
386
|
-
optionFilterProp
|
|
398
|
+
optionFilterProp,
|
|
399
|
+
filterOption
|
|
387
400
|
}) {
|
|
388
|
-
const [searchValue, setSearchValue] = React28.useState("");
|
|
389
401
|
const isMultiple = mode === "multiple" || mode === "tags";
|
|
390
402
|
const labelFieldName = (fieldNames == null ? void 0 : fieldNames.label) || "label";
|
|
391
403
|
const valueFieldName = (fieldNames == null ? void 0 : fieldNames.value) || "value";
|
|
@@ -395,10 +407,41 @@ function DropdownRender({
|
|
|
395
407
|
isShowDeletedSwitch,
|
|
396
408
|
fieldNames
|
|
397
409
|
});
|
|
410
|
+
const searchedOptions = React28.useMemo(() => {
|
|
411
|
+
if (!filteredOptions || !searchValue) return filteredOptions;
|
|
412
|
+
const lowerSearchValue = String(searchValue).toLowerCase();
|
|
413
|
+
const matchOption = (option) => {
|
|
414
|
+
var _a, _b;
|
|
415
|
+
if (typeof filterOption === "function") {
|
|
416
|
+
return filterOption(searchValue, option);
|
|
417
|
+
}
|
|
418
|
+
const searchFieldName = optionFilterProp || labelFieldName;
|
|
419
|
+
const target = (_b = (_a = option[searchFieldName]) != null ? _a : option[labelFieldName]) != null ? _b : option[valueFieldName];
|
|
420
|
+
if (typeof target === "string" || typeof target === "number") {
|
|
421
|
+
return String(target).toLowerCase().includes(lowerSearchValue);
|
|
422
|
+
}
|
|
423
|
+
return false;
|
|
424
|
+
};
|
|
425
|
+
return filteredOptions.map((option) => {
|
|
426
|
+
if (option[optionsFieldName] && Array.isArray(option[optionsFieldName])) {
|
|
427
|
+
const childrenOptions = option[optionsFieldName].filter(matchOption);
|
|
428
|
+
return childrenOptions.length ? __spreadProps(__spreadValues({}, option), { [optionsFieldName]: childrenOptions }) : null;
|
|
429
|
+
}
|
|
430
|
+
return matchOption(option) ? option : null;
|
|
431
|
+
}).filter(Boolean);
|
|
432
|
+
}, [
|
|
433
|
+
filterOption,
|
|
434
|
+
filteredOptions,
|
|
435
|
+
labelFieldName,
|
|
436
|
+
optionFilterProp,
|
|
437
|
+
optionsFieldName,
|
|
438
|
+
searchValue,
|
|
439
|
+
valueFieldName
|
|
440
|
+
]);
|
|
398
441
|
const { isAllSelected, canSelectCount, handleSelectAll, flattenOptions } = useSelectAll({
|
|
399
442
|
value,
|
|
400
443
|
onChange,
|
|
401
|
-
options:
|
|
444
|
+
options: searchedOptions,
|
|
402
445
|
mode,
|
|
403
446
|
fieldNames});
|
|
404
447
|
const valueArray = React28.useMemo(
|
|
@@ -406,22 +449,22 @@ function DropdownRender({
|
|
|
406
449
|
[value]
|
|
407
450
|
);
|
|
408
451
|
const selectedOptions = React28.useMemo(() => {
|
|
409
|
-
if (!
|
|
452
|
+
if (!filteredOptions) return [];
|
|
410
453
|
const allFlat = [];
|
|
411
|
-
const
|
|
454
|
+
const process = (opts) => {
|
|
412
455
|
for (const opt of opts) {
|
|
413
456
|
if (opt[optionsFieldName] && Array.isArray(opt[optionsFieldName])) {
|
|
414
|
-
|
|
457
|
+
process(opt[optionsFieldName]);
|
|
415
458
|
} else if (opt[valueFieldName] !== void 0 && valueArray.includes(opt[valueFieldName])) {
|
|
416
459
|
allFlat.push(opt);
|
|
417
460
|
}
|
|
418
461
|
}
|
|
419
462
|
};
|
|
420
|
-
|
|
463
|
+
process(filteredOptions);
|
|
421
464
|
return allFlat;
|
|
422
|
-
}, [
|
|
465
|
+
}, [filteredOptions, valueArray, optionsFieldName, valueFieldName]);
|
|
423
466
|
const unselectedOptions = React28.useMemo(() => {
|
|
424
|
-
if (!
|
|
467
|
+
if (!searchedOptions || searchValue) return searchedOptions;
|
|
425
468
|
const selectedValues = selectedOptions.map((item) => item[valueFieldName]);
|
|
426
469
|
const filterUnselected = (opts) => {
|
|
427
470
|
return opts.map((opt) => {
|
|
@@ -438,8 +481,8 @@ function DropdownRender({
|
|
|
438
481
|
return null;
|
|
439
482
|
}).filter(Boolean);
|
|
440
483
|
};
|
|
441
|
-
return filterUnselected(
|
|
442
|
-
}, [
|
|
484
|
+
return filterUnselected(searchedOptions);
|
|
485
|
+
}, [searchedOptions, searchValue, selectedOptions, valueFieldName, optionsFieldName]);
|
|
443
486
|
const handleItemClick = (itemValue, item) => {
|
|
444
487
|
const isInValue = valueArray.includes(itemValue);
|
|
445
488
|
let newValue;
|
|
@@ -520,6 +563,42 @@ function DropdownRender({
|
|
|
520
563
|
}
|
|
521
564
|
|
|
522
565
|
// src/compat/Select.tsx
|
|
566
|
+
function getSelectChildName(node) {
|
|
567
|
+
if (!React28__default.default.isValidElement(node)) return void 0;
|
|
568
|
+
const type = node.type;
|
|
569
|
+
return type == null ? void 0 : type.displayName;
|
|
570
|
+
}
|
|
571
|
+
function normalizeReactKey(key) {
|
|
572
|
+
if (key == null) return void 0;
|
|
573
|
+
const keyString = String(key);
|
|
574
|
+
if (keyString.startsWith(".$")) return keyString.slice(2);
|
|
575
|
+
if (keyString.startsWith(".")) return keyString.slice(1);
|
|
576
|
+
return keyString;
|
|
577
|
+
}
|
|
578
|
+
function selectChildrenToOptions(children) {
|
|
579
|
+
if (children == null) return void 0;
|
|
580
|
+
const nodes = React28__default.default.Children.toArray(children).filter(React28__default.default.isValidElement);
|
|
581
|
+
if (!nodes.length) return void 0;
|
|
582
|
+
return nodes.map((node) => {
|
|
583
|
+
const { key, props } = node;
|
|
584
|
+
const _a = props, { children: labelNode, label, value, disabled } = _a, rest = __objRest(_a, ["children", "label", "value", "disabled"]);
|
|
585
|
+
const childName = getSelectChildName(node);
|
|
586
|
+
const normalizedKey = normalizeReactKey(key);
|
|
587
|
+
if (childName === "OptGroup") {
|
|
588
|
+
return __spreadValues({
|
|
589
|
+
key: normalizedKey,
|
|
590
|
+
label,
|
|
591
|
+
options: selectChildrenToOptions(labelNode) || []
|
|
592
|
+
}, rest);
|
|
593
|
+
}
|
|
594
|
+
return __spreadValues({
|
|
595
|
+
key: normalizedKey,
|
|
596
|
+
value: value !== void 0 ? value : normalizedKey,
|
|
597
|
+
label: label !== void 0 ? label : labelNode,
|
|
598
|
+
disabled
|
|
599
|
+
}, rest);
|
|
600
|
+
});
|
|
601
|
+
}
|
|
523
602
|
function GmSelectInner(props, ref) {
|
|
524
603
|
const renamed = applyCompatProps(props, {
|
|
525
604
|
rename: BASE_SELECT_RENAME,
|
|
@@ -555,11 +634,14 @@ function GmSelectInner(props, ref) {
|
|
|
555
634
|
"optionFilterProp",
|
|
556
635
|
"filterOption"
|
|
557
636
|
]);
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
637
|
+
const [searchValue, setSearchValue] = React28__default.default.useState("");
|
|
638
|
+
const mergedOptions = options || selectChildrenToOptions(children);
|
|
561
639
|
const isMultiple = mode === "multiple" || mode === "tags";
|
|
562
|
-
const useCustomRender = isMultiple && isRenderDefaultBottom &&
|
|
640
|
+
const useCustomRender = isMultiple && isRenderDefaultBottom && optionFilterProp !== "label" && !!mergedOptions;
|
|
641
|
+
const handleSearch = (nextSearchValue) => {
|
|
642
|
+
setSearchValue(nextSearchValue);
|
|
643
|
+
onSearch == null ? void 0 : onSearch(nextSearchValue);
|
|
644
|
+
};
|
|
563
645
|
const mergedPopupRender = (menu) => {
|
|
564
646
|
if (!useCustomRender) {
|
|
565
647
|
return customPopupRender ? customPopupRender(menu) : menu;
|
|
@@ -570,9 +652,12 @@ function GmSelectInner(props, ref) {
|
|
|
570
652
|
menu,
|
|
571
653
|
value,
|
|
572
654
|
onChange,
|
|
573
|
-
options,
|
|
655
|
+
options: mergedOptions,
|
|
574
656
|
mode,
|
|
575
657
|
fieldNames,
|
|
658
|
+
searchValue,
|
|
659
|
+
optionFilterProp,
|
|
660
|
+
filterOption,
|
|
576
661
|
isRenderDefaultBottom,
|
|
577
662
|
isShowCheckedAll,
|
|
578
663
|
isShowDeletedSwitch
|
|
@@ -587,18 +672,23 @@ function GmSelectInner(props, ref) {
|
|
|
587
672
|
value,
|
|
588
673
|
onChange,
|
|
589
674
|
mode,
|
|
590
|
-
options,
|
|
675
|
+
options: mergedOptions,
|
|
591
676
|
fieldNames,
|
|
592
677
|
popupRender: mergedPopupRender,
|
|
593
678
|
showSearch: true,
|
|
594
|
-
onSearch,
|
|
679
|
+
onSearch: handleSearch,
|
|
595
680
|
filterOption: useCustomRender ? false : filterOption
|
|
596
681
|
})
|
|
597
682
|
);
|
|
598
683
|
}
|
|
599
684
|
var ForwardedSelect = React28__default.default.forwardRef(GmSelectInner);
|
|
600
|
-
|
|
601
|
-
|
|
685
|
+
var _optMarker = (name) => {
|
|
686
|
+
const fn = (() => null);
|
|
687
|
+
fn.displayName = name;
|
|
688
|
+
return fn;
|
|
689
|
+
};
|
|
690
|
+
ForwardedSelect.Option = _optMarker("Option");
|
|
691
|
+
ForwardedSelect.OptGroup = _optMarker("OptGroup");
|
|
602
692
|
ForwardedSelect.displayName = "GmSelect";
|
|
603
693
|
var Select_default = ForwardedSelect;
|
|
604
694
|
antd.message.warn = antd.message.warning;
|
|
@@ -659,7 +749,9 @@ var CompatTabs = React28__default.default.forwardRef((props, ref) => {
|
|
|
659
749
|
}
|
|
660
750
|
return /* @__PURE__ */ React28__default.default.createElement(antd.Tabs, __spreadValues({ ref }, rest), children);
|
|
661
751
|
});
|
|
662
|
-
|
|
752
|
+
var _tabPaneMarker = (() => null);
|
|
753
|
+
_tabPaneMarker.displayName = "TabPane";
|
|
754
|
+
CompatTabs.TabPane = _tabPaneMarker;
|
|
663
755
|
CompatTabs.displayName = "GmTabs";
|
|
664
756
|
var Tabs_default = CompatTabs;
|
|
665
757
|
var CompatMenu = React28__default.default.forwardRef((props, ref) => {
|
|
@@ -670,10 +762,15 @@ var CompatMenu = React28__default.default.forwardRef((props, ref) => {
|
|
|
670
762
|
}
|
|
671
763
|
return /* @__PURE__ */ React28__default.default.createElement(antd.Menu, __spreadValues({ ref }, rest));
|
|
672
764
|
});
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
765
|
+
var _menuItemMarker = (name) => {
|
|
766
|
+
const fn = ((props) => null);
|
|
767
|
+
fn.displayName = name;
|
|
768
|
+
return fn;
|
|
769
|
+
};
|
|
770
|
+
CompatMenu.Item = _menuItemMarker("MenuItem");
|
|
771
|
+
CompatMenu.SubMenu = _menuItemMarker("SubMenu");
|
|
772
|
+
CompatMenu.ItemGroup = _menuItemMarker("MenuGroup");
|
|
773
|
+
CompatMenu.Divider = _menuItemMarker("MenuDivider");
|
|
677
774
|
CompatMenu.displayName = "GmMenu";
|
|
678
775
|
var Menu_default = CompatMenu;
|
|
679
776
|
dayjs2__default.default.extend(utc__default.default);
|
|
@@ -783,7 +880,7 @@ var DatePicker_default = DatePicker;
|
|
|
783
880
|
var secondButtonStyle = {
|
|
784
881
|
// 加 fallback: gmTheme 关闭了 cssVar(见 styles/theme.ts), 不加 fallback 时
|
|
785
882
|
// var(--ant-color-primary) 解析为空 → 文字回退成黑色(second 型按钮文字变黑)。
|
|
786
|
-
color: "var(--ant-color-primary, #0363ff)",
|
|
883
|
+
color: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))",
|
|
787
884
|
backgroundColor: "#f2f3f4",
|
|
788
885
|
borderStyle: "none"
|
|
789
886
|
};
|
|
@@ -2551,8 +2648,8 @@ function Component3(options) {
|
|
|
2551
2648
|
justifyContent: "center",
|
|
2552
2649
|
width: 34,
|
|
2553
2650
|
height: 34,
|
|
2554
|
-
color: showSetting ? "var(--ant-color-primary)" : "rgb(113, 113, 112)",
|
|
2555
|
-
border: `1px solid ${showSetting ? "var(--ant-color-primary)" : "#d6d6d6"}`,
|
|
2651
|
+
color: showSetting ? "var(--ant-color-primary, var(--gm-color-primary, #0363ff))" : "rgb(113, 113, 112)",
|
|
2652
|
+
border: `1px solid ${showSetting ? "var(--ant-color-primary, var(--gm-color-primary, #0363ff))" : "#d6d6d6"}`,
|
|
2556
2653
|
borderRadius: 4,
|
|
2557
2654
|
cursor: "pointer"
|
|
2558
2655
|
},
|
|
@@ -2609,7 +2706,7 @@ Component3.get = (id) => {
|
|
|
2609
2706
|
};
|
|
2610
2707
|
var TableFilter = mobxReact.observer(Component3);
|
|
2611
2708
|
var table_filter_default = TableFilter;
|
|
2612
|
-
var InfoField = ({ className, style, label, value }) => /* @__PURE__ */ React28__default.default.createElement("div", { className: classNames14__default.default(className), style: __spreadProps(__spreadValues({}, style), { fontSize: 14 }) }, /* @__PURE__ */ React28__default.default.createElement("span", { style: { marginRight: 10, color: "black", fontWeight: "bold" } }, label), /* @__PURE__ */ React28__default.default.createElement("span", { style: { color: "var(--ant-color-primary)" } }, value));
|
|
2709
|
+
var InfoField = ({ className, style, label, value }) => /* @__PURE__ */ React28__default.default.createElement("div", { className: classNames14__default.default(className), style: __spreadProps(__spreadValues({}, style), { fontSize: 14 }) }, /* @__PURE__ */ React28__default.default.createElement("span", { style: { marginRight: 10, color: "black", fontWeight: "bold" } }, label), /* @__PURE__ */ React28__default.default.createElement("span", { style: { color: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))" } }, value));
|
|
2613
2710
|
var InfoField_default = InfoField;
|
|
2614
2711
|
|
|
2615
2712
|
// src/table-pagination/index.tsx
|
|
@@ -2973,7 +3070,7 @@ var DiyPanel = ({
|
|
|
2973
3070
|
style: {
|
|
2974
3071
|
display: "inline-block",
|
|
2975
3072
|
width: 3,
|
|
2976
|
-
background: "var(--ant-color-primary)",
|
|
3073
|
+
background: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))",
|
|
2977
3074
|
height: 18,
|
|
2978
3075
|
marginRight: 5
|
|
2979
3076
|
}
|
|
@@ -3316,7 +3413,7 @@ var TableBatchActions = (_a) => {
|
|
|
3316
3413
|
},
|
|
3317
3414
|
tableLocale == null ? void 0 : tableLocale.selectAllPages
|
|
3318
3415
|
),
|
|
3319
|
-
selectedRowKeys.length > 0 && /* @__PURE__ */ React28__default.default.createElement(React28__default.default.Fragment, null, /* @__PURE__ */ React28__default.default.createElement(antd.Divider, { type: "vertical" }), /* @__PURE__ */ React28__default.default.createElement(antd.Space, null, /* @__PURE__ */ React28__default.default.createElement("div", null, tableLocale == null ? void 0 : tableLocale.selected, /* @__PURE__ */ React28__default.default.createElement("span", { style: { color: "var(--ant-color-primary)" } }, isSelectedTotal ? totalCount : selectedRowKeys.length, " "), tableLocale == null ? void 0 : tableLocale.project))),
|
|
3416
|
+
selectedRowKeys.length > 0 && /* @__PURE__ */ React28__default.default.createElement(React28__default.default.Fragment, null, /* @__PURE__ */ React28__default.default.createElement(antd.Divider, { type: "vertical" }), /* @__PURE__ */ React28__default.default.createElement(antd.Space, null, /* @__PURE__ */ React28__default.default.createElement("div", null, tableLocale == null ? void 0 : tableLocale.selected, /* @__PURE__ */ React28__default.default.createElement("span", { style: { color: "var(--ant-color-primary, var(--gm-color-primary, #0363ff))" } }, isSelectedTotal ? totalCount : selectedRowKeys.length, " "), tableLocale == null ? void 0 : tableLocale.project))),
|
|
3320
3417
|
children && /* @__PURE__ */ React28__default.default.createElement(antd.Divider, { type: "vertical" }),
|
|
3321
3418
|
/* @__PURE__ */ React28__default.default.createElement("div", { style: { zIndex: 10, display: "flex", flex: 1, gap: 8, alignItems: "center" } }, children)
|
|
3322
3419
|
)
|
|
@@ -3980,22 +4077,190 @@ var useTable = (options) => {
|
|
|
3980
4077
|
var useTable_default = useTable;
|
|
3981
4078
|
|
|
3982
4079
|
// src/styles/theme.ts
|
|
4080
|
+
var gmThemeColors = {
|
|
4081
|
+
primary: "#0363ff",
|
|
4082
|
+
primaryHover: "#0363ff",
|
|
4083
|
+
primaryActive: "#004fcf",
|
|
4084
|
+
primaryOutline: "rgba(3, 99, 255, 0.2)",
|
|
4085
|
+
primaryOutlineLight: "rgba(3, 99, 255, 0.12)",
|
|
4086
|
+
primaryBg: "#b2d5ff",
|
|
4087
|
+
primaryBgLight: "#d7e8fc",
|
|
4088
|
+
primaryBgMoreLight: "#edf3f9",
|
|
4089
|
+
success: "#52c41a",
|
|
4090
|
+
successActive: "#3f9714",
|
|
4091
|
+
successOutline: "rgba(82, 196, 26, 0.2)",
|
|
4092
|
+
successBg: "#f6ffed",
|
|
4093
|
+
error: "#f5222d",
|
|
4094
|
+
errorActive: "#da0a15",
|
|
4095
|
+
errorOutline: "rgba(245, 34, 45, 0.2)",
|
|
4096
|
+
errorBg: "#fef1f1",
|
|
4097
|
+
dangerBg: "#fa5151",
|
|
4098
|
+
dangerActive: "#f91f1f",
|
|
4099
|
+
warning: "#faad14",
|
|
4100
|
+
warningActive: "#d69005",
|
|
4101
|
+
warningOutline: "rgba(250, 173, 20, 0.2)",
|
|
4102
|
+
warningBg: "#fef5eb",
|
|
4103
|
+
infoBg: "#edf3f9",
|
|
4104
|
+
disabled: "rgba(0, 0, 0, 0.5)"
|
|
4105
|
+
};
|
|
3983
4106
|
var gmTheme = {
|
|
3984
4107
|
token: {
|
|
3985
|
-
colorPrimary:
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
4108
|
+
colorPrimary: gmThemeColors.primary,
|
|
4109
|
+
colorPrimaryHover: gmThemeColors.primaryHover,
|
|
4110
|
+
colorPrimaryActive: gmThemeColors.primaryActive,
|
|
4111
|
+
colorPrimaryBg: gmThemeColors.primaryBg,
|
|
4112
|
+
colorPrimaryBgHover: gmThemeColors.primaryBgLight,
|
|
4113
|
+
colorPrimaryBorder: gmThemeColors.primary,
|
|
4114
|
+
colorPrimaryBorderHover: gmThemeColors.primaryHover,
|
|
4115
|
+
colorPrimaryText: gmThemeColors.primary,
|
|
4116
|
+
colorPrimaryTextHover: gmThemeColors.primaryHover,
|
|
4117
|
+
colorPrimaryTextActive: gmThemeColors.primaryActive,
|
|
4118
|
+
colorLink: gmThemeColors.primary,
|
|
4119
|
+
colorLinkHover: gmThemeColors.primaryHover,
|
|
4120
|
+
colorLinkActive: gmThemeColors.primaryActive,
|
|
4121
|
+
colorSuccess: gmThemeColors.success,
|
|
4122
|
+
colorSuccessHover: gmThemeColors.success,
|
|
4123
|
+
colorSuccessActive: gmThemeColors.successActive,
|
|
4124
|
+
colorSuccessBg: gmThemeColors.successBg,
|
|
4125
|
+
colorSuccessBorder: gmThemeColors.success,
|
|
4126
|
+
colorWarning: gmThemeColors.warning,
|
|
4127
|
+
colorWarningHover: gmThemeColors.warning,
|
|
4128
|
+
colorWarningActive: gmThemeColors.warningActive,
|
|
4129
|
+
colorWarningBg: gmThemeColors.warningBg,
|
|
4130
|
+
colorWarningBorder: gmThemeColors.warning,
|
|
4131
|
+
colorError: gmThemeColors.error,
|
|
4132
|
+
colorErrorHover: gmThemeColors.error,
|
|
4133
|
+
colorErrorActive: gmThemeColors.errorActive,
|
|
4134
|
+
colorErrorBg: gmThemeColors.errorBg,
|
|
4135
|
+
colorErrorBorder: gmThemeColors.error,
|
|
4136
|
+
colorInfo: gmThemeColors.primary,
|
|
4137
|
+
colorInfoBg: gmThemeColors.infoBg,
|
|
4138
|
+
colorInfoBorder: gmThemeColors.primary,
|
|
4139
|
+
controlOutline: gmThemeColors.primaryOutline,
|
|
4140
|
+
colorWarningOutline: gmThemeColors.warningOutline,
|
|
4141
|
+
colorErrorOutline: gmThemeColors.errorOutline,
|
|
4142
|
+
colorBorder: "#d9d9d9",
|
|
4143
|
+
colorFillQuaternary: "#f5f5f5",
|
|
4144
|
+
colorTextDisabled: gmThemeColors.disabled,
|
|
4145
|
+
borderRadius: 4
|
|
4146
|
+
},
|
|
4147
|
+
components: {
|
|
4148
|
+
Modal: {
|
|
4149
|
+
borderRadiusLG: 8
|
|
4150
|
+
},
|
|
4151
|
+
// 恢复 antd4 Table 行高: antd5 Table 默认 middle size, 用 cellPaddingBlockMD/InlineMD(非 cellPaddingBlock)
|
|
4152
|
+
Table: {
|
|
4153
|
+
headerBg: "#fafafa",
|
|
4154
|
+
headerColor: "#1f1f1f",
|
|
4155
|
+
rowHoverBg: "#f5f5f5",
|
|
4156
|
+
rowSelectedBg: gmThemeColors.primaryBg,
|
|
4157
|
+
rowSelectedHoverBg: gmThemeColors.primaryBg,
|
|
4158
|
+
cellPaddingBlock: 16,
|
|
4159
|
+
cellPaddingBlockMD: 16,
|
|
4160
|
+
cellPaddingInline: 16,
|
|
4161
|
+
cellPaddingInlineMD: 16
|
|
4162
|
+
}
|
|
3990
4163
|
}
|
|
3991
4164
|
// 不开 cssVar: 在部分消费方(React17 + ConfigProvider)环境下 cssVar 注入不完整,
|
|
3992
4165
|
// 导致 border-color 等 var(--ant-color-border) 解析为空 → 边框透明。
|
|
3993
|
-
// 用默认 cssinjs 直接色值更稳。global.ts
|
|
4166
|
+
// 用默认 cssinjs 直接色值更稳。global.ts 会补齐 GM/antd 变量桥接。
|
|
3994
4167
|
};
|
|
3995
4168
|
var theme_default = gmTheme;
|
|
3996
4169
|
var globalCSS = `
|
|
3997
4170
|
/* GM global component overrides - replaces reset_component.less */
|
|
3998
4171
|
|
|
4172
|
+
/* GM theme variable bridge for legacy antd4-style CSS vars and antd5 token vars. */
|
|
4173
|
+
:root,
|
|
4174
|
+
html {
|
|
4175
|
+
--gm-color-primary: ${gmThemeColors.primary};
|
|
4176
|
+
--gm-color-bg-primary: ${gmThemeColors.primary};
|
|
4177
|
+
--gm-color-bg-primary-light: ${gmThemeColors.primaryBgLight};
|
|
4178
|
+
--gm-color-bg-primary-more-light: ${gmThemeColors.primaryBgMoreLight};
|
|
4179
|
+
--gm-color-primary-active: ${gmThemeColors.primaryActive};
|
|
4180
|
+
--gm-color-bg-primary-active: ${gmThemeColors.primaryActive};
|
|
4181
|
+
--gm-color-border-primary: ${gmThemeColors.primary};
|
|
4182
|
+
--gm-color-table-td-active: ${gmThemeColors.primaryBg};
|
|
4183
|
+
--gm-color-success: ${gmThemeColors.success};
|
|
4184
|
+
--gm-color-danger: ${gmThemeColors.error};
|
|
4185
|
+
--gm-color-link: ${gmThemeColors.primary};
|
|
4186
|
+
--gm-color-bg-success: ${gmThemeColors.success};
|
|
4187
|
+
--gm-color-bg-danger: ${gmThemeColors.dangerBg};
|
|
4188
|
+
--gm-color-success-active: ${gmThemeColors.successActive};
|
|
4189
|
+
--gm-color-danger-active: ${gmThemeColors.dangerActive};
|
|
4190
|
+
--gm-color-bg-success-active: ${gmThemeColors.successActive};
|
|
4191
|
+
--gm-color-bg-danger-active: ${gmThemeColors.dangerActive};
|
|
4192
|
+
--ant-primary-color: ${gmThemeColors.primary};
|
|
4193
|
+
--ant-primary-color-hover: ${gmThemeColors.primaryHover};
|
|
4194
|
+
--ant-primary-color-active: ${gmThemeColors.primaryActive};
|
|
4195
|
+
--ant-primary-color-outline: ${gmThemeColors.primaryOutline};
|
|
4196
|
+
--ant-primary-1: ${gmThemeColors.primaryBgMoreLight};
|
|
4197
|
+
--ant-primary-2: ${gmThemeColors.primaryBgLight};
|
|
4198
|
+
--ant-primary-3: ${gmThemeColors.primaryBg};
|
|
4199
|
+
--ant-primary-4: ${gmThemeColors.primary};
|
|
4200
|
+
--ant-primary-5: ${gmThemeColors.primary};
|
|
4201
|
+
--ant-primary-6: ${gmThemeColors.primary};
|
|
4202
|
+
--ant-primary-7: ${gmThemeColors.primaryActive};
|
|
4203
|
+
--ant-primary-color-deprecated-pure: ${gmThemeColors.primaryActive};
|
|
4204
|
+
--ant-primary-color-deprecated-l-35: ${gmThemeColors.primaryBgMoreLight};
|
|
4205
|
+
--ant-primary-color-deprecated-l-20: ${gmThemeColors.primaryBgLight};
|
|
4206
|
+
--ant-primary-color-deprecated-t-20: ${gmThemeColors.primary};
|
|
4207
|
+
--ant-primary-color-deprecated-t-50: ${gmThemeColors.primaryBgLight};
|
|
4208
|
+
--ant-primary-color-deprecated-f-12: ${gmThemeColors.primaryOutlineLight};
|
|
4209
|
+
--ant-primary-color-active-deprecated-f-30: rgba(178, 213, 255, 0.3);
|
|
4210
|
+
--ant-primary-color-active-deprecated-d-02: ${gmThemeColors.primaryBgLight};
|
|
4211
|
+
--ant-success-color: ${gmThemeColors.success};
|
|
4212
|
+
--ant-success-color-hover: ${gmThemeColors.success};
|
|
4213
|
+
--ant-success-color-active: ${gmThemeColors.successActive};
|
|
4214
|
+
--ant-success-color-outline: ${gmThemeColors.successOutline};
|
|
4215
|
+
--ant-success-color-deprecated-bg: ${gmThemeColors.successBg};
|
|
4216
|
+
--ant-success-color-deprecated-border: ${gmThemeColors.success};
|
|
4217
|
+
--ant-error-color: ${gmThemeColors.error};
|
|
4218
|
+
--ant-error-color-hover: ${gmThemeColors.error};
|
|
4219
|
+
--ant-error-color-active: ${gmThemeColors.errorActive};
|
|
4220
|
+
--ant-error-color-outline: ${gmThemeColors.errorOutline};
|
|
4221
|
+
--ant-error-color-deprecated-bg: ${gmThemeColors.errorBg};
|
|
4222
|
+
--ant-error-color-deprecated-border: ${gmThemeColors.error};
|
|
4223
|
+
--ant-warning-color: ${gmThemeColors.warning};
|
|
4224
|
+
--ant-warning-color-hover: ${gmThemeColors.warning};
|
|
4225
|
+
--ant-warning-color-active: ${gmThemeColors.warningActive};
|
|
4226
|
+
--ant-warning-color-outline: ${gmThemeColors.warningOutline};
|
|
4227
|
+
--ant-warning-color-deprecated-bg: ${gmThemeColors.warningBg};
|
|
4228
|
+
--ant-warning-color-deprecated-border: ${gmThemeColors.warning};
|
|
4229
|
+
--ant-info-color: ${gmThemeColors.primary};
|
|
4230
|
+
--ant-info-color-deprecated-bg: ${gmThemeColors.infoBg};
|
|
4231
|
+
--ant-info-color-deprecated-border: ${gmThemeColors.primary};
|
|
4232
|
+
--ant-disabled-color: ${gmThemeColors.disabled};
|
|
4233
|
+
--ant-color-primary: ${gmThemeColors.primary};
|
|
4234
|
+
--ant-color-primary-hover: ${gmThemeColors.primaryHover};
|
|
4235
|
+
--ant-color-primary-active: ${gmThemeColors.primaryActive};
|
|
4236
|
+
--ant-color-primary-bg: ${gmThemeColors.primaryBg};
|
|
4237
|
+
--ant-color-primary-bg-hover: ${gmThemeColors.primaryBgLight};
|
|
4238
|
+
--ant-color-primary-border: ${gmThemeColors.primary};
|
|
4239
|
+
--ant-color-primary-border-hover: ${gmThemeColors.primaryHover};
|
|
4240
|
+
--ant-color-primary-text: ${gmThemeColors.primary};
|
|
4241
|
+
--ant-color-primary-text-hover: ${gmThemeColors.primaryHover};
|
|
4242
|
+
--ant-color-primary-text-active: ${gmThemeColors.primaryActive};
|
|
4243
|
+
--ant-color-link: ${gmThemeColors.primary};
|
|
4244
|
+
--ant-color-link-hover: ${gmThemeColors.primaryHover};
|
|
4245
|
+
--ant-color-link-active: ${gmThemeColors.primaryActive};
|
|
4246
|
+
--ant-color-success: ${gmThemeColors.success};
|
|
4247
|
+
--ant-color-success-bg: ${gmThemeColors.successBg};
|
|
4248
|
+
--ant-color-success-border: ${gmThemeColors.success};
|
|
4249
|
+
--ant-color-warning: ${gmThemeColors.warning};
|
|
4250
|
+
--ant-color-warning-bg: ${gmThemeColors.warningBg};
|
|
4251
|
+
--ant-color-warning-border: ${gmThemeColors.warning};
|
|
4252
|
+
--ant-color-error: ${gmThemeColors.error};
|
|
4253
|
+
--ant-color-error-bg: ${gmThemeColors.errorBg};
|
|
4254
|
+
--ant-color-error-border: ${gmThemeColors.error};
|
|
4255
|
+
--ant-color-info: ${gmThemeColors.primary};
|
|
4256
|
+
--ant-color-info-bg: ${gmThemeColors.infoBg};
|
|
4257
|
+
--ant-color-info-border: ${gmThemeColors.primary};
|
|
4258
|
+
--ant-control-outline: ${gmThemeColors.primaryOutline};
|
|
4259
|
+
--ant-color-border: #d9d9d9;
|
|
4260
|
+
--ant-color-fill-quaternary: #f5f5f5;
|
|
4261
|
+
--ant-color-text-disabled: ${gmThemeColors.disabled};
|
|
4262
|
+
}
|
|
4263
|
+
|
|
3999
4264
|
/* Button: remove shadows */
|
|
4000
4265
|
.ant-btn,
|
|
4001
4266
|
.ant-btn-primary {
|
|
@@ -4010,6 +4275,31 @@ var globalCSS = `
|
|
|
4010
4275
|
color: rgba(0, 0, 0, 0.85);
|
|
4011
4276
|
font-weight: 600;
|
|
4012
4277
|
}
|
|
4278
|
+
.ant-modal .ant-modal-content {
|
|
4279
|
+
padding: 0;
|
|
4280
|
+
overflow: hidden;
|
|
4281
|
+
border-radius: 8px;
|
|
4282
|
+
}
|
|
4283
|
+
.ant-modal .ant-modal-header {
|
|
4284
|
+
padding: 16px 24px;
|
|
4285
|
+
margin-bottom: 0;
|
|
4286
|
+
border-bottom: 1px solid #f0f0f0;
|
|
4287
|
+
border-radius: 8px 8px 0 0;
|
|
4288
|
+
}
|
|
4289
|
+
.ant-modal .ant-modal-body {
|
|
4290
|
+
padding: 24px;
|
|
4291
|
+
}
|
|
4292
|
+
.ant-modal .ant-modal-footer {
|
|
4293
|
+
padding: 10px 16px;
|
|
4294
|
+
margin-top: 0;
|
|
4295
|
+
border-top: 1px solid #f0f0f0;
|
|
4296
|
+
border-radius: 0 0 8px 8px;
|
|
4297
|
+
}
|
|
4298
|
+
.ant-modal .ant-modal-close-icon {
|
|
4299
|
+
width: 16px;
|
|
4300
|
+
height: 16px;
|
|
4301
|
+
font-size: 12px;
|
|
4302
|
+
}
|
|
4013
4303
|
|
|
4014
4304
|
/* GM footer positioning */
|
|
4015
4305
|
.ant-modal .gm-modal-footer,
|
|
@@ -4022,7 +4312,7 @@ var globalCSS = `
|
|
|
4022
4312
|
padding: 10px 16px;
|
|
4023
4313
|
text-align: right;
|
|
4024
4314
|
background-color: #fff;
|
|
4025
|
-
border-top: 1px solid #
|
|
4315
|
+
border-top: 1px solid #f0f0f0;
|
|
4026
4316
|
}
|
|
4027
4317
|
.ant-modal .gm-modal-footer .ant-btn,
|
|
4028
4318
|
.ant-drawer .gm-drawer-footer .ant-btn {
|
|
@@ -4058,11 +4348,22 @@ var globalCSS = `
|
|
|
4058
4348
|
.ant-modal-confirm-content {
|
|
4059
4349
|
word-break: break-all;
|
|
4060
4350
|
}
|
|
4351
|
+
.ant-modal-confirm .ant-modal-confirm-body-wrapper {
|
|
4352
|
+
padding: 24px;
|
|
4353
|
+
}
|
|
4061
4354
|
|
|
4062
4355
|
/* Modal confirm title bold */
|
|
4063
4356
|
.ant-modal-confirm-body .ant-modal-confirm-title {
|
|
4064
4357
|
font-weight: 600;
|
|
4065
4358
|
}
|
|
4359
|
+
.ant-modal-confirm .ant-btn {
|
|
4360
|
+
border: none;
|
|
4361
|
+
border-radius: 4px;
|
|
4362
|
+
}
|
|
4363
|
+
.ant-modal-confirm .ant-btn-default {
|
|
4364
|
+
color: var(--ant-primary-color, var(--gm-color-primary, #0363ff));
|
|
4365
|
+
background-color: #f2f3f4;
|
|
4366
|
+
}
|
|
4066
4367
|
|
|
4067
4368
|
/* Table: thead/tbody height 48px */
|
|
4068
4369
|
.ant-table .ant-table-thead tr {
|
|
@@ -4071,6 +4372,9 @@ var globalCSS = `
|
|
|
4071
4372
|
.ant-table .ant-table-thead tr th {
|
|
4072
4373
|
height: 48px;
|
|
4073
4374
|
padding: 0 16px;
|
|
4375
|
+
color: #1f1f1f;
|
|
4376
|
+
font-weight: 500;
|
|
4377
|
+
background-color: #fafafa;
|
|
4074
4378
|
}
|
|
4075
4379
|
.ant-table .ant-table-tbody > tr.ant-table-row {
|
|
4076
4380
|
height: 48px;
|
|
@@ -4084,7 +4388,7 @@ var globalCSS = `
|
|
|
4084
4388
|
background-color: #f5f5f5;
|
|
4085
4389
|
}
|
|
4086
4390
|
.ant-table .ant-table-tbody > tr.ant-table-row-selected > td {
|
|
4087
|
-
background-color: var(--
|
|
4391
|
+
background-color: var(--gm-color-table-td-active, #b2d5ff);
|
|
4088
4392
|
}
|
|
4089
4393
|
|
|
4090
4394
|
/* Tabs title 16px */
|
|
@@ -4107,7 +4411,7 @@ var globalCSS = `
|
|
|
4107
4411
|
|
|
4108
4412
|
/* Lightgrey button variant */
|
|
4109
4413
|
.ant-btn.lightgrey {
|
|
4110
|
-
color: var(--ant-color-primary);
|
|
4414
|
+
color: var(--ant-color-primary, var(--gm-color-primary, #0363ff));
|
|
4111
4415
|
background-color: #f2f3f4;
|
|
4112
4416
|
border-style: none;
|
|
4113
4417
|
}
|
|
@@ -4128,20 +4432,36 @@ var globalCSS = `
|
|
|
4128
4432
|
.ant-select-outlined:not(.ant-select-borderless):not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector,
|
|
4129
4433
|
.ant-picker-outlined:not(.ant-picker-borderless):not(.ant-picker-disabled),
|
|
4130
4434
|
.ant-input-outlined:not(.ant-input-borderless),
|
|
4435
|
+
.ant-input-affix-wrapper.ant-input-outlined:not(.ant-input-borderless):not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-status-error):not(.ant-input-affix-wrapper-status-warning),
|
|
4131
4436
|
.ant-input-number-outlined:not(.ant-input-number-borderless),
|
|
4132
4437
|
.ant-pagination .ant-pagination-item:not(.ant-pagination-item-disabled) {
|
|
4133
4438
|
border-color: #d9d9d9;
|
|
4134
4439
|
}
|
|
4440
|
+
.ant-input-affix-wrapper.ant-input-outlined:not(.ant-input-borderless):not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-status-error):not(.ant-input-affix-wrapper-status-warning):hover {
|
|
4441
|
+
border-color: var(--ant-color-primary-hover, var(--ant-primary-color-hover, #2b84ff));
|
|
4442
|
+
}
|
|
4443
|
+
.ant-input-affix-wrapper.ant-input-outlined:not(.ant-input-borderless):not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-status-error):not(.ant-input-affix-wrapper-status-warning).ant-input-affix-wrapper-focused,
|
|
4444
|
+
.ant-input-affix-wrapper.ant-input-outlined:not(.ant-input-borderless):not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-status-error):not(.ant-input-affix-wrapper-status-warning):focus,
|
|
4445
|
+
.ant-input-affix-wrapper.ant-input-outlined:not(.ant-input-borderless):not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-status-error):not(.ant-input-affix-wrapper-status-warning):focus-within {
|
|
4446
|
+
border-color: var(--ant-color-primary, var(--ant-primary-color, var(--gm-color-primary, #0363ff)));
|
|
4447
|
+
box-shadow: 0 0 0 2px var(--ant-control-outline, rgba(3, 99, 255, 0.16));
|
|
4448
|
+
}
|
|
4135
4449
|
`;
|
|
4136
|
-
var
|
|
4450
|
+
var GM_GLOBAL_STYLE_ATTR = "data-gm-antd";
|
|
4451
|
+
var GM_GLOBAL_STYLE_VALUE = "global";
|
|
4137
4452
|
var GMGlobalStyle = () => {
|
|
4138
|
-
React28.
|
|
4139
|
-
if (
|
|
4140
|
-
const
|
|
4141
|
-
style.
|
|
4142
|
-
style
|
|
4143
|
-
|
|
4144
|
-
|
|
4453
|
+
React28.useLayoutEffect(() => {
|
|
4454
|
+
if (typeof document === "undefined") return;
|
|
4455
|
+
const selector = `style[${GM_GLOBAL_STYLE_ATTR}="${GM_GLOBAL_STYLE_VALUE}"]`;
|
|
4456
|
+
let style = document.querySelector(selector);
|
|
4457
|
+
if (!style) {
|
|
4458
|
+
style = document.createElement("style");
|
|
4459
|
+
style.setAttribute(GM_GLOBAL_STYLE_ATTR, GM_GLOBAL_STYLE_VALUE);
|
|
4460
|
+
document.head.appendChild(style);
|
|
4461
|
+
}
|
|
4462
|
+
if (style.textContent !== globalCSS) {
|
|
4463
|
+
style.textContent = globalCSS;
|
|
4464
|
+
}
|
|
4145
4465
|
}, []);
|
|
4146
4466
|
return null;
|
|
4147
4467
|
};
|
|
@@ -4154,6 +4474,7 @@ Object.defineProperty(exports, "message", {
|
|
|
4154
4474
|
get: function () { return antd.message; }
|
|
4155
4475
|
});
|
|
4156
4476
|
exports.AutoComplete = AutoComplete_default;
|
|
4477
|
+
exports.BatchActions = BatchActions_default;
|
|
4157
4478
|
exports.Button = GmButton_default;
|
|
4158
4479
|
exports.Cascader = Cascader_default;
|
|
4159
4480
|
exports.ContentWrapper = ContentWrapper_default;
|