UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,205 lines 44 kB
{ "type": "Program", "start": 0, "end": 443, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 26, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 26, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "local": { "type": "Identifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "name": "React" } } ], "importKind": "value", "source": { "type": "Literal", "start": 18, "end": 25, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } }, "value": "react", "rawValue": "react", "raw": "\"react\"" }, "trailingComments": [ { "type": "Block", "value": "*\n * Alerts for the sidebar\n ", "start": 28, "end": 61, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } }, "range": [ 28, 61 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 62, "end": 442, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 25, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 77, "end": 442, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 25, "column": 1 } }, "id": { "type": "Identifier", "start": 83, "end": 92, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 30 } }, "name": "AlertView", "leadingComments": null }, "superClass": { "type": "MemberExpression", "start": 101, "end": 116, "loc": { "start": { "line": 6, "column": 39 }, "end": { "line": 6, "column": 54 } }, "object": { "type": "Identifier", "start": 101, "end": 106, "loc": { "start": { "line": 6, "column": 39 }, "end": { "line": 6, "column": 44 } }, "name": "React" }, "property": { "type": "Identifier", "start": 107, "end": 116, "loc": { "start": { "line": 6, "column": 45 }, "end": { "line": 6, "column": 54 } }, "name": "Component" }, "computed": false }, "body": { "type": "ClassBody", "start": 117, "end": 442, "loc": { "start": { "line": 6, "column": 55 }, "end": { "line": 25, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 122, "end": 439, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 23, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 122, "end": 128, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 8 } }, "name": "render" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 128, "end": 439, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 23, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 131, "end": 439, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 23, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 137, "end": 185, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 10, "column": 21 } }, "declarations": [ { "type": "VariableDeclarator", "start": 141, "end": 162, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 29 } }, "id": { "type": "Identifier", "start": 141, "end": 152, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 19 } }, "name": "classString" }, "init": { "type": "Literal", "start": 155, "end": 162, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 29 } }, "value": "alert", "rawValue": "alert", "raw": "\"alert\"" } }, { "type": "VariableDeclarator", "start": 172, "end": 184, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 20 } }, "id": { "type": "Identifier", "start": 172, "end": 179, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 15 } }, "name": "message" }, "init": { "type": "Literal", "start": 182, "end": 184, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 20 } }, "value": "", "rawValue": "", "raw": "\"\"" } } ], "kind": "let" }, { "type": "IfStatement", "start": 191, "end": 347, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 16, "column": 5 } }, "test": { "type": "MemberExpression", "start": 195, "end": 211, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 24 } }, "object": { "type": "MemberExpression", "start": 195, "end": 205, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 18 } }, "object": { "type": "ThisExpression", "start": 195, "end": 199, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 12 } } }, "property": { "type": "Identifier", "start": 200, "end": 205, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 18 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 206, "end": 211, "loc": { "start": { "line": 12, "column": 19 }, "end": { "line": 12, "column": 24 } }, "name": "error" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 213, "end": 347, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 221, "end": 256, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 41 } }, "expression": { "type": "AssignmentExpression", "start": 221, "end": 255, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 40 } }, "operator": "=", "left": { "type": "Identifier", "start": 221, "end": 228, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 13 } }, "name": "message" }, "right": { "type": "MemberExpression", "start": 231, "end": 255, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 40 } }, "object": { "type": "MemberExpression", "start": 231, "end": 247, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 32 } }, "object": { "type": "MemberExpression", "start": 231, "end": 241, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 26 } }, "object": { "type": "ThisExpression", "start": 231, "end": 235, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 20 } } }, "property": { "type": "Identifier", "start": 236, "end": 241, "loc": { "start": { "line": 13, "column": 21 }, "end": { "line": 13, "column": 26 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 242, "end": 247, "loc": { "start": { "line": 13, "column": 27 }, "end": { "line": 13, "column": 32 } }, "name": "error" }, "computed": false }, "property": { "type": "Identifier", "start": 248, "end": 255, "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 13, "column": 40 } }, "name": "message" }, "computed": false } } }, { "type": "VariableDeclaration", "start": 263, "end": 296, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 14, "column": 39 } }, "declarations": [ { "type": "VariableDeclarator", "start": 267, "end": 295, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 38 } }, "id": { "type": "Identifier", "start": 267, "end": 271, "loc": { "start": { "line": 14, "column": 10 }, "end": { "line": 14, "column": 14 } }, "name": "type" }, "init": { "type": "MemberExpression", "start": 274, "end": 295, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 38 } }, "object": { "type": "MemberExpression", "start": 274, "end": 290, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 33 } }, "object": { "type": "MemberExpression", "start": 274, "end": 284, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 27 } }, "object": { "type": "ThisExpression", "start": 274, "end": 278, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 14, "column": 21 } } }, "property": { "type": "Identifier", "start": 279, "end": 284, "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 27 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 285, "end": 290, "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 14, "column": 33 } }, "name": "error" }, "computed": false }, "property": { "type": "Identifier", "start": 291, "end": 295, "loc": { "start": { "line": 14, "column": 34 }, "end": { "line": 14, "column": 38 } }, "name": "type" }, "computed": false } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 303, "end": 341, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 44 } }, "expression": { "type": "AssignmentExpression", "start": 303, "end": 340, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 43 } }, "operator": "+=", "left": { "type": "Identifier", "start": 303, "end": 314, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 17 } }, "name": "classString" }, "right": { "type": "BinaryExpression", "start": 318, "end": 340, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 43 } }, "left": { "type": "Literal", "start": 318, "end": 333, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 36 } }, "value": " active error", "rawValue": " active error", "raw": "\" active error\"" }, "operator": "+", "right": { "type": "Identifier", "start": 336, "end": 340, "loc": { "start": { "line": 15, "column": 39 }, "end": { "line": 15, "column": 43 } }, "name": "type" } } } } ] }, "alternate": null }, { "type": "ReturnStatement", "start": 353, "end": 435, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 22, "column": 6 } }, "argument": { "type": "JSXElement", "start": 368, "end": 428, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 21, "column": 12 } }, "openingElement": { "type": "JSXOpeningElement", "start": 368, "end": 397, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 35 } }, "attributes": [ { "type": "JSXAttribute", "start": 373, "end": 396, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 34 } }, "name": { "type": "JSXIdentifier", "start": 373, "end": 382, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 20 } }, "name": "className" }, "value": { "type": "JSXExpressionContainer", "start": 383, "end": 396, "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 34 } }, "expression": { "type": "Identifier", "start": 384, "end": 395, "loc": { "start": { "line": 19, "column": 22 }, "end": { "line": 19, "column": 33 } }, "name": "classString" } } } ], "name": { "type": "JSXIdentifier", "start": 369, "end": 372, "loc": { "start": { "line": 19, "column": 7 }, "end": { "line": 19, "column": 10 } }, "name": "div" }, "selfClosing": false }, "closingElement": { "type": "JSXClosingElement", "start": 422, "end": 428, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 12 } }, "name": { "type": "JSXIdentifier", "start": 424, "end": 427, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 21, "column": 11 } }, "name": "div" } }, "children": [ { "type": "Literal", "start": 397, "end": 406, "loc": { "start": { "line": 19, "column": 35 }, "end": { "line": 20, "column": 8 } }, "value": "\n ", "rawValue": null, "raw": "\n " }, { "type": "JSXExpressionContainer", "start": 406, "end": 415, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 17 } }, "expression": { "type": "Identifier", "start": 407, "end": 414, "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 16 } }, "name": "message" } }, { "type": "Literal", "start": 415, "end": 422, "loc": { "start": { "line": 20, "column": 17 }, "end": { "line": 21, "column": 6 } }, "value": "\n ", "rawValue": null, "raw": "\n " } ], "parenthesizedExpression": true } } ] } } } ] }, "leadingComments": [ { "type": "Block", "value": "*\n * Alerts for the sidebar\n ", "start": 28, "end": 61, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } }, "range": [ 28, 61 ] } ], "trailingComments": [] }, "leadingComments": [ { "type": "Block", "value": "*\n * Alerts for the sidebar\n ", "start": 28, "end": 61, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 5, "column": 3 } }, "range": [ 28, 61 ] } ] } ] }