playbook_ui 13.21.0.pre.alpha.PLAY12582474 → 13.21.0.pre.alpha.PLAY12582514
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/table_body.rb +1 -1
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +9 -9
- data/app/pb_kits/playbook/pb_button/button.rb +5 -5
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +10 -10
- data/app/pb_kits/playbook/pb_currency/currency.rb +4 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +8 -7
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.html.erb +7 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.jsx +41 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -2
- data/app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb +3 -3
- data/app/pb_kits/playbook/pb_docs/kit_example.rb +1 -1
- data/app/pb_kits/playbook/pb_form/form.rb +4 -4
- data/app/pb_kits/playbook/pb_gauge/gauge.rb +9 -9
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +17 -17
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb +0 -2
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +9 -9
- data/app/pb_kits/playbook/pb_list/list.rb +0 -2
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb +4 -4
- data/app/pb_kits/playbook/pb_passphrase/passphrase.rb +6 -6
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +8 -8
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +8 -8
- data/app/pb_kits/playbook/pb_select/select.rb +6 -6
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.rb +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +1 -1
- data/app/pb_kits/playbook/pb_stat_value/stat_value.rb +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +9 -8
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +1 -1
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +6 -6
- data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +8 -8
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/forms/builder/action_area.rb +2 -2
- data/lib/playbook/forms/builder/checkbox_field.rb +2 -2
- data/lib/playbook/forms/builder/collection_select_field.rb +1 -1
- data/lib/playbook/forms/builder/date_picker_field.rb +1 -1
- data/lib/playbook/forms/builder/form_field_builder.rb +1 -1
- data/lib/playbook/forms/builder/intl_telephone_field.rb +1 -1
- data/lib/playbook/forms/builder/multi_level_select_field.rb +1 -1
- data/lib/playbook/forms/builder/select_field.rb +1 -1
- data/lib/playbook/forms/builder/typeahead_field.rb +1 -1
- data/lib/playbook/kit_base.rb +2 -2
- data/lib/playbook/pb_doc_helper.rb +5 -5
- data/lib/playbook/pb_forms_helper.rb +1 -1
- data/lib/playbook/props/percentage.rb +2 -2
- data/lib/playbook/props.rb +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +16 -42
@@ -11,7 +11,7 @@ module Playbook
|
|
11
11
|
if precision.nil?
|
12
12
|
number_with_delimiter(value, delimiter: ",", separator: ".")
|
13
13
|
else
|
14
|
-
number_with_precision(value, precision
|
14
|
+
number_with_precision(value, precision:, delimiter: ",", separator: ".")
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -60,6 +60,10 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
60
60
|
const ariaProps = buildAriaProps(aria)
|
61
61
|
const dataProps = buildDataProps(data)
|
62
62
|
const htmlProps = buildHtmlProps(htmlOptions)
|
63
|
+
const filteredProps = {...props}
|
64
|
+
if (filteredProps.marginBottom === undefined) {
|
65
|
+
filteredProps.marginBottom = "sm"
|
66
|
+
}
|
63
67
|
|
64
68
|
const { alignment, border, icon } = addOn
|
65
69
|
const addOnAlignment = alignment === 'left' ? 'left' : 'right'
|
@@ -74,7 +78,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
74
78
|
'pb_text_input_kit',
|
75
79
|
inline ? 'inline' : "",
|
76
80
|
error ? 'error' : "",
|
77
|
-
globalProps(
|
81
|
+
globalProps(filteredProps),
|
78
82
|
className,
|
79
83
|
])
|
80
84
|
const addOnIcon = (
|
@@ -26,7 +26,8 @@ module Playbook
|
|
26
26
|
nested_kit: Playbook::PbTextInput::AddOn
|
27
27
|
|
28
28
|
def classname
|
29
|
-
|
29
|
+
default_margin_bottom = margin_bottom.present? ? "" : " mb_sm"
|
30
|
+
generate_classname("pb_text_input_kit") + default_margin_bottom + error_class + inline_class
|
30
31
|
end
|
31
32
|
|
32
33
|
def input_tag
|
@@ -42,7 +43,7 @@ module Playbook
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def add_on_props
|
45
|
-
{ dark:
|
46
|
+
{ dark: }.merge(add_on || {})
|
46
47
|
end
|
47
48
|
|
48
49
|
private
|
@@ -52,14 +53,14 @@ module Playbook
|
|
52
53
|
autocomplete: autocomplete ? nil : "off",
|
53
54
|
class: "text_input #{input_options.dig(:classname) || ''}",
|
54
55
|
data: validation_data,
|
55
|
-
disabled
|
56
|
+
disabled:,
|
56
57
|
id: input_options.dig(:id) || id,
|
57
|
-
name
|
58
|
+
name:,
|
58
59
|
pattern: validation_pattern,
|
59
|
-
placeholder
|
60
|
-
required
|
61
|
-
type
|
62
|
-
value
|
60
|
+
placeholder:,
|
61
|
+
required:,
|
62
|
+
type:,
|
63
|
+
value:,
|
63
64
|
}.merge(input_options)
|
64
65
|
end
|
65
66
|
|
@@ -23,13 +23,13 @@ module Playbook
|
|
23
23
|
{
|
24
24
|
chartData: chart_data,
|
25
25
|
className: classname,
|
26
|
-
colors
|
26
|
+
colors:,
|
27
27
|
dark: dark ? "dark" : "",
|
28
|
-
drillable
|
29
|
-
grouped
|
30
|
-
height
|
31
|
-
id
|
32
|
-
title
|
28
|
+
drillable:,
|
29
|
+
grouped:,
|
30
|
+
height:,
|
31
|
+
id:,
|
32
|
+
title:,
|
33
33
|
tooltipHtml: tooltip_html,
|
34
34
|
type: chart_type,
|
35
35
|
}
|
@@ -57,17 +57,17 @@ module Playbook
|
|
57
57
|
|
58
58
|
def typeahead_react_options
|
59
59
|
base_options = {
|
60
|
-
dark
|
60
|
+
dark:,
|
61
61
|
defaultValue: default_options,
|
62
|
-
error
|
63
|
-
id
|
64
|
-
inline
|
62
|
+
error:,
|
63
|
+
id:,
|
64
|
+
inline:,
|
65
65
|
isMulti: is_multi,
|
66
|
-
label
|
66
|
+
label:,
|
67
67
|
multiKit: multi_kit,
|
68
|
-
name
|
69
|
-
options
|
70
|
-
placeholder
|
68
|
+
name:,
|
69
|
+
options:,
|
70
|
+
placeholder:,
|
71
71
|
plusIcon: plus_icon,
|
72
72
|
}
|
73
73
|
|