playbook_ui_docs 14.12.0.pre.rc.5 → 14.12.0.pre.rc.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71e1bb720cc11b3c86375c7bc322248b5e79bc9434c7fa328ea696bd53c5037b
4
- data.tar.gz: c98bab75074e0a43cec29afb63eec6f5bb0a909b4ae60e41e38841c2ea66179d
3
+ metadata.gz: 25fcc8dc355b7b990f0aec735da8e9fbcb6740bd55cb22888bb50b132607f68e
4
+ data.tar.gz: 44f1d3e7a64113be4d01cb4d71fb732754b98ed1c7be786849520fd4b85d2271
5
5
  SHA512:
6
- metadata.gz: 8fcfb18ea70cb0445e53c2bc655dce6e42b12a8baf3f7d6c813f7c13416b2c2cd2afd84f6f1d77cc8c3fe7909a1661cf6497d23aa7ac870a199fdc51bcf2c7c2
7
- data.tar.gz: 34fcdcf14e0fb732156532333ddbf6d071b4c8580a31e490665b650b4c2dade356ebbab07e0b39d199651f0e99e9932b31135b631ee18659c18314c8fd54bf8c
6
+ metadata.gz: 45a3c907cbd0cc33ae88c00891dfa4bc329a6cace49e962a529c8ea1731d554c5bab79bdc3b8dc61333eeb9fccb0fc2484131a706bb2bc676750307c70841ad4
7
+ data.tar.gz: '08acc16e2642ada2200e4fa17137a5b6633922a92ee1e14a15878c6d5ea9c44bbcb51557e19bee4d64d0440926a909a73025ea82030417ce502f586af4af7bc3'
@@ -2,4 +2,4 @@ The `defaultDate`/`default_date` prop has a null or empty string value by defaul
2
2
 
3
3
  If you use a Date object without UTC time standardization the Date Picker kit may misinterpret that date as yesterdays date (consequence of timezone differentials and the Javascript Date Object constructor). See [this GitHub issue for more information](https://github.com/powerhome/playbook/issues/1167) and the anti-pattern examples below.
4
4
 
5
-
5
+ You can leverage the `defaultDate`/`default_date` prop with custom logic in your filter or controller files where the determination of the default value changes based on user interaction. The page can load with an initial default date picker value or placeholder text, then after filter submission save the submitted values as the "new default" (via state or params).
@@ -6,14 +6,8 @@
6
6
 
7
7
  ] %>
8
8
 
9
- <%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
10
- <%= pb_rails("draggable/draggable_container") do %>
11
- <%= pb_rails("list", props: {ordered: false}) do %>
12
- <% initial_items.each do |item| %>
13
- <%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
14
- <%= pb_rails("list/item") do %><%= item[:name] %><% end %>
15
- <% end %>
16
- <% end %>
17
- <% end %>
9
+ <%= pb_rails("list", props: { enable_drag: true, items: initial_items }) do %>
10
+ <% initial_items.each do |item| %>
11
+ <%= pb_rails("list/item", props:{drag_id: item[:id]}) do %><%= item[:name] %><% end %>
18
12
  <% end %>
19
13
  <% end %>
@@ -0,0 +1,5 @@
1
+ For a simplified version of the Draggable API for the List kit, you can do the following:
2
+
3
+ The List kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on List kit with an array of the included items AND `drag_id` prop on ListItems. You will also need to include the `items` prop containing your array of listed items for the Draggable API.
4
+
5
+ An additional optional boolean prop (set to true by default) of `drag_handle` is also available on ListItem kit to show the drag handle icon.
@@ -0,0 +1,38 @@
1
+ <%= pb_rails("selectable_list",
2
+ props: {
3
+ enable_drag: true,
4
+ variant: "radio",
5
+ items: [
6
+ { drag_id: "41",
7
+ text: "Task 1",
8
+ input_options: {
9
+ value: "1",
10
+ name: "radio-name",
11
+ }
12
+ },
13
+ { drag_id: "42",
14
+ text: "Task 2",
15
+ checked: true,
16
+ input_options: {
17
+ value: "2",
18
+ name: "radio-name",
19
+ }
20
+ },
21
+ { drag_id: "43",
22
+ text: "Task 3",
23
+ input_options: {
24
+ value: "3",
25
+ name: "radio-name",
26
+ }
27
+ },
28
+ { drag_id: "44",
29
+ text: "Task 4",
30
+ input_options: {
31
+ value: "4",
32
+ name: "radio-name",
33
+ }
34
+ }
35
+ ]
36
+ }
37
+ )
38
+ %>
@@ -0,0 +1,3 @@
1
+ For a simplified version of the Draggable API for the SelectableList kit, you can do the following:
2
+
3
+ The SelectableList kit is optimized to work with the draggable kit. To enable drag, use the `enable_drag` prop on SelectableList kit AND `drag_id` prop within the SelectableList kit prop. An additional optional boolean prop (set to true by default) of `drag_handle` is also available on SelectableList kit to show the drag handle icon.
@@ -11,6 +11,7 @@ examples:
11
11
  rails:
12
12
  - draggable_default_rails: Default
13
13
  - draggable_with_list_rails: Draggable with List Kit
14
+ - draggable_with_selectable_list_rails: Draggable with SelectableList Kit
14
15
  - draggable_with_cards_rails: Draggable with Cards
15
16
 
16
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.12.0.pre.rc.5
4
+ version: 14.12.0.pre.rc.7
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: 2025-01-16 00:00:00.000000000 Z
12
+ date: 2025-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -682,8 +682,11 @@ files:
682
682
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
683
683
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
684
684
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
685
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md
685
686
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
686
687
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
688
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
689
+ - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
687
690
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
688
691
  - app/pb_kits/playbook/pb_draggable/docs/index.js
689
692
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx