playbook_ui 13.12.0 → 13.13.0.pre.alpha.play900startratingasinput1657

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -1
  3. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +6 -2
  4. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -5
  5. data/app/pb_kits/playbook/pb_badge/_badge.tsx +5 -1
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +6 -2
  7. data/app/pb_kits/playbook/pb_body/_body.tsx +5 -1
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +5 -1
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +5 -2
  10. data/app/pb_kits/playbook/pb_button/_button.tsx +8 -1
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +5 -1
  12. data/app/pb_kits/playbook/pb_caption/_caption.tsx +6 -1
  13. data/app/pb_kits/playbook/pb_card/_card.tsx +5 -1
  14. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +7 -2
  15. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +7 -2
  16. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +5 -3
  17. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +5 -1
  18. data/app/pb_kits/playbook/pb_contact/_contact.tsx +5 -1
  19. data/app/pb_kits/playbook/pb_currency/_currency.tsx +5 -1
  20. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +5 -1
  21. data/app/pb_kits/playbook/pb_date/_date.tsx +12 -7
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +5 -1
  23. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +5 -1
  24. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +15 -4
  25. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +12 -5
  26. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +5 -1
  27. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +5 -1
  28. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +15 -4
  29. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -1
  30. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +11 -3
  31. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +8 -3
  32. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +5 -1
  33. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +8 -1
  34. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +6 -2
  35. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.md +1 -0
  36. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +6 -1
  37. data/app/pb_kits/playbook/pb_flex/_flex.tsx +6 -1
  38. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +6 -1
  39. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +5 -1
  40. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +7 -1
  41. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +6 -2
  42. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +5 -1
  43. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +5 -0
  44. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +10 -3
  45. data/app/pb_kits/playbook/pb_icon/_icon.tsx +7 -1
  46. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +5 -1
  47. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -1
  48. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +5 -1
  49. data/app/pb_kits/playbook/pb_image/_image.tsx +6 -1
  50. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +5 -1
  51. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +6 -2
  52. data/app/pb_kits/playbook/pb_layout/_layout.tsx +6 -1
  53. data/app/pb_kits/playbook/pb_legend/_legend.tsx +5 -1
  54. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +6 -1
  55. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -1
  56. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +9 -3
  57. data/app/pb_kits/playbook/pb_list/_list.tsx +7 -2
  58. data/app/pb_kits/playbook/pb_list/_list_item.tsx +5 -1
  59. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +5 -1
  60. data/app/pb_kits/playbook/pb_map/_map.tsx +6 -1
  61. data/app/pb_kits/playbook/pb_message/_message.tsx +5 -1
  62. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +5 -1
  63. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -1
  64. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +5 -1
  65. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +11 -0
  66. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +7 -0
  67. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +13 -0
  68. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +11 -0
  69. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +6 -0
  70. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +5 -1
  71. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +15 -0
  72. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +5 -0
  73. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +15 -0
  74. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +15 -0
  75. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +6 -0
  76. data/app/pb_kits/playbook/pb_nav/_item.tsx +7 -2
  77. data/app/pb_kits/playbook/pb_nav/_nav.tsx +5 -1
  78. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +5 -1
  79. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +6 -2
  80. data/app/pb_kits/playbook/pb_person/_person.tsx +5 -0
  81. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +5 -1
  82. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +8 -2
  83. data/app/pb_kits/playbook/pb_pill/_pill.tsx +5 -1
  84. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -1
  85. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +5 -1
  86. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +9 -3
  87. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +5 -1
  88. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +6 -2
  89. data/app/pb_kits/playbook/pb_radio/_radio.tsx +5 -1
  90. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +7 -1
  91. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +5 -1
  92. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children_swift.md +14 -0
  93. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed_swift.md +7 -0
  94. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line_swift.md +8 -0
  95. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_props_swift.md +8 -0
  96. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_swift.md +7 -0
  97. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical_swift.md +18 -0
  98. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +8 -0
  99. data/app/pb_kits/playbook/pb_select/_select.tsx +6 -1
  100. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +6 -2
  101. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +5 -0
  102. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +5 -0
  103. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +11 -3
  104. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +5 -1
  105. data/app/pb_kits/playbook/pb_source/_source.tsx +5 -1
  106. data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +105 -53
  107. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +183 -62
  108. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +2 -0
  109. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
  110. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
  111. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
  112. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
  113. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
  114. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +3 -1
  115. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +22 -5
  116. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
  117. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
  118. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
  119. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
  120. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
  121. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +8 -0
  122. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +48 -26
  123. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +82 -6
  124. data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +34 -34
  125. data/app/pb_kits/playbook/pb_star_rating/stars/primary_star.svg +3 -0
  126. data/app/pb_kits/playbook/pb_star_rating/stars/star_outline.svg +3 -0
  127. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_dark_star.svg +3 -0
  128. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_star.svg +3 -0
  129. data/app/pb_kits/playbook/pb_star_rating/stars/yellow_star.svg +3 -0
  130. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +14 -2
  131. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +6 -0
  132. data/app/pb_kits/playbook/pb_table/_table.tsx +5 -1
  133. data/app/pb_kits/playbook/pb_table/_table_row.tsx +5 -1
  134. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -1
  135. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +35 -0
  136. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +29 -0
  137. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +13 -0
  138. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +24 -0
  139. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +13 -0
  140. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +7 -0
  141. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +5 -2
  142. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md +27 -0
  143. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md +11 -0
  144. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md +9 -0
  145. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +5 -0
  146. data/app/pb_kits/playbook/pb_time/_time.tsx +9 -2
  147. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +5 -1
  148. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +6 -2
  149. data/app/pb_kits/playbook/pb_timeline/_item.tsx +9 -2
  150. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -1
  151. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +5 -1
  152. data/app/pb_kits/playbook/pb_title/_title.tsx +5 -1
  153. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +5 -1
  154. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +16 -3
  155. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +5 -0
  156. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +11 -0
  157. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +10 -0
  158. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +6 -0
  159. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +4 -0
  160. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +5 -1
  161. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +9 -3
  162. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +7 -2
  163. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -2
  164. data/app/pb_kits/playbook/pb_user/_user.tsx +5 -1
  165. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +5 -1
  166. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +5 -1
  167. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +5 -1
  168. data/app/pb_kits/playbook/utilities/props.ts +16 -0
  169. data/dist/playbook-rails.js +6 -6
  170. data/lib/playbook/version.rb +2 -2
  171. metadata +46 -7
