playbook_ui 14.5.0.pre.alpha.PLAY1510railsformloading3976 → 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4028

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 -4
  18. data/dist/chunks/_typeahead-BgSfpf21.js +22 -0
  19. data/dist/chunks/{_weekday_stacked-t67FO9CK.js → _weekday_stacked-CU-r3k4h.js} +1 -1
  20. data/dist/chunks/{lib-DO3XYwLd.js → lib-CEpcaI8y.js} +1 -1
  21. data/dist/chunks/{pb_form_validation-BMrySPn2.js → pb_form_validation-D9zkwt2b.js} +1 -1
  22. data/dist/chunks/vendor.js +1 -1
  23. data/dist/playbook-doc.js +1 -1
  24. data/dist/playbook-rails-react-bindings.js +1 -1
  25. data/dist/playbook-rails.js +1 -1
  26. data/dist/playbook.css +1 -1
  27. data/lib/playbook/pb_forms_helper.rb +1 -3
  28. data/lib/playbook/version.rb +1 -1
  29. metadata +12 -9
  30. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +0 -8
  31. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md +0 -1
  32. data/app/pb_kits/playbook/pb_form/formHelper.js +0 -39
  33. data/dist/chunks/_typeahead-uXdXDcXW.js +0 -22
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6af44f906d83c8278089d9d5a1e69a926f9eb7349c955d7d9383d189a0e676a
4
- data.tar.gz: 0b760c392b934a26664d5d4b0d4ebe59d149e80faf5cd7d88f47dc7d85ee070d
3
+ metadata.gz: 4f4c94c493daf726dc039b1e497273b1e399c416834b47f90f5f1de5adfdfcd3
4
+ data.tar.gz: db7bf747a4cec3dda4fe95fe8957a0a062a23de1cd60b52b76657c4763233bab
5
5
  SHA512:
6
- metadata.gz: 1e57b8211ee33e8e586ad1a4bfa23207d8ab4dd815713c7e50ecc8b39cc3316579b6c50d6d33db4a7c14eedf85b1ea7dec3991818c62ea241b8f9b14f2fc30f1
7
- data.tar.gz: 90866ebecb53a331d92c42284d30ce063d1a0ae23b68438670ef416418fcae2e254fdf107394fed30421894cff69966195b32bebacd194caede6254ec2353e56
6
+ metadata.gz: 6e92e7dddd11a4e60ca9a98ab50cfb53d5e08f86a2d0a485b4a84bbfd1159d80dcc4dad718d1d115ae377f24e239c77e90588a00134d985cff50958c217e8a23
7
+ data.tar.gz: d314e1f5b3e4bb8eed249e0229a89e3415b2f1fd93a510818870ade9521b0995789623ea33b200caf2bc1eb0c39a597c6804dccbd49c6683ba50a0cb6cdf86cc
@@ -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