tao_ui 0.3.4 → 1.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/tao_ui/components/tree/item_component.rb +20 -12
  3. data/lib/tao_ui/components/tree_component.rb +1 -1
  4. data/lib/tao_ui/engine.rb +0 -1
  5. data/lib/tao_ui/version.rb +1 -1
  6. data/lib/views/components/tao_ui/components/_dialog.html.erb +2 -2
  7. data/lib/views/components/tao_ui/components/_slide_box.html.erb +1 -1
  8. metadata +7 -157
  9. data/config/autoprefixer.yml +0 -7
  10. data/lib/assets/icons/Loading.svg +0 -19
  11. data/lib/assets/icons/close.svg +0 -12
  12. data/lib/assets/javascripts/tao/ui/dialog/confirm.coffee +0 -13
  13. data/lib/assets/javascripts/tao/ui/dialog/element.coffee +0 -115
  14. data/lib/assets/javascripts/tao/ui/dialog/index.coffee +0 -16
  15. data/lib/assets/javascripts/tao/ui/dialog/message.coffee +0 -13
  16. data/lib/assets/javascripts/tao/ui/icons/base.coffee +0 -5
  17. data/lib/assets/javascripts/tao/ui/icons/index.coffee +0 -20
  18. data/lib/assets/javascripts/tao/ui/index.coffee +0 -12
  19. data/lib/assets/javascripts/tao/ui/mobile/index.coffee +0 -6
  20. data/lib/assets/javascripts/tao/ui/mobile/slide_box/element.coffee +0 -7
  21. data/lib/assets/javascripts/tao/ui/mobile/slide_box/index.coffee +0 -2
  22. data/lib/assets/javascripts/tao/ui/popover/confirm.coffee +0 -23
  23. data/lib/assets/javascripts/tao/ui/popover/create.coffee +0 -18
  24. data/lib/assets/javascripts/tao/ui/popover/direction.coffee +0 -76
  25. data/lib/assets/javascripts/tao/ui/popover/element.coffee +0 -198
  26. data/lib/assets/javascripts/tao/ui/popover/index.coffee +0 -16
  27. data/lib/assets/javascripts/tao/ui/popover/position.coffee +0 -80
  28. data/lib/assets/javascripts/tao/ui/shared/slide_box/element/base.coffee +0 -118
  29. data/lib/assets/javascripts/tao/ui/shared/slide_box/export.coffee +0 -11
  30. data/lib/assets/javascripts/tao/ui/shared/ujs.coffee +0 -51
  31. data/lib/assets/javascripts/tao/ui/slide_box/element.coffee +0 -9
  32. data/lib/assets/javascripts/tao/ui/slide_box/index.coffee +0 -2
  33. data/lib/assets/javascripts/tao/ui/sortable.coffee +0 -147
  34. data/lib/assets/javascripts/tao/ui/table/element.coffee +0 -13
  35. data/lib/assets/javascripts/tao/ui/table/expandable.coffee +0 -62
  36. data/lib/assets/javascripts/tao/ui/table/index.coffee +0 -6
  37. data/lib/assets/javascripts/tao/ui/table/selectable.coffee +0 -52
  38. data/lib/assets/javascripts/tao/ui/tooltip.coffee +0 -5
  39. data/lib/assets/javascripts/tao/ui/tree/element.coffee +0 -58
  40. data/lib/assets/javascripts/tao/ui/tree/index.coffee +0 -5
  41. data/lib/assets/javascripts/tao/ui/tree/item.coffee +0 -93
  42. data/lib/assets/stylesheets/tao/ui/_custom.scss +0 -1
  43. data/lib/assets/stylesheets/tao/ui/_globals.scss +0 -3
  44. data/lib/assets/stylesheets/tao/ui/_mixins.scss +0 -2
  45. data/lib/assets/stylesheets/tao/ui/_variables.scss +0 -4
  46. data/lib/assets/stylesheets/tao/ui/basic.scss +0 -30
  47. data/lib/assets/stylesheets/tao/ui/buttons.scss +0 -8
  48. data/lib/assets/stylesheets/tao/ui/code.scss +0 -2
  49. data/lib/assets/stylesheets/tao/ui/dialog.scss +0 -117
  50. data/lib/assets/stylesheets/tao/ui/icons.scss +0 -2
  51. data/lib/assets/stylesheets/tao/ui/index.scss +0 -13
  52. data/lib/assets/stylesheets/tao/ui/mobile/_custom.scss +0 -1
  53. data/lib/assets/stylesheets/tao/ui/mobile/_globals.scss +0 -3
  54. data/lib/assets/stylesheets/tao/ui/mobile/_mixins.scss +0 -2
  55. data/lib/assets/stylesheets/tao/ui/mobile/_variables.scss +0 -3
  56. data/lib/assets/stylesheets/tao/ui/mobile/basic.scss +0 -24
  57. data/lib/assets/stylesheets/tao/ui/mobile/buttons.scss +0 -8
  58. data/lib/assets/stylesheets/tao/ui/mobile/code.scss +0 -2
  59. data/lib/assets/stylesheets/tao/ui/mobile/icons.scss +0 -2
  60. data/lib/assets/stylesheets/tao/ui/mobile/index.scss +0 -7
  61. data/lib/assets/stylesheets/tao/ui/mobile/slide_box.scss +0 -56
  62. data/lib/assets/stylesheets/tao/ui/mobile/tables.scss +0 -2
  63. data/lib/assets/stylesheets/tao/ui/mobile/variables/_base.scss +0 -10
  64. data/lib/assets/stylesheets/tao/ui/mobile/variables/_buttons.scss +0 -7
  65. data/lib/assets/stylesheets/tao/ui/popover.scss +0 -206
  66. data/lib/assets/stylesheets/tao/ui/shared/_basic.scss +0 -127
  67. data/lib/assets/stylesheets/tao/ui/shared/_buttons.scss +0 -65
  68. data/lib/assets/stylesheets/tao/ui/shared/_code.scss +0 -54
  69. data/lib/assets/stylesheets/tao/ui/shared/_icons.scss +0 -16
  70. data/lib/assets/stylesheets/tao/ui/shared/_slide_box.scss +0 -83
  71. data/lib/assets/stylesheets/tao/ui/shared/_tables.scss +0 -38
  72. data/lib/assets/stylesheets/tao/ui/shared/mixins/_base.scss +0 -6
  73. data/lib/assets/stylesheets/tao/ui/shared/mixins/_buttons.scss +0 -40
  74. data/lib/assets/stylesheets/tao/ui/shared/variables/_base.scss +0 -49
  75. data/lib/assets/stylesheets/tao/ui/shared/variables/_buttons.scss +0 -99
  76. data/lib/assets/stylesheets/tao/ui/shared/variables/_tables.scss +0 -4
  77. data/lib/assets/stylesheets/tao/ui/slide_box.scss +0 -39
  78. data/lib/assets/stylesheets/tao/ui/sortable.scss +0 -16
  79. data/lib/assets/stylesheets/tao/ui/tables.scss +0 -89
  80. data/lib/assets/stylesheets/tao/ui/tabs.scss +0 -23
  81. data/lib/assets/stylesheets/tao/ui/tooltip.scss +0 -147
  82. data/lib/assets/stylesheets/tao/ui/tree.scss +0 -128
  83. data/lib/assets/stylesheets/tao/ui/variables/_base.scss +0 -10
  84. data/lib/assets/stylesheets/tao/ui/variables/_tree.scss +0 -2
  85. data/lib/generators/tao/icons/USAGE +0 -8
  86. data/lib/generators/tao/icons/icons_generator.rb +0 -56
  87. data/lib/generators/tao/icons/templates/icons.coffee.erb +0 -3
  88. data/vendor/assets/stylesheets/normalize.css +0 -427
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d701031ac79bef3e9845a54b6f122396a554e827
4
- data.tar.gz: 87281c106b7756741f9e2ffae41ddb77e035ec37
3
+ metadata.gz: 83243a5f2c8c41751343c4914371ab338f83d63a
4
+ data.tar.gz: 9ec7c347ba6f0d6976bf526d88672bd9d09ab39a
5
5
  SHA512:
