mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-26 15:58:28 +00:00
[change] CSS class prefix 'rn' -> 'r'
This commit is contained in:
+4
-8
@@ -9,18 +9,14 @@ exports[`components/Picker prop "children" items 1`] = `
|
||||
`;
|
||||
|
||||
exports[`components/Picker prop "children" renders items 1`] = `
|
||||
<select
|
||||
className="rn-fontFamily-1qd0xha rn-fontSize-7cikom rn-margin-crgep1"
|
||||
data-focusable={true}
|
||||
onChange={[Function]}
|
||||
>
|
||||
Array [
|
||||
<PickerItem
|
||||
label="label-1"
|
||||
value="value-1"
|
||||
/>
|
||||
/>,
|
||||
<PickerItem
|
||||
label="label-2"
|
||||
value="value-2"
|
||||
/>
|
||||
</select>
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
|
||||
@@ -14,7 +14,7 @@ describe('components/Picker', () => {
|
||||
</Picker>
|
||||
);
|
||||
const component = shallow(picker);
|
||||
expect(component).toMatchSnapshot();
|
||||
expect(component.children()).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('items', () => {
|
||||
|
||||
+25
-25
@@ -2,19 +2,19 @@
|
||||
|
||||
exports[`StyleSheet/compile atomic converts style to atomic CSS 1`] = `
|
||||
Object {
|
||||
"rn-animationDirection-1kmv48j": Object {
|
||||
"identifier": "rn-animationDirection-1kmv48j",
|
||||
"r-animationDirection-1kmv48j": Object {
|
||||
"identifier": "r-animationDirection-1kmv48j",
|
||||
"property": "animationDirection",
|
||||
"rules": Array [
|
||||
".rn-animationDirection-1kmv48j { -webkit-animation-direction: alternate, alternate-reverse; animation-direction: alternate, alternate-reverse; }",
|
||||
".r-animationDirection-1kmv48j { -webkit-animation-direction: alternate, alternate-reverse; animation-direction: alternate, alternate-reverse; }",
|
||||
],
|
||||
"value": "[\\"alternate\\",\\"alternate-reverse\\"]",
|
||||
},
|
||||
"rn-animationKeyframes-zacbmr": Object {
|
||||
"identifier": "rn-animationKeyframes-zacbmr",
|
||||
"r-animationKeyframes-zacbmr": Object {
|
||||
"identifier": "r-animationKeyframes-zacbmr",
|
||||
"property": "animationKeyframes",
|
||||
"rules": Array [
|
||||
".rn-animationKeyframes-zacbmr { -webkit-animation-name: r-animation-8jhqzh, r-animation-5azpl5; animation-name: r-animation-8jhqzh, r-animation-5azpl5; }",
|
||||
".r-animationKeyframes-zacbmr { -webkit-animation-name: r-animation-8jhqzh, r-animation-5azpl5; animation-name: r-animation-8jhqzh, r-animation-5azpl5; }",
|
||||
"@-webkit-keyframes r-animation-8jhqzh {
|
||||
0% { top: 0px; }
|
||||
50% { top: 5px; }
|
||||
@@ -36,47 +36,47 @@ to { left: 10px; }
|
||||
],
|
||||
"value": "[{\\"0%\\":{\\"top\\":0},\\"50%\\":{\\"top\\":5},\\"100%\\":{\\"top\\":10}},{\\"from\\":{\\"left\\":0},\\"to\\":{\\"left\\":10}}]",
|
||||
},
|
||||
"rn-fontFamily-1qd0xha": Object {
|
||||
"identifier": "rn-fontFamily-1qd0xha",
|
||||
"r-fontFamily-1qd0xha": Object {
|
||||
"identifier": "r-fontFamily-1qd0xha",
|
||||
"property": "fontFamily",
|
||||
"rules": Array [
|
||||
".rn-fontFamily-1qd0xha { font-family: system-ui, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", Roboto, Ubuntu, \\"Helvetica Neue\\", sans-serif; }",
|
||||
".r-fontFamily-1qd0xha { font-family: system-ui, -apple-system, BlinkMacSystemFont, \\"Segoe UI\\", Roboto, Ubuntu, \\"Helvetica Neue\\", sans-serif; }",
|
||||
],
|
||||
"value": "System",
|
||||
},
|
||||
"rn-marginHorizontal-vlx1xi": Object {
|
||||
"identifier": "rn-marginHorizontal-vlx1xi",
|
||||
"r-marginHorizontal-vlx1xi": Object {
|
||||
"identifier": "r-marginHorizontal-vlx1xi",
|
||||
"property": "marginHorizontal",
|
||||
"rules": Array [
|
||||
".rn-marginHorizontal-vlx1xi { margin-left: 10px; margin-right: 10px; }",
|
||||
".r-marginHorizontal-vlx1xi { margin-left: 10px; margin-right: 10px; }",
|
||||
],
|
||||
"value": "10px",
|
||||
},
|
||||
"rn-placeholderTextColor-1418aci": Object {
|
||||
"identifier": "rn-placeholderTextColor-1418aci",
|
||||
"r-placeholderTextColor-1418aci": Object {
|
||||
"identifier": "r-placeholderTextColor-1418aci",
|
||||
"property": "placeholderTextColor",
|
||||
"rules": Array [
|
||||
".rn-placeholderTextColor-1418aci::-webkit-input-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".rn-placeholderTextColor-1418aci::-moz-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".rn-placeholderTextColor-1418aci:-ms-input-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".rn-placeholderTextColor-1418aci::placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".r-placeholderTextColor-1418aci::-webkit-input-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".r-placeholderTextColor-1418aci::-moz-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".r-placeholderTextColor-1418aci:-ms-input-placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
".r-placeholderTextColor-1418aci::placeholder { color: rgba(128,128,128,1.00); opacity: 1; }",
|
||||
],
|
||||
"value": "gray",
|
||||
},
|
||||
"rn-pointerEvents-ah5dr5": Object {
|
||||
"identifier": "rn-pointerEvents-ah5dr5",
|
||||
"r-pointerEvents-ah5dr5": Object {
|
||||
"identifier": "r-pointerEvents-ah5dr5",
|
||||
"property": "pointerEvents",
|
||||
"rules": Array [
|
||||
".rn-pointerEvents-ah5dr5 > * { pointer-events: none; }",
|
||||
".rn-pointerEvents-ah5dr5 { pointer-events: auto !important; }",
|
||||
".r-pointerEvents-ah5dr5 > * { pointer-events: none; }",
|
||||
".r-pointerEvents-ah5dr5 { pointer-events: auto !important; }",
|
||||
],
|
||||
"value": "box-only",
|
||||
},
|
||||
"rn-transform-1ehiua4": Object {
|
||||
"identifier": "rn-transform-1ehiua4",
|
||||
"r-transform-1ehiua4": Object {
|
||||
"identifier": "r-transform-1ehiua4",
|
||||
"property": "transform",
|
||||
"rules": Array [
|
||||
".rn-transform-1ehiua4 { -webkit-transform: translateX(50px); transform: translateX(50px); }",
|
||||
".r-transform-1ehiua4 { -webkit-transform: translateX(50px); transform: translateX(50px); }",
|
||||
],
|
||||
"value": "[{\\"translateX\\":50,\\"scale\\":-1}]",
|
||||
},
|
||||
|
||||
+46
-46
@@ -3,84 +3,84 @@
|
||||
exports[`StyleSheet/createStyleResolver resolve resolves inline-style pointerEvents to classname 1`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-pointerEvents-12vffkv",
|
||||
"r-pointerEvents-12vffkv",
|
||||
],
|
||||
"className": "rn-pointerEvents-12vffkv",
|
||||
"className": "r-pointerEvents-12vffkv",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register before RTL, resolves to correct className 1`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-marginRight-zso239",
|
||||
"rn-right-1bnbe1j",
|
||||
"rn-textAlign-1ff274t",
|
||||
"r-marginRight-zso239",
|
||||
"r-right-1bnbe1j",
|
||||
"r-textAlign-1ff274t",
|
||||
],
|
||||
"className": "rn-marginRight-zso239 rn-right-1bnbe1j rn-textAlign-1ff274t",
|
||||
"className": "r-marginRight-zso239 r-right-1bnbe1j r-textAlign-1ff274t",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register before RTL, resolves to correct className 2`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-left-2s0hu9",
|
||||
"rn-marginLeft-1n0xq6e",
|
||||
"rn-textAlign-fdjqy7",
|
||||
"r-left-2s0hu9",
|
||||
"r-marginLeft-1n0xq6e",
|
||||
"r-textAlign-fdjqy7",
|
||||
],
|
||||
"className": "rn-left-2s0hu9 rn-marginLeft-1n0xq6e rn-textAlign-fdjqy7",
|
||||
"className": "r-left-2s0hu9 r-marginLeft-1n0xq6e r-textAlign-fdjqy7",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to className 1`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-borderColor-4a18lf",
|
||||
"rn-borderWidth-1yadl64",
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"rn-width-b8lwoo",
|
||||
"r-borderColor-4a18lf",
|
||||
"r-borderWidth-1yadl64",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
"r-width-b8lwoo",
|
||||
],
|
||||
"className": "rn-borderColor-4a18lf rn-borderWidth-1yadl64 rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d rn-width-b8lwoo",
|
||||
"className": "r-borderColor-4a18lf r-borderWidth-1yadl64 r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d r-width-b8lwoo",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to className 2`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-borderColor-4a18lf",
|
||||
"rn-borderWidth-1yadl64",
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"rn-width-l0gwng",
|
||||
"r-borderColor-4a18lf",
|
||||
"r-borderWidth-1yadl64",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
"r-width-l0gwng",
|
||||
],
|
||||
"className": "rn-borderColor-4a18lf rn-borderWidth-1yadl64 rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d rn-width-l0gwng",
|
||||
"className": "r-borderColor-4a18lf r-borderWidth-1yadl64 r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d r-width-l0gwng",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to className 3`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-borderColor-4a18lf",
|
||||
"rn-borderWidth-1yadl64",
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"rn-width-b8lwoo",
|
||||
"r-borderColor-4a18lf",
|
||||
"r-borderWidth-1yadl64",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
"r-width-b8lwoo",
|
||||
],
|
||||
"className": "rn-borderColor-4a18lf rn-borderWidth-1yadl64 rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d rn-width-b8lwoo",
|
||||
"className": "r-borderColor-4a18lf r-borderWidth-1yadl64 r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d r-width-b8lwoo",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to mixed 1`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
],
|
||||
"className": "rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d",
|
||||
"className": "r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d",
|
||||
"style": Object {
|
||||
"borderBottomColor": "rgba(255,0,0,1.00)",
|
||||
"borderBottomWidth": "0px",
|
||||
@@ -98,12 +98,12 @@ Object {
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to mixed 2`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"rn-width-l0gwng",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
"r-width-l0gwng",
|
||||
],
|
||||
"className": "rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d rn-width-l0gwng",
|
||||
"className": "r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d r-width-l0gwng",
|
||||
"style": Object {
|
||||
"borderBottomColor": "rgba(255,0,0,1.00)",
|
||||
"borderBottomWidth": "0px",
|
||||
@@ -120,11 +120,11 @@ Object {
|
||||
exports[`StyleSheet/createStyleResolver resolve with register, resolves to mixed 3`] = `
|
||||
Object {
|
||||
"classList": Array [
|
||||
"rn-left-1tsx3h3",
|
||||
"rn-opacity-icoktb",
|
||||
"rn-position-u8s1d",
|
||||
"r-left-1tsx3h3",
|
||||
"r-opacity-icoktb",
|
||||
"r-position-u8s1d",
|
||||
],
|
||||
"className": "rn-left-1tsx3h3 rn-opacity-icoktb rn-position-u8s1d",
|
||||
"className": "r-left-1tsx3h3 r-opacity-icoktb r-position-u8s1d",
|
||||
"style": Object {
|
||||
"borderBottomColor": "rgba(255,0,0,1.00)",
|
||||
"borderBottomWidth": "0px",
|
||||
@@ -204,7 +204,7 @@ Object {
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolveWithNode next class names have priority over current inline styles 1`] = `
|
||||
Object {
|
||||
"className": "rn-opacity-6dt33c",
|
||||
"className": "r-opacity-6dt33c",
|
||||
"style": Object {
|
||||
"opacity": "",
|
||||
},
|
||||
@@ -252,7 +252,7 @@ Object {
|
||||
|
||||
exports[`StyleSheet/createStyleResolver resolveWithNode when isRTL=true, resolves to flipped classNames 1`] = `
|
||||
Object {
|
||||
"className": "rn-left-1u10d71 rn-marginRight-zso239",
|
||||
"className": "r-left-1u10d71 r-marginRight-zso239",
|
||||
"style": Object {
|
||||
"marginRight": "",
|
||||
"right": "5px",
|
||||
|
||||
@@ -58,7 +58,7 @@ export function atomic(style: Style): CompilerOutput {
|
||||
const { identifier } = cachedResult;
|
||||
acc[identifier] = cachedResult;
|
||||
} else {
|
||||
const identifier = createIdentifier('rn', property, value);
|
||||
const identifier = createIdentifier('r', property, value);
|
||||
const rules = createAtomicRules(identifier, property, value);
|
||||
const cachedResult = cache.set(property, valueString, {
|
||||
property,
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`components/Text prop "onPress" 1`] = `
|
||||
<div
|
||||
className="css-text-76zvg2 rn-cursor-1loqt21"
|
||||
data-focusable={true}
|
||||
dir="auto"
|
||||
onClick={[Function]}
|
||||
onKeyDown={[Function]}
|
||||
tabIndex="0"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`components/Text prop "selectable" 1`] = `
|
||||
<div
|
||||
className="css-text-76zvg2"
|
||||
dir="auto"
|
||||
/>
|
||||
`;
|
||||
|
||||
exports[`components/Text prop "selectable" 2`] = `
|
||||
<div
|
||||
className="css-text-76zvg2 rn-userSelect-lrvibr"
|
||||
dir="auto"
|
||||
/>
|
||||
`;
|
||||
@@ -35,17 +35,4 @@ describe('components/Text', () => {
|
||||
});
|
||||
|
||||
test('prop "numberOfLines"', () => {});
|
||||
|
||||
test('prop "onPress"', () => {
|
||||
const onPress = e => {};
|
||||
const component = shallow(<Text onPress={onPress} />);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
|
||||
test('prop "selectable"', () => {
|
||||
let component = shallow(<Text />);
|
||||
expect(component).toMatchSnapshot();
|
||||
component = shallow(<Text selectable={false} />);
|
||||
expect(component).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user