playbook_ui 13.27.0.pre.alpha.dropdowncustomoptionfix2924 → 13.27.0.pre.alpha.powercentrainplaybookpt22905
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_button/_button.scss +3 -3
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +3 -3
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -1
- data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_date_time/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml +0 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -4
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +4 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +3 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +6 -11
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +2 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +8 -13
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +2 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +8 -13
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.html.erb +8 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown_option.rb +5 -1
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +12 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +0 -19
- data/app/pb_kits/playbook/tokens/_titles.scss +4 -4
- data/app/pb_kits/playbook/tokens/_typography.scss +10 -10
- data/dist/playbook-rails.js +4 -4
- data/dist/reset.css +1 -1
- data/lib/playbook/forms/builder.rb +0 -1
- data/lib/playbook/version.rb +1 -1
- metadata +2 -23
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md +0 -61
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md +0 -11
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md +0 -32
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md +0 -17
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md +0 -19
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md +0 -10
- data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md +0 -17
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md +0 -39
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md +0 -39
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md +0 -15
- data/app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md +0 -78
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default_swift.md +0 -20
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_props_swift.md +0 -6
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md +0 -23
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md +0 -7
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md +0 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md +0 -22
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md +0 -9
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md +0 -62
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +0 -8
- data/lib/playbook/forms/builder/phone_number_field.rb +0 -12
data/dist/reset.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
*{box-sizing:border-box;margin:0;padding:0}*:before,*:after{box-sizing:border-box}html{-webkit-tap-highlight-color:rgba(0,0,0,0);height:100vh;overflow-x:hidden}body{font-family:"
|
1
|
+
*{box-sizing:border-box;margin:0;padding:0}*:before,*:after{box-sizing:border-box}html{-webkit-tap-highlight-color:rgba(0,0,0,0);height:100vh;overflow-x:hidden}body{font-family:"Power Centra","Helvetica Neue",Helvetica,Arial,sans_serif;font-size:15.5px;line-height:1.5;background-color:#f3f7fb;height:100%;letter-spacing:.003em;font-weight:400;font-style:normal;text-rendering:optimizeLegibility;-moz-font-feature-settings:"liga" on;color:#242b42;margin:0 !important;padding:0 !important;box-sizing:border-box;min-height:100vh;padding:50px}a{text-decoration:none;color:#0056cf}
|
@@ -12,7 +12,6 @@ module Playbook
|
|
12
12
|
require_relative "builder/typeahead_field"
|
13
13
|
require_relative "builder/intl_telephone_field"
|
14
14
|
require_relative "builder/multi_level_select_field"
|
15
|
-
require_relative "builder/phone_number_field"
|
16
15
|
|
17
16
|
prepend(FormFieldBuilder.new(:email_field, kit_name: "text_input"))
|
18
17
|
prepend(FormFieldBuilder.new(:number_field, kit_name: "text_input"))
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.27.0.pre.alpha.
|
4
|
+
version: 13.27.0.pre.alpha.powercentrainplaybookpt22905
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-05-
|
12
|
+
date: 2024-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -889,8 +889,6 @@ files:
|
|
889
889
|
- app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js
|
890
890
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.html.erb
|
891
891
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx
|
892
|
-
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default_swift.md
|
893
|
-
- app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_props_swift.md
|
894
892
|
- app/pb_kits/playbook/pb_date_range_inline/docs/_description.md
|
895
893
|
- app/pb_kits/playbook/pb_date_range_inline/docs/example.yml
|
896
894
|
- app/pb_kits/playbook/pb_date_range_inline/docs/index.js
|
@@ -914,17 +912,12 @@ files:
|
|
914
912
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_align.jsx
|
915
913
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.html.erb
|
916
914
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold.jsx
|
917
|
-
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_bold_swift.md
|
918
915
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb
|
919
916
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx
|
920
|
-
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default_swift.md
|
921
917
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb
|
922
918
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.jsx
|
923
|
-
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year_swift.md
|
924
|
-
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_props_swift.md
|
925
919
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reverse.html.erb
|
926
920
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reverse.jsx
|
927
|
-
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reversed_swift.md
|
928
921
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_sizes.html.erb
|
929
922
|
- app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_sizes.jsx
|
930
923
|
- app/pb_kits/playbook/pb_date_stacked/docs/_description.md
|
@@ -938,14 +931,10 @@ files:
|
|
938
931
|
- app/pb_kits/playbook/pb_date_time/date_time.rb
|
939
932
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_align.html.erb
|
940
933
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_align.jsx
|
941
|
-
- app/pb_kits/playbook/pb_date_time/docs/_date_time_alignment_swift.md
|
942
934
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_default.html.erb
|
943
935
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_default.jsx
|
944
|
-
- app/pb_kits/playbook/pb_date_time/docs/_date_time_default_swift.md
|
945
|
-
- app/pb_kits/playbook/pb_date_time/docs/_date_time_props_swift.md
|
946
936
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_size.html.erb
|
947
937
|
- app/pb_kits/playbook/pb_date_time/docs/_date_time_size.jsx
|
948
|
-
- app/pb_kits/playbook/pb_date_time/docs/_date_time_size_swift.md
|
949
938
|
- app/pb_kits/playbook/pb_date_time/docs/_description.md
|
950
939
|
- app/pb_kits/playbook/pb_date_time/docs/example.yml
|
951
940
|
- app/pb_kits/playbook/pb_date_time/docs/index.js
|
@@ -966,8 +955,6 @@ files:
|
|
966
955
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.html.erb
|
967
956
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.jsx
|
968
957
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.md
|
969
|
-
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default_swift.md
|
970
|
-
- app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_props_swift.md
|
971
958
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_description.md
|
972
959
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/_footer.md
|
973
960
|
- app/pb_kits/playbook/pb_date_year_stacked/docs/example.yml
|
@@ -1179,22 +1166,15 @@ files:
|
|
1179
1166
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.html.erb
|
1180
1167
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.jsx
|
1181
1168
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children.md
|
1182
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_children_swift.md
|
1183
1169
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb
|
1184
1170
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx
|
1185
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md
|
1186
1171
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb
|
1187
1172
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx
|
1188
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md
|
1189
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dismiss_with_timer_swift.md
|
1190
1173
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb
|
1191
1174
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
|
1192
1175
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.md
|
1193
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md
|
1194
1176
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb
|
1195
1177
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.jsx
|
1196
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md
|
1197
|
-
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md
|
1198
1178
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml
|
1199
1179
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js
|
1200
1180
|
- app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb
|
@@ -2924,7 +2904,6 @@ files:
|
|
2924
2904
|
- lib/playbook/forms/builder/form_field_builder.rb
|
2925
2905
|
- lib/playbook/forms/builder/intl_telephone_field.rb
|
2926
2906
|
- lib/playbook/forms/builder/multi_level_select_field.rb
|
2927
|
-
- lib/playbook/forms/builder/phone_number_field.rb
|
2928
2907
|
- lib/playbook/forms/builder/select_field.rb
|
2929
2908
|
- lib/playbook/forms/builder/typeahead_field.rb
|
2930
2909
|
- lib/playbook/hover.rb
|
@@ -1,61 +0,0 @@
|
|
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
|
-
```
|
@@ -1,11 +0,0 @@
|
|
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` |
|
@@ -1,32 +0,0 @@
|
|
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
|
-
```
|
@@ -1,17 +0,0 @@
|
|
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
|
-
```
|
@@ -1,19 +0,0 @@
|
|
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
|
-
```
|
@@ -1,10 +0,0 @@
|
|
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` |
|
@@ -1,17 +0,0 @@
|
|
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
|
-
```
|
@@ -1,39 +0,0 @@
|
|
1
|
-
![Date-Time-Alignment](https://github.com/powerhome/playbook-swift/assets/54749071/9d1e08ac-4906-406f-b81d-1edf0a09e2e3)
|
2
|
-
|
3
|
-
```swift
|
4
|
-
VStack(spacing: Spacing.small) {
|
5
|
-
HStack {
|
6
|
-
PBDateTime(
|
7
|
-
dateVariant: .short(showIcon: false),
|
8
|
-
timeVariant: .iconTimeZone,
|
9
|
-
isLowercase: true,
|
10
|
-
isTimeBold: true,
|
11
|
-
zone: .utc,
|
12
|
-
showTimeZone: true,
|
13
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
14
|
-
)
|
15
|
-
}
|
16
|
-
.frame(maxWidth: .infinity, alignment: .leading)
|
17
|
-
PBDateTime(
|
18
|
-
dateVariant: .short(showIcon: false),
|
19
|
-
timeVariant: .iconTimeZone,
|
20
|
-
isLowercase: true,
|
21
|
-
isTimeBold: true,
|
22
|
-
zone: .utc,
|
23
|
-
showTimeZone: true,
|
24
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
25
|
-
)
|
26
|
-
HStack {
|
27
|
-
PBDateTime(
|
28
|
-
dateVariant: .short(showIcon: false),
|
29
|
-
timeVariant: .iconTimeZone,
|
30
|
-
isLowercase: true,
|
31
|
-
isTimeBold: true,
|
32
|
-
zone: .utc,
|
33
|
-
showTimeZone: true,
|
34
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
35
|
-
)
|
36
|
-
}
|
37
|
-
.frame(maxWidth: .infinity, alignment: .trailing)
|
38
|
-
}
|
39
|
-
```
|
@@ -1,39 +0,0 @@
|
|
1
|
-
![Date-Time-Default](https://github.com/powerhome/playbook-swift/assets/54749071/f9ea63f9-81bd-41a9-8171-8a213c55ccfe)
|
2
|
-
```swift
|
3
|
-
VStack(alignment: .leading, spacing: Spacing.small) {
|
4
|
-
PBDateTime(
|
5
|
-
dateVariant: .dayDate(showYear: true),
|
6
|
-
timeVariant: .iconTimeZone,
|
7
|
-
isLowercase: true,
|
8
|
-
isTimeBold: true,
|
9
|
-
timeZoneIdentifier: "EST"
|
10
|
-
)
|
11
|
-
PBDateTime(
|
12
|
-
dateVariant: .dayDate(showYear: false),
|
13
|
-
timeVariant: .iconTimeZone,
|
14
|
-
isLowercase: true,
|
15
|
-
isTimeBold: true,
|
16
|
-
zone: .utc,
|
17
|
-
showTimeZone: true,
|
18
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
19
|
-
)
|
20
|
-
PBDateTime(
|
21
|
-
dateVariant: .short(showIcon: false),
|
22
|
-
timeVariant: .iconTimeZone,
|
23
|
-
isLowercase: true,
|
24
|
-
isTimeBold: true,
|
25
|
-
zone: .utc,
|
26
|
-
showTimeZone: true,
|
27
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z",
|
28
|
-
showIcon: true
|
29
|
-
)
|
30
|
-
PBDateTime(
|
31
|
-
dateVariant: .standard,
|
32
|
-
timeVariant: .iconTimeZone,
|
33
|
-
isLowercase: true,
|
34
|
-
isTimeBold: true,
|
35
|
-
showTimeZone: true,
|
36
|
-
timeZoneIdentifier: "GMT+9"
|
37
|
-
)
|
38
|
-
}
|
39
|
-
```
|
@@ -1,15 +0,0 @@
|
|
1
|
-
### Props
|
2
|
-
| Name | Type | Description | Default | Values |
|
3
|
-
| --- | ----------- | --------- | --------- | --------- |
|
4
|
-
| **dateTime** | `Date` | Sets current date. | | |
|
5
|
-
| **iconSize** | `PBIcon.IconSize` | Allows user to change the size of the clock icon. | `.x3` | `.small` `.medium` `.large` |
|
6
|
-
| **dateVariant** | `PBDate.Variant` | Allows user to choose how they would like the date to be displayed | `.dayDate(showYear: false)` | `.short` `.dayDate(showYear: false)` `.standard` `.withIcon(isStandard: true)` `.withIcon(isStandard: false)` |
|
7
|
-
| **timeVariant** | `PBTime.Variant` | Allows user to choose how they would like the time to be displayed | `.time` | `.time` `.clockIcon` `.timeZone` `.iconTimeZone` `.withTimeZoneHeader` |
|
8
|
-
| **fontSize** | `PBFont` | Allows user to change the size of the text | `.caption` | `.subcaption` `.caption` `.body` |
|
9
|
-
| **isLowercase** | `Bool` | Determines whether or not am/pm is capitalized | `false` | `true` `false` |
|
10
|
-
| **isTimeBold** | `Bool` | Determines whether or not the time is bold | `false` | `true` `false` |
|
11
|
-
| **isTimeZoneBold** | `Bool` | Determines whether or not the time zone is bold | `false` | `true` `false` |
|
12
|
-
| **zone** | `PBTime.Zones` | Allows the user to set the time zone | `.east` | `.east` `.central` `.mountain` `.pacific` `.gmt` |
|
13
|
-
| **showTimeZone** | `Bool` | Determines whether or not the time zone is displayed | `false` | `true` `false` |
|
14
|
-
| **timeZoneIdentifier** | `String` | String that the time kit utilizes to calculate the current time and time zone | | |
|
15
|
-
| **showIcon** | `Bool` | Determines whether or not the clock icon is displayed | `false` | `true` `false` |
|
@@ -1,78 +0,0 @@
|
|
1
|
-
![Date-Time-Sizes](https://github.com/powerhome/playbook-swift/assets/54749071/59b2394d-cf25-46b5-a634-ca0721a7b3b0)
|
2
|
-
```swift
|
3
|
-
VStack(alignment: .leading, spacing: Spacing.xSmall) {
|
4
|
-
PBDateTime(
|
5
|
-
dateVariant: .dayDate(showYear: false),
|
6
|
-
timeVariant: .iconTimeZone,
|
7
|
-
fontSize: .caption,
|
8
|
-
zone: .utc,
|
9
|
-
showTimeZone: true,
|
10
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z",
|
11
|
-
showIcon: true
|
12
|
-
)
|
13
|
-
PBDateTime(
|
14
|
-
dateVariant: .dayDate(showYear: false),
|
15
|
-
timeVariant: .iconTimeZone,
|
16
|
-
fontSize: .caption,
|
17
|
-
zone: .utc,
|
18
|
-
showTimeZone: true,
|
19
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
20
|
-
)
|
21
|
-
PBDateTime(
|
22
|
-
dateVariant: .short(showIcon: false),
|
23
|
-
timeVariant: .iconTimeZone,
|
24
|
-
fontSize: .caption,
|
25
|
-
zone: .utc,
|
26
|
-
showTimeZone: true,
|
27
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z",
|
28
|
-
showIcon: true
|
29
|
-
)
|
30
|
-
PBDateTime(
|
31
|
-
dateVariant: .short(showIcon: false),
|
32
|
-
timeVariant: .iconTimeZone,
|
33
|
-
fontSize: .caption,
|
34
|
-
zone: .utc,
|
35
|
-
showTimeZone: true,
|
36
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
37
|
-
)
|
38
|
-
Spacer()
|
39
|
-
PBDateTime(
|
40
|
-
dateVariant: .dayDate(showYear: false),
|
41
|
-
timeVariant: .iconTimeZone,
|
42
|
-
isLowercase: true,
|
43
|
-
isTimeBold: true,
|
44
|
-
zone: .utc,
|
45
|
-
showTimeZone: true,
|
46
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z",
|
47
|
-
showIcon: true
|
48
|
-
)
|
49
|
-
PBDateTime(
|
50
|
-
dateVariant: .dayDate(showYear: false),
|
51
|
-
timeVariant: .iconTimeZone,
|
52
|
-
isLowercase: true,
|
53
|
-
isTimeBold: true,
|
54
|
-
zone: .utc,
|
55
|
-
showTimeZone: true,
|
56
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
57
|
-
)
|
58
|
-
PBDateTime(
|
59
|
-
dateVariant: .short(showIcon: false),
|
60
|
-
timeVariant: .iconTimeZone,
|
61
|
-
isLowercase: true,
|
62
|
-
isTimeBold: true,
|
63
|
-
zone: .utc,
|
64
|
-
showTimeZone: true,
|
65
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z",
|
66
|
-
showIcon: true
|
67
|
-
)
|
68
|
-
PBDateTime(
|
69
|
-
dateVariant: .short(showIcon: false),
|
70
|
-
timeVariant: .iconTimeZone,
|
71
|
-
isLowercase: true,
|
72
|
-
isTimeBold: true,
|
73
|
-
zone: .utc,
|
74
|
-
showTimeZone: true,
|
75
|
-
timeZoneIdentifier: "2012-08-02T17:49:29Z"
|
76
|
-
)
|
77
|
-
}
|
78
|
-
```
|
@@ -1,20 +0,0 @@
|
|
1
|
-
![Date-Year-Stacked-Default](https://github.com/powerhome/playbook-swift/assets/54749071/997c9389-669a-42d4-b4af-661d546024b9)
|
2
|
-
```swift
|
3
|
-
VStack(alignment: .leading, spacing: Spacing.small) {
|
4
|
-
PBDateYearStacked(
|
5
|
-
date: Date(),
|
6
|
-
alignment: .leading
|
7
|
-
)
|
8
|
-
.frame(maxWidth: .infinity, alignment: .leading)
|
9
|
-
PBDateYearStacked(
|
10
|
-
date: Date(),
|
11
|
-
alignment: .center
|
12
|
-
)
|
13
|
-
.frame(maxWidth: .infinity, alignment: .center)
|
14
|
-
PBDateYearStacked(
|
15
|
-
date: Date(),
|
16
|
-
alignment: .trailing
|
17
|
-
)
|
18
|
-
.frame(maxWidth: .infinity, alignment: .trailing)
|
19
|
-
}
|
20
|
-
```
|
@@ -1,6 +0,0 @@
|
|
1
|
-
### Props
|
2
|
-
| Name | Type | Description | Default | Values |
|
3
|
-
| --- | ----------- | --------- | --------- | --------- |
|
4
|
-
| **date** | `Date()` |Sets the size of the date | `Date()` | |
|
5
|
-
| **alignment** | `HorizontalAlignment` | Changes the alignment of the date | `.leading` | `.leading` `.trailing` |
|
6
|
-
| **variant** | `PBDate.Variant` | Boolean value that determines whether or not the month and date are reversed. | `.standard` | `short(showIcon: Bool)`, `standard`, `dayDate(showYear: Bool)`, `withIcon(isStandard: Bool)` |
|
@@ -1,23 +0,0 @@
|
|
1
|
-
![Children-Toast](https://github.com/powerhome/playbook-swift/assets/54749071/55aebd12-43c4-4061-92d3-6aebb07ff349)
|
2
|
-
|
3
|
-
```swift
|
4
|
-
VStack(alignment: .leading) {
|
5
|
-
PBToast(
|
6
|
-
text: message,
|
7
|
-
variant: .success,
|
8
|
-
actionView: .custom(AnyView(Text("Undo").pbFont(.title4, color: .white))),
|
9
|
-
dismissAction: closeToast
|
10
|
-
)
|
11
|
-
PBToast(
|
12
|
-
variant: .custom(nil, .pbPrimary),
|
13
|
-
actionView: .custom(
|
14
|
-
AnyView(
|
15
|
-
HStack {
|
16
|
-
Text("Undo action").pbFont(.caption, color: .white)
|
17
|
-
PBButton(variant: .primary, title: "Undo").disabled(true)
|
18
|
-
}
|
19
|
-
)),
|
20
|
-
dismissAction: closeToast
|
21
|
-
)
|
22
|
-
}
|
23
|
-
```
|
data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
```swift
|
2
|
-
VStack(alignment: .leading) {
|
3
|
-
PBToast(text: "Error Message", variant: .error, actionView: .default, dismissAction: closeToast)
|
4
|
-
PBToast(text: "Items Successfully Moved", variant: .success, actionView: .default, dismissAction: closeToast)
|
5
|
-
PBToast(text: "Scan to Assign Selected Items", variant: .neutral, actionView: .default, dismissAction: closeToast)
|
6
|
-
}
|
7
|
-
```
|
@@ -1,9 +0,0 @@
|
|
1
|
-
![Default-Toast](https://github.com/powerhome/playbook-swift/assets/54749071/cc465b1b-85ba-4492-a832-b06b842a1555)
|
2
|
-
|
3
|
-
```swift
|
4
|
-
VStack(alignment: .leading) {
|
5
|
-
PBToast(text: "Error Message", variant: .error, dismissAction: closeToast)
|
6
|
-
PBToast(text: "Items Successfully Moved", variant: .success, dismissAction: closeToast)
|
7
|
-
PBToast(text: "Scan to Assign Selected Items", variant: .neutral, dismissAction: closeToast)
|
8
|
-
}
|
9
|
-
```
|
@@ -1,22 +0,0 @@
|
|
1
|
-
```swift
|
2
|
-
HStack {
|
3
|
-
PBButton(variant: .secondary, title: "Top Center") {
|
4
|
-
position = .top
|
5
|
-
toastView = PBToast(
|
6
|
-
text: "Top Center",
|
7
|
-
variant: .neutral,
|
8
|
-
actionView: .withTimer(3),
|
9
|
-
dismissAction: closeToast
|
10
|
-
)
|
11
|
-
}
|
12
|
-
PBButton(variant: .secondary, title: "Bottom Center") {
|
13
|
-
position = .bottom
|
14
|
-
toastView = PBToast(
|
15
|
-
text: "Bottom Center",
|
16
|
-
variant: .neutral,
|
17
|
-
actionView: .withTimer(2),
|
18
|
-
dismissAction: closeToast
|
19
|
-
)
|
20
|
-
}
|
21
|
-
}
|
22
|
-
```
|
@@ -1,62 +0,0 @@
|
|
1
|
-
```swift
|
2
|
-
GridRow {
|
3
|
-
PBButton(variant: .secondary, title: "Top Left") {
|
4
|
-
position = .topLeft
|
5
|
-
toastView = PBToast(
|
6
|
-
text: "Top Left",
|
7
|
-
variant: .neutral,
|
8
|
-
actionView: .default,
|
9
|
-
dismissAction: closeToast
|
10
|
-
)
|
11
|
-
}
|
12
|
-
PBButton(variant: .secondary, title: "Top Right") {
|
13
|
-
position = .topRight
|
14
|
-
toastView = PBToast(
|
15
|
-
text: "Top Right",
|
16
|
-
variant: .neutral,
|
17
|
-
actionView: .default,
|
18
|
-
dismissAction: closeToast
|
19
|
-
)
|
20
|
-
}
|
21
|
-
}
|
22
|
-
GridRow {
|
23
|
-
PBButton(variant: .secondary, title: "Top Center") {
|
24
|
-
position = .top
|
25
|
-
toastView = PBToast(
|
26
|
-
text: "Top Center",
|
27
|
-
variant: .neutral,
|
28
|
-
actionView: .default,
|
29
|
-
dismissAction: closeToast
|
30
|
-
)
|
31
|
-
}
|
32
|
-
PBButton(variant: .secondary, title: "Bottom Center") {
|
33
|
-
position = .bottom
|
34
|
-
toastView = PBToast(
|
35
|
-
text: "Bottom Center",
|
36
|
-
variant: .custom(.user, .status(.neutral)),
|
37
|
-
actionView: .default,
|
38
|
-
dismissAction: closeToast
|
39
|
-
)
|
40
|
-
}
|
41
|
-
}
|
42
|
-
GridRow {
|
43
|
-
PBButton(variant: .secondary, title: "Bottom Left") {
|
44
|
-
position = .bottomLeft
|
45
|
-
toastView = PBToast(
|
46
|
-
text: "Bottom Left",
|
47
|
-
variant: .custom(.user, .status(.neutral)),
|
48
|
-
actionView: .default,
|
49
|
-
dismissAction: closeToast
|
50
|
-
)
|
51
|
-
}
|
52
|
-
PBButton(variant: .secondary, title: "Bottom Right") {
|
53
|
-
position = .bottomRight
|
54
|
-
toastView = PBToast(
|
55
|
-
text: "Bottom Right",
|
56
|
-
variant: .custom(.user, .status(.neutral)),
|
57
|
-
actionView: .default,
|
58
|
-
dismissAction: closeToast
|
59
|
-
)
|
60
|
-
}
|
61
|
-
}
|
62
|
-
```
|
data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
### Props
|
2
|
-
| Name | Type | Description | Default | Values |
|
3
|
-
| --- | ----------- | --------- | --------- | --------- |
|
4
|
-
| **text** | `String` |`Value for the toast message` | `nil` | |
|
5
|
-
| **variant** | `Variant` | `Determines the type pf toast message being displayed` | `.custom()` | `error`, `success`,
|
6
|
-
`neutral`, `custom()` |
|
7
|
-
| **actionView** | `dismissAction` | Dismisses the toast message | `.default` | `default` `custom()` `withTimer()` |
|
8
|
-
| **dismissAction** | `(() -> Void)` | `Triggers the dismiss action` | | |
|