playbook_ui 14.4.0.pre.rc.0 → 14.4.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_radio/docs/_radio_children.jsx +1 -4
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -13
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -8
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +16 -23
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
- data/dist/chunks/{_typeahead-es44Ih6G.js → _typeahead-BWUFVlae.js} +1 -1
- data/dist/chunks/{_weekday_stacked-DWJJPUPQ.js → _weekday_stacked-DpRkKl3_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- 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 -6
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +0 -88
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 725079a8f12856c7c7afa504adaadb457cbe5a070d711c64641c617a4755d407
|
4
|
+
data.tar.gz: 250e103e652c6a8898b00caf2ffc3d6fa6dec335955be10dce4fdb9c558af486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b959771bd4072d6195dc11446e253439d3812416a2fc4a905bf897ed5fa712f2f73d34ebc17388ce40393510950f32feb289b2938e30aa060dcb554edd5728e
|
7
|
+
data.tar.gz: be9e80703c65193ce99f1b3eebb429453e6578b89f8deaa7be499205e8ded6e0f0ca4a3877e005c4a42b139fcc064e9026b5968384e9da488a571bb1a81b9c5f
|
@@ -18,32 +18,29 @@ const RadioChildren = (props) => {
|
|
18
18
|
<div>
|
19
19
|
<Radio
|
20
20
|
label="Select"
|
21
|
-
marginBottom="sm"
|
22
21
|
name="Group1"
|
23
22
|
tabIndex={0}
|
24
23
|
value="Select"
|
25
24
|
{...props}
|
26
25
|
>
|
27
26
|
<Select
|
28
|
-
marginBottom="none"
|
29
27
|
minWidth="xs"
|
30
28
|
options={options}
|
31
29
|
/>
|
32
30
|
</Radio>
|
33
31
|
<Radio
|
34
32
|
label="Typeahead"
|
35
|
-
marginBottom="sm"
|
36
33
|
name="Group1"
|
37
34
|
tabIndex={0}
|
38
35
|
value="Typeahead"
|
39
36
|
{...props}
|
40
37
|
>
|
41
38
|
<Typeahead
|
42
|
-
marginBottom="none"
|
43
39
|
minWidth="xs"
|
44
40
|
options={options}
|
45
41
|
/>
|
46
42
|
</Radio>
|
43
|
+
<br />
|
47
44
|
<Radio
|
48
45
|
defaultChecked={false}
|
49
46
|
label="Typography"
|
@@ -107,17 +107,4 @@ test('should pass className prop', () => {
|
|
107
107
|
|
108
108
|
const kit = screen.getByTestId('typeahead-test')
|
109
109
|
expect(kit).toHaveClass(className)
|
110
|
-
})
|
111
|
-
|
112
|
-
test('typeahead textinput has mb_sm class by default', () => {
|
113
|
-
render(
|
114
|
-
<Typeahead
|
115
|
-
data={{ testid: 'default-mb-test' }}
|
116
|
-
options={options}
|
117
|
-
/>
|
118
|
-
)
|
119
|
-
|
120
|
-
const kit = screen.getByTestId('default-mb-test')
|
121
|
-
const textInput = kit.querySelector(".pb_text_input_kit")
|
122
|
-
expect(textInput).toHaveClass("mb_sm")
|
123
110
|
})
|
@@ -45,7 +45,6 @@ type TypeaheadProps = {
|
|
45
45
|
getOptionLabel?: string | (() => any),
|
46
46
|
getOptionValue?: string | (() => any),
|
47
47
|
name?: string,
|
48
|
-
marginBottom?: "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl",
|
49
48
|
} & GlobalProps
|
50
49
|
|
51
50
|
export type SelectValueType = {
|
@@ -77,18 +76,12 @@ const Typeahead = ({
|
|
77
76
|
htmlOptions = {},
|
78
77
|
id,
|
79
78
|
loadOptions = noop,
|
80
|
-
marginBottom = "sm",
|
81
79
|
...props
|
82
80
|
}: TypeaheadProps) => {
|
83
81
|
const selectProps = {
|
84
82
|
cacheOptions: true,
|
85
83
|
components: {
|
86
|
-
Control
|
87
|
-
<Control
|
88
|
-
{...controlProps}
|
89
|
-
marginBottom={marginBottom}
|
90
|
-
/>
|
91
|
-
),
|
84
|
+
Control,
|
92
85
|
ClearIndicator,
|
93
86
|
IndicatorsContainer,
|
94
87
|
IndicatorSeparator: null as null,
|
@@ -6,30 +6,23 @@ import TextInput from '../../pb_text_input/_text_input'
|
|
6
6
|
|
7
7
|
type Props = {
|
8
8
|
selectProps: any,
|
9
|
-
marginBottom?: string,
|
10
9
|
}
|
11
10
|
|
12
|
-
const TypeaheadControl = (props: Props) =>
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
/>
|
29
|
-
</Flex>
|
30
|
-
</TextInput>
|
31
|
-
</div>
|
32
|
-
)
|
33
|
-
}
|
11
|
+
const TypeaheadControl = (props: Props) => (
|
12
|
+
<div className="pb_typeahead_wrapper">
|
13
|
+
<TextInput
|
14
|
+
dark={props.selectProps.dark}
|
15
|
+
error={props.selectProps.error}
|
16
|
+
label={props.selectProps.label}
|
17
|
+
>
|
18
|
+
<Flex>
|
19
|
+
<components.Control
|
20
|
+
className="text_input"
|
21
|
+
{...props}
|
22
|
+
/>
|
23
|
+
</Flex>
|
24
|
+
</TextInput>
|
25
|
+
</div>
|
26
|
+
)
|
34
27
|
|
35
28
|
export default TypeaheadControl
|
@@ -9,7 +9,6 @@ examples:
|
|
9
9
|
- typeahead_inline: Inline
|
10
10
|
- typeahead_multi_kit: Multi Kit Options
|
11
11
|
- typeahead_error_state: Error State
|
12
|
-
- typeahead_margin_bottom: Margin Bottom
|
13
12
|
|
14
13
|
react:
|
15
14
|
- typeahead_default: Default
|
@@ -24,4 +23,3 @@ examples:
|
|
24
23
|
- typeahead_async_createable: Createable (+ Async Data)
|
25
24
|
- typeahead_error_state: Error State
|
26
25
|
- typeahead_custom_menu_list: Custom MenuList
|
27
|
-
- typeahead_margin_bottom: Margin Bottom
|
@@ -10,4 +10,3 @@ export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
|
|
10
10
|
export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
|
11
11
|
export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
|
12
12
|
export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
|
13
|
-
export { default as TypeaheadMarginBottom } from './_typeahead_margin_bottom.jsx'
|
@@ -20,8 +20,7 @@
|
|
20
20
|
label: object.label,
|
21
21
|
name: object.name,
|
22
22
|
value: object.value,
|
23
|
-
placeholder: object.placeholder
|
24
|
-
margin_bottom: "none",
|
23
|
+
placeholder: object.placeholder
|
25
24
|
}) %>
|
26
25
|
<%= pb_rails("list", props: { ordered: false, borderless: false, xpadding: true, role: "status", aria: { live: "polite" }, data: { pb_typeahead_kit_results: true } }) do %>
|
27
26
|
<% end %>
|
@@ -14,9 +14,6 @@ module Playbook
|
|
14
14
|
default: false
|
15
15
|
prop :label
|
16
16
|
prop :load_options
|
17
|
-
prop :margin_bottom, type: Playbook::Props::Enum,
|
18
|
-
values: %w[none xxs xs sm md lg xl],
|
19
|
-
default: "sm"
|
20
17
|
prop :multi_kit, type: Playbook::Props::String,
|
21
18
|
default: ""
|
22
19
|
prop :name
|
@@ -39,8 +36,7 @@ module Playbook
|
|
39
36
|
prop :value
|
40
37
|
|
41
38
|
def classname
|
42
|
-
|
43
|
-
generate_classname("pb_typeahead_kit") + default_margin_bottom
|
39
|
+
generate_classname("pb_typeahead_kit")
|
44
40
|
end
|
45
41
|
|
46
42
|
def inline_class
|
@@ -69,7 +65,6 @@ module Playbook
|
|
69
65
|
inline: inline,
|
70
66
|
isMulti: is_multi,
|
71
67
|
label: label,
|
72
|
-
marginBottom: margin_bottom,
|
73
68
|
multiKit: multi_kit,
|
74
69
|
name: name,
|
75
70
|
options: options,
|