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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0691ea09bf36304c045cc08897545b9c002c1c4c31c9670566bfa92fcc42f66
4
- data.tar.gz: 968247f2c5bc1d7ba589a63657ca4167c91fc63113e1c74009fda6bbe9b18525
3
+ metadata.gz: f272c5d989be26b3c950987f4c51f59584acd918be553652bcba094822f20e30
4
+ data.tar.gz: 2ee2b321862499edac8e935e29c03cb3c395fb03d23b9a89526ea66ae02f8d9e
5
5
  SHA512:
6
- metadata.gz: 3d1144ce8d889ad0f3e664b2b2b59f39fb311cc3ba7061a86c78aaf280576f06ad765882b33cfdb4057a60e9c0ebb55be088b48e9db4e337975f3ee690714f13
7
- data.tar.gz: a13cf6459ce4f8b9d31357ec8ddd4ab433a59948dcbfeb91a89b33641ec3d2dab6ea9e397635b5b8424d7974bbdcfed8494439b12110b7da4690897ad4c06c6c
6
+ metadata.gz: 8ed8dda83ec7bf30f439f43761a44a34914fcbcd80e8786d73b57f31c8b91628b31381d6bd209ffc8b1a2f6a69b7116a24a1e3ed54814f976356390c5e2f4f72
7
+ data.tar.gz: d6971706d60344e0748c76dec38f0a98fea3ca83cfbd26f7090f3598cd6a3b35ec6d873fd4f128786e223bd4bbff9af86fbe57fb1ad231ecaee92b94085b0a0d
@@ -114,6 +114,5 @@
114
114
  @import './utilities/hover';
115
115
  @import './utilities/text_align';
116
116
  @import './utilities/overflow';
117
- @import './utilities/truncate';
118
117
 
119
118
  @import 'pb_multi_level_select/multi_level_select';
@@ -9,7 +9,6 @@ export { default as AvatarActionButton } from './pb_avatar_action_button/_avatar
9
9
  export { default as Background } from './pb_background/_background'
10
10
  export { default as Badge } from './pb_badge/_badge'
11
11
  export { default as BarGraph } from './pb_bar_graph/_bar_graph'
12
- export { default as BetaIcon } from './pb_beta_icon/_icon'
13
12
  export { default as Body } from './pb_body/_body'
14
13
  export { default as BreadCrumbItem } from './pb_bread_crumbs/_bread_crumb_item'
15
14
  export { default as BreadCrumbs } from './pb_bread_crumbs/_bread_crumbs'
@@ -143,4 +142,4 @@ export { default as scale } from './tokens/exports/_scale.scss'
143
142
  export { default as screenSizes } from './tokens/exports/_screen_sizes.scss'
144
143
  export { default as shadows } from './tokens/exports/_shadows.scss'
145
144
  export { default as spacing } from './tokens/exports/_spacing.scss'
146
- export { default as typography } from './tokens/exports/_typography.scss'
145
+ export { default as typography } from './tokens/exports/_typography.scss'
@@ -12,7 +12,7 @@ export type AvatarProps = {
12
12
  className?: string,
13
13
  data?: {[key: string]: string},
14
14
  dark?: boolean,
15
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
15
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
16
16
  id?: string,
17
17
  imageAlt?: string,
18
18
  imageUrl?: string,
@@ -32,7 +32,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
32
32
  className,
33
33
  data = {},
34
34
  htmlOptions = {},
35
- name = undefined,
35
+ name = null,
36
36
  id = '',
37
37
  imageAlt = '',
38
38
  imageUrl,
@@ -40,8 +40,8 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
40
40
  status = null,
41
41
  dark = false,
42
42
  } = props
43
- const dataProps: {[key: string]: string} = buildDataProps(data)
44
- const ariaProps: {[key: string]: string} = buildAriaProps(aria)
43
+ const dataProps: {[key: string]: any} = buildDataProps(data)
44
+ const ariaProps: {[key: string]: any} = buildAriaProps(aria)
45
45
  const htmlProps = buildHtmlProps(htmlOptions);
46
46
  const classes = classnames(
47
47
  buildCss('pb_avatar_kit', `size_${size}`),
@@ -50,7 +50,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
50
50
  )
51
51
 
52
52
  const initials = name && firstTwoInitials(name)
