diff --git a/apps/website/pages/components/number-input/code.tsx b/apps/website/pages/components/number-input/code.tsx new file mode 100644 index 0000000000..367f94ebbb --- /dev/null +++ b/apps/website/pages/components/number-input/code.tsx @@ -0,0 +1,17 @@ +import Head from "next/head"; +import type { ReactElement } from "react"; +import NumberInputCodePage from "screens/components/number-input/code/NumberInputCodePage"; +import NumberInputPageLayout from "screens/components/number-input/NumberInputPageLayout"; + +const Code = () => ( + <> +
+label is
+ provided.
autocomplete attribute. Lets the user specify if any permission the user agent has to
+ provide automated assistance in filling out the input value. Its value must be one of all the possible
+ values of the HTML autocomplete attribute. See{" "}
+ onBlur{" "}
- and onChange functions when it has not been filled.
+ onBlur and onChange functions will be called with the current value and an
internal error informing that the current value is not correct. If a valid state is reached, the error
parameter will not be defined in both events.
@@ -142,12 +125,12 @@ const sections = [
onBlur and onChange functions will be called with the current value and an
internal error informing that the current value is not correct. If a valid state is reached, the error
parameter will not be defined in both events.
@@ -155,14 +138,24 @@ const sections = [
error will not be defined.
error will not be defined.
+ If true, the number will be optional, showing the text '(Optional)' next to the label. Otherwise, the
+ field will be considered required and an error will be passed as a parameter to the onBlur{" "}
+ and onChange functions when it has not been filled.
+ autocomplete attribute. Lets the user specify if any permission the user agent has to
- provide automated assistance in filling out the input value. Its value must be one of all the possible
- values of the HTML autocomplete attribute. See{" "}
- tabindex attribute.
- label is
- provided.
+ Value of the tabindex attribute.
min, max, or{" "}
+ step values when the input must fall within a numeric range to improve accuracy and prevent
+ invalid entries.
+ step values to help users input
+ valid values more efficiently when using spin buttons.
+ color, typography, border, spacing,{" "}
- width and margin specifications are inherited from the text input, for reference
- check the{" "}
-
- label is
+ provided.
autocomplete attribute. Lets the user specify if any permission the user agent has to
+ provide automated assistance in filling out the input value. Its value must be one of all the possible
+ values of the HTML autocomplete attribute. See{" "}
+ error will not be defined.
+ If it is a defined value and also a truthy string, the component will change its appearance, showing the
+ error below the password input component. If the defined value is an empty string, it will reserve a space
+ below the component for a future error, but it would not change its look. In case of being undefined or
+ null, both the appearance and the space for the error message would not be modified.
error will not be defined.
+ onBlur and onChange functions will be called with the current
- value and an internal error informing that this value does not match the pattern. If the pattern is met,
- the error parameter of both events will not be defined.
+ Size of the margin to be applied to the component. You can pass an object with 'top', 'bottom', 'left' and
+ 'right' properties in order to specify different margin sizes.
onBlur and onChange functions will be called with the current value and an
internal error informing that the value length does not comply the specified range. If a valid length is
reached, the error parameter of both events will not be defined.
@@ -134,13 +117,13 @@ const sections = [
onBlur and onChange functions will be called with the current value and an
internal error informing that the value length does not comply the specified range. If a valid length is
reached, the error parameter of both events will not be defined.
@@ -148,32 +131,59 @@ const sections = [
autocomplete attribute. Lets the user specify if any permission the user agent has to
- provide automated assistance in filling out the input value. Its value must be one of all the possible
- values of the HTML autocomplete attribute. See{" "}
- error will not be defined.
error will not be defined.
onBlur and onChange functions will be called with the current
+ value and an internal error informing that this value does not match the pattern. If the pattern is met,
+ the error parameter of both events will not be defined.
+ label is
- provided.
+ Value of the input element. If undefined, the component will be uncontrolled and the value will be managed
+ internally by the component.
color, typography, border, spacing,{" "}
- width and margin specifications are inherited from the text input, for reference
- check the{" "}
-
- Enter key.
- title with a textual cue for the resulting action.
- label is
+ provided.
autocomplete attribute. Lets the user specify if any permission the user agent has to
+ provide automated assistance in filling out the input value. Its value must be one of all the possible
+ values of the HTML autocomplete attribute. See{" "}
+ onBlur and{" "}
- onChange functions when it has not been filled.
+ onClick event.
+ onBlur and onChange functions will be called with the current value and an
+ internal error informing that the value length does not comply the specified range. If a valid length is
+ reached, the error parameter of both events will not be defined.
error will not be defined.
+ Specifies the minimum length allowed by the input. This will be checked both when the input element loses
+ the focus and while typing within it. If the string entered does not comply the minimum length, the{" "}
+ onBlur and onChange functions will be called with the current value and an
+ internal error informing that the value length does not comply the specified range. If a valid length is
+ reached, the error parameter of both events will not be defined.
error will not be defined.
onBlur and{" "}
+ onChange functions when it has not been filled.
+ onBlur and onChange functions will be called with the current value and an
- internal error informing that the value length does not comply the specified range. If a valid length is
- reached, the error parameter of both events will not be defined.
+ onBlur and onChange functions will be called with the current value and an
- internal error informing that the value length does not comply the specified range. If a valid length is
- reached, the error parameter of both events will not be defined.
+ autocomplete attribute. Lets the user specify if any permission the user agent has to
- provide automated assistance in filling out the input value. Its value must be one of all the possible
- values of the HTML autocomplete attribute. See{" "}
- onClick event.
tabindex attribute.
+ tabindex attribute.
+ label is
- provided.
+ Value of the input. If undefined, the component will be uncontrolled and the value will be managed
+ internally by the component.
labelFontColor
- color-black
- valueFontColor
- color-black
- helperTextFontColor
- color-black
- placeholderFontColor
- color-grey-600
- enabledBorderColor
- color-black
- actionIconColor
- color-black
- actionBackgroundColor
- color-transparent
- suffixColor
- color-grey-700
- prefixColor
- color-grey-700
- listOptionFontColor
- color-black
- listOptionDividerColor
- color-grey-200
- listDialogBorderColor
- color-grey-400
- listDialogBackgroundColor
- color-white
- systemMessageFontColor
- color-grey-700
- hoverBorderColor
- color-purple-500
- focusBorderColor
- color-blue-600
- errorBorderColor
- color-red-700
- hoverErrorBorderColor
- color-red-600
- disabledBorderColor
- color-grey-500
- readOnlyBorderColor
- color-grey-500
- hoverReadOnlyBorderColor
- color-grey-600
- errorMessageColor
- color-red-700
- disabledContainerFillColor
- color-grey-100
- disabledLabelFontColor
- color-grey-500
- disabledValueFontColor
- color-grey-500
- disabledHelperTextFontColor
- color-grey-500
- disabledPlaceholderFontColor
- color-grey-500
- hoverActionBackgroundColor
- color-grey-100
- focusActionBorderColor
- color-blue-600
- activeActionBackgroundColor
- color-grey-300
- disabledActionBackgroundColor
- color-transparent
- hoverActionIconColor
- color-black
- focusActionIconColor
- color-black
- activeActionIconColor
- color-black
- disabledActionIconColor
- color-grey-500
- disabledSuffixColor
- color-grey-400
- disabledPrefixColor
- color-grey-400
- hoverListOptionBackgroundColor
- color-grey-100
- focusListOptionBorderColor
- color-blue-600
- activeListOptionBackgroundColor
- color-grey-200
- errorListDialogFontColor
- color-black
- errorListDialogBackgroundColor
- color-red-50
- errorListDialogBorderColor
- color-red-700
- fontFamily
- font-family-sans
- labelFontSize
- font-scale-02
- labelFontWeight
- font-weight-bold
- labelFontStyle
- font-style-normal
- labelLineHeight
- font-leading-loose-01
- valueFontSize
- font-scale-03
- valueFontWeight
- font-weight-regular
- valueFontStyle
- font-style-normal
- helperTextFontSize
- font-scale-01
- helperTextFontWeight
- font-weight-regular
- helperTextFontStyle
- font-style-normal
- helperTextLineHeight
- font-leading-normal
- optionalLabelFontWeight
- font-weight-regular
- listOptionFontSize
- font-scale-02
- listOptionFontWeight
- font-weight-regular
- listOptionFontStyle
- font-style-normal
- font-size
- font-scale-01
- font-weight
- font-weight-regular
- line-height
- font-leading-normal
- line-height
- font-leading-normal
- font-size
- font-scale-03
- font-weight
- font-regular
- font-weight
- font-bold
- font-size
- font-scale-02
- font-weight
- font-regular
- inputMarginTop
- spacing-4
- inputMarginBottom
- spacing-4
- prefixDividerPaddingRight
- spacing-8
- suffixDividerPaddingLeft
- spacing-8
- margin-left
- spacing-4
- margin-left
- spacing-4
- margin-left
- spacing-4
- padding-right
- spacing-8
- padding-left
- spacing-8
- margin-left
- spacing-4
- margin-right
- spacing-4
- padding-left
- spacing-8
- padding-right
- spacing-8
- padding-left
- spacing-8
- padding-right
- spacing-8
- padding-top
- spacing-4
- padding-bottom
- spacing-4
- padding-left
- spacing-8
- padding-right
- spacing-8
- padding-top
- spacing-2
- padding-bottom
- spacing-2
- padding-left
- spacing-8
- padding-right
- spacing-8
- prefixDividerBorderWidth
- prefixDividerBorderStyle
- border-style-solid
- suffixDividerBorderWidth
- suffixDividerBorderStyle
- border-style-solid
- border
- border-width-1
- border
- border-style-solid
- border
- border-width-1
- border
- border-style-solid
- box-shadow
- box-shadow
- border
- border-width-1
- border
- border-style-solid
- border
- border-radius-medium
- border
- border-width-1
- border
- border-style-solid
- box-shadow
- shadow-default
- small
- medium
- large
- fillParent
- xxsmall
- xsmall
- small
- medium
- large
- xlarge
- xxlarge
- top, bottom,{" "}
- left and right.
-