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.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -6
  3. data/app/pb_kits/playbook/_playbook.scss +1 -0
  4. data/app/pb_kits/playbook/data/menu.yml +1 -1
  5. data/app/pb_kits/playbook/index.js +3 -0
  6. data/app/pb_kits/playbook/packs/examples.js +6 -0
  7. data/app/pb_kits/playbook/packs/site_styles/docs/_kit_doc.scss +22 -6
  8. data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +5 -1
  9. data/app/pb_kits/playbook/pb_background/_background.html.erb +14 -0
  10. data/app/pb_kits/playbook/pb_background/_background.jsx +64 -0
  11. data/app/pb_kits/playbook/pb_background/_background.scss +15 -0
  12. data/app/pb_kits/playbook/pb_background/background.rb +36 -0
  13. data/app/pb_kits/playbook/pb_background/docs/_background_default.html.erb +41 -0
  14. data/app/pb_kits/playbook/pb_background/docs/_background_default.jsx +75 -0
  15. data/app/pb_kits/playbook/pb_background/docs/example.yml +8 -0
  16. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  17. data/app/pb_kits/playbook/pb_badge/_badge.jsx +4 -2
  18. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +1 -1
  19. data/app/pb_kits/playbook/pb_button/_button.jsx +5 -1
  20. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.jsx +5 -1
  21. data/app/pb_kits/playbook/pb_caption/_caption.jsx +2 -2
  22. data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +5 -2
  23. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +3 -1
  24. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_options.html.erb +10 -0
  25. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +1 -0
  26. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.html.erb +1 -1
  27. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +130 -0
  28. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +1 -1
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +39 -0
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -0
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +28 -0
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +117 -0
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +53 -0
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -0
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +45 -0
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +30 -0
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +45 -0
  38. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +11 -0
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +9 -0
  40. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +5 -1
  41. data/app/pb_kits/playbook/pb_contact/_contact.jsx +5 -1
  42. data/app/pb_kits/playbook/pb_currency/_currency.jsx +5 -1
  43. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +5 -1
  44. data/app/pb_kits/playbook/pb_date/date.rb +2 -1
  45. data/app/pb_kits/playbook/pb_date/docs/_date_default.html.erb +8 -1
  46. data/app/pb_kits/playbook/pb_date/docs/_date_timezone.html.erb +51 -0
  47. data/app/pb_kits/playbook/pb_date/docs/_date_timezone.md +6 -0
  48. data/app/pb_kits/playbook/pb_date/docs/_description.md +2 -0
  49. data/app/pb_kits/playbook/pb_date/docs/example.yml +1 -0
  50. data/app/pb_kits/playbook/pb_date_picker/_date_picker.jsx +7 -4
  51. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +0 -4
  52. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -3
  53. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.js +8 -10
  54. data/app/pb_kits/playbook/pb_date_picker/docs/{_date_picker_read_only.html.erb → _date_picker_allow_input.html.erb} +1 -1
  55. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.jsx +13 -0
  56. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_allow_input.md +1 -0
  57. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +34 -0
  58. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.md +3 -0
  59. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +3 -2
  60. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
  61. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_calendar_input_icon.scss +1 -0
  62. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +5 -1
  63. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +2 -2
  64. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +5 -1
  65. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +2 -2
  66. data/app/pb_kits/playbook/pb_flex/_flex.jsx +2 -2
  67. data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +1 -1
  68. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +6 -1
  69. data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +3 -2
  70. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +1 -1
  71. data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +1 -1
  72. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +2 -2
  73. data/app/pb_kits/playbook/pb_icon/_icon.jsx +2 -2
  74. data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +5 -1
  75. data/app/pb_kits/playbook/pb_image/_image.jsx +5 -1
  76. data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +5 -1
  77. data/app/pb_kits/playbook/pb_layout/_layout.jsx +4 -4
  78. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +1 -1
  79. data/app/pb_kits/playbook/pb_list/_list.jsx +3 -2
  80. data/app/pb_kits/playbook/pb_list/_list_item.jsx +3 -2
  81. data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +5 -1
  82. data/app/pb_kits/playbook/pb_message/_message.jsx +5 -1
  83. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +5 -2
  84. data/app/pb_kits/playbook/pb_nav/_nav.jsx +2 -2
  85. data/app/pb_kits/playbook/pb_person/_person.jsx +5 -1
  86. data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +5 -1
  87. data/app/pb_kits/playbook/pb_popover/_popover.jsx +5 -1
  88. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +4 -4
  89. data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +1 -1
  90. data/app/pb_kits/playbook/pb_radio/_radio.html.erb +1 -1
  91. data/app/pb_kits/playbook/pb_radio/docs/_radio_options.html.erb +9 -0
  92. data/app/pb_kits/playbook/pb_radio/docs/example.yml +1 -0
  93. data/app/pb_kits/playbook/pb_radio/radio.rb +2 -4
  94. data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +1 -1
  95. data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
  96. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +2 -2
  97. data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +3 -3
  98. data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx +6 -1
  99. data/app/pb_kits/playbook/pb_table/_table.jsx +2 -2
  100. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +1 -1
  101. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +17 -8
  102. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +1 -1
  103. data/app/pb_kits/playbook/pb_time/_time.html.erb +23 -17
  104. data/app/pb_kits/playbook/pb_time/_time.jsx +22 -13
  105. data/app/pb_kits/playbook/pb_time/_time.scss +16 -8
  106. data/app/pb_kits/playbook/pb_time/docs/_time_align.html.erb +18 -0
  107. data/app/pb_kits/playbook/pb_time/docs/_time_align.jsx +3 -3
  108. data/app/pb_kits/playbook/pb_time/docs/_time_default.html.erb +47 -3
  109. data/app/pb_kits/playbook/pb_time/docs/_time_default.jsx +33 -4
  110. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.html.erb +11 -0
  111. data/app/pb_kits/playbook/pb_time/docs/_time_sizes.jsx +19 -0
  112. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.html.erb +3 -1
  113. data/app/pb_kits/playbook/pb_time/docs/_time_timestamp.jsx +0 -7
  114. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.html.erb +38 -0
  115. data/app/pb_kits/playbook/pb_time/docs/_time_timezone.jsx +12 -14
  116. data/app/pb_kits/playbook/pb_time/docs/example.yml +6 -2
  117. data/app/pb_kits/playbook/pb_time/docs/index.js +1 -0
  118. data/app/pb_kits/playbook/pb_time/time.rb +14 -2
  119. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +1 -1
  120. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +3 -3
  121. data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +1 -1
  122. data/app/pb_kits/playbook/pb_title/_title.jsx +5 -1
  123. data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +5 -1
  124. data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +1 -1
  125. data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +3 -3
  126. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +41 -43
  127. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -2
  128. data/app/pb_kits/playbook/pb_toggle/docs/index.js +0 -1
  129. data/app/pb_kits/playbook/pb_toggle/toggle.rb +2 -2
  130. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +60 -0
  131. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +20 -3
  132. data/app/pb_kits/playbook/pb_typeahead/components/Control.jsx +30 -0
  133. data/app/pb_kits/playbook/pb_typeahead/components/IndicatorsContainer.jsx +13 -0
  134. data/app/pb_kits/playbook/pb_typeahead/components/MenuList.jsx +12 -0
  135. data/app/pb_kits/playbook/pb_typeahead/components/MultiValue.jsx +51 -0
  136. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +34 -0
  137. data/app/pb_kits/playbook/pb_typeahead/components/Placeholder.jsx +13 -0
  138. data/app/pb_kits/playbook/pb_typeahead/components/ValueContainer.jsx +13 -0
  139. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +22 -0
  140. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +29 -0
  141. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +84 -0
  142. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_summary.jsx +45 -0
  143. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +101 -0
  144. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_summary.jsx +27 -0
  145. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +8 -2
  146. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +4 -0
  147. data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +5 -2
  148. data/app/pb_kits/playbook/plugins/pb_chart.js +1 -1
  149. data/app/pb_kits/playbook/tokens/_typography.scss +3 -3
  150. data/lib/generators/kit/templates/kit_jsx.erb.tt +1 -1
  151. data/lib/playbook/version.rb +1 -1
  152. metadata +50 -8
  153. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.jsx +0 -13
  154. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_read_only.md +0 -1
  155. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.html.erb +0 -11
  156. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_size.jsx +0 -44
