playbook_ui 14.5.0.pre.alpha.PLAY1510railsformloading3977 → 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4028

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-DnNh3oJT.js → _weekday_stacked-CU-r3k4h.js} +1 -1
  20. data/dist/chunks/{lib-C9Somihj.js → lib-CEpcaI8y.js} +1 -1
  21. data/dist/chunks/{pb_form_validation-C8U7gqcT.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-CbSMQAjp.js +0 -22
@@ -22,10 +22,9 @@ module Playbook
22
22
  # @param data [Hash] hash of data attributes
23
23
  # @param validate [Boolean] whether validation should be triggered or not
24
24
  # @see [#form_with] for other options
25
- def pb_form_with(data: {}, validate: false, loading: false, **kwargs, &block)
25
+ def pb_form_with(data: {}, validate: false, **kwargs, &block)
26
26
  data = data.merge("pb-form-validation" => validate)
27
27
  classname = ["pb-form", kwargs[:class]].join(" ")
28
- classname += " pb_form_loading" if loading
29
28
  options = kwargs.merge(
30
29
  class: classname,
31
30
  data: data,
@@ -34,7 +33,6 @@ module Playbook
34
33
 
35
34
  content_for(:pb_js, javascript_tag(<<~JS))
36
35
  window.addEventListener("DOMContentLoaded", function() { PbFormValidation.start() })
37
- window.addEventListener("DOMContentLoaded", () => formHelper())
38
36
  JS
39
37
 
40
38
  form_with(**options, &block)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.5.0"
5
- VERSION = "14.5.0.pre.alpha.PLAY1510railsformloading3977"
5
+ VERSION = "14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4028"
6
6
  end
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: 14.5.0.pre.alpha.PLAY1510railsformloading3977
4
+ version: 14.5.0.pre.alpha.PLAY1548intltelinputupdatelatest4028
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-10-04 00:00:00.000000000 Z
12
+ date: 2024-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -1320,13 +1320,10 @@ files:
1320
1320
  - app/pb_kits/playbook/pb_form/docs/_description.md
1321
1321
  - app/pb_kits/playbook/pb_form/docs/_footer.md
1322
1322
  - app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb
1323
- - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb
1324
- - app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.md
1325
1323
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb
1326
1324
  - app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.md
1327
1325
  - app/pb_kits/playbook/pb_form/docs/example.yml
1328
1326
  - app/pb_kits/playbook/pb_form/form.rb
1329
- - app/pb_kits/playbook/pb_form/formHelper.js
1330
1327
  - app/pb_kits/playbook/pb_form/pb_form_validation.js
1331
1328
  - app/pb_kits/playbook/pb_form_group/_form_group.scss
1332
1329
  - app/pb_kits/playbook/pb_form_group/_form_group.tsx
@@ -1799,6 +1796,7 @@ files:
1799
1796
  - app/pb_kits/playbook/pb_multi_level_select/_helper_functions.tsx
1800
1797
  - app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss
1801
1798
  - app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx
1799
+ - app/pb_kits/playbook/pb_multi_level_select/context/index.tsx
1802
1800
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb
1803
1801
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx
1804
1802
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color_rails.md
@@ -1819,12 +1817,17 @@ files:
1819
1817
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb
1820
1818
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx
1821
1819
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md
1820
+ - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx
1821
+ - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.md
1822
+ - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx
1823
+ - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.md
1822
1824
  - app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb
1823
1825
  - app/pb_kits/playbook/pb_multi_level_select/docs/example.yml
1824
1826
  - app/pb_kits/playbook/pb_multi_level_select/docs/index.js
1825
1827
  - app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb
1826
1828
  - app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb
1827
1829
  - app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx
1830
+ - app/pb_kits/playbook/pb_multi_level_select/multi_level_select_options.tsx
1828
1831
  - app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss
1829
1832
  - app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx
1830
1833
  - app/pb_kits/playbook/pb_multiple_users/docs/_description.md
@@ -3076,11 +3079,11 @@ files:
3076
3079
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3077
3080
  - app/pb_kits/playbook/utilities/text.ts
3078
3081
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3079
- - dist/chunks/_typeahead-CbSMQAjp.js
3080
- - dist/chunks/_weekday_stacked-DnNh3oJT.js
3082
+ - dist/chunks/_typeahead-BgSfpf21.js
3083
+ - dist/chunks/_weekday_stacked-CU-r3k4h.js
3081
3084
  - dist/chunks/lazysizes-B7xYodB-.js
3082
- - dist/chunks/lib-C9Somihj.js
3083
- - dist/chunks/pb_form_validation-C8U7gqcT.js
3085
+ - dist/chunks/lib-CEpcaI8y.js
3086
+ - dist/chunks/pb_form_validation-D9zkwt2b.js
3084
3087
  - dist/chunks/vendor.js
3085
3088
  - dist/menu.yml
3086
3089
  - dist/playbook-doc.js
@@ -1,8 +0,0 @@
1
- <%= pb_form_with(scope: :example, url: "", method: :get, loading: true) do |form| %>
2
- <%= form.text_field :example_text_field, props: { label: true } %>
3
-
4
- <%= form.actions do |action| %>
5
- <%= action.submit %>
6
- <%= action.button props: { type: "reset", text: "Cancel", variant: "secondary" } %>
7
- <% end %>
8
- <% end %>
@@ -1 +0,0 @@
1
- Pressing Submit will trigger a loading state where the button content is replaced by a spinner icon and the submit button will be disabled.
@@ -1,39 +0,0 @@
1
- const formHelper = () => {
2
- const loadingForm = document.querySelector(".pb_form_loading")
3
- if (loadingForm) {
4
- loadingForm.addEventListener("submit", function(event) {
5
- const submitButton = event['submitter'];
6
- const cancelButton = event['target'].querySelector('button[type="reset"]');
7
-
8
- if (submitButton) {
9
- let currentClass = submitButton.className;
10
- let newClass = currentClass.replace("_enabled", "_disabled_loading");
11
-
12
- let cancelClass = cancelButton ? cancelButton.className : "";
13
- let newCancelClass = cancelClass.replace("_enabled", "_disabled");
14
-
15
- submitButton.disabled = true;
16
- submitButton.className = newClass;
17
-
18
- if (cancelButton) {
19
- cancelButton.disabled = true;
20
- cancelButton.className = newCancelClass;
21
- }
22
-
23
- setTimeout(function() {
24
- submitButton.disabled = false;
25
- submitButton.className = currentClass;
26
-
27
- if (cancelButton) {
28
- cancelButton.disabled = false;
29
- cancelButton.className = cancelClass;
30
- }
31
- }, 5000);
32
- }
33
-
34
- this.submit();
35
- });
36
- }
37
- };
38
-
39
- export default formHelper;