Skip to content

Commit f483092

Browse files
authored
feat(VInput): add indent-details prop (#21265)
fixes #16679
1 parent 16e7dcb commit f483092

File tree

21 files changed

+83
-20
lines changed

21 files changed

+83
-20
lines changed

packages/api-generator/src/locale/en/VInput.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"hint": "Displays hint text below the input when focused. Force this always open with the [persistent-hint](#props-persistent-hint) property.",
1313
"iconColor": "Sets the color of the prepend/append icons.",
1414
"id": "Sets the DOM id on the component.",
15+
"indentDetails": "Adds / removes inline padding in inputs details. Useful when trying to align different variants of fields and selection controls.",
1516
"loading": "Displays linear progress bar. Can either be a String which specifies which color is applied to the progress bar (any material color or theme color - **primary**, **secondary**, **success**, **info**, **warning**, **error**) or a Boolean which uses the component **color** (set by color prop - if it's supported by the component) or the primary color.",
1617
"persistentHint": "Forces [hint](#props-hint) to always be visible.",
1718
"placeholder": "Sets the input's placeholder text.",

packages/docs/src/examples/v-form/misc-exposed.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
v-model="checkbox"
2323
:rules="[v => !!v || 'You must agree to continue!']"
2424
label="Do you agree?"
25+
indent-details
2526
required
2627
></v-checkbox>
2728

packages/docs/src/examples/v-form/misc-vee-validate.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
label="Option"
3434
type="checkbox"
3535
value="1"
36+
indent-details
3637
></v-checkbox>
3738

3839
<v-btn

packages/docs/src/examples/v-form/misc-vuelidate.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
v-model="state.checkbox"
3434
:error-messages="v$.checkbox.$errors.map(e => e.$message)"
3535
label="Do you agree?"
36+
indent-details
3637
required
3738
@blur="v$.checkbox.$touch"
3839
@change="v$.checkbox.$touch"

packages/docs/src/pages/en/getting-started/upgrade-guide.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,38 @@ export default createVuetify({
3535

3636
## Components
3737

38+
### VTextField
39+
40+
Removed the **$text-field-details-padding-inline** SASS variable.
41+
42+
```diff { resource="src/styles/settings/_variables.scss" }
43+
@use 'vuetify/settings' with (
44+
- $text-field-details-padding-inline: <value>
45+
+ $input-details-padding-inline: <value>
46+
);
47+
```
48+
49+
### VRadioGroup
50+
51+
Removed the **$radio-group-details-padding-inline** SASS variable.
52+
53+
```diff { resource="src/styles/settings/_variables.scss" }
54+
@use 'vuetify/settings' with (
55+
- $radio-group-details-padding-inline: <value>
56+
+ $input-details-padding-inline: <value>
57+
);
58+
```
59+
60+
### VFileInput
61+
62+
Removed the **$file-input-details-padding-inline** SASS variable.
63+
64+
```diff { resource="src/styles/settings/_variables.scss" }
65+
@use 'vuetify/settings' with (
66+
- $file-input-details-padding-inline: <value>
67+
+ $input-details-padding-inline: <value>
68+
);
69+
3870
### VBtn display
3971

4072
In Vuetify 3, VField's layout was changed from `display: flex` to `display: grid` to better handle its internal elements. However, the grid implementation had limitations with gap control, so in Vuetify 4 we've reverted back to using `display: flex`.

packages/vuetify/src/blueprints/md1.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const md1: Blueprint = {
2424
},
2525
VCheckbox: {
2626
color: 'secondary',
27+
indentDetails: false,
2728
},
2829
VCombobox: {
2930
variant: 'underlined',
@@ -44,6 +45,16 @@ export const md1: Blueprint = {
4445
},
4546
VSlider: {
4647
color: 'primary',
48+
indentDetails: false,
49+
},
50+
VSwitch: {
51+
indentDetails: false,
52+
},
53+
VRadioGroup: {
54+
indentDetails: false,
55+
},
56+
VRangeSlider: {
57+
indentDetails: false,
4758
},
4859
VTabs: {
4960
color: 'primary',

packages/vuetify/src/blueprints/md2.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export const md2: Blueprint = {
2323
},
2424
VCheckbox: {
2525
color: 'secondary',
26+
indentDetails: true,
2627
},
2728
VCombobox: {
2829
variant: 'filled',
@@ -38,11 +39,21 @@ export const md2: Blueprint = {
3839
rounded: 'circle',
3940
},
4041
},
42+
VRadioGroup: {
43+
indentDetails: true,
44+
},
4145
VSelect: {
4246
variant: 'filled',
4347
},
4448
VSlider: {
4549
color: 'primary',
50+
indentDetails: true,
51+
},
52+
VRangeSlider: {
53+
indentDetails: true,
54+
},
55+
VSwitch: {
56+
indentDetails: true,
4657
},
4758
VTabs: {
4859
color: 'primary',

packages/vuetify/src/blueprints/md3.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const md3: Blueprint = {
3232
VCheckbox: {
3333
color: 'secondary',
3434
inset: true,
35+
indentDetails: true,
3536
},
3637
VChip: {
3738
rounded: 'sm',
@@ -74,11 +75,21 @@ export const md3: Blueprint = {
7475
rounded: undefined,
7576
},
7677
},
78+
VRadioGroup: {
79+
indentDetails: true,
80+
},
7781
VSelect: {
7882
variant: 'outlined',
7983
},
8084
VSlider: {
8185
color: 'primary',
86+
indentDetails: true,
87+
},
88+
VRangeSlider: {
89+
indentDetails: true,
90+
},
91+
VSwitch: {
92+
indentDetails: true,
8293
},
8394
VTabs: {
8495
color: 'primary',

packages/vuetify/src/components/VFileInput/VFileInput.sass

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,3 @@
3838

3939
&--dragging input[type="file"]
4040
z-index: 1
41-
42-
.v-input__details
43-
padding-inline: $file-input-details-padding-inline
44-
@at-root #{selector.append('.v-input--plain-underlined', &)}
45-
padding-inline: 0

packages/vuetify/src/components/VFileInput/VFileInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ export const VFileInput = genericComponent<VFileInputSlots>()({
252252
'v-file-input--chips': !!props.chips,
253253
'v-file-input--dragging': isDragging.value,
254254
'v-file-input--hide': props.hideInput,
255-
'v-input--plain-underlined': isPlainOrUnderlined.value,
256255
},
257256
props.class,
258257
]}
@@ -262,6 +261,7 @@ export const VFileInput = genericComponent<VFileInputSlots>()({
262261
{ ...inputProps }
263262
centerAffix={ !isPlainOrUnderlined.value }
264263
focused={ isFocused.value }
264+
indentDetails={ props.indentDetails ?? !isPlainOrUnderlined.value }
265265
>
266266
{{
267267
...slots,

0 commit comments

Comments
 (0)