@artsy/palette-mobile 23.12.0 → 23.14.0
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.
|
@@ -361,7 +361,7 @@ export const Input = forwardRef(({ addClearListener = false, defaultValue, disab
|
|
|
361
361
|
placeholderWidths.current[index] = event.nativeEvent.layout.width;
|
|
362
362
|
}, numberOfLines: 1, style: {
|
|
363
363
|
...styles,
|
|
364
|
-
}, children: placeholderString }))) }));
|
|
364
|
+
}, children: placeholderString }, `${placeholderString.replaceAll(" ", "-")}-${index}`))) }));
|
|
365
365
|
}, [placeholder, styles]);
|
|
366
366
|
return (_jsxs(Flex, { flexGrow: 1, children: [renderAndroidPlaceholderMeasuringHack(), renderHint(), renderAnimatedTitle(), _jsx(AnimatedStyledInput
|
|
367
367
|
// Only use a controlled input if specified
|
|
@@ -5,7 +5,18 @@ import { List } from "../../storybook/helpers";
|
|
|
5
5
|
import { Join } from "../Join";
|
|
6
6
|
import { Separator } from "../Separator";
|
|
7
7
|
import { Text } from "../Text";
|
|
8
|
+
const artworkSearchPlaceholders = [
|
|
9
|
+
"Search by artist, artwork title, gallery, fair, or collecting category",
|
|
10
|
+
"Search by artist, artwork title, gallery, or fair",
|
|
11
|
+
"Search by artist, artwork, or gallery",
|
|
12
|
+
"Search artworks",
|
|
13
|
+
];
|
|
14
|
+
const shippingAddressPlaceholders = [
|
|
15
|
+
"Street address, apartment or suite, delivery instructions",
|
|
16
|
+
"Street address and apartment or suite",
|
|
17
|
+
"Street address",
|
|
18
|
+
];
|
|
8
19
|
export default {
|
|
9
20
|
title: "Input",
|
|
10
21
|
};
|
|
11
|
-
export const Variants = () => (_jsx(List, { contentContainerStyle: { marginHorizontal: 20, alignItems: "stretch" }, children: _jsxs(Join, { separator: _jsx(Separator, { my: 2 }), children: [_jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Default" }), _jsx(Input, {})] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title" }), _jsx(Input, { title: "Title" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and required" }), _jsx(Input, { title: "Title", required: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and optional" }), _jsx(Input, { title: "Title", optional: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and clear button" }), _jsx(Input, { title: "Title", enableClearButton: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and loading" }), _jsx(Input, { title: "Title", loading: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and icon" }), _jsx(Input, { title: "Title", icon: _jsx(SearchIcon, {}) })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and error" }), _jsx(Input, { title: "Title", error: "this is an error" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and disabled" }), _jsx(Input, { title: "Disabled", disabled: true })] }),
|
|
22
|
+
export const Variants = () => (_jsx(List, { contentContainerStyle: { marginHorizontal: 20, alignItems: "stretch" }, children: _jsxs(Join, { separator: _jsx(Separator, { my: 2 }), children: [_jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Default" }), _jsx(Input, {})] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title" }), _jsx(Input, { title: "Title" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and required" }), _jsx(Input, { title: "Title", required: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and optional" }), _jsx(Input, { title: "Title", optional: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and clear button" }), _jsx(Input, { title: "Title", enableClearButton: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and loading" }), _jsx(Input, { title: "Title", loading: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and icon" }), _jsx(Input, { title: "Title", icon: _jsx(SearchIcon, {}) })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and error" }), _jsx(Input, { title: "Title", error: "this is an error" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and disabled" }), _jsx(Input, { title: "Disabled", disabled: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title, clear button and value" }), _jsx(Input, { value: "5", enableClearButton: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With fixed right placeholder" }), _jsx(Input, { fixedRightPlaceholder: "cm" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Placeholder (single string)" }), _jsx(Input, { placeholder: "Search artworks" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Placeholder (array, longest to shortest)" }), _jsx(Input, { placeholder: artworkSearchPlaceholders })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Placeholder with title (array, adaptive)" }), _jsx(Input, { title: "Search", placeholder: artworkSearchPlaceholders })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With title and placeholder" }), _jsx(Input, { title: "full text", value: "Wow this is a long text, I wonder if I can read the whole thing!" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "With text limit" }), _jsx(Input, { title: "Text with limit", maxLength: 100, showLimit: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "multine Without limit" }), _jsx(Input, { title: "Text area", multiline: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "multine With limit" }), _jsx(Input, { title: "Text area with limit", multiline: true, maxLength: 150, showLimit: true })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Multiline with placeholder (single string)" }), _jsx(Input, { title: "Text area", multiline: true, placeholder: "Enter your message" })] }), _jsxs(_Fragment, { children: [_jsx(Text, { mb: 1, variant: "sm-display", fontWeight: "bold", children: "Multiline with placeholder (array, adaptive)" }), _jsx(Input, { title: "Shipping address", multiline: true, placeholder: shippingAddressPlaceholders })] })] }) }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artsy/palette-mobile",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.14.0",
|
|
4
4
|
"description": "Artsy's design system for React Native",
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"Example"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@babel/preset-react": "7.18.6",
|
|
77
77
|
"@babel/preset-typescript": "7.18.6",
|
|
78
78
|
"@babel/runtime": "^7.25.0",
|
|
79
|
-
"@d11/react-native-fast-image": "8.
|
|
79
|
+
"@d11/react-native-fast-image": "8.13.0",
|
|
80
80
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
81
81
|
"@react-native/eslint-config": "0.76.9",
|
|
82
82
|
"@shopify/flash-list": "2.2.0",
|