rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,517 lines (1,516 loc) • 346 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1716,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 86,
"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": 84,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "Arkham"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 64,
"end": 83,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 38
}
},
"value": "../../core/arkham",
"rawValue": "../../core/arkham",
"raw": "\"../../core/arkham\""
}
},
{
"type": "ImportDeclaration",
"start": 85,
"end": 152,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 67
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 92,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 92,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 24
}
},
"name": "waitForTransition"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 115,
"end": 151,
"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": 153,
"end": 220,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 67
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 160,
"end": 177,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 160,
"end": 177,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 24
}
},
"name": "getScrollbarWidth"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 183,
"end": 219,
"loc": {
"start": {
"line": 4,
"column": 30
},
"end": {
"line": 4,
"column": 66
}
},
"value": "../../core/utils/getScrollbarWidth",
"rawValue": "../../core/utils/getScrollbarWidth",
"raw": "\"../../core/utils/getScrollbarWidth\""
}
},
{
"type": "ImportDeclaration",
"start": 221,
"end": 243,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 22
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 228,
"end": 242,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 21
}
},
"value": "./index.scss",
"rawValue": "./index.scss",
"raw": "\"./index.scss\""
}
},
{
"type": "Identifier",
"start": 245,
"end": 1690,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 83,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 251,
"end": 258,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 13
}
},
"name": "Overlay"
},
"superClass": {
"type": "Identifier",
"start": 267,
"end": 276,
"loc": {
"start": {
"line": 7,
"column": 22
},
"end": {
"line": 7,
"column": 31
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 277,
"end": 1690,
"loc": {
"start": {
"line": 7,
"column": 32
},
"end": {
"line": 83,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 282,
"end": 479,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 19,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 282,
"end": 292,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 292,
"end": 479,
"loc": {
"start": {
"line": 9,
"column": 12
},
"end": {
"line": 19,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 294,
"end": 479,
"loc": {
"start": {
"line": 9,
"column": 14
},
"end": {
"line": 19,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 300,
"end": 323,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 300,
"end": 322,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 300,
"end": 310,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 300,
"end": 304,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 305,
"end": 310,
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 14
}
},
"name": "$html"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 313,
"end": 322,
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 313,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 17
},
"end": {
"line": 10,
"column": 18
}
},
"name": "$"
},
"arguments": [
{
"type": "Literal",
"start": 315,
"end": 321,
"loc": {
"start": {
"line": 10,
"column": 19
},
"end": {
"line": 10,
"column": 25
}
},
"value": "html",
"rawValue": "html",
"raw": "\"html\""
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 328,
"end": 357,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 33
}
},
"expression": {
"type": "CallExpression",
"start": 328,
"end": 356,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 32
}
},
"callee": {
"type": "MemberExpression",
"start": 328,
"end": 345,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 328,
"end": 336,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 328,
"end": 332,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 333,
"end": 336,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 337,
"end": 345,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 21
}
},
"name": "addClass"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 346,
"end": 355,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 31
}
},
"value": "overlay",
"rawValue": "overlay",
"raw": "\"overlay\""
}
]
}
},
{
"type": "ExpressionStatement",
"start": 363,
"end": 475,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 18,
"column": 6
}
},
"expression": {
"type": "AssignmentExpression",
"start": 363,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 18,
"column": 5
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 363,
"end": 374,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 363,
"end": 367,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 368,
"end": 374,
"loc": {
"start": {
"line": 13,
"column": 9
},
"end": {
"line": 13,
"column": 15
}
},
"name": "events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 377,
"end": 474,
"loc": {
"start": {
"line": 13,
"column": 18
},
"end": {
"line": 18,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 385,
"end": 403,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 14,
"column": 24
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 385,
"end": 392,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 14,
"column": 13
}
},
"value": "click",
"rawValue": "click",
"raw": "\"click\""
},
"value": {
"type": "Literal",
"start": 394,
"end": 403,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 24
}
},
"value": "onClick",
"rawValue": "onClick",
"raw": "\"onClick\""
},
"kind": "init"
},
{
"type": "Property",
"start": 411,
"end": 468,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 17,
"column": 7
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 411,
"end": 422,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 17
}
},
"value": "touchmove",
"rawValue": "touchmove",
"raw": "\"touchmove\""
},
"value": {
"type": "ArrowFunctionExpression",
"start": 424,
"end": 468,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 17,
"column": 7
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 425,
"end": 426,
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 21
}
},
"name": "e"
}
],
"body": {
"type": "BlockStatement",
"start": 431,
"end": 468,
"loc": {
"start": {
"line": 15,
"column": 26
},
"end": {
"line": 17,
"column": 7
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 441,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 27
}
},
"expression": {
"type": "CallExpression",
"start": 441,
"end": 459,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 26
}
},
"callee": {
"type": "MemberExpression",
"start": 441,
"end": 457,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 441,
"end": 442,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 9
}
},
"name": "e"
},
"property": {
"type": "Identifier",
"start": 443,
"end": 457,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 16,
"column": 24
}
},
"name": "preventDefault"
},
"computed": false
},
"arguments": []
}
}
]
}
},
"kind": "init"
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 483,
"end": 675,
"loc": {
"start": {
"line": 21,
"column": 2
},
"end": {
"line": 29,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 483,
"end": 489,
"loc": {
"start": {
"line": 21,
"column": 2
},
"end": {
"line": 21,
"column": 8
}
},
"name": "toggle"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 489,
"end": 675,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 29,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 490,
"end": 516,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 35
}
},
"left": {
"type": "Identifier",
"start": 490,
"end": 504,
"loc": {
"start": {
"line": 21,
"column": 9
},
"end": {
"line": 21,
"column": 23
}
},
"name": "stateOverwrite"
},
"right": {
"type": "Identifier",
"start": 507,
"end": 516,
"loc": {
"start": {
"line": 21,
"column": 26
},
"end": {
"line": 21,
"column": 35
}
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 517,
"end": 675,
"loc": {
"start": {
"line": 21,
"column": 36
},
"end": {
"line": 29,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 523,
"end": 598,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 22,
"column": 79
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 527,
"end": 597,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 78
}
},
"id": {
"type": "Identifier",
"start": 527,
"end": 532,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 13
}
},
"name": "state"
},
"init": {
"type": "ConditionalExpression",
"start": 535,
"end": 597,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 78
}
},
"test": {
"type": "BinaryExpression",
"start": 535,
"end": 563,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 44
}
},
"left": {
"type": "Identifier",
"start": 535,
"end": 549,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 22,
"column": 30
}
},
"name": "stateOverwrite"
},
"operator": "!==",
"right": {
"type": "Identifier",
"start": 554,
"end": 563,
"loc": {
"start": {
"line": 22,
"column": 35
},
"end": {
"line": 22,
"column": 44
}
},
"name": "undefined"
}
},
"consequent": {
"type": "Identifier",
"start": 566,
"end": 580,
"loc": {
"start": {
"line": 22,
"column": 47
},
"end": {
"line": 22,
"column": 61
}
},
"name": "stateOverwrite"
},
"alternate": {
"type": "MemberExpression",
"start": 583,
"end": 597,
"loc": {
"start": {
"line": 22,
"column": 64
},
"end": {
"line": 22,
"column": 78
}
},
"object": {
"type": "ThisExpression",
"start": 583,
"end": 587,
"loc": {
"start": {
"line": 22,
"column": 64
},
"end": {
"line": 22,
"column": 68
}
}
},
"property": {
"type": "Identifier",
"start": 588,
"end": 597,
"loc": {
"start": {
"line": 22,
"column": 69
},
"end": {
"line": 22,
"column": 78
}
},
"name": "isVisible"
},
"computed": false
}
}
}
],
"kind": "let"
},
{
"type": "IfStatement",
"start": 604,
"end": 671,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 28,
"column": 5
}
},
"test": {
"type": "Identifier",
"start": 607,
"end": 612,
"loc": {
"start": {
"line": 24,
"column": 7
},
"end": {
"line": 24,
"column": 12
}
},
"name": "state"
},
"consequent": {
"type": "BlockStatement",
"start": 613,
"end": 639,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 26,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 621,
"end": 633,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 18
}
},
"expression": {
"type": "CallExpression",
"start": 621,
"end": 632,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 17
}
},
"callee": {
"type": "MemberExpression",
"start": 621,
"end": 630,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 621,
"end": 625,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 10
}
}
},
"property": {
"type": "Identifier",
"start": 626,
"end": 630,
"loc": {
"start": {
"line": 25,
"column": 11
},
"end": {
"line": 25,
"column": 15
}
},
"name": "show"
},
"computed": false
},
"arguments": []
}
}
]
},
"alternate": {
"type": "BlockStatement",
"start": 645,
"end": 671,
"loc": {
"start": {
"line": 26,
"column": 11
},
"end": {
"line": 28,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 653,
"end": 665,
"loc": {
"start": {
"line": 27,
"column": 6
},
"end": {
"line": 27,
"column": 18
}
},
"expression": {
"type": "CallExpression",
"start": 653,
"end": 664,
"loc": {
"start": {
"line": 27,
"column": 6
},
"end": {
"line": 27,
"column": 17
}
},
"callee": {
"type": "MemberExpression",
"start": 653,
"end": 662,
"loc": {
"start": {
"line": 27,
"column": 6
},
"end": {
"line": 27,
"column": 15
}
},