playbook_ui 14.8.0.pre.alpha.PLAY16254545 → 14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565

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.
@@ -5,6 +5,19 @@ module Playbook
5
5
  class Builder
6
6
  def typeahead(name, _options = {}, _html_options = {}, props: {})
7
7
  props[:name] = name
8
+
9
+ input_id = "#{name}_input"
10
+ props[:input_options] ||= {}
11
+ props[:input_options][:id] ||= input_id
12
+
13
+ props[:label] = @template.label(@object_name, name, for: props[:input_options][:id]) if props[:label] == true
14
+
15
+ if props[:validation]
16
+ validation_message = props[:validation][:message]
17
+ props[:input_options][:data] ||= {}
18
+ props[:input_options][:data][:validation_message] = validation_message
19
+ end
20
+
8
21
  @template.pb_rails("typeahead", props: props)
9
22
  end
10
23
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.8.0"
5
- VERSION = "14.8.0.pre.alpha.PLAY16254545"
5
+ VERSION = "14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565"
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.8.0.pre.alpha.PLAY16254545
4
+ version: 14.8.0.pre.alpha.revert3916revert3893PBNTR667railstypeaheadformintegration4565
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -3170,11 +3170,11 @@ files:
3170
3170
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3171
3171
  - app/pb_kits/playbook/utilities/text.ts
3172
3172
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3173
- - dist/chunks/_typeahead-D0PihN_3.js
3174
- - dist/chunks/_weekday_stacked-uMIX8f-A.js
3173
+ - dist/chunks/_typeahead-IoHUnHeF.js
3174
+ - dist/chunks/_weekday_stacked-BuaqHM9z.js
3175
3175
  - dist/chunks/lazysizes-B7xYodB-.js
3176
- - dist/chunks/lib-BC6ESsxG.js
3177
- - dist/chunks/pb_form_validation-B_Z9rEbg.js
3176
+ - dist/chunks/lib-SyD3buPZ.js
3177
+ - dist/chunks/pb_form_validation-Dt8UJgrJ.js
3178
3178
  - dist/chunks/vendor.js
3179
3179
  - dist/menu.yml
3180
3180
  - dist/playbook-doc.js