playbook_ui 14.23.0.pre.rc.3 → 14.24.0.pre.alpha.PLAY1972validatemissingareacodeandrepeatcountrycode9457

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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +7 -6
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +24 -25
  5. data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +10 -10
  6. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +11 -12
  7. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +7 -4
  8. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +112 -2
  10. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +13 -7
  11. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +14 -2
  13. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +34 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/advanced_table_action_bar.js +16 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb +43 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +64 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.html.erb +46 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +7 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header_rails.html.erb +1 -1
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +1 -1
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column.jsx +55 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column.md +6 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column_for_multi_column.jsx +80 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column_for_multi_column.md +1 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md +1 -1
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +107 -0
  27. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md +1 -0
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +51 -0
  29. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md +1 -0
  30. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +7 -0
  31. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -0
  32. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +4 -11
  33. data/app/pb_kits/playbook/pb_advanced_table/index.js +108 -125
  34. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +7 -1
  35. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +7 -4
  36. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -1
  37. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +46 -4
  38. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +13 -4
  39. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +24 -5
  40. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +1 -1
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +1 -1
  42. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +12 -1
  43. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
  44. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +2 -1
  45. data/app/pb_kits/playbook/pb_checkbox/index.js +218 -26
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +1 -1
  47. data/app/pb_kits/playbook/pb_date/_date.tsx +5 -3
  48. data/app/pb_kits/playbook/pb_date/date.html.erb +6 -6
  49. data/app/pb_kits/playbook/pb_date/date.rb +2 -0
  50. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +4 -0
  51. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +17 -0
  52. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +1 -0
  53. data/app/pb_kits/playbook/pb_date/docs/example.yml +2 -0
  54. data/app/pb_kits/playbook/pb_date/docs/index.js +1 -0
  55. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +17 -1
  56. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +6 -0
  57. data/app/pb_kits/playbook/pb_dropdown/_dropdown_mixin.scss +36 -0
  58. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +90 -0
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +4 -0
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +1 -0
  61. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
  62. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +3 -2
  63. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  64. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +24 -0
  65. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +11 -1
  66. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +1 -0
  67. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +32 -15
  68. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +2 -0
  69. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +35 -9
  70. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +1 -0
  71. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +26 -14
  72. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +32 -15
  73. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +45 -17
  74. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +59 -22
  75. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +40 -9
  76. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +50 -18
  77. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +31 -18
  78. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +34 -17
  79. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +64 -23
  80. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +1 -0
  81. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -1
  82. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -1
  83. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +7 -1
  84. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +1 -3
  85. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +36 -17
  86. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +3 -0
  87. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +31 -16
  88. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +63 -31
  89. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +3 -0
  90. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +35 -16
  91. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +41 -16
  92. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +107 -62
  93. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +4 -7
  94. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -1
  95. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -1
  96. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +16 -1
  97. data/app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx +18 -9
  98. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +3 -1
  99. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.html.erb +75 -0
  100. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.jsx +94 -0
  101. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.md +3 -0
  102. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -1
  103. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +3 -0
  104. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +4 -0
  105. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md +3 -1
  106. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +3 -1
  107. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +14 -1
  108. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb +10 -0
  109. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx +26 -0
  110. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md +3 -0
  111. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
  112. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  113. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
  114. data/app/pb_kits/playbook/pb_select/select.rb +4 -2
  115. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +1 -0
  116. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +49 -1
  117. data/dist/chunks/_line_graph-qk_BN_J0.js +1 -0
  118. data/dist/chunks/_typeahead-ZLTFtAoW.js +6 -0
  119. data/dist/chunks/_weekday_stacked-svceGyvR.js +37 -0
  120. data/dist/chunks/lib-CY5ZPzic.js +29 -0
  121. data/dist/chunks/{pb_form_validation-BUOKwfvW.js → pb_form_validation-D3b0JKHH.js} +1 -1
  122. data/dist/chunks/vendor.js +1 -1
  123. data/dist/menu.yml +3 -10
  124. data/dist/playbook-doc.js +2 -2
  125. data/dist/playbook-rails-react-bindings.js +1 -1
  126. data/dist/playbook-rails.js +1 -1
  127. data/dist/playbook.css +1 -1
  128. data/lib/playbook/version.rb +2 -2
  129. metadata +41 -26
  130. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -30
  131. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +0 -1
  132. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +0 -52
  133. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +0 -1
  134. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.scss +0 -0
  135. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +0 -202
  136. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +0 -69
  137. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +0 -71
  138. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +0 -110
  139. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +0 -76
  140. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +0 -76
  141. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +0 -76
  142. data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +0 -10
  143. data/app/pb_kits/playbook/pb_walkthrough/docs/index.js +0 -6
  144. data/app/pb_kits/playbook/pb_walkthrough/walkthrough.test.jsx +0 -34
  145. data/dist/chunks/_circle_chart-BZmlhBs2.js +0 -1
  146. data/dist/chunks/_typeahead-B1tu_vWi.js +0 -22
  147. data/dist/chunks/_weekday_stacked-CKk0dR5s.js +0 -45
  148. data/dist/chunks/lib-DYpq0k8j.js +0 -29
  149. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_row_styling.md → _advanced_table_row_styling_react.md} +0 -0
  150. /data/app/pb_kits/playbook/pb_gauge/docs/{_gauge_colors.md → _gauge_colors_rails.md} +0 -0
  151. /data/app/pb_kits/playbook/pb_gauge/docs/{_gauge_complex.md → _gauge_complex_rails.md} +0 -0
  152. /data/app/pb_kits/playbook/pb_line_graph/docs/{_line_graph_colors.md → _line_graph_colors_rails.md} +0 -0
