playbook_ui 14.24.0 → 14.25.0.pre.alpha.testingcss9700
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +8 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +34 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +56 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb +43 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +64 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +10 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +24 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +3 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_date/_date.tsx +5 -3
- data/app/pb_kits/playbook/pb_date/date.html.erb +6 -6
- data/app/pb_kits/playbook/pb_date/date.rb +2 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +17 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_dropdown/index.js +3 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +2 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb +22 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx +43 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +6 -0
- data/app/pb_kits/playbook/pb_pagination/_pagination.test.jsx +212 -0
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +8 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx +112 -0
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md +3 -0
- data/app/pb_kits/playbook/pb_pagination/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_pagination/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +11 -1
- data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +49 -1
- data/dist/chunks/_line_graph-DPTwfQR-.js +544 -0
- data/dist/chunks/_typeahead-CEqlHw0H.js +30978 -0
- data/dist/chunks/_weekday_stacked-D3dG14OB.js +20894 -0
- data/dist/chunks/lazysizes-BUUj27EF.js +611 -0
- data/dist/chunks/lib-CIetbXpr.js +9609 -0
- data/dist/chunks/pb_form_validation-D_g9rOE9.js +60 -0
- data/dist/chunks/vendor.js +11 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +67243 -3
- data/dist/playbook-rails-react-bindings.js +112 -1
- data/dist/playbook-rails.js +2464 -1
- data/dist/playbook.css +92354 -2
- data/dist/reset.css +89 -1
- data/lib/playbook/version.rb +2 -2
- metadata +25 -8
- data/dist/chunks/_line_graph-BLS62QjW.js +0 -1
- data/dist/chunks/_typeahead-CZL6rvfn.js +0 -6
- data/dist/chunks/_weekday_stacked-Cv8-Sf6X.js +0 -37
- data/dist/chunks/lazysizes-B7xYodB-.js +0 -1
- data/dist/chunks/lib-DgtxnJqa.js +0 -29
- data/dist/chunks/pb_form_validation-_NsOWfBS.js +0 -1
data/dist/reset.css
CHANGED
@@ -1 +1,89 @@
|
|
1
|
-
|
1
|
+
/*=====================================
|
2
|
+
Base colors should not be documented.
|
3
|
+
Only document color use.
|
4
|
+
|
5
|
+
Colors -----------------------------*/
|
6
|
+
/* Specialty Gradient -----------------*/
|
7
|
+
/* Interface colors -------------------*/
|
8
|
+
/* Main colors ------------------------*/
|
9
|
+
/*=====================================
|
10
|
+
|
11
|
+
Background colors ------------------*/
|
12
|
+
/* Card colors ------------------*/
|
13
|
+
/* Active colors ----------------------*/
|
14
|
+
/* Hover colors -----------------------*/
|
15
|
+
/* Focus colors -----------------------*/
|
16
|
+
/* Border colors ----------------------*/
|
17
|
+
/* Shadow colors ----------------------*/
|
18
|
+
/* Text colors ------------------------*/
|
19
|
+
/* Data colors ------------------------*/
|
20
|
+
/* Status colors ----------------------*/
|
21
|
+
/* Link colors ------------------------*/
|
22
|
+
/* Product colors ---------------------*/
|
23
|
+
/* Category colors ---------------------*/
|
24
|
+
/* CLEAN UP AND REMOVE */
|
25
|
+
/* Headings */
|
26
|
+
/* Standard Font Weights */
|
27
|
+
/* Non_Standard Font Weights */
|
28
|
+
/* Link Colors */
|
29
|
+
/*=====================================
|
30
|
+
Base colors should not be documented.
|
31
|
+
Only document color use.
|
32
|
+
|
33
|
+
Colors -----------------------------*/
|
34
|
+
/* Specialty Gradient -----------------*/
|
35
|
+
/* Interface colors -------------------*/
|
36
|
+
/* Main colors ------------------------*/
|
37
|
+
/*=====================================
|
38
|
+
|
39
|
+
Background colors ------------------*/
|
40
|
+
/* Card colors ------------------*/
|
41
|
+
/* Active colors ----------------------*/
|
42
|
+
/* Hover colors -----------------------*/
|
43
|
+
/* Focus colors -----------------------*/
|
44
|
+
/* Border colors ----------------------*/
|
45
|
+
/* Shadow colors ----------------------*/
|
46
|
+
/* Text colors ------------------------*/
|
47
|
+
/* Data colors ------------------------*/
|
48
|
+
/* Status colors ----------------------*/
|
49
|
+
/* Link colors ------------------------*/
|
50
|
+
/* Product colors ---------------------*/
|
51
|
+
/* Category colors ---------------------*/
|
52
|
+
* {
|
53
|
+
box-sizing: border-box;
|
54
|
+
margin: 0;
|
55
|
+
padding: 0;
|
56
|
+
}
|
57
|
+
*:before, *:after {
|
58
|
+
box-sizing: border-box;
|
59
|
+
}
|
60
|
+
|
61
|
+
html {
|
62
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
63
|
+
height: 100vh;
|
64
|
+
overflow-x: hidden;
|
65
|
+
}
|
66
|
+
|
67
|
+
body {
|
68
|
+
font-family: "Power Centra", "Helvetica Neue", Helvetica, Arial, sans_serif;
|
69
|
+
font-size: 15.5px;
|
70
|
+
line-height: 1.5;
|
71
|
+
background-color: #F3F7FB;
|
72
|
+
height: 100%;
|
73
|
+
letter-spacing: 0.003em;
|
74
|
+
font-weight: 400;
|
75
|
+
font-style: normal;
|
76
|
+
text-rendering: optimizeLegibility;
|
77
|
+
-moz-font-feature-settings: "liga" on;
|
78
|
+
color: #242B42;
|
79
|
+
margin: 0 !important;
|
80
|
+
padding: 0 !important;
|
81
|
+
box-sizing: border-box;
|
82
|
+
min-height: 100vh;
|
83
|
+
padding: 50px;
|
84
|
+
}
|
85
|
+
|
86
|
+
a {
|
87
|
+
text-decoration: none;
|
88
|
+
color: #0056CF;
|
89
|
+
}
|
data/lib/playbook/version.rb
CHANGED
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.
|
4
|
+
version: 14.25.0.pre.alpha.testingcss9700
|
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-08-
|
12
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -308,6 +308,8 @@ files:
|
|
308
308
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb
|
309
309
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx
|
310
310
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md
|
311
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb
|
312
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx
|
311
313
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx
|
312
314
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md
|
313
315
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx
|
@@ -350,6 +352,10 @@ files:
|
|
350
352
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_react.md
|
351
353
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.html.erb
|
352
354
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx
|
355
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx
|
356
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md
|
357
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx
|
358
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md
|
353
359
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx
|
354
360
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
|
355
361
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
|
@@ -810,6 +816,8 @@ files:
|
|
810
816
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx
|
811
817
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.html.erb
|
812
818
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.jsx
|
819
|
+
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb
|
820
|
+
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md
|
813
821
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb
|
814
822
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx
|
815
823
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md
|
@@ -980,6 +988,9 @@ files:
|
|
980
988
|
- app/pb_kits/playbook/pb_date/docs/_date_variants.html.erb
|
981
989
|
- app/pb_kits/playbook/pb_date/docs/_date_variants.jsx
|
982
990
|
- app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md
|
991
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb
|
992
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx
|
993
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md
|
983
994
|
- app/pb_kits/playbook/pb_date/docs/_description.md
|
984
995
|
- app/pb_kits/playbook/pb_date/docs/example.yml
|
985
996
|
- app/pb_kits/playbook/pb_date/docs/index.js
|
@@ -1568,6 +1579,9 @@ files:
|
|
1568
1579
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
|
1569
1580
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.md
|
1570
1581
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md
|
1582
|
+
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb
|
1583
|
+
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx
|
1584
|
+
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md
|
1571
1585
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb
|
1572
1586
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.jsx
|
1573
1587
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md
|
@@ -2383,11 +2397,14 @@ files:
|
|
2383
2397
|
- app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx
|
2384
2398
|
- app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx
|
2385
2399
|
- app/pb_kits/playbook/pb_pagination/_pagination.scss
|
2400
|
+
- app/pb_kits/playbook/pb_pagination/_pagination.test.jsx
|
2386
2401
|
- app/pb_kits/playbook/pb_pagination/_pagination.tsx
|
2387
2402
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
|
2388
2403
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx
|
2389
2404
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md
|
2390
2405
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md
|
2406
|
+
- app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx
|
2407
|
+
- app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md
|
2391
2408
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx
|
2392
2409
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md
|
2393
2410
|
- app/pb_kits/playbook/pb_pagination/docs/data.js
|
@@ -3630,12 +3647,12 @@ files:
|
|
3630
3647
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3631
3648
|
- app/pb_kits/playbook/utilities/text.ts
|
3632
3649
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3633
|
-
- dist/chunks/_line_graph-
|
3634
|
-
- dist/chunks/_typeahead-
|
3635
|
-
- dist/chunks/_weekday_stacked-
|
3636
|
-
- dist/chunks/lazysizes-
|
3637
|
-
- dist/chunks/lib-
|
3638
|
-
- dist/chunks/pb_form_validation-
|
3650
|
+
- dist/chunks/_line_graph-DPTwfQR-.js
|
3651
|
+
- dist/chunks/_typeahead-CEqlHw0H.js
|
3652
|
+
- dist/chunks/_weekday_stacked-D3dG14OB.js
|
3653
|
+
- dist/chunks/lazysizes-BUUj27EF.js
|
3654
|
+
- dist/chunks/lib-CIetbXpr.js
|
3655
|
+
- dist/chunks/pb_form_validation-D_g9rOE9.js
|
3639
3656
|
- dist/chunks/vendor.js
|
3640
3657
|
- dist/menu.yml
|
3641
3658
|
- dist/playbook-doc.js
|
@@ -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-CZL6rvfn.js";import{c as colors,h as highchartsTheme,m as merge,a as highchartsDarkTheme,t as typography}from"./lib-DgtxnJqa.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};
|