card-mod-bootstrap 0.15.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,17 @@
1
+ remote:
2
+ items:
3
+ - src: https://fonts.googleapis.com/css2?family=Material+Icons #+Round
4
+ # see https://stackoverflow.com/questions/50303454/how-to-use-the-new-material-design-icon-themes-outlined-rounded-two-tone-and
5
+
1
6
  bootstrap_decko:
2
7
  items:
3
8
  - decko_bootstrap.scss
9
+
4
10
  libraries:
5
11
  items:
6
12
  - font_awesome.css
7
- - material_icons.css
13
+ # - material_icons.css
14
+ - bootstrap-icons.css
8
15
  - bootstrap_colorpicker.scss
9
16
  - ../../vendor/bootstrap-colorpicker/src/sass/_colorpicker.scss
10
17
 
@@ -1,36 +1,36 @@
1
- @font-face {
2
- font-family: 'Material Icons';
3
- font-style: normal;
4
- font-weight: 400;
5
- src: url([[/mod/bootstrap/fonts/MaterialIcons-Regular.eot]]); /* For IE6-8 */
6
- src: local('Material Icons'),
7
- local('MaterialIcons-Regular'),
8
- url([[/mod/bootstrap/fonts/MaterialIcons-Regular.woff2]]) format('woff2'),
9
- url([[/mod/bootstrap/fonts/MaterialIcons-Regular.woff]]) format('woff'),
10
- url([[/mod/bootstrap/fonts/MaterialIcons-Regular.ttf]]) format('truetype');
11
- }
1
+ /*@font-face {*/
2
+ /* font-family: 'Material Icons';*/
3
+ /* font-style: normal;*/
4
+ /* font-weight: 400;*/
5
+ /* src: url([[/mod/bootstrap/fonts/MaterialIcons-Regular.eot]]); !* For IE6-8 *!*/
6
+ /* src: local('Material Icons'),*/
7
+ /* local('MaterialIcons-Regular'),*/
8
+ /* url([[/mod/bootstrap/fonts/MaterialIcons-Regular.woff2]]) format('woff2'),*/
9
+ /* url([[/mod/bootstrap/fonts/MaterialIcons-Regular.woff]]) format('woff'),*/
10
+ /* url([[/mod/bootstrap/fonts/MaterialIcons-Regular.ttf]]) format('truetype');*/
11
+ /*}*/
12
12
 
13
- .material-icons {
14
- font-family: 'Material Icons';
15
- font-weight: normal;
16
- font-style: normal;
17
- /*font-size: 24px; !* Preferred icon size *!*/
18
- display: inline-block;
19
- line-height: 1;
20
- text-transform: none;
21
- letter-spacing: normal;
22
- word-wrap: normal;
23
- white-space: nowrap;
24
- direction: ltr;
13
+ /*.material-icons {*/
14
+ /* font-family: 'Material Icons';*/
15
+ /* font-weight: normal;*/
16
+ /* font-style: normal;*/
17
+ /* !*font-size: 24px; !* Preferred icon size *!*!*/
18
+ /* display: inline-block;*/
19
+ /* line-height: 1;*/
20
+ /* text-transform: none;*/
21
+ /* letter-spacing: normal;*/
22
+ /* word-wrap: normal;*/
23
+ /* white-space: nowrap;*/
24
+ /* direction: ltr;*/
25
25
 
26
- /* Support for all WebKit browsers. */
27
- -webkit-font-smoothing: antialiased;
28
- /* Support for Safari and Chrome. */
29
- text-rendering: optimizeLegibility;
26
+ /* !* Support for all WebKit browsers. *!*/
27
+ /* -webkit-font-smoothing: antialiased;*/
28
+ /* !* Support for Safari and Chrome. *!*/
29
+ /* text-rendering: optimizeLegibility;*/
30
30
 
31
- /* Support for Firefox. */
32
- -moz-osx-font-smoothing: grayscale;
31
+ /* !* Support for Firefox. *!*/
32
+ /* -moz-osx-font-smoothing: grayscale;*/
33
33
 
34
- /* Support for IE. */
35
- font-feature-settings: 'liga';
36
- }
34
+ /* !* Support for IE. *!*/
35
+ /* font-feature-settings: 'liga';*/
36
+ /*}*/
@@ -12,7 +12,7 @@ const i=this._directionToOrder(t),n=Ce.findOne(ai,this._element),s=this._getItem
12
12
  // decko_popover.js.coffee
