playbook_ui_docs 15.6.0.pre.alpha.play266013023 → 15.6.0.pre.alpha.play266913088

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.html.erb +43 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +11 -5
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +7 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx +54 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md +9 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx +80 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
  12. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +33 -0
  13. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +46 -0
  14. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +2 -0
  15. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +2 -0
  16. data/app/pb_kits/playbook/pb_contact/docs/example.yml +2 -0
  17. data/app/pb_kits/playbook/pb_contact/docs/index.js +1 -0
  18. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +23 -14
  19. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +1 -1
  20. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +71 -0
  21. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +57 -0
  22. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +1 -0
  23. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +1 -0
  24. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +2 -0
  25. data/app/pb_kits/playbook/pb_dialog/docs/index.js +2 -1
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +7 -5
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +19 -0
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +12 -0
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +26 -0
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +19 -0
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +1 -0
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +30 -0
  33. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +3 -0
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +29 -0
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +13 -0
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +3 -1
  37. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
  38. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +134 -0
  39. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +34 -0
  40. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +101 -0
  41. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +33 -0
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +180 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +3 -0
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +122 -0
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +3 -0
  46. data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
  47. data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
  48. metadata +33 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81c5bdf599a2aa0124c42d936e5ccd93325331a7a37f6404b41ebe8a8b94fac5
4
- data.tar.gz: 9bba26c50106688348749d493e632289a29c57f984e60c8108936d4a0bf1e50e
3
+ metadata.gz: 5d69923b71d3c4116b4351555bdd26771da6b7c4ed1014c22d5dd0b2eeb977c5
4
+ data.tar.gz: 7fdcb789645ba26848a2e1d10e16afae5d777764da22426e9be2698ed4a00add
5
5
  SHA512:
6
- metadata.gz: 799d5958ac0ee12aa22dc67b335066b8d3324e47d43d70e6b04eb575d82de91105d39b6aff4cfcffa6058f3c28353432959eb8c2402bc8b1893d6c2de2e01ccb
7
- data.tar.gz: 3486d7241cc465158b554a11eced62382a43b62d2a6b877e7d41f4c68600ea517b7bf0f6cc7939ecc6e0163378db690e650800a5f43130106c107a85d967b8b7
6
+ metadata.gz: 4cdefcf684ae893fe5b5098cf73c63924050a96760c23c6c623c39907a2308a92c5f593eeb25ef451db189033f3e22430af96309da67771f82ea9602254fd05a
7
+ data.tar.gz: 128061d2e426203bdd4cc7caddb5cdba55dd287a47d9d72869a9351c571096cd54fa65e5a97b5eb74785aec7cdb0fc237446021703b6e5bd5184d124fe9df85c
@@ -0,0 +1,43 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ column_styling: {
11
+ cell_background_color: ->(row) { row[:newEnrollments].to_i > 20 ? "success_secondary" : "warning_secondary" }
12
+ }
13
+ },
14
+ {
15
+ accessor: "scheduledMeetings",
16
+ label: "Scheduled Meetings",
17
+ },
18
+ {
19
+ accessor: "attendanceRate",
20
+ label: "Attendance Rate",
21
+ },
22
+ {
23
+ accessor: "completedClasses",
24
+ label: "Completed Classes",
25
+ },
26
+ {
27
+ accessor: "classCompletionRate",
28
+ label: "Class Completion Rate",
29
+ column_styling: {
30
+ cell_background_color: "category_1",
31
+ font_color: "white"
32
+ }
33
+ },
34
+ {
35
+ accessor: "graduatedStudents",
36
+ label: "Graduated Students",
37
+ }
38
+ ] %>
39
+
40
+ <%= pb_rails("advanced_table", props: { id: "background-control", table_data: @table_data, column_definitions: column_definitions }) do %>
41
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "background-control", column_definitions: column_definitions }) %>
42
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "background-control", table_data: @table_data, column_definitions: column_definitions }) %>
43
+ <% end %>
@@ -0,0 +1 @@
1
+ `column_styling` can also be used to control the background color on individual cells in a given column as shown here.
@@ -8,16 +8,26 @@
8
8
  accessor: "newEnrollments",
