playbook_ui 16.8.0.pre.alpha.play299216890 → 16.8.0.pre.alpha.play301316889

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -3
  3. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -3
  4. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +10 -18
  5. data/app/pb_kits/playbook/pb_date_picker/docs/_playground.json +0 -1
  6. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
  7. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
  8. data/app/pb_kits/playbook/pb_date_picker/kit.schema.json +0 -8
  9. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -1
  10. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +9 -11
  11. data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +12 -24
  12. data/app/pb_kits/playbook/utilities/icons/allicons.tsx +38 -0
  13. data/dist/chunks/{_pb_line_graph-D_5Qj7RV.js → _pb_line_graph-5ED4uF6R.js} +1 -1
  14. data/dist/chunks/{_typeahead-CZnwqRbP.js → _typeahead-sW4KcDqp.js} +1 -1
  15. data/dist/chunks/{globalProps-4JfvDJOJ.js → globalProps-CNMeQljP.js} +1 -1
  16. data/dist/chunks/lib-DD2WQ9Er.js +29 -0
  17. data/dist/chunks/vendor.js +3 -3
  18. data/dist/playbook-rails-react-bindings.js +1 -1
  19. data/dist/playbook-rails.js +1 -1
  20. data/lib/playbook/version.rb +1 -1
  21. metadata +5 -8
  22. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.html.erb +0 -1
  23. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.jsx +0 -15
  24. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_asc.md +0 -1
  25. data/dist/chunks/lib-LYU8yq_z.js +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55ce3fc93b65b84a7675452fc441dc46474669968c56a5170511fbab48f609a7
4
- data.tar.gz: 3845a85642d2eca81306da516098d47e091e14c96f287b31cbaa9314371b23be
3
+ metadata.gz: edb2d6b1943796215222f43d5a667089909a292040708c227c91967e72f6f0bc
4
+ data.tar.gz: 1762487740450da1b7b322409360bdaefb03cf1c4b7f14b500817a5374453fd2
5
5
  SHA512:
