playbook_ui_docs 14.17.0.pre.alpha.play1735highchartscirclechartdefaultrebuild7372 → 14.17.0.pre.alpha.play1906overlaykitaddopacityandgradient7201

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -7
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -5
  10. data/app/pb_kits/playbook/pb_background/docs/example.yml +0 -1
  11. data/app/pb_kits/playbook/pb_background/docs/index.js +0 -1
  12. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
  13. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
  14. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
  15. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
  16. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
  17. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
  18. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
  20. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
  21. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
  22. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
  23. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
  24. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
  25. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +3 -2
  26. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -2
  27. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -1
  28. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
  29. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
  30. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  31. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
  32. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +6 -39
  33. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -1
  34. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -1
  35. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
  36. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  37. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +9 -1
  38. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -5
  39. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -5
  40. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +1 -3
  41. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +1 -3
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -3
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -3
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  45. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -2
  46. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -2
  47. data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
  48. data/dist/playbook-doc.js +1 -19
  49. metadata +2 -40
  50. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +0 -66
  51. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +0 -10
  52. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +0 -58
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +0 -6
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
  56. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
  57. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
  58. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
  59. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
  60. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +0 -35
  61. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +0 -1
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
  64. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
  65. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
  66. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +0 -117
  67. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +0 -9
  68. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +0 -42
  69. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +0 -1
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -30
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +0 -1
  72. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
  73. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
  74. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +0 -49
  75. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +0 -1
  76. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +0 -81
  77. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +0 -1
  78. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
  79. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
  80. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
  81. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
  82. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +0 -34
  83. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +0 -1
  84. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +0 -36
  85. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +0 -1
  86. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +0 -94
  87. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +0 -1
