playbook_ui 13.14.0.pre.alpha.play1101betaicons1825 → 13.14.0.pre.alpha.play1106filter1748

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/index.js +1 -2
  4. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
  5. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
  6. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
  7. data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
  8. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
  9. data/app/pb_kits/playbook/pb_body/_body.scss +5 -0
  10. data/app/pb_kits/playbook/pb_body/_body.tsx +9 -5
  11. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +20 -0
  12. data/app/pb_kits/playbook/pb_body/body.rb +8 -1
  13. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +4 -3
  14. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
  15. data/app/pb_kits/playbook/pb_button/_button.tsx +37 -40
  16. data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +0 -11
  17. data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
  19. data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
  20. data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
  21. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +4 -5
  22. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
  23. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
  24. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
  25. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +7 -5
  26. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
  27. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +4 -5
  28. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +12 -16
  29. data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
  30. data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
  31. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
  32. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +57 -4
  33. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +57 -4
  34. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +16 -20
  35. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
  36. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
  37. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
  38. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
  39. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
  40. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
  41. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
  42. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
  43. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
  44. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +3 -6
  45. data/app/pb_kits/playbook/pb_detail/_detail.scss +2 -2
  46. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -5
  47. data/app/pb_kits/playbook/pb_detail/detail.rb +1 -1
  48. data/app/pb_kits/playbook/pb_detail/detail.test.jsx +2 -2
  49. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
  50. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +34 -42
  51. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
  52. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +5 -4
  53. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
  54. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +4 -8
  55. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +4 -8
  56. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +2 -4
  57. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -7
  59. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
  60. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
  62. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
  63. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
  64. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
  65. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  66. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
  67. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
  68. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
  69. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
  70. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  71. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
  72. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
  73. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
  74. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
  75. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
  76. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  77. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
  78. data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
  79. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
  80. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
  81. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
  82. data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
  83. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  84. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
  85. data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
  86. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  87. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
  88. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
  89. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
  90. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
  91. data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
  92. data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
  93. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  94. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -1
  95. data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
  96. data/app/pb_kits/playbook/pb_person/docs/example.yml +0 -4
  97. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -1
  98. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -1
  99. data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
  100. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  101. data/app/pb_kits/playbook/pb_popover/index.ts +1 -1
  102. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -1
  103. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +1 -1
  104. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
  105. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
  106. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  107. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
  108. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -1
  109. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
  110. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -5
  111. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
  112. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +1 -1
  113. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -1
  114. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
  115. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -1
  116. data/app/pb_kits/playbook/pb_source/_source.tsx +1 -1
  117. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -1
  118. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
  119. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
  120. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  121. data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
  122. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
  123. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
  124. data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
  125. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
  126. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
  127. data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
  128. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  129. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
  130. data/app/pb_kits/playbook/pb_title/_title.scss +5 -0
  131. data/app/pb_kits/playbook/pb_title/_title.tsx +5 -2
  132. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +19 -0
  133. data/app/pb_kits/playbook/pb_title/title.rb +9 -2
  134. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
  135. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
  136. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
  137. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
  138. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
  139. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
  140. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  141. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -7
  142. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
  143. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
  144. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
  145. data/app/pb_kits/playbook/utilities/globalProps.ts +2 -13
  146. data/app/pb_kits/playbook/utilities/props.ts +2 -2
  147. data/dist/playbook-rails.js +5 -5
  148. data/lib/playbook/classnames.rb +0 -1
  149. data/lib/playbook/kit_base.rb +0 -2
  150. data/lib/playbook/version.rb +1 -1
  151. metadata +2 -58
  152. data/app/pb_kits/playbook/pb_beta_icon/_icon.scss +0 -12
  153. data/app/pb_kits/playbook/pb_beta_icon/_icon.tsx +0 -164
  154. data/app/pb_kits/playbook/pb_beta_icon/docs/_description.md +0 -1
  155. data/app/pb_kits/playbook/pb_beta_icon/docs/_footer.md +0 -2
  156. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.html.erb +0 -3
  157. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.jsx +0 -35
  158. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.md +0 -1
  159. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.html.erb +0 -1
  160. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.jsx +0 -19
  161. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border_swift.md +0 -7
  162. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.html.erb +0 -16
  163. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.jsx +0 -34
  164. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.md +0 -19
  165. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.html.erb +0 -1
  166. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.jsx +0 -17
  167. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default_swift.md +0 -7
  168. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.html.erb +0 -1
  169. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.jsx +0 -21
  170. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.md +0 -7
  171. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.html.erb +0 -3
  172. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.jsx +0 -33
  173. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip_swift.md +0 -11
  174. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_props_swift.md +0 -8
  175. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.html.erb +0 -2
  176. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.jsx +0 -26
  177. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.md +0 -1
  178. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.html.erb +0 -3
  179. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.jsx +0 -33
  180. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate_swift.md +0 -11
  181. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.html.erb +0 -16
  182. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.jsx +0 -133
  183. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes_swift.md +0 -46
  184. data/app/pb_kits/playbook/pb_beta_icon/docs/example.yml +0 -30
  185. data/app/pb_kits/playbook/pb_beta_icon/docs/index.js +0 -9
  186. data/app/pb_kits/playbook/pb_beta_icon/icon.html.erb +0 -15
  187. data/app/pb_kits/playbook/pb_beta_icon/icon.rb +0 -153
  188. data/app/pb_kits/playbook/pb_beta_icon/icon.test.js +0 -155
  189. data/app/pb_kits/playbook/pb_button/docs/_button_reaction_swift.md +0 -26
  190. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default_swift.md +0 -11
  191. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md +0 -13
  192. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes_swift.md +0 -18
  193. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status_swift.md +0 -14
  194. data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +0 -8
  195. data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +0 -5
  196. data/app/pb_kits/playbook/pb_select/docs/_select_default_swift.md +0 -15
  197. data/app/pb_kits/playbook/pb_select/docs/_select_error_swift.md +0 -18
  198. data/app/pb_kits/playbook/pb_select/docs/_select_props_table.md +0 -8
  199. data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +0 -37
  200. data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +0 -10
  201. data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +0 -35
  202. data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +0 -27
  203. data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +0 -35
  204. data/app/pb_kits/playbook/tokens/exports/exports.d.ts +0 -1
  205. data/app/pb_kits/playbook/utilities/_truncate.scss +0 -20
  206. data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +0 -21
  207. data/lib/playbook/truncate.rb +0 -29
