playbook_ui 13.14.0.pre.alpha.play1101betaicons1825 → 13.14.0.pre.alpha.play1106filter1748

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/index.js +1 -2
  4. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
  5. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
  6. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
  7. data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
  8. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
  9. data/app/pb_kits/playbook/pb_body/_body.scss +5 -0
  10. data/app/pb_kits/playbook/pb_body/_body.tsx +9 -5
  11. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +20 -0
  12. data/app/pb_kits/playbook/pb_body/body.rb +8 -1
  13. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +4 -3
  14. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
  15. data/app/pb_kits/playbook/pb_button/_button.tsx +37 -40
  16. data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +0 -11
  17. data/app/pb_kits/playbook/pb_button/docs/example.yml +0 -1
  18. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
  19. data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
  20. data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
  21. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +4 -5
  22. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
  23. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
  24. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
  25. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +7 -5
  26. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
  27. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +4 -5
  28. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +12 -16
  29. data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
  30. data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
  31. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
  32. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +57 -4
  33. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +57 -4
  34. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +16 -20
  35. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
  36. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
  37. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +1 -1
  38. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
  39. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
  40. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
  41. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
  42. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
  43. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
  44. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +3 -6
  45. data/app/pb_kits/playbook/pb_detail/_detail.scss +2 -2
  46. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -5
  47. data/app/pb_kits/playbook/pb_detail/detail.rb +1 -1
  48. data/app/pb_kits/playbook/pb_detail/detail.test.jsx +2 -2
  49. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
  50. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +34 -42
  51. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
  52. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +5 -4
  53. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
  54. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +4 -8
  55. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +4 -8
  56. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +2 -4
  57. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -7
  59. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
  60. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
  62. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
  63. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
  64. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
  65. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  66. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
  67. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
  68. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
  69. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
  70. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  71. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
  72. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
  73. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
  74. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
  75. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
  76. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  77. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
  78. data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
  79. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
  80. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
  81. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
  82. data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
  83. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  84. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
  85. data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
  86. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  87. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
  88. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
  89. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
  90. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
  91. data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
  92. data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
  93. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  94. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -1
  95. data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
  96. data/app/pb_kits/playbook/pb_person/docs/example.yml +0 -4
  97. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -1
  98. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -1
  99. data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
  100. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  101. data/app/pb_kits/playbook/pb_popover/index.ts +1 -1
  102. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -1
  103. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +1 -1
  104. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
  105. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
  106. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  107. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
  108. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -1
  109. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
  110. data/app/pb_kits/playbook/pb_select/docs/example.yml +0 -5
  111. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
  112. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +1 -1
  113. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -1
  114. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
  115. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -1
  116. data/app/pb_kits/playbook/pb_source/_source.tsx +1 -1
  117. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +1 -1
  118. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
  119. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
  120. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  121. data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
  122. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
  123. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
  124. data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
  125. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
  126. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
  127. data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
  128. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  129. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
  130. data/app/pb_kits/playbook/pb_title/_title.scss +5 -0
  131. data/app/pb_kits/playbook/pb_title/_title.tsx +5 -2
  132. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +19 -0
  133. data/app/pb_kits/playbook/pb_title/title.rb +9 -2
  134. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
  135. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
  136. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
  137. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
  138. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
  139. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
  140. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  141. data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -7
  142. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
  143. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
  144. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
  145. data/app/pb_kits/playbook/utilities/globalProps.ts +2 -13
  146. data/app/pb_kits/playbook/utilities/props.ts +2 -2
  147. data/dist/playbook-rails.js +5 -5
  148. data/lib/playbook/classnames.rb +0 -1
  149. data/lib/playbook/kit_base.rb +0 -2
  150. data/lib/playbook/version.rb +1 -1
  151. metadata +2 -58
  152. data/app/pb_kits/playbook/pb_beta_icon/_icon.scss +0 -12
  153. data/app/pb_kits/playbook/pb_beta_icon/_icon.tsx +0 -164
  154. data/app/pb_kits/playbook/pb_beta_icon/docs/_description.md +0 -1
  155. data/app/pb_kits/playbook/pb_beta_icon/docs/_footer.md +0 -2
  156. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.html.erb +0 -3
  157. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.jsx +0 -35
  158. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.md +0 -1
  159. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.html.erb +0 -1
  160. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.jsx +0 -19
  161. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border_swift.md +0 -7
  162. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.html.erb +0 -16
  163. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.jsx +0 -34
  164. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.md +0 -19
  165. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.html.erb +0 -1
  166. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.jsx +0 -17
  167. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default_swift.md +0 -7
  168. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.html.erb +0 -1
  169. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.jsx +0 -21
  170. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.md +0 -7
  171. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.html.erb +0 -3
  172. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.jsx +0 -33
  173. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip_swift.md +0 -11
  174. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_props_swift.md +0 -8
  175. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.html.erb +0 -2
  176. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.jsx +0 -26
  177. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.md +0 -1
  178. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.html.erb +0 -3
  179. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.jsx +0 -33
  180. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate_swift.md +0 -11
  181. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.html.erb +0 -16
  182. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.jsx +0 -133
  183. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes_swift.md +0 -46
  184. data/app/pb_kits/playbook/pb_beta_icon/docs/example.yml +0 -30
  185. data/app/pb_kits/playbook/pb_beta_icon/docs/index.js +0 -9
  186. data/app/pb_kits/playbook/pb_beta_icon/icon.html.erb +0 -15
  187. data/app/pb_kits/playbook/pb_beta_icon/icon.rb +0 -153
  188. data/app/pb_kits/playbook/pb_beta_icon/icon.test.js +0 -155
  189. data/app/pb_kits/playbook/pb_button/docs/_button_reaction_swift.md +0 -26
  190. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default_swift.md +0 -11
  191. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md +0 -13
  192. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes_swift.md +0 -18
  193. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status_swift.md +0 -14
  194. data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +0 -8
  195. data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +0 -5
  196. data/app/pb_kits/playbook/pb_select/docs/_select_default_swift.md +0 -15
  197. data/app/pb_kits/playbook/pb_select/docs/_select_error_swift.md +0 -18
  198. data/app/pb_kits/playbook/pb_select/docs/_select_props_table.md +0 -8
  199. data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +0 -37
  200. data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +0 -10
  201. data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +0 -35
  202. data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +0 -27
  203. data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +0 -35
  204. data/app/pb_kits/playbook/tokens/exports/exports.d.ts +0 -1
  205. data/app/pb_kits/playbook/utilities/_truncate.scss +0 -20
  206. data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +0 -21
  207. data/lib/playbook/truncate.rb +0 -29
