playbook_ui 15.6.0.pre.alpha.play266913088 → 15.6.0.pre.rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +2 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +0 -4
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +0 -95
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +5 -11
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -7
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +163 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +190 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -4
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -3
  11. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +2 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -57
  13. data/app/pb_kits/playbook/pb_background/_background.tsx +6 -6
  14. data/app/pb_kits/playbook/pb_background/background.test.js +1 -5
  15. data/app/pb_kits/playbook/pb_background/docs/_background_light.html.erb +1 -1
  16. data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +1 -0
  17. data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -2
  18. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  19. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
  20. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +2 -2
  21. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +8 -10
  22. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +1 -0
  23. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_state.jsx +3 -0
  24. data/app/pb_kits/playbook/pb_contact/_contact.tsx +24 -51
  25. data/app/pb_kits/playbook/pb_contact/contact.html.erb +19 -53
  26. data/app/pb_kits/playbook/pb_contact/contact.rb +1 -11
  27. data/app/pb_kits/playbook/pb_contact/contact.test.js +0 -76
  28. data/app/pb_kits/playbook/pb_contact/docs/example.yml +0 -2
  29. data/app/pb_kits/playbook/pb_contact/docs/index.js +0 -1
  30. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -24
  31. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +7 -197
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +14 -23
  33. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +1 -1
  34. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +1 -2
  35. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -1
  36. data/app/pb_kits/playbook/pb_dialog/dialog.rb +0 -1
  37. data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +0 -14
  38. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +4 -5
  39. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +0 -2
  40. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +0 -31
  41. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -4
  42. data/app/pb_kits/playbook/pb_dialog/docs/index.js +1 -3
  43. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
  44. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +7 -458
  45. data/app/pb_kits/playbook/pb_draggable/context/types.ts +3 -8
  46. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -3
  47. data/app/pb_kits/playbook/pb_draggable/docs/index.js +1 -2
  48. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +1 -77
  49. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +5 -7
  50. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +1 -3
  51. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -5
  52. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +0 -4
  53. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +5 -39
  54. data/app/pb_kits/playbook/pb_dropdown/index.js +3 -171
  55. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +4 -4
  56. data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.tsx +3 -3
  57. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +22 -34
  58. data/app/pb_kits/playbook/pb_home_address_street/city_emphasis.html.erb +12 -16
  59. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +1 -1
  60. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +12 -16
  61. data/app/pb_kits/playbook/pb_home_address_street/street_emphasis.html.erb +12 -16
  62. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -10
  63. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +15 -66
  64. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -1
  65. data/app/pb_kits/playbook/pb_multiple_users/docs/index.js +0 -1
  66. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.test.js +0 -25
  67. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +10 -44
  68. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +4 -34
  69. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +7 -16
  70. data/app/pb_kits/playbook/pb_radio/docs/_radio_error.md +1 -1
  71. data/app/pb_kits/playbook/pb_select/_select.tsx +3 -8
  72. data/app/pb_kits/playbook/pb_select/docs/_select_error.md +1 -1
  73. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -2
  74. data/app/pb_kits/playbook/pb_select/docs/index.js +0 -1
  75. data/app/pb_kits/playbook/pb_select/select.html.erb +2 -2
  76. data/app/pb_kits/playbook/pb_select/select.rb +1 -3
  77. data/app/pb_kits/playbook/pb_select/select.test.js +0 -23
  78. data/app/pb_kits/playbook/pb_table/_table.tsx +33 -187
  79. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -4
  80. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -2
  81. data/app/pb_kits/playbook/pb_table/table.html.erb +12 -68
  82. data/app/pb_kits/playbook/pb_table/table.rb +3 -22
  83. data/app/pb_kits/playbook/pb_table/table.test.js +0 -143
  84. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.md +1 -1
  85. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.md +1 -1
  86. data/app/pb_kits/playbook/pb_timeline/_item.tsx +0 -3
  87. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.md +1 -1
  88. data/app/pb_kits/playbook/pb_timeline/docs/example.yml +0 -2
  89. data/app/pb_kits/playbook/pb_timeline/docs/index.js +0 -1
  90. data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -1
  91. data/app/pb_kits/playbook/pb_timeline/item.rb +0 -2
  92. data/app/pb_kits/playbook/pb_timeline/label.html.erb +1 -2
  93. data/app/pb_kits/playbook/pb_timeline/label.rb +0 -2
  94. data/app/pb_kits/playbook/pb_timeline/subcomponents/Label.tsx +0 -3
  95. data/app/pb_kits/playbook/pb_timeline/timeline.test.js +0 -51
  96. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -15
  97. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
  98. data/app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.tsx +2 -13
  99. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -6
  100. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -34
  101. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  102. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -2
  103. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
  104. data/app/pb_kits/playbook/tokens/_colors.scss +1 -2
  105. data/dist/chunks/_typeahead-kRdz5zPn.js +6 -0
  106. data/dist/chunks/lib-CgpqUb6l.js +29 -0
  107. data/dist/chunks/vendor.js +3 -3
  108. data/dist/menu.yml +1 -1
  109. data/dist/playbook-rails-react-bindings.js +1 -1
  110. data/dist/playbook-rails.js +1 -1
  111. data/dist/playbook.css +1 -1
  112. data/lib/playbook/forms/builder/collection_select_field.rb +1 -9
  113. data/lib/playbook/forms/builder/select_field.rb +1 -9
  114. data/lib/playbook/forms/builder/time_zone_select_field.rb +1 -9
  115. data/lib/playbook/pb_kit_helper.rb +0 -35
  116. data/lib/playbook/version.rb +2 -2
  117. metadata +4 -54
  118. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.html.erb +0 -43
  119. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md +0 -1
  120. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx +0 -54
  121. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md +0 -9
  122. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx +0 -80
  123. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md +0 -3
  124. data/app/pb_kits/playbook/pb_background/docs/_background_light.md +0 -1
  125. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +0 -33
  126. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +0 -46
  127. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +0 -2
  128. data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +0 -2
  129. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.html.erb +0 -24
  130. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.jsx +0 -60
  131. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_closeable.md +0 -3
  132. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +0 -71
  133. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +0 -57
  134. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +0 -1
  135. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +0 -1
  136. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.jsx +0 -180
  137. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_dropzone.md +0 -22
  138. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +0 -19
  139. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +0 -12
  140. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +0 -26
  141. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +0 -19
  142. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +0 -1
  143. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +0 -30
  144. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +0 -3
  145. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +0 -29
  146. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +0 -13
  147. data/app/pb_kits/playbook/pb_dropdown/quickpick_helper.rb +0 -75
  148. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +0 -42
  149. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +0 -1
  150. data/app/pb_kits/playbook/pb_select/docs/_select_input_options.html.erb +0 -16
  151. data/app/pb_kits/playbook/pb_select/docs/_select_input_options.jsx +0 -30
  152. data/app/pb_kits/playbook/pb_select/docs/_select_input_options.md +0 -1
  153. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +0 -134
  154. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +0 -34
  155. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +0 -101
  156. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +0 -33
  157. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +0 -180
  158. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +0 -3
  159. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +0 -122
  160. data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +0 -3
  161. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.html.erb +0 -60
  162. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.jsx +0 -118
  163. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_show_current_year.md +0 -1
  164. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.html.erb +0 -30
  165. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.jsx +0 -37
  166. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.md +0 -3
  167. data/app/pb_kits/playbook/utilities/deprecated.ts +0 -73
  168. data/dist/chunks/_typeahead-CbjBmIDu.js +0 -6
  169. data/dist/chunks/lib-DxDBrGZX.js +0 -29
