playbook_ui 13.27.0 → 13.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -5
  3. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -5
  4. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -5
  5. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -5
  6. data/app/pb_kits/playbook/pb_avatar/Utilities/GetPlacementPropsHelper.tsx +16 -0
  7. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +16 -0
  8. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_avatar/avatar.rb +4 -0
  10. data/app/pb_kits/playbook/pb_avatar/avatar.test.js +47 -0
  11. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.html.erb +46 -66
  12. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +8 -29
  13. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.md +3 -0
  14. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.html.erb +13 -33
  15. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +48 -67
  16. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.md +3 -0
  17. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +0 -20
  18. data/app/pb_kits/playbook/pb_avatar/docs/example.yml +2 -2
  19. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +1 -6
  20. data/app/pb_kits/playbook/pb_badge/badge.html.erb +1 -6
  21. data/app/pb_kits/playbook/pb_body/_body.scss +3 -0
  22. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
  23. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +4 -3
  24. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +1 -6
  25. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -1
  26. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +5 -0
  27. data/app/pb_kits/playbook/pb_card/card.rb +1 -1
  28. data/app/pb_kits/playbook/pb_card/docs/_card_background.html.erb +20 -0
  29. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +41 -1
  30. data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
  31. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -1
  32. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  33. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
  34. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -6
  35. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +21 -10
  36. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleIcon.tsx +92 -0
  37. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +3 -75
  38. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -6
  39. data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +1 -6
  40. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.html.erb +15 -0
  41. data/app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb +37 -0
  42. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +1 -6
  43. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +72 -0
  44. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md +3 -0
  45. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +19 -0
  46. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md +3 -0
  47. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx +73 -0
  48. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.md +3 -0
  49. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.html.erb +20 -0
  50. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.md +3 -0
  51. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +7 -0
  52. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +3 -1
  53. data/app/pb_kits/playbook/pb_collapsible/index.js +16 -6
  54. data/app/pb_kits/playbook/pb_contact/contact.html.erb +1 -6
  55. data/app/pb_kits/playbook/pb_currency/currency.html.erb +1 -6
  56. data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +1 -6
  57. data/app/pb_kits/playbook/pb_date/date.html.erb +1 -6
  58. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +1 -5
  59. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md +61 -0
  60. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md +11 -0
  61. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +4 -1
  62. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +1 -5
  63. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +1 -5
  64. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md +32 -0
  65. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md +17 -0
  66. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md +19 -0
  67. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md +10 -0
  68. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md +17 -0
  69. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +7 -0
  70. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -6
  71. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md +39 -0
  72. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md +39 -0
  73. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md +15 -0
  74. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md +78 -0
  75. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +6 -0
  76. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +1 -6
  77. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +1 -5
  78. data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +1 -1
  79. data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +3 -3
  80. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +6 -1
  81. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +5 -6
  82. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +3 -3
  83. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md +1 -1
  84. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md +5 -6
  85. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_subcomponent_structure.html.erb → _dropdown_subcomponent_structure_rails.html.erb} +3 -3
  86. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.md +6 -0
  87. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -3
  88. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +3 -3
  89. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_display.html.erb → _dropdown_with_custom_display_rails.html.erb} +11 -6
  90. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +5 -0
  91. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +5 -2
  92. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md +1 -1
  93. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_options.html.erb → _dropdown_with_custom_options_rails.html.erb} +16 -11
  94. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.md +1 -0
  95. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +3 -3
  96. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
  97. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +5 -2
  98. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md +1 -1
  99. data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_custom_trigger.html.erb → _dropdown_with_custom_trigger_rails.html.erb} +16 -11
  100. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.md +1 -0
  101. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -3
  102. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.md +1 -1
  103. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -6
  104. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +1 -0
  105. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -0
  106. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
  107. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +3 -9
  108. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +2 -6
  109. data/app/pb_kits/playbook/pb_dropdown/index.js +2 -1
  110. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +6 -14
  111. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md +23 -0
  112. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md +7 -0
  113. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md +9 -0
  114. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md +22 -0
  115. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md +9 -0
  116. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md +62 -0
  117. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +8 -0
  118. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +9 -0
  119. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +1 -6
  120. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  121. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  122. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +15 -0
  123. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -6
  124. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +1 -6
  125. data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +1 -6
  126. data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +1 -6
  127. data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +1 -6
  128. data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -5
  129. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -6
  130. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +8 -0
  131. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -6
  132. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +1 -6
  133. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +1 -1
  134. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +1 -6
  135. data/app/pb_kits/playbook/pb_person/person.html.erb +1 -6
  136. data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +1 -6
  137. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -6
  138. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -6
  139. data/app/pb_kits/playbook/pb_select/_select.scss +8 -0
  140. data/app/pb_kits/playbook/pb_source/source.html.erb +1 -5
  141. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +1 -5
  142. data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +1 -5
  143. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +19 -0
  144. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +1 -5
  145. data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +1 -5
  146. data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -5
  147. data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +1 -5
  148. data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +1 -6
  149. data/app/pb_kits/playbook/pb_title/_title.scss +5 -1
  150. data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +1 -6
  151. data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +1 -5
  152. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +1 -6
  153. data/app/pb_kits/playbook/tokens/_titles.scss +5 -1
  154. data/dist/menu.yml +2 -2
  155. data/dist/playbook-rails.js +5 -5
  156. data/lib/playbook/forms/builder/phone_number_field.rb +12 -0
  157. data/lib/playbook/forms/builder.rb +1 -0
  158. data/lib/playbook/kit_base.rb +1 -1
  159. data/lib/playbook/version.rb +2 -2
  160. metadata +42 -6
