playbook_ui 9.12.0 → 9.13.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 +26 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +6 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +3 -0
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +12 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +19 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb +13 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx +25 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb +4 -5
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx +2 -6
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
- 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 +5 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +10 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +61 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb +6 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx +16 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb +4 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx +14 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +7 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +3 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +8 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb +5 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx +22 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +7 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +11 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +23 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +23 -11
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +17 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx +25 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb +36 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx +43 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb +35 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx +44 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +8 -5
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +18 -2
- data/lib/playbook/version.rb +1 -1
- metadata +16 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 454a36effc86e9d19eeb9e613a961a581d16ff491c2933cacffe0732669327f7
|
4
|
+
data.tar.gz: b3656b823c07b3f5b2653205d1a7a42165a86a9a429759b65ddc0e05a213850b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d9eed8e5c343aae96350758b62eed4ddcf68f92c9df97909b6743eb74b66e9afbb0625642968f19335066a27ee38593be6e191e97ff5277ca33a690f3f2c4cf
|
7
|
+
data.tar.gz: 7c45e5fa6c94dbb0e3c7cdc36de9e2d9655511122309f46e2b45294697fe84d7b8af213adbb88e2bc45713319a1c4988cd8996df894c73341dd0de696427a513
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
import { globalProps } from '../utilities/globalProps.js'
|
6
|
+
import { Icon } from '../'
|
6
7
|
|
7
8
|
import {
|
8
9
|
buildAriaProps,
|
@@ -13,8 +14,15 @@ import {
|
|
13
14
|
type BadgeProps = {
|
14
15
|
aria?: object,
|
15
16
|
className?: string,
|
17
|
+
closeProps?: {
|
18
|
+
onClick?: EventHandler,
|
19
|
+
onMouseDown?: EventHandler,
|
20
|
+
onTouchEnd?: EventHandler,
|
21
|
+
},
|
16
22
|
data?: object,
|
17
23
|
id?: string,
|
24
|
+
removeIcon?: Boolean,
|
25
|
+
removeOnClick?: EventHandler,
|
18
26
|
rounded?: boolean,
|
19
27
|
text?: string,
|
20
28
|
variant?: "error" | "info" | "neutral" | "primary" | "success" | "warning",
|
@@ -23,8 +31,11 @@ const Badge = (props: BadgeProps) => {
|
|
23
31
|
const {
|
24
32
|
aria = {},
|
25
33
|
className,
|
34
|
+
closeProps = {},
|
26
35
|
data = {},
|
27
36
|
id,
|
37
|
+
removeIcon = false,
|
38
|
+
removeOnClick = () => {},
|
28
39
|
rounded = false,
|
29
40
|
text,
|
30
41
|
variant = 'neutral',
|
@@ -44,7 +55,21 @@ const Badge = (props: BadgeProps) => {
|
|
44
55
|
className={css}
|
45
56
|
id={id}
|
46
57
|
>
|
47
|
-
<span>
|
58
|
+
<span>
|
59
|
+
{text}
|
60
|
+
<If condition={removeIcon}>
|
61
|
+
<span
|
62
|
+
onClick={removeOnClick}
|
63
|
+
style={{ cursor: 'pointer' }}
|
64
|
+
{...closeProps}
|
65
|
+
>
|
66
|
+
<Icon
|
67
|
+
fixedWidth
|
68
|
+
icon="times"
|
69
|
+
/>
|
70
|
+
</span>
|
71
|
+
</If>
|
72
|
+
</span>
|
48
73
|
</div>
|
49
74
|
)
|
50
75
|
}
|
@@ -25,6 +25,8 @@ type DatePickerProps = {
|
|
25
25
|
id?: String,
|
26
26
|
inputAria?: object,
|
27
27
|
inputData?: object,
|
28
|
+
inputOnChange?: (String) => void,
|
29
|
+
inputValue?: any,
|
28
30
|
label?: String,
|
29
31
|
maxDate: String,
|
30
32
|
minDate: String,
|
@@ -55,6 +57,8 @@ const DatePicker = (props: DatePickerProps) => {
|
|
55
57
|
id,
|
56
58
|
inputAria,
|
57
59
|
inputData,
|
60
|
+
inputOnChange,
|
61
|
+
inputValue,
|
58
62
|
label = 'Date Picker',
|
59
63
|
maxDate,
|
60
64
|
minDate,
|
@@ -114,7 +118,6 @@ const DatePicker = (props: DatePickerProps) => {
|
|
114
118
|
className={classes}
|
115
119
|
id={id}
|
116
120
|
>
|
117
|
-
{className}
|
118
121
|
<div className="input_wrapper">
|
119
122
|
<TextInput
|
120
123
|
aria={inputAria}
|
@@ -126,7 +129,9 @@ const DatePicker = (props: DatePickerProps) => {
|
|
126
129
|
id={pickerId}
|
127
130
|
label={hideLabel ? null : label}
|
128
131
|
name={name}
|
132
|
+
onChange={inputOnChange}
|
129
133
|
placeholder={placeholder}
|
134
|
+
value={inputValue}
|
130
135
|
/>
|
131
136
|
<If condition={!hideIcon}>
|
132
137
|
<div
|
@@ -166,6 +166,9 @@ const datePickerHelper = (config) => {
|
|
166
166
|
picker.input.style.caretColor = 'transparent'
|
167
167
|
picker.input.style.cursor = 'pointer'
|
168
168
|
}
|
169
|
+
|
170
|
+
// Fix event bubbling bug on wrapper
|
171
|
+
document.querySelector(`#${pickerId}`).parentElement.addEventListener('click', (e) => e.stopPropagation())
|
169
172
|
}
|
170
173
|
|
171
174
|
export default datePickerHelper
|
@@ -14,6 +14,7 @@ type FormPillProps = {
|
|
14
14
|
onClick?: EventHandler,
|
15
15
|
avatar?: boolean,
|
16
16
|
avatarUrl?: string,
|
17
|
+
size?: string,
|
17
18
|
closeProps?: {
|
18
19
|
onClick?: EventHandler,
|
19
20
|
onMouseDown?: EventHandler,
|
@@ -21,11 +22,20 @@ type FormPillProps = {
|
|
21
22
|
},
|
22
23
|
}
|
23
24
|
const FormPill = (props: FormPillProps) => {
|
24
|
-
const {
|
25
|
+
const {
|
26
|
+
className,
|
27
|
+
text,
|
28
|
+
name,
|
29
|
+
onClick = () => {},
|
30
|
+
avatarUrl,
|
31
|
+
closeProps = {},
|
32
|
+
size = '',
|
33
|
+
} = props
|
25
34
|
const css = classnames(
|
26
35
|
`pb_form_pill_kit_${'primary'}`,
|
27
36
|
globalProps(props),
|
28
|
-
className
|
37
|
+
className,
|
38
|
+
size === 'small' ? 'small' : null,
|
29
39
|
)
|
30
40
|
return (
|
31
41
|
<div className={css}>
|
@@ -51,4 +51,23 @@ $form_pill_colors: (
|
|
51
51
|
}
|
52
52
|
}
|
53
53
|
}
|
54
|
+
&.small {
|
55
|
+
height: fit-content;
|
56
|
+
height: -moz-fit-content;
|
57
|
+
.pb_form_pill_text, .pb_form_pill_close, .pb_form_pill_tag {
|
58
|
+
font-size: 16px;
|
59
|
+
font-weight: 400;
|
60
|
+
}
|
61
|
+
.pb_form_pill_text, .pb_form_pill_tag {
|
62
|
+
line-height: 1.7;
|
63
|
+
padding-left: $space_xs;
|
64
|
+
padding-right: 2px;
|
65
|
+
}
|
66
|
+
[class^=pb_avatar_kit], [class^=pb_avatar_kit] .avatar_wrapper {
|
67
|
+
width: 20px;
|
68
|
+
height: 20px;
|
69
|
+
flex-basis: 20px;
|
70
|
+
&::before { line-height: 21px; }
|
71
|
+
}
|
72
|
+
}
|
54
73
|
}
|
@@ -0,0 +1,13 @@
|
|
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
|
+
}) %>
|
@@ -0,0 +1,25 @@
|
|
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,12 +1,11 @@
|
|
1
1
|
<%= pb_rails("form_pill", props: {
|
2
2
|
name: "Anna Black",
|
3
3
|
avatar_url: "https://randomuser.me/api/portraits/women/44.jpg",
|
4
|
+
}) %>
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
<br>
|
8
|
-
<br>
|
6
|
+
<br />
|
7
|
+
<br />
|
9
8
|
|
10
9
|
<%= pb_rails("form_pill", props: {
|
11
10
|
name: "Anna Black",
|
12
|
-
|
11
|
+
}) %>
|
@@ -8,18 +8,14 @@ const FormPillDefault = (props) => {
|
|
8
8
|
<FormPill
|
9
9
|
avatarUrl="https://randomuser.me/api/portraits/women/44.jpg"
|
10
10
|
name="Anna Black"
|
11
|
-
onClick={() =>
|
12
|
-
alert('Click!')
|
13
|
-
}}
|
11
|
+
onClick={() => alert('Click!')}
|
14
12
|
{...props}
|
15
13
|
/>
|
16
14
|
<br />
|
17
15
|
<br />
|
18
16
|
<FormPill
|
19
17
|
name="Anna Black"
|
20
|
-
onClick={() =>
|
21
|
-
alert('Click!')
|
22
|
-
}}
|
18
|
+
onClick={() => alert('Click!')}
|
23
19
|
{...props}
|
24
20
|
/>
|
25
21
|
</div>
|
@@ -6,6 +6,7 @@ module Playbook
|
|
6
6
|
prop :avatar_url
|
7
7
|
prop :name
|
8
8
|
prop :text
|
9
|
+
prop :size
|
9
10
|
|
10
11
|
def classname
|
11
12
|
generate_classname("pb_form_pill_kit", "primary", name, text)
|
@@ -14,6 +15,10 @@ module Playbook
|
|
14
15
|
def display_text
|
15
16
|
name.downcase
|
16
17
|
end
|
18
|
+
|
19
|
+
def size_class
|
20
|
+
size == "small" ? " small" : ""
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
19
24
|
end
|
@@ -9,10 +9,12 @@ import { buildAriaProps, buildDataProps } from '../utilities/props'
|
|
9
9
|
|
10
10
|
type RichTextEditorProps = {
|
11
11
|
aria?: object,
|
12
|
+
toolbarBottom?: Boolean,
|
12
13
|
className?: string,
|
13
14
|
data?: object,
|
14
15
|
focus?: boolean,
|
15
16
|
id?: string,
|
17
|
+
inline?: boolean,
|
16
18
|
name?: string,
|
17
19
|
onChange: (string) => void,
|
18
20
|
placeholder?: string,
|
@@ -25,10 +27,12 @@ type RichTextEditorProps = {
|
|
25
27
|
const RichTextEditor = (props: RichTextEditorProps) => {
|
26
28
|
const {
|
27
29
|
aria = {},
|
30
|
+
toolbarBottom = false,
|
28
31
|
className,
|
29
32
|
data = {},
|
30
33
|
focus = false,
|
31
34
|
id,
|
35
|
+
inline = false,
|
32
36
|
name,
|
33
37
|
onChange,
|
34
38
|
placeholder,
|
@@ -77,6 +81,8 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
77
81
|
blockCodeButton.hidden = type == 'inline'
|
78
82
|
inlineCodeButton.hidden = type == 'block'
|
79
83
|
})
|
84
|
+
|
85
|
+
if (toolbarBottom) editor.element.after(toolbarElement)
|
80
86
|
})
|
81
87
|
|
82
88
|
trixRef.current.addEventListener('trix-change', (event) => {
|
@@ -103,6 +109,8 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
103
109
|
const SimpleClass = simple ? 'simple' : ''
|
104
110
|
const FocusClass = focus ? 'focus-editor-targets' : ''
|
105
111
|
const StickyClass = sticky ? 'sticky' : ''
|
112
|
+
const InlineClass = inline ? 'inline' : ''
|
113
|
+
const ToolbarBottomClass = toolbarBottom ? 'toolbar-bottom' : ''
|
106
114
|
const css = classnames(globalProps(props), className)
|
107
115
|
|
108
116
|
return (
|
@@ -114,6 +122,8 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
114
122
|
SimpleClass,
|
115
123
|
FocusClass,
|
116
124
|
StickyClass,
|
125
|
+
InlineClass,
|
126
|
+
ToolbarBottomClass,
|
117
127
|
css
|
118
128
|
)}
|
119
129
|
>
|
@@ -5,6 +5,7 @@
|
|
5
5
|
@import "../tokens/typography";
|
6
6
|
@import "../tokens/opacity";
|
7
7
|
@import "../tokens/spacing";
|
8
|
+
@import "../tokens/transition";
|
8
9
|
@import "../pb_icon/icon";
|
9
10
|
@import "./trix_styles";
|
10
11
|
|
@@ -228,4 +229,64 @@
|
|
228
229
|
color: $white;
|
229
230
|
}
|
230
231
|
}
|
232
|
+
&.toolbar-bottom {
|
233
|
+
trix-editor {
|
234
|
+
border-top-left-radius: 6px;
|
235
|
+
border-top-right-radius: 6px;
|
236
|
+
border-bottom: none;
|
237
|
+
border-bottom-left-radius: 0;
|
238
|
+
border-bottom-right-radius: 0;
|
239
|
+
&:empty:not(:focus)::before {
|
240
|
+
color: $neutral !important;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
trix-toolbar .trix-button-row {
|
244
|
+
border-top: none;
|
245
|
+
border-top-left-radius: 0;
|
246
|
+
border-top-right-radius: 0;
|
247
|
+
border-bottom: 1px solid $border_light;
|
248
|
+
border-bottom-left-radius: 6px;
|
249
|
+
border-bottom-right-radius: 6px;
|
250
|
+
}
|
251
|
+
trix-toolbar {
|
252
|
+
display: grid;
|
253
|
+
}
|
254
|
+
&:focus, &:focus-within {
|
255
|
+
trix-toolbar .trix-button-row {
|
256
|
+
@include transition_default;
|
257
|
+
border-color: $primary;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
&.inline {
|
262
|
+
&:hover {
|
263
|
+
trix-editor {
|
264
|
+
@include transition_default;
|
265
|
+
border-color: $border_light;
|
266
|
+
background-color: $white;
|
267
|
+
&+ trix-toolbar .trix-button-row {
|
268
|
+
transition: all 0.3s ease-in-out 0s;
|
269
|
+
opacity: 100;
|
270
|
+
}
|
271
|
+
}
|
272
|
+
}
|
273
|
+
trix-editor {
|
274
|
+
@include transition_default;
|
275
|
+
border-color: transparent;
|
276
|
+
background-color: transparent;
|
277
|
+
&+ trix-toolbar .trix-button-row {
|
278
|
+
transition: all 0.3s ease-in-out 0s;
|
279
|
+
opacity: 0;
|
280
|
+
}
|
281
|
+
&:focus {
|
282
|
+
@include transition_default;
|
283
|
+
border-color: $primary;
|
284
|
+
background-color: $focus_input_light;
|
285
|
+
&+ trix-toolbar .trix-button-row {
|
286
|
+
transition: all 0.3s ease-in-out 0s;
|
287
|
+
opacity: 100;
|
288
|
+
}
|
289
|
+
}
|
290
|
+
}
|
291
|
+
}
|
231
292
|
}
|
@@ -0,0 +1,16 @@
|
|
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
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -7,6 +7,8 @@ examples:
|
|
7
7
|
- rich_text_editor_focus: Focus
|
8
8
|
- rich_text_editor_sticky: Sticky
|
9
9
|
- rich_text_editor_templates: Templates
|
10
|
+
- rich_text_editor_toolbar_bottom: Toolbar Bottom
|
11
|
+
- rich_text_editor_inline: Inline
|
10
12
|
- rich_text_editor_preview: Preview
|
11
13
|
|
12
14
|
react:
|
@@ -16,4 +18,6 @@ examples:
|
|
16
18
|
- rich_text_editor_focus: Focus
|
17
19
|
- rich_text_editor_sticky: Sticky
|
18
20
|
- rich_text_editor_templates: Templates
|
21
|
+
- rich_text_editor_toolbar_bottom: Toolbar Bottom
|
22
|
+
- rich_text_editor_inline: Inline
|
19
23
|
- rich_text_editor_preview: Preview
|
@@ -4,4 +4,6 @@ export { default as RichTextEditorAttributes } from './_rich_text_editor_attribu
|
|
4
4
|
export { default as RichTextEditorFocus } from './_rich_text_editor_focus.jsx'
|
5
5
|
export { default as RichTextEditorSticky } from './_rich_text_editor_sticky.jsx'
|
6
6
|
export { default as RichTextEditorTemplates } from './_rich_text_editor_templates.jsx'
|
7
|
+
export { default as RichTextEditorToolbarBottom } from './_rich_text_editor_toolbar_bottom.jsx'
|
8
|
+
export { default as RichTextEditorInline } from './_rich_text_editor_inline.jsx'
|
7
9
|
export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
|
@@ -6,11 +6,16 @@ module Playbook
|
|
6
6
|
prop :focus, type: Playbook::Props::Boolean,
|
7
7
|
default: false
|
8
8
|
|
9
|
+
prop :inline, type: Playbook::Props::Boolean,
|
10
|
+
default: false
|
11
|
+
|
9
12
|
prop :simple, type: Playbook::Props::Boolean,
|
10
13
|
default: false
|
11
14
|
|
12
15
|
prop :sticky, type: Playbook::Props::Boolean,
|
13
16
|
default: false
|
17
|
+
prop :toolbar_bottom, type: Playbook::Props::Boolean,
|
18
|
+
default: false
|
14
19
|
|
15
20
|
prop :value
|
16
21
|
prop :template
|
@@ -35,10 +40,12 @@ module Playbook
|
|
35
40
|
def rich_text_options
|
36
41
|
{
|
37
42
|
id: id,
|
43
|
+
inline: inline,
|
38
44
|
className: classname,
|
39
45
|
focus: focus,
|
40
46
|
simple: simple,
|
41
47
|
sticky: sticky,
|
48
|
+
toolbarBottom: toolbar_bottom,
|
42
49
|
value: value,
|
43
50
|
template: template,
|
44
51
|
placeholder: placeholder,
|
@@ -14,6 +14,7 @@ type TextInputProps = {
|
|
14
14
|
disabled?: boolean,
|
15
15
|
error?: string,
|
16
16
|
id?: string,
|
17
|
+
inline?: boolean,
|
17
18
|
name: string,
|
18
19
|
label: string,
|
19
20
|
onChange: (String) => void,
|
@@ -38,6 +39,7 @@ const TextInput = (props: TextInputProps, ref: React.ElementRef<"input">) => {
|
|
38
39
|
disabled,
|
39
40
|
error,
|
40
41
|
id,
|
42
|
+
inline = false,
|
41
43
|
name,
|
42
44
|
label,
|
43
45
|
onChange = () => {},
|
@@ -63,6 +65,7 @@ const TextInput = (props: TextInputProps, ref: React.ElementRef<"input">) => {
|
|
63
65
|
const addOnDarkModeCardCss = (shouldShowAddOn && dark) ? 'add-on-card-dark' : null
|
64
66
|
const css = classnames([
|
65
67
|
'pb_text_input_kit',
|
68
|
+
inline ? 'inline' : null,
|
66
69
|
error ? 'error' : null,
|
67
70
|
globalProps(props),
|
68
71
|
className,
|
@@ -0,0 +1,22 @@
|
|
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
|
@@ -5,9 +5,11 @@ examples:
|
|
5
5
|
- text_input_custom: Custom
|
6
6
|
- text_input_disabled: Disabled
|
7
7
|
- text_input_add_on: Add On
|
8
|
+
- text_input_inline: Inline
|
8
9
|
react:
|
9
10
|
- text_input_default: Default
|
10
11
|
- text_input_error: With Error
|
11
12
|
- text_input_custom: Custom
|
12
13
|
- text_input_disabled: Disabled
|
13
14
|
- text_input_add_on: Add On
|
15
|
+
- text_input_inline: Inline
|
@@ -3,3 +3,4 @@ export { default as TextInputCustom } from './_text_input_custom.jsx'
|
|
3
3
|
export { default as TextInputError } from './_text_input_error.jsx'
|
4
4
|
export { default as TextInputDisabled } from './_text_input_disabled.jsx'
|
5
5
|
export { default as TextInputAddOn } from './_text_input_add_on.jsx'
|
6
|
+
export { default as TextInputInline } from './_text_input_inline.jsx'
|
@@ -8,6 +8,8 @@ module Playbook
|
|
8
8
|
prop :disabled, type: Playbook::Props::Boolean,
|
9
9
|
default: false
|
10
10
|
prop :error
|
11
|
+
prop :inline, type: Playbook::Props::Boolean,
|
12
|
+
default: false
|
11
13
|
prop :label
|
12
14
|
prop :name
|
13
15
|
prop :placeholder
|
@@ -21,7 +23,7 @@ module Playbook
|
|
21
23
|
nested_kit: Playbook::PbTextInput::AddOn
|
22
24
|
|
23
25
|
def classname
|
24
|
-
generate_classname("pb_text_input_kit") + error_class
|
26
|
+
generate_classname("pb_text_input_kit") + error_class + inline_class
|
25
27
|
end
|
26
28
|
|
27
29
|
def input_tag
|
@@ -75,6 +77,10 @@ module Playbook
|
|
75
77
|
def error_class
|
76
78
|
error ? " error" : ""
|
77
79
|
end
|
80
|
+
|
81
|
+
def inline_class
|
82
|
+
inline ? " inline" : ""
|
83
|
+
end
|
78
84
|
end
|
79
85
|
end
|
80
86
|
end
|
@@ -3,8 +3,10 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import Select from 'react-select'
|
5
5
|
import AsyncSelect from 'react-select/async'
|
6
|
+
import CreateableSelect from 'react-select/creatable'
|
6
7
|
import { get } from 'lodash'
|
7
8
|
import { globalProps } from '../utilities/globalProps.js'
|
9
|
+
import classnames from 'classnames'
|
8
10
|
|
9
11
|
import Control from './components/Control'
|
10
12
|
import ClearIndicator from './components/ClearIndicator'
|
@@ -26,6 +28,7 @@ import { noop } from '../utilities/props'
|
|
26
28
|
|
27
29
|
type Props = {
|
28
30
|
async?: boolean,
|
31
|
+
createable?: boolean,
|
29
32
|
dark?: boolean,
|
30
33
|
label?: string,
|
31
34
|
loadOptions?: noop | string,
|
@@ -55,9 +58,13 @@ const Typeahead = (props: Props) => {
|
|
55
58
|
},
|
56
59
|
defaultOptions: true,
|
57
60
|
id: 'react-select-input',
|
61
|
+
inline: false,
|
58
62
|
isClearable: true,
|
59
63
|
isSearchable: true,
|
60
64
|
name,
|
65
|
+
multiKit: '',
|
66
|
+
onCreateOption: null,
|
67
|
+
plusIcon: false,
|
61
68
|
...props,
|
62
69
|
}
|
63
70
|
|
@@ -65,7 +72,8 @@ const Typeahead = (props: Props) => {
|
|
65
72
|
if (typeof(props.getOptionLabel) === 'string') selectProps.getOptionLabel = get(window, props.getOptionLabel)
|
66
73
|
if (typeof(props.getOptionValue) === 'string') selectProps.getOptionValue = get(window, props.getOptionValue)
|
67
74
|
|
68
|
-
|
75
|
+
let Tag = props.async ? AsyncSelect : Select
|
76
|
+
if (props.createable) Tag = CreateableSelect
|
69
77
|
|
70
78
|
const handleOnChange = (data, { action, option, removedValue }) => {
|
71
79
|
if (action === 'select-option') {
|
@@ -84,9 +92,10 @@ const Typeahead = (props: Props) => {
|
|
84
92
|
}
|
85
93
|
|
86
94
|
const classes = `pb_typeahead_kit react-select ${globalProps(props)}`
|
95
|
+
const inlineClass = selectProps.inline ? 'inline' : null
|
87
96
|
|
88
97
|
return (
|
89
|
-
<div className={classes}>
|
98
|
+
<div className={classnames(classes, inlineClass)}>
|
90
99
|
<Tag
|
91
100
|
classNamePrefix="typeahead-kit-select"
|
92
101
|
onChange={handleOnChange}
|
@@ -154,4 +154,27 @@
|
|
154
154
|
box-sizing: border-box;
|
155
155
|
}
|
156
156
|
}
|
157
|
+
.placeholder+.input-wrapper .typeahead-plus-icon {
|
158
|
+
display: none;
|
159
|
+
}
|
160
|
+
.typeahead-kit-select__control--is-focused .typeahead-plus-icon {
|
161
|
+
display: none;
|
162
|
+
}
|
163
|
+
.typeahead-plus-icon {
|
164
|
+
color: $text_lt_lighter;
|
165
|
+
}
|
166
|
+
[class^=pb_badge_kit] span {
|
167
|
+
line-height: 16.5px;
|
168
|
+
letter-spacing: normal;
|
169
|
+
}
|
170
|
+
&.inline {
|
171
|
+
&:not(:hover) {
|
172
|
+
.text_input {
|
173
|
+
border-color: transparent;
|
174
|
+
}
|
175
|
+
.text_input_indicators .css-tlfecz-indicatorContainer {
|
176
|
+
color: transparent;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
157
180
|
}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import { components } from 'react-select'
|
5
5
|
|
6
|
-
import { FormPill } from '../../'
|
6
|
+
import { Badge, FormPill } from '../../'
|
7
7
|
|
8
8
|
type Props = {
|
9
9
|
data: object,
|
@@ -15,6 +15,7 @@ type Props = {
|
|
15
15
|
const MultiValue = (props: Props) => {
|
16
16
|
const { removeProps } = props
|
17
17
|
const { imageUrl, label } = props.data
|
18
|
+
const { multiKit } = props.selectProps
|
18
19
|
|
19
20
|
const formPillProps = {
|
20
21
|
marginRight: 'xs',
|
@@ -28,19 +29,30 @@ const MultiValue = (props: Props) => {
|
|
28
29
|
className="text_input_multivalue_container"
|
29
30
|
{...props}
|
30
31
|
>
|
31
|
-
<If condition={
|
32
|
-
<
|
33
|
-
avatarUrl={imageUrl}
|
32
|
+
<If condition={multiKit === 'badge'}>
|
33
|
+
<Badge
|
34
34
|
closeProps={removeProps}
|
35
|
-
|
36
|
-
name={label}
|
37
|
-
/>
|
38
|
-
<Else />
|
39
|
-
<FormPill
|
40
|
-
closeProps={removeProps}
|
41
|
-
marginRight="xs"
|
35
|
+
removeIcon
|
42
36
|
text={label}
|
37
|
+
variant="primary"
|
43
38
|
/>
|
39
|
+
<Else />
|
40
|
+
<If condition={imageUrl}>
|
41
|
+
<FormPill
|
42
|
+
avatarUrl={imageUrl}
|
43
|
+
closeProps={removeProps}
|
44
|
+
marginRight="xs"
|
45
|
+
name={label}
|
46
|
+
size={multiKit === 'smallPill' ? 'small' : ''}
|
47
|
+
/>
|
48
|
+
<Else />
|
49
|
+
<FormPill
|
50
|
+
closeProps={removeProps}
|
51
|
+
marginRight="xs"
|
52
|
+
size={multiKit === 'smallPill' ? 'small' : ''}
|
53
|
+
text={label}
|
54
|
+
/>
|
55
|
+
</If>
|
44
56
|
</If>
|
45
57
|
</components.MultiValueContainer>
|
46
58
|
)
|
@@ -1,13 +1,26 @@
|
|
1
1
|
/* @flow */
|
2
2
|
|
3
3
|
import React from 'react'
|
4
|
+
import { Flex, Icon } from '../../'
|
4
5
|
import { components } from 'react-select'
|
5
6
|
|
6
7
|
const Placeholder = (props: any) => (
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<>
|
9
|
+
<Flex
|
10
|
+
align="center"
|
11
|
+
className="placeholder"
|
12
|
+
>
|
13
|
+
<components.IndicatorsContainer
|
14
|
+
{...props}
|
15
|
+
/>
|
16
|
+
<If condition={props.selectProps.plusIcon}>
|
17
|
+
<Icon
|
18
|
+
className="typeahead-plus-icon"
|
19
|
+
icon="plus"
|
20
|
+
/>
|
21
|
+
</If>
|
22
|
+
</Flex>
|
23
|
+
</>
|
11
24
|
)
|
12
25
|
|
13
26
|
export default Placeholder
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// @flow
|
2
|
+
|
3
|
+
import React from 'react'
|
4
|
+
import { Typeahead } from '../..'
|
5
|
+
|
6
|
+
const options = [
|
7
|
+
{ label: 'Jardim', value: 'Portuguese' },
|
8
|
+
{ label: 'Garten', value: 'German' },
|
9
|
+
{ label: 'Giardino', value: 'Italian' },
|
10
|
+
{ label: 'Jardín', value: 'Spanish' },
|
11
|
+
]
|
12
|
+
|
13
|
+
const TypeaheadCreateable = (props) => {
|
14
|
+
return (
|
15
|
+
<Typeahead
|
16
|
+
createable
|
17
|
+
isMulti
|
18
|
+
label="User Created Options"
|
19
|
+
options={options}
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
)
|
23
|
+
}
|
24
|
+
|
25
|
+
export default TypeaheadCreateable
|
@@ -0,0 +1,36 @@
|
|
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
|
+
}) %>
|
@@ -0,0 +1,43 @@
|
|
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
|
@@ -0,0 +1,35 @@
|
|
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
|
+
}) %>
|
@@ -0,0 +1,44 @@
|
|
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
|
@@ -5,6 +5,8 @@ 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
|
8
10
|
|
9
11
|
react:
|
10
12
|
- typeahead_default: Default
|
@@ -12,3 +14,6 @@ examples:
|
|
12
14
|
- typeahead_with_pills_async: With Pills (Async Data)
|
13
15
|
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
14
16
|
- typeahead_with_pills_async_custom_options: With Pills (Async Data w/ Custom Options)
|
17
|
+
- typeahead_inline: Inline
|
18
|
+
- typeahead_multi_kit: Multi Kit Options
|
19
|
+
- typeahead_createable: Createable
|
@@ -1,5 +1,8 @@
|
|
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'
|
1
|
+
export { default as TypeaheadDefault } from './_typeahead_default.jsx'
|
2
|
+
export { default as TypeaheadWithPills } from './_typeahead_with_pills.jsx'
|
3
|
+
export { default as TypeaheadWithPillsAsync } from './_typeahead_with_pills_async.jsx'
|
4
|
+
export { default as TypeaheadWithPillsAsyncUsers } from './_typeahead_with_pills_async_users.jsx'
|
5
|
+
export { default as TypeaheadWithPillsAsyncCustomOptions } from './_typeahead_with_pills_async_custom_options.jsx'
|
6
|
+
export { default as TypeaheadInline } from './_typeahead_inline.jsx'
|
7
|
+
export { default as TypeaheadMultiKit } from './_typeahead_multi_kit.jsx'
|
8
|
+
export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= content_tag(:div,
|
5
5
|
id: object.id,
|
6
6
|
data: object.data,
|
7
|
-
class: object.classname) do %>
|
7
|
+
class: object.classname + object.inline_class) 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,12 +8,21 @@ 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
|
11
13
|
prop :label
|
12
14
|
prop :load_options
|
15
|
+
prop :multi_kit, type: Playbook::Props::String,
|
16
|
+
default: ""
|
13
17
|
prop :name
|
14
|
-
prop :options, type: Playbook::Props::HashArray,
|
15
|
-
|
18
|
+
prop :options, type: Playbook::Props::HashArray,
|
19
|
+
default: []
|
20
|
+
prop :pills, type: Playbook::Props::Boolean,
|
21
|
+
default: false
|
22
|
+
|
16
23
|
prop :placeholder
|
24
|
+
prop :plus_icon, type: Playbook::Props::Boolean,
|
25
|
+
default: false
|
17
26
|
prop :search_term_minimum_length, default: 3
|
18
27
|
prop :search_debounce_timeout, default: 250
|
19
28
|
prop :value
|
@@ -22,6 +31,10 @@ module Playbook
|
|
22
31
|
generate_classname("pb_typeahead_kit")
|
23
32
|
end
|
24
33
|
|
34
|
+
def inline_class
|
35
|
+
inline ? " inline" : ""
|
36
|
+
end
|
37
|
+
|
25
38
|
def data
|
26
39
|
Hash(values[:data]).merge(
|
27
40
|
pb_typeahead_kit: true,
|
@@ -35,11 +48,14 @@ module Playbook
|
|
35
48
|
dark: dark,
|
36
49
|
defaultValue: default_options,
|
37
50
|
id: id,
|
51
|
+
inline: inline,
|
38
52
|
isMulti: true,
|
39
53
|
label: label,
|
54
|
+
multiKit: multi_kit,
|
40
55
|
name: name,
|
41
56
|
options: options,
|
42
57
|
placeholder: placeholder,
|
58
|
+
plusIcon: plus_icon,
|
43
59
|
}
|
44
60
|
|
45
61
|
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.13.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-05-
|
12
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1037,6 +1037,8 @@ files:
|
|
1037
1037
|
- app/pb_kits/playbook/pb_form_group/form_group.rb
|
1038
1038
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.jsx
|
1039
1039
|
- app/pb_kits/playbook/pb_form_pill/_form_pill.scss
|
1040
|
+
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.html.erb
|
1041
|
+
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_size.jsx
|
1040
1042
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.html.erb
|
1041
1043
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx
|
1042
1044
|
- app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.html.erb
|
@@ -1556,6 +1558,8 @@ files:
|
|
1556
1558
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx
|
1557
1559
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.html.erb
|
1558
1560
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx
|
1561
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.html.erb
|
1562
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx
|
1559
1563
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb
|
1560
1564
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx
|
1561
1565
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb
|
@@ -1564,6 +1568,8 @@ files:
|
|
1564
1568
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx
|
1565
1569
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.html.erb
|
1566
1570
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx
|
1571
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.html.erb
|
1572
|
+
- app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx
|
1567
1573
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml
|
1568
1574
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/index.js
|
1569
1575
|
- app/pb_kits/playbook/pb_rich_text_editor/docs/templates.js
|
@@ -1823,6 +1829,8 @@ files:
|
|
1823
1829
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb
|
1824
1830
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx
|
1825
1831
|
- app/pb_kits/playbook/pb_text_input/docs/_text_input_error.md
|
1832
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb
|
1833
|
+
- app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx
|
1826
1834
|
- app/pb_kits/playbook/pb_text_input/docs/example.yml
|
1827
1835
|
- app/pb_kits/playbook/pb_text_input/docs/index.js
|
1828
1836
|
- app/pb_kits/playbook/pb_text_input/text_input.html.erb
|
@@ -1998,8 +2006,13 @@ files:
|
|
1998
2006
|
- app/pb_kits/playbook/pb_typeahead/components/ValueContainer.jsx
|
1999
2007
|
- app/pb_kits/playbook/pb_typeahead/docs/_description.md
|
2000
2008
|
- app/pb_kits/playbook/pb_typeahead/docs/_footer.md
|
2009
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx
|
2001
2010
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
|
2002
2011
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
|
2012
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.html.erb
|
2013
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx
|
2014
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
|
2015
|
+
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
|
2003
2016
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context.html.erb
|
2004
2017
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
|
2005
2018
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx
|
@@ -2159,8 +2172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2159
2172
|
- !ruby/object:Gem::Version
|
2160
2173
|
version: '0'
|
2161
2174
|
requirements: []
|
2162
|
-
|
2163
|
-
rubygems_version: 2.7.3
|
2175
|
+
rubygems_version: 3.1.4
|
2164
2176
|
signing_key:
|
2165
2177
|
specification_version: 4
|
2166
2178
|
summary: Playbook Design System
|