playbook_ui 14.23.0.pre.alpha.PLAY2205atborderbug9085 → 14.23.0.pre.alpha.PLAY2243customindeterminatemaincheckboxlabels9046

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +10 -10
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +1 -53
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +6 -9
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -13
  7. data/app/pb_kits/playbook/pb_advanced_table/advanced_table_action_bar.js +0 -16
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  10. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +1 -7
  11. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
  12. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -5
  13. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -36
  14. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +2 -11
  15. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +1 -1
  17. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +12 -1
  18. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +2 -1
  20. data/app/pb_kits/playbook/pb_checkbox/index.js +3 -1
  21. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +1 -1
  22. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +3 -1
  23. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +17 -36
  24. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +16 -31
  25. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +31 -63
  26. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +16 -35
  27. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +16 -41
  28. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +62 -107
  29. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +7 -4
  30. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
  31. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
  32. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
  33. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  34. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +1 -16
  35. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +0 -3
  36. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  37. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  38. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  39. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +1 -0
  40. data/dist/chunks/_gauge-BUpiCaK5.js +1 -0
  41. data/dist/chunks/_typeahead-ITbXBlyi.js +6 -0
  42. data/dist/chunks/{_weekday_stacked-BNHSKTSw.js → _weekday_stacked-BIEMUAn8.js} +2 -2
  43. data/dist/chunks/{lib-DnQyMxO1.js → lib-AStGp3dD.js} +1 -1
  44. data/dist/chunks/{pb_form_validation-kl-4Jv4t.js → pb_form_validation-DF742j1h.js} +1 -1
  45. data/dist/chunks/vendor.js +1 -1
  46. data/dist/playbook-doc.js +1 -1
  47. data/dist/playbook-rails-react-bindings.js +1 -1
  48. data/dist/playbook-rails.js +1 -1
  49. data/dist/playbook.css +1 -1
  50. data/lib/playbook/version.rb +1 -1
  51. metadata +11 -18
  52. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.html.erb +0 -46
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +0 -7
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +0 -51
  55. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md +0 -1
  56. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  57. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  58. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb +0 -10
  59. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx +0 -26
  60. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md +0 -3
  61. data/dist/chunks/_line_graph-BfCo79KE.js +0 -1
  62. data/dist/chunks/_typeahead-Db4YQA5c.js +0 -6
  63. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_row_styling_react.md → _advanced_table_row_styling.md} +0 -0
  64. /data/app/pb_kits/playbook/pb_line_graph/docs/{_line_graph_colors_rails.md → _line_graph_colors.md} +0 -0
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.23.0"
5
- VERSION = "14.23.0.pre.alpha.PLAY2205atborderbug9085"
5
+ VERSION = "14.23.0.pre.alpha.PLAY2243customindeterminatemaincheckboxlabels9046"
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.23.0.pre.alpha.PLAY2205atborderbug9085
4
+ version: 14.23.0.pre.alpha.PLAY2243customindeterminatemaincheckboxlabels9046
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-18 00:00:00.000000000 Z
12
+ date: 2025-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -359,10 +359,8 @@ files:
359
359
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
360
360
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
361
361
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
362
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.html.erb
363
362
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx
364
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md
365
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md
363
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md
366
364
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_scrollbar_none.html.erb
367
365
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_scrollbar_none.jsx
368
366
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx
@@ -407,8 +405,6 @@ files:
407
405
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
408
406
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.jsx
409
407
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md
410
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb
411
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md
412
408
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
413
409
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
414
410
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_infinite_scroll.json
@@ -2023,13 +2019,11 @@ files:
2023
2019
  - app/pb_kits/playbook/pb_line_graph/docs/_description.md
2024
2020
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb
2025
2021
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx
2026
- - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md
2027
- - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md
2022
+ - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.md
2028
2023
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb
2029
2024
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx
2030
2025
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb
2031
2026
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx
2032
- - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md
2033
2027
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb
2034
2028
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx
2035
2029
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb
@@ -2037,6 +2031,8 @@ files:
2037
2031
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb
2038
2032
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx
2039
2033
  - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md
2034
+ - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx
2035
+ - app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md
2040
2036
  - app/pb_kits/playbook/pb_line_graph/docs/example.yml
2041
2037
  - app/pb_kits/playbook/pb_line_graph/docs/index.js
2042
2038
  - app/pb_kits/playbook/pb_line_graph/lineGraph.test.js
@@ -2472,9 +2468,6 @@ files:
2472
2468
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.html.erb
2473
2469
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.jsx
2474
2470
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.md
2475
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb
2476
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx
2477
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md
2478
2471
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb
2479
2472
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx
2480
2473
  - app/pb_kits/playbook/pb_phone_number_input/docs/example.yml
@@ -3629,12 +3622,12 @@ files:
3629
3622
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3630
3623
  - app/pb_kits/playbook/utilities/text.ts
3631
3624
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3632
- - dist/chunks/_line_graph-BfCo79KE.js
3633
- - dist/chunks/_typeahead-Db4YQA5c.js
3634
- - dist/chunks/_weekday_stacked-BNHSKTSw.js
3625
+ - dist/chunks/_gauge-BUpiCaK5.js
3626
+ - dist/chunks/_typeahead-ITbXBlyi.js
3627
+ - dist/chunks/_weekday_stacked-BIEMUAn8.js
3635
3628
  - dist/chunks/lazysizes-B7xYodB-.js
3636
- - dist/chunks/lib-DnQyMxO1.js
3637
- - dist/chunks/pb_form_validation-kl-4Jv4t.js
3629
+ - dist/chunks/lib-AStGp3dD.js
3630
+ - dist/chunks/pb_form_validation-DF742j1h.js
3638
3631
  - dist/chunks/vendor.js
3639
3632
  - dist/menu.yml
3640
3633
  - dist/playbook-doc.js