6
- metadata.gz: 400c6f452e8ad425918e07e5bd74956baae6113a89cd555285d9da29376530a68b187d8ad5f9c1c362a1f3d952b7a132b226563213908f3f084dc69f0d86fc7a
7
- data.tar.gz: a7c6fcabb4b564ac066466c92e1fb2d1860d97bb7ea3eb80670eed9c714925ed9bead6b5a19aeffc45af78cba0c93cd9473ccba5931e50d0639a2a70e1334859
6
+ metadata.gz: edebe48a3b754027b851947b4fed6a5cf54dd2893a17e5ea67e3466412cbacd50f8f1f8fb953c83c36982e6414b5d2ab64293cc2c9f76d9e5cd52289b342291b
7
+ data.tar.gz: e7b7860ee3fcbf24440877fa1ff6986ab7ae0f9d409cec8c7ba6fc02fbd63b6a88062040be7e29690d11a043ce9b18373908478eb086f5a185c02f800f32598a
@@ -10,22 +10,22 @@ module TaoUi
10
10
  super view, options
11
11
  @item = item
12
12
  @children_key = @options.delete(:children_key)
13
- @selectable = @options[:selectable] || false
14
13
  @depth = @options[:depth]
15
14
 
16
15
  init_remote
17
16
  init_children
