playbook_ui 13.30.0.pre.alpha.20240515remotebuildkitconversion3150 → 13.30.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +4 -4
  4. data/app/pb_kits/playbook/pb_card/_card.tsx +3 -4
  5. data/app/pb_kits/playbook/pb_collapsible/index.js +1 -6
  6. data/app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml +1 -6
  7. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +4 -2
  8. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +50 -70
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -2
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +1 -1
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -5
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +4 -11
  13. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.md +2 -4
  14. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +2 -2
  15. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -7
  16. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +4 -6
  17. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +15 -142
  18. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +5 -6
  19. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +0 -18
  20. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +218 -228
  21. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +0 -2
  22. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
  23. data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +12 -14
  24. data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +0 -7
  25. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -17
  26. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +3 -9
  27. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  28. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  29. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +11 -16
  30. data/app/pb_kits/playbook/pb_icon/_icon.tsx +6 -37
  31. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.html.erb +1 -6
  32. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +5 -21
  33. data/app/pb_kits/playbook/pb_icon/icon.rb +1 -21
  34. data/app/pb_kits/playbook/pb_list/_list.tsx +4 -4
  35. data/app/pb_kits/playbook/pb_list/_list_item.tsx +3 -7
  36. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.html.erb +1 -1
  37. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +0 -1
  38. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.md +1 -3
  39. data/app/pb_kits/playbook/pb_nav/item.html.erb +1 -1
  40. data/app/pb_kits/playbook/pb_nav/item.rb +0 -1
  41. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +4 -4
  42. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
  43. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +3 -7
  44. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +3 -3
  45. data/app/pb_kits/playbook/pb_table/table_header.html.erb +2 -16
  46. data/app/pb_kits/playbook/pb_timeline/_item.tsx +10 -11
  47. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +6 -8
  48. data/app/pb_kits/playbook/utilities/globalProps.ts +0 -1
  49. data/dist/menu.yml +2 -2
  50. data/dist/playbook-rails.js +7 -7
  51. data/lib/playbook/version.rb +2 -2
  52. metadata +5 -22
  53. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +0 -59
  54. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.md +0 -6
  55. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default_swift.md +0 -33
  56. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_props_swift.md +0 -18
  57. data/app/pb_kits/playbook/pb_draggable/context/types.ts +0 -26
  58. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md +0 -7
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +0 -9
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +0 -34
  61. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.html.erb +0 -32
  62. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.jsx +0 -48
  63. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -72
  64. data/app/pb_kits/playbook/pb_icon/icon_aliases.json +0 -39
  65. data/app/pb_kits/playbook/pb_icon/types.d.ts +0 -1
  66. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb +0 -24
  67. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb +0 -11
  68. data/app/pb_kits/playbook/pb_overlay/overlay.html.erb +0 -27
  69. data/app/pb_kits/playbook/pb_overlay/overlay.rb +0 -110
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- PREVIOUS_VERSION = "13.30.0"
5
- VERSION = "13.30.0.pre.alpha.20240515remotebuildkitconversion3150"
4
+ PREVIOUS_VERSION = "13.29.0"
5
+ VERSION = "13.30.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: 13.30.0.pre.alpha.20240515remotebuildkitconversion3150
4
+ version: 13.30.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: 2024-06-27 00:00:00.000000000 Z
12
+ date: 2024-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -263,8 +263,6 @@ files:
263
263
  - app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
264
264
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
265
265
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md
266
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb
267
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.md
268
266
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb
269
267
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md
270
268
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
@@ -979,8 +977,6 @@ files:
979
977
  - app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js
980
978
  - app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.html.erb
981
979
  - app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.jsx
982
- - app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default_swift.md
983
- - app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_props_swift.md
984
980
  - app/pb_kits/playbook/pb_date_time_stacked/docs/example.yml
985
981
  - app/pb_kits/playbook/pb_date_time_stacked/docs/index.js
986
982
  - app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss
@@ -1082,7 +1078,6 @@ files:
1082
1078
  - app/pb_kits/playbook/pb_draggable/_draggable.scss
1083
1079
  - app/pb_kits/playbook/pb_draggable/_draggable.tsx
1084
1080
  - app/pb_kits/playbook/pb_draggable/context/index.tsx
