Skip to content

Commit 4a39ad9

Browse files
committed
fix: fix gap not support in old browser
1 parent 45f5752 commit 4a39ad9

38 files changed

Lines changed: 186 additions & 89 deletions

.stylelintrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"rules": {
99
"import-notation": null,
1010
"selector-class-pattern": null,
11-
"block-no-empty": null
11+
"block-no-empty": null,
12+
"selector-not-notation": "simple"
1213
},
1314
"overrides": [
1415
{

packages/site/src/styles/_app.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ h3 {
201201
'DatePicker': 'date-picker',
202202
'Image': 'image',
203203
'Input': 'input',
204-
'Radio': 'radio',
205204
'Select': 'select',
206205
'Switch': 'switch',
207206
'Tag': 'tag',
@@ -251,20 +250,6 @@ h3 {
251250
}
252251
}
253252

254-
section[id^='Checkbox'] {
255-
.#{$rd-prefix}checkbox {
256-
margin-right: 8px;
257-
margin-bottom: 12px;
258-
}
259-
260-
.#{$rd-prefix}checkbox-group {
261-
.#{$rd-prefix}checkbox {
262-
margin-right: 0;
263-
margin-bottom: 0;
264-
}
265-
}
266-
}
267-
268253
section[id^='Form'] {
269254
.#{$rd-prefix}form--inline {
270255
min-width: 800px;

packages/ui/src/components/checkbox/demos/1.Basic.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export default function Demo() {
3131
</DButton>
3232
<br />
3333
<br />
34-
<DCheckbox dDisabled={disabled}>Checkbox</DCheckbox>
34+
<DCheckbox className="me-3" dDisabled={disabled}>
35+
Checkbox
36+
</DCheckbox>
3537
<DCheckbox dIndeterminate dDisabled={disabled}>
3638
Checkbox
3739
</DCheckbox>

packages/ui/src/components/checkbox/demos/3.Indeterminate.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default function Demo() {
3333
{state === true ? 'Clear all' : 'Select all'}
3434
</DCheckbox>
3535
<br />
36+
<br />
3637
<DCheckbox.Group
3738
dList={[1, 2, 3].map((n) => ({
3839
label: `Checkbox ${n}`,

packages/ui/src/components/compose/Compose.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ export interface DComposeProps extends React.HTMLAttributes<HTMLDivElement> {
2121
dDisabled?: boolean;
2222
}
2323

24+
export interface DComposePrivateProps {
25+
__noStyle?: boolean;
26+
}
27+
2428
const { COMPONENT_NAME } = registerComponentMate({ COMPONENT_NAME: 'DCompose' as const });
2529
export const DCompose: {
2630
(props: DComposeProps): JSX.Element | null;
@@ -31,9 +35,10 @@ export const DCompose: {
3135
dSize,
3236
dVertical = false,
3337
dDisabled = false,
38+
__noStyle,
3439

3540
...restProps
36-
} = useComponentConfig(COMPONENT_NAME, props);
41+
} = useComponentConfig(COMPONENT_NAME, props as DComposeProps & DComposePrivateProps);
3742

3843
//#region Context
3944
const dPrefix = usePrefixConfig();
@@ -55,9 +60,13 @@ export const DCompose: {
5560
<DComposeContext.Provider value={contextValue}>
5661
<div
5762
{...restProps}
58-
className={getClassName(restProps.className, `${dPrefix}compose`, {
59-
[`${dPrefix}compose--vertical`]: dVertical,
60-
})}
63+
className={
64+
__noStyle
65+
? restProps.className
66+
: getClassName(restProps.className, `${dPrefix}compose`, {
67+
[`${dPrefix}compose--vertical`]: dVertical,
68+
})
69+
}
6170
role="group"
6271
>
6372
{children}

packages/ui/src/components/pagination/Pagination.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,11 @@ export function DPagination(props: DPaginationProps): JSX.Element | null {
210210
return dCustomRender.jump(jumpInput);
211211
} else {
212212
return (
213-
<div className={`${dPrefix}pagination__jump-wrapper`}>
214-
{t('Pagination', 'Go')} {jumpInput} {t('Pagination', 'Page')}
215-
</div>
213+
<>
214+
<span>{t('Pagination', 'Go')}</span>
215+
{jumpInput}
216+
<span>{t('Pagination', 'Page')}</span>
217+
</>
216218
);
217219
}
218220
}

packages/ui/src/components/radio/Radio.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,14 @@ export const DRadio: {
6464

6565
return (
6666
<DBaseDesign
67-
dComposeDesign={{
68-
active: checked || focusVisible,
69-
disabled: disabled,
70-
}}
67+
dComposeDesign={
68+
__type
69+
? {
70+
active: checked || focusVisible,
71+
disabled: disabled,
72+
}
73+
: false
74+
}
7175
dFormDesign={false}
7276
>
7377
{({ render: renderBaseDesign }) =>

packages/ui/src/components/radio/RadioGroup.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ export function DRadioGroup<V extends DId>(props: DRadioGroupProps<V>): JSX.Elem
7575
{...restProps}
7676
className={getClassName(restProps.className, `${dPrefix}radio-group`, {
7777
[`${dPrefix}radio-group--default`]: isUndefined(dType),
78+
[`${dPrefix}radio-group--vertical`]: dVertical,
7879
'is-change': isChange,
7980
})}
8081
dDisabled={disabled}
8182
role="radiogroup"
8283
dSize={size}
8384
dVertical={dVertical}
85+
{...({ __noStyle: isUndefined(dType) } as any)}
8486
>
8587
{dList.map((item) =>
8688
React.cloneElement<DRadioPrivateProps>(

packages/ui/src/components/radio/demos/1.Basic.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export default function Demo() {
3131
</DButton>
3232
<br />
3333
<br />
34-
<DRadio dDisabled={disabled}>Radio</DRadio>
34+
<DRadio className="me-3" dDisabled={disabled}>
35+
Radio
36+
</DRadio>
3537
<DRadio dDisabled={disabled} dModel>
3638
Radio
3739
</DRadio>

packages/ui/src/styles/_mixins.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
@import 'mixins/function';
55
@import 'mixins/bem';
66
@import 'mixins/utils';
7+
@import 'mixins/polyfill';

0 commit comments

Comments
 (0)