playbook_ui_docs 15.7.0.pre.alpha.play263313229 → 15.7.0.pre.rc.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_advanced_table/docs/_advanced_table_background_control_rails.html.erb +5 -11
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_contact/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +14 -23
- 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/example.yml +0 -4
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +5 -7
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -2
- data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -3
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
- metadata +2 -70
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx +0 -54
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md +0 -9
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx +0 -80
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md +0 -3
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +0 -33
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +0 -46
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +0 -2
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.html.erb +0 -24
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.jsx +0 -60
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.md +0 -3
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +0 -71
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +0 -57
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +0 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +0 -12
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +0 -26
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +0 -30
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +0 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +0 -29
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +0 -13
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.html.erb +0 -14
- data/app/pb_kits/playbook/pb_form/docs/_form_with_required_indicator.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +0 -134
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +0 -101
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +0 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +0 -180
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +0 -122
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +0 -3
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.html.erb +0 -6
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.jsx +0 -25
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_required_indicator.md +0 -3
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.html.erb +0 -2
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.jsx +0 -16
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_24_hour.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.jsx +0 -13
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.html.erb +0 -4
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.jsx +0 -29
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_default_time.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_disabled.html.erb +0 -13
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_disabled.jsx +0 -23
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_error.html.erb +0 -5
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_error.jsx +0 -15
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_input_options.html.erb +0 -14
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_label.html.erb +0 -2
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_label.jsx +0 -15
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.html.erb +0 -42
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.jsx +0 -52
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_min_max_time.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.jsx +0 -45
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_on_handler.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.html.erb +0 -3
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.jsx +0 -21
- data/app/pb_kits/playbook/pb_time_picker/docs/_time_picker_timezone.md +0 -1
- data/app/pb_kits/playbook/pb_time_picker/docs/example.yml +0 -24
- data/app/pb_kits/playbook/pb_time_picker/docs/index.js +0 -9
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.html.erb +0 -60
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.jsx +0 -118
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.md +0 -1
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import AdvancedTable from '../_advanced_table'
|
|
3
|
-
import colors from '../../tokens/exports/_colors.module.scss'
|
|
4
|
-
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const AdvancedTableColumnStylingBackgroundMulti = (props) => {
|
|
8
|
-
const columnDefinitions = [
|
|
9
|
-
{
|
|
10
|
-
accessor: "year",
|
|
11
|
-
label: "Year",
|
|
12
|
-
cellAccessors: ["quarter", "month", "day"],
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
label: "Enrollment Data",
|
|
16
|
-
columns: [
|
|
17
|
-
{
|
|
18
|
-
label: "Enrollment Stats",
|
|
19
|
-
columns: [
|
|
20
|
-
{
|
|
21
|
-
accessor: "newEnrollments",
|
|
22
|
-
label: "New Enrollments",
|
|
23
|
-
columnStyling:{cellBackgroundColor: colors.error_subtle, headerBackgroundColor: colors.error_subtle},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
accessor: "scheduledMeetings",
|
|
27
|
-
label: "Scheduled Meetings",
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
label: "Performance Data",
|
|
35
|
-
columns: [
|
|
36
|
-
{
|
|
37
|
-
label: "Completion Metrics",
|
|
38
|
-
columns: [
|
|
39
|
-
{
|
|
40
|
-
accessor: "completedClasses",
|
|
41
|
-
label: "Completed Classes",
|
|
42
|
-
columnStyling:{cellBackgroundColor: colors.info, headerBackgroundColor: colors.info, fontColor: colors.white, headerFontColor: colors.white},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
accessor: "classCompletionRate",
|
|
46
|
-
label: "Class Completion Rate",
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
label: "Attendance",
|
|
52
|
-
columns: [
|
|
53
|
-
{
|
|
54
|
-
accessor: "attendanceRate",
|
|
55
|
-
label: "Attendance Rate",
|
|
56
|
-
columnStyling:{cellBackgroundColor: colors.info_subtle},
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
accessor: "scheduledMeetings",
|
|
60
|
-
label: "Scheduled Meetings",
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
},
|
|
66
|
-
];
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div>
|
|
71
|
-
<AdvancedTable
|
|
72
|
-
columnDefinitions={columnDefinitions}
|
|
73
|
-
tableData={MOCK_DATA}
|
|
74
|
-
{...props}
|
|
75
|
-
/>
|
|
76
|
-
</div>
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export default AdvancedTableColumnStylingBackgroundMulti
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
The `columnStyling` prop can also be used to set background color for entire columns for the multi header variant as well.
|
|
2
|
-
|
|
3
|
-
It should be noted that `headerFontColor` and `headerBackgroundColor` in the multi header variant will only apply to the immediate header for the given column as shown here.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("body", props: { color: "default" }) do %>
|
|
2
|
-
<%= pb_rails("contact", props: {
|
|
3
|
-
contact_value: "2125551234",
|
|
4
|
-
icon_enabled: false,
|
|
5
|
-
unstyled: true
|
|
6
|
-
}) %>
|
|
7
|
-
<% end %>
|
|
8
|
-
|
|
9
|
-
<%= pb_rails("body", props: { color: "light" }) do %>
|
|
10
|
-
<%= pb_rails("contact", props: {
|
|
11
|
-
contact_value: "12125551234",
|
|
12
|
-
icon_enabled: false,
|
|
13
|
-
unstyled: true
|
|
14
|
-
}) %>
|
|
15
|
-
<% end %>
|
|
16
|
-
|
|
17
|
-
<%= pb_rails("body", props: { color: "lighter" }) do %>
|
|
18
|
-
<%= pb_rails("contact", props: {
|
|
19
|
-
contact_value: "4155551234",
|
|
20
|
-
icon_enabled: false,
|
|
21
|
-
unstyled: true
|
|
22
|
-
}) %>
|
|
23
|
-
<% end %>
|
|
24
|
-
|
|
25
|
-
<%= pb_rails("body", props: { color: "default" }) do %>
|
|
26
|
-
<%= pb_rails("contact", props: {
|
|
27
|
-
contact_type: "extension",
|
|
28
|
-
contact_value: "1234",
|
|
29
|
-
icon_enabled: false,
|
|
30
|
-
unstyled: true
|
|
31
|
-
}) %>
|
|
32
|
-
<% end %>
|
|
33
|
-
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import Contact from "../../pb_contact/_contact"
|
|
3
|
-
import Body from "../../pb_body/_body"
|
|
4
|
-
|
|
5
|
-
const ContactUnstyled = (props) => {
|
|
6
|
-
return (
|
|
7
|
-
<div>
|
|
8
|
-
<Body color="default">
|
|
9
|
-
<Contact
|
|
10
|
-
contactValue="2125551234"
|
|
11
|
-
iconEnabled={false}
|
|
12
|
-
unstyled
|
|
13
|
-
{...props}
|
|
14
|
-
/>
|
|
15
|
-
</Body>
|
|
16
|
-
<Body color="light">
|
|
17
|
-
<Contact
|
|
18
|
-
contactValue="12125551234"
|
|
19
|
-
iconEnabled={false}
|
|
20
|
-
unstyled
|
|
21
|
-
{...props}
|
|
22
|
-
/>
|
|
23
|
-
</Body>
|
|
24
|
-
<Body color="lighter">
|
|
25
|
-
<Contact
|
|
26
|
-
contactValue="4155551234"
|
|
27
|
-
iconEnabled={false}
|
|
28
|
-
unstyled
|
|
29
|
-
{...props}
|
|
30
|
-
/>
|
|
31
|
-
</Body>
|
|
32
|
-
<Body color="default">
|
|
33
|
-
<Contact
|
|
34
|
-
contactType="extension"
|
|
35
|
-
contactValue="1234"
|
|
36
|
-
iconEnabled={false}
|
|
37
|
-
unstyled
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
</Body>
|
|
41
|
-
</div>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export default ContactUnstyled
|
|
46
|
-
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Use the Contact kit with `icon_enabled: false` and `unstyled: true` to display phone numbers with full typography control. When `unstyled: true`, the Contact kit renders just the formatted text without a Body wrapper, allowing you to wrap it in your own Typography kit to control the color and styling.
|
|
2
|
-
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Use the Contact kit with `iconEnabled={false}` and `unstyled` to display phone numbers with full typography control. With `unstyled`, the Contact kit renders just the formatted text without a Body wrapper, allowing you to wrap it in your own Typography kit to control the color and styling.
|
|
2
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<%= pb_rails("flex", props:{wrap:true}) do %>
|
|
2
|
-
<%= pb_rails("button", props: { text: "Open Simple Dialog", data: {"open-dialog": "dialog-simple"}, margin_right:"md" }) %>
|
|
3
|
-
<%= pb_rails("button", props: { text: "Open Complex Dialog", data: {"open-dialog": "dialog-complex2"} }) %>
|
|
4
|
-
<% end %>
|
|
5
|
-
|
|
6
|
-
<%= pb_rails("dialog", props: {
|
|
7
|
-
id:"dialog-simple",
|
|
8
|
-
size: "sm",
|
|
9
|
-
title: "Header Title is the Title Prop",
|
|
10
|
-
text: "Hello Body Text, Nice to meet ya.",
|
|
11
|
-
cancel_button: "Cancel Button",
|
|
12
|
-
closeable: false,
|
|
13
|
-
confirm_button: "Okay",
|
|
14
|
-
confirm_button_id: "confirm-button-simple"
|
|
15
|
-
}) %>
|
|
16
|
-
|
|
17
|
-
<%= pb_rails("dialog", props: {
|
|
18
|
-
id:"dialog-complex2",
|
|
19
|
-
size: "sm"
|
|
20
|
-
}) do %>
|
|
21
|
-
<%= pb_rails("dialog/dialog_header", props: { id: "dialog-complex2", title:"Header Title inside Dialog Header", closeable: false } ) %>
|
|
22
|
-
<%= pb_rails("dialog/dialog_body", props:{text: "Hello Body Text, Nice to meet ya."}) %>
|
|
23
|
-
<%= pb_rails("dialog/dialog_footer", props: {cancel_button: "Cancel Button", confirm_button: "Okay", confirm_button_id:"confirm-complex2", id: "dialog-complex2"}) %>
|
|
24
|
-
<% end %>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react'
|
|
2
|
-
import Button from '../../pb_button/_button'
|
|
3
|
-
import Dialog from '../../pb_dialog/_dialog'
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const DialogCloseable = () => {
|
|
7
|
-
// Simple example
|
|
8
|
-
const [isOpenSimple, setIsOpenSimple] = useState(false)
|
|
9
|
-
const closeSimple = () => setIsOpenSimple(false)
|
|
10
|
-
const openSimple = () => setIsOpenSimple(true)
|
|
11
|
-
|
|
12
|
-
// Complex example
|
|
13
|
-
const [isOpenComplex, setIsOpenComplex] = useState(false)
|
|
14
|
-
const closeComplex = () => setIsOpenComplex(false)
|
|
15
|
-
const openComplex = () => setIsOpenComplex(true)
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<>
|
|
19
|
-
<Button
|
|
20
|
-
marginRight='md'
|
|
21
|
-
onClick={openSimple}
|
|
22
|
-
>
|
|
23
|
-
{'Open Simple Dialog'}
|
|
24
|
-
</Button>
|
|
25
|
-
<Button onClick={openComplex}>{'Open Complex Dialog'}</Button>
|
|
26
|
-
|
|
27
|
-
<Dialog
|
|
28
|
-
cancelButton="Cancel Button"
|
|
29
|
-
closeable={false}
|
|
30
|
-
confirmButton="Okay"
|
|
31
|
-
onCancel={closeSimple}
|
|
32
|
-
onClose={closeSimple}
|
|
33
|
-
onConfirm={closeSimple}
|
|
34
|
-
opened={isOpenSimple}
|
|
35
|
-
size="sm"
|
|
36
|
-
text="Hello Body Text, Nice to meet ya."
|
|
37
|
-
title="Header Title is the Title Prop"
|
|
38
|
-
/>
|
|
39
|
-
<Dialog
|
|
40
|
-
onClose={closeComplex}
|
|
41
|
-
opened={isOpenComplex}
|
|
42
|
-
size="sm"
|
|
43
|
-
>
|
|
44
|
-
<Dialog.Header closeable={false}>{'Header Title inside Dialog.Header'}</Dialog.Header>
|
|
45
|
-
<Dialog.Body>{'Hello Body Text, Nice to meet ya.'}</Dialog.Body>
|
|
46
|
-
<Dialog.Footer>
|
|
47
|
-
<Button onClick={closeComplex}>{'Okay'}</Button>
|
|
48
|
-
<Button
|
|
49
|
-
onClick={closeComplex}
|
|
50
|
-
variant="link"
|
|
51
|
-
>
|
|
52
|
-
{'Cancel Button'}
|
|
53
|
-
</Button>
|
|
54
|
-
</Dialog.Footer>
|
|
55
|
-
</Dialog>
|
|
56
|
-
</>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export default DialogCloseable
|
|
@@ -1,71 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1,57 +0,0 @@
|
|
|
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
|
-
|
|
@@ -1 +0,0 @@
|
|
|
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.
|
|
@@ -1 +0,0 @@
|
|
|
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.
|
|
@@ -1,19 +0,0 @@
|
|
|
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>
|
|
@@ -1,12 +0,0 @@
|
|
|
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>
|
|
@@ -1,26 +0,0 @@
|
|
|
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.
|
|
@@ -1,19 +0,0 @@
|
|
|
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>
|
|
@@ -1 +0,0 @@
|
|
|
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.
|
|
@@ -1,30 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}) %>
|
|
@@ -1,13 +0,0 @@
|
|
|
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.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<%= pb_form_with(scope: :example, url: "", method: :get, validate: true) do |form| %>
|
|
2
|
-
<%= form.text_field :example_text_field, props: { label: true, required: true, required_indicator: true } %>
|
|
3
|
-
<%= form.text_field :example_text_field_2, props: { label: "Text Field Custom Label", required: true, required_indicator: true } %>
|
|
4
|
-
<%= form.email_field :example_email_field, props: { label: true, required: true, required_indicator: true } %>
|
|
5
|
-
<%= form.number_field :example_number_field, props: { label: true, required: true, required_indicator: true } %>
|
|
6
|
-
<%= form.search_field :example_search_field, props: { label: true, required: true, required_indicator: true } %>
|
|
7
|
-
<%= form.password_field :example_password_field, props: { label: true, required: true, required_indicator: true } %>
|
|
8
|
-
<%= form.url_field :example_url_field, props: { label: true, required: true, required_indicator: true } %>
|
|
9
|
-
|
|
10
|
-
<%= form.actions do |action| %>
|
|
11
|
-
<%= action.submit %>
|
|
12
|
-
<%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
|
|
13
|
-
<% end %>
|
|
14
|
-
<% end %>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
The `required_indicator` prop adds a red asterisk (*) to the input label, visually marking the field as required. This works with both `label: true` for auto-generated labels and `label: "Custom Text"` for custom labels.
|
|
2
|
-
|
|
3
|
-
While it's typically used alongside the `required` prop for HTML5 validation, you can use `required_indicator` independently if you're handling validation differently (e.g., client-side or backend validation).
|