playbook_ui 14.22.0.pre.alpha.PLAY2303optB8977 → 14.22.0.pre.alpha.PLAY22578709

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 (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -7
  3. data/app/pb_kits/playbook/pb_badge/_badge.scss +6 -5
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +15 -33
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +72 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +6 -0
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +15 -33
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +22 -52
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +16 -12
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +15 -31
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +16 -39
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +38 -86
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +15 -32
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +22 -72
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +15 -31
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +16 -37
  20. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +3 -1
  21. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +3 -1
  22. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +2 -0
  23. data/app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx +3 -3
  24. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +1 -36
  25. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +26 -71
  26. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +16 -29
  27. data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors_rails.md → _circle_chart_colors.md} +1 -1
  28. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +16 -28
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +2 -4
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +15 -23
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +51 -81
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +75 -103
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +6 -3
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +13 -19
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +17 -30
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +20 -34
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +20 -29
  40. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +20 -28
  41. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +1 -0
  42. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -0
  43. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +17 -27
  44. data/app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx +3 -3
  45. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
  46. data/app/pb_kits/playbook/pb_tooltip/index.js +36 -59
  47. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +2 -9
  48. data/dist/chunks/{_typeahead-B1tu_vWi.js → _typeahead-BZsshVoi.js} +3 -3
  49. data/dist/chunks/{_weekday_stacked-CKk0dR5s.js → _weekday_stacked-DO4S-plL.js} +1 -1
  50. data/dist/chunks/{lib-DYpq0k8j.js → lib-Carqm8Ip.js} +1 -1
  51. data/dist/chunks/{pb_form_validation-BUOKwfvW.js → pb_form_validation-DqRmTS8m.js} +1 -1
  52. data/dist/chunks/vendor.js +1 -1
  53. data/dist/menu.yml +8 -68
  54. data/dist/playbook-doc.js +2 -2
  55. data/dist/playbook-rails-react-bindings.js +1 -1
  56. data/dist/playbook-rails.js +1 -1
  57. data/dist/playbook.css +1 -1
  58. data/lib/playbook/version.rb +1 -1
  59. metadata +16 -19
  60. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
  61. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  62. data/app/pb_kits/playbook/pb_body/docs/_body_truncate_react.md +0 -4
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  65. data/app/pb_kits/playbook/pb_title/docs/_title_truncate_react.md +0 -4
  66. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +0 -14
  67. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +0 -1
  68. data/dist/chunks/_circle_chart-BZmlhBs2.js +0 -1
  69. /data/app/pb_kits/playbook/pb_body/docs/{_body_truncate_rails.md → _body_truncate.md} +0 -0
  70. /data/app/pb_kits/playbook/pb_title/docs/{_title_truncate_rails.md → _title_truncate.md} +0 -0
  71. /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open_react.md → _tooltip_click_open.md} +0 -0
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.22.0"
5
- VERSION = "14.22.0.pre.alpha.PLAY2303optB8977"
5
+ VERSION = "14.22.0.pre.alpha.PLAY22578709"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.22.0.pre.alpha.PLAY2303optB8977
4
+ version: 14.22.0.pre.alpha.PLAY22578709
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-07-15 00:00:00.000000000 Z
12
+ date: 2025-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -518,19 +518,19 @@ files:
518
518
  - app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx
519
519
  - app/pb_kits/playbook/pb_bar_graph/barGraph.test.js
520
520
  - app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js
521
- - app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts
522
521
  - app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb
523
522
  - app/pb_kits/playbook/pb_bar_graph/bar_graph.rb
524
523
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb
525
524
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx
526
525
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md
526
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx
527
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md
527
528
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb
528
529
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md
529
530
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb
530
531
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx
531
532
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb
532
533
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx
533
- - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md
534
534
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb
535
535
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx
536
536
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb
@@ -542,6 +542,8 @@ files:
542
542
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md
543
543
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb
544
544
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx
545
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx
546
+ - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md
545
547
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb
546
548
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx
547
549
  - app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md
@@ -573,8 +575,7 @@ files:
573
575
  - app/pb_kits/playbook/pb_body/docs/_body_styled.md
574
576
  - app/pb_kits/playbook/pb_body/docs/_body_truncate.html.erb
575
577
  - app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx
576
- - app/pb_kits/playbook/pb_body/docs/_body_truncate_rails.md
577
- - app/pb_kits/playbook/pb_body/docs/_body_truncate_react.md
578
+ - app/pb_kits/playbook/pb_body/docs/_body_truncate.md
578
579
  - app/pb_kits/playbook/pb_body/docs/_description.md