18
17
  init_expanded
18
+ init_selectable
19
19
  end
20
20
 
21
- def render &block
21
+ def render(&block)
22
22
  view.content_tag tag_name, html_options do
23
23
  content = view.content_tag 'div', class: 'tao-tree-item-content' do
24
24
  render_padding + render_icon +
25
25
  render_checkbox + view.capture(item, self, &block)
26
26
  end
27
27
 
28
- children = render_children &block
28
+ children = render_children(&block)
29
29
  content + children
30
30
  end
31
31
  end
@@ -51,20 +51,26 @@ module TaoUi
51
51
  end
52
52
 
53
53
  def init_remote
54
- @remote = html_options.delete(:remote) || false
54
+ @remote = options.delete(:remote) || false
55
55
  @remote = @remote.call(item, depth) if @remote.respond_to?(:call)
56
56
  if @remote && @remote.is_a?(Hash)
57
- html_options[:remote] = @remote.to_json
57
+ options[:remote] = @remote.to_json
58
58
  end
59
59
  end
60
60
 
61
61
  def init_expanded
62
62
  @expandable = !!remote || children.try(:any?)
63
- html_options[:expandable] = @expandable ? '' : nil
63
+ options[:expandable] = @expandable
64
64
 
65
- @expanded = (html_options.delete(:expanded) || false) && expandable && !remote
65
+ @expanded = (options.delete(:expanded) || false) && expandable && !remote
66
66
  @expanded = @expanded.call(item, depth) if @expanded.respond_to?(:call)
67
- html_options[:expanded] = @expanded ? '' : nil
67
+ options[:expanded] = @expanded
68
+ end
69
+
70
+ def init_selectable
71
+ @selectable = @options.delete(:selectable) || false
72
+ @selectable = @selectable.call(item, depth) if @selectable.respond_to?(:call)
73
+ options[:selectable] = @selectable
68
74
  end
69
75
 
70
76
  def render_padding(size = depth)
@@ -87,7 +93,7 @@ module TaoUi
87
93
  end
88
94
  end
89
95
 
90
- def render_children &block
96
+ def render_children(&block)
91
97
  if remote
92
98
  render_children_placeholder
93
99
  else
@@ -95,7 +101,7 @@ module TaoUi
95
101
  selectable: selectable,
96
102
  depth: depth + 1,
97
103
  remote: options[:remote],
98
- expanded: options[:expanded],
104
+ expanded: expanded,
99
105
  children_key: @children_key
100
106
  }, &block
101
107
  end
@@ -103,8 +109,10 @@ module TaoUi
103
109
 
104
110
  def render_children_placeholder
105
111
  view.content_tag 'div', class: 'tao-tree-list' do
106
- view.content_tag 'div', class: 'tao-tree-loading' do
107
- render_padding(depth + 1) + view.tao_icon(:loading, class: 'spin') + t(:loading)
112
+ view.content_tag 'div', class: 'tao-tree-loading tao-tree-item' do
113
+ view.content_tag 'div', class: 'tao-tree-item-content' do
114
+ render_padding(depth + 1) + view.tao_icon(:loading, class: 'spin') + t(:loading)
115
+ end
108
116
  end
109
117
  end
110
118
  end
@@ -8,7 +8,7 @@ module TaoUi
8
8
  super view,options
9
9
  @items = items
10
10
  @children_key = @options.delete(:children_key)
11
- @selectable = @options[:selectable] || false
11
+ @selectable = @options.delete(:selectable)
12
12
  @remote = @options.delete(:remote)
13
13
  @expanded = @options.delete(:expanded)
14
14
  end
data/lib/tao_ui/engine.rb CHANGED
@@ -1,4 +1,3 @@
1
- require 'autoprefixer-rails'
2
1
  require 'tao_on_rails'
3
2
 
4
3
  module TaoUi
@@ -1,3 +1,3 @@
1
1
  module TaoUi
2
- VERSION = '0.3.4'
2
+ VERSION = '1.0.0.beta.1'
3
3
  end
@@ -3,8 +3,8 @@
3
3
  <div class="tao-dialog-content">
4
4
  <%= yield if block_given? %>
5
5
  </div>
