playbook_ui 13.12.0.pre.alpha.play1051testhighcharts1581 → 13.12.0.pre.alpha.play10281596

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 (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 +7 -7
  136. data/lib/playbook/version.rb +1 -1
  137. metadata +18 -2
@@ -1,45 +1,47 @@
1
- /* eslint-disable */
2
1
  import React, { useEffect, useState } from "react";
3
2
  import classnames from "classnames";
4
3
  import HighchartsReact from "highcharts-react-official";
5
4
  import highchartsMore from "highcharts/highcharts-more";
6
5
 
6
+ import Highcharts from "highcharts";
7
+
7
8
  import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
8
9
  import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
9
10
  import mapColors from "../pb_dashboard/pbChartsColorsHelper";
10
11
  import { globalProps } from "../utilities/globalProps";
11
- import { buildAriaProps, buildDataProps } from "../utilities/props";
12
+ import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
12
13
 
13
14
  type CircleChartProps = {
14
- align?: "left" | "right" | "center",
15
- aria: { [key: string]: string },
16
- chartData?: [],
17
- children?: Node,
18
- className?: string,
19
- colors?: string[],
20
- dark?: Boolean,
21
- data?: Object,
22
- dataLabelHtml?: string,
23
- dataLabels?: boolean,
24
- height?: string,
25
- id?: string,
26
- innerSize?: "sm" | "md" | "lg" | "none",
27
- legend?: boolean,
28
- maxPointSize?: number,
29
- minPointSize?: number,
30
- rounded?: boolean,
31
- startAngle?: number,
32
- style?: string,
33
- title?: string,
34
- tooltipHtml: string,
35
- useHtml?: boolean,
36
- zMin?: number,
37
- layout?: "horizontal" | "vertical" | "proximate",
38
- verticalAlign?: "top" | "middle" | "bottom",
39
- x?: number,
40
- y?: number,
41
- borderColor?: string,
42
- borderWidth?: number,
15
+ align?: "left" | "right" | "center";
16
+ aria: { [key: string]: string };
17
+ chartData?: [];
18
+ children?: Node;
19
+ className?: string;
20
+ colors?: string[];
21
+ dark?: Boolean;
22
+ data?: Object;
23
+ dataLabelHtml?: string;
24
+ dataLabels?: boolean;
25
+ height?: string;
26
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
27
+ id?: string;
28
+ innerSize?: "sm" | "md" | "lg" | "none";
29
+ legend?: boolean;
30
+ maxPointSize?: number;
31
+ minPointSize?: number;
32
+ rounded?: boolean;
33
+ startAngle?: number;
34
+ style?: string;
35
+ title?: string;
36
+ tooltipHtml: string;
37
+ useHtml?: boolean;
38
+ zMin?: number;
39
+ layout?: "horizontal" | "vertical" | "proximate";
40
+ verticalAlign?: "top" | "middle" | "bottom";
41
+ x?: number;
42
+ y?: number;
43
+ borderColor?: string;
44
+ borderWidth?: number;
43
45
  };
44
46
 
45
47
  // Adjust Circle Chart Block Kit Dimensions to Match the Chart for Centering
@@ -70,6 +72,7 @@ const CircleChart = ({
70
72
  dataLabelHtml = "<div>{point.name}</div>",
71
73
  dataLabels = false,
72
74
  height,
75
+ htmlOptions = {},
73
76
  id,
74
77
  innerSize = "md",
75
78
  legend = false,
@@ -88,12 +91,31 @@ const CircleChart = ({
88
91
  ...props
89
92
  }: CircleChartProps) => {
90
93
  const ariaProps = buildAriaProps(aria);
91
- const dataProps = buildDataProps(data);
94
+ const dataProps = buildDataProps(data)
95
+ const htmlProps = buildHtmlProps(htmlOptions);
96
+ highchartsMore(Highcharts);
97
+
98
+ const setupTheme = () => {
99
+ dark
100
+ ? Highcharts.setOptions(highchartsDarkTheme)
101
+ : Highcharts.setOptions(highchartsTheme);
102
+ };
103
+ setupTheme();
104
+
105
+ Highcharts.setOptions({
106
+ tooltip: {
107
+ headerFormat: null,
108
+ pointFormat: tooltipHtml ? tooltipHtml : '<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: ' + "<b>{point.y}</b>",
109
+ useHTML: useHtml,
110
+ },
111
+ });
112
+
92
113
  const innerSizes = { sm: "35%", md: "50%", lg: "85%", none: "0%" };
93
- const innerSizeFormat = (size: "sm" | "md" | "lg" | "none") => innerSizes[size];
114
+ const innerSizeFormat = (size: "sm" | "md" | "lg" | "none") =>
115
+ innerSizes[size];
116
+
94
117
 
95
118
  const [options, setOptions] = useState({});
96
- const [isHighchartsLoaded, setIsHighchartsLoaded] = useState(false);
97
119
 
98
120
  useEffect(() => {
99
121
  const formattedChartData = chartData.map((obj: any) => {
@@ -125,7 +147,7 @@ const CircleChart = ({
125
147
  plotOptions: {
126
148
  pie: {
127
149
  colors:
128
- colors.length > 0 ? mapColors(colors) : highchartsTheme(window.Highcharts).colors,
150
+ colors.length > 0 ? mapColors(colors) : highchartsTheme.colors,
129
151
  dataLabels: {
130
152
  enabled: dataLabels,
131
153
  connectorShape: "straight",
@@ -150,58 +172,36 @@ const CircleChart = ({
150
172
  credits: false,
151
173
  };
152
174
  setOptions({ ...staticOptions });
153
-
154
- const interval = setInterval(() => {
155
- if (window.Highcharts) {
156
- clearInterval(interval)
157
- dark
158
- ? window.Highcharts.setOptions(highchartsDarkTheme(window.Highcharts))
159
- : window.Highcharts.setOptions(highchartsTheme(window.Highcharts))
160
-
161
- highchartsMore(window.Highcharts);
162
-
163
- window.Highcharts.setOptions({
164
- tooltip: {
165
- headerFormat: null,
166
- pointFormat: tooltipHtml ? tooltipHtml : '<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: ' + "<b>{point.y}</b>",
167
- useHTML: useHtml,
168
- },
169
- });
170
-
171
- setIsHighchartsLoaded(true)
172
- }
173
- }, 0)
174
175
  }, [chartData]);
175
176
 
177
+
176
178
  return (
177
179
  <>
178
180
  {children ? (
179
181
  <div id={`wrapper-circle-chart-${id}`}>
180
- {
181
- isHighchartsLoaded &&
182
- <HighchartsReact
183
- containerProps={{
184
- className: classnames("pb_circle_chart", globalProps(props)),
185
- id: id,
186
- ...ariaProps,
187
- ...dataProps,
188
- }}
189
- highcharts={window.Highcharts}
190
- options={options}
191
- />
192
- }
182
+ <HighchartsReact
183
+ containerProps={{
184
+ className: classnames("pb_circle_chart", globalProps(props)),
185
+ id: id,
186
+ ...ariaProps,
187
+ ...dataProps,
188
+ ...htmlProps,
189
+ }}
190
+ highcharts={Highcharts}
191
+ options={options}
192
+ />
193
193
  <div className="pb-circle-chart-block">{children}</div>
194
194
  </div>
195
195
  ) : (
196
- isHighchartsLoaded &&
197
196
  <HighchartsReact
198
197
  containerProps={{
199
198
  className: classnames("pb_circle_chart", globalProps(props)),
200
199
  id: id,
201
200
  ...ariaProps,
202
201
  ...dataProps,
202
+ ...htmlProps,
203
203
  }}
204
- highcharts={window.Highcharts}
204
+ highcharts={Highcharts}
205
205
  options={options}
206
206
  />
207
207
  )}
@@ -1,8 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
-
5
- import { noop } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps, noop } from '../utilities/props'
6
4
  import { globalProps } from '../utilities/globalProps'
7
5
 
8
6
  import Button from '../pb_button/_button'
@@ -15,6 +13,7 @@ type CircleIconButtonProps = {
15
13
  data?: { [key: string]: string },
16
14
  disabled?: boolean,
17
15
  icon: string,
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
17
  id?: string,
19
18
  link?: string,
20
19
  onClick?: React.MouseEventHandler<HTMLElement>,
@@ -30,6 +29,7 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
30
29
  dark,
31
30
  data = {},
32
31
  disabled,
32
+ htmlOptions = {},
33
33
  icon,
34
34
  id,
35
35
  onClick = noop,
@@ -41,6 +41,7 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
41
41
 
42
42
  const ariaProps = buildAriaProps(aria)
43
43
  const dataProps = buildDataProps(data)
44
+ const htmlProps = buildHtmlProps(htmlOptions)
44
45
  const classes = classnames(
45
46
  buildCss('pb_circle_icon_button_kit'),
46
47
  globalProps(props),
@@ -51,6 +52,7 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
51
52
  <div
52
53
  {...ariaProps}
53
54
  {...dataProps}
55
+ {...htmlProps}
54
56
  className={classes}
55
57
  id={id}
56
58
  >
@@ -3,7 +3,7 @@ import classnames from 'classnames'
3
3
  import useCollapsible from './useCollapsible'
4
4
 
5
5
  import { globalProps } from '../utilities/globalProps'
6
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
7
7
 
8
8
  import CollapsibleContent from './child_kits/CollapsibleContent'
9
9
  import CollapsibleMain from './child_kits/CollapsibleMain'
@@ -22,6 +22,7 @@ type CollapsibleProps = {
22
22
  iconSize?: IconSizes,
23
23
  onIconClick?: ()=> void,
24
24
  onClick?: ()=> void,
25
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
25
26
  id?: string,
26
27
  }
27
28
 
@@ -33,6 +34,7 @@ const Collapsible = ({
33
34
  children = [],
34
35
  collapsed = true,
35
36
  data = {},
37
+ htmlOptions = {},
36
38
  icon,
37
39
  iconColor = 'default',
38
40
  iconSize,
@@ -60,6 +62,7 @@ const Collapsible = ({
60
62
  const { children: contentChildren, ...contentProps } = Content.props
61
63
  const ariaProps = buildAriaProps(aria)
62
64
  const dataProps = buildDataProps(data)
65
+ const htmlProps = buildHtmlProps(htmlOptions)
63
66
  const classes = classnames(
64
67
  buildCss('pb_collapsible_kit'),
65
68
  globalProps(props),
@@ -70,6 +73,7 @@ const Collapsible = ({
70
73
  <div
71
74
  {...ariaProps}
72
75
  {...dataProps}
76
+ {...htmlProps}
73
77
  className={classes}
74
78
  id={id}
75
79
  >
@@ -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
 
7
7
  import Body from '../pb_body/_body'
@@ -51,6 +51,7 @@ type ContactProps = {
51
51
  contactType?: string,
52
52
  contactValue: string,
53
53
  data?: object,
54
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
54
55
  id?: string,
55
56
  }
56
57
 
@@ -62,9 +63,11 @@ const Contact = (props: ContactProps) => {
62
63
  contactType,
63
64
  contactValue,
64
65
  data = {},
66
+ htmlOptions = {},
65
67
  id } = props
66
68
  const ariaProps = buildAriaProps(aria)
67
69
  const dataProps = buildDataProps(data)
70
+ const htmlProps = buildHtmlProps(htmlOptions)
68
71
  const classes = classnames(
69
72
  buildCss('pb_contact_kit'),
70
73
  globalProps(props),
@@ -74,6 +77,7 @@ const Contact = (props: ContactProps) => {
74
77
  <div
75
78
  {...ariaProps}
76
79
  {...dataProps}
80
+ {...htmlProps}
77
81
  className={classes}
78
82
  id={id}
79
83
  >
@@ -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 { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Caption from '../pb_caption/_caption'
@@ -18,6 +18,7 @@ type CurrencyProps = {
18
18
  data?: {[key:string]:string},
19
19
  decimals?: 'default' | 'matching',
20
20
  emphasized?: boolean,
21
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
21
22
  id?: string,
22
23
  label?: string,
23
24
  size?: 'sm' | 'md' | 'lg',
@@ -42,6 +43,7 @@ const Currency = (props: CurrencyProps) => {
42
43
  data = {},
43
44
  decimals = 'default',
44
45
  emphasized = true,
46
+ htmlOptions = {},
45
47
  id,
46
48
  unit,
47
49
  className,
@@ -65,6 +67,7 @@ const Currency = (props: CurrencyProps) => {
65
67
  const [whole, decimal = '00'] = amount.split('.')
66
68
  const ariaProps = buildAriaProps(aria)
67
69
  const dataProps = buildDataProps(data)
70
+ const htmlProps = buildHtmlProps(htmlOptions)
68
71
  const classes = classnames(
69
72
  buildCss('pb_currency_kit', align, size),
70
73
  globalProps(props),
@@ -96,6 +99,7 @@ const Currency = (props: CurrencyProps) => {
96
99
  <div
97
100
  {...ariaProps}
98
101
  {...dataProps}
102
+ {...htmlProps}
99
103
  className={classes}
100
104
  id={id}
101
105
  >