579
580
  - app/pb_kits/playbook/pb_body/docs/_footer.md
580
581
  - app/pb_kits/playbook/pb_body/docs/example.yml
@@ -768,8 +769,7 @@ files:
768
769
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx
769
770
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb
770
771
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx
771
- - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md
772
- - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md
772
+ - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.md
773
773
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb
774
774
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx
775
775
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md
@@ -781,6 +781,8 @@ files:
781
781
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx
782
782
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md
783
783
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx
784
+ - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx
785
+ - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md
784
786
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb
785
787
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx
786
788
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb
@@ -789,7 +791,6 @@ files:
789
791
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx
790
792
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb
791
793
  - app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx
792
- - app/pb_kits/playbook/pb_circle_chart/docs/_description.md
793
794
  - app/pb_kits/playbook/pb_circle_chart/docs/example.yml
794
795
  - app/pb_kits/playbook/pb_circle_chart/docs/index.js
795
796
  - app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss
@@ -3283,8 +3284,7 @@ files:
3283
3284
  - app/pb_kits/playbook/pb_title/docs/_title_responsive.md
3284
3285
  - app/pb_kits/playbook/pb_title/docs/_title_truncate.html.erb
3285
3286
  - app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx
3286
- - app/pb_kits/playbook/pb_title/docs/_title_truncate_rails.md
3287
- - app/pb_kits/playbook/pb_title/docs/_title_truncate_react.md
3287
+ - app/pb_kits/playbook/pb_title/docs/_title_truncate.md
3288
3288
  - app/pb_kits/playbook/pb_title/docs/example.yml
3289
3289
  - app/pb_kits/playbook/pb_title/docs/index.js
3290
3290
  - app/pb_kits/playbook/pb_title/title.html.erb
@@ -3341,10 +3341,8 @@ files:
3341
3341
  - app/pb_kits/playbook/pb_toggle/toggle.test.js
3342
3342
  - app/pb_kits/playbook/pb_tooltip/_tooltip.scss
3343
3343
  - app/pb_kits/playbook/pb_tooltip/_tooltip.tsx
3344
- - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb
3345
3344
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.jsx
3346
- - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md
3347
- - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_react.md
3345
+ - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.md
3348
3346
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb
3349
3347
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx
3350
3348
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.md
@@ -3620,12 +3618,11 @@ files:
3620
3618
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3621
3619
  - app/pb_kits/playbook/utilities/text.ts
3622
3620
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3623
- - dist/chunks/_circle_chart-BZmlhBs2.js
3624
- - dist/chunks/_typeahead-B1tu_vWi.js
3625
- - dist/chunks/_weekday_stacked-CKk0dR5s.js
3621
+ - dist/chunks/_typeahead-BZsshVoi.js
3622
+ - dist/chunks/_weekday_stacked-DO4S-plL.js
3626
3623
  - dist/chunks/lazysizes-B7xYodB-.js
3627
- - dist/chunks/lib-DYpq0k8j.js
3628
- - dist/chunks/pb_form_validation-BUOKwfvW.js
3624
+ - dist/chunks/lib-Carqm8Ip.js
3625
+ - dist/chunks/pb_form_validation-DqRmTS8m.js
3629
3626
  - dist/chunks/vendor.js
3630
3627
  - dist/menu.yml
3631
3628
  - dist/playbook-doc.js