6
- <%= link_to 'javascripts:;', class: 'link-close', title: component.t(:close) do %>
7
- <%= tao_icon :close %>
6
+ <%= link_to 'javascript:;', class: 'link-close', title: component.t(:close) do %>
7
+ <%= tao_icon :close_bold %>
8
8
  <% end %>
9
9
  </div>
10
10
  <% end %>
@@ -5,7 +5,7 @@
5
5
  </div>
6
6
  <% unless request.variant.mobile? %>
7
7
  <%= link_to 'javascript:;', class: 'link-close', title: component.t(:close) do %>
8
- <%= tao_icon :close %>
8
+ <%= tao_icon :close_bold %>
9
9
  <% end %>
10
10
  <% end %>
11
11
  </div>
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.3.4
4
+ version: 1.0.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - farthinker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-13 00:00:00.000000000 Z
11
+ date: 2018-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tao_on_rails
@@ -16,28 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.0
19
+ version: 1.0.0.beta.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.10.0
27
- - !ruby/object:Gem::Dependency
28
- name: autoprefixer-rails
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 7.1.1
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 7.1.1
26
+ version: 1.0.0.beta.1
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: sqlite3
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,62 +38,6 @@ dependencies:
52
38
  - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: nokogiri
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 1.8.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 1.8.0
69
- - !ruby/object:Gem::Dependency
70
- name: blade
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 0.7.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 0.7.0
83
- - !ruby/object:Gem::Dependency
84
- name: blade-sauce_labs_plugin
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.7.1
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 0.7.1
97
- - !ruby/object:Gem::Dependency
98
- name: selenium-webdriver
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 3.2.0
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 3.2.0
111
41
  description: UI library based on tao
112
42
  email:
113
43
  - farthinker@gmail.com
@@ -118,91 +48,12 @@ files:
118
48
  - LICENSE
119
49
  - README.md
120
50
  - Rakefile
121
- - config/autoprefixer.yml
122
51
  - config/locales/tao_ui/components/dialog/en.yml
123
52
  - config/locales/tao_ui/components/dialog/zh-CN.yml
124
53
  - config/locales/tao_ui/components/slide_box/en.yml
125
54
  - config/locales/tao_ui/components/slide_box/zh-CN.yml
126
55
  - config/locales/tao_ui/components/tree/en.yml
127
56
  - config/locales/tao_ui/components/tree/zh-CN.yml
128
- - lib/assets/icons/Loading.svg
129
- - lib/assets/icons/close.svg
130
- - lib/assets/javascripts/tao/ui/dialog/confirm.coffee
131
- - lib/assets/javascripts/tao/ui/dialog/element.coffee
132
- - lib/assets/javascripts/tao/ui/dialog/index.coffee
133
- - lib/assets/javascripts/tao/ui/dialog/message.coffee
134
- - lib/assets/javascripts/tao/ui/icons/base.coffee
135
- - lib/assets/javascripts/tao/ui/icons/index.coffee
136
- - lib/assets/javascripts/tao/ui/index.coffee
137
- - lib/assets/javascripts/tao/ui/mobile/index.coffee
138
- - lib/assets/javascripts/tao/ui/mobile/slide_box/element.coffee
139
- - lib/assets/javascripts/tao/ui/mobile/slide_box/index.coffee
140
- - lib/assets/javascripts/tao/ui/popover/confirm.coffee
141
- - lib/assets/javascripts/tao/ui/popover/create.coffee
142
- - lib/assets/javascripts/tao/ui/popover/direction.coffee
143
- - lib/assets/javascripts/tao/ui/popover/element.coffee
144
- - lib/assets/javascripts/tao/ui/popover/index.coffee
145
- - lib/assets/javascripts/tao/ui/popover/position.coffee
146
- - lib/assets/javascripts/tao/ui/shared/slide_box/element/base.coffee
147
- - lib/assets/javascripts/tao/ui/shared/slide_box/export.coffee
148
- - lib/assets/javascripts/tao/ui/shared/ujs.coffee
149
- - lib/assets/javascripts/tao/ui/slide_box/element.coffee
150
- - lib/assets/javascripts/tao/ui/slide_box/index.coffee
151
- - lib/assets/javascripts/tao/ui/sortable.coffee
152
- - lib/assets/javascripts/tao/ui/table/element.coffee
153
- - lib/assets/javascripts/tao/ui/table/expandable.coffee
154
- - lib/assets/javascripts/tao/ui/table/index.coffee
155
- - lib/assets/javascripts/tao/ui/table/selectable.coffee
156
- - lib/assets/javascripts/tao/ui/tooltip.coffee
157
- - lib/assets/javascripts/tao/ui/tree/element.coffee
158
- - lib/assets/javascripts/tao/ui/tree/index.coffee
159
- - lib/assets/javascripts/tao/ui/tree/item.coffee
160
- - lib/assets/stylesheets/tao/ui/_custom.scss
161
- - lib/assets/stylesheets/tao/ui/_globals.scss
162
- - lib/assets/stylesheets/tao/ui/_mixins.scss
163
- - lib/assets/stylesheets/tao/ui/_variables.scss
164
- - lib/assets/stylesheets/tao/ui/basic.scss
165
- - lib/assets/stylesheets/tao/ui/buttons.scss
166
- - lib/assets/stylesheets/tao/ui/code.scss
167
- - lib/assets/stylesheets/tao/ui/dialog.scss
168
- - lib/assets/stylesheets/tao/ui/icons.scss
169
- - lib/assets/stylesheets/tao/ui/index.scss
170
- - lib/assets/stylesheets/tao/ui/mobile/_custom.scss
171
- - lib/assets/stylesheets/tao/ui/mobile/_globals.scss
172
- - lib/assets/stylesheets/tao/ui/mobile/_mixins.scss
173
- - lib/assets/stylesheets/tao/ui/mobile/_variables.scss
174
- - lib/assets/stylesheets/tao/ui/mobile/basic.scss
175
- - lib/assets/stylesheets/tao/ui/mobile/buttons.scss
176
- - lib/assets/stylesheets/tao/ui/mobile/code.scss
177
- - lib/assets/stylesheets/tao/ui/mobile/icons.scss
178
- - lib/assets/stylesheets/tao/ui/mobile/index.scss
179
- - lib/assets/stylesheets/tao/ui/mobile/slide_box.scss
180
- - lib/assets/stylesheets/tao/ui/mobile/tables.scss
181
- - lib/assets/stylesheets/tao/ui/mobile/variables/_base.scss
182
- - lib/assets/stylesheets/tao/ui/mobile/variables/_buttons.scss
183
- - lib/assets/stylesheets/tao/ui/popover.scss
184
- - lib/assets/stylesheets/tao/ui/shared/_basic.scss
185
- - lib/assets/stylesheets/tao/ui/shared/_buttons.scss
186
- - lib/assets/stylesheets/tao/ui/shared/_code.scss
187
- - lib/assets/stylesheets/tao/ui/shared/_icons.scss
188
- - lib/assets/stylesheets/tao/ui/shared/_slide_box.scss
189
- - lib/assets/stylesheets/tao/ui/shared/_tables.scss
190
- - lib/assets/stylesheets/tao/ui/shared/mixins/_base.scss
191
- - lib/assets/stylesheets/tao/ui/shared/mixins/_buttons.scss
192
- - lib/assets/stylesheets/tao/ui/shared/variables/_base.scss
193
- - lib/assets/stylesheets/tao/ui/shared/variables/_buttons.scss
194
- - lib/assets/stylesheets/tao/ui/shared/variables/_tables.scss
195
- - lib/assets/stylesheets/tao/ui/slide_box.scss
196
- - lib/assets/stylesheets/tao/ui/sortable.scss
197
- - lib/assets/stylesheets/tao/ui/tables.scss
198
- - lib/assets/stylesheets/tao/ui/tabs.scss
199
- - lib/assets/stylesheets/tao/ui/tooltip.scss
200
- - lib/assets/stylesheets/tao/ui/tree.scss
201
- - lib/assets/stylesheets/tao/ui/variables/_base.scss
202
- - lib/assets/stylesheets/tao/ui/variables/_tree.scss
203
- - lib/generators/tao/icons/USAGE
204
- - lib/generators/tao/icons/icons_generator.rb
205
- - lib/generators/tao/icons/templates/icons.coffee.erb
206
57
  - lib/tao_ui.rb
207
58
  - lib/tao_ui/action_view/helpers.rb
208
59
  - lib/tao_ui/components/confirm_dialog_component.rb
@@ -231,7 +82,6 @@ files:
231
82
  - lib/views/components/tao_ui/components/_message_dialog.html.erb
232
83
  - lib/views/components/tao_ui/components/_popover.html.erb
233
84
  - lib/views/components/tao_ui/components/_slide_box.html.erb
234
- - vendor/assets/stylesheets/normalize.css
235
85
  homepage: https://github.com/mycolorway/tao_ui
236
86
  licenses:
237
87
  - MIT
@@ -247,12 +97,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
247
97
  version: 2.3.1
248
98
  required_rubygems_version: !ruby/object:Gem::Requirement
249
99
  requirements:
250
- - - ">="
100
+ - - ">"
251
101
  - !ruby/object:Gem::Version
252
- version: '0'
102
+ version: 1.3.1
253
103
  requirements: []
