tao_ui 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/config/locales/tao_ui/components/tree/en.yml +6 -0
  3. data/config/locales/tao_ui/components/tree/zh-CN.yml +6 -0
  4. data/lib/assets/javascripts/tao/ui/dialog/index.coffee +11 -1
  5. data/lib/assets/javascripts/tao/ui/index.coffee +3 -0
  6. data/lib/assets/javascripts/tao/ui/mobile/slide_box/index.coffee +1 -3
  7. data/lib/assets/javascripts/tao/ui/popover/index.coffee +11 -1
  8. data/lib/assets/javascripts/tao/ui/shared/slide_box/export.coffee +11 -0
  9. data/lib/assets/javascripts/tao/ui/slide_box/index.coffee +1 -3
  10. data/lib/assets/javascripts/tao/ui/sortable.coffee +140 -0
  11. data/lib/assets/javascripts/tao/ui/table/element.coffee +13 -0
  12. data/lib/assets/javascripts/tao/ui/table/expandable.coffee +61 -0
  13. data/lib/assets/javascripts/tao/ui/table/index.coffee +6 -0
  14. data/lib/assets/javascripts/tao/ui/table/selectable.coffee +52 -0
  15. data/lib/assets/javascripts/tao/ui/tree/element.coffee +58 -0
  16. data/lib/assets/javascripts/tao/ui/tree/index.coffee +5 -0
  17. data/lib/assets/javascripts/tao/ui/tree/item.coffee +86 -0
  18. data/lib/assets/stylesheets/tao/ui/index.scss +2 -0
  19. data/lib/assets/stylesheets/tao/ui/mobile/buttons.scss +6 -0
  20. data/lib/assets/stylesheets/tao/ui/mobile/slide_box.scss +1 -1
  21. data/lib/assets/stylesheets/tao/ui/shared/_buttons.scss +1 -1
  22. data/lib/assets/stylesheets/tao/ui/shared/_tables.scss +3 -2
  23. data/lib/assets/stylesheets/tao/ui/shared/variables/_base.scss +1 -0
  24. data/lib/assets/stylesheets/tao/ui/shared/variables/_buttons.scss +1 -1
  25. data/lib/assets/stylesheets/tao/ui/shared/variables/_tables.scss +2 -0
  26. data/lib/assets/stylesheets/tao/ui/sortable.scss +16 -0
  27. data/lib/assets/stylesheets/tao/ui/tables.scss +77 -0
  28. data/lib/assets/stylesheets/tao/ui/tree.scss +126 -0
  29. data/lib/tao_ui/action_view/helpers.rb +23 -0
  30. data/lib/tao_ui/components.rb +3 -0
  31. data/lib/tao_ui/components/icon_component.rb +0 -2
  32. data/lib/tao_ui/components/slide_box_component.rb +0 -2
  33. data/lib/tao_ui/components/sortable_component.rb +17 -0
  34. data/lib/tao_ui/components/table/base_builder.rb +58 -0
  35. data/lib/tao_ui/components/table/body_builder.rb +30 -0
  36. data/lib/tao_ui/components/table/head_builder.rb +15 -0
  37. data/lib/tao_ui/components/table/row_builder.rb +53 -0
  38. data/lib/tao_ui/components/table/table_builder.rb +35 -0
  39. data/lib/tao_ui/components/table_component.rb +40 -0
  40. data/lib/tao_ui/components/tree/item_component.rb +121 -0
  41. data/lib/tao_ui/components/tree/list_component.rb +51 -0
  42. data/lib/tao_ui/components/tree_component.rb +43 -0
  43. data/lib/tao_ui/engine.rb +7 -0
  44. data/lib/tao_ui/version.rb +1 -1
  45. data/lib/views/components/tao_ui/components/_confirm_dialog.html.erb +2 -2
  46. data/lib/views/components/tao_ui/components/_confirm_popover.html.erb +2 -2
  47. data/lib/views/components/tao_ui/components/_message_dialog.html.erb +1 -1
  48. metadata +26 -2
data/lib/tao_ui/engine.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'autoprefixer-rails'
2
2
  require 'tao_on_rails'
3
3
  require 'tao_ui/components'
4
+ require 'tao_ui/action_view/helpers'
4
5
 
5
6
  module TaoUi
6
7
  class Engine < ::Rails::Engine
@@ -8,5 +9,11 @@ module TaoUi
8
9
  config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.{rb,yml}')]
9
10
  paths['app/views'] << 'lib/views'
10
11
 
12
+ initializer "tao_ui.view_helpers" do |app|
13
+ ::ActiveSupport.on_load :action_view do
14
+ include TaoUi::ActionView::Helpers
15
+ end
16
+ end
17
+
11
18
  end
12
19
  end
@@ -1,3 +1,3 @@
1
1
  module TaoUi
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
3
3
  end
@@ -4,8 +4,8 @@
4
4
  <%= yield if block_given? %>
5
5
  </div>
6
6
  <div class="tao-dialog-buttons">
7
- <button class="button button-primary button-confirm"><%= component.confirm_text %></button>
8
- <button class="button button-cancel"><%= component.cancel_text %></button>
7
+ <button type="button" class="button button-primary button-confirm"><%= component.confirm_text %></button>
8
+ <button type="button" class="button button-cancel"><%= component.cancel_text %></button>
9
9
  </div>
10
10
  </div>
11
11
  <% end %>
@@ -4,8 +4,8 @@
4
4
  <%= yield if block_given? %>
5
5
  </div>
