Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
TextField: Better reset styles for different types
Andrey Okonetchnikove2c102882124
diff --git a/packages/design-system/src/components/text-field.stories.tsx b/packages/design-system/src/components/text-field.stories.tsxindex 9292176af8..62a7289731 100644--- a/packages/design-system/src/components/text-field.stories.tsx+++ b/packages/design-system/src/components/text-field.stories.tsx@@ -20,7 +20,8 @@ export const NativeProps: ComponentStory<typeof TextField> = () => {<Flex direction="column" gap={3}><TextField placeholder="This is a placeholder" /><TextField disabled placeholder="This is a disabled placeholder" />- <TextField type="number" value={25} />+ <TextField type="number" defaultValue={25} />+ <TextField type="search" placeholder="This is a search input" /><TextField readOnly value="Read-only" /><TextField disabled value="Disabled" /></Flex>diff --git a/packages/design-system/src/components/text-field.tsx b/packages/design-system/src/components/text-field.tsxindex 7afac6b069..d411e0e0ff 100644--- a/packages/design-system/src/components/text-field.tsx+++ b/packages/design-system/src/components/text-field.tsx@@ -31,6 +31,22 @@ const InputBase = styled("input", {boxShadow: "inset 0 0 0 1px $colors$blue6, inset 0 0 0 100px $colors$blue3",},+ '&[type="search"]': {+ "&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration":+ {+ display: "none",+ },+ },++ '&[type="number"]': {+ "&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {+ WebkitAppearance: "none",+ MozAppearance: "textfield",+ margin: 0,+ display: "none",+ },+ },+"&:-webkit-autofill::first-line": {fontFamily: "$untitled",color: "$hiContrast",@@ -76,14 +92,6 @@ const TextFieldBase = styled("div", {boxShadow: "inset 0px 0px 0px 1px $colors$slate7",},},- '&[type="number"]': {- "&::-webkit-outer-spin-button, &::-webkit-inner-spin-button": {- WebkitAppearance: "none",- MozAppearance: "textfield",- margin: 0,- display: "none",- },- },variants: {size: {