playbook_ui 13.27.0.pre.alpha.PLAY1349checkboxzindexsticky2936 → 13.27.0.pre.alpha.PLAY11782916

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +5 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +5 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +5 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +5 -1
  6. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +6 -1
  7. data/app/pb_kits/playbook/pb_badge/badge.html.erb +6 -1
  8. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +0 -1
  9. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +6 -1
  10. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +2 -0
  11. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +6 -1
  12. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +10 -21
  13. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +75 -3
  14. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +6 -1
  15. data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +6 -1
  16. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +6 -1
  17. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +0 -7
  18. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +1 -3
  19. data/app/pb_kits/playbook/pb_collapsible/index.js +6 -16
  20. data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -1
  21. data/app/pb_kits/playbook/pb_currency/currency.html.erb +6 -1
  22. data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +6 -1
  23. data/app/pb_kits/playbook/pb_date/date.html.erb +6 -1
  24. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +5 -1
  25. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +1 -4
  26. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +5 -1
  27. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +5 -1
  28. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +0 -7
  29. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +6 -1
  30. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +0 -6
  31. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +6 -1
  32. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +5 -1
  33. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -4
  34. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +4 -1
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +3 -6
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +6 -11
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +2 -5
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +8 -13
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +2 -5
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +8 -13
  42. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
  43. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +8 -2
  44. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +5 -1
  45. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +12 -2
  46. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -9
  47. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +6 -1
  48. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  49. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  50. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  51. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +6 -1
  52. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +6 -1
  53. data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +6 -1
  54. data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +6 -1
  55. data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +6 -1
  56. data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +5 -1
  57. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -6
  58. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +6 -1
  59. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -1
  60. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +1 -1
  61. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +6 -1
  62. data/app/pb_kits/playbook/pb_person/person.html.erb +6 -1
  63. data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +6 -1
  64. data/app/pb_kits/playbook/pb_pill/pill.html.erb +6 -1
  65. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +6 -1
  66. data/app/pb_kits/playbook/pb_select/_select.scss +0 -8
  67. data/app/pb_kits/playbook/pb_select/_select.tsx +13 -1
  68. data/app/pb_kits/playbook/pb_source/source.html.erb +5 -1
  69. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +5 -1
  70. data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +5 -1
  71. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -19
  72. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +5 -1
  73. data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +5 -1
  74. data/app/pb_kits/playbook/pb_timeline/item.html.erb +5 -1
  75. data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +5 -1
  76. data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +6 -1
  77. data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +6 -1
  78. data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +5 -1
  79. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +6 -1
  80. data/dist/playbook-rails.js +5 -5
  81. data/lib/playbook/forms/builder.rb +0 -1
  82. data/lib/playbook/kit_base.rb +1 -1
  83. data/lib/playbook/version.rb +1 -1
  84. metadata +2 -32
  85. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +0 -92
  86. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.html.erb +0 -15
  87. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb +0 -37
  88. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +0 -72
  89. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md +0 -3
  90. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +0 -19
  91. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md +0 -3
  92. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx +0 -73
  93. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.md +0 -3
  94. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.html.erb +0 -20
  95. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.md +0 -3
  96. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md +0 -61
  97. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md +0 -11
  98. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md +0 -32
  99. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md +0 -17
  100. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md +0 -19
  101. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md +0 -10
  102. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md +0 -17
  103. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md +0 -39
  104. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md +0 -39
  105. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md +0 -15
  106. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md +0 -78
  107. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md +0 -23
  108. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md +0 -7
  109. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md +0 -9
  110. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md +0 -22
  111. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md +0 -9
  112. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md +0 -62
  113. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +0 -8
  114. data/lib/playbook/forms/builder/phone_number_field.rb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6cdef0664f0e77477ac8bb6d3bb3df67732b49ffb2f9cb023f5c1a5867b41876
4
- data.tar.gz: 1a9b4e68cd2dc788f5e90fc2e0aa6af63b2ed20a7d1f789997d77cbe14e3b6b9
3
+ metadata.gz: 2ab90f7ab88ce3c08dab648348d07d1d0d7d3371e0505fba524e33a7b1b0ab63
4
+ data.tar.gz: 6a1e8caa7ed0789d8ea721a2bed9e5607dfd79eef8c69630c685ef92bc871431
5
5
  SHA512:
