playbook_ui_docs 14.17.0.pre.rc.0 → 14.18.0.pre.alpha.PLAY2037selectinlinecareterror7490

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 (172) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +66 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +10 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +58 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +6 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +64 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +8 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +55 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +3 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +33 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +3 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -2
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +6 -2
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +6 -2
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +11 -4
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +7 -1
  26. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
  27. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
  28. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  29. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
  40. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
  41. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  42. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  43. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
  44. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
  45. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +2 -3
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +2 -1
  47. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.html.erb +28 -0
  48. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.jsx +42 -0
  49. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.md +1 -0
  50. data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +2 -0
  51. data/app/pb_kits/playbook/pb_circle_icon_button/docs/index.js +1 -0
  52. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +54 -0
  53. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +3 -0
  54. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.html.erb +14 -0
  55. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.md +3 -0
  56. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  57. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -1
  58. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
  59. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +4 -1
  60. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
  61. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
  62. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md +4 -0
  63. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.md +1 -1
  64. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.md +5 -1
  65. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +34 -0
  66. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.md +14 -0
  67. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +20 -0
  68. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +14 -0
  69. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
  70. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
  71. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +117 -0
  72. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +9 -0
  73. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
  74. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +43 -0
  75. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +102 -105
  76. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
  77. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +50 -48
  78. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
  79. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_react.md +1 -0
  80. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
  81. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
  82. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_react.md +5 -0
  83. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +42 -0
  84. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +1 -0
  85. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
  86. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
  87. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +12 -7
  88. data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
  89. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +5 -2
  90. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +4 -1
  91. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  92. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  93. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  94. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  95. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +41 -0
  96. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +1 -0
  97. data/app/pb_kits/playbook/pb_filter/docs/example.yml +1 -0
  98. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  99. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +39 -6
  100. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +30 -0
  101. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +1 -0
  102. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +1 -0
  103. data/app/pb_kits/playbook/pb_gauge/docs/index.js +1 -0
  104. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +394 -0
  105. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  106. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  107. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  108. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
  109. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
  110. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
  111. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  112. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  113. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  114. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  115. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +49 -0
  116. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +1 -0
  117. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +81 -0
  118. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +1 -0
  119. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  120. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  121. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  122. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  123. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +5 -0
  124. data/app/pb_kits/playbook/pb_overlay/docs/index.js +5 -0
  125. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +10 -0
  126. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +20 -0
  127. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +1 -0
  128. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +8 -1
  129. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
  130. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  131. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +46 -0
  132. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +1 -0
  133. data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
  134. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
  135. data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
  136. data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +7 -2
  137. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +3 -1
  138. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -1
  139. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +3 -1
  140. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +3 -1
  141. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  142. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  143. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  144. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  145. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  146. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  147. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
  148. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +9 -1
  149. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +94 -0
  150. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +1 -0
  151. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -0
  152. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  153. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +5 -1
  154. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +7 -1
  155. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
  156. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +6 -2
  157. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  158. data/dist/playbook-doc.js +19 -1
  159. metadata +86 -16
  160. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +0 -5
  161. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +0 -1
  162. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
  163. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
  164. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
  165. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
  166. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
  167. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
  168. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
  169. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
  170. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
  171. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
  172. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -0,0 +1,81 @@
