playbook_ui 14.11.0 → 14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +2 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +18 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +27 -5
  5. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +17 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +23 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +29 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +61 -4
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +2 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +50 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +1 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +1 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +60 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +5 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +78 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +1 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +53 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +1 -0
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +52 -0
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +1 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +33 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +1 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +42 -0
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +299 -0
  27. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -0
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +6 -1
  29. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +9 -11
  30. data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -4
  31. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -3
  32. data/app/pb_kits/playbook/pb_button/_button.scss +1 -3
  33. data/app/pb_kits/playbook/pb_button/button.html.erb +2 -3
  34. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +1 -6
  35. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +2 -4
  36. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +3 -1
  37. data/app/pb_kits/playbook/pb_collapsible/collapsible.rb +3 -0
  38. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +24 -16
  39. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +2 -0
  40. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  41. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +13 -0
  42. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +3 -0
  43. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +1 -0
  44. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -3
  45. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +3 -5
  46. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -6
  47. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -4
  48. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +3 -9
  49. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +5 -0
  50. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +38 -0
  51. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +3 -0
  52. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -0
  53. data/app/pb_kits/playbook/pb_drawer/_drawer.scss +145 -183
  54. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +158 -268
  55. data/app/pb_kits/playbook/pb_drawer/context.ts +11 -0
  56. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +38 -0
  57. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +3 -45
  58. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -1
  59. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +9 -16
  60. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +44 -19
  61. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +21 -3
  62. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +16 -21
  63. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +2 -19
  64. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +2 -1
  65. data/app/pb_kits/playbook/pb_drawer/docs/index.js +1 -0
  66. data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +5 -5
  67. data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +60 -0
  68. data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +21 -0
  69. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +8 -10
  70. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
  71. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +7 -12
  72. data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +9 -14
  73. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +6 -11
  74. data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +8 -14
  75. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +4 -6
  76. data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +78 -0
  77. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +3 -0
  78. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +7 -0
  79. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +16 -0
  80. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +22 -0
  81. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -3
  82. data/app/pb_kits/playbook/pb_label_value/_label_value.scss +2 -4
  83. data/app/pb_kits/playbook/pb_list/item.html.erb +30 -8
  84. data/app/pb_kits/playbook/pb_list/item.rb +7 -0
  85. data/app/pb_kits/playbook/pb_list/list.html.erb +31 -11
  86. data/app/pb_kits/playbook/pb_list/list.rb +4 -0
  87. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +6 -1
  88. data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -3
  89. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +5 -3
  90. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -0
  91. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -1
  92. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -5
  93. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +8 -10
  94. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +30 -12
  95. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +15 -0
  96. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +24 -0
  97. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +1 -0
  98. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +3 -1
  99. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  100. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
  101. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +20 -1
  102. data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -4
  103. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -4
  104. data/app/pb_kits/playbook/pb_radio/_radio.scss +12 -8
  105. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +8 -3
  106. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -4
  107. data/app/pb_kits/playbook/pb_select/_select.scss +6 -10
  108. data/app/pb_kits/playbook/pb_select/_select.tsx +5 -1
  109. data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
  110. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +3 -5
  111. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +9 -1
  112. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +4 -1
  113. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +4 -1
  114. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +17 -3
  115. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.rb +3 -0
  116. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +11 -4
  117. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb +3 -0
  118. data/app/pb_kits/playbook/pb_table/_table.tsx +2 -3
  119. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +74 -0
  120. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +3 -0
  121. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  122. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +74 -0
  123. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +3 -0
  124. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +47 -0
  125. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +2 -0
  126. data/app/pb_kits/playbook/pb_table/docs/example.yml +3 -0
  127. data/app/pb_kits/playbook/pb_table/index.ts +187 -88
  128. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +12 -0
  129. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +6 -5
  130. data/app/pb_kits/playbook/pb_table/table.html.erb +1 -1
  131. data/app/pb_kits/playbook/pb_table/table.rb +17 -2
  132. data/app/pb_kits/playbook/pb_table/table_row.html.erb +20 -1
  133. data/app/pb_kits/playbook/pb_table/table_row.rb +5 -0
  134. data/app/pb_kits/playbook/pb_table/utilities/addDataTitle.ts +22 -0
  135. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -3
  136. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +46 -0
  137. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +3 -0
  138. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -1
  139. data/app/pb_kits/playbook/pb_text_input/index.js +103 -0
  140. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +4 -0
  141. data/app/pb_kits/playbook/pb_text_input/text_input.rb +33 -3
  142. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -3
  143. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -5
  144. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +32 -34
  145. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -5
  146. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -2
  147. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +12 -4
  148. data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -1
  149. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.tsx +8 -3
  150. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +6 -1
  151. data/app/pb_kits/playbook/pb_typeahead/components/Option.tsx +21 -6
  152. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx +13 -6
  153. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -3
  154. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +2 -0
  155. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +19 -0
  156. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +27 -0
  157. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -0
  158. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +4 -2
  159. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +5 -5
  160. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  161. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
  162. data/dist/chunks/_typeahead-BWwaAo_0.js +36 -0
  163. data/dist/chunks/_weekday_stacked-zyBCd1s8.js +45 -0
  164. data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
  165. data/dist/chunks/{lib-B7sgJtGS.js → lib-kMuhBuU7.js} +2 -2
  166. data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-DBJ0wZuS.js} +1 -1
  167. data/dist/chunks/vendor.js +1 -1
  168. data/dist/menu.yml +6 -0
  169. data/dist/playbook-doc.js +1 -1
  170. data/dist/playbook-rails-react-bindings.js +1 -1
  171. data/dist/playbook-rails.js +1 -1
  172. data/dist/playbook.css +1 -1
  173. data/lib/playbook/pb_forms_global_props_helper.rb +136 -0
  174. data/lib/playbook/pb_forms_helper.rb +13 -4
  175. data/lib/playbook/version.rb +2 -2
  176. metadata +67 -9
  177. data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
  178. data/dist/chunks/_weekday_stacked-E-5KcEkc.js +0 -45
  179. data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
  180. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_table_props.md → _advanced_table_table_props_react.md} +0 -0
  181. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible.md → _table_with_collapsible_react.md} +0 -0
