playbook_ui 13.12.0.pre.alpha.play10281596 → 13.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +1 -5
  3. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +2 -6
  4. data/app/pb_kits/playbook/pb_background/_background.tsx +5 -9
  5. data/app/pb_kits/playbook/pb_badge/_badge.tsx +1 -5
  6. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +2 -6
  7. data/app/pb_kits/playbook/pb_body/_body.tsx +1 -5
  8. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +1 -5
  9. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +2 -5
  10. data/app/pb_kits/playbook/pb_button/_button.tsx +1 -8
  11. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +1 -5
  12. data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -6
  13. data/app/pb_kits/playbook/pb_card/_card.tsx +1 -5
  14. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +2 -7
  15. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +2 -7
  16. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +3 -5
  17. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +1 -5
  18. data/app/pb_kits/playbook/pb_contact/_contact.tsx +1 -5
  19. data/app/pb_kits/playbook/pb_currency/_currency.tsx +1 -5
  20. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -5
  21. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -12
  22. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -5
  23. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -5
  24. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +4 -15
  25. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +5 -12
  26. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +1 -5
  27. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -5
  28. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +4 -15
  29. data/app/pb_kits/playbook/pb_detail/_detail.tsx +1 -5
  30. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +3 -11
  31. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +3 -8
  32. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +1 -5
  33. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +1 -8
  34. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +2 -6
  35. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -6
  36. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -6
  37. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -6
  38. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -5
  39. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -7
  40. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +2 -6
  41. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -5
  42. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +0 -5
  43. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +3 -10
  44. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -7
  45. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -5
  46. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -5
  47. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -5
  48. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -6
  49. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -5
  50. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +2 -6
  51. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -6
  52. data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -5
  53. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -6
  54. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -5
  55. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +3 -9
  56. data/app/pb_kits/playbook/pb_list/_list.tsx +2 -7
  57. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -5
  58. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -5
  59. data/app/pb_kits/playbook/pb_map/_map.tsx +1 -6
  60. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -5
  61. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -5
  62. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -5
  63. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -5
  64. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +0 -6
  65. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -5
  66. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +0 -6
  67. data/app/pb_kits/playbook/pb_nav/_item.tsx +2 -7
  68. data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -5
  69. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -5
  70. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -6
  71. data/app/pb_kits/playbook/pb_person/_person.tsx +0 -5
  72. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -5
  73. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +2 -8
  74. data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -5
  75. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -6
  76. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -5
  77. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +3 -9
  78. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -5
  79. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +2 -6
  80. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -5
  81. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -7
  82. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -5
  83. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -8
  84. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -6
  85. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +2 -6
  86. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +0 -5
  87. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +0 -5
  88. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -11
  89. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -5
  90. data/app/pb_kits/playbook/pb_source/_source.tsx +1 -5
  91. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -5
  92. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +2 -14
  93. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +0 -6
  94. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -5
  95. data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -5
  96. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -5
  97. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -7
  98. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +2 -5
  99. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +0 -5
  100. data/app/pb_kits/playbook/pb_time/_time.tsx +2 -9
  101. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -5
  102. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +2 -6
  103. data/app/pb_kits/playbook/pb_timeline/_item.tsx +2 -9
  104. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -5
  105. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -5
  106. data/app/pb_kits/playbook/pb_title/_title.tsx +1 -5
  107. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -5
  108. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +3 -16
  109. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +0 -5
  110. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +0 -4
  111. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -5
  112. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +3 -9
  113. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +2 -7
  114. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -5
  115. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -5
  116. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -5
  117. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -5
  118. data/app/pb_kits/playbook/utilities/props.ts +0 -16
  119. data/dist/playbook-rails.js +5 -5
  120. data/lib/playbook/version.rb +2 -2
  121. metadata +7 -32
  122. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +0 -11
  123. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +0 -7
  124. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +0 -13
  125. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +0 -11
  126. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +0 -15
  127. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +0 -5
  128. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +0 -15
  129. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +0 -15
  130. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children_swift.md +0 -14
  131. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed_swift.md +0 -7
  132. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line_swift.md +0 -8
  133. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_props_swift.md +0 -8
  134. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text_swift.md +0 -7
  135. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical_swift.md +0 -18
  136. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +0 -35
  137. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +0 -29
  138. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +0 -13
  139. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +0 -24
  140. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +0 -13
  141. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default_swift.md +0 -27
  142. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error_swift.md +0 -11
  143. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_props_swift.md +0 -9
  144. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +0 -11
  145. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +0 -10
  146. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +0 -6
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildCss, buildHtmlProps } from '../utilities/props'
4
+ import { buildCss } from '../utilities/props'
5
5
 
