playbook_ui 13.18.0.pre.alpha.PLAY8672199 → 13.18.0.pre.alpha.PLAY12062177
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_filter/Filter/FiltersPopover.tsx +4 -2
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +4 -4
- data/app/pb_kits/playbook/pb_filter/filter.rb +25 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +0 -4
- data/app/pb_kits/playbook/pb_form_group/form_group.rb +1 -5
- data/lib/playbook/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a740b3ef475875baabe4286f70025efcc3bf6a921b6232814b4abc5a3b952cf8
|
4
|
+
data.tar.gz: eab607b01ab71bdf312d0ccd9b92ff9a54ddf688657e58ada68c545046532a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afeee437dc320d7042b28d061c94a4821037b0af4862aa7ba56ebcaa474c0bba3c2ac52df0cbe96d47d6a6b90bdb7b346aab99653ed46ec226064998670f812b
|
7
|
+
data.tar.gz: bf328b19bef5e5725cbaae856699127d715a75f74ae151eef2c68b135c3d56b92ac79ab89cfe3ca4b4745660b7528c7cfd0dfb53c774d3275986440b6ebc75fd
|
@@ -3,13 +3,14 @@ import React, { ReactNode, useState } from 'react'
|
|
3
3
|
import CircleIconButton from '../../pb_circle_icon_button/_circle_icon_button'
|
4
4
|
import PbReactPopover from '../../pb_popover/_popover'
|
5
5
|
|
6
|
-
type FiltersPopoverProps = {
|
6
|
+
type FiltersPopoverProps = {
|
7
7
|
children?: React.ReactChild[] | React.ReactChild | (({closePopover}: {closePopover: () => void}) => ReactNode),
|
8
8
|
dark?: boolean,
|
9
|
+
maxHeight?: string,
|
9
10
|
minWidth?: string,
|
10
11
|
placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end",
|
11
12
|
}
|
12
|
-
const FiltersPopover = ({ children, dark, minWidth, placement = "bottom-start" }: FiltersPopoverProps): React.ReactElement => {
|
13
|
+
const FiltersPopover = ({ children, dark, maxHeight, minWidth, placement = "bottom-start" }: FiltersPopoverProps): React.ReactElement => {
|
13
14
|
const [hide, updateHide] = useState(true)
|
14
15
|
const toggle = () => updateHide(!hide)
|
15
16
|
|
@@ -26,6 +27,7 @@ const FiltersPopover = ({ children, dark, minWidth, placement = "bottom-start" }
|
|
26
27
|
return (
|
27
28
|
<PbReactPopover
|
28
29
|
closeOnClick="outside"
|
30
|
+
maxHeight={maxHeight}
|
29
31
|
minWidth={minWidth}
|
30
32
|
placement={placement}
|
31
33
|
reference={filterButton}
|
@@ -69,14 +69,14 @@
|
|
69
69
|
<% end %>
|
70
70
|
<% end %>
|
71
71
|
|
72
|
-
<% if object.template != "sort_only"%>
|
73
|
-
<%= pb_rails("popover", props:
|
72
|
+
<% if object.template != "sort_only" %>
|
73
|
+
<%= pb_rails("popover", props: object.popover_props) do %>
|
74
74
|
<%= content %>
|
75
75
|
<% end %>
|
76
76
|
<%end%>
|
77
77
|
|
78
|
-
<% if object.template != "filter_only"%>
|
79
|
-
<%= pb_rails("popover", props:
|
78
|
+
<% if object.template != "filter_only" %>
|
79
|
+
<%= pb_rails("popover", props: object.popover_props) do %>
|
80
80
|
<%= pb_rails("list") do %>
|
81
81
|
<% object.sort_menu.each do |item| %>
|
82
82
|
<%= pb_rails("list/item") do%> <%= pb_rails("button", props: {variant: "link" ,classname: "p-0", text: item[:item], link: item[:link]}) %><% end %>
|
@@ -10,6 +10,7 @@ module Playbook
|
|
10
10
|
values: %w[default single filter_only sort_only],
|
11
11
|
default: "default"
|
12
12
|
prop :background, type: Playbook::Props::Boolean, default: true
|
13
|
+
prop :max_height
|
13
14
|
prop :min_width, default: "auto"
|
14
15
|
prop :placement, type: Playbook::Props::Enum,
|
15
16
|
values: %w[top bottom left right top-start top-end bottom-start bottom-end right-start right-end left-start left-end],
|
@@ -31,7 +32,7 @@ module Playbook
|
|
31
32
|
end
|
32
33
|
|
33
34
|
def wrapper(&block)
|
34
|
-
if
|
35
|
+
if background
|
35
36
|
pb_rails("card", props: { padding: "none" }, &block)
|
36
37
|
else
|
37
38
|
capture(&block)
|
@@ -48,6 +49,29 @@ module Playbook
|
|
48
49
|
""
|
49
50
|
end
|
50
51
|
end
|
52
|
+
|
53
|
+
def popover_props
|
54
|
+
if template != "sort_only"
|
55
|
+
{
|
56
|
+
max_height: max_height,
|
57
|
+
min_width: min_width,
|
58
|
+
close_on_click: "outside",
|
59
|
+
trigger_element_id: "filter#{id}",
|
60
|
+
tooltip_id: "filter-form#{id}",
|
61
|
+
position: placement,
|
62
|
+
}
|
63
|
+
elsif template != "filter_only"
|
64
|
+
{
|
65
|
+
max_height: max_height,
|
66
|
+
classname: "pb_filter_sort_menu",
|
67
|
+
close_on_click: "outside",
|
68
|
+
trigger_element_id: "sort-button#{id}",
|
69
|
+
tooltip_id: "sort-filter-btn-tooltip#{id}",
|
70
|
+
position: placement,
|
71
|
+
padding: "none",
|
72
|
+
}
|
73
|
+
end
|
74
|
+
end
|
51
75
|
end
|
52
76
|
end
|
53
77
|
end
|
@@ -57,10 +57,6 @@
|
|
57
57
|
margin-bottom: 16px;
|
58
58
|
}
|
59
59
|
|
60
|
-
&[class*=rails] > [class^=pb_date_picker_kit] {
|
61
|
-
margin-bottom: 0px;
|
62
|
-
}
|
63
|
-
|
64
60
|
& > [class^=pb_date_picker_kit]:not(:last-child) {
|
65
61
|
.text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .flatpickr-wrapper {
|
66
62
|
border-bottom-right-radius: 0;
|
@@ -7,7 +7,7 @@ module Playbook
|
|
7
7
|
default: false
|
8
8
|
|
9
9
|
def classname
|
10
|
-
generate_classname("pb_form_group_kit", full_width_class)
|
10
|
+
generate_classname("pb_form_group_kit", full_width_class)
|
11
11
|
end
|
12
12
|
|
13
13
|
private
|
@@ -15,10 +15,6 @@ module Playbook
|
|
15
15
|
def full_width_class
|
16
16
|
full_width ? "full" : nil
|
17
17
|
end
|
18
|
-
|
19
|
-
def form_group_rails
|
20
|
-
" rails"
|
21
|
-
end
|
22
18
|
end
|
23
19
|
end
|
24
20
|
end
|
data/lib/playbook/version.rb
CHANGED
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: 13.18.0.pre.alpha.
|
4
|
+
version: 13.18.0.pre.alpha.PLAY12062177
|
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: 2024-02-
|
12
|
+
date: 2024-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|