@@ -1,106 +0,0 @@
1
- import colors from '../tokens/exports/_colors.module.scss'
2
- import typography from '../tokens/exports/_typography.module.scss'
3
-
4
- const barGraphTheme = {
5
- title: {
6
- text: "",
7
- style: {
8
- color: colors.text_lt_default,
9
- fontFamily: typography.font_family_base,
10
- fontWeight: typography.bold,
11
- fontSize: typography.heading_3,
12
- },
13
- },
14
- subtitle: {
15
- text: "",
16
- style: {
17
- fontFamily: typography.font_family_base,
18
- color: colors.text_lt_light,
19
- fontWeight: typography.regular,
20
- fontSize: typography.text_base,
21
- },
22
- },
23
- chart: {
24
- type: "column",
25
- },
26
- tooltip: {
27
- backgroundColor: {
28
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
29
- stops: [
30
- [0, colors.bg_dark],
31
- [1, colors.bg_dark],
32
- ],
33
- },
34
- style: {
35
- fontFamily: typography.font_family_base,
36
- color: colors.text_dk_default,
37
- fontWeight: typography.regular,
38
- fontSize: typography.text_smaller,
39
- },
40
- },
41
- colors: [
42
- colors.data_1,
43
- colors.data_2,
44
- colors.data_3,
45
- colors.data_4,
46
- colors.data_5,
47
- colors.data_6,
48
- colors.data_7,
49
- ],
50
- credits: { enabled: false },
51
- legend: {
52
- enabled: false,
53
- itemStyle: {
54
- color: colors.text_lt_light,
55
- fill: colors.text_lt_light,
56
- fontSize: typography.text_smaller,
57
- },
58
- },
59
- xAxis: {
60
- gridLineWidth: 0,
61
- lineColor: colors.border_light,
62
- tickColor: colors.border_light,
63
- labels: {
64
- style: {
65
- fontFamily: typography.font_family_base,
66
- color: colors.text_lt_lighter,
67
- fontWeight: typography.bold,
68
- fontSize: typography.text_smaller,
69
- },
70
- },
71
- title: {
72
- style: {
73
- color: colors.text_lt_default,
74
- fontFamily: typography.font_family_base,
75
- fontWeight: typography.regular,
76
- fontSize: typography.heading_4,
77
- },
78
- },
79
- },
80
- yAxis: {
81
- alternateGridColor: undefined as string | undefined,
82
- minorTickInterval: null as number | null,
83
- gridLineColor: colors.border_light,
84
- minorGridLineColor: colors.border_light,
85
- lineWidth: 0,
86
- tickWidth: 0,
87
- labels: {
88
- style: {
89
- fontFamily: typography.font_family_base,
90
- color: colors.text_lt_lighter,
91
- fontWeight: typography.bold,
92
- fontSize: typography.text_smaller,
93
- },
94
- },
95
- title: {
96
- style: {
97
- fontFamily: typography.font_family_base,
98
- color: colors.text_lt_lighter,
99
- fontWeight: typography.bold,
100
- fontSize: typography.text_smaller,
101
- },
102
- },
103
- },
104
- }
105
-
106
- export default barGraphTheme;
@@ -1,3 +0,0 @@
1
- By default, Highcharts have a height of 400px, but this can be customized. You can override the default by specifying either a percentage or a fixed pixel value.
2
-
3
- Using a percentage maintains a consistent aspect ratio across different responsive sizes. For example, setting the height to 50% makes the chart’s height half of its width.
@@ -1,4 +0,0 @@
1
- ##### Prop
2
- `truncate` | **Type**: Enum | **Values**: 1 | 2 | 3 | 4 | 5
3
-
4
- The `truncate` prop truncates overflowing text up to a maximum of five rows and adds an ellipsis at the end.
@@ -1,2 +0,0 @@
1
- Custom data colors allow for color customization to match the needs of business requirements.
2
- Import the colors from Playbook's tokens, then set custom colors in the plotOptions.pie.colors array using the desired color variables. Hex colors are also available `eg: #CA0095`.
@@ -1 +0,0 @@
1
- **Important Note for the React Kit**: In order to leverage this kit, you must install `highcharts` and `highcharts-react-official` into your project as shown below. To then apply Playbook styles to your Highchart, import circleChartTheme.ts from playbook-ui and merge it with your Highchart options. Then, pass the merged value to the options prop. Playbook’s styling will be applied automatically. See the examples in the documentation below.
@@ -1,4 +0,0 @@
1
- ##### Prop
2
- `truncate` | **Type**: Enum | **Values**: 1 | 2 | 3 | 4 | 5
3
-
4
- The `truncate` prop truncates overflowing text up to a maximum of five rows and adds an ellipsis at the end.
@@ -1,14 +0,0 @@
1
- <%= pb_rails("button", props: {
2
- text: "Click to Open",
3
- id: "click-tooltip-trigger-1",
4
- variant: "primary"
5
- }) %>
6
-
7
- <%= pb_rails("tooltip", props: {
8
- trigger_element_selector: "#click-tooltip-trigger-1",
9
- tooltip_id: "click-tooltip-1",
10
- position: "top",
11
- use_click_to_open: true
12
- }) do %>
13
- Tooltip opened by click! Click trigger again to close.
14
- <% end %>
@@ -1 +0,0 @@
1
- Set the prop `use_click_to_open` as `true` so that the tooltip will only appear when an item is clicked rather than hovered over.
@@ -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};