playbook_ui 9.9.0.alpha.inline1 → 9.10.0
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_badge/_badge.jsx +1 -26
- data/app/pb_kits/playbook/pb_button/_button.jsx +8 -19
- data/app/pb_kits/playbook/pb_button/button.rb +6 -4
- data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.html.erb +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_link.html.erb +3 -3
- data/app/pb_kits/playbook/pb_button/docs/_button_link.jsx +3 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_loading.html.erb +3 -3
- data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +3 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +1 -6
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +0 -3
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +2 -12
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +0 -19
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb +5 -4
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx +6 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +0 -5
- data/app/pb_kits/playbook/pb_passphrase/useZxcvbn.js +3 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +0 -10
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +0 -61
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +2 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +0 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -8
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -7
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +2 -11
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +0 -23
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +11 -23
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +4 -17
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +5 -7
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +2 -18
- data/lib/playbook/version.rb +1 -1
- metadata +6 -17
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb +0 -13
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx +0 -25
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb +0 -6
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx +0 -16
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb +0 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx +0 -14
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb +0 -5
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx +0 -22
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb +0 -36
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx +0 -43
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +0 -35
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx +0 -44
@@ -5,8 +5,6 @@ examples:
|
|
5
5
|
- typeahead_with_pills: With Pills
|
6
6
|
- typeahead_with_pills_async: With Pills (Async Data)
|
7
7
|
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
8
|
-
- typeahead_inline: Inline
|
9
|
-
- typeahead_multi_kit: Multi Kit Options
|
10
8
|
|
11
9
|
react:
|
12
10
|
- typeahead_default: Default
|
@@ -14,5 +12,3 @@ examples:
|
|
14
12
|
- typeahead_with_pills_async: With Pills (Async Data)
|
15
13
|
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
16
14
|
- typeahead_with_pills_async_custom_options: With Pills (Async Data w/ Custom Options)
|
17
|
-
- typeahead_inline: Inline
|
18
|
-
- typeahead_multi_kit: Multi Kit Options
|
@@ -1,7 +1,5 @@
|
|
1
|
-
export { default as TypeaheadDefault } from './_typeahead_default
|
2
|
-
export { default as TypeaheadWithPills } from './_typeahead_with_pills
|
3
|
-
export { default as TypeaheadWithPillsAsync } from './_typeahead_with_pills_async
|
4
|
-
export { default as TypeaheadWithPillsAsyncUsers } from './_typeahead_with_pills_async_users
|
5
|
-
export { default as TypeaheadWithPillsAsyncCustomOptions } from './_typeahead_with_pills_async_custom_options
|
6
|
-
export { default as TypeaheadInline } from './_typeahead_inline.jsx'
|
7
|
-
export { default as TypeaheadMultiKit } from './_typeahead_multi_kit.jsx'
|
1
|
+
export { default as TypeaheadDefault } from './_typeahead_default'
|
2
|
+
export { default as TypeaheadWithPills } from './_typeahead_with_pills'
|
3
|
+
export { default as TypeaheadWithPillsAsync } from './_typeahead_with_pills_async'
|
4
|
+
export { default as TypeaheadWithPillsAsyncUsers } from './_typeahead_with_pills_async_users'
|
5
|
+
export { default as TypeaheadWithPillsAsyncCustomOptions } from './_typeahead_with_pills_async_custom_options'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= content_tag(:div,
|
5
5
|
id: object.id,
|
6
6
|
data: object.data,
|
7
|
-
class: object.classname
|
7
|
+
class: object.classname) do %>
|
8
8
|
<div class="pb_typeahead_wrapper">
|
9
9
|
<div class="pb_typeahead_loading_indicator" data-pb-typeahead-kit-loading-indicator>
|
10
10
|
<%= pb_rails("icon", props: {
|
@@ -8,21 +8,12 @@ module Playbook
|
|
8
8
|
prop :get_option_label
|
9
9
|
prop :get_option_value
|
10
10
|
prop :id
|
11
|
-
prop :inline, type: Playbook::Props::Boolean,
|
12
|
-
default: false
|
13
11
|
prop :label
|
14
12
|
prop :load_options
|
15
|
-
prop :multi_kit, type: Playbook::Props::String,
|
16
|
-
default: ""
|
17
13
|
prop :name
|
18
|
-
prop :options, type: Playbook::Props::HashArray,
|
19
|
-
|
20
|
-
prop :pills, type: Playbook::Props::Boolean,
|
21
|
-
default: false
|
22
|
-
|
14
|
+
prop :options, type: Playbook::Props::HashArray, default: []
|
15
|
+
prop :pills, type: Playbook::Props::Boolean, default: false
|
23
16
|
prop :placeholder
|
24
|
-
prop :plus_icon, type: Playbook::Props::Boolean,
|
25
|
-
default: false
|
26
17
|
prop :search_term_minimum_length, default: 3
|
27
18
|
prop :search_debounce_timeout, default: 250
|
28
19
|
prop :value
|
@@ -31,10 +22,6 @@ module Playbook
|
|
31
22
|
generate_classname("pb_typeahead_kit")
|
32
23
|
end
|
33
24
|
|
34
|
-
def inline_class
|
35
|
-
inline ? " inline" : ""
|
36
|
-
end
|
37
|
-
|
38
25
|
def data
|
39
26
|
Hash(values[:data]).merge(
|
40
27
|
pb_typeahead_kit: true,
|
@@ -48,14 +35,11 @@ module Playbook
|
|
48
35
|
dark: dark,
|
49
36
|
defaultValue: default_options,
|
50
37
|
id: id,
|
51
|
-
inline: inline,
|
52
38
|
isMulti: true,
|
53
39
|
label: label,
|
54
|
-
multiKit: multi_kit,
|
55
40
|
name: name,
|
56
41
|
options: options,
|
57
42
|
placeholder: placeholder,
|
58
|
-
plusIcon: plus_icon,
|
59
43
|
}
|
60
44
|
|
61
45
|
base_options.merge!({ getOptionLabel: get_option_label }) if get_option_label.present?
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1021,8 +1021,6 @@ files:
|
|
1021
1021
|
- app/pb_kits/playbook/pb_form_group/form_group.rb
|
1022
1022
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.jsx
|
1023
1023
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.scss
|
1024
|
-
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb
|
1025
|
-
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx
|
1026
1024
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.html.erb
|
1027
1025
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
|
1028
1026
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
|
@@ -1542,8 +1540,6 @@ files:
|
|
1542
1540
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx
|
1543
1541
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.html.erb
|
1544
1542
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx
|
1545
|
-
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb
|
1546
|
-
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx
|
1547
1543
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
|
1548
1544
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx
|
1549
1545
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb
|
@@ -1552,8 +1548,6 @@ files:
|
|
1552
1548
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx
|
1553
1549
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.html.erb
|
1554
1550
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
|
1555
|
-
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb
|
1556
|
-
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx
|
1557
1551
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml
|
1558
1552
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/index.js
|
1559
1553
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/templates.js
|
@@ -1809,8 +1803,6 @@ files:
|
|
1809
1803
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb
|
1810
1804
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx
|
1811
1805
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.md
|
1812
|
-
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb
|
1813
|
-
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx
|
1814
1806
|
- app/pb_kits/playbook/pb_text_input/docs/example.yml
|
1815
1807
|
- app/pb_kits/playbook/pb_text_input/docs/index.js
|
1816
1808
|
- app/pb_kits/playbook/pb_text_input/text_input.html.erb
|
@@ -1988,10 +1980,6 @@ files:
|
|
1988
1980
|
- app/pb_kits/playbook/pb_typeahead/docs/_footer.md
|
1989
1981
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
|
1990
1982
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
|
1991
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb
|
1992
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx
|
1993
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
|
1994
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
|
1995
1983
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context.html.erb
|
1996
1984
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
|
1997
1985
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx
|
@@ -2146,11 +2134,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2146
2134
|
version: '0'
|
2147
2135
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2148
2136
|
requirements:
|
2149
|
-
- - "
|
2137
|
+
- - ">="
|
2150
2138
|
- !ruby/object:Gem::Version
|
2151
|
-
version:
|
2139
|
+
version: '0'
|
2152
2140
|
requirements: []
|
2153
|
-
|
2141
|
+
rubyforge_project:
|
2142
|
+
rubygems_version: 2.7.3
|
2154
2143
|
signing_key:
|
2155
2144
|
specification_version: 4
|
2156
2145
|
summary: Playbook Design System
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<%= pb_rails("form_pill", props: {
|
2
|
-
name: "Anna Black",
|
3
|
-
avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
|
4
|
-
size: "small",
|
5
|
-
}) %>
|
6
|
-
|
7
|
-
<br />
|
8
|
-
<br />
|
9
|
-
|
10
|
-
<%= pb_rails("form_pill", props: {
|
11
|
-
name: "Anna Black",
|
12
|
-
size: "small",
|
13
|
-
}) %>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import FormPill from '../_form_pill.jsx'
|
3
|
-
|
4
|
-
const FormPillSize = (props) => {
|
5
|
-
return (
|
6
|
-
|
7
|
-
<div>
|
8
|
-
<FormPill
|
9
|
-
avatarUrl="https://randomuser.me/api/portraits/women/44.jpg"
|
10
|
-
name="Anna Black"
|
11
|
-
size="small"
|
12
|
-
{...props}
|
13
|
-
/>
|
14
|
-
<br />
|
15
|
-
<br />
|
16
|
-
<FormPill
|
17
|
-
name="Anna Black"
|
18
|
-
size="small"
|
19
|
-
{...props}
|
20
|
-
/>
|
21
|
-
</div>
|
22
|
-
)
|
23
|
-
}
|
24
|
-
|
25
|
-
export default FormPillSize
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { RichTextEditor } from '../../'
|
3
|
-
|
4
|
-
const RichTextEditorInline = (props) => (
|
5
|
-
<div>
|
6
|
-
<RichTextEditor
|
7
|
-
id="inline"
|
8
|
-
inline
|
9
|
-
toolbarBottom
|
10
|
-
value="Try hovering over this text. Then try modifying it or adding more of your own text."
|
11
|
-
{...props}
|
12
|
-
/>
|
13
|
-
</div>
|
14
|
-
)
|
15
|
-
|
16
|
-
export default RichTextEditorInline
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import { RichTextEditor } from '../../'
|
3
|
-
|
4
|
-
const RichTextEditorToolbarBottom = (props) => (
|
5
|
-
<div>
|
6
|
-
<RichTextEditor
|
7
|
-
id="bottom-toolbar"
|
8
|
-
toolbarBottom
|
9
|
-
{...props}
|
10
|
-
/>
|
11
|
-
</div>
|
12
|
-
)
|
13
|
-
|
14
|
-
export default RichTextEditorToolbarBottom
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
import { TextInput } from '../../'
|
3
|
-
|
4
|
-
const TextInputInline = (props) => {
|
5
|
-
const [value, setValue] = useState('Inline Input')
|
6
|
-
const handleValueChange = ({ target }) => {
|
7
|
-
setValue(target.value)
|
8
|
-
}
|
9
|
-
return (
|
10
|
-
<div>
|
11
|
-
<TextInput
|
12
|
-
inline
|
13
|
-
label="Hover Over Text Below"
|
14
|
-
onChange={handleValueChange}
|
15
|
-
value={value}
|
16
|
-
{...props}
|
17
|
-
/>
|
18
|
-
</div>
|
19
|
-
)
|
20
|
-
}
|
21
|
-
|
22
|
-
export default TextInputInline
|
@@ -1,36 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
synths = [
|
3
|
-
{ label: 'Oberheim', value: 'OBXa' },
|
4
|
-
{ label: 'Moog', value: 'Minimoog' },
|
5
|
-
{ label: 'Roland', value: 'Juno' },
|
6
|
-
{ label: 'Korg', value: 'MS-20' },
|
7
|
-
]
|
8
|
-
%>
|
9
|
-
<%
|
10
|
-
cities = [
|
11
|
-
{ label: 'Budapest', value: 'Hungary' },
|
12
|
-
{ label: 'Singapore', value: 'Singapore' },
|
13
|
-
{ label: 'Oslo', value: 'Norway' },
|
14
|
-
{ label: 'Lagos', value: 'Nigeria' },
|
15
|
-
]
|
16
|
-
%>
|
17
|
-
|
18
|
-
<%= pb_rails("typeahead", props: {
|
19
|
-
default_options: [synths.first],
|
20
|
-
id: "typeahead-inline-example1",
|
21
|
-
inline: true,
|
22
|
-
options: synths,
|
23
|
-
label: "Synths",
|
24
|
-
placeholder: "Add synths",
|
25
|
-
pills: true
|
26
|
-
}) %>
|
27
|
-
|
28
|
-
<%= pb_rails("typeahead", props: {
|
29
|
-
id: "typeahead-inline-example2",
|
30
|
-
inline: true,
|
31
|
-
options: cities,
|
32
|
-
label: "Cities",
|
33
|
-
pills: true,
|
34
|
-
placeholder: "Add cities",
|
35
|
-
plus_icon: true
|
36
|
-
}) %>
|
@@ -1,43 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import { Typeahead } from '../../'
|
5
|
-
|
6
|
-
const synths = [
|
7
|
-
{ label: 'Oberheim', value: 'OBXa' },
|
8
|
-
{ label: 'Moog', value: 'Minimoog' },
|
9
|
-
{ label: 'Roland', value: 'Juno' },
|
10
|
-
{ label: 'Korg', value: 'MS-20' },
|
11
|
-
]
|
12
|
-
|
13
|
-
const cities = [
|
14
|
-
{ label: 'Budapest', value: 'Hungary' },
|
15
|
-
{ label: 'Singapore', value: 'Singapore' },
|
16
|
-
{ label: 'Oslo', value: 'Norway' },
|
17
|
-
{ label: 'Lagos', value: 'Nigeria' },
|
18
|
-
]
|
19
|
-
|
20
|
-
const TypeaheadInline = (props) => {
|
21
|
-
return (
|
22
|
-
<>
|
23
|
-
<Typeahead
|
24
|
-
inline
|
25
|
-
isMulti
|
26
|
-
label="Synths"
|
27
|
-
options={synths}
|
28
|
-
{...props}
|
29
|
-
/>
|
30
|
-
<Typeahead
|
31
|
-
inline
|
32
|
-
isMulti
|
33
|
-
label="Placeholder Plus Icon"
|
34
|
-
options={cities}
|
35
|
-
placeholder="Add cities"
|
36
|
-
plusIcon
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
</>
|
40
|
-
)
|
41
|
-
}
|
42
|
-
|
43
|
-
export default TypeaheadInline
|
@@ -1,35 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
labels = [
|
3
|
-
{ label: 'Verve', value: '1956' },
|
4
|
-
{ label: 'Stax', value: '1957' },
|
5
|
-
{ label: 'Motown', value: '1959' },
|
6
|
-
{ label: 'Kudu', value: '1971' },
|
7
|
-
{ label: 'Stones Throw', value: '1996' },
|
8
|
-
]
|
9
|
-
%>
|
10
|
-
<%
|
11
|
-
expressionists = [
|
12
|
-
{ label: 'Kandinsky', value: 'Russia' },
|
13
|
-
{ label: 'Klee', value: 'Switzerland' },
|
14
|
-
{ label: 'Kokoschka', value: 'Austria' },
|
15
|
-
{ label: 'Kirchner', value: 'Germany' },
|
16
|
-
]
|
17
|
-
%>
|
18
|
-
|
19
|
-
<%= pb_rails("typeahead", props: {
|
20
|
-
default_options: [labels.first],
|
21
|
-
id: "typeahead-multi-kit-example1",
|
22
|
-
options: labels,
|
23
|
-
label: "Badges",
|
24
|
-
multi_kit: "badge",
|
25
|
-
pills: true
|
26
|
-
}) %>
|
27
|
-
|
28
|
-
<%= pb_rails("typeahead", props: {
|
29
|
-
default_options: [expressionists.first],
|
30
|
-
id: "typeahead-multi-kit-example2",
|
31
|
-
options: expressionists,
|
32
|
-
label: "Small Pills",
|
33
|
-
multi_kit: "smallPill",
|
34
|
-
pills: true,
|
35
|
-
}) %>
|
@@ -1,44 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import { Typeahead } from '../../'
|
5
|
-
|
6
|
-
const labels = [
|
7
|
-
{ label: 'Verve', value: '1956' },
|
8
|
-
{ label: 'Stax', value: '1957' },
|
9
|
-
{ label: 'Motown', value: '1959' },
|
10
|
-
{ label: 'Kudu', value: '1971' },
|
11
|
-
{ label: 'Stones Throw', value: '1996' },
|
12
|
-
]
|
13
|
-
|
14
|
-
const expressionists = [
|
15
|
-
{ label: 'Kandinsky', value: 'Russia' },
|
16
|
-
{ label: 'Klee', value: 'Switzerland' },
|
17
|
-
{ label: 'Kokoschka', value: 'Austria' },
|
18
|
-
{ label: 'Kirchner', value: 'Germany' },
|
19
|
-
]
|
20
|
-
|
21
|
-
const TypeaheadMultiKit = (props) => {
|
22
|
-
return (
|
23
|
-
<>
|
24
|
-
<Typeahead
|
25
|
-
defaultValue={[labels[0]]}
|
26
|
-
isMulti
|
27
|
-
label="Badges"
|
28
|
-
multiKit="badge"
|
29
|
-
options={labels}
|
30
|
-
{...props}
|
31
|
-
/>
|
32
|
-
<Typeahead
|
33
|
-
defaultValue={[expressionists[0]]}
|
34
|
-
isMulti
|
35
|
-
label="Small Pills"
|
36
|
-
multiKit="smallPill"
|
37
|
-
options={expressionists}
|
38
|
-
{...props}
|
39
|
-
/>
|
40
|
-
</>
|
41
|
-
)
|
42
|
-
}
|
43
|
-
|
44
|
-
export default TypeaheadMultiKit
|