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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_background/_background.tsx +6 -6
- data/app/pb_kits/playbook/pb_background/background.test.js +1 -5
- data/app/pb_kits/playbook/pb_background/docs/_background_light.html.erb +1 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +1 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +2 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -24
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -181
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb +0 -18
- data/app/pb_kits/playbook/pb_dialog/index.js +15 -10
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -8
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -11
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.html.erb +124 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx +147 -12
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +0 -10
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +15 -66
- data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.test.js +0 -25
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +10 -44
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.html.erb +4 -34
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +7 -16
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -15
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +1 -6
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx +7 -34
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
- data/dist/chunks/_typeahead-CkkCTRLh.js +6 -0
- data/dist/chunks/{lib-x6lM2EFN.js → lib-CgpqUb6l.js} +1 -1
- data/dist/chunks/vendor.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +4 -10
- data/app/pb_kits/playbook/pb_background/docs/_background_light.md +0 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.jsx +0 -42
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_with_tooltip.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.html.erb +0 -30
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.jsx +0 -37
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_input_display.md +0 -3
- 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
|
|
7
|
-
selectProps?: Record<string, unknown>,
|
|
8
|
-
hasValue?: boolean,
|
|
5
|
+
children: React.ReactNode,
|
|
9
6
|
}
|
|
10
7
|
|
|
11
|
-
const ValueContainer = (props: ValueContainerProps
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
|
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,
|