@@ -1,117 +0,0 @@
1
- <%= pb_rails("flex", props:{ gap: "xs", wrap:true}) do %>
2
- <%= pb_rails("button", props: { id: "button-open-example-turbo-frames", margin_right: "md", text: "Open Dialog via Custom Event" }) %>
3
- <%= pb_rails("button", props: { id: "open-dialog-button", data: { open_dialog: "dialog-confirm-turbo-frames" }, margin_right: "md", text: "Custom Event Linked to Confirm Button" }) %>
4
- <%= pb_rails("button", props: { id: "button-open-multi-dialog", text: "Mutliple Events Example" }) %>
5
- <% end %>
6
-
7
- <!-- Example 1: Basic dialog with custom event opening -->
8
- <%= pb_rails("dialog", props: {
9
- id: "dialog-open-turbo-frames",
10
- title: "Click Event Simulation",
11
- text: "Demonstrating Opening the Dialog with a Custom Event.",
12
- custom_event_type: "dialogOpen",
13
- cancel_button: "Cancel Button",
14
- confirm_button: "Okay",
15
- confirm_button_id: "confirm-button-turbo-frames"
16
- }) %>
17
-
18
- <script>
19
- document.getElementById("button-open-example-turbo-frames").addEventListener("click", () => {
20
- console.log("📣 Dispatching 'dialogOpen' custom event")
21
-
22
- window.dispatchEvent(new CustomEvent("dialogOpen", {
23
- bubbles: true,
24
- detail: {
25
- dialogId: "dialog-open-turbo-frames",
26
- action: "open"
27
- }
28
- }))
29
-
30
- console.log("✅ Custom event dispatched - dialog should open")
31
- })
32
- </script>
33
-
34
- <!-- Example 2: Dialog with custom event linking confirm button to closing the dialog-->
35
- <%= pb_rails("dialog", props: {
36
- id: "dialog-confirm-turbo-frames",
37
- title: "Custom Event Button Action",
38
- text: "Clicking this dialog's confirm button triggers closing the dialog as well.",
39
- custom_event_type: "turboResponse",
40
- cancel_button: "Cancel",
41
- cancel_button_id: "cancel-button-id-turbo-frames",
42
- confirm_button: "Confirm Button",
43
- confirm_button_id: "confirm-button-id-turbo-frames"
44
- }) %>
45
-
46
- <script>
47
- window.addEventListener("turboResponse", (event) => {
48
- const { dialogId, action, cancelButtonId } = event.detail || {}
49
- console.log("📦 turboResponse event triggered:", { dialogId, action, cancelButtonId })
50
-
51
- if (action === "close" && cancelButtonId) {
52
- const dialog = document.getElementById(dialogId)
53
- if (dialog?.close) {
54
- console.log("🚪 Closing dialog programmatically")
55
- dialog.close()
56
- }
57
- }
58
- })
59
-
60
- document.getElementById("confirm-button-id-turbo-frames").addEventListener("click", function () {
61
- console.log("✅ Confirm button clicked! Triggering cancel via turboResponse")
62
-
63
- window.dispatchEvent(new CustomEvent("turboResponse", {
64
- detail: {
65
- dialogId: "dialog-confirm-turbo-frames",
66
- action: "close",
67
- cancelButtonId: "cancel-button-id-turbo-frames"
68
- }
69
- }))
70
- })
71
- </script>
72
-
73
- <!-- Example 3: Dialog with multiple custom event types -->
74
- <%= pb_rails("dialog", props: {
75
- id: "multi-event-dialog",
76
- title: "Multiple Event Types",
77
- text: "This dialog responds to multiple custom event types - see console logs.",
78
- custom_event_type: "dialogOpenMutli,turboResponseMulti",
79
- cancel_button: "Cancel",
80
- cancel_button_id: "multi-event-cancel",
81
- confirm_button: "Confirm",
82
- confirm_button_id: "multi-event-confirm"
83
- }) %>
84
-
85
- <script>
86
- document.getElementById("button-open-multi-dialog").addEventListener("click", () => {
87
- console.log("📣 Dispatching 'dialogOpenMutli' custom event")
88
- window.dispatchEvent(new CustomEvent("dialogOpenMutli", {
89
- detail: {
90
- dialogId: "multi-event-dialog",
91
- action: "open"
92
- }
93
- }))
94
- })
95
-
96
- document.getElementById("multi-event-confirm")?.addEventListener("click", function() {
97
- console.log("✅ Confirm clicked — dispatching 'turboResponseMulti' to simulate dialog close")
98
-
99
- window.dispatchEvent(new CustomEvent("turboResponseMulti", {
100
- detail: {
101
- dialogId: "multi-event-dialog",
102
- action: "close",
103
- cancelButtonId: "multi-event-cancel"
104
- }
105
- }))
106
- })
107
-
108
- window.addEventListener("turboResponseMulti", (event) => {
109
- const { dialogId, action, cancelButtonId } = event.detail || {}
110
-
111
- if (action === "close" && dialogId) {
112
- const dialog = document.getElementById(dialogId)
113
- dialog.close?.()
114
- console.log("🚪 Closing dialog programmatically")
115
- }
116
- })
117
- </script>
@@ -1,9 +0,0 @@
1
- The `custom_event_type` prop allows you to specify custom events that will trigger the dialog's initialization or control its behavior. This is especially useful when working with Turbo Frame updates where standard DOM events might not suffice.
2
-
3
- The examples demonstrate two use cases:
4
- 1) Opening a dialog via custom event dispatch: The first example shows how to configure a dialog to listen for a specific custom event (dialogOpen). When this event is dispatched, the dialog will automatically open, making it easy to trigger the dialog from JavaScript or after Turbo Frame operations.
5
- 2) Controlling dialog button actions with custom events: The second example demonstrates how to set up a dialog that can have its confirm button triggered through external events (turboResponse). This pattern is useful when you need to programmatically confirm a dialog after some background operation completes.
6
- 3) Multiple custom events: The third example combines the first two to show how `custom_event_type` prop can support multiple event types separated by a comma.
7
-
8
- For Turbo integration, you can use standard Turbo events like turbo:frame-load or turbo:submit-end as your `custom_event_type` to ensure the dialog responds properly after Turbo navigation or form submissions. The dialog component will listen for these events automatically.
9
- The implementation handles various actions including 'open', 'close', 'clickConfirm', and 'clickCancel', making it flexible for different interaction patterns in your Turbo-enhanced application.
@@ -1,42 +0,0 @@
1
- <% initial_items = [
2
- {
3
- id: "100",
4
- url: "https://unsplash.it/500/400/?image=638",
5
- },
6
- {
7
- id: "200",
8
- url: "https://unsplash.it/500/400/?image=639",
9
- },
10
- {
11
- id: "300",
12
- url: "https://unsplash.it/500/400/?image=640",
13
- },
14
- ] %>
15
-
16
- <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
17
- <%= pb_rails("draggable/draggable_container") do %>
18
- <%= pb_rails("flex") do %>
19
- <% initial_items.each do |item| %>
20
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
21
- <%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url], margin: "xs" }) %>
22
- <% end %>
23
- <% end %>
24
- <% end %>
25
- <% end %>
26
- <% end %>
27
-
28
- <script>
29
- const itemIds = ["item_100", "item_200", "item_300"];
30
-
31
- itemIds.forEach((id) => {
32
- const element = document.getElementById(id);
33
- if (element) {
34
- element.addEventListener("dragstart", (event) => {
35
- console.log(`${id} drag start!`);
36
- });
37
- element.addEventListener("dragend", (event) => {
38
- console.log(`${id} drag end!`);
39
- });
40
- }
41
- });
42
- </script>
@@ -1 +0,0 @@
1
- You can add drag event listeners for `drag`, `dragend`, `dragenter`, `dragleave`, `dragover`, `dragstart`, and `drop`.
@@ -1,30 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
-
8
- HighchartsMore(Highcharts);
9
- SolidGauge(Highcharts);
10
-
11
- const data = [{ name: "Name", y: 45 }]
12
-
13
- const baseOptions = {
14
- series: [{ data: data }],
15
- };
16
-
17
- const GaugePbStyles = () => {
18
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
19
-
20
- return (
21
- <div>
22
- <HighchartsReact
23
- highcharts={Highcharts}
24
- options={options}
25
- />
26
- </div>
27
- );
28
- };
29
-
30
- export default GaugePbStyles;
@@ -1 +0,0 @@
1
- You don't need to use the Gauge Kit to apply Playbook styles to your Highcharts gauge chart. Just import gaugeTheme.ts and merge it with your chart options—Playbook’s styling will apply automatically.
@@ -1,63 +0,0 @@
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 OverlayColor = () => (
8
- <Flex
9
- justify="around"
10
- wrap
11
- >
12
- <Overlay
13
- color="black"
14
- marginBottom="xxs"
15
- >
16
- <Image
17
- alt="picture of a misty forest"
18
- display="block"
19
- size="xl"
20
- url="https://unsplash.it/500/400/?image=634"
21
- />
22
- </Overlay>
23
- <Overlay
24
- color="black"
25
- gradient={false}
26
- marginBottom="xxs"
27
- opacity="opacity_4"
28
- >
29
- <Image
30
- alt="picture of a misty forest"
31
- display="block"
32
- size="xl"
33
- url="https://unsplash.it/500/400/?image=634"
34
- />
35
- </Overlay>
36
- <Overlay
37
- color="error"
38
- marginBottom="xxs"
39
- >
40
- <Image
41
- alt="picture of a misty forest"
42
- display="block"
43
- size="xl"
44
- url="https://unsplash.it/500/400/?image=634"
45
- />
46
- </Overlay>
47
- <Overlay
48
- color="error"
49
- gradient={false}
50
- marginBottom="xxs"
51
- opacity="opacity_4"
52
- >
53
- <Image
54
- alt="picture of a misty forest"
55
- display="block"
56
- size="xl"
57
- url="https://unsplash.it/500/400/?image=634"
58
- />
59
- </Overlay>
60
- </Flex>
61
- )
62
-
63
- export default OverlayColor
@@ -1,3 +0,0 @@
1
- The `color` prop is used to change the color of the solid or gradient mask. Gradient overlays always start opaque and fade to transparent.
2
-
3
- NOTE: Images are set to `display: block` to remove the default inline spacing caused by line height. This ensures the image fully fills the container without unexpected gaps.
@@ -1,49 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Overlay from '../../pb_overlay/_overlay'
3
- import Button from '../../pb_button/_button'
4
- import FixedConfirmationToast from '../../pb_fixed_confirmation_toast/_fixed_confirmation_toast'
5
-
6
- const OverlayFullscreenBackground = () => {
7
- const [openBackground, setOpenBackground] = useState(false)
8
-
9
- const handleClickBackground = () => {
10
- setOpenBackground(true)
11
- }
12
-
13
- const handleCloseBackground = () => {
14
- setOpenBackground(false)
15
- }
16
-
17
- return (
18
- <>
19
- <div>
20
- <Button
21
- onClick={handleClickBackground}
22
- text="Background Dark"
23
- variant="secondary"
24
- />
25
-
26
- {openBackground && (
27
- <Overlay
28
- color="bg_dark"
29
- fullScreen
30
- gradient={false}
31
- opacity="opacity_4"
32
- >
33
- <FixedConfirmationToast
34
- closeable
35
- horizontal='center'
36
- onClose={handleCloseBackground}
37
- open={openBackground}
38
- status="tip"
39
- text='Fullscreen Overlay with color set to Background Dark.'
40
- vertical='top'
41
- />
42
- </Overlay>
43
- )}
44
- </div>
45
- </>
46
- )
47
- }
48
-
49
- export default OverlayFullscreenBackground
@@ -1 +0,0 @@
1
- The `fullScreen` prop also allows you to use `color` along with it.
@@ -1,81 +0,0 @@
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
@@ -1 +0,0 @@
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.
@@ -1,39 +0,0 @@
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
@@ -1 +0,0 @@
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.
@@ -1,40 +0,0 @@
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
@@ -1,5 +0,0 @@
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,34 +0,0 @@
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 %>
@@ -1 +0,0 @@
1
- Customize your header by removing the header borders with the `header_style: "borderless"` prop.
@@ -1,36 +0,0 @@
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 %>
@@ -1 +0,0 @@
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).