playbook_ui_docs 13.13.0 → 13.14.0.pre.alpha.PLAY1109bugdisplaypropblocksfontcolor1784

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md +14 -0
  3. data/app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md +6 -0
  4. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md +14 -0
  5. data/app/pb_kits/playbook/pb_contact/docs/example.yml +6 -0
  6. data/app/pb_kits/playbook/pb_date/docs/_date_alignment_swift.md +11 -0
  7. data/app/pb_kits/playbook/pb_date/docs/_date_default_swift.md +16 -0
  8. data/app/pb_kits/playbook/pb_date/docs/_date_props_swift.md +8 -0
  9. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled_swift.md +11 -0
  10. data/app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md +14 -0
  11. data/app/pb_kits/playbook/pb_date/docs/example.yml +7 -0
  12. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.html.erb +29 -0
  13. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx +34 -0
  14. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md +7 -0
  15. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb +28 -0
  16. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx +34 -0
  17. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md +1 -0
  18. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +2 -2
  19. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  20. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  21. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default_swift.md +18 -0
  22. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md +34 -0
  23. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link_swift.md +18 -0
  24. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified_swift.md +13 -0
  25. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_props_swift.md +14 -0
  26. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +6 -0
  27. data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +8 -0
  28. data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +5 -0
  29. data/app/pb_kits/playbook/pb_person/docs/example.yml +4 -0
  30. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +2 -0
  31. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
  32. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
  33. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
  34. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
  35. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
  36. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +4 -1
  37. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +30 -5
  38. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
  39. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
  40. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
  41. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
  42. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
  43. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +8 -0
  44. data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +37 -0
  45. data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +10 -0
  46. data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +35 -0
  47. data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +27 -0
  48. data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +35 -0
  49. data/app/pb_kits/playbook/pb_user/docs/example.yml +7 -0
  50. data/dist/menu.yml +240 -168
  51. data/dist/playbook-doc.js +8 -8
  52. metadata +41 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 702fdebdcca4d3a14112b52586af2414f817ec607f6d3bc31a60e51b406f171c
4
- data.tar.gz: 90e2bb449e776072b8aa1ce110dfe2942a66abcadc85acec1331815b6db474f1
3
+ metadata.gz: 51b7bcf5678da511fa989e97e73af01a5ccd0e2e7fc9d996c5a4bbc2ad0f7649
4
+ data.tar.gz: 4279f9fa236b5edadcf8bb1b250499c4065c127bc72dcfb26991f91c048c3d04
5
5
  SHA512:
