playbook_ui 5.1.0.pre.alpha4 → 5.2.0.pre.alpha5

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: 1f840763ce61e9d3a4d7d7d8e1cbee6139beb4b2cfccf9d1e10bf92cf95cab76
4
- data.tar.gz: 52f04b4df6443fce97a07fe238d4356d16ea36ba03c40af47543b3d20f3956ad
3
+ metadata.gz: 51432c5454852ca092daa029064a6c3506b424639455d97854c4155e25bae2cd
4
+ data.tar.gz: 5872c8bea8b04af9ea6de5c89f8f0c919105819e8a6c5620de59f201bc0ceb03
5
5
  SHA512:
6
- metadata.gz: fab9d1b2984d62e49f03d080ca04849531015b43a182790dd656dcd2d2f150e8394c757d3b379cbaeee9f56f0b735cac5801a870e1b4461e76713a936953b13e
7
- data.tar.gz: 0ee55254047e223cbb631abb1d485b875bdd5f61cc457e52655a828ed435cd4067aea9607d58c33786b6376c8bf6e9e899d5f1ec5d60d979b256a2f449106b45
6
+ metadata.gz: 459cf49daaf4905570339641311fb657a7581f7ffd9b3b89a8c90c51534b0ebcd578894125b31c9e8653c3f8a7a7e805b536349c8d60d297b0e95a8ce1946d11
7
+ data.tar.gz: e5a13544b32979a37f291641d3c469a765dbd0db0e9a5b2e81bf03c2dd85d960ada4c76812e85ffc66c285c4c20ffdfb495de0ca6281d64a346200b8be327ffb
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Playbook
4
+ class ApplicationController < ActionController::Base
5
+ helper Webpacker::Helper
6
+ helper Playbook::PbKitHelper
7
+ helper Playbook::PbDocHelper
8
+ helper Playbook::PbSampleHelper
9
+ append_view_path Playbook::Engine.root + "app/pb_kits"
10
+ end
11
+ end
@@ -0,0 +1,9 @@
1
+ <%if !@kit_examples[:examples].nil? %>
2
+ <% @kit_examples[:examples].each do |kit_example| %>
3
+ <% kit_example.each do |key, item| %>
4
+ <div class="pb--doc <%=key.include?('_dark') ? 'dark_ui' : 'light_ui'%>">
5
+ <%= render partial: "config/kit_ui", locals: { key: key, type: @type, item: item, show_code: @show_code } %>
6
+ </div>
7
+ <% end %>
8
+ <% end %>
9
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <div>
2
+ Flexbox list of thumbnail previews.
3
+ </div>
@@ -0,0 +1,40 @@
1
+
2
+ <% type ||= "rails" %>
3
+
4
+ <% if type == "react" %>
5
+ <% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.jsx") %>
6
+ <% else %>
7
+ <% contents = File.read("#{Playbook::Engine.root}/app/pb_kits/playbook/pb_#{@kit_examples[:kit]}/docs/_#{key}.html.erb") %>
8
+ <% end %>
9
+
10
+ <div class="pb--kit-example">
11
+ <%= pb_rails("caption", props: { text: item }) %>
12
+ <br>
13
+ <% if type == "rails" %>
14
+ <%= render partial: "pb_#{@kit_examples[:kit]}/docs/#{key}" %>
15
+ <% elsif type == "react" %>
16
+ <%= pb_react(key.camelize) %>
17
+ <% end %>
18
+ <br>
19
+ </div>
20
+
21
+ <% if @show_code%>
22
+ <div class="markdown pb--kit-example-markdown">
23
+ <%= markdown(get_per_sample_descriptions(@kit_examples[:kit], key)) %>
24
+ </div>
25
+ <div class="pb--codeControls">
26
+ <ul>
27
+ <li>
28
+ <a href="#" data-toggle="code_example">Code Example</a>
29
+ </li>
30
+ </ul>
31
+ </div>
32
+ <div class="pb--codeCopy" data-action="toggle" data-togglable="code_example" style="display: none" >
33
+ <a href="#" data-toggle="false" class="pb--close-toggle">Close</a>
34
+ <% if type == "rails" %>
35
+ <pre class="highlight"><%= raw rouge(contents, "erb") %></pre>
36
+ <% elsif type == "react" %>
37
+ <pre class="highlight"><%= raw rouge(contents, "react")%></pre>
38
+ <% end %>
39
+ </div>
40
+ <% end %>
@@ -0,0 +1,18 @@
1
+ <% if defined?(@kit_api) && @kit_api.present? %>
2
+ <div data-action="toggle" data-togglable="prop_example" class="pb--propsTable">
3
+ <table class="pb--propsTable--table">
4
+ <thead>
5
+ <tr>
6
+ <th>Available Props</th>
7
+ </tr>
8
+ </thead>
9
+ <tbody>
10
+ <% @kit_api.each_with_index do |(key,value),index| %>
11
+ <tr>
12
+ <td><%= key %></td>
13
+ </tr>
14
+ <% end %>
15
+ </tbody>
16
+ </table>
17
+ </div>
18
+ <% end %>
@@ -0,0 +1,93 @@
1
+ samples:
2
+ - dashboards
3
+ - registration
4
+ - filter_table
5
+
6
+ kits:
7
+ - avatar
8
+ - avatar_action_button
9
+ - badge
10
+ - buttons:
11
+ - button
12
+ - circle_icon_button
13
+ - card
14
+ - checkbox
15
+ - charts_and_graphs:
16
+ - bar_graph
17
+ - legend
18
+ - line_graph
19
+ - distribution_bar
20
+ - circle_chart
21
+
22
+ - filter
23
+ - fixed_confirmation_toast
24
+ - flex
25
+ - forms:
26
+ - file_upload
27
+ - form
28
+ - form_pill
29
+ - radio
30
+ - select
31
+ - selectable_card
32
+ - selectable_card_icon
33
+ - selectable_icon
34
+ - text_input
35
+ - textarea
36
+ - typeahead
37
+ - toggle
38
+ - highlight
39
+ - hashtag
40
+ - icon
41
+ - icon_circle
42
+ - icon_value
43
+ - image
44
+ - installer
45
+ - layout
46
+ - list
47
+ - loading_inline
48
+ - logistic
49
+ - multiple_users
50
+ - multiple_users_stacked
51
+ - nav
52
+ - online_status
53
+ - pill
54
+ - popover
55
+ - progress_pills
56
+ - progress_simple
57
+ - progress_step
58
+ - section_separator
59
+ - source
60
+ - star_rating
61
+ - stat_change
62
+ - table
63
+ - timeline
64
+ - tooltip
65
+ - typography:
66
+ - body
67
+ - caption
68
+ - title
69
+ - typography_patterns:
70
+ - contact
71
+ - currency
72
+ - dashboard_value
73
+ - date
74
+ - date_range_inline
75
+ - date_range_stacked
76
+ - date_stacked
77
+ - date_time_stacked
78
+ - date_year_stacked
79
+ - home_address_street
80
+ - label_pill
81
+ - label_value
82
+ - message
83
+ - person
84
+ - person_contact
85
+ - stat_value
86
+ - time
87
+ - time_stacked
88
+ - timestamp
89
+ - time_range_inline
90
+ - title_count
91
+ - title_detail
92
+ - weekday_stacked
93
+ - user
@@ -73,22 +73,23 @@ const PersonContact = (props: PersonContactProps) => {
73
73
  contactDetail={contactObject.contactDetail}
74
74
  contactType={contactObject.contactType}
75
75
  contactValue={contactObject.contactValue}
76
- key={index}
76
+ key={`valid-contact-${index}`}
77
77
  />
78
- ))}
78
+ ))}
79
79
  {wrongContacts().map((contactObject, index) => (
80
- <>
80
+ <div key={`wrong-contact-caption-wrapper-${index}`}>
81
81
  <Caption
82
82
  className="wrong_numbers"
83
+ key={`wrong-contact-caption-${index}`}
83
84
  text="wrong number"
84
85
  />
85
86
  <Contact
86
87
  contactType={contactObject.contactType}
87
88
  contactValue={contactObject.contactValue}
88
- key={index}
89
+ key={`wrong-contact-${index}`}
89
90
  />
90
- </>
91
- ))}
91
+ </div>
92
+ ))}
92
93
  </div>
