playbook_ui 14.2.1.pre.alpha.PBNTR479removeextraspacingfromradiochildren3669 → 14.2.1.pre.alpha.PLAY1516railsiconsfixedwidth3674

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: 544fa71e47c1a842ee29ae5d8b008a74f614e9f47e72c8234994708474986f19
4
- data.tar.gz: fe0a673000274c03f0e6e2e7d18b20501df4e411bfe3b3af73b34bde1540a403
3
+ metadata.gz: 114d82ac3e7c4c176d6c710a74a6ae92987090ab031b9e05696651908a1f8e26
4
+ data.tar.gz: 25dc0de777b7417c091ac9745436dde7d4899f820a9418e189fd43e5c2ed65ee
5
5
  SHA512:
6
- metadata.gz: '018f79a3becb9f34370e4cba0bdf4919d8901126f1aceab3dfb18a6444e4c091920e863de71641ceda1e3d3ed57ccb1430d22f85954963970276506c1a85466b'
7
- data.tar.gz: 1f42c264341869cc5f0f55d95d067b778be08d8b2d398bde88200ffda102e4d7a03a8ffff22821853ff04268366d0ad4b3e186aee8a75b63e2f2f6472bbca1ac
6
+ metadata.gz: 4fa70a456e6ded5a476d354088ca5ff9e35c6d49e134bb47cc0bc5d8c1a113b74bab3fb899ce9740dec0867c9661b8ddddd2bc33683e8dd7d8e0e9ff2ba89ae8
7
+ data.tar.gz: 3a145fc39384ec170e99e469cc82bf55933ec0aa403a70afedc412d56e363cf73b2376b6bfec22c16d523f3ccc2c1b67fc180e31e1f8b57eab6d81794b1bc603
@@ -9,7 +9,7 @@ module Playbook
9
9
  prop :border, type: Playbook::Props::Boolean,
10
10
  default: false
11
11
  prop :fixed_width, type: Playbook::Props::Boolean,
12
- default: false
12
+ default: true
13
13
  prop :flip, type: Playbook::Props::Enum,
14
14
  values: ["horizontal", "vertical", "both", nil],
15
15
  default: nil
@@ -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: (controlProps: any) => (
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
- const { selectProps, marginBottom } = props
14
- const { dark, error, label } = selectProps
15
-
16
- return (
17
- <div className="pb_typeahead_wrapper">
18
- <TextInput
19
- dark={dark}
20
- error={error}
21
- label={label}
22
- marginBottom={marginBottom}
23
- >
24
- <Flex>
25
- <components.Control
26
- className="text_input"
27
- {...props}
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
- default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
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,