Skip to content

Commit 147b9f3

Browse files
authored
revert: revert mobile first from sync (#2980)
* fix: revert sync mobile first form * revert: revert mobile first from sync * revert: revert mobile first from sync
1 parent 397b0ab commit 147b9f3

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

packages/theme-saas/src/form-item/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
.@{form-item-prefix-cls} {
2020
@apply relative;
21-
@apply mb-4;
21+
@apply mb-5;
2222
.clearfix();
2323

2424
.@{form-item-prefix-cls}__content-muti-children {

packages/vue/src/checkbox/src/mobile-first.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
data-tag="tiny-checkbox"
44
:class="
55
m(
6-
'inline-flex sm:items-center text-sm leading-5.5 cursor-pointer',
6+
'inline-flex sm:items-center text-sm leading-5 cursor-pointer',
77
state.size !== 'mini' ? 'sm:text-sm' : 'sm:text-xs',
88
{ 'sm:py-2': state.vertical },
99
state.isDisplayOnly || state.isGroupDisplayOnly

packages/vue/src/form-item/src/mobile-first.vue

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
data-tag="tiny-form-item"
44
:class="
55
m(
6-
`flex min-h-[theme(spacing.12)] sm:min-h-[theme(spacing.5)] mb-0 p-0 sm:mb-4 box-border after:content-[''] after:table after:clear-both before:content-[''] before:table border-b-0.5 border-color-border-separator sm:border-none`,
6+
`flex min-h-[theme(spacing.12)] sm:min-h-[theme(spacing.7)] mb-0 p-0 sm:mb-4 box-border after:content-[''] after:table after:clear-both before:content-[''] before:table border-b-0.5 border-color-border-separator sm:border-none`,
77
state.validateState === 'error' && state.validateType === 'text' ? 'mb-0 sm:mb-5' : '',
88
state.formInline ? 'align-sub' : '',
99
state.labelPosition === 'top' ? 'block mb-4' : '',
@@ -12,7 +12,7 @@
1212
: '',
1313
state.labelPosition === 'top' && !state.hideRequiredAsterisk ? 'pl-0' : '',
1414
!slots.label && !label ? 'border-none' : '',
15-
state.isDisplayOnly ? 'border-none py-0.5 sm:py-0' : ''
15+
state.isDisplayOnly ? 'border-none py-0.5' : ''
1616
)
1717
"
1818
>
@@ -26,15 +26,15 @@
2626
v-if="slots.label || label"
2727
:class="
2828
m(
29-
'py-3 sm:py-0 sm:min-h-[theme(spacing.5)] relative align-bottom float-left text-sm pr-3 sm:pr-4 box-border',
29+
'py-3 sm:py-1.5 sm:min-h-[theme(spacing.7)] relative align-bottom float-left text-sm pr-3 sm:pr-4 box-border leading-5',
3030
'overflow-hidden text-ellipsis',
3131
state.labelPosition === 'top'
3232
? 'float-none inline-block text-left sm:text-left leading-none px-0 pt-0 pb-1.5 h-auto min-h-0 sm:py-0 sm:pb-1 sm:min-h-[theme(spacing.0)]'
3333
: 'min-h-[theme(spacing.9)]',
3434
state.labelPosition === 'right' ? 'text-right sm:text-right' : '',
3535
state.labelPosition === 'left' ? 'text-left sm:text-left' : '',
3636
state.formInline && state.labelPosition === 'top' ? 'block' : '',
37-
state.isDisplayOnly ? 'h-auto align-[inherit] pr-4' : '',
37+
state.isDisplayOnly ? 'leading-none h-auto align-[inherit] pr-4' : '',
3838
tipContent ? 'pr-5 sm:pr-7' : '',
3939
state.labelPosition === 'top' && !state.hideRequiredAsterisk
4040
? 'overflow-visible relative before:absolute before:-left-2.5'
@@ -49,11 +49,11 @@
4949
<span
5050
:class="
5151
m(
52-
'max-h-[theme(spacing.12)] line-clamp-2 inline-block relative leading-normal',
52+
'max-h-[theme(spacing.10)] line-clamp-2 inline-block relative top-px leading-normal',
5353
(state.isRequired || required) && !state.hideRequiredAsterisk
5454
? `before:content-['*'] before:text-color-error before:relative before:mr-1`
5555
: '',
56-
state.isDisplayOnly ? 'pl-0 before:hidden sm:leading-5.5' : 'sm:leading-7'
56+
state.isDisplayOnly ? 'pl-0 before:hidden' : ''
5757
)
5858
"
5959
>
@@ -73,13 +73,10 @@
7373
data-tag="tiny-form-item-inline"
7474
:class="
7575
m(
76-
`flex-1 m-0 relative sm:pt-0 sm:top-auto text-sm after:content-[''] after:table after:clear-both before:content-[''] before:table [&_button:not(:last-child)]:mr-2`,
76+
`flex-1 m-0 sm:m-auto relative sm:pt-0 sm:top-auto text-sm after:content-[''] after:table after:clear-both before:content-[''] before:table [&_button:not(:last-child)]:mr-2`,
7777
'[&_[data-tag=tiny-checkbox]]:py-0 [&_[data-tag=tiny-input]]:w-full',
7878
'[&_[data-tag=tiny-input]_textarea]:px-0 sm:[&_[data-tag=tiny-input]_textarea]:px-3 [&_[data-tag=tiny-input]_textarea]:w-full [&_[data-tag=tiny-input]_textarea]:pt-1 sm:[&_[data-tag=tiny-input]_textarea]:pt-2',
7979
state.formInline ? 'align-sub leading-none' : '',
80-
state.isDisplayOnly
81-
? '[&_[data-tag=tiny-input]]:block [&_[data-tag=tiny-input-inner]]:block [&_[data-tag=tiny-input-inner]]:leading-5 [&_[data-tag=tiny-rate]]:h-[22px]'
82-
: '[&_[data-tag=tiny-rate]]:h-7',
8380
state.labelPosition === 'top' && !state.hideRequiredAsterisk
8481
? state.isDisplayOnly
8582
? 'pl-0'
@@ -111,8 +108,8 @@
111108
'[&_[class^=tiny-autocomplete]]:w-full',
112109
'[&_[class^=tiny-cascader]]:w-full',
113110
state.isDisplayOnly
114-
? 'sm:leading-5.5 [&_>*:not([data-tag^=tiny-],[class^=tiny-])]:leading-8 [&_>*:not([data-tag^=tiny-],[class^=tiny-])]:sm:leading-normal'
115-
: '[&_[data-tag=tiny-checkbox]]:h-7 [&_[data-tag=tiny-radio]]:h-7'
111+
? '[&_>*:not([data-tag^=tiny-],[class^=tiny-])]:leading-8 [&_>*:not([data-tag^=tiny-],[class^=tiny-])]:sm:leading-normal'
112+
: ''
116113
]"
117114
>
118115
<slot></slot>

packages/vue/src/input/src/mobile-first.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
@mouseenter.native="handleEnterDisplayOnlyContent"
5252
>
5353
<span
54-
class="absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-5.5 text-color-text-primary"
54+
class="absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-normal text-color-text-primary"
5555
v-if="type === 'password'"
5656
>{{ state.hiddenPassword }}</span
5757
>
@@ -68,7 +68,7 @@
6868
></component>
6969
</span>
7070
<span
71-
class="absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-5.5 text-color-text-primary"
71+
class="absolute top-0 left-0 max-w-full overflow-hidden text-ellipsis whitespace-nowrap leading-7 sm:leading-normal text-color-text-primary"
7272
v-else
7373
>
7474
{{ state.displayOnlyText }}

packages/vue/src/numeric/src/mobile-first.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<div
104104
data-tag="numeric-display-only"
105105
v-if="state.isDisplayOnly"
106-
class="sm:leading-5.5 text-color-text-primary"
106+
class="sm:leading-normal text-color-text-primary"
107107
:class="state.inputSize !== 'mini' ? 'text-sm' : 'text-xs'"
108108
>
109109
<span>{{ state.displayOnlyText }}</span

packages/vue/src/radio/src/token.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export const classes = {
2-
'radio-default': 'radio inline-flex items-center leading-4 cursor-pointer sm:flex-row py-px sm:py-0 h-fit',
2+
'radio-default':
3+
'radio inline-flex items-center align-middle leading-4 cursor-pointer sm:flex-row py-px sm:py-0 h-fit',
34
'radio-label-common': 'relative text-center w-7 h-7 mr-2 sm:mr-0',
45
'radio-label-size-common': 'sm:w-4 sm:h-4',
56
'radio-label-size-medium': 'sm:w-6 sm:h-6',
@@ -37,9 +38,9 @@ export const classes = {
3738
'label-disabled': 'text-color-text-secondary cursor-not-allowed',
3839
'pc-show': 'hidden sm:block',
3940
'mobile-show': 'block sm:hidden',
40-
'readonly-is-checked': 'sm:m-0 cursor-default',
41-
'readonly-is-not-checked': 'sm:hidden cursor-default',
42-
'not-readonly-common': 'mr-5 align-middle sm:[&:last-child]:mr-0',
41+
'readonly-is-checked': 'sm:m-0',
42+
'readonly-is-not-checked': 'sm:hidden',
43+
'not-readonly-common': 'mr-5 sm:[&:last-child]:mr-0',
4344
'hidden-radio': 'sm:hidden',
4445
'not-readly-common-label': 'sm:py-0 sm:pl-2 -ml-0.5 sm:ml-0',
4546
'readonly-checked-label': 'sm:pl-0 text-color-text-primary',

0 commit comments

Comments
 (0)