lookbook 0.3.0.beta.1 → 0.3.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b0d42f049a62be24079955f108c14f4b7b73b8b0f0a677639cce865e2260006
4
- data.tar.gz: db6d156648495478cdcd55101065cb3875cfbdfb2b9bce3f924e37a11b2b789b
3
+ metadata.gz: 61d3cbcc3579d9a79aaa03fb87bda891923c10aed37eb78f11ef948b09b99ed9
4
+ data.tar.gz: 9ac3803965a4d9fc17eed96bb8a2e2a0821c78019e061032fa5f22276edbe321
5
5
  SHA512:
6
- metadata.gz: 15a7f9761f859bfdc9965801aba418e30fc95520635fc1a03dd9ff63af5e73e98563bc8d16420ae705824f18dffcdc9f834b57547815c4ab5cf899aba831e2e3
7
- data.tar.gz: 889cea13089b40fa493c7ca39e6ff871f9db6432b9fffa1b57ab1a3a686b6e04ee2d0e3859093abcea386ccd67e2d7fe3aeaf2acf239632c535332d2a35e2ae3
6
+ metadata.gz: 4d902210204c1f779a535dcf6aec261b827ff92cef73ce384f2d791ccc0fb85ff0f5de0d56f2cf19aeff67f5190a1ea753b1f6d2016108bc7fe3be55b8b0930e
7
+ data.tar.gz: 3d52cc3c23b60d1cc8fdef2f753ff7e80ad858e0f2eec598212307cfa0338b69b87071fd3fa45a3848f303533f033b1c55dc0995ba15364c9f831daa2c893338
@@ -21,8 +21,11 @@ export default function () {
21
21
  this.$dispatch("nav:updated");
22
22
  });
23
23
  },
