playbook_ui 13.12.0.pre.alpha.play1051testhighcharts1580 → 13.12.0.pre.alpha.play10281596

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -1
  3. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +6 -2
  4. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -5
  5. data/app/pb_kits/playbook/pb_badge/_badge.tsx +5 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +39 -39
  7. data/app/pb_kits/playbook/pb_body/_body.tsx +5 -1
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +5 -1
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +5 -2
  10. data/app/pb_kits/playbook/pb_button/_button.tsx +8 -1
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +5 -1
  12. data/app/pb_kits/playbook/pb_caption/_caption.tsx +6 -1
  13. data/app/pb_kits/playbook/pb_card/_card.tsx +5 -1
  14. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +7 -2
  15. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +71 -71
  16. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +5 -3
  17. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +5 -1
  18. data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -1
  19. data/app/pb_kits/playbook/pb_currency/_currency.tsx +5 -1
  20. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +208 -210
  21. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +207 -209
  22. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +5 -1
  23. data/app/pb_kits/playbook/pb_date/_date.tsx +12 -7
  24. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +5 -1
  25. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +5 -1
  26. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +15 -4
  27. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +12 -5
  28. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +5 -1
  29. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +5 -1
  30. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +15 -4
  31. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -1
  32. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +11 -3
  33. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +8 -3
  34. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +5 -1
  35. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +8 -1
  36. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +6 -2
  37. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +6 -1
  38. data/app/pb_kits/playbook/pb_flex/_flex.tsx +6 -1
  39. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +6 -1
  40. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +5 -1
  41. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +7 -1
  42. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +54 -62
  43. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +5 -1
  44. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +5 -0
  45. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +10 -3
  46. data/app/pb_kits/playbook/pb_icon/_icon.tsx +7 -1
  47. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +5 -1
  48. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -1
  49. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +5 -1
  50. data/app/pb_kits/playbook/pb_image/_image.tsx +6 -1
  51. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +5 -1
  52. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +6 -2
  53. data/app/pb_kits/playbook/pb_layout/_layout.tsx +6 -1
  54. data/app/pb_kits/playbook/pb_legend/_legend.tsx +5 -1
  55. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +6 -1
  56. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -1
  57. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +44 -44
  58. data/app/pb_kits/playbook/pb_list/_list.tsx +7 -2
  59. data/app/pb_kits/playbook/pb_list/_list_item.tsx +5 -1
  60. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +5 -1
  61. data/app/pb_kits/playbook/pb_map/_map.tsx +6 -1
  62. data/app/pb_kits/playbook/pb_message/_message.tsx +5 -1
  63. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +5 -1
  64. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -1
  65. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +5 -1
  66. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +11 -0
  67. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +7 -0
  68. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +13 -0
  69. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +11 -0
  70. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +6 -0
  71. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +5 -1
  72. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +15 -0
  73. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +5 -0
  74. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +15 -0
  75. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +15 -0
  76. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +6 -0
  77. data/app/pb_kits/playbook/pb_nav/_item.tsx +7 -2
  78. data/app/pb_kits/playbook/pb_nav/_nav.tsx +5 -1
  79. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +5 -1
  80. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +6 -2
  81. data/app/pb_kits/playbook/pb_person/_person.tsx +5 -0
  82. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +5 -1
  83. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +8 -2
  84. data/app/pb_kits/playbook/pb_pill/_pill.tsx +5 -1
  85. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -1
  86. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +5 -1
  87. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +9 -3
  88. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +5 -1
  89. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +6 -2
  90. data/app/pb_kits/playbook/pb_radio/_radio.tsx +5 -1
  91. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +7 -1
  92. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +5 -1
  93. data/app/pb_kits/playbook/pb_select/_select.tsx +6 -1
  94. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +6 -2
  95. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +5 -0
  96. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +5 -0
  97. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +11 -3
  98. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +5 -1
  99. data/app/pb_kits/playbook/pb_source/_source.tsx +5 -1
  100. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +5 -1
  101. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +14 -2
  102. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +6 -0
  103. data/app/pb_kits/playbook/pb_table/_table.tsx +5 -1
  104. data/app/pb_kits/playbook/pb_table/_table_row.tsx +5 -1
  105. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -1
  106. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +35 -0
  107. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +29 -0
  108. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +13 -0
  109. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +24 -0
  110. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +13 -0
  111. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +7 -0
  112. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +5 -2
  113. data/app/pb_kits/playbook/pb_time/_time.tsx +9 -2
  114. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +5 -1
  115. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +6 -2
  116. data/app/pb_kits/playbook/pb_timeline/_item.tsx +9 -2
  117. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -1
  118. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +5 -1
  119. data/app/pb_kits/playbook/pb_title/_title.tsx +5 -1
  120. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +5 -1
  121. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +16 -3
  122. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +5 -0
  123. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +11 -0
  124. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +10 -0
  125. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +6 -0
  126. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +4 -0
  127. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +5 -1
  128. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +38 -38
  129. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +7 -2
  130. data/app/pb_kits/playbook/pb_user/_user.tsx +5 -1
  131. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +5 -1
  132. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +5 -1
  133. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +5 -1
  134. data/app/pb_kits/playbook/utilities/props.ts +16 -0
  135. data/dist/playbook-rails.js +6 -6
  136. data/lib/playbook/version.rb +1 -1
  137. metadata +18 -2
