rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,524 lines (1,523 loc) • 216 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1576,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 66,
"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": 85,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 40
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 52,
"end": 67,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 22
}
},
"local": {
"type": "Identifier",
"start": 52,
"end": 67,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 22
}
},
"name": "SearchComponent"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 73,
"end": 84,
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 39
}
},
"value": "../search",
"rawValue": "../search",
"raw": "\"../search\""
}
},
{
"type": "ImportDeclaration",
"start": 86,
"end": 134,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 93,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 26
}
},
"local": {
"type": "Identifier",
"start": 93,
"end": 112,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 26
}
},
"name": "NavigationComponent"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 118,
"end": 133,
"loc": {
"start": {
"line": 3,
"column": 32
},
"end": {
"line": 3,
"column": 47
}
},
"value": "../navigation",
"rawValue": "../navigation",
"raw": "\"../navigation\""
}
},
{
"type": "ImportDeclaration",
"start": 135,
"end": 158,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 23
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 142,
"end": 143,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 8
}
},
"local": {
"type": "Identifier",
"start": 142,
"end": 143,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 8
}
},
"name": "$"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 149,
"end": 157,
"loc": {
"start": {
"line": 4,
"column": 14
},
"end": {
"line": 4,
"column": 22
}
},
"value": "jquery",
"rawValue": "jquery",
"raw": "\"jquery\""
}
},
{
"type": "ImportDeclaration",
"start": 160,
"end": 208,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 48
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 15
}
},
"name": "debounce"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 181,
"end": 207,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 47
}
},
"value": "lodash/function/debounce",
"rawValue": "lodash/function/debounce",
"raw": "\"lodash/function/debounce\""
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * The page header which contains both search and navigation.\n * Clicking on the search icons opens the search.\n * Will re-render when the browser changes sizes\n ",
"start": 210,
"end": 378,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
},
"range": [
210,
378
]
}
]
},
{
"type": "Identifier",
"start": 379,
"end": 1551,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 63,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 385,
"end": 391,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 12
}
},
"name": "Header",
"leadingComments": null
},
"superClass": {
"type": "Identifier",
"start": 400,
"end": 409,
"loc": {
"start": {
"line": 13,
"column": 21
},
"end": {
"line": 13,
"column": 30
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 410,
"end": 1551,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 63,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 415,
"end": 919,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 32,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 415,
"end": 425,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 425,
"end": 919,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 32,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 428,
"end": 919,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 32,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 434,
"end": 470,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 40
}
},
"expression": {
"type": "AssignmentExpression",
"start": 434,
"end": 469,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 39
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 434,
"end": 445,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 434,
"end": 438,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 439,
"end": 445,
"loc": {
"start": {
"line": 16,
"column": 9
},
"end": {
"line": 16,
"column": 15
}
},
"name": "search"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 448,
"end": 469,
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 16,
"column": 39
}
},
"callee": {
"type": "Identifier",
"start": 452,
"end": 467,
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 37
}
},
"name": "SearchComponent"
},
"arguments": []
}
}
},
{
"type": "ExpressionStatement",
"start": 475,
"end": 553,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 19,
"column": 7
}
},
"expression": {
"type": "AssignmentExpression",
"start": 475,
"end": 552,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 19,
"column": 6
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 475,
"end": 490,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 475,
"end": 479,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 480,
"end": 490,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 19
}
},
"name": "navigation"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 493,
"end": 552,
"loc": {
"start": {
"line": 17,
"column": 22
},
"end": {
"line": 19,
"column": 6
}
},
"callee": {
"type": "Identifier",
"start": 497,
"end": 516,
"loc": {
"start": {
"line": 17,
"column": 26
},
"end": {
"line": 17,
"column": 45
}
},
"name": "NavigationComponent"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 517,
"end": 551,
"loc": {
"start": {
"line": 17,
"column": 46
},
"end": {
"line": 19,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 525,
"end": 545,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 525,
"end": 527,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 8
}
},
"name": "el"
},
"value": {
"type": "CallExpression",
"start": 529,
"end": 545,
"loc": {
"start": {
"line": 18,
"column": 10
},
"end": {
"line": 18,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 529,
"end": 530,
"loc": {
"start": {
"line": 18,
"column": 10
},
"end": {
"line": 18,
"column": 11
}
},
"name": "$"
},
"arguments": [
{
"type": "Literal",
"start": 531,
"end": 544,
"loc": {
"start": {
"line": 18,
"column": 12
},
"end": {
"line": 18,
"column": 25
}
},
"value": ".navigation",
"rawValue": ".navigation",
"raw": "\".navigation\""
}
]
},
"kind": "init"
}
]
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 559,
"end": 729,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"expression": {
"type": "AssignmentExpression",
"start": 559,
"end": 728,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 25,
"column": 5
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 559,
"end": 570,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 559,
"end": 563,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 564,
"end": 570,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 15
}
},
"name": "events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 573,
"end": 728,
"loc": {
"start": {
"line": 21,
"column": 18
},
"end": {
"line": 25,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 581,
"end": 616,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 41
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 581,
"end": 599,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 24
}
},
"value": "click .js-search",
"rawValue": "click .js-search",
"raw": "\"click .js-search\""
},
"value": {
"type": "Literal",
"start": 601,
"end": 616,
"loc": {
"start": {
"line": 22,
"column": 26
},
"end": {
"line": 22,
"column": 41
}
},
"value": "onSearchClick",
"rawValue": "onSearchClick",
"raw": "\"onSearchClick\""
},
"kind": "init"
},
{
"type": "Property",
"start": 624,
"end": 677,
"loc": {
"start": {
"line": 23,
"column": 6
},
"end": {
"line": 23,
"column": 59
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 624,
"end": 660,
"loc": {
"start": {
"line": 23,
"column": 6
},
"end": {
"line": 23,
"column": 42
}
},
"value": "click .js-search .navigation__link",
"rawValue": "click .js-search .navigation__link",
"raw": "\"click .js-search .navigation__link\""
},
"value": {
"type": "Literal",
"start": 662,
"end": 677,
"loc": {
"start": {
"line": 23,
"column": 44
},
"end": {
"line": 23,
"column": 59
}
},
"value": "onSearchClick",
"rawValue": "onSearchClick",
"raw": "\"onSearchClick\""
},
"kind": "init"
},
{
"type": "Property",
"start": 685,
"end": 722,
"loc": {
"start": {
"line": 24,
"column": 6
},
"end": {
"line": 24,
"column": 43
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 685,
"end": 701,
"loc": {
"start": {
"line": 24,
"column": 6
},
"end": {
"line": 24,
"column": 22
}
},
"value": "click .js-menu",
"rawValue": "click .js-menu",
"raw": "\"click .js-menu\""
},
"value": {
"type": "Literal",
"start": 703,
"end": 722,
"loc": {
"start": {
"line": 24,
"column": 24
},
"end": {
"line": 24,
"column": 43
}
},
"value": "onMobileMenuClick",
"rawValue": "onMobileMenuClick",
"raw": "\"onMobileMenuClick\""
},
"kind": "init"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 735,
"end": 783,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 52
}
},
"expression": {
"type": "AssignmentExpression",
"start": 735,
"end": 782,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 51
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 735,
"end": 747,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 735,
"end": 739,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 740,
"end": 747,
"loc": {
"start": {
"line": 27,
"column": 9
},
"end": {
"line": 27,
"column": 16
}
},
"name": "$search"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 750,
"end": 782,
"loc": {
"start": {
"line": 27,
"column": 19
},
"end": {
"line": 27,
"column": 51
}
},
"callee": {
"type": "MemberExpression",
"start": 750,
"end": 763,
"loc": {
"start": {
"line": 27,
"column": 19
},
"end": {
"line": 27,
"column": 32
}
},
"object": {
"type": "MemberExpression",
"start": 750,
"end": 758,
"loc": {
"start": {
"line": 27,
"column": 19
},
"end": {
"line": 27,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 750,
"end": 754,
"loc": {
"start": {
"line": 27,
"column": 19
},
"end": {
"line": 27,
"column": 23
}
}
},
"property": {
"type": "Identifier",
"start": 755,
"end": 758,
"loc": {
"start": {
"line": 27,
"column": 24
},
"end": {
"line": 27,
"column": 27
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 759,
"end": 763,
"loc": {
"start": {
"line": 27,
"column": 28
},
"end": {
"line": 27,
"column": 32
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 764,
"end": 781,
"loc": {
"start": {
"line": 27,
"column": 33
},
"end": {
"line": 27,
"column": 50
}
},
"value": ".header__search",
"rawValue": ".header__search",
"raw": "\".header__search\""
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 788,
"end": 834,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 50
}
},
"expression": {
"type": "AssignmentExpression",
"start": 788,
"end": 833,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 49
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 788,
"end": 799,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 788,
"end": 792,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 793,
"end": 799,
"loc": {
"start": {
"line": 28,
"column": 9
},
"end": {
"line": 28,
"column": 15
}
},
"name": "$inner"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 802,
"end": 833,
"loc": {
"start": {
"line": 28,
"column": 18
},
"end": {
"line": 28,
"column": 49
}
},
"callee": {
"type": "MemberExpression",
"start": 802,
"end": 815,
"loc": {
"start": {
"line": 28,
"column": 18
},
"end": {
"line": 28,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 802,
"end": 810,
"loc": {
"start": {
"line": 28,
"column": 18
},
"end": {
"line": 28,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 802,
"end": 806,
"loc": {
"start": {
"line": 28,
"column": 18
},
"end": {
"line": 28,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"start": 807,
"end": 810,
"loc": {
"start": {
"line": 28,
"column": 23
},
"end": {
"line": 28,
"column": 26
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 811,
"end": 815,
"loc": {
"start": {
"line": 28,
"column": 27
},
"end": {
"line": 28,
"column": 31
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 816,
"end": 832,
"loc": {
"start": {
"line": 28,
"column": 32
},
"end": {
"line": 28,
"column": 48
}
},
"value": ".header__inner",
"rawValue": ".header__inner",
"raw": "\".header__inner\""
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 840,
"end": 896,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 60
}
},
"expression": {
"type": "CallExpression",
"start": 840,
"end": 895,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 59
}
},
"callee": {
"type": "MemberExpression",
"start": 840,
"end": 856,
"loc": {
"start": {
"line": 30,
"column": 4
},