dcp-design-react 1.12.13 → 1.12.15

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.
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  import { type IConfig } from '../context';
3
+ import 'dayjs/locale/zh-cn';
4
+ import 'dayjs/locale/en';
3
5
  type IProps = IConfig & {
4
6
  children?: React.ReactNode;
5
7
  };
@@ -109,6 +109,7 @@ export type IFormItem = {
109
109
  style?: CSSProperties;
110
110
  className?: string;
111
111
  placeholder?: string;
112
+ translate?: boolean;
112
113
  bordered?: boolean;
113
114
  disabled?: boolean;
114
115
  allowClear?: boolean;
@@ -19,7 +19,6 @@ export declare const formatNumber: (value: string | number) => string;
19
19
  export declare const parserNumber: (value: string) => string;
20
20
  export declare const secretFormat: (value: string | number | undefined, type: string) => string;
21
21
  export declare const isValidLabel: (label: any) => boolean;
22
- export declare const getTitleFromNode: (vNode: React.ReactNode) => string;
23
22
  export declare const createShConfig: (data: any, fieldName: string, createFetch: IFetchFnMaker, multiple?: boolean) => {
24
23
  name?: string | undefined;
25
24
  getServerConfig?: import("./types").IFetchFn | undefined;
@@ -13,21 +13,14 @@
13
13
  .ant-form-item {
14
14
  margin-bottom: @--margin-md + 2px;
15
15
  .ant-form-item-label {
16
- & > label[title=''] {
16
+ & > label:has(.ant-select) {
17
17
  width: 100%;
18
- display: inline-flex;
19
- justify-content: right;
20
18
  .ant-select {
21
- flex: auto;
22
- width: 0;
23
19
  text-align: left;
24
20
  }
25
21
  }
26
- &-wrap {
27
- line-height: 1.075;
28
- }
29
- &-left > label[title=''] {
30
- justify-content: left;
22
+ & > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before {
23
+ margin: 0 2px;
31
24
  }
32
25
  }
33
26
  // placeholder
@@ -91,8 +84,6 @@
91
84
  height: 100%;
92
85
  display: flex;
93
86
  align-items: center;
94
- }
95
- .extra-overflow-cut {
96
87
  .text-overflow-cut();
97
88
  }
98
89
  // select
@@ -159,11 +150,22 @@
159
150
  .ant-form-vertical .ant-form-item {
160
151
  .ant-form-item-label {
161
152
  padding-bottom: 4px;
162
- label[title=''] {
163
- justify-content: left;
153
+ & > label:has(.ant-select) {
154
+ width: 50%;
164
155
  }
165
156
  }
166
157
  }
158
+ &__label-wrap .ant-form-item {
159
+ .ant-form-item-label > label .text {
160
+ line-height: 1.075;
161
+ .text-ellipsis-2();
162
+ }
163
+ .extra-text {
164
+ line-height: 1.075;
165
+ white-space: normal;
166
+ .text-ellipsis-2();
167
+ }
168
+ }
167
169
  // ------ size ------
168
170
  // 40 32 24
169
171
  &--lg {
package/lib/index.d.ts CHANGED
@@ -74,6 +74,8 @@ export type { ColorPickerProps as QmColorPickerProps } from './color-picker';
74
74
  export { default as QmColorPicker } from './color-picker';
75
75
  export type { PortalProps as QmPortalProps } from './portal';
76
76
  export { default as QmPortal } from './portal';
77
+ export type { TranslateProps as QmTranslateProps } from './translate';
78
+ export { default as QmTranslate } from './translate';
77
79
  export type { ConfigProviderProps as DcpConfigProviderProps } from './config-provider';
78
80
  export { default as DcpConfigProvider } from './config-provider';
79
81
  export type { ButtonProps as DcpButtonProps } from './button';
@@ -150,6 +152,8 @@ export type { ColorPickerProps as DcpColorPickerProps } from './color-picker';
150
152
  export { default as DcpColorPicker } from './color-picker';
151
153
  export type { PortalProps as DcpPortalProps } from './portal';
152
154
  export { default as DcpPortal } from './portal';
155
+ export type { TranslateProps as DcpTranslateProps } from './translate';
156
+ export { default as DcpTranslate } from './translate';
153
157
  export { default as pinyin } from './pinyin';
154
158
  export { default as version } from './version';
155
159
  export * from './antd';