@@ -3,259 +3,257 @@ import typography from '../tokens/exports/_typography.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
- //import Highcharts from 'highcharts'
6
+ import Highcharts from 'highcharts'
7
7
 
8
8
  const pbButtonHoverColor = '#004ebb'
9
- function highchartsTheme(highcharts: any): ThemeProps {
10
- return {
11
- lang: {
12
- thousandsSep: ',',
9
+ const highchartsTheme: ThemeProps = {
10
+ lang: {
11
+ thousandsSep: ',',
12
+ },
13
+ colors: [
14
+ colors.data_1,
15
+ colors.data_2,
16
+ colors.data_3,
17
+ colors.data_4,
18
+ colors.data_5,
19
+ colors.data_6,
20
+ colors.data_7,
21
+ ],
22
+ chart: {
23
+ borderWidth: 0,
24
+ borderRadius: 0,
25
+ plotBackgroundColor: null,
26
+ plotShadow: false,
27
+ plotBorderWidth: 0,
28
+ },
29
+ title: {
30
+ style: {
31
+ color: colors.text_lt_default,
32
+ fontFamily: typography.font_family_base,
33
+ fontWeight: typography.regular,
34
+ fontSize: typography.heading_3,
13
35
  },
14
- colors: [
15
- colors.data_1,
16
- colors.data_2,
17
- colors.data_3,
18
- colors.data_4,
19
- colors.data_5,
20
- colors.data_6,
21
- colors.data_7,
22
- ],
23
- chart: {
24
- borderWidth: 0,
25
- borderRadius: 0,
26
- plotBackgroundColor: null,
27
- plotShadow: false,
28
- plotBorderWidth: 0,
36
+ },
37
+ subtitle: {
38
+ style: {
39
+ fontFamily: typography.font_family_base,
40
+ color: colors.text_lt_light,
41
+ fontWeight: typography.regular,
42
+ fontSize: typography.text_base,
29
43
  },
30
- title: {
44
+ },
45
+ xAxis: {
46
+ gridLineWidth: 0,
47
+ lineColor: colors.border_light,
48
+ tickColor: colors.border_light,
49
+ labels: {
31
50
  style: {
32
- color: colors.text_lt_default,
33
51
  fontFamily: typography.font_family_base,
34
- fontWeight: typography.regular,
35
- fontSize: typography.heading_3,
52
+ color: colors.text_lt_lighter,
53
+ fontWeight: typography.bold,
54
+ fontSize: typography.text_smaller,
36
55
  },
37
56
  },
38
- subtitle: {
57
+ title: {
39
58
  style: {
59
+ color: colors.text_lt_default,
40
60
  fontFamily: typography.font_family_base,
41
- color: colors.text_lt_light,
42
61
  fontWeight: typography.regular,
43
- fontSize: typography.text_base,
44
- },
45
- },
46
- xAxis: {
47
- gridLineWidth: 0,
48
- lineColor: colors.border_light,
49
- tickColor: colors.border_light,
50
- labels: {
51
- style: {
52
- fontFamily: typography.font_family_base,
53
- color: colors.text_lt_lighter,
54
- fontWeight: typography.bold,
55
- fontSize: typography.text_smaller,
56
- },
57
- },
58
- title: {
59
- style: {
60
- color: colors.text_lt_default,
61
- fontFamily: typography.font_family_base,
62
- fontWeight: typography.regular,
63
- fontSize: typography.heading_4,
64
- },
62
+ fontSize: typography.heading_4,
65
63
  },
66
64
  },
67
- yAxis: {
68
- alternateGridColor: null,
69
- minorTickInterval: null,
70
- gridLineColor: colors.border_light,
71
- minorGridLineColor: colors.border_light,
72
- lineWidth: 0,
73
- tickWidth: 0,
74
- labels: {
75
- style: {
76
- fontFamily: typography.font_family_base,
77
- color: colors.text_lt_lighter,
78
- fontWeight: typography.bold,
79
- fontSize: typography.text_smaller,
80
- },
81
- },
82
- title: {
83
- style: {
84
- fontFamily: typography.font_family_base,
85
- color: colors.text_lt_lighter,
86
- fontWeight: typography.bold,
87
- fontSize: typography.text_smaller,
88
- },
89
- },
90
- },
91
- legend: {
92
- layout: 'horizontal',
93
- align: 'center',
94
- verticalAlign: 'bottom',
95
- itemStyle: {
65
+ },
66
+ yAxis: {
67
+ alternateGridColor: null,
68
+ minorTickInterval: null,
69
+ gridLineColor: colors.border_light,
70
+ minorGridLineColor: colors.border_light,
71
+ lineWidth: 0,
72
+ tickWidth: 0,
73
+ labels: {
74
+ style: {
96
75
  fontFamily: typography.font_family_base,
97
- color: colors.text_lt_light,
98
- fontWeight: typography.regular,
99
- fontSize: typography.text_smaller,
100
- },
101
- itemHoverStyle: {
102
- color: colors.text_lt_default,
103
- },
104
- itemHiddenStyle: {
105
76
  color: colors.text_lt_lighter,
77
+ fontWeight: typography.bold,
78
+ fontSize: typography.text_smaller,
106
79
  },
107
80
  },
108
- labels: {
81
+ title: {
109
82
  style: {
110
- color: colors.primary,
83
+ fontFamily: typography.font_family_base,
84
+ color: colors.text_lt_lighter,
85
+ fontWeight: typography.bold,
86
+ fontSize: typography.text_smaller,
111
87
  },
112
88
  },
113
- tooltip: {
114
- backgroundColor: {
115
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
89
+ },
90
+ legend: {
91
+ layout: 'horizontal',
92
+ align: 'center',
93
+ verticalAlign: 'bottom',
94
+ itemStyle: {
95
+ fontFamily: typography.font_family_base,
96
+ color: colors.text_lt_light,
97
+ fontWeight: typography.regular,
98
+ fontSize: typography.text_smaller,
99
+ },
100
+ itemHoverStyle: {
101
+ color: colors.text_lt_default,
102
+ },
103
+ itemHiddenStyle: {
104
+ color: colors.text_lt_lighter,
105
+ },
106
+ },
107
+ labels: {
108
+ style: {
109
+ color: colors.primary,
110
+ },
111
+ },
112
+ tooltip: {
113
+ backgroundColor: {
114
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
115
+ stops: [
116
+ [0, colors.bg_dark],
117
+ [1, colors.bg_dark],
118
+ ],
119
+ },
120
+ shadow: false,
121
+ borderWidth: 0,
122
+ borderRadius: 10,
123
+ style: {
124
+ fontFamily: typography.font_family_base,
125
+ color: colors.text_dk_default,
126
+ fontWeight: typography.regular,
127
+ fontSize: typography.text_smaller,
128
+ },
129
+ },
130
+ // specific to gauge
131
+ // unfilled gauge color
132
+ pane: {
133
+ background: {
134
+ borderColor: colors.border_light,
135
+ },
136
+ },
137
+
138
+ plotOptions: {
139
+ series: {
140
+ type: 'area',
141
+ nullColor: colors.text_lt_lighter,
142
+ fillColor: {
143
+ linearGradient: {
144
+ x1: 0,
145
+ y1: 0,
146
+ x2: 0,
147
+ y2: 1,
148
+ },
116
149
  stops: [
117
- [0, colors.bg_dark],
118
- [1, colors.bg_dark],
150
+ [0, Highcharts.getOptions().colors[0]],
151
+ [1, 'white'],
119
152
  ],
120
153
  },
121
- shadow: false,
122
- borderWidth: 0,
123
- borderRadius: 10,
124
- style: {
125
- fontFamily: typography.font_family_base,
126
- color: colors.text_dk_default,
127
- fontWeight: typography.regular,
128
- fontSize: typography.text_smaller,
129
- },
154
+ threshold: null,
130
155
  },
131
- // specific to gauge
132
- // unfilled gauge color
133
- pane: {
134
- background: {
135
- borderColor: colors.border_light,
156
+ // PIE STYLES
157
+ pie: {
158
+ colors: [
159
+ colors.data_1,
160
+ colors.data_2,
161
+ colors.data_3,
162
+ colors.data_4,
163
+ colors.data_5,
164
+ colors.data_6,
165
+ colors.data_7,
166
+ ],
167
+ dataLabels: {
168
+ style: {
169
+ fontFamily: typography.font_family_base,
170
+ fontSize: typography.text_smaller,
171
+ color: colors.text_lt_light,
172
+ fontWeight: typography.regular,
173
+ },
136
174
  },
137
175
  },
138
176
 
139
- plotOptions: {
140
- series: {
141
- type: 'area',
142
- nullColor: colors.text_lt_lighter,
143
- fillColor: {
144
- linearGradient: {
145
- x1: 0,
146
- y1: 0,
147
- x2: 0,
148
- y2: 1,
149
- },
150
- stops: [
151
- [0, highcharts.getOptions().colors[0]],
152
- [1, 'white'],
153
- ],
154
- },
155
- threshold: null,
177
+ // LINE CHART STYLES
178
+ line: {
179
+ dataLabels: {
180
+ color: '#CCC',
156
181
  },
157
- // PIE STYLES
158
- pie: {
159
- colors: [
160
- colors.data_1,
161
- colors.data_2,
162
- colors.data_3,
163
- colors.data_4,
164
- colors.data_5,
165
- colors.data_6,
166
- colors.data_7,
167
- ],
168
- dataLabels: {
169
- style: {
170
- fontFamily: typography.font_family_base,
171
- fontSize: typography.text_smaller,
172
- color: colors.text_lt_light,
173
- fontWeight: typography.regular,
182
+ marker: {
183
+ lineColor: '#333',
184
+ },
185
+ area: {
186
+ shadow: false,
187
+ states: {
188
+ hover: {
189
+ lineWidth: 1,
174
190
  },
175
191
  },
192
+ threshold: null,
176
193
  },
194
+ },
177
195
 
178
- // LINE CHART STYLES
179
- line: {
180
- dataLabels: {
181
- color: '#CCC',
196
+ //TREEMAP CHART STYLES
197
+ treemap: {
198
+ layoutAlgorithm: "squarified",
199
+ allowTraversingTree: false,
200
+ animationLimit: 1000,
201
+ colors: [
202
+ colors.data_1,
203
+ colors.data_2,
204
+ colors.data_3,
205
+ colors.data_4,
206
+ colors.data_5,
207
+ colors.data_6,
208
+ colors.data_7,
209
+ colors.data_8,
210
+ ],
211
+ colorByPoint: true,
212
+ dataLabels: {
213
+ enabled: true,
214
+ style: {
215
+ fontFamily: typography.font_family_base,
216
+ fontWeight: typography.bold,
217
+ fontSize: typography.heading_4,
182
218
  },
183
- marker: {
184
- lineColor: '#333',
219
+ },
220
+ levels: [
221
+ {
222
+ level: 1,
223
+ dataLabels: {
224
+ enabled: false,
225
+ },
185
226
  },
186
- area: {
187
- shadow: false,
227
+ ],
228
+ traverseUpButton: {
229
+ position: { y: -50 },
230
+ text: '< Back',
231
+ theme: {
232
+ r: 4,
188
233
  states: {
189
234
  hover: {
190
- lineWidth: 1,
235
+ style: {
236
+ fill: pbButtonHoverColor,
237
+ },
191
238
  },
192
239
  },
193
- threshold: null,
194
- },
195
- },
196
-
197
- //TREEMAP CHART STYLES
198
- treemap: {
199
- layoutAlgorithm: "squarified",
200
- allowTraversingTree: false,
201
- animationLimit: 1000,
202
- colors: [
203
- colors.data_1,
204
- colors.data_2,
205
- colors.data_3,
206
- colors.data_4,
207
- colors.data_5,
208
- colors.data_6,
209
- colors.data_7,
210
- colors.data_8,
211
- ],
212
- colorByPoint: true,
213
- dataLabels: {
214
- enabled: true,
215
240
  style: {
216
- fontFamily: typography.font_family_base,
241
+ fill: colors.royal,
242
+ color: colors.white,
243
+ fontSize: `${typography.text_small}`,
217
244
  fontWeight: typography.bold,
218
- fontSize: typography.heading_4,
219
- },
220
- },
221
- levels: [
222
- {
223
- level: 1,
224
- dataLabels: {
225
- enabled: false,
226
- },
227
- },
228
- ],
229
- traverseUpButton: {
230
- position: { y: -50 },
231
- text: '< Back',
232
- theme: {
233
- r: 4,
234
- states: {
235
- hover: {
236
- style: {
237
- fill: pbButtonHoverColor,
238
- },
239
- },
240
- },
241
- style: {
242
- fill: colors.royal,
243
- color: colors.white,
244
- fontSize: `${typography.text_small}`,
245
- fontWeight: typography.bold,
246
- fontFamily: `${typography.font_family_base}`,
247
- },
248
- stroke: colors.royal,
249
- height: 24,
250
- width: 90,
245
+ fontFamily: `${typography.font_family_base}`,
251
246
  },
247
+ stroke: colors.royal,
248
+ height: 24,
249
+ width: 90,
252
250
  },
253
251
  },
254
252
  },
255
- credits: {
256
- enabled: false
257
- },
258
- }
253
+ },
254
+ credits: {
255
+ enabled: false
256
+ },
259
257
  }
260
258
 
261
259
  export { highchartsTheme }
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
 
6
6
  import Body from '../pb_body/_body'
@@ -12,6 +12,7 @@ type DashboardValueProps = {
12
12
  aria?: { [key: string]: string },
13
13
  className?: string,
14
14
  data?: { [key: string]: string },
15
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
15
16
  id?: string,
16
17
  statChange?: {
17
18
  change? : 'increase' | 'decrease' | 'neutral',
@@ -30,6 +31,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
30
31
  aria = {},
31
32
  className,
32
33
  data = {},
34
+ htmlOptions = {},
33
35
  id,
34
36
  statChange = {},
35
37
  statLabel,
@@ -38,6 +40,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
38
40
 
39
41
  const ariaProps = buildAriaProps(aria)
40
42
  const dataProps = buildDataProps(data)
43
+ const htmlProps = buildHtmlProps(htmlOptions)
41
44
  const classes = classnames(
42
45
  buildCss('pb_dashboard_value_kit', align),
43
46
  globalProps(props),
@@ -48,6 +51,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
48
51
  <div
49
52
  {...ariaProps}
50
53
  {...dataProps}
54
+ {...htmlProps}
51
55
  className={classes}
52
56
  id={id}
53
57
  >
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import classnames from "classnames";
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
5
5
  import { globalProps } from "../utilities/globalProps";
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
@@ -15,6 +15,7 @@ type PbDateProps = {
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
17
  data?: { [key: string]: string };
18
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
18
19
  id?: string;
19
20
  showDayOfWeek?: boolean;
20
21
  showIcon?: boolean;
@@ -29,6 +30,7 @@ const PbDate = (props: PbDateProps) => {
29
30
  alignment = "left",
30
31
  className,
31
32
  data = {},
33
+ htmlOptions = {},
32
34
  id,
33
35
  showDayOfWeek = false,
34
36
  showIcon = false,
@@ -43,8 +45,9 @@ const PbDate = (props: PbDateProps) => {
43
45
  const year = DateTime.toYear(value);
44
46
  const currentYear = new Date().getFullYear();
45
47
 
46
- const ariaProps = buildAriaProps(aria);
47
- const dataProps = buildDataProps(data);
48
+ const ariaProps = buildAriaProps(aria)
49
+ const dataProps = buildDataProps(data)
50
+ const htmlProps = buildHtmlProps(htmlOptions)
48
51
 
49
52
  const classes = classnames(
50
53
  buildCss("pb_date_kit", alignment),
@@ -53,10 +56,12 @@ const PbDate = (props: PbDateProps) => {
53
56
  );
54
57
 
55
58
  return (
56
- <div {...ariaProps}
57
- {...dataProps}
58
- className={classes}
59
- id={id}
59
+ <div
60
+ {...ariaProps}
61
+ {...dataProps}
62
+ {...htmlProps}
63
+ className={classes}
64
+ id={id}
60
65
  >
61
66
  {unstyled
62
67
  ? <>
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect } from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
6
6
 
7
7
  import datePickerHelper from './date_picker_helper'
@@ -25,6 +25,7 @@ type DatePickerProps = {
25
25
  format?: string,
26
26
  hideIcon?: boolean,
27
27
  hideLabel?: boolean,
28
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
28
29
  id?: string,
29
30
  inLine?: boolean,
30
31
  inputAria?: { [key: string]: string },
@@ -67,6 +68,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
67
68
  format = 'm/d/Y',
68
69
  hideIcon = false,
69
70
  hideLabel = false,
71
+ htmlOptions = {},
70
72
  id,
71
73
  inLine = false,
72
74
  inputAria = {},
@@ -95,6 +97,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
95
97
 
96
98
  const ariaProps = buildAriaProps(aria)
97
99
  const dataProps = buildDataProps(data)
100
+ const htmlProps = buildHtmlProps(htmlOptions)
98
101
  const inputAriaProps = buildAriaProps(inputAria)
99
102
  const inputDataProps = buildDataProps(inputData)
100
103
 
@@ -158,6 +161,7 @@ useEffect(() => {
158
161
  <div
159
162
  {...ariaProps}
160
163
  {...dataProps}
164
+ {...htmlProps}
161
165
  className={classes}
162
166
  id={id}
163
167
  >
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { globalProps } from "../utilities/globalProps";
5
- import { buildCss, buildDataProps } from "../utilities/props";
5
+ import { buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
8
8
  import Body from "../pb_body/_body";
@@ -16,6 +16,7 @@ type DateRangeInlineProps = {
16
16
  align?: "left" | "center" | "vertical";
17
17
  size?: "sm" | "xs";
18
18
  dark?: boolean;
19
+ htmlOptions?: {[key: string]: string | number | boolean | Function};
19
20
  icon?: boolean;
20
21
  startDate?: Date;
21
22
  endDate?: Date;
@@ -40,6 +41,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
40
41
  size = "sm",
41
42
  align = "left",
42
43
  data = {},
44
+ htmlOptions = {},
43
45
  startDate,
44
46
  endDate,
45
47
  className,
@@ -79,6 +81,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
79
81
 
80
82
  const dateRangeClasses = buildCss("pb_date_range_inline_kit", align);
81
83
  const dataProps = buildDataProps(data)
84
+ const htmlProps = buildHtmlProps(htmlOptions)
82
85
  const renderTime = (date: Date) => {
83
86
  return (
84
87
  <time dateTime={dateTimeIso(date)}>
@@ -94,6 +97,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
94
97
  return (
95
98
  <div
96
99
  {...dataProps}
100
+ {...htmlProps}
97
101
  className={classnames(dateRangeClasses, globalProps(props), className)}
98
102
  >
99
103
  <div className="pb_date_range_inline_wrapper">
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
@@ -15,21 +15,32 @@ type DateRangeStackedProps = {
15
15
  data?: string,
16
16
  dark?: boolean,
17
17
  endDate: Date,
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
19
  id?: string,
19
20
  startDate: Date,
20
21
  }
21
22
 
22
23
  const DateRangeStacked = (props: DateRangeStackedProps) => {
23
- const { className, dark = false, endDate, startDate, data={} } = props
24
+ const {
25
+ className,
26
+ dark = false,
27
+ endDate,
28
+ htmlOptions={},
29
+ startDate,
30
+ data={},
31
+ } = props
24
32
  const css = classnames(
25
33
  buildCss('pb_date_range_stacked'),
26
34
  globalProps(props),
27
35
  className
28
36
  )
29
- const dataProps = buildDataProps(data)
37
+ const dataProps = buildDataProps(data)
38
+ const htmlProps = buildHtmlProps(htmlOptions)
30
39
 
31
40
  return (
32
- <div {...dataProps}
41
+ <div
42
+ {...dataProps}
43
+ {...htmlProps}
33
44
  className={css}
34
45
  >
35
46
  <Flex vertical="center">