playbook_ui_docs 15.7.0.pre.rc.2 → 15.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +23 -14
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +71 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +57 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +7 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +19 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +12 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +26 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +19 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +30 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +3 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +29 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +13 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +3 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
- metadata +15 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 785d6561b9499279ffa5a3f2aab38571a743962d2de8f66b12b6d9beaecc60c4
|
|
4
|
+
data.tar.gz: 6875304ffd91afc147369b6de418c7ed668ae28b974bc6ac2adef136f71401ae
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff2ccd9f01c25491c8fb94b20cde950c1fdbbcb45d80f2ff56886d355182d1d5a43478683e9a549fd643d4af35d6bacbb08c8e1b3834d3d0961b52278fbe67b6
|
|
7
|
+
data.tar.gz: f3085b98700a563fa2a73152fa9b484e4ef85297dddc7aeea46fab8c8b0d598cb1a2a888c4138e44d041ea9c6b4ca034788708753217a27259d228cf2505d5b3
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
<%= pb_rails("
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
controls_start_id: "
|
|
1
|
+
<%= pb_rails("dropdown", props: {
|
|
2
|
+
id: "dropdown-quickpick-with-date-pickers-1",
|
|
3
|
+
label: "Date Range",
|
|
4
|
+
name: "date_range",
|
|
5
|
+
margin_bottom: "sm",
|
|
6
|
+
variant: "quickpick",
|
|
7
|
+
controls_start_id: "start-date-picker-1",
|
|
8
|
+
controls_end_id: "end-date-picker-1",
|
|
9
|
+
start_date_id: "quickpick_start_date_1",
|
|
10
|
+
start_date_name: "start_date",
|
|
11
|
+
end_date_id: "quickpick_end_date_1",
|
|
12
|
+
end_date_name: "end_date"
|
|
8
13
|
}) %>
|
|
9
14
|
|
|
10
15
|
<%= pb_rails("date_picker", props: {
|
|
11
|
-
picker_id: "
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
picker_id: "start-date-picker-1",
|
|
17
|
+
label: "Start Date",
|
|
18
|
+
name: "start_date_picker",
|
|
19
|
+
placeholder: "Select Start Date",
|
|
20
|
+
sync_start_with: "dropdown-quickpick-with-date-pickers-1"
|
|
14
21
|
}) %>
|
|
15
22
|
|
|
16
23
|
<%= pb_rails("date_picker", props: {
|
|
17
|
-
picker_id: "
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
24
|
+
picker_id: "end-date-picker-1",
|
|
25
|
+
label: "End Date",
|
|
26
|
+
name: "end_date_picker",
|
|
27
|
+
placeholder: "Select End Date",
|
|
28
|
+
sync_end_with: "dropdown-quickpick-with-date-pickers-1"
|
|
29
|
+
}) %>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
You can link a Quickpick
|
|
1
|
+
You can link a Quickpick Dropdown to standard DatePickers using the following props:
|
|
2
2
|
|
|
3
3
|
**For the Quickpick DatePicker**:
|
|
4
4
|
`controls_start_id`: ID of the DatePicker that should receive the start date.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<%
|
|
2
|
+
typeahead_options = [
|
|
3
|
+
{
|
|
4
|
+
label: "United States",
|
|
5
|
+
value: "unitedStates",
|
|
6
|
+
id: "us"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
label: "United Kingdom",
|
|
10
|
+
value: "unitedKingdom",
|
|
11
|
+
id: "gb"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
label: "Canada",
|
|
15
|
+
value: "canada",
|
|
16
|
+
id: "ca"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Australia",
|
|
20
|
+
value: "australia",
|
|
21
|
+
id: "au"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Germany",
|
|
25
|
+
value: "germany",
|
|
26
|
+
id: "de"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "France",
|
|
30
|
+
value: "france",
|
|
31
|
+
id: "fr"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: "Japan",
|
|
35
|
+
value: "japan",
|
|
36
|
+
id: "jp"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: "Brazil",
|
|
40
|
+
value: "brazil",
|
|
41
|
+
id: "br"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
%>
|
|
45
|
+
|
|
46
|
+
<%= pb_rails("button", props: { text: "Open Dialog with Overflow Visible", data: {"open-dialog": "dialog-overflow-visible"} }) %>
|
|
47
|
+
|
|
48
|
+
<%= pb_rails("dialog", props: {
|
|
49
|
+
id: "dialog-overflow-visible",
|
|
50
|
+
size: "md",
|
|
51
|
+
overflow: "visible"
|
|
52
|
+
}) do %>
|
|
53
|
+
<%= pb_rails("dialog/dialog_header", props: { id: "dialog-overflow-visible" } ) do %>
|
|
54
|
+
<%= pb_rails("body", props: { text: "Select Location" }) %>
|
|
55
|
+
<% end %>
|
|
56
|
+
<%= pb_rails("dialog/dialog_body") do %>
|
|
57
|
+
<%= pb_rails("typeahead", props: {
|
|
58
|
+
options: typeahead_options,
|
|
59
|
+
placeholder: "Select a location...",
|
|
60
|
+
id: "location-typeahead",
|
|
61
|
+
is_multi: false,
|
|
62
|
+
}) %>
|
|
63
|
+
<% end %>
|
|
64
|
+
<%= pb_rails("dialog/dialog_footer", props: {
|
|
65
|
+
cancel_button: "Cancel",
|
|
66
|
+
confirm_button: "Save",
|
|
67
|
+
confirm_button_id: "confirm-overflow-visible",
|
|
68
|
+
id: "dialog-overflow-visible"
|
|
69
|
+
}) %>
|
|
70
|
+
<% end %>
|
|
71
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Body from '../../pb_body/_body'
|
|
4
|
+
import Button from '../../pb_button/_button'
|
|
5
|
+
import Dialog from '../../pb_dialog/_dialog'
|
|
6
|
+
import Typeahead from '../../pb_typeahead/_typeahead'
|
|
7
|
+
|
|
8
|
+
const DialogOverflowVisible = () => {
|
|
9
|
+
const [isOpen, setIsOpen] = useState(false)
|
|
10
|
+
const close = () => setIsOpen(false)
|
|
11
|
+
const open = () => setIsOpen(true)
|
|
12
|
+
|
|
13
|
+
const typeaheadOptions = [
|
|
14
|
+
{ label: "United States", value: "unitedStates", id: "us" },
|
|
15
|
+
{ label: "United Kingdom", value: "unitedKingdom", id: "gb" },
|
|
16
|
+
{ label: "Canada", value: "canada", id: "ca" },
|
|
17
|
+
{ label: "Australia", value: "australia", id: "au" },
|
|
18
|
+
{ label: "Germany", value: "germany", id: "de" },
|
|
19
|
+
{ label: "France", value: "france", id: "fr" },
|
|
20
|
+
{ label: "Japan", value: "japan", id: "jp" },
|
|
21
|
+
{ label: "Brazil", value: "brazil", id: "br" },
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<>
|
|
26
|
+
<Button onClick={open}>{'Open Dialog with Overflow Visible'}</Button>
|
|
27
|
+
<Dialog
|
|
28
|
+
onClose={close}
|
|
29
|
+
opened={isOpen}
|
|
30
|
+
overflow="visible"
|
|
31
|
+
size="md"
|
|
32
|
+
>
|
|
33
|
+
<Dialog.Header>
|
|
34
|
+
<Body>{'Select Location'}</Body>
|
|
35
|
+
</Dialog.Header>
|
|
36
|
+
<Dialog.Body>
|
|
37
|
+
<Typeahead
|
|
38
|
+
options={typeaheadOptions}
|
|
39
|
+
placeholder="Select a location..."
|
|
40
|
+
/>
|
|
41
|
+
</Dialog.Body>
|
|
42
|
+
<Dialog.Footer>
|
|
43
|
+
<Button onClick={close}>{'Save'}</Button>
|
|
44
|
+
<Button
|
|
45
|
+
onClick={close}
|
|
46
|
+
variant="link"
|
|
47
|
+
>
|
|
48
|
+
{'Cancel'}
|
|
49
|
+
</Button>
|
|
50
|
+
</Dialog.Footer>
|
|
51
|
+
</Dialog>
|
|
52
|
+
</>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default DialogOverflowVisible
|
|
57
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `overflow: "visible"` global prop to allow Typeahead dropdown menus to appear outside the dialog boundaries. By default, dialogs clip content that extends beyond their edges, but this prop enables pop-up elements to render above the dialog overlay.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `overflow="visible"` global prop to allow Date Picker and Typeahead dropdown menus to appear outside the dialog boundaries. By default, dialogs clip content that extends beyond their edges, but this prop enables pop-up elements to render above the dialog overlay.
|
|
@@ -12,6 +12,7 @@ examples:
|
|
|
12
12
|
- dialog_full_height_placement: Full Height Placement
|
|
13
13
|
- dialog_loading: Loading
|
|
14
14
|
- dialog_turbo_frames: Within Turbo Frames
|
|
15
|
+
- dialog_overflow_visible: Overflow Visible
|
|
15
16
|
- dialog_closeable: Close Button in Header
|
|
16
17
|
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ examples:
|
|
|
26
27
|
- dialog_full_height: Full Height
|
|
27
28
|
- dialog_full_height_placement: Full Height Placement
|
|
28
29
|
- dialog_loading: Loading
|
|
30
|
+
- dialog_overflow_visible: Overflow Visible
|
|
29
31
|
- dialog_closeable: Close Button in Header
|
|
30
32
|
|
|
31
33
|
swift:
|
|
@@ -9,4 +9,5 @@ export { default as DialogStackedAlert } from './_dialog_stacked_alert.jsx'
|
|
|
9
9
|
export { default as DialogFullHeight } from './_dialog_full_height.jsx'
|
|
10
10
|
export { default as DialogFullHeightPlacement } from './_dialog_full_height_placement.jsx'
|
|
11
11
|
export { default as DialogLoading } from './_dialog_loading.jsx'
|
|
12
|
-
export { default as
|
|
12
|
+
export { default as DialogOverflowVisible } from './_dialog_overflow_visible.jsx'
|
|
13
|
+
export { default as DialogCloseable } from './_dialog_closeable.jsx'
|
|
@@ -20,12 +20,14 @@
|
|
|
20
20
|
|
|
21
21
|
%>
|
|
22
22
|
|
|
23
|
-
<%= pb_rails("dropdown", props: {options: options}) %>
|
|
23
|
+
<%= pb_rails("dropdown", props: {id: "country-dropdown", options: options}) %>
|
|
24
24
|
|
|
25
25
|
<script>
|
|
26
26
|
document.addEventListener("pb:dropdown:selected", (e) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
if (e.target.id === "country-dropdown") {
|
|
28
|
+
const option = e.detail;
|
|
29
|
+
const dropdown = e.target;
|
|
30
|
+
console.log("Selected option:", option);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
31
33
|
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
<%= pb_rails("dropdown", props: {
|
|
3
|
+
id: "date-range-with-default",
|
|
4
|
+
label: "Date Range",
|
|
5
|
+
variant: "quickpick",
|
|
6
|
+
default_value: "This Year"
|
|
7
|
+
}) %>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
11
|
+
const dropdown = document.getElementById("date-range-with-default");
|
|
12
|
+
if (dropdown) {
|
|
13
|
+
dropdown.addEventListener("pb:dropdown:selected", (e) => {
|
|
14
|
+
const option = e.detail;
|
|
15
|
+
console.log("Selected option:", option);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%= pb_rails("dropdown", props: {id: "date-range-quickpick-1", label: "Date Range", variant: "quickpick"}) %>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
<script>
|
|
5
|
+
const dropdown = document.getElementById("date-range-quickpick-1");
|
|
6
|
+
if (dropdown) {
|
|
7
|
+
dropdown.addEventListener("pb:dropdown:selected", (e) => {
|
|
8
|
+
const option = e.detail;
|
|
9
|
+
console.log("Selected option:", option);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
The `quickpick` variant provides predefined date based options when `variant:"quickpick"` is used.
|
|
2
|
+
|
|
3
|
+
Open the Dropdown above to see the default options.
|
|
4
|
+
|
|
5
|
+
The quickpick variant automatically generates hidden inputs for `start_date` and `end_date` which are populated when a date range is selected. These inputs are ready for form submission.
|
|
6
|
+
|
|
7
|
+
You can customize the input names and IDs using the following props:
|
|
8
|
+
- `start_date_name` - The name attribute for the start date input (default: `"start_date_name"`)
|
|
9
|
+
- `start_date_id` - The ID attribute for the start date input (default: `"start_date_id"`)
|
|
10
|
+
- `end_date_name` - The name attribute for the end date input (default: `"end_date_name"`)
|
|
11
|
+
- `end_date_id` - The ID attribute for the end date input (default: `"end_date_id"`)
|
|
12
|
+
|
|
13
|
+
Example with custom names:
|
|
14
|
+
```ruby
|
|
15
|
+
pb_rails("dropdown", props: {
|
|
16
|
+
variant: "quickpick",
|
|
17
|
+
start_date_name: "filter[start_date]",
|
|
18
|
+
start_date_id: "filter_start_date",
|
|
19
|
+
end_date_name: "filter[end_date]",
|
|
20
|
+
end_date_id: "filter_end_date"
|
|
21
|
+
})
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The Dropdown kit also comes with a custom event called "pb:dropdown:selected" which updates dynamically with the selection as it changes. See code snippet to see this in action.
|
|
25
|
+
|
|
26
|
+
In addition, a data attribute called data-option-selected with the selection is also rendered on the parent dropdown div.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
<%= pb_rails("dropdown", props: {
|
|
3
|
+
id: "date-range-quickpick-end-today",
|
|
4
|
+
label: "Date Range",
|
|
5
|
+
variant: "quickpick",
|
|
6
|
+
range_ends_today: true
|
|
7
|
+
}) %>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
document.addEventListener("DOMContentLoaded", () => {
|
|
11
|
+
const dropdown = document.getElementById("date-range-quickpick-end-today");
|
|
12
|
+
if (dropdown) {
|
|
13
|
+
dropdown.addEventListener("pb:dropdown:selected", (e) => {
|
|
14
|
+
const option = e.detail;
|
|
15
|
+
console.log("Selected option:", option);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The optional `range_ends_today` prop can be used with the `quickpick` variant to set end date on all ranges that start with 'this' to today's date. For instance, by default 'This Year' will set end day to 12/31/(current year), but if `range_ends_today` prop is used, end date on that range will be today's date.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<%= pb_rails("dropdown", props: {
|
|
2
|
+
id: "dropdown-quickpick-with-date-pickers-default",
|
|
3
|
+
label: "Date Range",
|
|
4
|
+
name: "date_range",
|
|
5
|
+
margin_bottom: "sm",
|
|
6
|
+
variant: "quickpick",
|
|
7
|
+
default_value: "This Month",
|
|
8
|
+
controls_start_id: "start-date-picker-default",
|
|
9
|
+
controls_end_id: "end-date-picker-default",
|
|
10
|
+
start_date_id: "quickpick_start_date_default",
|
|
11
|
+
start_date_name: "start_date",
|
|
12
|
+
end_date_id: "quickpick_end_date_default",
|
|
13
|
+
end_date_name: "end_date"
|
|
14
|
+
}) %>
|
|
15
|
+
|
|
16
|
+
<%= pb_rails("date_picker", props: {
|
|
17
|
+
picker_id: "start-date-picker-default",
|
|
18
|
+
label: "Start Date",
|
|
19
|
+
name: "start_date_picker",
|
|
20
|
+
placeholder: "Select Start Date",
|
|
21
|
+
sync_start_with: "dropdown-quickpick-with-date-pickers-default"
|
|
22
|
+
}) %>
|
|
23
|
+
|
|
24
|
+
<%= pb_rails("date_picker", props: {
|
|
25
|
+
picker_id: "end-date-picker-default",
|
|
26
|
+
label: "End Date",
|
|
27
|
+
name: "end_date_picker",
|
|
28
|
+
placeholder: "Select End Date",
|
|
29
|
+
sync_end_with: "dropdown-quickpick-with-date-pickers-default"
|
|
30
|
+
}) %>
|
data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
This example demonstrates the 3-input pattern with a default value. The dropdown is initialized with "This Month" selected, and both DatePickers are automatically populated with the corresponding start and end dates.
|
|
2
|
+
|
|
3
|
+
The default value can be set using the `default_value` prop with any of the quickpick option labels.
|
data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<%= pb_rails("dropdown", props: {
|
|
2
|
+
id: "dropdown-quickpick-with-date-pickers",
|
|
3
|
+
label: "Date Range",
|
|
4
|
+
name: "date_range",
|
|
5
|
+
margin_bottom: "sm",
|
|
6
|
+
variant: "quickpick",
|
|
7
|
+
controls_start_id: "start-date-picker",
|
|
8
|
+
controls_end_id: "end-date-picker",
|
|
9
|
+
start_date_id: "quickpick_start_date",
|
|
10
|
+
start_date_name: "start_date",
|
|
11
|
+
end_date_id: "quickpick_end_date",
|
|
12
|
+
end_date_name: "end_date"
|
|
13
|
+
}) %>
|
|
14
|
+
|
|
15
|
+
<%= pb_rails("date_picker", props: {
|
|
16
|
+
picker_id: "start-date-picker",
|
|
17
|
+
label: "Start Date",
|
|
18
|
+
name: "start_date_picker",
|
|
19
|
+
placeholder: "Select Start Date",
|
|
20
|
+
sync_start_with: "dropdown-quickpick-with-date-pickers"
|
|
21
|
+
}) %>
|
|
22
|
+
|
|
23
|
+
<%= pb_rails("date_picker", props: {
|
|
24
|
+
picker_id: "end-date-picker",
|
|
25
|
+
label: "End Date",
|
|
26
|
+
name: "end_date_picker",
|
|
27
|
+
placeholder: "Select End Date",
|
|
28
|
+
sync_end_with: "dropdown-quickpick-with-date-pickers"
|
|
29
|
+
}) %>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
The quickpick variant can be synced with two DatePickers for a 3-input pattern. When a quickpick option is selected from the dropdown, both DatePickers are automatically populated. When either DatePicker is manually changed, the dropdown is cleared.
|
|
2
|
+
|
|
3
|
+
#### Props for 3-Input Pattern:
|
|
4
|
+
|
|
5
|
+
- `controls_start_id` - ID of the start DatePicker to sync with
|
|
6
|
+
- `controls_end_id` - ID of the end DatePicker to sync with
|
|
7
|
+
|
|
8
|
+
#### DatePicker Props:
|
|
9
|
+
|
|
10
|
+
- `sync_start_with` - ID of the dropdown to clear when start date changes
|
|
11
|
+
- `sync_end_with` - ID of the dropdown to clear when end date changes
|
|
12
|
+
|
|
13
|
+
This pattern allows users to quickly select common date ranges or manually pick specific dates.
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
%>
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
<%= pb_rails("dropdown", props: {options: options}) do %>
|
|
50
|
+
<%= pb_rails("dropdown", props: {id: "user-dropdown", options: options}) do %>
|
|
51
51
|
<%= pb_rails("dropdown/dropdown_trigger", props: {placeholder: "Select a User", custom_display: custom_display}) %>
|
|
52
52
|
<%= pb_rails("dropdown/dropdown_container") do %>
|
|
53
53
|
<% options.each do |option| %>
|
|
@@ -71,6 +71,8 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
document.addEventListener("pb:dropdown:selected", (e) => {
|
|
74
|
+
if (e.target.id !== "user-dropdown") return;
|
|
75
|
+
|
|
74
76
|
const option = e.detail;
|
|
75
77
|
const dropdown = e.target;
|
|
76
78
|
|
|
@@ -22,6 +22,11 @@ examples:
|
|
|
22
22
|
- dropdown_multi_select_with_default: Multi Select Default Value
|
|
23
23
|
- dropdown_blank_selection: Blank Selection
|
|
24
24
|
- dropdown_separators_hidden: Separators Hidden
|
|
25
|
+
- dropdown_quickpick_rails: Quick Pick Variant
|
|
26
|
+
- dropdown_quickpick_range_end_rails: Quick Pick Variant (Range Ends Today)
|
|
27
|
+
- dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
|
|
28
|
+
- dropdown_quickpick_with_date_pickers_rails: Quick Pick with Date Pickers
|
|
29
|
+
- dropdown_quickpick_with_date_pickers_default_rails: Quick Pick with Date Pickers (Default Value)
|
|
25
30
|
|
|
26
31
|
react:
|
|
27
32
|
- dropdown_default: Default
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 15.7.0
|
|
4
|
+
version: 15.7.0
|
|
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: 2025-12-
|
|
12
|
+
date: 2025-12-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -816,6 +816,10 @@ files:
|
|
|
816
816
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb
|
|
817
817
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx
|
|
818
818
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md
|
|
819
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb
|
|
820
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx
|
|
821
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md
|
|
822
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md
|
|
819
823
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_props_swift.md
|
|
820
824
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.html.erb
|
|
821
825
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx
|
|
@@ -920,12 +924,21 @@ files:
|
|
|
920
924
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
|
|
921
925
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx
|
|
922
926
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md
|
|
927
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb
|
|
923
928
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx
|
|
924
929
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md
|
|
930
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb
|
|
931
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md
|
|
925
932
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.jsx
|
|
926
933
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.md
|
|
934
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb
|
|
935
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md
|
|
927
936
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.jsx
|
|
928
937
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.md
|
|
938
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb
|
|
939
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md
|
|
940
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb
|
|
941
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md
|
|
929
942
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
|
|
930
943
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
|
|
931
944
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
|