playbook_ui 12.36.0.pre.alpha.svgiconmethods1059 → 12.36.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_badge/docs/example.yml +0 -7
  3. data/app/pb_kits/playbook/pb_icon/docs/_icon_animate.html.erb +0 -1
  4. data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +0 -2
  5. data/app/pb_kits/playbook/pb_icon/docs/example.yml +9 -10
  6. data/app/pb_kits/playbook/pb_icon/icon.html.erb +3 -3
  7. data/app/pb_kits/playbook/pb_icon/icon.rb +0 -17
  8. data/app/pb_kits/playbook/pb_pill/docs/example.yml +0 -5
  9. data/app/pb_kits/playbook/pb_radio/docs/example.yml +0 -11
  10. data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +0 -8
  11. data/lib/playbook/version.rb +2 -2
  12. metadata +7 -31
  13. data/app/pb_kits/playbook/pb_badge/docs/_badge_colors_swift.md +0 -33
  14. data/app/pb_kits/playbook/pb_badge/docs/_badge_default_swift.md +0 -9
  15. data/app/pb_kits/playbook/pb_badge/docs/_badge_notification_swift.md +0 -9
  16. data/app/pb_kits/playbook/pb_badge/docs/_badge_props_swift.md +0 -6
  17. data/app/pb_kits/playbook/pb_badge/docs/_badge_rounded_swift.md +0 -9
  18. data/app/pb_kits/playbook/pb_icon/docs/_icon_svg.html.erb +0 -4
  19. data/app/pb_kits/playbook/pb_pill/docs/_pill_default_swift.md +0 -5
  20. data/app/pb_kits/playbook/pb_pill/docs/_pill_props_swift.md +0 -5
  21. data/app/pb_kits/playbook/pb_pill/docs/_pill_variants_swift.md +0 -10
  22. data/app/pb_kits/playbook/pb_radio/docs/_radio_alignment_swift.md +0 -16
  23. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_swift.md +0 -18
  24. data/app/pb_kits/playbook/pb_radio/docs/_radio_default_swift.md +0 -15
  25. data/app/pb_kits/playbook/pb_radio/docs/_radio_error_swift.md +0 -14
  26. data/app/pb_kits/playbook/pb_radio/docs/_radio_orientation_swift.md +0 -15
  27. data/app/pb_kits/playbook/pb_radio/docs/_radio_padding_swift.md +0 -31
  28. data/app/pb_kits/playbook/pb_radio/docs/_radio_props_swift.md +0 -10
  29. data/app/pb_kits/playbook/pb_radio/docs/_radio_spacing_swift.md +0 -36
  30. data/app/pb_kits/playbook/pb_radio/docs/_radio_subtitle_swift.md +0 -13
  31. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md +0 -45
  32. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md +0 -26
  33. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md +0 -25
  34. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md +0 -10
  35. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md +0 -67
  36. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md +0 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec711d432d4190c4c97e001b5f2b54451759c429c49f24b2c05fac61d6709e24
4
- data.tar.gz: e23d53f03b689f982ddd4da48ebc0654cbaccee55546ebd9695578bb9eafa1b2
3
+ metadata.gz: c0a98a2809eb8f345dd7c46ebb952d03d2e5fdc357804e70e344546ab013b8a0
4
+ data.tar.gz: e72f1812fd7f819375cc1788d6eabb2a280bd392a3fb46e2af4b1d8ce022fbd7
5
5
  SHA512:
6
- metadata.gz: 3f21320b6f2effb489b63c81a39ece8b395bf295c4b1993f155e70871c211ce2bc12cb141c27631fdb1c97a6b67ce93009f20adcdfd4291d8af76df2c567d2ba
7
- data.tar.gz: f260ad098d4c076e73f170c6e4a9d139d39cb6f3eb431fb925dbb39b6ebdd9f330115a39b89977f8d49acde1334fef9f2bd4433f2650b60d7d2a4f93e17d3409
6
+ metadata.gz: ce9e6790efcab2fce2080635bdd3331f7a9ae8af497756d5a2c6111a57ac859ce4a73d567f0c51123dcc271ee46f1b2ebc2e02e1af28bed233f860c93850a973
7
+ data.tar.gz: d6d7bcb5b2684b64a05806680f5c9129082888394d2036ef53866121a68622d3a0a01803287b08881836186983fe9f5e4641225333a36bcfbb69fad597829683
@@ -10,10 +10,3 @@ examples:
10
10
  - badge_rounded: Rounded
11
11
  - badge_colors: Colors
12
12
  - badge_notification: Notification
13
-
14
- swift:
15
- - badge_default_swift: Rectangle
16
- - badge_rounded_swift: Rounded
17
- - badge_colors_swift: Colors
18
- - badge_notification_swift: Notification
19
- - badge_props_swift: ""
@@ -1,4 +1,3 @@
1
1
  <p><%= pb_rails("icon", props: { icon: "spinner", spin: true, fixed_width: true, size: "2x" }) %> <span>Spin</span></p>
2
2
  <br/>
3
3
  <p><%= pb_rails("icon", props: { icon: "spinner", pulse: true, fixed_width: true, size: "2x" }) %> <span>Pulse</span></p>
4
-
@@ -14,5 +14,3 @@
14
14
  parent element's css color properties."
15
15
  } ) %>
16
16
  </div>
17
-
18
-
@@ -1,15 +1,14 @@
1
1
  examples:
2
2
  rails:
3
- # - icon_default: Icon Default
4
- # - icon_rotate: Icon Rotate
5
- # - icon_flip: Icon Flip
6
- # - icon_animate: Icon Animation
7
- # - icon_pull: Icon Pull
8
- # - icon_border: Icon Border
9
- # - icon_sizes: Icon Sizes
10
- # - icon_custom: Icon Custom
11
- # - icon_fa_kit: Icon with FontAwesome Kit
12
- - icon_svg: Icon SVG
3
+ - icon_default: Icon Default
4
+ - icon_rotate: Icon Rotate
5
+ - icon_flip: Icon Flip
6
+ - icon_animate: Icon Animation
7
+ - icon_pull: Icon Pull
8
+ - icon_border: Icon Border
9
+ - icon_sizes: Icon Sizes
10
+ - icon_custom: Icon Custom
11
+ - icon_fa_kit: Icon with FontAwesome Kit
13
12
 
14
13
  react:
15
14
  - icon_default: Icon Default
@@ -1,15 +1,15 @@
1
1
  <% if object.custom_icon %>
2
- <%= object.embedded_svg(object.custom_icon) %>
2
+ <%= object.render_svg(object.custom_icon) %>
3
3
  <% elsif object.valid_emoji(object.icon) %>
4
4
  <span class="pb_icon_kit_emoji"><%= object.icon.html_safe %></span>
5
5
  <% else %>
6
6
  <%= content_tag(:i, nil,
7
7
  id: object.id,
8
8
  data: object.data,
9
- class: object.classname,
9
+ class: object.classname
10
10
  ) %>
11
11
  <%= content_tag(:span, nil,
12
12
  aria: { label: "#{object.icon} icon" }.merge(object.aria),
13
13
  hidden: true
14
14
  ) %>
15
- <% end %>
15
+ <% end %>
@@ -90,23 +90,6 @@ module Playbook
90
90
  end
91
91
  end
92
92
 
93
- def embedded_svg(icon_name)
94
- file = File.read(Rails.root.join("app", "assets", "images", "#{icon_name}.svg"))
95
- doc = Nokogiri::HTML::DocumentFragment.parse file
96
- svg = doc.at_css "svg"
97
-
98
- doc.to_html.html_safe
99
-
100
- size_factor = size.to_i
101
- if size_factor > 1
102
- pixel_size = size_factor * 16
103
- svg["width"] = pixel_size.to_s
104
- svg["height"] = pixel_size.to_s
105
- end
106
-
107
- raw doc
108
- end
109
-
110
93
  private
111
94
 
112
95
  def border_class
@@ -11,8 +11,3 @@ examples:
11
11
  - pill_default: Default
12
12
  - pill_variants: Variants
13
13
  - pill_example: Example
14
-
15
- swift:
16
- - pill_default_swift: Default
17
- - pill_variants_swift: Variants
18
- - pill_props_swift: ""
@@ -12,14 +12,3 @@ examples:
12
12
  - radio_custom: Custom