6
- metadata.gz: f0c7b178ef804dc44461454d8004b56a565fca3393d8253e464f2d91b323be6c08e60e9354384c21a5e28528f453b428f5f73d7e6a63bee4578f07d8f9c0cd7d
7
- data.tar.gz: 011c22b7c47a434fd173956c7a16a1126ca4b79c3408360c0cfc1b4d9752248237de24bf40ed9a29f5fee2da98b3599d0a8f9299a065a30b78205d2976ffef81
6
+ metadata.gz: 0256e512d2e19f5f8dbec2e12b36221df30d57a53b11f4fd6f07c67d7a1dc9c32dd3758f7f8a3f8d871fe7de064148ec0b084c3899bd3720cf68683e539c335f
7
+ data.tar.gz: 60e3ef6787a0a5fe6508845dbac95c077d68421b9b9df186084f739fbfbf7b57e0ea94b6e144750e67f9ddca48031468541a6558fce0c3f5d8c6b912f2d88d9f
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
2
6
  <%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none" }) do %>
3
7
  <% if content.present? %>
4
8
  <% content.presence %>
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
2
6
  <% object.table_data.each do |row| %>
3
7
  <%= render_row_and_children(row, object.column_definitions) %>
4
8
  <% end %>
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
2
6
  <%= pb_rails("table/table_row", props: {tag:"div"}) do %>
3
7
  <% object.column_definitions.each_with_index do |item, index| %>
4
8
  <%= pb_rails("table/table_header", props: { tag:"div", id:item[:accessor], classname:object.th_classname}) do %>
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id) do %>
2
6
  <% object.column_definitions.each_with_index do |column, index| %>
3
7
  <%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
4
8
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
  <% if object.tooltip_text.present? %>