6
- metadata.gz: 6c35e16d11f45e25d82a5d945a755500eb142007a0d420f9b20c05f0941eb9a9629ddbc79c226e0eb996ec8a99dee17eb17a4115ebe40854a9bf15fa36367880
7
- data.tar.gz: 53cef8d58713fd21817e3a37cc85f728610dc1700017a19e57e5abae1148b1d7a581fcc015023a32c5fe87b46756fb6292024deca70999605ee7be0116adc6b7
6
+ metadata.gz: e5e4c4a11408e787aa02ecf02ae3a815b92eb4c8010b1da263ae2a266da889d6b0364d38ee2471b58c9be08df653ee84d2999deed123f4979df84b15fe8c7c72
7
+ data.tar.gz: 3b23460679cd966247435ff055de878cdaceab02e5b6279bc8c8cb6bfd0071718f77bcfb82c710d4cdc7ed72a7607d272a78305d48b1b6bb079cc6f6559c735e
@@ -87,7 +87,6 @@ type DatePickerProps = {
87
87
  thisRangesEndToday?: boolean,
88
88
  timeFormat?: string,
89
89
  type?: string,
90
- yearAscending?: boolean,
91
90
  yearRange?: number[],
92
91
  controlsStartId?: string,
93
92
  controlsEndId?: string,
@@ -141,7 +140,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
141
140
  showTimezone = false,
142
141
  staticPosition = true,
143
142
  thisRangesEndToday = false,
144
- yearAscending = false,
145
143
  yearRange = [1900, 2100],
146
144
  controlsStartId,
147
145
  controlsEndId,
@@ -201,7 +199,6 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
201
199
  showTimezone,
202
200
  staticPosition,
203
201
  thisRangesEndToday,
204
- yearAscending,
205
202
  yearRange,
206
203
  controlsStartId,
207
204
  controlsEndId,
@@ -89,8 +89,6 @@ module Playbook
89
89
  default: ""
90
90
  prop :cursor, type: Playbook::Props::String,
91
91
  default: "pointer"
92
- prop :year_ascending, type: Playbook::Props::Boolean,
93
- default: false
94
92
 
95
93
  def classname
96
94
  default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
@@ -124,7 +122,6 @@ module Playbook
124
122
  staticPosition: static_position,
125
123
  thisRangesEndToday: this_ranges_end_today,
126
124
  yearRange: year_range,
127
- yearAscending: year_ascending,
128
125
  controlsStartId: controls_start_id,
129
126
  controlsEndId: controls_end_id,
130
127
  syncStartWith: sync_start_with,
@@ -7,7 +7,10 @@ import timeSelectPlugin from './plugins/timeSelect'
7
7
  import quickPickPlugin from './plugins/quickPick'
8
8
  import { getAllIcons } from '../utilities/icons/allicons';
9
9
 
10
- const angleDown = getAllIcons().angleDown.string
10
+ const { angleDown, angleLeft, angleRight } = getAllIcons()
11
+ const angleDownString = angleDown.string
12
+ const angleLeftString = angleLeft.string
13
+ const angleRightString = angleRight.string
11
14
 
12
15
  const getPositionElement = (element: string | Element) => {
13
16
  return (typeof element === 'string') ? document.querySelectorAll(element)[0] : element
@@ -32,7 +35,6 @@ type DatePickerConfig = {
32
35
  thisRangesEndToday?: boolean,
33
36
  timeCaption?: string,
34
37
  timeFormat?: string,
35
- yearAscending?: boolean,
36
38
  yearRange: number[],
37
39
  controlsStartId?: string,
38
40
  controlsEndId?: string,
@@ -71,7 +73,6 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
71
73
  thisRangesEndToday = false,
72
74
  timeCaption = 'Select Time',
73
75
  timeFormat = 'at h:i K',
74
- yearAscending,
75
76
  yearRange,
76
77
  controlsStartId,
77
78
  controlsEndId,
@@ -367,7 +368,7 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
367
368
  maxDate: effectiveMaxDate,
368
369
  minDate: effectiveMinDate,
369
370
  mode,
370
- nextArrow: '<i class="far fa-angle-right"></i>',
371
+ nextArrow: `<div style="height: 14px;">${angleRightString}</div>`,
371
372
  onOpen: [(_selectedDates, _dateStr, fp) => {
372
373
  // If defaultDate was out of range of a dev set min/max date, restore it when calendar opens (in situation where the input was manually cleared or the calendar was closed without selection)
373
374
  if (hasOutOfRangeDefault) {
@@ -439,7 +440,7 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
439
440
  plugins: setPlugins(thisRangesEndToday, customQuickPickDates),
440
441
  position,
441
442
  positionElement: getPositionElement(positionElement),
442
- prevArrow: '<i class="far fa-angle-left"></i>',
443
+ prevArrow: `<div style="height: 14px;">${angleLeftString}</div>`,
443
444
  static: staticPosition,
444
445
  })
445
446
 
@@ -517,14 +518,8 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
517
518
 
518
519
  // create html option tags for desired years
519
520
  let years = ''
520
- if (yearAscending) {
521
- for (let year = setMinYear; year <= setMaxYear; year++) {
522
- years += `<option value="${year}">${year}</option>`
523
- }
524
- } else {
525
- for (let year = setMaxYear; year >= setMinYear; year--) {
526
- years += `<option value="${year}">${year}</option>`
527
- }
521
+ for (let year = setMaxYear; year >= setMinYear; year--) {
522
+ years += `<option value="${year}">${year}</option>`
528
523
  }
529
524
 
530
525
  // variablize each dropdown selector
@@ -659,12 +654,9 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
659
654
  }
660
655
 
661
656
  // Adding dropdown icons to year and month select
662
- dropdown.insertAdjacentHTML('afterend', `<i class="year-dropdown-icon">${angleDown}</i>`)
657
+ dropdown.insertAdjacentHTML('afterend', `<i class="year-dropdown-icon">${angleDownString}</i>`)
663
658
  if (picker.monthElements[0].parentElement) {
664
- return picker.monthElements[0].insertAdjacentHTML('afterend', `<i class="month-dropdown-icon">${angleDown}</i>`)}
665
- // if (picker.weekElements[0].parentElement){
666
- // return picker.weekElements[0].insertAdjacentHTML('afterend', '<i class="far fa-angle-down year-dropdown-icon" id="test-id"></i>')
667
- // }
659
+ return picker.monthElements[0].insertAdjacentHTML('afterend', `<i class="month-dropdown-icon">${angleDownString}</i>`)}
668
660
 
669
661
  // Remove readonly attribute for validation and or text input
670
662
  if (allowInput){
@@ -16,7 +16,6 @@
16
16
  "showTimezone": false,
17
17
  "staticPosition": true,
18
18
  "thisRangesEndToday": false,
19
- "yearAscending": false,
20
19
  "controlsStartId": "",
21
20
  "controlsEndId": "",
22
21
  "syncStartWith": "",
@@ -23,7 +23,6 @@ examples:
23
23
  - date_picker_flatpickr_methods: Flatpickr Methods
24
24
  - date_picker_hooks: Hooks
25
25
  - date_picker_year_range: Year Range
26
- - date_picker_year_asc: Year Ascending
27
26
  - date_picker_anti_patterns: Anti-Patterns
28
27
  - date_picker_margin_bottom: Margin Bottom
29
28
  - date_picker_inline: Inline
@@ -59,7 +58,6 @@ examples:
59
58
  - date_picker_flatpickr_methods: Flatpickr Methods
60
59
  - date_picker_hooks: Hooks
61
60
  - date_picker_year_range: Year Range
62
- - date_picker_year_asc: Year Ascending
63
61
  - date_picker_margin_bottom: Margin Bottom
64
62
  - date_picker_inline: Inline
65
63
  - date_picker_month_and_year: Month & Year Only
@@ -30,4 +30,3 @@ export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
30
30
  export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
31
31
  export { default as DatePickerRequiredIndicator } from "./_date_picker_required_indicator.jsx";
32
32
  export { default as DatePickerDialogSubmission } from "./_date_picker_dialog_submission.jsx";
33
- export { default as DatePickerYearAsc } from './_date_picker_year_asc.jsx'
@@ -257,14 +257,6 @@
257
257
  "react"
258
258
  ]
259
259
  },
260
- "yearAscending": {
261
- "type": "boolean",
262
- "platforms": [
263
- "react",
264
- "rails"
265
- ],
266
- "default": false
267
- },
268
260
  "yearRange": {
269
261
  "type": "array",
270
262
  "platforms": [
@@ -32,7 +32,7 @@
32
32
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
33
33
 
34
34
  <%= form.actions do |action| %>
35
- <%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
35
+ <%= action.submit props: { text: "Apply", data: { disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe },}%>
36
36
  <%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
37
37
  <% end %>
38
38
  <% end %>
@@ -19,18 +19,16 @@ const PopoverWithButton = (props) => {
19
19
  onClick={handleTogglePopover}
20
20
  variant="secondary"
21
21
  >
22
- <Flex align="center">
22
+ <Flex
23
+ align="center"
24
+ gap="xxs"
25
+ >
23
26
  {"Filter By"}
24
- <Flex
25
- className={showPopover ? "fa-flip-vertical" : ""}
26
- display="inline_flex"
27
- >
28
- <Icon
29
- fixedWidth
30
- icon="angle-down"
31
- margin-left="xxs"
32
- />
33
- </Flex>
27
+ <Icon
28
+ fixedWidth
29
+ flip={showPopover ? "vertical" : "none"}
30
+ icon="angle-down"
31
+ />
34
32
  </Flex>
35
33
  </Button>
36
34
  )
@@ -1,7 +1,5 @@
1
1
  import React, { useState } from 'react'
2
2
 
3
- import { getAllIcons } from "../../utilities/icons/allicons"
4
-
5
3
  import Flex from '../../pb_flex/_flex'
6
4
  import PbReactPopover from '../../pb_popover/_popover'
7
5
  import Button from '../../pb_button/_button'
@@ -67,8 +65,6 @@ const toolbarDropdownItems = [
67
65
  },
68
66
  ]
69
67
 
70
- const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
71
-
72
68
  const handleTogglePopover = () => {
73
69
  setShowPopover(!showPopover)
74
70
  }
@@ -92,16 +88,12 @@ for (const { text, isActive, icon } of toolbarDropdownItems) {
92
88
  size="lg"
93
89
  />
94
90
  <div>{text}</div>
95
- <Flex className={showPopover ? "fa-flip-vertical" : ""}
96
- display="inline_flex"
97
- >
98
- <Icon
99
- className="svg-inline--fa"
100
- customIcon={angleDown}
101
- fixedWidth
102
- margin-left="xs"
103
- />
104
- </Flex>
91
+ <Icon
92
+ fixedWidth
93
+ flip={showPopover ? "vertical" : "none"}
94
+ icon="angle-down"
95
+ margin-left="xs"
96
+ />
105
97
  </Flex>
106
98
  );
107
99
  }
@@ -127,16 +119,12 @@ const popoverReference = (
127
119
  size="lg"
128
120
  />
129
121
  <div>Paragraph</div>
130
- <Flex className={showPopover ? "fa-flip-vertical" : ""}
131
- display="inline_flex"
132
- >
133
- <Icon
134
- className="svg-inline--fa"
135
- customIcon={angleDown}
136
- fixedWidth
137
- margin-left="xs"
138
- />
139
- </Flex>
122
+ <Icon
123
+ fixedWidth
124
+ flip={showPopover ? "vertical" : "none"}
125
+ icon="angle-down"
126
+ margin-left="xs"
127
+ />
140
128
  </Flex>
141
129
  )
142
130
  )
@@ -147,6 +147,36 @@ const angleDown = (
147
147
  </svg>
148
148
  )
149
149
 
150
+ const angleLeft = (
151
+ <svg
152
+ fill="none"
153
+ height="25"
154
+ viewBox="0 0 31 25"
155
+ width="31"
156
+ xmlns="http://www.w3.org/2000/svg"
157
+ >
158
+ <path
159
+ d="M10.6074 11.3086L18.1074 3.85547C18.5293 3.38672 19.2324 3.38672 19.7012 3.85547C20.123 4.27734 20.123 4.98047 19.7012 5.40234L12.9512 12.1055L19.6543 18.8555C20.123 19.2773 20.123 19.9805 19.6543 20.4023C19.2324 20.8711 18.5293 20.8711 18.1074 20.4023L10.6074 12.9023C10.1387 12.4805 10.1387 11.7773 10.6074 11.3086Z"
160
+ fill="#242B42"
161
+ />
162
+ </svg>
163
+ )
164
+
165
+ const angleRight = (
166
+ <svg
167
+ fill="none"
168
+ height="25"
169
+ viewBox="0 0 31 25"
170
+ width="31"
171
+ xmlns="http://www.w3.org/2000/svg"
172
+ >
173
+ <path
174
+ d="M21.2012 11.3086C21.623 11.7773 21.623 12.4805 21.2012 12.9023L13.7012 20.4023C13.2324 20.8711 12.5293 20.8711 12.1074 20.4023C11.6387 19.9805 11.6387 19.2773 12.1074 18.8555L18.8105 12.1523L12.1074 5.40234C11.6387 4.98047 11.6387 4.27734 12.1074 3.85547C12.5293 3.38672 13.2324 3.38672 13.6543 3.85547L21.2012 11.3086Z"
175
+ fill="#242B42"
176
+ />
177
+ </svg>
178
+ )
179
+
150
180
  export const getAllIcons = () => {
151
181
 
152
182
  return {
@@ -177,6 +207,14 @@ export const getAllIcons = () => {
177
207
  angleDown: {
178
208
  icon: angleDown,
179
209
  string: ReactDOMServer.renderToStaticMarkup(angleDown)
210
+ },
211
+ angleLeft: {
212
+ icon: angleLeft,
213
+ string: ReactDOMServer.renderToStaticMarkup(angleLeft)
214
+ },
215
+ angleRight: {
216
+ icon: angleRight,
217
+ string: ReactDOMServer.renderToStaticMarkup(angleRight)
180
218
  }
181
219
  }
182
220
  }
@@ -1 +1 @@
1
- import{jsx}from"react/jsx-runtime";import{useMemo}from"react";import{b as buildAriaProps,a as buildDataProps,c as buildHtmlProps,d as classnames,e as buildCss,g as globalProps}from"./globalProps-4JfvDJOJ.js";import Highcharts from"highcharts";import HighchartsReact from"highcharts-react-official";import{t as typography,c as colors}from"./lib-LYU8yq_z.js";import highchartsMore from"highcharts/highcharts-more";import solidGauge from"highcharts/modules/solid-gauge";const barGraphTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"column"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],credits:{enabled:false},legend:{enabled:false,itemStyle:{color:colors.text_lt_light,fill:colors.text_lt_light,fontSize:typography.text_smaller}},xAxis:{gridLineWidth:0,lineColor:colors.border_light,tickColor:colors.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_light,minorGridLineColor:colors.border_light,lineWidth:0,tickWidth:0,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbBarGraph=props=>{const{aria:aria={},data:data={},id:id,htmlOptions:htmlOptions={},options:options,className:className}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_bar_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbBarGraph />",options);return{}}return Highcharts.merge({},barGraphTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbCircleChartTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},chart:{type:"pie"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{pie:{dataLabels:{enabled:false,connectorShape:"straight",connectorWidth:3,format:"<div>{point.name}</div>",style:{fontFamily:typography.font_family_base,fontSize:typography.text_smaller,color:colors.text_lt_light,fontWeight:typography.regular,textOutline:"2px $white"}},innerSize:"50%",borderColor:"",borderWidth:null,colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7]}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemStyle:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_lt_default},itemHiddenStyle:{color:colors.text_lt_lighter}},credits:{enabled:false}};const PbCircleChart=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_circle_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbCircleChart />",options);return{}}return Highcharts.merge({},pbCircleChartTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbGaugeGraphTheme={title:{text:"",style:{fontFamily:typography.font_family_base,fontSize:typography.text_larger}},chart:{type:"solidgauge",events:{render(){this.container;const arc=this.container.querySelector("path.gauge-pane");if(arc)arc.setAttribute("stroke-linejoin","round")}}},pane:{size:"90%",startAngle:-100,endAngle:100,background:[{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane",borderColor:colors.border_light,borderRadius:"50%"}]},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},yAxis:{min:0,max:100,lineWidth:0,tickPositions:[]},plotOptions:{solidgauge:{borderColor:colors.data_1,borderWidth:20,color:colors.data_1,radius:90,innerRadius:"90%",y:-26,dataLabels:{borderWidth:0,color:colors.text_lt_default,enabled:true,format:'<span class="fix">{y:,f}</span>',style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}},credits:{enabled:false}};const PbGaugeChart=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,ref:ref,options:options={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_gauge_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options);return{}}return Highcharts.merge({},pbGaugeGraphTheme,options)}),[options]);highchartsMore(Highcharts);solidGauge(Highcharts);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,ref:ref,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbLineGraphTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"line"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{line:{dataLabels:{enabled:false}}},credits:{enabled:false},legend:{enabled:false,itemStyle:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_lt_default},itemHiddenStyle:{color:colors.text_lt_lighter}},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],xAxis:{gridLineWidth:0,lineColor:colors.border_light,tickColor:colors.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_light,minorGridLineColor:colors.border_light,lineWidth:0,tickWidth:0,tickPixelInterval:50,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbLineGraph=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_line_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options);return{}}return Highcharts.merge({},pbLineGraphTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};export{PbBarGraph as P,PbCircleChart as a,PbGaugeChart as b,PbLineGraph as c};
1
+ import{jsx}from"react/jsx-runtime";import{useMemo}from"react";import{b as buildAriaProps,a as buildDataProps,c as buildHtmlProps,d as classnames,e as buildCss,g as globalProps}from"./globalProps-CNMeQljP.js";import Highcharts from"highcharts";import HighchartsReact from"highcharts-react-official";import{t as typography,c as colors}from"./lib-DD2WQ9Er.js";import highchartsMore from"highcharts/highcharts-more";import solidGauge from"highcharts/modules/solid-gauge";const barGraphTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"column"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],credits:{enabled:false},legend:{enabled:false,itemStyle:{color:colors.text_lt_light,fill:colors.text_lt_light,fontSize:typography.text_smaller}},xAxis:{gridLineWidth:0,lineColor:colors.border_light,tickColor:colors.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_light,minorGridLineColor:colors.border_light,lineWidth:0,tickWidth:0,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbBarGraph=props=>{const{aria:aria={},data:data={},id:id,htmlOptions:htmlOptions={},options:options,className:className}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_bar_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbBarGraph />",options);return{}}return Highcharts.merge({},barGraphTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbCircleChartTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},chart:{type:"pie"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{pie:{dataLabels:{enabled:false,connectorShape:"straight",connectorWidth:3,format:"<div>{point.name}</div>",style:{fontFamily:typography.font_family_base,fontSize:typography.text_smaller,color:colors.text_lt_light,fontWeight:typography.regular,textOutline:"2px $white"}},innerSize:"50%",borderColor:"",borderWidth:null,colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7]}},legend:{layout:"horizontal",align:"center",verticalAlign:"bottom",itemStyle:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_lt_default},itemHiddenStyle:{color:colors.text_lt_lighter}},credits:{enabled:false}};const PbCircleChart=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_circle_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbCircleChart />",options);return{}}return Highcharts.merge({},pbCircleChartTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbGaugeGraphTheme={title:{text:"",style:{fontFamily:typography.font_family_base,fontSize:typography.text_larger}},chart:{type:"solidgauge",events:{render(){this.container;const arc=this.container.querySelector("path.gauge-pane");if(arc)arc.setAttribute("stroke-linejoin","round")}}},pane:{size:"90%",startAngle:-100,endAngle:100,background:[{borderWidth:20,innerRadius:"90%",outerRadius:"90%",shape:"arc",className:"gauge-pane",borderColor:colors.border_light,borderRadius:"50%"}]},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},pointFormat:'<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.y}</b>',followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},yAxis:{min:0,max:100,lineWidth:0,tickPositions:[]},plotOptions:{solidgauge:{borderColor:colors.data_1,borderWidth:20,color:colors.data_1,radius:90,innerRadius:"90%",y:-26,dataLabels:{borderWidth:0,color:colors.text_lt_default,enabled:true,format:'<span class="fix">{y:,f}</span>',style:{fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_2},y:-26}}},credits:{enabled:false}};const PbGaugeChart=props=>{const{aria:aria={},className:className,data:data={},htmlOptions:htmlOptions={},id:id,ref:ref,options:options={}}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_gauge_chart"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options);return{}}return Highcharts.merge({},pbGaugeGraphTheme,options)}),[options]);highchartsMore(Highcharts);solidGauge(Highcharts);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,ref:ref,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};const pbLineGraphTheme={title:{text:"",style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.bold,fontSize:typography.heading_3}},subtitle:{text:"",style:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_base}},chart:{type:"line"},tooltip:{backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,colors.bg_dark],[1,colors.bg_dark]]},followPointer:true,shadow:false,borderWidth:0,borderRadius:10,style:{fontFamily:typography.font_family_base,color:colors.text_dk_default,fontWeight:typography.regular,fontSize:typography.text_smaller}},plotOptions:{line:{dataLabels:{enabled:false}}},credits:{enabled:false},legend:{enabled:false,itemStyle:{fontFamily:typography.font_family_base,color:colors.text_lt_light,fontWeight:typography.regular,fontSize:typography.text_smaller},itemHoverStyle:{color:colors.text_lt_default},itemHiddenStyle:{color:colors.text_lt_lighter}},colors:[colors.data_1,colors.data_2,colors.data_3,colors.data_4,colors.data_5,colors.data_6,colors.data_7],xAxis:{gridLineWidth:0,lineColor:colors.border_light,tickColor:colors.border_light,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{color:colors.text_lt_default,fontFamily:typography.font_family_base,fontWeight:typography.regular,fontSize:typography.heading_4}}},yAxis:{alternateGridColor:void 0,minorTickInterval:null,gridLineColor:colors.border_light,minorGridLineColor:colors.border_light,lineWidth:0,tickWidth:0,tickPixelInterval:50,labels:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}},title:{style:{fontFamily:typography.font_family_base,color:colors.text_lt_lighter,fontWeight:typography.bold,fontSize:typography.text_smaller}}}};const PbLineGraph=props=>{const{aria:aria={},className:className,data:data={},id:id,htmlOptions:htmlOptions={},options:options}=props;const ariaProps=buildAriaProps(aria);const dataProps=buildDataProps(data);const htmlProps=buildHtmlProps(htmlOptions);const classes=classnames(buildCss("pb_pb_line_graph"),globalProps(props),className);const mergedOptions=useMemo((()=>{if(!options||typeof options!=="object"){console.error("❌ Invalid options passed to <PbLineGraph />",options);return{}}return Highcharts.merge({},pbLineGraphTheme,options)}),[options]);return jsx("div",{children:jsx(HighchartsReact,{containerProps:{className:classnames(classes),id:id,...ariaProps,...dataProps,...htmlProps},highcharts:Highcharts,options:mergedOptions})})};export{PbBarGraph as P,PbCircleChart as a,PbGaugeChart as b,PbLineGraph as c};