playbook_ui 8.2.1.pre.alpha2 → 8.3.0.alpha.select.pre.margin
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/data/menu.yml +2 -3
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +1 -26
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +1 -6
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +7 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +0 -3
- data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +23 -24
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +3 -6
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.jsx +3 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +63 -54
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx +2 -1
- data/app/pb_kits/playbook/pb_select/_select.jsx +10 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +35 -28
- data/app/pb_kits/playbook/pb_select/docs/_select_custom_select.jsx +4 -1
- data/app/pb_kits/playbook/pb_select/select.rb +5 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_input.jsx +145 -135
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +0 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +17 -18
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +0 -3
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +29 -19
- data/app/pb_kits/playbook/pb_textarea/_textarea_mixin.scss +9 -4
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_character_counter.jsx +5 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_custom.jsx +4 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +1 -9
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +17 -24
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +11 -21
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -8
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +4 -4
- data/app/pb_kits/playbook/tokens/_colors.scss +1 -1
- data/lib/playbook/version.rb +1 -2
- metadata +4 -4
- data/app/pb_kits/playbook/pb_typeahead/components/Input.jsx +0 -43
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import { components } from 'react-select'
|
5
5
|
|
6
|
-
import {
|
6
|
+
import { FormPill } from '../../'
|
7
7
|
|
8
8
|
type Props = {
|
9
9
|
data: object,
|
@@ -15,7 +15,6 @@ type Props = {
|
|
15
15
|
const MultiValue = (props: Props) => {
|
16
16
|
const { removeProps } = props
|
17
17
|
const { imageUrl, label } = props.data
|
18
|
-
const { badges } = props.selectProps
|
19
18
|
|
20
19
|
const formPillProps = {
|
21
20
|
marginRight: 'xs',
|
@@ -29,28 +28,19 @@ const MultiValue = (props: Props) => {
|
|
29
28
|
className="text_input_multivalue_container"
|
30
29
|
{...props}
|
31
30
|
>
|
32
|
-
<If condition={
|
33
|
-
<
|
31
|
+
<If condition={imageUrl}>
|
32
|
+
<FormPill
|
33
|
+
avatarUrl={imageUrl}
|
34
34
|
closeProps={removeProps}
|
35
|
-
|
36
|
-
|
37
|
-
variant="primary"
|
35
|
+
marginRight="xs"
|
36
|
+
name={label}
|
38
37
|
/>
|
39
38
|
<Else />
|
40
|
-
<
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
name={label}
|
46
|
-
/>
|
47
|
-
<Else />
|
48
|
-
<FormPill
|
49
|
-
closeProps={removeProps}
|
50
|
-
marginRight="xs"
|
51
|
-
text={label}
|
52
|
-
/>
|
53
|
-
</If>
|
39
|
+
<FormPill
|
40
|
+
closeProps={removeProps}
|
41
|
+
marginRight="xs"
|
42
|
+
text={label}
|
43
|
+
/>
|
54
44
|
</If>
|
55
45
|
</components.MultiValueContainer>
|
56
46
|
)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import { Typeahead } from '../..'
|
5
5
|
|
6
|
-
const
|
6
|
+
const options = [
|
7
7
|
{ label: 'Windows', value: '#FFA500' },
|
8
8
|
{ label: 'Siding', value: '#FF0000' },
|
9
9
|
{ label: 'Doors', value: '#00FF00' },
|
@@ -11,18 +11,13 @@ const initOptions = [
|
|
11
11
|
]
|
12
12
|
|
13
13
|
const TypeaheadWithPills = (props) => {
|
14
|
-
// const [values, setValues] = useState([])
|
15
14
|
return (
|
16
15
|
<>
|
17
16
|
<Typeahead
|
18
|
-
badges
|
19
|
-
createable
|
20
17
|
isMulti
|
21
18
|
label="Colors"
|
22
|
-
|
23
|
-
|
24
|
-
placeholder="Placeholder"
|
25
|
-
plusIcon
|
19
|
+
options={options}
|
20
|
+
placeholder=""
|
26
21
|
{...props}
|
27
22
|
/>
|
28
23
|
</>
|
@@ -90,6 +90,7 @@ const TypeaheadWithPillsAsyncUsers = (props) => {
|
|
90
90
|
isMulti
|
91
91
|
label="Github Users"
|
92
92
|
loadOptions={promiseOptions}
|
93
|
+
noOptionsMessage={() => 'Type to Search'}
|
93
94
|
onChange={handleOnChange}
|
94
95
|
onMultiValueClick={handleOnMultiValueClick}
|
95
96
|
placeholder="type the name of a Github user"
|
@@ -7,8 +7,8 @@ examples:
|
|
7
7
|
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
8
8
|
|
9
9
|
react:
|
10
|
-
|
10
|
+
- typeahead_default: Default
|
11
11
|
- typeahead_with_pills: With Pills
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
- typeahead_with_pills_async: With Pills (Async Data)
|
13
|
+
- typeahead_with_pills_async_users: With Pills (Async Data w/ Users)
|
14
|
+
- typeahead_with_pills_async_custom_options: With Pills (Async Data w/ Custom Options)
|
@@ -114,7 +114,7 @@ $shadow_colors: (
|
|
114
114
|
|
115
115
|
/* Text colors ------------------------*/
|
116
116
|
$text_lt_default: $charcoal;
|
117
|
-
$text_lt_light: #
|
117
|
+
$text_lt_light: #687887;
|
118
118
|
$text_lt_lighter: $slate;
|
119
119
|
$text_dk_default: $white;
|
120
120
|
$text_dk_light: rgba($white, $opacity_6);
|
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: 8.
|
4
|
+
version: 8.3.0.alpha.select.pre.margin
|
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-
|
12
|
+
date: 2021-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1961,7 +1961,6 @@ files:
|
|
1961
1961
|
- app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.jsx
|
1962
1962
|
- app/pb_kits/playbook/pb_typeahead/components/Control.jsx
|
1963
1963
|
- app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx
|
1964
|
-
- app/pb_kits/playbook/pb_typeahead/components/Input.jsx
|
1965
1964
|
- app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx
|
1966
1965
|
- app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx
|
1967
1966
|
- app/pb_kits/playbook/pb_typeahead/components/Option.jsx
|
@@ -2119,7 +2118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2119
2118
|
- !ruby/object:Gem::Version
|
2120
2119
|
version: 1.3.1
|
2121
2120
|
requirements: []
|
2122
|
-
|
2121
|
+
rubyforge_project:
|
2122
|
+
rubygems_version: 2.7.3
|
2123
2123
|
signing_key:
|
2124
2124
|
specification_version: 4
|
2125
2125
|
summary: Playbook Design System
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
|
-
import React, { useEffect, useRef } from 'react'
|
4
|
-
import { components } from 'react-select'
|
5
|
-
import { Flex, Icon } from '../../'
|
6
|
-
|
7
|
-
const Input = (props: any) => {
|
8
|
-
const { plusIcon } = props.selectProps
|
9
|
-
const inputWrapper = useRef(null)
|
10
|
-
|
11
|
-
if (plusIcon) {
|
12
|
-
useEffect(() => {
|
13
|
-
const plusIcon = inputWrapper.current.querySelector('.typeahead-plus-icon')
|
14
|
-
const values = props.selectProps.value
|
15
|
-
if (!values || values.length == 0){
|
16
|
-
const offset = inputWrapper.current.parentElement.querySelector('.placeholder').clientWidth
|
17
|
-
plusIcon.style.marginLeft = `${offset + 2}px`
|
18
|
-
} else {
|
19
|
-
plusIcon.style.marginLeft = '0px'
|
20
|
-
}
|
21
|
-
})
|
22
|
-
}
|
23
|
-
|
24
|
-
return (
|
25
|
-
<Flex
|
26
|
-
align="center"
|
27
|
-
ref={inputWrapper}
|
28
|
-
>
|
29
|
-
<If condition={plusIcon}>
|
30
|
-
<Icon
|
31
|
-
className="typeahead-plus-icon"
|
32
|
-
icon="plus"
|
33
|
-
/>
|
34
|
-
</If>
|
35
|
-
<components.Input
|
36
|
-
className="input"
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
</Flex>
|
40
|
-
)
|
41
|
-
}
|
42
|
-
|
43
|
-
export default Input
|