@@ -0,0 +1,23 @@
1
+ ![Children-Toast](https://github.com/powerhome/playbook-swift/assets/54749071/55aebd12-43c4-4061-92d3-6aebb07ff349)
2
+
3
+ ```swift
4
+ VStack(alignment: .leading) {
5
+ PBToast(
6
+ text: message,
7
+ variant: .success,
8
+ actionView: .custom(AnyView(Text("Undo").pbFont(.title4, color: .white))),
9
+ dismissAction: closeToast
10
+ )
11
+ PBToast(
12
+ variant: .custom(nil, .pbPrimary),
13
+ actionView: .custom(
14
+ AnyView(
15
+ HStack {
16
+ Text("Undo action").pbFont(.caption, color: .white)
17
+ PBButton(variant: .primary, title: "Undo").disabled(true)
18
+ }
19
+ )),
20
+ dismissAction: closeToast
21
+ )
22
+ }
23
+ ```
@@ -0,0 +1,7 @@
1
+ ```swift
2
+ VStack(alignment: .leading) {
3
+ PBToast(text: "Error Message", variant: .error, actionView: .default, dismissAction: closeToast)
4
+ PBToast(text: "Items Successfully Moved", variant: .success, actionView: .default, dismissAction: closeToast)
5
+ PBToast(text: "Scan to Assign Selected Items", variant: .neutral, actionView: .default, dismissAction: closeToast)
6
+ }
7
+ ```
@@ -0,0 +1,9 @@
1
+ ![Default-Toast](https://github.com/powerhome/playbook-swift/assets/54749071/cc465b1b-85ba-4492-a832-b06b842a1555)
2
+
3
+ ```swift
4
+ VStack(alignment: .leading) {
5
+ PBToast(text: "Error Message", variant: .error, dismissAction: closeToast)
6
+ PBToast(text: "Items Successfully Moved", variant: .success, dismissAction: closeToast)
7
+ PBToast(text: "Scan to Assign Selected Items", variant: .neutral, dismissAction: closeToast)
8
+ }
9
+ ```
@@ -0,0 +1,22 @@
1
+ ```swift
2
+ HStack {
3
+ PBButton(variant: .secondary, title: "Top Center") {
4
+ position = .top
5
+ toastView = PBToast(
6
+ text: "Top Center",
7
+ variant: .neutral,
8
+ actionView: .withTimer(3),
9
+ dismissAction: closeToast
10
+ )
11
+ }
12
+ PBButton(variant: .secondary, title: "Bottom Center") {
13
+ position = .bottom
14
+ toastView = PBToast(
15
+ text: "Bottom Center",
16
+ variant: .neutral,
17
+ actionView: .withTimer(2),
18
+ dismissAction: closeToast
19
+ )
20
+ }
21
+ }
22
+ ```
@@ -0,0 +1,9 @@
1
+ ![Multiline-Toast](https://github.com/powerhome/playbook-swift/assets/54749071/df7bb8da-89ee-477e-8001-7262e48ce03a)
2
+
3
+ ```swift
4
+ PBToast(
5
+ text: message,
6
+ variant: .custom(.infoCircle, .pbPrimary),
7
+ dismissAction: closeToast
8
+ )
9
+ ```
@@ -0,0 +1,62 @@
1
+ ```swift
2
+ GridRow {
3
+ PBButton(variant: .secondary, title: "Top Left") {
4
+ position = .topLeft
5
+ toastView = PBToast(
6
+ text: "Top Left",
7
+ variant: .neutral,
8
+ actionView: .default,
9
+ dismissAction: closeToast
10
+ )
11
+ }
12
+ PBButton(variant: .secondary, title: "Top Right") {
13
+ position = .topRight
14
+ toastView = PBToast(
15
+ text: "Top Right",
16
+ variant: .neutral,
17
+ actionView: .default,
18
+ dismissAction: closeToast
19
+ )
20
+ }
21
+ }
22
+ GridRow {
23
+ PBButton(variant: .secondary, title: "Top Center") {
24
+ position = .top
25
+ toastView = PBToast(
26
+ text: "Top Center",
27
+ variant: .neutral,
28
+ actionView: .default,
29
+ dismissAction: closeToast
30
+ )
31
+ }
32
+ PBButton(variant: .secondary, title: "Bottom Center") {
33
+ position = .bottom
34
+ toastView = PBToast(
35
+ text: "Bottom Center",
36
+ variant: .custom(.user, .status(.neutral)),
37
+ actionView: .default,
38
+ dismissAction: closeToast
39
+ )
40
+ }
41
+ }
42
+ GridRow {
43
+ PBButton(variant: .secondary, title: "Bottom Left") {
44
+ position = .bottomLeft
45
+ toastView = PBToast(
46
+ text: "Bottom Left",
47
+ variant: .custom(.user, .status(.neutral)),
48
+ actionView: .default,
49
+ dismissAction: closeToast
50
+ )
51
+ }
52
+ PBButton(variant: .secondary, title: "Bottom Right") {
53
+ position = .bottomRight
54
+ toastView = PBToast(
55
+ text: "Bottom Right",
56
+ variant: .custom(.user, .status(.neutral)),
57
+ actionView: .default,
58
+ dismissAction: closeToast
59
+ )
60
+ }
61
+ }
62
+ ```
@@ -0,0 +1,8 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **text** | `String` |`Value for the toast message` | `nil` | |
5
+ | **variant** | `Variant` | `Determines the type pf toast message being displayed` | `.custom()` | `error`, `success`,
6
+ `neutral`, `custom()` |
7
+ | **actionView** | `dismissAction` | Dismisses the toast message | `.default` | `default` `custom()` `withTimer()` |
8
+ | **dismissAction** | `(() -> Void)` | `Triggers the dismiss action` | | |
@@ -14,3 +14,12 @@ examples:
14
14
  - fixed_confirmation_toast_positions: Click to Show Positions
15
15
  - fixed_confirmation_toast_auto_close: Click to Show Auto Close
16
16
  - fixed_confirmation_toast_children: Children
17
+
18
+ swift:
19
+ - fixed_confirmation_toast_default_swift: Default
20
+ - fixed_confirmation_toast_multi_line_swift: Multi Line
21
+ #- fixed_confirmation_toast_close_swift: Click to Close
22
+ #- fixed_confirmation_toast_positions_swift: Click to Show Positions
23
+ - fixed_confirmation_toast_children_swift: Children
24
+ #- fixed_confirmation_toast_dismiss_with_timer_swift: Timer
25
+ - fixed_confirmation_toast_props_swift: ""
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= pb_rails("icon", props: { icon: object.icon_value, classname: "pb_icon", fixed_width: true }) %>
8
3
 
9
4
  <% if content %>
@@ -16,7 +16,7 @@
16
16
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
17
17
  <%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
18
18
  <%= form.text_field :example_text_field, props: { label: true } %>
19
- <%= form.telephone_field :example_phone_field, props: { label: true } %>
19
+ <%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
20
20
  <%= form.email_field :example_email_field, props: { label: true } %>
21
21
  <%= form.number_field :example_number_field, props: { label: true } %>
22
22
  <%= form.search_field :example_search_field, props: { label: true } %>
@@ -15,7 +15,7 @@
15
15
 
16
16
  <%= pb_form_with(scope: :example, method: :get, url: "", validate: true) do |form| %>
17
17
  <%= form.text_field :example_text_field, props: { label: true, required: true } %>
18
- <%= form.telephone_field :example_phone_field, props: { label: true, required: true, validation: { pattern: "[0-9]{3}-[0-9]{3}-[0-9]{4}", message: "Please enter a valid phone number (example: 888-888-8888)." } } %>
18
+ <%= form.phone_number_field :example_phone_number_field, props: { label: "Example phone field" } %>
19
19
  <%= form.email_field :example_email_field, props: { label: true, required: true } %>
20
20
  <%= form.number_field :example_number_field, props: { label: true, required: true } %>
21
21
  <%= form.search_field :example_project_number, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
@@ -33,6 +33,17 @@
33
33
  outline-offset: -1px;
34
34
  }
35
35
  }
36
+ .text_input_wrapper_add_on .add-on-right [class^=pb_card_kit] {
37
+ border-bottom-right-radius: 0;
38
+ border-top-right-radius: 0;
39
+ border-right-width: 0;
40
+ }
41
+ .text_input_wrapper_add_on .add-on-right.border_left_on .card-right-aligned {
42
+ border-left: 1px $border_light solid;
43
+ &.dark {
44
+ border-left: 1px rgba($white, 0.15) solid;
45
+ }
46
+ }
36
47
  }