@@ -1,26 +0,0 @@
1
- ![reaction-button](https://github.com/powerhome/playbook/assets/54749071/10d21ee2-4faf-4c18-ab72-242df8f837c4)
2
-
3
- ```swift
4
- @State private var count: Int = 153
5
- @State private var count1: Int = 5
6
-
7
- HStack(alignment: .center, spacing: 12) {
8
- PBReactionButton(
9
- count: $count,
10
- icon: "\u{1F389}",
11
- isInteractive: true
12
- )
13
- PBReactionButton(
14
- count: $count1,
15
- icon: "1️⃣",
16
- isInteractive: false
17
- )
18
- PBReactionButton(
19
- isInteractive: false
20
- )
21
- PBReactionButton(
22
- pbIcon: PBIcon(FontAwesome.user),
23
- isInteractive: false
24
- )
25
- }
26
- ```
@@ -1,11 +0,0 @@
1
- ![user-default](https://github.com/powerhome/playbook/assets/54749071/f9b593d5-a688-49bf-a282-8fb70058b539)
2
-
3
- ```swift
4
- PBDialog(
5
- title: "This is some informative text",
6
- message: infoMessage,
7
- cancelButton: ("Cancel", closeToast),
8
- confirmButton: ("Okay", closeToast)
9
- )
10
- ```
11
-
@@ -1,13 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **content** | `Content` | Sets the View content | | |
5
- | **title** | `String` | Sets title for dialog header | | |
6
- | **message** | `String` | Sets dialog message| | |
7
- | **variant** | `DialogVariant` | Changes variant of dialog | `.default` | `.default` `.status()` |
8
- | **isStacked** | `isStacked` | Changes whether the dialog buttons are stacked or inline | `false` | `true` `false` |
9
- | **cancelButton** | `Action` | Dismisses the dialog | | |
10
- | **confirmButton** | `Action` | Confirms dialog message was received | | |
11
- | **onClose** | `Action` | Starts action when dialog is closed | | |
12
- | **size** | `DialogSize` | Determines size of dialog | `.medium`| `.small` `.medium` `large` |
13
- | **shouldCloseOnOverlay** | `Bool` | Determines if overlay should close | `false` | `true` `false` |
@@ -1,18 +0,0 @@
1
- ![dialog-large](https://github.com/powerhome/playbook/assets/54749071/41ea273d-3f85-4514-88d7-21f49499f9a2)
2
-
3
- ```swift
4
- @State private var presentSmallDialog: Bool = false
5
- @State private var presentMediumDialog: Bool = false
6
- @State private var presentLargeDialog: Bool = false
7
- let infoMessage = "This is a message for informational purposes only and requires no action."
8
-
9
- PBDialog(
10
- title: "Large",
11
- message: infoMessage,
12
- variant: .default,
13
- isStacked: false,
14
- cancelButton: ("Cancel", {}),
15
- confirmButton: ("Okay", {}),
16
- size: .large
17
- )
18
- ```
@@ -1,14 +0,0 @@
1
- ![success](https://github.com/powerhome/playbook/assets/54749071/a3605f4f-ea77-4377-a1bd-977bb3c26a03)
2
-
3
- ```swift
4
-
5
- PBDialog(
6
- title: "Success!",
7
- message: infoMessage,
8
- variant: .status(.success),
9
- isStacked: true,
10
- cancelButton: ("Cancel", closeToast),
11
- confirmButton: ("Okay", closeToast),
12
- size: .small
13
- )
14
- ```
@@ -1,8 +0,0 @@
1
- ![PBIOS-227](https://github.com/powerhome/playbook/assets/92755007/e43f94bd-2d2e-46cc-a848-6ac7425f89f9)
2
-
3
-
4
- ```swift
5
-
6
- PBPerson(firstName: "Timothy", lastName: "Wenhold")
7
-
8
- ```
@@ -1,5 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **firstName** | `String` | Sets the first name | | |
5
- | **lastName** | `String` | Sets the last name | | |
@@ -1,15 +0,0 @@
1
- ![select-default](https://github.com/powerhome/playbook/assets/54749071/ead0e074-46ae-425a-ab32-d9c4418a0783)
2
-
3
-
4
- ```swift
5
- let defaultOptions = [
6
- (value: "1", text: "Burgers"),
7
- (value: "2", text: "Pizza"),
8
- (value: "3", text: "Tacos")
9
- ]
10
- @State private var defaultState = ""
11
-
12
- PBSelect(title: "Favorite Food", options: defaultOptions, style: .default) { selected in
13
- defaultState = selected
14
- }
15
- ```
@@ -1,18 +0,0 @@
1
- ![select-error](https://github.com/powerhome/playbook/assets/54749071/c02e365b-c3a1-446b-b9f2-47db11315786)
2
-
3
- ```swift
4
- let defaultOptions = [
5
- (value: "1", text: "Burgers"),
6
- (value: "2", text: "Pizza"),
7
- (value: "3", text: "Tacos")
8
- ]
9
- @State private var errorState = ""
10
-
11
- PBSelect(
12
- title: "Favorite Food",
13
- options: defaultOptions,
14
- style: .error("Please make a valid selection")
15
- ) { selected in
16
- errorState = selected
17
- }
18
- ```
@@ -1,8 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **title** | `String` | Sets label title for dropdown | | |
5
- | **options** | `(String, String)` | Displays the list of dropdown options | | |
6
- | **style** | `Variant` | Options for the state of dropdown | `.default` | `default` `disabled` `error` |
7
- | **selectedOption** | `String` | Changes selected value when new value is selected | | |
8
- | **selected** | `String` | Changes the value of the option selected in dropdown | | |
@@ -1,37 +0,0 @@
1
- ![user-horizontal](https://github.com/powerhome/playbook/assets/92755007/63680051-6a88-4ae7-bffd-74d8e9b3a805)
2
-
3
- ```swift
4
-
5
- let img = Image("andrew", bundle: .module)
6
- let name = "Andrew K"
7
- let title = "Rebels Developer"
8
-
9
- VStack(alignment: .leading, spacing: Spacing.small) {
10
- PBUser(
11
- name: name,
12
- image: img,
13
- territory: "PHL",
14
- title: title
15
- )
16
-
17
- PBUser(
18
- name: name,
19
- territory: "PHL",
20
- title: title
21
- )
22
-
23
- PBUser(
24
- name: name,
25
- image: img,
26
- size: .small,
27
- title: title
28
- )
29
-
30
- PBUser(
31
- name: name,
32
- image: img,
33
- size: .small
34
- )
35
- }
36
-
37
- ```
@@ -1,10 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **name** | `String` | Sets the User's name | | |
5
- | **displayAvatar** | `Bool` | Displays the User's avatar | `true` | `true` `false` |
6
- | **image** | `Image` | Sets image for the avatar | | |
7
- | **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
8
- | **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
9
- | **territory** | `String` | Adds the User's territory | | |
10
- | **title** | `String` | Adds a title | | |
@@ -1,35 +0,0 @@
1
- ![user-size](https://github.com/powerhome/playbook/assets/54749071/ed012a15-64a1-4c13-a0bc-7457660992f6)
2
-
3
-
4
- ```swift
5
-
6
- let img = Image("andrew", bundle: .module)
7
- let name = "Andrew K"
8
- let title = "Rebels Developer"
9
-
10
- VStack(alignment: .leading, spacing: Spacing.small) {
11
- PBUser(
12
- name: name,
13
- image: img,
14
- size: .small,
15
- territory: "PHL",
16
- title: title
17
- )
18
-
19
- PBUser(
20
- name: name,
21
- image: img,
22
- territory: "PHL",
23
- title: title
24
- )
25
-
26
- PBUser(
27
- name: name,
28
- image: img,
29
- size: .large,
30
- territory: "PHL",
31
- title: title
32
- )
33
- }
34
-
35
- ```
@@ -1,27 +0,0 @@
1
- ![user-text-only](https://github.com/powerhome/playbook/assets/54749071/ba04df54-6590-4db6-ad32-38932a08aced)
2
-
3
-
4
- ```swift
5
-
6
- let img = Image("andrew", bundle: .module)
7
- let name = "Andrew K"
8
- let title = "Rebels Developer"
9
-
10
- VStack(spacing: Spacing.small) {
11
- PBUser(
12
- name: name,
13
- displayAvatar: false,
14
- size: .large,
15
- territory: "PHL",
16
- title: title
17
- )
18
-
19
- PBUser(
20
- name: name,
21
- displayAvatar: false,
22
- territory: "PHL",
23
- title: title
24
- )
25
- }
26
-
27
- ```
@@ -1,35 +0,0 @@
1
- ![user-verticle-size](https://github.com/powerhome/playbook/assets/54749071/e99b4c9b-0752-467e-971e-a6a5f520009e)
2
-
3
-
4
- ```swift
5
-
6
- let img = Image("andrew", bundle: .module)
7
- let name = "Andrew K"
8
- let title = "Rebels Developer"
9
-
10
- VStack(alignment: .leading, spacing: Spacing.small) {
11
- PBUser(
12
- name: name,
13
- image: img,
14
- orientation: .vertical,
15
- size: .small,
16
- title: title
17
- )
18
-
19
- PBUser(
20
- name: name,
21
- image: img,
22
- orientation: .vertical,
23
- title: title
24
- )
25
-
26
- PBUser(
27
- name: name,
28
- image: img,
29
- orientation: .vertical,
30
- size: .large,
31
- title: title
32
- )
33
- }
34
-
35
- ```
@@ -1 +0,0 @@
1
- declare module '*.scss';
@@ -1,20 +0,0 @@
1
- $truncate-styles: (
2
- truncate_1: 1,
3
- truncate_2: 2,
4
- truncate_3: 3,
5
- truncate_4: 4,
6
- truncate_5: 5
7
- );
8
-
9
- @mixin apply_truncate_styles($number) {
10
- overflow: hidden;
11
- display: -webkit-box;
12
- -webkit-line-clamp: $number;
13
- -webkit-box-orient: vertical;
14
- }
15
-
16
- @each $class, $number in $truncate-styles {
17
- .#{$class} {
18
- @include apply_truncate_styles($number);
19
- }
20
- }
@@ -1,21 +0,0 @@
1
- import React from 'react'
2
- import { render, screen } from '../../test-utils'
3
-
4
- import Body from '../../../pb_body/_body'
5
-
6
- const testSubject = 'body'
7
-
8
- test('Global Props: Returns corrrect truncate class name', () => {
9
- for(let x = 1, y = 5; x <= y; ++x) {
10
- const testId = `${testSubject}-${x}`
11
- render(
12
- <Body
13
- data={{ testid: testId }}
14
- text="Hi"
15
- truncate={`${x}`}
16
- />
17
- )
18
- const kit = screen.getByTestId(testId)
19
- expect(kit).toHaveClass(`truncate_${x}`)
20
- }
21
- })
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Playbook
4
- module Truncate
5
- def self.included(base)
6
- base.prop :truncate
7
- end
8
-
9
- def truncate_props
10
- selected_props = truncate_options.keys.select { |sk| try(sk) }
11
- return nil unless selected_props.present?
12
-
13
- selected_props.map do |k|
14
- truncate_value = send(k)
15
- "truncate_#{truncate_value}" if truncate_values.include? truncate_value
16
- end.compact.join(" ")
17
- end
18
-
19
- def truncate_options
20
- {
21
- truncate: "truncate",
22
- }
23
- end
24
-
25
- def truncate_values
26
- %w[1 2 3 4 5]
27
- end
28
- end
29
- end