13
13
  (function(){$(window).ready(function(){return $("body").on("show.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover").removeClass("_show-on-hover").addClass("_show-on-hover-disabled")}),$("body").on("hide.bs.popover","._card-menu-popover",function(){return $(this).closest(".card-menu._show-on-hover-disabled").removeClass("_show-on-hover-disabled").addClass("_show-on-hover")})}),decko.slot.ready(function(o){return o.find('[data-tooltip="true"]').tooltip(),o.find('[data-bs-toggle="popover"]').popover({html:!0})})}).call(this);
14
14
  // script_load_select2.js.coffee
15
- (function(){$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(e){return e.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(e){return e.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var t,n,i,c,o;if(0!==e.length){if(e.length>1){for(c=[],t=0,n=e.length;t<n;t++)o=e[t],c.push(decko.initSelect2($(o)));return c}return i={dropdownAutoWidth:"true",containerCssClass:":all:",width:"auto",dropdownParent:e.parent()},e.attr("id",decko.uniqSelect2Id(e.attr("id"))),e.hasClass("tags")&&(i.tags="true"),e.data("placeholder")&&(i.placeholder=e.data("placeholder")),null!=e.data("minimum-results-for-search")&&(i.minimumResultsForSearch=e.data("minimum-results-for-search")),e.select2(i)}},uniqSelect2Id:function(e){return $("[data-select2-id="+e+"]").length>0?decko.uniqSelect2Id(e+"1"):e}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var e;if(""!==(e=$(this).val()))return window.location=decko.path(escape(e))}),$("body").on("select2:select","._submit-on-select",function(e){return $(e.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(e,t){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(e,t),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}})}).call(this);
15
+ (function(){$.fn.select2.defaults.set("theme","bootstrap-5"),decko.slot.ready(function(e){return e.find("select:not(._no-select2):not(._no-select2-init)").each(function(){return decko.initSelect2($(this))})}),decko.slot.destroy(function(e){return e.find("select:not(._no-select2)").each(function(){return $(this).deInitSelect2()})}),$.extend(decko,{initSelect2:function(e){var t,n,i,c,o;if(0!==e.length){if(e.length>1){for(c=[],t=0,n=e.length;t<n;t++)o=e[t],c.push(decko.initSelect2($(o)));return c}return i={dropdownAutoWidth:"true",width:"auto",dropdownParent:e.parent()},e.attr("id",decko.uniqSelect2Id(e.attr("id"))),e.hasClass("tags")&&(i.tags="true"),e.data("placeholder")&&(i.placeholder=e.data("placeholder")),null!=e.data("minimum-results-for-search")&&(i.minimumResultsForSearch=e.data("minimum-results-for-search")),e.select2(i)}},uniqSelect2Id:function(e){return $("[data-select2-id="+e+"]").length>0?decko.uniqSelect2Id(e+"1"):e}}),$(window).ready(function(){return $("body").on("select2:select","._go-to-selected",function(){var e;if(""!==(e=$(this).val()))return window.location=decko.path(escape(e))}),$("body").on("select2:select","._submit-on-select",function(e){return $(e.target).closest("form").submit()})}),$.fn.extend({cloneSelect2:function(e,t){var n,i;return(i=this.is("select")?this:this.find("select")).deInitSelect2(),n=this.clone(e,t),decko.initSelect2(i),n.is("select")?decko.initSelect2(n):decko.initSelect2(n.find("select")),n},deInitSelect2:function(){if(this.attr("data-select2-id"))return this.select2("destroy"),this.removeAttr("data-select2-id"),this.find("option").removeAttr("data-select2-id")}})}).call(this);
16
16
  // bootstrap-colorpicker.min.js