254
104
  rubyforge_project:
255
- rubygems_version: 2.6.11
105
+ rubygems_version: 2.6.14
256
106
  signing_key:
257
107
  specification_version: 4
258
108
  summary: Tao UI
@@ -1,7 +0,0 @@
1
- browsers:
2
- - 'last 5 Chrome versions'
3
- - 'last 5 Firefox versions'
4
- - 'last 5 Edge versions'
5
- - 'last 3 Safari versions'
6
- - 'last 5 iOS versions'
7
- - 'last 5 Android versions'
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
4
- <title>Loading</title>
5
- <desc>Created with Sketch.</desc>
6
- <defs></defs>
7
- <g id="zhiren_icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
- <g id="Main" fill="#4A4A4A">
9
- <rect id="Path" opacity="0.5" x="9" y="0" width="2" height="6" rx="1"></rect>
10
- <rect id="Path" opacity="0.600000024" transform="translate(14.828427, 4.828427) rotate(45.000000) translate(-14.828427, -4.828427) " x="13.8284271" y="1.82842712" width="2" height="6" rx="1"></rect>
11
- <rect id="Path" opacity="0.400000006" transform="translate(4.828427, 4.828427) scale(-1, 1) rotate(45.000000) translate(-4.828427, -4.828427) " x="3.82842712" y="1.82842712" width="2" height="6" rx="1"></rect>
12
- <rect id="Path" opacity="0.200000003" transform="translate(4.828427, 14.828427) rotate(45.000000) translate(-4.828427, -14.828427) " x="3.82842712" y="11.8284271" width="2" height="6" rx="1"></rect>
13
- <rect id="Rectangle-24" opacity="0.300000012" x="0" y="9" width="6" height="2" rx="1"></rect>
14
- <rect id="Rectangle-24" opacity="0.699999988" x="14" y="9" width="6" height="2" rx="1"></rect>
15
- <rect id="Rectangle-24" opacity="0.05" transform="translate(14.828427, 14.828427) rotate(45.000000) translate(-14.828427, -14.828427) " x="11.8284271" y="13.8284271" width="6" height="2" rx="1"></rect>
16
- <rect id="Combined-Shape" opacity="0.100000001" x="9" y="14" width="2" height="6" rx="1"></rect>
17
- </g>
18
- </g>
19
- </svg>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 40.3 (33839) - http://www.bohemiancoding.com/sketch -->
4
- <title>Close</title>
5
- <desc>Created with Sketch.</desc>
6
- <defs></defs>
7
- <g id="zhiren_icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
- <g id="Main" transform="translate(3.000000, 3.000000)" fill="#9B9B9B">
9
- <path d="M8.83832409,8.13223866 L1.06053975,0.354454322 C0.863250778,0.157165345 0.548022825,0.158062608 0.353042717,0.353042717 C0.163764932,0.542320501 0.158694605,0.864780038 0.354454322,1.06053975 L8.13223866,8.83832409 L0.354454322,16.6161084 C0.157165345,16.8133974 0.158062608,17.1286254 0.353042717,17.3236055 C0.542320501,17.5128832 0.864780038,17.5179536 1.06053975,17.3221939 L8.83832409,9.54440952 L16.6161084,17.3221939 C16.8133974,17.5194828 17.1286254,17.5185856 17.3236055,17.3236055 C17.5128832,17.1343277 17.5179536,16.8118681 17.3221939,16.6161084 L9.54440952,8.83832409 L17.3221939,1.06053975 C17.5194828,0.863250778 17.5185856,0.548022825 17.3236055,0.353042717 C17.1343277,0.163764932 16.8118681,0.158694605 16.6161084,0.354454322 L8.83832409,8.13223866 Z" id="Close"></path>
10
- </g>
11
- </g>
12
- </svg>
@@ -1,13 +0,0 @@
1
- class Tao.Dialog.Confirm extends Tao.Dialog.Message
2
-
3
- @tag 'tao-confirm-dialog'
4
-
5
- _bind: ->
6
- super
7
-
8
- @on 'click', '.button-cancel', (e) =>
9
- @namespacedTrigger 'cancel'
10
- @active = false
11
- null
12
-
13
- TaoComponent.register Tao.Dialog.Confirm
@@ -1,115 +0,0 @@
1
- class Tao.Dialog.Element extends TaoComponent
2
-
3
-
4
- @tag 'tao-dialog'
5
-
6
- @attribute 'active', type: 'boolean', observe: true
7
-
8
- @attribute 'modal', 'withCloseButton', 'autoDestroy', 'autoActivate', type: 'boolean'
9
-
10
- @attribute 'closeSelector', default: '.remove-dialog'
11
-
12
- @attribute 'triggerSelector', 'triggerTraversal', 'size'
13
-
14
- _connected: ->
15
- @wrapper = @jq.find('.tao-dialog-wrapper')
16
- @content = @jq.find('.tao-dialog-content')
17
- @triggerEl = if @triggerTraversal && @triggerSelector
18
- @jq[@triggerTraversal]?(@triggerSelector)
19
- else if @triggerSelector
20
- $ @triggerSelector
21
-
22
- @_initSize()
23
- @_bind()
24
-
25
- if @autoActivate
26
- @reflow()
27
- @active = true
28
- else if @active
29
- @_activeChanged()
30
-
31
- _disconnected: ->
32
- @triggerEl?.off ".tao-slide-box-#{@taoId}"
33
- @off()
34
-
35
- _initSize: ->
36
- if _.isNumber(size = parseFloat @size)
37
- @wrapper.width size
38
-
39
- _bind: ->
40
- @on 'click', (e) =>
41
- @active = false if @withCloseButton && e.target == @
42
- null
43
-
44
- @on 'click', ".tao-dialog-wrapper > .link-close, #{@closeSelector}", =>
45
- @active = false
46
- null
47
-
48
- @on 'transitionend', @_afterTransition.bind(@)
49
-
50
- if @triggerEl && @triggerEl.length > 0
51
- @triggerEl.on "click.tao-slide-box-#{@taoId}", (e) =>
52
- @active = true
53
-
54
- _beforeActiveChanged: (active) ->
55
- if active
56
- @_prepareShowTransition()
57
- else
58
- @_prepareHideTransition()
59
- null
60
-
61
- _prepareShowTransition: ->
62
- @namespacedTrigger 'beforeShow'
63
- @content.css
64
- maxHeight: $(window).height() - 40
65
- @jq.show()
66
- @reflow()
67
- @_duringTransition = 'show'
68
-
69
- _prepareHideTransition: ->
70
- @namespacedTrigger 'beforeHide'
71
- if @jq.is(':visible') && @wrapper.css('opacity') * 1 > 0
72
- @_duringTransition = 'hide'
73
- else
74
- @reset()
75
-
76
- _afterTransition: (e) ->
77
- return unless $(e.target).is(@wrapper) && e.originalEvent.propertyName == 'opacity'
78
- if @_duringTransition == 'show'
79
- @namespacedTrigger 'afterShow'
80
- else if @_duringTransition == 'hide'
81
- @reset()
82
- @namespacedTrigger 'afterHide'
83
- @_duringTransition = false
84
- null
85
-
86
- _activeChanged: ->
87
- if @active
88
- $('body').addClass('tao-dialog-active')
89
- @namespacedTrigger 'show'
90
- else
91
- $('body').removeClass('tao-dialog-active')
92
- @namespacedTrigger 'hide'
93
-
94
- setContent: (content) ->
95
- @content.empty().append content
96
- @
97
-
98
- remove: ->
99
- @namespacedTrigger 'beforeRemove'
100
- @jq.remove()
101
- @namespacedTrigger 'remove'
102
- @
103
-
104
- reset: ->
105
- if @autoDestroy
106
- @remove()
107
- else
108
- @jq.hide()
109
- @
110
-
111
- beforeCache: ->
112
- @reset()
113
- active = false
114
-
115
- TaoComponent.register Tao.Dialog.Element
@@ -1,16 +0,0 @@
1
- #= require_self
2
- #= require ./element
3
- #= require ./message
4
- #= require ./confirm
5
-
6
- window.TaoDialog = Tao.Dialog =
7
-
8
- closeAll: ->
9
- $('.tao-dialog').each (i, dialog) ->
10
- dialog.active = false
11
- null
12
-
13
- removeAll: ->
14
- $('.tao-dialog').each (i, dialog) ->
15
- dialog.remove()
16
- null
@@ -1,13 +0,0 @@
1
- class Tao.Dialog.Message extends Tao.Dialog.Element
2
-
3
- @tag 'tao-message-dialog'
4
-
5
- _bind: ->
6
- super
7
-
8
- @on 'click', '.button-confirm', (e) =>
9
- @namespacedTrigger 'confirm'
10
- @active = false
11
- null
12
-
13
- TaoComponent.register Tao.Dialog.Message
@@ -1,5 +0,0 @@
1
- Tao._icons += '''
2
- <symbol id="icon-close" viewBox="0 0 24 24" width="100%" height="100%"><defs/><g class="zhiren_icon" stroke="none" stroke-width="1" fill-rule="evenodd"><g class="Main" transform="translate(3.000000, 3.000000)"><path d="M8.83832409,8.13223866 L1.06053975,0.354454322 C0.863250778,0.157165345 0.548022825,0.158062608 0.353042717,0.353042717 C0.163764932,0.542320501 0.158694605,0.864780038 0.354454322,1.06053975 L8.13223866,8.83832409 L0.354454322,16.6161084 C0.157165345,16.8133974 0.158062608,17.1286254 0.353042717,17.3236055 C0.542320501,17.5128832 0.864780038,17.5179536 1.06053975,17.3221939 L8.83832409,9.54440952 L16.6161084,17.3221939 C16.8133974,17.5194828 17.1286254,17.5185856 17.3236055,17.3236055 C17.5128832,17.1343277 17.5179536,16.8118681 17.3221939,16.6161084 L9.54440952,8.83832409 L17.3221939,1.06053975 C17.5194828,0.863250778 17.5185856,0.548022825 17.3236055,0.353042717 C17.1343277,0.163764932 16.8118681,0.158694605 16.6161084,0.354454322 L8.83832409,8.13223866 Z" class="Close"/></g></g></symbol>
3
- <symbol id="icon-loading" viewBox="0 0 20 20" width="100%" height="100%"><defs/><g class="zhiren_icon" stroke="none" stroke-width="1" fill-rule="evenodd"><g class="Main"><rect class="Path" opacity="0.5" x="9" y="0" width="2" height="6" rx="1"/><rect class="Path" opacity="0.600000024" transform="translate(14.828427, 4.828427) rotate(45.000000) translate(-14.828427, -4.828427) " x="13.8284271" y="1.82842712" width="2" height="6" rx="1"/><rect class="Path" opacity="0.400000006" transform="translate(4.828427, 4.828427) scale(-1, 1) rotate(45.000000) translate(-4.828427, -4.828427) " x="3.82842712" y="1.82842712" width="2" height="6" rx="1"/><rect class="Path" opacity="0.200000003" transform="translate(4.828427, 14.828427) rotate(45.000000) translate(-4.828427, -14.828427) " x="3.82842712" y="11.8284271" width="2" height="6" rx="1"/><rect class="Rectangle-24" opacity="0.300000012" x="0" y="9" width="6" height="2" rx="1"/><rect class="Rectangle-24" opacity="0.699999988" x="14" y="9" width="6" height="2" rx="1"/><rect class="Rectangle-24" opacity="0.05" transform="translate(14.828427, 14.828427) rotate(45.000000) translate(-14.828427, -14.828427) " x="11.8284271" y="13.8284271" width="6" height="2" rx="1"/><rect class="Combined-Shape" opacity="0.100000001" x="9" y="14" width="2" height="6" rx="1"/></g></g></symbol>
4
-
5
- '''
@@ -1,20 +0,0 @@
1
- #= require_self
2
- #= require_tree .
3
-
4
- _.extend Tao,
5
-
6
- _icons: ''
7
-
8
- iconTag: (name, attributes={}) ->
9
- $("<svg><use xlink:href=\"#icon-#{name}\"/></svg>")
10
- .attr attributes
11
- .addClass "icon icon-#{name}"
12
-
13
- Tao.Application.initializer 'icons', (app) ->
14
- app.on 'page-load', (page) ->
15
- return if $('#tao-icons').length > 0
16
- document.body.insertAdjacentHTML 'afterbegin', """
17
- <svg id="tao-icons" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none">
18
- #{Tao._icons}
19
- </svg>
20
- """
@@ -1,12 +0,0 @@
1
- #= require_self
2
- #= require tao/ui/shared/ujs
3
- #= require ./icons
4
- #= require ./table
5
- #= require ./slide_box
6
- #= require ./popover
7
- #= require ./tooltip
8
- #= require ./dialog
9
- #= require ./sortable
10
- #= require ./tree
11
-
12
- window.Tao ||= {}
@@ -1,6 +0,0 @@
1
- #= require_self
2
- #= require tao/ui/shared/ujs
3
- #= require tao/ui/icons
4
- #= require ./slide_box
5
-
6
- window.Tao ||= {}
@@ -1,7 +0,0 @@
1
- #= require tao/ui/shared/slide_box/element/base
2
-
3
- class Tao.SlideBox.Element extends Tao.SlideBox.ElementBase
4
-
5
- _autoHideEvent: 'touchstart'
6
-
7
- TaoComponent.register Tao.SlideBox.Element
@@ -1,2 +0,0 @@
1
- #= require tao/ui/shared/slide_box/export
2
- #= require ./element