@audira/carbon-react-native 1.0.0-beta.7 → 1.0.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/modal/Modal.js +19 -15
- package/lib/commonjs/components/modal/Modal.js.map +1 -1
- package/lib/module/components/modal/Modal.js +19 -15
- package/lib/module/components/modal/Modal.js.map +1 -1
- package/lib/typescript/commonjs/components/modal/Modal.d.ts.map +1 -1
- package/lib/typescript/module/components/modal/Modal.d.ts.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/src/_internal/contexts/button-group/ButtonGroupContext.ts +25 -0
- package/src/_internal/contexts/button-group/index.tsx +1 -0
- package/src/_internal/contexts/global-config/GlobalConfigContext.ts +30 -0
- package/src/_internal/contexts/global-config/index.ts +1 -0
- package/src/_internal/contexts/index.ts +3 -0
- package/src/_internal/contexts/modal/ModalContext.ts +15 -0
- package/src/_internal/contexts/modal/index.ts +1 -0
- package/src/_internal/globals/breakpoint/index.ts +13 -0
- package/src/_internal/globals/color-scheme/index.ts +13 -0
- package/src/_internal/globals/index.ts +7 -0
- package/src/_internal/helpers/index.ts +5 -0
- package/src/_internal/helpers/math/clamp.ts +3 -0
- package/src/_internal/helpers/math/index.ts +1 -0
- package/src/_internal/providers/breakpoint/BreakpointProvider.tsx +42 -0
- package/src/_internal/providers/breakpoint/BreakpointProviderProps.ts +3 -0
- package/src/_internal/providers/breakpoint/index.tsx +2 -0
- package/src/_internal/providers/global-config/GlobalConfigProvider.tsx +30 -0
- package/src/_internal/providers/global-config/GlobalConfigProviderProps.ts +7 -0
- package/src/_internal/providers/global-config/index.tsx +2 -0
- package/src/_internal/providers/index.ts +3 -0
- package/src/_internal/providers/theme/ThemeProvider.tsx +45 -0
- package/src/_internal/providers/theme/ThemeProviderProps.ts +8 -0
- package/src/_internal/providers/theme/index.tsx +2 -0
- package/src/_internal/style-sheets/common-style-sheet.ts +24 -0
- package/src/_internal/style-sheets/flex-style-sheet.ts +84 -0
- package/src/_internal/style-sheets/index.ts +3 -0
- package/src/_internal/style-sheets/text-style-sheet.ts +62 -0
- package/src/carbon-react-native/CarbonReactNative.tsx +41 -0
- package/src/carbon-react-native/CarbonReactNativeProps.ts +7 -0
- package/src/carbon-react-native/index.tsx +2 -0
- package/src/carbon-style-sheet/breakpoint.ts +16 -0
- package/src/carbon-style-sheet/color.ts +13 -0
- package/src/carbon-style-sheet/create.ts +232 -0
- package/src/carbon-style-sheet/index.tsx +51 -0
- package/src/carbon-style-sheet/use.tsx +16 -0
- package/src/components/accordion/Accordion.tsx +132 -0
- package/src/components/accordion/AccordionHeaderProps.ts +17 -0
- package/src/components/accordion/AccordionItemProps.ts +24 -0
- package/src/components/accordion/AccordionItemRef.ts +10 -0
- package/src/components/accordion/AccordionProps.ts +19 -0
- package/src/components/accordion/AccordionRef.ts +6 -0
- package/src/components/accordion/AccordionSize.ts +4 -0
- package/src/components/accordion/_Header.tsx +201 -0
- package/src/components/accordion/_HeaderBorder.tsx +75 -0
- package/src/components/accordion/_Item.tsx +175 -0
- package/src/components/accordion/_ItemRefBase.ts +7 -0
- package/src/components/accordion/_chevron/Chevron.tsx +97 -0
- package/src/components/accordion/_chevron/ChevronProps.ts +10 -0
- package/src/components/accordion/_chevron/index.ts +2 -0
- package/src/components/accordion/_context.ts +20 -0
- package/src/components/accordion/_motion.ts +27 -0
- package/src/components/accordion/_styles.ts +24 -0
- package/src/components/accordion/index.tsx +7 -0
- package/src/components/button/Size.ts +7 -0
- package/src/components/button/base/Base.tsx +328 -0
- package/src/components/button/base/BaseProps.ts +60 -0
- package/src/components/button/base/BaseRef.ts +6 -0
- package/src/components/button/base/index.tsx +3 -0
- package/src/components/button/base-color/BaseColor.tsx +289 -0
- package/src/components/button/base-color/BaseColorProps.ts +32 -0
- package/src/components/button/base-color/BaseColorRef.ts +6 -0
- package/src/components/button/base-color/BaseColorState.ts +6 -0
- package/src/components/button/base-color/index.tsx +4 -0
- package/src/components/button/ghost/Ghost.tsx +165 -0
- package/src/components/button/ghost/GhostProps.ts +10 -0
- package/src/components/button/ghost/GhostRef.ts +6 -0
- package/src/components/button/ghost/index.tsx +3 -0
- package/src/components/button/ghost-danger/GhostDanger.tsx +165 -0
- package/src/components/button/ghost-danger/GhostDangerProps.ts +10 -0
- package/src/components/button/ghost-danger/GhostDangerRef.ts +6 -0
- package/src/components/button/ghost-danger/index.tsx +3 -0
- package/src/components/button/ghost-icon/GhostIcon.tsx +127 -0
- package/src/components/button/ghost-icon/GhostIconProps.ts +17 -0
- package/src/components/button/ghost-icon/GhostIconRef.ts +6 -0
- package/src/components/button/ghost-icon/index.tsx +3 -0
- package/src/components/button/index.tsx +11 -0
- package/src/components/button/primary/Primary.tsx +140 -0
- package/src/components/button/primary/PrimaryProps.ts +11 -0
- package/src/components/button/primary/PrimaryRef.ts +6 -0
- package/src/components/button/primary/index.tsx +3 -0
- package/src/components/button/primary-danger/PrimaryDanger.tsx +140 -0
- package/src/components/button/primary-danger/PrimaryDangerProps.ts +12 -0
- package/src/components/button/primary-danger/PrimaryDangerRef.ts +6 -0
- package/src/components/button/primary-danger/index.tsx +3 -0
- package/src/components/button/secondary/Secondary.tsx +140 -0
- package/src/components/button/secondary/SecondaryProps.ts +12 -0
- package/src/components/button/secondary/SecondaryRef.ts +6 -0
- package/src/components/button/secondary/index.tsx +3 -0
- package/src/components/button/tertiary/Tertiary.tsx +157 -0
- package/src/components/button/tertiary/TertiaryProps.ts +12 -0
- package/src/components/button/tertiary/TertiaryRef.ts +6 -0
- package/src/components/button/tertiary/index.tsx +3 -0
- package/src/components/button/tertiary-danger/TertiaryDanger.tsx +157 -0
- package/src/components/button/tertiary-danger/TertiaryDangerProps.ts +12 -0
- package/src/components/button/tertiary-danger/TertiaryDangerRef.ts +6 -0
- package/src/components/button/tertiary-danger/index.tsx +3 -0
- package/src/components/button-group/ButtonGroup.tsx +145 -0
- package/src/components/button-group/ButtonGroupProps.ts +37 -0
- package/src/components/button-group/ButtonGroupRef.ts +6 -0
- package/src/components/button-group/index.tsx +3 -0
- package/src/components/checkbox/Checkbox.tsx +221 -0
- package/src/components/checkbox/CheckboxProps.ts +39 -0
- package/src/components/checkbox/CheckboxRef.ts +10 -0
- package/src/components/checkbox/_RefBase.ts +11 -0
- package/src/components/checkbox/index.tsx +3 -0
- package/src/components/checkbox-group/CheckboxGroup.tsx +227 -0
- package/src/components/checkbox-group/CheckboxGroupHelperTextMode.ts +4 -0
- package/src/components/checkbox-group/CheckboxGroupProps.ts +28 -0
- package/src/components/checkbox-group/CheckboxGroupRef.ts +6 -0
- package/src/components/checkbox-group/index.tsx +4 -0
- package/src/components/checkbox-input/CheckboxInput.tsx +340 -0
- package/src/components/checkbox-input/CheckboxInputInteractiveState.ts +6 -0
- package/src/components/checkbox-input/CheckboxInputProps.ts +25 -0
- package/src/components/checkbox-input/CheckboxInputRef.ts +11 -0
- package/src/components/checkbox-input/CheckboxInputValue.ts +6 -0
- package/src/components/checkbox-input/_RefBase.ts +11 -0
- package/src/components/checkbox-input/index.tsx +5 -0
- package/src/components/collapsible/Collapsible.tsx +274 -0
- package/src/components/collapsible/CollapsibleProps.ts +17 -0
- package/src/components/collapsible/CollapsibleRef.ts +11 -0
- package/src/components/collapsible/_RefBase.ts +6 -0
- package/src/components/collapsible/index.ts +3 -0
- package/src/components/form-helper-text/FormHelperText.tsx +109 -0
- package/src/components/form-helper-text/FormHelperTextProps.ts +15 -0
- package/src/components/form-helper-text/FormHelperTextRef.ts +6 -0
- package/src/components/form-helper-text/index.tsx +3 -0
- package/src/components/form-label/FormLabel.tsx +85 -0
- package/src/components/form-label/FormLabelProps.ts +17 -0
- package/src/components/form-label/FormLabelRef.ts +6 -0
- package/src/components/form-label/index.tsx +3 -0
- package/src/components/icon/Icon.tsx +48 -0
- package/src/components/icon/IconProps.ts +11 -0
- package/src/components/icon/index.tsx +2 -0
- package/src/components/index.tsx +35 -0
- package/src/components/inline-loading/InlineLoading.tsx +144 -0
- package/src/components/inline-loading/InlineLoadingProps.ts +24 -0
- package/src/components/inline-loading/InlineLoadingRef.ts +6 -0
- package/src/components/inline-loading/InlineLoadingState.ts +5 -0
- package/src/components/inline-loading/index.tsx +4 -0
- package/src/components/layer/Layer.tsx +87 -0
- package/src/components/layer/LayerContext.ts +9 -0
- package/src/components/layer/LayerProps.ts +16 -0
- package/src/components/layer/LayerRef.ts +6 -0
- package/src/components/layer/index.tsx +4 -0
- package/src/components/loading/Loading.tsx +116 -0
- package/src/components/loading/LoadingProps.ts +14 -0
- package/src/components/loading/LoadingRef.ts +4 -0
- package/src/components/loading/LoadingType.ts +3 -0
- package/src/components/loading/_circular-progress/CircularProgress.tsx +113 -0
- package/src/components/loading/_circular-progress/CircularProgressProps.ts +18 -0
- package/src/components/loading/_circular-progress/index.ts +2 -0
- package/src/components/loading/_map-circle-background-color.ts +26 -0
- package/src/components/loading/_map-circle-stroke-color.ts +13 -0
- package/src/components/loading/index.ts +4 -0
- package/src/components/modal/Modal.tsx +397 -0
- package/src/components/modal/ModalProps.ts +24 -0
- package/src/components/modal/ModalRef.ts +6 -0
- package/src/components/modal/ModalSize.ts +5 -0
- package/src/components/modal/index.tsx +4 -0
- package/src/components/modal-content/ModalContent.tsx +182 -0
- package/src/components/modal-content/ModalContentProps.ts +7 -0
- package/src/components/modal-content/ModalContentRef.ts +6 -0
- package/src/components/modal-content/index.tsx +3 -0
- package/src/components/notification/NotificationColor.ts +3 -0
- package/src/components/notification/_VariantContextProvider.tsx +39 -0
- package/src/components/notification/_status-hooks/_base/UseBaseData.ts +11 -0
- package/src/components/notification/_status-hooks/_base/UseBaseProps.ts +21 -0
- package/src/components/notification/_status-hooks/_base/index.tsx +3 -0
- package/src/components/notification/_status-hooks/_base/useBase.tsx +77 -0
- package/src/components/notification/_status-hooks/error/UseErrorData.ts +11 -0
- package/src/components/notification/_status-hooks/error/UseErrorProps.ts +8 -0
- package/src/components/notification/_status-hooks/error/index.tsx +3 -0
- package/src/components/notification/_status-hooks/error/useError.tsx +122 -0
- package/src/components/notification/_status-hooks/index.tsx +4 -0
- package/src/components/notification/_status-hooks/informational/UseInformationalData.ts +11 -0
- package/src/components/notification/_status-hooks/informational/UseInformationalProps.ts +8 -0
- package/src/components/notification/_status-hooks/informational/index.tsx +3 -0
- package/src/components/notification/_status-hooks/informational/useInformational.tsx +122 -0
- package/src/components/notification/_status-hooks/success/UseSuccessData.ts +11 -0
- package/src/components/notification/_status-hooks/success/UseSuccessProps.ts +8 -0
- package/src/components/notification/_status-hooks/success/index.tsx +3 -0
- package/src/components/notification/_status-hooks/success/useSuccess.tsx +122 -0
- package/src/components/notification/_status-hooks/warning/UseWarningData.ts +11 -0
- package/src/components/notification/_status-hooks/warning/UseWarningProps.ts +8 -0
- package/src/components/notification/_status-hooks/warning/index.tsx +3 -0
- package/src/components/notification/_status-hooks/warning/useWarning.tsx +122 -0
- package/src/components/notification/_variant-context.ts +15 -0
- package/src/components/notification/_variants/_ButtonGhost.tsx +73 -0
- package/src/components/notification/_variants/_ButtonTertiary.tsx +73 -0
- package/src/components/notification/_variants/actionable/ActionableVariant.tsx +70 -0
- package/src/components/notification/_variants/actionable/ActionableVariantProps.ts +46 -0
- package/src/components/notification/_variants/actionable/ActionableVariantRef.ts +6 -0
- package/src/components/notification/_variants/actionable/index.tsx +3 -0
- package/src/components/notification/_variants/actionable-inline/ActionableInlineVariant.tsx +70 -0
- package/src/components/notification/_variants/actionable-inline/ActionableInlineVariantProps.ts +46 -0
- package/src/components/notification/_variants/actionable-inline/ActionableInlineVariantRef.ts +6 -0
- package/src/components/notification/_variants/actionable-inline/index.tsx +3 -0
- package/src/components/notification/_variants/callout/CalloutVariant.tsx +59 -0
- package/src/components/notification/_variants/callout/CalloutVariantProps.ts +26 -0
- package/src/components/notification/_variants/callout/CalloutVariantRef.ts +6 -0
- package/src/components/notification/_variants/callout/index.tsx +3 -0
- package/src/components/notification/_variants/callout-inline/CalloutInlineVariant.tsx +59 -0
- package/src/components/notification/_variants/callout-inline/CalloutInlineVariantProps.ts +26 -0
- package/src/components/notification/_variants/callout-inline/CalloutInlineVariantRef.ts +6 -0
- package/src/components/notification/_variants/callout-inline/index.tsx +3 -0
- package/src/components/notification/_variants/index.tsx +5 -0
- package/src/components/notification/_variants/toast/ToastVariant.tsx +115 -0
- package/src/components/notification/_variants/toast/ToastVariantProps.ts +30 -0
- package/src/components/notification/_variants/toast/ToastVariantRef.ts +6 -0
- package/src/components/notification/_variants/toast/index.tsx +3 -0
- package/src/components/notification/actionable/error/Error.tsx +78 -0
- package/src/components/notification/actionable/error/ErrorProps.ts +14 -0
- package/src/components/notification/actionable/error/ErrorRef.ts +6 -0
- package/src/components/notification/actionable/error/index.tsx +3 -0
- package/src/components/notification/actionable/index.tsx +4 -0
- package/src/components/notification/actionable/informational/Informational.tsx +78 -0
- package/src/components/notification/actionable/informational/InformationalProps.ts +14 -0
- package/src/components/notification/actionable/informational/InformationalRef.ts +6 -0
- package/src/components/notification/actionable/informational/index.tsx +3 -0
- package/src/components/notification/actionable/success/Success.tsx +78 -0
- package/src/components/notification/actionable/success/SuccessProps.ts +14 -0
- package/src/components/notification/actionable/success/SuccessRef.ts +6 -0
- package/src/components/notification/actionable/success/index.tsx +3 -0
- package/src/components/notification/actionable/warning/Warning.tsx +78 -0
- package/src/components/notification/actionable/warning/WarningProps.ts +14 -0
- package/src/components/notification/actionable/warning/WarningRef.ts +6 -0
- package/src/components/notification/actionable/warning/index.tsx +3 -0
- package/src/components/notification/actionable-inline/error/Error.tsx +77 -0
- package/src/components/notification/actionable-inline/error/ErrorProps.ts +14 -0
- package/src/components/notification/actionable-inline/error/ErrorRef.ts +6 -0
- package/src/components/notification/actionable-inline/error/index.tsx +3 -0
- package/src/components/notification/actionable-inline/index.tsx +4 -0
- package/src/components/notification/actionable-inline/informational/Informational.tsx +77 -0
- package/src/components/notification/actionable-inline/informational/InformationalProps.ts +14 -0
- package/src/components/notification/actionable-inline/informational/InformationalRef.ts +6 -0
- package/src/components/notification/actionable-inline/informational/index.tsx +3 -0
- package/src/components/notification/actionable-inline/success/Success.tsx +77 -0
- package/src/components/notification/actionable-inline/success/SuccessProps.ts +14 -0
- package/src/components/notification/actionable-inline/success/SuccessRef.ts +6 -0
- package/src/components/notification/actionable-inline/success/index.tsx +3 -0
- package/src/components/notification/actionable-inline/warning/Warning.tsx +77 -0
- package/src/components/notification/actionable-inline/warning/WarningProps.ts +14 -0
- package/src/components/notification/actionable-inline/warning/WarningRef.ts +6 -0
- package/src/components/notification/actionable-inline/warning/index.tsx +3 -0
- package/src/components/notification/base/Base.tsx +292 -0
- package/src/components/notification/base/BaseProps.ts +59 -0
- package/src/components/notification/base/BaseRef.ts +6 -0
- package/src/components/notification/base/index.tsx +3 -0
- package/src/components/notification/callout/error/Error.tsx +78 -0
- package/src/components/notification/callout/error/ErrorProps.ts +14 -0
- package/src/components/notification/callout/error/ErrorRef.ts +6 -0
- package/src/components/notification/callout/error/index.tsx +3 -0
- package/src/components/notification/callout/index.tsx +4 -0
- package/src/components/notification/callout/informational/Informational.tsx +78 -0
- package/src/components/notification/callout/informational/InformationalProps.ts +14 -0
- package/src/components/notification/callout/informational/InformationalRef.ts +6 -0
- package/src/components/notification/callout/informational/index.tsx +3 -0
- package/src/components/notification/callout/success/Success.tsx +78 -0
- package/src/components/notification/callout/success/SuccessProps.ts +14 -0
- package/src/components/notification/callout/success/SuccessRef.ts +6 -0
- package/src/components/notification/callout/success/index.tsx +3 -0
- package/src/components/notification/callout/warning/Warning.tsx +78 -0
- package/src/components/notification/callout/warning/WarningProps.ts +14 -0
- package/src/components/notification/callout/warning/WarningRef.ts +6 -0
- package/src/components/notification/callout/warning/index.tsx +3 -0
- package/src/components/notification/callout-inline/error/Error.tsx +77 -0
- package/src/components/notification/callout-inline/error/ErrorProps.ts +14 -0
- package/src/components/notification/callout-inline/error/ErrorRef.ts +6 -0
- package/src/components/notification/callout-inline/error/index.tsx +3 -0
- package/src/components/notification/callout-inline/index.tsx +4 -0
- package/src/components/notification/callout-inline/informational/Informational.tsx +77 -0
- package/src/components/notification/callout-inline/informational/InformationalProps.ts +14 -0
- package/src/components/notification/callout-inline/informational/InformationalRef.ts +6 -0
- package/src/components/notification/callout-inline/informational/index.tsx +3 -0
- package/src/components/notification/callout-inline/success/Success.tsx +77 -0
- package/src/components/notification/callout-inline/success/SuccessProps.ts +14 -0
- package/src/components/notification/callout-inline/success/SuccessRef.ts +6 -0
- package/src/components/notification/callout-inline/success/index.tsx +3 -0
- package/src/components/notification/callout-inline/warning/Warning.tsx +77 -0
- package/src/components/notification/callout-inline/warning/WarningProps.ts +14 -0
- package/src/components/notification/callout-inline/warning/WarningRef.ts +6 -0
- package/src/components/notification/callout-inline/warning/index.tsx +3 -0
- package/src/components/notification/index.tsx +18 -0
- package/src/components/notification/subtitle/Subtitle.tsx +75 -0
- package/src/components/notification/subtitle/SubtitleProps.ts +6 -0
- package/src/components/notification/subtitle/SubtitleRef.ts +6 -0
- package/src/components/notification/subtitle/index.tsx +3 -0
- package/src/components/notification/subtitle-link/SubtitleLink.tsx +74 -0
- package/src/components/notification/subtitle-link/SubtitleLinkProps.ts +6 -0
- package/src/components/notification/subtitle-link/SubtitleLinkRef.ts +6 -0
- package/src/components/notification/subtitle-link/index.tsx +3 -0
- package/src/components/notification/toast/error/Error.tsx +78 -0
- package/src/components/notification/toast/error/ErrorProps.ts +14 -0
- package/src/components/notification/toast/error/ErrorRef.ts +6 -0
- package/src/components/notification/toast/error/index.tsx +3 -0
- package/src/components/notification/toast/index.tsx +4 -0
- package/src/components/notification/toast/informational/Informational.tsx +78 -0
- package/src/components/notification/toast/informational/InformationalProps.ts +14 -0
- package/src/components/notification/toast/informational/InformationalRef.ts +6 -0
- package/src/components/notification/toast/informational/index.tsx +3 -0
- package/src/components/notification/toast/success/Success.tsx +78 -0
- package/src/components/notification/toast/success/SuccessProps.ts +14 -0
- package/src/components/notification/toast/success/SuccessRef.ts +6 -0
- package/src/components/notification/toast/success/index.tsx +3 -0
- package/src/components/notification/toast/warning/Warning.tsx +78 -0
- package/src/components/notification/toast/warning/WarningProps.ts +14 -0
- package/src/components/notification/toast/warning/WarningRef.ts +6 -0
- package/src/components/notification/toast/warning/index.tsx +3 -0
- package/src/components/radio-button/RadioButton.tsx +216 -0
- package/src/components/radio-button/RadioButtonProps.ts +44 -0
- package/src/components/radio-button/RadioButtonRef.ts +10 -0
- package/src/components/radio-button/_RefBase.ts +11 -0
- package/src/components/radio-button/index.tsx +3 -0
- package/src/components/radio-button-group/RadioButtonGroup.tsx +246 -0
- package/src/components/radio-button-group/RadioButtonGroupHelperTextMode.ts +4 -0
- package/src/components/radio-button-group/RadioButtonGroupItemProps.ts +10 -0
- package/src/components/radio-button-group/RadioButtonGroupItemRef.ts +6 -0
- package/src/components/radio-button-group/RadioButtonGroupProps.ts +35 -0
- package/src/components/radio-button-group/RadioButtonGroupRef.ts +10 -0
- package/src/components/radio-button-group/_Item.tsx +101 -0
- package/src/components/radio-button-group/_RefBase.ts +11 -0
- package/src/components/radio-button-group/_item-context.tsx +18 -0
- package/src/components/radio-button-group/index.tsx +6 -0
- package/src/components/radio-button-input/RadioButtonInput.tsx +295 -0
- package/src/components/radio-button-input/RadioButtonInputInteractiveState.ts +6 -0
- package/src/components/radio-button-input/RadioButtonInputProps.ts +25 -0
- package/src/components/radio-button-input/RadioButtonInputRef.ts +10 -0
- package/src/components/radio-button-input/_RefBase.ts +7 -0
- package/src/components/radio-button-input/index.tsx +4 -0
- package/src/components/switch/Switch.tsx +487 -0
- package/src/components/switch/SwitchProps.ts +38 -0
- package/src/components/switch/SwitchRef.ts +10 -0
- package/src/components/switch/SwitchSize.ts +4 -0
- package/src/components/switch/SwitchState.ts +4 -0
- package/src/components/switch/_RefBase.ts +7 -0
- package/src/components/switch/index.ts +5 -0
- package/src/components/text/Text.tsx +171 -0
- package/src/components/text/TextProps.ts +20 -0
- package/src/components/text/TextRef.ts +6 -0
- package/src/components/text/index.ts +3 -0
- package/src/components/text-area/TextArea.tsx +266 -0
- package/src/components/text-area/TextAreaProps.ts +13 -0
- package/src/components/text-area/TextAreaRef.ts +10 -0
- package/src/components/text-area/_TextAreaRefBase.ts +7 -0
- package/src/components/text-area/index.tsx +3 -0
- package/src/components/text-area-field/TextAreaField.tsx +75 -0
- package/src/components/text-area-field/TextAreaFieldInteractiveState.ts +5 -0
- package/src/components/text-area-field/TextAreaFieldProps.ts +6 -0
- package/src/components/text-area-field/TextAreaFieldRef.ts +6 -0
- package/src/components/text-area-field/index.tsx +4 -0
- package/src/components/text-area-fluid/TextAreaFluid.tsx +157 -0
- package/src/components/text-area-fluid/TextAreaFluidProps.ts +13 -0
- package/src/components/text-area-fluid/TextAreaFluidRef.ts +6 -0
- package/src/components/text-area-fluid/index.tsx +3 -0
- package/src/components/text-input/TextInput.tsx +270 -0
- package/src/components/text-input/TextInputProps.ts +13 -0
- package/src/components/text-input/TextInputRef.ts +10 -0
- package/src/components/text-input/TextInputSize.ts +5 -0
- package/src/components/text-input/_TextInputRefBase.ts +7 -0
- package/src/components/text-input/index.ts +4 -0
- package/src/components/text-input-field/TextInputField.tsx +435 -0
- package/src/components/text-input-field/TextInputFieldInteractiveState.ts +6 -0
- package/src/components/text-input-field/TextInputFieldProps.ts +31 -0
- package/src/components/text-input-field/TextInputFieldRef.ts +8 -0
- package/src/components/text-input-field/TextInputFieldSize.ts +4 -0
- package/src/components/text-input-field/_rn-text-input/RNTextInput.tsx +161 -0
- package/src/components/text-input-field/_rn-text-input/RNTextInputProps.ts +11 -0
- package/src/components/text-input-field/_rn-text-input/RNTextInputRef.ts +6 -0
- package/src/components/text-input-field/_rn-text-input/index.ts +3 -0
- package/src/components/text-input-field/index.tsx +5 -0
- package/src/components/text-input-fluid/TextInputFluid.tsx +166 -0
- package/src/components/text-input-fluid/TextInputFluidProps.ts +14 -0
- package/src/components/text-input-fluid/TextInputFluidRef.ts +6 -0
- package/src/components/text-input-fluid/index.tsx +3 -0
- package/src/components/toggle/State.ts +5 -0
- package/src/components/toggle/base/Base.tsx +302 -0
- package/src/components/toggle/base/BaseProps.ts +54 -0
- package/src/components/toggle/base/BaseRef.ts +10 -0
- package/src/components/toggle/base/_RefBase.ts +11 -0
- package/src/components/toggle/base/index.tsx +3 -0
- package/src/components/toggle/default/Default.tsx +38 -0
- package/src/components/toggle/default/DefaultProps.ts +9 -0
- package/src/components/toggle/default/DefaultRef.ts +6 -0
- package/src/components/toggle/default/index.tsx +3 -0
- package/src/components/toggle/index.tsx +4 -0
- package/src/components/toggle/small/Small.tsx +38 -0
- package/src/components/toggle/small/SmallProps.ts +7 -0
- package/src/components/toggle/small/SmallRef.ts +6 -0
- package/src/components/toggle/small/index.tsx +3 -0
- package/src/const/dialog-animation-configs/carbon-react.ts +53 -0
- package/src/const/dialog-animation-configs/fade-bottom-up-2.ts +36 -0
- package/src/const/dialog-animation-configs/fade-bottom-up.ts +36 -0
- package/src/const/dialog-animation-configs/index.ts +3 -0
- package/src/const/index.ts +5 -0
- package/src/contexts/breakpoint/BreakpointContext.ts +19 -0
- package/src/contexts/breakpoint/index.ts +1 -0
- package/src/contexts/dialog/DialogContext.ts +27 -0
- package/src/contexts/dialog/DialogData.ts +27 -0
- package/src/contexts/dialog/DialogType.ts +7 -0
- package/src/contexts/dialog/index.ts +2 -0
- package/src/contexts/index.ts +4 -0
- package/src/contexts/theme/ThemeContext.ts +24 -0
- package/src/contexts/theme/index.ts +1 -0
- package/src/contexts/toast/ToastContext.ts +24 -0
- package/src/contexts/toast/ToastContextShowConfig.ts +6 -0
- package/src/contexts/toast/index.ts +2 -0
- package/src/helpers/breakpoint/get-token.ts +20 -0
- package/src/helpers/breakpoint/index.ts +1 -0
- package/src/helpers/color/get-color-scheme.ts +19 -0
- package/src/helpers/color/get-color-token.ts +23 -0
- package/src/helpers/color/hex-to-rgba.ts +11 -0
- package/src/helpers/color/index.ts +3 -0
- package/src/helpers/index.ts +7 -0
- package/src/hooks/breakpoint/index.tsx +1 -0
- package/src/hooks/breakpoint/use.tsx +30 -0
- package/src/hooks/index.tsx +9 -0
- package/src/index.ts +9 -0
- package/src/providers/dialog/DialogProvider.tsx +122 -0
- package/src/providers/dialog/DialogProviderAnimationConfig.ts +49 -0
- package/src/providers/dialog/DialogProviderProps.ts +28 -0
- package/src/providers/dialog/DialogProviderRef.ts +6 -0
- package/src/providers/dialog/_controller/Controller.tsx +223 -0
- package/src/providers/dialog/_controller/ControllerProps.ts +11 -0
- package/src/providers/dialog/_controller/ControllerRef.ts +6 -0
- package/src/providers/dialog/_controller/_modal/Modal.tsx +148 -0
- package/src/providers/dialog/_controller/_modal/ModalProps.ts +11 -0
- package/src/providers/dialog/_controller/_modal/ModalRef.ts +8 -0
- package/src/providers/dialog/_controller/_modal/_Interpolation.ts +9 -0
- package/src/providers/dialog/_controller/_modal/index.ts +3 -0
- package/src/providers/dialog/_controller/_overlay/Overlay.tsx +132 -0
- package/src/providers/dialog/_controller/_overlay/OverlayProps.ts +9 -0
- package/src/providers/dialog/_controller/_overlay/OverlayRef.ts +10 -0
- package/src/providers/dialog/_controller/_overlay/_OverlayRefBase.ts +3 -0
- package/src/providers/dialog/_controller/_overlay/index.ts +3 -0
- package/src/providers/dialog/_controller/index.ts +3 -0
- package/src/providers/dialog/index.ts +4 -0
- package/src/providers/index.ts +2 -0
- package/src/providers/toast/ToastProvider.tsx +73 -0
- package/src/providers/toast/ToastProviderProps.ts +3 -0
- package/src/providers/toast/ToastRef.ts +6 -0
- package/src/providers/toast/_overlay/Overlay.tsx +208 -0
- package/src/providers/toast/_overlay/OverlayRef.ts +6 -0
- package/src/providers/toast/_overlay/_component-wrapper/ComponentWrapper.tsx +168 -0
- package/src/providers/toast/_overlay/_component-wrapper/ComponentWrapperProps.ts +8 -0
- package/src/providers/toast/_overlay/_component-wrapper/ComponentWrapperRef.ts +6 -0
- package/src/providers/toast/_overlay/_component-wrapper/index.ts +3 -0
- package/src/providers/toast/_overlay/index.ts +2 -0
- package/src/providers/toast/index.tsx +3 -0
- package/src/types/index.ts +7 -0
- package/src/types/shared.ts +1 -0
- package/src/types/theme/ColorScheme.ts +1 -0
- package/src/types/theme/index.ts +1 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useContext,
|
|
4
|
+
} from "react"
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
StyleSheet,
|
|
8
|
+
} from "react-native"
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Color,
|
|
12
|
+
Spacing,
|
|
13
|
+
} from "@audira/carbon-react-native-elements"
|
|
14
|
+
|
|
15
|
+
import IconWarningAltFilled16 from "@carbon/icons/svg/32/warning--alt--filled.svg"
|
|
16
|
+
import IconWarningFilled16 from "@carbon/icons/svg/32/warning--filled.svg"
|
|
17
|
+
|
|
18
|
+
import {
|
|
19
|
+
FlexStyleSheet,
|
|
20
|
+
} from "../../_internal/style-sheets"
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
ThemeContext,
|
|
24
|
+
} from "../../contexts"
|
|
25
|
+
|
|
26
|
+
import type {
|
|
27
|
+
ThemeType,
|
|
28
|
+
} from "../../types"
|
|
29
|
+
|
|
30
|
+
import {
|
|
31
|
+
FormHelperText,
|
|
32
|
+
} from "../form-helper-text"
|
|
33
|
+
|
|
34
|
+
import {
|
|
35
|
+
FormLabel,
|
|
36
|
+
} from "../form-label"
|
|
37
|
+
|
|
38
|
+
import {
|
|
39
|
+
TextAreaField,
|
|
40
|
+
} from "../text-area-field"
|
|
41
|
+
|
|
42
|
+
import type {
|
|
43
|
+
TextAreaFluidProps,
|
|
44
|
+
} from "./TextAreaFluidProps"
|
|
45
|
+
|
|
46
|
+
import type {
|
|
47
|
+
TextAreaFluidRef,
|
|
48
|
+
} from "./TextAreaFluidRef"
|
|
49
|
+
|
|
50
|
+
export const TextAreaFluid = forwardRef<TextAreaFluidRef, TextAreaFluidProps>(
|
|
51
|
+
function TextAreaFluid(
|
|
52
|
+
{
|
|
53
|
+
label,
|
|
54
|
+
helperText,
|
|
55
|
+
interactiveState,
|
|
56
|
+
style,
|
|
57
|
+
textInputStyle,
|
|
58
|
+
...textInputFieldProps
|
|
59
|
+
},
|
|
60
|
+
ref,
|
|
61
|
+
) {
|
|
62
|
+
|
|
63
|
+
const
|
|
64
|
+
themeContext =
|
|
65
|
+
useContext(ThemeContext)
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<TextAreaField
|
|
69
|
+
ref={ ref }
|
|
70
|
+
{ ...textInputFieldProps }
|
|
71
|
+
interactiveState={ interactiveState }
|
|
72
|
+
hideInteractiveStateIcon
|
|
73
|
+
blockStartNode={
|
|
74
|
+
<FormLabel
|
|
75
|
+
label={ label }
|
|
76
|
+
style={ styleSheet.label }
|
|
77
|
+
/>
|
|
78
|
+
}
|
|
79
|
+
blockEndNode={
|
|
80
|
+
!!helperText?.length && (
|
|
81
|
+
<FormHelperText
|
|
82
|
+
text={ helperText }
|
|
83
|
+
style={ [
|
|
84
|
+
FlexStyleSheet.flex_initial,
|
|
85
|
+
styleSheet.helperText,
|
|
86
|
+
] }
|
|
87
|
+
textTrailing={
|
|
88
|
+
interactiveState === "invalid" ? (
|
|
89
|
+
<IconWarningFilled16
|
|
90
|
+
width={ 16 }
|
|
91
|
+
height={ 16 }
|
|
92
|
+
fill={ mapIconInvalidColor[themeContext.colorScheme] }
|
|
93
|
+
/>
|
|
94
|
+
) : interactiveState === "warning" ? (
|
|
95
|
+
<IconWarningAltFilled16
|
|
96
|
+
width={ 16 }
|
|
97
|
+
height={ 16 }
|
|
98
|
+
fill={ mapIconWarningColor[themeContext.colorScheme] }
|
|
99
|
+
/>
|
|
100
|
+
) : undefined
|
|
101
|
+
}
|
|
102
|
+
/>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
style={ [
|
|
106
|
+
styleSheet.textAreaFluid,
|
|
107
|
+
style,
|
|
108
|
+
] }
|
|
109
|
+
textInputStyle={ [
|
|
110
|
+
helperText?.length
|
|
111
|
+
? styleSheet.rnTextInputNoBorderBottom
|
|
112
|
+
: undefined,
|
|
113
|
+
textInputStyle,
|
|
114
|
+
] }
|
|
115
|
+
/>
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
},
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
const
|
|
122
|
+
styleSheet =
|
|
123
|
+
StyleSheet.create({
|
|
124
|
+
textAreaFluid: {
|
|
125
|
+
paddingTop: 13,
|
|
126
|
+
minHeight: 64 + 11,
|
|
127
|
+
},
|
|
128
|
+
label: {
|
|
129
|
+
paddingLeft: Spacing.spacing_05,
|
|
130
|
+
paddingRight: Spacing.spacing_05,
|
|
131
|
+
},
|
|
132
|
+
rnTextInputNoBorderBottom: {
|
|
133
|
+
marginLeft: Spacing.spacing_05,
|
|
134
|
+
marginRight: Spacing.spacing_05,
|
|
135
|
+
paddingLeft: 0,
|
|
136
|
+
paddingRight: 0,
|
|
137
|
+
},
|
|
138
|
+
helperText: {
|
|
139
|
+
justifyContent: "space-between",
|
|
140
|
+
paddingTop: Spacing.spacing_03,
|
|
141
|
+
paddingBottom: Spacing.spacing_03,
|
|
142
|
+
paddingLeft: Spacing.spacing_05,
|
|
143
|
+
paddingRight: Spacing.spacing_05,
|
|
144
|
+
},
|
|
145
|
+
}),
|
|
146
|
+
|
|
147
|
+
mapIconInvalidColor: Record<ThemeType.ColorScheme, string> =
|
|
148
|
+
{
|
|
149
|
+
gray_10: Color.Token.gray_10.support_error,
|
|
150
|
+
gray_100: Color.Token.gray_100.support_error,
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
mapIconWarningColor: Record<ThemeType.ColorScheme, string> =
|
|
154
|
+
{
|
|
155
|
+
gray_10: Color.Token.gray_10.support_warning,
|
|
156
|
+
gray_100: Color.Token.gray_100.support_warning,
|
|
157
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TextAreaFieldProps,
|
|
3
|
+
} from "../text-area-field/TextAreaFieldProps"
|
|
4
|
+
|
|
5
|
+
export interface TextAreaFluidProps extends Omit<
|
|
6
|
+
TextAreaFieldProps,
|
|
7
|
+
| "hideInteractiveStateIcon"
|
|
8
|
+
| "blockStartNodes"
|
|
9
|
+
| "blockEndNodes"
|
|
10
|
+
> {
|
|
11
|
+
label: string,
|
|
12
|
+
helperText?: string,
|
|
13
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useRef,
|
|
5
|
+
} from "react"
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
StyleSheet,
|
|
9
|
+
View,
|
|
10
|
+
} from "react-native"
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
Spacing,
|
|
14
|
+
} from "@audira/carbon-react-native-elements"
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
FormHelperText,
|
|
18
|
+
} from "../form-helper-text"
|
|
19
|
+
|
|
20
|
+
import {
|
|
21
|
+
FormLabel,
|
|
22
|
+
} from "../form-label"
|
|
23
|
+
|
|
24
|
+
import {
|
|
25
|
+
TextInputField,
|
|
26
|
+
type TextInputFieldRef,
|
|
27
|
+
} from "../text-input-field"
|
|
28
|
+
|
|
29
|
+
import type {
|
|
30
|
+
TextInputProps,
|
|
31
|
+
} from "./TextInputProps"
|
|
32
|
+
|
|
33
|
+
import type {
|
|
34
|
+
TextInputRef,
|
|
35
|
+
} from "./TextInputRef"
|
|
36
|
+
|
|
37
|
+
import type {
|
|
38
|
+
TextInputRefBase,
|
|
39
|
+
} from "./_TextInputRefBase"
|
|
40
|
+
|
|
41
|
+
export const TextInput = forwardRef<TextInputRef, TextInputProps>(
|
|
42
|
+
function TextInput(
|
|
43
|
+
{
|
|
44
|
+
label,
|
|
45
|
+
helperText,
|
|
46
|
+
|
|
47
|
+
// hoist the `TextInputFieldProps`
|
|
48
|
+
size = "medium",
|
|
49
|
+
interactiveState = "normal",
|
|
50
|
+
textInputStyle,
|
|
51
|
+
// -----
|
|
52
|
+
|
|
53
|
+
// hoist TextInputProps of React Native
|
|
54
|
+
allowFontScaling,
|
|
55
|
+
autoCapitalize,
|
|
56
|
+
autoComplete,
|
|
57
|
+
autoCorrect,
|
|
58
|
+
autoFocus,
|
|
59
|
+
blurOnSubmit,
|
|
60
|
+
submitBehavior,
|
|
61
|
+
caretHidden,
|
|
62
|
+
contextMenuHidden,
|
|
63
|
+
defaultValue,
|
|
64
|
+
value,
|
|
65
|
+
editable,
|
|
66
|
+
keyboardType,
|
|
67
|
+
inputMode,
|
|
68
|
+
maxLength,
|
|
69
|
+
multiline,
|
|
70
|
+
onBlur,
|
|
71
|
+
onChange,
|
|
72
|
+
onChangeText,
|
|
73
|
+
onContentSizeChange,
|
|
74
|
+
onEndEditing,
|
|
75
|
+
onPress,
|
|
76
|
+
onPressIn,
|
|
77
|
+
onPressOut,
|
|
78
|
+
onFocus,
|
|
79
|
+
onSelectionChange,
|
|
80
|
+
onSubmitEditing,
|
|
81
|
+
onScroll,
|
|
82
|
+
onKeyPress,
|
|
83
|
+
placeholder,
|
|
84
|
+
placeholderTextColor,
|
|
85
|
+
readOnly,
|
|
86
|
+
returnKeyType,
|
|
87
|
+
enterKeyHint,
|
|
88
|
+
secureTextEntry,
|
|
89
|
+
selectTextOnFocus,
|
|
90
|
+
selection,
|
|
91
|
+
selectionColor,
|
|
92
|
+
textAlign,
|
|
93
|
+
inputAccessoryViewID,
|
|
94
|
+
inputAccessoryViewButtonLabel,
|
|
95
|
+
maxFontSizeMultiplier,
|
|
96
|
+
// -----
|
|
97
|
+
|
|
98
|
+
// hoist TextInputAndroidProps
|
|
99
|
+
cursorColor,
|
|
100
|
+
selectionHandleColor,
|
|
101
|
+
importantForAutofill,
|
|
102
|
+
disableFullscreenUI,
|
|
103
|
+
inlineImageLeft,
|
|
104
|
+
inlineImagePadding,
|
|
105
|
+
numberOfLines,
|
|
106
|
+
returnKeyLabel,
|
|
107
|
+
textBreakStrategy,
|
|
108
|
+
underlineColorAndroid,
|
|
109
|
+
textAlignVertical,
|
|
110
|
+
showSoftInputOnFocus,
|
|
111
|
+
verticalAlign,
|
|
112
|
+
// -----
|
|
113
|
+
|
|
114
|
+
// hoist TextInputIOSProps
|
|
115
|
+
disableKeyboardShortcuts,
|
|
116
|
+
clearButtonMode,
|
|
117
|
+
clearTextOnFocus,
|
|
118
|
+
dataDetectorTypes,
|
|
119
|
+
enablesReturnKeyAutomatically,
|
|
120
|
+
keyboardAppearance,
|
|
121
|
+
passwordRules,
|
|
122
|
+
rejectResponderTermination,
|
|
123
|
+
selectionState,
|
|
124
|
+
spellCheck,
|
|
125
|
+
textContentType,
|
|
126
|
+
scrollEnabled,
|
|
127
|
+
lineBreakStrategyIOS,
|
|
128
|
+
lineBreakModeIOS,
|
|
129
|
+
smartInsertDelete,
|
|
130
|
+
// -----
|
|
131
|
+
|
|
132
|
+
style: viewStyleProp,
|
|
133
|
+
...viewProps
|
|
134
|
+
},
|
|
135
|
+
ref,
|
|
136
|
+
) {
|
|
137
|
+
|
|
138
|
+
const
|
|
139
|
+
viewRef =
|
|
140
|
+
useRef<View>(null),
|
|
141
|
+
|
|
142
|
+
textInputFieldRef =
|
|
143
|
+
useRef<TextInputFieldRef>(null)
|
|
144
|
+
|
|
145
|
+
useImperativeHandle(ref, () => {
|
|
146
|
+
return Object.assign<View, TextInputRefBase>(
|
|
147
|
+
viewRef.current ?? {
|
|
148
|
+
} as View,
|
|
149
|
+
{
|
|
150
|
+
get textInputField() {
|
|
151
|
+
return textInputFieldRef.current ?? undefined
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
)
|
|
155
|
+
}, [])
|
|
156
|
+
|
|
157
|
+
return (
|
|
158
|
+
<View
|
|
159
|
+
{ ...viewProps }
|
|
160
|
+
ref={ viewRef }
|
|
161
|
+
style={ viewStyleProp }
|
|
162
|
+
>
|
|
163
|
+
<FormLabel
|
|
164
|
+
label={ label }
|
|
165
|
+
style={ styleSheet.label }
|
|
166
|
+
/>
|
|
167
|
+
|
|
168
|
+
<TextInputField
|
|
169
|
+
ref={ textInputFieldRef }
|
|
170
|
+
size={ size }
|
|
171
|
+
interactiveState={ interactiveState }
|
|
172
|
+
textInputStyle={ textInputStyle }
|
|
173
|
+
|
|
174
|
+
allowFontScaling={ allowFontScaling }
|
|
175
|
+
autoCapitalize={ autoCapitalize }
|
|
176
|
+
autoComplete={ autoComplete }
|
|
177
|
+
autoCorrect={ autoCorrect }
|
|
178
|
+
autoFocus={ autoFocus }
|
|
179
|
+
blurOnSubmit={ blurOnSubmit }
|
|
180
|
+
submitBehavior={ submitBehavior }
|
|
181
|
+
caretHidden={ caretHidden }
|
|
182
|
+
contextMenuHidden={ contextMenuHidden }
|
|
183
|
+
defaultValue={ defaultValue }
|
|
184
|
+
value={ value }
|
|
185
|
+
editable={ editable }
|
|
186
|
+
keyboardType={ keyboardType }
|
|
187
|
+
inputMode={ inputMode }
|
|
188
|
+
maxLength={ maxLength }
|
|
189
|
+
multiline={ multiline }
|
|
190
|
+
onBlur={ onBlur }
|
|
191
|
+
onChange={ onChange }
|
|
192
|
+
onChangeText={ onChangeText }
|
|
193
|
+
onContentSizeChange={ onContentSizeChange }
|
|
194
|
+
onEndEditing={ onEndEditing }
|
|
195
|
+
onPress={ onPress }
|
|
196
|
+
onPressIn={ onPressIn }
|
|
197
|
+
onPressOut={ onPressOut }
|
|
198
|
+
onFocus={ onFocus }
|
|
199
|
+
onSelectionChange={ onSelectionChange }
|
|
200
|
+
onSubmitEditing={ onSubmitEditing }
|
|
201
|
+
onScroll={ onScroll }
|
|
202
|
+
onKeyPress={ onKeyPress }
|
|
203
|
+
placeholder={ placeholder }
|
|
204
|
+
placeholderTextColor={ placeholderTextColor }
|
|
205
|
+
readOnly={ readOnly }
|
|
206
|
+
returnKeyType={ returnKeyType }
|
|
207
|
+
enterKeyHint={ enterKeyHint }
|
|
208
|
+
secureTextEntry={ secureTextEntry }
|
|
209
|
+
selectTextOnFocus={ selectTextOnFocus }
|
|
210
|
+
selection={ selection }
|
|
211
|
+
selectionColor={ selectionColor }
|
|
212
|
+
textAlign={ textAlign }
|
|
213
|
+
inputAccessoryViewID={ inputAccessoryViewID }
|
|
214
|
+
inputAccessoryViewButtonLabel={ inputAccessoryViewButtonLabel }
|
|
215
|
+
maxFontSizeMultiplier={ maxFontSizeMultiplier }
|
|
216
|
+
|
|
217
|
+
cursorColor={ cursorColor }
|
|
218
|
+
selectionHandleColor={ selectionHandleColor }
|
|
219
|
+
importantForAutofill={ importantForAutofill }
|
|
220
|
+
disableFullscreenUI={ disableFullscreenUI }
|
|
221
|
+
inlineImageLeft={ inlineImageLeft }
|
|
222
|
+
inlineImagePadding={ inlineImagePadding }
|
|
223
|
+
numberOfLines={ numberOfLines }
|
|
224
|
+
returnKeyLabel={ returnKeyLabel }
|
|
225
|
+
textBreakStrategy={ textBreakStrategy }
|
|
226
|
+
underlineColorAndroid={ underlineColorAndroid }
|
|
227
|
+
textAlignVertical={ textAlignVertical }
|
|
228
|
+
showSoftInputOnFocus={ showSoftInputOnFocus }
|
|
229
|
+
verticalAlign={ verticalAlign }
|
|
230
|
+
|
|
231
|
+
disableKeyboardShortcuts={ disableKeyboardShortcuts }
|
|
232
|
+
clearButtonMode={ clearButtonMode }
|
|
233
|
+
clearTextOnFocus={ clearTextOnFocus }
|
|
234
|
+
dataDetectorTypes={ dataDetectorTypes }
|
|
235
|
+
enablesReturnKeyAutomatically={ enablesReturnKeyAutomatically }
|
|
236
|
+
keyboardAppearance={ keyboardAppearance }
|
|
237
|
+
passwordRules={ passwordRules }
|
|
238
|
+
rejectResponderTermination={ rejectResponderTermination }
|
|
239
|
+
selectionState={ selectionState }
|
|
240
|
+
spellCheck={ spellCheck }
|
|
241
|
+
textContentType={ textContentType }
|
|
242
|
+
scrollEnabled={ scrollEnabled }
|
|
243
|
+
lineBreakStrategyIOS={ lineBreakStrategyIOS }
|
|
244
|
+
lineBreakModeIOS={ lineBreakModeIOS }
|
|
245
|
+
smartInsertDelete={ smartInsertDelete }
|
|
246
|
+
/>
|
|
247
|
+
|
|
248
|
+
{ !!helperText?.length && (
|
|
249
|
+
<FormHelperText
|
|
250
|
+
text={ helperText }
|
|
251
|
+
error={ interactiveState === "invalid" }
|
|
252
|
+
style={ styleSheet.helperText }
|
|
253
|
+
/>
|
|
254
|
+
) }
|
|
255
|
+
</View>
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
},
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
const
|
|
262
|
+
styleSheet =
|
|
263
|
+
StyleSheet.create({
|
|
264
|
+
label: {
|
|
265
|
+
marginBottom: Spacing.spacing_03,
|
|
266
|
+
},
|
|
267
|
+
helperText: {
|
|
268
|
+
marginTop: Spacing.spacing_02,
|
|
269
|
+
},
|
|
270
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
TextInputFieldProps,
|
|
3
|
+
} from "../text-input-field/TextInputFieldProps"
|
|
4
|
+
|
|
5
|
+
export interface TextInputProps extends Omit<
|
|
6
|
+
TextInputFieldProps,
|
|
7
|
+
| "hideInteractiveStateIcon"
|
|
8
|
+
| "blockStartNodes"
|
|
9
|
+
| "blockEndNodes"
|
|
10
|
+
> {
|
|
11
|
+
label: string,
|
|
12
|
+
helperText?: string,
|
|
13
|
+
}
|