@@ -3,7 +3,22 @@ import { components } from 'react-select'
3
3
 
4
4
  import User from '../../pb_user/_user'
5
5
 
6
- const Option = (props: any) => {
6
+ type OptionProps = {
7
+ children: React.ReactNode,
8
+ label?: string,
9
+ data: {
10
+ imageUrl?: string,
11
+ },
12
+ selectProps: {
13
+ dark?: boolean,
14
+ valueComponent?: (data: {
15
+ imageUrl?: string,
16
+ }) => React.ReactNode,
17
+ },
18
+ }
19
+
20
+
21
+ const Option = (props: OptionProps): React.ReactElement => {
7
22
  const {
8
23
  imageUrl,
9
24
  } = props.data
@@ -14,11 +29,11 @@ const Option = (props: any) => {
14
29
  <>
15
30
  {!valueComponent && imageUrl &&
16
31
  <User
17
- align="left"
18
- avatarUrl={imageUrl}
19
- dark={props.selectProps.dark}
20
- name={props.label}
21
- orientation="horizontal"
32
+ align="left"
33
+ avatarUrl={imageUrl}
34
+ dark={props.selectProps.dark}
35
+ name={props.label}
36
+ orientation="horizontal"
22
37
  />
23
38
  }
24
39
 
@@ -4,19 +4,26 @@ import { components } from 'react-select'
4
4
  import Flex from '../../pb_flex/_flex'
5
5
  import Icon from '../../pb_icon/_icon'
6
6
 
7
- const Placeholder = (props: any) => (
7
+ type PlaceholderProps = {
8
+ children: React.ReactNode,
9
+ selectProps: {
10
+ plusIcon?: boolean,
11
+ },
12
+ }
13
+
14
+ const Placeholder = (props: PlaceholderProps): React.ReactElement => (
8
15
  <>
9
16
  <Flex
10
- align="center"
11
- className="placeholder"
17
+ align="center"
18
+ className="placeholder"
12
19
  >
13
20
  <components.IndicatorsContainer
14
- {...props}
21
+ {...props}
15
22
  />
16
23
  {props.selectProps.plusIcon &&
17
24
  <Icon
18
- className="typeahead-plus-icon"
19
- icon="plus"
25
+ className="typeahead-plus-icon"
26
+ icon="plus"
20
27
  />
21
28
  }
22
29
  </Flex>
@@ -1,10 +1,14 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
3
 
4
- const ValueContainer = (props: any) => (
4
+ type ValueContainerProps = {
5
+ children: React.ReactNode,
6
+ }
7
+
8
+ const ValueContainer = (props: ValueContainerProps): React.ReactElement => (
5
9
  <components.ValueContainer
6
- className="text_input_value_container"
7
- {...props}
10
+ className="text_input_value_container"
11
+ {...props}
8
12
  />
9
13
  )
10
14
 
@@ -1,3 +1,5 @@
1
+ /* eslint-disable react/no-multi-comp */
2
+
1
3
  import React, { useState } from 'react'
2
4
 
3
5
  import {
@@ -0,0 +1,19 @@
1
+ <%
2
+ names = [
3
+ { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
4
+ { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
5
+ { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
6
+ { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
7
+ { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
8
+ ]
9
+ %>
10
+
11
+ <%= pb_rails("typeahead", props: {
12
+ html_options: { style: { maxWidth: "240px" }},
13
+ id: "typeahead-form-pill",
14
+ is_multi: true,
15
+ options: names,
16
+ label: "Truncation Within Typeahead",
17
+ pills: true,
18
+ truncate: 1,
19
+ }) %>
@@ -0,0 +1,27 @@
1
+ import React from 'react'
2
+ import { Typeahead } from 'playbook-ui'
3
+
4
+ const names = [
5
+ { label: 'Alexander Nathaniel Montgomery', value: 'Alexander Nathaniel Montgomery' },
6
+ { label: 'Isabella Anastasia Wellington', value: 'Isabella Anastasia Wellington' },
7
+ { label: 'Christopher Maximilian Harrington', value: 'Christopher Maximilian Harrington' },
8
+ { label: 'Elizabeth Seraphina Kensington', value: 'Elizabeth Seraphina Kensington' },
9
+ { label: 'Theodore Jonathan Abernathy', value: 'Theodore Jonathan Abernathy' },
10
+ ]
11
+
12
+ const TypeaheadTruncatedText = (props) => {
13
+ return (
14
+ <>
15
+ <Typeahead
16
+ htmlOptions={{ style: { maxWidth: "240px" }}}
17
+ isMulti
18
+ label="Truncation Within Typeahead"
19
+ options={names}
20
+ truncate={1}
21
+ {...props}
22
+ />
23
+ </>
24
+ )
25
+ }
26
+
27
+ export default TypeaheadTruncatedText
@@ -0,0 +1 @@
1
+ For Form Pills with longer text, the `truncate` global prop can be used to truncate the label within each Form Pill. Hover over the truncated Form Pill and a Tooltip containing the text or tag section of the Form Pill will appear. See [here](https://playbook.powerapp.cloud/visual_guidelines/truncate) for more information on the truncate global prop.
@@ -45,8 +45,7 @@ const promiseOptions = (inputValue) =>
45
45
 
46
46
  const TypeaheadWithPillsAsync = (props) => {
47
47
  const [users, setUsers] = useState([])
48
- const handleOnChange = (value) => setUsers(formatUsers(value))
49
- const formatValue = (users) => formatUsers(users)
48
+
50
49
  const formatUsers = (users) => {
51
50
  const results = () => (users.map((user) => {
52
51
  if (Object.keys(user)[0] === 'name' || Object.keys(user)[1] === 'id'){
@@ -58,6 +57,9 @@ const TypeaheadWithPillsAsync = (props) => {
58
57
  return results()
59
58
  }
60
59
 
60
+ const handleOnChange = (value) => setUsers(formatUsers(value))
61
+ const formatValue = (users) => formatUsers(users)
62
+
61
63
  return (
62
64
  <>
63
65
  {users && users.length > 0 && (
@@ -83,13 +83,13 @@ const TypeaheadWithPillsAsyncCustomOptions = (props) => {
83
83
  onChange={handleOnChange}
84
84
  onMultiValueClick={handleOnMultiValueClick}
85
85
  placeholder="type the name of a Github user"
86
- valueComponent={(props) => (
86
+ valueComponent={({imageUrl, label, territory, type}) => (
87
87
  <User
88
88
  avatar
89
- avatarUrl={props.imageUrl}
90
- name={props.label}
91
- territory={props.territory}
92
- title={props.type}
89
+ avatarUrl={imageUrl}
90
+ name={label}
91
+ territory={territory}
92
+ title={type}
93
93
  />
94
94
  )}
95
95
  {...props}
@@ -11,6 +11,7 @@ examples:
11
11
  - typeahead_error_state: Error State
12
12
  - typeahead_margin_bottom: Margin Bottom
13
13
  - typeahead_with_pills_color: With Pills (Custom Color)
14
+ - typeahead_truncated_text: Truncated Text
14
15
 
15
16
  react:
16
17
  - typeahead_default: Default
@@ -27,3 +28,4 @@ examples:
27
28
  - typeahead_custom_menu_list: Custom MenuList
28
29
  - typeahead_margin_bottom: Margin Bottom
29
30
  - typeahead_with_pills_color: With Pills (Custom Color)
31
+ - typeahead_truncated_text: Truncated Text
@@ -12,3 +12,4 @@ export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
12
12
  export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
13
13
  export { default as TypeaheadMarginBottom } from './_typeahead_margin_bottom.jsx'
14
14
  export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'
15
+ export { default as TypeaheadTruncatedText } from './_typeahead_truncated_text.jsx'