lookbook 1.0.0.beta.0 → 1.0.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +84 -2
- data/app/assets/lookbook/js/stores/inspector.js +4 -4
- data/app/components/lookbook/dimensions_display/component.html.erb +2 -1
- data/app/components/lookbook/dimensions_display/component.js +19 -12
- data/app/components/lookbook/header/component.html.erb +2 -2
- data/app/components/lookbook/page_tabs/component.html.erb +18 -0
- data/app/components/lookbook/page_tabs/component.rb +19 -0
- data/app/components/lookbook/tab_panels/component.html.erb +5 -0
- data/app/components/lookbook/tab_panels/component.js +25 -0
- data/app/components/lookbook/tab_panels/component.rb +20 -0
- data/app/components/lookbook/{tabbed_content/section → tab_panels/panel}/component.html.erb +2 -2
- data/app/components/lookbook/tab_panels/panel/component.rb +9 -0
- data/app/components/lookbook/tabs/component.html.erb +8 -2
- data/app/components/lookbook/tabs/component.js +11 -3
- data/app/components/lookbook/tabs/component.rb +8 -10
- data/app/components/lookbook/tabs/dropdown_tab/component.html.erb +8 -2
- data/app/components/lookbook/tabs/dropdown_tab/component.rb +4 -3
- data/app/components/lookbook/tabs/tab/component.html.erb +9 -3
- data/app/components/lookbook/tabs/tab/component.rb +4 -3
- data/app/components/lookbook/toolbar/component.css +1 -1
- data/app/controllers/lookbook/application_controller.rb +1 -1
- data/app/controllers/lookbook/pages_controller.rb +1 -0
- data/app/controllers/lookbook/previews_controller.rb +90 -86
- data/app/views/lookbook/pages/show.html.erb +11 -1
- data/app/views/lookbook/preview.html.erb +3 -3
- data/app/views/lookbook/previews/panels/_content.html.erb +13 -0
- data/app/views/lookbook/previews/panels/_notes.html.erb +5 -5
- data/app/views/lookbook/previews/panels/_output.html.erb +3 -3
- data/app/views/lookbook/previews/panels/_params.html.erb +2 -2
- data/app/views/lookbook/previews/panels/_preview.html.erb +1 -1
- data/app/views/lookbook/previews/panels/_source.html.erb +6 -6
- data/app/views/lookbook/previews/show.html.erb +38 -35
- data/lib/lookbook/config.rb +87 -32
- data/lib/lookbook/page.rb +31 -8
- data/lib/lookbook/page_section.rb +31 -0
- data/lib/lookbook/store.rb +36 -0
- data/lib/lookbook/theme.rb +7 -0
- data/lib/lookbook/utils.rb +1 -1
- data/lib/lookbook/version.rb +1 -1
- data/lib/lookbook.rb +2 -0
- data/public/lookbook-assets/css/lookbook.css +34 -5
- data/public/lookbook-assets/css/lookbook.css.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +36 -24
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +12 -7
- data/app/components/lookbook/tabbed_content/component.html.erb +0 -5
- data/app/components/lookbook/tabbed_content/component.js +0 -21
- data/app/components/lookbook/tabbed_content/component.rb +0 -20
- data/app/components/lookbook/tabbed_content/section/component.rb +0 -9
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: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Perkins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actioncable
|
@@ -221,6 +221,8 @@ files:
|
|
221
221
|
- app/components/lookbook/nav/item/component.html.erb
|
222
222
|
- app/components/lookbook/nav/item/component.js
|
223
223
|
- app/components/lookbook/nav/item/component.rb
|
224
|
+
- app/components/lookbook/page_tabs/component.html.erb
|
225
|
+
- app/components/lookbook/page_tabs/component.rb
|
224
226
|
- app/components/lookbook/params_editor/component.html.erb
|
225
227
|
- app/components/lookbook/params_editor/component.js
|
226
228
|
- app/components/lookbook/params_editor/component.rb
|
@@ -233,11 +235,11 @@ files:
|
|
233
235
|
- app/components/lookbook/split_layout/component.html.erb
|
234
236
|
- app/components/lookbook/split_layout/component.js
|
235
237
|
- app/components/lookbook/split_layout/component.rb
|
236
|
-
- app/components/lookbook/
|
237
|
-
- app/components/lookbook/
|
238
|
-
- app/components/lookbook/
|
239
|
-
- app/components/lookbook/
|
240
|
-
- app/components/lookbook/
|
238
|
+
- app/components/lookbook/tab_panels/component.html.erb
|
239
|
+
- app/components/lookbook/tab_panels/component.js
|
240
|
+
- app/components/lookbook/tab_panels/component.rb
|
241
|
+
- app/components/lookbook/tab_panels/panel/component.html.erb
|
242
|
+
- app/components/lookbook/tab_panels/panel/component.rb
|
241
243
|
- app/components/lookbook/tabs/component.css
|
242
244
|
- app/components/lookbook/tabs/component.html.erb
|
243
245
|
- app/components/lookbook/tabs/component.js
|
@@ -274,6 +276,7 @@ files:
|
|
274
276
|
- app/views/lookbook/index.html.erb
|
275
277
|
- app/views/lookbook/pages/show.html.erb
|
276
278
|
- app/views/lookbook/preview.html.erb
|
279
|
+
- app/views/lookbook/previews/panels/_content.html.erb
|
277
280
|
- app/views/lookbook/previews/panels/_notes.html.erb
|
278
281
|
- app/views/lookbook/previews/panels/_output.html.erb
|
279
282
|
- app/views/lookbook/previews/panels/_params.html.erb
|
@@ -293,6 +296,7 @@ files:
|
|
293
296
|
- lib/lookbook/markdown.rb
|
294
297
|
- lib/lookbook/page.rb
|
295
298
|
- lib/lookbook/page_collection.rb
|
299
|
+
- lib/lookbook/page_section.rb
|
296
300
|
- lib/lookbook/params.rb
|
297
301
|
- lib/lookbook/parser.rb
|
298
302
|
- lib/lookbook/preview.rb
|
@@ -301,6 +305,7 @@ files:
|
|
301
305
|
- lib/lookbook/preview_example.rb
|
302
306
|
- lib/lookbook/preview_group.rb
|
303
307
|
- lib/lookbook/source_inspector.rb
|
308
|
+
- lib/lookbook/store.rb
|
304
309
|
- lib/lookbook/theme.rb
|
305
310
|
- lib/lookbook/utils.rb
|
306
311
|
- lib/lookbook/version.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
export default function tabbedContentComponent(store) {
|
2
|
-
return {
|
3
|
-
get id() {
|
4
|
-
return this.$root.id;
|
5
|
-
},
|
6
|
-
|
7
|
-
get sections() {
|
8
|
-
return Array.from(this.$refs.sections.children);
|
9
|
-
},
|
10
|
-
|
11
|
-
isActive(el) {
|
12
|
-
return store.activeTab === this._getRef(el);
|
13
|
-
},
|
14
|
-
|
15
|
-
// protected
|
16
|
-
|
17
|
-
_getRef(el) {
|
18
|
-
return el.getAttribute("x-ref");
|
19
|
-
},
|
20
|
-
};
|
21
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module Lookbook
|
2
|
-
class TabbedContent::Component < Lookbook::Component
|
3
|
-
renders_many :sections, ->(ref: nil, **attrs) do
|
4
|
-
@section_counter += 1
|
5
|
-
ref ||= "tab-#{@section_counter}"
|
6
|
-
Lookbook::TabbedContent::Section::Component.new ref: ref, **attrs
|
7
|
-
end
|
8
|
-
|
9
|
-
def initialize(**html_attrs)
|
10
|
-
@section_counter = 0
|
11
|
-
super(**html_attrs)
|
12
|
-
end
|
13
|
-
|
14
|
-
protected
|
15
|
-
|
16
|
-
def alpine_component
|
17
|
-
"tabbedContentComponent"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|