1085
- - app/pb_kits/playbook/pb_draggable/context/types.ts
1086
1081
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx
1087
1082
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md
1088
1083
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx
@@ -1092,7 +1087,6 @@ files:
1092
1087
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
1093
1088
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
1094
1089
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
1095
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
1096
1090
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
1097
1091
  - app/pb_kits/playbook/pb_draggable/docs/index.js
1098
1092
  - app/pb_kits/playbook/pb_draggable/draggable.test.jsx
@@ -1104,8 +1098,6 @@ files:
1104
1098
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
1105
1099
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
1106
1100
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
1107
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
1108
- - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
1109
1101
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
1110
1102
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.md
1111
1103
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb
@@ -1227,8 +1219,6 @@ files:
1227
1219
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.html.erb
1228
1220
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx
1229
1221
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close_swift.md
1230
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.html.erb
1231
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_custom_icon.jsx
1232
1222
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.html.erb
1233
1223
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx
1234
1224
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default_swift.md
@@ -1245,7 +1235,6 @@ files:
1245
1235
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js
1246
1236
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb
1247
1237
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
1248
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js
1249
1238
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js
1250
1239
  - app/pb_kits/playbook/pb_flex/_flex.scss
1251
1240
  - app/pb_kits/playbook/pb_flex/_flex.tsx
@@ -1459,8 +1448,6 @@ files:
1459
1448
  - app/pb_kits/playbook/pb_icon/icon.html.erb
1460
1449
  - app/pb_kits/playbook/pb_icon/icon.rb
1461
1450
  - app/pb_kits/playbook/pb_icon/icon.test.js
1462
- - app/pb_kits/playbook/pb_icon/icon_aliases.json
1463
- - app/pb_kits/playbook/pb_icon/types.d.ts
1464
1451
  - app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss
1465
1452
  - app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx
1466
1453
  - app/pb_kits/playbook/pb_icon_circle/docs/_description.md
@@ -1895,16 +1882,12 @@ files:
1895
1882
  - app/pb_kits/playbook/pb_online_status/online_status.rb
1896
1883
  - app/pb_kits/playbook/pb_overlay/_overlay.scss
1897
1884
  - app/pb_kits/playbook/pb_overlay/_overlay.tsx
1898
- - app/pb_kits/playbook/pb_overlay/docs/_overlay_default.html.erb
1899
1885
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx
1900
1886
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md
1901
- - app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.html.erb
1902
1887
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx
1903
1888
  - app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md
1904
1889
  - app/pb_kits/playbook/pb_overlay/docs/example.yml
1905
1890
  - app/pb_kits/playbook/pb_overlay/docs/index.js
1906
- - app/pb_kits/playbook/pb_overlay/overlay.html.erb
1907
- - app/pb_kits/playbook/pb_overlay/overlay.rb
1908
1891
  - app/pb_kits/playbook/pb_overlay/overlay.test.jsx
1909
1892
  - app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx
1910
1893
  - app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx
@@ -3051,7 +3034,7 @@ homepage: https://playbook.powerapp.cloud/
3051
3034
  licenses:
3052
3035
  - ISC
3053
3036
  metadata: {}
3054
- post_install_message:
3037
+ post_install_message:
3055
3038
  rdoc_options: []
3056
3039
  require_paths:
3057
3040
  - lib
@@ -3067,7 +3050,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
3067
3050
  version: '0'
3068
3051
  requirements: []
3069
3052
  rubygems_version: 3.5.3
3070
- signing_key:
3053
+ signing_key:
3071
3054
  specification_version: 4
3072
3055
  summary: Playbook Design System
3073
3056
  test_files: []
