playbook_ui 8.2.1.pre.alpha4 → 8.2.1.pre.alpha5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 314e6230c5179ecceaeb56ca63191603784c7af71c836268e97e9ab7069b68b4
4
- data.tar.gz: 341436409bbcaab017560735de6746411f1e81a78f32931ad2cb3688b6d7bf27
3
+ metadata.gz: 4a51ba5ee8e976845e84ecf877719d0e520aaec19cbc8a38afdbeaf2cb29917f
4
+ data.tar.gz: 97896528a851b64bd127b17bc1019a01ee5792c9b72aef5d86b130fb605e2ffe
5
5
  SHA512:
6
- metadata.gz: 546260d3d96158a93ea855723b52a20675165b784bbe02937249bd91afd18ad342c745b2893173b8653d6902e50c70d4234854838ee26c50fdad67413d2dba80
7
- data.tar.gz: 83946aff7454d94f5eca74409560e844628cbec5eb6ceba521d2f61e14203a4131c02bfecd89a4e229c51f62a36f4ba5e29d96079329f153922b712a6b35817c
6
+ metadata.gz: 901809eb6df1c4d038fa5f660a96427325cdbd31e99327c1d650aad64c046b5d2de127d585ff8db43380fc52ce72104476a118f2eca3297071c9a68ee4bc26da
7
+ data.tar.gz: d5b1ea7c134a326c681ba7c8b4b63813fe18d7d9f7b6f1f57309f8aa7511d973ccef356d3ca205c040cd1e237133fc9c701f56a6b37146183be6d1cf3024875c
@@ -148,11 +148,15 @@
148
148
  box-sizing: border-box;
149
149
  }
150
150
  }
151
-
151
+ .placeholder+.input-wrapper .typeahead-plus-icon {
152
+ display: none;
153
+ }
154
+ .typeahead-kit-select__control--is-focused .typeahead-plus-icon {
155
+ display: none;
156
+ }
152
157
  .typeahead-plus-icon {
153
- color: $neutral;
158
+ color: $text_lt_lighter;
154
159
  }
155
-
156
160
  [class^=pb_badge_kit] span {
157
161
  line-height: 16.5px;
158
162
  letter-spacing: normal;
@@ -1,32 +1,16 @@
1
1
  /* @flow */
2
2
 
3
- import React, { useEffect, useRef } from 'react'
3
+ import React from 'react'
4
4
  import { components } from 'react-select'
5
5
  import { Flex, Icon } from '../../'
6
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 placeholder = inputWrapper.current.parentElement.querySelector('.placeholder')
15
- if (placeholder){
16
- const offset = placeholder.clientWidth
17
- plusIcon.style.marginLeft = `${offset + 2}px`
18
- } else {
19
- plusIcon.style.marginLeft = '0px'
20
- }
21
- })
22
- }
23
-
24
- return (
7
+ const Input = (props: any) => (
8
+ <>
25
9
  <Flex
26
10
  align="center"
27
- ref={inputWrapper}
11
+ className="input-wrapper"
28
12
  >
29
- <If condition={plusIcon}>
13
+ <If condition={props.selectProps.plusIcon}>
30
14
  <Icon
31
15
  className="typeahead-plus-icon"
32
16
  icon="plus"
@@ -37,7 +21,7 @@ const Input = (props: any) => {
37
21
  {...props}
38
22
  />
39
23
  </Flex>
40
- )
41
- }
24
+ </>
25
+ )
42
26
 
43
27
  export default Input
@@ -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
- <components.IndicatorsContainer
8
- className="placeholder"
9
- {...props}
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "8.2.1.pre.alpha4"
4
+ VERSION = "8.2.1.pre.alpha5"
5
5
  end
6
6
 
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.2.1.pre.alpha4
4
+ version: 8.2.1.pre.alpha5
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-03-31 00:00:00.000000000 Z
12
+ date: 2021-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack