playbook_ui 7.0.1.pre.alpha12 → 7.0.1.pre.alpha14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/app/pb_kits/playbook/_playbook.scss +1 -0
- data/app/pb_kits/playbook/data/menu.yml +1 -1
- data/app/pb_kits/playbook/index.js +3 -0
- data/app/pb_kits/playbook/packs/examples.js +6 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +22 -6
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +5 -1
- data/app/pb_kits/playbook/pb_background/_background.html.erb +14 -0
- data/app/pb_kits/playbook/pb_background/_background.jsx +64 -0
- data/app/pb_kits/playbook/pb_background/_background.scss +15 -0
- data/app/pb_kits/playbook/pb_background/background.rb +36 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +41 -0
- data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +75 -0
- data/app/pb_kits/playbook/pb_background/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +4 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/_button.jsx +5 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +5 -1
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -2
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +5 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +3 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +10 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +130 -0
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +39 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +28 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +117 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +53 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +30 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +45 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +11 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +9 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +5 -1
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +5 -1
- data/app/pb_kits/playbook/pb_currency/_currency.jsx +5 -1
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +5 -1
- data/app/pb_kits/playbook/pb_date/date.rb +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_default.html.erb +8 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_timezone.html.erb +51 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_timezone.md +6 -0
- data/app/pb_kits/playbook/pb_date/docs/_description.md +2 -0
- data/app/pb_kits/playbook/pb_date/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +7 -4
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +8 -10
- data/app/pb_kits/playbook/pb_date_picker/docs/{_date_picker_read_only.html.erb → _date_picker_allow_input.html.erb} +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +34 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md +3 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +1 -0
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +3 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +5 -1
- data/app/pb_kits/playbook/pb_image/_image.jsx +5 -1
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +5 -1
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +4 -4
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -1
- data/app/pb_kits/playbook/pb_list/_list.jsx +3 -2
- data/app/pb_kits/playbook/pb_list/_list_item.jsx +3 -2
- data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +5 -1
- data/app/pb_kits/playbook/pb_message/_message.jsx +5 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +5 -2
- data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
- data/app/pb_kits/playbook/pb_person/_person.jsx +5 -1
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +5 -1
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -1
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +4 -4
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.html.erb +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_options.html.erb +9 -0
- data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_radio/radio.rb +2 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +3 -3
- data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx +6 -1
- data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +17 -8
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +1 -1
- data/app/pb_kits/playbook/pb_time/_time.html.erb +23 -17
- data/app/pb_kits/playbook/pb_time/_time.jsx +22 -13
- data/app/pb_kits/playbook/pb_time/_time.scss +16 -8
- data/app/pb_kits/playbook/pb_time/docs/_time_align.html.erb +18 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +3 -3
- data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +47 -3
- data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +33 -4
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.html.erb +11 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +19 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.html.erb +3 -1
- data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +0 -7
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.html.erb +38 -0
- data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +12 -14
- data/app/pb_kits/playbook/pb_time/docs/example.yml +6 -2
- data/app/pb_kits/playbook/pb_time/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_time/time.rb +14 -2
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +3 -3
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +1 -1
- data/app/pb_kits/playbook/pb_title/_title.jsx +5 -1
- data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +5 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +1 -1
- data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +3 -3
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +41 -43
- data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_toggle/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_toggle/toggle.rb +2 -2
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +60 -0
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +20 -3
- data/app/pb_kits/playbook/pb_typeahead/components/Control.jsx +30 -0
- data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx +12 -0
- data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +51 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +34 -0
- data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.jsx +13 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +22 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +29 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +84 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +101 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +8 -2
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +5 -2
- data/app/pb_kits/playbook/plugins/pb_chart.js +1 -1
- data/app/pb_kits/playbook/tokens/_typography.scss +3 -3
- data/lib/generators/kit/templates/kit_jsx.erb.tt +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +50 -8
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.jsx +0 -13
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.md +0 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.html.erb +0 -11
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +0 -44
@@ -27,8 +27,9 @@ const ListItem = (props: ListItemProps) => {
|
|
27
27
|
const ariaProps = buildAriaProps(aria)
|
28
28
|
const dataProps = buildDataProps(data)
|
29
29
|
const classes = classnames(
|
30
|
-
buildCss('pb_item_kit'),
|
31
|
-
globalProps(props)
|
30
|
+
buildCss('pb_item_kit'),
|
31
|
+
globalProps(props),
|
32
|
+
className
|
32
33
|
)
|
33
34
|
|
34
35
|
return (
|
@@ -40,7 +40,11 @@ const Logistic = (props: LogisticProps) => {
|
|
40
40
|
const ariaProps = buildAriaProps(aria)
|
41
41
|
const dataProps = buildDataProps(data)
|
42
42
|
const formattedDate = new DateTime({ value: date })
|
43
|
-
const classes = classnames(
|
43
|
+
const classes = classnames(
|
44
|
+
buildCss('pb_logistic_kit', { dark }),
|
45
|
+
globalProps(props),
|
46
|
+
className
|
47
|
+
)
|
44
48
|
|
45
49
|
return (
|
46
50
|
<div
|
@@ -39,7 +39,11 @@ const Message = (props: MessageProps) => {
|
|
39
39
|
? 'pb_message_kit_avatar'
|
40
40
|
: 'pb_message_kit'
|
41
41
|
|
42
|
-
const classes = classnames(
|
42
|
+
const classes = classnames(
|
43
|
+
buildCss(baseClassName),
|
44
|
+
globalProps(props),
|
45
|
+
className
|
46
|
+
)
|
43
47
|
|
44
48
|
return (
|
45
49
|
<div
|
@@ -36,8 +36,11 @@ const MultipleUsers = (props: MultipleUsersProps) => {
|
|
36
36
|
const reverseClass = reverse === true ? 'reverse' : ''
|
37
37
|
const ariaProps = buildAriaProps(aria)
|
38
38
|
const dataProps = buildDataProps(data)
|
39
|
-
const classes = classnames(
|
40
|
-
|
39
|
+
const classes = classnames(
|
40
|
+
buildCss('pb_multiple_users_kit', reverseClass),
|
41
|
+
globalProps(props),
|
42
|
+
className
|
43
|
+
)
|
41
44
|
|
42
45
|
return (
|
43
46
|
<div
|
@@ -32,7 +32,11 @@ const Person = (props: PersonProps) => {
|
|
32
32
|
|
33
33
|
const ariaProps = buildAriaProps(aria)
|
34
34
|
const dataProps = buildDataProps(data)
|
35
|
-
const classes = classnames(
|
35
|
+
const classes = classnames(
|
36
|
+
buildCss('pb_person_kit'),
|
37
|
+
globalProps(props),
|
38
|
+
className
|
39
|
+
)
|
36
40
|
|
37
41
|
return (
|
38
42
|
<div
|
@@ -43,7 +43,11 @@ const PersonContact = (props: PersonContactProps) => {
|
|
43
43
|
|
44
44
|
const ariaProps = buildAriaProps(aria)
|
45
45
|
const dataProps = buildDataProps(data)
|
46
|
-
const classes = classnames(
|
46
|
+
const classes = classnames(
|
47
|
+
buildCss('pb_person_contact_kit'),
|
48
|
+
globalProps(props),
|
49
|
+
className
|
50
|
+
)
|
47
51
|
|
48
52
|
const wrongContacts = () => (
|
49
53
|
contacts.filter((contactObject) => (
|
@@ -78,7 +78,11 @@ const Popover = (props: PbPopoverProps) => {
|
|
78
78
|
}
|
79
79
|
const ariaProps = buildAriaProps(aria)
|
80
80
|
const dataProps = buildDataProps(data)
|
81
|
-
const classes = classnames(
|
81
|
+
const classes = classnames(
|
82
|
+
buildCss('pb_popover_kit'),
|
83
|
+
globalProps(props),
|
84
|
+
className
|
85
|
+
)
|
82
86
|
|
83
87
|
return (
|
84
88
|
<Popper
|
@@ -41,14 +41,14 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
|
|
41
41
|
}
|
42
42
|
|
43
43
|
const wrapperClass = classnames(
|
44
|
-
className,
|
45
44
|
buildCss('pb_progress_simple_wrapper', align, { dark: dark }),
|
46
|
-
globalProps(props)
|
45
|
+
globalProps(props),
|
46
|
+
className
|
47
47
|
)
|
48
48
|
|
49
49
|
const kitClass = classnames(
|
50
|
-
|
51
|
-
|
50
|
+
buildCss('pb_progress_simple_kit', { muted }, variantStyle, align),
|
51
|
+
className
|
52
52
|
)
|
53
53
|
|
54
54
|
return (
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<% if object.children %>
|
10
10
|
<%= capture(&object.children) %>
|
11
11
|
<% else %>
|
12
|
-
<%= radio_button_tag object.name, object.value, object.selected %>
|
12
|
+
<%= radio_button_tag object.name, object.value, object.selected, object.input_options %>
|
13
13
|
<% end %>
|
14
14
|
|
15
15
|
<span class="pb_radio_button"></span>
|
@@ -15,6 +15,8 @@ module Playbook
|
|
15
15
|
default: false
|
16
16
|
prop :error, type: Playbook::Props::Boolean,
|
17
17
|
default: false
|
18
|
+
prop :input_options, type: Playbook::Props::Hash,
|
19
|
+
default: {}
|
18
20
|
prop :name, type: Playbook::Props::String,
|
19
21
|
default: "radio_name"
|
20
22
|
prop :text, type: Playbook::Props::String,
|
@@ -26,10 +28,6 @@ module Playbook
|
|
26
28
|
generate_classname("pb_radio_kit") + error_class
|
27
29
|
end
|
28
30
|
|
29
|
-
def input
|
30
|
-
check_box_tag(name, value, checked)
|
31
|
-
end
|
32
|
-
|
33
31
|
def selected
|
34
32
|
"checked" if checked == true
|
35
33
|
end
|
@@ -30,7 +30,7 @@ const SectionSeparator = (props: SectionSeparatorProps) => {
|
|
30
30
|
const themeStyle = dark === true ? '_dark' : ''
|
31
31
|
const ariaProps = buildAriaProps(aria)
|
32
32
|
const dataProps = buildDataProps(data)
|
33
|
-
const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle),
|
33
|
+
const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle), globalProps(props), className)
|
34
34
|
|
35
35
|
return (
|
36
36
|
|
@@ -21,11 +21,11 @@ const StatValue = (props: StatValueProps) => {
|
|
21
21
|
} = props
|
22
22
|
|
23
23
|
const displayValue = function(value) {
|
24
|
-
if (value) {
|
24
|
+
if (value || value === 0) {
|
25
25
|
return (
|
26
26
|
<Title
|
27
27
|
size={1}
|
28
|
-
text={value}
|
28
|
+
text={`${value}`}
|
29
29
|
/>
|
30
30
|
)
|
31
31
|
}
|
@@ -44,7 +44,7 @@ const StatValue = (props: StatValueProps) => {
|
|
44
44
|
|
45
45
|
return (
|
46
46
|
<div
|
47
|
-
className={classnames('pb_stat_value_kit',
|
47
|
+
className={classnames('pb_stat_value_kit', globalProps(props), className)}
|
48
48
|
id={id}
|
49
49
|
>
|
50
50
|
<div className="pb_stat_value_wrapper">
|
@@ -44,7 +44,6 @@ const Table = (props: TableProps) => {
|
|
44
44
|
{...ariaProps}
|
45
45
|
{...dataProps}
|
46
46
|
className={classnames(
|
47
|
-
className,
|
48
47
|
'pb_table',
|
49
48
|
`table-${size}`,
|
50
49
|
`table-responsive-${responsive}`,
|
@@ -55,7 +54,8 @@ const Table = (props: TableProps) => {
|
|
55
54
|
'single-line': singleLine,
|
56
55
|
'no-hover': disableHover,
|
57
56
|
},
|
58
|
-
globalProps(props)
|
57
|
+
globalProps(props),
|
58
|
+
className
|
59
59
|
)}
|
60
60
|
id={id}
|
61
61
|
>
|
@@ -13,17 +13,22 @@
|
|
13
13
|
margin-bottom: $space_sm;
|
14
14
|
display: block;
|
15
15
|
|
16
|
-
input::placeholder
|
16
|
+
input::placeholder,
|
17
|
+
.text_input .placeholder {
|
17
18
|
@include pb_body_light;
|
18
19
|
}
|
19
20
|
|
20
|
-
input
|
21
|
+
input,
|
22
|
+
.text_input {
|
21
23
|
@include pb_textarea_light;
|
22
24
|
@include pb_title_4;
|
23
25
|
overflow: hidden;
|
24
26
|
}
|
25
27
|
|
26
|
-
input:focus,
|
28
|
+
input:focus,
|
29
|
+
.text_input:focus,
|
30
|
+
input:-webkit-autofill:focus,
|
31
|
+
.text_input:-webkit-autofill:focus {
|
27
32
|
@include pb_textarea_focus;
|
28
33
|
-webkit-box-shadow: 0 0 0px 1000px $focus_input_light inset;
|
29
34
|
transition: background-color 5000s ease-in-out 0s;
|
@@ -34,18 +39,22 @@
|
|
34
39
|
.text_input_wrapper {
|
35
40
|
margin-bottom: 1rem;
|
36
41
|
|
37
|
-
input::placeholder
|
42
|
+
input::placeholder,
|
43
|
+
.text_input .placeholder {
|
38
44
|
@include pb_body_light_dark;
|
39
45
|
}
|
40
46
|
|
41
|
-
input {
|
47
|
+
input, .text_input {
|
42
48
|
@include pb_textarea_dark;
|
43
49
|
@include pb_title_4;
|
44
50
|
@include pb_title_dark;
|
45
51
|
overflow: hidden;
|
46
52
|
}
|
47
53
|
|
48
|
-
input:focus,
|
54
|
+
input:focus,
|
55
|
+
.text_input:focus,
|
56
|
+
input:-webkit-autofill:focus,
|
57
|
+
.text_input:-webkit-autofill:focus {
|
49
58
|
@include pb_textarea_focus_dark;
|
50
59
|
-webkit-box-shadow: 0 0 0px 1000px $focus_input_dark inset;
|
51
60
|
transition: background-color 5000s ease-in-out 0s;
|
@@ -54,7 +63,7 @@
|
|
54
63
|
|
55
64
|
&.error {
|
56
65
|
.text_input_wrapper {
|
57
|
-
input {
|
66
|
+
input, .text_input {
|
58
67
|
border-color: $error_dark;
|
59
68
|
}
|
60
69
|
}
|
@@ -66,7 +75,7 @@
|
|
66
75
|
[class*=pb_body_kit] {
|
67
76
|
margin-top: $space_xs / 2;
|
68
77
|
}
|
69
|
-
input {
|
78
|
+
input, .text_input {
|
70
79
|
border-color: $error;
|
71
80
|
}
|
72
81
|
}
|
@@ -42,7 +42,7 @@ const Textarea = ({
|
|
42
42
|
}: TextareaProps) => {
|
43
43
|
const errorClass = error ? 'error' : null
|
44
44
|
const resizeClass = `resize_${resize}`
|
45
|
-
const classes = classnames('pb_textarea_kit',
|
45
|
+
const classes = classnames('pb_textarea_kit', errorClass, resizeClass, globalProps(props), className)
|
46
46
|
|
47
47
|
return (
|
48
48
|
<div className={classes}>
|
@@ -2,32 +2,38 @@
|
|
2
2
|
id: object.id,
|
3
3
|
data: object.data,
|
4
4
|
class: object.classname) do %>
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
<%
|
6
|
+
# convert deprecated prop values
|
7
|
+
size = object.size
|
8
|
+
size = "sm" if object.size == "xs"
|
9
|
+
size = "md" if object.size == "lg"
|
10
|
+
%>
|
11
|
+
<% if size == "md" %>
|
12
|
+
<% if object.show_icon %>
|
13
|
+
<%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
|
14
|
+
<%= pb_rails("icon", props: { icon: "clock", fixed_width: true, size: "lg" }) %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<%= pb_rails("caption", props: { tag: "span", text: object.format_time_string, size: "lg" }) %>
|
18
|
+
<% if object.show_timezone %>
|
8
19
|
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
9
20
|
<%= object.pb_date_time.to_timezone.upcase %>
|
10
21
|
<% end %>
|
11
22
|
<% end %>
|
12
|
-
<%
|
13
|
-
|
14
|
-
<%= pb_rails("
|
15
|
-
|
16
|
-
<%= content_tag(:span) do %>
|
17
|
-
<%= object.format_time_string %>
|
18
|
-
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
19
|
-
<%= object.pb_date_time.to_timezone.upcase %>
|
20
|
-
<% end %>
|
21
|
-
<% end %>
|
23
|
+
<% else %>
|
24
|
+
<% if object.show_icon %>
|
25
|
+
<%= pb_rails("body", props: { color: "light", tag: "span"}) do %>
|
26
|
+
<%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
|
22
27
|
<% end %>
|
23
28
|
<% end %>
|
24
|
-
|
25
|
-
<%= pb_rails("body", props: { tag: "span", text: object.format_time_string }) do %>
|
29
|
+
<%= pb_rails("body", props: { color: "light", tag: "span", text: object.format_time_string }) do %>
|
26
30
|
<%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
|
27
31
|
<%= content_tag(:span) do %>
|
28
32
|
<%= object.format_time_string %>
|
29
|
-
|
30
|
-
<%=
|
33
|
+
<% if object.show_timezone %>
|
34
|
+
<%= content_tag(:span, class: "pb_time_timezone") do %>
|
35
|
+
<%= object.pb_date_time.to_timezone.upcase %>
|
36
|
+
<% end %>
|
31
37
|
<% end %>
|
32
38
|
<% end %>
|
33
39
|
<% end %>
|