@@ -1,46 +0,0 @@
1
- <% column_definitions = [
2
- {
3
- accessor: "year",
4
- label: "Year",
5
- cellAccessors: ["quarter", "month", "day"],
6
- },
7
- {
8
- accessor: "newEnrollments",
9
- label: "New Enrollments",
10
- },
11
- {
12
- accessor: "scheduledMeetings",
13
- label: "Scheduled Meetings",
14
- },
15
- {
16
- accessor: "attendanceRate",
17
- label: "Attendance Rate",
18
- },
19
- {
20
- accessor: "completedClasses",
21
- label: "Completed Classes",
22
- },
23
- {
24
- accessor: "classCompletionRate",
25
- label: "Class Completion Rate",
26
- },
27
- {
28
- accessor: "graduatedStudents",
29
- label: "Graduated Students",
30
- }
31
- ] %>
32
-
33
- <% row_styling = [
34
- {
35
- row_id: "1",
36
- background_color: "#F9BB00",
37
- },
38
- {
39
- row_id: "8",
40
- background_color: "#0056CF",
41
- font_color: "white",
42
- expand_button_color: "white",
43
- },
44
- ] %>
45
-
46
- <%= pb_rails("advanced_table", props: { id: "row-styling", table_data: @table_data_with_id, column_definitions: column_definitions, row_styling: row_styling }) %>
@@ -1,7 +0,0 @@
1
- The `row_styling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `row_styling` gives you 3 optional controls:
2
-
3
- - `background_color` : use this to control the background color of the row
4
- - `font_color`: use this to control font color for each row if needed, for example if using a darker background color.
5
- - `expand_button_color`: use this to control the color of the expand icon if needed, for example if using a darker background color.
6
-
7
- **NOTE:** Each object within the `table_data` Array must contain a unique id in order to attach an id to all Rows for this to function.
@@ -1,51 +0,0 @@
1
- <%
2
- column_definitions = [
3
- {
4
- accessor: "year",
5
- label: "Year",
6
- cellAccessors: ["quarter", "month", "day"],
7
- },
8
- {
9
- accessor: "newEnrollments",
10
- label: "New Enrollments",
11
- header: ->(cell, label) {
12
- capture do
13
- pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
14
- pb_rails("caption", props: { margin_right: "xs", text: "New Enrollments" }) +
15
- pb_rails("icon", props: { id: "tooltip-interact", icon: "info", size: "xs" }) +
16
- pb_rails("tooltip", props: {
17
- trigger_element_id: "tooltip-interact",
18
- tooltip_id: "example-custom-tooltip",
19
- position: "top",
20
- z_index: "10"
21
- }) do
22
- "Whoa. I'm a Tooltip"
23
- end
24
- end
25
- end
26
- }
27
- },
28
- {
29
- accessor: "scheduledMeetings",
30
- label: "Scheduled Meetings",
31
- },
32
- {
33
- accessor: "attendanceRate",
34
- label: "Attendance Rate",
35
- },
36
- {
37
- accessor: "completedClasses",
38
- label: "Completed Classes",
39
- },
40
- {
41
- accessor: "classCompletionRate",
42
- label: "Class Completion Rate",
43
- },
44
- {
45
- accessor: "graduatedStudents",
46
- label: "Graduated Students",
47
- }
48
- ]
49
- %>
50
-
51
- <%= pb_rails("advanced_table", props: { id: "custom_header_table", table_data: @table_data, column_definitions: column_definitions }) %>
@@ -1 +0,0 @@
1
- The optional `header` item can be used within `column_definitions` to render a custom header. This example shows an Icon and Tooltip being used but other kits can be used as well.
@@ -1,3 +0,0 @@
1
-
2
- Custom data colors allow for color customization to match the needs of business requirements.
3
- Import the colors from Playbook's tokens, then set custom colors in the colors array using the desired color variables. Hex colors are also available `eg: #CA0095`.
@@ -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,10 +0,0 @@
1
- <%= pb_rails("phone_number_input", props: {
2
- strict_mode: true,
3
- }) %>
4
-
5
- <%= pb_rails("body", props: { text: "With format_as_you_type" }) %>
6
-
7
- <%= pb_rails("phone_number_input", props: {
8
- strict_mode: true,
9
- format_as_you_type: true,
10
- }) %>
@@ -1,26 +0,0 @@
1
- import React from "react";
2
-
3
- import Body from '../../pb_body/_body'
4
- import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
5
-
6
- const PhoneNumberInputStrictMode = (props) => {
7
-
8
- return (
9
- <>
10
- <PhoneNumberInput
11
- id="strict"
12
- strictMode
13
- {...props}
14
- />
15
- <Body>With formatAsYouType</Body>
16
- <PhoneNumberInput
17
- formatAsYouType
18
- id="strict"
19
- strictMode
20
- {...props}
21
- />
22
- </>
23
- );
24
- };
25
-
26
- export default PhoneNumberInputStrictMode;
@@ -1,3 +0,0 @@
1
- Ignore any irrelevant characters and cap the length at the maximum valid number length.
2
-
3
- This can be combined with `format_as_you_type` / `formatAsYouType`.
@@ -1 +0,0 @@
1
- import{jsx,Fragment,jsxs}from"react/jsx-runtime";import{useState,useEffect}from"react";import{b as buildAriaProps,c as buildDataProps,d as buildHtmlProps,H as HighchartsReact,e as Highcharts,f as classnames,g as globalProps,h as HighchartsMore,S as SolidGauge,i as buildCss}from"./_typeahead-Db4YQA5c.js";import{c as colors,h as highchartsTheme,m as merge,a as highchartsDarkTheme,t as typography}from"./lib-DnQyMxO1.js";const mapColors=array=>{const regex=/(data)\-[1-8]/;const newArray=array.map((item=>regex.test(item)?`${colors[`data_${item[item.length-1]}`]}`:item));return newArray};const BarGraph=({aria:aria={},data:data={},align:align="center",axisTitle:axisTitle,dark:dark=false,chartData:chartData,className:className="pb_bar_graph",colors:colors2,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:colors2!==void 0&&colors2.length>0?mapColors(colors2):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:colors2=[],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:colors2.length>0?mapColors(colors2):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})})};const Gauge=({aria:aria={},chartData:chartData,customOptions:customOptions={},dark:dark=false,data:data={},disableAnimation:disableAnimation=false,fullCircle:fullCircle=false,height:height=null,htmlOptions:htmlOptions={},id:id,max:max=100,min:min=0,prefix:prefix="",showLabels:showLabels=false,style:style="solidgauge",suffix:suffix="",title:title="",tooltipHtml:tooltipHtml='<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',colors:colors$1=[],minorTickInterval:minorTickInterval=null,circumference:circumference=(fullCircle?[0,360]:[-100,100]),...props})=>{const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);HighchartsMore(Highcharts);SolidGauge(Highcharts);const setupTheme=()=>{dark?Highcharts.setOptions(highchartsDarkTheme):Highcharts.setOptions(highchartsTheme)};setupTheme();Highcharts.setOptions({tooltip:{pointFormat:tooltipHtml,followPointer:true}});const css=buildCss({pb_gauge_kit:true});const[options,setOptions]=useState({});useEffect((()=>{const formattedChartData=chartData.map((obj=>{obj.y=obj.value;delete obj.value;return obj}));const staticOptions={chart:{events:{load(){setTimeout(this.reflow.bind(this),0)}},type:style,height:height},title:{text:title},yAxis:{min:min,max:max,lineWidth:0,tickWidth:0,minorTickInterval:minorTickInterval,tickAmount:2,tickPositions:[min,max],labels:{y:26,enabled:showLabels}},credits:false,series:[{data:formattedChartData}],pane:{center:["50%","50%"],size:"90%",startAngle:circumference[0],endAngle:circumference[1],background:{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane"}},colors:colors$1!==void 0&&colors$1.length>0?mapColors(colors$1):highchartsTheme.colors,plotOptions:{series:{animation:!disableAnimation},solidgauge:{borderColor:colors$1!==void 0&&colors$1.length===1?mapColors(colors$1).join():highchartsTheme.colors[0],borderWidth:20,radius:90,innerRadius:"90%",dataLabels:{borderWidth:0,color:colors.text_lt_default,enabled:true,format:`<span class="prefix${dark?" dark":""}">${prefix}</span><span class="fix${dark?" dark":""}">{y:,f}</span><span class="suffix${dark?" dark":""}">${suffix}</span>`,style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}}};setOptions(merge(staticOptions,customOptions));if(document.querySelector(".prefix")){document.querySelectorAll(".prefix").forEach((prefix2=>{prefix2.setAttribute("y","28")}));document.querySelectorAll(".fix").forEach((fix=>fix.setAttribute("y","38")))}}),[chartData]);return jsx(HighchartsReact,{containerProps:{className:classnames(css,globalProps(props)),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:options})};const LineGraph=({aria:aria={},data:data={},align:align="center",className:className="pb_bar_graph",customOptions:customOptions={},dark:dark=false,gradient:gradient=false,type:type="line",htmlOptions:htmlOptions={},id:id,legend:legend=false,toggleLegendClick:toggleLegendClick=true,layout:layout="horizontal",verticalAlign:verticalAlign="bottom",x:x=0,y:y=0,axisTitle:axisTitle,xAxisCategories:xAxisCategories,yAxisMin:yAxisMin,yAxisMax:yAxisMax,chartData:chartData,pointStart:pointStart,subTitle:subTitle,title:title,height:height,colors:colors2=[],...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:{min:yAxisMin,max:yAxisMax,title:{text:axisTitle}},xAxis:{categories:xAxisCategories},legend:{enabled:legend,align:align,verticalAlign:verticalAlign,layout:layout,x:x,y:y},colors:colors2!==void 0&&colors2.length>0?mapColors(colors2):highchartsTheme.colors,plotOptions:{series:{pointStart:pointStart,events:{},dataLabels:{enabled:false}}},series:chartData,credits:false};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})};export{BarGraph as B,CircleChart as C,Gauge as G,LineGraph as L};