@@ -3,7 +3,7 @@ import classnames from 'classnames'
3
3
  import useCollapsible from './useCollapsible'
4
4
 
5
5
  import { globalProps } from '../utilities/globalProps'
6
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
7
7
 
8
8
  import CollapsibleContent from './child_kits/CollapsibleContent'
9
9
  import CollapsibleMain from './child_kits/CollapsibleMain'
@@ -22,6 +22,7 @@ type CollapsibleProps = {
22
22
  iconSize?: IconSizes,
23
23
  onIconClick?: ()=> void,
24
24
  onClick?: ()=> void,
25
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
25
26
  id?: string,
26
27
  }
27
28
 
@@ -33,6 +34,7 @@ const Collapsible = ({
33
34
  children = [],
34
35
  collapsed = true,
35
36
  data = {},
37
+ htmlOptions = {},
36
38
  icon,
37
39
  iconColor = 'default',
38
40
  iconSize,
@@ -60,6 +62,7 @@ const Collapsible = ({
60
62
  const { children: contentChildren, ...contentProps } = Content.props
61
63
  const ariaProps = buildAriaProps(aria)
62
64
  const dataProps = buildDataProps(data)
65
+ const htmlProps = buildHtmlProps(htmlOptions)
63
66
  const classes = classnames(
64
67
  buildCss('pb_collapsible_kit'),
65
68
  globalProps(props),
@@ -70,6 +73,7 @@ const Collapsible = ({
70
73
  <div
71
74
  {...ariaProps}
72
75
  {...dataProps}
76
+ {...htmlProps}
73
77
  className={classes}
74
78
  id={id}
75
79
  >
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
@@ -51,6 +51,7 @@ type ContactProps = {
51
51
  contactType?: string,
52
52
  contactValue: string,
53
53
  data?: object,
54
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
54
55
  id?: string,
55
56
  }
56
57
 
@@ -62,9 +63,11 @@ const Contact = (props: ContactProps) => {
62
63
  contactType,
63
64
  contactValue,
64
65
  data = {},
66
+ htmlOptions = {},
65
67
  id } = props
66
68
  const ariaProps = buildAriaProps(aria)
67
69
  const dataProps = buildDataProps(data)
70
+ const htmlProps = buildHtmlProps(htmlOptions)
68
71
  const classes = classnames(
69
72
  buildCss('pb_contact_kit'),
70
73
  globalProps(props),
@@ -74,6 +77,7 @@ const Contact = (props: ContactProps) => {
74
77
  <div
75
78
  {...ariaProps}
76
79
  {...dataProps}
80
+ {...htmlProps}
77
81
  className={classes}
78
82
  id={id}
79
83
  >
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { globalProps } from '../utilities/globalProps'
5
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Caption from '../pb_caption/_caption'
@@ -18,6 +18,7 @@ type CurrencyProps = {
18
18
  data?: {[key:string]:string},
19
19
  decimals?: 'default' | 'matching',
20
20
  emphasized?: boolean,
21
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
21
22
  id?: string,
22
23
  label?: string,
23
24
  size?: 'sm' | 'md' | 'lg',
@@ -42,6 +43,7 @@ const Currency = (props: CurrencyProps) => {
42
43
  data = {},
43
44
  decimals = 'default',
44
45
  emphasized = true,
46
+ htmlOptions = {},
45
47
  id,
46
48
  unit,
47
49
  className,
@@ -65,6 +67,7 @@ const Currency = (props: CurrencyProps) => {
65
67
  const [whole, decimal = '00'] = amount.split('.')
66
68
  const ariaProps = buildAriaProps(aria)
67
69
  const dataProps = buildDataProps(data)
70
+ const htmlProps = buildHtmlProps(htmlOptions)
68
71
  const classes = classnames(
69
72
  buildCss('pb_currency_kit', align, size),
70
73
  globalProps(props),
@@ -96,6 +99,7 @@ const Currency = (props: CurrencyProps) => {
96
99
  <div
97
100
  {...ariaProps}
98
101
  {...dataProps}
102
+ {...htmlProps}
99
103
  className={classes}
100
104
  id={id}
101
105
  >
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
 
6
6
  import Body from '../pb_body/_body'
@@ -12,6 +12,7 @@ type DashboardValueProps = {
12
12
  aria?: { [key: string]: string },
13
13
  className?: string,
14
14
  data?: { [key: string]: string },
15
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
15
16
  id?: string,
16
17
  statChange?: {
17
18
  change? : 'increase' | 'decrease' | 'neutral',
@@ -30,6 +31,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
30
31
  aria = {},
31
32
  className,
32
33
  data = {},
34
+ htmlOptions = {},
33
35
  id,
34
36
  statChange = {},
35
37
  statLabel,
@@ -38,6 +40,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
38
40
 
39
41
  const ariaProps = buildAriaProps(aria)
40
42
  const dataProps = buildDataProps(data)
43
+ const htmlProps = buildHtmlProps(htmlOptions)
41
44
  const classes = classnames(
42
45
  buildCss('pb_dashboard_value_kit', align),
43
46
  globalProps(props),
@@ -48,6 +51,7 @@ const DashboardValue = (props: DashboardValueProps): React.ReactElement => {
48
51
  <div
49
52
  {...ariaProps}
50
53
  {...dataProps}
54
+ {...htmlProps}
51
55
  className={classes}
52
56
  id={id}
53
57
  >
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import classnames from "classnames";
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
5
5
  import { globalProps } from "../utilities/globalProps";
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
@@ -15,6 +15,7 @@ type PbDateProps = {
15
15
  aria?: { [key: string]: string };
16
16
  className?: string;
17
17
  data?: { [key: string]: string };
18
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
18
19
  id?: string;
19
20
  showDayOfWeek?: boolean;
20
21
  showIcon?: boolean;
@@ -29,6 +30,7 @@ const PbDate = (props: PbDateProps) => {
29
30
  alignment = "left",
30
31
  className,
31
32
  data = {},
33
+ htmlOptions = {},
32
34
  id,
33
35
  showDayOfWeek = false,
34
36
  showIcon = false,
@@ -43,8 +45,9 @@ const PbDate = (props: PbDateProps) => {
43
45
  const year = DateTime.toYear(value);
44
46
  const currentYear = new Date().getFullYear();
45
47
 
46
- const ariaProps = buildAriaProps(aria);
47
- const dataProps = buildDataProps(data);
48
+ const ariaProps = buildAriaProps(aria)
49
+ const dataProps = buildDataProps(data)
50
+ const htmlProps = buildHtmlProps(htmlOptions)
48
51
 
49
52
  const classes = classnames(
50
53
  buildCss("pb_date_kit", alignment),
@@ -53,10 +56,12 @@ const PbDate = (props: PbDateProps) => {
53
56
  );
54
57
 
55
58
  return (
56
- <div {...ariaProps}
57
- {...dataProps}
58
- className={classes}
59
- id={id}
59
+ <div
60
+ {...ariaProps}
61
+ {...dataProps}
62
+ {...htmlProps}
63
+ className={classes}
64
+ id={id}
60
65
  >
61
66
  {unstyled
62
67
  ? <>
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect } from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps, GlobalProps } from '../utilities/globalProps'
6
6
 
7
7
  import datePickerHelper from './date_picker_helper'
@@ -25,6 +25,7 @@ type DatePickerProps = {
25
25
  format?: string,
26
26
  hideIcon?: boolean,
27
27
  hideLabel?: boolean,
28
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
28
29
  id?: string,
29
30
  inLine?: boolean,
30
31
  inputAria?: { [key: string]: string },
@@ -67,6 +68,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
67
68
  format = 'm/d/Y',
68
69
  hideIcon = false,
69
70
  hideLabel = false,
71
+ htmlOptions = {},
70
72
  id,
71
73
  inLine = false,
72
74
  inputAria = {},
@@ -95,6 +97,7 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
95
97
 
96
98
  const ariaProps = buildAriaProps(aria)
97
99
  const dataProps = buildDataProps(data)
100
+ const htmlProps = buildHtmlProps(htmlOptions)
98
101
  const inputAriaProps = buildAriaProps(inputAria)
99
102
  const inputDataProps = buildDataProps(inputData)
100
103
 
@@ -158,6 +161,7 @@ useEffect(() => {
158
161
  <div
159
162
  {...ariaProps}
160
163
  {...dataProps}
164
+ {...htmlProps}
161
165
  className={classes}
162
166
  id={id}
163
167
  >
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { globalProps } from "../utilities/globalProps";
5
- import { buildCss, buildDataProps } from "../utilities/props";
5
+ import { buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
8
8
  import Body from "../pb_body/_body";
@@ -16,6 +16,7 @@ type DateRangeInlineProps = {
16
16
  align?: "left" | "center" | "vertical";
17
17
  size?: "sm" | "xs";
18
18
  dark?: boolean;
19
+ htmlOptions?: {[key: string]: string | number | boolean | Function};
19
20
  icon?: boolean;
20
21
  startDate?: Date;
21
22
  endDate?: Date;
@@ -40,6 +41,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
40
41
  size = "sm",
41
42
  align = "left",
42
43
  data = {},
44
+ htmlOptions = {},
43
45
  startDate,
44
46
  endDate,
45
47
  className,
@@ -79,6 +81,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
79
81
 
80
82
  const dateRangeClasses = buildCss("pb_date_range_inline_kit", align);
81
83
  const dataProps = buildDataProps(data)
84
+ const htmlProps = buildHtmlProps(htmlOptions)
82
85
  const renderTime = (date: Date) => {
83
86
  return (
84
87
  <time dateTime={dateTimeIso(date)}>
@@ -94,6 +97,7 @@ const DateRangeInline = (props: DateRangeInlineProps) => {
94
97
  return (
95
98
  <div
96
99
  {...dataProps}
100
+ {...htmlProps}
97
101
  className={classnames(dateRangeClasses, globalProps(props), className)}
98
102
  >
99
103
  <div className="pb_date_range_inline_wrapper">
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Body from '../pb_body/_body'
@@ -15,21 +15,32 @@ type DateRangeStackedProps = {
15
15
  data?: string,
16
16
  dark?: boolean,
17
17
  endDate: Date,
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
19
  id?: string,
19
20
  startDate: Date,
20
21
  }
21
22
 
22
23
  const DateRangeStacked = (props: DateRangeStackedProps) => {
23
- const { className, dark = false, endDate, startDate, data={} } = props
24
+ const {
25
+ className,
26
+ dark = false,
27
+ endDate,
28
+ htmlOptions={},
29
+ startDate,
30
+ data={},
31
+ } = props
24
32
  const css = classnames(
25
33
  buildCss('pb_date_range_stacked'),
26
34
  globalProps(props),
27
35
  className
28
36
  )
29
- const dataProps = buildDataProps(data)
37
+ const dataProps = buildDataProps(data)
38
+ const htmlProps = buildHtmlProps(htmlOptions)
30
39
 
31
40
  return (
32
- <div {...dataProps}
41
+ <div
42
+ {...dataProps}
43
+ {...htmlProps}
33
44
  className={css}
34
45
  >
35
46
  <Flex vertical="center">
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
3
  import classnames from "classnames";
4
- import { buildCss, buildDataProps } from "../utilities/props";
4
+ import { buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
5
5
  import { globalProps } from "../utilities/globalProps";
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
@@ -15,6 +15,7 @@ type DateStackedProps = {
15
15
  dark?: boolean;
16
16
  data?: string;
17
17
  date: Date;
18
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
18
19
  size?: "sm" | "md";
19
20
  id?: string;
20
21
  reverse?: boolean;
@@ -34,6 +35,7 @@ const DateStacked = (props: DateStackedProps) => {
34
35
  dark = false,
35
36
  date,
36
37
  data={},
38
+ htmlOptions={},
37
39
  size = "sm",
38
40
  } = props;
39
41
  const classes = classnames(
@@ -48,12 +50,15 @@ const DateStacked = (props: DateStackedProps) => {
48
50
  const currentYear = new Date().getFullYear()
49
51
  const inputYear = DateTime.toYear(date);
50
52
  const dataProps = buildDataProps(data)
53
+ const htmlProps = buildHtmlProps(htmlOptions)
51
54
 
52
55
  return (
53
56
  <>
54
57
  {bold == false ? (
55
- <div {...dataProps}
56
- className={classes}
58
+ <div
59
+ {...dataProps}
60
+ {...htmlProps}
61
+ className={classes}
57
62
  >
58
63
  <div className="pb_date_stacked_day_month">
59
64
  <Caption text={DateTime.toMonth(date).toUpperCase()} />
@@ -66,8 +71,10 @@ const DateStacked = (props: DateStackedProps) => {
66
71
  {currentYear != inputYear && <Caption size="xs">{inputYear}</Caption>}
67
72
  </div>
68
73
  ) : (
69
- <div {...dataProps}
70
- className={classes}
74
+ <div
75
+ {...dataProps}
76
+ {...htmlProps}
77
+ className={classes}
71
78
  >
72
79
  <div className="pb_date_stacked_day_month">
73
80
  <Title
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Flex from '../pb_flex/_flex'
@@ -14,6 +14,7 @@ type DateTimeProps = {
14
14
  className?: string,
15
15
  data?: { [key: string]: string; },
16
16
  datetime: Date,
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
18
  id?: string,
18
19
  size?: "sm" | "md",
19
20
  showDayOfWeek: boolean,
@@ -27,6 +28,7 @@ const DateTime = (props: DateTimeProps) => {
27
28
  aria = {},
28
29
  className,
29
30
  data = {},
31
+ htmlOptions = {},
30
32
  showDayOfWeek = false,
31
33
  datetime,
32
34
  id,
@@ -37,6 +39,7 @@ const DateTime = (props: DateTimeProps) => {
37
39
 
38
40
  const ariaProps = buildAriaProps(aria)
39
41
  const dataProps = buildDataProps(data)
42
+ const htmlProps = buildHtmlProps(htmlOptions)
40
43
  const classes = classnames(
41
44
  buildCss('pb_date_time', size),
42
45
  globalProps(props),
@@ -47,6 +50,7 @@ const DateTime = (props: DateTimeProps) => {
47
50
  <div
48
51
  {...ariaProps}
49
52
  {...dataProps}
53
+ {...htmlProps}
50
54
  className={classes}
51
55
  id={id}
52
56
  >
@@ -1,7 +1,7 @@
1
1
 
2
2
  import React from 'react'
3
3
 
4
- import { buildCss } from '../utilities/props'
4
+ import { buildCss, buildHtmlProps } from '../utilities/props'
5
5
  import { deprecatedProps, globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Flex from '../pb_flex/_flex'
@@ -11,6 +11,7 @@ import TimeStacked from '../pb_time_stacked/_time_stacked'
11
11
  import DateStacked from '../pb_date_stacked/_date_stacked'
12
12
 
13
13
  type DateTimeStackedProps = {
14
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
14
15
  id?: string,
15
16
  date: Date,
16
17
  datetime: Date,
@@ -25,15 +26,18 @@ const DateTimeStacked = (props: DateTimeStackedProps): React.ReactElement => {
25
26
  date,
26
27
  datetime,
27
28
  dark,
29
+ htmlOptions = {},
28
30
  timeZone = 'America/New_York',
29
31
  } = props
30
32
 
31
33
  const classes = buildCss('pb_date_time_stacked_kit', globalProps(props))
34
+ const htmlProps = buildHtmlProps(htmlOptions)
32
35
 
33
36
  return (
34
37
  <Flex
35
38
  inline={false}
36
39
  vertical="stretch"
40
+ {...htmlProps}
37
41
  {...props}
38
42
  >
39
43
  <FlexItem>
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildCss, buildDataProps } from '../utilities/props'
4
+ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
@@ -14,20 +14,31 @@ type DateYearStackedProps = {
14
14
  dark?: boolean,
15
15
  data?: string,
16
16
  date: Date,
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
18
  id?: string,
18
19
  }
19
20
 
20
21
  const DateYearStacked = (props: DateYearStackedProps) => {
21
- const { align = 'left', className, dark = false, date, data={} } = props
22
+ const {
23
+ align = 'left',
24
+ className,
25
+ dark = false,
26
+ date,
27
+ data={},
28
+ htmlOptions = {},
29
+ } = props
22
30
  const css = classnames(
23
31
  buildCss('pb_date_year_stacked', align),
24
32
  globalProps(props),
25
33
  className
26
34
  )
27
- const dataProps = buildDataProps(data)
35
+ const dataProps = buildDataProps(data)
36
+ const htmlProps = buildHtmlProps(htmlOptions)
28
37
 
29
38
  return (
30
- <div {...dataProps}
39
+ <div
40
+ {...dataProps}
41
+ {...htmlProps}
31
42
  className={css}
32
43
  >
33
44
  <Title
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { globalProps, GlobalProps } from '../utilities/globalProps'
5
5
 
6
6
  type DetailProps = {
@@ -11,6 +11,7 @@ type DetailProps = {
11
11
  color?: 'light' | 'default' | 'lighter' | 'link' | 'error' | 'success',
12
12
  dark?: boolean,
13
13
  data?: { [key: string]: string },
14
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
14
15
  id?: string,
15
16
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
16
17
  text?: string,
@@ -24,6 +25,7 @@ const Detail = (props: DetailProps) => {
24
25
  className,
25
26
  color = 'light',
26
27
  data = {},
28
+ htmlOptions = {},
27
29
  id = '',
28
30
  tag = 'div',
29
31
  text= ''
@@ -31,6 +33,7 @@ const Detail = (props: DetailProps) => {
31
33
 
32
34
  const ariaProps: {[key: string]: any} = buildAriaProps(aria)
33
35
  const dataProps: {[key: string]: any} = buildDataProps(data)
36
+ const htmlProps = buildHtmlProps(htmlOptions);
34
37
  const isBold = bold ? "bold" : null
35
38
  const classes = classnames(
36
39
  buildCss('pb_detail_kit', color),
@@ -44,6 +47,7 @@ const Detail = (props: DetailProps) => {
44
47
  <Tag
45
48
  {...ariaProps}
46
49
  {...dataProps}
50
+ {...htmlProps}
47
51
  className={classes}
48
52
  id={id}
49
53
  >
@@ -5,7 +5,7 @@ import React, { useState } from "react";
5
5
  import classnames from "classnames";
6
6
  import Modal from "react-modal";
7
7
 
8
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props";
8
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
9
9
  import { globalProps } from "../utilities/globalProps";
10
10
 
11
11
  import Body from "../pb_body/_body";
@@ -26,6 +26,7 @@ type DialogProps = {
26
26
  closeable: boolean;
27
27
  confirmButton?: string;
28
28
  data?: object;
29
+ htmlOptions?: { [key: string]: string | number | boolean | Function };
29
30
  id?: string;
30
31
  fullHeight?: boolean;
31
32
  loading?: boolean;
@@ -51,6 +52,7 @@ const Dialog = (props: DialogProps) => {
51
52
  confirmButton,
52
53
  className,
53
54
  data = {},
55
+ htmlOptions = {},
54
56
  id,
55
57
  size = "md",
56
58
  children,
@@ -69,7 +71,8 @@ const Dialog = (props: DialogProps) => {
69
71
  trigger,
70
72
  } = props;
71
73
  const ariaProps = buildAriaProps(aria);
72
- const dataProps = buildDataProps(data);
74
+ const dataProps = buildDataProps(data)
75
+ const htmlProps = buildHtmlProps(htmlOptions);
73
76
  const dialogClassNames = {
74
77
  base: classnames("pb_dialog", buildCss("pb_dialog", size, placement)),
75
78
  afterOpen: "pb_dialog_after_open",
@@ -164,7 +167,12 @@ const Dialog = (props: DialogProps) => {
164
167
 
165
168
  return (
166
169
  <DialogContext.Provider value={api}>
167
- <div {...ariaProps} {...dataProps} className={classes}>
170
+ <div
171
+ {...ariaProps}
172
+ {...dataProps}
173
+ {...htmlProps}
174
+ className={classes}
175
+ >
168
176
  <Modal
169
177
  ariaHideApp={false}
170
178
  className={dialogClassNames}
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildCss } from '../../utilities/props'
4
+ import { buildCss, buildHtmlProps } from '../../utilities/props'
5
5
  import { GlobalProps, globalProps } from '../../utilities/globalProps'
6
6
 
7
7
  import Flex from '../../pb_flex/_flex'
@@ -13,6 +13,7 @@ type DialogFooterProps = {
13
13
  children: React.ReactChild[] | React.ReactChild | string,
14
14
  className?: string,
15
15
  data?: {[key: string]: string},
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
16
17
  id?: string,
17
18
  padding?: string,
18
19
  paddingBottom?: string,
@@ -26,15 +27,19 @@ const DialogFooter = (props: DialogFooterProps) => {
26
27
  const {
27
28
  children,
28
29
  className,
30
+ htmlOptions = {},
29
31
  spacing = "between",
30
32
  separator = false,
31
33
  } = props
32
34
 
33
35
  const footerCSS = buildCss("dialog_footer")
34
36
  const footerSpacing = globalProps(props)
37
+ const htmlProps = buildHtmlProps(htmlOptions)
35
38
 
36
39
  return (
37
- <>
40
+ <div
41
+ {...htmlProps}
42
+ >
38
43
  {separator &&
39
44
  <SectionSeparator />
40
45
  }
@@ -46,7 +51,7 @@ const DialogFooter = (props: DialogFooterProps) => {
46
51
  >
47
52
  {children}
48
53
  </Flex>
49
- </>
54
+ </div>
50
55
  )
51
56
  }
52
57
 
@@ -1,6 +1,6 @@
1
1
  import React, { useContext } from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps } from '../../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../../utilities/props'
4
4
  import { globalProps, GlobalProps } from '../../utilities/globalProps'
5
5
 
6
6
  import { CloseIcon } from '../_close_icon'
@@ -14,6 +14,7 @@ type DialogHeaderProps = {
14
14
  className?: string,
15
15
  closeable?: boolean,
16
16
  data?: object,
17
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
17
18
  id?: string,
18
19
  padding?: string,
19
20
  separator?: boolean,
@@ -28,6 +29,7 @@ const DialogHeader = (props: DialogHeaderProps) => {
28
29
  children,
29
30
  className,
30
31
  data = {},
32
+ htmlOptions = {},
31
33
  spacing = "between",
32
34
  closeable = true,
33
35
  separator = true,
@@ -35,6 +37,7 @@ const DialogHeader = (props: DialogHeaderProps) => {
35
37
 
36
38
  const ariaProps = buildAriaProps(aria)
37
39
  const dataProps = buildDataProps(data)
40
+ const htmlProps = buildHtmlProps(htmlOptions)
38
41
  const api = useContext(DialogContext)
39
42
  const headerCSS = buildCss("dialog_header")
40
43
  const headerSpacing = globalProps(props)
@@ -46,6 +49,7 @@ const DialogHeader = (props: DialogHeaderProps) => {
46
49
  <Flex
47
50
  {...ariaProps}
48
51
  {...dataProps}
52
+ {...htmlProps}
49
53
  className={classnames(headerCSS, headerSpacing, className)}
50
54
  spacing={spacing}
51
55
  >