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.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +4 -4
  4. data/app/pb_kits/playbook/pb_card/_card.tsx +3 -4
  5. data/app/pb_kits/playbook/pb_collapsible/index.js +1 -6
  6. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +1 -6
  7. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +4 -2
  8. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +50 -70
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -2
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -5
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +4 -11
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +2 -4
  14. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
  15. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -7
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +4 -6
  17. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +15 -142
  18. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +5 -6
  19. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -18
  20. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +218 -228
  21. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
  22. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
  23. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -14
  24. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -7
  25. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -17
  26. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -9
  27. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  28. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  29. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +11 -16
  30. data/app/pb_kits/playbook/pb_icon/_icon.tsx +6 -37
  31. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.html.erb +1 -6
  32. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +5 -21
  33. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -21
  34. data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
  35. data/app/pb_kits/playbook/pb_list/_list_item.tsx +3 -7
  36. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +0 -1
  38. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -3
  39. data/app/pb_kits/playbook/pb_nav/item.html.erb +1 -1
  40. data/app/pb_kits/playbook/pb_nav/item.rb +0 -1
  41. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
  42. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
  43. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -7
  44. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
  45. data/app/pb_kits/playbook/pb_table/table_header.html.erb +2 -16
  46. data/app/pb_kits/playbook/pb_timeline/_item.tsx +10 -11
  47. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +6 -8
  48. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
  49. data/dist/menu.yml +2 -2
  50. data/dist/playbook-rails.js +7 -7
  51. data/lib/playbook/version.rb +2 -2
  52. metadata +5 -22
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +0 -59
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.md +0 -6
  55. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default_swift.md +0 -33
  56. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_props_swift.md +0 -18
  57. data/app/pb_kits/playbook/pb_draggable/context/types.ts +0 -26
  58. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +0 -7
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +0 -9
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +0 -34
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.html.erb +0 -32
  62. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.jsx +0 -48
  63. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -72
  64. data/app/pb_kits/playbook/pb_icon/icon_aliases.json +0 -39
  65. data/app/pb_kits/playbook/pb_icon/types.d.ts +0 -1
  66. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +0 -24
  67. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +0 -11
  68. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +0 -27
  69. 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