playbook_ui 15.6.0.pre.alpha.play2552collapsibleiconrefactor12903 → 15.6.0.pre.alpha.play265012910

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.
@@ -13,5 +13,36 @@ module Playbook
13
13
  render kit.new(props, &block), &block
14
14
  end
15
15
  end
16
+
17
+ def deprecated_kit_warning(kit_name, message = nil)
18
+ # Skip in test and production environments
19
+ return "".html_safe if Rails.env.test? || Rails.env.production?
20
+
21
+ # Build the warning message
22
+ base_message = "PLAYBOOK DEPRECATION WARNING\\n ----------------------------\\n The \\\"#{kit_name}\\\" kit is deprecated and will be removed in a future version."
23
+
24
+ full_message = if message
25
+ "#{base_message} #{message}"
26
+ else
27
+ "#{base_message} Please migrate to the recommended alternative"
28
+ end
29
+
30
+ # Escape the message for JavaScript
31
+ escaped_message = full_message.gsub("'", "\\\\'").gsub("\n", "\\n")
32
+
33
+ # Return a self-executing script that checks if we've already warned
34
+ # Uses client-side tracking to ensure one warning per page load
35
+ script = "<script type=\"text/javascript\">\n"
36
+ script += "(function() {\n"
37
+ script += " if (!window.__PB_WARNED_KITS__) window.__PB_WARNED_KITS__ = new Set();\n"
38
+ script += " if (!window.__PB_WARNED_KITS__.has('#{kit_name}')) {\n"
39
+ script += " window.__PB_WARNED_KITS__.add('#{kit_name}');\n"
40
+ script += " console.warn('#{escaped_message}');\n"
41
+ script += " }\n"
42
+ script += "})();\n"
43
+ script += "</script>"
44
+
45
+ script.html_safe
46
+ end
16
47
  end
17
48
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "15.6.0"
5
- VERSION = "15.6.0.pre.alpha.play2552collapsibleiconrefactor12903"
5
+ VERSION = "15.6.0.pre.alpha.play265012910"
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: 15.6.0.pre.alpha.play2552collapsibleiconrefactor12903
4
+ version: 15.6.0.pre.alpha.play265012910
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -3822,6 +3822,7 @@ files:
3822
3822
  - app/pb_kits/playbook/utilities/_truncate.scss
3823
3823
  - app/pb_kits/playbook/utilities/_vertical_align.scss
3824
3824
  - app/pb_kits/playbook/utilities/_width.scss
3825
+ - app/pb_kits/playbook/utilities/deprecated.ts
3825
3826
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_content.scss
3826
3827
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_items.scss
3827
3828
  - app/pb_kits/playbook/utilities/flexbox_global_props/_align_self.scss
@@ -3861,9 +3862,9 @@ files:
3861
3862
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3862
3863
  - app/pb_kits/playbook/utilities/text.ts
3863
3864
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3864
- - dist/chunks/_typeahead-DHGyRtix.js
3865
+ - dist/chunks/_typeahead-CnPLuGbe.js
3865
3866
  - dist/chunks/lazysizes-B7xYodB-.js
3866
- - dist/chunks/lib-BxonsVJa.js
3867
+ - dist/chunks/lib-CgpqUb6l.js
3867
3868
  - dist/chunks/vendor.js
3868
3869
  - dist/menu.yml
3869
3870
  - dist/playbook-rails-react-bindings.js