@@ -1,110 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Button from '../../pb_button/_button'
3
- import Walkthrough from '../../pb_walkthrough/_walkthrough'
4
-
5
- const WalkthroughMultiBeacon = (props) => {
6
- const [stateA, setStateA] = useState({
7
- run: false,
8
- steps: [
9
- {
10
- title: 'Example title',
11
- content:
12
- 'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
13
- target: '.exampleMulti',
14
- },
15
- ],
16
- })
17
-
18
- const [stateB, setStateB] = useState({
19
- run: false,
20
- steps: [
21
- {
22
- title: 'Toggle',
23
- content:
24
- 'By default the walkthrough kit will cycle through each step provided.',
25
- target: '.pb_toggle_control',
26
- },
27
- ],
28
- })
29
-
30
- const [stateC, setStateC] = useState({
31
- run: false,
32
- steps: [
33
- {
34
- title: 'Top Nav',
35
- content:
36
- 'By default the walkthrough kit will cycle through each step provided.',
37
- target: '.pb--page--topNav',
38
- },
39
- ],
40
- })
41
-
42
- return (
43
- <div>
44
- <div
45
- className="exampleMulti"
46
- style={{ 'display': 'inline' }}
47
- >
48
- {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
49
- </div>
50
- <br />
51
- <br />
52
- <Button
53
- onClick={() => {
54
- setStateA({
55
- ...stateA,
56
- run: true,
57
- })
58
- setStateB({
59
- ...stateB,
60
- run: true,
61
- })
62
- setStateC({
63
- ...stateC,
64
- run: true,
65
- })
66
- }}
67
- >
68
- {'Start Tour'}
69
- </Button>
70
- <br />
71
- <br />
72
- <Button
73
- onClick={() => {
74
- setStateA({
75
- ...stateA,
76
- run: false,
77
- })
78
- setStateB({
79
- ...stateB,
80
- run: false,
81
- })
82
- setStateC({
83
- ...stateC,
84
- run: false,
85
- })
86
- }}
87
- >
88
- {'Reset/Stop Tour'}
89
- </Button>
90
-
91
- <Walkthrough
92
- run={stateA.run}
93
- steps={stateA.steps}
94
- {...props}
95
- />
96
- <Walkthrough
97
- run={stateB.run}
98
- steps={stateB.steps}
99
- {...props}
100
- />
101
- <Walkthrough
102
- run={stateC.run}
103
- steps={stateC.steps}
104
- {...props}
105
- />
106
- </div>
107
- )
108
- }
109
-
110
- export default WalkthroughMultiBeacon
@@ -1,76 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Button from '../../pb_button/_button'
3
- import Walkthrough from '../../pb_walkthrough/_walkthrough'
4
-
5
- const WalkthroughNoBeacon = (props) => {
6
- const [state, setState] = useState({
7
- callback: (data) => {
8
- if (data.action === 'close' && data.type === 'step:after') {
9
- // This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
10
- setState({ ...state, run: false })
11
- }
12
- },
13
- run: false,
14
- steps: [
15
- {
16
- title: 'Example Title',
17
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
18
- target: '.exampleNoBeacon',
19
- disableBeacon: true,
20
- },
21
- {
22
- title: 'Toggle',
23
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
24
- target: '.pb_toggle_control',
25
- },
26
- {
27
- title: 'Top Nav',
28
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
29
- target: '.pb--page--topNav',
30
- },
31
- ],
32
- })
33
-
34
- return (
35
- <div>
36
- <div
37
- className="exampleNoBeacon"
38
- style={{ 'display': 'inline' }}
39
- >
40
- {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
41
- </div>
42
- <br />
43
- <br />
44
- <Button
45
- onClick={() => {
46
- setState({ ...state,
47
- run: true,
48
- })
49
- }}
50
- >
51
- {'Start Tour'}
52
- </Button>
53
- <br />
54
- <br />
55
- <Button
56
- onClick={() => {
57
- setState({
58
- ...state,
59
- run: false,
60
- })
61
- }}
62
- >
63
- {'Reset/Stop Tour'}
64
- </Button>
65
-
66
- <Walkthrough
67
- run={state.run}
68
- steps={state.steps}
69
- {...props}
70
- continuous
71
- />
72
- </div>
73
- )
74
- }
75
-
76
- export default WalkthroughNoBeacon
@@ -1,76 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Button from '../../pb_button/_button'
3
- import Walkthrough from '../../pb_walkthrough/_walkthrough'
4
-
5
- const WalkthroughNoOverlay = (props) => {
6
- const [noOverlay, setNoOverlayState] = useState({
7
- callback: (data) => {
8
- if (data.action === 'close' && data.type === 'step:after') {
9
- // This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
10
- setNoOverlayState({ ...noOverlay, run: false })
11
- }
12
- },
13
- disableOverlay: true,
14
- run: false,
15
- steps: [
16
- {
17
- title: 'Example Title',
18
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
19
- target: '.exampleNoOverlay',
20
- },
21
- {
22
- title: 'Toggle',
23
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
24
- target: '.pb_toggle_control',
25
- },
26
- {
27
- title: 'Top Nav',
28
- content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
29
- target: '.pb--page--topNav',
30
- },
31
- ],
32
- })
33
-
34
- return (
35
- <div>
36
- <div
37
- className="exampleNoOverlay"
38
- style={{ 'display': 'inline' }}
39
- >
40
- {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
41
- </div>
42
- <br />
43
- <br />
44
- <Button
45
- onClick={() => {
46
- setNoOverlayState({ ...noOverlay,
47
- run: true,
48
- })
49
- }}
50
- >
51
- {'Start Tour'}
52
- </Button>
53
- <br />
54
- <br />
55
- <Button
56
- onClick={() => {
57
- setNoOverlayState({
58
- ...noOverlay,
59
- run: false,
60
- })
61
- }}
62
- >
63
- {'Reset/Stop Tour'}
64
- </Button>
65
-
66
- <Walkthrough
67
- disableOverlay
68
- run={noOverlay.run}
69
- steps={noOverlay.steps}
70
- {...props}
71
- />
72
- </div>
73
- )
74
- }
75
-
76
- export default WalkthroughNoOverlay
@@ -1,76 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Button from '../../pb_button/_button'
3
- import Walkthrough from '../../pb_walkthrough/_walkthrough'
4
-
5
- const WalkthroughStyled = (props) => {
6
- const [state, setState] = useState({
7
- run: false,
8
- steps: [
9
- {
10
- title: 'Example title',
11
- content:
12
- 'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
13
- target: '.styled',
14
- },
15
- {
16
- title: 'Toggle',
17
- content:
18
- 'By default the walkthrough kit will cycle through each step provided.',
19
- target: '.pb_toggle_control',
20
- },
21
- {
22
- title: 'Top Nav',
23
- content:
24
- 'By default the walkthrough kit will cycle through each step provided.',
25
- target: '.pb--page--topNav',
26
- },
27
- ],
28
- })
29
-
30
- return (
31
- <div>
32
- <div
33
- className="styled"
34
- style={{ 'display': 'inline' }}
35
- >
36
- {'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
37
- </div>
38
- <br />
39
- <br />
40
- <Button
41
- onClick={() => {
42
- setState({ ...state,
43
- run: true,
44
- })
45
- }}
46
- >
47
- {'Start Tour'}
48
- </Button>
49
- <br />
50
- <br />
51
- <Button
52
- onClick={() => {
53
- setState({
54
- ...state,
55
- run: false,
56
- })
57
- }}
58
- >
59
- {'Reset/Stop Tour'}
60
- </Button>
61
-
62
- <Walkthrough
63
- run={state.run}
64
- steps={state.steps}
65
- styles={{
66
- options: {
67
- beaconSize: 120,
68
- },
69
- }}
70
- {...props}
71
- />
72
- </div>
73
- )
74
- }
75
-
76
- export default WalkthroughStyled
@@ -1,10 +0,0 @@
1
- examples:
2
-
3
-
4
- react:
5
- - walkthrough_default: Default
6
- - walkthrough_continuous: Continuous
7
- - walkthrough_no_beacon: No Beacon
8
- - walkthrough_no_overlay: No Overlay
9
- - walkthrough_multi_beacon: Multi Beacon
10
- - walkthrough_styled: Styled
@@ -1,6 +0,0 @@
1
- export { default as WalkthroughDefault } from './_walkthrough_default.jsx'
2
- export { default as WalkthroughContinuous } from './_walkthrough_continuous.jsx'
3
- export { default as WalkthroughNoBeacon } from './_walkthrough_no_beacon.jsx'
4
- export { default as WalkthroughMultiBeacon } from './_walkthrough_multi_beacon.jsx'
5
- export { default as WalkthroughNoOverlay } from './_walkthrough_no_overlay.jsx'
6
- export { default as WalkthroughStyled } from './_walkthrough_styled.jsx'
@@ -1,34 +0,0 @@
1
- /* eslint-disable no-unused-vars */
2
- import { ensureAccessible, render, renderKit, screen } from '../utilities/test-utils'
3
- import React from 'react'
4
- import { Walkthrough } from 'playbook-ui'
5
-
6
- /* See these resources for more testing info:
7
- - https://github.com/testing-library/jest-dom#usage for useage and examples
8
- - https://jestjs.io/docs/en/using-matchers
9
- */
10
-
11
- const testId = 'walkthroughKitTest',
12
- kitClass = 'pb_walkthrough'
13
-
14
- test('expect kit to exist', () => {
15
- const props = {
16
- data: { testid: testId },
17
- }
18
-
19
- const kit = renderKit(Walkthrough, props)
20
- expect(kit).toBeInTheDocument()
21
- expect(kit).toHaveClass(kitClass)
22
- })
23
-
24
- test('returns namespaced class name', () => {
25
- render(
26
- <Walkthrough
27
- className="additional_class"
28
- data={{ testid: testId }}
29
- />
30
- )
31
-
32
- const kit = screen.getByTestId(testId)
33
- expect(kit).toHaveClass('additional_class')
34
- })
@@ -1 +0,0 @@
1
- import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{b as buildAriaProps,a as buildDataProps,c as buildHtmlProps,m as mapColors,H as HighchartsReact,d as Highcharts,e as classnames,g as globalProps,f as HighchartsMore}from"./_typeahead-B1tu_vWi.js";import{h as highchartsTheme,m as merge,a as highchartsDarkTheme}from"./lib-DYpq0k8j.js";const BarGraph=({aria:aria={},data:data={},align:align="center",axisTitle:axisTitle,dark:dark=false,chartData:chartData,className:className="pb_bar_graph",colors:colors,htmlOptions:htmlOptions={},customOptions:customOptions={},axisFormat:axisFormat,id:id,pointStart:pointStart,stacking:stacking,subTitle:subTitle,type:type="column",title:title="Title",xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,legend:legend=false,toggleLegendClick:toggleLegendClick=true,height:height,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();const staticOptions={title:{text:title},chart:{height:height,type:type},subtitle:{text:subTitle},yAxis:[{labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat&&axisFormat[0]?axisFormat[0].format:""},min:yAxisMin,max:yAxisMax,opposite:false,title:{text:Array.isArray(axisTitle)?axisTitle.length>0?axisTitle[0].name:null:axisTitle},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]}],xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors!==void 0&&colors.length>0?mapColors(colors):highchartsTheme.colors,plotOptions:{series:{stacking:stacking,pointStart:pointStart,borderWidth:stacking?0:"",events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};if(Array.isArray(axisTitle)&&axisTitle.length>1&&axisTitle[1].name){staticOptions.yAxis.push({labels:{format:typeof axisFormat==="string"?axisFormat:axisFormat[1].format},min:yAxisMin,max:yAxisMax,opposite:true,title:{text:axisTitle[1].name},plotLines:typeof yAxisMin!=="undefined"&&yAxisMin!==null?[]:[{value:0,zIndex:10,color:"#E4E8F0"}]})}if(!toggleLegendClick){staticOptions.plotOptions.series.events={legendItemClick:()=>false}}const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(globalProps(filteredProps),className),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const alignBlockElement=event=>{const itemToMove=document.querySelector(`#wrapper-circle-chart-${event.target.renderTo.id} .pb-circle-chart-block`);const chartContainer=document.querySelector(`#${event.target.renderTo.id}`);if(itemToMove!==null&&chartContainer!==null){itemToMove.style.height=`${event.target.chartHeight}px`;itemToMove.style.width=`${event.target.chartWidth}px`;if(chartContainer.firstChild!==null){chartContainer.firstChild.before(itemToMove)}}};const CircleChart=({align:align="center",aria:aria={},rounded:rounded=false,borderColor:borderColor=(rounded?null:""),borderWidth:borderWidth=(rounded?20:null),chartData:chartData,children:children,className:className,colors:colors=[],customOptions:customOptions={},dark:dark=false,data:data={},dataLabelHtml:dataLabelHtml="<div>{point.name}</div>",dataLabels:dataLabels=false,height:height,htmlOptions:htmlOptions={},id:id,innerSize:innerSize="md",legend:legend=false,maxPointSize:maxPointSize=null,minPointSize:minPointSize=null,startAngle:startAngle=null,style:style="pie",title:title,tooltipHtml:tooltipHtml,useHtml:useHtml=false,zMin:zMin=null,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{headerFormat:null,pointFormat:tooltipHtml?tooltipHtml:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',useHTML:useHtml}});const innerSizes={sm:"35%",md:"50%",lg:"85%",none:"0%"};const innerSizeFormat=size=>innerSizes[size];const filteredProps={...props};delete filteredProps.verticalAlign;const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={title:{text:title},chart:{height:height,type:style,events:{render:event=>alignBlockElement(event),redraw:event=>alignBlockElement(event)}},legend:{align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},plotOptions:{pie:{colors:colors.length>0?mapColors(colors):highchartsTheme.colors,dataLabels:{enabled:dataLabels,connectorShape:"straight",connectorWidth:3,format:dataLabelHtml},showInLegend:legend}},series:[{minPointSize:minPointSize,maxPointSize:maxPointSize,innerSize:borderWidth==20?"100%":innerSizeFormat(innerSize),data:formattedChartData,zMin:zMin,startAngle:startAngle,borderWidth:borderWidth,borderColor:borderColor}],credits:false};setOptions(merge(staticOptions,customOptions))}),[chartData]);return jsx(Fragment,{children:children?jsxs("div",{id:`wrapper-circle-chart-${id}`,children:[jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options}),jsx("div",{className:"pb-circle-chart-block",children:children})]}):jsx(HighchartsReact,{containerProps:{className:classnames("pb_circle_chart",globalProps(filteredProps)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})})};export{BarGraph as B,CircleChart as C};