rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,468 lines (1,467 loc) • 185 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1632,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 65,
"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": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 44,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 17
}
},
"name": "MapActions"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 50,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 35
}
},
"value": "../actions",
"rawValue": "../actions",
"raw": "\"../actions\""
}
},
{
"type": "ImportDeclaration",
"start": 64,
"end": 117,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 53
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 71,
"end": 86,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 22
}
},
"local": {
"type": "Identifier",
"start": 71,
"end": 86,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 22
}
},
"name": "SidebarDropdown"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 92,
"end": 116,
"loc": {
"start": {
"line": 3,
"column": 28
},
"end": {
"line": 3,
"column": 52
}
},
"value": "./sidebar-dropdown.jsx",
"rawValue": "./sidebar-dropdown.jsx",
"raw": "\"./sidebar-dropdown.jsx\""
}
},
{
"type": "ImportDeclaration",
"start": 118,
"end": 153,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 35
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 125,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 125,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 13
}
},
"name": "titles"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 137,
"end": 152,
"loc": {
"start": {
"line": 4,
"column": 19
},
"end": {
"line": 4,
"column": 34
}
},
"value": "../tab_titles",
"rawValue": "../tab_titles",
"raw": "\"../tab_titles\""
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Tabs for the sidebar view\n ",
"start": 155,
"end": 191,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
},
"range": [
155,
191
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 192,
"end": 1604,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 62,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 207,
"end": 1604,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 62,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 213,
"end": 220,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 28
}
},
"name": "TabView",
"leadingComments": null
},
"superClass": {
"type": "MemberExpression",
"start": 229,
"end": 244,
"loc": {
"start": {
"line": 9,
"column": 37
},
"end": {
"line": 9,
"column": 52
}
},
"object": {
"type": "Identifier",
"start": 229,
"end": 234,
"loc": {
"start": {
"line": 9,
"column": 37
},
"end": {
"line": 9,
"column": 42
}
},
"name": "React"
},
"property": {
"type": "Identifier",
"start": 235,
"end": 244,
"loc": {
"start": {
"line": 9,
"column": 43
},
"end": {
"line": 9,
"column": 52
}
},
"name": "Component"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 245,
"end": 1604,
"loc": {
"start": {
"line": 9,
"column": 53
},
"end": {
"line": 62,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 250,
"end": 313,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 14,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 250,
"end": 261,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 13
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 261,
"end": 313,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 14,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 262,
"end": 267,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 19
}
},
"name": "props"
}
],
"body": {
"type": "BlockStatement",
"start": 269,
"end": 313,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 14,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 275,
"end": 288,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 17
}
},
"expression": {
"type": "CallExpression",
"start": 275,
"end": 287,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 16
}
},
"callee": {
"type": "Super",
"start": 275,
"end": 280,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 9
}
}
},
"arguments": [
{
"type": "Identifier",
"start": 281,
"end": 286,
"loc": {
"start": {
"line": 12,
"column": 10
},
"end": {
"line": 12,
"column": 15
}
},
"name": "props"
}
]
}
},
{
"type": "ExpressionStatement",
"start": 293,
"end": 309,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 20
}
},
"expression": {
"type": "AssignmentExpression",
"start": 293,
"end": 308,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 19
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 293,
"end": 303,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 293,
"end": 297,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 298,
"end": 303,
"loc": {
"start": {
"line": 13,
"column": 9
},
"end": {
"line": 13,
"column": 14
}
},
"name": "state"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 306,
"end": 308,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 19
}
},
"properties": []
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 317,
"end": 1072,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 36,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 317,
"end": 323,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 8
}
},
"name": "render"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 323,
"end": 1072,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 36,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 326,
"end": 1072,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 36,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 332,
"end": 553,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 21,
"column": 23
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 336,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 72
}
},
"id": {
"type": "Identifier",
"start": 336,
"end": 341,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 13
}
},
"name": "title"
},
"init": {
"type": "LogicalExpression",
"start": 344,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 72
}
},
"left": {
"type": "MemberExpression",
"start": 344,
"end": 381,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 53
}
},
"object": {
"type": "Identifier",
"start": 344,
"end": 350,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 22
}
},
"name": "titles"
},
"property": {
"type": "CallExpression",
"start": 351,
"end": 380,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 52
}
},
"callee": {
"type": "MemberExpression",
"start": 351,
"end": 378,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 50
}
},
"object": {
"type": "MemberExpression",
"start": 351,
"end": 366,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 351,
"end": 361,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 33
}
},
"object": {
"type": "ThisExpression",
"start": 351,
"end": 355,
"loc": {
"start": {
"line": 17,
"column": 23
},
"end": {
"line": 17,
"column": 27
}
}
},
"property": {
"type": "Identifier",
"start": 356,
"end": 361,
"loc": {
"start": {
"line": 17,
"column": 28
},
"end": {
"line": 17,
"column": 33
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 362,
"end": 366,
"loc": {
"start": {
"line": 17,
"column": 34
},
"end": {
"line": 17,
"column": 38
}
},
"name": "name"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 367,
"end": 378,
"loc": {
"start": {
"line": 17,
"column": 39
},
"end": {
"line": 17,
"column": 50
}
},
"name": "toLowerCase"
},
"computed": false
},
"arguments": []
},
"computed": true
},
"operator": "||",
"right": {
"type": "MemberExpression",
"start": 385,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 57
},
"end": {
"line": 17,
"column": 72
}
},
"object": {
"type": "MemberExpression",
"start": 385,
"end": 395,
"loc": {
"start": {
"line": 17,
"column": 57
},
"end": {
"line": 17,
"column": 67
}
},
"object": {
"type": "ThisExpression",
"start": 385,
"end": 389,
"loc": {
"start": {
"line": 17,
"column": 57
},
"end": {
"line": 17,
"column": 61
}
}
},
"property": {
"type": "Identifier",
"start": 390,
"end": 395,
"loc": {
"start": {
"line": 17,
"column": 62
},
"end": {
"line": 17,
"column": 67
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 396,
"end": 400,
"loc": {
"start": {
"line": 17,
"column": 68
},
"end": {
"line": 17,
"column": 72
}
},
"name": "name"
},
"computed": false
}
}
},
{
"type": "VariableDeclarator",
"start": 410,
"end": 430,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 28
}
},
"id": {
"type": "Identifier",
"start": 410,
"end": 425,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 23
}
},
"name": "sidebarDropdown"
},
"init": {
"type": "Literal",
"start": 428,
"end": 430,
"loc": {
"start": {
"line": 18,
"column": 26
},
"end": {
"line": 18,
"column": 28
}
},
"value": "",
"rawValue": "",
"raw": "\"\""
}
},
{
"type": "VariableDeclarator",
"start": 440,
"end": 491,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 59
}
},
"id": {
"type": "Identifier",
"start": 440,
"end": 448,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 16
}
},
"name": "isActive"
},
"init": {
"type": "ConditionalExpression",
"start": 451,
"end": 491,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 59
}
},
"test": {
"type": "MemberExpression",
"start": 451,
"end": 468,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 36
}
},
"object": {
"type": "MemberExpression",
"start": 451,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 29
}
},
"object": {
"type": "ThisExpression",
"start": 451,
"end": 455,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"start": 456,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 29
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 462,
"end": 468,
"loc": {
"start": {
"line": 19,
"column": 30
},
"end": {
"line": 19,
"column": 36
}
},
"name": "active"
},
"computed": false
},
"consequent": {
"type": "Literal",
"start": 471,
"end": 483,
"loc": {
"start": {
"line": 19,
"column": 39
},
"end": {
"line": 19,
"column": 51
}
},
"value": "tab active",
"rawValue": "tab active",
"raw": "\"tab active\""
},
"alternate": {
"type": "Literal",
"start": 486,
"end": 491,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 59
}
},
"value": "tab",
"rawValue": "tab",
"raw": "\"tab\""
}
}
},
{
"type": "VariableDeclarator",
"start": 501,
"end": 528,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 35
}
},
"id": {
"type": "Identifier",
"start": 501,
"end": 512,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 19
}
},
"name": "classString"
},
"init": {
"type": "TemplateLiteral",
"start": 515,
"end": 528,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 35
}
},
"expressions": [
{
"type": "Identifier",
"start": 518,
"end": 526,
"loc": {
"start": {
"line": 20,
"column": 25
},
"end": {
"line": 20,
"column": 33
}
},
"name": "isActive"
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 516,
"end": 516,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 23
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": false
},
{
"type": "TemplateElement",
"start": 527,
"end": 527,
"loc": {
"start": {
"line": 20,
"column": 34
},
"end": {
"line": 20,
"column": 34
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
}
},
{
"type": "VariableDeclarator",
"start": 538,
"end": 552,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 22
}
},
"id": {
"type": "Identifier",
"start": 538,
"end": 547,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 17
}
},
"name": "iconAfter"
},
"init": {
"type": "Literal",
"start": 550,
"end": 552,
"loc": {
"start": {
"line": 21,
"column": 20
},
"end": {
"line": 21,
"column": 22
}
},
"value": "",
"rawValue": "",
"raw": "\"\""
}
}
],
"kind": "let"
},
{
"type": "IfStatement",
"start": 559,
"end": 780,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 27,
"column": 5
}
},
"test": {
"type": "MemberExpression",
"start": 563,
"end": 586,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 563,
"end": 573,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 563,
"end": 567,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 568,
"end": 573,
"loc": {
"start": {
"line": 23,
"column": 13
},
"end": {
"line": 23,
"column": 18
}
},
"name": "props"
},