playbook_ui_docs 15.3.0.pre.alpha.PLAY2630fctearlyautoClose12133 → 15.3.0.pre.alpha.PLAY258611978

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 (24) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +0 -4
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +1 -3
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +0 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +0 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +0 -2
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +1 -9
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +0 -16
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -1
  14. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
  15. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
  16. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +1 -15
  17. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +8 -9
  18. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +10 -11
  19. data/dist/playbook-doc.js +1 -1
  20. metadata +3 -6
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.html.erb +0 -104
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.md +0 -1
  23. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +0 -1
  24. /data/app/pb_kits/playbook/pb_date_picker/docs/{_date_picker_and_dropdown_range.md → _date_picker_and_dropdown_range..md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68dd23591f42cb6e4c08a0fcc4d96055b209a2292c4c95d2157075ad8949296b
4
- data.tar.gz: a8d758793494a1e56fe6f45a67e3a632b08dbf3dc5eeffe2d7a3abd987419d95
3
+ metadata.gz: 8c994cc038b61b9cb95b90263a316823a5c7a26cc5b308abf6a0c4f4546b754c
4
+ data.tar.gz: 7b58d77602441179ffaaf67a71062229264c2071b9b9079596f1e3b6ac08f8de
5
5
  SHA512:
6
- metadata.gz: 78261cbe2c12298fe264ac6d49e5a67ae3b12d2395dbd45c05aef79d4a1a783301fbb21e5179ee2b772299d2756764f499e73edd0eb00ac9d82d5899964b6ef3
7
- data.tar.gz: d0c44630ab93c9c9455237099016a38716afaa90efc43a335064e630154e83276df08260bdd31ecddffbd2ffc3b926d56390c1b8534e705304d4c71a3ab5d31d
6
+ metadata.gz: '09d3c0ea52feee68d35e8756de6464c409a9e8f2ff531d1a316c7529e49c09fb30d77580c7e67db22a9eb73c5663830755e3e43b4234d1f39e724a6bf21fc1b7'
7
+ data.tar.gz: 33fe6882d960ec21a094d1d40699cbfc0ec8fd2faef8db897722e7a73fba4ea235ba0addd8fbe56588d4bffbc36038d7bfcf0d5aaf1eb9f129e4982e1b9580ca
@@ -26,10 +26,6 @@
26
26
  {
27
27
  accessor: "classCompletionRate",
28
28
  label: "Class Completion Rate",
29
- column_styling: {
30
- cell_background_color: "category_1",
31
- font_color: "white"
32
- }
33
29
  },
34
30
  {
35
31
  accessor: "graduatedStudents",
@@ -1 +1 @@
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 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.
@@ -1,8 +1,7 @@
1
1
  import React from "react"
2
- import { AdvancedTable, colors } from "playbook-ui"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
3
  import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
-
6
5
  const AdvancedTableColumnStyling = (props) => {
7
6
  const columnDefinitions = [
8
7
  {
@@ -35,7 +34,6 @@ const AdvancedTableColumnStyling = (props) => {
35
34
  {
36
35
  accessor: "graduatedStudents",
37
36
  label: "Graduated Students",
38
- columnStyling:{fontColor: colors.data_8},
39
37
  },
40
38
  ]
41
39
 
@@ -4,6 +4,4 @@ The `columnStyling` prop is an optional item that can be used within `columnDefi
4
4
 
5
5
  2) `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
6
6
 
7
- 3) `fontColor`: This will allow you to control the font color for a given column.
8
-
9
7
  `columnStyling` can be used within the columnDefinition of all the columns or some of them, as shown. Each column has its own individual control in this way.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { AdvancedTable } from "playbook-ui";
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table';
3
3
  import MOCK_DATA from "./advanced_table_mock_data.json";
4
4
 
5
5
  const AdvancedTableColumnStylingColumnHeaders = (props) => {
@@ -29,7 +29,6 @@
29
29
  {
30
30
  accessor: "graduatedStudents",
31
31
  label: "Graduated Students",
32
- column_styling: { font_color: "red" }
33
32
  }
34
33
  ] %>
35
34
 
@@ -4,6 +4,4 @@ The `column_styling` prop is an optional item that can be used within `column_de
4
4
 
5
5
  2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
6
6
 
7
- 3) `font_color`: This will allow you to control the font color for a given column.
8
-
9
7
  `column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
@@ -22,6 +22,7 @@ const AdvancedTablePaddingControl = (props) => {
22
22
  {value}
23
23
  </Background>
24
24
  ),
25
+
25
26
  },
26
27
  {
27
28
  accessor: "scheduledMeetings",
@@ -38,15 +39,6 @@ const AdvancedTablePaddingControl = (props) => {
38
39
  {
39
40
  accessor: "classCompletionRate",
40
41
  label: "Class Completion Rate",
41
- columnStyling:{cellPadding: "none", fontColor: "white"},
42
- customRenderer: (row, value) => (
43
- <Background
44
- backgroundColor={"category_1"}
45
- padding="xs"
46
- >
47
- {value}
48
- </Background>
49
- ),
50
42
  },
51
43
  {
52
44
  accessor: "graduatedStudents",
@@ -1,3 +1,3 @@
1
1
  `columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
2
2
 
3
- This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here. Use `fontColor` to achieve better contrast between cell content and background for darker backgrounds.
3
+ This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
@@ -76,22 +76,6 @@ const columnDefinitions = [
76
76
  {
77
77
  label: "Attendance",
78
78
  id: "attendance",
79
- header: () => (
80
- <Flex alignItems="center"
81
- justifyContent="center"
82
- >
83
- <Caption marginRight="xs">Attendance</Caption>
84
- <Tooltip placement="top"
85
- text="Whoa. I'm a Tooltip Too!"
86
- zIndex={10}
87
- >
88
- <Icon cursor="pointer"
89
- icon="info"
90
- size="xs"
91
- />
92
- </Tooltip>
93
- </Flex>
94
- ),
95
79
  columns: [
96
80
  {
97
81
  accessor: "attendanceRate",
@@ -12,7 +12,7 @@
12
12
  capture do
13
13
  pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
14
14
  pb_rails("caption", props: { margin_right: "xs", text: "New Enrollments" }) +
15
- pb_rails("icon", props: { id: "tooltip-interact", icon: "info", size: "xs", cursor: "pointer" }) +
15
+ pb_rails("icon", props: { id: "tooltip-interact", icon: "info", size: "xs" }) +
16
16
  pb_rails("tooltip", props: {
17
17
  trigger_element_id: "tooltip-interact",
18
18
  tooltip_id: "example-custom-tooltip",
@@ -11,7 +11,6 @@ examples:
11
11
  - advanced_table_responsive: Responsive Tables
12
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
13
13
  - advanced_table_with_custom_header_rails: Custom Header Cell
14
- - advanced_table_with_custom_header_multi_header_rails: Custom Header with Multiple Headers
15
14
  - advanced_table_column_headers: Multi-Header Columns
16
15
  - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
17
16
  - advanced_table_column_headers_vertical_border: Multi-Header Columns with Vertical Borders
@@ -7,7 +7,7 @@
7
7
  }) %>
8
8
 
9
9
  <%= pb_rails("currency", props: {
10
- amount: 342,
10
+ amount: "342",
11
11
  label: "Light",
12
12
  margin_bottom: "md",
13
13
  size: "sm",
@@ -14,7 +14,7 @@ const CurrencyVariants = (props) => {
14
14
  {...props}
15
15
  />
16
16
  <Currency
17
- amount={342}
17
+ amount="342"
18
18
  label="Light"
19
19
  marginBottom="md"
20
20
  size="sm"
@@ -22,27 +22,13 @@
22
22
  }) %>
23
23
 
24
24
  <script>
25
- // Hide toasts immediately
26
- const hideAutoToasts = () => {
27
- const toastAuto = document.getElementById('toast-auto-close');
28
- const toastAutoCloseable = document.getElementById('toast-auto-close-closeable');
29
- if (toastAuto) toastAuto.style.display = 'none';
30
- if (toastAutoCloseable) toastAutoCloseable.style.display = 'none';
31
- }
32
- hideAutoToasts();
33
-
34
- // Handle various page load/restore events
35
- window.addEventListener('pageshow', hideAutoToasts)
36
- document.addEventListener('turbolinks:load', hideAutoToasts)
37
- document.addEventListener('turbo:load', hideAutoToasts)
38
-
39
25
  document.addEventListener('DOMContentLoaded', () => {
40
26
  // Initialize toast elements and buttons
41
27
  const toasts = {
42
28
  '#toast-auto-close': document.querySelector("#toast-auto-close"),
43
29
  '#toast-auto-close-closeable': document.querySelector("#toast-auto-close-closeable")
44
30
  }
45
-
31
+
46
32
  const buttons = {
47
33
  '#toast-auto-close': document.querySelector("button[data-toast='#toast-auto-close']"),
48
34
  '#toast-auto-close-closeable': document.querySelector("button[data-toast='#toast-auto-close-closeable']")
@@ -24,6 +24,7 @@
24
24
  horizontal: "center"
25
25
  }) %>
26
26
 
27
+
27
28
  <script type="text/javascript">
28
29
  const multitoasts = document.querySelectorAll(".multitoast-to-hide")
29
30
  const multibuttons = document.querySelectorAll("button[data-multitoast]")
@@ -34,15 +35,6 @@
34
35
  })
35
36
  }
36
37
 
37
- // Hide toasts immediately
38
- hideMultiToasts()
39
-
40
- // Handle various page load/restore events
41
- window.addEventListener('pageshow', hideMultiToasts)
42
- document.addEventListener('DOMContentLoaded', hideMultiToasts)
43
- document.addEventListener('turbolinks:load', hideMultiToasts)
44
- document.addEventListener('turbo:load', hideMultiToasts)
45
-
46
38
  multibuttons.forEach((button) => {
47
39
  button.onclick = () => {
48
40
  hideMultiToasts()
@@ -54,3 +46,10 @@
54
46
  }
55
47
  })
56
48
  </script>
49
+
50
+ <!-- hiding toast on page load -->
51
+ <style>
52
+ #toast-long, #toast-short {
53
+ display: none;
54
+ }
55
+ </style>
@@ -69,28 +69,27 @@
69
69
  const toasts = document.querySelectorAll(".toast-to-hide")
70
70
  const buttons = document.querySelectorAll("button[data-toast]")
71
71
 
72
- const hidePositionToasts = () => {
72
+ const hideToasts = () => {
73
73
  toasts.forEach((toast) => {
74
74
  toast.style.display = "none"
75
75
  })
76
76
  }
77
77
 
78
- // Hide toasts immediately
79
- hidePositionToasts()
80
-
81
- // Handle various page load/restore events
82
- window.addEventListener('pageshow', hidePositionToasts)
83
- document.addEventListener('DOMContentLoaded', hidePositionToasts)
84
- document.addEventListener('turbolinks:load', hidePositionToasts)
85
- document.addEventListener('turbo:load', hidePositionToasts)
86
-
87
78
  buttons.forEach((button) => {
88
79
  button.onclick = () => {
89
- hidePositionToasts()
80
+ hideToasts()
90
81
  let toast = document.querySelector(button.getAttribute("data-toast"))
82
+
91
83
  if (toast) {
92
84
  toast.style.display = "flex"
93
85
  }
94
86
  }
95
87
  })
96
88
  </script>
89
+
90
+ <!-- hiding toast on page load -->
91
+ <style>
92
+ #toast-top-center, #toast-top-right, #toast-top-left, #toast-bottom-center, #toast-bottom-right, #toast-bottom-left {
93
+ display: none;
94
+ }
95
+ </style>