playbook-ui 14.24.0 → 14.25.0-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.
- package/dist/.vite/manifest.json +37 -37
- package/dist/chunks/_line_graph-DPTwfQR-.js +544 -0
- package/dist/chunks/_typeahead-CEqlHw0H.js +30978 -0
- package/dist/chunks/_weekday_stacked-D3dG14OB.js +20894 -0
- package/dist/chunks/lazysizes-BUUj27EF.js +611 -0
- package/dist/chunks/lib-CIetbXpr.js +9609 -0
- package/dist/chunks/pb_form_validation-D_g9rOE9.js +60 -0
- package/dist/chunks/vendor.js +11 -1
- package/dist/playbook-doc.js +67243 -3
- package/dist/playbook-rails-react-bindings.js +112 -1
- package/dist/playbook-rails.js +2464 -1
- package/dist/playbook.css +92354 -2
- package/dist/playbook.js +149 -1
- package/dist/reset.css +89 -1
- package/package.json +1 -2
- package/dist/chunks/_line_graph-BLS62QjW.js +0 -1
- package/dist/chunks/_typeahead-CZL6rvfn.js +0 -6
- package/dist/chunks/_weekday_stacked-Cv8-Sf6X.js +0 -37
- package/dist/chunks/lazysizes-B7xYodB-.js +0 -1
- package/dist/chunks/lib-DgtxnJqa.js +0 -29
- package/dist/chunks/pb_form_validation-_NsOWfBS.js +0 -1
package/dist/playbook.js
CHANGED
|
@@ -1 +1,149 @@
|
|
|
1
|
-
import{A,a,
|
|
1
|
+
import { A, a, B, b, C, e, g, D, h, i, k, l, m, n, o, p, q, s, t, E, F, u, v, w, H, z, I, G, J, K, j, M, Q, R, L, d, U, V, W, X, O, Y, Z, _, a0, a1, P, a2, $, a3, a4, S, x, y, a5, r, ak, a6, a7, a8, a9, aa, T, al, f, ab, ac, ad, ae, N, ag, af, ah, ai, aj } from "./chunks/_weekday_stacked-D3dG14OB.js";
|
|
2
|
+
import "./chunks/lazysizes-BUUj27EF.js";
|
|
3
|
+
import { U as U2, Q as Q2, K as K2, B as B2, v as v2, p as p2, r as r2, m as m2, J as J2, C as C2, q as q2, D as D2, j as j2, W as W2, F as F2, s as s2, A as A2, _ as _2, l as l2, y as y2, E as E2, L as L2, M as M2, X as X2, Y as Y2, $ as $2, a as a10, n as n2, P as P2, V as V2, R as R2, o as o2, z as z2, w as w2, t as t2, T as T2, Z as Z2 } from "./chunks/_typeahead-CEqlHw0H.js";
|
|
4
|
+
import { B as B3, C as C3, G as G2, L as L3 } from "./chunks/_line_graph-DPTwfQR-.js";
|
|
5
|
+
import { i as i2, l as l3, n as n3, j as j3, k as k2, U as U3, V as V3, c, b as b2, e as e2, f as f2, W as W3, a as a11, h as h2, X as X3, Y as Y3, t as t3, u as u2, N as N2, K as K3 } from "./chunks/lib-CIetbXpr.js";
|
|
6
|
+
import "react/jsx-runtime";
|
|
7
|
+
import "react";
|
|
8
|
+
import "react-dom";
|
|
9
|
+
import "react-trix";
|
|
10
|
+
import "trix";
|
|
11
|
+
import "react-is";
|
|
12
|
+
export {
|
|
13
|
+
A as AdvancedTable,
|
|
14
|
+
U2 as Avatar,
|
|
15
|
+
Q2 as Background,
|
|
16
|
+
K2 as Badge,
|
|
17
|
+
B3 as BarGraph,
|
|
18
|
+
B2 as Body,
|
|
19
|
+
a as BreadCrumbItem,
|
|
20
|
+
B as BreadCrumbs,
|
|
21
|
+
v2 as Button,
|
|
22
|
+
b as ButtonToolbar,
|
|
23
|
+
p2 as Caption,
|
|
24
|
+
r2 as Card,
|
|
25
|
+
m2 as Checkbox,
|
|
26
|
+
C3 as CircleChart,
|
|
27
|
+
J2 as CircleIconButton,
|
|
28
|
+
C2 as Collapsible,
|
|
29
|
+
C as Contact,
|
|
30
|
+
e as CopyButton,
|
|
31
|
+
g as Currency,
|
|
32
|
+
D as DashboardValue,
|
|
33
|
+
h as Date,
|
|
34
|
+
i as DatePicker,
|
|
35
|
+
k as DateRangeInline,
|
|
36
|
+
l as DateRangeStacked,
|
|
37
|
+
m as DateStacked,
|
|
38
|
+
n as DateTime,
|
|
39
|
+
o as DateTimeStacked,
|
|
40
|
+
p as DateYearStacked,
|
|
41
|
+
q2 as Detail,
|
|
42
|
+
q as Dialog,
|
|
43
|
+
D2 as DistributionBar,
|
|
44
|
+
j2 as Draggable,
|
|
45
|
+
W2 as DraggableProvider,
|
|
46
|
+
s as Drawer,
|
|
47
|
+
t as Dropdown,
|
|
48
|
+
E as EmptyState,
|
|
49
|
+
F as FileUpload,
|
|
50
|
+
u as Filter,
|
|
51
|
+
v as FixedConfirmationToast,
|
|
52
|
+
F2 as Flex,
|
|
53
|
+
s2 as FlexItem,
|
|
54
|
+
w as FormGroup,
|
|
55
|
+
A2 as FormPill,
|
|
56
|
+
G2 as Gauge,
|
|
57
|
+
H as Hashtag,
|
|
58
|
+
_2 as Highlight,
|
|
59
|
+
z as HomeAddressStreet,
|
|
60
|
+
l2 as Icon,
|
|
61
|
+
I as IconButton,
|
|
62
|
+
y2 as IconCircle,
|
|
63
|
+
G as IconStatValue,
|
|
64
|
+
J as IconValue,
|
|
65
|
+
E2 as Image,
|
|
66
|
+
K as LabelPill,
|
|
67
|
+
j as LabelValue,
|
|
68
|
+
M as Layout,
|
|
69
|
+
L2 as Legend,
|
|
70
|
+
Q as Lightbox,
|
|
71
|
+
L3 as LineGraph,
|
|
72
|
+
R as Link,
|
|
73
|
+
L as List,
|
|
74
|
+
d as ListItem,
|
|
75
|
+
U as LoadingInline,
|
|
76
|
+
V as Map,
|
|
77
|
+
W as MapCustomButton,
|
|
78
|
+
X as Message,
|
|
79
|
+
M2 as MultiLevelSelect,
|
|
80
|
+
O as MultipleUsers,
|
|
81
|
+
Y as MultipleUsersStacked,
|
|
82
|
+
X2 as Nav,
|
|
83
|
+
Y2 as NavItem,
|
|
84
|
+
$2 as OnlineStatus,
|
|
85
|
+
Z as Overlay,
|
|
86
|
+
_ as Pagination,
|
|
87
|
+
a10 as Passphrase,
|
|
88
|
+
i2 as PbPopover,
|
|
89
|
+
n2 as PbReactPopover,
|
|
90
|
+
l3 as PbTable,
|
|
91
|
+
n3 as PbTextarea,
|
|
92
|
+
j3 as PbTooltip,
|
|
93
|
+
k2 as PbTypeahead,
|
|
94
|
+
a0 as Person,
|
|
95
|
+
a1 as PersonContact,
|
|
96
|
+
P2 as PhoneNumberInput,
|
|
97
|
+
P as Pill,
|
|
98
|
+
a2 as ProgressPills,
|
|
99
|
+
$ as ProgressSimple,
|
|
100
|
+
a3 as ProgressStep,
|
|
101
|
+
a4 as ProgressStepItem,
|
|
102
|
+
V2 as Radio,
|
|
103
|
+
R2 as RichTextEditor,
|
|
104
|
+
o2 as SectionSeparator,
|
|
105
|
+
S as Select,
|
|
106
|
+
x as SelectableCard,
|
|
107
|
+
y as SelectableCardIcon,
|
|
108
|
+
a5 as SelectableIcon,
|
|
109
|
+
r as SelectableList,
|
|
110
|
+
ak as SelectableListItem,
|
|
111
|
+
a6 as SkeletonLoading,
|
|
112
|
+
a7 as Source,
|
|
113
|
+
a8 as StarRating,
|
|
114
|
+
a9 as StatChange,
|
|
115
|
+
aa as StatValue,
|
|
116
|
+
T as Table,
|
|
117
|
+
al as TableRow,
|
|
118
|
+
z2 as TextInput,
|
|
119
|
+
f as Textarea,
|
|
120
|
+
ab as Time,
|
|
121
|
+
ac as TimeRangeInline,
|
|
122
|
+
ad as TimeStacked,
|
|
123
|
+
ae as Timeline,
|
|
124
|
+
N as Timestamp,
|
|
125
|
+
w2 as Title,
|
|
126
|
+
ag as TitleCount,
|
|
127
|
+
af as TitleDetail,
|
|
128
|
+
ah as Toggle,
|
|
129
|
+
t2 as Tooltip,
|
|
130
|
+
T2 as Typeahead,
|
|
131
|
+
Z2 as User,
|
|
132
|
+
ai as UserBadge,
|
|
133
|
+
aj as WeekdayStacked,
|
|
134
|
+
U3 as barGraphTheme,
|
|
135
|
+
V3 as circleChartTheme,
|
|
136
|
+
c as colors,
|
|
137
|
+
b2 as datePickerHelper,
|
|
138
|
+
e2 as dialogHelper,
|
|
139
|
+
f2 as formHelper,
|
|
140
|
+
W3 as gaugeTheme,
|
|
141
|
+
a11 as highchartsDarkTheme,
|
|
142
|
+
h2 as highchartsTheme,
|
|
143
|
+
X3 as lineGraphTheme,
|
|
144
|
+
Y3 as mapTheme,
|
|
145
|
+
t3 as typography,
|
|
146
|
+
u2 as useCollapsible,
|
|
147
|
+
N2 as useDropdown,
|
|
148
|
+
K3 as usePBCopy
|
|
149
|
+
};
|
package/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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playbook-ui",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.25.0-alpha.testingcss9700",
|
|
4
4
|
"description": "Nitro's Design System",
|
|
5
5
|
"main": "./dist/playbook.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"homepage": "https://github.com/powerhome/playbook#readme",
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@floating-ui/dom": "^1.6.13",
|
|
38
|
-
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
39
38
|
"@popperjs/core": "^2.11.8",
|
|
40
39
|
"classnames": "2.5.1",
|
|
41
40
|
"flatpickr": "^4.6.13",
|
|
@@ -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};
|