All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.KeycloakTextInput-e2751b88.js.map Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
{"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"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy