playbook_ui 14.5.0.pre.alpha.PLAY1510railsformloading3977 → 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4032

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +7 -30
  3. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md +2 -0
  4. data/app/pb_kits/playbook/pb_form/docs/example.yml +0 -1
  5. data/app/pb_kits/playbook/pb_form/form.rb +0 -2
  6. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +195 -228
  7. data/app/pb_kits/playbook/pb_multi_level_select/context/index.tsx +5 -0
  8. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +105 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md +1 -0
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +106 -0
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md +1 -0
  13. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +3 -0
  14. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +2 -0
  15. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx +149 -0
  16. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +45 -11
  17. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +6 -5
  18. data/app/pb_kits/playbook/pb_phone_number_input/types.d.ts +4 -1
  19. data/dist/chunks/{_typeahead-CbSMQAjp.js → _typeahead-CZYZ22U4.js} +2 -2
  20. data/dist/chunks/{_weekday_stacked-DnNh3oJT.js → _weekday_stacked-QgUMeKrB.js} +1 -1
  21. data/dist/chunks/{lib-C9Somihj.js → lib-CEpcaI8y.js} +1 -1
  22. data/dist/chunks/{pb_form_validation-C8U7gqcT.js → pb_form_validation-D9zkwt2b.js} +1 -1
  23. data/dist/chunks/vendor.js +1 -1
  24. data/dist/playbook-doc.js +1 -1
  25. data/dist/playbook-rails-react-bindings.js +1 -1
  26. data/dist/playbook-rails.js +1 -1
  27. data/dist/playbook.css +1 -1
  28. data/lib/playbook/pb_forms_helper.rb +1 -3
  29. data/lib/playbook/version.rb +1 -1
  30. metadata +12 -9
  31. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -8
  32. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
  33. data/app/pb_kits/playbook/pb_form/formHelper.js +0 -39
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf97291ca286d337161542d77a3d67b92ef889233fecf197ea5c3a53e081064b
4
- data.tar.gz: 07c2d8774e6deb985b4faafddb225e8e34e3c1f557970082451f37c5807a3dae
3
+ metadata.gz: 7965ad0a31d9d18d905cedd8a804cafc16faa273ada6eb2a62e12e55a2945688
4
+ data.tar.gz: cb55355040cec1dfb434fde14e62c4f236d32365db8a5f646f82e18d9c6765c8
5
5
  SHA512:
6
- metadata.gz: 48dc3ea53f09320edef603c1ef036d90d4db4b5d5ba7692d6b9baa69d65c22081ef13877401c76b30e8bc7117da2a92bb42956374f7ddc894d15b1f865968315
7
- data.tar.gz: d14f6ceda05a81b1c020b541778c2bc9a8652a6ed208d810a9fb53477ee8d57489843d8519f4380dc3fcf862ab197d673cd14e3c6ba34e2299ec39d1fa79aea0
6
+ metadata.gz: 7004f33f0684cd4774d4560503bbb0f9f8ce78f54da1aa9d98d4de56d6c585bf55326bb0e591628b0fa74ee30cb0ad091c22ab0aea49aaae5ac0c809ffe7762f
7
+ data.tar.gz: 9fac218509a6e59c22d966df75eb7d5568b7355545cbed9ba821de046c098df5802346ea8ce89f46db66ab2d8c5d0de5b0705493fa6cb5ae6663586c8fd5de84
@@ -1,36 +1,13 @@
1
1
  <%= pb_rails("button", props: { text: "Open Dialog", data: {"open-dialog": "dialog-loading"} }) %>
2
2
 
3
- <%= pb_rails("dialog", props: {
4
- id:"dialog-loading",
5
- size: "sm",
6
- title: "Loading Example",
7
- text: "Make a loading request?",
8
- cancel_button: "Cancel Button",
3
+ <%= pb_rails("dialog", props: {
4
+ id:"dialog-loading",
5
+ size: "sm",
6
+ title: "Loading Exmaple",
7
+ text: "Make a loading request?",
8
+ cancel_button: "Cancel Button",
9
9
  cancel_button_id: "cancel-button-loading",
10
- confirm_button: "Okay",
10
+ confirm_button: "Okay",
11
11
  confirm_button_id: "confirm-button-loading",
12
12
  loading: true,
13
13
  }) %>
14
-
15
- <script>
16
- const loadingButton = document.querySelector('[data-disable-with="Loading"]');
17
- if (loadingButton) {
18
- loadingButton.addEventListener("click", function() {
19
- const okayLoadingButton = document.querySelector('[data-disable-with="Loading"]');
20
- const cancelButton = document.querySelector('[data-disable-cancel-with="Loading"]');
21
- let currentClass = okayLoadingButton.className;
22
- let cancelClass = cancelButton ? cancelButton.className : "";
23
-
24
- setTimeout(function() {
25
- okayLoadingButton.disabled = false;
26
- okayLoadingButton.className = currentClass.replace("_disabled_loading", "_enabled");
27
-
28
- if (cancelButton) {
29
- cancelButton.disabled = false;
30
- cancelButton.className = cancelClass.replace("_disabled", "_enabled");
31
- }
32
- }, 5000);
33
-
34
- });
35
- }
36
- </script>
@@ -1 +1,3 @@
1
1
  Pressing the "Okay" button will trigger a loading state where the button content is replaced by a spinner icon and both buttons are disabled.
2
+
3
+ Currently, the loading state cannot be undone and will require a page refresh to reset the dialog.
@@ -3,4 +3,3 @@ examples:
3
3
  rails:
4
4
  - form_form_with: Default
5
5
  - form_form_with_validate: Default + Validation
6
- - form_form_with_loading: Default + Loading
@@ -7,7 +7,6 @@ module Playbook
7
7
  type: Playbook::Props::Base
8
8
  prop :form_system_options, deprecated: "Use options instead",
9
9
  type: Playbook::Props::Base
10
- prop :loading, type: Playbook::Props::Boolean, default: false
11
10
  prop :options, type: Playbook::Props::Base
12
11
  prop :validate, type: Playbook::Props::Boolean, default: false
13
12
 
@@ -23,7 +22,6 @@ module Playbook
23
22
  aria: aria,
24
23
  class: classname,
25
24
  data: data,
26
- loading: loading,
27
25
  validate: validate,
28
26
  }.merge(prop(:options) || prop(:form_system_options) || {})
29
27
  end