playbook_ui 14.12.0.pre.alpha.play1752updatecontenttag5801 → 14.12.0.pre.alpha.play1753updatepbcontenttags5889

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +9 -0
  3. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +11 -7
  4. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +6 -7
  5. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +9 -3
  6. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +6 -2
  7. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +11 -7
  8. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
  9. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
  10. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
  11. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
  12. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
  13. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +11 -2
  15. data/app/pb_kits/playbook/pb_icon/icon.html.erb +6 -2
  16. data/app/pb_kits/playbook/pb_layout/body.html.erb +5 -1
  17. data/app/pb_kits/playbook/pb_layout/footer.html.erb +5 -1
  18. data/app/pb_kits/playbook/pb_layout/header.html.erb +5 -1
  19. data/app/pb_kits/playbook/pb_layout/item.html.erb +5 -1
  20. data/app/pb_kits/playbook/pb_layout/layout.html.erb +5 -1
  21. data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +5 -1
  22. data/app/pb_kits/playbook/pb_legend/legend.html.erb +6 -1
  23. data/app/pb_kits/playbook/pb_message/message.html.erb +6 -1
  24. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -1
  25. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
  26. data/app/pb_kits/playbook/pb_nav/item.html.erb +3 -21
  27. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
  28. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
  29. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
  30. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +6 -9
  31. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +6 -9
  32. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +26 -0
  33. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +0 -1
  34. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +25 -0
  35. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +25 -0
  36. data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
  37. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +42 -0
  38. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +59 -0
  39. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +2 -0
  40. data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
  41. data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
  42. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  43. data/app/pb_kits/playbook/pb_user/user.rb +1 -0
  44. data/app/pb_kits/playbook/pb_user/user.test.js +14 -0
  45. data/dist/chunks/{_typeahead-BIhRQo8Q.js → _typeahead-W0hatdPs.js} +2 -2
  46. data/dist/chunks/{_weekday_stacked-CttHBFW3.js → _weekday_stacked-C98LOqgG.js} +2 -2
  47. data/dist/chunks/vendor.js +1 -1
  48. data/dist/playbook-doc.js +1 -1
  49. data/dist/playbook-rails-react-bindings.js +1 -1
  50. data/dist/playbook-rails.js +1 -1
  51. data/dist/playbook.css +1 -1
  52. data/lib/playbook/version.rb +1 -1
  53. metadata +11 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c736c5bb605e344804ef02494da2ec955f7164885304d265908dcedd847f901f
4
- data.tar.gz: 8f3eca8f553ffbe71558a7b5a6b052ef66bab1f637939c3aa96d7f77e3dc917e
3
+ metadata.gz: b1cb33a00c28e36722ada1eae88b50f2a81e68bd22e1d680af99c0b027138106
4
+ data.tar.gz: 7c7a3d8949529541dca28d5b6c03aeda4cc965ac985deed733cb403cfd9d7a12
5
5
  SHA512:
