playbook_ui 14.4.0.pre.alpha.PLAY1529removefaeasy3900 → 14.4.0.pre.alpha.PLAY1546highchartsbump3822
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_advanced_table/Components/SortIconButton.tsx +4 -23
- data/app/pb_kits/playbook/pb_button/_button.tsx +2 -6
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -17
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -14
- data/app/pb_kits/playbook/pb_contact/contact.rb +0 -4
- data/app/pb_kits/playbook/pb_contact/contact.test.js +1 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +3 -6
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_header_styles.scss +2 -6
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +0 -2
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +2 -10
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.html.erb +1 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +1 -5
- data/app/pb_kits/playbook/pb_map/_map_controls.tsx +1 -7
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +4 -15
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +1 -12
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md +1 -3
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -10
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +13 -14
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +4 -4
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +33 -92
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_radio/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarDropdown.tsx +5 -12
- data/app/pb_kits/playbook/pb_select/_select.tsx +2 -5
- data/app/pb_kits/playbook/pb_select/select.html.erb +1 -1
- data/app/pb_kits/playbook/pb_select/select.rb +0 -4
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +13 -17
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +1 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +0 -14
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +0 -3
- data/app/pb_kits/playbook/pb_typeahead/components/Control.tsx +5 -6
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +1 -6
- data/app/pb_kits/playbook/utilities/icons/allicons.tsx +13 -136
- data/dist/chunks/_typeahead-D7A7UtDj.js +22 -0
- data/dist/chunks/_weekday_stacked-cRBjVQjA.js +45 -0
- data/dist/chunks/lib-D2U4I1U6.js +16 -0
- data/dist/chunks/{pb_form_validation-D9zkwt2b.js → pb_form_validation-zV9OpdSt.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/pagination_renderer.rb +2 -10
- data/lib/playbook/version.rb +1 -1
- metadata +6 -11
- data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +0 -59
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.html.erb +0 -88
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx +0 -60
- data/app/pb_kits/playbook/utilities/icons/angle-down.svg +0 -3
- data/app/pb_kits/playbook/utilities/icons/envelope.svg +0 -3
- data/dist/chunks/_typeahead-DnWoIeq6.js +0 -22
- data/dist/chunks/_weekday_stacked-C5Ls9JLc.js +0 -45
- data/dist/chunks/lib-CEpcaI8y.js +0 -29
@@ -1,30 +1,28 @@
|
|
1
|
-
/*eslint-disable react/no-multi-comp */
|
1
|
+
/*eslint-disable react/no-multi-comp, flowtype/space-before-type-colon */
|
2
2
|
|
3
|
-
import React, { forwardRef
|
3
|
+
import React, { forwardRef } from 'react'
|
4
4
|
import Body from '../pb_body/_body'
|
5
|
-
import Flex from '../pb_flex/_flex'
|
6
5
|
import classnames from 'classnames'
|
7
6
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
8
7
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
9
8
|
|
10
9
|
type RadioProps = {
|
11
|
-
aria?: {
|
10
|
+
aria?: {[key: string]: string},
|
12
11
|
alignment?: string,
|
13
12
|
checked?: boolean,
|
14
13
|
children?: React.ReactChild[] | React.ReactChild,
|
15
|
-
customChildren?: boolean,
|
16
14
|
className?: string,
|
17
15
|
dark?: boolean,
|
18
|
-
data?: {
|
16
|
+
data?: {[key: string]: string},
|
19
17
|
disabled?: boolean,
|
20
18
|
error?: boolean,
|
21
|
-
htmlOptions?: {
|
19
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
22
20
|
id?: string,
|
23
21
|
label: string,
|
24
22
|
name?: string,
|
25
23
|
value?: string,
|
26
24
|
text?: string,
|
27
|
-
onChange: (event: React.FormEvent<HTMLInputElement> | null)
|
25
|
+
onChange: (event: React.FormEvent<HTMLInputElement> | null)=>void,
|
28
26
|
} & GlobalProps
|
29
27
|
|
30
28
|
const Radio = ({
|
@@ -32,11 +30,10 @@ const Radio = ({
|
|
32
30
|
alignment,
|
33
31
|
children,
|
34
32
|
className,
|
35
|
-
customChildren = false,
|
36
33
|
dark = false,
|
34
|
+
data = {},
|
37
35
|
disabled = false,
|
38
36
|
error = false,
|
39
|
-
data = {},
|
40
37
|
htmlOptions = {},
|
41
38
|
id,
|
42
39
|
label,
|
@@ -46,28 +43,17 @@ const Radio = ({
|
|
46
43
|
onChange = () => { void 0 },
|
47
44
|
...props
|
48
45
|
}: RadioProps, ref: any) => {
|
49
|
-
const
|
50
|
-
|
51
|
-
const
|
52
|
-
const dataProps = buildDataProps(data);
|
53
|
-
const htmlProps = buildHtmlProps(htmlOptions);
|
46
|
+
const ariaProps = buildAriaProps(aria)
|
47
|
+
const dataProps = buildDataProps(data)
|
48
|
+
const htmlProps = buildHtmlProps(htmlOptions)
|
54
49
|
const classes = classnames(
|
55
|
-
buildCss('pb_radio_kit', alignment),
|
56
|
-
dark ? 'dark' : null,
|
57
|
-
error ? 'error' : null,
|
50
|
+
buildCss('pb_radio_kit', alignment ),
|
51
|
+
dark ? 'dark': null, error ? 'error': null,
|
58
52
|
globalProps(props),
|
59
|
-
className
|
60
|
-
);
|
61
|
-
|
62
|
-
const classesCustom = classnames(
|
63
|
-
dark ? 'dark' : null,
|
64
|
-
error ? 'error' : null,
|
65
|
-
globalProps(props),
|
66
|
-
className
|
67
|
-
);
|
53
|
+
className)
|
68
54
|
|
69
55
|
const displayRadio = (props: RadioProps & any) => {
|
70
|
-
if (children
|
56
|
+
if (children)
|
71
57
|
return (children)
|
72
58
|
else
|
73
59
|
return (
|
@@ -84,69 +70,24 @@ const Radio = ({
|
|
84
70
|
/>
|
85
71
|
)}
|
86
72
|
|
87
|
-
const handleContainerClick = (event: React.MouseEvent<HTMLDivElement, MouseEvent> | undefined) => {
|
88
|
-
if (event) {
|
89
|
-
const target = event.target as HTMLElement;
|
90
|
-
if (
|
91
|
-
target.id === 'pb-radio-children-wrapper' ||
|
92
|
-
target.closest('#pb-radio-children-wrapper')
|
93
|
-
) {
|
94
|
-
radioRef.current?.click();
|
95
|
-
}
|
96
|
-
}
|
97
|
-
};
|
98
|
-
|
99
73
|
return (
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
disabled={disabled}
|
119
|
-
id={id}
|
120
|
-
name={name}
|
121
|
-
onChange={onChange}
|
122
|
-
ref={radioRef}
|
123
|
-
type="radio"
|
124
|
-
value={value}
|
125
|
-
{...props}
|
126
|
-
/>
|
127
|
-
<span className="pb_radio_button" />
|
128
|
-
</label>
|
129
|
-
<div id="pb-radio-children-wrapper"> {children} </div>
|
130
|
-
</Flex>
|
131
|
-
) : (
|
132
|
-
<label
|
133
|
-
{...ariaProps}
|
134
|
-
{...dataProps}
|
135
|
-
{...htmlProps}
|
136
|
-
className={classes}
|
137
|
-
htmlFor={id}
|
138
|
-
>
|
139
|
-
<>{displayRadio(props)}</>
|
140
|
-
<span className="pb_radio_button" />
|
141
|
-
<Body
|
142
|
-
dark={dark}
|
143
|
-
status={error ? 'negative' : null}
|
144
|
-
text={label}
|
145
|
-
variant={null}
|
146
|
-
/>
|
147
|
-
</label>
|
148
|
-
)
|
149
|
-
);
|
150
|
-
};
|
74
|
+
<label
|
75
|
+
{...ariaProps}
|
76
|
+
{...dataProps}
|
77
|
+
{...htmlProps}
|
78
|
+
className={classes}
|
79
|
+
htmlFor={id}
|
80
|
+
>
|
81
|
+
<>{displayRadio(props)}</>
|
82
|
+
<span className="pb_radio_button" />
|
83
|
+
<Body
|
84
|
+
dark={dark}
|
85
|
+
status={error ? 'negative' : null}
|
86
|
+
text={label}
|
87
|
+
variant={null}
|
88
|
+
/>
|
89
|
+
</label>
|
90
|
+
)
|
91
|
+
}
|
151
92
|
|
152
|
-
export default forwardRef(Radio)
|
93
|
+
export default forwardRef(Radio)
|
@@ -3,4 +3,3 @@ export { default as RadioCustom } from './_radio_custom.jsx'
|
|
3
3
|
export { default as RadioError } from './_radio_error.jsx'
|
4
4
|
export { default as RadioAlignment } from './_radio_alignment.jsx'
|
5
5
|
export { default as RadioDisabled } from './_radio_disabled.jsx'
|
6
|
-
export { default as RadioCustomChildren } from './_radio_custom_children.jsx'
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
|
3
|
-
import { getAllIcons } from "../../utilities/icons/allicons"
|
4
|
-
|
5
3
|
import Flex from '../../pb_flex/_flex'
|
6
4
|
import PbReactPopover from '../../pb_popover/_popover'
|
7
5
|
import Button from '../../pb_button/_button'
|
@@ -67,7 +65,6 @@ const toolbarDropdownItems = [
|
|
67
65
|
},
|
68
66
|
]
|
69
67
|
|
70
|
-
const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
|
71
68
|
|
72
69
|
const handleTogglePopover = () => {
|
73
70
|
setShowPopover(!showPopover)
|
@@ -95,10 +92,8 @@ for (const { text, isActive, icon } of toolbarDropdownItems) {
|
|
95
92
|
<Flex className={showPopover ? "fa-flip-vertical" : ""}
|
96
93
|
display="inline_flex"
|
97
94
|
>
|
98
|
-
<Icon
|
99
|
-
|
100
|
-
customIcon={angleDown}
|
101
|
-
fixedWidth
|
95
|
+
<Icon fixedWidth
|
96
|
+
icon="angle-down"
|
102
97
|
margin-left="xs"
|
103
98
|
/>
|
104
99
|
</Flex>
|
@@ -130,10 +125,8 @@ const popoverReference = (
|
|
130
125
|
<Flex className={showPopover ? "fa-flip-vertical" : ""}
|
131
126
|
display="inline_flex"
|
132
127
|
>
|
133
|
-
<Icon
|
134
|
-
|
135
|
-
customIcon={angleDown}
|
136
|
-
fixedWidth
|
128
|
+
<Icon fixedWidth
|
129
|
+
icon="angle-down"
|
137
130
|
margin-left="xs"
|
138
131
|
/>
|
139
132
|
</Flex>
|
@@ -176,4 +169,4 @@ const popoverReference = (
|
|
176
169
|
)
|
177
170
|
}
|
178
171
|
|
179
|
-
export default ToolbarDropdown
|
172
|
+
export default ToolbarDropdown
|
@@ -4,7 +4,6 @@ import classnames from 'classnames'
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
5
5
|
import { globalProps, GlobalProps, domSafeProps } from '../utilities/globalProps'
|
6
6
|
import type { InputCallback } from '../types'
|
7
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
8
7
|
|
9
8
|
import Body from '../pb_body/_body'
|
10
9
|
import Caption from '../pb_caption/_caption'
|
@@ -91,8 +90,6 @@ const Select = ({
|
|
91
90
|
compactClass
|
92
91
|
);
|
93
92
|
|
94
|
-
const angleDown = getAllIcons()["angleDown"].icon as unknown as { [key: string]: SVGElement }
|
95
|
-
|
96
93
|
const selectWrapperClass = classnames(buildCss('pb_select_kit_wrapper'), { error }, className)
|
97
94
|
const selectBody =(() =>{
|
98
95
|
if (children) return children
|
@@ -137,9 +134,9 @@ const Select = ({
|
|
137
134
|
{selectBody}
|
138
135
|
{ multiple !== true ?
|
139
136
|
<Icon
|
140
|
-
className="pb_select_kit_caret
|
141
|
-
customIcon={angleDown}
|
137
|
+
className="pb_select_kit_caret"
|
142
138
|
fixedWidth
|
139
|
+
icon="angle-down"
|
143
140
|
/>
|
144
141
|
:
|
145
142
|
null
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= pb_rails("body", props: { status: "negative", text: object.error }) %>
|
27
27
|
<% end %>
|
28
28
|
<% if object.multiple != true %>
|
29
|
-
<%= pb_rails("icon", props: {
|
29
|
+
<%= pb_rails("icon", props: { icon: "angle-down", fixed_width: true, classname: "pb_select_kit_caret"}) %>
|
30
30
|
<% end %>
|
31
31
|
</label>
|
32
32
|
<% end %>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import React, { useRef, useState, forwardRef, ForwardedRef } from "react"
|
2
2
|
|
3
3
|
import {
|
4
|
-
arrow,
|
5
|
-
flip,
|
6
|
-
offset,
|
7
|
-
Placement,
|
8
|
-
safePolygon,
|
4
|
+
arrow,
|
5
|
+
flip,
|
6
|
+
offset,
|
7
|
+
Placement,
|
8
|
+
safePolygon,
|
9
9
|
shift,
|
10
|
-
useFloating,
|
11
|
-
useHover,
|
10
|
+
useFloating,
|
11
|
+
useHover,
|
12
12
|
useInteractions,
|
13
13
|
} from "@floating-ui/react"
|
14
14
|
|
@@ -16,8 +16,6 @@ import classnames from "classnames"
|
|
16
16
|
import { GlobalProps, globalProps } from "../utilities/globalProps"
|
17
17
|
import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props"
|
18
18
|
import Flex from "../pb_flex/_flex"
|
19
|
-
import { getAllIcons } from "../utilities/icons/allicons"
|
20
|
-
import Icon from '../pb_icon/_icon'
|
21
19
|
|
22
20
|
type TooltipProps = {
|
23
21
|
aria?: { [key: string]: string },
|
@@ -55,7 +53,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
55
53
|
const dataProps: { [key: string]: string } = buildDataProps(data)
|
56
54
|
const ariaProps: { [key: string]: string } = buildAriaProps(aria)
|
57
55
|
const htmlProps = buildHtmlProps(htmlOptions)
|
58
|
-
|
56
|
+
|
59
57
|
const css = classnames(
|
60
58
|
globalProps({...rest}),
|
61
59
|
className,
|
@@ -63,6 +61,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
63
61
|
const [open, setOpen] = useState(false)
|
64
62
|
const arrowRef = useRef(null)
|
65
63
|
|
64
|
+
|
66
65
|
const {
|
67
66
|
context,
|
68
67
|
middlewareData: { arrow: { x: arrowX, y: arrowY } = {}, },
|
@@ -96,7 +95,7 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
96
95
|
placement: preferredPlacement
|
97
96
|
})
|
98
97
|
|
99
|
-
|
98
|
+
|
100
99
|
const { getFloatingProps } = useInteractions([
|
101
100
|
useHover(context, {
|
102
101
|
delay,
|
@@ -149,16 +148,13 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
|
|
149
148
|
},
|
150
149
|
})}
|
151
150
|
>
|
152
|
-
<Flex
|
151
|
+
<Flex
|
153
152
|
align="center"
|
154
153
|
gap="xs"
|
155
154
|
>
|
156
155
|
{icon && (
|
157
|
-
<i className={`pb_icon_kit`}
|
158
|
-
|
159
|
-
icon={icon}
|
160
|
-
/>
|
161
|
-
</i>)}
|
156
|
+
<i className={`pb_icon_kit far fa-${icon} fa-fw`} />
|
157
|
+
)}
|
162
158
|
{text}
|
163
159
|
</Flex>
|
164
160
|
<div
|
@@ -109,20 +109,6 @@ test('should pass className prop', () => {
|
|
109
109
|
expect(kit).toHaveClass(className)
|
110
110
|
})
|
111
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
|
-
})
|
125
|
-
|
126
112
|
test('typeahead with colored pills', () => {
|
127
113
|
render(
|
128
114
|
<Typeahead
|
@@ -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
|
pillColor?: "primary" | "neutral" | "success" | "warning" | "error" | "info" | "data_1" | "data_2" | "data_3" | "data_4" | "data_5" | "data_6" | "data_7" | "data_8" | "windows" | "siding" | "roofing" | "doors" | "gutters" | "solar" | "insulation" | "accessories",
|
50
49
|
} & GlobalProps
|
51
50
|
|
@@ -79,7 +78,6 @@ const Typeahead = ({
|
|
79
78
|
htmlOptions = {},
|
80
79
|
id,
|
81
80
|
loadOptions = noop,
|
82
|
-
marginBottom = "sm",
|
83
81
|
pillColor,
|
84
82
|
...props
|
85
83
|
}: TypeaheadProps) => {
|
@@ -140,7 +138,6 @@ const Typeahead = ({
|
|
140
138
|
const htmlProps = buildHtmlProps(htmlOptions)
|
141
139
|
const classes = classnames(
|
142
140
|
'pb_typeahead_kit react-select',
|
143
|
-
`mb_${marginBottom}`,
|
144
141
|
globalProps(props),
|
145
142
|
className
|
146
143
|
)
|
@@ -11,15 +11,14 @@ type Props = {
|
|
11
11
|
const TypeaheadControl = (props: Props) => (
|
12
12
|
<div className="pb_typeahead_wrapper">
|
13
13
|
<TextInput
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
22
|
-
|
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
|
- typeahead_with_pills_color: With Pills (Custom Color)
|
14
13
|
|
15
14
|
react:
|
@@ -25,5 +24,4 @@ examples:
|
|
25
24
|
- typeahead_async_createable: Createable (+ Async Data)
|
26
25
|
- typeahead_error_state: Error State
|
27
26
|
- typeahead_custom_menu_list: Custom MenuList
|
28
|
-
- typeahead_margin_bottom: Margin Bottom
|
29
27
|
- typeahead_with_pills_color: With Pills (Custom Color)
|
@@ -10,5 +10,4 @@ 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'
|
14
13
|
export { default as TypeaheadWithPillsColor } from './_typeahead_with_pills_color.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,16 +34,12 @@ 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
|
prop :pill_color, type: Playbook::Props::Enum,
|
41
38
|
values: %w[primary neutral success warning error info data_1 data_2 data_3 data_4 data_5 data_6 data_7 data_8 windows siding roofing doors gutters solar insulation accessories],
|
42
39
|
default: "primary"
|
43
40
|
|
44
41
|
def classname
|
45
|
-
|
46
|
-
generate_classname("pb_typeahead_kit") + default_margin_bottom
|
42
|
+
generate_classname("pb_typeahead_kit")
|
47
43
|
end
|
48
44
|
|
49
45
|
def inline_class
|
@@ -73,7 +69,6 @@ module Playbook
|
|
73
69
|
inline: inline,
|
74
70
|
isMulti: is_multi,
|
75
71
|
label: label,
|
76
|
-
marginBottom: margin_bottom,
|
77
72
|
multiKit: multi_kit,
|
78
73
|
name: name,
|
79
74
|
options: options,
|