37
48
 
38
49
  & > [class^=pb_text_input_kit]:not(:first-child) {
@@ -40,6 +51,10 @@
40
51
  border-bottom-left-radius: 0;
41
52
  border-top-left-radius: 0;
42
53
  }
54
+ .text_input_wrapper_add_on .add-on-left [class^=pb_card_kit] {
55
+ border-bottom-left-radius: 0;
56
+ border-top-left-radius: 0;
57
+ }
43
58
  }
44
59
 
45
60
  & > [class^=pb_button_kit]:not(:last-child) {
@@ -1,8 +1,3 @@
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
  <%= pb_rails("icon", props: { dark: object.dark, icon: object.icon, fixed_width: true }) %>
8
3
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
 
8
3
  <%= pb_rails("icon_circle", props: {
9
4
  dark: object.dark,
@@ -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
  <%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
8
3
  <%= pb_rails("icon", props: { icon: object.icon, fixed_width: true }) %>
9
4
  <%= object.text %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= pb_rails("caption", props: { text: object.label, classname: "pb_label_pill_label"}) %>
8
3
  <%= pb_rails("pill", props: { text: object.pill_value, variant: object.variant, classname: "pb_label_pill_pill" }) %>
9
4
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= pb_rails("caption", props: { text: object.label, dark: object.dark }) %>
8
3
  <% if object.variant == "details" %>
9
4
  <%= pb_rails("flex", props: {inline: true, vertical: "center"}) do %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
 
7
3
  <%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
8
4
  <%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> <%= object.text %>
@@ -1,8 +1,8 @@
1
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 %>
7
- <%= content %>
2
+ id: object.id,
3
+ data: object.data,
4
+ class: object.classname,
5
+ aria: object.aria,
6
+ **combined_html_options) do %>
7
+ <%= content %>
8
8
  <% end %>
@@ -35,6 +35,10 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
35
35
  margin-left: $pb_multiple_users_overlap;
36
36
  margin-right: 0;
37
37
 
38
+ &:first-of-type {
39
+ margin-left: 0;
40
+ }
41
+
38
42
  &.dark {
39
43
  .avatar_wrapper {
40
44
  border: $pb_multiple_users_border_size solid $bg_dark;
@@ -58,6 +62,10 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
58
62
  .pb_multiple_users_item {
59
63
  margin-left: 0;
60
64
  margin-right: $pb_multiple_users_overlap;
65
+
66
+ &:first-of-type {
67
+ margin-right: 0;
68
+ }
61
69
  }
62
70
  }
63
71
  }
@@ -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
  <% object.users.take(object.display_count).each do |user| %>
8
3
  <%= pb_rails("avatar", props: user.merge({size: object.size, classname: "pb_multiple_users_item", dark: object.dark}) ) %>
9
4
  <% 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
  <%= pb_rails("avatar", props: object.users[0].merge({size: "xs", classname: "pb_multiple_users_stacked_item", dark: object.dark}) ) %>
8
3
 
9
4
  <% unless object.only_one %>
@@ -11,7 +11,7 @@ $top_bottom_radius: 0px;
11
11
  border-radius: $border_rad_light;
12
12
  border: $border_rad_lightest solid $border_light;
13
13
  background-color: $white;
14
- padding: $space_xxs 0px;
14
+ padding: $space_xxs 0px !important;
15
15
  li {
16
16
  display: inline;
17
17
  > a, li > span {
@@ -1,8 +1,3 @@
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
  <%= will_paginate object.model, renderer: Playbook::Pagination::Rails %>
8
3
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= pb_rails("body", props: {
8
3
  tag: "span",
9
4
  classname: "pb_person_first" }) { object.first_name } %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= pb_rails("person", props: {
8
3
  first_name: object.first_name,
9
4
  last_name: object.last_name,
@@ -1,8 +1,3 @@
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
  <%= pb_rails("title", props: { text: object.display_text, tag: "div", size: 4, classname: "pb_pill_text" }) %>
8
3
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <% if object.orientation === 'horizontal' %>
8
3
  <% if content %>
9
4
  <%= content %>
@@ -102,6 +102,9 @@
102
102
  pointer-events: none;
103
103
  }
104
104
  &.inline {
105
+ svg {
106
+ right: 6px;
107
+ }
105
108
  @mixin active_arrow_style {
106
109
  svg {
107
110
  color: $primary !important;
@@ -130,6 +133,7 @@
130
133
  box-shadow: none;
131
134
  border-color: transparent;
132
135
  padding: 4px 8px;
136
+ padding-right: $space_lg;
133
137
  border-radius: 4px;
134
138
  option {
135
139
  background-color: $white;
@@ -213,6 +217,9 @@
213
217
  }
214
218
  }
215
219
  &.inline {
220
+ svg {
221
+ right: 6px;
222
+ }
216
223
  &:not(:hover) {
217
224
  svg {
218
225
  display: none;
@@ -233,6 +240,7 @@
233
240
  border-color: transparent;
234
241
  background: transparent;
235
242
  padding: 4px 8px;
243
+ padding-right: $space_lg;
236
244
  border-radius: 4px;
237
245
  option {
238
246
  background-color: $white;
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <div class="pb__source_layout">
7
3
  <% if !object.hide_icon %>
8
4
  <% if object.show_icon? %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <%= pb_rails("body", props: { status: object.status }) do %>
7
3
  <%= pb_rails("icon", props: { fixed_width: true, icon: object.returned_icon }) if object.returned_icon %>
8
4
  <%= "#{object.value}%" if object.value %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <div class="pb_stat_value_wrapper">
7
3
  <%= pb_rails "title", props: {
8
4
  classname: "pb_stat_value_kit",
@@ -76,6 +76,25 @@
76
76
  .text_input {
77
77
  border-color: $error_dark;
78
78
  }
79
+ [class*=pb_body_kit_negative] {
80
+ color: $error_dark;
81
+ }
82
+ }
83
+ .text_input_wrapper_add_on {
84
+ .add-on {
85
+ &-right {
86
+ .add-on-card {
87
+ border: 1px solid $error_dark;
88
+ border-left: 0;
89
+ }
90
+ }
91
+ &-left {
92
+ .add-on-card {
93
+ border: 1px solid $error_dark;
94
+ border-right: 0;
95
+ }
96
+ }
97
+ }
79
98
  }
80
99
  }
81
100
  }
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <div class="pb_time_range_inline_wrapper">
7
3
  <% if object.icon == true %>
8
4
  <%= pb_rails(object.text_kit, props: { tag: "span", dark: object.dark, color: object.icon_color, text: pb_rails("icon", props: { icon: "clock", dark: object.dark, classname:"pb_time_range_inline_icon", fixed_width: true, size: object.size }) }) %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
 
7
3
  <%= pb_rails("body", props: { color: "light", dark: object.dark, classname: "pb_time_stacked time-spacing" }) do %>
8
4
  <time>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
 
7
3
  <div class="pb_timeline_item_left_block">
8
4
  <% if object.date.present? %>
@@ -1,7 +1,3 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <%= content.presence %>
7
3
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
 
8
3
  <% if object.unstyled %>
9
4
  <div><%= object.timestamp_text %></div>
@@ -49,6 +49,10 @@
49
49
  }
50
50
 
51
51
  &.dark {
52
- @include pb_title_dark;
52
+ @include pb_title_dark;
53
+ }
54
+
55
+ &.dark[class*=_link] {
56
+ @include pb_title_dark_link;
53
57
  }
54
58
  }
@@ -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
  <%= pb_rails("title", props: {
8
3
  dark: object.dark,
9
4
  size: object.title_size,
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- id: object.id,
3
- data: object.data,
4
- class: object.classname,
5
- **combined_html_options) do %>
1
+ <%= pb_content_tag do %>
6
2
  <%= pb_rails("title", props: { text: object.title, size: 4 }) %>
7
3
  <%= pb_rails("body", props: { text: object.detail, color: "light" }) %>
8
4
  <% 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
  <%= pb_rails("caption", props: {dark: object.dark, text: object.day_of_week}) %>
8
3
  <%= pb_rails("title", props: {dark: object.dark, size: 4, tag: "span", text: object.formatted_month_and_day}) %>
9
4
  <% end %>
@@ -34,7 +34,11 @@
34
34
  }
35
35
 
36
36
  @mixin pb_title_dark {
37
- color: $text_dk_default;
37
+ color: $text_dk_default;
38
+ }
39
+
40
+ @mixin pb_title_dark_link {
41
+ color: $active_dark;
38
42
  }
39
43
 
40
44
  @mixin pb_title_bold {
data/dist/menu.yml CHANGED
@@ -255,9 +255,9 @@ kits:
255
255
  description: Playbook's date picker is built using flatpickr, a vanilla js library. Common date picker use cases and features have been adapted into simple prop based configuration detailed in the docs below.
256
256
  status: "stable"
257
257
  - name: dropdown
258
- platforms: *react_only
258
+ platforms: *web
259
259
  description: ""
260
- status: "beta"
260
+ status: "stable"
261
261
  - name: "multi_level_select"
262
262
  platforms: *web
263
263
  description: The MultiLevelSelect kit renders a multi leveled select dropdown based on data from the user.