6
- metadata.gz: 34b49bde7e4b5ea26f628a61bbc9cd7144f4a204fa40597842a75b8b14410e10425c35d8b09c07a65e635f14ad80471716b8e8c85dbb86920d488dde7f87dc25
7
- data.tar.gz: 90509627dfb16684dcd36a5a1fd7bb14b6f054585287e7bf5b23f4c1f844dc7e19b9171463aa22952afec761d41a876ae0670af4ecd170f5e59fa6e67ba3268c
6
+ metadata.gz: 8a25a849f301019269aaeb99c42ec76def81e8e79cd141627c8f3173e61247260e7a23be8da5f464e2dedd6845cd7c0f912576bcde09be8366a3e059549c0bc4
7
+ data.tar.gz: 83d2d817262457cd4fb6466513a7ad85129ce5d47ec2e1c480cfee9bbb2bff19b1e4b5195a8da4ae03451bcd91e03dda58a7866e7d01d105ea68b9d75a30be79
@@ -27,6 +27,9 @@ $avatar-sizes: (
27
27
  flex-basis: $size;
28
28
 
29
29
  & > [class^=pb_flex_kit] {
30
+ [class^=pb_card_kit] {
31
+ padding: 2px;
32
+ }
30
33
  [class^=pb_card_kit].overlay_bottom_center,
31
34
  [class^=pb_card_kit].overlay_top_center {
32
35
  left: 50%;
@@ -52,6 +55,10 @@ $avatar-sizes: (
52
55
  flex-grow: 0;
53
56
  flex-basis: $size;
54
57
 
58
+ .dark & {
59
+ background: $text_dk_light;
60
+ }
61
+
55
62
  &::before {
56
63
  content: attr(data-initials);
57
64
  width: 100%;
@@ -78,9 +85,11 @@ $avatar-sizes: (
78
85
  }
79
86
  }
80
87
  }
88
+
81
89
  &.dark {
82
90
  [class^=pb_card_kit] {
83
91
  position: absolute;
92
+ padding: 2px;
84
93
  }
85
94
  }
86
95
  }
@@ -23,8 +23,8 @@ export type AvatarProps = {
23
23
  variant?: string,
24
24
  icon?: string
25
25
  },
26
- data?: {[key: string]: string},
27
26
  dark?: boolean,
27
+ data?: {[key: string]: string},
28
28
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
29
29
  id?: string,
30
30
  imageAlt?: string,
@@ -71,13 +71,13 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
71
71
 
72
72
  const canShowImage = imageUrl && !error
73
73
 
74
- const onlineStatusSize =
74
+ const onlineStatusSize =
75
75
  ['xxs', 'xs'].includes(size) ? 'sm' :
76
76
  ['sm', 'md'].includes(size) ? 'md' :
77
77
  ['lg', 'xl'].includes(size) ? 'lg' :
78
78
  'sm';
79
79
 
80
- const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
80
+ const onlineStatusPositionProps = (["xxs", "xs", "sm"].includes(size)) ?
81
81
  {
82
82
  top: { inset: true, value: "0" },
83
83
  right: { inset: false, value: "xxs" }
@@ -96,10 +96,10 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
96
96
  id={id}
97
97
  >
98
98
  {componentOverlay ? (
99
- <Flex display="display_inline_block"
99
+ <Flex display="display_inline_block"
100
100
  position="relative"
101
101
  >
102
- <div className="avatar_wrapper"
102
+ <div className="avatar_wrapper"
103
103
  data-initials={initials}
104
104
  >
105
105
  {canShowImage && (
@@ -115,12 +115,14 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
115
115
  <Card
116
116
  borderNone
117
117
  borderRadius="rounded"
118
+ dark={dark}
118
119
  padding="none"
119
120
  position="absolute"
120
121
  {...getPlacementProps(componentOverlay.placement, size)}
121
122
  >
122
-
123
+
123
124
  <Badge
125
+ dark={dark}
124
126
  rounded
125
127
  text={componentOverlay.text}
126
128
  variant={componentOverlay.variant as "error" | "info" | "neutral" | "primary" | "success" | "warning" | "notification"}
@@ -131,11 +133,13 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
131
133
  <Card
132
134
  borderNone
133
135
  borderRadius="rounded"
136
+ dark={dark}
134
137
  htmlOptions={{style: {padding:"2px"}}}
135
138
  position="absolute"
136
139
  {...getPlacementProps(componentOverlay.placement, size)}
137
140
  >
138
141
  <IconCircle
142
+ dark={dark}
139
143
  icon={componentOverlay.icon}
140
144
  size="xxs"
141
145
  variant={componentOverlay.variant as "default" | "royal" | "blue" | "purple" | "teal" | "red" | "yellow" | "orange" | "green"}
@@ -145,7 +149,7 @@ const Avatar = (props: AvatarProps): React.ReactElement => {
145
149
  </Flex>
146
150
  ) : (
147
151
  <>
148
- <div className="avatar_wrapper"
152
+ <div className="avatar_wrapper"
149
153
  data-initials={initials}
150
154
  >
151
155
  {canShowImage && (
@@ -1,22 +1,22 @@
1
1
 
2
2
  <%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
3
3
  <% if object.component_overlay && object.component_overlay[:component] == "icon_circle" %>
4
- <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
4
+ <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
5
5
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
6
6
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
7
7
  <% end %>
8
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", html_options: { style: "padding: 2px" }, position: "absolute" }.merge(specific_placement_style)) do %>
8
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, position: "absolute" }.merge(specific_placement_style)) do %>
9
9
 
10
- <%= pb_rails("icon_circle", props: { size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
10
+ <%= pb_rails("icon_circle", props: { dark: object.dark, size: "xxs", icon: object.component_overlay[:icon], variant: object.component_overlay[:variant] }) %>
11
11
  <% end %>
12
12
  <% end %>
13
13
  <% elsif object.component_overlay && object.component_overlay[:component] == "badge" %>
14
- <%= pb_rails("flex", props: {display: "display_inline_block", position: "relative" }) do %>
14
+ <%= pb_rails("flex", props: { display: "display_inline_block", position: "relative" }) do %>
15
15
  <%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
16
16
  <%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
17
17
  <% end %>
18
- <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
- <%= pb_rails("badge", props: { rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
18
+ <%= pb_rails("card", props: { border_none: true, border_radius: "rounded", dark: object.dark, padding: "none", position: "absolute" }.merge(specific_placement_style)) do %>
19
+ <%= pb_rails("badge", props: { dark: object.dark, rounded: true, text: object.component_overlay[:text], variant: object.component_overlay[:variant] }) %>
20
20
  <% end %>
21
21
  <% end %>
22
22
  <% else %>
@@ -26,4 +26,3 @@
26
26
  <%= pb_rails("online_status", props: object.online_status_props) if object.status %>
27
27
  <% end %>
28
28
  <% end %>
29
-
@@ -1,18 +1,19 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarBadgeComponentOverlay = () => {
4
+ const AvatarBadgeComponentOverlay = (props) => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
8
8
  componentOverlay={{
9
9
  component: "badge",
10
10
  placement: "bottom-right",
11
- text: "12"
11
+ text: "12",
12
12
  }}
13
13
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
14
14
  marginBottom="sm"
15
15
  size="sm"
16
+ {...props}
16
17
  />
17
18
 
18
19
  <Avatar
@@ -24,6 +25,8 @@ const AvatarBadgeComponentOverlay = () => {
24
25
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
25
26
  marginBottom="sm"
26
27
  size="md"
28
+ {...props}
29
+
27
30
  />
28
31
 
29
32
  <Avatar
@@ -36,6 +39,8 @@ const AvatarBadgeComponentOverlay = () => {
36
39
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
37
40
  marginBottom="sm"
38
41
  size="lg"
42
+ {...props}
43
+
39
44
  />
40
45
 
41
46
  <Avatar
@@ -48,7 +53,8 @@ const AvatarBadgeComponentOverlay = () => {
48
53
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
49
54
  marginBottom="sm"
50
55
  size="xl"
51
- />
56
+ {...props}
57
+ />
52
58
  </div>
53
59
  )
54
60
  }
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { Avatar } from 'playbook-ui'
3
3
 
4
- const AvatarCircleIconComponentOverlay = () => {
4
+ const AvatarCircleIconComponentOverlay = (props) => {
5
5
  return (
6
6
  <div>
7
7
  <Avatar
@@ -14,6 +14,7 @@ const AvatarCircleIconComponentOverlay = () => {
14
14
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
15
15
  marginBottom="sm"
16
16
  size="sm"
17
+ {...props}
17
18
  />
18
19
 
19
20
  <Avatar
@@ -26,6 +27,7 @@ const AvatarCircleIconComponentOverlay = () => {
26
27
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
27
28
  marginBottom="sm"
28
29
  size="md"
30
+ {...props}
29
31
  />
30
32
 
31
33
  <Avatar
@@ -38,6 +40,7 @@ const AvatarCircleIconComponentOverlay = () => {
38
40
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
39
41
  marginBottom="sm"
40
42
  size="lg"
43
+ {...props}
41
44
  />
42
45
 
43
46
  <Avatar
@@ -50,7 +53,8 @@ const AvatarCircleIconComponentOverlay = () => {
50
53
  imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
51
54
  marginBottom="sm"
52
55
  size="xl"
53
- />
56
+ {...props}
57
+ />
54
58
  </div>
55
59
  )
56
60
  }
@@ -18,6 +18,7 @@ type HomeAddressStreetProps = {
18
18
  className?: string,
19
19
  data?: { [key: string]: string },
20
20
  dark?: boolean,
21
+ preserveCase?: boolean,
21
22
  emphasis: "street" | "city" | "none",
22
23
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
23
24
  homeId: string,
@@ -43,6 +44,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
43
44
  htmlOptions = {},
44
45
  homeId,
45
46
  homeUrl,
47
+ preserveCase = false,
46
48
  target,
47
49
  newWindow,
48
50
  houseStyle,
@@ -77,6 +79,8 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
77
79
  return null
78
80
  }
79
81
 
82
+ const formatStreetAdr = (address: string): string => preserveCase ? address : titleize(address)
83
+
80
84
  return (
81
85
  <div
82
86
  className={classes(className, dark)}
@@ -91,7 +95,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
91
95
  dark={dark}
92
96
  size={4}
93
97
  >
94
- {joinPresent([titleize(address), houseStyle], ' · ')}
98
+ {joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
95
99
  </Title>
96
100
  <Title
97
101
  className="pb_home_address_street_address"
@@ -101,14 +105,14 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
101
105
  {titleize(addressCont)}
102
106
  </Title>
103
107
  <Body color="light">
104
- {`${titleize(city)}, ${state} ${zipcode}`}
108
+ {`${titleize(city)}, ${state.toUpperCase()} ${zipcode}`}
105
109
  </Body>
106
110
  </div>
107
111
  }
108
112
  {emphasis == 'city' &&
109
113
  <div>
110
114
  <Body color="light">
111
- {joinPresent([titleize(address), houseStyle], ' · ')}
115
+ {joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
112
116
  </Body>
113
117
  <Body color="light">{titleize(addressCont)}</Body>
114
118
  <div>
@@ -118,7 +122,7 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
118
122
  size={4}
119
123
  tag="span"
120
124
  >
121
- {`${titleize(city)}, ${state}`}
125
+ {`${titleize(city)}, ${state.toUpperCase()}`}
122
126
  </Title>
123
127
  <Body
124
128
  color="light"
@@ -132,15 +136,15 @@ const HomeAddressStreet = (props: HomeAddressStreetProps): React.ReactElement =>
132
136
  {emphasis == 'none' &&
133
137
  <div>
134
138
  <Body dark={dark}>
135
- {joinPresent([titleize(address), houseStyle], ' · ')}
139
+ {joinPresent([formatStreetAdr(address), houseStyle], ' · ')}
136
140
  </Body>
137
- <Body dark={dark}>{titleize(addressCont)}</Body>
141
+ <Body dark={dark}>{formatStreetAdr(addressCont)}</Body>
138
142
  <div>
139
143
  <Body
140
144
  color="light"
141
145
  dark={dark}
142
146
  >
143
- {`${titleize(city)}, ${state} ${zipcode}`}
147
+ {`${titleize(city)}, ${state.toUpperCase()} ${zipcode}`}
144
148
  </Body>
145
149
  </div>
146
150
  </div>
@@ -0,0 +1,11 @@
1
+ <%= pb_rails("home_address_street", props: {
2
+ address: "70 pRoSpEcT ave",
3
+ address_cont: "Apt M18",
4
+ city: "West Chester",
5
+ home_id: 8250263,
6
+ home_url: "https://powerhrg.com/",
7
+ preserve_case: true,
8
+ state: "pa",
9
+ zipcode: "19382",
10
+ territory: "PHL",
11
+ }) %>
@@ -0,0 +1,22 @@
1
+ import React from 'react'
2
+
3
+ import HomeAddressStreet from '../_home_address_street'
4
+
5
+ const HomeAddressStreetFormatting = (props) => {
6
+ return (
7
+ <HomeAddressStreet
8
+ address="70 pRoSpEcT ave"
9
+ addressCont="Apt M18"
10
+ city="West Chester"
11
+ homeId="8250263"
12
+ homeUrl="https://powerhrg.com/"
13
+ preserveCase
14
+ state="pa"
15
+ territory="PHL"
16
+ zipcode="19382"
17
+ {...props}
18
+ />
19
+ )
20
+ }
21
+
22
+ export default HomeAddressStreetFormatting
@@ -0,0 +1 @@
1
+ The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserve_case: true`, the street address will be rendered exactly as entered, without automatic title capitalization.
@@ -0,0 +1 @@
1
+ The `state` prop will always capitalize the state name, even if the data entered is in lowercase. For example, when `state="pa"` is passed, it will be rendered as "PA". When you pass `preserveCase`, the street address will be rendered exactly as entered, without automatic title capitalization.
@@ -5,12 +5,14 @@ examples:
5
5
  - home_address_street_emphasis: Emphasis
6
6
  - home_address_street_modified: Modified
7
7
  - home_address_street_link: Link
8
+ - home_address_street_formatting: Formatting
8
9
 
9
10
  react:
10
11
  - home_address_street_default: Default
11
12
  - home_address_street_emphasis: Emphasis
12
13
  - home_address_street_modified: Modified
13
14
  - home_address_street_link: Link
15
+ - home_address_street_formatting: Formatting
14
16
 
15
17
  swift:
16
18
  - home_address_street_default_swift: Default
@@ -2,3 +2,4 @@ export { default as HomeAddressStreetDefault } from './_home_address_street_defa
2
2
  export { default as HomeAddressStreetEmphasis } from './_home_address_street_emphasis.jsx'
3
3
  export { default as HomeAddressStreetModified } from './_home_address_street_modified.jsx'
4
4
  export { default as HomeAddressStreetLink } from './_home_address_street_link.jsx'
5
+ export { default as HomeAddressStreetFormatting } from './_home_address_street_formatting.jsx'
@@ -18,6 +18,7 @@ module Playbook
18
18
  prop :state
19
19
  prop :zipcode
20
20
  prop :territory
21
+ prop :preserve_case, default: false
21
22
  prop :dark, type: Playbook::Props::Boolean, default: false
22
23
 
23
24
  def classname
@@ -29,7 +30,7 @@ module Playbook
29
30
  end
30
31
 
31
32
  def city_state
32
- [city&.titleize, state].join(", ")
33
+ [city&.titleize, state&.upcase].join(", ")
33
34
  end
34
35
 
35
36
  def zip
@@ -37,7 +38,7 @@ module Playbook
37
38
  end
38
39
 
39
40
  def address_house_style
40
- [address&.titleize, house_style].join(separator)
41
+ [format_street_address, house_style].join(separator)
41
42
  end
42
43
 
43
44
  def address_house_style2
@@ -48,6 +49,14 @@ module Playbook
48
49
  house_style ? " \u00b7 " : ""
49
50
  end
50
51
 
52
+ def format_street_address
53
+ preserve_case ? address : custom_titleize(address)
54
+ end
55
+
56
+ def custom_titleize(str)
57
+ str.split(" ").map(&:capitalize).join(" ")
58
+ end
59
+
51
60
  def city_emphasis_props
52
61
  {
53
62
  address_house_style: address_house_style,
@@ -5,8 +5,12 @@
5
5
  <%= object.icon.html_safe %>
6
6
  </span>
7
7
  <% else %>
8
- <%= pb_content_tag(:i) do %>
9
- <% end %>
8
+ <%= content_tag(:i, nil,
9
+ id: object.id,
10
+ data: object.data,
11
+ class: object.classname,
12
+ **combined_html_options
13
+ ) %>
10
14
  <%= content_tag(:span, nil,
11
15
  aria: { label: "#{object.icon} icon" }.merge(object.aria),
12
16
  hidden: true
@@ -1,3 +1,7 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(object.tag,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= content.presence %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(object.tag,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= content.presence %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(object.tag,
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ **combined_html_options) do %>
2
6
  <%= content.presence %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
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
  <%= content %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
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
  <%= content.presence %>
3
7
  <% end %>
@@ -1,3 +1,7 @@
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
  <%= content.presence %>
3
7
  <% end %>
@@ -1,4 +1,9 @@
1
- <%= pb_content_tag do %>
1
+ <%= content_tag(:div, object.text,
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: {color: object.body_color}) do %>
3
8
  <span style="<%= object.custom_color %>" class=<%= object.custom_color_class %>></span>
4
9
  <%= pb_rails("title", props: { dark: object.dark, text: object.prefix_text, tag: "span", size: 4 }) %>
@@ -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.valid? %>
3
8
  <%= pb_rails("avatar", props: {
4
9
  name: object.avatar_name,
@@ -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 %>
3
8
  <% end %>
@@ -1,8 +1,3 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- data: object.data,
4
- id: object.id,
5
- class: object.classname,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <%= react_component("MultiLevelSelect", object.multi_level_select_options) %>
8
3
  <% end %>
@@ -1,16 +1,7 @@
1
1
  <% if object.collapsible %>
2
2
  <%= pb_rails("collapsible", props: { name: "collapsible-nav-example", classname: object.collapsible_nav_classname }) do %>
3
3
  <%= pb_rails("collapsible/collapsible_main", props: { name: "default-collapsible-nav", icon: object.collapsible_icons, size: "xs", dark: object.dark, classname:object.margin_classes }) do %>
4
- <%= content_tag(object.tag,
5
- aria: object.aria,
6
- class: object.classname,
7
- data: object.data,
8
- dark: object.dark,
9
- id: object.id,
10
- href: object.link && object.link,
11
- target: object.link && object.target,
12
- **combined_html_options
13
- ) do %>
4
+ <%= pb_content_tag do %>
14
5
  <% if object.image_url %>
15
6
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper_collapsible" }) %>
16
7
  <% end %>
@@ -20,23 +11,14 @@
20
11
  <span class="pb_nav_list_item_text_collapsible">
21
12
  <%= object.text %>
22
13
  </span>
23
- <% end %>
14
+ <% end %>
24
15
  <% end %>
25
16
  <%= pb_rails("collapsible/collapsible_content", props: {collapsed: object.collapsed}) do %>
26
17
  <%= content.presence %>
27
18
  <% end %>
28
19
  <% end %>
29
20
  <% else %>
30
- <%= content_tag(object.tag,
31
- aria: object.aria,
32
- class: object.classname,
33
- **combined_html_options,
34
- data: object.data,
35
- dark: object.dark,
36
- id: object.id,
37
- href: object.link && object.link,
38
- target: object.link && object.target
39
- ) do %>
21
+ <%= pb_content_tag do %>
40
22
  <% if object.image_url %>
41
23
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
42
24
  <% end %>
@@ -1,12 +1,7 @@
1
- <%= content_tag(:nav,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <% if object.title %>
8
- <%= content_tag(:div, class: "pb_nav_list_title") do %>
9
- <%= content_tag(:a, class: "pb_nav_list_item_link_text", href: object.link) do %>
3
+ <%= pb_content_tag do %>
4
+ <%= pb_content_tag do %>
10
5
  <%= pb_rails("caption", props: { text: object.title, dark: dark }) %>
11
6
  <% end %>
12
7
  <% end %>
@@ -1,7 +1,2 @@
1
- <%= content_tag(:div,
2
- aria: object.aria.merge!(label: object.status),
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
7
2
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <div class="pb_popover_tooltip hide" id="<%= object.tooltip_id %>" role="tooltip" style="<%= object.z_index_helper %>">
8
3
  <div class="pb_popover_body <%= object.width_height_class_helper %> <%= object.popover_spacing_helper %>" style="<%= object.width_height_helper %>">
9
4
  <%= content.presence %>