playbook_ui 14.4.0.pre.rc.13 → 14.4.0.pre.rc.15
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_date_picker/sass_partials/_flatpickr_styles.scss +2 -3
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +245 -23
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.html.erb +117 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.jsx +227 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_colors.md +1 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +72 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +91 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_react.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +16 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +4 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.tsx +26 -18
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +31 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +26 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_rails.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color_react.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +4 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +2 -0
- data/dist/chunks/{_typeahead-BAFhtQtP.js → _typeahead-B2zRxReA.js} +2 -2
- data/dist/chunks/{_weekday_stacked-V_fGN_e4.js → _weekday_stacked-CvAnMnnS.js} +1 -1
- data/dist/chunks/{lib--ErPKv63.js → lib-D2U4I1U6.js} +1 -1
- data/dist/chunks/{pb_form_validation-CHMFwDfe.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/version.rb +1 -1
- metadata +16 -5
@@ -0,0 +1,26 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Typeahead } from 'playbook-ui'
|
3
|
+
|
4
|
+
const options = [
|
5
|
+
{ label: 'Windows', value: '#FFA500' },
|
6
|
+
{ label: 'Siding', value: '#FF0000' },
|
7
|
+
{ label: 'Doors', value: '#00FF00' },
|
8
|
+
{ label: 'Roofs', value: '#0000FF' },
|
9
|
+
]
|
10
|
+
|
11
|
+
const TypeaheadWithPills = (props) => {
|
12
|
+
return (
|
13
|
+
<>
|
14
|
+
<Typeahead
|
15
|
+
isMulti
|
16
|
+
label="Colors"
|
17
|
+
options={options}
|
18
|
+
pillColor="neutral"
|
19
|
+
placeholder=""
|
20
|
+
{...props}
|
21
|
+
/>
|
22
|
+
</>
|
23
|
+
)
|
24
|
+
}
|
25
|
+
|
26
|
+
export default TypeaheadWithPills
|
@@ -0,0 +1 @@
|
|
1
|
+
Change the form pill color by passing the optional `pill_color` prop. Product, Data, and Status colors are available options. Check them out <a href="https://playbook.powerapp.cloud/kits/form_pill#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
|
@@ -0,0 +1 @@
|
|
1
|
+
Change the form pill color by passing the optional `pillColor` prop. Product, Data, and Status colors are available options. Check them out <a href="https://playbook.powerapp.cloud/kits/form_pill/react#form-pill-colors" target="_blank">here</a> in the Form Pill colors example.
|
@@ -9,6 +9,7 @@ examples:
|
|
9
9
|
- typeahead_inline: Inline
|
10
10
|
- typeahead_multi_kit: Multi Kit Options
|
11
11
|
- typeahead_error_state: Error State
|
12
|
+
- typeahead_with_pills_color: With Pills (Custom Color)
|
12
13
|
|
13
14
|
react:
|
14
15
|
- typeahead_default: Default
|
@@ -23,3 +24,4 @@ examples:
|
|
23
24
|
- typeahead_async_createable: Createable (+ Async Data)
|
24
25
|
- typeahead_error_state: Error State
|
25
26
|
- typeahead_custom_menu_list: Custom MenuList
|
27
|
+
- typeahead_with_pills_color: With Pills (Custom Color)
|
@@ -10,3 +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 TypeaheadWithPillsColor } from './_typeahead_with_pills_color.jsx'
|
@@ -34,6 +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 :pill_color, type: Playbook::Props::Enum,
|
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],
|
39
|
+
default: "primary"
|
37
40
|
|
38
41
|
def classname
|
39
42
|
generate_classname("pb_typeahead_kit")
|
@@ -58,6 +61,7 @@ module Playbook
|
|
58
61
|
def typeahead_react_options
|
59
62
|
base_options = {
|
60
63
|
className: classname,
|
64
|
+
pillColor: pill_color,
|
61
65
|
dark: dark,
|
62
66
|
defaultValue: default_options,
|
63
67
|
error: error,
|
@@ -259,6 +259,7 @@ $solar: $product_4_background !default; // deprecated
|
|
259
259
|
$roofing: $product_5_background !default; // deprecated
|
260
260
|
$gutters: $product_6_background !default; // deprecated
|
261
261
|
$insulation: $product_7_background !default; // deprecated
|
262
|
+
$accessories: $product_8_background !default; // added specifically for form_pill product map
|
262
263
|
$product_colors: (
|
263
264
|
windows: $windows,
|
264
265
|
siding: $siding,
|
@@ -267,6 +268,7 @@ $product_colors: (
|
|
267
268
|
roofing: $roofing,
|
268
269
|
gutters: $gutters,
|
269
270
|
insulation: $insulation,
|
271
|
+
accessories: $accessories,
|
270
272
|
product_1_background: $product_1_background,
|
271
273
|
product_1_highlight: $product_1_highlight,
|
272
274
|
product_2_background: $product_2_background,
|