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/compat/Drawer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DrawerProps as AntDrawerProps } from 'antd';
|
|
3
3
|
export declare type DrawerProps = AntDrawerProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntDrawerProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Drawer.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DropdownProps as AntDropdownProps } from 'antd';
|
|
3
3
|
export declare type DropdownProps = AntDropdownProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntDropdownProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Dropdown.d.ts.map
|
package/dist/compat/Input.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Input as AntInput } from 'antd';
|
|
3
1
|
import type { InputProps as AntInputProps } from 'antd';
|
|
4
2
|
export declare type InputProps = AntInputProps;
|
|
5
|
-
declare const _default:
|
|
6
|
-
TextArea: typeof AntInput.TextArea;
|
|
7
|
-
Search: typeof AntInput.Search;
|
|
8
|
-
Password: typeof AntInput.Password;
|
|
9
|
-
Group: typeof AntInput.Group;
|
|
10
|
-
};
|
|
3
|
+
declare const _default: any;
|
|
11
4
|
export default _default;
|
|
12
5
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/compat/Input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/compat/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAIxD,oBAAY,UAAU,GAAG,aAAa,CAAC;;AAmBvC,wBAA4B"}
|
package/dist/compat/Menu.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Menu as AntMenu } from 'antd';
|
|
3
1
|
import type { MenuProps as AntMenuProps } from 'antd';
|
|
4
2
|
export declare type MenuProps = AntMenuProps;
|
|
5
|
-
declare const _default:
|
|
6
|
-
Item: typeof AntMenu.Item;
|
|
7
|
-
SubMenu: typeof AntMenu.SubMenu;
|
|
8
|
-
ItemGroup: typeof AntMenu.ItemGroup;
|
|
9
|
-
Divider: typeof AntMenu.Divider;
|
|
10
|
-
};
|
|
3
|
+
declare const _default: any;
|
|
11
4
|
export default _default;
|
|
12
5
|
//# sourceMappingURL=Menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/compat/Menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../src/compat/Menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,MAAM,CAAC;AAGtD,oBAAY,SAAS,GAAG,YAAY,CAAC;;AAyBrC,wBAAiC"}
|
package/dist/compat/Modal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ModalProps as AntModalProps } from 'antd';
|
|
3
3
|
export declare type ModalProps = AntModalProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntModalProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PopconfirmProps as AntPopconfirmProps } from 'antd';
|
|
3
3
|
export declare type PopconfirmProps = AntPopconfirmProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntPopconfirmProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Popconfirm.d.ts.map
|
package/dist/compat/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PopoverProps as AntPopoverProps } from 'antd';
|
|
3
3
|
export declare type PopoverProps = AntPopoverProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntPopoverProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Popover.d.ts.map
|
package/dist/compat/Select.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Select as AntSelect } from 'antd';
|
|
3
|
-
import type { SelectProps as AntSelectProps, RefSelectProps, BaseOptionType, DefaultOptionType } from 'antd/es/select';
|
|
1
|
+
import type { SelectProps as AntSelectProps, BaseOptionType, DefaultOptionType } from 'antd/es/select';
|
|
4
2
|
export interface GmSelectProps<ValueType = any, OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType> extends AntSelectProps<ValueType, OptionType> {
|
|
5
3
|
/** 是否展示全选 & 展示过滤已删除 */
|
|
6
4
|
isRenderDefaultBottom?: boolean;
|
|
@@ -9,13 +7,6 @@ export interface GmSelectProps<ValueType = any, OptionType extends BaseOptionTyp
|
|
|
9
7
|
/** 是否展示全选按钮 */
|
|
10
8
|
isShowCheckedAll?: boolean;
|
|
11
9
|
}
|
|
12
|
-
declare const _default:
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
} & {
|
|
15
|
-
ref?: React.Ref<RefSelectProps> | undefined;
|
|
16
|
-
}) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
17
|
-
Option: typeof AntSelect.Option;
|
|
18
|
-
OptGroup: typeof AntSelect.OptGroup;
|
|
19
|
-
};
|
|
10
|
+
declare const _default: any;
|
|
20
11
|
export default _default;
|
|
21
12
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/compat/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/compat/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,WAAW,IAAI,cAAc,EAE7B,cAAc,EACd,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAKxB,MAAM,WAAW,aAAa,CAC5B,SAAS,GAAG,GAAG,EACf,UAAU,SAAS,cAAc,GAAG,iBAAiB,GAAG,iBAAiB,CACzE,SAAQ,cAAc,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7C,uBAAuB;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mBAAmB;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;AAiJD,wBAAsC"}
|
package/dist/compat/Tabs.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Tabs as AntTabs } from 'antd';
|
|
3
1
|
import type { TabsProps as AntTabsProps } from 'antd';
|
|
4
2
|
export declare type TabsProps = AntTabsProps;
|
|
5
|
-
declare const _default:
|
|
6
|
-
TabPane: typeof AntTabs.TabPane;
|
|
7
|
-
};
|
|
3
|
+
declare const _default: any;
|
|
8
4
|
export default _default;
|
|
9
5
|
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/compat/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/compat/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,YAAY,EAAE,MAAM,MAAM,CAAC;AAGtD,oBAAY,SAAS,GAAG,YAAY,CAAC;;AAuBrC,wBAAiC"}
|
package/dist/compat/Tooltip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { TooltipProps as AntTooltipProps } from 'antd';
|
|
3
3
|
export declare type TooltipProps = AntTooltipProps;
|
|
4
|
-
declare const _default: React.
|
|
4
|
+
declare const _default: React.ComponentType<AntTooltipProps>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=Tooltip.d.ts.map
|
|
@@ -15,5 +15,5 @@ export declare function applyCompatProps<P extends Record<string, any>>(props: P
|
|
|
15
15
|
* 用薄 forwardRef 包裹 antd 5 组件,使其仍接受 v4 prop 别名。
|
|
16
16
|
* 仅做改名,不做 children 结构转换(Tabs/Menu 另用 childrenToItems)。
|
|
17
17
|
*/
|
|
18
|
-
export declare function withCompat<P extends object>(Component: React.ComponentType<P>, options: WithCompatOptions): React.
|
|
18
|
+
export declare function withCompat<P extends object>(Component: React.ComponentType<P>, options: WithCompatOptions): React.ComponentType<P>;
|
|
19
19
|
//# sourceMappingURL=withCompat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withCompat.d.ts","sourceRoot":"","sources":["../../src/compat/withCompat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,oBAAY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B,UAAU,CAAC,CAAC,SAAS,MAAM,EACzC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,OAAO,EAAE,iBAAiB,0BAW3B"}
|
package/dist/index.css
CHANGED
|
@@ -39,9 +39,13 @@
|
|
|
39
39
|
padding-left: 0;
|
|
40
40
|
}
|
|
41
41
|
.table-filter .labeled-focused {
|
|
42
|
-
border-color: var(--ant-color-primary, #
|
|
42
|
+
border-color: var(--ant-color-primary, var(--gm-color-primary, #0363ff)) !important;
|
|
43
|
+
outline: 0;
|
|
44
|
+
box-shadow: 0 0 0 2px var(--ant-control-outline, rgba(3, 99, 255, 0.2));
|
|
45
|
+
}
|
|
46
|
+
.table-filter .labeled:focus,
|
|
47
|
+
.table-filter .labeled:focus-visible {
|
|
43
48
|
outline: 0;
|
|
44
|
-
box-shadow: 0 0 0 2px rgba(9, 109, 217, 0.2);
|
|
45
49
|
}
|
|
46
50
|
.table-filter .labeled input[type=number] {
|
|
47
51
|
appearance: textfield;
|
|
@@ -72,8 +76,12 @@
|
|
|
72
76
|
cursor: pointer;
|
|
73
77
|
}
|
|
74
78
|
.table-filter .filter-btn-icon:hover {
|
|
75
|
-
color: var(--ant-color-primary, #
|
|
76
|
-
border-color: var(--ant-color-primary, #
|
|
79
|
+
color: var(--ant-color-primary, var(--gm-color-primary, #0363ff));
|
|
80
|
+
border-color: var(--ant-color-primary, var(--gm-color-primary, #0363ff));
|
|
81
|
+
}
|
|
82
|
+
.table-filter .filter-btn-icon:focus,
|
|
83
|
+
.table-filter .filter-btn-icon:focus-visible {
|
|
84
|
+
outline: 0;
|
|
77
85
|
}
|
|
78
86
|
.overlay-setting .ant-popover-inner-content {
|
|
79
87
|
min-width: 210px;
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/table-filter/index.css","../src/table/styles/table-hooks.css"],"sourcesContent":["/**\n * TableFilter 样式(antd5 适配版)\n *\n * 背景:迁移 antd5 时丢失了原 index.less,导致 label/组件换行、字段无边框、设置按钮样式异常。\n * 本文件从 main 分支 index.less 恢复,做两处 antd5 适配:\n * 1. var(--ant-primary-color) → var(--ant-color-primary, #
|
|
1
|
+
{"version":3,"sources":["../src/table-filter/index.css","../src/table/styles/table-hooks.css"],"sourcesContent":["/**\n * TableFilter 样式(antd5 适配版)\n *\n * 背景:迁移 antd5 时丢失了原 index.less,导致 label/组件换行、字段无边框、设置按钮样式异常。\n * 本文件从 main 分支 index.less 恢复,做两处 antd5 适配:\n * 1. var(--ant-primary-color) → var(--ant-color-primary, var(--gm-color-primary, #0363ff))\n * (antd5 token 改名 + GM theme fallback)\n * 2. 保留 antd5 仍存在的内部类名(.ant-select-selection-item / .ant-select-selector)\n *\n * 注意:项目 antd5 未开 cssVar 模式,故主色变量加 fallback,保证边框/聚焦色在任意环境可见。\n */\n\n.table-filter {\n /* 布局由内部 antd Row/Col + gutter 管理,这里只保留容器上下间距 */\n padding-top: 12px;\n padding-bottom: 12px;\n}\n\n.table-filter .labeled {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n width: 100%;\n padding-left: 10px;\n overflow: hidden;\n border: 1px solid #d6d6d6;\n border-radius: 4px;\n cursor: default;\n}\n\n.table-filter .labeled input,\n.table-filter .labeled .ant-select-selection-item,\n.table-filter .labeled .ant-select-selection-placeholder {\n font-size: 14px;\n}\n\n.table-filter .labeled input,\n.table-filter .labeled .ant-select-selection-item {\n color: black;\n}\n\n.table-filter .labeled .labeled-group {\n position: relative;\n}\n\n.table-filter .labeled .labeled-group::after {\n position: absolute;\n top: -4px;\n right: 0;\n width: 1px;\n height: 34px;\n background-color: #d6d6d6;\n content: '';\n}\n\n.table-filter .labeled .labeled-group .ant-select-selector {\n padding-left: 0;\n}\n\n.table-filter .labeled-focused {\n border-color: var(--ant-color-primary, var(--gm-color-primary, #0363ff)) !important;\n outline: 0;\n box-shadow: 0 0 0 2px var(--ant-control-outline, rgba(3, 99, 255, 0.2));\n}\n\n.table-filter .labeled:focus,\n.table-filter .labeled:focus-visible {\n outline: 0;\n}\n\n.table-filter .labeled input[type='number'] {\n appearance: textfield;\n}\n\n.table-filter .labeled input::-webkit-outer-spin-button,\n.table-filter .labeled input::-webkit-inner-spin-button {\n appearance: none;\n}\n\n.table-filter .labeled.disabled {\n background-color: #f5f5f5;\n border-color: #d6d6d6 !important;\n box-shadow: none !important;\n cursor: not-allowed !important;\n}\n\n.table-filter .labeled.disabled div {\n filter: opacity(0.8);\n pointer-events: none !important;\n}\n\n.table-filter .filter-btn-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n color: rgb(113, 113, 112);\n border: 1px solid #d6d6d6;\n border-radius: 4px;\n cursor: pointer;\n}\n\n.table-filter .filter-btn-icon:hover {\n color: var(--ant-color-primary, var(--gm-color-primary, #0363ff));\n border-color: var(--ant-color-primary, var(--gm-color-primary, #0363ff));\n}\n\n.table-filter .filter-btn-icon:focus,\n.table-filter .filter-btn-icon:focus-visible {\n outline: 0;\n}\n\n.overlay-setting .ant-popover-inner-content {\n min-width: 210px;\n padding: 0;\n}\n","/* ============================================\n Table Hooks Global CSS\n Contains ::before pseudo-element overrides\n and antd structural class overrides that\n cannot be replaced with inline styles.\n ============================================ */\n\n/* --- antd5 measure-row 空白行修复 ---\n antd5 用 .ant-table-measure-row 测列宽(scroll.x/固定列/列宽时), 本应通过\n .ant-table-measure-cell-content { height:0; overflow:hidden } 塌成 0 高隐藏。\n 但 antd5 cssinjs 用 :where() 零优先级, 被宿主全局 CSS(给 td/th/content 设了高度)\n 覆盖后, measure-cell-content 撑到满行高, 表格顶部多出一行\"空白行\"。强制塌成 0。 */\n.ant-table-measure-row {\n height: 0 !important;\n}\n.ant-table-measure-row .ant-table-measure-cell {\n height: 0 !important;\n padding: 0 !important;\n border: 0 !important;\n}\n.ant-table-measure-row .ant-table-measure-cell-content {\n height: 0 !important;\n max-height: 0 !important;\n overflow: hidden !important;\n}\n\n/* --- useTableResizable --- */\n\n.ant-table-cell.react-resizable:not(:last-child):not(.ant-table-selection-column):not(\n .ant-table-row-expand-icon-cell\n ):not([colspan])::before {\n right: 5px;\n}\n\n.ant-table-thead tr th {\n &.react-resizable:hover::before,\n &.react-resizable:active::before {\n background-color: #ccc !important;\n }\n\n &.gm-virtual-table-cell-fixed-left::before {\n display: none;\n }\n}\n\n/* --- useTableTheme --- */\n\ntr td.use-table-theme {\n overflow: hidden;\n\n &.ant-table-cell-fix-left,\n &.ant-table-cell-fix-right {\n overflow: initial;\n }\n\n .ant-table-row-expand-icon-spaced {\n display: none;\n }\n}\n\n.ant-table-thead.use-table-theme tr th {\n user-select: none;\n}\n\n/* --- useTableDIY --- */\n\n.ant-table-cell.placeholder::before {\n display: none;\n}\n\n.ant-table-selection-column {\n .use-table-diy-cell-no {\n visibility: hidden;\n }\n\n .table-selection.mode-parent {\n visibility: hidden;\n }\n}\n\n.ant-table-row-level-0 > .ant-table-selection-column {\n .use-table-diy-cell-no {\n visibility: visible !important;\n }\n\n .table-selection {\n visibility: visible !important;\n }\n}\n\n/* --- useTableSelection --- */\n\n.ant-table-selection-column {\n padding-left: 0 !important;\n\n .table-selection.mode-all,\n .table-selection.mode-child {\n visibility: visible;\n }\n}\n\n/* --- useTableVirtual fixed column backgrounds --- */\n\n.gm-virtual-table-cell-fixed-left,\n.gm-virtual-table-cell-fixed-right {\n &::before {\n position: absolute;\n top: 0;\n left: 0;\n z-index: -1;\n width: 100%;\n height: calc(100% - 1px);\n background-color: white;\n transition: background-color 0.3s;\n content: '';\n }\n}\n\n.gm-table-row.gm-row-selected {\n .gm-virtual-table-cell-fixed-left::before,\n .gm-virtual-table-cell-fixed-right::before {\n background-color: var(--ant-color-primary-bg, #e6f4ff);\n }\n}\n\n.gm-table-row:hover {\n .gm-virtual-table-cell-fixed-left::before,\n .gm-virtual-table-cell-fixed-right::before {\n background-color: var(--ant-color-fill-quaternary, #fafafa);\n }\n}\n\n.gm-virtual-table-cell.placeholder {\n visibility: hidden;\n}\n\n.gm-row-selected {\n background-color: var(--ant-color-primary-bg, #e6f4ff);\n}\n\n/* antd5 的 .ant-table-cell(td) 默认白色背景(colorBgContainer)会盖住 tr 上的选中色。\n useTableSelection 用 gm-row-selected 标记选中行(自定义 selection,未设 selectedRowKeys,\n antd5 不会加 ant-table-row-selected → global.ts 的 .ant-table-row-selected 规则不触发)。\n 显式给 td 设选中色,!important 覆盖 antd5 cssinjs 注入的白底,hover 也保持选中态。\n (antd4 时代 td 默认透明,tr 选中色可直接透出;antd5 td 不透明,需此补偿) */\n.ant-table-tbody tr.gm-row-selected > td,\n.ant-table-tbody tr.gm-row-selected:hover > td {\n background-color: var(--ant-color-primary-bg, #e6f4ff) !important;\n}\n"],"mappings":";AAYA,CAAC;AAEC,eAAa;AACb,kBAAgB;AAClB;AAEA,CANC,aAMa,CAAC;AACb,cAAY;AACZ,WAAS;AACT,eAAa;AACb,SAAO;AACP,gBAAc;AACd,YAAU;AACV,UAAQ,IAAI,MAAM;AAClB,iBAAe;AACf,UAAQ;AACV;AAEA,CAlBC,aAkBa,CAZC,QAYQ;AACvB,CAnBC,aAmBa,CAbC,QAaQ,CAAC;AACxB,CApBC,aAoBa,CAdC,QAcQ,CAAC;AACtB,aAAW;AACb;AAEA,CAxBC,aAwBa,CAlBC,QAkBQ;AACvB,CAzBC,aAyBa,CAnBC,QAmBQ,CANC;AAOtB,SAAO;AACT;AAEA,CA7BC,aA6Ba,CAvBC,QAuBQ,CAAC;AACtB,YAAU;AACZ;AAEA,CAjCC,aAiCa,CA3BC,QA2BQ,CAJC,aAIa;AACnC,YAAU;AACV,OAAK;AACL,SAAO;AACP,SAAO;AACP,UAAQ;AACR,oBAAkB;AAClB,WAAS;AACX;AAEA,CA3CC,aA2Ca,CArCC,QAqCQ,CAdC,cAcc,CAAC;AACrC,gBAAc;AAChB;AAEA,CA/CC,aA+Ca,CAAC;AACb,gBAAc,IAAI,mBAAmB,EAAE,IAAI,kBAAkB,EAAE;AAC/D,WAAS;AACT,cAAY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BZ,oBAAkB,IAAI,sBAAsB,EAAE;AAChD;AAOA,CAAC,gBAAgB,EAAE,CA3BL,gBA2BsB,EAAE;AACtC,CADC,gBACgB,EAAE,CA5BL,eA4BqB,OAAO,EAAE;AAC1C,oBAAkB,IAAI,sBAAsB,EAAE;AAChD;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export { default as useTableResizable } from './table/hooks/useTableResizable';
|
|
|
22
22
|
export { default as useTableTheme } from './table/hooks/useTableTheme';
|
|
23
23
|
export { default as useTableDIY } from './table/hooks/useTableDIY';
|
|
24
24
|
export { default as useTableSelection } from './table/hooks/useTableSelection';
|
|
25
|
+
export { default as BatchActions } from './table/hooks/useTableSelection/BatchActions';
|
|
25
26
|
export { default as useTableVirtual } from './table/hooks/useTableVirtual';
|
|
26
27
|
export { default as useTable } from './table/hooks/useTable';
|
|
27
28
|
import './table/styles/table-hooks.css';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,oBAAoB,CAAC;AAI5B,cAAc,MAAM,CAAC;AAGrB,OAAO,EACL,KAAK,EACL,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,UAAU,EACV,KAAK,EACL,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,UAAU,GACX,MAAM,UAAU,CAAC;AAElB,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACpH,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC7D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjG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