playbook_ui 12.31.0.pre.alpha.hoverrails951 → 12.31.0.pre.alpha.multilevelnopillsdesigns941

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,8 +32,6 @@ module Playbook
32
32
  flex_shrink_props,
33
33
  order_props,
34
34
  position_props,
35
- hover_props,
36
- border_radius_props,
37
35
  ].compact.join(" ")
38
36
  end
39
37
 
@@ -20,8 +20,6 @@ require "playbook/flex_grow"
20
20
  require "playbook/flex_shrink"
21
21
  require "playbook/order"
22
22
  require "playbook/position"
23
- require "playbook/hover"
24
- require "playbook/border_radius"
25
23
 
26
24
  module Playbook
27
25
  class KitBase < ViewComponent::Base
@@ -47,8 +45,6 @@ module Playbook
47
45
  include Playbook::FlexShrink
48
46
  include Playbook::Order
49
47
  include Playbook::Position
50
- include Playbook::Hover
51
- include Playbook::BorderRadius
52
48
 
53
49
  prop :id
54
50
  prop :data, type: Playbook::Props::Hash, default: {}
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "12.31.0"
5
- VERSION = "12.31.0.pre.alpha.hoverrails951"
5
+ VERSION = "12.31.0.pre.alpha.multilevelnopillsdesigns941"
6
6
  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: 12.31.0.pre.alpha.hoverrails951
4
+ version: 12.31.0.pre.alpha.multilevelnopillsdesigns941
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: 2023-07-18 00:00:00.000000000 Z
12
+ date: 2023-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -429,7 +429,6 @@ files:
429
429
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.html.erb
430
430
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.jsx
431
431
  - app/pb_kits/playbook/pb_button/docs/_button_full_width.md
432
- - app/pb_kits/playbook/pb_button/docs/_button_hover.html.erb
433
432
  - app/pb_kits/playbook/pb_button/docs/_button_hover.jsx
434
433
  - app/pb_kits/playbook/pb_button/docs/_button_icon_options.html.erb
435
434
  - app/pb_kits/playbook/pb_button/docs/_button_icon_options.jsx
@@ -1440,7 +1439,6 @@ files:
1440
1439
  - app/pb_kits/playbook/pb_message/docs/_message_default.html.erb
1441
1440
  - app/pb_kits/playbook/pb_message/docs/_message_default.jsx
1442
1441
  - app/pb_kits/playbook/pb_message/docs/_message_default.md
1443
- - app/pb_kits/playbook/pb_message/docs/_message_hover.html.erb
1444
1442
  - app/pb_kits/playbook/pb_message/docs/_message_hover.jsx
1445
1443
  - app/pb_kits/playbook/pb_message/docs/_message_timestamp.html.erb
1446
1444
  - app/pb_kits/playbook/pb_message/docs/_message_timestamp.jsx
@@ -2483,7 +2481,6 @@ files:
2483
2481
  - lib/playbook/align_content.rb
2484
2482
  - lib/playbook/align_items.rb
2485
2483
  - lib/playbook/align_self.rb
2486
- - lib/playbook/border_radius.rb
2487
2484
  - lib/playbook/classnames.rb
2488
2485
  - lib/playbook/cursor.rb
2489
2486
  - lib/playbook/display.rb
@@ -2504,7 +2501,6 @@ files:
2504
2501
  - lib/playbook/forms/builder/multi_level_select_field.rb
2505
2502
  - lib/playbook/forms/builder/select_field.rb
2506
2503
  - lib/playbook/forms/builder/typeahead_field.rb
2507
- - lib/playbook/hover.rb
2508
2504
  - lib/playbook/justify_content.rb
2509
2505
  - lib/playbook/justify_self.rb
2510
2506
  - lib/playbook/kit_base.rb
@@ -1,3 +0,0 @@
1
- <%= pb_rails("button", props: { hover: { shadow: "deep"}, text: "Shadow Deep", margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { hover: { shadow: "deeper"}, text: "Shadow Deeper", margin_right: "lg" }) %>
3
- <%= pb_rails("button", props: { hover: { shadow: "deepest"}, text: "Shadow Deepest", margin_right: "lg" }) %>
@@ -1,25 +0,0 @@
1
- <%= pb_rails("message", props: {
2
- avatar_name: "Mike Bishop",
3
- avatar_status: "online",
4
- avatar_url: "https://randomuser.me/api/portraits/men/50.jpg",
5
- border_radius: "rounded",
6
- hover: { background: "success_subtle" },
7
- label: "Anna Black",
8
- message: "How can we assist you today?",
9
- padding: "xs",
10
- }) %>
11
-
12
- <br><br>
13
-
14
- <%= pb_rails("message", props: {
15
- align_timestamp: "left",
16
- avatar_name: "Lucille Sanchez",
17
- avatar_url: "https://randomuser.me/api/portraits/women/50.jpg",
18
- border_radius: "rounded",
19
- hover: { shadow: "deepest" },
20
- label: "Becca Jacobs",
21
- message: "Application for Kate Smith is waiting for your approval",
22
- padding: "xs",
23
- }) %>
24
-
25
- <br><br>
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module BorderRadius
5
- def self.included(base)
6
- base.prop :border_radius
7
- end
8
-
9
- def border_radius_props
10
- selected_props = border_radius_options.keys.select { |sk| try(sk) }
11
- return nil unless selected_props.present?
12
-
13
- selected_props.map do |k|
14
- border_radius_value = send(k)
15
- "border_radius_#{border_radius_value}" if border_radius_values.include? border_radius_value
16
- end.compact.join(" ")
17
- end
18
-
19
- def border_radius_options
20
- {
21
- border_radius: "border_radius",
22
- }
23
- end
24
-
25
- def border_radius_values
26
- %w[none xs sm md lg xl rounded]
27
- end
28
- end
29
- end
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module Hover
5
- def self.included(base)
6
- base.prop :hover
7
- end
8
-
9
- def hover_options
10
- {
11
- hover: "hover",
12
- }
13
- end
14
-
15
- def hover_shadow_values
16
- %w[deep deeper deepest]
17
- end
18
-
19
- def hover_scale_values
20
- %w[sm md lg]
21
- end
22
-
23
- def hover_background_values
24
- []
25
- end
26
-
27
- def hover_values
28
- hover_options.keys.select { |sk| try(sk) }
29
- end
30
-
31
- def hover_attributes
32
- %w[background shadow scale]
33
- end
34
-
35
- def hover_props
36
- selected_props = hover_options.keys.select { |sk| try(sk) }
37
- return nil unless selected_props.present?
38
-
39
- responsive = selected_props.present? && try(selected_props.first).is_a?(::Hash)
40
- css = ""
41
- selected_props.each do |prop|
42
- value = send(prop)
43
- prefix = hover_options[prop]
44
- if responsive
45
- value.each do |key, val|
46
- if key == :background
47
- css += "#{prefix}_#{key}_#{val} " if hover_attributes.include?(key.to_s)
48
- elsif hover_attributes.include?(key.to_s) && send("hover_#{key}_values").include?(val.to_s)
49
- css += "#{prefix}_#{key}_#{val} "
50
- end
51
- end
52
- elsif send("hover_#{prop}_values").include?(value)
53
- css += "#{prefix}_#{value} "
54
- end
55
- end
56
-
57
- css.strip unless css.blank?
58
- end
59
- end
60
- end