@@ -77,7 +77,7 @@ export default class LineGraph extends React.Component<LineGraphProps> {
77
77
 
78
78
  return (
79
79
  <div
80
- className={classnames(className, globalProps(this.props))}
80
+ className={classnames(globalProps(this.props), className)}
81
81
  id={id}
82
82
  />
83
83
  )
@@ -52,8 +52,9 @@ const List = (props: ListProps) => {
52
52
  borderless: borderless,
53
53
  ordered: ordered,
54
54
  xpadding: xpadding,
55
- }), className,
56
- globalProps(props)
55
+ }),
56
+ globalProps(props),
57
+ className
57
58
  )
58
59
 
59
60
  return (
@@ -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'), className,
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(buildCss('pb_logistic_kit', { dark: dark }), className, globalProps(props))
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(buildCss(baseClassName), className, globalProps(props))
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(buildCss('pb_multiple_users_kit', reverseClass),
40
- className, globalProps(props))
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
@@ -40,8 +40,8 @@ const Nav = (props: NavProps) => {
40
40
  buildCss('pb_nav_list', variant, orientation, {
41
41
  highlight: highlight,
42
42
  }),
43
- className,
44
- globalProps(props)
43
+ globalProps(props),
44
+ className
45
45
  )
46
46
 
47
47
  return (
@@ -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(buildCss('pb_person_kit'), className, globalProps(props))
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(buildCss('pb_person_contact_kit'), className, globalProps(props))
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(buildCss('pb_popover_kit'), className, globalProps(props))
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
- className,
51
- buildCss('pb_progress_simple_kit', { muted: muted }, variantStyle, align)
50
+ buildCss('pb_progress_simple_kit', { muted }, variantStyle, align),
51
+ className
52
52
  )
53
53
 
54
54
  return (
@@ -32,7 +32,7 @@ const ProgressStep = (props: ProgressStepProps) => {
32
32
  )
33
33
 
34
34
  return (
35
- <ul className={classnames(progressStepCss, className, globalProps(props))}>
35
+ <ul className={classnames(progressStepCss, globalProps(props), className)}>
36
36
  {children}
37
37
  </ul>
38
38
  )
@@ -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>
@@ -0,0 +1,9 @@
1
+ <%= pb_rails("radio", props: {
2
+ text: "Radio with Options",
3
+ input_options: {
4
+ id: "radio-id",
5
+ name: "radio-name",
6
+ value: "radio-value",
7
+ class: "radio-class",
8
+ }
9
+ }) %>
@@ -4,6 +4,7 @@ examples:
4
4
  - radio_default: Default
5
5
  - radio_custom: Custom
6
6
  - radio_error: With Error
7
+ - radio_options: With Options
7
8
 
8
9
  react:
9
10
  - radio_default: Default
@@ -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), className, globalProps(props))
33
+ const classes = classnames(buildCss('pb_section_separator_kit', variant, orientation, themeStyle), globalProps(props), className)
34
34
 
35
35
  return (
36
36
 
@@ -11,7 +11,7 @@
11
11
  appearance: none;
12
12
  cursor: pointer;
13
13
  box-shadow: inset 0 -11px 20px rgba($primary, 0.05);
14
- padding-right: $space_lg;
14
+ padding-right: $space_xl;
15
15
  @media (hover:hover) {
16
16
  &:hover, &:active, &:focus {
17
17
  background-color: $focus_input_light;
@@ -33,9 +33,9 @@ const StatChange = (props: StatChangeProps) => {
33
33
  <If condition={value}>
34
34
  <div
35
35
  className={classnames(
36
- className,
37
36
  buildCss('pb_stat_change_kit', status),
38
- globalProps(props)
37
+ globalProps(props),
38
+ className
39
39
  )}
40
40
  id={id}
41
41
  >
@@ -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', className, globalProps(props))}
47
+ className={classnames('pb_stat_value_kit', globalProps(props), className)}
48
48
  id={id}
49
49
  >
50
50
  <div className="pb_stat_value_wrapper">
@@ -3,7 +3,12 @@ import { StatValue } from '../../'
3
3
 
4
4
  const StatValueDefault = () => {
5
5
  return (
6
- <StatValue value={1048} />
6
+ <>
7
+ <StatValue value={1048} />
8
+ <br />
9
+ <br />
10
+ <StatValue value={0} />
11
+ </>
7
12
  )
8
13
  }
9
14
 
@@ -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
  >
@@ -50,9 +50,9 @@ const TextInput = (props: TextInputProps) => {
50
50
  const dataProps = buildDataProps(data)
51
51
  const css = classnames([
52
52
  'pb_text_input_kit',
53
- className,
54
53
  error ? 'error' : null,
55
54
  globalProps(props),
55
+ className,
56
56
  ])
57
57
 
58
58
  return (
@@ -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, input:-webkit-autofill: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, input:-webkit-autofill: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', className, errorClass, resizeClass, globalProps(props))
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
- <% if object.size == "lg" %>
6
- <%= pb_rails("title", props: { tag: "span", text: object.format_time_string, size: 3 }) %>
7
- <%= content_tag(:span) do %>
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
- <% elsif object.size == "sm" %>
13
- <%= pb_rails("body", props: { tag: "span", text: object.format_time_string }) do %>
14
- <%= pb_rails("icon", props: { icon: "clock", fixed_width: true }) %>
15
- <%= content_tag(:time, datetime: object.pb_date_time.to_iso) do %>
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
- <% else %>
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
- <%= content_tag(:span, class: "pb_time_timezone") do %>
30
- <%= object.pb_date_time.to_timezone.upcase %>
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 %>