playbook_ui 13.12.0.pre.alpha.play1051testhighcharts1580 → 13.12.0.pre.alpha.play10281596

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) 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 +39 -39
  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 +71 -71
  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/pbChartsDarkTheme.ts +208 -210
  21. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +207 -209
  22. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +5 -1
  23. data/app/pb_kits/playbook/pb_date/_date.tsx +12 -7
  24. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +5 -1
  25. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +5 -1
  26. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +15 -4
  27. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +12 -5
  28. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +5 -1
  29. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +5 -1
  30. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +15 -4
  31. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -1
  32. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +11 -3
  33. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +8 -3
  34. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +5 -1
  35. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +8 -1
  36. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +6 -2
  37. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +6 -1
  38. data/app/pb_kits/playbook/pb_flex/_flex.tsx +6 -1
  39. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +6 -1
  40. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +5 -1
  41. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +7 -1
  42. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +54 -62
  43. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +5 -1
  44. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +5 -0
  45. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +10 -3
  46. data/app/pb_kits/playbook/pb_icon/_icon.tsx +7 -1
  47. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +5 -1
  48. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +5 -1
  49. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +5 -1
  50. data/app/pb_kits/playbook/pb_image/_image.tsx +6 -1
  51. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +5 -1
  52. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +6 -2
  53. data/app/pb_kits/playbook/pb_layout/_layout.tsx +6 -1
  54. data/app/pb_kits/playbook/pb_legend/_legend.tsx +5 -1
  55. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +6 -1
  56. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +5 -1
  57. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +44 -44
  58. data/app/pb_kits/playbook/pb_list/_list.tsx +7 -2
  59. data/app/pb_kits/playbook/pb_list/_list_item.tsx +5 -1
  60. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +5 -1
  61. data/app/pb_kits/playbook/pb_map/_map.tsx +6 -1
  62. data/app/pb_kits/playbook/pb_message/_message.tsx +5 -1
  63. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +5 -1
  64. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +5 -1
  65. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +5 -1
  66. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default_swift.md +11 -0
  67. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_props_swift.md +7 -0
  68. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse_swift.md +13 -0
  69. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size_swift.md +11 -0
  70. data/app/pb_kits/playbook/pb_multiple_users/docs/example.yml +6 -0
  71. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +5 -1
  72. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default_swift.md +15 -0
  73. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_props_swift.md +5 -0
  74. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_small_swift.md +15 -0
  75. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_xsmall_swift.md +15 -0
  76. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/example.yml +6 -0
  77. data/app/pb_kits/playbook/pb_nav/_item.tsx +7 -2
  78. data/app/pb_kits/playbook/pb_nav/_nav.tsx +5 -1
  79. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +5 -1
  80. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +6 -2
  81. data/app/pb_kits/playbook/pb_person/_person.tsx +5 -0
  82. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +5 -1
  83. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +8 -2
  84. data/app/pb_kits/playbook/pb_pill/_pill.tsx +5 -1
  85. data/app/pb_kits/playbook/pb_popover/_popover.tsx +6 -1
  86. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +5 -1
  87. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +9 -3
  88. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +5 -1
  89. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +6 -2
  90. data/app/pb_kits/playbook/pb_radio/_radio.tsx +5 -1
  91. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +7 -1
  92. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +5 -1
  93. data/app/pb_kits/playbook/pb_select/_select.tsx +6 -1
  94. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +6 -2
  95. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +5 -0
  96. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +5 -0
  97. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +11 -3
  98. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +5 -1
  99. data/app/pb_kits/playbook/pb_source/_source.tsx +5 -1
  100. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +5 -1
  101. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +14 -2
  102. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +6 -0
  103. data/app/pb_kits/playbook/pb_table/_table.tsx +5 -1
  104. data/app/pb_kits/playbook/pb_table/_table_row.tsx +5 -1
  105. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -1
  106. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on_swift.md +35 -0
  107. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default_swift.md +29 -0
  108. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled_swift.md +13 -0
  109. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md +24 -0
  110. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_props_swift.md +13 -0
  111. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +7 -0
  112. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +5 -2
  113. data/app/pb_kits/playbook/pb_time/_time.tsx +9 -2
  114. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +5 -1
  115. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +6 -2
  116. data/app/pb_kits/playbook/pb_timeline/_item.tsx +9 -2
  117. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -1
  118. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +5 -1
  119. data/app/pb_kits/playbook/pb_title/_title.tsx +5 -1
  120. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +5 -1
  121. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +16 -3
  122. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +5 -0
  123. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default_swift.md +11 -0
  124. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name_swift.md +10 -0
  125. data/app/pb_kits/playbook/pb_toggle/docs/_toggle_props_swift.md +6 -0
  126. data/app/pb_kits/playbook/pb_toggle/docs/example.yml +4 -0
  127. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +5 -1
  128. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +38 -38
  129. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +7 -2
  130. data/app/pb_kits/playbook/pb_user/_user.tsx +5 -1
  131. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +5 -1
  132. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +5 -1
  133. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +5 -1
  134. data/app/pb_kits/playbook/utilities/props.ts +16 -0
  135. data/dist/playbook-rails.js +6 -6
  136. data/lib/playbook/version.rb +1 -1
  137. metadata +18 -2