@@ -1,59 +0,0 @@
1
- <%# Example sort method for demonstration purposes %>
2
- <% if params["sort"] %>
3
- <% sort_param = params["sort"].gsub(/_(asc|desc)\z/, "") %>
4
- <% sort_direction = params["sort"].end_with?("_asc") ? 1 : -1 %>
5
- <% @table_data.sort! do |a, b|
6
- value_a = a[sort_param]
7
- value_b = b[sort_param]
8
-
9
- value_a = value_a.to_i if value_a.is_a?(String) && value_a.match?(/^\d+$/)
10
- value_b = value_b.to_i if value_b.is_a?(String) && value_b.match?(/^\d+$/)
11
-
12
- sort_direction * (value_a <=> value_b)
13
- end %>
14
- <% end %>
15
-
16
- <%
17
- column_definitions = [
18
- {
19
- accessor: "year",
20
- label: "Year",
21
- cellAccessors: ["quarter", "month", "day"],
22
- sort_menu: [
23
- { item: "Year", link: "?sort=year_asc#table-sort", active: params["sort"] == "year_asc", direction: "asc" },
24
- { item: "Year", link: "?sort=year_desc#table-sort", active: params["sort"] == "year_desc", direction: "desc" }
25
- ],
26
- },
27
- {
28
- accessor: "newEnrollments",
29
- label: "New Enrollments",
30
- },
31
- {
32
- accessor: "scheduledMeetings",
33
- label: "Scheduled Meetings",
34
- },
35
- {
36
- accessor: "attendanceRate",
37
- label: "Attendance Rate",
38
- },
39
- {
40
- accessor: "completedClasses",
41
- label: "Completed Classes",
42
- },
43
- {
44
- accessor: "classCompletionRate",
45
- label: "Class Completion Rate",
46
- },
47
- {
48
- accessor: "graduatedStudents",
49
- label: "Graduated Students",
50
- }
51
- ]
52
-
53
- subrow_headers = ["Quarter", "Month", "Day"]
54
- %>
55
-
56
- <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
57
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
58
- <%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
59
- <% end %>
@@ -1,6 +0,0 @@
1
- Optionally enable sorting by passing `sort_menu` to any `column_definition`(s). Sort options are determined by an array of `item` objects passed to the `sort_menu` prop.
2
-
3
- </br>
4
- <div class="pb_pill_kit_warning"><div class="pb_title_kit_size_4 pb_pill_text">Disclaimer</div></div>
5
-
6
- This example uses a custom sort method that may need to be modified or replaced within your project.
@@ -1,33 +0,0 @@
1
- ![Date-Time-Stacked-Default](https://github.com/powerhome/playbook/assets/54749071/b877dd01-32fa-49ff-af2d-1f8d819f6f39)
2
-
3
- ```swift
4
- VStack(alignment: .leading, spacing: Spacing.small) {
5
- PBDateTimeStacked(
6
- timeZoneIdentifier: "EDT",
7
- isLowercase: true,
8
- isMonthStacked: true,
9
- isMonthBold: true
10
- )
11
- PBDateTimeStacked(
12
- timeZoneIdentifier: "EDT",
13
- isYearDisplayed: true,
14
- isLowercase: true,
15
- isMonthStacked: true,
16
- isMonthBold: true,
17
- isYearBold: true,
18
- dateVariant: .standard
19
- )
20
- PBDateTimeStacked(
21
- timeZoneIdentifier: "GMT+9",
22
- isLowercase: true,
23
- isMonthStacked: true,
24
- isMonthBold: true
25
- )
26
- PBDateTimeStacked(
27
- timeZoneIdentifier: "MDT",
28
- isLowercase: true,
29
- isMonthStacked: true,
30
- isMonthBold: true
31
- )
32
- }
33
- ```
@@ -1,18 +0,0 @@
1
- ### Props
2
- | Name | Type | Description | Default | Values |
3
- | --- | ----------- | --------- | --------- | --------- |
4
- | **dateTime** | `Date` | Takes a date type to calculate the current date | `Date()` | |
5
- | **timeDate** | `Date` | Takes a date type to calculate the current time | `Date()` | |
6
- | **timeZoneIdentifier** | `String` | A string value that is used in a function to get the correct time in the corrresponding time zone. This value is also used to display the time zone next to the time | | |
7
- | **isYearDisplayed** | `Bool` | Determines whether or not the year is displayed with the month and day | `false` | `true` `false` |
8
- | **isLowercase** | `Bool` | Determines whether or not am/pm is capitalized | `false` | `true` `false` |
9
- | **isMonthStacked** | `Bool` | Determines whether or not the value for month is stacked over the date | `false` | `true` `false` |
10
- | **isMonthBold** | `Bool` | Determines whether or not the month is in bold | `false` | `true` `false` |
11
- | **isYearBold** | `Bool` | Determines whether or not the year is in bold | `false` | `true` `false` |
12
- | **dateAlignment** | `HorizontalAlignment` | Sets alignment of date | `.trailing` | `leading` `center` `trailing` |
13
- | **timeAlignment** | `HorizontalAlignment` | Sets alignment of the time zone | `.leading` | `leading` `center` `trailing` |
14
- | **dateVariant** | `Variant` | Allows user to choose the style in which the date is displayed | `.short(showIcon: false)` | `.short(showIcon: false)` `.dayDate(showYear: false)` `.standard` ` .withIcon(isStandard: true)` `.withIcon(isStandard: false)` |
15
- | **timeVariant** | `Variant` | Allows user to choose the style in which the time is displayed | `.time` | `.time` `.iconTimeZone` `.withTimeZoneHeader` |
16
- | **dateSize** | `String` | Allows user to choose the size of the date that is being displayed | `.title4` | `title4` `body` `caption` `large` `subcaption` |
17
- | **timeStyle** | `PBFont` | Allows user to choose the size of the time that is being displayed | `.caption` | `body` `caption` `large` `subcaption`|
18
- | **timeZoneStyle** | `PBFont` | Allows user to choose the size of the time zone that is being displayed | `.caption` | `body` `caption` `large` `subcaption`|
@@ -1,26 +0,0 @@
1
- export interface ItemType {
2
- id: string;
3
- container: string;
4
- [key: string]: any;
5
- }
6
-
7
- export interface InitialStateType {
8
- items: ItemType[];
9
- dragData: { id: string; initialGroup: string };
10
- isDragging: string;
11
- activeContainer: string;
12
- }
13
-
14
- export type ActionType =
15
- | { type: 'SET_ITEMS'; payload: ItemType[] }
16
- | { type: 'SET_DRAG_DATA'; payload: { id: string; initialGroup: string } }
17
- | { type: 'SET_IS_DRAGGING'; payload: string }
18
- | { type: 'SET_ACTIVE_CONTAINER'; payload: string }
19
- | { type: 'CHANGE_CATEGORY'; payload: { itemId: string; container: string } }
20
- | { type: 'REORDER_ITEMS'; payload: { dragId: string; targetId: string } };
21
-
22
- export interface DraggableProviderType {
23
- children: React.ReactNode;
24
- initialItems: ItemType[];
25
- onReorder: (items: ItemType[]) => void;
26
- }
@@ -1,7 +0,0 @@
1
- For a simplified version of the Draggable API for the SelectableList kit, use the DraggableProvider to wrap the SelectableList kit and use the `enableDrag` prop.
2
-
3
- In addition to the above `dragId` is a REQUIRED prop to be passed to the SelectableList kit when implementing dragging.
4
-
5
- The dev must manage state as shown.
6
-
7
- The dragHandle is added by default but this can be opted out of by setting `dragHandle` to false on the SelectableList kit.
@@ -1,9 +0,0 @@
1
- <%
2
- options = [
3
- { label: 'United States', value: 'United States', id: 'us' },
4
- { label: 'Canada', value: 'Canada', id: 'ca' },
5
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
6
- ]
7
- %>
8
-
9
- <%= pb_rails("dropdown", props: { error: "Please make a valid selection", options: options }) %>
@@ -1,34 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { Dropdown } from '../../'
3
-
4
- const DropdownError = (props) => {
5
- const [selectedOption, setSelectedOption] = useState()
6
- const error = selectedOption?.value ? null : "Please make a valid selection"
7
- const options = [
8
- {
9
- label: "United States",
10
- value: "United States",
11
- },
12
- {
13
- label: "Canada",
14
- value: "Canada",
15
- },
16
- {
17
- label: "Pakistan",
18
- value: "Pakistan",
19
- }
20
- ]
21
-
22
- return (
23
- <>
24
- <Dropdown
25
- error={error}
26
- onSelect={(selectedItem) => setSelectedOption(selectedItem)}
27
- options={options}
28
- {...props}
29
- />
30
- </>
31
- )
32
- }
33
-
34
- export default DropdownError
@@ -1,32 +0,0 @@
1
- <div>
2
- <%= pb_rails("fixed_confirmation_toast", props: {
3
- icon: "wrench",
4
- text: "Fix before proceeding",
5
- status: "error",
6
- closeable: true,
7
- margin_bottom: "md"
8
- })%>
9
- </div>
10
- <div>
11
- <%= pb_rails("fixed_confirmation_toast", props: {
12
- icon: "star",
13
- text: "Thank you for completing the form!",
14
- status: "success",
15
- margin_bottom: "md"
16
- })%>
17
- </div>
18
- <div>
19
- <%= pb_rails("fixed_confirmation_toast", props: {
20
- icon: "file-pdf",
21
- text: "Saved as PDF",
22
- status: "neutral",
23
- margin_bottom: "md"
24
- })%>
25
- </div>
26
- <div>
27
- <%= pb_rails("fixed_confirmation_toast", props: {
28
- icon: "arrow-down",
29
- text: "New Messages",
30
- status: "tip"
31
- })%>
32
- </div>
@@ -1,48 +0,0 @@
1
- import React from 'react'
2
-
3
- import FixedConfirmationToast from '../_fixed_confirmation_toast'
4
-
5
- const FixedConfirmationToastCustomIcon = (props) => {
6
- return (
7
- <div>
8
- <div>
9
- <FixedConfirmationToast
10
- closeable
11
- icon="wrench"
12
- marginBottom="md"
13
- status="error"
14
- text="Fix before proceeding"
15
- {...props}
16
- />
17
- </div>
18
- <div>
19
- <FixedConfirmationToast
20
- icon="star"
21
- marginBottom="md"
22
- status="success"
23
- text="Thank you for completing the form!"
24
- {...props}
25
- />
26
- </div>
27
- <div>
28
- <FixedConfirmationToast
29
- icon="file-pdf"
30
- marginBottom="md"
31
- status="neutral"
32
- text="Saved as PDF"
33
- {...props}
34
- />
35
- </div>
36
- <div>
37
- <FixedConfirmationToast
38
- icon="arrow-down"
39
- status="tip"
40
- text="New Messages"
41
- {...props}
42
- />
43
- </div>
44
- </div>
45
- )
46
- }
47
-
48
- export default FixedConfirmationToastCustomIcon
@@ -1,72 +0,0 @@
1
- import React from 'react'
2
- import { render, waitFor } from '../utilities/test-utils'
3
-
4
- import { FixedConfirmationToast } from '../'
5
-
6
- beforeEach(() => {
7
- // Silences error logs within the test suite.
8
- jest.spyOn(console, 'error')
9
- // eslint-disable-next-line
10
- console.error.mockImplementation(() => {})
11
- })
12
-
13
- afterEach(() => {
14
- // eslint-disable-next-line
15
- console.error.mockRestore()
16
- })
17
-
18
- test('renders with default props', () => {
19
- const { container } = render(<FixedConfirmationToast />);
20
- expect(container.firstChild).toBeInTheDocument();
21
- });
22
-
23
- test('renders with text', () => {
24
- const { getByText } = render(<FixedConfirmationToast text="Message Text" />);
25
- expect(getByText('Message Text')).toBeInTheDocument();
26
- });
27
-
28
- test('does not render if open prop is false', () => {
29
- const { container } = render(<FixedConfirmationToast open={false} />);
30
- expect(container.firstChild).toBeNull();
31
- });
32
-
33
- test('closes after autoClose duration', async () => {
34
- jest.useFakeTimers();
35
- const onCloseMock = jest.fn();
36
- render(
37
- <FixedConfirmationToast
38
- autoClose={1000}
39
- onClose={onCloseMock}
40
- open
41
- />
42
- );
43
-
44
- jest.advanceTimersByTime(1000);
45
- await waitFor(() => expect(onCloseMock).toHaveBeenCalled());
46
- });
47
-
48
- test('renders success status with icon', () => {
49
- const { container } = render(<FixedConfirmationToast status="success" />);
50
- expect(container.querySelector('.pb_fixed_confirmation_toast_kit_success')).toBeInTheDocument();
51
- expect(container.querySelector('.pb_icon')).toBeInTheDocument();
52
- });
53
-
54
- test('renders custom icon when provided', () => {
55
- const { container } = render(<FixedConfirmationToast icon="wrench" />);
56
- expect(container.querySelector('.custom_icon')).toBeInTheDocument();
57
- });
58
-
59
- test('renders correctly with multiLine prop', () => {
60
- const { container } = render(<FixedConfirmationToast multiLine />);
61
- expect(container.querySelector('._multi_line')).toBeInTheDocument();
62
- });
63
-
64
- test('renders position when provided', () => {
65
- const { container } = render(
66
- <FixedConfirmationToast
67
- horizontal="right"
68
- vertical="bottom"
69
- />
70
- );
71
- expect(container.querySelector('.positioned_toast')).toBeInTheDocument();
72
- });
@@ -1,39 +0,0 @@
1
- {
2
- "aliases": {
3
- "arrow-alt-circle-right": "circle-right",
4
- "angles-down": "angle-double-down",
5
- "arrow-alt-down": "down",
6
- "arrow-alt-up": "up",
7
- "arrow-right-long": "long-arrow-right",
8
- "arrow-to-bottom": "arrow-down-to-line",
9
- "arrows-h": "arrows-left-right",
10
- "calendar-days": "calendar-alt",
11
- "circle-arrow-right": "arrow-circle-right",
12
- "clock-rotate-left": "history",
13
- "close": [
14
- "times",
15
- "xmark"
16
- ],
17
- "ellipsis-h": "ellipsis",
18
- "exclamation-circle": "circle-exclamation",
19
- "external-link": "arrow-up-right-from-square",
20
- "file-lines": "file-alt",
21
- "gear": "cog",
22
- "home": "house",
23
- "info-circle": "circle-info",
24
- "map-o": "map",
25
- "message": "comment-alt",
26
- "minus-circle": "circle-minus",
27
- "money": "money-bill",
28
- "mouse-pointer": "arrow-pointer",
29
- "nitro": "nitro-n",
30
- "play-circle": "circle-play",
31
- "plus-circle": "circle-plus",
32
- "plus-square": "square-plus",
33
- "powergon": "powergon-p",
34
- "question-circle": "circle-question",
35
- "roofing": "product-roofing",
36
- "shelves": "inventory",
37
- "th-list": "table-list"
38
- }
39
- }
@@ -1 +0,0 @@
1
- declare module 'js-yaml'
@@ -1,24 +0,0 @@
1
- <%= pb_rails("overlay") do %>
2
- <%= pb_rails("table", props: { size: "sm" }) do %>
3
- <thead>
4
- <tr>
5
- <th>Column 1</th>
6
- <th>Column 2</th>
7
- <th>Column 3</th>
8
- <th>Column 4</th>
9
- <th>Column 5</th>
10
- </tr>
11
- </thead>
12
- <tbody>
13
- <% 7.times do %>
14
- <tr>
15
- <td>Value 1</td>
16
- <td>Value 2</td>
17
- <td>Value 3</td>
18
- <td>Value 4</td>
19
- <td>Value 5</td>
20
- </tr>
21
- <% end %>
22
- </tbody>
23
- <% end %>
24
- <% end %>
@@ -1,11 +0,0 @@
1
- <%= pb_rails("overlay", props: { layout: { "x": "xl" }, color: "card_light" }) do %>
2
- <%= pb_rails("flex", props: { column_gap: "lg", orientation: "row", overflow_x: "auto" }) do %>
3
- <% 15.times do %>
4
- <%= pb_rails("flex/flex_item") do %>
5
- <%= pb_rails("card") do %>
6
- Card content
7
- <% end %>
8
- <% end %>
9
- <% end %>
10
- <% end %>
11
- <% end %>
@@ -1,27 +0,0 @@
1
- <%= pb_content_tag(:div,
2
- aria: object.aria,
3
- class: object.classname,
4
- data: object.data,
5
- id: object.id,
6
- **combined_html_options) do %>
7
- <% if is_size_percentage %>
8
- <div class="overlay_linear_gradient"
9
- style="background: <%= previous_overlay %>"></div>
10
-
11
- <%= content.presence %>
12
-
13
- <% if has_subsequent_overlay %>
14
- <div class="overlay_linear_gradient"
15
- style="background: <%= subsequent_overlay %>"></div>
16
- <% end %>
17
-
18
- <% else %>
19
- <div class="<%= previous_overlay_class_name %>"></div>
20
-
21
- <%= content.presence %>
22
-
23
- <% if has_subsequent_overlay %>
24
- <div class="<%= subsequent_overlay_class_name %>"></div>
25
- <% end %>
26
- <% end %>
27
- <% end %>