6
6
  <div class="tao-popover-buttons">
7
- <button class="button button-small button-primary button-confirm"><%= component.confirm_text %></button>
8
- <button class="button button-small button-cancel"><%= component.cancel_text %></button>
7
+ <button type="button" class="button button-small button-primary button-confirm"><%= component.confirm_text %></button>
8
+ <button type="button" class="button button-small button-cancel"><%= component.cancel_text %></button>
9
9
  </div>
10
10
  </div>
11
11
  <div class="tao-popover-arrow">
@@ -4,7 +4,7 @@
4
4
  <%= yield if block_given? %>
5
5
  </div>
6
6
  <div class="tao-dialog-buttons">
7
- <button class="button button-primary button-confirm"><%= component.confirm_text %></button>
7
+ <button type="button" class="button button-primary button-confirm"><%= component.confirm_text %></button>
8
8
  </div>
9
9
  </div>
10
10
  <% end %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tao_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - farthinker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2017-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tao_on_rails
@@ -109,6 +109,8 @@ files:
109
109
  - config/locales/tao_ui/components/dialog/zh-CN.yml
110
110
  - config/locales/tao_ui/components/slide_box/en.yml
111
111
  - config/locales/tao_ui/components/slide_box/zh-CN.yml
112
+ - config/locales/tao_ui/components/tree/en.yml
113
+ - config/locales/tao_ui/components/tree/zh-CN.yml
112
114
  - lib/assets/icons/close.svg
113
115
  - lib/assets/icons/loading.svg
114
116
  - lib/assets/javascripts/tao/ui/dialog/confirm.coffee
@@ -128,10 +130,19 @@ files:
128
130
  - lib/assets/javascripts/tao/ui/popover/index.coffee
129
131
  - lib/assets/javascripts/tao/ui/popover/position.coffee
130
132
  - lib/assets/javascripts/tao/ui/shared/slide_box/element/base.coffee
133
+ - lib/assets/javascripts/tao/ui/shared/slide_box/export.coffee
131
134
  - lib/assets/javascripts/tao/ui/shared/ujs.coffee
132
135
  - lib/assets/javascripts/tao/ui/slide_box/element.coffee
133
136
  - lib/assets/javascripts/tao/ui/slide_box/index.coffee
137
+ - lib/assets/javascripts/tao/ui/sortable.coffee
138
+ - lib/assets/javascripts/tao/ui/table/element.coffee
139
+ - lib/assets/javascripts/tao/ui/table/expandable.coffee
140
+ - lib/assets/javascripts/tao/ui/table/index.coffee
141
+ - lib/assets/javascripts/tao/ui/table/selectable.coffee
134
142
  - lib/assets/javascripts/tao/ui/tooltip.coffee
143
+ - lib/assets/javascripts/tao/ui/tree/element.coffee
144
+ - lib/assets/javascripts/tao/ui/tree/index.coffee
145
+ - lib/assets/javascripts/tao/ui/tree/item.coffee
135
146
  - lib/assets/stylesheets/tao/ui/_custom.scss
136
147
  - lib/assets/stylesheets/tao/ui/_globals.scss
137
148
  - lib/assets/stylesheets/tao/ui/_mixins.scss
@@ -168,13 +179,16 @@ files:
168
179
  - lib/assets/stylesheets/tao/ui/shared/variables/_buttons.scss
169
180
  - lib/assets/stylesheets/tao/ui/shared/variables/_tables.scss
170
181
  - lib/assets/stylesheets/tao/ui/slide_box.scss
182
+ - lib/assets/stylesheets/tao/ui/sortable.scss
171
183
  - lib/assets/stylesheets/tao/ui/tables.scss
172
184
  - lib/assets/stylesheets/tao/ui/tooltip.scss
185
+ - lib/assets/stylesheets/tao/ui/tree.scss
173
186
  - lib/assets/stylesheets/tao/ui/variables/_base.scss
174
187
  - lib/generators/tao/icons/USAGE
175
188
  - lib/generators/tao/icons/icons_generator.rb
176
189
  - lib/generators/tao/icons/templates/icons.coffee.erb
177
190
  - lib/tao_ui.rb
191
+ - lib/tao_ui/action_view/helpers.rb
178
192
  - lib/tao_ui/components.rb
179
193
  - lib/tao_ui/components/confirm_dialog_component.rb
180
194
  - lib/tao_ui/components/confirm_popover_component.rb
@@ -183,7 +197,17 @@ files:
183
197
  - lib/tao_ui/components/message_dialog_component.rb
184
198
  - lib/tao_ui/components/popover_component.rb
185
199
  - lib/tao_ui/components/slide_box_component.rb
200
+ - lib/tao_ui/components/sortable_component.rb
201
+ - lib/tao_ui/components/table/base_builder.rb
202
+ - lib/tao_ui/components/table/body_builder.rb
203
+ - lib/tao_ui/components/table/head_builder.rb
204
+ - lib/tao_ui/components/table/row_builder.rb
205
+ - lib/tao_ui/components/table/table_builder.rb
206
+ - lib/tao_ui/components/table_component.rb
186
207
  - lib/tao_ui/components/tooltip_component.rb
208
+ - lib/tao_ui/components/tree/item_component.rb
209
+ - lib/tao_ui/components/tree/list_component.rb
210
+ - lib/tao_ui/components/tree_component.rb
187
211
  - lib/tao_ui/engine.rb
188
212
  - lib/tao_ui/version.rb
189
213
  - lib/views/components/tao_ui/components/_confirm_dialog.html.erb