playbook_ui 15.5.0.pre.alpha.PLAY2503datepickerdefaultdateoutsideminmaxrange12814 → 15.5.0.pre.alpha.PLAY2554homeaddressstreetaccessibility12695

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_background/_background.tsx +6 -6
  3. data/app/pb_kits/playbook/pb_background/background.test.js +1 -5
  4. data/app/pb_kits/playbook/pb_background/docs/_background_light.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +1 -0
  6. data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -2
  7. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -24
  8. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -181
  9. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb +0 -18
  10. data/app/pb_kits/playbook/pb_dialog/index.js +15 -10
  11. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -8
  12. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -11
  13. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +124 -0
  14. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx +147 -12
  15. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -10
  16. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +15 -66
  17. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_multiple_users/docs/index.js +0 -1
  19. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.test.js +0 -25
  20. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +10 -44
  21. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +4 -34
  22. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +7 -16
  23. data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -15
  24. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
  25. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -6
  26. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -34
  27. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  28. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -2
  29. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
  30. data/dist/chunks/_typeahead-CkkCTRLh.js +6 -0
  31. data/dist/chunks/{lib-x6lM2EFN.js → lib-CgpqUb6l.js} +1 -1
  32. data/dist/chunks/vendor.js +2 -2
  33. data/dist/playbook-rails-react-bindings.js +1 -1
  34. data/dist/playbook-rails.js +1 -1
  35. data/dist/playbook.css +1 -1
  36. data/lib/playbook/version.rb +1 -1
  37. metadata +4 -10
  38. data/app/pb_kits/playbook/pb_background/docs/_background_light.md +0 -1
  39. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +0 -42
  40. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +0 -1
  41. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.html.erb +0 -30
  42. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.jsx +0 -37
  43. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.md +0 -3
  44. data/dist/chunks/_typeahead-DCwdpOmC.js +0 -6
@@ -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,