3
8
  <%= pb_rails("tooltip", props: {
4
9
  trigger_element_id: object.tooltip_id,
@@ -1,3 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
  <span><%= object.text %></span>
3
8
  <% end %>
@@ -28,7 +28,6 @@ $pb_button_border_width: 0px;
28
28
  font-size: $font_small;
29
29
  font-weight: $bold;
30
30
  text-align: center;
31
- text-decoration: none;
32
31
  vertical-align: middle;
33
32
  text-transform: none;
34
33
  border-width: $pb_button_border_width;
@@ -1,3 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <%= content.presence || object.text %>
3
8
  <% end %>
@@ -20,6 +20,7 @@ $transition: $transition_cubic;
20
20
  border: solid $border_light 2px;
21
21
  border-radius: $border_rad_light;
22
22
  height: 22px;
23
+ position: relative;
23
24
  transition: background $transition_default ease, box-shadow $transition_default ease;
24
25
  width: 22px;
25
26
  .check_icon,
@@ -27,6 +28,7 @@ $transition: $transition_cubic;
27
28
  color: $white;
28
29
  height: 16px;
29
30
  left: 1px;
31
+ position: relative;
30
32
  display: flex;
31
33
  opacity: 0;
32
34
  width: 16px;
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("button", props: {type: object.type, link: object.link, new_window:object.new_window, variant: object.variant, disabled: object.disabled, dark: object.dark}) do %>
3
8
  <%= pb_rails("icon", props: {icon: object.icon, fixed_width: true, dark: object.dark}) %>
4
9
  <% end %>
@@ -9,7 +9,6 @@ import CollapsibleContent from './child_kits/CollapsibleContent'
9
9
  import CollapsibleMain from './child_kits/CollapsibleMain'
10
10
  import CollapsibleContext from './context'
11
11
  import { IconSizes } from "../pb_icon/_icon"
12
- import CollapsibleIcon from './child_kits/CollapsibleIcon'
13
12
 
14
13
 
15
14
  type CollapsibleProps = {
@@ -53,15 +52,12 @@ const Collapsible = ({
53
52
  if (CollapsibleParent.length !== 2) {
54
53
  throw new Error('Collapsible requires <CollapsibleMain> and <CollapsibleContent> to function properly.')
55
54
  }
56
- const FirstChild = CollapsibleParent[0]
57
- const SecondChild = CollapsibleParent[1]
58
55
 
59
- const Main = FirstChild.type === CollapsibleMain ? FirstChild : null
60
- const Content = SecondChild.type === CollapsibleContent ? SecondChild : null
56
+ const Main = CollapsibleParent[0]
57
+ const Content = CollapsibleParent[1]
61
58
 
62
-
63
- const { children: mainChildren = null, ...mainProps } = Main ? Main.props : {}
64
- const { children: contentChildren = null, ...contentProps } = Content ? Content.props : {}
59
+ const { children: mainChildren, ...mainProps } = Main.props
60
+ const { children: contentChildren, ...contentProps } = Content.props
65
61
  const ariaProps = buildAriaProps(aria)
66
62
  const dataProps = buildDataProps(data)
67
63
  const htmlProps = buildHtmlProps(htmlOptions)
@@ -79,19 +75,13 @@ const Collapsible = ({
79
75
  className={classes}
80
76
  id={id}
81
77
  >
82
- {Main ? (
83
- <CollapsibleMain {...mainProps}>
84
- {mainChildren}
85
- </CollapsibleMain>
86
- ) : (
87
- FirstChild
88
- )}
78
+ <CollapsibleMain {...mainProps}>
79
+ {mainChildren}
80
+ </CollapsibleMain>
89
81
 
90
- {Content && (
91
- <CollapsibleContent {...contentProps}>
92
- {contentChildren}
93
- </CollapsibleContent>
94
- )}
82
+ <CollapsibleContent {...contentProps}>
83
+ {contentChildren}
84
+ </CollapsibleContent>
95
85
  </div>
96
86
  </CollapsibleContext.Provider>
97
87
  )
@@ -99,6 +89,5 @@ const Collapsible = ({
99
89
 
100
90
  Collapsible.Main = CollapsibleMain
101
91
  Collapsible.Content = CollapsibleContent
102
- Collapsible.Icon = CollapsibleIcon
103
92
 
104
93
  export default Collapsible
@@ -7,9 +7,27 @@ import { globalProps } from '../../utilities/globalProps'
7
7
 
8
8
  import Flex from '../../pb_flex/_flex'
9
9
  import FlexItem from '../../pb_flex/_flex_item'
10
- import { IconSizes } from "../../pb_icon/_icon"
10
+ import Icon, { IconSizes } from "../../pb_icon/_icon"
11
11
  import CollapsibleContext from '../context'
12
- import CollapsibleIcon from './CollapsibleIcon'
12
+
13
+
14
+ type colorMap = {
15
+ default: string,
16
+ light: string,
17
+ lighter: string,
18
+ link: string,
19
+ error: string,
20
+ success: string
21
+ }
22
+
23
+ const colorMap = {
24
+ default: "#242B42",
25
+ light: "#687887",
26
+ lighter: "#C1CDD6",
27
+ link: "#0056CF",
28
+ error: "#FF2229",
29
+ success: "#00CA74",
30
+ }
13
31
 
14
32
  type CollapsibleMainProps = {
15
33
  children: React.ReactNode[] | React.ReactNode,
@@ -20,6 +38,60 @@ type CollapsibleMainProps = {
20
38
  }
21
39
  type IconColors = "default" | "light" | "lighter" | "link" | "error" | "success"
22
40
 
41
+ type IconProps = {
42
+ collapsed: boolean | (()=> void)
43
+ icon?: string[] | string
44
+ iconColor?: IconColors
45
+ iconSize?: IconSizes
46
+ onIconClick?: ()=> void
47
+ }
48
+
49
+ const ToggleIcon = ({ collapsed, icon, iconSize, iconColor, onIconClick }: IconProps) => {
50
+ const color = colorMap[iconColor]
51
+
52
+ const showIcon = (icon: string |string[]) => {
53
+ if (typeof icon === "string") {
54
+ return [icon, icon]
55
+ }
56
+ return icon
57
+ }
58
+
59
+ const handleIconClick = (e: React.MouseEvent<HTMLElement>) => {
60
+ if (onIconClick) {
61
+ e.stopPropagation();
62
+ onIconClick()
63
+ }
64
+ }
65
+
66
+ return (
67
+ <>
68
+ {collapsed ? (
69
+ <div
70
+ className="icon_wrapper"
71
+ key={icon ? showIcon(icon)[0] : "chevron-down"}
72
+ onClick={(e)=> handleIconClick(e)}
73
+ style={{ verticalAlign: "middle", color: color }}
74
+ >
75
+ <Icon icon={icon ? showIcon(icon)[0] : "chevron-down"}
76
+ size={iconSize}
77
+ />
78
+ </div>
79
+ ) : (
80
+ <div
81
+ className="icon_wrapper"
82
+ key={icon ? showIcon(icon)[1] : "chevron-up"}
83
+ onClick={(e)=> handleIconClick(e)}
84
+ style={{ verticalAlign: "middle", color: color }}
85
+ >
86
+ <Icon icon={icon ? showIcon(icon)[1] : "chevron-up"}
87
+ size={iconSize}
88
+ />
89
+ </div>
90
+ )}
91
+ </>
92
+ );
93
+ }
94
+
23
95
  const CollapsibleMain = ({
24
96
  children,
25
97
  className,
@@ -48,7 +120,7 @@ const CollapsibleMain = ({
48
120
  >
49
121
  <FlexItem>{children}</FlexItem>
50
122
  <FlexItem>
51
- <CollapsibleIcon
123
+ <ToggleIcon
52
124
  collapsed={collapsed as () => void}
53
125
  icon={icon as string[] | string}
54
126
  iconColor={iconColor as IconColors}
@@ -1,3 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <%= content.presence %>
3
8
  <% end %>
@@ -1,3 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria,
6
+ **combined_html_options) do %>
2
7
  <%= content.presence %>
3
8
  <% end %>
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria,
6
+ **combined_html_options) do %>
2
7
 
3
8
  <%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>
4
9
  <%= pb_rails("flex/flex_item") do %>
@@ -7,9 +7,6 @@ examples:
7
7
  - collapsible_icons: Custom Icons
8
8
  - collapsible_external_controls: Toggle Collapsible With External Controls
9
9
  - collapsible_external_controls_multiple: Toggle All Collapsibles With One Control
10
- - collapsible_custom_main_rails: Custom Main Section
11
- - collapsible_custom_main_with_icon_rails: Custom Main Section With Icon
12
-
13
10
 
14
11
  react:
15
12
  - collapsible_default: Default
@@ -17,10 +14,6 @@ examples:
17
14
  - collapsible_color: Icon Color
18
15
  - collapsible_icons: Custom Icons
19
16
  - collapsible_state: useCollapsible Hook
20
- - collapsible_custom_main: Custom Main Section
21
- - collapsible_custom_main_with_icon: Custom Main Section With Icon
22
-
23
-
24
17
 
25
18
  swift:
26
19
  - collapsible_default_swift: Default
@@ -2,6 +2,4 @@ export { default as CollapsibleDefault } from './_collapsible_default.jsx'
2
2
  export { default as CollapsibleSize } from './_collapsible_size.jsx'
3
3
  export { default as CollapsibleColor } from './_collapsible_color.jsx'
4
4
  export { default as CollapsibleIcons } from './_collapsible_icons.jsx'
5
- export { default as CollapsibleState } from './_collapsible_state.jsx'
6
- export { default as CollapsibleCustomMain } from './_collapsible_custom_main.jsx'
7
- export { default as CollapsibleCustomMainWithIcon } from './_collapsible_custom_main_with_icon.jsx'
5
+ export {default as CollapsibleState } from './_collapsible_state.jsx'
@@ -75,23 +75,13 @@ export default class PbCollapsible extends PbEnhancedElement {
75
75
  this.displayUpArrow()
76
76
  }
77
77
 
78
- toggleArrows(showDownArrow) {
79
- const downArrow = this.element.querySelector(DOWN_ARROW_SELECTOR);
80
- const upArrow = this.element.querySelector(UP_ARROW_SELECTOR);
81
-
82
- if (downArrow) {
83
- downArrow.style.display = showDownArrow ? 'inline-block' : 'none';
84
- }
85
- if (upArrow) {
86
- upArrow.style.display = showDownArrow ? 'none' : 'inline-block';
87
- }
88
- }
89
-
90
78
  displayDownArrow() {
91
- this.toggleArrows(true);
79
+ this.element.querySelector(DOWN_ARROW_SELECTOR).style.display = 'inline-block'
80
+ this.element.querySelector(UP_ARROW_SELECTOR).style.display = 'none'
92
81
  }
93
-
82
+
94
83
  displayUpArrow() {
95
- this.toggleArrows(false);
96
- }
84
+ this.element.querySelector(UP_ARROW_SELECTOR).style.display = 'inline-block'
85
+ this.element.querySelector(DOWN_ARROW_SELECTOR).style.display = 'none'
86
+ }
97
87
  }
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("body", props: {
3
8
  tag: "span",
4
9
  classname: "pb_contact_kit",
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
  <%= pb_rails("caption", props: object.caption_props) %>
3
8
 
4
9
  <div class=<%= "pb_currency_wrapper#{object.variant_class || object.emphasized_class}" %>>
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ class: object.classname,
4
+ data: object.data,
5
+ id: object.id,
6
+ **combined_html_options) do %>
2
7
  <% if object.stat_label.present? %>
3
8
  <%= pb_rails("body", props: { color: "light", text: object.stat_label } ) %>
4
9
  <% end %>
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria,
6
+ **combined_html_options) do %>
2
7
 
3
8
  <% if object.unstyled %>
4
9
  <!-- icon -->
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <div class="pb_date_range_inline_wrapper">
3
7
  <% if object.icon == true %>
4
8
  <%= pb_rails(object.text_kit, props: { tag: "span", dark: object.dark, color: object.icon_color, text: pb_rails("icon", props: { icon: "calendar-alt", fixed_width: true, size: object.size, classname: "pb_date_range_inline_icon" }) }) %>
@@ -6,7 +6,4 @@ examples:
6
6
 
7
7
  react:
8
8
  - date_range_inline_default: Default
9
-
10
- swift:
11
- - date_range_inline_default_swift: Default
12
- - date_range_inline_props_swift: ""
9
+
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
 
3
7
  <%= pb_rails("flex", props: {vertical: "center"}) do %>
4
8
  <%= pb_rails("flex/flex_item") do %>
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
 
3
7
  <% if object.bold == false %>
4
8
 
@@ -15,10 +15,3 @@ examples:
15
15
  - date_stacked_reverse: Day & Month Reverse
16
16
  - date_stacked_sizes: Sizes
17
17
  - date_stacked_bold: Bold
18
-
19
- swift:
20
- - date_stacked_default_swift: Default
21
- - date_stacked_not_current_year_swift: Not Current Year
22
- - date_stacked_reversed_swift: Day & Month Reverse
23
- - date_stacked_bold_swift: Bold
24
- - date_stacked_props_swift: ""
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ aria: object.aria,
3
+ id: object.id,
4
+ data: object.data,
5
+ class: object.classname,
6
+ **combined_html_options) do %>
2
7
 
3
8
  <%= pb_rails("flex", props: {
4
9
  orientation: "row",
@@ -9,9 +9,3 @@ examples:
9
9
  - date_time_default: Default
10
10
  - date_time_align: Alignment
11
11
  - date_time_size: Size
12
-
13
- swift:
14
- - date_time_default_swift: Default
15
- - date_time_alignment_swift: Alignment
16
- - date_time_size_swift: Size
17
- - date_time_props_swift: ""
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria,
6
+ **combined_html_options) do %>
2
7
 
3
8
  <%= pb_rails("flex", props: {classname: "flex-container", vertical: "stretch"}) do %>
4
9
  <%= pb_rails("body", props: {classname: "flex-item"}) do %>
@@ -1,4 +1,8 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= pb_rails("title", props: { text: object.day_month, size: 4, dark: object.dark }) %>
3
7
  <%= pb_rails("body", props: { text: object.year, size: 4, color: "light", dark: object.dark }) %>
4
8
  <% end %>
@@ -63,10 +63,6 @@
63
63
  width: 100%;
64
64
 
65
65
  [class*="pb_dropdown_option"] {
66
- padding-left: $space_sm;
67
- padding-right: $space_sm;
68
- padding-top: $space_xs;
69
- padding-bottom: $space_xs;
70
66
  cursor: pointer;
71
67
  &:hover {
72
68
  background-color: $border_light;
@@ -4,6 +4,7 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../uti
4
4
  import { globalProps } from "../utilities/globalProps";
5
5
  import { GenericObject } from "../types";
6
6
 
7
+ import Body from "../pb_body/_body";
7
8
  import Caption from "../pb_caption/_caption";
8
9
 
9
10
  import DropdownContainer from "./subcomponents/DropdownContainer";
@@ -234,7 +235,9 @@ const Dropdown = (props: DropdownProps) => {
234
235
  options?.map((option: GenericObject) => (
235
236
  <Dropdown.Option key={option.id}
236
237
  option={option}
237
- />
238
+ >
239
+ <Body text={option.label} />
240
+ </Dropdown.Option>
238
241
  ))}
239
242
  </DropdownContainer>
240
243
  </>
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { Dropdown, User, Flex, FlexItem, Badge, Avatar } from '../../'
2
+ import { Dropdown, User, FlexItem, Badge, Avatar } from '../../'
3
3
 
4
4
  const DropdownWithCustomDisplay = (props) => {
5
5
  const [selectedOption, setSelectedOption] = useState();
@@ -69,10 +69,7 @@ const DropdownWithCustomDisplay = (props) => {
69
69
  <Dropdown.Option key={option.id}
70
70
  option={option}
71
71
  >
72
- <Flex
73
- align="center"
74
- justify="between"
75
- >
72
+ <>
76
73
  <FlexItem>
77
74
  <User
78
75
  align="left"
@@ -96,7 +93,7 @@ const DropdownWithCustomDisplay = (props) => {
96
93
  }`}
97
94
  />
98
95
  </FlexItem>
99
- </Flex>
96
+ </>
100
97
  </Dropdown.Option>
101
98
  ))}
102
99
  </Dropdown>
@@ -48,17 +48,12 @@
48
48
  <%= pb_rails("dropdown/dropdown_container") do %>
49
49
  <% options.each do |option| %>
50
50
  <%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
51
- <%= pb_rails("flex", props: {
52
- align: "center",
53
- justify: "between",
54
- }) do %>
55
- <%= pb_rails("flex/flex_item") do %>
56
- <%= pb_rails("user", props: {name: option[:label], align:"left", avatar: true, orientation:"horizontal", territory:option[:territory], title: option[:title]}) %>
57
- <% end %>
58
- <%= pb_rails("flex/flex_item") do %>
59
- <%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
60
- <% end %>
61
- <% end %>
51
+ <%= pb_rails("flex/flex_item") do %>
52
+ <%= pb_rails("user", props: {name: option[:label], align:"left", avatar: true, orientation:"horizontal", territory:option[:territory], title: option[:title]}) %>
53
+ <% end %>
54
+ <%= pb_rails("flex/flex_item") do %>
55
+ <%= pb_rails("badge", props: {rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
56
+ <% end %>
62
57
  <% end %>
63
58
  <% end %>
64
59
  <% end %>
@@ -38,10 +38,7 @@ const DropdownWithCustomOptions = (props) => {
38
38
  <Dropdown.Option key={option.id}
39
39
  option={option}
40
40
  >
41
- <Flex
42
- align="center"
43
- justify="between"
44
- >
41
+ <>
45
42
  <FlexItem>
46
43
  <Flex>
47
44
  <Icon icon={option.icon}
@@ -55,7 +52,7 @@ const DropdownWithCustomOptions = (props) => {
55
52
  text={option.areaCode}
56
53
  />
57
54
  </FlexItem>
58
- </Flex>
55
+ </>
59
56
  </Dropdown.Option>
60
57
  ))}
61
58
  </Dropdown>