UNPKG

rizzo-next

Version:

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

1,736 lines (1,735 loc) 960 kB
{ "type": "Program", "start": 0, "end": 4547, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 224, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 44, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "imported": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" }, "local": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" } } ], "importKind": "value", "source": { "type": "Literal", "start": 26, "end": 43, "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 43 } }, "value": "../../core/bane", "rawValue": "../../core/bane", "raw": "\"../../core/bane\"" } }, { "type": "ImportDeclaration", "start": 45, "end": 78, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 59, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 52, "end": 59, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "name": "Overlay" } } ], "importKind": "value", "source": { "type": "Literal", "start": 65, "end": 77, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 32 } }, "value": "../overlay", "rawValue": "../overlay", "raw": "\"../overlay\"" } }, { "type": "ImportDeclaration", "start": 79, "end": 146, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 67 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 86, "end": 103, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 24 } }, "local": { "type": "Identifier", "start": 86, "end": 103, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 24 } }, "name": "waitForTransition" } } ], "importKind": "value", "source": { "type": "Literal", "start": 109, "end": 145, "loc": { "start": { "line": 3, "column": 30 }, "end": { "line": 3, "column": 66 } }, "value": "../../core/utils/waitForTransition", "rawValue": "../../core/utils/waitForTransition", "raw": "\"../../core/utils/waitForTransition\"" } }, { "type": "ImportDeclaration", "start": 147, "end": 192, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 45 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 154, "end": 167, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 20 } }, "local": { "type": "Identifier", "start": 154, "end": 167, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 20 } }, "name": "SearchActions" } } ], "importKind": "value", "source": { "type": "Literal", "start": 173, "end": 191, "loc": { "start": { "line": 4, "column": 26 }, "end": { "line": 4, "column": 44 } }, "value": "./search_actions", "rawValue": "./search_actions", "raw": "\"./search_actions\"" } }, { "type": "ImportDeclaration", "start": 193, "end": 234, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 41 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 200, "end": 211, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 18 } }, "local": { "type": "Identifier", "start": 200, "end": 211, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 18 } }, "name": "SearchState" } } ], "importKind": "value", "source": { "type": "Literal", "start": 217, "end": 233, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 40 } }, "value": "./search_state", "rawValue": "./search_state", "raw": "\"./search_state\"" } }, { "type": "ImportDeclaration", "start": 235, "end": 271, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 242, "end": 250, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 15 } }, "local": { "type": "Identifier", "start": 242, "end": 250, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 15 } }, "name": "template" } } ], "importKind": "value", "source": { "type": "Literal", "start": 256, "end": 270, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 35 } }, "value": "./search.hbs", "rawValue": "./search.hbs", "raw": "\"./search.hbs\"" } }, { "type": "ImportDeclaration", "start": 272, "end": 296, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 24 } }, "specifiers": [], "source": { "type": "Literal", "start": 279, "end": 295, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 23 } }, "value": "./_search.scss", "rawValue": "./_search.scss", "raw": "\"./_search.scss\"" } }, { "type": "ImportDeclaration", "start": 298, "end": 346, "loc": { "start": { "line": 9, "column": 0 }, "end": { "line": 9, "column": 48 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 305, "end": 324, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 26 } }, "local": { "type": "Identifier", "start": 305, "end": 324, "loc": { "start": { "line": 9, "column": 7 }, "end": { "line": 9, "column": 26 } }, "name": "SearchItemComponent" } } ], "importKind": "value", "source": { "type": "Literal", "start": 330, "end": 345, "loc": { "start": { "line": 9, "column": 32 }, "end": { "line": 9, "column": 47 } }, "value": "./search_item", "rawValue": "./search_item", "raw": "\"./search_item\"" } }, { "type": "Identifier", "start": 348, "end": 4513, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 221, "column": 1 } }, "id": { "type": "Identifier", "start": 354, "end": 369, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 21 } }, "name": "SearchComponent" }, "superClass": { "type": "Identifier", "start": 378, "end": 387, "loc": { "start": { "line": 11, "column": 30 }, "end": { "line": 11, "column": 39 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 388, "end": 4513, "loc": { "start": { "line": 11, "column": 40 }, "end": { "line": 221, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 393, "end": 442, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 15, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 404, "end": 413, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 22 } }, "name": "className" }, "static": true, "kind": "get", "value": { "type": "FunctionExpression", "start": 413, "end": 442, "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 15, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 416, "end": 442, "loc": { "start": { "line": 13, "column": 25 }, "end": { "line": 15, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 422, "end": 438, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 20 } }, "argument": { "type": "Literal", "start": 429, "end": 437, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 19 } }, "value": "search", "rawValue": "search", "raw": "\"search\"" } } ] } } }, { "type": "MethodDefinition", "start": 446, "end": 561, "loc": { "start": { "line": 17, "column": 2 }, "end": { "line": 23, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 450, "end": 456, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 12 } }, "name": "isOpen" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 456, "end": 561, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 23, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 459, "end": 561, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 23, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 465, "end": 531, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 20, "column": 5 } }, "test": { "type": "BinaryExpression", "start": 468, "end": 494, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 33 } }, "left": { "type": "MemberExpression", "start": 468, "end": 480, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 19 } }, "object": { "type": "ThisExpression", "start": 468, "end": 472, "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 11 } } }, "property": { "type": "Identifier", "start": 473, "end": 480, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 19 } }, "name": "_isOpen" }, "computed": false }, "operator": "===", "right": { "type": "Identifier", "start": 485, "end": 494, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 33 } }, "name": "undefined" } }, "consequent": { "type": "BlockStatement", "start": 496, "end": 531, "loc": { "start": { "line": 18, "column": 35 }, "end": { "line": 20, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 504, "end": 525, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 27 } }, "expression": { "type": "AssignmentExpression", "start": 504, "end": 524, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 26 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 504, "end": 516, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 18 } }, "object": { "type": "ThisExpression", "start": 504, "end": 508, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 10 } } }, "property": { "type": "Identifier", "start": 509, "end": 516, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 18 } }, "name": "_isOpen" }, "computed": false }, "right": { "type": "Literal", "start": 519, "end": 524, "loc": { "start": { "line": 19, "column": 21 }, "end": { "line": 19, "column": 26 } }, "value": false, "rawValue": false, "raw": "false" } } } ] }, "alternate": null }, { "type": "ReturnStatement", "start": 537, "end": 557, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 24 } }, "argument": { "type": "MemberExpression", "start": 544, "end": 556, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 23 } }, "object": { "type": "ThisExpression", "start": 544, "end": 548, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 15 } } }, "property": { "type": "Identifier", "start": 549, "end": 556, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 23 } }, "name": "_isOpen" }, "computed": false } } ] } } }, { "type": "MethodDefinition", "start": 565, "end": 618, "loc": { "start": { "line": 25, "column": 2 }, "end": { "line": 27, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 569, "end": 575, "loc": { "start": { "line": 25, "column": 6 }, "end": { "line": 25, "column": 12 } }, "name": "isOpen" }, "static": false, "kind": "set", "value": { "type": "FunctionExpression", "start": 575, "end": 618, "loc": { "start": { "line": 25, "column": 12 }, "end": { "line": 27, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 576, "end": 579, "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 16 } }, "name": "val" } ], "body": { "type": "BlockStatement", "start": 580, "end": 618, "loc": { "start": { "line": 25, "column": 17 }, "end": { "line": 27, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 586, "end": 614, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 586, "end": 613, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 31 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 586, "end": 598, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 16 } }, "object": { "type": "ThisExpression", "start": 586, "end": 590, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 8 } } }, "property": { "type": "Identifier", "start": 591, "end": 598, "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 26, "column": 16 } }, "name": "_isOpen" }, "computed": false }, "right": { "type": "LogicalExpression", "start": 601, "end": 613, "loc": { "start": { "line": 26, "column": 19 }, "end": { "line": 26, "column": 31 } }, "left": { "type": "Identifier", "start": 601, "end": 604, "loc": { "start": { "line": 26, "column": 19 }, "end": { "line": 26, "column": 22 } }, "name": "val" }, "operator": "||", "right": { "type": "Literal", "start": 608, "end": 613, "loc": { "start": { "line": 26, "column": 26 }, "end": { "line": 26, "column": 31 } }, "value": false, "rawValue": false, "raw": "false" } } } } ] } } }, { "type": "MethodDefinition", "start": 622, "end": 748, "loc": { "start": { "line": 29, "column": 2 }, "end": { "line": 35, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 626, "end": 636, "loc": { "start": { "line": 29, "column": 6 }, "end": { "line": 29, "column": 16 } }, "name": "collection" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 636, "end": 748, "loc": { "start": { "line": 29, "column": 16 }, "end": { "line": 35, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 638, "end": 748, "loc": { "start": { "line": 29, "column": 18 }, "end": { "line": 35, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 644, "end": 714, "loc": { "start": { "line": 30, "column": 4 }, "end": { "line": 32, "column": 5 } }, "test": { "type": "BinaryExpression", "start": 647, "end": 677, "loc": { "start": { "line": 30, "column": 7 }, "end": { "line": 30, "column": 37 } }, "left": { "type": "MemberExpression", "start": 647, "end": 663, "loc": { "start": { "line": 30, "column": 7 }, "end": { "line": 30, "column": 23 } }, "object": { "type": "ThisExpression", "start": 647, "end": 651, "loc": { "start": { "line": 30, "column": 7 }, "end": { "line": 30, "column": 11 } } }, "property": { "type": "Identifier", "start": 652, "end": 663, "loc": { "start": { "line": 30, "column": 12 }, "end": { "line": 30, "column": 23 } }, "name": "_collection" }, "computed": false }, "operator": "===", "right": { "type": "Identifier", "start": 668, "end": 677, "loc": { "start": { "line": 30, "column": 28 }, "end": { "line": 30, "column": 37 } }, "name": "undefined" } }, "consequent": { "type": "BlockStatement", "start": 678, "end": 714, "loc": { "start": { "line": 30, "column": 38 }, "end": { "line": 32, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 686, "end": 708, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 686, "end": 707, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 686, "end": 702, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 22 } }, "object": { "type": "ThisExpression", "start": 686, "end": 690, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 10 } } }, "property": { "type": "Identifier", "start": 691, "end": 702, "loc": { "start": { "line": 31, "column": 11 }, "end": { "line": 31, "column": 22 } }, "name": "_collection" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 705, "end": 707, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 27 } }, "elements": [] } } } ] }, "alternate": null }, { "type": "ReturnStatement", "start": 720, "end": 744, "loc": { "start": { "line": 34, "column": 4 }, "end": { "line": 34, "column": 28 } }, "argument": { "type": "MemberExpression", "start": 727, "end": 743, "loc": { "start": { "line": 34, "column": 11 }, "end": { "line": 34, "column": 27 } }, "object": { "type": "ThisExpression", "start": 727, "end": 731, "loc": { "start": { "line": 34, "column": 11 }, "end": { "line": 34, "column": 15 } } }, "property": { "type": "Identifier", "start": 732, "end": 743, "loc": { "start": { "line": 34, "column": 16 }, "end": { "line": 34, "column": 27 } }, "name": "_collection" }, "computed": false } } ] } } }, { "type": "MethodDefinition", "start": 752, "end": 992, "loc": { "start": { "line": 37, "column": 2 }, "end": { "line": 45, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 756, "end": 766, "loc": { "start": { "line": 37, "column": 6 }, "end": { "line": 37, "column": 16 } }, "name": "collection" }, "static": false, "kind": "set", "value": { "type": "FunctionExpression", "start": 766, "end": 992, "loc": { "start": { "line": 37, "column": 16 }, "end": { "line": 45, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 767, "end": 770, "loc": { "start": { "line": 37, "column": 17 }, "end": { "line": 37, "column": 20 } }, "name": "arr" } ], "body": { "type": "BlockStatement", "start": 772, "end": 992, "loc": { "start": { "line": 37, "column": 22 }, "end": { "line": 45, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 778, "end": 801, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 27 } }, "expression": { "type": "AssignmentExpression", "start": 778, "end": 800, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 26 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 778, "end": 794, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 20 } }, "object": { "type": "ThisExpression", "start": 778, "end": 782, "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 8