6
6
  import DateStacked from '../pb_date_stacked/_date_stacked'
7
7
  import IconCircle from '../pb_icon_circle/_icon_circle'
@@ -10,7 +10,6 @@ type ItemProps = {
10
10
  className?: string,
11
11
  children?: React.ReactNode[] | React.ReactNode,
12
12
  date?: Date,
13
- htmlOptions?: {[key: string]: string | number | boolean | Function},
14
13
  icon?: string,
15
14
  iconColor?: 'default' | 'royal' | 'blue' | 'purple' | 'teal' | 'red' | 'yellow' | 'green',
16
15
  lineStyle?: 'solid' | 'dotted',
@@ -20,7 +19,6 @@ const TimelineItem = ({
20
19
  className,
21
20
  children,
22
21
  date,
23
- htmlOptions = {},
24
22
  icon = 'user',
25
23
  iconColor = 'default',
26
24
  lineStyle = 'solid',
@@ -28,13 +26,8 @@ const TimelineItem = ({
28
26
  }: ItemProps) => {
29
27
  const timelineItemCss = buildCss('pb_timeline_item_kit', lineStyle)
30
28
 
31
- const htmlProps = buildHtmlProps(htmlOptions)
32
-
33
29
  return (
34
- <div
35
- {...htmlProps}
36
- className={classnames(timelineItemCss, className)}
37
- >
30
+ <div className={classnames(timelineItemCss, className)}>
38
31
  <div className="pb_timeline_item_left_block">
39
32
  {date &&
40
33
  <DateStacked
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
5
 
6
6
  import TimelineItem from './_item'
7
7
 
@@ -10,7 +10,6 @@ type TimelineProps = {
10
10
  children?: React.ReactChild[] | React.ReactChild,
11
11
  className?: string,
12
12
  data?: { [key: string]: string },
13
- htmlOptions?: {[key: string]: string | number | boolean | Function},
14
13
  id?: string,
15
14
  orientation?: string,
16
15
  showDate?: boolean,
@@ -21,21 +20,18 @@ const Timeline = ({
21
20
  className,
22
21
  children,
23
22
  data = {},
24
- htmlOptions = {},
25
23
  id,
26
24
  orientation = 'horizontal',
27
25
  showDate = false,
28
26
  }: TimelineProps) => {
29
27
  const ariaProps = buildAriaProps(aria)
30
28
  const dataProps = buildDataProps(data)
31
- const htmlProps = buildHtmlProps(htmlOptions)
32
29
  const dateStyle = showDate === true ? '_with_date' : ''
33
30
  const timelineCss = buildCss('pb_timeline_kit', `_${orientation}`, dateStyle)
34
31
  return (
35
32
  <div
36
33
  {...ariaProps}
37
34
  {...dataProps}
38
- {...htmlProps}
39
35
  className={classnames(timelineCss, className)}
40
36
  id={id}
41
37
  >
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
5
  import { globalProps } from '../utilities/globalProps'
6
6
  import DateTime from '../pb_kit/dateTime';
7
7
 
@@ -16,7 +16,6 @@ type TimestampProps = {
16
16
  text: string,
17
17
  timestamp: Date | string,
18
18
  timezone: string,
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
20
19
  id?: string,
21
20
  showDate?: boolean,
22
21
  showUser?: boolean,
@@ -33,7 +32,6 @@ const Timestamp = (props: TimestampProps): React.ReactElement => {
33
32
  className,
34
33
  dark = false,
35
34
  data = {},
36
- htmlOptions = {},
37
35
  text,
38
36
  timezone,
39
37
  timestamp,
@@ -47,7 +45,6 @@ const Timestamp = (props: TimestampProps): React.ReactElement => {
47
45
 
48
46
  const ariaProps = buildAriaProps(aria)
49
47
  const dataProps = buildDataProps(data)
50
- const htmlProps = buildHtmlProps(htmlOptions)
51
48
  const classes = classnames(
52
49
  buildCss('pb_timestamp_kit', align, {
53
50
  dark: dark,
@@ -104,7 +101,6 @@ const Timestamp = (props: TimestampProps): React.ReactElement => {
104
101
  <div
105
102
  {...ariaProps}
106
103
  {...dataProps}
107
- {...htmlProps}
108
104
  className={classes}
109
105
  >
110
106
  <div className="pb_timestamp_kit">
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
4
  import { deprecatedProps, GlobalProps, globalProps } from '../utilities/globalProps'
5
5
 
6
6
  type SizeType = 1 | 2 | 3 | 4 | "1" | "2" | "3" | "4"
@@ -13,7 +13,6 @@ type TitleProps = {
13
13
  className?: string,
14
14
  color?: "default" | "light" | "lighter" | "success" | "error" | "link",
15
15
  data?: {[key: string]: string},
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
17
16
  id?: string,
18
17
  size?: SizeType | SizeResponsiveType,
19
18
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div" | "span",
@@ -30,7 +29,6 @@ const Title = (props: TitleProps): React.ReactElement => {
30
29
  className,
31
30
  color,
32
31
  data = {},
33
- htmlOptions = {},
34
32
  id,
35
33
  size = 3,
36
34
  bold = true,
@@ -42,7 +40,6 @@ const Title = (props: TitleProps): React.ReactElement => {
42
40
 
43
41
  const ariaProps: {[key: string]: string | number} = buildAriaProps(aria)
44
42
  const dataProps: {[key: string]: string | number} = buildDataProps(data)
45
- const htmlProps = buildHtmlProps(htmlOptions)
46
43
  const getBold = bold ? '' : 'thin'
47
44
  const isTruncated = truncate ? `truncate-${truncate}` : null
48
45
  const isSizeNumberOrString = typeof size === "number" || typeof size === "string"
@@ -71,7 +68,6 @@ const Title = (props: TitleProps): React.ReactElement => {
71
68
  <Tag
72
69
  {...ariaProps}
73
70
  {...dataProps}
74
- {...htmlProps}
75
71
  className={classes}
76
72
  id={id}
77
73
  >
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
 
6
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
7
  import { globalProps } from '../utilities/globalProps'
8
8
 
9
9
  import Body from '../pb_body/_body'
@@ -16,7 +16,6 @@ type TitleCountProps = {
16
16
  count?: number,
17
17
  dark?: boolean,
18
18
  data?: { [key: string]: string },
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
20
19
  id?: string,
21
20
  title?: string,
22
21
  size?: "lg" | "sm",
@@ -29,14 +28,12 @@ const TitleCount = (props: TitleCountProps): React.ReactElement => {
29
28
  className,
30
29
  dark = false,
31
30
  data = {},
32
- htmlOptions = {},
33
31
  count,
34
32
  id,
35
33
  title,
36
34
  size = 'sm' } = props
37
35
  const ariaProps = buildAriaProps(aria)
38
36
  const dataProps = buildDataProps(data)
39
- const htmlProps = buildHtmlProps(htmlOptions)
40
37
 
41
38
  const css = classnames(
42
39
  buildCss('pb_title_count_kit', align, size),
@@ -50,7 +47,6 @@ const TitleCount = (props: TitleCountProps): React.ReactElement => {
50
47
  <div
51
48
  {...ariaProps}
52
49
  {...dataProps}
53
- {...htmlProps}
54
50
  className={css}
55
51
  id={id}
56
52
  >
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
4
  import { GlobalProps, globalProps } from '../utilities/globalProps'
5
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
6
 
7
7
  import Body from '../pb_body/_body'
8
8
  import Title from '../pb_title/_title'
@@ -13,33 +13,20 @@ type TitleDetailProps = {
13
13
  className?: string,
14
14
  data?: { [key: string]: string },
15
15
  detail: string,
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
17
16
  id?: string,
18
17
  title: string,
19
18
  } & GlobalProps
20
19
 
21
20
  const TitleDetail = (props: TitleDetailProps) => {
22
- const {
23
- align = "left",
24
- aria = {},
25
- className,
26
- data = {},
27
- detail,
28
- htmlOptions = {},
29
- id,
30
- title,
31
- } = props
32
-
21
+ const { align = 'left', aria = {}, className, data = {}, detail, id, title } = props
33
22
  const ariaProps = buildAriaProps(aria)
34
23
  const dataProps = buildDataProps(data)
35
- const htmlProps = buildHtmlProps(htmlOptions)
36
- const pbCss = buildCss("pb_title_detail_kit", align)
24
+ const pbCss = buildCss('pb_title_detail_kit', align)
37
25
 
38
26
  return (
39
27
  <div
40
28
  {...ariaProps}
41
29
  {...dataProps}
42
- {...htmlProps}
43
30
  className={classnames(pbCss, globalProps(props), className)}
44
31
  id={id}
45
32
  >
@@ -6,7 +6,6 @@ import {
6
6
  buildAriaProps,
7
7
  buildCss,
8
8
  buildDataProps,
9
- buildHtmlProps,
10
9
  } from '../utilities/props'
11
10
 
12
11
  import { GlobalProps, globalProps } from '../utilities/globalProps'
@@ -17,7 +16,6 @@ type Props = {
17
16
  children?: React.ReactNode | React.ReactNode[],
18
17
  className?: string,
19
18
  data?: { [key: string]: string },
20
- htmlOptions?: {[key: string]: string | number | boolean | Function},
21
19
  id?: string,
22
20
  name?: string,
23
21
  onChange?: InputCallback<HTMLInputElement>,
@@ -32,7 +30,6 @@ const Toggle = ({
32
30
  className,
33
31
  data = {},
34
32
  id,
35
- htmlOptions = {},
36
33
  name,
37
34
  onChange = () => { },
38
35
  size = 'sm',
@@ -41,7 +38,6 @@ const Toggle = ({
41
38
  }: Props) => {
42
39
  const ariaProps = buildAriaProps(aria)
43
40
  const dataProps = buildDataProps(data)
44
- const htmlProps = buildHtmlProps(htmlOptions)
45
41
  const css = classnames(
46
42
  buildCss('pb_toggle_kit',
47
43
  size,
@@ -55,7 +51,6 @@ const Toggle = ({
55
51
  <div
56
52
  {...ariaProps}
57
53
  {...dataProps}
58
- {...htmlProps}
59
54
  className={classnames(css, globalProps(props), className)}
60
55
  id={id}
61
56
  >
@@ -13,7 +13,3 @@ examples:
13
13
  - toggle_custom: Custom checkbox input
14
14
  - toggle_custom_radio: Custom radio inputs
15
15
 
16
- swift:
17
- - toggle_default_swift: Default State
18
- - toggle_name_swift: Name and Value
19
- - toggle_props_swift: ""
@@ -14,7 +14,7 @@ import {
14
14
 
15
15
  import classnames from "classnames"
16
16
  import { GlobalProps, globalProps } from "../utilities/globalProps"
17
- import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props"
17
+ import { buildAriaProps, buildDataProps } from "../utilities/props"
18
18
  import Flex from "../pb_flex/_flex"
19
19
 
20
20
  type TooltipProps = {
@@ -23,7 +23,6 @@ type TooltipProps = {
23
23
  children: JSX.Element,
24
24
  data?: { [key: string]: string },
25
25
  delay?: number | Partial<{open: number; close: number}>,
26
- htmlOptions?: {[key: string]: string | number | boolean | Function},
27
26
  icon?: string,
28
27
  interaction?: boolean,
29
28
  placement?: Placement,
@@ -39,7 +38,6 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
39
38
  children,
40
39
  data = {},
41
40
  delay = 0,
42
- htmlOptions = {},
43
41
  icon = null,
44
42
  interaction = false,
45
43
  placement: preferredPlacement = "top",
@@ -52,7 +50,6 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
52
50
 
53
51
  const dataProps: { [key: string]: any } = buildDataProps(data)
54
52
  const ariaProps: { [key: string]: any } = buildAriaProps(aria)
55
- const htmlProps = buildHtmlProps(htmlOptions)
56
53
 
57
54
  const css = classnames(
58
55
  globalProps({...rest}),
@@ -130,7 +127,6 @@ const Tooltip = forwardRef((props: TooltipProps, ref: ForwardedRef<unknown>): Re
130
127
  style={{ display: "inline-flex" }}
131
128
  {...ariaProps}
132
129
  {...dataProps}
133
- {...htmlProps}
134
130
  >
135
131
  {children}
136
132
  </div>
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { globalProps } from "../utilities/globalProps";
5
- import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
5
+ import { buildAriaProps, buildDataProps } from "../utilities/props";
6
6
 
7
7
  import HighchartsReact from "highcharts-react-official";
8
8
  import Highcharts from "highcharts";
@@ -25,7 +25,6 @@ type TreemapChartProps = {
25
25
  drillable: boolean;
26
26
  grouped: boolean;
27
27
  height?: string;
28
- htmlOptions?: {[key: string]: string | number | boolean | Function};
29
28
  id: number | string;
30
29
  title?: string;
31
30
  tooltipHtml: string;
@@ -43,18 +42,14 @@ const TreemapChart = ({
43
42
  drillable = false,
44
43
  grouped = false,
45
44
  height,
46
- htmlOptions = {},
47
45
  id,
48
46
  title = "",
49
47
  tooltipHtml = '<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.value}</b>',
50
48
  type = "treemap",
51
49
  ...props
52
50
  }: TreemapChartProps) => {
53
-
54
- const ariaProps = buildAriaProps(aria)
55
- const dataProps = buildDataProps(data)
56
- const htmlProps = buildHtmlProps(htmlOptions)
57
-
51
+ const ariaProps = buildAriaProps(aria);
52
+ const dataProps = buildDataProps(data);
58
53
  const setupTheme = () => {
59
54
  dark
60
55
  ? Highcharts.setOptions(highchartsDarkTheme)
@@ -106,7 +101,6 @@ const TreemapChart = ({
106
101
  id: id,
107
102
  ...ariaProps,
108
103
  ...dataProps,
109
- ...htmlProps
110
104
  }}
111
105
  highcharts={Highcharts}
112
106
  options={options}
@@ -16,7 +16,7 @@ import Option from './components/Option'
16
16
  import Placeholder from './components/Placeholder'
17
17
  import ValueContainer from './components/ValueContainer'
18
18
 
19
- import { noop, buildDataProps, buildHtmlProps } from '../utilities/props'
19
+ import { noop, buildDataProps } from '../utilities/props'
20
20
  import { Noop } from '../types'
21
21
 
22
22
  /**
@@ -34,7 +34,6 @@ type TypeaheadProps = {
34
34
  dark?: boolean,
35
35
  data?: { [key: string]: string },
36
36
  error?: string,
37
- htmlOptions?: {[key: string]: string | number | boolean | Function},
38
37
  id?: string,
39
38
  label?: string,
40
39
  loadOptions?: string | Noop,
@@ -69,7 +68,6 @@ const Typeahead = ({
69
68
  data = {},
70
69
  getOptionLabel,
71
70
  getOptionValue,
72
- htmlOptions = {},
73
71
  id,
74
72
  loadOptions = noop,
75
73
  ...props
@@ -127,7 +125,6 @@ const Typeahead = ({
127
125
  }
128
126
 
129
127
  const dataProps = buildDataProps(data)
130
- const htmlProps = buildHtmlProps(htmlOptions)
131
128
  const classes = classnames(
132
129
  'pb_typeahead_kit react-select',
133
130
  globalProps(props),
@@ -137,9 +134,7 @@ const Typeahead = ({
137
134
  const inlineClass = selectProps.inline ? 'inline' : null
138
135
 
139
136
  return (
140
- <div
141
- {...dataProps}
142
- {...htmlProps}
137
+ <div {...dataProps}
143
138
  className={classnames(classes, inlineClass)}
144
139
  >
145
140
  <Tag
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
 
4
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
5
  import { GlobalProps, globalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Avatar from '../pb_avatar/_avatar'
@@ -16,7 +16,6 @@ type UserProps = {
16
16
  className?: string,
17
17
  dark?: boolean,
18
18
  data?: {[key: string]: string},
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
20
19
  id?: string,
21
20
  name?: string,
22
21
  orientation?: "horizontal" | "vertical",
@@ -35,7 +34,6 @@ const User = (props: UserProps) => {
35
34
  className,
36
35
  dark = false,
37
36
  data = {},
38
- htmlOptions = {},
39
37
  id,
40
38
  name,
41
39
  orientation = 'horizontal',
@@ -47,7 +45,6 @@ const User = (props: UserProps) => {
47
45
 
48
46
  const dataProps: {[key: string]: string} = buildDataProps(data)
49
47
  const ariaProps: {[key: string]: string} = buildAriaProps(aria)
50
- const htmlProps = buildHtmlProps(htmlOptions)
51
48
 
52
49
  const classes = classnames(
53
50
  buildCss('pb_user_kit', align, orientation, size),
@@ -61,7 +58,6 @@ const User = (props: UserProps) => {
61
58
  <div
62
59
  {...ariaProps}
63
60
  {...dataProps}
64
- {...htmlProps}
65
61
  className={classes}
66
62
  id={id}
67
63
  >
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
  import Veteran from './badges/veteran'
6
6
  import MillionDollar from './badges/million-dollar';
@@ -10,7 +10,6 @@ type UserBadgeProps = {
10
10
  badge?: "million-dollar" | "veteran",
11
11
  className?: string,
12
12
  data?: {[key: string]: string},
13
- htmlOptions?: {[key: string]: string | number | boolean | Function},
14
13
  id?: string,
15
14
  size?: "sm" | "md" | "lg",
16
15
  }
@@ -21,7 +20,6 @@ const UserBadge = (props: UserBadgeProps) => {
21
20
  badge = 'million-dollar',
22
21
  className,
23
22
  data = {},
24
- htmlOptions = {},
25
23
  id,
26
24
  size = 'md',
27
25
  } = props
@@ -29,7 +27,6 @@ const UserBadge = (props: UserBadgeProps) => {
29
27
  const image = badge === "million-dollar" ? <MillionDollar /> : <Veteran />
30
28
  const ariaProps = buildAriaProps(aria)
31
29
  const dataProps = buildDataProps(data)
32
- const htmlProps = buildHtmlProps(htmlOptions)
33
30
  const classes = classnames(
34
31
  buildCss('pb_user_badge_kit', size),
35
32
  globalProps(props),
@@ -40,7 +37,6 @@ const UserBadge = (props: UserBadgeProps) => {
40
37
  <div
41
38
  {...ariaProps}
42
39
  {...dataProps}
43
- {...htmlProps}
44
40
  className={classes}
45
41
  id={id}
46
42
  >
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
3
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
  import Joyride, { TooltipRenderProps } from 'react-joyride'
6
6
  import Button from '../pb_button/_button'
@@ -14,7 +14,6 @@ type WalkthroughProps = {
14
14
  className?: string,
15
15
  continuous?: boolean,
16
16
  data?: { [key: string]: string },
17
- htmlOptions?: {[key: string]: string | number | boolean | Function},
18
17
  id?: string,
19
18
  run?: boolean,
20
19
  steps?: [],
@@ -151,7 +150,6 @@ const Walkthrough = (props: WalkthroughProps) => {
151
150
  floaterProps = {
152
151
  offset: 50,
153
152
  },
154
- htmlOptions = {},
155
153
  id,
156
154
  run = false,
157
155
  steps,
@@ -165,14 +163,12 @@ const Walkthrough = (props: WalkthroughProps) => {
165
163
 
166
164
  const ariaProps = buildAriaProps(aria)
167
165
  const dataProps = buildDataProps(data)
168
- const htmlProps = buildHtmlProps(htmlOptions)
169
166
  const classes = classnames(buildCss('pb_walkthrough'), globalProps(props), className)
170
167
 
171
168
  return (
172
169
  <div
173
170
  {...ariaProps}
174
171
  {...dataProps}
175
- {...htmlProps}
176
172
  className={classes}
177
173
  id={id}
178
174
  >
@@ -3,7 +3,7 @@
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
5
  import { globalProps } from '../utilities/globalProps'
6
- import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
+ import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
7
7
 
8
8
  import Caption from '../pb_caption/_caption'
9
9
  import Title from '../pb_title/_title'
@@ -16,7 +16,6 @@ type WeekdayStackedProps = {
16
16
  dark?: boolean,
17
17
  data?: object,
18
18
  date: Date,
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
20
19
  id?: string,
21
20
  variant?: "day_only" | "month_day" | "expanded",
22
21
  compact?: boolean,
@@ -47,7 +46,6 @@ const WeekdayStacked = (props: WeekdayStackedProps) => {
47
46
  dark = false,
48
47
  data = {},
49
48
  date = new Date(),
50
- htmlOptions = {},
51
49
  id,
52
50
  variant = 'month_day',
53
51
  compact = false,
@@ -55,7 +53,6 @@ const WeekdayStacked = (props: WeekdayStackedProps) => {
55
53
 
56
54
  const ariaProps = buildAriaProps(aria)
57
55
  const dataProps = buildDataProps(data)
58
- const htmlProps = buildHtmlProps(htmlOptions)
59
56
  const classes = classnames(
60
57
  buildCss('pb_weekday_stacked_kit', align),
61
58
  globalProps(props),
@@ -66,7 +63,6 @@ const WeekdayStacked = (props: WeekdayStackedProps) => {
66
63
  <div
67
64
  {...ariaProps}
68
65
  {...dataProps}
69
- {...htmlProps}
70
66
  className={classes}
71
67
  id={id}
72
68
  >
@@ -49,19 +49,3 @@ export const buildDataProps = (data: {[key: string]: any}) => buildPrefixedProps
49
49
  */
50
50
  export const buildCss = (...rules: (string | { [x: string]: string | boolean; })[]): string => classnames(rules).replace(/\s/g, '_')
51
51
 
52
- /**
53
- * Maps a given data object into HTML valid attributes and their values.
54
- * This is a more general version of what buildAriaProps and buildDataProps do.
55
- * It is used to map any arbitrary prop into a valid HTML attribute.
56
- *
57
- * @returns {Object} an object holding the HTML valid props and their values.
58
- */
59
-
60
- export const buildHtmlProps = (htmlOptions: { [key: string]: string | number | boolean | Function }) => {
61
- const htmlProps: { [attr: string]: string | number | boolean | Function } = {}
62
- Object.keys(htmlOptions).forEach((key) => {
63
- htmlProps[key] = htmlOptions[key]
64
- })
65
- return htmlProps
66
- }
67
-