24
- navigate($event) {
25
- history.pushState({}, null, $event.currentTarget.href);
24
+ navigate(path) {
25
+ if (path instanceof Event) {
26
+ path = path.currentTarget.href;
27
+ }
28
+ history.pushState({}, null, path);
26
29
  this.$dispatch("popstate");
27
30
  },
28
31
  focusFilter() {
@@ -89,13 +89,13 @@ module Lookbook
89
89
 
90
90
  def rendered_example
91
91
  if @example.type == :group
92
- rendered = @example.examples.map do |example|
92
+ examples = @example.examples.map do |example|
93
93
  {
94
94
  label: example.label,
95
- content: preview_controller.render_example_to_string(@preview, example.name)
95
+ html: preview_controller.render_example_to_string(@preview, example.name)
96
96
  }
97
97
  end
98
- joined = render_to_string "layouts/group", locals: {items: rendered}, layout: nil
98
+ joined = render_to_string "./preview_group", locals: {examples: examples}, layout: nil
99
99
  preview_controller.render_in_layout_to_string(joined, @preview.lookbook_layout)
100
100
  else
101
101
  preview_controller.request.params[:path] = "#{@preview.preview_name}/#{@example.name}".chomp("/")
@@ -0,0 +1,21 @@
1
+ <%
2
+ path = show_path leaf.path
3
+ display ||= :leaf
4
+ %>
5
+ <li x-data="navLeaf" :class="{hidden}" x-init="matchers = <%= leaf.matchers.to_json %>; path = '<%= path %>'; setActive()" @popstate.window="setActive">
6
+ <a href="<%= path %>"
7
+ class="pr-3 py-[5px] flex items-center w-full group transition hover:bg-gray-200 hover:bg-opacity-50"
8
+ style="<%= nav_padding_style(depth) %>"
9
+ :class="{'!bg-indigo-100':active}"
10
+ @click.stop.prevent="navigate"
11
+ >
12
+ <div class="relative w-3.5 h-3.5 mr-1.5 <%= "ml-[3px]" if display == :node %> " :class="active ? 'text-gray-900' : 'text-indigo-500'">
13
+ <svg class="feather flex-none group-hover:text-indigo-800 transition w-3.5 h-3.5">
14
+ <use xlink:href="/lookbook-assets/feather-sprite.svg#<%= display == :node ? "layers" : "eye" %>" />
15
+ </svg>
16
+ </div>
17
+ <div class="truncate whitespace-nowrap <%= "font-bold" if display == :node %>">
18
+ <%= leaf.label %>
19
+ </div>
20
+ </a>
21
+ </li>
@@ -1,5 +1,5 @@
1
1
  <li id="<%= node.id %>" x-data="navNode" <% if node.hierarchy_depth == 1 %> class="py-1 border-b border-gray-300 cursor-pointer"<% end %> :class="{hidden}" x-cloak>
2
- <div @click="toggle" style="<%= nav_padding_style(node.hierarchy_depth) %>">
2
+ <div @click="toggle(); if (open()) { <%= "navigate('#{path}')" if defined?(path) %>}" style="<%= nav_padding_style(node.hierarchy_depth) %>" class="hover:bg-gray-200 hover:bg-opacity-50">
3
3
  <div class="flex items-center cursor-pointer pr-3 py-[5px]">
4
4
  <svg class="feather w-3 h-3 mr-1 text-gray-500 flex-none">
5
5
  <use xlink:href="/lookbook-assets/feather-sprite.svg#chevron-down" x-show="open" x-cloak />
@@ -1,29 +1,11 @@
1
- <%= render "./nav/node", node: node do %>
2
- <% node.get_examples.each do |example| %>
3
- <% path = show_path example.path %>
4
- <li x-data="navLeaf" :class="{hidden}" x-init="matchers = <%= example.matchers.to_json %>; path = '<%= path %>'; setActive()" @popstate.window="setActive">
5
- <a href="<%= path %>"
6
- class="pr-3 py-[5px] flex items-center w-full group transition hover:bg-gray-200 hover:bg-opacity-50"
7
- style="<%= nav_padding_style(example.hierarchy_depth + 1) %>"
8
- :class="{'!bg-indigo-100':active}"
9
- @click.stop.prevent="navigate"
10
- >
11
- <div class="relative w-3.5 h-3.5 mr-1.5" :class="active ? 'text-gray-900' : 'text-indigo-500'">
12
- <svg class="feather flex-none group-hover:text-indigo-800 transition <% if example.type == :group %> absolute top-[-2px] left-[-2px] w-3 h-3<% else %>w-3.5 h-3.5<% end %>">
13
- <use xlink:href="/lookbook-assets/feather-sprite.svg#eye" />
14
- </svg>
15
- <% if example.type == :group %>
16
- <svg class="feather w-3 h-3 flex-none group-hover:text-indigo-800 transition absolute top-[4px] left-[4px]">
17
- <use xlink:href="/lookbook-assets/feather-sprite.svg#eye" />
18
- </svg>
19
- <% end %>
20
- </div>
21
- <div class="truncate whitespace-nowrap">
22
- <%= example.label %>
23
- </div>
24
- </a>
25
- </li>
1
+ <% examples = node.get_examples %>
2
+ <% if examples.many? %>
3
+ <%= render "./nav/node", node: node, path: show_path(examples.first.path) do %>
4
+ <% examples.each do |example| %>
5
+ <%= render "./nav/leaf", leaf: example, depth: example.hierarchy_depth + 1 %>
6
+ <% end %>
26
7
  <% end %>
27
- <% end %>
28
-
29
-
8
+ <% else %>
9
+ <% example = examples.first %>
10
+ <%= render "./nav/leaf", leaf: example, depth: example.hierarchy_depth, display: :node %>
11
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <% examples.each do |example| %>
2
+ <div style="margin-bottom: 30px;">
3
+ <h6 style="color: #999; font-family: sans-serif; font-size: 14px; margin-top: 0; margin-bottom: 10px;">
4
+ <%= example[:label] %>
5
+ </h6>
6
+ <%= example[:html] %>
7
+ </div>
8
+ <% end %>
@@ -31,6 +31,7 @@ module Lookbook
31
31
  if name.nil?
32
32
  @lookbook_examples += examples
33
33
  else
34
+ name = lookbook_label if name.strip == ""
34
35
  @lookbook_examples << PreviewGroup.new(name.underscore, self, examples)
35
36
  end
36
37
  end
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "0.3.0.beta.1"
2
+ VERSION = "0.3.0.beta.2"
3
3
  end
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v2.2.15 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */
2
2
 
3
3
  /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
4
4
 
@@ -475,18 +475,6 @@ button,
475
475
  cursor: pointer;
476
476
  }
477
477
 
478
- /**
479
- * Override legacy focus reset from Normalize with modern Firefox focus styles.
480
- *
481
- * This is actually an improvement over the new defaults in Firefox in our testing,
482
- * as it triggers the better focus styles even for links, which still use a dotted
483
- * outline in Firefox by default.
484
- */
485
-
486
- :-moz-focusring {
487
- outline: auto;
488
- }
489
-
490
478
  table {
491
479
  border-collapse: collapse;
492
480
  }
@@ -1492,22 +1480,6 @@ pre[class*="language-"] {
1492
1480
  bottom: 0px;
1493
1481
  }
1494
1482
 
1495
- .top-\[-2px\] {
1496
- top: -2px;
1497
- }
1498
-
1499
- .left-\[-2px\] {
1500
- left: -2px;
1501
- }
1502
-
1503
- .top-\[4px\] {
1504
- top: 4px;
1505
- }
1506
-
1507
- .left-\[4px\] {
1508
- left: 4px;
1509
- }
1510
-
1511
1483
  .left-4 {
1512
1484
  left: 1rem;
1513
1485
  }
@@ -1541,14 +1513,18 @@ pre[class*="language-"] {
1541
1513
  margin-top: 0.5rem;
1542
1514
  }
1543
1515
 
1544
- .mr-1 {
1545
- margin-right: 0.25rem;
1546
- }
1547
-
1548
1516
  .mr-1\.5 {
1549
1517
  margin-right: 0.375rem;
1550
1518
  }
1551
1519
 
1520
+ .ml-\[3px\] {
1521
+ margin-left: 3px;
1522
+ }
1523
+
1524
+ .mr-1 {
1525
+ margin-right: 0.25rem;
1526
+ }
1527
+
1552
1528
  .mr-3 {
1553
1529
  margin-right: 0.75rem;
1554
1530
  }
@@ -1862,16 +1838,16 @@ pre[class*="language-"] {
1862
1838
  padding-right: 1rem;
1863
1839
  }
1864
1840
 
1865
- .py-1 {
1866
- padding-top: 0.25rem;
1867
- padding-bottom: 0.25rem;
1868
- }
1869
-
1870
1841
  .py-\[5px\] {
1871
1842
  padding-top: 5px;
1872
1843
  padding-bottom: 5px;
1873
1844
  }
1874
1845
 
1846
+ .py-1 {
1847
+ padding-top: 0.25rem;
1848
+ padding-bottom: 0.25rem;
1849
+ }
1850
+
1875
1851
  .py-2 {
1876
1852
  padding-top: 0.5rem;
1877
1853
  padding-bottom: 0.5rem;
@@ -1973,14 +1949,14 @@ pre[class*="language-"] {
1973
1949
  color: rgba(31, 41, 55, var(--tw-text-opacity));
1974
1950
  }
1975
1951
 
1976
- .text-indigo-500 {
1952
+ .text-gray-900 {
1977
1953
  --tw-text-opacity: 1;
1978
- color: rgba(99, 102, 241, var(--tw-text-opacity));
1954
+ color: rgba(17, 24, 39, var(--tw-text-opacity));
1979
1955
  }
1980
1956
 
1981
- .text-gray-900 {
1957
+ .text-indigo-500 {
1982
1958
  --tw-text-opacity: 1;
1983
- color: rgba(17, 24, 39, var(--tw-text-opacity));
1959
+ color: rgba(99, 102, 241, var(--tw-text-opacity));
1984
1960
  }
1985
1961
 
1986
1962
  .\!text-gray-300 {
@@ -20,10 +20,7 @@
20
20
  return a;
21
21
  };
22
22
  var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
23
- var __require = typeof require !== "undefined" ? require : (x) => {
24
- throw new Error('Dynamic require of "' + x + '" is not supported');
25
- };
26
- var __commonJS = (cb, mod) => function __require2() {
23
+ var __commonJS = (cb, mod) => function __require() {
27
24
  return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
28
25
  };
29
26
  var __reExport = (target, module, desc) => {
@@ -2222,7 +2219,7 @@
2222
2219
  function closestDataStack(node) {
2223
2220
  if (node._x_dataStack)
2224
2221
  return node._x_dataStack;
2225
- if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) {
2222
+ if (node instanceof ShadowRoot) {
2226
2223
  return closestDataStack(node.host);
2227
2224
  }
2228
2225
  if (!node.parentNode) {
@@ -2428,9 +2425,6 @@ Expression: "${expression}"
2428
2425
  return getDirectiveHandler(el, directive2);
2429
2426
  });
2430
2427
  }
2431
- function attributesOnly(attributes) {
2432
- return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr));
2433
- }
2434
2428
  var isDeferringHandlers = false;
2435
2429
  var directiveHandlerStacks = new Map();
2436
2430
  var currentHandlerStackKey = Symbol();
@@ -2484,8 +2478,7 @@ Expression: "${expression}"
2484
2478
  return { name, value };
2485
2479
  };
2486
2480
  var into = (i) => i;
2487
- function toTransformedAttributes(callback = () => {
2488
- }) {
2481
+ function toTransformedAttributes(callback) {
2489
2482
  return ({ name, value }) => {
2490
2483
  let { name: newName, value: newValue } = attributeTransformers.reduce((carry, transform) => {
2491
2484
  return transform(carry);
@@ -2565,7 +2558,7 @@ Expression: "${expression}"
2565
2558
  isHolding = true;
2566
2559
  }
2567
2560
  function walk(el, callback) {
2568
- if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) {
2561
+ if (el instanceof ShadowRoot) {
2569
2562
  Array.from(el.children).forEach((el2) => walk(el2, callback));
2570
2563
  return;
2571
2564
  }
@@ -2593,7 +2586,7 @@ Expression: "${expression}"
2593
2586
  onAttributesAdded((el, attrs) => {
2594
2587
  directives(el, attrs).forEach((handle) => handle());
2595
2588
  });
2596
- let outNestedComponents = (el) => !closestRoot(el.parentElement, true);
2589
+ let outNestedComponents = (el) => !closestRoot(el.parentElement);
2597
2590
  Array.from(document.querySelectorAll(allSelectors())).filter(outNestedComponents).forEach((el) => {
2598
2591
  initTree(el);
2599
2592
  });
@@ -2613,15 +2606,14 @@ Expression: "${expression}"
2613
2606
  function addInitSelector(selectorCallback) {
2614
2607
  initSelectorCallbacks.push(selectorCallback);
2615
2608
  }
2616
- function closestRoot(el, includeInitSelectors = false) {
2609
+ function closestRoot(el) {
2617
2610
  if (!el)
2618
2611
  return;
2619
- const selectors = includeInitSelectors ? allSelectors() : rootSelectors();
2620
- if (selectors.some((selector) => el.matches(selector)))
2612
+ if (rootSelectors().some((selector) => el.matches(selector)))
2621
2613
  return el;
2622
2614
  if (!el.parentElement)
2623
2615
  return;
2624
- return closestRoot(el.parentElement, includeInitSelectors);
2616
+ return closestRoot(el.parentElement);
2625
2617
  }
2626
2618
  function isRoot(el) {
2627
2619
  return rootSelectors().some((selector) => el.matches(selector));
@@ -2637,29 +2629,6 @@ Expression: "${expression}"
2637
2629
  function destroyTree(root) {
2638
2630
  walk(root, (el) => cleanupAttributes(el));
2639
2631
  }
2640
- function debounce(func, wait) {
2641
- var timeout;
2642
- return function() {
2643
- var context = this, args = arguments;
2644
- var later = function() {
2645
- timeout = null;
2646
- func.apply(context, args);
2647
- };
2648
- clearTimeout(timeout);
2649
- timeout = setTimeout(later, wait);
2650
- };
2651
- }
2652
- function throttle(func, limit) {
2653
- let inThrottle;
2654
- return function() {
2655
- let context = this, args = arguments;
2656
- if (!inThrottle) {
2657
- func.apply(context, args);
2658
- inThrottle = true;
2659
- setTimeout(() => inThrottle = false, limit);
2660
- }
2661
- };
2662
- }
2663
2632
  function plugin(callback) {
2664
2633
  callback(alpine_default);
2665
2634
  }
@@ -2746,7 +2715,7 @@ Expression: "${expression}"
2746
2715
  get raw() {
2747
2716
  return raw;
2748
2717
  },
2749
- version: "3.4.0",
2718
+ version: "3.2.4",
2750
2719
  disableEffectScheduling,
2751
2720
  setReactivityEngine,
2752
2721
  addRootSelector,
@@ -2757,8 +2726,6 @@ Expression: "${expression}"
2757
2726
  interceptor,
2758
2727
  mutateDom,
2759
2728
  directive,
2760
- throttle,
2761
- debounce,
2762
2729
  evaluate,
2763
2730
  initTree,
2764
2731
  nextTick,
@@ -2793,23 +2760,7 @@ Expression: "${expression}"
2793
2760
  }));
2794
2761
  });
2795
2762
  magic("store", getStores);
2796
- magic("root", (el) => closestRoot(el));
2797
- magic("refs", (el) => {
2798
- if (el._x_refs_proxy)
2799
- return el._x_refs_proxy;
2800
- el._x_refs_proxy = mergeProxies(getArrayOfRefObject(el));
2801
- return el._x_refs_proxy;
2802
- });
2803
- function getArrayOfRefObject(el) {
2804
- let refObjects = [];
2805
- let currentEl = el;
2806
- while (currentEl) {
2807
- if (currentEl._x_refs)
2808
- refObjects.push(currentEl._x_refs);
2809
- currentEl = currentEl.parentNode;
2810
- }
2811
- return refObjects;
2812
- }
2763
+ magic("refs", (el) => closestRoot(el)._x_refs || {});
2813
2764
  magic("el", (el) => el);
2814
2765
  function setClasses(el, value) {
2815
2766
  if (Array.isArray(value)) {
@@ -3017,9 +2968,7 @@ Expression: "${expression}"
3017
2968
  };
3018
2969
  }
3019
2970
  window.Element.prototype._x_toggleAndCascadeWithTransitions = function(el, value, show, hide) {
3020
- let clickAwayCompatibleShow = () => {
3021
- document.visibilityState === "visible" ? requestAnimationFrame(show) : setTimeout(show);
3022
- };
2971
+ let clickAwayCompatibleShow = () => requestAnimationFrame(show);
3023
2972
  if (value) {
3024
2973
  el._x_transition ? el._x_transition.in(show) : clickAwayCompatibleShow();
3025
2974
  return;
@@ -3299,7 +3248,7 @@ Expression: "${expression}"
3299
3248
  return booleanAttributes.includes(attrName);
3300
3249
  }
3301
3250
  function attributeShouldntBePreservedIfFalsy(name) {
3302
- return !["aria-pressed", "aria-checked", "aria-expanded"].includes(name);
3251
+ return !["aria-pressed", "aria-checked"].includes(name);
3303
3252
  }
3304
3253
  function on(el, event, modifiers, callback) {
3305
3254
  let listenerTarget = el;
@@ -3351,12 +3300,12 @@ Expression: "${expression}"
3351
3300
  if (modifiers.includes("debounce")) {
3352
3301
  let nextModifier = modifiers[modifiers.indexOf("debounce") + 1] || "invalid-wait";
3353
3302
  let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250;
3354
- handler3 = debounce(handler3, wait);
3303
+ handler3 = debounce(handler3, wait, this);
3355
3304
  }
3356
3305
  if (modifiers.includes("throttle")) {
3357
3306
  let nextModifier = modifiers[modifiers.indexOf("throttle") + 1] || "invalid-wait";
3358
3307
  let wait = isNumeric(nextModifier.split("ms")[0]) ? Number(nextModifier.split("ms")[0]) : 250;
3359
- handler3 = throttle(handler3, wait);
3308
+ handler3 = throttle(handler3, wait, this);
3360
3309
  }
3361
3310
  if (modifiers.includes("once")) {
3362
3311
  handler3 = wrapHandler(handler3, (next, e) => {
@@ -3375,6 +3324,29 @@ Expression: "${expression}"
3375
3324
  function camelCase2(subject) {
3376
3325
  return subject.toLowerCase().replace(/-(\w)/g, (match, char) => char.toUpperCase());
3377
3326
  }
3327
+ function debounce(func, wait) {
3328
+ var timeout;
3329
+ return function() {
3330
+ var context = this, args = arguments;
3331
+ var later = function() {
3332
+ timeout = null;
3333
+ func.apply(context, args);
3334
+ };
3335
+ clearTimeout(timeout);
3336
+ timeout = setTimeout(later, wait);
3337
+ };
3338
+ }
3339
+ function throttle(func, limit) {
3340
+ let inThrottle;
3341
+ return function() {
3342
+ let context = this, args = arguments;
3343
+ if (!inThrottle) {
3344
+ func.apply(context, args);
3345
+ inThrottle = true;
3346
+ setTimeout(() => inThrottle = false, limit);
3347
+ }
3348
+ };
3349
+ }
3378
3350
  function isNumeric(subject) {
3379
3351
  return !Array.isArray(subject) && !isNaN(subject);
3380
3352
  }
@@ -3426,9 +3398,7 @@ Expression: "${expression}"
3426
3398
  up: "arrow-up",
3427
3399
  down: "arrow-down",
3428
3400
  left: "arrow-left",
3429
- right: "arrow-right",
3430
- period: ".",
3431
- equal: "="
3401
+ right: "arrow-right"
3432
3402
  };
3433
3403
  modifierToKeyMap[key] = key;
3434
3404
  return Object.keys(modifierToKeyMap).map((modifier) => {
@@ -3509,12 +3479,7 @@ Expression: "${expression}"
3509
3479
  }
3510
3480
  directive("cloak", (el) => queueMicrotask(() => mutateDom(() => el.removeAttribute(prefix("cloak")))));
3511
3481
  addInitSelector(() => `[${prefix("init")}]`);
3512
- directive("init", skipDuringClone((el, { expression }) => {
3513
- if (typeof expression === "string") {
3514
- return !!expression.trim() && evaluate(el, expression, {}, false);
3515
- }
3516
- return evaluate(el, expression, {}, false);
3517
- }));
3482
+ directive("init", skipDuringClone((el, { expression }) => evaluate(el, expression, {}, false)));
3518
3483
  directive("text", (el, { expression }, { effect: effect3, evaluateLater: evaluateLater2 }) => {
3519
3484
  let evaluate2 = evaluateLater2(expression);
3520
3485
  effect3(() => {
@@ -3554,12 +3519,6 @@ Expression: "${expression}"
3554
3519
  cleanupRunners.pop()();
3555
3520
  getBindings((bindings) => {
3556
3521
  let attributes = Object.entries(bindings).map(([name, value]) => ({ name, value }));
3557
- attributesOnly(attributes).forEach(({ name, value }, index2) => {
3558
- attributes[index2] = {
3559
- name: `x-bind:${name}`,
3560
- value: `"${value}"`
3561
- };
3562
- });
3563
3522
  directives(el, attributes, original).map((handle) => {
3564
3523
  cleanupRunners.push(handle.runCleanups);
3565
3524
  handle();
@@ -3759,11 +3718,6 @@ Expression: "${expression}"
3759
3718
  names.forEach((name, i) => {
3760
3719
  scopeVariables[name] = item[i];
3761
3720
  });
3762
- } else if (/^\{.*\}$/.test(iteratorNames.item) && !Array.isArray(item) && typeof item === "object") {
3763
- let names = iteratorNames.item.replace("{", "").replace("}", "").split(",").map((i) => i.trim());
3764
- names.forEach((name) => {
3765
- scopeVariables[name] = item[name];
3766
- });
3767
3721
  } else {
3768
3722
  scopeVariables[iteratorNames.item] = item;
3769
3723
  }
@@ -8420,8 +8374,11 @@ Expression: "${expression}"
8420
8374
  this.$dispatch("nav:updated");
8421
8375
  });
8422
8376
  },
8423
- navigate($event) {
8424
- history.pushState({}, null, $event.currentTarget.href);
8377
+ navigate(path) {
8378
+ if (path instanceof Event) {
8379
+ path = path.currentTarget.href;
8380
+ }
8381
+ history.pushState({}, null, path);
8425
8382
  this.$dispatch("popstate");
8426
8383
  },
8427
8384
  focusFilter() {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lookbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta.1
4
+ version: 0.3.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-20 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -214,10 +214,11 @@ files:
214
214
  - app/views/lookbook/app/not_found.html.erb
215
215
  - app/views/lookbook/app/show.html.erb
216
216
  - app/views/lookbook/layouts/app.html.erb
217
- - app/views/lookbook/layouts/group.html.erb
218
217
  - app/views/lookbook/nav/_collection.html.erb
218
+ - app/views/lookbook/nav/_leaf.html.erb
219
219
  - app/views/lookbook/nav/_node.html.erb
220
220
  - app/views/lookbook/nav/_preview.html.erb
221
+ - app/views/lookbook/preview_group.html.erb
221
222
  - app/views/lookbook/shared/_clipboard.html.erb
222
223
  - app/views/lookbook/shared/_header.html.erb
223
224
  - app/views/lookbook/workbench/_header.html.erb
@@ -1,6 +0,0 @@
1
- <% items.each do |item| %>
2
- <div class="lookbook-example" style="margin-bottom: 30px;">
3
- <h6 class="lookbook-example-label" style="color: #999; font-size: 14px; margin-bottom: 10px;"><%= item[:label] %></h6>
4
- <%= item[:content] %>
5
- </div>
6
- <% end %>