rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,287 lines (1,286 loc) • 105 kB
JSON
{
"type": "Program",
"start": 0,
"end": 962,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 35,
"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 * Shows when items are being fetched\n ",
"start": 28,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 3
}
},
"range": [
28,
73
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 74,
"end": 961,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 34,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 89,
"end": 961,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 34,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 95,
"end": 114,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 40
}
},
"name": "SidebarFetchingView",
"leadingComments": null
},
"superClass": {
"type": "MemberExpression",
"start": 123,
"end": 138,
"loc": {
"start": {
"line": 6,
"column": 49
},
"end": {
"line": 6,
"column": 64
}
},
"object": {
"type": "Identifier",
"start": 123,
"end": 128,
"loc": {
"start": {
"line": 6,
"column": 49
},
"end": {
"line": 6,
"column": 54
}
},
"name": "React"
},
"property": {
"type": "Identifier",
"start": 129,
"end": 138,
"loc": {
"start": {
"line": 6,
"column": 55
},
"end": {
"line": 6,
"column": 64
}
},
"name": "Component"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 139,
"end": 961,
"loc": {
"start": {
"line": 6,
"column": 65
},
"end": {
"line": 34,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 144,
"end": 958,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 32,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 144,
"end": 150,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 8
}
},
"name": "render"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 150,
"end": 958,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 32,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 153,
"end": 958,
"loc": {
"start": {
"line": 8,
"column": 11
},
"end": {
"line": 32,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 159,
"end": 351,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 12,
"column": 55
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 163,
"end": 193,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 38
}
},
"id": {
"type": "Identifier",
"start": 163,
"end": 171,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 16
}
},
"name": "location"
},
"init": {
"type": "MemberExpression",
"start": 174,
"end": 193,
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 174,
"end": 184,
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 174,
"end": 178,
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"start": 179,
"end": 184,
"loc": {
"start": {
"line": 9,
"column": 24
},
"end": {
"line": 9,
"column": 29
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 185,
"end": 193,
"loc": {
"start": {
"line": 9,
"column": 30
},
"end": {
"line": 9,
"column": 38
}
},
"name": "location"
},
"computed": false
}
},
{
"type": "VariableDeclarator",
"start": 203,
"end": 237,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 42
}
},
"id": {
"type": "Identifier",
"start": 203,
"end": 213,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 18
}
},
"name": "breadcrumb"
},
"init": {
"type": "MemberExpression",
"start": 216,
"end": 237,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 42
}
},
"object": {
"type": "MemberExpression",
"start": 216,
"end": 226,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 31
}
},
"object": {
"type": "ThisExpression",
"start": 216,
"end": 220,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 25
}
}
},
"property": {
"type": "Identifier",
"start": 221,
"end": 226,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 31
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 227,
"end": 237,
"loc": {
"start": {
"line": 10,
"column": 32
},
"end": {
"line": 10,
"column": 42
}
},
"name": "breadcrumb"
},
"computed": false
}
},
{
"type": "VariableDeclarator",
"start": 247,
"end": 294,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 55
}
},
"id": {
"type": "Identifier",
"start": 247,
"end": 256,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 17
}
},
"name": "crumbText"
},
"init": {
"type": "LogicalExpression",
"start": 260,
"end": 294,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 55
}
},
"left": {
"type": "Identifier",
"start": 260,
"end": 270,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 31
}
},
"name": "breadcrumb"
},
"operator": "||",
"right": {
"type": "MemberExpression",
"start": 274,
"end": 294,
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 55
}
},
"object": {
"type": "Identifier",
"start": 274,
"end": 282,
"loc": {
"start": {
"line": 11,
"column": 35
},
"end": {
"line": 11,
"column": 43
}
},
"name": "location"
},
"property": {
"type": "Identifier",
"start": 283,
"end": 294,
"loc": {
"start": {
"line": 11,
"column": 44
},
"end": {
"line": 11,
"column": 55
}
},
"name": "grandparent"
},
"computed": false
}
}
},
{
"type": "VariableDeclarator",
"start": 304,
"end": 350,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 54
}
},
"id": {
"type": "Identifier",
"start": 304,
"end": 313,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 17
}
},
"name": "placeText"
},
"init": {
"type": "LogicalExpression",
"start": 316,
"end": 350,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 54
}
},
"left": {
"type": "MemberExpression",
"start": 316,
"end": 332,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 36
}
},
"object": {
"type": "MemberExpression",
"start": 316,
"end": 326,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 316,
"end": 320,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 24
}
}
},
"property": {
"type": "Identifier",
"start": 321,
"end": 326,
"loc": {
"start": {
"line": 12,
"column": 25
},
"end": {
"line": 12,
"column": 30
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 327,
"end": 332,
"loc": {
"start": {
"line": 12,
"column": 31
},
"end": {
"line": 12,
"column": 36
}
},
"name": "place"
},
"computed": false
},
"operator": "||",
"right": {
"type": "MemberExpression",
"start": 336,
"end": 350,
"loc": {
"start": {
"line": 12,
"column": 40
},
"end": {
"line": 12,
"column": 54
}
},
"object": {
"type": "Identifier",
"start": 336,
"end": 344,
"loc": {
"start": {
"line": 12,
"column": 40
},
"end": {
"line": 12,
"column": 48
}
},
"name": "location"
},
"property": {
"type": "Identifier",
"start": 345,
"end": 350,
"loc": {
"start": {
"line": 12,
"column": 49
},
"end": {
"line": 12,
"column": 54
}
},
"name": "title"
},
"computed": false
}
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 357,
"end": 507,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 154
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 361,
"end": 506,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 153
}
},
"id": {
"type": "Identifier",
"start": 361,
"end": 372,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 19
}
},
"name": "backElement"
},
"init": {
"type": "ConditionalExpression",
"start": 375,
"end": 506,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 153
}
},
"test": {
"type": "Identifier",
"start": 375,
"end": 384,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 31
}
},
"name": "crumbText"
},
"consequent": {
"type": "JSXElement",
"start": 387,
"end": 501,
"loc": {
"start": {
"line": 14,
"column": 34
},
"end": {
"line": 14,
"column": 148
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 387,
"end": 423,
"loc": {
"start": {
"line": 14,
"column": 34
},
"end": {
"line": 14,
"column": 70
}
},
"attributes": [
{
"type": "JSXAttribute",
"start": 392,
"end": 421,
"loc": {
"start": {
"line": 14,
"column": 39
},
"end": {
"line": 14,
"column": 68
}
},
"name": {
"type": "JSXIdentifier",
"start": 392,
"end": 401,
"loc": {
"start": {
"line": 14,
"column": 39
},
"end": {
"line": 14,
"column": 48
}
},
"name": "className"
},
"value": {
"type": "Literal",
"start": 402,
"end": 421,
"loc": {
"start": {
"line": 14,
"column": 49
},
"end": {
"line": 14,
"column": 68
}
},
"value": "location-subtitle",
"rawValue": null,
"raw": "\"location-subtitle\""
}
}
],
"name": {
"type": "JSXIdentifier",
"start": 388,
"end": 391,
"loc": {
"start": {
"line": 14,
"column": 35
},
"end": {
"line": 14,
"column": 38
}
},
"name": "div"
},
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 495,
"end": 501,
"loc": {
"start": {
"line": 14,
"column": 142
},
"end": {
"line": 14,
"column": 148
}
},
"name": {
"type": "JSXIdentifier",
"start": 497,
"end": 500,
"loc": {
"start": {
"line": 14,
"column": 144
},
"end": {
"line": 14,
"column": 147
}
},
"name": "div"
}
},
"children": [
{
"type": "JSXElement",
"start": 423,
"end": 484,
"loc": {
"start": {
"line": 14,
"column": 70
},
"end": {
"line": 14,
"column": 131
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 423,
"end": 480,
"loc": {
"start": {
"line": 14,
"column": 70
},
"end": {
"line": 14,
"column": 127
}
},
"attributes": [
{
"type": "JSXAttribute",
"start": 426,
"end": 460,
"loc": {
"start": {
"line": 14,
"column": 73
},
"end": {
"line": 14,
"column": 107
}
},
"name": {
"type": "JSXIdentifier",
"start": 426,
"end": 435,
"loc": {
"start": {
"line": 14,
"column": 73
},
"end": {
"line": 14,
"column": 82
}
},
"name": "className"
},
"value": {
"type": "Literal",
"start": 436,
"end": 460,
"loc": {
"start": {
"line": 14,
"column": 83
},
"end": {
"line": 14,
"column": 107
}
},
"value": "icon icon-chevron-left",
"rawValue": null,
"raw": "\"icon icon-chevron-left\""
}
},
{
"type": "JSXAttribute",
"start": 461,
"end": 479,
"loc": {
"start": {
"line": 14,
"column": 108
},
"end": {
"line": 14,
"column": 126
}
},
"name": {
"type": "JSXIdentifier",
"start": 461,
"end": 472,
"loc": {
"start": {
"line": 14,
"column": 108
},
"end": {
"line": 14,
"column": 119
}
},
"name": "aria-hidden"
},
"value": {
"type": "Literal",
"start": 473,
"end": 479,
"loc": {
"start": {
"line": 14,
"column": 120
},
"end": {
"line": 14,
"column": 126
}
},
"value": "true",
"rawValue": null,
"raw": "\"true\""
}
}
],
"name": {
"type": "JSXIdentifier",
"start": 424,
"end": 425,
"loc": {
"start": {
"line": 14,
"column": 71
},
"end": {
"line": 14,
"column": 72
}
},
"name": "i"
},
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start": 480,
"end": 484,
"loc": {
"start": {
"line": 14,
"column": 127
},
"end": {
"line": 14,
"column": 131
}
},
"name": {
"type": "JSXIdentifier",
"start": 482,
"end": 483,
"loc": {
"start": {
"line": 14,
"column": 129
},
"end": {
"line": 14,
"column": 130
}
},
"name": "i"
}
},
"children": []
},
{
"type": "JSXExpressionContainer",
"start": 484,
"end": 495,
"loc": {
"start": {
"line": 14,
"column": 131
},
"end": {
"line": 14,
"column": 142
}
},
"expression": {
"type": "Identifier",
"start": 485,
"end": 494,
"loc": {
"start": {
"line": 14,
"column": 132
},
"end": {
"line": 14,
"column": 141
}
},
"name": "crumbText"
}
}
]
},
"alternate": {
"type": "Literal",
"start": 504,
"end": 506,
"loc": {
"start": {
"line": 14,
"column": 151
},
"end": {
"line": 14,
"column": 153
}
},
"value": "",
"rawValue": "",
"raw": "\"\""
}
}
}
],
"kind": "let"
},
{
"type": "ReturnStatement",
"start": 513,
"end": 954,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 31,
"column": 6
}
},
"argument": {
"type": "JSXElement",
"start": 528,
"end": 947,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 30,
"column": 12
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 528,
"end": 562,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 40
}
},
"attributes": [
{