@@ -0,0 +1,15 @@
1
+ ![mulitple-users-stacked-small](https://github.com/powerhome/playbook/assets/92755007/277fd685-6302-462e-a02a-18a8fcb57715)
2
+
3
+ ```swift
4
+
5
+ let oneUser = [andrew]
6
+ let twoUsers = [andrew, picAndrew]
7
+ let multipleUsers = [andrew, picAndrew, andrew, andrew]
8
+
9
+ HStack(spacing: Spacing.xSmall) {
10
+ PBMultipleUsersStacked(users: oneUser)
11
+ PBMultipleUsersStacked(users: twoUsers)
12
+ PBMultipleUsersStacked(users: multipleUsers)
13
+ }
14
+
15
+ ```
@@ -0,0 +1,15 @@
1
+ ![mulitple-users-stacked-xsmall](https://github.com/powerhome/playbook/assets/92755007/4f31976f-a41b-4923-9230-5015f6ad75f8)
2
+
3
+ ```swift
4
+
5
+ let oneUser = [andrew]
6
+ let twoUsers = [andrew, picAndrew]
7
+ let multipleUsers = [andrew, picAndrew, andrew, andrew]
8
+
9
+ HStack(spacing: Spacing.xSmall) {
10
+ PBMultipleUsersStacked(users: oneUser, size: .xSmall)
11
+ PBMultipleUsersStacked(users: twoUsers, size: .xSmall)
12
+ PBMultipleUsersStacked(users: multipleUsers, size: .xSmall)
13
+ }
14
+
15
+ ```
@@ -6,3 +6,9 @@ examples:
6
6
 
7
7
  react:
8
8
  - multiple_users_stacked_default: Default
9
+
10
+ swift:
11
+ - multiple_users_stacked_default_swift: Default
12
+ - multiple_users_stacked_small_swift: Small
13
+ - multiple_users_stacked_xsmall_swift: xSmall
14
+ - multiple_users_stacked_props_swift: ""
@@ -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, GlobalProps } from "../utilities/globalProps";
6
6
 
7
7
  import Icon from "../pb_icon/_icon";
@@ -21,6 +21,7 @@ type NavItemProps = {
21
21
  data?: object;
22
22
  dark?: boolean;
23
23
  fontSize?: "normal" | "small";
24
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
24
25
  iconLeft?: string;
25
26
  iconRight?: string | string[];
26
27
  onIconRightClick?: () => void;
@@ -67,6 +68,7 @@ const NavItem = (props: NavItemProps) => {
67
68
  data = {},
68
69
  dark = false,
69
70
  fontSize = "normal",
71
+ htmlOptions = {},
70
72
  iconLeft,
71
73
  iconRight,
72
74
  onIconRightClick,
@@ -158,7 +160,8 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
158
160
  const fontWeightClass = fontWeightMapping[fontWeight];
159
161
 
160
162
  const ariaProps = buildAriaProps(aria);
161
- const dataProps = buildDataProps(data);
163
+ const dataProps = buildDataProps(data)
164
+ const htmlProps = buildHtmlProps(htmlOptions);
162
165
 
163
166
  const tagClasses = classnames(
164
167
  collapsible ? "pb_nav_list_item_link_collapsible" : "pb_nav_list_item_link",
@@ -216,6 +219,7 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
216
219
  <Tag
217
220
  {...ariaProps}
218
221
  {...dataProps}
222
+ {...htmlProps}
219
223
  className={classes}
220
224
  id={id}
221
225
  href={link}
@@ -256,6 +260,7 @@ const { filteredPadding, filteredMargin } = filterItemSpacing(itemSpacing);
256
260
  <Tag
257
261
  {...ariaProps}
258
262
  {...dataProps}
263
+ {...htmlProps}
259
264
  className={classes}
260
265
  id={id}
261
266
  href={link}
@@ -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, GlobalProps } from '../utilities/globalProps'
6
6
 
7
7
  import Caption from '../pb_caption/_caption'
@@ -15,6 +15,7 @@ type NavProps = {
15
15
  data?: object,
16
16
  dark?: boolean,
17
17
  highlight?: boolean,
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
19
  id?: string,
19
20
  onClick?: React.MouseEventHandler<HTMLElement>,
20
21
  orientation?: "vertical" | "horizontal",
@@ -33,6 +34,7 @@ const Nav = (props: NavProps) => {
33
34
  data = {},
34
35
  dark = false,
35
36
  highlight = true,
37
+ htmlOptions = {},
36
38
  id,
37
39
  link = '#',
38
40
  onClick = () => { },
@@ -44,6 +46,7 @@ const Nav = (props: NavProps) => {
44
46
 
45
47
  const ariaProps = buildAriaProps(aria)
46
48
  const dataProps = buildDataProps(data)
49
+ const htmlProps = buildHtmlProps(htmlOptions)
47
50
  const cardCss = classnames(
48
51
  buildCss('pb_nav_list', variant, orientation, {
49
52
  highlight: highlight,
@@ -70,6 +73,7 @@ const childrenWithProps = React.Children.map(children, (child) => {
70
73
  <nav
71
74
  {...ariaProps}
72
75
  {...dataProps}
76
+ {...htmlProps}
73
77
  className={cardCss}
74
78
  id={id}
75
79
  >
@@ -2,12 +2,13 @@ import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { GlobalProps, globalProps } from '../utilities/globalProps'
4
4
 
5
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
6
 
7
7
  type OnlineStatusProps = {
8
8
  aria?: {[key: string]: string},
9
9
  className?: string,
10
10
  data?: {[key: string]: string | number},
11
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
11
12
  id?: string,
12
13
  status?: "online" | "offline" | "away",
13
14
  } & GlobalProps
@@ -17,6 +18,7 @@ const OnlineStatus = (props: OnlineStatusProps) => {
17
18
  aria = {},
18
19
  className,
19
20
  data = {},
21
+ htmlOptions = {},
20
22
  id,
21
23
  status = 'offline',
22
24
  } = props
@@ -25,12 +27,14 @@ const OnlineStatus = (props: OnlineStatusProps) => {
25
27
 
26
28
  const ariaProps = buildAriaProps(aria)
27
29
  const dataProps = buildDataProps(data)
30
+ const htmlProps = buildHtmlProps(htmlOptions)
28
31
  const classes = classnames(buildCss('pb_online_status_kit', status), globalProps(props), className)
29
32
 
30
33
  return (
31
34
  <div
32
35
  {...ariaProps}
33
36
  {...dataProps}
37
+ {...htmlProps}
34
38
  className={classes}
35
39
  id={id}
36
40
  />
@@ -3,7 +3,7 @@
3
3
  import React, { useCallback, useMemo, useState } from "react"
4
4
  import classnames from "classnames"
5
5
 
6
- import { buildAriaProps, buildCss, buildDataProps } from "../utilities/props"
6
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props"
7
7
  import { globalProps } from "../utilities/globalProps"
8
8
 
9
9
  import Body from '../pb_body/_body'
@@ -20,6 +20,7 @@ type PassphraseProps = {
20
20
  className?: string,
21
21
  data?: object,
22
22
  dark?: boolean,
23
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
23
24
  id?: string,
24
25
  inputProps?: {},
25
26
  label?: string,
@@ -37,6 +38,7 @@ const Passphrase = (props: PassphraseProps) => {
37
38
  confirmation = false,
38
39
  data = {},
39
40
  dark = false,
41
+ htmlOptions = {},
40
42
  id,
41
43
  inputProps = {},
42
44
  label = confirmation ? "Confirm Passphrase" : "Passphrase",
@@ -82,7 +84,8 @@ const Passphrase = (props: PassphraseProps) => {
82
84
  globalProps(props),
83
85
  className
84
86
  )
85
- const dataProps = buildDataProps(data)
87
+ const dataProps = buildDataProps(data)
88
+ const htmlProps = buildHtmlProps(htmlOptions)
86
89
 
87
90
  const popoverReference = (
88
91
  <CircleIconButton
@@ -98,6 +101,7 @@ const Passphrase = (props: PassphraseProps) => {
98
101
  <div
99
102
  {...ariaProps}
100
103
  {...dataProps}
104
+ {...htmlProps}
101
105
  className={classes}
102
106
  id={id}
103
107
  >
@@ -6,6 +6,7 @@ import {
6
6
  buildAriaProps,
7
7
  buildCss,
8
8
  buildDataProps,
9
+ buildHtmlProps
9
10
  } from '../utilities/props'
10
11
 
11
12
  import Body from '../pb_body/_body'
@@ -16,6 +17,7 @@ type PersonProps = {
16
17
  className?: string | string[],
17
18
  data?: { [key: string]: string },
18
19
  firstName: string,
20
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
19
21
  id?: string,
20
22
  lastName: string,
21
23
  }
@@ -25,12 +27,14 @@ const Person = (props: PersonProps): React.ReactElement => {
25
27
  aria = {},
26
28
  className,
27
29
  data = {},
30
+ htmlOptions = {},
28
31
  firstName,
29
32
  id,
30
33
  lastName } = props
31
34
 
32
35
  const ariaProps = buildAriaProps(aria)
33
36
  const dataProps = buildDataProps(data)
37
+ const htmlProps = buildHtmlProps(htmlOptions)
34
38
  const classes = classnames(
35
39
  buildCss('pb_person_kit'),
36
40
  globalProps(props),
@@ -41,6 +45,7 @@ const Person = (props: PersonProps): React.ReactElement => {
41
45
  <div
42
46
  {...ariaProps}
43
47
  {...dataProps}
48
+ {...htmlProps}
44
49
  className={classes}
45
50
  id={id}
46
51
  >
@@ -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 Caption from '../pb_caption/_caption'
@@ -19,6 +19,7 @@ type PersonContactProps = {
19
19
  className?: string | string[],
20
20
  data?: object,
21
21
  firstName: string,
22
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
22
23
  id?: string,
23
24
  lastName: string,
24
25
  contacts?: ContactItem[],
@@ -31,12 +32,14 @@ const PersonContact = (props: PersonContactProps) => {
31
32
  contacts = [],
32
33
  data = {},
33
34
  firstName,
35
+ htmlOptions = {},
34
36
  id,
35
37
  lastName,
36
38
  } = props
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_person_contact_kit'),
42
45
  globalProps(props),
@@ -59,6 +62,7 @@ const PersonContact = (props: PersonContactProps) => {
59
62
  <div
60
63
  {...ariaProps}
61
64
  {...dataProps}
65
+ {...htmlProps}
62
66
  className={classes}
63
67
  id={id}
64
68
  >
@@ -5,7 +5,7 @@ import intlTelInput from 'intl-tel-input'
5
5
  import 'intl-tel-input/build/css/intlTelInput.css'
6
6
  import 'intl-tel-input/build/js/utils.js'
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 TextInput from '../pb_text_input/_text_input'
@@ -25,6 +25,7 @@ type PhoneNumberInputProps = {
25
25
  data?: { [key: string]: string },
26
26
  disabled?: boolean,
27
27
  error?: string,
28
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
28
29
  id?: string,
29
30
  initialCountry?: string,
30
31
  isValid?: (valid: boolean) => void,
@@ -71,6 +72,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
71
72
  dark = false,
72
73
  data = {},
73
74
  disabled = false,
75
+ htmlOptions = {},
74
76
  id = "",
75
77
  initialCountry = "",
76
78
  isValid = () => {
@@ -90,6 +92,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
90
92
 
91
93
  const ariaProps = buildAriaProps(aria)
92
94
  const dataProps = buildDataProps(data)
95
+ const htmlProps = buildHtmlProps(htmlOptions)
93
96
  const classes = classnames(
94
97
  buildCss("pb_phone_number_input"),
95
98
  globalProps(props),
@@ -256,7 +259,10 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
256
259
  if (required) textInputProps.required = true
257
260
 
258
261
  return (
259
- <div {...wrapperProps}>
262
+ <div
263
+ {...wrapperProps}
264
+ {...htmlProps}
265
+ >
260
266
  <TextInput
261
267
  ref={
262
268
  inputNode => {
@@ -2,13 +2,14 @@ import React from 'react'
2
2
 
3
3
  import classnames from 'classnames'
4
4
  import Title from '../pb_title/_title'
5
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
5
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
6
6
  import { GlobalProps, globalProps } from '../utilities/globalProps'
7
7
 
8
8
  type PillProps = {
9
9
  aria?: {[key: string]: string},
10
10
  className?: string,
11
11
  data?: {[key: string]: string},
12
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
12
13
  id?: string,
13
14
  text: string,
14
15
  variant?: "success" | "warning" | "error" | "info" | "neutral" | "primary",
@@ -20,6 +21,7 @@ const Pill = (props: PillProps) => {
20
21
  aria = {},
21
22
  className,
22
23
  data = {},
24
+ htmlOptions = {},
23
25
  id,
24
26
  text,
25
27
  variant = 'neutral',
@@ -28,12 +30,14 @@ const Pill = (props: PillProps) => {
28
30
 
29
31
  const ariaProps = buildAriaProps(aria)
30
32
  const dataProps = buildDataProps(data)
33
+ const htmlProps = buildHtmlProps(htmlOptions)
31
34
  const classes = classnames(buildCss('pb_pill_kit', variant, textTransform), globalProps(props), className)
32
35
 
33
36
  return (
34
37
  <div
35
38
  {...ariaProps}
36
39
  {...dataProps}
40
+ {...htmlProps}
37
41
  className={classes}
38
42
  id={id}
39
43
  >
@@ -12,6 +12,7 @@ import {
12
12
  buildAriaProps,
13
13
  buildCss,
14
14
  buildDataProps,
15
+ buildHtmlProps,
15
16
  noop,
16
17
  } from "../utilities/props";
17
18
 
@@ -24,6 +25,7 @@ type PbPopoverProps = {
24
25
  className?: string;
25
26
  closeOnClick?: "outside" | "inside" | "any";
26
27
  data?: { [key: string]: string },
28
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
27
29
  id?: string;
28
30
  offset?: boolean;
29
31
  reference: PopperReference & any;
@@ -63,6 +65,7 @@ const Popover = (props: PbPopoverProps) => {
63
65
  className,
64
66
  children,
65
67
  data = {},
68
+ htmlOptions = {},
66
69
  id,
67
70
  modifiers,
68
71
  offset,
@@ -92,7 +95,8 @@ const Popover = (props: PbPopoverProps) => {
92
95
  );
93
96
  };
94
97
  const ariaProps = buildAriaProps(aria);
95
- const dataProps = buildDataProps(data);
98
+ const dataProps = buildDataProps(data)
99
+ const htmlProps = buildHtmlProps(htmlOptions);
96
100
  const classes = classnames(
97
101
  buildCss("pb_popover_kit"),
98
102
  globalProps(props),
@@ -110,6 +114,7 @@ const Popover = (props: PbPopoverProps) => {
110
114
  <div
111
115
  {...ariaProps}
112
116
  {...dataProps}
117
+ {...htmlProps}
113
118
  className={classes}
114
119
  data-placement={placement}
115
120
  id={id}
@@ -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'
@@ -13,6 +13,7 @@ type ProgressPillsProps = {
13
13
  className?: string,
14
14
  data?: { [key: string]: string },
15
15
  dark?: boolean,
16
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
16
17
  id?: string,
17
18
  steps?: number,
18
19
  title?: string,
@@ -43,6 +44,7 @@ const ProgressPills = (props: ProgressPillsProps) => {
43
44
  aria = { hidden: 'true' },
44
45
  className,
45
46
  data = {},
47
+ htmlOptions = {},
46
48
  id,
47
49
  steps = 3,
48
50
  title,
@@ -52,12 +54,14 @@ const ProgressPills = (props: ProgressPillsProps) => {
52
54
 
53
55
  const ariaProps = buildAriaProps(aria)
54
56
  const dataProps = buildDataProps(data)
57
+ const htmlProps = buildHtmlProps(htmlOptions)
55
58
  const classes = classnames(buildCss('pb_progress_pills_kit'), globalProps(props), className)
56
59
 
57
60
  return (
58
61
  <div
59
62
  {...ariaProps}
60
63
  {...dataProps}
64
+ {...htmlProps}
61
65
  className={classes}
62
66
  id={id}
63
67
  >
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
- import { buildCss, buildDataProps } from '../utilities/props'
3
+ import { buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
4
4
  import { globalProps } from '../utilities/globalProps'
5
5
 
6
6
  type ProgressSimpleProps = {
@@ -8,6 +8,7 @@ type ProgressSimpleProps = {
8
8
  className?: string | string[],
9
9
  dark?: boolean,
10
10
  data?: string,
11
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
11
12
  id?: string,
12
13
  max?: number,
13
14
  muted: boolean,
@@ -23,6 +24,7 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
23
24
  className,
24
25
  dark = false,
25
26
  data ={},
27
+ htmlOptions = {},
26
28
  max,
27
29
  muted = false,
28
30
  percent = '',
@@ -35,6 +37,7 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
35
37
  }
36
38
 
37
39
  const dataProps = buildDataProps(data)
40
+ const htmlProps = buildHtmlProps(htmlOptions)
38
41
  const variantStyle = variant == 'default' ? '' : variant
39
42
 
40
43
  const valueStyles = {
@@ -53,8 +56,11 @@ const ProgressSimple = (props: ProgressSimpleProps) => {
53
56
  )
54
57
 
55
58
  return (
56
- <div {...dataProps}
57
- className={wrapperClass}>
59
+ <div
60
+ {...dataProps}
61
+ {...htmlProps}
62
+ className={wrapperClass}
63
+ >
58
64
  <div
59
65
  className={kitClass}
60
66
  data-value={value}
@@ -1,12 +1,13 @@
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
  type ProgressStepProps = {
7
7
  aria?: { [key: string]: string },
8
8
  className?: string,
9
9
  data?: { [key: string]: string },
10
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
10
11
  id?: string,
11
12
  children?: React.ReactChild[] | React.ReactChild,
12
13
  orientation?: "horizontal" | "vertical",
@@ -24,6 +25,7 @@ const ProgressStep = (props: ProgressStepProps): React.ReactElement => {
24
25
  color,
25
26
  data = {},
26
27
  orientation = 'horizontal',
28
+ htmlOptions = {},
27
29
  icon = false,
28
30
  showIcon = false,
29
31
  variant,
@@ -31,6 +33,7 @@ const ProgressStep = (props: ProgressStepProps): React.ReactElement => {
31
33
 
32
34
  const ariaProps = buildAriaProps(aria)
33
35
  const dataProps = buildDataProps(data)
36
+ const htmlProps = buildHtmlProps(htmlOptions)
34
37
  const iconStyle = icon === true || showIcon === true ? 'icon' : ''
35
38
  const progressStepCss = buildCss(
36
39
  'pb_progress_step_kit',
@@ -44,6 +47,7 @@ const ProgressStep = (props: ProgressStepProps): React.ReactElement => {
44
47
  <ul
45
48
  {...ariaProps}
46
49
  {...dataProps}
50
+ {...htmlProps}
47
51
  className={classnames(progressStepCss, globalProps(props), className)}
48
52
  >
49
53
  {children}
@@ -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
 
6
6
  import Icon from '../pb_icon/_icon'
7
7
 
@@ -10,6 +10,7 @@ type ProgressStepItemProps = {
10
10
  data?: { [key: string]: string },
11
11
  status?: "complete" | "active" | "inactive" | "hidden",
12
12
  children?: React.ReactNode | React.ReactNode[],
13
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
13
14
  icon?: string,
14
15
  }
15
16
 
@@ -19,15 +20,18 @@ const ProgressStepItem = (props: ProgressStepItemProps): React.ReactElement => {
19
20
  data = {},
20
21
  status = 'inactive',
21
22
  children,
23
+ htmlOptions = {},
22
24
  icon = 'check',
23
25
  } = props
24
26
 
25
27
  const progressStepItem = buildCss('pb_progress_step_item', status)
26
- const dataProps = buildDataProps(data)
28
+ const dataProps = buildDataProps(data)
29
+ const htmlProps = buildHtmlProps(htmlOptions)
27
30
 
28
31
  return (
29
32
  <li
30
33
  {...dataProps}
34
+ {...htmlProps}
31
35
  className={classnames(progressStepItem, className)}
32
36
  >
33
37
  <div className="box">
@@ -3,7 +3,7 @@
3
3
  import React, { forwardRef } from 'react'
4
4
  import Body from '../pb_body/_body'
5
5
  import classnames from 'classnames'
6
- import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
6
+ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
7
7
  import { globalProps, GlobalProps } from '../utilities/globalProps'
8
8
 
9
9
  type RadioProps = {
@@ -15,6 +15,7 @@ type RadioProps = {
15
15
  dark?: boolean,
16
16
  data?: {[key: string]: string},
17
17
  error?: boolean,
18
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
18
19
  id?: string,
19
20
  label: string,
20
21
  name?: string,
@@ -31,6 +32,7 @@ const Radio = ({
31
32
  dark = false,
32
33
  data = {},
33
34
  error = false,
35
+ htmlOptions = {},
34
36
  id,
35
37
  label,
36
38
  name = 'radio_name',
@@ -41,6 +43,7 @@ const Radio = ({
41
43
  }: RadioProps, ref: any) => {
42
44
  const ariaProps = buildAriaProps(aria)
43
45
  const dataProps = buildDataProps(data)
46
+ const htmlProps = buildHtmlProps(htmlOptions)
44
47
  const classes = classnames(
45
48
  buildCss('pb_radio_kit', alignment ),
46
49
  dark ? 'dark': null, error ? 'error': null,
@@ -68,6 +71,7 @@ const Radio = ({
68
71
  <label
69
72
  {...ariaProps}
70
73
  {...dataProps}
74
+ {...htmlProps}
71
75
  className={classes}
72
76
  htmlFor={id}
73
77
  >
@@ -3,7 +3,7 @@ import classnames from 'classnames'
3
3
  import inlineFocus from './inlineFocus'
4
4
  import useFocus from './useFocus'
5
5
  import { globalProps, GlobalProps } from '../utilities/globalProps'
6
- import { buildAriaProps, buildDataProps, noop } from '../utilities/props'
6
+ import { buildAriaProps, buildDataProps, noop, buildHtmlProps } from '../utilities/props'
7
7
 
8
8
  try {
9
9
  const Trix = require('trix')
@@ -35,6 +35,7 @@ type RichTextEditorProps = {
35
35
  className?: string,
36
36
  data?: { [key: string]: string },
37
37
  focus?: boolean,
38
+ htmlOptions?: {[key: string]: string | number | boolean | Function},
38
39
  id?: string,
39
40
  inline?: boolean,
40
41
  extensions?: { [key: string]: string }[],
@@ -58,6 +59,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
58
59
  className,
59
60
  data = {},
60
61
  focus = false,
62
+ htmlOptions = {},
61
63
  inline = false,
62
64
  extensions,
63
65
  name,
@@ -74,9 +76,12 @@ const RichTextEditor = (props: RichTextEditorProps) => {
74
76
  dataProps = buildDataProps(data),
75
77
  [editor, setEditor] = useState<Editor>()
76
78
 
79
+ const htmlProps = buildHtmlProps(htmlOptions)
80
+
77
81
  const handleOnEditorReady = (editorInstance: Editor) => setEditor(editorInstance),
78
82
  element = editor?.element
79
83
 
84
+
80
85
  // DOM manipulation must wait for editor to be ready
81
86
  if (editor) {
82
87
  const toolbarElement = element.parentElement.querySelector('trix-toolbar') as HTMLElement,
@@ -161,6 +166,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
161
166
  <div
162
167
  {...ariaProps}
163
168
  {...dataProps}
169
+ {...htmlProps}
164
170
  className={css}
165
171
  >
166
172
  {