93
94
  )
94
95
  }
@@ -5,6 +5,7 @@ const PersonContactWithWrongNumbers = () => {
5
5
  return (
6
6
  <>
7
7
  <PersonContact
8
+ key="person-contact-1"
8
9
  contacts={[
9
10
  {
10
11
  contactType: 'email',
@@ -21,6 +21,7 @@ module Playbook
21
21
  initializer "playbook_ui.add_view_paths", after: :add_view_paths do |_app|
22
22
  ActiveSupport.on_load(:action_controller) do
23
23
  append_view_path "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/app/pb_kits/playbook"
24
+ append_view_path "#{Gem.loaded_specs['playbook_ui'].full_gem_path}/app/pb_kits/playbook/config"
24
25
  end
25
26
  end
26
27
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "5.1.0-alpha4"
4
+ VERSION = "5.2.0.pre.alpha5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0.pre.alpha4
4
+ version: 5.2.0.pre.alpha5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-06-24 00:00:00.000000000 Z
12
+ date: 2020-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -381,6 +381,7 @@ extra_rdoc_files: []
381
381
  files:
382
382
  - README.md
383
383
  - Rakefile
384
+ - app/controllers/playbook/application_controller.rb
384
385
  - app/helpers/playbook/application_helper.rb
385
386
  - app/helpers/playbook/layout_helper.rb
386
387
  - app/helpers/playbook/pb_doc_helper.rb
@@ -388,6 +389,11 @@ files:
388
389
  - app/helpers/playbook/pb_sample_helper.rb
389
390
  - app/helpers/playbook/redcarpet_helper.rb
390
391
  - app/pb_kits/playbook/_playbook.scss
392
+ - app/pb_kits/playbook/config/_kit_example.html.erb
393
+ - app/pb_kits/playbook/config/_kit_samples_list.html.erb
394
+ - app/pb_kits/playbook/config/_kit_ui.html.erb
395
+ - app/pb_kits/playbook/config/_pb_kit_api.html.erb
396
+ - app/pb_kits/playbook/data/menu.yml
391
397
  - app/pb_kits/playbook/index.js
392
398
  - app/pb_kits/playbook/pb_avatar/_avatar.html.erb
393
399
  - app/pb_kits/playbook/pb_avatar/_avatar.jsx