@@ -3,8 +3,7 @@
3
3
  <%= pb_rails("date_stacked", props: {
4
4
  date: object.date,
5
5
  size: "sm",
6
- align: "center",
7
- show_current_year: object.show_current_year
6
+ align: "center"
8
7
  }) %>
9
8
  <% else %>
10
9
  <%= content.presence %>
@@ -4,8 +4,6 @@ module Playbook
4
4
  module PbTimeline
5
5
  class Label < Playbook::KitBase
6
6
  prop :date
7
- prop :show_current_year, type: Playbook::Props::Boolean,
8
- default: false
9
7
 
10
8
  def classname
11
9
  generate_classname("pb_timeline_item_left_block")
@@ -9,7 +9,6 @@ type TimelineLabelProps = {
9
9
  children?: React.ReactNode,
10
10
  className?: string,
11
11
  htmlOptions?: { [key: string]: any },
12
- showCurrentYear?: boolean,
13
12
  } & GlobalProps
14
13
 
15
14
  const TimelineLabel: React.FC<TimelineLabelProps> = ({
@@ -17,7 +16,6 @@ const TimelineLabel: React.FC<TimelineLabelProps> = ({
17
16
  children,
18
17
  className,
19
18
  htmlOptions = {},
20
- showCurrentYear = false,
21
19
  ...props
22
20
  }) => {
23
21
  const htmlProps = buildHtmlProps(htmlOptions)
@@ -30,7 +28,6 @@ const TimelineLabel: React.FC<TimelineLabelProps> = ({
30
28
  {date && (
31
29
  <DateStacked align="center"
32
30
  date={date}
33
- showCurrentYear={showCurrentYear}
34
31
  size="sm"
35
32
  />
36
33
  )}
@@ -170,54 +170,3 @@ test('should pass showDate prop with Children', () => {
170
170
  const kit = screen.getByTestId(testId)
171
171
  expect(kit).toHaveClass('pb_timeline_kit_horizontal_with_date')
172
172
  })
173
-
174
- test('should pass showCurrentYear prop to items with date', () => {
175
- const currentYear = new Date().getFullYear().toString()
176
- render(
177
- <Timeline
178
- data={{ testid: testId }}
179
- showDate
180
- >
181
- <Timeline.Item
182
- date={new Date()}
183
- icon="user"
184
- iconColor="royal"
185
- showCurrentYear
186
- >
187
- <TitleDetail
188
- detail="37-27 74th Street"
189
- title="Jackson Heights"
190
- />
191
- </Timeline.Item>
192
- </Timeline>
193
- )
194
- const kit = screen.getByTestId(testId)
195
- expect(kit).toBeInTheDocument()
196
- const yearCaption = kit.querySelector('.pb_caption_kit_xs')
197
- expect(yearCaption).toBeInTheDocument()
198
- expect(yearCaption.textContent).toEqual(currentYear)
199
- })
200
-
201
- test('should not show current year by default', () => {
202
- const currentYear = new Date().getFullYear().toString()
203
- render(
204
- <Timeline
205
- data={{ testid: testId }}
206
- showDate
207
- >
208
- <Timeline.Item
209
- date={new Date()}
210
- icon="user"
211
- iconColor="royal"
212
- >
213
- <TitleDetail
214
- detail="37-27 74th Street"
215
- title="Jackson Heights"
216
- />
217
- </Timeline.Item>
218
- </Timeline>
219
- )
220
- const kit = screen.getByTestId(testId)
221
- expect(kit).toBeInTheDocument()
222
- expect(kit).not.toHaveTextContent(currentYear)
223
- })
@@ -276,18 +276,3 @@ test('multi-value badges have tabIndex and focus class when focused', () => {
276
276
  })
277
277
  })
278
278
 
279
- test('input display none shows number of selected items', () => {
280
- render(
281
- <Typeahead
282
- data={{ testid: 'input-display-none-test' }}
283
- defaultValue={[options[0], options[1]]}
284
- inputDisplay="none"
285
- isMulti
286
- options={options}
287
- />
288
- )
289
-
290
- const kit = screen.getByTestId('input-display-none-test')
291
- const inputDisplayDiv = kit.querySelector(".pb_typeahead_selection_count")
292
- expect(inputDisplayDiv).toHaveTextContent("2 items selected")
293
- })
@@ -43,7 +43,6 @@ type TypeaheadProps = {
43
43
  error?: string,
44
44
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
45
45
  id?: string,
46
- inputDisplay?: "pills" | "none",
47
46
  label?: string,
48
47
  loadOptions?: string | Noop,
49
48
  getOptionLabel?: string | (() => string),
@@ -90,7 +89,6 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
90
89
  getOptionValue,
91
90
  htmlOptions = {},
92
91
  id,
93
- inputDisplay = "pills",
94
92
  name,
95
93
  loadOptions = noop,
96
94
  marginBottom = "sm",
@@ -240,7 +238,6 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
240
238
  getOptionValue: isString(getOptionValue) ? get(window, getOptionValue) : getOptionValue,
241
239
  defaultOptions: true,
242
240
  id: id || uniqueId(),
243
- inputDisplay: inputDisplay,
244
241
  inline: false,
245
242
  isClearable: true,
246
243
  isSearchable: true,
@@ -7,29 +7,18 @@ type ClearContainerProps = {
7
7
  id: string,
8
8
  },
9
9
  clearValue: () => void,
10
- innerProps?: any,
11
10
  }
12
11
 
13
- const ClearContainer = (props: ClearContainerProps | any): React.ReactElement => {
14
- const { selectProps, clearValue, innerProps } = props
12
+ const ClearContainer = (props: ClearContainerProps): React.ReactElement => {
13
+ const { selectProps, clearValue } = props
15
14
  useEffect(() => {
16
15
  document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`, clearValue)
17
16
  }, [clearValue, selectProps.id])
18
17
 
19
- // To stop this from bubbling up when inside a dialog or other modal
20
- const handleMouseDown = (event: React.MouseEvent) => {
21
- event.stopPropagation()
22
- innerProps?.onMouseDown?.(event)
23
- }
24
-
25
18
  return (
26
19
  <components.ClearIndicator
27
20
  className="clear_indicator"
28
21
  {...props}
29
- innerProps={{
30
- ...innerProps,
31
- onMouseDown: handleMouseDown,
32
- }}
33
22
  />
34
23
  )
35
24
  }
@@ -19,12 +19,7 @@ type Props = {
19
19
  const MultiValue = (props: Props) => {
20
20
  const { removeProps, isFocused } = props
21
21
  const { imageUrl, label } = props.data
22
- const { dark, multiKit, pillColor, truncate, wrapped, inputDisplay } = props.selectProps
23
-
24
- // If inputDisplay is "none", don't render the pill/badge, just return null (the count handled in ValueContainer file)
25
- if (inputDisplay === 'none') {
26
- return null
27
- }
22
+ const { dark, multiKit, pillColor, truncate, wrapped } = props.selectProps
28
23
 
29
24
  const formPillProps = {
30
25
  marginRight: 'xs',
@@ -1,42 +1,15 @@
1
1
  import React from 'react'
2
2
  import { components } from 'react-select'
3
- import Body from '../../pb_body/_body'
4
3
 
5
4
  type ValueContainerProps = {
6
- children: React.ReactNode | React.ReactNode[],
7
- selectProps?: Record<string, unknown>,
8
- hasValue?: boolean,
5
+ children: React.ReactNode,
9
6
  }
10
7
 
11
- const ValueContainer = (props: ValueContainerProps | any): React.ReactElement => {
12
- const { children, selectProps, hasValue } = props
13
- const inputDisplay = (selectProps as any)?.inputDisplay
14
- const value = (selectProps as any)?.value
15
-
16
- // When inputDisplay is "none" and there are selected values, show count text (this is for multi-select only)
17
- if (inputDisplay === 'none' && hasValue && value) {
18
- const selectedCount = Array.isArray(value) ? value.length : 0
19
-
20
- return (
21
- <components.ValueContainer
22
- className="text_input_value_container"
23
- {...props}
24
- >
25
- <Body
26
- className="pb_typeahead_selection_count"
27
- text={`${selectedCount} item${selectedCount !== 1 ? 's' : ''} selected`}
28
- />
29
- {children}
30
- </components.ValueContainer>
31
- )
32
- }
33
-
34
- return (
35
- <components.ValueContainer
36
- className="text_input_value_container"
37
- {...props}
38
- />
39
- )
40
- }
8
+ const ValueContainer = (props: ValueContainerProps): React.ReactElement => (
9
+ <components.ValueContainer
10
+ className="text_input_value_container"
11
+ {...props}
12
+ />
13
+ )
41
14
 
42
15
  export default ValueContainer
@@ -5,7 +5,6 @@ examples:
5
5
  - typeahead_default_options: With Default Options
6
6
  - typeahead_with_context: With Context
7
7
  - typeahead_with_pills: With Pills
8
- - typeahead_input_display: Input Display
9
8
  - typeahead_without_pills: Without Pills (Single Select)
10
9
  - typeahead_with_pills_async: With Pills (Async Data)
11
10
  - typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
@@ -27,7 +26,6 @@ examples:
27
26
  - typeahead_react_hook: React Hook
28
27
  - typeahead_with_highlight: With Highlight
29
28
  - typeahead_with_pills: With Pills
30
- - typeahead_input_display: Input Display
31
29
  - typeahead_with_pills_async: With Pills (Async Data)
32
30
  - typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
33
31
  - typeahead_with_pills_async_custom_options: With Pills (Async Data w/ Custom Options)
@@ -17,5 +17,4 @@ export { default as TypeaheadReactHook } from './_typeahead_react_hook.jsx'
17
17
  export { default as TypeaheadDisabled } from './_typeahead_disabled.jsx'
18
18
  export { default as TypeaheadPreserveInput } from './_typeahead_preserve_input.jsx'
19
19
  export { default as TypeaheadDefaultValue } from './_typeahead_default_value.jsx'
20
- export { default as TypeaheadCustomOptions } from './_typeahead_custom_options.jsx'
21
- export { default as TypeaheadInputDisplay } from './_typeahead_input_display.jsx'
20
+ export { default as TypeaheadCustomOptions } from './_typeahead_custom_options.jsx'
@@ -25,10 +25,6 @@ module Playbook
25
25
  prop :is_multi, type: Playbook::Props::Boolean,
26
26
  default: true
27
27
 
28
- prop :input_display, type: Playbook::Props::Enum,
29
- values: %w[none pills],
30
- default: "pills"
31
-
32
28
  prop :pills, type: Playbook::Props::Boolean,
33
29
  default: false
34
30
 
@@ -82,7 +78,7 @@ module Playbook
82
78
  end
83
79
 
84
80
  def is_react?
85
- pills || !is_multi || wrapped || input_display == "none"
81
+ pills || !is_multi || wrapped
86
82
  end
87
83
 
88
84
  def typeahead_react_options
@@ -95,7 +91,6 @@ module Playbook
95
91
  id: id,
96
92
  inline: inline,
97
93
  isMulti: is_multi,
98
- inputDisplay: input_display,
99
94
  label: label,
100
95
  marginBottom: margin_bottom,
101
96
  multiKit: multi_kit,
@@ -139,8 +139,7 @@ $text_colors: (
139
139
  text_lt_lighter: $text_lt_lighter,
140
140
  text_dk_default: $text_dk_default,
141
141
  text_dk_light: $text_dk_light,
142
- text_dk_lighter: $text_dk_lighter,
143
- text_dk_success_sm: $text_dk_success_sm
142
+ text_dk_lighter: $text_dk_lighter
144
143
  );
145
144
 
146
145
  /* Data colors ------------------------*/