playbook_ui 13.30.0.pre.alpha.20240515remotebuildkitconversion3150 → 13.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +4 -4
- data/app/pb_kits/playbook/pb_card/_card.tsx +3 -4
- data/app/pb_kits/playbook/pb_collapsible/index.js +1 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +1 -6
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +4 -2
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +50 -70
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +4 -11
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +2 -4
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -7
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +4 -6
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +15 -142
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +5 -6
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -18
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +218 -228
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -14
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -7
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -17
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +11 -16
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +6 -37
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.html.erb +1 -6
- data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +5 -21
- data/app/pb_kits/playbook/pb_icon/icon.rb +1 -21
- data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
- data/app/pb_kits/playbook/pb_list/_list_item.tsx +3 -7
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +0 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -3
- data/app/pb_kits/playbook/pb_nav/item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_nav/item.rb +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -7
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +2 -16
- data/app/pb_kits/playbook/pb_timeline/_item.tsx +10 -11
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +6 -8
- data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-rails.js +7 -7
- data/lib/playbook/version.rb +2 -2
- metadata +5 -22
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +0 -59
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.md +0 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default_swift.md +0 -33
- data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_props_swift.md +0 -18
- data/app/pb_kits/playbook/pb_draggable/context/types.ts +0 -26
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +0 -7
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +0 -9
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +0 -34
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.html.erb +0 -32
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.jsx +0 -48
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -72
- data/app/pb_kits/playbook/pb_icon/icon_aliases.json +0 -39
- data/app/pb_kits/playbook/pb_icon/types.d.ts +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +0 -24
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +0 -11
- data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +0 -27
- data/app/pb_kits/playbook/pb_overlay/overlay.rb +0 -110
@@ -1,110 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbOverlay
|
5
|
-
class Overlay < Playbook::KitBase
|
6
|
-
prop :color, type: Playbook::Props::Enum,
|
7
|
-
values: %w[card_light bg_light card_dark bg_dark],
|
8
|
-
default: "card_light"
|
9
|
-
prop :layout, type: Playbook::Props::HashProp,
|
10
|
-
default: { "bottom": "full" }
|
11
|
-
|
12
|
-
def classname
|
13
|
-
generate_classname("pb_overlay")
|
14
|
-
end
|
15
|
-
|
16
|
-
def position
|
17
|
-
layout.keys[0]
|
18
|
-
end
|
19
|
-
|
20
|
-
def size
|
21
|
-
layout.values[0]
|
22
|
-
end
|
23
|
-
|
24
|
-
def is_size_percentage
|
25
|
-
size.include?("%")
|
26
|
-
end
|
27
|
-
|
28
|
-
def previous_overlay
|
29
|
-
"linear-gradient(#{previous_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})"
|
30
|
-
end
|
31
|
-
|
32
|
-
def subsequent_overlay
|
33
|
-
"linear-gradient(#{subsequent_overlay_direction}, #{color_map[color.to_sym]} 0%, transparent #{size})"
|
34
|
-
end
|
35
|
-
|
36
|
-
def previous_overlay_class_name
|
37
|
-
"overlay_#{color}_#{previous_overlay_direction_token}_#{size}"
|
38
|
-
end
|
39
|
-
|
40
|
-
def subsequent_overlay_class_name
|
41
|
-
"overlay_#{color}_#{subsequent_overlay_direction_token}_#{size}"
|
42
|
-
end
|
43
|
-
|
44
|
-
def previous_overlay_direction
|
45
|
-
previous_overlay_direction_map[position.to_sym]
|
46
|
-
end
|
47
|
-
|
48
|
-
def subsequent_overlay_direction
|
49
|
-
subsequent_overlay_direction_map[position.to_sym]
|
50
|
-
end
|
51
|
-
|
52
|
-
def previous_overlay_direction_token
|
53
|
-
has_subsequent_overlay ? previous_overlay_direction_map_token[position.to_sym] : position
|
54
|
-
end
|
55
|
-
|
56
|
-
def subsequent_overlay_direction_token
|
57
|
-
has_subsequent_overlay ? subsequent_overlay_direction_map_token[position.to_sym] : position
|
58
|
-
end
|
59
|
-
|
60
|
-
def previous_overlay_direction_map
|
61
|
-
{
|
62
|
-
"bottom": "to top",
|
63
|
-
"top": "to bottom",
|
64
|
-
"left": "to right",
|
65
|
-
"right": "to left",
|
66
|
-
"x": "to right",
|
67
|
-
"y": "to top",
|
68
|
-
}
|
69
|
-
end
|
70
|
-
|
71
|
-
def subsequent_overlay_direction_map
|
72
|
-
{
|
73
|
-
"bottom": "to top",
|
74
|
-
"top": "to bottom",
|
75
|
-
"left": "to right",
|
76
|
-
"right": "to left",
|
77
|
-
"x": "to left",
|
78
|
-
"y": "to bottom",
|
79
|
-
}
|
80
|
-
end
|
81
|
-
|
82
|
-
def previous_overlay_direction_map_token
|
83
|
-
{
|
84
|
-
"x": "left",
|
85
|
-
"y": "top",
|
86
|
-
}
|
87
|
-
end
|
88
|
-
|
89
|
-
def subsequent_overlay_direction_map_token
|
90
|
-
{
|
91
|
-
"x": "right",
|
92
|
-
"y": "bottom",
|
93
|
-
}
|
94
|
-
end
|
95
|
-
|
96
|
-
def has_subsequent_overlay
|
97
|
-
position == "x".to_sym || position == "y".to_sym
|
98
|
-
end
|
99
|
-
|
100
|
-
def color_map
|
101
|
-
{
|
102
|
-
"card_light": "#fff",
|
103
|
-
"bg_light": "#F3F7FB",
|
104
|
-
"card_dark": "#231E3D",
|
105
|
-
"bg_dark": "#0a0527",
|
106
|
-
}
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|