1
+ import React, { useState } from 'react'
2
+
3
+ import Overlay from '../../pb_overlay/_overlay'
4
+ import Button from '../../pb_button/_button'
5
+ import FixedConfirmationToast from '../../pb_fixed_confirmation_toast/_fixed_confirmation_toast'
6
+
7
+ const OverlayFullscreenOpacity = () => {
8
+ const [openOpacity40, setOpenOpacity40] = useState(false)
9
+ const [openOpacity80, setOpenOpacity80] = useState(false)
10
+
11
+ const handleClickOpacity40 = () => {
12
+ setOpenOpacity40(true)
13
+ }
14
+ const handleCloseOpacity40 = () => {
15
+ setOpenOpacity40(false)
16
+ }
17
+
18
+ const handleClickOpacity80 = () => {
19
+ setOpenOpacity80(true)
20
+ }
21
+ const handleCloseOpacity80 = () => {
22
+ setOpenOpacity80(false)
23
+ }
24
+
25
+ return (
26
+ <>
27
+ <div>
28
+ <Button
29
+ onClick={handleClickOpacity40}
30
+ text="40% Opacity"
31
+ variant="secondary"
32
+ />
33
+ {' '}
34
+ <Button
35
+ onClick={handleClickOpacity80}
36
+ text="80% Opacity"
37
+ variant="secondary"
38
+ />
39
+
40
+ {openOpacity40 && (
41
+ <Overlay
42
+ fullScreen
43
+ gradient={false}
44
+ opacity="opacity_4"
45
+ >
46
+ <FixedConfirmationToast
47
+ closeable
48
+ horizontal='center'
49
+ onClose={handleCloseOpacity40}
50
+ open={openOpacity40}
51
+ status="tip"
52
+ text='Fullscreen Overlay at 40% Opacity.'
53
+ vertical='top'
54
+ />
55
+ </Overlay>
56
+ )}
57
+
58
+ {openOpacity80 && (
59
+ <Overlay
60
+ fullScreen
61
+ gradient={false}
62
+ opacity="opacity_8"
63
+ >
64
+ <FixedConfirmationToast
65
+ closeable
66
+ display="block"
67
+ horizontal='center'
68
+ onClose={handleCloseOpacity80}
69
+ open={openOpacity80}
70
+ status="tip"
71
+ text='Fullscreen Overlay at 80% Opacity.'
72
+ vertical='top'
73
+ />
74
+ </Overlay>
75
+ )}
76
+ </div>
77
+ </>
78
+ )
79
+ }
80
+
81
+ export default OverlayFullscreenOpacity
@@ -0,0 +1 @@
1
+ To enable the overlay to cover the full size of your screen, you can pass the `fullScreen` prop. You can also pass an opacity along with it.
@@ -0,0 +1,39 @@
1
+ import React from 'react'
2
+
3
+ import Overlay from '../../pb_overlay/_overlay'
4
+ import Image from '../../pb_image/_image'
5
+ import Flex from '../../pb_flex/_flex'
6
+
7
+ const OverlayGradientOpacity = () => (
8
+ <Flex
9
+ justify="around"
10
+ wrap
11
+ >
12
+ <Overlay
13
+ gradient={false}
14
+ marginBottom="xxs"
15
+ opacity="opacity_2"
16
+ >
17
+ <Image
18
+ alt="picture of a misty forest"
19
+ display="block"
20
+ maxWidth="100%"
21
+ url="https://unsplash.it/500/400/?image=634"
22
+ />
23
+ </Overlay>
24
+ <Overlay
25
+ gradient={false}
26
+ marginBottom="xxs"
27
+ opacity="opacity_8"
28
+ >
29
+ <Image
30
+ alt="picture of a misty forest"
31
+ display="block"
32
+ maxWidth="100%"
33
+ url="https://unsplash.it/500/400/?image=634"
34
+ />
35
+ </Overlay>
36
+ </Flex>
37
+ )
38
+
39
+ export default OverlayGradientOpacity
@@ -0,0 +1 @@
1
+ By default, the overlay is rendered as a gradient. Setting the `gradient` prop to `false` renders the overlay as a solid color. You can adjust the transparency of the solid overlay by using the `opacity` prop.
@@ -0,0 +1,40 @@
1
+ import React from 'react'
2
+
3
+ import Overlay from '../../pb_overlay/_overlay'
4
+ import Table from '../../pb_table/_table'
5
+
6
+
7
+ const TableExample = () => {
8
+ return (
9
+ <Table size="sm">
10
+ <thead>
11
+ <tr>
12
+ <th>{'Column 1'}</th>
13
+ <th>{'Column 2'}</th>
14
+ <th>{'Column 3'}</th>
15
+ <th>{'Column 4'}</th>
16
+ <th>{'Column 5'}</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ {Array.from({ length: 7 }, (_, index) => (
21
+ <tr key={index}>
22
+ {Array.from({ length: 5 }, (_, columnIndex) => (
23
+ <td key={columnIndex}>{`Value ${columnIndex + 1}`}</td>
24
+ ))}
25
+ </tr>
26
+ ))}
27
+ </tbody>
28
+ </Table>
29
+ )
30
+ }
31
+
32
+ const OverlayLayout = () => (
33
+ <>
34
+ <Overlay layout={{ y: "xl" }}>
35
+ <TableExample />
36
+ </Overlay>
37
+ </>
38
+ )
39
+
40
+ export default OverlayLayout
@@ -0,0 +1,5 @@
1
+ The optional `layout` prop accepts the `position` and `size` of the overlay as a key:value pair.
2
+
3
+ The `position` key accepts `bottom` (default), `top`, `y` (for both top and bottom) `right`, `left`, or `x` (for both left and right), which sets the side(s) where the `color` overlay starts. The direction of the overlay is always toward the opposite side of the position. For example, the default position of `bottom` starts the overlay on the bottom edge of your container and extends it toward the opposite side: the top.
4
+
5
+ The `size` value is `full` (100%) by default, but accepts our [spacing tokens](https://playbook.powerapp.cloud/visual_guidelines/spacing) or a percentage value as a string, and literally translates to how much of the container is covered by the overlay(s).
@@ -1,10 +1,15 @@
1
1
  examples:
2
2
  react:
3
3
  - overlay_default: Default
4
+ - overlay_gradient_opacity: Gradient & Opacity
5
+ - overlay_color: Color
6
+ - overlay_layout: Layout
4
7
  - overlay_multi_directional: Multi-directional
5
8
  - overlay_vertical_dynamic_multi_directional: Vertical Dynamic Multi-directional
6
9
  - overlay_toggle: Toggle
7
10
  - overlay_hide_scroll_bar: Hide Scroll Bar
11
+ - overlay_fullscreen_opacity: Full Page Opacity
12
+ - overlay_fullscreen_background: Full Page Using Background Color Tokens
8
13
 
9
14
  rails:
10
15
  - overlay_default: Default
@@ -1,5 +1,10 @@
1
1
  export { default as OverlayDefault } from './_overlay_default.jsx'
2
+ export { default as OverlayGradientOpacity } from './_overlay_gradient_opacity.jsx'
3
+ export { default as OverlayColor } from './_overlay_color.jsx'
4
+ export { default as OverlayLayout } from './_overlay_layout.jsx'
2
5
  export { default as OverlayMultiDirectional } from './_overlay_multi_directional.jsx'
3
6
  export { default as OverlayToggle } from './_overlay_toggle.jsx'
4
7
  export { default as OverlayVerticalDynamicMultiDirectional } from './_overlay_vertical_dynamic_multi_directional.jsx'
5
8
  export { default as OverlayHideScrollBar } from './_overlay_hide_scroll_bar.jsx'
9
+ export { default as OverlayFullscreenOpacity } from './_overlay_fullscreen_opacity.jsx'
10
+ export { default as OverlayFullscreenBackground } from './_overlay_fullscreen_background.jsx'
@@ -0,0 +1,10 @@
1
+ <%= pb_rails("phone_number_input", props: {
2
+ country_search: true,
3
+ id: "country-search",
4
+ }) %>
5
+
6
+ <%= pb_rails("phone_number_input", props: {
7
+ country_search: true,
8
+ id: "country-search-limited",
9
+ only_countries: ["br", "us", "ph", "gb"],
10
+ }) %>
@@ -0,0 +1,20 @@
1
+ import React from 'react'
2
+ import PhoneNumberInput from '../_phone_number_input'
3
+
4
+ const PhoneNumberInputCountrySearch = (props) => (
5
+ <>
6
+ <PhoneNumberInput
7
+ countrySearch
8
+ id='country-search'
9
+ {...props}
10
+ />
11
+ <PhoneNumberInput
12
+ countrySearch
13
+ id='country-search-limited'
14
+ onlyCountries={["br", "us", "ph", "gb"]}
15
+ {...props}
16
+ />
17
+ </>
18
+ )
19
+
20
+ export default PhoneNumberInputCountrySearch
@@ -0,0 +1 @@
1
+ Set `country_search` / `countrySearch` to true to allow users to search for a specific Country within the dropdown. If the range of countries has been limited, only the selected countries will be searchable.
@@ -3,6 +3,7 @@ import React, { useEffect, useState } from "react";
3
3
  import Button from '../../pb_button/_button'
4
4
  import FixedConfirmationToast from '../../pb_fixed_confirmation_toast/_fixed_confirmation_toast'
5
5
  import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
6
+ import Icon from '../../pb_icon/_icon'
6
7
 
7
8
  const PhoneNumberInputValidation = (props) => {
8
9
  const [formErrors, setFormErrors] = useState("");
@@ -29,6 +30,12 @@ const PhoneNumberInputValidation = (props) => {
29
30
  setShowFormErrors(formErrors.length > 0);
30
31
  }, [formErrors]);
31
32
 
33
+ const error = (
34
+ <>
35
+ <Icon icon="warning" /> Missing phone number.
36
+ </>
37
+ )
38
+
32
39
  return (
33
40
  <form
34
41
  action=""
@@ -43,7 +50,7 @@ const PhoneNumberInputValidation = (props) => {
43
50
  />
44
51
  )}
45
52
  <PhoneNumberInput
46
- error="Missing phone number."
53
+ error={error}
47
54
  id="validation"
48
55
  initialCountry={countryCode}
49
56
  onChange={handleOnChange}
@@ -9,6 +9,7 @@ examples:
9
9
  - phone_number_input_clear_field: Clearing the Input Field
10
10
  - phone_number_input_access_input_element: Accessing the Input Element
11
11
  - phone_number_input_format: Format as You Type
12
+ - phone_number_input_country_search: Country Search
12
13
 
13
14
  rails:
14
15
  - phone_number_input_default: Default
@@ -18,4 +19,5 @@ examples:
18
19
  - phone_number_input_validation: Form Validation
19
20
  - phone_number_input_format: Format as You Type
20
21
  - phone_number_input_hidden_inputs: Hidden Inputs
22
+ - phone_number_input_country_search: Country Search
21
23
 
@@ -6,3 +6,4 @@ export { default as PhoneNumberInputValidation } from './_phone_number_input_val
6
6
  export { default as PhoneNumberInputClearField } from './_phone_number_input_clear_field'
7
7
  export { default as PhoneNumberInputAccessInputElement } from './_phone_number_input_access_input_element'
8
8
  export { default as PhoneNumberInputFormat } from './_phone_number_input_format'
9
+ export { default as PhoneNumberInputCountrySearch } from './_phone_number_input_country_search'
@@ -0,0 +1,46 @@
1
+ <%= pb_rails("flex", props: {
2
+ dark: true,
3
+ orientation: "row",
4
+ vertical: "center",
5
+ margin_bottom: "md"
6
+ }) do %>
7
+ <%= pb_rails("body", props: { text: "Click info for more details" }) %>
8
+ &nbsp;
9
+ <%= pb_rails("circle_icon_button", props: {
10
+ variant: "secondary",
11
+ icon: "info",
12
+ id: "append-to-popover-1"
13
+ }) %>
14
+ <%= pb_rails("popover", props: {
15
+ trigger_element_id: "append-to-popover-1",
16
+ tooltip_id: "append-to-tooltip-1",
17
+ offset: true,
18
+ position: "top",
19
+ append_to: "parent",
20
+ }) do %>
21
+ I'm a popover. I have been appended to my parent element.
22
+ <% end %>
23
+ <% end %>
24
+
25
+ <%= pb_rails("flex", props: {
26
+ dark: true,
27
+ orientation: "row",
28
+ vertical: "center"
29
+ }) do %>
30
+ <%= pb_rails("body", props: { text: "Click info for more details" }) %>
31
+ &nbsp;
32
+ <%= pb_rails("circle_icon_button", props: {
33
+ variant: "secondary",
34
+ icon: "info",
35
+ id: "append-to-popover-2"
36
+ }) %>
37
+ <%= pb_rails("popover", props: {
38
+ trigger_element_id: "append-to-popover-2",
39
+ tooltip_id: "append-to-tooltip-2",
40
+ offset: true,
41
+ position: "top",
42
+ append_to: ".kit-show-wrapper",
43
+ }) do %>
44
+ I'm a popover. I have been appended to the .kit-show-wrapper.
45
+ <% end %>
46
+ <% end %>
@@ -0,0 +1 @@
1
+ By default, the popover tooltip attaches to the `<body>`. To attach it elsewhere, use the `append_to` prop. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.
@@ -6,6 +6,7 @@ examples:
6
6
  - popover_z_index: Set Z-Index
7
7
  - popover_scroll_height: Scroll and Height Settings
8
8
  - popover_actionable_content: With Actionable Content
9
+ - popover_append_to: Append To
9
10
 
10
11
  react:
11
12
  - popover_default: Default
@@ -0,0 +1 @@
1
+ To guarantee the vertical section separator displays properly, please add the `vertical: "stretch"`/`vertical="stretch"` property to the parent container (which is commonly a Flex container). This will stretch the container’s child elements vertically and ensure the section separator appears as expected.
@@ -1,5 +1,5 @@
1
1
  <%= pb_rails("select", props: {
2
- error: "Please make a valid selection",
2
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please make a valid selection"),
3
3
  label: "Favorite Food",
4
4
  name: "food",
5
5
  options: [
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import Body from '../../pb_body/_body'
3
3
  import Select from '../../pb_select/_select'
4
+ import Icon from '../../pb_icon/_icon'
4
5
 
5
6
  const SelectError = (props) => {
6
7
  const options = [
@@ -18,10 +19,14 @@ const SelectError = (props) => {
18
19
  },
19
20
  ]
20
21
 
22
+ const error = (<>
23
+ <Icon icon="warning" /> Please make a valid selection
24
+ </>)
25
+
21
26
  return (
22
27
  <div>
23
28
  <Select
24
- error="Please make a valid selection"
29
+ error={error}
25
30
  label="Favorite Food"
26
31
  name="food"
27
32
  options={options}
@@ -29,7 +34,7 @@ const SelectError = (props) => {
29
34
  {...props}
30
35
  />
31
36
  <Body
32
- error="Please make a valid selection"
37
+ error={error}
33
38
  status="negative"
34
39
  {...props}
35
40
  />
@@ -1,3 +1,5 @@
1
1
  The `collapsibleContent` can display any content, including nested Table Rows.
2
2
 
3
- Additionally, the `collapsibleSideHighlight` can also be removed by setting it to false if needed. This prop is set to true by default.
3
+ Additionally, the `collapsibleSideHighlight` can also be removed by setting it to false if needed. This prop is set to true by default.
4
+
5
+ **NOTE**: We advise against using the `disableHover` Table prop when nesting Table Rows within a Table.
@@ -1,3 +1,5 @@
1
1
  The `collapsible_content` can display any content, including nested Table Rows.
2
2
 
3
- Additionally, the `collapsible_side_highlight` can also be removed by setting it to false if needed. This prop is set to true by default.
3
+ Additionally, the `collapsible_side_highlight` can also be removed by setting it to false if needed. This prop is set to true by default.
4
+
5
+ **NOTE**: We advise against using the `disable_hover` Table prop when nesting Table Rows within a Table.
@@ -1 +1,3 @@
1
- The `collapsibleContent` can also be used to display nested Tables within each Row.
1
+ The `collapsibleContent` can also be used to display nested Tables within each Row.
2
+
3
+ **NOTE**: We advise against using the `disableHover` Table prop when nesting Tables within a Table.
@@ -1 +1,3 @@
1
- The `collapsible_content` can also be used to display nested Tables within each Row.
1
+ The `collapsible_content` can also be used to display nested Tables within each Row.
2
+
3
+ **NOTE**: We advise against using the `disable_hover` Table prop when nesting Tables within a Table.
@@ -0,0 +1,34 @@
1
+ <%= pb_rails("table", props: { size: "sm", header_style: "borderless" }) do %>
2
+ <thead>
3
+ <tr>
4
+ <th>Column 1</th>
5
+ <th>Column 2</th>
6
+ <th>Column 3</th>
7
+ <th>Column 4</th>
8
+ <th>Column 5</th>
9
+ </tr>
10
+ </thead>
11
+ <tbody>
12
+ <tr>
13
+ <td>Value 1</td>
14
+ <td>Value 2</td>
15
+ <td>Value 3</td>
16
+ <td>Value 4</td>
17
+ <td>Value 5</td>
18
+ </tr>
19
+ <tr>
20
+ <td>Value 1</td>
21
+ <td>Value 2</td>
22
+ <td>Value 3</td>
23
+ <td>Value 4</td>
24
+ <td>Value 5</td>
25
+ </tr>
26
+ <tr>
27
+ <td>Value 1</td>
28
+ <td>Value 2</td>
29
+ <td>Value 3</td>
30
+ <td>Value 4</td>
31
+ <td>Value 5</td>
32
+ </tr>
33
+ </tbody>
34
+ <% end %>
@@ -0,0 +1 @@
1
+ Customize your header by removing the header borders with the `header_style: "borderless"` prop.
@@ -0,0 +1,36 @@
1
+ <%= pb_rails("card", props: { background: "light" }) do %>
2
+ <%= pb_rails("table", props: { size: "sm", header_style: "floating" }) do %>
3
+ <%= pb_rails("table/table_head") do %>
4
+ <%= pb_rails("background", props: { background_color: "light", tag: "tr" }) do %>
5
+ <%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
6
+ <%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
7
+ <%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
8
+ <%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
9
+ <%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
10
+ <% end %>
11
+ <% end %>
12
+ <%= pb_rails("table/table_body") do %>
13
+ <%= pb_rails("table/table_row") do %>
14
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
15
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
16
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
17
+ <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
18
+ <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
19
+ <% end %>
20
+ <%= pb_rails("table/table_row") do %>
21
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
22
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
23
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
24
+ <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
25
+ <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
26
+ <% end %>
27
+ <%= pb_rails("table/table_row") do %>
28
+ <%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
29
+ <%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
30
+ <%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
31
+ <%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
32
+ <%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
33
+ <% end %>
34
+ <% end %>
35
+ <% end %>
36
+ <% end %>
@@ -0,0 +1 @@
1
+ Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/rails#table-with-background-kit) logic to give your table header a custom background color. Use the `header_style: "floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `background_color` passed to Background kit should match the `background` or `background_color` for the element in which it is nested).
@@ -1 +1 @@
1
- Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/react#table-with-background-kit) logic to give your table header a custom background color. Use the `headerStyle="floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `backgroundColor` passed to Background kit should match the `backgroundColor` for the element in which it is nested).
1
+ Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/react#table-with-background-kit) logic to give your table header a custom background color. Use the `headerStyle="floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `backgroundColor` passed to Background kit should match the `background` or `backgroundColor` for the element in which it is nested).
@@ -37,6 +37,8 @@ examples:
37
37
  - table_with_collapsible_with_nested_table_rails: Table with Collapsible with Nested Table
38
38
  - table_with_clickable_rows: Table with Clickable Rows
39
39
  - table_with_selectable_rows: Table with Selectable Rows
40
+ - table_with_header_style_borderless: Header Style Borderless
41
+ - table_with_header_style_floating: Header Style Floating
40
42
 
41
43
  react:
42
44
  - table_sm: Small
@@ -4,7 +4,7 @@
4
4
  border: true,
5
5
  icon: "user"
6
6
  },
7
- error: "Please enter a valid email address",
7
+ error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please enter a valid email address"),
8
8
  label: "Email Address",
9
9
  placeholder: "Enter email address",
10
10
  type: "email"
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from 'react'
2
2
 
3
3
  import TextInput from '../_text_input'
4
+ import Icon from '../../pb_icon/_icon'
4
5
 
5
6
  const TextInputError = (props) => {
6
7
  const [email, setEmail] = useState('')
@@ -8,11 +9,18 @@ const TextInputError = (props) => {
8
9
  const handleUpdateEmail = ({ target }) => {
9
10
  setEmail(target.value)
10
11
  }
12
+
13
+ const error = (
14
+ <>
15
+ <Icon icon="warning" /> Please enter a valid email address
16
+ </>
17
+ )
18
+
11
19
  return (
12
20
  <div>
13
21
  <TextInput
14
22
  addOn={{ icon: 'user', alignment: 'left', border: true }}
15
- error="Please enter a valid email address"
23
+ error={error}
16
24
  label="Email Address"
17
25
  onChange={handleUpdateEmail}
18
26
  placeholder="Enter email address"
@@ -0,0 +1,94 @@
1
+ import React, { useState } from 'react'
2
+
3
+ import TextInput from '../../pb_text_input/_text_input'
4
+
5
+ const TextInputSanitize = (props) => {
6
+ const ref = React.createRef()
7
+
8
+ const [currency, setCurrency] = useState('')
9
+ const [sanitizedCurrency, setSanitizedCurrency] = useState('')
10
+ const handleOnChangeSanitizeCurrency = ({ target }, sanitizedValue) => {
11
+ setCurrency(target.value)
12
+ setSanitizedCurrency(sanitizedValue);
13
+ }
14
+
15
+ const [creditCard, setCreditCard] = useState('')
16
+ const [sanitizedCreditCard, setSanitizedCreditCard] = useState('')
17
+ const handleOnChangeSanitizeCC = ({ target }, sanitizedValue) => {
18
+ setCreditCard(target.value)
19
+ setSanitizedCreditCard(sanitizedValue);
20
+ }
21
+
22
+ const [ssn, setSSN] = useState('')
23
+ const [sanitizedSSN, setSanitizedSSN] = useState('')
24
+ const handleOnChangeSanitizeSSN = ({ target }, sanitizedValue) => {
25
+ setSSN(target.value)
26
+ setSanitizedSSN(sanitizedValue);
27
+ }
28
+
29
+ return (
30
+ <div>
31
+ <TextInput
32
+ label="Currency"
33
+ mask="currency"
34
+ onChange={handleOnChangeSanitizeCurrency}
35
+ placeholder="Enter Amount"
36
+ ref={ref}
37
+ value={currency}
38
+ {...props}
39
+ />
40
+
41
+ {currency !== "" && (
42
+ <React.Fragment>{`The masked value is: ${currency}`}</React.Fragment>
43
+ )}
44
+ <br />
45
+ {sanitizedCurrency !== "" && (
46
+ <React.Fragment>{`The sanitized value is: ${sanitizedCurrency}`}</React.Fragment>
47
+ )}
48
+
49
+ <br />
50
+ <br />
51
+
52
+ <TextInput
53
+ label="Credit Card"
54
+ mask="creditCard"
55
+ onChange={handleOnChangeSanitizeCC}
56
+ placeholder="Enter Card"
57
+ ref={ref}
58
+ value={creditCard}
59
+ {...props}
60
+ />
61
+
62
+ {creditCard !== "" && (
63
+ <React.Fragment>{`The masked value is: ${creditCard}`}</React.Fragment>
64
+ )}
65
+ <br />
66
+ {sanitizedCreditCard !== "" && (
67
+ <React.Fragment>{`The sanitized value is: ${sanitizedCreditCard}`}</React.Fragment>
68
+ )}
69
+
70
+ <br />
71
+ <br />
72
+
73
+ <TextInput
74
+ label="SSN"
75
+ mask="ssn"
76
+ onChange={handleOnChangeSanitizeSSN}
77
+ placeholder="Enter Amount"
78
+ ref={ref}
79
+ value={ssn}
80
+ {...props}
81
+ />
82
+
83
+ {ssn !== "" && (
84
+ <React.Fragment>{`The masked value is: ${ssn}`}</React.Fragment>
85
+ )}
86
+ <br />
87
+ {sanitizedSSN !== "" && (
88
+ <React.Fragment>{`The sanitized value is: ${sanitizedSSN}`}</React.Fragment>
89
+ )}
90
+ </div>
91
+ )
92
+ }
93
+
94
+ export default TextInputSanitize