UNPKG

rizzo-next

Version:

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

1,439 lines (1,438 loc) 327 kB
{ "type": "Program", "start": 0, "end": 2608, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 81, "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\"" } }, { "type": "ImportDeclaration", "start": 27, "end": 55, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 28 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 34, "end": 37, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 10 } }, "local": { "type": "Identifier", "start": 34, "end": 37, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 10 } }, "name": "Tab" } } ], "importKind": "value", "source": { "type": "Literal", "start": 43, "end": 54, "loc": { "start": { "line": 2, "column": 16 }, "end": { "line": 2, "column": 27 } }, "value": "./tab.jsx", "rawValue": "./tab.jsx", "raw": "\"./tab.jsx\"" } }, { "type": "ImportDeclaration", "start": 56, "end": 88, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 63, "end": 68, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 } }, "local": { "type": "Identifier", "start": 63, "end": 68, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 12 } }, "name": "Panel" } } ], "importKind": "value", "source": { "type": "Literal", "start": 74, "end": 87, "loc": { "start": { "line": 3, "column": 18 }, "end": { "line": 3, "column": 31 } }, "value": "./panel.jsx", "rawValue": "./panel.jsx", "raw": "\"./panel.jsx\"" } }, { "type": "ImportDeclaration", "start": 89, "end": 125, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 96, "end": 106, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 17 } }, "local": { "type": "Identifier", "start": 96, "end": 106, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 17 } }, "name": "MapActions" } } ], "importKind": "value", "source": { "type": "Literal", "start": 112, "end": 124, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 4, "column": 35 } }, "value": "../actions", "rawValue": "../actions", "raw": "\"../actions\"" } }, { "type": "ImportDeclaration", "start": 126, "end": 169, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 43 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 133, "end": 143, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "local": { "type": "Identifier", "start": 133, "end": 143, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 17 } }, "name": "AboutPanel" } } ], "importKind": "value", "source": { "type": "Literal", "start": 149, "end": 168, "loc": { "start": { "line": 5, "column": 23 }, "end": { "line": 5, "column": 42 } }, "value": "./about-panel.jsx", "rawValue": "./about-panel.jsx", "raw": "\"./about-panel.jsx\"" }, "trailingComments": [ { "type": "Block", "value": "*\n * Sidebar view that sets up main tabs\n ", "start": 171, "end": 217, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 9, "column": 3 } }, "range": [ 171, 217 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 218, "end": 2607, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 80, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 233, "end": 2607, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 80, "column": 1 } }, "id": { "type": "Identifier", "start": 239, "end": 250, "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 32 } }, "name": "SidebarView", "leadingComments": null }, "superClass": { "type": "MemberExpression", "start": 259, "end": 274, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 56 } }, "object": { "type": "Identifier", "start": 259, "end": 264, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 46 } }, "name": "React" }, "property": { "type": "Identifier", "start": 265, "end": 274, "loc": { "start": { "line": 10, "column": 47 }, "end": { "line": 10, "column": 56 } }, "name": "Component" }, "computed": false }, "body": { "type": "ClassBody", "start": 275, "end": 2607, "loc": { "start": { "line": 10, "column": 57 }, "end": { "line": 80, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 280, "end": 2428, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 72, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 280, "end": 286, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 12, "column": 8 } }, "name": "render" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 286, "end": 2428, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 72, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 289, "end": 2428, "loc": { "start": { "line": 12, "column": 11 }, "end": { "line": 72, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 295, "end": 555, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 20, "column": 47 } }, "declarations": [ { "type": "VariableDeclarator", "start": 299, "end": 329, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 38 } }, "id": { "type": "Identifier", "start": 299, "end": 307, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 16 } }, "name": "location" }, "init": { "type": "MemberExpression", "start": 310, "end": 329, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 38 } }, "object": { "type": "MemberExpression", "start": 310, "end": 320, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 29 } }, "object": { "type": "ThisExpression", "start": 310, "end": 314, "loc": { "start": { "line": 13, "column": 19 }, "end": { "line": 13, "column": 23 } } }, "property": { "type": "Identifier", "start": 315, "end": 320, "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 29 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 321, "end": 329, "loc": { "start": { "line": 13, "column": 30 }, "end": { "line": 13, "column": 38 } }, "name": "location" }, "computed": false } }, { "type": "VariableDeclarator", "start": 339, "end": 381, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 50 } }, "id": { "type": "Identifier", "start": 339, "end": 353, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 22 } }, "name": "activeSetIndex" }, "init": { "type": "MemberExpression", "start": 356, "end": 381, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 50 } }, "object": { "type": "MemberExpression", "start": 356, "end": 366, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 35 } }, "object": { "type": "ThisExpression", "start": 356, "end": 360, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 29 } } }, "property": { "type": "Identifier", "start": 361, "end": 366, "loc": { "start": { "line": 14, "column": 30 }, "end": { "line": 14, "column": 35 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 367, "end": 381, "loc": { "start": { "line": 14, "column": 36 }, "end": { "line": 14, "column": 50 } }, "name": "activeSetIndex" }, "computed": false } }, { "type": "VariableDeclarator", "start": 391, "end": 403, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 20 } }, "id": { "type": "Identifier", "start": 391, "end": 403, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 20 } }, "name": "panelContent" }, "init": null }, { "type": "VariableDeclarator", "start": 413, "end": 425, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 20 } }, "id": { "type": "Identifier", "start": 413, "end": 421, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 16 } }, "name": "tabCount" }, "init": { "type": "Literal", "start": 424, "end": 425, "loc": { "start": { "line": 16, "column": 19 }, "end": { "line": 16, "column": 20 } }, "value": 0, "rawValue": 0, "raw": "0" } }, { "type": "VariableDeclarator", "start": 435, "end": 457, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 30 } }, "id": { "type": "Identifier", "start": 435, "end": 439, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } }, "name": "sets" }, "init": { "type": "MemberExpression", "start": 442, "end": 457, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 30 } }, "object": { "type": "MemberExpression", "start": 442, "end": 452, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 25 } }, "object": { "type": "ThisExpression", "start": 442, "end": 446, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 19 } } }, "property": { "type": "Identifier", "start": 447, "end": 452, "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 25 } }, "name": "props" }, "computed": false }, "property": { "type": "Identifier", "start": 453, "end": 457, "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 30 } }, "name": "sets" }, "computed": false } }, { "type": "VariableDeclarator", "start": 467, "end": 480, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 21 } }, "id": { "type": "Identifier", "start": 467, "end": 475, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 16 } }, "name": "backSlug" }, "init": { "type": "Literal", "start": 478, "end": 480, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 18, "column": 21 } }, "value": "", "rawValue": "", "raw": "\"\"" } }, { "type": "VariableDeclarator", "start": 490, "end": 506, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 24 } }, "id": { "type": "Identifier", "start": 490, "end": 501, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 19 } }, "name": "backElement" }, "init": { "type": "Literal", "start": 504, "end": 506, "loc": { "start": { "line": 19, "column": 22 }, "end": { "line": 19, "column": 24 } }, "value": "", "rawValue": "", "raw": "\"\"" } }, { "type": "VariableDeclarator", "start": 516, "end": 554, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 46 } }, "id": { "type": "Identifier", "start": 516, "end": 523, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 15 } }, "name": "h1Class" }, "init": { "type": "Literal", "start": 526, "end": 554, "loc": { "start": { "line": 20, "column": 18 }, "end": { "line": 20, "column": 46 } }, "value": "sidebar__title __continent", "rawValue": "sidebar__title __continent", "raw": "\"sidebar__title __continent\"" } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 561, "end": 926, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 31, "column": 7 } }, "declarations": [ { "type": "VariableDeclarator", "start": 565, "end": 925, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 31, "column": 6 } }, "id": { "type": "Identifier", "start": 565, "end": 569, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 12 } }, "name": "tabs" }, "init": { "type": "CallExpression", "start": 572, "end": 925, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 31, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 572, "end": 580, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 23 } }, "object": { "type": "Identifier", "start": 572, "end": 576, "loc": { "start": { "line": 22, "column": 15 }, "end": { "line": 22, "column": 19 } }, "name": "sets" }, "property": { "type": "Identifier", "start": 577, "end": 580, "loc": { "start": { "line": 22, "column": 20 }, "end": { "line": 22, "column": 23 } }, "name": "map" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 581, "end": 924, "loc": { "start": { "line": 22, "column": 24 }, "end": { "line": 31, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 582, "end": 585, "loc": { "start": { "line": 22, "column": 25 }, "end": { "line": 22, "column": 28 } }, "name": "set" }, { "type": "Identifier", "start": 587, "end": 588, "loc": { "start": { "line": 22, "column": 30 }, "end": { "line": 22, "column": 31 } }, "name": "i" } ], "body": { "type": "BlockStatement", "start": 593, "end": 924, "loc": { "start": { "line": 22, "column": 36 }, "end": { "line": 31, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 601, "end": 612, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 17 } }, "expression": { "type": "UpdateExpression", "start": 601, "end": 611, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 16 } }, "operator": "++", "prefix": false, "argument": { "type": "Identifier", "start": 601, "end": 609, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 14 } }, "name": "tabCount" } } }, { "type": "VariableDeclaration", "start": 619, "end": 780, "loc": { "start": { "line": 24, "column": 6 }, "end": { "line": 26, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", "start": 623, "end": 669, "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 56 } }, "id": { "type": "Identifier", "start": 623, "end": 631, "loc": { "start": { "line": 24, "column": 10 }, "end": { "line": 24, "column": 18 } }, "name": "isActive" }, "init": { "type": "ConditionalExpression", "start": 634, "end": 669, "loc": { "start": { "line": 24, "column": 21 }, "end": { "line": 24, "column": 56 } }, "test": { "type": "BinaryExpression", "start": 634, "end": 654, "loc": { "start": { "line": 24, "column": 21 }, "end": { "line": 24, "column": 41 } }, "left": { "type": "Identifier", "start": 634, "end": 635, "loc": { "start": { "line": 24, "column": 21 }, "end": { "line": 24, "column": 22 } }, "name": "i" }, "operator": "===", "right": {