Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
{"version":3,"file":"KeycloakTextInput-e2751b88.js","sources":["../../src/components/keycloak-text-input/KeycloakTextInput.tsx"],"sourcesContent":["import { TextInput, TextInputProps } from \"@patternfly/react-core\";\nimport { ComponentProps, forwardRef, HTMLProps } from \"react\";\n\n// PatternFly changes the signature of the 'onChange' handler for input elements.\n// This causes issues with React Hook Form as it expects the default signature for an input element.\n// So we have to create this wrapper component that takes care of converting these signatures for us.\n\nexport type KeycloakTextInputProps = Omit<\n ComponentProps,\n \"onChange\"\n> &\n Pick, \"onChange\">;\n\nexport const KeycloakTextInput = forwardRef<\n HTMLInputElement,\n KeycloakTextInputProps\n>(({ onChange, ...props }, ref) => {\n const onChangeForward: TextInputProps[\"onChange\"] = (_, event) =>\n onChange?.(event);\n\n return ;\n});\n\n// We need to fake the displayName to match what PatternFly expects.\n// This is because PatternFly uses it to filter children in certain aspects.\n// This is a stupid approach, but it's not like we can change that.\nKeycloakTextInput.displayName = \"TextInput\";\n"],"names":["KeycloakTextInput","forwardRef","onChange","props","ref","onChangeForward","_","event","TextInput"],"mappings":"uDAaa,MAAAA,EAAoBC,aAG/B,CAAC,CAAE,SAAAC,EAAU,GAAGC,GAASC,IAAQ,CACjC,MAAMC,EAA8C,CAACC,EAAGC,IACtDL,IAAWK,CAAK,EAElB,aAAQC,EAAW,CAAA,GAAGL,EAAO,IAAAC,EAAU,SAAUC,CAAiB,CAAA,CACpE,CAAC,EAKDL,EAAkB,YAAc"}