9
9
  label: "New Enrollments",
10
10
  column_styling: {
11
- cell_background_color: ->(row) { row[:newEnrollments].to_i > 20 ? "success_secondary" : "warning_secondary" }
11
+ cell_background_color: "error_subtle",
12
+ header_background_color: "error_subtle"
12
13
  }
13
14
  },
14
15
  {
15
16
  accessor: "scheduledMeetings",
16
17
  label: "Scheduled Meetings",
18
+ column_styling: {
19
+ cell_background_color: "info_subtle",
20
+ }
17
21
  },
18
22
  {
19
23
  accessor: "attendanceRate",
20
24
  label: "Attendance Rate",
25
+ column_styling: {
26
+ cell_background_color: "info",
27
+ header_background_color: "info",
28
+ header_font_color: "white",
29
+ font_color: "white"
30
+ }
21
31
  },
22
32
  {
23
33
  accessor: "completedClasses",
@@ -26,10 +36,6 @@
26
36
  {
27
37
  accessor: "classCompletionRate",
28
38
  label: "Class Completion Rate",
29
- column_styling: {
30
- cell_background_color: "category_1",
31
- font_color: "white"
32
- }
33
39
  },
34
40
  {
35
41
  accessor: "graduatedStudents",
@@ -1 +1,7 @@
1
- `column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here. Use `font_color` to achieve better contrast between cell content and background for darker backgrounds.
1
+ `column_styling` can also be used to control the background color on all cells in a given column. Use the following key/values pairs to achieve this:
2
+
3
+ 1) `cell_background_color`: use this to control the background color of all cells in the given column
4
+ 2) `font_color`: use this to control font color for all cells in the given column if needed, for example if using a darker background color
5
+ 3) `header_background_color`: use this to control the background color of the column header
6
+ 4) `header_font_color`: use this to control font color for the header in the given column if needed, for example if using a darker background color.
7
+
@@ -0,0 +1,54 @@
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 AdvancedTableColumnStylingBackground = (props) => {
8
+ const columnDefinitions = [
9
+ {
10
+ accessor: "year",
11
+ label: "Year",
12
+ cellAccessors: ["quarter", "month", "day"],
13
+ },
14
+ {
15
+ accessor: "newEnrollments",
16
+ label: "New Enrollments",
17
+ columnStyling:{cellBackgroundColor: colors.error_subtle, headerBackgroundColor: colors.error_subtle},
18
+ },
19
+ {
20
+ accessor: "scheduledMeetings",
21
+ label: "Scheduled Meetings",
22
+ columnStyling:{cellBackgroundColor: colors.info_subtle},
23
+ },
24
+ {
25
+ accessor: "attendanceRate",
26
+ label: "Attendance Rate",
27
+ columnStyling:{cellBackgroundColor: colors.info, headerBackgroundColor: colors.info, fontColor: colors.white, headerFontColor: colors.white},
28
+ },
29
+ {
30
+ accessor: "completedClasses",
31
+ label: "Completed Classes",
32
+ },
33
+ {
34
+ accessor: "classCompletionRate",
35
+ label: "Class Completion Rate",
36
+ },
37
+ {
38
+ accessor: "graduatedStudents",
39
+ label: "Graduated Students",
40
+ },
41
+ ]
42
+
43
+ return (
44
+ <div>
45
+ <AdvancedTable
46
+ columnDefinitions={columnDefinitions}
47
+ tableData={MOCK_DATA}
48
+ {...props}
49
+ />
50
+ </div>
51
+ )
52
+ }
53
+
54
+ export default AdvancedTableColumnStylingBackground
@@ -0,0 +1,9 @@
1
+ The `columnStyling` prop can also be used to set background color for entire columns.As stated above, `columnStyling` is an object that has several optional key/value pairs, here are the options highlighted in this doc:
2
+
3
+ 1) `cellBackgroundColor`: use this to control the background color of all cells in the given column
4
+ 2) `headerBackgroundColor`: use this to control the background color of the column header
5
+ 3) `fontColor`: use this to control font color for all cells in the given column if needed, for example if using a darker background color.
6
+ 4) `headerFontColor`: use this to control font color for the header in the given column if needed, for example if using a darker background color.
7
+
8
+
9
+
@@ -0,0 +1,80 @@
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
@@ -0,0 +1,3 @@
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.
@@ -26,7 +26,8 @@ examples:
26
26
  - advanced_table_column_styling_rails: Column Styling
27
27
  - advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
28
28
  - advanced_table_padding_control_rails: Padding Control using Column Styling
29
- - advanced_table_background_control_rails: Background Control using Column Styling
29
+ - advanced_table_background_control_rails: Column Styling Background Color
30
+ - advanced_table_background_colors_rails: Column Styling Individual Cell Background Color
30
31
  - advanced_table_column_border_color_rails: Column Group Border Color
31
32
 
32
33
 
@@ -75,6 +76,8 @@ examples:
75
76
  - advanced_table_padding_control_per_row: Padding Control using Row Styling
76
77
  - advanced_table_column_styling: Column Styling
77
78
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
79
+ - advanced_table_column_styling_background: Column Styling Background Color
80
+ - advanced_table_column_styling_background_multi: Column Styling Background Color with Multiple Headers
78
81
  - advanced_table_padding_control: Padding Control using Column Styling
79
82
  - advanced_table_column_border_color: Column Group Border Color
80
83
  - advanced_table_fullscreen: Fullscreen
@@ -45,4 +45,6 @@ export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced
45
45
  export { default as AdvancedTableSortPerColumn } from './_advanced_table_sort_per_column.jsx'
46
46
  export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
47
47
  export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
48
- export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
48
+ export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
49
+ export { default as AdvancedTableColumnStylingBackground } from './_advanced_table_column_styling_background.jsx'
50
+ export { default as AdvancedTableColumnStylingBackgroundMulti } from './_advanced_table_column_styling_background_multi.jsx'
@@ -0,0 +1,33 @@
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
+
@@ -0,0 +1,46 @@
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
+
@@ -0,0 +1,2 @@
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
+
@@ -0,0 +1,2 @@
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
+
@@ -3,11 +3,13 @@ examples:
3
3
  rails:
4
4
  - contact_default: Default
5
5
  - contact_with_detail: Detail Indicator
6
+ - contact_unstyled: Unstyled
6
7
 
7
8
 
8
9
  react:
9
10
  - contact_default: Default
10
11
  - contact_with_detail: Detail Indicator
12
+ - contact_unstyled: Unstyled
11
13
 
12
14
 
13
15
  swift:
@@ -1,2 +1,3 @@
1
1
  export { default as ContactDefault } from './_contact_default.jsx'
2
2
  export { default as ContactWithDetail } from './_contact_with_detail.jsx'
3
+ export { default as ContactUnstyled } from './_contact_unstyled.jsx'
@@ -1,20 +1,29 @@
1
- <%= pb_rails("date_picker", props: {
2
- mode: "range",
3
- picker_id: "quick-pick-date-range",
4
- placeholder: "Select a Date Range",
5
- selection_type: "quickpick",
6
- controls_end_id: "quick-pick-date-range-end",
7
- controls_start_id: "quick-pick-date-range-start",
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: "quick-pick-date-range-start",
12
- placeholder: "Select a Start Date",
13
- sync_start_with:"quick-pick-date-range",
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: "quick-pick-date-range-end",
18
- placeholder: "Select an End Date",
19
- sync_end_with:"quick-pick-date-range",
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 DatePicker to standard DatePickers using the following props:
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 DialogCloseable } from './_dialog_closeable.jsx'
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
- const option = e.detail;
28
- const dropdown = e.target;
29
- console.log("Selected option:", option);
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>