17
17
  /*!
18
18
  * Bootstrap Colorpicker v2.5.2
@@ -0,0 +1,3 @@
1
+ Cardio::Railtie.config.tap do |config|
2
+ config.icon_libraries = [:material]
3
+ end
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  %span.labeled-badge{ class: klass, title: title }
2
+ %label
3
+ = label
2
4
  %span.badge{ class: "bg-#{color}" }
3
5
  = number_with_delimiter count
4
- %label.text-muted
5
- = label
@@ -1,6 +1,6 @@
1
1
  format :html do
2
2
  def accordion &block
3
- wrap_with :div, class: "accordion", &block
3
+ wrap_with :div, class: classy("accordion"), &block
4
4
  end
5
5
 
6
6
  def accordion_item title, **args
@@ -1,5 +1,5 @@
1
1
  .btn-group{ class: opts[:extra_css_class], role: "group" }
2
- %button.btn.btn-outline-secondary.dropdown-toggle{ title: name,
2
+ %button.btn.btn-outline-secondary.dropdown-toggle{ title: (opts[:title] || name),
3
3
  "aria-expanded": "false",
4
4
  "aria-haspopup": "true",
5
5
  "data-bs-toggle": "dropdown" }
@@ -39,7 +39,7 @@ format :html do
39
39
  end
40
40
 
41
41
  def popover_link text, title=nil, link_text=nil, opts={}
42
- link_text ||= fa_icon "question-circle"
42
+ link_text ||= icon_tag :help
43
43
  link_to link_text, popover_opts(text, title, opts)
44
44
  end
45
45
 
@@ -1,114 +1,138 @@
1
+ basket[:icons] = {
2
+ material: {
3
+ plus: :add,
4
+ pencil: :edit,
5
+ trash: :delete,
6
+ new_window: :open_in_new,
7
+ history: :history,
8
+ collapse: :expand_less,
9
+ expand: :expand_more,
10
+ flag: :flag,
11
+ remove: :close,
12
+ close: :close,
13
+ board: :space_dashboard,
14
+ warning: :warning,
15
+ unknown: :add_box,
16
+ help: :help,
17
+ modal: :fullscreen,
18
+ reorder: :reorder,
19
+ create_action: :add_circle,
20
+ update_action: :edit,
21
+ delete_action: :remove_circle,
22
+ draft: :build,
23
+ next: :chevron_right,
24
+ previous: :chevron_left,
25
+ forward: :arrow_forward,
26
+ back: :arrow_back,
27
+ list: :list,
28
+ search: :search,
29
+ filter: :filter_alt,
30
+ quick_filter: :bolt,
31
+ reset: :restart_alt
32
+ },
33
+ #
34
+ font_awesome: {
35
+ plus: :plus,
36
+ pencil: :pencil,
37
+ trash: :trash,
38
+ new_window: "external-link-square-alt",
39
+ close: :times,
40
+ remove: :times,
41
+ board: "table-columns",
42
+ reorder: "align-justify",
43
+ history: :clock,
44
+ warning: "exclamation-circle",
45
+ unknown: "plus-square",
46
+ help: "question-circle",
47
+ modal: :expand,
48
+ next: "arrow-right",
49
+ previous: "arrow-left",
50
+ create_action: "circle-plus",
51
+ update_action: :edit,
52
+ delete_action: "circle-minus",
53
+ flag: :flag,
54
+ collapse: "chevron-up",
55
+ expand: "chevron-down",
56
+ list: :list,
57
+ search: "magnifying-glass",
58
+ draft: :wrench,
59
+ filter: :filter,
60
+ reset: "sync-alt",
61
+ quick_filter: :bolt
62
+ },
63
+ #
64
+ bootstrap: {
65
+ plus: "plus-lg",
66
+ pencil: "pencil-fill",
67
+ trash: "trash-fill",
68
+ new_window: "box-arrow-up-right",
69
+ history: :clock,
70
+ collapse: "chevron-up",
71
+ expand: "chevron-down",
72
+ flag: "flag-fill",
73
+ reorder: "grip-horizontal"
74
+ }
75
+ }
76
+
1
77
  format :html do
2
- # same for all:
3
- # :search,
4
- ICON_MAP = {
5
- material: {
6
- plus: :add,
7
- pencil: :edit,
8
- trash: :delete,
9
- wrench: :build,
10
- new_window: :open_in_new,
11
- history: :history,
12
- triangle_left: :expand_less,
13
- triangle_right: :expand_more,
14
- flag: :flag,
15
- option_horizontal: :more_horiz,
16
- option_vertical: :more_vert,
17
- pushpin: :pin_drop,
18
- baby_formula: :device_hub,
19
- log_out: :call_made,
20
- log_in: :call_received,
21
- explore: :explore,
22
- remove: :close,
23
- expand: :expand_more,
24
- collapse_down: :expand_less,
25
- globe: :public,
26
- commenting: :comment
27
- },
28
- font_awesome: {
29
- option_horizontal: :ellipsis_h,
30
- pushpin: "thumb-tack",
31
- globe: :globe,
32
- zoom_out: "search-minus",
33
- close: :times,
34
- check_circle: "check-circle",
35
- reorder: "align-justify",
36
- commenting: :comments
37
- },
38
- glyphicon: {
39
- option_horizontal: "option-horizontal",
40
- option_vertical: "option-vertical",
41
- triangle_left: "triangle-left",
42
- triangle_right: "triangle-right",
43
- baby_formula: "baby-formula",
44
- log_out: "log-out",
45
- log_in: "log-in",
46
- collapse_down: "collapse-down",
47
- globe: :globe,
48
- zoom_out: "zoom-out",
49
- close: :remove,
50
- new_window: "new-window",
51
- history: :time,
52
- check_circle: "ok-sign",
53
- reorder: "align-justify"
54
- }
78
+ view :icons, template: :haml
55
79
 
56
- }.freeze
80
+ def icon_tag icon_key, opts={}
81
+ return "" unless icon_key.present?
57
82
 
58
- def icon_class library, icon
59
- ICON_MAP[library][icon] || icon
83
+ library, icon = icon_lookup icon_key
84
+ with_icon_tag_opts(opts) do |tag_opts|
85
+ universal_icon_tag library, icon, tag_opts
86
+ end
60
87
  end
61
88
 
62
- def material_icon icon, opts={}
63
- universal_icon_tag icon, :material, opts
89
+ def icon_libraries
90
+ @icon_libraries ||= Cardio.config.icon_libraries
64
91
  end
65
92
 
66
- def glyphicon icon, opts={}
67
- universal_icon_tag icon, :glyphicon, opts
93
+ def glyphicon_icon_tag icon, opts={}
94
+ prepend_class opts, "glyphicon glyphicon-#{icon}"
95
+ wrap_with :span, "", opts.merge("aria-hidden": true)
68
96
  end
69
97
 
70
- def fa_icon icon, opts={}
71
- universal_icon_tag icon, :font_awesome, opts
98
+ def font_awesome_icon_tag icon, opts={}
99
+ prepend_class opts, "fa#{'b' if opts.delete :brand} fa-#{icon}"
100
+ wrap_with :i, "", opts
72
101
  end
73
102
 
74
- def icon_tag icon, opts={}
75
- with_icon_tag_opts(opts) do |tag_opts|
76
- library = tag_opts.delete(:library) || default_icon_library
77
- universal_icon_tag icon, library, tag_opts
78
- end
103
+ def material_icon_tag icon, opts={}
104
+ add_class opts, "material-icons"
105
+ wrap_with :i, icon, opts
79
106
  end
80
107
 
81
- def universal_icon_tag icon, icon_library=default_icon_library, opts={}
82
- return "" unless icon.present?
108
+ def bootstrap_icon_tag icon, opts={}
109
+ prepend_class opts, "bi-#{icon}"
110
+ wrap_with :i, "", opts
111
+ end
83
112
 
113
+ def universal_icon_tag library, icon, opts={}
84
114
  with_icon_tag_opts(opts) do |tag_opts|
85
- send "#{icon_library}_icon_tag", icon, tag_opts
115
+ send "#{library}_icon_tag", icon, tag_opts
86
116
  end
87
117
  end
88
118
 
89
- def default_icon_library
90
- :material
119
+ def all_icon_keys
120
+ basket[:icons].values.map(&:keys).flatten.uniq
91
121
  end
92
122
 
93
- def glyphicon_icon_tag icon, opts={}
94
- prepend_class opts, "glyphicon glyphicon-#{icon_class(:glyphicon, icon)}"
95
- wrap_with :span, "", opts.merge("aria-hidden": true)
96
- end
123
+ private
97
124
 
98
- def font_awesome_icon_tag icon, opts={}
125
+ def icon_lookup icon
126
+ icon = icon.to_sym
99
127
 
100
- prepend_class opts,
101
- "fa#{'b' if opts.delete :brand} fa-#{icon_class(:font_awesome, icon)}"
102
- wrap_with :i, "", opts
103
- end
128
+ icon_libraries.each do |library|
129
+ found_icon = basket[:icons][library][icon]
130
+ return [library, found_icon] if found_icon
131
+ end
104
132
 
105
- def material_icon_tag icon, opts={}
106
- add_class opts, "material-icons"
107
- wrap_with :i, icon_class(:material, icon), opts
133
+ [icon_libraries.last, icon]
108
134
  end
109
135
 
110
- private
111
-
112
136
  def with_icon_tag_opts opts={}
113
137
  opts = { class: opts } unless opts.is_a? Hash
114
138
  yield opts
@@ -0,0 +1,18 @@
1
+ - libraries = basket[:icons].keys
2
+ %table
3
+ %tr
4
+ %th lookup key
5
+ - libraries.map do |library|
6
+ %th
7
+ = library
8
+ - all_icon_keys.each do |icon_key|
9
+ %tr
10
+ %td
11
+ = icon_key
12
+ - libraries.each do |library|
13
+ %td
14
+ - if (mapping = basket[:icons][library][icon_key])
15
+ = send "#{library}_icon_tag", mapping
16
+ = mapping
17
+ - else
18
+ &nbsp;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-01-04 00:00:00.000000000 Z
13
+ date: 2023-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,70 +18,70 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.0
21
+ version: 1.105.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.0
28
+ version: 1.105.1
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: card-mod-edit
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.15.0
35
+ version: 0.15.1
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.15.0
42
+ version: 0.15.1
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: card-mod-bar_and_box
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - '='
48
48
  - !ruby/object:Gem::Version
49
- version: 0.15.0
49
+ version: 0.15.1
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - '='
55
55
  - !ruby/object:Gem::Version
56
- version: 0.15.0
56
+ version: 0.15.1
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: card-mod-style
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.15.0
63
+ version: 0.15.1
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.15.0
70
+ version: 0.15.1
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: card-mod-script
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - '='
76
76
  - !ruby/object:Gem::Version
77
- version: 0.15.0
77
+ version: 0.15.1
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - '='
83
83
  - !ruby/object:Gem::Version
84
- version: 0.15.0
84
+ version: 0.15.1
85
85
  description: ''
86
86
  email:
87
87
  - info@decko.org
@@ -94,11 +94,14 @@ files:
94
94
  - assets/script/manifest.yml
95
95
  - assets/script/script_colorpicker.js.coffee
96
96
  - assets/script/script_load_select2.js.coffee
97
+ - assets/style/bootstrap-icons.css
97
98
  - assets/style/bootstrap_colorpicker.scss
98
99
  - assets/style/decko_bootstrap.scss
99
100
  - assets/style/font_awesome.css
100
101
  - assets/style/manifest.yml
101
102
  - assets/style/material_icons.css
103
+ - config/locales/de.yml
104
+ - config/locales/en.yml
102
105
  - data/files/cerulean_skin_image/image-icon.png
103
106
  - data/files/cerulean_skin_image/image-large.png
104
107
  - data/files/cerulean_skin_image/image-medium.png
@@ -244,14 +247,9 @@ files:
244
247
  - lib/card/bootstrap/old_component.rb
245
248
  - lib/card/bootstrap/tag_method.rb
246
249
  - lib/card/bootstrapper.rb
247
- - locales/de.yml
248
- - locales/en.yml
249
- - public/fonts/MaterialIcons-Regular.eot
250
- - public/fonts/MaterialIcons-Regular.ijmap
251
- - public/fonts/MaterialIcons-Regular.svg
252
- - public/fonts/MaterialIcons-Regular.ttf
253
- - public/fonts/MaterialIcons-Regular.woff
254
- - public/fonts/MaterialIcons-Regular.woff2
250
+ - lib/card/mod/bootstrap.rb
251
+ - public/fonts/bootstrap-icons.woff
252
+ - public/fonts/bootstrap-icons.woff2
255
253
  - public/fonts/fa-brands-400.eot
256
254
  - public/fonts/fa-brands-400.svg
257
255
  - public/fonts/fa-brands-400.ttf
@@ -287,6 +285,7 @@ files:
287
285
  - set/all/bootstrap/form.rb
288
286
  - set/all/bootstrap/helper.rb
289
287
  - set/all/bootstrap/icon.rb
288
+ - set/all/bootstrap/icons.haml
290
289
  - set/all/bootstrap/navbar.rb
291
290
  - set/all/bootstrap/navbar/navbar_responsive.haml
292
291
  - set/all/bootstrap/table.rb
Binary file