playbook_ui 13.27.0.pre.alpha.testingcollapsible2917 → 13.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) 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_action_button/avatar_action_button.html.erb +1 -6
  7. data/app/pb_kits/playbook/pb_badge/badge.html.erb +1 -6
  8. data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -0
  9. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +1 -6
  10. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -6
  11. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -6
  12. data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +1 -6
  13. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +1 -6
  14. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +0 -1
  15. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.md +2 -4
  16. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +0 -1
  17. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.md +2 -4
  18. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx +73 -0
  19. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.md +3 -0
  20. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.html.erb +20 -0
  21. data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.md +3 -0
  22. data/app/pb_kits/playbook/pb_collapsible/docs/example.yml +4 -0
  23. data/app/pb_kits/playbook/pb_collapsible/docs/index.js +2 -1
  24. data/app/pb_kits/playbook/pb_contact/contact.html.erb +1 -6
  25. data/app/pb_kits/playbook/pb_currency/currency.html.erb +1 -6
  26. data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +1 -6
  27. data/app/pb_kits/playbook/pb_date/date.html.erb +1 -6
  28. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +1 -5
  29. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md +61 -0
  30. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md +11 -0
  31. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +4 -1
  32. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +1 -5
  33. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +1 -5
  34. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md +32 -0
  35. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md +17 -0
  36. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md +19 -0
  37. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md +10 -0
  38. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md +17 -0
  39. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +7 -0
  40. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -6
  41. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md +39 -0
  42. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md +39 -0
  43. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md +15 -0
  44. data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md +78 -0
  45. data/app/pb_kits/playbook/pb_date_time/docs/example.yml +6 -0
  46. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +1 -6
  47. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +1 -5
  48. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +4 -0
  49. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -4
  50. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -3
  51. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +11 -6
  52. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +5 -2
  53. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +13 -8
  54. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
  55. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +5 -2
  56. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +13 -8
  57. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +2 -8
  59. data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +1 -5
  60. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +2 -12
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md +23 -0
  62. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md +7 -0
  63. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md +9 -0
  64. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md +22 -0
  65. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md +9 -0
  66. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md +62 -0
  67. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +8 -0
  68. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +9 -0
  69. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +1 -6
  70. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
  71. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  72. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -6
  73. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +1 -6
  74. data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +1 -6
  75. data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +1 -6
  76. data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +1 -6
  77. data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -5
  78. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -6
  79. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -6
  80. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +1 -6
  81. data/app/pb_kits/playbook/pb_pagination/_pagination.scss +1 -1
  82. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +1 -6
  83. data/app/pb_kits/playbook/pb_person/person.html.erb +1 -6
  84. data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +1 -6
  85. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -6
  86. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -6
  87. data/app/pb_kits/playbook/pb_select/_select.scss +8 -0
  88. data/app/pb_kits/playbook/pb_source/source.html.erb +1 -5
  89. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +1 -5
  90. data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +1 -5
  91. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +19 -0
  92. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +1 -5
  93. data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +1 -5
  94. data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -5
  95. data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +1 -5
  96. data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +1 -6
  97. data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +1 -6
  98. data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +1 -5
  99. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +1 -6
  100. data/dist/playbook-rails.js +4 -4
  101. data/lib/playbook/forms/builder/phone_number_field.rb +12 -0
  102. data/lib/playbook/forms/builder.rb +1 -0
  103. data/lib/playbook/kit_base.rb +1 -1
  104. data/lib/playbook/version.rb +1 -1
  105. metadata +28 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b12c7a464c2f34a42001f703bfb42df3f750da9574ab1163e059a4ce6b906f77
4
- data.tar.gz: 8deca1276b0a8ae5c8d6a542e2a7e5362c1c3f7e206c4379b21d2cb48da0cb97
3
+ metadata.gz: 6d68802c8cc79a4c2436b6cb28f150b7e4ef74367570638be04edf8bdfc02a97
4
+ data.tar.gz: 52fa13359c7a534e5652245fc4628b58837af4b417ea9d390c2f81a05a476609
5
5
  SHA512:
6
- metadata.gz: 3d5187d01379e3fdc8aea8d2d0c6bdf717ba10ee4c60f29ca5eb4abb83900ddb5b78fd627522ec54aa1e3bb6957f36252dc9001827efd3b70bc597ee69cb6e10
7
- data.tar.gz: 0e33d8a8583c2ad4c58002c04f087dae84ffa6586f8579eae2f1bd479cf4ab6143907a3305503e1679e179f98e4ac75a67069ce9b42056c2a84881de2149cab0
6
+ metadata.gz: c88fef5ed13981b8f3dfe87971b60737946d7ab509a5a6e621568a2f5486e612f90a99133b6e8fb12c527cad7a1c2bacb0912c2cf83a450eda15a9495514620f
7
+ data.tar.gz: 4ce3cebd52ad5af637619d093ee5fcd3f30ff776c6fb72273d5af11ce1cfe84270c8826c60ac159f1d1727c3b46431e86146b237c8acbb0adf6551170be03d17
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id) do %>
1
+ <%= pb_content_tag do %>
6
2
  <%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none" }) do %>
7
3
  <% if content.present? %>
8
4
  <% content.presence %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id) do %>
1
+ <%= pb_content_tag do %>
6
2
  <% object.table_data.each do |row| %>
7
3
  <%= render_row_and_children(row, object.column_definitions) %>
8
4
  <% end %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id) do %>
1
+ <%= pb_content_tag do %>
6
2
  <%= pb_rails("table/table_row", props: {tag:"div"}) do %>
7
3
  <% object.column_definitions.each_with_index do |item, index| %>
8
4
  <%= pb_rails("table/table_header", props: { tag:"div", id:item[:accessor], classname:object.th_classname}) do %>
@@ -1,8 +1,4 @@
1
- <%= content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id) do %>
1
+ <%= pb_content_tag do %>
6
2
  <% object.column_definitions.each_with_index do |column, index| %>
7
3
  <%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
8
4
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
@@ -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.tooltip_text.present? %>
8
3
  <%= pb_rails("tooltip", props: {
9
4
  trigger_element_id: object.tooltip_id,
@@ -1,8 +1,3 @@
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
  <span><%= object.text %></span>
8
3
  <% end %>
@@ -28,6 +28,7 @@ $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;
31
32
  vertical-align: middle;
32
33
  text-transform: none;
33
34
  border-width: $pb_button_border_width;
@@ -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
  <%= content.presence || object.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
  <%= 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 %>
8
3
  <%= pb_rails("icon", props: {icon: object.icon, fixed_width: true, dark: object.dark}) %>
9
4
  <% end %>
@@ -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
  <%= content.presence %>
8
3
  <% end %>
@@ -1,8 +1,3 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
  <%= content.presence %>
8
3
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
 
8
3
  <%= pb_rails("flex", props: {vertical: "center", spacing: "between", cursor: "pointer"}) do %>
9
4
  <%= pb_rails("flex/flex_item") do %>
@@ -25,7 +25,6 @@ const CollapsibleCustomMain = () => {
25
25
  size={4}
26
26
  text="Custom Main Section"
27
27
  />
28
- <Collapsible.Icon collapsed={isCollapsed}/>
29
28
  </Flex>
30
29
  </Background>
31
30
  <Collapsible.Content padding="none">
@@ -1,5 +1,3 @@
1
- A custom Main section can also be used in place of the provided `Collapsible.Main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
1
+ Optionally replace your `Collapsible.Main` with any component to customize your Main section's contents and/or style. This gives you full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
2
 
3
- If a custom component is used in place of the default, devs must handle collapsible toggling themselves via the useCollapsible hook as seen in this example.
4
-
5
- The default Collapsible icon can also be used as part of the custom Main as shown, you will need to pass the Collapsible state to the `collapsed` prop on the optional `Collapsible.Icon`.
3
+ __NOTE__: Custom main sections requires the `useCollapsible` hook to ensure the collapsible's toggle action works correctly.
@@ -2,7 +2,6 @@
2
2
  <%= pb_rails("background", props: { background_color: "white", position: "sticky", top: "0", cursor:"pointer", data: {"collapsible-main": "true"} }) do %>
3
3
  <%= pb_rails("flex", props: {align:"center", gap:"sm", justify:"between"}) do %>
4
4
  <%= pb_rails("title", props: { text: "Custom Main Section", tag: "h4", size: 4 }) %>
5
- <%= pb_rails("collapsible/collapsible_icon") %>
6
5
  <% end %>
7
6
  <% end %>
8
7
  <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
@@ -1,5 +1,3 @@
1
- A custom Main section can also be used in place of the provided `collapsible/collapsible_main`. This gives devs full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
1
+ Optionally replace your `collapsible/collapsible_main` with any component to customize your Main section's contents and/or style. This gives you full control over that subcomponent. For example, here we are using global props to make that custom Main 'sticky' on scroll.
2
2
 
3
- If a custom component is used in place of the default, devs must add `data: {"collapsible-main": "true"}` to the custom Main for toggling of the collapsible to work correctly.
4
-
5
- The default Collapsible icon can also be used as part of the custom Main as shown with the optional `collapsible/collapsible_icon`. This optional subcomponent accepts all icon related props `color`, `icon` and `size`.
3
+ __NOTE__: Custom main sections require `data: {"collapsible-main": "true"}` to ensure the collapsible's toggle action works correctly.
@@ -0,0 +1,73 @@
1
+ import React from 'react'
2
+ import { Collapsible, useCollapsible, Background, Flex, Title, List, ListItem } from '../..'
3
+
4
+ const CollapsibleCustomMainWithIcon = () => {
5
+ const [isCollapsed, setIsCollapsed] = useCollapsible(true)
6
+
7
+ return (
8
+ <>
9
+ <Collapsible
10
+ collapsed={isCollapsed}
11
+ >
12
+ <Background
13
+ backgroundColor="white"
14
+ cursor="pointer"
15
+ htmlOptions={{onClick:() => setIsCollapsed(!isCollapsed)}}
16
+ position="sticky"
17
+ top="0"
18
+ >
19
+ <Flex
20
+ align="center"
21
+ gap="sm"
22
+ justify="between"
23
+ >
24
+ <Title
25
+ size={4}
26
+ text="Custom Main Section"
27
+ />
28
+ <Collapsible.Icon collapsed={isCollapsed}/>
29
+ </Flex>
30
+ </Background>
31
+ <Collapsible.Content padding="none">
32
+ <div>
33
+ <List>
34
+ <ListItem
35
+ align="stretch"
36
+ flexDirection="column"
37
+ >
38
+ Checklist item
39
+ </ListItem>
40
+ <ListItem
41
+ align="stretch"
42
+ flexDirection="column"
43
+ >
44
+ Checklist item
45
+ </ListItem>
46
+ <ListItem
47
+ align="stretch"
48
+ flexDirection="column"
49
+ >
50
+ Checklist item
51
+ </ListItem>
52
+ <ListItem
53
+ align="stretch"
54
+ flexDirection="column"
55
+ >
56
+ Checklist item
57
+ </ListItem>
58
+ <ListItem
59
+ align="stretch"
60
+ flexDirection="column"
61
+ >
62
+ Checklist item
63
+ </ListItem>
64
+ </List>
65
+ </div>
66
+ </Collapsible.Content>
67
+ </Collapsible>
68
+
69
+ </>
70
+ )
71
+ }
72
+
73
+ export default CollapsibleCustomMainWithIcon
@@ -0,0 +1,3 @@
1
+ When using a custom Main Section, you can also use the optional `Collapsible.Icon`.
2
+
3
+ __NOTE__: The optional icon subcomponent must receive the `collapsed` state of the collapsible in order to toggle correctly. It also accepts all icon-related props (`icon`, `size`, and `color`) for further customization. If none of these are specified, the default icon will be rendered.
@@ -0,0 +1,20 @@
1
+ <%= pb_rails("collapsible", props: { name: "default-example" }) do %>
2
+ <%= pb_rails("background", props: { background_color: "white", position: "sticky", top: "0", cursor:"pointer", data: {"collapsible-main": "true"} }) do %>
3
+ <%= pb_rails("flex", props: {align:"center", gap:"sm", justify:"between"}) do %>
4
+ <%= pb_rails("title", props: { text: "Custom Main Section", tag: "h4", size: 4 }) %>
5
+ <%= pb_rails("collapsible/collapsible_icon") %>
6
+ <% end %>
7
+ <% end %>
8
+ <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
9
+ <% end %>
10
+ <%= pb_rails("collapsible/collapsible_content", props: { padding: "none" }) do %>
11
+ <%= pb_rails("list", props: {ordered: false, dark: false, borderless: false}) do %>
12
+ <%= pb_rails("list/item") do %> Checklist Item <% end %>
13
+ <%= pb_rails("list/item") do %> Checklist Item <% end %>
14
+ <%= pb_rails("list/item") do %> Checklist Item <% end %>
15
+ <%= pb_rails("list/item") do %> Checklist Item <% end %>
16
+ <%= pb_rails("list/item") do %> Checklist Item <% end %>
17
+ <% end %>
18
+ <% end %>
19
+ <% end %>
20
+
@@ -0,0 +1,3 @@
1
+ When using a custom Main Section, you can also use the optional `collapsible/collapsible_icon` subcomponent.
2
+
3
+ __NOTE__: The optional icon subcomponent accepts all icon-related props (`icon`, `size`, and `color`) for further customization. If none of these are specified, the default icon will be rendered.
@@ -8,6 +8,8 @@ examples:
8
8
  - collapsible_external_controls: Toggle Collapsible With External Controls
9
9
  - collapsible_external_controls_multiple: Toggle All Collapsibles With One Control
10
10
  - collapsible_custom_main_rails: Custom Main Section
11
+ - collapsible_custom_main_with_icon_rails: Custom Main Section With Icon
12
+
11
13
 
12
14
  react:
13
15
  - collapsible_default: Default
@@ -16,6 +18,8 @@ examples:
16
18
  - collapsible_icons: Custom Icons
17
19
  - collapsible_state: useCollapsible Hook
18
20
  - collapsible_custom_main: Custom Main Section
21
+ - collapsible_custom_main_with_icon: Custom Main Section With Icon
22
+
19
23
 
20
24
 
21
25
  swift:
@@ -3,4 +3,5 @@ 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
5
  export { default as CollapsibleState } from './_collapsible_state.jsx'
6
- export { default as CollapsibleCustomMain } from './_collapsible_custom_main.jsx'
6
+ export { default as CollapsibleCustomMain } from './_collapsible_custom_main.jsx'
7
+ export { default as CollapsibleCustomMainWithIcon } from './_collapsible_custom_main_with_icon.jsx'
@@ -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_contact_kit",
@@ -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: object.caption_props) %>
8
3
 
9
4
  <div class=<%= "pb_currency_wrapper#{object.variant_class || object.emphasized_class}" %>>
@@ -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
  <% if object.stat_label.present? %>
8
3
  <%= pb_rails("body", props: { color: "light", text: object.stat_label } ) %>
9
4
  <% end %>
@@ -1,9 +1,4 @@
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 %>
1
+ <%= pb_content_tag do %>
7
2
 
8
3
  <% if object.unstyled %>
9
4
  <!-- 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
  <div class="pb_date_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: "calendar-alt", fixed_width: true, size: object.size, classname: "pb_date_range_inline_icon" }) }) %>
@@ -0,0 +1,61 @@
1
+ ![Date-Range-Inline-Default](https://github.com/powerhome/playbook-swift/assets/54749071/793dc133-b2a8-4283-96e1-c8b19065392d)
2
+
3
+ ```swift
4
+ VStack(alignment: .leading, spacing: Spacing.large) {
5
+ VStack(alignment: .leading, spacing: Spacing.small) {
6
+ PBDateRangeInline(
7
+ size: .caption,
8
+ iconSize: .xSmall,
9
+ startDate: "18 Jun 2013",
10
+ endDate: "20 Mar 2015",
11
+ startVariant: .standard
12
+ )
13
+ PBDateRangeInline(
14
+ size: .body,
15
+ iconSize: .x1,
16
+ startDate: "18 Jun 2013",
17
+ endDate: "20 Mar 2015",
18
+ startVariant: .standard
19
+ )
20
+ }
21
+ .frame(maxWidth: .infinity, alignment: .leading)
22
+ VStack(alignment: .center, spacing: Spacing.small) {
23
+ PBDateRangeInline(
24
+ size: .caption,
25
+ iconSize: .xSmall,
26
+ startDate: "15 Jan 2013",
27
+ endDate: "15 Aug 2015",
28
+ startVariant: .short(showIcon: true),
29
+ endVariant: .short(showIcon: false)
30
+ )
31
+ PBDateRangeInline(
32
+ size: .body,
33
+ iconSize: .x1,
34
+ startDate: "15 Jan 2013",
35
+ endDate: "15 Aug 2015",
36
+ startVariant: .short(showIcon: true),
37
+ endVariant: .short(showIcon: false)
38
+ )
39
+ }
40
+ .frame(maxWidth: .infinity, alignment: .center)
41
+ VStack(alignment: .trailing, spacing: Spacing.small) {
42
+ PBDateRangeInline(
43
+ size: .caption,
44
+ iconSize: .xSmall,
45
+ startDate: "15 Jan 2013",
46
+ endDate: "15 Aug 2015",
47
+ startVariant: .short(showIcon: true),
48
+ endVariant: .short(showIcon: false)
49
+ )
50
+ PBDateRangeInline(
51
+ size: .body,
52
+ iconSize: .x1,
53
+ startDate: "15 Jan 2013",
54
+ endDate: "15 Aug 2015",
55
+ startVariant: .short(showIcon: true),
56
+ endVariant: .short(showIcon: false)
57
+ )
58
+ }
59
+ .frame(maxWidth: .infinity, alignment: .trailing)
60
+ }
61
+ ```
@@ -0,0 +1,11 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **date** | `Date` | Sets the date | `Date()` | |
5
+ | **size** | `PBFont` | Sets the font size | `.body` | `.body` `.caption` `.subcaption` |
6
+ | **iconSize** | `PBIcon.IconSize` | Sets the icon size | `.xSmall` | `xSmall` `small` `large` `x1` |
7
+ | **startDate** | `String` | Takes a string value to set the starting date range value | | |
8
+ | **endDate** | `String` | Takes a string value to set the ending date range value | | |
9
+ | **startVariant** | `PBDate.Variant` | Changes the style of the starting date | `.standard` | `.short(showIcon: false)` `.dayDate` `.standard` `.withIcon(isStandard: true)` `withIcon(isStandard: false)` |
10
+ | **endVariant** | `PBDate.Variant` | Changes the style of the ending date | `.standard` | `.short(showIcon: false)` `.dayDate` `.standard` `.withIcon(isStandard: true)` `withIcon(isStandard: false)` |
11
+ | **isArrowIconBold** | `Bool` | Determines if the date range arrow is bold | `false` | `true` `false` |
@@ -6,4 +6,7 @@ examples:
6
6
 
7
7
  react:
8
8
  - date_range_inline_default: Default
9
-
9
+
10
+ swift:
11
+ - date_range_inline_default_swift: Default
12
+ - date_range_inline_props_swift: ""
@@ -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("flex", props: {vertical: "center"}) do %>
8
4
  <%= pb_rails("flex/flex_item") 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
  <% if object.bold == false %>
8
4
 
@@ -0,0 +1,32 @@
1
+ ![Date-Stacked-Bold](https://github.com/powerhome/playbook-swift/assets/54749071/e241e4b8-efce-4872-99f9-aefb1e3007d2)
2
+ ```swift
3
+ VStack(alignment: .leading, spacing: Spacing.small) {
4
+ PBDateStacked(
5
+ alignment: .leading,
6
+ date: Date(),
7
+ variant: .short(showIcon: false),
8
+ dateSize: .title4,
9
+ isMonthStacked: true,
10
+ isMonthBold: true
11
+ )
12
+ PBDateStacked(
13
+ alignment: .center,
14
+ date: Date().makeDate(year: 2018, month: 3, day: 20),
15
+ variant: .standard,
16
+ dateSize: .title4,
17
+ isStandardStacked: true,
18
+ isYearBold: true,
19
+ isMonthBold: true
20
+ )
21
+ .frame(maxWidth: .infinity, alignment: .center)
22
+ PBDateStacked(
23
+ alignment: .trailing,
24
+ date: Date(),
25
+ variant: .short(showIcon: false),
26
+ dateSize: .title4,
27
+ isMonthStacked: true,
28
+ isMonthBold: true
29
+ )
30
+ .frame(maxWidth: .infinity, alignment: .trailing)
31
+ }
32
+ ```
@@ -0,0 +1,17 @@
1
+ ![Date-Stacked-Default](https://github.com/powerhome/playbook-swift/assets/54749071/5185a6b6-534a-43c0-8c87-abecf770b8f5)
2
+ ```swift
3
+ VStack(alignment: .leading, spacing: Spacing.small) {
4
+ PBDateStacked(
5
+ date: Date(),
6
+ variant: .short(showIcon: false),
7
+ dateSize: .title4,
8
+ isMonthStacked: true
9
+ )
10
+ PBDateStacked(
11
+ date: Date(),
12
+ variant: .short(showIcon: false),
13
+ dateSize: .title3,
14
+ isMonthStacked: true
15
+ )
16
+ }
17
+ ```
@@ -0,0 +1,19 @@
1
+ ![Date-Stacked-Not-Current-Year](https://github.com/powerhome/playbook-swift/assets/54749071/f778f10f-21c3-42b9-b660-9def6c75ecf3)
2
+ ```swift
3
+ VStack(alignment: .leading, spacing: Spacing.small) {
4
+ PBDateStacked(
5
+ alignment: .leading,
6
+ date: Date().makeDate(year: 2018, month: 3, day: 20),
7
+ variant: .standard,
8
+ dateSize: .title4,
9
+ isStandardStacked: true
10
+ )
11
+ PBDateStacked(
12
+ alignment: .leading,
13
+ date: Date().makeDate(year: 2018, month: 3, day: 20),
14
+ variant: .standard,
15
+ dateSize: .title3,
16
+ isStandardStacked: true
17
+ )
18
+ }
19
+ ```
@@ -0,0 +1,10 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **alignment** | `HorizontalAlignment` | Changes the alignment of the date | `.leading` | `.leading` `.trailing` |
5
+ | **dateSize** | `PBFont` |Sets the size of the date | `.body` | `.subcaption` `.caption` `.body` |
6
+ | **isReversed** | `Bool` | Boolean value that determines whether or not the month and date are reversed. | `false` | `true` `false` |
7
+ | **isMonthStacked** | `Bool` | Boolean value that determines whether or not the month is stacked | `false` | `true` `false` |
8
+ | **isStandardStacked** | `Bool` | Boolean value that determines whether or not the standard date variant is stacked. | `false` | `true` `false` |
9
+ | **isYearBold** | `Bool` | Boolean value that determines whether or not the the year is bold | `false` | `true` `false` |
10
+ | **isMonthBold** | `Bool` | Boolean value that determines whether or not the month is bold. | `false` | `true` `false` |
@@ -0,0 +1,17 @@
1
+ ![Date-Stacked-Reversed](https://github.com/powerhome/playbook-swift/assets/54749071/4dc3ff84-3a0d-4d9b-a363-5d649a3bdae6)
2
+ ```swift
3
+ VStack(alignment: .leading, spacing: Spacing.small) {
4
+ PBDateStacked(
5
+ date: Date(),
6
+ variant: .short(showIcon: false),
7
+ dateSize: .title4,
8
+ isReversed: true
9
+ )
10
+ PBDateStacked(
11
+ date: Date(),
12
+ variant: .short(showIcon: false),
13
+ dateSize: .title3,
14
+ isReversed: true
15
+ )
16
+ }
17
+ ```
@@ -15,3 +15,10 @@ 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,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("flex", props: {
9
4
  orientation: "row",