53
- dataProps['data-initials'] = (initials as string)
53
+ dataProps['data-initials'] = initials
54
54
 
55
55
  const [error, setError] = useState(false)
56
56
  const handleError = () => setError(true)
@@ -19,8 +19,8 @@ type AvatarActionButtonProps = {
19
19
  linkAriaLabel?: string,
20
20
  className?: string,
21
21
  dark?: boolean,
22
- data?: {[key: string]: string},
23
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
22
+ data?: Object,
23
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
24
24
  id?: string,
25
25
  imageAlt?: string,
26
26
  imageUrl?: string,
@@ -31,7 +31,7 @@ type AvatarActionButtonProps = {
31
31
  size?: "md" | "lg" | "sm" | "xl" | "xs" | "xxs",
32
32
  }
33
33
 
34
- const AvatarActionButton = (props: AvatarActionButtonProps): React.ReactElement => {
34
+ const AvatarActionButton = (props: AvatarActionButtonProps) => {
35
35
  const {
36
36
  action = 'add',
37
37
  aria = {},
@@ -23,7 +23,7 @@ type BackgroundProps = {
23
23
  className?: string,
24
24
  customColor?: string,
25
25
  data?: {[key: string]: string},
26
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
26
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
27
27
  id?: string,
28
28
  padding?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl',
29
29
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'tr' | 'th' | 'td' | 'thead' | 'col',
@@ -63,7 +63,7 @@ const getResponsiveValue = <T extends string | undefined>(prop: ResponsiveProp<T
63
63
  return prop?.default || undefined;
64
64
  };
65
65
 
66
- const Background = (props: BackgroundProps): React.ReactElement => {
66
+ const Background = (props: BackgroundProps) => {
67
67
  const {
68
68
  alt = '',
69
69
  aria = {},
@@ -144,13 +144,13 @@ const Background = (props: BackgroundProps): React.ReactElement => {
144
144
 
145
145
  return (
146
146
  <Tag
147
- {...ariaProps}
148
- {...dataProps}
149
- {...htmlProps}
150
- alt={alt}
151
- className={classes}
152
- id={id}
153
- style={backgroundStyle}
147
+ {...ariaProps}
148
+ {...dataProps}
149
+ {...htmlProps}
150
+ alt={alt}
151
+ className={classes}
152
+ id={id}
153
+ style={backgroundStyle}
154
154
  >
155
155
  {children}
156
156
  </Tag>
@@ -19,7 +19,7 @@ type BadgeProps = {
19
19
  onTouchEnd?: React.TouchEventHandler<HTMLSpanElement>,
20
20
  },
21
21
  data?: {[key: string]: string},
22
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
22
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
23
23
  id?: string,
24
24
  removeIcon?: boolean,
25
25
  removeOnClick?: React.MouseEventHandler<HTMLSpanElement>,
@@ -27,7 +27,7 @@ type BadgeProps = {
27
27
  text?: string,
28
28
  variant?: "error" | "info" | "neutral" | "notification" | "primary" | "success" | "warning",
29
29
  } & GlobalProps
30
- const Badge = (props: BadgeProps): React.ReactElement => {
30
+ const Badge = (props: BadgeProps) => {
31
31
  const {
32
32
  aria = {},
33
33
  className,
@@ -19,9 +19,9 @@ type BarGraphProps = {
19
19
  yAxisMax: number;
20
20
  chartData: { name: string; data: number[] }[];
21
21
  className?: string;
22
- id: string;
23
- pointStart: number;
24
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
22
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
23
+ id: any;
24
+ pointStart: number | any;
25
25
  subTitle?: string;
26
26
  title: string;
27
27
  type?: string;
@@ -37,10 +37,15 @@
37
37
  font-size: $font_smaller;
38
38
  letter-spacing: $lspace_loose;
39
39
  }
40
+
41
+ &[class*=_truncate] {
42
+ @include body_truncate;
43
+ }
40
44
 
41
45
  @each $status_name, $status_value in $pb_body_status {
42
46
  &[class*=#{$status_name}] {
43
47
  @include pb_body($status_value);
48
+ @include body_truncate;
44
49
  }
45
50
  }
46
51
 
@@ -15,11 +15,12 @@ type BodyProps = {
15
15
  data?: {[key: string]: string},
16
16
  highlightedText?: string[],
17
17
  highlighting?: boolean,
18
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
19
19
  id?: string,
20
20
  status?: 'neutral' | 'negative' | 'positive',
21
21
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
22
22
  text?: string,
23
+ truncate?: null | '1' | '2' | '3' | '4' | '5',
23
24
  variant?: null | 'link',
24
25
  } & GlobalProps
25
26
 
@@ -38,18 +39,21 @@ const Body = (props: BodyProps): React.ReactElement => {
38
39
  status = null,
39
40
  tag = 'div',
40
41
  text = '',
42
+ truncate = null,
41
43
  variant = null,
42
44
  } = props
43
45
 
44
- const ariaProps: {[key: string]: string} = buildAriaProps(aria)
45
- const dataProps: {[key: string]: string} = buildDataProps(data)
46
+ const ariaProps: {[key: string]: any} = buildAriaProps(aria)
47
+ const dataProps: {[key: string]: any} = buildDataProps(data)
46
48
  const htmlProps = buildHtmlProps(htmlOptions);
49
+ const isTruncated = truncate ? `truncate_${truncate}` : ''
47
50
  const classes = classnames(
48
- buildCss('pb_body_kit', color, variant, status),
51
+ buildCss('pb_body_kit', color, variant, status, isTruncated),
49
52
  globalProps(props),
50
53
  className
51
54
  )
52
- const Tag: keyof JSX.IntrinsicElements = `${tag}`
55
+ const Tag: React.ReactElement | any = `${tag}`
56
+
53
57
 
54
58
  return (
55
59
  <Tag
@@ -36,6 +36,26 @@ $pb_body_status: (
36
36
  font-family: $font-family-base;
37
37
  }
38
38
 
39
+ $pb_body_truncate: (
40
+ truncate_1: 1,
41
+ truncate_2: 2,
42
+ truncate_3: 3,
43
+ truncate_4: 4,
44
+ truncate_5: 5
45
+ );
46
+
47
+ @mixin body_truncate {
48
+ @each $name, $number in $pb_body_truncate {
49
+ &[class*=_#{$name}] {
50
+ overflow: hidden;
51
+ display: -webkit-box;
52
+ -webkit-line-clamp: $number;
53
+ -webkit-box-orient: vertical;
54
+ }
55
+ }
56
+ }
57
+
58
+
39
59
  // Colors ======================
40
60
  @mixin pb_body_light {
41
61
  @include pb_body($text_lt_light);
@@ -18,9 +18,12 @@ module Playbook
18
18
  default: false
19
19
  prop :highlighted_text, type: Playbook::Props::Array,
20
20
  default: []
21
+ prop :truncate, type: Playbook::Props::Enum,
22
+ values: [nil, "1", "2", "3", "4", "5"],
23
+ default: nil
21
24
 
22
25
  def classname
23
- generate_classname("pb_body_kit", color_class, status_class)
26
+ generate_classname("pb_body_kit", color_class, status_class, is_truncated)
24
27
  end
25
28
 
26
29
  def content
@@ -28,6 +31,10 @@ module Playbook
28
31
  highlighting ? apply_highlight(body_text) : body_text
29
32
  end
30
33
 
34
+ def is_truncated
35
+ truncate ? "truncate_#{truncate}" : nil
36
+ end
37
+
31
38
  private
32
39
 
33
40
  def apply_highlight(text)
@@ -13,14 +13,15 @@ import {
13
13
  type BreadCrumbItemProps = {
14
14
  aria?: {[key: string]: string},
15
15
  className?: string,
16
- data?: {[key: string]: string},
17
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
16
+ data?: object,
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
18
  id?: string,
19
19
  component?: "a" | "span",
20
20
  [x:string]: any;
21
21
  }
22
22
 
23
- const BreadCrumbItem = (props: BreadCrumbItemProps): React.ReactElement => {
23
+
24
+ const BreadCrumbItem = (props: BreadCrumbItemProps) => {
24
25
  const {
25
26
  aria = {},
26
27
  className,
@@ -12,13 +12,13 @@ import {
12
12
  type BreadCrumbsProps = {
13
13
  aria?: {[key: string]: string},
14
14
  className?: string,
15
- data?: {[key: string]: string},
16
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
15
+ data?: object,
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
17
  id?: string,
18
18
  text?: string,
19
19
  children?: React.ReactChild[] | React.ReactNode,
20
20
  }
21
- const BreadCrumbs = (props: BreadCrumbsProps): React.ReactElement => {
21
+ const BreadCrumbs = (props: BreadCrumbsProps) => {
22
22
  const {
23
23
  aria = { label: 'Breadcrumb Navigation' },
24
24
  className,
@@ -21,7 +21,7 @@ type ButtonPropTypes = {
21
21
  form?: string,
22
22
  fullWidth?: boolean,
23
23
  highlight?: boolean,
24
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
24
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
25
25
  icon?: string,
26
26
  iconRight?: boolean,
27
27
  id?: string,
@@ -66,7 +66,7 @@ const buttonClassName = (props: ButtonPropTypes) => {
66
66
  return className
67
67
  }
68
68
 
69
- const Button = (props: ButtonPropTypes): React.ReactElement => {
69
+ const Button = (props: ButtonPropTypes) => {
70
70
  const {
71
71
  aria = {},
72
72
  children,
@@ -150,16 +150,16 @@ const Button = (props: ButtonPropTypes): React.ReactElement => {
150
150
  if (link) {
151
151
  return (
152
152
  <a
153
- {...ariaProps}
154
- {...dataProps}
155
- {...htmlProps}
156
- className={css}
157
- href={link}
158
- id={id}
159
- rel={target !== "child" ? "noreferrer" : null}
160
- role="link"
161
- tabIndex={tabIndex}
162
- target={getTargetAttribute()}
153
+ {...ariaProps}
154
+ {...dataProps}
155
+ {...htmlProps}
156
+ className={css}
157
+ href={link}
158
+ id={id}
159
+ rel={target !== "child" ? "noreferrer" : null}
160
+ role="link"
161
+ tabIndex={tabIndex}
162
+ target={getTargetAttribute()}
163
163
  >
164
164
  {ifLoading()}
165
165
  </a>
@@ -167,27 +167,24 @@ const Button = (props: ButtonPropTypes): React.ReactElement => {
167
167
  } else if (variant === "reaction") {
168
168
  return (
169
169
  <button
170
- {...ariaProps}
171
- {...dataProps}
172
- {...htmlProps}
173
- className={css}
174
- disabled={disabled}
175
- form={form}
176
- id={id}
177
- onClick={onClick}
178
- role="button"
179
- tabIndex={tabIndex}
180
- type={htmlType}
181
- value={value}
170
+ {...ariaProps}
171
+ {...dataProps}
172
+ {...htmlProps}
173
+ className={css}
174
+ disabled={disabled}
175
+ form={form}
176
+ id={id}
177
+ onClick={onClick}
178
+ role="button"
179
+ tabIndex={tabIndex}
180
+ type={htmlType}
181
+ value={value}
182
182
  >
183
183
  {icon && isValidEmoji(icon) && (
184
184
  <Flex align='center'>
185
185
  <Icon icon={icon} />
186
186
  {count && (
187
- <Caption
188
- paddingLeft="xxs"
189
- size="xs"
190
- >
187
+ <Caption paddingLeft="xxs" size="xs">
191
188
  {count}
192
189
  </Caption>
193
190
  )}
@@ -206,18 +203,18 @@ const Button = (props: ButtonPropTypes): React.ReactElement => {
206
203
  } else {
207
204
  return (
208
205
  <button
209
- {...ariaProps}
210
- {...dataProps}
211
- {...htmlProps}
212
- className={css}
213
- disabled={disabled}
214
- form={form}
215
- id={id}
216
- onClick={onClick}
217
- role="button"
218
- tabIndex={tabIndex}
219
- type={htmlType}
220
- value={value}
206
+ {...ariaProps}
207
+ {...dataProps}
208
+ {...htmlProps}
209
+ className={css}
210
+ disabled={disabled}
211
+ form={form}
212
+ id={id}
213
+ onClick={onClick}
214
+ role="button"
215
+ tabIndex={tabIndex}
216
+ type={htmlType}
217
+ value={value}
221
218
  >
222
219
  {ifLoading()}
223
220
  </button>
@@ -9,14 +9,3 @@
9
9
  | **Icon** | `PBIcon` | Adds an icon to the Button | `nil` | |
10
10
  | **Icon Position** | `IconPosition` | Adjusts the icon's position | `.left` | `.left` `.right` |
11
11
  | **Action** | `(() -> Void)` | Adds an action for the Button to perform | `{}` | |
12
-
13
- ### Reaction Button Props
14
- | Name | Type | Description | Default | Values |
15
- | --- | ----------- | --------- | --------- | --------- |
16
- | **count** | `Int` | Tracks number of times a reaction button has been pressed | `0` | |
17
- | **isHighlighted** | `Bool` | Boolean for whether or not a reaction button has a highlight | ` false` | `true` `false` |
18
- | **isHovering** | `Bool` | Boolean for whether or not a mouse is hovering over the reaction button | `false` | `true` `false` |
19
- | **icon** | `String` | Allows user to use a unicode string for an emoji reaction button | | |
20
- | **pbIcon** | `PBIcon` | A PlayBook Icon option for reaction button | | |
21
- | **isInteractive** | `Bool` | Boolean for whether or not a reaction button is interactive | `false` | `true` `false` |
22
-
@@ -32,5 +32,4 @@ examples:
32
32
  - button_icon_options_swift: Button Icon Options
33
33
  - button_circle_swift: Circle Button
34
34
  - button_size_swift: Button Size
35
- - button_reaction_swift: Button Reaction
36
35
  - button_props_swift: ""
@@ -12,8 +12,8 @@ type ButtonToolbarProps = {
12
12
  children?: React.ReactChild[] | React.ReactChild,
13
13
  className?: string,
14
14
  connected?: boolean,
15
- data?: {[key: string]: string},
16
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
15
+ data?: object,
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
17
  id?: string,
18
18
  onClick?: React.MouseEventHandler<HTMLSpanElement>,
19
19
  orientation?: "horizontal" | "vertical",
@@ -21,7 +21,7 @@ type ButtonToolbarProps = {
21
21
  variant?: "primary" | "secondary",
22
22
  }
23
23
 
24
- const ButtonToolbar = (props: ButtonToolbarProps): React.ReactElement => {
24
+ const ButtonToolbar = (props: ButtonToolbarProps) => {
25
25
  const {
26
26
  aria = {},
27
27
  children,
@@ -9,7 +9,7 @@ type CaptionProps = {
9
9
  className?: string,
10
10
  color?: "default" | "light" | "lighter" | "success" | "error" | "link",
11
11
  data?: {[key: string]: string},
12
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
12
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
13
13
  id?: string,
14
14
  size?: "xs" | "sm" | "md" | "lg" | "xl",
15
15
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "caption",
@@ -16,7 +16,7 @@ type CardPropTypes = {
16
16
  children: React.ReactChild[] | React.ReactChild | number,
17
17
  className?: string,
18
18
  data?: {[key: string]: string},
19
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
20
20
  highlight?: {
21
21
  position?: "side" | "top",
22
22
  color?: string,
@@ -69,7 +69,7 @@ const Body = (props: CardBodyProps) => {
69
69
  )
70
70
  }
71
71
 
72
- const Card = (props: CardPropTypes): React.ReactElement => {
72
+ const Card = (props: CardPropTypes) => {
73
73
  const {
74
74
  aria = {},
75
75
  background = 'none',
@@ -57,7 +57,7 @@ const CardBackground = (props) => {
57
57
  background="product_1_background"
58
58
  marginBottom="sm"
59
59
  {...props}
60
- >
60
+ >
61
61
  <Body
62
62
  dark
63
63
  text="Product 1 Background"
@@ -69,12 +69,11 @@ const CardBackground = (props) => {
69
69
  <Card
70
70
  background="product_7_highlight"
71
71
  marginBottom="sm"
72
- {...props}
73
- >
72
+ {...props} >
74
73
  <Body
75
74
  dark
76
- text="Product 7 Highlight"
77
- />
75
+ text="Product 7 Highlight"
76
+ />
78
77
  </Card>
79
78
 
80
79
 
@@ -13,7 +13,7 @@ type CheckboxProps = {
13
13
  dark?: boolean,
14
14
  data?: {[key: string]: string},
15
15
  error?: boolean,
16
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
17
  id?: string,
18
18
  indeterminate?: boolean,
19
19
  name?: string,
@@ -23,7 +23,7 @@ type CheckboxProps = {
23
23
  value?: string,
24
24
  } & GlobalProps
25
25
 
26
- const Checkbox = (props: CheckboxProps): React.ReactElement => {
26
+ const Checkbox = (props: CheckboxProps): JSX.Element => {
27
27
  const {
28
28
  aria = {},
29
29
  checked = false,
@@ -73,7 +73,7 @@ const Checkbox = (props: CheckboxProps): React.ReactElement => {
73
73
  tabIndex={tabIndex}
74
74
  type="checkbox"
75
75
  value={value}
76
- />)
76
+ />)
77
77
  }
78
78
 
79
79
  return (
@@ -18,12 +18,12 @@ type CircleChartProps = {
18
18
  children?: Node;
19
19
  className?: string;
20
20
  colors?: string[];
21
- dark?: boolean;
22
- data?: {[key: string]: string},
21
+ dark?: Boolean;
22
+ data?: Object;
23
23
  dataLabelHtml?: string;
24
24
  dataLabels?: boolean;
25
25
  height?: string;
26
- htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
26
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
27
27
  id?: string;
28
28
  innerSize?: "sm" | "md" | "lg" | "none";
29
29
  legend?: boolean;
@@ -180,29 +180,29 @@ const CircleChart = ({
180
180
  {children ? (
181
181
  <div id={`wrapper-circle-chart-${id}`}>
182
182
  <HighchartsReact
183
- containerProps={{
183
+ containerProps={{
184
184
  className: classnames("pb_circle_chart", globalProps(props)),
185
185
  id: id,
186
186
  ...ariaProps,
187
187
  ...dataProps,
188
188
  ...htmlProps,
189
189
  }}
190
- highcharts={Highcharts}
191
- options={options}
190
+ highcharts={Highcharts}
191
+ options={options}
192
192
  />
193
193
  <div className="pb-circle-chart-block">{children}</div>
194
194
  </div>
195
195
  ) : (
196
196
  <HighchartsReact
197
- containerProps={{
197
+ containerProps={{
198
198
  className: classnames("pb_circle_chart", globalProps(props)),
199
199
  id: id,
200
200
  ...ariaProps,
201
201
  ...dataProps,
202
202
  ...htmlProps,
203
203
  }}
204
- highcharts={Highcharts}
205
- options={options}
204
+ highcharts={Highcharts}
205
+ options={options}
206
206
  />
207
207
  )}
208
208
  </>
@@ -13,7 +13,7 @@ type CircleIconButtonProps = {
13
13
  data?: { [key: string]: string },
14
14
  disabled?: boolean,
15
15
  icon: string,
16
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
17
  id?: string,
18
18
  link?: string,
19
19
  onClick?: React.MouseEventHandler<HTMLElement>,
@@ -12,20 +12,22 @@ import { IconSizes } from "../pb_icon/_icon"
12
12
 
13
13
 
14
14
  type CollapsibleProps = {
15
- children?: React.ReactElement | [] | any,
15
+ children?: JSX.Element | [] | any,
16
16
  aria?: {[key: string]: string},
17
17
  className?: string,
18
18
  collapsed?: boolean,
19
- data?: {[key: string]: string},
19
+ data?: object,
20
20
  icon?: string | string[],
21
21
  iconColor?: 'default' | 'light' | 'lighter' | 'link' | 'error' | 'success',
22
22
  iconSize?: IconSizes,
23
23
  onIconClick?: ()=> void,
24
24
  onClick?: ()=> void,
25
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
25
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
26
26
  id?: string,
27
27
  }
28
28
 
29
+
30
+
29
31
  const Collapsible = ({
30
32
  aria = {},
31
33
  className,
@@ -40,14 +42,14 @@ const Collapsible = ({
40
42
  onClick,
41
43
  id,
42
44
  ...props
43
- }: CollapsibleProps): React.ReactElement => {
45
+ }: CollapsibleProps) => {
44
46
  const [isCollapsed, toggle, setIsCollapsed] = useCollapsible(collapsed)
45
47
 
46
48
  useEffect(()=> {
47
49
  setIsCollapsed(collapsed)
48
50
  },[collapsed])
49
51
 
50
- const CollapsibleParent = React.Children.toArray(children) as React.ReactElement[]
52
+ const CollapsibleParent = React.Children.toArray(children) as JSX.Element[]
51
53
 
52
54
  if (CollapsibleParent.length !== 2) {
53
55
  throw new Error('Collapsible requires <CollapsibleMain> and <CollapsibleContent> to function properly.')