playbook_ui 14.3.2.pre.alpha.PBNTR515typeaheadmarginbottomredux3756 → 14.3.2

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: aeb87a10dfefb06e05a1a91eaaffb219fc6ae16b4bdcd97c91ea07ac8b9f335e
4
- data.tar.gz: 44c05d9b28e8e09f99e369cd66472bef9ce30745a80f92336f161735d29686b0
3
+ metadata.gz: a71ebec22a46e5a072dae9a4ecfbc2582b8778b65f5b3ff612ad60f0c0ede4a1
4
+ data.tar.gz: c21a5e48cd1d2436fc3d2bd3bb5845fa9b5f8095ec79ef865fbc550e9e55a1c0
5
5
  SHA512:
6
- metadata.gz: 0637b18bd6506e43c304ca3f9d3e731af9d4b635775ce12fe3f4c698a5f19ec85f9cccad27f38547afb8b8c33c81775505bf28386b3b578718b08af38d4ad690
7
- data.tar.gz: 667c5842263b629c58c7995ffa84348be8212ac8d538fc27cc06f62777ccb2b7f3688eaa72ec5902b2db44e303c0b06c6c8de192b1e7971538b529a3a30772fc
6
+ metadata.gz: 80e2f4a56c6ea0ed1decd054d326c129676e2183e5cf574cffd059e1009bf3e05b733f5b99c0753d449c2a3affc806db45b64684d5c109eb42ea8ff2330ad284
7
+ data.tar.gz: 0e22dea5792988151e1f06850a14373a710635169a092bdf4cacc9e05a23dfce61bd34c23334b42ab919c2085c9a32efe9af44a295acdbdf0301827ac85e3850
@@ -45,6 +45,7 @@
45
45
  }
46
46
  }
47
47
  .text_input_wrapper {
48
+ margin-bottom: 1rem;
48
49
  input::placeholder,
49
50
  .text_input .placeholder {
50
51
  @include pb_body_light_dark;
@@ -107,18 +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
- expect(kit).toHaveClass("pb_typeahead_kit mb_sm")
122
- const textInput = kit.querySelector(".pb_text_input_kit")
123
- expect(textInput).toHaveClass("mb_none")
124
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,7 +76,6 @@ 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 = {
@@ -136,7 +134,6 @@ const Typeahead = ({
136
134
  const htmlProps = buildHtmlProps(htmlOptions)
137
135
  const classes = classnames(
138
136
  'pb_typeahead_kit react-select',
139
- `mb_${marginBottom}`,
140
137
  globalProps(props),
141
138
  className
142
139
  )
@@ -11,15 +11,14 @@ type Props = {
11
11
  const TypeaheadControl = (props: Props) => (
12
12
  <div className="pb_typeahead_wrapper">
13
13
  <TextInput
14
- dark={props.selectProps.dark}
15
- error={props.selectProps.error}
16
- label={props.selectProps.label}
17
- marginBottom="none"
14
+ dark={props.selectProps.dark}
15
+ error={props.selectProps.error}
16
+ label={props.selectProps.label}
18
17
  >
19
18
  <Flex>
20
19
  <components.Control
21
- className="text_input"
22
- {...props}
20
+ className="text_input"
21
+ {...props}
23
22
  />
24
23
  </Flex>
25
24
  </TextInput>
@@ -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 %>
@@ -34,13 +34,9 @@ module Playbook
34
34
  prop :search_term_minimum_length, default: 3
35
35
  prop :search_debounce_timeout, default: 250
36
36
  prop :value
37
- prop :margin_bottom, type: Playbook::Props::Enum,
38
- values: %w[none xxs xs sm md lg xl],
39
- default: "sm"
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,