13
13
  - radio_error: With Error
14
14
  - radio_alignment: Alignment
15
-
16
- swift:
17
- - radio_default_swift: Default
18
- - radio_custom_swift: Custom
19
- - radio_error_swift: With Error
20
- - radio_orientation_swift: Orientation
21
- - radio_alignment_swift: Alignment
22
- - radio_spacing_swift: Spacing
23
- - radio_padding_swift: Padding
24
- - radio_subtitle_swift: Subtitle
25
- - radio_props_swift: ""
@@ -13,11 +13,3 @@ examples:
13
13
  - timestamp_timezones: Timezones
14
14
  - timestamp_updated: Last Updated by
15
15
  - timestamp_elapsed: Time Ago
16
-
17
- swift:
18
- - timestamp_default_swift: Default
19
- - timestamp_align_swift: Alignments
20
- - timestamp_timezones_swift: Timezones
21
- - timestamp_updated_swift: Last Updated by
22
- - timestamp_elapsed_swift: Time Ago
23
- - timestamp_props_swift: ""
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "12.36.0"
5
- VERSION = "12.36.0.pre.alpha.svgiconmethods1059"
4
+ PREVIOUS_VERSION = "12.35.0"
5
+ VERSION = "12.36.0"
6
6
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.36.0.pre.alpha.svgiconmethods1059
4
+ version: 12.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
8
8
  - Power Devs
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-08-09 00:00:00.000000000 Z
12
+ date: 2023-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -342,17 +342,12 @@ files:
342
342
  - app/pb_kits/playbook/pb_badge/badge.test.js
343
343
  - app/pb_kits/playbook/pb_badge/docs/_badge_colors.html.erb
344
344
  - app/pb_kits/playbook/pb_badge/docs/_badge_colors.jsx
345
- - app/pb_kits/playbook/pb_badge/docs/_badge_colors_swift.md
346
345
  - app/pb_kits/playbook/pb_badge/docs/_badge_default.html.erb
347
346
  - app/pb_kits/playbook/pb_badge/docs/_badge_default.jsx
348
- - app/pb_kits/playbook/pb_badge/docs/_badge_default_swift.md
349
347
  - app/pb_kits/playbook/pb_badge/docs/_badge_notification.html.erb
350
348
  - app/pb_kits/playbook/pb_badge/docs/_badge_notification.jsx
351
- - app/pb_kits/playbook/pb_badge/docs/_badge_notification_swift.md
352
- - app/pb_kits/playbook/pb_badge/docs/_badge_props_swift.md
353
349
  - app/pb_kits/playbook/pb_badge/docs/_badge_rounded.html.erb
354
350
  - app/pb_kits/playbook/pb_badge/docs/_badge_rounded.jsx
355
- - app/pb_kits/playbook/pb_badge/docs/_badge_rounded_swift.md
356
351
  - app/pb_kits/playbook/pb_badge/docs/_description.md
357
352
  - app/pb_kits/playbook/pb_badge/docs/example.yml
358
353
  - app/pb_kits/playbook/pb_badge/docs/index.js
@@ -1194,7 +1189,6 @@ files:
1194
1189
  - app/pb_kits/playbook/pb_icon/docs/_icon_rotate.jsx
1195
1190
  - app/pb_kits/playbook/pb_icon/docs/_icon_sizes.html.erb
1196
1191
  - app/pb_kits/playbook/pb_icon/docs/_icon_sizes.jsx
1197
- - app/pb_kits/playbook/pb_icon/docs/_icon_svg.html.erb
1198
1192
  - app/pb_kits/playbook/pb_icon/docs/example.yml
1199
1193
  - app/pb_kits/playbook/pb_icon/docs/index.js
1200
1194
  - app/pb_kits/playbook/pb_icon/icon.html.erb
@@ -1672,14 +1666,11 @@ files:
1672
1666
  - app/pb_kits/playbook/pb_pill/docs/_description.md
1673
1667
  - app/pb_kits/playbook/pb_pill/docs/_pill_default.html.erb
1674
1668
  - app/pb_kits/playbook/pb_pill/docs/_pill_default.jsx
1675
- - app/pb_kits/playbook/pb_pill/docs/_pill_default_swift.md
1676
1669
  - app/pb_kits/playbook/pb_pill/docs/_pill_example.html.erb
1677
1670
  - app/pb_kits/playbook/pb_pill/docs/_pill_example.jsx
1678
1671
  - app/pb_kits/playbook/pb_pill/docs/_pill_example.md
1679
- - app/pb_kits/playbook/pb_pill/docs/_pill_props_swift.md
1680
1672
  - app/pb_kits/playbook/pb_pill/docs/_pill_variants.html.erb
1681
1673
  - app/pb_kits/playbook/pb_pill/docs/_pill_variants.jsx
1682
- - app/pb_kits/playbook/pb_pill/docs/_pill_variants_swift.md
1683
1674
  - app/pb_kits/playbook/pb_pill/docs/example.yml
1684
1675
  - app/pb_kits/playbook/pb_pill/docs/index.js
1685
1676
  - app/pb_kits/playbook/pb_pill/pill.html.erb
@@ -1764,23 +1755,14 @@ files:
1764
1755
  - app/pb_kits/playbook/pb_radio/docs/_footer.md
1765
1756
  - app/pb_kits/playbook/pb_radio/docs/_radio_alignment.html.erb
1766
1757
  - app/pb_kits/playbook/pb_radio/docs/_radio_alignment.jsx
1767
- - app/pb_kits/playbook/pb_radio/docs/_radio_alignment_swift.md
1768
1758
  - app/pb_kits/playbook/pb_radio/docs/_radio_custom.html.erb
1769
1759
  - app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx
1770
- - app/pb_kits/playbook/pb_radio/docs/_radio_custom_swift.md
1771
1760
  - app/pb_kits/playbook/pb_radio/docs/_radio_default.html.erb
1772
1761
  - app/pb_kits/playbook/pb_radio/docs/_radio_default.jsx
1773
- - app/pb_kits/playbook/pb_radio/docs/_radio_default_swift.md
1774
1762
  - app/pb_kits/playbook/pb_radio/docs/_radio_error.html.erb
1775
1763
  - app/pb_kits/playbook/pb_radio/docs/_radio_error.jsx
1776
1764
  - app/pb_kits/playbook/pb_radio/docs/_radio_error.md
1777
- - app/pb_kits/playbook/pb_radio/docs/_radio_error_swift.md
1778
1765
  - app/pb_kits/playbook/pb_radio/docs/_radio_options.html.erb
1779
- - app/pb_kits/playbook/pb_radio/docs/_radio_orientation_swift.md
1780
- - app/pb_kits/playbook/pb_radio/docs/_radio_padding_swift.md
1781
- - app/pb_kits/playbook/pb_radio/docs/_radio_props_swift.md
1782
- - app/pb_kits/playbook/pb_radio/docs/_radio_spacing_swift.md
1783
- - app/pb_kits/playbook/pb_radio/docs/_radio_subtitle_swift.md
1784
1766
  - app/pb_kits/playbook/pb_radio/docs/example.yml
1785
1767
  - app/pb_kits/playbook/pb_radio/docs/index.js
1786
1768
  - app/pb_kits/playbook/pb_radio/radio.html.erb
@@ -2210,20 +2192,14 @@ files:
2210
2192
  - app/pb_kits/playbook/pb_timestamp/docs/_time_stamp_default.md
2211
2193
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.html.erb
2212
2194
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align.jsx
2213
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_align_swift.md
2214
2195
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.html.erb
2215
2196
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx
2216
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default_swift.md
2217
2197
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.html.erb
2218
2198
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed.jsx
2219
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_elapsed_swift.md
2220
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_props_swift.md
2221
2199
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.html.erb
2222
2200
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones.jsx
2223
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_timezones_swift.md
2224
2201
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.html.erb
2225
2202
  - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated.jsx
2226
- - app/pb_kits/playbook/pb_timestamp/docs/_timestamp_updated_swift.md
2227
2203
  - app/pb_kits/playbook/pb_timestamp/docs/example.yml
2228
2204
  - app/pb_kits/playbook/pb_timestamp/docs/index.js
2229
2205
  - app/pb_kits/playbook/pb_timestamp/timestamp.html.erb
@@ -2587,7 +2563,7 @@ homepage: https://playbook.powerapp.cloud/
2587
2563
  licenses:
2588
2564
  - ISC
2589
2565
  metadata: {}
2590
- post_install_message:
2566
+ post_install_message:
2591
2567
  rdoc_options: []
2592
2568
  require_paths:
2593
2569
  - lib
@@ -2598,12 +2574,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
2598
2574
  version: '0'
2599
2575
  required_rubygems_version: !ruby/object:Gem::Requirement
2600
2576
  requirements:
2601
- - - ">"
2577
+ - - ">="
2602
2578
  - !ruby/object:Gem::Version
2603
- version: 1.3.1
2579
+ version: '0'
2604
2580
  requirements: []
2605
2581
  rubygems_version: 3.3.7
2606
- signing_key:
2582
+ signing_key:
2607
2583
  specification_version: 4
2608
2584
  summary: Playbook Design System
2609
2585
  test_files: []
@@ -1,33 +0,0 @@
1
- ![badge-colors](https://github.com/powerhome/playbook/assets/92755007/52ce34ef-eb0d-48c0-9232-89edfff60cef)
2
-
3
- ```swift
4
- HStack {
5
- PBBadge(text: "1", rounded: true, variant: .chat)
6
- PBBadge(text: "4", variant: .chat)
7
- PBBadge(text: "1000", variant: .chat)
8
-
9
- PBBadge(text: "1", rounded: true, variant: .error)
10
- PBBadge(text: "4", variant: .error)
11
- PBBadge(text: "1000", variant: .error)
12
-
13
- PBBadge(text: "1", rounded: true, variant: .info)
14
- PBBadge(text: "4", variant: .info)
15
- PBBadge(text: "1000", variant: .info)
16
-
17
- PBBadge(text: "1", rounded: true, variant: .neutral)
18
- PBBadge(text: "4", variant: .neutral)
19
- PBBadge(text: "1000", variant: .neutral)
20
-
21
- PBBadge(text: "1", rounded: true, variant: .primary)
22
- PBBadge(text: "4", variant: .primary)
23
- PBBadge(text: "1000", variant: .primary)
24
-
25
- PBBadge(text: "1", rounded: true, variant: .success)
26
- PBBadge(text: "4", variant: .success)
27
- PBBadge(text: "1000", variant: .success)
28
-
29
- PBBadge(text: "1", rounded: true, variant: .warning)
30
- PBBadge(text: "4", variant: .warning)
31
- PBBadge(text: "1000", variant: .warning)
32
- }
33
- ```
@@ -1,9 +0,0 @@
1
- ![badge-rectangle](https://github.com/powerhome/playbook/assets/92755007/04188c68-84f0-475b-9764-7b9a325f73da)
2
-
3
- ```swift
4
- HStack {
5
- PBBadge(text: "+1", variant: .primary)
6
- PBBadge(text: "+4", variant: .primary)
7
- PBBadge(text: "+1000", variant: .primary)
8
- }
9
- ```
@@ -1,9 +0,0 @@
1
- ![badge-chat-notification](https://github.com/powerhome/playbook/assets/92755007/f769c3bc-6a63-465d-8538-3efb5f3ec0d3)
2
-
3
- ```swift
4
- HStack {
5
- PBBadge(text: "1", rounded: true, variant: .chat)
6
- PBBadge(text: "4", variant: .chat)
7
- PBBadge(text: "1000", variant: .chat)
8
- }
9
- ```
@@ -1,6 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **text** | `String` | Specifies the value of the Badge | | |
5
- | **rounded** | `Bool` | Displays the rounded variant | `false` | |
6
- | **variant** | `Variant` | Changes the color of the Badge | `.primary` | `.chat` `.error` `.info` `.neutral` `.primary` `.success` `.warning` |
@@ -1,9 +0,0 @@
1
- ![badge-rounded](https://github.com/powerhome/playbook/assets/92755007/775a906f-0108-4ee1-a277-e7b9f2715a2b)
2
-
3
- ```swift
4
- HStack {
5
- PBBadge(text: "+1", rounded: true, variant: .primary)
6
- PBBadge(text: "+4", rounded: true, variant: .primary)
7
- PBBadge(text: "+1000", rounded: true, variant: .primary)
8
- }
9
- ```
@@ -1,4 +0,0 @@
1
- <%= pb_rails("icon", props: { size: "5x", custom_icon: "copilot", padding_left: "xl" } ) %>
2
- <%= pb_rails("icon", props: { size: "5x", custom_icon: "squirrel" } ) %>
3
- <%= pb_rails("icon", props: { size: "5x", custom_icon: "star" } ) %>
4
-
@@ -1,5 +0,0 @@
1
- ![pill-default](https://github.com/powerhome/playbook/assets/92755007/608cb5dd-9400-45f4-afb2-ac1bbd972c3d)
2
-
3
- ```swift
4
- PBPill("default")
5
- ```
@@ -1,5 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **title** | `String` | Specifies the value of the Pill | | |
5
- | **variant** | `Variant` | Changes the color of the Pill | `.neutral` | `.error` `.info` `.neutral` `.primary` `.success` `.warning` |
@@ -1,10 +0,0 @@
1
- ![pill-variants](https://github.com/powerhome/playbook/assets/92755007/79ac4260-633e-4429-8b1f-0a97b8178a86)
2
-
3
- ```swift
4
- PBPill("success", variant: .success)
5
- PBPill("error", variant: .error)
6
- PBPill("warning", variant: .warning)
7
- PBPill("info", variant: .info)
8
- PBPill("neutral", variant: .neutral)
9
- PBPill("primary", variant: .primary)
10
- ```
@@ -1,16 +0,0 @@
1
- ![radio-alignment](https://github.com/powerhome/playbook/assets/92755007/04b84035-8391-4de1-a33e-8964999d5c0f)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Power"),
8
- .init("Nitro"),
9
- .init("Google")
10
- ],
11
- orientation: .horizontal,
12
- textAlignment: .vertical,
13
- selected: $selectedAlignment
14
- )
15
- }
16
- ```
@@ -1,18 +0,0 @@
1
- ![radio-custom](https://github.com/powerhome/playbook/assets/92755007/3eab180b-0550-4d7e-b562-84a007690218)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- if let selectedCustom = selectedCustom {
6
- Text("Your choice is: \(selectedCustom.title)")
7
- }
8
- PBRadio(
9
- items: [
10
- PBRadioItem("Custom Power"),
11
- .init("Custom Nitro"),
12
- .init("Custom Google")
13
- ],
14
- orientation: .vertical,
15
- selected: $selectedCustom
16
- )
17
- }
18
- ```
@@ -1,15 +0,0 @@
1
- ![radio-default](https://github.com/powerhome/playbook/assets/92755007/be32852e-de70-4ae0-b8bb-c091f8cfa34b)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Power"),
8
- .init("Nitro"),
9
- .init("Google")
10
- ],
11
- orientation: .vertical,
12
- selected: $selectedDefault
13
- )
14
- }
15
- ```
@@ -1,14 +0,0 @@
1
- ![radio-error](https://github.com/powerhome/playbook/assets/92755007/425f499b-4daf-4093-82a7-230b01723287)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Power")
8
- ],
9
- orientation: .vertical,
10
- selected: $selectedError,
11
- errorState: true
12
- )
13
- }
14
- ```
@@ -1,15 +0,0 @@
1
- ![radio-orientation](https://github.com/powerhome/playbook/assets/92755007/f1f8dac7-a7d5-43cf-ba93-92bd624a1016)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Power"),
8
- .init("Nitro"),
9
- .init("Google")
10
- ],
11
- orientation: .horizontal,
12
- selected: $selectedOrientation
13
- )
14
- }
15
- ```
@@ -1,31 +0,0 @@
1
- ![radio-padding](https://github.com/powerhome/playbook/assets/92755007/5cb123fb-791b-43f7-a57e-336f93c1bb3a)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Small")
8
- ],
9
- orientation: .vertical,
10
- padding: Spacing.small,
11
- selected: $selectedPadding
12
- )
13
- PBRadio(
14
- items: [
15
- PBRadioItem("Medium")
16
- ],
17
- orientation: .vertical,
18
- padding: Spacing.medium,
19
- selected: $selectedPadding
20
- )
21
- PBRadio(
22
- items: [
23
- PBRadioItem("Large")
24
- ],
25
- orientation: .vertical,
26
- padding: Spacing.large,
27
- selected: $selectedPadding
28
- )
29
- }
30
-
31
- ```
@@ -1,10 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **items** | `PBRadioItem` | Specifies the value of the Radio buttons | | |
5
- | **orientation** | `Orientation` | Changes between stacked or inline Radio items | `.vertical` | |
6
- | **textAlignment** | `Orientation` | Changes lable position | `.horizontal` | |
7
- | **spacing** | `CGFloat` | Applies padding around Radio and lable | `Spacing.xSmall` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` |
8
- | **padding** | `CGFloat` | Applies padding between Radio and lable | `Spacing.xSmall` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` |
9
- | **errorState** | `Bool` | Changes Radio to error styling | | |
10
- | **selected** | `PBRadioItem?` | Sets selected Radio item | | |
@@ -1,36 +0,0 @@
1
- ![radio-spacing](https://github.com/powerhome/playbook/assets/92755007/58d1bf02-0c79-4526-9e5c-ba2f631d1dfe)
2
-
3
- ```swift
4
- HStack(alignment: .top) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Small"),
8
- .init("Small Spacing"),
9
- .init("Small Power")
10
- ],
11
- orientation: .vertical,
12
- spacing: Spacing.small,
13
- selected: $selectedSpacing
14
- )
15
- PBRadio(
16
- items: [
17
- PBRadioItem("Medium"),
18
- .init("Medium Spacing"),
19
- .init("Medium Power")
20
- ],
21
- orientation: .vertical,
22
- spacing: Spacing.medium,
23
- selected: $selectedSpacing
24
- )
25
- PBRadio(
26
- items: [
27
- PBRadioItem("Large"),
28
- .init("Large Spacing"),
29
- .init("Large Power")
30
- ],
31
- orientation: .vertical,
32
- spacing: Spacing.large,
33
- selected: $selectedSpacing
34
- )
35
- }
36
- ```
@@ -1,13 +0,0 @@
1
- ![radio-subtitle](https://github.com/powerhome/playbook/assets/92755007/1244f4d4-0e87-4b5a-9b20-ac2223866321)
2
-
3
- ```swift
4
- VStack(alignment: .leading) {
5
- PBRadio(
6
- items: [
7
- PBRadioItem("Power", subtitle: "subtitle")
8
- ],
9
- selected: $selectedSubtitle
10
- )
11
- }
12
-
13
- ```
@@ -1,45 +0,0 @@
1
- ![timestamp-align](https://github.com/powerhome/playbook/assets/92755007/9107e699-218e-4a15-a0f9-b1a8f4710c37)
2
-
3
- ```swiftå
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- Group {
6
- PBTimestamp(
7
- Date(),
8
- showDate: false
9
- )
10
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
11
- PBTimestamp(Date())
12
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
13
- PBTimestamp(Date().addingTimeInterval(addThreeYear))
14
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
15
- PBTimestamp(Date().addingTimeInterval(subOneYear))
16
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
17
- }
18
- Group {
19
- PBTimestamp(
20
- Date(),
21
- showDate: false
22
- )
23
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
24
- PBTimestamp(Date())
25
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
26
- PBTimestamp(Date().addingTimeInterval(addThreeYear))
27
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
28
- PBTimestamp(Date().addingTimeInterval(subOneYear))
29
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .center)
30
- }
31
- Group {
32
- PBTimestamp(
33
- Date(),
34
- showDate: false
35
- )
36
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
37
- PBTimestamp(Date())
38
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
39
- PBTimestamp(Date().addingTimeInterval(addThreeYear))
40
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
41
- PBTimestamp(Date().addingTimeInterval(subOneYear))
42
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .trailing)
43
- }
44
- }
45
- ```
@@ -1,26 +0,0 @@
1
- ![timestamp-default](https://github.com/powerhome/playbook/assets/92755007/064c6a98-4bdd-4160-8f4b-589233762c80)
2
-
3
- ```swift
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- PBTimestamp(
6
- Date(),
7
- showDate: false
8
- )
9
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
10
-
11
- PBTimestamp(
12
- Date()
13
- )
14
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
15
-
16
- PBTimestamp(
17
- Date().addingTimeInterval(addThreeYear)
18
- )
19
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
20
-
21
- PBTimestamp(
22
- Date().addingTimeInterval(subOneYear)
23
- )
24
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
25
- }
26
- ```
@@ -1,25 +0,0 @@
1
- ![timestamp-elapsed](https://github.com/powerhome/playbook/assets/92755007/bb10a951-b536-41cc-aa6c-b343e826af20)
2
-
3
- ```swift
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- PBTimestamp(
6
- Date().addingTimeInterval(-10),
7
- showUser: true,
8
- text: "Maricris Nanota",
9
- variant: .elapsed
10
- )
11
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
12
-
13
- PBTimestamp(
14
- Date().addingTimeInterval(-36000),
15
- variant: .elapsed
16
- )
17
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
18
-
19
- PBTimestamp(
20
- Date().addingTimeInterval(-36000),
21
- variant: .hideUserElapsed
22
- )
23
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
24
- }
25
- ```
@@ -1,10 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **amPmStyle** | `AmPmStyle` | Displays shortened or full version of "am" and "pm" | `.short` | `.short` `.full` |
5
- | **showDate** | `Bool` | Displays date | `true` | |
6
- | **showTimeZone** | `Bool` | Displays time zone | `false` | |
7
- | **showUser** | `Bool` | Displays user's name | `false` | |
8
- | **text** | `String` | Specifies which user to display | `nil` | |
9
- | **timeZone** | `String` | Specifies which time zone to display | `nil` | |
10
- | **variant** | `Variant` | Specifies copy for last upadted | `.standard` | `.elapsed` `.standard` `.updated` `.hideUserElapsed` |
@@ -1,67 +0,0 @@
1
- ![timestamp-timezones](https://github.com/powerhome/playbook/assets/92755007/119f0838-e912-473b-83de-626db1fd0d61)
2
-
3
- ```swift
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- Group {
6
- PBTimestamp(
7
- Date(),
8
- showDate: false,
9
- showTimeZone: true,
10
- timeZone: "America/New_York"
11
- )
12
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
13
-
14
- PBTimestamp(
15
- Date(),
16
- showTimeZone: true,
17
- timeZone: "America/New_York"
18
- )
19
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
20
-
21
- PBTimestamp(
22
- Date().addingTimeInterval(addThreeYear),
23
- showTimeZone: true,
24
- timeZone: "America/New_York"
25
- )
26
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
27
-
28
- PBTimestamp(
29
- Date().addingTimeInterval(subOneYear),
30
- showTimeZone: true,
31
- timeZone: "America/New_York"
32
- )
33
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
34
- }
35
-
36
- Group {
37
- PBTimestamp(
38
- Date(),
39
- showDate: false,
40
- showTimeZone: true,
41
- timeZone: "Asia/Hong_Kong"
42
- )
43
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
44
-
45
- PBTimestamp(
46
- Date(),
47
- showTimeZone: true,
48
- timeZone: "Asia/Hong_Kong"
49
- )
50
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
51
-
52
- PBTimestamp(
53
- Date().addingTimeInterval(addThreeYear),
54
- showTimeZone: true,
55
- timeZone: "Asia/Hong_Kong"
56
- )
57
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
58
-
59
- PBTimestamp(
60
- Date().addingTimeInterval(subOneYear),
61
- showTimeZone: true,
62
- timeZone: "Asia/Hong_Kong"
63
- )
64
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
65
- }
66
- }
67
- ```
@@ -1,19 +0,0 @@
1
- ![timestamp-updated](https://github.com/powerhome/playbook/assets/92755007/14717880-c584-4413-9d9b-c569392595b7)
2
-
3
- ```swift
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- PBTimestamp(
6
- Date().addingTimeInterval(-12),
7
- showUser: true,
8
- text: "Maricris Nanota",
9
- variant: .updated
10
- )
11
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
12
-
13
- PBTimestamp(
14
- Date().addingTimeInterval(-12),
15
- variant: .updated
16
- )
17
- .frame(minWidth: minWidth, maxWidth: .infinity, alignment: .leading)
18
- }
19
- ```