6
- metadata.gz: 570e38df8dc097c25494aa485472f72d675d2b9159bb52fb044798023ee7e6ad1813ec9e10dc7ff40327a2a800294a117fa02ceefeee2a5a155474da8fa35b2e
7
- data.tar.gz: 03b740ecfbebc0258904a7a7faa430bcde5d977567fa2f780d50871f41484fd6cdb2d2fe9233a8a683c1d39bf758fe0cfad3c965b9b655c937c784bda0576f99
6
+ metadata.gz: 9788b53df703883f69bd9624f3c1801f8bab4f8aefc2ea05c4903c15595df9808bd411d9619b1d96d6e5ddcafea011ed6cc5d7303bc79dbe67dde3e404163389
7
+ data.tar.gz: 33c932b84109bb6cc9cd2b21fa9f52c276adf8cc70a09fcad8db64f9fa81f37f99af89bdfc03941f8dbe5fcf680a702b7734774679d06d21d08a47bd3cca705e
@@ -0,0 +1,14 @@
1
+ ![contact-default](https://github.com/powerhome/playbook/assets/92755007/4226a1e0-5f31-4445-a536-57e95b83768a)
2
+
3
+ ```swift
4
+
5
+ VStack(alignment: .leading, spacing: Spacing.small) {
6
+ PBContact(type: .cell, value: "3491859988")
7
+ PBContact(value: "5555555555")
8
+ PBContact(type: .email, value: "email@example.com")
9
+ PBContact(type: .work, value: "3245627482")
10
+ PBContact(type: .workCell, value: "3245627482")
11
+ }
12
+
13
+
14
+ ```
@@ -0,0 +1,6 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **detail** | `Bool` | Displays text describing the Contact's type | `false` | `true` `false` |
5
+ | **contactValue** | `String` | Sets the Contact's text value | | |
6
+ | **type** | `ContactType` | Sets the icon | `.home` | `cell` `email` `home` `work` `workCell` `wrongPhone` `ext` `custom` |
@@ -0,0 +1,14 @@
1
+ ![contact-detail-indicator](https://github.com/powerhome/playbook/assets/92755007/2a29d4b5-6e7b-43ff-8e7c-0dbeec11627e)
2
+
3
+ ```swift
4
+
5
+ VStack(alignment: .leading, spacing: Spacing.small) {
6
+ PBContact(type: .cell, value: "3491859988", detail: true)
7
+ PBContact(value: "5555555555", detail: true)
8
+ PBContact(type: .email, value: "email@example.com", detail: true)
9
+ PBContact(type: .work, value: "3245627482", detail: true)
10
+ PBContact(type: .ext, value: "1234", detail: true)
11
+ }
12
+
13
+
14
+ ```
@@ -8,3 +8,9 @@ examples:
8
8
  react:
9
9
  - contact_default: Default
10
10
  - contact_with_detail: Detail Indicator
11
+
12
+
13
+ swift:
14
+ - contact_default_swift: Default
15
+ - contact_with_detail_swift: Detail Indicator
16
+ - contact_props_swift: ""
@@ -0,0 +1,11 @@
1
+ ![date-alignment](https://github.com/powerhome/playbook/assets/92755007/094761cb-5151-4de5-a8e1-f905455c2aca)
2
+
3
+ ```swift
4
+
5
+ VStack(spacing: Spacing.small) {
6
+ PBDate(Date(), variant: .standard, typography: .title4, alignment: .leading)
7
+ PBDate(Date(), variant: .withIcon(isStandard: true), typography: .title4, iconSize: .x1, alignment: .center)
8
+ PBDate(Date(), variant: .short, typography: .title4, alignment: .trailing)
9
+ }
10
+
11
+ ```
@@ -0,0 +1,16 @@
1
+ ![date-default](https://github.com/powerhome/playbook/assets/92755007/0d9f151d-2a18-445c-add3-8194c343bfea)
2
+
3
+
4
+ ```swift
5
+
6
+ VStack(alignment: .leading, spacing: Spacing.small) {
7
+ PBDate(Date(), variant: .short)
8
+ PBDate(Date(), variant: .dayDate)
9
+ PBDate(Date(), variant: .standard)
10
+ Spacer()
11
+ PBDate(Date(), variant: .short, typography: .title4)
12
+ PBDate(Date(), variant: .dayDate, typography: .title4)
13
+ PBDate(Date(), variant: .standard, typography: .title4)
14
+ }
15
+
16
+ ```
@@ -0,0 +1,8 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **datestamp** | `Date` | Sets the date | | |
5
+ | **variant** | `Variant` | Changes the style | `.short` | `.short` `.dayDate` `.standard` `.withIcon(isStandard: true)` `withIcon(isStandard: false)` |
6
+ | **typography** | `PBFont` | Sets the font | `.caption` | `.title1` `.title2` `.title3` `.title4` `.body` `.buttonText` `.largeCaption` `.caption` `.subcaption` `.monogram` `.badgeText` `.detail` |
7
+ | **iconSize** | `PBIcon.IconSize` | Chances the icon's size | `.x1` | `xSmall` `small` `large` `x1` `x2` `x3` `x4` `x5` `x6` `x7` `x8` `x9` `x10` |
8
+ | **alignment** | `Alignment` | Changes the alignment | `.leading` | `.leading` `.trailing` |
@@ -0,0 +1,11 @@
1
+ ![date-unstyled](https://github.com/powerhome/playbook/assets/92755007/dc0ab7cf-0d97-407c-9aac-f53645eb6ee2)
2
+
3
+ ```swift
4
+
5
+ VStack(alignment: .leading, spacing: Spacing.small) {
6
+ PBDate(Date(), variant: .short, typography: .body)
7
+ PBDate(Date(), variant: .standard, typography: .title1)
8
+ PBDate(Date(), variant: .withIcon(isStandard: false), typography: .subcaption, iconSize: .xSmall)
9
+ }
10
+
11
+ ```
@@ -0,0 +1,14 @@
1
+ ![date-varients](https://github.com/powerhome/playbook/assets/92755007/bb240082-afb9-4802-af5f-7aaccec37aae)
2
+
3
+
4
+ ```swift
5
+
6
+ VStack(alignment: .leading, spacing: Spacing.small) {
7
+ PBDate(Date(), variant: .withIcon(isStandard: true), typography: .caption, iconSize: .xSmall)
8
+ PBDate(Date(), variant: .standard, typography: .title4)
9
+ PBDate(Date(), variant: .withIcon(isStandard: true), typography: .title4, iconSize: .x1)
10
+ PBDate(Date(), variant: .dayDate, typography: .title4)
11
+ PBDate(Date(), variant: .withIcon(isStandard: false), typography: .title4, iconSize: .x1)
12
+ }
13
+
14
+ ```
@@ -12,3 +12,10 @@ examples:
12
12
  - date_variants: Variants
13
13
  - date_alignment: Alignment
14
14
  - date_unstyled: Unstyled
15
+
16
+ swift:
17
+ - date_default_swift: Default
18
+ - date_variants_swift: Variants
19
+ - date_alignment_swift: Alignment
20
+ - date_unstyled_swift: Unstyled
21
+ - date_props_swift: ""
@@ -0,0 +1,29 @@
1
+ <%= pb_rails("date_picker", props: {
2
+ allow_input: true,
3
+ custom_quick_pick_dates: {
4
+ dates: [
5
+ # Allow Playbook to handle the logic...
6
+ {
7
+ label: "Last 15 months",
8
+ value: {
9
+ timePeriod: "months",
10
+ amount: 15,
11
+ },
12
+ },
13
+ # Or, be explicit with an exact date range for more control...
14
+ {
15
+ label: "First Week of June 2022",
16
+ value: ["06/01/2022", "06/07/2022"],
17
+ },
18
+ ],
19
+ },
20
+ end_date_id: "quick-pick-end-date",
21
+ end_date_name: "quick-pick-end-date",
22
+ mode: "range",
23
+ picker_id: "date-picker-quick-pick-custom",
24
+ placeholder: "mm/dd/yyyy to mm/dd/yyyy",
25
+ selection_type: "quickpick",
26
+ start_date_id: "quick-pick-start-date",
27
+ start_date_name: "quick-pick-start-date"
28
+ }) %>
29
+
@@ -0,0 +1,34 @@
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
+
4
+ const DatePickerQuickPickCustom = (props) => (
5
+ <>
6
+ <DatePicker
7
+ allowInput
8
+ customQuickPickDates={{
9
+ dates: [
10
+ // Allow Playbook to handle the logic...
11
+ {
12
+ label: "Last 15 months",
13
+ value: {
14
+ timePeriod: "months",
15
+ amount: 15,
16
+ },
17
+ },
18
+ // Or, be explicit with an exact date range for more control...
19
+ {
20
+ label: "First Week of June 2022",
21
+ value: ["06/01/2022", "06/07/2022"],
22
+ },
23
+ ],
24
+ }}
25
+ mode='range'
26
+ pickerId='date-picker-quick-pick-custom-override'
27
+ placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
+ selectionType='quickpick'
29
+ {...props}
30
+ />
31
+ </>
32
+ )
33
+
34
+ export default DatePickerQuickPickCustom
@@ -0,0 +1,7 @@
1
+ The customQuickPickDates/custom_quick_pick_dates prop allows for the user/dev to define their own quick pick dates.
2
+ The prop accepts an object with two key/value pairs: dates & override (separate doc example below).
3
+
4
+ The dates property accepts an array of objects. Each object in the array has label and value properties. The label is what will be displayed in the UI of the dropdown menu. The value property is just the date that is going to be passed to the datepicker. The value property can be an array of two strings that represent a range, allowing for the dev to be extremely specific. Additionally, the dates array allows for a clean, simple API under that automatically converts dates in a common vernacular.
5
+
6
+ The timePeriod property accepts "days", "weeks", "months", "quarters" or "years", representing past time periods.
7
+ The amount property accepts any number.
@@ -0,0 +1,28 @@
1
+ <%= pb_rails("date_picker", props: {
2
+ allow_input: true,
3
+ custom_quick_pick_dates: {
4
+ override: false,
5
+ dates: [
6
+ {
7
+ label: "Last 15 months",
8
+ value: {
9
+ timePeriod: "months",
10
+ amount: 15,
11
+ },
12
+ },
13
+ {
14
+ label: "First Week of June 2022",
15
+ value: ["06/01/2022", "06/07/2022"],
16
+ },
17
+ ],
18
+ },
19
+ end_date_id: "quick-pick-end-date",
20
+ end_date_name: "quick-pick-end-date",
21
+ mode: "range",
22
+ picker_id: "date-picker-quick-pick-override",
23
+ placeholder: "mm/dd/yyyy to mm/dd/yyyy",
24
+ selection_type: "quickpick",
25
+ start_date_id: "quick-pick-start-date",
26
+ start_date_name: "quick-pick-start-date"
27
+ }) %>
28
+
@@ -0,0 +1,34 @@
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
+
4
+ const DatePickerQuickPickCustomOverride = (props) => (
5
+ <>
6
+ <DatePicker
7
+ allowInput
8
+ customQuickPickDates={{
9
+ override: false,
10
+ dates: [
11
+ {
12
+ label: "Last 15 months",
13
+ value: {
14
+ timePeriod: "months",
15
+ amount: 15,
16
+ },
17
+ },
18
+ {
19
+ label: "First Week of June 2022",
20
+ value: ["06/01/2022", "06/07/2022"],
21
+ },
22
+ ],
23
+ }}
24
+ marginTop='lg'
25
+ mode='range'
26
+ pickerId='date-picker-quick-pick-custom'
27
+ placeholder='mm/dd/yyyy to mm/dd/yyyy'
28
+ selectionType='quickpick'
29
+ {...props}
30
+ />
31
+ </>
32
+ )
33
+
34
+ export default DatePickerQuickPickCustomOverride
@@ -0,0 +1 @@
1
+ The customQuickPickDates/custom_quick_pick_dates prop allows for an override boolean. The override allows for the user to completely override the quick pick dates that ship with the component. Default of `override` is set to true. If you would like to simply append your dates to the default quick pick dates, set this prop to false explicitly.
@@ -1,5 +1,5 @@
1
- import React from 'react'
2
- import DatePicker from '../_date_picker'
1
+ import React from "react"
2
+ import DatePicker from "../_date_picker"
3
3
 
4
4
  const DatePickerQuickPickReact = (props) => (
5
5
  <>
@@ -10,6 +10,8 @@ examples:
10
10
  - date_picker_range: Range
11
11
  - date_picker_quick_pick_rails: Range (Quick Pick)
12
12
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
13
+ - date_picker_quick_pick_custom: Custom Quick Pick Dates
14
+ - date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
13
15
  - date_picker_format: Format
14
16
  - date_picker_disabled: Disabled Dates
15
17
  - date_picker_min_max: Min Max
@@ -37,6 +39,8 @@ examples:
37
39
  - date_picker_range: Range
38
40
  - date_picker_quick_pick_react: Range (Quick Pick)
39
41
  - date_picker_quick_pick_range_limit: Range (Quick Pick w/ “This” Range limit)
42
+ - date_picker_quick_pick_custom: Custom Quick Pick Dates
43
+ - date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
40
44
  - date_picker_format: Format
41
45
  - date_picker_disabled: Disabled Dates
42
46
  - date_picker_min_max: Min Max
@@ -22,3 +22,5 @@ export { default as DatePickerAllowInput } from './_date_picker_allow_input'
22
22
  export { default as DatePickerQuickPickReact } from './_date_picker_quick_pick_react'
23
23
  export { default as DatePickerQuickPickRangeLimit } from './_date_picker_quick_pick_range_limit'
24
24
  export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
25
+ export { default as DatePickerQuickPickCustom } from './_date_picker_quick_pick_custom'
26
+ export { default as DatePickerQuickPickCustomOverride } from './_date_picker_quick_pick_custom_override'
@@ -0,0 +1,18 @@
1
+ ![home-address-street-default](https://github.com/powerhome/playbook/assets/92755007/a4c97536-a402-4cc2-90be-4eeda3b57f6d)
2
+
3
+ ```swift
4
+
5
+ PBHomeAddressStreet(
6
+ address: "70 Prospect Ave",
7
+ withBullet: true,
8
+ houseStyle: "Colonial",
9
+ addressCont: "Apt M18",
10
+ city: "West Chester",
11
+ homeId: "8250263",
12
+ homeUrl: "https://powerhrg.com/",
13
+ state: "PA",
14
+ territory: "PHL",
15
+ zipcode: "19382"
16
+ )
17
+
18
+ ```
@@ -0,0 +1,34 @@
1
+ ![home-address-street-emphasis](https://github.com/powerhome/playbook/assets/92755007/338ed5f9-7e06-4e4c-b71e-d0a348f7a6d6)
2
+
3
+ ```swift
4
+
5
+ PBHomeAddressStreet(
6
+ address: "70 Prospect Ave",
7
+ withBullet: true,
8
+ houseStyle: "Colonial",
9
+ addressCont: "Apt M18",
10
+ city: "West Chester",
11
+ homeId: "8250263",
12
+ homeUrl: "https://powerhrg.com/",
13
+ state: "PA",
14
+ territory: "PHL",
15
+ zipcode: "19382"
16
+ )
17
+
18
+ Spacer(minLength: Spacing.medium)
19
+
20
+ PBHomeAddressStreet(
21
+ address: "70 Prospect Ave",
22
+ withBullet: true,
23
+ houseStyle: "Colonial",
24
+ addressCont: "Apt M18",
25
+ city: "West Chester",
26
+ homeId: "8250263",
27
+ homeUrl: "https://powerhrg.com/",
28
+ state: "PA",
29
+ territory: "PHL",
30
+ zipcode: "19382",
31
+ emphasize: .city
32
+ )
33
+
34
+ ```
@@ -0,0 +1,18 @@
1
+ ![home-address-street-link](https://github.com/powerhome/playbook/assets/92755007/890a61d9-896b-45a1-aa7c-c78783f3ac54)
2
+
3
+ ```swift
4
+
5
+ PBHomeAddressStreet(
6
+ address: "70 Prospect Ave",
7
+ withBullet: true,
8
+ houseStyle: "Colonial",
9
+ addressCont: "Apt M18",
10
+ city: "West Chester",
11
+ homeId: "8250263",
12
+ homeUrl: "https://powerhrg.com/",
13
+ state: "PA",
14
+ territory: "PHL",
15
+ zipcode: "19382"
16
+ )
17
+
18
+ ```
@@ -0,0 +1,13 @@
1
+ ![home-address-street-modified](https://github.com/powerhome/playbook/assets/92755007/32e16708-896f-41c8-ae06-7bea00225b4f)
2
+
3
+ ```swift
4
+
5
+ PBHomeAddressStreet(
6
+ address: "70 Prospect Ave",
7
+ city: "West Chester",
8
+ state: "PA",
9
+ territory: "PHL",
10
+ zipcode: "19382"
11
+ )
12
+
13
+ ```
@@ -0,0 +1,14 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **address** | `String` | Sets the address | | |
5
+ | **withBullet** | `Bool` | Adds a bullet after the address | `false` | `false` `true` |
6
+ | **houseStyle** | `String` | Sets the house style | `nil` | |
7
+ | **addressCont** | `String` | Sets additional address text | `nil` | |
8
+ | **city** | `String` | Sets the city | | |
9
+ | **homeId** | `String` | Sets the home ID | `nil` | |
10
+ | **homeUrl** | `String` | Adds a URL to the homeID | `nil` | |
11
+ | **state** | `String` | Sets the state | | |
12
+ | **territory** | `String` | Sets the territory | | |
13
+ | **zipcode** | `String` | Sets the zipcode | | |
14
+ | **emphasize** | `Emphasize` | Changes text to bold | `.address` | `.address` `.city` `.cityWithZipcode` |
@@ -12,3 +12,9 @@ examples:
12
12
  - home_address_street_modified: Modified
13
13
  - home_address_street_link: Link
14
14
 
15
+ swift:
16
+ - home_address_street_default_swift: Default
17
+ - home_address_street_emphasis_swift: Emphasis
18
+ - home_address_street_modified_swift: Modified
19
+ - home_address_street_link_swift: Link
20
+ - home_address_street_props_swift: ""
@@ -0,0 +1,8 @@
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
+ ```
@@ -0,0 +1,5 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **firstName** | `String` | Sets the first name | | |
5
+ | **lastName** | `String` | Sets the last name | | |
@@ -7,3 +7,7 @@ examples:
7
7
  react:
8
8
  - person_default: Default
9
9
 
10
+ swift:
11
+ - person_default_swift: Default
12
+ - person_props_swift: ""
13
+
@@ -0,0 +1,2 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, background_type: "fill", padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, background_type: "outline", padding_bottom: "xs" }) %>
@@ -0,0 +1,25 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingBackgroundOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
13
+
14
+
15
+ <StarRating
16
+ backgroundType='outline'
17
+ paddingBottom="xs"
18
+ rating={3}
19
+ {...props}
20
+ />
21
+
22
+ </>
23
+ )
24
+
25
+ export default StarRatingBackgroundOptions
@@ -0,0 +1,3 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "primary", padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, color_option: "subtle", padding_bottom: "xs" }) %>
@@ -0,0 +1,31 @@
1
+ import React from 'react'
2
+
3
+ import StarRating from '../_star_rating'
4
+
5
+ const StarRatingColorOptions = (props) => (
6
+ <>
7
+
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
13
+
14
+ <StarRating
15
+ colorOption='primary'
16
+ paddingBottom="xs"
17
+ rating={3}
18
+ {...props}
19
+ />
20
+
21
+ <StarRating
22
+ colorOption='subtle'
23
+ paddingBottom="xs"
24
+ rating={3}
25
+ {...props}
26
+ />
27
+
28
+ </>
29
+ )
30
+
31
+ export default StarRatingColorOptions
@@ -1,13 +1,11 @@
1
- <%= pb_rails("star_rating") %>
1
+ <%= pb_rails("star_rating", props: { padding_bottom: "xs" }) %>
2
2
 
3
- <br>
3
+ <%= pb_rails("star_rating", props: { rating: 0.9, padding_bottom: "xs" }) %>
4
4
 
5
- <%= pb_rails("star_rating", props: { rating: 3 }) %>
5
+ <%= pb_rails("star_rating", props: { rating: 1.5, padding_bottom: "xs" }) %>
6
6
 
7
- <br>
7
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
8
8
 
9
- <%= pb_rails("star_rating", props: { rating: 1.5 }) %>
9
+ <%= pb_rails("star_rating", props: { rating: 4.2, padding_bottom: "xs" }) %>
10
10
 
11
- <br>
12
-
13
- <%= pb_rails("star_rating", props: { rating: 5 }) %>
11
+ <%= pb_rails("star_rating", props: { rating: 5, padding_bottom: "xs" }) %>
@@ -4,25 +4,38 @@ import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingDefault = (props) => (
6
6
  <>
7
- <StarRating />
7
+ <StarRating
8
+ paddingBottom="xs"
9
+ {...props}
10
+ />
8
11
 
9
- <br />
10
12
 
11
13
  <StarRating
12
- rating={3}
14
+ paddingBottom="xs"
15
+ rating={0.9}
13
16
  {...props}
14
17
  />
15
18
 
16
- <br />
17
-
18
19
  <StarRating
20
+ paddingBottom="xs"
19
21
  rating={1.5}
20
22
  {...props}
21
23
  />
22
24
 
23
- <br />
25
+ <StarRating
26
+ paddingBottom="xs"
27
+ rating={3}
28
+ {...props}
29
+ />
30
+
31
+ <StarRating
32
+ paddingBottom="xs"
33
+ rating={4.2}
34
+ {...props}
35
+ />
24
36
 
25
37
  <StarRating
38
+ paddingBottom="xs"
26
39
  rating={5}
27
40
  {...props}
28
41
  />
@@ -1 +1,4 @@
1
- <%= pb_rails("star_rating", props: { rating: 3.5, hide_rating: true }) %>
1
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 2.8, layout_option: "number", padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, layout_option: "number", padding_bottom: "xs" }) %>
4
+ <%= pb_rails("star_rating", props: { rating: 1, layout_option: "onestar", padding_bottom: "xs" }) %>
@@ -3,13 +3,38 @@ import React from 'react'
3
3
  import StarRating from '../_star_rating'
4
4
 
5
5
  const StarRatingHide = (props) => (
6
+ <>
6
7
 
7
- <StarRating
8
- hideRating
9
- rating={3.5}
10
- {...props}
11
- />
8
+ <StarRating
9
+ paddingBottom="xs"
10
+ rating={3}
11
+ {...props}
12
+ />
12
13
 
14
+
15
+ <StarRating
16
+ layoutOption={"number"}
17
+ paddingBottom="xs"
18
+ rating={2.8}
19
+ {...props}
20
+ />
21
+
22
+
23
+ <StarRating
24
+ layoutOption={"number"}
25
+ paddingBottom="xs"
26
+ rating={3}
27
+ {...props}
28
+ />
29
+
30
+ <StarRating
31
+ layoutOption={"onestar"}
32
+ paddingBottom="xs"
33
+ rating={3}
34
+ {...props}
35
+ />
36
+
37
+ </>
13
38
  )
14
39
 
15
40
  export default StarRatingHide
@@ -0,0 +1,6 @@
1
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 3, padding_bottom: "xs" }) %>
2
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 4, padding_bottom: "xs" }) %>
3
+ <%= pb_rails("star_rating", props: { rating: 3, padding_bottom: "xs" }) %>
4
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 6, padding_bottom: "xs" }) %>
5
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 7, padding_bottom: "xs" }) %>
6
+ <%= pb_rails("star_rating", props: { rating: 3, denominator: 8, padding_bottom: "xs" }) %>