@@ -1,4 +1,4 @@
1
- export const showElement = (elem: HTMLElement) => {
1
+ export const showElement = (elem:any) => {
2
2
  elem.style.display = 'block';
3
3
  const height = elem.scrollHeight + 'px'; // Get its height
4
4
  elem.style.height = height; // Update the max-height
@@ -11,7 +11,7 @@ export const showElement = (elem: HTMLElement) => {
11
11
  }, 300);
12
12
  };
13
13
 
14
- export const hideElement = (elem: HTMLElement) => {
14
+ export const hideElement = (elem:any) => {
15
15
  elem.style.height = elem.scrollHeight + 'px';
16
16
 
17
17
  window.setTimeout(() => {
@@ -15,7 +15,7 @@ const CollapsibleContent = ({
15
15
  children,
16
16
  className,
17
17
  ...props
18
- }: CollapsibleContentProps): React.ReactElement => {
18
+ }: CollapsibleContentProps) => {
19
19
  const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
20
20
  const contentCSS = buildCss('pb_collapsible_content_kit')
21
21
  const contentSpacing = globalProps(props)
@@ -33,10 +33,9 @@ const CollapsibleContent = ({
33
33
  }, [context.collapsed]);
34
34
 
35
35
  return (
36
- <div className={classnames(contentCSS, contentSpacing, "toggle-content", className)}
37
- data-collapsible-content="true"
38
- ref={contentRef}
39
- >
36
+ <div ref={contentRef}
37
+ data-collapsible-content="true"
38
+ className={classnames(contentCSS, contentSpacing, "toggle-content", className)}>
40
39
  {children}
41
40
  </div>
42
41
  )
@@ -56,7 +56,7 @@ const ToggleIcon = ({ collapsed, icon, iconSize, iconColor, onIconClick }: IconP
56
56
  return icon
57
57
  }
58
58
 
59
- const handleIconClick = (e: React.MouseEvent<HTMLElement>) => {
59
+ const handleIconClick = (e:any) => {
60
60
  if (onIconClick) {
61
61
  e.stopPropagation();
62
62
  onIconClick()
@@ -67,25 +67,21 @@ const ToggleIcon = ({ collapsed, icon, iconSize, iconColor, onIconClick }: IconP
67
67
  <>
68
68
  {collapsed ? (
69
69
  <div
70
- className="icon_wrapper"
71
- key={icon ? showIcon(icon)[0] : "chevron-down"}
72
- onClick={(e)=> handleIconClick(e)}
73
- style={{ verticalAlign: "middle", color: color }}
70
+ className="icon_wrapper"
71
+ key={icon ? showIcon(icon)[0] : "chevron-down"}
72
+ style={{ verticalAlign: "middle", color: color }}
73
+ onClick={(e)=> handleIconClick(e)}
74
74
  >
75
- <Icon icon={icon ? showIcon(icon)[0] : "chevron-down"}
76
- size={iconSize}
77
- />
75
+ <Icon icon={icon ? showIcon(icon)[0] : "chevron-down"} size={iconSize} />
78
76
  </div>
79
77
  ) : (
80
78
  <div
81
- className="icon_wrapper"
82
- key={icon ? showIcon(icon)[1] : "chevron-up"}
83
- onClick={(e)=> handleIconClick(e)}
84
- style={{ verticalAlign: "middle", color: color }}
79
+ className="icon_wrapper"
80
+ key={icon ? showIcon(icon)[1] : "chevron-up"}
81
+ style={{ verticalAlign: "middle", color: color }}
82
+ onClick={(e)=> handleIconClick(e)}
85
83
  >
86
- <Icon icon={icon ? showIcon(icon)[1] : "chevron-up"}
87
- size={iconSize}
88
- />
84
+ <Icon icon={icon ? showIcon(icon)[1] : "chevron-up"} size={iconSize} />
89
85
  </div>
90
86
  )}
91
87
  </>
@@ -122,9 +118,9 @@ const CollapsibleMain = ({
122
118
  <FlexItem>
123
119
  <ToggleIcon
124
120
  collapsed={collapsed as () => void}
125
- icon={icon as string[] | string}
126
121
  iconColor={iconColor as IconColors}
127
122
  iconSize={iconSize as IconSizes}
123
+ icon={icon as string[] | string}
128
124
  onIconClick={onIconClick}
129
125
  />
130
126
  </FlexItem>
@@ -50,12 +50,12 @@ type ContactProps = {
50
50
  contactDetail?: string,
51
51
  contactType?: string,
52
52
  contactValue: string,
53
- data?: {[key: string]: string},
54
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
53
+ data?: object,
54
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
55
55
  id?: string,
56
56
  }
57
57
 
58
- const Contact = (props: ContactProps): React.ReactElement => {
58
+ const Contact = (props: ContactProps) => {
59
59
  const {
60
60
  aria = {},
61
61
  className,
@@ -18,7 +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 | (() => void)},
21
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
22
22
  id?: string,
23
23
  label?: string,
24
24
  size?: 'sm' | 'md' | 'lg',
@@ -34,7 +34,7 @@ const sizes: {lg: 1, md: 3, sm: 4} = {
34
34
  sm: 4,
35
35
  }
36
36
 
37
- const Currency = (props: CurrencyProps): React.ReactElement => {
37
+ const Currency = (props: CurrencyProps) => {
38
38
  const {
39
39
  abbreviate = false,
40
40
  align = 'left',
@@ -2,7 +2,7 @@ import colors from "../tokens/exports/_colors.scss";
2
2
 
3
3
 
4
4
  // Map Data Color String Props to our SCSS Variables
5
- const mapColors = (array: string[]): string[] => {
5
+ const mapColors = (array: string[]) => {
6
6
  const regex = /(data)\-[1-8]/; //eslint-disable-line
7
7
 
8
8
  const newArray = array.map((item) => {
@@ -3,6 +3,9 @@ import typography from '../tokens/exports/_typography.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
+ import Highcharts from 'highcharts'
7
+
8
+ const pbButtonHoverColor = '#004ebb'
6
9
  const highchartsDarkTheme: ThemeProps = {
7
10
  lang: {
8
11
  thousandsSep: ',',
@@ -19,7 +22,7 @@ const highchartsDarkTheme: ThemeProps = {
19
22
  chart: {
20
23
  borderWidth: 0,
21
24
  borderRadius: 0,
22
- plotBackgroundColor: undefined,
25
+ plotBackgroundColor: null,
23
26
  plotShadow: false,
24
27
  plotBorderWidth: 0,
25
28
  },
@@ -61,7 +64,7 @@ const highchartsDarkTheme: ThemeProps = {
61
64
  },
62
65
  },
63
66
  yAxis: {
64
- alternateGridColor: undefined,
67
+ alternateGridColor: null,
65
68
  minorTickInterval: null,
66
69
  gridLineColor: colors.border_dark,
67
70
  minorGridLineColor: colors.border_dark,
@@ -101,6 +104,11 @@ const highchartsDarkTheme: ThemeProps = {
101
104
  color: colors.text_dk_lighter,
102
105
  },
103
106
  },
107
+ labels: {
108
+ style: {
109
+ color: colors.primary,
110
+ },
111
+ },
104
112
  tooltip: {
105
113
  backgroundColor: {
106
114
  linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
@@ -122,15 +130,29 @@ const highchartsDarkTheme: ThemeProps = {
122
130
  // specific to gauge
123
131
  // unfilled gauge color
124
132
  pane: {
125
- background: [{
133
+ background: {
126
134
  borderColor: colors.border_dark,
127
- }],
135
+ },
128
136
  },
129
137
 
130
138
  plotOptions: {
131
139
  series: {
132
140
  borderColor: colors.bg_dark_card,
133
141
  borderWidth: 2,
142
+ type: 'area',
143
+ nullColor: colors.text_dk_lighter,
144
+ fillColor: {
145
+ linearGradient: {
146
+ x1: 0,
147
+ y1: 0,
148
+ x2: 0,
149
+ y2: 1,
150
+ },
151
+ stops: [
152
+ [0, Highcharts.getOptions().colors[0]],
153
+ [1, 'white'],
154
+ ],
155
+ },
134
156
  threshold: null,
135
157
  },
136
158
  // PIE STYLES
@@ -162,6 +184,15 @@ const highchartsDarkTheme: ThemeProps = {
162
184
  marker: {
163
185
  lineColor: colors.border_dark,
164
186
  },
187
+ area: {
188
+ shadow: false,
189
+ states: {
190
+ hover: {
191
+ lineWidth: 1,
192
+ },
193
+ },
194
+ threshold: null,
195
+ },
165
196
  },
166
197
 
167
198
  //TREEMAP CHART STYLES
@@ -179,6 +210,7 @@ const highchartsDarkTheme: ThemeProps = {
179
210
  colors.data_7,
180
211
  colors.data_8,
181
212
  ],
213
+ colorByPoint: true,
182
214
  dataLabels: {
183
215
  enabled: true,
184
216
  style: {
@@ -197,6 +229,27 @@ const highchartsDarkTheme: ThemeProps = {
197
229
  ],
198
230
  traverseUpButton: {
199
231
  position: { y: -50 },
232
+ text: '< Back',
233
+ theme: {
234
+ r: 4,
235
+ states: {
236
+ hover: {
237
+ style: {
238
+ fill: pbButtonHoverColor,
239
+ },
240
+ },
241
+ },
242
+ style: {
243
+ fill: colors.royal,
244
+ color: colors.white,
245
+ fontSize: `${typography.text_small}`,
246
+ fontWeight: typography.bold,
247
+ fontFamily: `${typography.font_family_base}`,
248
+ },
249
+ stroke: colors.royal,
250
+ height: 24,
251
+ width: 90,
252
+ },
200
253
  },
201
254
  },
202
255
  },
@@ -3,6 +3,9 @@ import typography from '../tokens/exports/_typography.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
+ import Highcharts from 'highcharts'
7
+
8
+ const pbButtonHoverColor = '#004ebb'
6
9
  const highchartsTheme: ThemeProps = {
7
10
  lang: {
8
11
  thousandsSep: ',',
@@ -19,7 +22,7 @@ const highchartsTheme: ThemeProps = {
19
22
  chart: {
20
23
  borderWidth: 0,
21
24
  borderRadius: 0,
22
- plotBackgroundColor: undefined,
25
+ plotBackgroundColor: null,
23
26
  plotShadow: false,
24
27
  plotBorderWidth: 0,
25
28
  },
@@ -61,7 +64,7 @@ const highchartsTheme: ThemeProps = {
61
64
  },
62
65
  },
63
66
  yAxis: {
64
- alternateGridColor: undefined,
67
+ alternateGridColor: null,
65
68
  minorTickInterval: null,
66
69
  gridLineColor: colors.border_light,
67
70
  minorGridLineColor: colors.border_light,
@@ -101,6 +104,11 @@ const highchartsTheme: ThemeProps = {
101
104
  color: colors.text_lt_lighter,
102
105
  },
103
106
  },
107
+ labels: {
108
+ style: {
109
+ color: colors.primary,
110
+ },
111
+ },
104
112
  tooltip: {
105
113
  backgroundColor: {
106
114
  linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
@@ -122,13 +130,27 @@ const highchartsTheme: ThemeProps = {
122
130
  // specific to gauge
123
131
  // unfilled gauge color
124
132
  pane: {
125
- background: [{
133
+ background: {
126
134
  borderColor: colors.border_light,
127
- }],
135
+ },
128
136
  },
129
137
 
130
138
  plotOptions: {
131
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
+ },
149
+ stops: [
150
+ [0, Highcharts.getOptions().colors[0]],
151
+ [1, 'white'],
152
+ ],
153
+ },
132
154
  threshold: null,
133
155
  },
134
156
  // PIE STYLES
@@ -160,6 +182,15 @@ const highchartsTheme: ThemeProps = {
160
182
  marker: {
161
183
  lineColor: '#333',
162
184
  },
185
+ area: {
186
+ shadow: false,
187
+ states: {
188
+ hover: {
189
+ lineWidth: 1,
190
+ },
191
+ },
192
+ threshold: null,
193
+ },
163
194
  },
164
195
 
165
196
  //TREEMAP CHART STYLES
@@ -177,6 +208,7 @@ const highchartsTheme: ThemeProps = {
177
208
  colors.data_7,
178
209
  colors.data_8,
179
210
  ],
211
+ colorByPoint: true,
180
212
  dataLabels: {
181
213
  enabled: true,
182
214
  style: {
@@ -195,6 +227,27 @@ const highchartsTheme: ThemeProps = {
195
227
  ],
196
228
  traverseUpButton: {
197
229
  position: { y: -50 },
230
+ text: '< Back',
231
+ theme: {
232
+ r: 4,
233
+ states: {
234
+ hover: {
235
+ style: {
236
+ fill: pbButtonHoverColor,
237
+ },
238
+ },
239
+ },
240
+ style: {
241
+ fill: colors.royal,
242
+ color: colors.white,
243
+ fontSize: `${typography.text_small}`,
244
+ fontWeight: typography.bold,
245
+ fontFamily: `${typography.font_family_base}`,
246
+ },
247
+ stroke: colors.royal,
248
+ height: 24,
249
+ width: 90,
250
+ },
198
251
  },
199
252
  },
200
253
  },
@@ -1,20 +1,16 @@
1
- import { Options, LegendOptions } from "highcharts";
2
- export interface ThemeProps
3
- extends Pick<
4
- Options,
5
- | "credits"
6
- | "chart"
7
- | "colors"
8
- | "lang"
9
- | "title"
10
- | "subtitle"
11
- | "xAxis"
12
- | "yAxis"
13
- | "legend"
14
- | "tooltip"
15
- | "pane"
16
- | "plotOptions"
17
- > {
18
- colorKey?: string;
19
- legend?: LegendOptions;
20
- }
1
+ export type ThemeProps = {
2
+ lang?: {[key: string]: string}
3
+ credits?: {[key: string]: boolean}
4
+ colors?: string[]
5
+ chart?: {[key: string]: any}
6
+ title?: {[key: string]: string | {}}
7
+ subtitle?: {[key: string]: string | {};}
8
+ xAxis?: {[key: string]: any;}
9
+ yAxis?: {[key: string]: any;}
10
+ legend?: {[key: string]: string | {};}
11
+ labels?: {[key: string]: {};}
12
+ tooltip?: {[key: string]: any;}
13
+ pane?: {[key: string]: {};}
14
+ plotOptions?: {[key: string]: any;}
15
+ colorKey?: string
16
+ }
@@ -12,7 +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 | (() => void)},
15
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
16
16
  id?: string,
17
17
  statChange?: {
18
18
  change? : 'increase' | 'decrease' | 'neutral',
@@ -15,7 +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 | (() => void) };
18
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
19
19
  id?: string;
20
20
  showDayOfWeek?: boolean;
21
21
  showIcon?: boolean;
@@ -24,7 +24,7 @@ type PbDateProps = {
24
24
  value: Date;
25
25
  };
26
26
 
27
- const PbDate = (props: PbDateProps): React.ReactElement => {
27
+ const PbDate = (props: PbDateProps) => {
28
28
  const {
29
29
  aria = {},
30
30
  alignment = "left",
@@ -57,11 +57,11 @@ const PbDate = (props: PbDateProps): React.ReactElement => {
57
57
 
58
58
  return (
59
59
  <div
60
- {...ariaProps}
61
- {...dataProps}
62
- {...htmlProps}
63
- className={classes}
64
- id={id}
60
+ {...ariaProps}
61
+ {...dataProps}
62
+ {...htmlProps}
63
+ className={classes}
64
+ id={id}
65
65
  >
66
66
  {unstyled
67
67
  ? <>
@@ -26,7 +26,7 @@ type DatePickerProps = {
26
26
  format?: string,
27
27
  hideIcon?: boolean,
28
28
  hideLabel?: boolean,
29
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
29
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
30
30
  id?: string,
31
31
  inLine?: boolean,
32
32
  inputAria?: { [key: string]: string },
@@ -16,7 +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 | (() => any)};
19
+ htmlOptions?: {[key: string]: string | number | boolean | Function};
20
20
  icon?: boolean;
21
21
  startDate?: Date;
22
22
  endDate?: Date;
@@ -34,7 +34,7 @@ const dateTimeIso = (dateValue: Date) => {
34
34
  return DateTime.toIso(dateValue);
35
35
  };
36
36
 
37
- const DateRangeInline = (props: DateRangeInlineProps): React.ReactElement => {
37
+ const DateRangeInline = (props: DateRangeInlineProps) => {
38
38
  const {
39
39
  icon = false,
40
40
  dark = false,
@@ -15,12 +15,12 @@ type DateRangeStackedProps = {
15
15
  data?: string,
16
16
  dark?: boolean,
17
17
  endDate: Date,
18
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
19
19
  id?: string,
20
20
  startDate: Date,
21
21
  }
22
22
 
23
- const DateRangeStacked = (props: DateRangeStackedProps): React.ReactElement => {
23
+ const DateRangeStacked = (props: DateRangeStackedProps) => {
24
24
  const {
25
25
  className,
26
26
  dark = false,
@@ -15,7 +15,7 @@ type DateStackedProps = {
15
15
  dark?: boolean;
16
16
  data?: string;
17
17
  date: Date;
18
- htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
18
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
19
19
  size?: "sm" | "md";
20
20
  id?: string;
21
21
  reverse?: boolean;
@@ -26,7 +26,7 @@ const sizes: {sm: 4, md: 3} = {
26
26
  md: 3,
27
27
  };
28
28
 
29
- const DateStacked = (props: DateStackedProps): React.ReactElement => {
29
+ const DateStacked = (props: DateStackedProps) => {
30
30
  const {
31
31
  align = "left",
32
32
  bold = false,
@@ -56,9 +56,9 @@ const DateStacked = (props: DateStackedProps): React.ReactElement => {
56
56
  <>
57
57
  {bold == false ? (
58
58
  <div
59
- {...dataProps}
60
- {...htmlProps}
61
- className={classes}
59
+ {...dataProps}
60
+ {...htmlProps}
61
+ className={classes}
62
62
  >
63
63
  <div className="pb_date_stacked_day_month">
64
64
  <Caption text={DateTime.toMonth(date).toUpperCase()} />
@@ -72,9 +72,9 @@ const DateStacked = (props: DateStackedProps): React.ReactElement => {
72
72
  </div>
73
73
  ) : (
74
74
  <div
75
- {...dataProps}
76
- {...htmlProps}
77
- className={classes}
75
+ {...dataProps}
76
+ {...htmlProps}
77
+ className={classes}
78
78
  >
79
79
  <div className="pb_date_stacked_day_month">
80
80
  <Title
@@ -14,7 +14,7 @@ type DateTimeProps = {
14
14
  className?: string,
15
15
  data?: { [key: string]: string; },
16
16
  datetime: Date,
17
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
18
  id?: string,
19
19
  size?: "sm" | "md",
20
20
  showDayOfWeek: boolean,
@@ -22,7 +22,7 @@ type DateTimeProps = {
22
22
  timeZone?: string
23
23
  }
24
24
 
25
- const DateTime = (props: DateTimeProps): React.ReactElement => {
25
+ const DateTime = (props: DateTimeProps) => {
26
26
  const {
27
27
  align = 'left',
28
28
  aria = {},
@@ -11,7 +11,7 @@ import TimeStacked from '../pb_time_stacked/_time_stacked'
11
11
  import DateStacked from '../pb_date_stacked/_date_stacked'
12
12
 
13
13
  type DateTimeStackedProps = {
14
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
14
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
15
15
  id?: string,
16
16
  date: Date,
17
17
  datetime: Date,
@@ -14,11 +14,11 @@ type DateYearStackedProps = {
14
14
  dark?: boolean,
15
15
  data?: string,
16
16
  date: Date,
17
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
18
  id?: string,
19
19
  }
20
20
 
21
- const DateYearStacked = (props: DateYearStackedProps): React.ReactElement => {
21
+ const DateYearStacked = (props: DateYearStackedProps) => {
22
22
  const {
23
23
  align = 'left',
24
24
  className,
@@ -21,8 +21,7 @@ describe("DateYearStacked Kit", () => {
21
21
  render(
22
22
  <DateYearStacked
23
23
  data={{ testid: testId }}
24
- date={new Date(Date.now())}
25
- />
24
+ date={new Date(Date.now())} />
26
25
  );
27
26
 
28
27
  const kit = screen.getByTestId(testId);
@@ -33,8 +32,7 @@ describe("DateYearStacked Kit", () => {
33
32
  render(
34
33
  <DateYearStacked
35
34
  data={{ testid: testId }}
36
- date={new Date(Date.now())}
37
- />
35
+ date={new Date(Date.now())} />
38
36
  );
39
37
 
40
38
  const kit = screen.getByTestId(testId);
@@ -46,8 +44,7 @@ describe("DateYearStacked Kit", () => {
46
44
  render(
47
45
  <DateYearStacked
48
46
  data={{ testid: testId }}
49
- date={new Date(Date.now())}
50
- />
47
+ date={new Date(Date.now())} />
51
48
  );
52
49
 
53
50
  const kit = screen.getByTestId(testId);
@@ -6,13 +6,13 @@
6
6
  @include pb_detail;
7
7
 
8
8
  @each $color_name, $color_value in $pb_detail_colors {
9
- &[class*=color_#{$color_name}] {
9
+ &[class*=_#{$color_name}] {
10
10
  @include pb_detail($color_value);
11
11
  }
12
12
  }
13
13
 
14
14
  @each $dark_color_name, $dark_color_value in $pb_dark_detail_colors{
15
- &[class*=color_#{$dark_color_name}][class*=dark]{
15
+ &[class*=_#{$dark_color_name}][class*=dark]{
16
16
  @include pb_detail($dark_color_value)
17
17
  }
18
18
  }
@@ -11,13 +11,13 @@ type DetailProps = {
11
11
  color?: 'light' | 'default' | 'lighter' | 'link' | 'error' | 'success',
12
12
  dark?: boolean,
13
13
  data?: { [key: string]: string },
14
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
14
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
15
15
  id?: string,
16
16
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
17
17
  text?: string,
18
18
  } & GlobalProps
19
19
 
20
- const Detail = (props: DetailProps): React.ReactElement => {
20
+ const Detail = (props: DetailProps) => {
21
21
  const {
22
22
  aria = {},
23
23
  bold = false,
@@ -31,12 +31,12 @@ const Detail = (props: DetailProps): React.ReactElement => {
31
31
  text= ''
32
32
  } = props
33
33
 
34
- const ariaProps: {[key: string]: string} = buildAriaProps(aria)
35
- const dataProps: {[key: string]: string} = buildDataProps(data)
34
+ const ariaProps: {[key: string]: any} = buildAriaProps(aria)
35
+ const dataProps: {[key: string]: any} = buildDataProps(data)
36
36
  const htmlProps = buildHtmlProps(htmlOptions);
37
37
  const isBold = bold ? "bold" : null
38
38
  const classes = classnames(
39
- buildCss('pb_detail_kit', `color`, color),
39
+ buildCss('pb_detail_kit', color),
40
40
  isBold,
41
41
  globalProps(props),
42
42
  className