UNPKG

rizzo-next

Version:

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

1,464 lines (1,463 loc) 116 kB
{ "type": "Program", "start": 0, "end": 928, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 48, "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": 68, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 53, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } }, "local": { "type": "Identifier", "start": 52, "end": 53, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 59, "end": 67, "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" } }, { "type": "ExpressionStatement", "start": 70, "end": 93, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 23 } }, "expression": { "type": "CallExpression", "start": 70, "end": 92, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 22 } }, "callee": { "type": "Identifier", "start": 70, "end": 77, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 7 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 78, "end": 91, "loc": { "start": { "line": 4, "column": 8 }, "end": { "line": 4, "column": 21 } }, "value": "./tabs.scss", "rawValue": "./tabs.scss", "raw": "\"./tabs.scss\"" } ] } }, { "type": "ExportDefaultDeclaration", "start": 95, "end": 927, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 47, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 110, "end": 927, "loc": { "start": { "line": 6, "column": 15 }, "end": { "line": 47, "column": 1 } }, "id": { "type": "Identifier", "start": 116, "end": 120, "loc": { "start": { "line": 6, "column": 21 }, "end": { "line": 6, "column": 25 } }, "name": "Tabs" }, "superClass": { "type": "Identifier", "start": 129, "end": 138, "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 6, "column": 43 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 139, "end": 927, "loc": { "start": { "line": 6, "column": 44 }, "end": { "line": 47, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 143, "end": 186, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 9, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 147, "end": 153, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 12 } }, "name": "active" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 153, "end": 186, "loc": { "start": { "line": 7, "column": 12 }, "end": { "line": 9, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 156, "end": 186, "loc": { "start": { "line": 7, "column": 15 }, "end": { "line": 9, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 162, "end": 182, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 24 } }, "argument": { "type": "MemberExpression", "start": 169, "end": 181, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 23 } }, "object": { "type": "ThisExpression", "start": 169, "end": 173, "loc": { "start": { "line": 8, "column": 11 }, "end": { "line": 8, "column": 15 } } }, "property": { "type": "Identifier", "start": 174, "end": 181, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 23 } }, "name": "_active" }, "computed": false } } ] } } }, { "type": "MethodDefinition", "start": 189, "end": 423, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 22, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 193, "end": 199, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 12 } }, "name": "active" }, "static": false, "kind": "set", "value": { "type": "FunctionExpression", "start": 199, "end": 423, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 22, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 200, "end": 203, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 16 } }, "name": "$el" } ], "body": { "type": "BlockStatement", "start": 205, "end": 423, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 22, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 211, "end": 224, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 17 } }, "expression": { "type": "AssignmentExpression", "start": 211, "end": 223, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 16 } }, "operator": "=", "left": { "type": "Identifier", "start": 211, "end": 214, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 7 } }, "name": "$el" }, "right": { "type": "CallExpression", "start": 217, "end": 223, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 16 } }, "callee": { "type": "Identifier", "start": 217, "end": 218, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 11 } }, "name": "$" }, "arguments": [ { "type": "Identifier", "start": 219, "end": 222, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 15 } }, "name": "$el" } ] } } }, { "type": "VariableDeclaration", "start": 230, "end": 273, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 47 } }, "declarations": [ { "type": "VariableDeclarator", "start": 234, "end": 272, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 46 } }, "id": { "type": "Identifier", "start": 234, "end": 238, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } }, "name": "$tab" }, "init": { "type": "CallExpression", "start": 241, "end": 272, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 241, "end": 254, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 28 } }, "object": { "type": "MemberExpression", "start": 241, "end": 249, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 23 } }, "object": { "type": "ThisExpression", "start": 241, "end": 245, "loc": { "start": { "line": 13, "column": 15 }, "end": { "line": 13, "column": 19 } } }, "property": { "type": "Identifier", "start": 246, "end": 249, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 23 } }, "name": "$el" }, "computed": false }, "property": { "type": "Identifier", "start": 250, "end": 254, "loc": { "start": { "line": 13, "column": 24 }, "end": { "line": 13, "column": 28 } }, "name": "find" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 255, "end": 271, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 255, "end": 263, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 37 } }, "object": { "type": "Identifier", "start": 255, "end": 258, "loc": { "start": { "line": 13, "column": 29 }, "end": { "line": 13, "column": 32 } }, "name": "$el" }, "property": { "type": "Identifier", "start": 259, "end": 263, "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 13, "column": 37 } }, "name": "attr" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 264, "end": 270, "loc": { "start": { "line": 13, "column": 38 }, "end": { "line": 13, "column": 44 } }, "value": "href", "rawValue": "href", "raw": "\"href\"" } ] } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 279, "end": 296, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 21 } }, "expression": { "type": "CallExpression", "start": 279, "end": 295, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 20 } }, "callee": { "type": "MemberExpression", "start": 279, "end": 293, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 18 } }, "object": { "type": "ThisExpression", "start": 279, "end": 283, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 8 } } }, "property": { "type": "Identifier", "start": 284, "end": 293, "loc": { "start": { "line": 15, "column": 9 }, "end": { "line": 15, "column": 18 } }, "name": "resetTabs" }, "computed": false }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 301, "end": 355, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 58 } }, "expression": { "type": "CallExpression", "start": 301, "end": 354, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 57 } }, "callee": { "type": "MemberExpression", "start": 301, "end": 320, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 23 } }, "object": { "type": "ArrayExpression", "start": 301, "end": 312, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 15 } }, "elements": [ { "type": "Identifier", "start": 302, "end": 306, "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 9 } }, "name": "$tab" }, { "type": "Identifier", "start": 308, "end": 311, "loc": { "start": { "line": 16, "column": 11 }, "end": { "line": 16, "column": 14 } }, "name": "$el" } ] }, "property": { "type": "Identifier", "start": 313, "end": 320, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 16, "column": 23 } }, "name": "forEach" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 321, "end": 353, "loc": { "start": { "line": 16, "column": 24 }, "end": { "line": 16, "column": 56 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 322, "end": 324, "loc": { "start": { "line": 16, "column": 25 }, "end": { "line": 16, "column": 27 } }, "name": "el" } ], "body": { "type": "CallExpression", "start": 329, "end": 353, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 329, "end": 340, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 43 } }, "object": { "type": "Identifier", "start": 329, "end": 331, "loc": { "start": { "line": 16, "column": 32 }, "end": { "line": 16, "column": 34 } }, "name": "el" }, "property": { "type": "Identifier", "start": 332, "end": 340, "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 16, "column": 43 } }, "name": "addClass" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 341, "end": 352, "loc": { "start": { "line": 16, "column": 44 }, "end": { "line": 16, "column": 55 } }, "value": "is-active", "rawValue": "is-active", "raw": "\"is-active\"" } ] } } ] } }, { "type": "ExpressionStatement", "start": 361, "end": 419, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 21, "column": 6 } }, "expression": { "type": "AssignmentExpression", "start": 361, "end": 418, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 21, "column": 5 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 361, "end": 373, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 16 } }, "object": { "type": "ThisExpression", "start": 361, "end": 365, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 366, "end": 373, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 16 } }, "name": "_active" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 376, "end": 418, "loc": { "start": { "line": 18, "column": 19 }, "end": { "line": 21, "column": 5 } }, "properties": [ { "type": "Property", "start": 384, "end": 394, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 16 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 384, "end": 389, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 11 } }, "name": "$link" }, "value": { "type": "Identifier", "start": 391, "end": 394, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 16 } }, "name": "$el" }, "kind": "init" }, { "type": "Property", "start": 402, "end": 412, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 16 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 402, "end": 406, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 10 } }, "name": "$tab" }, "value": { "type": "Identifier", "start": 408, "end": 412, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 16 } }, "name": "$tab" }, "kind": "init" } ] } } } ] } } }, { "type": "MethodDefinition", "start": 427, "end": 658, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 33, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 427, "end": 437, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 24, "column": 12 } }, "name": "initialize" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 437, "end": 658, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 33, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 440, "end": 658, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 33, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 446, "end": 512, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 27, "column": 6 } }, "expression": { "type": "AssignmentExpression", "start": 446, "end": 511, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 27, "column": 5 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 446, "end": 457, "loc": { "start": { "line": 25,