fix(input): default to soft shape

This commit is contained in:
Brandy Carney
2024-04-12 10:26:53 -04:00
parent 33a7186575
commit 15048095b3
4 changed files with 19 additions and 7 deletions

View File

@@ -1463,9 +1463,9 @@ export namespace Components {
*/
"setFocus": () => Promise<void>;
/**
* The shape of the input. If "round" it will have an increased border radius.
* Set to `"soft"` for an input with soft rounded corners, `"round"` for an input with fully rounded corners, or `"rectangular" for an input without rounded corners. Defaults to `"soft"`.
*/
"shape"?: 'round';
"shape"?: 'soft' | 'round';
/**
* If `true`, the element will have its spelling and grammar checked.
*/
@@ -6723,9 +6723,9 @@ declare namespace LocalJSX {
*/
"required"?: boolean;
/**
* The shape of the input. If "round" it will have an increased border radius.
* Set to `"soft"` for an input with soft rounded corners, `"round"` for an input with fully rounded corners, or `"rectangular" for an input without rounded corners. Defaults to `"soft"`.
*/
"shape"?: 'round';
"shape"?: 'soft' | 'round';
/**
* If `true`, the element will have its spelling and grammar checked.
*/

View File

@@ -5,13 +5,16 @@
:host(.input-fill-outline) {
--border-color: #{$background-color-step-300};
--border-radius: 4px;
--padding-start: 16px;
--padding-end: 16px;
min-height: 56px;
}
:host(.input-fill-outline.input-shape-soft) {
--border-radius: 4px;
}
:host(.input-fill-outline.input-shape-round) {
--border-radius: 28px;
--padding-start: 32px;

View File

@@ -6,13 +6,16 @@
:host(.input-fill-solid) {
--background: #{$background-color-step-50};
--border-color: #{$background-color-step-500};
--border-radius: 4px;
--padding-start: 16px;
--padding-end: 16px;
min-height: 56px;
}
:host(.input-fill-solid.input-shape-soft) {
--border-radius: 4px;
}
/**
* The solid fill style has a border
* at the bottom of the input wrapper.

View File

@@ -242,8 +242,14 @@ export class Input implements ComponentInterface {
/**
* The shape of the input. If "round" it will have an increased border radius.
*
*/
@Prop() shape?: 'round';
/**
* Set to `"soft"` for an input with soft rounded corners, `"round"` for an input
* with fully rounded corners, or `"rectangular" for an input without rounded corners.
* Defaults to `"soft"`.
*/
@Prop() shape?: 'soft' | 'round' = 'soft';
/**
* If `true`, the element will have its spelling and grammar checked.